Created
August 15, 2016 11:36
-
-
Save anonymous/611606240272ac3f40fc54025604de46 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
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; | |
}; | |
var anim2 = function (duration) { | |
... | |
}; | |
// | |
// Compose anims | |
// | |
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