Jump to content


How can I control scroll speed or easing using gsap?

Recommended Posts

I have been trying  to recreate native ScrollTrigger demo from ScrollTrigger.scrollerProxy() topic, but with some changes to elements generation (the elements need to be generated dynamically). It seems as if changing scroll smoothness does not give any disered effect. Could you please take a look and hint me with the right direction, please?


Link to comment
Share on other sites

It looks like you changed the smoothScroll function. I would suggest you change it back. The way you have it, the ScrollTrigger never scrolls, hence no smooth scrolling.

Link to comment
Share on other sites

Concerning smoothScroll function I only removed a couple of lines that were setting css and set it directly. Returned ScrollTrigger.create, but without change.

Link to comment
Share on other sites

Your scroll container doesn't fill the screen, and the scrolling should be done by the body, so you can't have overflow hidden on it. It's important to understand how smooth scrolling works. I explain the basics of it here.



  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.