Skip to content

Commit f7b0b45

Browse files
committed
improve fancy title
1 parent 3712069 commit f7b0b45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/FancyTitle.astro

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ const [top, middle, bottom] = colors
9595
console.log(mouseX, mouseY, distance)
9696

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

0 commit comments

Comments
 (0)