Fix pages and components animations

- Fix delays
- Add the init back for TitleSite as it needs a delay for the page instance vs. loader
This commit is contained in:
2020-04-04 11:45:26 +02:00
parent 751694605a
commit 94fa63ef41
8 changed files with 51 additions and 47 deletions

View File

@@ -1,5 +1,6 @@
import anime from 'animejs'
import ScrollOut from 'scroll-out'
import { animDelay } from 'utils/store'
/*
@@ -15,7 +16,7 @@ export const animateIn = (scope, init) => {
tl.add({
targets: scope.querySelectorAll('span, em span'),
translateY: ['100%', 0],
delay: anime.stagger(40),
delay: anime.stagger(40, { start: init ? 0 : animDelay }),
})
// On scroll animation