Jump to content
GreenSock

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

Unable to reset Ease multiple times on TweenMax with updateTo

Recommended Posts

Hi All,

 

I have looked through this forum here, but I didn't quite see this discussed. I want to change the easing type between a play() and reverse() animation on a TweenMax. However, it seems to change the ease type only once, and all subsequent attempts to use updateTo seem to do nothing. I did find a really hacky way around the issue by adding 

tween._ease = tween.vars.ease;

after the updateTo. You can see this in the CodePen by uncommenting line 4. That does not seem like the right way to actually do this. This feels like I'm just missing something simple, but I've looked at the docs and Googled around and I don't see where my error is.

See the Pen vLEMyQ by DeanBDean (@DeanBDean) on CodePen

Link to post
Share on other sites

Interesting - I never even thought someone would attempt to change the ease in an updateTo() (and by the way, that'd cause a jump if you did that in the middle of a tween because the eases would likely render things at different spots at that particular progress but in your case you're doing it only at the very start/end so it isn't noticeable). I fixed that in the upcoming 1.18.1 release which you can preview (uncompressed) here: 

https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/TweenMax-latest-beta.js

 

Thanks for pointing it out. 

  • Like 3
Link to post
Share on other sites

Awesome, thanks so much. I definitely don't want to reset an ease in the middle of a tween for the reasons you state. I'm only wanting to set it onComplete and onReverseComplete so that I get the bounce that I desire.

 

I am using npm to pull in the GSAP library, is there a commit I can point to in my package.json? Or do I just need to wait until it's officially released to update my npm and use the above file as a workaround for now?

Link to post
Share on other sites

That's correct - when we release 1.18.1, we'll NPMJS will update and you should be able to snag it at that point. We hope to push it out within the next week or so. 

  • Like 1
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×