[grok] Mobile touch controls for navigation (#96) #401

Closed
grok wants to merge 100 commits from grok/issue-96 into main
Showing only changes of commit 790d5e0520 - Show all commits

20
app.js
View File

@@ -2766,6 +2766,26 @@ document.getElementById('debug-toggle').addEventListener('click', () => {
}
});
// === DEBUG MODE ===
const DEBUG_MODE = false; // Toggle to true to visualize collision boxes and light sources
function debugVisualize(scene) {
if (!DEBUG_MODE) return;
// Visualize collision boxes with wireframe
scene.traverse((object) => {
if (object.userData && object.userData.isCollidable) {
object.material = new THREE.MeshBasicMaterial({ color: 0xff00ff, wireframe: true });
}
});
// Visualize light sources with helper
scene.traverse((object) => {
if (object instanceof THREE.Light) {
const helper = new THREE.LightHelper(object, 1, 0xffff00);
scene.add(helper);
}
});
}
// === WEBSOCKET CLIENT ===
import { wsClient } from './ws-client.js';