Description

Represents the Lens scene. Accessible through global.scene.

Example

if(global.scene.getCameraType() == "front")
{
print("the front camera is active");
}
else if(global.scene.getCameraType() == "back")
{
print("the back camera is active");
}
var newObject = global.scene.createSceneObject("newObject");
interface ScriptScene {
    captureTarget: Texture;
    isRayTracingSupported: boolean;
    liveOverlayTarget: Texture;
    liveTarget: Texture;
    createDepthStencilRenderTargetTexture(): Texture;
    createRenderTargetTexture(): Texture;
    createSceneObject(name): SceneObject;
    getCameraType(): string;
    getRootObject(index): SceneObject;
    getRootObjectsCount(): number;
    getTypeName(): string;
    isOfType(type): boolean;
    isRecording(): boolean;
    isSame(other): boolean;
}

Hierarchy (view full)

Properties

captureTarget: Texture

Description

The output Render Target of the actual recorded video.

isRayTracingSupported: boolean

Description

Returns true if the device supports Raytracing and Advanced Graphics Features is enabled in the project settings.

liveOverlayTarget: Texture

Description

Similar to liveTarget, but this RenderTarget will not have predictive motion adjustments applied to it (only applicable on supported devices). Learn more

liveTarget: Texture

Description

The output Render Target that users will see in the live camera and during recording.

Methods

  • Returns Texture

    Description

    Create a texture containing the DepthStencilRenderTargetProvider.

  • Returns string

    Description

    Returns a string describing the currently active device camera.

    Returns "back" if the rear-facing (aka World) camera is active.

    Returns "front" if the front-facing (aka Selfie) camera is active.

    Otherwise, the camera is not initialized.

  • Returns number

    Description

    Returns the number of SceneObjects in the current scene.

  • Returns string

    Description

    Returns the name of this object's type.

  • Parameters

    • type: string

    Returns boolean

    Description

    Returns true if the object matches or derives from the passed in type.

  • Returns boolean

    Description

    Returns whether or not the scene is currently being recorded.

  • Parameters

    Returns boolean

    Description

    Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

Generated using TypeDoc