Bango Posted June 7, 2022 Share Posted June 7, 2022 Hey Community, I am quiet new to gsap and I love what you can do with it. I have a obsession with with smooth scrolling though and when I use "butter.js" or "luxy.js" the gap code won't work anymore. I already looked through some GSAP forums and found some smooth scrolling code build with the ScrollTrigger Plugin but it breaks the code as well. Thanks in advance See the Pen zYRJNxe by BongoMioG (@BongoMioG) on CodePen Link to comment Share on other sites More sharing options...
SteveS Posted June 7, 2022 Share Posted June 7, 2022 GSAP recently released its own smooth scrolling plugin built on ScrollTrigger.https://greensock.com/docs/v3/Plugins/ScrollSmoother It works quite well and shouldn't cause any conflicts with your ScrollTriggers. 1 Link to comment Share on other sites More sharing options...
Solution GreenSock Posted June 7, 2022 Solution Share Posted June 7, 2022 12 hours ago, Bango said: when I use "butter.js" or "luxy.js" the gap code won't work anymore. I'm not familiar with either of those, but if they do smooth scrolling, they are very likely interfering with the native scroll which is what ScrollTrigger is based on. You'd need to look into configuring ScrollTrigger.scrollerProxy() to use a 3rd party library (which we can't support here). Like @SteveS said, you might want to use ScrollSmoother Also, the way your demo is using onscroll stuff to add/remove classes and control opacity is quite wasteful in my opinion - you can just use ScrollTrigger for that stuff and it'll be even more efficient. Just an idea. Good luck! 1 Link to comment Share on other sites More sharing options...
Bango Posted June 8, 2022 Author Share Posted June 8, 2022 Thanks for the feedback. I looked after the SmoothScroll plugin but as a newbie hobby Developer are 140€ little to much for a smooth scroll. But thanks anyways Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now