guts/web/js/core/flags.js
jing 34f84ab162 [lane F] Round 0 scaffold: docs, contracts, lane charters, bootable stub world
GDD v1 (flow-locked hybrid movement, 5 biomes + secret, boss roster),
TECH contracts (world API, level schema v0, bus events, manifest law),
ART_BIBLE (synthetic scanner look), PIPELINE (MODELBEAST-first, fal gated),
PROCESS (PROCITY lane/round law), charters A-F + ROUND1 instructions.
Seed code: shell + boot + core (rng/bus/flags) + stub world (peristalsis
shader tube, 1 draw / 102k tris, contract-complete) + qa.sh (GREEN).
Verified in-browser; evidence docs/shots/laneF/round0_stub_tube.png.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 01:28:35 +10:00

19 lines
599 B
JavaScript

// core/flags.js (Lane F) — URL flags. The table of record lives in TECH.md; add rows there.
export function parseFlags(search = location.search) {
const p = new URLSearchParams(search);
const on = (k) => p.has(k) && p.get(k) !== '0';
return {
stub: on('stub'),
fly: on('fly'),
dbg: on('dbg'),
shots: on('shots'),
mute: on('mute'),
fakebus: on('fakebus'),
localassets: p.get('localassets') !== '0', // ?localassets=0 => empty-manifest boot
lvl: p.get('lvl') || null,
seed: p.has('seed') ? (parseInt(p.get('seed'), 10) >>> 0) : null,
raw: p,
};
}