Skip to content

Commit

Permalink
make hero animation smoother
Browse files Browse the repository at this point in the history
  • Loading branch information
Hetari committed Sep 7, 2024
1 parent 0e0760c commit 25db1f5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/animations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,29 +317,29 @@ const animateLoadingText = (id: string) => {
const animateHeroNav = () => {
gsap.to('header', {
y: 0,
duration: 1,
duration: 1.5,
ease: 'power4.inOut',
});

gsap.to('#svg-my-en-name g path', {
y: 0,
delay: 0.2,
duration: 1,
duration: 1.5,
ease: 'power4.inOut',
stagger: 0.01,
});

gsap.to('#star', {
x: 1,
delay: 0.4,
duration: 1,
delay: 0.2,
duration: 1.5,
ease: 'power4.inOut',
});

gsap.to('.overlay', {
y: '100%',
delay: 0.4,
duration: 1,
delay: 0.2,
duration: 1.5,
ease: 'power4.inOut',
onComplete: () => {
gsap.set('.overlay', { display: 'none' });
Expand All @@ -349,19 +349,19 @@ const animateHeroNav = () => {
gsap.to('#profile-img', {
scale: 1,
delay: 0.4,
duration: 1,
duration: 1.5,
ease: 'power4.inOut',
});

gsap.to(['#down-arrow', '#contact-btn', '#available-for-work'], {
x: 0,
y: 0,
delay: 0.6,
duration: 1,
delay: 0.4,
duration: 1.5,
ease: 'power4.inOut',
});

animateSplitText('#whoAmI .letters', '#whoAmI .letters', 1, 0.005, 0.6);
animateSplitText('#whoAmI .letters', '#whoAmI .letters', 1.5, 0.005, 0.4);

// Hero scroll animation
gsap.to('#hero', {
Expand Down

0 comments on commit 25db1f5

Please sign in to comment.