-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug.html
More file actions
98 lines (84 loc) · 3 KB
/
Copy pathdebug.html
File metadata and controls
98 lines (84 loc) · 3 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WynIsBuff2 Debug</title>
<style>
body {
margin: 0;
padding: 20px;
font-family: Arial, sans-serif;
background: #222;
color: #fff;
}
#debug-info {
margin-bottom: 20px;
padding: 10px;
background: #333;
border-radius: 5px;
}
#game-container {
border: 2px solid #555;
}
</style>
</head>
<body>
<div id="debug-info">
<h3>WynIsBuff2 Debug Information</h3>
<div id="status">Loading...</div>
</div>
<div id="game-container"></div>
<script type="module">
const statusDiv = document.getElementById('status');
function updateStatus(message) {
console.log('[Debug]', message);
statusDiv.innerHTML += '<br>' + message;
}
updateStatus('Starting debug checks...');
// Test if Phaser can be imported
try {
updateStatus('Testing Phaser import...');
const { Scene } = await import('phaser');
updateStatus('✅ Phaser imported successfully');
updateStatus('Phaser version: ' + Phaser.VERSION);
// Create minimal test scene
class DebugScene extends Scene {
constructor() {
super({ key: 'DebugScene' });
}
create() {
updateStatus('✅ DebugScene created successfully!');
// Add visible elements
this.add.rectangle(400, 300, 800, 600, 0x00ff00, 0.2);
this.add.text(400, 300, 'DEBUG SCENE WORKING!', {
fontSize: '32px',
color: '#ffffff'
}).setOrigin(0.5);
this.add.text(400, 350, 'If you see this, Phaser is working', {
fontSize: '16px',
color: '#ffff00'
}).setOrigin(0.5);
}
}
// Minimal Phaser config
const config = {
type: Phaser.AUTO,
width: 800,
height: 600,
parent: 'game-container',
backgroundColor: '#4488ff',
scene: [DebugScene]
};
updateStatus('Creating Phaser game instance...');
const game = new Phaser.Game(config);
game.events.on('ready', () => {
updateStatus('✅ Phaser game ready event fired!');
});
} catch (error) {
updateStatus('❌ Error: ' + error.message);
updateStatus('Stack: ' + error.stack);
}
</script>
</body>
</html>