Jump to content


Why can't I dod this simple animation with TweenLite

Go to solution Solved by Carl,

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



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

  • Solution

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



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



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.