Capítulo 801 de 859
Overview of how three.js's animation system (clips, tracks, mixer, actions) is organized, modeled after engines like Unity/Unreal, so you can play, blend, and control skeletal or morph-target animations.
AnimationClip: a named chunk of animation data for one activity (e.g. "walk", "jump") loaded from a model.KeyframeTrack: within a clip, the timeline of values for one animated property (a bone's position, a material color, etc.).AnimationMixer: plays back and blends clips on a target object, similar to a hardware mixing console.AnimationAction: controls playback of one clip on a mixer — play/pause/stop, looping, fading, and time scaling.AnimationObjectGroup: lets multiple objects share the same animation state.AnimationClips (OBJ notably doesn't); glTF via GLTFLoader is a reliable source.let mesh;
const mixer = new THREE.AnimationMixer(mesh);
const clips = mesh.animations;
function update() {
mixer.update(deltaSeconds);
}
const clip = THREE.AnimationClip.findByName(clips, "dance");
const action = mixer.clipAction(clip);
action.play();
GLTFLoader) to get an animations array of AnimationClips.AnimationMixer per animated object and call mixer.update(delta) every frame.AnimationAction to control play/pause/loop/fade of individual clips on a mixer, including crossfading between them.