Last active: 2 years ago
Play animation on gltf model
const root = gltf.scene;
scene.add(root);
const clock = new THREE.Clock();
const mixer = new THREE.AnimationMixer(root);
gltf.animations.forEach((clip) => {
mixer.clipAction(clip).play();
});
addRenderCallback((time) => {
mixer.update(clock.getDelta());
});