我导入了一个包含动画的gltf(CesiumMan),如果一切正常,它将自动行走,但是当我添加脚本并运行时什么也没发生。 这是我的脚本:
console.log(this);
var mixer = new THREE.AnimationMixer(this);
var animations = editor.animations[this.uuid];
if(animations) {
animations.forEach((clip)=> {
mixer.clipAction( clip ).play();
});
}
function update( event ) {
mixer.update(event.delta);
}
或看一下这张照片: runtime Info