fonveton Posted June 12 Posted June 12 Hi, I’ve set up a GSAP animation flow that works like this: On pointerenter, Animation A plays once. When A completes, Animation B starts with repeat: -1. On pointerleave, I: Set repeat(0) on Animation B, so it finishes its current loop once. After B ends, I call reverse() on Animation A. This mostly works — but the timing isn’t consistent. If the user hovers quickly in and out, or leaves after a while, sometimes: B cuts off early A reverses too soon Or the transitions feel jumpy How can I make sure that: B finishes its last loop smoothly after setting repeat(0), and only after that, A reliably reverses? Any best practices for syncing these kinds of chained animations? Thanks in advance! See the Pen dPoeJNz by manidar (@manidar) on CodePen.
Solution Rodrigo Posted June 12 Solution Posted June 12 Hi, I don't have time to go through all the setup in your demo, but this would be my approach for something like this: See the Pen wBajxLj by GreenSock (@GreenSock) on CodePen. Hopefully this helps Happy Tweening!
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