@pixi/3d
    Preparing search index...

    Class Animation

    A named set of keyframe tracks, holding no playback state

    A Model3D loaded from glTF comes with its animations already registered on its player. Build one yourself to animate in code, then register it on an AnimationPlayer. One animation can play on many players at once; each player keeps its own AnimationState for it.

    const crate = new Container3D({ label: 'Crate' });
    const bob = new Animation({
    label: 'bob',
    tracks: [
    new Vector3Track({ label: 'Crate.position', times: [0, 0.5, 1], values: [0, 0, 0, 0, 1, 0, 0, 0, 0] }),
    ],
    });

    const player = new AnimationPlayer({ target: crate, animations: [bob], autoPlay: 'bob' });
    Index
    duration: number = 0

    Length in seconds

    const walk = player.getAnimation('walk')!;

    player.getState(walk).gotoAndStop(walk.duration / 2);
    label: string

    Label AnimationPlayer#addAnimations registers this animation under when given an array

    player.addAnimations([bob]);
    player.play(bob.label);
    tracks: readonly Track[]

    Tracks this animation plays