Jump to content
Search Community

TweenMax.defaultEase vs TweenLite.defaultEase

ouroborus test
Moderator Tag

Go to solution Solved by GreenSock,

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

Using: TweenMax 1.14.1

 

The TweenMax docs say that setting TweenMax.defaultEase sets the default easing on TweenMax tweens. As far as I can tell, it doesn't work. Instead, it seems, I need to set TweenLite.defaultEase.

 

(I've also noted that the default for TweenMax.defaultEase is undefined, but the default for TweenLite.defaultEase is Power1.easeOut.)

 

It seems like this is a bug either in the docs or in the code.

Link to comment
Share on other sites

  • 3 years later...

Exactly. There's no such thing as TweenMax.defaultEase. TweenLite is the core class for everything, thus it's the proper place to attach static properties like that. It'd be inefficient to have to check two places for a default ease (and then what if they were different?). Sorry, I was talking about the docs being fixed :)

  • Like 1
Link to comment
Share on other sites

Nah, you'd probably never notice a real-world difference but technically TweenLite's render method is slightly faster just because it doesn't have the conditional logic for repeats/yoyos. I'm in the habit of using TweenLite always unless I need a TweenMax feature, but that's only because I'm a performance nut. Again, I highly doubt you'd ever even notice a difference if you're tweening 1000 things simultaneously. You don't need to feel hesitant about using TweenMax. 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Thanks for clearing up;-)

 

In the docs though, you can read: Since TweenMax extends TweenLite, it can do ANYTHING TweenLite can do plus more.

 

Thats the reason why I expected that TweenMax.defaultEase was OK.  BTW TweenLite.defaultEase  works of course Perfect!

 

Link to comment
Share on other sites

On 11/13/2017 at 10:49 AM, Sahil said:

@GreenSock is there any difference in performance while using TweenLite or TweenMax tweens? I often see in Blake's pens that he explicitly uses TweenLite for some tweens.

 

I do that for the reasons Jack said. It's going to be a little bit faster in high-performance situations, but probably won't be noticeable under normal usage. 

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