fd_alistair Posted August 2, 2022 Posted August 2, 2022 Hi there, I've checked the documentation for MotionPath and can't see the ability to add a callback function for when the animation has completed?...ideally I'd like this to be called at the end of each loop. Any help would be appreciated. Regards Al See the Pen wvmymvz by fuzzyduck (@fuzzyduck) on CodePen.
iDad5 Posted August 2, 2022 Posted August 2, 2022 Just a onComplete on the tween (gsap.to()) should do the trick. If you think about it, what ist completed isn't the motion-patt (the road you walk down) but your movement (the walk you took). Does that clarify things, or do you need more help?
fd_alistair Posted August 2, 2022 Author Posted August 2, 2022 4 minutes ago, iDad5 said: Just a onComplete on the tween (gsap.to()) should do the trick. If you think about it, what ist completed isn't the motion-patt (the road you walk down) but your movement (the walk you took). Does that clarify things, or do you need more help? Ok thanks - I had tried that previously...am I doing something wrong? : See the Pen YzaeaBG by fuzzyduck (@fuzzyduck) on CodePen.
Solution iDad5 Posted August 2, 2022 Solution Posted August 2, 2022 My bad, your walk never ends So onRepeat is what you are looking for. 1
fd_alistair Posted August 2, 2022 Author Posted August 2, 2022 3 minutes ago, iDad5 said: My bad, your walk never ends So onRepeat is what you are looking for. Legend! - thank you 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