-
-
Save abernier/0da4d2561e574cd4e3e6b65e215c3939 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// anim1 | |
// | |
var anim1 = function (duration) { | |
var tl = new TimelineMax(); | |
// | |
// Define tweens | |
// | |
var tw1 = new TweenMax.fromTo(elA, 1, {borderWidth: 0}, {borderWidth: 4}); | |
var tw2 = new TweenMax.staggerFromTo(myEls, 2, {scaleX: 0, force3D: true}, {scaleX: 1}, .2); | |
// Add more tw... | |
// | |
// Add tweens to the timeline | |
// | |
tl.add(tw1); | |
tl.add(tw2); | |
// | |
// Rescale time | |
// | |
(typeof duration !== 'undefined') && tl.timeScale(tl.totalDuration()/(duration+.000001)); | |
return tl; | |
}; | |
// | |
// anim2 | |
// | |
var anim2 = function (duration) { | |
... | |
}; | |
// | |
// Compose anim1+2 together | |
// | |
var tl = new TimelineMax(); | |
var tw1 = anim1(4); | |
var tw2 = anim2(8); | |
tl.add(tw1); | |
tl.add(tw2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment