Created
April 9, 2018 15:24
-
-
Save dbismut/7649594fa9f27e54534cc3f6d45e53d6 to your computer and use it in GitHub Desktop.
Part 3 - Last details and animation width
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
executeEnteringTransition = (node, done) => { | |
/* same code */ | |
const { | |
height: heightFrom, | |
top: topFrom, | |
scale: scaleFrom, | |
...mainFrom | |
} = this.from; | |
const { height: heightTo, top: topTo, scale: scaleTo, ...mainTo } = this.to; | |
composite({ | |
heightAndTop: tween({ | |
from: { height: heightFrom, top: topFrom, scale: scaleFrom }, | |
to: { height: heightTo, top: topTo, scale: scaleTo }, | |
duration: 800, | |
ease: myEasing | |
}), | |
main: chain( | |
delay(500), | |
tween({ | |
from: mainFrom, | |
to: mainTo, | |
duration: 250 | |
}) | |
) | |
}) | |
.pipe(({ main, heightAndTop }) => ({ ...heightAndTop, ...main })) | |
.start({ /* same code */ }); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment