AutoMovie API
    Preparing search index...

    Interface IAutoMovieSpringDriver

    Secondary spring dynamics advanced by position Verlet integration with explicit caller-owned history and timestep. Replaying requires the same complete driver, composed frame, local transforms, collider list and history; state and dt alone do not determine the trajectory.

    resolveFrame steps it only with explicit spring state and dt, otherwise returning a deferred descriptor. Each non-root joint receives damped inertia, gravity and stiffness pull, then local-length projection followed by ordered sphere projections. Rotation and scale stay animated, and descendants outside the chain are not recomposed. Invalid scalar parameters and missing node/local records encountered by the step throw.

    interface IAutoMovieSpringDriver {
        center: string | null;
        chain: string[];
        drag: number;
        gravityDir: IAutoMovieVector3;
        gravityPower: number;
        hitRadius: number;
        stiffness: number;
        type: "spring";
    }
    Index
    center: string | null

    Node whose world translation since the previous step is added to each joint's prior position; rotation is not compensated. Null measures inertia in world space. Centre history uses the JSON-encoded [center, ordered chain] tuple, while joint history uses joint ids; the caller owns history lifetime and removal/reset.

    chain: string[]

    Joint chain, root to tip; the spring writes world positions after the first joint. A chain shorter than two moves no joint, though centre history can still update.

    drag: number

    Damping in [0, 1]; inertia is scaled by (1 - drag).

    gravityDir: IAutoMovieVector3

    World gravity direction: any finite non-zero vector, normalized per step.

    gravityPower: number

    Nonnegative gravity acceleration in m/s²; each step adds gravityPower * dt² along normalized gravityDir.

    hitRadius: number

    Positive joint collision radius in metres, added to each collider sphere's radius.

    stiffness: number

    Nonnegative rest-pull rate per second; each step moves stiffness * dt of the way toward rest without capping that factor.

    type: "spring"

    Selects the spring driver.