Created
January 18, 2016 20:41
-
-
Save romainl/afad172796d22f087757 to your computer and use it in GitHub Desktop.
Animation libraries in a CommonJS context
This file contains hidden or 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
// require | |
var TweenLite = require("../../../node_modules/gsap/src/uncompressed/TweenLite"); | |
require("../../../node_modules/gsap/src/uncompressed/plugins/CSSPlugin"); | |
// use | |
TweenLite.to(element, 1, {alpha: 0.3}); |
This file contains hidden or 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
// require | |
var TweenMax = require("../../../node_modules/gsap/src/uncompressed/TweenMax"); | |
// use | |
TweenMax.to(element, 1, {alpha: 0.3}); |
This file contains hidden or 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
// require | |
var velocity = require("velocity-animate"); | |
// use | |
velocity(element, {opacity: 0.3}, {duration: 1000}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment