Last active
August 29, 2015 14:08
-
-
Save mattdesl/d70a394daeab7062fbb6 to your computer and use it in GitHub Desktop.
gsap-promise
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 gallery = require('./page-gallery') | |
var popup = require('./info-popup') | |
gallery.show() | |
//once all elements in the page are done animating, do something else | |
.then(function() { | |
return popup.show() | |
}) |
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
//a reusable "gallery" grid | |
module.exports = { | |
show: function() { | |
return animate.staggerTo(items, 1.0, { ... }) | |
}, | |
... setup section ... | |
} |
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
//this brings together the nav menu and grid into a single page | |
var nav = require('./left-nav') | |
var gallery = require('./gallery-grid') | |
module.exports = { | |
//section is not fully animated in until both nav & gallery is done animating | |
show: function() { | |
return animate.all([ | |
nav.show(), | |
gallery.show() | |
]) | |
}, | |
... setup section ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment