Hey folk,
i have an object contain many actions of animations , then i want to play it with scroll , i am already do that for one action
mixer = new THREE.AnimationMixer(model);
var action = mixer.clipAction(gltf.animations[1]);
action.play();
createAnimation(mixer, action, gltf.animations[1]);
function createAnimation(mixer, action, clip) {
let proxy = {
get time() {
return mixer.time;
},
set time(value) {
action.paused = false;
mixer.setTime(value);
action.paused = true;
}
};
let scrollingTL = gsap.timeline({
scrollTrigger: {
trigger: renderer.domElement,
start: "top top",
end: "+=500%",
pin: true,
scrub: true,
onUpdate: function () {
camera.updateProjectionMatrix();
}
}
});
scrollingTL.to(proxy, {
time: clip.duration,
});
}
but i want to play all of actions , i don’t need to be separated so maybe i can merge its in blender or not ??