Skip to content

Commit

Permalink
added scrolltrigger animation for whole page
Browse files Browse the repository at this point in the history
  • Loading branch information
Akshatjalan committed Dec 14, 2023
1 parent b9bbae4 commit 930a60c
Showing 1 changed file with 45 additions and 1 deletion.
46 changes: 45 additions & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ tl.fromTo(
opacity: 1,
y: 0,
ease: "power2.out",
duration: 1,
duration: 0.6,
}
);

Expand All @@ -31,6 +31,7 @@ tl.fromTo(
opacity: 1,
x: 0,
ease: "power2.out",
duration: 1,
}
);

Expand All @@ -41,6 +42,7 @@ tl.fromTo(
opacity: 1,
x: 0,
ease: "power2.out",
duration: 1,
}
);

Expand Down Expand Up @@ -120,3 +122,45 @@ tl3.fromTo(
duration: 2,
}
);

// TIMELINE 4

var tl4 = gsap.timeline({
scrollTrigger: {
trigger: ".projects",
start: "10% 80%",
end: "50% 70%",
},
});

tl4.fromTo(
".projects",
{ opacity: 0, y: 100 },
{
opacity: 1,
y: 0,
ease: "power.out",
duration: 2,
}
);

// TIMELINE 5

var tl5 = gsap.timeline({
scrollTrigger: {
trigger: ".contact",
start: "0% 80%",
end: "50% 70%",
},
});

tl5.fromTo(
".contact",
{ opacity: 0, y: 100 },
{
opacity: 1,
y: 0,
ease: "power.out",
duration: 1,
}
);

0 comments on commit 930a60c

Please sign in to comment.