Jump to content
Search Community

Default ease for timeline?

gareth 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

  • 1 year later...

You can't set an ease on a timeline, but you can set a default ease like this:

TweenLite.defaultEase = Linear.easeNone;

 

That new ease will be used for all the tweens created after it, but you can override it on any tween by setting a different ease for that particular tween.

 

Happy tweening.

:)

  • Like 3
Link to comment
Share on other sites

If you use functions to create your animations, it's much easier to swap out and test different values, like an ease.

var tl = createSomeTimeline(Power1.easeInOut);

function createSomeTimeline(ease) {
  return new TimelineMax()
    .to(foo, 1, { x: 100, ease: ease })
    .to(bar, 1, { x: 100, ease: ease })
    .to(baz, 1, { x: 100, ease: ease });
}

 

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