Jump to content
Search Community

Specific Reason for no global ease on timelines?

rgfx 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

Hello,

 

When dealing with complex looping animations I always use a linear ease. I find it rather cumbersome having to add a ease to each propriety. I know you can set it globally, but then my other timelines get messed up...

 

Seems to be asked often, seems like a logical thing to be able to do. Maybe am looking in the wrong place. 

 

 

  • Like 1
Link to comment
Share on other sites

Hi rgfx :)

 

You aren't looking in the wrong place. There is no setting for a timeline specific ease. As you mentioned, you can set it globally. You mentioned that your other tweens get messed up when setting a default ease, but you can override that default ease. So if the majority of your tweens use a linear ease, you can set that as the default and then override any other tweens where you need something else.

TweenLite.defaultEase = Linear.easeNone;

// then use what you need on any other tweens
TweenMax.to(target, 1, {eases here will override the default})

Does that help?

 

Happy tweening.

:)

  • Like 4
Link to comment
Share on other sites

I don't know if there is a technical reason for this, but I think it would be nice.

 

When I need to constantly test out different eases for animations, I usually place the ease in a variable or as a function parameter. 

var myAnimation = createAnimation(Back.easeOut);

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

.

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