Hello everyone, I'm currently trying to replicate the effect demonstrated in the uploaded GIF. While I've successfully implemented the easing effect, I'm encountering difficulties with the stagger effect. I've experimented with various approaches, with the latest attempt shown below. I can prepare a CodePen example if needed. Perhaps I'm overlooking something simple. Any guidance or suggestions would be greatly appreciated. Thank you!
useGSAP(() => {
let proxy = { translate: 0 },
translateSetter = gsap.quickSetter(".video-grid-content-container", "translateY", "px"),
clamp = gsap.utils.clamp(-40, 40);
ScrollTrigger.create({
onUpdate: (self) => {
let translate = clamp(self.getVelocity() / -100);
if (Math.abs(translate) > Math.abs(proxy.translate)) {
proxy.translate = translate;
gsap.to(proxy, {
translate: 0,
duration: 0.4,
stagger: {
amount: 10,
from: "start"
},
overwrite: true,
onUpdate: () => translateSetter(proxy.translate)
});
}
}
});
});