Jump to content
Search Community

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

andyr test
Moderator Tag

Go to solution Solved by Carl,

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?  




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

Link to comment
Share on other sites

  • Solution

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
Link to comment
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.
  • Create New...