locar
    Preparing search index...

    Class App

    Application class to orchestrate the interaction between the individual LocAR classes and the Three.js camera, renderer and scene.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    camera: PerspectiveCamera
    cameraFeedDimensions: { landHeight: number; landWidth: number } | null
    deviceOrientationControls: DeviceOrientationControls | null
    eventHandlers: Record<string, ((...args: any[]) => void)[]>
    locar: LocAR
    origHfov: number
    renderer: WebGLRenderer
    scene: Scene
    webcam: Webcam

    Methods

    • Remove an event handler.

      Parameters

      • eventName: string

        the event to remove a handler from.

      • eventHandler: (...args: any[]) => void

        the event handler function to remove.

      Returns void

    • Add an event handler.

      Parameters

      • eventName: string

        the event to handle.

      • eventHandler: (...args: any[]) => void

        the event handler function.

      Returns void

    • Start the app. Must be called after construction.

      Returns Promise<LocAR>

      Promise resolving with LocAR object. Rejects with object containing code and message.