diffs / #5
feat(#5): neon sign
Requested-by: SEED (built by us pre-launch)
+ BUILD+ UNIT TESTS+ LINT+ DIFF GATE+ PAGE CLASSIFIER+ PLAYWRIGHT
src/features/neon.jsNEW+19 −0
| 1 | +// Seed #5: the neon sign over the lobby cabinets. It buzzes off for a beat now and then. | ||
| 2 | +import { PAL } from "../palette.js"; | ||
| 3 | +const GLYPH = { A: ["010", "101", "111", "101", "101"], R: ["110", "101", "110", "101", "101"], C: ["011", "100", "100", "100", "011"], D: ["110", "101", "101", "101", "110"], E: ["111", "100", "110", "100", "111"] }; | ||
| 4 | +export default { | ||
| 5 | + id: "neon", | ||
| 6 | + order: 5, | ||
| 7 | + layer: "mid", | ||
| 8 | + rooms: ["lobby"], | ||
| 9 | + draw(g, w) { | ||
| 10 | + const on = w.reduced || Math.sin(w.t * 0.9) > -0.92; | ||
| 11 | + const word = "ARCADE"; let x = 112; | ||
| 12 | + g.fillStyle = PAL.ink; g.fillRect(104, 42, 112, 30); | ||
| 13 | + for (const ch of word) { | ||
| 14 | + const rows = GLYPH[ch]; | ||
| 15 | + for (let y = 0; y < 5; y++) for (let i = 0; i < 3; i++) if (rows[y][i] === "1") { g.fillStyle = on ? PAL.pizza : PAL.winOff; g.fillRect(x + i * 4, 48 + y * 4, 3, 3); } | ||
| 16 | + x += 16; | ||
| 17 | + } | ||
| 18 | + }, | ||
| 19 | +}; |
1+// Seed #5: the neon sign over the lobby cabinets. It buzzes off for a beat now and then.
2+import { PAL } from "../palette.js";
3+const GLYPH = { A: ["010", "101", "111", "101", "101"], R: ["110", "101", "110", "101", "101"], C: ["011", "100", "100", "100", "011"], D: ["110", "101", "101", "101", "110"], E: ["111", "100", "110", "100", "111"] };
4+export default {
5+ id: "neon",
6+ order: 5,
7+ layer: "mid",
8+ rooms: ["lobby"],
9+ draw(g, w) {
10+ const on = w.reduced || Math.sin(w.t * 0.9) > -0.92;
11+ const word = "ARCADE"; let x = 112;
12+ g.fillStyle = PAL.ink; g.fillRect(104, 42, 112, 30);
13+ for (const ch of word) {
14+ const rows = GLYPH[ch];
15+ for (let y = 0; y < 5; y++) for (let i = 0; i < 3; i++) if (rows[y][i] === "1") { g.fillStyle = on ? PAL.pizza : PAL.winOff; g.fillRect(x + i * 4, 48 + y * 4, 3, 3); }
16+ x += 16;
17+ }
18+ },
19+};


CI log tail
$ ci:build (880 ms, exit 0) $ ci:test (193 ms, exit 0) TAP version 13 # Subtest: palette: valid hex, at most 40 colours ok 1 - palette: valid hex, at most 40 colours --- duration_ms: 0.72132 type: 'test' ... # Subtest: sprites: rectangular-ish rows of known keys ok 2 - sprites: rectangular-ish rows of known keys --- duration_ms: 2.248049 type: 'test' ... # Subtest: levels: every room has a name, platforms and a draw function ok 3 - levels: every room has a name, platforms and a draw function --- duration_ms: 5.899996 type: 'test' ... # Subtest: bosses: every file exports a class with update/draw ok 4 - bosses: every file exports a class with update/draw --- duration_ms: 1.068852 type: 'test' ... # Subtest: features: default export with a unique id and only known hooks ok 5 - features: default export with a unique id and only known hooks --- duration_ms: 1.651432 type: 'test' ... # Subtest: no network, storage or parent access anywhere in src ok 6 - no network, storage or parent access anywhere in src --- duration_ms: 3.463986 type: 'test' ... 1..6 # tests 6 # suites 0 # pass 6 # fail 0 # cancelled 0 # skipped 0 # todo 0 # duration_ms 128.74907 $ ci:lint (732 ms, exit 0) $ playwright 960x540 fps 60 long tasks 0 console errors 0