Vallo Posted November 17, 2020 Share Posted November 17, 2020 Hi, I am new to using GSAP, and would need help creating an effect when scrolling the page. I would like to recreate a svg animation effect like the one in this official example: (and so far the example is more than clear). What I would like to do is to make sure that when you reach the animation section by scrolling the page, the scroll will animate only the svg effect, but do not scroll the page further. Practically once reached the correct section, the scroll must advance only the animation and not the whole page. Once the animation is complete then the normal scrolling of the page can resume. Can you give me some indication to achieve this effect? Thanks See the Pen OJMRYbd by delwinh (@delwinh) on CodePen Link to comment Share on other sites More sharing options...
Solution ZachSaucier Posted November 17, 2020 Solution Share Posted November 17, 2020 Hey Vallo and welcome to the GreenSock forums. It sounds like you want the pin property of ScrollTrigger. Try setting pin: true in the ScrollTrigger variables. For more info see the ScrollTrigger docs. 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