From 99d6e12dae9b073dc7b9687357bcb33cb1b911a9 Mon Sep 17 00:00:00 2001 From: august kline Date: Sun, 25 Aug 2024 22:47:42 -0400 Subject: [PATCH] Switch up parallax direction --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index c4691d9..0e4adde 100644 --- a/src/main.ts +++ b/src/main.ts @@ -125,7 +125,7 @@ let setImages = () => { const root = document.documentElement; 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`; root.style.setProperty("--rotate-x", rotateX); root.style.setProperty("--rotate-y", rotateY);