Really I would like to reverse a keyframe animation using THREE.KeyFrameAnimation.update with a negative number, appreciate this isn't supported natively, has anyone got any advice?
I actually found a solution to this for when you only want to play it once. I posted the full class here:
The important bit is:
// 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();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With