Create an App object.
Startup options. Note that you can only specify ONE of cameraOptions and threeObjects, as cameraOptions is intended to configure a new three.js camera, while threeObjects allows you to specify an existing camera, renderer and scene.
Emit an event.
the event to emit.
Set the correct three.js camera field of view based on the proportion of the webcam feed currently visible.
the current video feed width
the current video feed height
the current screen aspect ratio
Remove an event handler.
the event to remove a handler from.
the event handler function to remove.
Add an event handler. Overridden from EventEmitter to create a ClickHandler for objectsIntersected event.
the event to handle.
the event handler function.
Start the app. Must be called after construction.
Promise resolving with LocAR object. Rejects with object containing code and message.
Sync the Three.js fov with the webcam. It may be necessary to adjust the Three fov to match the proportion of the world currently visible through the webcam, which will vary depending on orientation (portrait or landscape) For example, if the device is in portrait, less of the world horizontally will be visible. Mostly intended to be called internally: if you are developing a pure LocAR app you will not need to call this. However it will be necessary to call this on each frame if another library/framework (typically R3F) has provided the three.js objects (i.e the threeObjects option has been provided to the constructor).
OptionalaspectScreen: number
Application class to orchestrate the interaction between the individual LocAR classes and the Three.js camera, renderer and scene.