Illust
MarketplaceGlobal Art MapBlogTwitter
  • Illust.space
  • .github
    • pull_request_template
  • docs
    • Illust Dev Docs
    • Packages
    • process
    • dev-workflow
      • Deployment
      • Development process
      • Visual Studio Code
    • libraries
      • Storybook
      • Act
      • Aframe
      • Chakra UI
      • Cypress
      • Hosting
      • React Three Fiber
        • Shadows
      • Firebase
        • Firestore
      • zustand
      • Firebase Url Shotener
    • Flows
      • User Sign In
      • Aframe AR Map
  • packages
    • Illust API
    • Illust Marketplace
    • Migrate DB
    • scraper
    • Illust Shared
    • Illust WebAR Discovery App
  • Illust Code Style Guide
    • JavaScript/TypeScript
    • Code Orgainzation
    • React
    • Testing
  • Knowledge Base
    • React
      • Hooks
Powered by GitBook
On this page

Was this helpful?

  1. docs
  2. Flows

Aframe AR Map

The component flow for viewing and popping an Art Piece

Traces the flow of logic from loading ar.illust.space to seeing an ArtPiece in AR as a Mermaid Diagram

  sequenceDiagram;
    xr8.html ->> geo_arrow_element: render
    xr8.html ->> ground_element: render
    xr8.html ->> onboardingComponent: Opens on page load
    onboardingComponent ->> OnboardingScreen: render
    OnboardingScreen ->> PermissionsPanel: User clicks accept
    PermissionsPanel ->> PermissionsPanel: Grant camera
    PermissionsPanel ->> PermissionsPanel: Grant location
    PermissionsPanel ->> PermissionsPanel: Grant motion
    PermissionsPanel ->> OnboardingScreen: Permissions passed
    OnboardingScreen ->> cameraEl: Set camera position
    OnboardingScreen ->> xr8: Start World Tracking
    OnboardingScreen ->> geofencedModelComponent: enable
    OnboardingScreen ->> targetArtPieceComponent: enable & set geo-arrow reference
    GeofencedModelComponent ->> Firestore: watch AR Config
    GeofencedModelComponent ->> watchPieces: start piece watch
    watchPieces ->> Firestore: watch ArtPieces in active layer, and all layers
    geofencedModelComponent ->> captureComponent: Initialize with AR Config

    Note right of watchPieces: Art Piece Becomes Active
    watchPieces ->> watchPieces: set active piece and layer based on query params 
    watchPieces ->> geofencedModelComponent: Send updates of currently active piece
    geofencedModelComponent ->> targetArtPieceComponent: active ArtPiece & AR Config
    geofencedModelComponent ->> captureComponent: active ArtPiece & Ar Config
    captureComponent ->> CaptureWrapper: Render UI for PoPs, MiniMap
    targetArtPieceComponent ->> ArtPieceRenderer: Pre-load piece and set up the a new ThreeJS scene for the piece
    targetArtPieceComponent ->> NextPieceButton: Render
    targetArtPieceComponent ->> CaptureComponent: Show ArtPiece card
    CaptureComponent ->> ArtPieceCard: Show ArtPiece card
    NextPieceButton ->> watchPieces: On click, pick the next closest piece
    targetArtPieceComponent ->> xr8: Can switch camera direction
    targetArtPieceComponent ->> targetArtPieceComponent: Watch position
    
    Note right of targetArtPieceComponent: User is far from piece
    targetArtPieceComponent ->> geoArrowComponent: render the compass & associated UI
    targetArtPieceComponent ->> DistanceMessageWrapper: Show and update distance message
    ArtPieceRenderer ->> artPieceUiComponent: Update Far Art Piece

    Note right of targetArtPieceComponent: User is close to piece
    targetArtPieceComponent ->> ArtPieceRenderer: Show Piece
    ArtPieceRenderer ->> ground_element: Update size and show
    ArtPieceRenderer ->> artPieceUiComponent: Show Map
    artPieceUiComponent ->> captureComponent: Show Map
    captureComponent ->> CaptureWrapper: Show Map
    CaptureWrapper ->> MiniMap: Show Map
    CaptureWrapper ->> ShownArtPieceUi: Show PoP Button
    ShownArtPieceUi ->> PopManager: Show PoP Button
    targetArtPieceComponent --x DistanceMessageWrapper: Hide distance message
PreviousUser Sign InNextpackages

Last updated 2 years ago

Was this helpful?