SPRINT2 §Lane A steps 1-4. The placeholder capsule and stub wind are gone; every lane's proven module now runs in one yard. Wind goes through a router. Every consumer binds to `wind` exactly once at construction — the yard closes over it for tree sway, createPlayer takes it in opts, createDebris reads its event stream — so swapping storm_01 for storm_02 at the phase change has to be a re-point, not a re-wire, or half the game would still be sampling a calm day while the other half is in a gale. Shelters apply to every storm, since the trees don't stop existing when the weather turns. skyfx is rebuilt rather than re-pointed: it reads the storm's sky block at construction. Verified its dispose() hands world.sun/world.hemi back exactly (2.0/1.8 after a 40 s storm had them at 1.07/1.13) and that nothing compounds over repeated phase cycles — that was Lane C's §Lane C.5 ask. Two seams needed care. createSailView reads rig.pos/rig.tris, which don't exist until attach() allocates them, and a re-rig can change the grid — so rigSail() is the one door both boot and Lane B's picking adapter come through, rebuilding the view and re-wiring interact (whose targets close over a corners array that attach() replaces). And knockdown(t, dirX, dirZ) takes the sim clock first, not the impact: passing debris impact there would jam ~40 into the state machine's start time and the player would never get up. Storm_02 verified end to end by hand: the carabiner blows at t=45.4 s, and p2's shackle cascades at t=56 s — one second after the southerly change. Coverage over the bed is 1.0 intact and 0 once two corners are gone, which is the whole game in one number. 0.63 ms/frame (0.17 sim + 0.45 render) against a 16.67 ms budget. Selftest 121/0/0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
49 lines
1.7 KiB
HTML
49 lines
1.7 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
<title>SHADES — yard (M0)</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>
|
|
<div id="help">WASD move · shift run · RMB drag orbit · wheel zoom · Enter next phase</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>
|