Luxar Viewer API Documentation - v2026.10.19
    Preparing search index...

    Module core/app/camera/flight-trajectories

    Flight trajectories — the camera paths a CameraFlight (./camera-flight.ts) can follow between two poses, and the one measure of how far each of them travels.

    Every trajectory is a FlightPath: at(s) gives the pose at path parameter s ∈ [0, 1], and length is the path's PERCEIVED length — what a paced flight (speed) divides by its speed to get its duration. The length is integrated along the path with one metric for all of them (see perceivedStep): panning measured in view heights, zooming in log scale and turning in radians. A pan of one screen costs the same at any distance, a 10× zoom the same at any scale, so durations follow what the viewer sees.

    The trajectories (Python: luxar.core.trajectories; user guide: "Waypoint trajectories" in VIEWER_GUIDE.md):

    • orbit — the focus target slides in a straight line while the camera's offset from it turns (slerp) and its distance changes geometrically. The default: predictable, never passes through the target.
    • zoom-pan — van Wijk & Nuij, "Smooth and efficient zooming and panning" (InfoVis 2003): the path through (target, view height) space that minimises perceived motion. Pulls back while it travels and dives in at the end, at a constant perceived speed. rho trades zoom for pan (√2, their preferred value; larger zooms out further).
    • arc — orbit plus an explicit pull-back: the distance rises by lift × (target travel) at mid-flight, a sine bump. A tunable, predictable hop — unlike zoom-pan, the height does not depend on the zoom levels.
    • straight — the camera position and the target both move in straight lines: a dolly. The camera may pass through the data on the way, which is the point of choosing it.
    • swing — travels AROUND a pivot (default the scene centre): the camera and the target each follow a great circle about it, so the camera goes around the cloud rather than through it. Distances from the pivot change geometrically.
    • fly-through — first-person travel: the camera moves in a straight line looking AHEAD along it (lookAhead, a fraction of the trip), turning from the start target over the first turn fraction and onto the destination over the last. The camera faces where it is going, as in a flight.
    • via — two legs through an intermediate pose (via), each following the leg trajectory (default zoom-pan) and each eased on its own, so the camera comes to rest at the intermediate pose and sets off again: a return to the overview between stories, for instance.

    straight, swing and fly-through define the VIEW DIRECTION along the way, as does via when its leg is one of them, so they take it over from the turntable for the flight (see trajectoryOwnsOrientation); the others carry the turntable's live direction when auto-rotate is on. All but orbit need perspective at both ends; an orthographic flight follows orbit.

    FlightPath
    Vec3Tuple
    FlightTrajectoryKind
    FlightLegKind
    FlightTrajectory
    FlightTrajectorySpec
    ZOOM_PAN_RHO
    ARC_DEFAULT_LIFT
    FLY_THROUGH_DEFAULT_LOOK_AHEAD
    FLY_THROUGH_DEFAULT_TURN
    normalizeTrajectory
    trajectoryOwnsOrientation
    lerpLog
    slerpDirection
    viewHeight
    perceivedStep
    integrateLength
    zoomPanProfile
    buildOrbitPath
    buildFlightPath