Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Nikolay

Why can't I dod this simple animation with TweenLite

Recommended Posts

Hi,

 

I'm trying to do a simple "check" SVG animation. Why when I replace TweenMax with TweenLite, half of the stuff is not working? Do I really need to load a 100KB+ js for this? Let me know. Thank you. 

See the Pen dovrNK?editors=101 by anon (@anon) on CodePen

Link to comment
Share on other sites

Hi and welcome to the GreenSock forums,

 

TweenMax.min.js includes nearly a dozen tools. Its meant to be a convenient way to load the core tools that you will need for animating the CSS properties of DOM elements.

 

I think you are looking at the un-compressed file size. When served properly (gzipped), the browser only downloads 33.7kb for everything in TweenMax

Y6u9Sw9.png

 

To save file size you could load only TweenLite.min.js, CSSPlugin.min.js and then convert your TimelineLite animation to a series of TweenLite tweens with delays.

 

You can get a list of all the script urls from our download overlay using the customize option

COvILwW.png

 

Here is your demo with just TweenLite, CSSPlugin and DrawSVGPlugin http://codepen.io/GreenSock/pen/eNWLgV?editors=101

Frankly, I think you are better off loading 1 slightly larger file than making additional server requrests.

 

Nice animation BTW.

Let us know if you need more help.

  • Like 1
Link to comment
Share on other sites

Aaah - makes sense. I totally forgot about the gzip compression and the 2 vs 1 calls. Thanks for the prompt help!

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