Skip to content

Instantly share code, notes, and snippets.

@mattdesl
Last active August 29, 2015 14:08
Show Gist options
  • Save mattdesl/d70a394daeab7062fbb6 to your computer and use it in GitHub Desktop.
Save mattdesl/d70a394daeab7062fbb6 to your computer and use it in GitHub Desktop.
gsap-promise
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()
})
//a reusable "nav menu" with its own set of animations
module.exports = {
show: function() {
//animate all tweens in parallel
return animate.all([
animate.to(container, 1.0, { ... }),
animate.fromTo(children, 1.0, { ... }, { ... }),
... etc
])
},
... setup section ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment