Sequence of camera frames that can be sampled or played back over time.

Stores frame data plus spline curves for eye, look, and up.

Constructors

Properties

_eyeCurve: SplineCurve
_frames: CameraPathFrame[] = []
_lookCurve: SplineCurve
_upCurve: SplineCurve
camera: CameraLike

The target camera.

Accessors

Methods

  • Adds a frame to the path.

    Vector values are copied before storage.

    Parameters

    • t: number

      Time for the new frame

    • eye: Vec3

      Eye position

    • look: Vec3

      Look position

    • up: Vec3

      Up vector

    Returns void

  • Loads the interpolated camera state at the given path time.

    Input time is normalized using the first and last frame times.

    Parameters

    • t: number

      Time along the path

    Returns void

  • Samples the path at normalized parameter t.

    Parameters

    • t: number

      Normalized parameter in the range [0..1]

    • eye: Vec3

      Target eye vector to write into

    • look: Vec3

      Target look vector to write into

    • up: Vec3

      Target up vector to write into

    Returns void

  • Redistributes frame times so camera motion is closer to constant speed.

    Uses distance between consecutive eye positions.

    Parameters

    • duration: number

      Total duration to distribute across all frames

    Returns void