I built a model with multiple animations with Blender. Then I imported as a GLF into three.js and it can play a series of animations one by one with the help of @Mugen87 ( Thanks!!).
But I’d like to edit the play range of each of the actions. As a result, I wrote this piece of code:
function playNextAction () {
if ( currentActionIndex === playList.length ) {
currentActionIndex = 0;
return;
}
var action = mixer.clipAction(glf.animations[ playList[currentActionIndex] ]);
if (currentActionIndex!==0){
action.time = 0.1;
glf.animations[ playList[currentActionIndex] ].duration = 0.20;
}
action.stop().play();
currentActionIndex ++;
}
This function will be invoked after one action has been played, and stop being invoked if there is no action in the list.
The problem: I 'd like to cut the first several frames of each of the animations. In the code, I tried to make the action start to play at the time point 0.1s, and the each of the animation duration is 0.2s. But when I run this code, the play range won’t change. Any ideas?