📜 ⬆️ ⬇️

Greensock - now also for javascript



Surprisingly, but a fact: there are almost no articles on Greensock - an excellent library for scripting animation in Flash. Perhaps this is due to the fact that there are fewer Flash developers than web developers?

However, now it does not matter: Greensock v12 (aka Greensock Animation Platform or GSAP) can animate in JavaScript. Any property of any object can be animated in dozens of ways, combine animations into a timeline, pause this timeline, or turn it backwards. Just a couple of lines.
')
Moreover, Greensock works much faster than jQuery, YUI, MooTools or Dojo. Developers talk about thousands of percent , but why take the word when there is an animation speed test .

Details in English: www.greensock.com/v12/ , and under the cut - a summary in Russian.


Main buns of the Greensock Animation Platform:
- excellent performance (recall - test )
- wide functionality (easing type yo-yo with custom curves is still flowers. GSAP has, for example, a physical 2D engine. Or the ability to transform an object around a given point. Which can also be animated)
- compatibility from IE6 and above
- independence from other plug-ins (and at the same time excellent compatibility with jQuery as a selector)
- almost the same syntax for JS, AS2 and AS3
- weight 7Kb (we are talking about TweenLite, there are TweenNano for maniacs, but so far only for Flash)
- work with the timeline - animations are connected in chains or compiled in any other order; Ended animations trigger each other or third-party functions; timelines can be accelerated and slowed down, paused, played in the opposite direction.
- you can animate virtually any property of any object
- powerful settings for managing conflicting animations (for example, “move to the left” and “move to the right” simultaneously start, and in a second - again “move to the left, but with different speed” - what should the engine do?)
- complete documentation with examples and a sandbox
- support
- free of charge (except for use in products intended for reusable commercial sale)

In general, my week began with great news! :)

PS As a postscript: have you heard of Greensock before? Should I publish a couple of examples?

Source: https://habr.com/ru/post/144208/


All Articles