KittenKatja
Well-Known Coder
I got
but the values are anything but inside the 0 to 100% range.
I have also switched around the equation a lot.
JavaScript:
addEventListener(
"mousemove",
() => {
let x = event.screenX / 100 * window.innerWidth;
let y = event.screenY / 100 * window.innerHeight;
let a = document.documentElement.style;
a.setProperty("--mouseX", x + "%");
a.setProperty("--mouseY", y + "%");
}
)
I have also switched around the equation a lot.
