Documentation
    Preparing search index...

    Interface AnimationTrackOptions<T>

    Construction inputs for AnimationTrack.

    interface AnimationTrackOptions<T> {
        adapter: ValueAdapter<T>;
        inTangents?: readonly T[];
        interpolation?: InterpolationMode;
        outTangents?: readonly T[];
        path: string;
        times: readonly number[];
        values: readonly T[];
    }

    Type Parameters

    • T
    Index
    adapter: ValueAdapter<T>

    Adapter for this track's value type — also the §17 track-type discriminant (see the module header's table).

    inTangents?: readonly T[]

    Incoming tangent per key, required by — and only used by — "hermite". Same length as times. Entry 0 is never read (no segment ends at the first key) but is required so the arrays stay index-parallel. See AnimationTrackOptions.outTangents for the units.

    interpolation?: InterpolationMode

    Interpolation mode (§17). Defaults to "linear".

    outTangents?: readonly T[]

    Outgoing tangent per key, required by — and only used by — "hermite". Same length as times. The last entry is never read (no segment starts at the last key).

    Tangents are derivatives with respect to clip time, i.e. value units per second, matching the tangents "cubic" derives for itself. A segment uses the left key's out tangent and the right key's in tangent.

    path: string

    Dot-separated property path relative to the mixer's target, resolved by the mixer and never by the track ("transform.position", "opacity"). Must be non-empty; its resolvability is checked when it is bound, not here.

    times: readonly number[]

    Keyframe times in seconds, clip-local, strictly increasing and finite. At least one. Copied.

    values: readonly T[]

    Keyframe values, one per entry of AnimationTrackOptions.times. The array is copied; the values themselves are held by reference and must not be mutated afterwards.