James07 Posted April 10, 2023 Share Posted April 10, 2023 Hi! Im using gsap in vuejs. I just want to know if there's any way that i can loop infinitely those 2 functions? I already tried using the timeline. But unfortunately, they are animating at the same time. See the Pen Exdjmqy by gfifhy (@gfifhy) on CodePen Link to comment Share on other sites More sharing options...
Solution Rodrigo Posted April 10, 2023 Solution Share Posted April 10, 2023 Hi @James07 and welcome to the GreenSock forums! Indeed a single timeline is the way to go in this case, just need to add the animation for each block on a loop without any delays and then, after the loop, add the blink animation to the same timeline. Here is a fork of your example: See the Pen JjmdOMO by GreenSock (@GreenSock) on CodePen Also notice that I used GSAP Context in this case, which makes cleanup when a component gets unmounted super easy and also has a few other perks that are worth exploring and using in Vue Apps and Vue environments: https://greensock.com/docs/v3/GSAP/gsap.context() Hopefully this helps. If you have more questions let us know. Happy Tweening! Link to comment Share on other sites More sharing options...
James07 Posted April 10, 2023 Author Share Posted April 10, 2023 Thank you so much!! It is working now 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