tweenlite-staggerdeprecated

Avoid TweenMax. Use TweenLite.stagger with the help of TimelineLite

Usage no npm install needed!

<script type="module">
  import tweenliteStagger from 'https://cdn.skypack.dev/tweenlite-stagger';
</script>

README

Deprecated

No need for this module.

Use new TimelineLite().staggerFrom(…) instead of TweenLite.staggerFrom(…)

tweenlite-stagger

Avoid TweenMax. Use TweenLite.stagger with the help of TimelineLite

gzipped size Travis build status gzipped size

Public service announcement: You don't need TweenMax to stagger! You can just use TweenLite and TimelineLite.

This extremely small package links TimelineLite's stagger methods to TweenLite and lets you use them directly.

Note: You only need this if you're filesize conscious and don't want to load TweenMax.

Install

npm install --save tweenlite-stagger
import 'gsap/src/uncompressed/TweenLite.js';
import 'gsap/src/uncompressed/TimelineLite.js';
import 'tweenlite-stagger';

Or:

<script src="http://yourcdn.com/TweenLite.js"></script>
<script src="http://yourcdn.com/TimelineLite.js"></script>
<script src="dist/tweenlite-stagger.browser.js"></script>

Usage

TweenLite.staggerTo('p', 1, {opacity: 0}, 0.2);

TweenLite.staggerFrom('p', 1, {y: 10}, 0.2);

TweenLite.staggerFromTo('p', 1, {x: 10}, {x: 100}, 0.2);

Dependencies

TweenLite and TimelineLite, of course. You need to load it separately.

Related

  • gsap-then: Make every GSAP Tween a promise. tl.then(doSomething);

License

MIT © Federico Brigante