Last active
September 4, 2017 05:27
-
-
Save ryonakae/3b688799d12bf9c30ba21f819d7e5ae8 to your computer and use it in GitHub Desktop.
TimelinePlus (http://qiita.com/yuichiroharai/items/55b0a850ff68d3b7e3fc) をES2015で
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
'use strict' | |
import gsap from 'gsap' | |
import TimelinePlus from './TimelinePlus' | |
TimelinePlus.parallel([ | |
TimelinePlus.serial([ | |
TweenMax.to(spans[0], 0.7, {x: 400, ease: Expo.easeInOut}), | |
TweenMax.to(spans[1], 0.9, {x: 400, ease: Expo.easeInOut}) | |
]), | |
TimelinePlus.parallel([ | |
TweenMax.to(spans[2], 0.7, {x: 400, ease: Expo.easeInOut}), | |
TweenMax.to(spans[3], 0.9, {x: 400, ease: Expo.easeInOut}) | |
]).delay(0.5) | |
]) |
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
export default { | |
serial: (array) => { | |
const tl = new TimelineMax() | |
array.forEach((value) => { | |
tl.add(value) | |
}) | |
return tl | |
}, | |
parallel: (array) => { | |
return new TimelineMax().add(array) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment