clone

an endless marble-race generator in the browser; the url is the seed, so every track can be shared

Initial commit: seeded emergent marble-track generator (M1)

Dami committed 58f9545
Deno + Three.js webapp assembling closed-circuit marble runs from Kenney's
CC0 Marble Kit, with the Nature Kit as a setting/decor layer.

- URL fragment is the seed; hashchange is the single regeneration entry
  point, so browser history replays tracks deterministically
- Label-derived RNG families (cyrb128 + sfc32) per system; adding systems
  never perturbs existing seeds (pinned by tests)
- Systems: topology (closed ring by construction), elevation (0.5-grid
  hills, climbs capped at 0.5/cell, steep chutes descent-only), style
  themes, Nature Kit setting rules, decor
- Realization: WFC over the path domain (piece windows on the ring,
  min-entropy collapse, occupancy vetoes, contradiction-free fallbacks)
- Geometry-calibrated piece registry measured from the GLBs; tunnel
  modeled as arch shell overlaying a straight; turn pillars snap to the
  channel centerline
- Pack-generic asset pipeline (gltf-transform): merged + deduped GLB and
  classification manifest per kit, committed under assets/
- Client: single-fetch loading, palette swaps, spline-follow marble with
  rolling, orbit/follow cams, ?gallery + ?debug pages, CUA test hooks
- 42 deno tests: fuzz, determinism, registry lint, golden seeds
commit
58f95459ae90bb4918ae47d2bcb833c9f201f79e
author
Dami <dami.etoile@gmail.com>
44 files changed, +22299 -0
M.gitignore3+
MREADME.md69+
Massets/marble-kit.glbbin
Massets/marble-kit.manifest.json5681+++++++++++++++
Massets/nature-kit.glbbin
Massets/nature-kit.manifest.json11526++++++++++++++++++++++++++++++
Massets/textures/variation-a.pngbin
Massets/textures/variation-b.pngbin
Massets/textures/variation-c.pngbin
Mdeno.json34+
Mdeno.lock397+
Mprogress.md67+
Msrc/client/assets.ts162+
Msrc/client/camera.ts151+
Msrc/client/centerline.ts83+
Msrc/client/cua.ts42+
Msrc/client/main.ts287+
Msrc/client/marble.ts109+
Msrc/client/scene.ts83+
Msrc/client/seed.ts68+
Msrc/client/track.ts119+
Msrc/gen/assemble.ts230+
Msrc/gen/decor.ts258+
Msrc/gen/elevation.ts177+
Msrc/gen/generateTrack.ts87+
Msrc/gen/geom.ts206+
Msrc/gen/registry.ts514+
Msrc/gen/rng.ts136+
Msrc/gen/style.ts93+
Msrc/gen/topology.ts149+
Msrc/gen/validate.ts65+
Msrc/gen/wfc.ts182+
Msrc/server/main.ts62+
Msrc/shared/classify.ts100+
Msrc/shared/types.ts119+
Mstatic/index.html46+
Mtests/classify_test.ts151+
Mtests/golden_tracks.json5+
Mtests/manifest_test.ts106+
Mtests/registry_test.ts48+
Mtests/rng_test.ts117+
Mtests/track_test.ts102+
Mtools/import_assets.ts96+
Mtools/lib/pack.ts369+
M .gitignore +3 -0

Diff not shown: this commit changes too many lines.

M README.md +69 -0

Diff not shown: this commit changes too many lines.

M assets/marble-kit.glb +0 -0

Diff not shown: this commit changes too many lines.

M assets/marble-kit.manifest.json +5681 -0

Diff not shown: this commit changes too many lines.

M assets/nature-kit.glb +0 -0

Diff not shown: this commit changes too many lines.

M assets/nature-kit.manifest.json +11526 -0

Diff not shown: this commit changes too many lines.

M assets/textures/variation-a.png +0 -0

Diff not shown: this commit changes too many lines.

M assets/textures/variation-b.png +0 -0

Diff not shown: this commit changes too many lines.

M assets/textures/variation-c.png +0 -0

Diff not shown: this commit changes too many lines.

M deno.json +34 -0

Diff not shown: this commit changes too many lines.

M deno.lock +397 -0

Diff not shown: this commit changes too many lines.

M progress.md +67 -0

Diff not shown: this commit changes too many lines.

M src/client/assets.ts +162 -0

Diff not shown: this commit changes too many lines.

M src/client/camera.ts +151 -0

Diff not shown: this commit changes too many lines.

M src/client/centerline.ts +83 -0

Diff not shown: this commit changes too many lines.

M src/client/cua.ts +42 -0

Diff not shown: this commit changes too many lines.

M src/client/main.ts +287 -0

Diff not shown: this commit changes too many lines.

M src/client/marble.ts +109 -0

Diff not shown: this commit changes too many lines.

M src/client/scene.ts +83 -0

Diff not shown: this commit changes too many lines.

M src/client/seed.ts +68 -0

Diff not shown: this commit changes too many lines.

M src/client/track.ts +119 -0

Diff not shown: this commit changes too many lines.

M src/gen/assemble.ts +230 -0

Diff not shown: this commit changes too many lines.

M src/gen/decor.ts +258 -0

Diff not shown: this commit changes too many lines.

M src/gen/elevation.ts +177 -0

Diff not shown: this commit changes too many lines.

M src/gen/generateTrack.ts +87 -0

Diff not shown: this commit changes too many lines.

M src/gen/geom.ts +206 -0

Diff not shown: this commit changes too many lines.

M src/gen/registry.ts +514 -0

Diff not shown: this commit changes too many lines.

M src/gen/rng.ts +136 -0

Diff not shown: this commit changes too many lines.

M src/gen/style.ts +93 -0

Diff not shown: this commit changes too many lines.

M src/gen/topology.ts +149 -0

Diff not shown: this commit changes too many lines.

M src/gen/validate.ts +65 -0

Diff not shown: this commit changes too many lines.

M src/gen/wfc.ts +182 -0

Diff not shown: this commit changes too many lines.

M src/server/main.ts +62 -0

Diff not shown: this commit changes too many lines.

M src/shared/classify.ts +100 -0

Diff not shown: this commit changes too many lines.

M src/shared/types.ts +119 -0

Diff not shown: this commit changes too many lines.

M static/index.html +46 -0

Diff not shown: this commit changes too many lines.

M tests/classify_test.ts +151 -0

Diff not shown: this commit changes too many lines.

M tests/golden_tracks.json +5 -0

Diff not shown: this commit changes too many lines.

M tests/manifest_test.ts +106 -0

Diff not shown: this commit changes too many lines.

M tests/registry_test.ts +48 -0

Diff not shown: this commit changes too many lines.

M tests/rng_test.ts +117 -0

Diff not shown: this commit changes too many lines.

M tests/track_test.ts +102 -0

Diff not shown: this commit changes too many lines.

M tools/import_assets.ts +96 -0

Diff not shown: this commit changes too many lines.

M tools/lib/pack.ts +369 -0

Diff not shown: this commit changes too many lines.