Jump to content
GreenSock

charlie_says

Members
  • Posts

    10
  • Joined

  • Last visited

charlie_says's Achievements

4

Reputation

  1. Oh, ignore me, changing the timescale of the tween has the desired effect. I thought it wasn't working because of a typo.
  2. I've got a number of tweens which I need to alter the duration of. Initially, I had done this with changing the global timescale, but this had other implications for my project and I decided it wasn't the way to go. I've now got a way of updating my active tweens to make them run to the new duration, BUT, I can't see a way of updating my delayedcalls. Is it possible to get the current time or progress of a delayed call?
  3. Created the pen, and typically it worked as it should... For reference it's here: https://codepen.io/charlie_says/pen/MMVOZd clicking the left arrow button resets/starts the tweens, right arrow button updates the tween. Found the error in my code. Thanks all!
  4. Thanks @PointC, I thought this was the answer! But, it actually has a similar issue to my solution, in that whilst it clearly correctly updates the values, it doesn't take into account the ease having already started, and appears to start over... I'll try to knock up a codepen.
  5. Hi, Despite what the title says, I'm fairly sure I can't do that, and I'll have to overwrite the tween. But, I'm using a PowerN.easeIn, so the element looks like it's dropping into place, and I've not been able to work out a way of interrupting the tween in a smooth way, it's very noticable... So, can anyone recommend a way to stop a PowerN tween at an arbitrary point, and to create a new tween which would effectively continue the original from where it left off (I can get the remaining duration, but, I'm unable to match the easeIn.) Thanks, Charlie
  6. hmm, made up a pen, and whilst it's a bit different, GSAP works exactly as you'd said (and I originally expected.) I'll need to investigate the issue further - but, for now, it would appear not to be a GSAP issue.
  7. Hey @Carl that's exactly the issue. I'm working in TypeScript which shouldn't really affect anything... But, I had thought that it wasn't expected behaviour. I will try to knock up a demo tomorrow.
  8. Hi, I've hit an interesting problem using delayedCall/killDelayedCall I've got a number of classes which, typically should run consecutively, but, can run concurrently. The classes are loading a video, and then when this fires its complete event, a delayedCall is used to activate the next part (usually loading an associated MP3). But, as the class/video can be skipped and should that happen I won't wont the next part to be activated, I use killDelayedCall to stop it. What I've found is that not only will the delayed call be stopped from the first class, but from any other that are running that delayedCall. I've not gone through the GSAP source, but, I expect that killDelayedCall is removing all references because it's using the name of the function rather than some unique reference. So, is there a way to avoid this? (I have a fix, it's just a bit ugly.) <edit> I just checked and I'm using v1.19 - not sure if upgrading to v1.2 would help? </edit>
  9. I've got a tween I'm using: var dValue = Math.abs(old_value - new_value); var speed = dValue; var delay = 1; this._tween = TweenMax.to(this, speed, {my_value:new_value, delay:delay, overwrite: "all", ease:SteppedEase.config(dValue),onUpdate:this.setTrailGFX,onUpdateScope:this}); Which isn't working in quite the way I'd hoped... What I'd like to do is only have my onUpdate callback fire when I reach the new integer value, this calls a number of times (depending on the speed/dValue amount.) I did also look into using roundProps ( for this.my_value) but this also didn't work in quite the way I want. The problem is that the this.setTrailGFX function is quite expensive, so I only really want to call it when needed. Any ideas about how to work this (or do it differently) would be appreciated!
×