DDINCBrent Posted January 2, 2020 Share Posted January 2, 2020 I am currently working on a project- I have been using TweenJS. But I have fallen in love with versatility with GSAP. The only thing I am trying to figure out is if there is a similar function for GSAP that removes every instance of a tween like CreateJS createjs.Tween.removeAllTweens(); I have found myAnimation.kill(); but from what I can tell that is a per instance usage and I am looking for more of an overall function when I go to reset that would remove all tweens. Link to comment Share on other sites More sharing options...
ZachSaucier Posted January 2, 2020 Share Posted January 2, 2020 Hey DDINCBrent and welcome to the GreenSock forums! We're glad that you're enjoying the versatility that GSAP offers You should be able to use gsap.killTweensOf() with a universal selector ("*") for this. For example: See the Pen bGNYNJJ by GreenSock (@GreenSock) on CodePen 1 1 Link to comment Share on other sites More sharing options...
DDINCBrent Posted January 2, 2020 Author Share Posted January 2, 2020 @ZachSaucier Thank you for the response! Is there somewhere I can go to see those little secrets about functions like that? I was looking at the Documentation for it and it doesn't mention using the asterisk. But once again thank you! Link to comment Share on other sites More sharing options...
ZachSaucier Posted January 2, 2020 Share Posted January 2, 2020 Just now, DDINCBrent said: Is there somewhere I can go to see those little secrets about functions like that? I was looking at the Documentation for it and it doesn't mention using the asterisk. Well, you can use any selector string as the target. So the universal selector is implied. But it should probably be documented explicitly as it's probably the most common specific use case. I'll add it to the docs when I am able to. 2 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