真的,我想使用带负数的 THREE.KeyFrameAnimation.update
来反转关键帧动画,请注意这不受 native 支持,有人有任何建议吗?
最佳答案
当你只想玩一次时,我实际上找到了解决这个问题的方法。我在这里发布了完整的类(class):
重要的一点是:
// will force the mixer to play in reverse no matter what
playClipReverseByIndex_Forced(index) {
this.action = this.mixer.clipAction(this.animations[index]);
if(this.action.time === 0) {
this.action.time = this.action.getClip().duration;
}
this.action.paused = false;
this.action.setLoop(THREE.LoopOnce);
this.action.timeScale = -1;
this.action.play();
}
关于three.js - Three.js 中的反向关键帧动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31274674/