sv en en en en en en en en en en en en en en en fa en en fr hbs_lat en en en es en en en ms en de en fr en en en ca en en en en en en en ca en en nl en nl es nl en uk fr nl nl nl dv nl en pt en de en mn uk az en en nl ar tg en en nl nl tr it en ru en en ar tr hbs_lat de nl fi ru de nl fi ru da nl en en kn en en en en zh en en en en en en en nl nl en en en ca en en en pl en de en en en eu en it en en en en en en en en en en en en en fr cv es tr es en en en en ms en en en en en en fr en hbs_lat en en en en en en en fr cv es tr es en en en en de en en en ca en en en en en
[static] Returns an array containing all the tweens of a particular target (or group of targets) that have not been released for garbage collection yet which typically happens within a few seconds after the tween completes.
The target whose tweens should be returned, or an array of such targets
(default = false) — If true, only tweens that are currently active will be returned (a tween is considered “active” if the virtual playhead is actively moving across the tween and it is not paused, nor are any of its ancestor timelines paused).
Since the method only finds tweens that haven't been released for garbage collection, if you create a tween and then let it finish and then a while later try to find it with getTweensOf(), it may not be found because it was released by the engine for garbage collection. Remember, one of the best parts of GSAP is that it saves you from the headache of managing gc. Otherwise, you'd need to manually dispose each tween you create, making things much more cumbersome.
TweenLite.to([myObject1, myObject2], 1, {alpha:0});
var a1 = TweenLite.getTweensOf(myObject1); //finds 2 tweens
var a2 = TweenLite.getTweensOf([myObject1, myObject2]); //finds 3 tweens
Copyright 2017, GreenSock. All rights reserved. This work is subject to theterms of useor for Club GreenSock members, the software agreement that was issued with the membership.
“I absolutely love working with GSAP. It’s been one of the most enjoyable things I’ve ever studied and the team do a fantastic job of making it first of all but also in the fantastic forums. I’ve managed to learn so much from that so I’ll always be gratefu”
“GSAP is just miles and miles ahead of any animation library out there. Great work!”
“@greensock it’s a great library that many people love, and I know you care deeply about performance :)”
“Every time a new GSAP plugin is introduced, I'm close to bursting from excitement. The simplicity of the GreenSock API makes learning and applying these tools in projects such a dream.”
“Sincerely, the people behind GSAP are sorcerers”
“I was astonished by the speed and versatility of animating with GSAP.”
“GSAP was a revelation for me to be compared with the introduction of jQuery.”
“It's crazy awesome. The whole GSAP platform is, far and away, the best out there for dealing with animation of any sort.”
“Really quite impressed with @GreenSock JS - even the small things.”
Sign Up For Our Newsletter
Get the latest updates on GreenSock products, exclusive offers, and more right in your inbox.
Your information will always be kept confidential.
Thanks for signing up!
Now you'll begin receiving the latest GreenSock updates, exclusive offers, and more right in your inbox. Welcome aboard.