UNPKG

5.96 kBMarkdownView Raw
1# GSAP (GreenSock Animation Platform)
2
3#### Professional-grade animation for the modern web
4
5GSAP is a JavaScript library for building high-performance animations that work in **every** major browser. Animate CSS, SVG, canvas, React, Vue, WebGL, colors, strings, motion paths, generic objects...anything JavaScript can touch! No other library delivers such advanced sequencing, reliability, and tight control while solving real-world problems on millions of sites. GSAP works around countless browser inconsistencies; your animations **just work**. At its core, GSAP is a high-speed property manipulator, updating values over time with extreme accuracy. It's up to 20x faster than jQuery! See the <a href="https://greensock.com/why-gsap/">"Why GSAP?" article</a> for what makes GSAP so special.
6
7### What is GSAP? (video)
8
9[![What is GSAP?](http://greensock.com/_img/github/thumb-what-is-gsap-small.jpg)](http://www.youtube.com/watch?v=RYuau0NeR1U)
10
11
12GSAP is completely flexible; sprinkle it wherever you want. **Zero dependencies.**
13
14There are many optional <a href="https://greensock.com/gsap-plugins/">plugins</a> and <a href="https://greensock.com/ease-visualizer/">easing</a> functions for achieving advanced effects easily like morphing, scrolling, or animating along a motion path.
15
16## Docs
17View the <a href="https://greensock.com/docs">full documentation here</a>, including an <a href="https://greensock.com/docs/v3/Installation">installation guide</a>.
18
19### CDN
20```html
21<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.0.4/gsap.min.js"></script>
22```
23Click the green "Get GSAP Now" button at <a href="https://greensock.com/?download=GSAP-JS">greensock.com</a> for more options and installation instructions, including CDN URLs for various plugins.
24
25**Every major ad network excludes GSAP from file size calculations** and most have it on their own CDNs as well, so contact them for the appropriate URL(s).
26
27### NPM
28See the <a href="https://greensock.com/docs/v3/Installation#npm">guide to using GSAP via NPM here</a>.
29
30```javascript
31npm install gsap
32```
33The default (main) file is gsap.js which includes most of the eases as well as the core plugins like CSSPlugin, AttrPlugin, SnapPlugin, ModifiersPlugin, and all of the utility methods like interpolate(), mapRange(), etc.
34```javascript
35// typical import
36import gsap from "gsap";
37
38// or get other plugins:
39import Draggable from "gsap/Draggable";
40import ScrollToPlugin from "gsap/ScrollToPlugin";
41
42// or all tools are exported from the "all" file (excluding bonus plugins):
43import { gsap, ScrollToPlugin, Draggable, MotionPathPlugin } from "gsap/all";
44
45// don't forget to register plugins
46gsap.registerPlugin(ScrollToPlugin, Draggable, MotionPathPlugin);
47```
48The NPM files are ES modules, but there's also a /dist/ directory with UMD files for extra compatibility.
49
50Download <a href="https://greensock.com/club/">Club GreenSock</a>-only plugins from your GreenSock.com account and then treat them as part of your own JS payload. Post other questions in our <a href="https://greensock.com/forums/">forums</a> and we'd be happy to help.
51
52
53### Getting Started (includes video)
54
55[![Getting Started with GSAP](http://greensock.com/_img/github/thumb-getting-started-small.gif)](http://greensock.com/get-started)
56
57### Resources
58
59* <a href="https://greensock.com/">GSAP home page</a>
60* <a href="https://greensock.com/get-started/">Getting started guide</a>
61* <a href="https://greensock.com/docs/">Full documentation</a>
62* <a href="https://greensock.com/forums/">Forums</a>
63* <a href="https://greensock.com/showcase">Showcase</a>
64* <a href="https://greensock.com/why-gsap/">Why GSAP?</a> (a practical guide for developers)
65* <a href="https://codepen.io/GreenSock/full/vYBRPbO">Advanced staggers</a>
66* <a href="https://greensock.com/draggable/">Draggable</a>
67* <a href="https://greensock.com/svg-tips/">Animating SVG with GSAP</a>
68* <a href="https://greensock.com/club/">Club GreenSock</a> (get access to bonus plugins not in this repository)
69
70### Get CustomEase for free
71Sign up for a free GreenSock account to gain access to <a href="https://greensock.com/customease/">CustomEase</a> which lets you create literally any ease imaginable (unlimited control points). It's in the download zip at <a href="https://greensock.com/?download=GSAP-JS">GreenSock.com</a> (when you're logged in).
72
73### What is Club GreenSock? (video)
74
75[![What is Club GreenSock?](http://greensock.com/_img/github/thumb-what-is-club-greensock-small.jpg)](http://www.youtube.com/watch?v=Ome_KnloOhs)
76
77<a href="https://greensock.com/club/">Sign up</a> anytime.
78
79### Advanced playback controls &amp; debugging
80
81<a href="https://greensock.com/gsdevtools/">GSDevTools</a> adds a visual UI for controlling your GSAP animations which can significantly boost your workflow and productivity. (<a href="https://greensock.com/club">Club GreenSock</a> membership required, not included in this repository).
82
83### Try all bonus plugins for free on Codepen
84<a href="https://codepen.io/GreenSock/full/OPqpRJ">https://codepen.io/GreenSock/full/OPqpRJ</a>
85
86### Need help?
87<a href="https://greensock.com/forums/">GreenSock forums</a> are an excellent resource for learning and getting your questions answered. Report any bugs there too please (it's also okay to file an issue on Github if you prefer).
88
89### License
90GreenSock's standard "no charge" license can be viewed at <a href="https://greensock.com/standard-license">http://greensock.com/standard-license</a>. <a href="https://greensock.com/club/">Club GreenSock</a> members are granted additional rights. See <a href="https://greensock.com/licensing/">http://greensock.com/licensing/</a> for details. Why doesn't GreenSock use an MIT (or similar) open source license, and why is that a **good** thing? This article explains it all: <a href="https://greensock.com/why-license/" target="_blank">http://greensock.com/why-license/</a>
91
92Copyright (c) 2008-2019, GreenSock. All rights reserved.
\No newline at end of file