Nick.Ls Posted August 29, 2022 Share Posted August 29, 2022 Hello everyone, I have downloaded the latest version of ScrollSmoother along with GSAP 3.11. In my effort to get velocity on smoother update as used in documentation and as I have used before, it now comes with a console error of function not found. I used a previous version of ScrollSmoother and it works fine. If you feel to look into it be my guest Ty all! Link to comment Share on other sites More sharing options...
Solution GreenSock Posted August 29, 2022 Solution Share Posted August 29, 2022 Hi @Nick.Ls. Any chance you could provide a minimal demo? You should be able to do this: let smoother = ScrollSmoother.create({ ..., onUpdate() { console.log(smoother.getVelocity()); } }); See the Pen fd59de6bdbc9b078bc2209217c9e886a?editors=0010 by GreenSock (@GreenSock) on CodePen Link to comment Share on other sites More sharing options...
Nick.Ls Posted August 30, 2022 Author Share Posted August 30, 2022 Hi Jack! I am sending you over a codepen, same setup but smoother 3.11.0 instead of the 10.4 you are using... check the console for the error. Same thing will not occur if you replace the smoother version 10.4 on my codepen. Let me know if I can be more of assistance! See the Pen xxWvLKW by Nick_Ls (@Nick_Ls) on CodePen Link to comment Share on other sites More sharing options...
GreenSock Posted August 30, 2022 Share Posted August 30, 2022 Yes, sorry about the confusion there - a regression in 3.11.0 caused that object passed as "self" in that onUpdate function to refer to the Tween rather than the ScrollSmoother but that is resolved in the patch we're prepping to release. It's already in the beta online, https://assets.codepen.io/16327/ScrollSmoother.min.js But I showed you a workaround in my demo above. Just use the variable instead. 1 Link to comment Share on other sites More sharing options...
Nick.Ls Posted August 30, 2022 Author Share Posted August 30, 2022 Hi Jack, I have used your solution already, thanks for that! And thanks for the info provided. 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