Skip to content

Commit

Permalink
update some animations
Browse files Browse the repository at this point in the history
  • Loading branch information
Hetari committed Oct 7, 2024
1 parent 85b53f7 commit 8c69577
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/animations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,14 +380,14 @@ const animateHeroNav = () => {
// A little bit about me animation
const animateAboutMeSectionLeave = (id: string) => {
gsap.to(id, {
yPercent: -10,
yPercent: -5,
scale: 0.95,
ease: 'power1',
// ease: 'power1',
scrollTrigger: {
trigger: id,
start: '75% bottom',
// end: 'bottom top',
scrub: 1,
scrub: 0.1,
},
});
};
Expand Down
13 changes: 4 additions & 9 deletions src/components/sections/People.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- common-padding -->
<section
id="testimonials-section"
class="common-padding relative mx-auto min-h-svh overflow-y-clip py-0 will-change-auto"
class="common-padding relative mx-auto min-h-svh -translate-y-40 overflow-y-clip py-0 will-change-transform"
>
<div
class="grid w-full grid-cols-12 border-b-[1px] border-flax-smoke-300 pb-[clamp(2.25rem,2.1786rem_+_0.3571vi,2.5rem)]"
Expand Down Expand Up @@ -40,19 +40,14 @@
gsap.registerPlugin(ScrollTrigger);
const animatePeopleSectionLeave = (id: string) => {
gsap.set(id, {
yPercent: -50,
});
gsap.to(id, {
scrollTrigger: {
trigger: id,
start: 'top 75%',
end: 'bottom center',
scrub: true,
end: 'top center',
scrub: 0.1,
},
ease: 'power1',
yPercent: 0,
y: 0,
});
};
onMounted(() => {
Expand Down

0 comments on commit 8c69577

Please sign in to comment.