Hello,
I'm trying to create an animation while scrolling with ScrollTrigger.batch(), but I encountered a small problem. If I refresh at the bottom of the page, the viewport elements become visible very late because they wait for the animations at the top to finish. When I look at the forum, it is recommended to use ScrollTrigger.config({limitCallbacks: true}); but this time, when I scroll the page up, the animations at the top do not work ? What am I doing wrong ?
My JS Code is as follows;
ScrollTrigger.config({limitCallbacks: true});
ScrollTrigger.batch(".animation-item", {
once: true,
onEnter: elements => {
gsap.to(elements, {
duration: .5,
opacity: 1,
x: 0,
y: 0,
stagger: 0.05,
})
}
});