Exposes User Data
Wearable Only
Protected
constructorThe name of the Asset in Lens Studio.
Readonly
uniqueStatic
createStatic
createExposes User Data
Wearable Only
Spectacles: 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 Data
Wearable Only
Get the list of resolutions this hardware camera can provide.
Returns 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 Data
Wearable Only
Returns a Texture whose provider is CameraTextureProvider which provides images from the requested camera ID.
Exposes User Data
Wearable Only
Spectacles: 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.
Example