Preparing search index...

    No longer recommended for use in new projects. This class provides visual representation for interactor lines. It allows customization of the line's material, colors, width, length, and visual style. The class integrates with the InteractionManager and WorldCameraFinderProvider to manage interactions and camera positioning.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _beginColor: vec3 = ...

    The color at the start (origin) of the interactor line visual.

    _endColor: vec3 = ...

    The color at the end (target) of the interactor line visual.

    _interactor?: BaseInteractor

    Reference to the Interactor component that this line will visualize. The line visual appears only when the referenced interactor is using Indirect targeting mode and is actively targeting.

    api: Record<string, any>

    Generic object accessible by other instances of ScriptComponent. Use this object to store references to properties and methods that need to be accessible from other ScriptComponents.

    This property is no longer needed, you can use a reference to the ScriptComponent, including 'script', directly

    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.

    lineStyle: number = 2

    Controls the visual style of the interactor line: 0: Full: Renders a continuous line from start to end. 1: Split: Creates a segmented line with gaps between sections. 2: FadedEnd: Gradually fades out the line toward its end point.

    name: string
    sceneObject: SceneObject

    The SceneObject this component is on.

    uniqueIdentifier: string

    Lens Scripting Version 176

    updateOrder: number

    The relative execution order of this script's lifecycle callbacks (onStart, onUpdate, onLateUpdate, etc.) among all scripts in the Lens. Scripts with a smaller updateOrder run before scripts with a larger updateOrder. Reflects the updateOrder set on the attached ScriptAsset. Defaults to 0.

    updateOrder only orders scripts relative to each other; it does not affect ordering relative to non-script engine Components.

    Lens Scripting Version 367

    if (script.updateOrder < 0) {
    // This script runs before scripts at the default updateOrder.
    }
    updatePriority: number

    Accessors

    • get beginColor(): vec3

      Gets the color of the visual from the start.

      Returns vec3

    • set beginColor(color: vec3): void

      Sets the color of the visual from the start.

      Parameters

      Returns void

    • get endColor(): vec3

      Gets the color of the visual from the end.

      Returns vec3

    • set endColor(color: vec3): void

      Sets the color of the visual from the end.

      Parameters

      Returns void

    • get isEnabled(): boolean

      Gets whether the visual is active (can be shown if hand is in frame and we're in far field targeting mode).

      Returns boolean

    • set isEnabled(isEnabled: boolean): void

      Sets whether the visual can be shown, so developers can show/hide the ray in certain parts of their lens.

      Parameters

      • isEnabled: boolean

      Returns void

    Methods

    • 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().

      Type Parameters

      Parameters

      • this: T

      Returns TypeName<InstanceType<T>>

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

      Parameters

      • type: string

      Returns boolean

    • Returns void

    • Destroys cursor & line renderer when the custom component is destroyed.

      Returns void

    • Updates the line visual each frame

      Returns void