Created
November 27, 2016 16:48
-
-
Save jgthms/05304ee627d0e73452af5552778ad697 to your computer and use it in GitHub Desktop.
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
| const shiftCurve = mojs.easing.path( 'M0,100 C50,100 50,100 50,50 C50,0 50,0 100,0' ); | |
| const scaleCurveBase = mojs.easing.path( 'M0,100 C21.3776817,95.8051376 50,77.3262711 50,-700 C50,80.1708527 76.6222458,93.9449005 100,100' ); | |
| const scaleCurve = (p) => { return 1 + scaleCurveBase(p); }; | |
| const nScaleCurve = (p) => { return 1 - scaleCurveBase(p)/10; }; | |
| const circle = new mojs.Shape({ | |
| shape: 'rect', | |
| fill: { '#F64040' : '#F64040', curve: scaleCurve }, | |
| radius: 10, | |
| rx: 3, | |
| x: { [-125] : 125, easing: shiftCurve }, | |
| scaleX: { 1 : 1, curve: scaleCurve }, | |
| scaleY: { 1 : 1, curve: nScaleCurve }, | |
| origin: { '0 50%' : '100% 50%', easing: shiftCurve }, | |
| isYoyo: true, | |
| delay: 500, | |
| duration: 800, | |
| repeat: 999, | |
| //isForce3d: true | |
| }).play(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment