/* ============================================================================= * SZL Holdings — Canonical Mobile Controls (szl-mobile-controls.js) * ----------------------------------------------------------------------------- * Vanilla JS (zero deps). iOS-Safari-first touch layer for Three.js scenes. * ADDITIVE: never removes desktop WASD/pointer-lock. Mobile is an OR layer. * * Features: * - Left thumb virtual joystick (40px radius) -> normalized {x,y} move vector * - Right-half drag-anywhere -> camera yaw + pitch (look delta, consumed/frame) * - Two-finger pinch -> FOV zoom delta * - Tap "Enter" -> activate scene WITHOUT pointer lock; "Exit" -> leave * - Mobile detect: ('ontouchstart' in window) || navigator.maxTouchPoints > 0 * - 100dvh / --vh CSS var fix for the iOS URL-bar viewport bug * - prefers-reduced-motion honored (exposed flag) * - aria-labels on every interactive control; -webkit-tap-highlight cleared * * Usage (in your app.js): * import { SZLMobileControls } from './szl-mobile-controls.js'; // or window.SZLMobileControls if loaded via