Preparing search index...

    Class CompositionLayerComponentWearable Only

    Represents a composition layer that is rendered independently from the main scene and composited by the system compositor. The type of the layer determines the underlying geometry (e.g. Quad).

    The composition layer is hidden in capture or in display when its SceneObject's layer is in ScriptScene#hiddenInCapture or ScriptScene#hiddenInDisplay respectively.

    Lens Scripting Version 370

    Hierarchy (View Summary)

    Index

    Properties

    anchorId: string

    An optional anchor identifier for attaching this composition layer to a tracked anchor. When set, the layer's pose is driven by the anchor system instead of the SceneObject transform.

    Lens Scripting Version 370

    ""
    @experimental
    @wearableOnly
    enabled: boolean

    If disabled, the Component will stop enacting its behavior.

    true
    
    isBeingDestroyed: boolean

    Returns true if this Component is currently being destroyed. Becomes true as soon as destruction begins via Component#destroy or destruction of its owning SceneObject, before any OnDestroyEvent callbacks fire.

    Lens Scripting Version 364

    if (!script.isBeingDestroyed) {
    // Component is still fully alive
    }
    isEnabledInHierarchy: boolean

    Returns true if this Component, its SceneObject, and all of that SceneObjects parents are enabled.

    renderOrder: number

    Back-to-front render order: higher values render in front, lower (negative) values behind. The main projection layer is at 0, so a positive value renders the layer in front of it, a negative behind.

    Lens Scripting Version 370

    0
    @wearableOnly
    sceneObject: SceneObject

    The SceneObject this component is on.

    smoothFollowDurationSec: number

    The duration in seconds for the composition layer to smooth follow the camera. Only used if smoothFollowEnabled is true.

    Lens Scripting Version 370

    0.3
    @wearableOnly
    smoothFollowEnabled: boolean

    If true, the composition layer will smoothly follow the layer's current pose.

    Lens Scripting Version 370

    false
    @wearableOnly
    texture: Texture

    The texture to display on this composition layer. This must be explicitly set when rendering into the layer to display content.

    Lens Scripting Version 370

    null
    @wearableOnly
    uniqueIdentifier: string

    Lens Scripting Version 176

    Methods

    • Destroys the component.

      Returns void

    • Wearable Only

      Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().

      Returns string

      Lens Scripting Version 370

    • Returns the name of this object's type.

      Returns string

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

      Parameters

      • type: string

      Returns boolean

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

      Parameters

      Returns boolean