学习ThreeJS 06 动画系统

获取3d模块动画信息:

THREE.JSONLoader
THREE.ObjectLoader
THREE.BVHLoader
THREE.ColladaLoader
THREE.FBXLoader
THREE.GLTFLoader
THREE.MMDLoader
THREE.SEA3DLoader

调用和运行

var mesh;

// Create an AnimationMixer, and get the list of AnimationClip instances
var mixer = new THREE.AnimationMixer( mesh );
var clips = mesh.animations;

// Update the mixer on each frame
function update () {
    mixer.update( deltaSeconds );
}

// Play a specific animation
var clip = THREE.AnimationClip.findByName( clips, 'dance' );
var action = mixer.clipAction( clip );
action.play();

// Play all animations
clips.forEach( function ( clip ) {
    mixer.clipAction( clip ).play();
} );

你可能感兴趣的:(学习ThreeJS 06 动画系统)