Preparing search index...

    Billboard allows an object to rotate to face the camera.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    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

    duration: number = 0.033

    This property no longer changes the speed of the follow rotation. Use _axisEasing instead.

    enabled: boolean

    If disabled, the Component will stop enacting its behavior.

    isEnabledInHierarchy: boolean

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

    name: string
    sceneObject: SceneObject

    The SceneObject this component is on.

    uniqueIdentifier: string
    updatePriority: number

    Accessors

    • get axisBufferDegrees(): vec3

      Returns vec3

      the vector defining the buffer for each axis.

    • set axisBufferDegrees(bufferDegrees: vec3): void

      Parameters

      • bufferDegrees: vec3

        the vector defining the buffer for each axis.

      Returns void

    • get axisEasing(): vec3

      Returns vec3

      the vector defining the easing for each axis.

    • set axisEasing(easing: vec3): void

      Parameters

      • easing: vec3

        the vector defining the easing for each axis. For instant follow, use easing = (1,1,1).

      Returns void

    • get xAxisEnabled(): boolean

      Returns boolean

      if the SceneObject billboards about the x-axis.

    • set xAxisEnabled(enabled: boolean): void

      Parameters

      • enabled: boolean

        defines if the SceneObject billboards about the x-axis.

      Returns void

    • get yAxisEnabled(): boolean

      Returns boolean

      if the SceneObject billboards about the y-axis.

    • set yAxisEnabled(enabled: boolean): void

      Parameters

      • enabled: boolean

        defines if the SceneObject billboards about the y-axis.

      Returns void

    • get zAxisEnabled(): boolean

      Returns boolean

      if the SceneObject billboards about the z-axis.

    • set zAxisEnabled(enabled: boolean): void

      Parameters

      • enabled: boolean

        defines if the SceneObject billboards about the z-axis.

      Returns void

    Methods

    • Animates rotation to directly look at the camera, ignoring current axis enabled/disabled states, buffer degrees, and easing.

      Parameters

      • OptionalonComplete: () => void

      Returns void

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

      Parameters

      • type: string

      Returns boolean

    • Returns void

    • Resets the pivot point to billboard the target about its own origin. Recommended to use after finishing some spatial interaction that sets the pivotPoint of this component manually.

      Returns void

    • Immediately resets rotation to directly look at the camera, ignoring current axis enabled/disabled states, buffer degrees, and easing.

      Returns void

    • Set the pivot point and pivoting Interactor to control the Billboard's pivot axis. To turn off pivoting about a point, reset the pivot point to vec3.zero()

      Parameters

      • pivotPoint: vec3

        the pivot point to billboard the target about in local space.

      • interactor: Interactor

        the pivoting Interactor.

      Returns void

    • Immediately resets the SceneObject to the rotation according to inputs regardless of easing.

      Returns void