Phase 0+1 of the browser viz effort: - core: drop unused `rand` dep (removes getrandom/libc → clean wasm32 build); derive serde on DungeonConfig + 5 sub-configs so the bridge can (de)serialize - reikhelm-wasm: thin wasm-bindgen cdylib exposing generate(seed, config_json) -> JSON envelope (tiles as int codes, regions, edges, per-pass snapshots) and default_config_json(); holds no generation logic - workspace: add reikhelm-wasm member; default-members keeps host cargo test/clippy on core+viz only - reikhelm-web: vanilla-JS + Canvas 2D renderer running the real core live in the browser. Atmospheric look — lit stone floor, raised stone walls with rim-lit carved edges + top bevel, room light-pooling, amber door thresholds, vignette. Controls: seed/reroll, 9 config sliders, stage scrubber, semantic overlays (region outlines / graph / grid). window.reikhelm hooks for Playwright-driven iteration. Core stays 115 tests green. Driven + screenshotted via Playwright MCP. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
36 lines
892 B
HTML
36 lines
892 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>reikhelm · dungeon playground</title>
|
|
<link rel="stylesheet" href="style.css">
|
|
</head>
|
|
<body>
|
|
<main id="stage-area">
|
|
<canvas id="view"></canvas>
|
|
</main>
|
|
|
|
<aside id="sidebar">
|
|
<h1>reikhelm</h1>
|
|
<p class="sub">procedural dungeon · live WASM core</p>
|
|
|
|
<div id="readout">
|
|
<div id="stats">generating…</div>
|
|
<div id="err"></div>
|
|
</div>
|
|
|
|
<div id="controls"></div>
|
|
|
|
<div id="stage-wrap" class="row stage">
|
|
<label>stage</label>
|
|
<input type="range" id="stage" min="0" max="0" step="1" value="0">
|
|
<span class="val" id="stage-label">—</span>
|
|
</div>
|
|
|
|
<p class="hint">R reroll · ←/→ scrub stages</p>
|
|
</aside>
|
|
|
|
<script type="module" src="main.js"></script>
|
|
</body>
|
|
</html>
|