Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

thunderkid

Members
  • Posts

    8
  • Joined

  • Last visited

thunderkid's Achievements

0

Reputation

  1. Makes sense. Yes, that works nicely. http://codepen.io/thunderkid/pen/ojgVNO Thanks very much!
  2. I see. Actually I just ended up using timeScale(0) because I started off by building on top of your own fine example . I assumed timeScale(0) must be the same as pausing. Although the effect of starting/stopping gradually is nice, it's not one I particularly need, so I'll just re-implement using pause/play/resume. But given this difference, shouldn't your example actually pause once the animation to timeScale(0) has finished? Something like this: http://codepen.io/thunderkid/pen/epmxay It still needs one 1e-8 hack, but seems more robust than before. In general, though, couldn't you just perform a check that whenever timeScale(x) is called internally, if (x<1e-9) pause the timeline, and set a flag saying that it's been paused just for rounding reasons. Seems timeScale(x) would be called only infrequently, so I don't see how it would entail a performance hit. (I haven't actually delved into the code, so this is just random speculation.)
  3. Ok, so one hackish fix is to check progress for not much change in onUpdate, and set it back to its prev value if the change is very small: http://codepen.io/thunderkid/pen/meyGVM Damn ugly though. Don't know if it would break other stuff in a more complex scenario. Seems that if you have sub-timelines you'd need to put this same hack into each of their onUpdate's.
  4. I'm trying to build a system from your slider animation example. I'm getting performance problems where onUpdate keeps being called even when the timeline isn't supposed to be running. To see this most clearly, I just took your example and added a display of the timeline's progress. Move the slider anywhere except the leftmost position then let it go. The progress keeps drifting: http://codepen.io/thunderkid/pen/YyPjJW It seems that the timeScale is set to 1e-10 instead of zero. Is there a way around this? Thanks.
  5. Thanks, that's a nice technique. But unfortunately setPosition with two values is what I need for setting map positions. Is there an example of how to do this, with > 1 dimensions being tweened? I tried taking your pen and implementing setXY / getXY, hoping to tween on the two coords simultaneously, but that doesn't seem to work: http://codepen.io/thunderkid/pen/XmJYrp?editors=001
  6. Hi, When I try to tween between classes on an intermediate div, the animation no longer smoothly interpolates - it just jumps suddenly from one state to another. http://codepen.io/thunderkid/pen/JYovME Is it possible to do this sort of thing with className tweening? Thanks.
  7. Hi, I'm wondering whether I should be writing my own plugins for GSAP. I have two cases where this might be nice: 1) First I'm animating richmarkers on google maps. To animate latitude and longitude I must call setPosition. I can do this ok with onUpdate, but then if I'm also animating color, say, it starts to get a bit cumbersome. 2) In another project I'm using fabric.js. I notice you have a plugin for easel.js but not fabric. So for cases like this should I write my own plugin to make the syntax nicer? If so, are there any docs or examples on doing this? Thanks.
×