Camera
Camera frames and still images, depth, segmentation, and front/back camera events.
Commonly used
CameraModuleProvides access to the SPECS cameras.CameraTextureProviderDepthModuleProvides access to a DepthFrameSession on Spectacles device.CameraBackEventTriggered when the device's back facing camera becomes active.CameraFrontEventTriggered when the device's front facing camera becomes active.DeviceCameraProvides information about the device's camera.
Guides
Depth ModuleRequest depth frames on SPECS to understand scene geometry, measure distances, and place content against real-world surfaces.Camera ModuleRequest and receive camera frames from SPECS to build AR experiences that interact with the user's real-world environment.World Mesh and Depth TextureWorld Mesh provides a real-time 3D reconstruction of the real world based on what your device sees.Combining World and FaceYou're able to create Lenses with unique content on both the front and rear camera.
All APIs in this topic
Reference assets and other modules with a script input, require modules with require('LensStudio:<name>'), and create events with script.createEvent('<name>').
Components, assets, and modules
| API | Description |
|---|---|
| CameraModule SPECS | Provides access to the SPECS cameras. |
| DepthModule | Provides access to a DepthFrameSession on Spectacles device. |
| SegmentationModel | Segmentation model used for SegmentationTextureProvider. |
Events
| API | Description |
|---|---|
| CameraBackEvent | Triggered when the device's back facing camera becomes active. |
| CameraFrontEvent | Triggered when the device's front facing camera becomes active. |
Objects and data
| API | Description |
|---|---|
| CameraFrame SPECS | Metadata about the current camera image of a CameraTextureProvider. |
| CameraTextureProvider SPECS | |
| DepthFrameData | The depth frame data as provided by the DepthFrameSession.onNewFrame. |
| DepthFrameSession | Used for receiving DepthFrameData on Spectacles device. |
| DepthTextureProvider | Provides depth information of the video feed that the Lens is being applied to when available. |
| DeviceCamera | Provides information about the device's camera. |
| ReverseCameraTextureProvider | Texture Provider giving the camera texture that is the opposite of CameraTextureProvider. |
| SegmentationTextureProvider | Controls a segmentation texture resource. |
| WorldDepthTextureProvider | Provides depth information of the video feed that the Lens is being applied to when available. |