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 its clear color
    const cam = scene.mainCamera;
    if (Editor.isNull(cam)) return;

    const cc = cam.clearColor;

    // Set to clear with a solid color (sky blue)
    cc.mode = Editor.Components.CameraClearColor.Mode.Color;
    cc.color = new vec4(0.5, 0.7, 1.0, 1.0);
    console.log(`ClearColor: mode=Color, rgba=(${cc.color.x}, ${cc.color.y}, ${cc.color.z}, ${cc.color.w})`);

    // Switch to no clearing
    cc.mode = Editor.Components.CameraClearColor.Mode.None;
    console.log(`ClearColor: mode=None (${cc.mode})`);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    color: vec4

    Clear color as a vec4 RGBA value.

    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 the camera background is cleared.

    type: string

    The entity's type.

    Methods

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

      Parameters

      • type: string

      Returns boolean

    • Return metadata for CameraClearColor.

      Returns Meta