Hello. I would like to scroll through my glTF animations, with each scroll transitioning to the next clip.
I have done a piece of code like this :
window.addEventListener(‘wheel’, function (e) {
const clips = gltf.animations;
console.log(clips);
// Play all animations
clips.forEach(function(clip) {
const action = mixer.clipAction(clip);
action.clampWhenFinished = true;
action.play();
action.loop = THREE.LoopOnce;
});
});
However, currently, the scrolling only occurs once and the entire animation plays without any further scrolling.
Thank you!