forked from wrenn/wrenn
Remove redundant comments from login page glow animation
This commit is contained in:
@ -35,7 +35,7 @@
|
|||||||
let targetY = 50;
|
let targetY = 50;
|
||||||
let rafId: number | null = null;
|
let rafId: number | null = null;
|
||||||
|
|
||||||
const LERP_FACTOR = 0.04; // lower = more drag
|
const LERP_FACTOR = 0.04;
|
||||||
|
|
||||||
function lerpLoop() {
|
function lerpLoop() {
|
||||||
const dx = targetX - glowX;
|
const dx = targetX - glowX;
|
||||||
@ -58,7 +58,6 @@
|
|||||||
const normX = (e.clientX - rect.left) / rect.width;
|
const normX = (e.clientX - rect.left) / rect.width;
|
||||||
const normY = (e.clientY - rect.top) / rect.height;
|
const normY = (e.clientY - rect.top) / rect.height;
|
||||||
|
|
||||||
// Invert: mouse goes right → glow goes left
|
|
||||||
targetX = 55 - normX * 10;
|
targetX = 55 - normX * 10;
|
||||||
targetY = 55 - normY * 10;
|
targetY = 55 - normY * 10;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user