diff --git a/app.js b/app.js
index bd531d25..6e855287 100644
--- a/app.js
+++ b/app.js
@@ -151,6 +151,28 @@ function animate() {
animate();
+// === DEBUG MODE ===
+let debugMode = false;
+
+document.getElementById('debug-toggle').addEventListener('click', () => {
+ debugMode = !debugMode;
+ document.getElementById('debug-toggle').style.backgroundColor = debugMode
+ ? 'var(--color-text-muted)'
+ : 'var(--color-secondary)';
+ console.log(`Debug mode ${debugMode ? 'enabled' : 'disabled'}`);
+
+ if (debugMode) {
+ // Example: Visualize all collision boxes and light sources
+ // Replace with actual logic when available
+ document.querySelectorAll('.collision-box').forEach(el => el.style.outline = '2px solid red');
+ document.querySelectorAll('.light-source').forEach(el => el.style.outline = '2px dashed yellow');
+ } else {
+ document.querySelectorAll('.collision-box, .light-source').forEach(el => {
+ el.style.outline = 'none';
+ });
+ }
+});
+
// === WEBSOCKET CLIENT ===
import { wsClient } from './ws-client.js';
diff --git a/index.html b/index.html
index ed8f8bd6..2006413b 100644
--- a/index.html
+++ b/index.html
@@ -30,6 +30,9 @@
+
diff --git a/style.css b/style.css
index d002c01f..948c9163 100644
--- a/style.css
+++ b/style.css
@@ -55,3 +55,18 @@ canvas {
#audio-toggle.muted {
background-color: var(--color-text-muted);
}
+
+/* === DEBUG MODE === */
+#debug-toggle {
+ margin-left: 8px;
+}
+
+.collision-box {
+ outline: 2px solid red;
+ outline-offset: 2px;
+}
+
+.light-source {
+ outline: 2px dashed yellow;
+ outline-offset: 2px;
+}