diff --git a/index.html b/index.html index 6e2773e..445d5be 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - + { + document.body.classList.add('stop-scrolling'); + window.scrollTo(0, 0); + setTimeout(() => { requestAnimationFrame(raf); }, 2000); @@ -78,3 +81,10 @@ } }); + + diff --git a/src/animations/index.ts b/src/animations/index.ts index f97e9ef..6d26c03 100644 --- a/src/animations/index.ts +++ b/src/animations/index.ts @@ -8,7 +8,7 @@ gsap.registerPlugin(MotionPathHelper); const animateSplitText = ( id: string, - textId: string = '', + textId: string, duration: number = 0.8, stagger: number = 0.005, delay: number = 0, @@ -217,9 +217,10 @@ const animateLoadingPath = (path: Ref, targetPath: string) => { gsap.set('#loading-screen', { display: 'none' }); }, onStart: () => { - window.scrollTo(0, 0); setTimeout(() => { animateHeroNav(); + document.body.classList.remove('stop-scrolling'); + window.scrollTo(0, 0); }, 250); }, }, @@ -288,7 +289,7 @@ const animateHeroNav = () => { ease: 'power4.inOut', }); - animateSplitText('#whoAmI .letters'); + animateSplitText('#whoAmI .letters', '#whoAmI .letters'); gsap.to(['#location', '#art'], { opacity: 1,