Now I have a model with a sequence of frames, 0-150 frames.
Then I play the animation from 0 to 100 frames.
Now I want to play the animation from 100 to 0 frames.
How can I realize this function.
If you pass a negative value to mixer.update
, it plays backward.
I play the animation from -100 to 0 frames.
And from 0 to -100 frames.
Didn’t meet my needs
the nStartFrame is set -100 , nEndFrame set 0
and the nStartFrame is set 0 , nEndFrame set -100
Excuse me, can you have a case for me to learn.
Sorry I don’t really understand what is your problem
like this
You need to input time value in seconds unit.
var animation = obj.animations[ 0 ];
var mixer = new THREE.AnimationMixer( obj );
var action = mixer.clipAction( animation );
action.play();
action.time = Number(val); // val is seconds value. input from 100 to 0 or 0~100 by timer like clock.
mixer.update(delta);