kwastaras Posted August 26, 2022 Share Posted August 26, 2022 Hello! I saw in docs there is only 3 options for ScollSmoother.scrollTo( target, smooth ( true or false ), and position). How can i specify the duration and easing of scrollTo() ? Link to comment Share on other sites More sharing options...
Solution Cassie Posted August 26, 2022 Solution Share Posted August 26, 2022 From the docs!https://greensock.com/docs/v3/Plugins/ScrollToPlugin gsap.to(myDiv, {duration: 2, scrollTo: {y: 400, x: 200}, ease: "power2"}); orhttps://greensock.com/docs/v3/Plugins/ScrollSmoother/scrollTo() gsap.to(smoother, { scrollTop: smoother.offset("#box1", "top 100px"), duration: 1 });; Hope this helps! 1 Link to comment Share on other sites More sharing options...
Cassie Posted August 26, 2022 Share Posted August 26, 2022 I'd love to know which one you were after so I can bump the option a little higher or signpost it better. Thanks Link to comment Share on other sites More sharing options...
kwastaras Posted August 27, 2022 Author Share Posted August 27, 2022 21 hours ago, Cassie said: I'd love to know which one you were after so I can bump the option a little higher or signpost it better. Thanks thank you! in make case this code worked gsap.to(window, { scrollTo: smoother.offset(section, "0 0"), duration: 0.3, ease: Power4.easeOut }), 1 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