Hello,
I really appreciate using the GSAP that lets even a beginner like me make something awesome.
I have a very elementary question on customizing ScrollTrigger script.
I'd like to use "ScrollTrigger Infinite Scroll" script (see URL) with CSS snap-scrolling.
I modified the "ScrollTrigger.create" part (the last part) like this:
ScrollTrigger.create({
trigger: 'section',
onEnter: () => {
createPanel(panelNum++);
ScrollTrigger.refresh();
},
onLeave: () => {
createPanel(panelNum++);
ScrollTrigger.refresh();
},
Then I noticed that it generates a new section only when I snap to/from the existing section, not the newly created one.
I need the newly created ones to be a trigger to make an infinite snap-scrolling.
I'm aware that my question is so rudimentary, but I'd be very grateful if someone could help me in making the Infinite Scroll "snappable".