Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...
    • Advance the oscillation phase by deltaTime seconds, wrapped to [0, 2π).

      Wrapping keeps the phase small no matter how long the viewer is left running: sin is periodic, so the wrap is exact, while an ever-growing radian count would bleed precision out of the sine after a few hours.

      A non-finite or non-positive period is inert (phase unchanged) rather than an error: this runs inside the render loop, and a hand-edited scene attribute should stop the motion, not produce NaN and freeze the camera at an unrecoverable position.

      Parameters

      • phase: number

        Current phase in radians.

      • deltaTime: number

        Seconds elapsed since the previous sample.

      • period: number

        Seconds per full oscillation.

      Returns number

      The new phase in [0, 2π).