Share Posted May 18, 2021 Hi, I'm trying to have an object spin endlessly at the end of a timeline. Right now it's just a 360 rotation - I figured that it'd be best to add a class with a css animation at this point in the timeline, but I can't seem to get it to work. The only reference I found in the docs was className: '+=active', but it doesn't seem to be doing anything. Thanks in advance! See the Pen QWpKoPJ by marekmarek (@marekmarek) on CodePen Link to comment Share on other sites More sharing options...
Solution Solution Share Posted May 18, 2021 Hi @ZORGOBORGO You can accomplish this with GSAP alone (which I would recommend) by pulling that tween out of the timeline and making a call to a separate tween at that point of the timeline (with a conditional check to see if it's already been called). See the Pen wvJovBd?editors=0010 by sgorneau (@sgorneau) on CodePen 3 Link to comment Share on other sites More sharing options...
Author Share Posted May 18, 2021 Thanks for this. Works flawlessly. Link to comment Share on other sites More sharing options...
Share Posted May 18, 2021 Glad it works for you! 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