feat: Maus-Parallaxe und finaler Akzeptanz-Check des Auto-Players

This commit is contained in:
Leon Tonhäuser committed 2026-06-17 23:25:13 +02:00
1 parent 8f0ddcd5c6
commit f5f0cbc095
1 file changed
+6
+6
View File
@@ -150,6 +150,12 @@
var img = f.querySelector('img'); var img = f.querySelector('img');
if (img && img.naturalHeight > img.naturalWidth) f.classList.add('hochformat'); 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'; document.body.style.overflow = 'hidden';
window.addEventListener('wheel', sperren, false); window.addEventListener('wheel', sperren, false);
window.addEventListener('touchmove', sperren, false); window.addEventListener('touchmove', sperren, false);