Preparing search index...

    The same entity as in Lens Scripting.

        const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
    const scene = model.project.scene;

    // Get the main camera and configure depth clearing
    const cam = scene.mainCamera;
    if (Editor.isNull(cam)) return;

    const cd = cam.clearDepth;

    // Clear depth to a specific value each frame
    cd.mode = Editor.Components.CameraClearDepth.Mode.Value;
    cd.value = 1.0;
    console.log(`ClearDepth: mode=Value, value=${cd.value}`);

    // Disable depth clearing
    cd.mode = Editor.Components.CameraClearDepth.Mode.None;
    console.log(`ClearDepth: mode=None (${cd.mode})`);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    id: Uuid

    The unique id of the entity.

    input: Texture

    Texture to use when mode is set to Texture.

    meta: Meta

    Metadata associated with this entity, providing access to its unique identifier and other descriptive properties.

    How depth clearing is performed.

    type: string

    The entity's type.

    value: number

    Depth value to clear to when mode is set to Value.

    Methods

    • Returns true if the object is of the specified type.

      Parameters

      • type: string

      Returns boolean

    • Return metadata for CameraClearDepth.

      Returns Meta