Gabor Ferencz Posted September 8, 2022 Posted September 8, 2022 I would like to get help, on how to slow down ScrollTrigger fromTo animations. The goal is to increase the duration of the animations (and the positon of the last fromTo), and this will make the animations slower. Since scrub turned true (to control the animation with the scrolling), the duration property does not have any effect. What am I missing? Thank you in advance for your help! tl = gsap.timeline({ scrollTrigger: { trigger: '.feature-holder', scrub: true, pin: true, pinSpacing: true, markers: false, }, }); tl .fromTo( '.feature-overlay', { autoAlpha: 0, }, { autoAlpha: 0.25, duration: 3, }, ) .fromTo( '.feature-text', { autoAlpha: 0, y: 5, }, { autoAlpha: 1, y: 0, duration: 1, }, '>', ) .fromTo( '.feature-text', { autoAlpha: 1, }, { autoAlpha: 0, duration: 1, }, '>+=10', );
Cassie Posted September 8, 2022 Posted September 8, 2022 Hi there! Scrub is scrubbing your animation over a certain distance. So in order to increase the 'time' you need to increase the distance by moving your end marker further down the page. Hope this helps, if not pop your code in a minimal demo on codepen and we'll help you.
Solution Gabor Ferencz Posted September 8, 2022 Author Solution Posted September 8, 2022 Thanks, Cassie! I figured out the solution. Add start and end properties solved the issue. start: 'top top', end: '+=1000%', Now the timeline length (this way the duration length as well) can be controlled by the distance between the start and end. With +=1000% it slowed down the animations. 1
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