Files
housesof/src/animations.js
2020-02-13 22:24:28 +01:00

32 lines
760 B
JavaScript

import anime from 'animejs/lib/anime.es.js'
// Appear/Disappear
export const zoomFadeIn = (node, { targets, duration }) => {
return {
css: t => {
anime({
targets,
duration,
easing: 'easeInOutCirc',
opacity: [0, 1],
scale: [0.9, 1],
delay: anime.stagger(100)
})
}
}
}
export const zoomFadeOut = (node, { targets, duration }) => {
return {
css: t => {
anime({
targets,
duration,
easing: 'easeInOutCirc',
opacity: [1, 0],
scale: [1, 0.9],
delay: anime.stagger(100)
})
}
}
}