HardYards/web/world/index.html

48 lines
1.6 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>HARD YARDS — rig it, then survive the night</title>
<style>
html, body { margin: 0; height: 100%; overflow: hidden; background: #9fc4dd; }
canvas { display: block; width: 100%; height: 100%; }
#dev, #help {
position: fixed; left: 10px;
font: 12px ui-monospace, SFMono-Regular, Menlo, monospace;
color: #eef4f8; text-shadow: 0 1px 2px #0009;
pointer-events: none; user-select: none;
}
#dev { top: 10px; }
#help { bottom: 10px; opacity: .75; }
#banner {
position: fixed; top: 38%; left: 0; right: 0;
text-align: center; pointer-events: none; user-select: none;
font: 700 42px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
letter-spacing: .18em; color: #fff; text-shadow: 0 2px 12px #0007;
opacity: 0; transition: opacity .45s ease;
}
</style>
</head>
<body>
<canvas id="c"></canvas>
<div id="banner"></div>
<div id="dev">booting…</div>
<script type="importmap">
{ "imports": { "three": "./vendor/three.module.js",
"three/addons/": "./vendor/addons/" } }
</script>
<script type="module">
import { boot } from './js/main.js';
// boot() is async now — it fetches two storm defs, the ped, the clip pack
// and Lane E's debris GLBs. Surface a failure on the page rather than
// letting it die as an unhandled rejection behind a blue screen.
boot().catch((err) => {
console.error(err);
document.getElementById('dev').textContent = `BOOT FAILED — ${err.message} (see console)`;
});
</script>
</body>
</html>