Fix default page animation in
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-04-10 12:02:55 +02:00
parent 85cb624a31
commit 89911ad7c1

View File

@@ -8,24 +8,15 @@ import { animDuration, animDelay } from 'utils/store'
export const animateIn = () => { export const animateIn = () => {
const tl = anime.timeline({ const tl = anime.timeline({
easing: 'easeOutQuart', easing: 'easeOutQuart',
duration: animDuration, duration: animDuration
delay: animDelay
}) })
// Simple slide and fade on each part of the page // Simple slide and fade on each part of the page
tl.add({ tl.add({
targets: document.querySelectorAll('.page__part'), targets: document.querySelectorAll('.page__part, .globe'),
opacity: [0, 1], opacity: [0, 1],
translateY: [8, 0], translateY: [8, 0],
translateZ: [0, 0], translateZ: [0, 0],
delay: anime.stagger(160) delay: anime.stagger(200, { start: animDelay })
}) })
// Globe
tl.add({
targets: document.querySelector('.globe'),
opacity: [0, 1],
translateY: ['5%', 0],
translateZ: [0, 0]
}, 200)
} }