Exposes User DataThe name of the Asset in Lens Studio.
ReadonlyuniqueStaticcreateExposes User DataSpectacles: Create a still-capture session. The capture pipeline is pre-warmed in CameraModule.CaptureSession#start; trigger individual captures with CameraModule.CaptureSession#capture which returns a Promise that resolves with the captured Frame.
A new capture session.
StaticcreateExposes User DataSpectacles: create a CameraImage.ImageRequest. This object can be used to configure a request for a high resolution image of the user's camera stream. The resolution of this image will be fixed to 3200x2400.
Exposes User DataSpectacles: Create a streaming camera session for continuous frame delivery. Configure with a CameraModule.StreamConfig and start with CameraModule.StreamingSession#start. Sessions are restartable; call CameraModule.StreamingSession#stop to release the camera.
A new streaming session.
Exposes User DataSpectacles: Query available camera streams. Each entry is a valid camera + resolution + format + frame rate combination. Results are sorted descending by pixel area so the highest-resolution stream is first.
Optionalfilter: StreamFilterOptional filter to narrow results by camera type and/or location. Omit it (or pass null) to get every available stream.
Array of stream descriptors. Pass an element to StreamConfig#stream to configure a session.
StaticgetReturns the name of this object's type.
Returns true if the object matches or derives from the passed in type.
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Exposes User DataReturns a Texture whose provider is CameraTextureProvider which provides images from the requested camera ID.
Exposes User DataSpectacles: Request a still image of the user's camera stream. Unlike {@CameraModule.requestCamera}, this method takes more time but yields a higher resolution image (3200x2400) suitable for tasks like OCR. This method is asynchronous and when complete will return an ImageFrame that contains a {@Texture } that can be attached to a visual.
let cameraModule = require("LensStudio:CameraModule");
let imageRequest = CameraModule.createImageRequest();
try {
let imageFrame = await cameraModule.requestImage(imageRequest);
// Use the texture in some visual
script.image.mainPass.baseTex = imageFrame.texture;
let timestamp = imageFrame.timestampMillis; // scene-relative time
} catch (error) {
print(`Still image request failed: ${error}`);
}
Provides access to a specific camera on Spectacles device.
Remarks
Useful for requesting a specific camera on Spectacles or requesting images from both cameras simultaneously.
See
Camera Module guide.
Snap OS
Example