Lens Scripting API

    BillboardRotationCalculator is used to calculate the quaternion to rotate an object by to align with a new vector along an axis. More specifically, this calculator is used along a SceneObject's local X/Z-axes and global Y-axis. These calculators only take in vec3's as SceneObject manipulation is handled in BillboardController.

    Index

    Constructors

    Accessors

    • get axisBufferRadians(): number

      Returns number

    • set axisBufferRadians(radians: number): void

      Parameters

      • radians: number

      Returns void

    • get axisEasing(): number

      Returns number

    • set axisEasing(easing: number): void

      Parameters

      • easing: number

      Returns void

    • get axisEnabled(): boolean

      Returns boolean

    • set axisEnabled(enabled: boolean): void

      Parameters

      • enabled: boolean

      Returns void

    Methods

    • Parameters

      Returns quat

    • Used to snap the target immediately into proper rotation according to configuration.

      Parameters

      • axisVector: vec3

        the vector to rotate about

      • forwardVector: vec3

        the forward vector of the target

      • cameraVector: vec3

        the vector from camera to target

      • originVector: vec3

        the origin of rotation as a reference to ensure proper rotation

      Returns quat

      the rotation about the given axis to align the target's forward vector with the camera.

    MMNEPVFCICPMFPCPTTAAATR