Jump to content
Search Community

Animate back on the second click with the same effect (reverse() also reverses the ease which gives an other effect)

studioalloy test
Moderator Tag

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

I have this snap animation that triggers on a click and when someone clicks it for the second time I want it to snap back to it's original position. But reverse() is really reverse so also my bounce ease is being reversed which isn't the effect I was going for. 

 

 

Maybe unrelated, but what do you prefix your Google searches with when searching for the GreenSock animation documentation? (Greensock, Gsap, TimelineMax)

See the Pen NdwLWd?editors=1010 by mvaneijgen (@mvaneijgen) on CodePen

Link to comment
Share on other sites

Hi mvaneijgen :)

 

Welcome to the GreenSock forum.

 

I think this thread about using a different ease for play() and reverse() could help you:

 

https://greensock.com/forums/topic/9229-how-to-apply-different-easing-of-animation-normal-and-reverse/

 

To use Google for searching the GreenSock site, you can use the following:

 

your search terms site:greensock.com

 

Hopefully that helps.

 

Happy tweening.

:)

  • Like 1
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...