Alright quick question if anyone could help. I cant replicate in a codepen for some reason but I have a landing animation that I had working on scroll but now it just flashes once when the page loads and then goes away??
I am using i18next idk if that could possibly be an issue?
useEffect(() => {
const g = genuine.current;
const u = undead.current;
const pt = pinTarget.current;
const imgDiv1 = imageDiv1.current;
const imgDiv2 = imageDiv2.current;
var tl = gsap.timeline({
scrollTrigger: {
trigger: pt,
end: "+=400% bottom",
markers: true,
pin: true,
scrub: true,
},
});
tl.add("start");
tl.fromTo(g, { x: 0 }, { x: 1500, duration: 3 }, "start");
tl.fromTo(u, { x: 0 }, { x: -1500, duration: 3 }, "start");
var tl2 = gsap.timeline({
scrollTrigger: {
trigger: pt,
end: "+=200% bottom",
markers: true,
pin: true,
scrub: true,
},
});
tl2.add("startImage");
tl2.fromTo(imgDiv1, { y: 0 }, { y: -2000, duration: 3 }, "startImage");
tl2.fromTo(imgDiv2, { y: 0 }, { y: 2000, duration: 3 }, "startImage");
}, []);