Switch up parallax direction

This commit is contained in:
august kline 2024-08-25 22:47:42 -04:00
parent ffac62132f
commit 99d6e12dae
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ let setImages = () => {
const root = document.documentElement; const root = document.documentElement;
const onMove = (ev: MouseEvent) => { const onMove = (ev: MouseEvent) => {
let rotateY = `${(ev.clientX - window.innerWidth / 2) * 0.005}deg`; let rotateY = `${-(ev.clientX - window.innerWidth / 2) * 0.005}deg`;
let rotateX = `${(ev.clientY - window.innerHeight / 2) * 0.005}deg`; let rotateX = `${(ev.clientY - window.innerHeight / 2) * 0.005}deg`;
root.style.setProperty("--rotate-x", rotateX); root.style.setProperty("--rotate-x", rotateX);
root.style.setProperty("--rotate-y", rotateY); root.style.setProperty("--rotate-y", rotateY);