samlinck Posted June 27, 2022 Share Posted June 27, 2022 This is a simplified demo of my problem. I want to slow down the scroll, because I find that the animations run too quick. But each section has to keep its height of 100vh. I know that the duration of a scrubbed animations is equal to the distance between the start and the end point (here 100vh - 90px). So how can I fix that the scroll slows down? See the Pen LYQqrwO by Samlinck (@Samlinck) on CodePen Link to comment Share on other sites More sharing options...
SteveS Posted June 27, 2022 Share Posted June 27, 2022 You would change the value of the end trigger to be further away usually. I don't really know what you mean by "slow down the animation". You could also play with the tween easing to get what I think you want. Link to comment Share on other sites More sharing options...
GreenSock Posted June 27, 2022 Share Posted June 27, 2022 Yep. You might want to read this: https://greensock.com/docs/v3/Plugins/ScrollTrigger#scrub But if you're literally trying to force the scroll position to not move at the rate the user requested, that's not gonna work. ScrollTrigger is based on native scroll technology - it honors what the browser does. And usually users get very annoyed when the browser doesn't let them move the scrollbar at the speed they request. Link to comment Share on other sites More sharing options...
samlinck Posted June 28, 2022 Author Share Posted June 28, 2022 Okay making the end value longer isn't an option, because I want the animation to be done when the section is in screen. Anyway thanks for the information! Link to comment Share on other sites More sharing options...
GreenSock Posted June 28, 2022 Share Posted June 28, 2022 11 hours ago, samlinck said: Okay making the end value longer isn't an option, because I want the animation to be done when the section is in screen. Anyway thanks for the information! I'm not sure how you'd expect that to work, then. If the distance you have to scroll is based on the height of those sections, how would you expect it to slow down without interfering with the native browser behavior? 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