sashaikevich Posted September 26, 2020 Share Posted September 26, 2020 I recall seeing a nice marquee example, but I can't track it down. Undoubtedly this is a common use-case for a horizontal marquee / scroller (logos, testimonials, etc.). I'd like the beginning of the next animation to trail the end of the one that's about to end. As it is, I have a space between the two. Please point me to the example, or check out my code and codepen below: gsap.timeline({ repeat: -1, defaults: { ease: "none", }, }) .fromTo( ".card", { x: (i, el) => innerWidth * i }, { x: (i, el, t) => -innerWidth * (t.length - i ), duration: d, } ); Thanks See the Pen abNMQyg?editors=1010 by sashaikevich (@sashaikevich) on CodePen Link to comment Share on other sites More sharing options...
ZachSaucier Posted September 27, 2020 Share Posted September 27, 2020 Hey sashaikevich. This thread covers how to do this sort of thing. You can't use a regular animation because it doesn't wrap properly as you mention. You should use modifiers as the thread below suggests: 2 1 Link to comment Share on other sites More sharing options...
sashaikevich Posted September 27, 2020 Author Share Posted September 27, 2020 Thanks @ZachSaucier! Link to comment Share on other sites More sharing options...
sashaikevich Posted September 29, 2020 Author Share Posted September 29, 2020 Got it to work! For anyone interested, here is GS's pen that was particularly helpful: See the Pen QEdpLe?editors=0010 by GreenSock (@GreenSock) on CodePen 3 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