Jump to content


  • Posts

  • Joined

  • Last visited

rich_earth's Achievements



  1. Thanks OSUblake yes thats what I was thinking, in a real case you would pool... I do think this hanging on to Tweens / autoSleep should be in the docs somewhere though, not seen it mentioned anywhere?
  2. OK thanks. I suppose the reason is also me being curious. More so in cases with a game engine where you might be creating hundreds of new objects per second or testing memory / debugging its just useful to know, but I can't think of a real case where I'd be creating hundreds or tweens like that. Thanks though!
  3. Hi I've tested again it was something else causing the issue, my bad. The objects were being cleared from GSAP after 2 seconds. Is there a way to customise or disable this cache?
  4. Thanks for the response. I thought this but for some reason in my test the objects just hang around indefinitely and build up in memory. Could be something to do with the dev tools / what I'm logging to console, so I'll build a proper test to post here. For now I am manually removing the target from _internals.tweenLookup when I kill() and its back to using no memory again. Thanks
  5. Hi, I'm using TweenMax with PIXI.js to tween positions of objects... I have lots of objects being spawned, tweened and then destroyed. When I just create an object and then destroy it and make it null, it gets removed from memory (using Chrome heap snapshot to check). If I create the object then tween it, then call kill() on the tween and destroy my object, it the object hangs about in memory. Its seems that TweenMax is keeping reference to the target I set the tween on, even after I have called kill() on the tween, in some kind of lookup dictionary in TweenMax. So I'm building up a lot of objects in memory that I can't clear, which is a big problem. Is there a way to flush this cache of objects in TweenMax when I kill a tween? Thanks Rich
  6. Hi Gsappers! I want to use a TweenLite.delayedCall as a simple timer for my game. So it calls a gameOver method when it is finished. Question: is there any reason why delayedCalls dont update progress like tweens? It would be great if my game objects could check how far along the timer is during the game. So for instance I create a delayed call 10 seconds long this.gameTimer = TweenLite.delayedCall(10, this.gameTimerEnd); if I check the progress of the timer after say 5 seconds I would expect it to return 0.5, but it returns 0 until the timer is done after which it returns 0 (See code pen demo) //after 5 seconds this.gameTimer.progress() // still returns 0 until full 10 seconds has passed and timer end method called. Any suggestions or alternative method for a simple game timer using GSAP? Thanks! Rich