three.js の公式サンプルにアニメーション用のコードがあるので参考にしてみて下さい。以下、コードの抜粋です。
https://threejs.org/examples/webgl_loader_gltf_extensions.html
loader.load( url, function ( data ) {
gltf = data;
var animations = gltf.animations;
if ( animations && animations.length ) {
mixer = new THREE.AnimationMixer( object );
for ( var i = 0; i < animations.length; i ++ ) {
var animation = animations[ i ];
if ( sceneInfo.animationTime ) {
animation.duration = sceneInfo.animationTime;
}
var action = mixer.clipAction( animation );
if ( state.playAnimation ) action.play();
}
}
}
function animate() {
requestAnimationFrame( animate );
if ( mixer ) mixer.update( clock.getDelta() );
render();
}
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。