Feature: Welten-Wechsel per Mausrad auf Desktop (SW by-v657)

This commit is contained in:
rene 2026-05-03 20:36:19 +02:00
parent 5b73443d0a
commit 3344de27bb
4 changed files with 21 additions and 6 deletions

View file

@ -93,9 +93,9 @@
</script>
<!-- CSS: Reihenfolge ist wichtig — ?v= zwingt Browser zur Neuladung -->
<link rel="stylesheet" href="/css/design-system.css?v=656">
<link rel="stylesheet" href="/css/layout.css?v=656">
<link rel="stylesheet" href="/css/components.css?v=656">
<link rel="stylesheet" href="/css/design-system.css?v=657">
<link rel="stylesheet" href="/css/layout.css?v=657">
<link rel="stylesheet" href="/css/components.css?v=657">
</head>
<body>
@ -562,7 +562,7 @@
<script src="/js/api.js?v=94"></script>
<script src="/js/ui.js?v=94"></script>
<script src="/js/app.js?v=94"></script>
<script src="/js/worlds.js?v=656"></script>
<script src="/js/worlds.js?v=657"></script>
<!-- Feature-Seiten werden lazy geladen -->

View file

@ -3,7 +3,7 @@
Router, State-Management, Navigation, Initialisierung.
============================================================ */
const APP_VER = '656'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VER = '657'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VERSION = '1.3.0'; // ← semantische Version, wird bei make release gesetzt
const IS_STAGING = location.hostname === 'staging.banyaro.app';

View file

@ -127,6 +127,21 @@ window.Worlds = (() => {
_goTo(next, true);
if (next === 2 && !_weltInited) { _weltInited = true; _renderWelt(); }
});
// Mausrad-Navigation (Desktop)
let _wheelCooldown = false;
track.addEventListener('wheel', e => {
e.preventDefault();
if (_wheelCooldown) return;
const next = e.deltaX > 30 || e.deltaY > 30 ? Math.min(2, _cur + 1)
: e.deltaX < -30 || e.deltaY < -30 ? Math.max(0, _cur - 1)
: _cur;
if (next === _cur) return;
_wheelCooldown = true;
setTimeout(() => { _wheelCooldown = false; }, 500);
_goTo(next, true);
if (next === 2 && !_weltInited) { _weltInited = true; _renderWelt(); }
}, { passive: false });
}
function _goTo(idx, animated) {

View file

@ -3,7 +3,7 @@
Offline-Cache + Push Notifications + Tile-Cache
============================================================ */
const CACHE_VERSION = 'by-v656';
const CACHE_VERSION = 'by-v657';
const CACHE_STATIC = `${CACHE_VERSION}-static`;
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache