WIP Animations all over site

- Run a transition In for each page
- Involve a "loader" panel on page change
- TODO: tweak the animations and finish the concept
This commit is contained in:
2020-03-06 14:22:51 +01:00
parent cd1033f97b
commit 9ffc210c02
27 changed files with 827 additions and 296 deletions

View File

@@ -0,0 +1,61 @@
import anime from 'animejs'
import { animDuration, animDurationLong } from '../utils/store'
/*
** Transition In
*/
export const animateIn = () => {
// Panel itself
const transition = anime({
targets: '#transition',
height: ['100%', '100%'],
opacity: [0, 1],
duration: 200,
delay: 0,
easing: 'easeInOutQuart'
})
// Globe icon
const globe = anime({
targets: '#transition svg',
opacity: [0, 1],
duration: 200,
delay: 0,
easing: 'easeInOutQuart'
})
}
/*
** Transition Out
*/
export const animateOut = callback => {
// Panel itself
const transition = anime({
targets: '#transition',
height: ['100%', 0],
duration: animDurationLong,
delay: 800,
easing: 'easeInOutQuart',
complete: callback
})
// Title
const title = anime({
targets: '#transition .title-location',
opacity: 0,
duration: 600,
delay: 1400,
easing: 'easeInOutQuart'
})
// Globe icon
const globe = anime({
targets: '#transition svg',
opacity: 0,
duration: 600,
delay: 1400,
easing: 'easeInOutQuart'
})
}