@pixi/3d
    Preparing search index...

    Class TrackAdvanced

    Keyframes for one animated property

    The glTF loader builds tracks for you. Build them yourself to author an animation in code, and pass them to AnimationOptions#tracks. Use Track itself for numeric arrays such as morph-target weights, and NumberTrack, Vector3Track or QuaternionTrack for numbers, vectors and rotations.

    const weights = new Track({
    label: 'Face.weights',
    times: [0, 1],
    values: [0, 0, 1, 0.5],
    valueSize: 2,
    });

    Hierarchy (View Summary)

    Index
    interpolation: InterpolationMode

    Interpolation algorithm used between keyframes

    label: string

    The property this track drives; TrackOptions#label has the format

    Keyframe times in seconds

    values: Float32Array

    Keyframe values; TrackOptions#values has the layout

    valueSize: number = 0

    Number of numeric components in each sampled value

    • Blends a freshly sampled value into a running weighted average

      The player calls it every frame while two or more playing states drive the same property. Override it where a component-wise lerp is wrong for the value, as QuaternionTrack does.

      Parameters

      • values: Float32Array

        The running weighted average, updated in place

      • sample: Float32Array

        The freshly evaluated value to blend in

      • t: number

        Blend factor for sample against values

      Returns void

    • Samples the track at a time, holding the first or last keyframe outside their range

      Parameters

      • time: number

        Time in seconds

      • index: number

        Keyframe index this returned last time, which shortens the search; 0 always works

      • target: Float32Array<ArrayBufferLike> | number[]

        Receives valueSize numbers

      Returns number

      The keyframe index to pass back as index next time