Skip to content

Commit

Permalink
improve fancy title
Browse files Browse the repository at this point in the history
  • Loading branch information
vdawg-git committed May 3, 2024
1 parent 3712069 commit f7b0b45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/FancyTitle.astro
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ const [top, middle, bottom] = colors
console.log(mouseX, mouseY, distance)

top.style.transform = `translate(${(Math.sin(mouseX / 60) * offset) / 2}px, ${(Math.sin(mouseY / 60) * offset) / 2}px)`
middle.style.transform = `translate(${Math.sin(mouseX / 50) * offset}px, ${Math.sin(mouseY / 50) * offset}px)`
bottom.style.transform = `translate(${Math.sin(mouseX / 40) * offset}px, ${Math.sin(mouseY / 40) * offset}px)`
middle.style.transform = `translate(${Math.sin(mouseX / 50) * offset + 8}px, ${Math.sin(mouseY / 50) * offset + 8}px)`
bottom.style.transform = `translate(${Math.sin(mouseX / 40) * offset + 16}px, ${Math.sin(mouseY / 40) * offset + 16}px)`
}
}

Expand Down

0 comments on commit f7b0b45

Please sign in to comment.