I'm brand new to GSAP and using for the first time for a simple parallax-like effect with 2 objects: a background image (parallax-1) and a DIV with text (parallax-2). Rather than the super-smooth scrolling animation that I've come to expect with GSAP (like with this sample: https://codepen.io/isladjan/pen/abdyPBw) my animation it incredibly "janky": https://intendedimpact.infinitemonkeys.ca/about-us/. I must be missing something simple, but I just can't figure it out. Here's the code I'm using:
gsap.to(".parallax-1", {
yPercent: 60,
ease: "none",
scrollTrigger: {
trigger: ".parallax-1",
start: "top top",
end: "bottom top",
scrub: true
}
});
gsap.to(".parallax-1", {
scale: 1.15,
ease: "circ",
scrollTrigger: {
trigger: ".parallax-1",
start: "top top",
end: "bottom top",
scrub: true
}
});
gsap.to(".parallax-2", {
yPercent: 30,
ease: "none",
scrollTrigger: {
trigger: ".parallax-1",
start: "top top",
end: "bottom top",
scrub: true
}
});
Can anyone help me figure out what's missing?