Skip to content

Commit

Permalink
finish filming gsap
Browse files Browse the repository at this point in the history
  • Loading branch information
learyjk committed Apr 1, 2024
1 parent 21d006d commit 4506527
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
28 changes: 28 additions & 0 deletions src/webflow/gsap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const text = new SplitType(".gsap_h1");

const tl = gsap.timeline();

tl.from(".gsap_star", { scale: 0 });

tl.fromTo(
text.chars,
{ scale: 0, yPercent: 100, opacity: 0 },
{
scale: 1,
yPercent: 0,
opacity: 1,
stagger: { amount: 0.5 },
},
"<"
);

tl.to(".gsap_star", {
scale: 1.1,
ease: "power1.inOut",
duration: 2,
repeat: -1,
yoyo: true,
stagger: {
each: 0.5,
},
});
4 changes: 0 additions & 4 deletions src/webflow/interest.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ function calculateInterest() {
const frequency = Number(formData.get("frequency"));
const years = Number(formData.get("years"));

// Calculating compound interest
const amount =
principal * Math.pow(1 + rate / 100 / frequency, frequency * years);

// Preparing data for the chart
const labels = Array.from({ length: parseInt(years) }, (_, i) => i + 1);
const data = [];
Expand Down

0 comments on commit 4506527

Please sign in to comment.