Jump to content
Search Community

Set multiple eases for multiple properties

ColirK test
Moderator Tag

Go to solution Solved by OSUblake,

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

Hi.

I would like to know if there a way with TweenLite to set multiple easing function for a tween which animate multiple properties

 

ex: i wouil like to get an ease 'Quad.easeOut' for a position animation and a linear ease for the opacity

 

TweenLite.to($icon,.8,{x:0,opacity:1,ease:[Quad.easeOut,Linear.easeNone]});

 

i search in the forum, but don't find the answer.

 

Thanks a lot.

 

 

Link to comment
Share on other sites

  • Solution

No. That's not possible because JavaScript does not guarantee the order of properties in an object. This means that the order of your x and opacity might get switched when GSAP reads them. Normally this doesn't happen, but again, it's not guaranteed. 

 

So to do this you would need to create multiple tweens. Using a timeline might be better so that you can keep them grouped together.

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