diff --git a/src/animations/TitleSite.js b/src/animations/TitleSite.js index 31ca3be..61fa221 100644 --- a/src/animations/TitleSite.js +++ b/src/animations/TitleSite.js @@ -13,7 +13,7 @@ export const animateIn = (scope, init) => { translateY: ['100%', 0], easing: 'easeOutQuart', duration: 1000, - delay: anime.stagger(40, { start: !!init ? animDelay : 0 }), + delay: anime.stagger(40), autoplay: false }) @@ -21,6 +21,12 @@ export const animateIn = (scope, init) => { const title = ScrollOut({ once: true, targets: scope, - onShown: () => letters.restart() + onShown: () => { + if (init) { + letters.restart() + } else { + setTimeout(() => letters.restart(), animDelay) + } + } }) }