Reginna Posted September 29, 2022 Share Posted September 29, 2022 I want to make some animation with GSAP. Pin the section and run all animations for that section, fixed the section to the next section, then fade out in the third section (each section does the same logical animation). I use +=200% to fixed in the next section, but the animation is too fast. How can I use +=200% and +=5000 at the same time? See the Pen KKRQbwd by reginna (@reginna) on CodePen Link to comment Share on other sites More sharing options...
Rodrigo Posted September 29, 2022 Share Posted September 29, 2022 Hi, You can use a function based value for that: const tl = gsap.timeline({ scrollTrigger: { trigger: item, start: "top top", end: () => 5000 + document.body.clientHeight * 2, scrub: true, pin: true, pinSpacing: false, markers: true } }); Let us know how it works. Happy Tweening! 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