Closed DominickVale closed 3 weeks ago
Hi, i'm not sure about how GSAP's ScrollTrigger snap feature works but i'm affraid it will be hard to make them work together smoothly. About the lenis/snap i think the current implementation is broken 😅. imma take a look
@DominickVale can you share your codesandbox with lenis/snap
implementation?
After a review, lenis/snap works correctly, only the demo was "broken"
I also have problem with scroll trigger snap to and Lenis. It takes little time to take position. And sometimes it behaves strange i asked to scroll trigger also but they said its problem of lenis.
https://gsap.com/community/forums/topic/38454-scroll-snap-for-specific-section-and-wait-before-snapping/?do=findComment&comment=209864&_rid=182116 see this is my gsap questions and answers
https://codepen.io/Bhavin-Raut/pen/XWvMdBX. This is my codepen
@Bhavin2000 your codepen is way too complex for me to debug and it's using GSAP ScrollTrigger in addition. Can you share a codepen only using lenis and lenis/snap ?
I'm closing this issue until your share a minimal reproduction link.
Describe the bug When using GSAP's ScrollTrigger snap feature along with lenis, scrolling up to the previous snapping point is very difficult and behaves very differently than when scrolling down. E.g to go down you only have to scroll a small percentage of the wheel. Whereas to go up you need a full scroll, basically you need to land almost on the snap point.
I also tried removing the snap from the scrolltrigger and use lenis/snap instead. Funnily enough the opposite happens in this case. Going up works normally, while scrolling down becomes difficult.
To Reproduce Here's the codepen. There's some modifications I did to make gsap work better, but the issue persists so I left it how it was. Removing lenis solves the snapping issue. https://codesandbox.io/p/sandbox/lively-field-29rqgq?file=%2Fsrc%2Findex.js&workspaceId=0594864b-79ee-45da-baa8-7022bffe9845