Skip to content

Instantly share code, notes, and snippets.

@dbismut
Created April 9, 2018 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbismut/7649594fa9f27e54534cc3f6d45e53d6 to your computer and use it in GitHub Desktop.
Save dbismut/7649594fa9f27e54534cc3f6d45e53d6 to your computer and use it in GitHub Desktop.
Part 3 - Last details and animation width
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