50 lines
1.8 KiB
HTML
50 lines
1.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Horror Game</title>
|
|
<link rel="stylesheet" href="style.css">
|
|
<script>
|
|
window.onerror = function (msg, url, lineNo, columnNo, error) {
|
|
const logDiv = document.getElementById('debug-log');
|
|
if (logDiv) {
|
|
logDiv.style.display = 'block';
|
|
logDiv.innerHTML += `<div style="color:red; background:white">CRITICAL: ${msg} [Line: ${lineNo}]</div>`;
|
|
}
|
|
return false;
|
|
};
|
|
window.test2D = function () {
|
|
const c = document.createElement('canvas');
|
|
c.width = 50; c.height = 50;
|
|
c.style.position = 'fixed'; c.bottom = '0'; c.right = '0'; c.zIndex = '10001';
|
|
document.body.appendChild(c);
|
|
const ctx = c.getContext('2d');
|
|
ctx.fillStyle = 'red'; ctx.fillRect(0, 0, 50, 50);
|
|
};
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="game-container"></div>
|
|
|
|
<div id="ui-layer">
|
|
<div id="start-screen">
|
|
<h1>ECHOES</h1>
|
|
<p>Click to Start</p>
|
|
<p class="controls">WASD to Move | Mouse to Look | F Flashlight | P Debug</p>
|
|
</div>
|
|
<div id="hud" style="display: none;">
|
|
<div id="battery">Battery: <span id="battery-level">100%</span></div>
|
|
</div>
|
|
<div id="debug-log"
|
|
style="position: absolute; top: 10px; left: 10px; z-index: 10000; color: lime; font-family: monospace; pointer-events: none; background: rgba(0,0,0,0.8); max-height: 80%; overflow-y: auto; font-size: 14px; padding: 10px; width: 300px; display: block;">
|
|
<div>> Logger Initialized</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="module" src="/src/main.js"></script>
|
|
</body>
|
|
|
|
</html> |