New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GSAP v3 Timeline '.clear' issue #365
Comments
Hey Ch1pStar. In my console in both pens I see:
What's difference are we supposed to be seeing? |
Hi ZachSaucier, Thank you for your reply. 🙂 The numeric values are just logs of the delta between the current tweening target's value and the previously cached one. Looking at the GSAP Timeline v3.2.0 you'll notice that there is no actual tweening after clearing the 'looping' tween and attaching the final tween to the timeline (i.e. onUpdate is called only once). Thank you. 🙂 |
I see. Thank you for the additional details. For cases like this it might be helpful to use But that's besides the point. I see what you mean now. After "Stopping" the GSAP 3 version just logs one value while the older version logs more tweened values. That's what you're referencing, right? I think it might be related to your timeline continuing to play after the clear so the playhead is already past the very small duration of the tween? Jack is more familiar with the specifics of how the timeline's playhead works so we can wait for him to respond. Why are you using a timeline for this anyway? I'd just use a regular tween since you're using a tail function call for recursion: https://codepen.io/GreenSock/pen/abOWZZY?editors=0010 |
- FIXED: [CRITICAL] regression in 3.2.1: if you animate a transform-related value on an SVG element that has no width (according to its getBBox()), it could cause a critical error (gets caught in a loop trying to discern the width). - FIXED: if you set a timeline to be initially reversed (before adding any child animations), tweens that get added on that same tick won't inherit defaults from the root timeline. - FIXED: if an anchor element is passed in for a scrollTo, like scrollTo: document.querySelector('[name="anchor"]'), it could be interpreted incorrectly (the browser reports it as being coercible to a number). See #366 - FIXED: A timeline that gets cleared and then has new animations added may not have its timing adjusted properly. See #365 - FIXED: due to some recent browser bugs that cause confusion with reading sourcemap files, we removed the pointers inside the minified files. In other words, // sourceMappingURL=gsap.min.js.map was removed but we're still providing the sourcemap files themselves. You can manually add them in Chrome Dev Tools. We may add the pointer back in future versions once the browser issue is resolved.
Should be resolved in 3.2.2. |
I'm trying to migrate a project from TweenMax v1.17.0 to gsap v3.2.0, but I'm facing some issues.
Even though I'm currently using an older version of gsap, I'm finding those issues when I compare TweenMax v2.1.3 with gsap v3.0.0.
What I have is a timeline where I add new tweens infinitely(like a loop) until some event happens and adding the tweens should stop. At that point I
clear
the timeline and add a final tween on the same target.Using TweenMax v1.17.0(also v2.1.3) everything runs smoothly (open then link and check the pen's console).
Codepen : https://codepen.io/angelgbg/pen/oNXZKJY
However when I use gsap v3.2.0(also v3.0.0), the final tween is executed immediately without any tweening (please open then link and check the pen's console).
Codepen: https://codepen.io/angelgbg/pen/poJeMoV
I believe the problem is when I call
timeline.clear
which I think works differently than before.I know than when stopping the loop I can kill the timeline and create another one, but there is more logic around this timeline which is not in the pen and ideally I would like to keep the current timeline, but just clear all existing tweens.
Has anyone noticed this issue and have you found a work around?
The text was updated successfully, but these errors were encountered: