glTF の場合と同様ですが、three.js の公式サンプルにアニメーション用のコードがあるので参考にしてみて下さい。
https://threejs.org/examples/webgl_loader_fbx.html
function init() {
// model
var loader = new THREE.FBXLoader();
loader.load( 'models/fbx/Samba Dancing.fbx', function ( object ) {
object.mixer = new THREE.AnimationMixer( object );
mixers.push( object.mixer );
var action = object.mixer.clipAction( object.animations[ 0 ] );
action.play();
:
scene.add( object );
} );
}
function animate() {
requestAnimationFrame( animate );
if ( mixers.length > 0 ) {
for ( var i = 0; i < mixers.length; i ++ ) {
mixers[ i ].update( clock.getDelta() );
}
}
renderer.render( scene, camera );
}
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。