Optional playback knobs for playCameraTour.

interface PlayCameraTourOptions {
    autoStart?: boolean;
    flightDurationMs?: number;
    loop?: boolean;
    onFinish?: () => void;
    onWaypointEnter?: (waypoint: CameraTourWaypoint, index: number) => void;
    onWaypointLeave?: (waypoint: CameraTourWaypoint, index: number) => void;
    rate?: number;
    startWaypointIndex?: number;
}

Properties

autoStart?: boolean

When true (the default), playback begins immediately. Pass false to construct the playback in paused state — useful for connecting UI controls before the camera starts moving.

flightDurationMs?: number

Per-leg transit duration in ms. Overrides the value planCameraTour used to estimate the tour duration. Default: 1500.

loop?: boolean

When true, the tour wraps back to the first waypoint after the last and keeps playing. Default false.

onFinish?: () => void

Fired once the tour finishes its final waypoint's dwell. Not fired when loop: true is set.

onWaypointEnter?: (waypoint: CameraTourWaypoint, index: number) => void

Fired when the camera arrives at a waypoint and begins its dwell phase.

onWaypointLeave?: (waypoint: CameraTourWaypoint, index: number) => void

Fired when the camera leaves a waypoint to start the next leg's transit.

rate?: number

Playback rate multiplier. 2.0 plays at double speed, 0.5 at half speed. Default 1.0.

startWaypointIndex?: number

Waypoint index the tour starts at. Default 0.