-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug-console.html
More file actions
45 lines (38 loc) · 1.73 KB
/
Copy pathdebug-console.html
File metadata and controls
45 lines (38 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Engine Debug with Console</title>
<style>body { background: #222; color: white; padding: 20px; font-family: monospace; }</style>
</head>
<body>
<h1>Engine Debug with Console Output</h1>
<p>Check the browser console for detailed logs!</p>
<div id="output"></div>
<script type="module">
const output = document.getElementById('output');
try {
output.innerHTML += '<p>Check console for detailed logs...</p>';
// Import the debug version
const EngineModule = await import('../src/engine-debug.js');
output.innerHTML += '<p>✅ Debug engine module imported</p>';
// Create canvas
const canvas = document.createElement('canvas');
canvas.width = 800;
canvas.height = 600;
output.innerHTML += '<p>✅ Canvas created</p>';
// Create engine with debug logging
console.log('=== Starting Engine Creation ===');
const engine = new EngineModule.Engine(canvas);
console.log('=== Engine Creation Complete ===');
console.log('Final engine.camera:', engine.camera);
output.innerHTML += '<p>✅ Engine created (check console)</p>';
output.innerHTML += '<p>Camera final state: ' + (engine.camera ? '✅ Found' : '❌ Still undefined') + '</p>';
} catch (error) {
output.innerHTML += '<p>❌ Error: ' + error.message + '</p>';
console.error('Debug failed:', error);
}
</script>
</body>
</html>