Preparing search index...

    The id of a Editor.Model.Layer.

        // LayerId identifies a scene Layer. Scene objects and cameras belong to
    // LayerSets built from these ids — a camera only renders objects whose
    // layer set intersects its renderLayer.
    const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
    const scene = model.project.scene;

    // Put a new scene object on the Default layer and render it via a camera
    // constrained to that same layer.
    const obj = scene.createSceneObject('DefaultLayerObj');
    obj.layers = Editor.Model.LayerSet.fromId(Editor.Model.LayerId.Default);

    const camObj = scene.createSceneObject('DefaultCam');
    const camera = camObj.addComponent('Camera') as Editor.Components.Camera;
    camera.renderLayer = Editor.Model.LayerSet.fromId(Editor.Model.LayerId.Default);

    console.log(`Object and camera both assigned the Default LayerId so the camera will render the object.`);
    Index

    Constructors

    • Constructs a new LayerId instance.

      Parameters

      • value: number

      Returns LayerId

    Properties

    Default: LayerId

    The default layer in a Lens.

    MaxUser: LayerId

    The maximum user of a layer.

    MinUser: LayerId

    The minimum user of a layer.

    Ortho: LayerId

    The layer which is used by the Orthographic camera by default.

    Methods

    • Iterates over all LayerId values, invoking the predicate for each.

      Parameters

      Returns void

    • Iterates over all user-defined LayerId values, invoking the predicate for each.

      Parameters

      Returns void