From f5f0cbc095b65d3dcbe03124d7f2ec5139d74cce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Tonh=C3=A4user?= Date: Wed, 17 Jun 2026 23:25:13 +0200 Subject: [PATCH] feat: Maus-Parallaxe und finaler Akzeptanz-Check des Auto-Players --- public/custom/auto-player.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/custom/auto-player.js b/public/custom/auto-player.js index d2e670f..9b9df51 100644 --- a/public/custom/auto-player.js +++ b/public/custom/auto-player.js @@ -150,6 +150,12 @@ var img = f.querySelector('img'); if (img && img.naturalHeight > img.naturalWidth) f.classList.add('hochformat'); }); + if (window.matchMedia('(pointer: fine)').matches) { + window.addEventListener('mousemove', function (e) { + mausX = (e.clientX / window.innerWidth - 0.5) * 2; // -1..1 + mausY = (e.clientY / window.innerHeight - 0.5) * 2; + }); + } document.body.style.overflow = 'hidden'; window.addEventListener('wheel', sperren, false); window.addEventListener('touchmove', sperren, false);