Jump to content
GreenSock

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

reverse(). Elastic ease in, no ease reverse.

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

tween = TweenMax.fromTo(class_name, duration,
{top: start_y_percent, left: start_x_percent, scaleX: 0, scaleY: 0, xPercent: -50, yPercent: -50},

{top: end_y_percent, left: end_x_percent, xPercent: -50, yPercent: -50, scaleX: 1, scaleY: 1, onReverseComplete:hide, ease: Elastic.easeOut}).progress(current_progress);

Box elastic eases in, but on reverse(), I don't want the elastic ease (just the default ease).

 

I've looked at http://greensock.com/docs/#/HTML5/GSAP/TimelineMax/reverse/, but not sure if possible using reverse().  If not, what's the best way to do this?  

 

Thanks.

 

UPDATE: I killed the tween and created a TweenMax.to to reverse the animation (but with some different properties).

Share this post


Link to post
Share on other sites

When you reverse() an animation it respects all the timing / easing that were present when it played forward.

 

This post goes into more detail: http://greensock.com/forums/topic/9229-how-to-apply-different-easing-of-animation-normal-and-reverse/?p=37241

 

Perhaps if you built a reduced CodePen demo that showed how and when you intend to reverse() the tween it might help us offer some suitable solutions.

As the link above explains, if you try to reverse the tween while its playing and change eases, there is most likely going to be a jump.

  • Like 3

Share this post


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

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 


  • Recently Browsing   0 members

    No registered users viewing this page.

×