From 6416910498f69487218c29fa05579b0dc035e287 Mon Sep 17 00:00:00 2001 From: MiguelCarino Date: Thu, 22 Oct 2026 00:23:56 -0600 Subject: [PATCH] Fade the Moon's plain into its horizon, plate the help strip On the airless world the lit floor brightened with distance and cut hard to the black sky, printing a ruler-straight grey band at the horizon. The ramp now falls with depth (1 - 0.85 d^2), the base is lower and each pebble's own lum carries more of it, so the plain recedes and keeps its texture. Other worlds are byte-identical. The help strip took the world's light under the underpainting and read as dim letters on blotchy slabs. HUD cells now paint themselves: an even black plate, letter pixels at their own swatch, fading with the overlay through Compose.HUD, and the spill pass skips them. It also says 1-4 WORLD, since there are four. west-flicker's lum-mode comparison with the city is enforced on grids up to 200x60's cell count, where it was fitted; on larger grids it is printed as reported-not-enforced while the absolute backstops still hold. The browser always runs with the underpainting on, where the comparison is enforced at every size. --- CONTRACT.md | 19 ++++++++++----- README.md | 7 ++++-- index.html | 36 ++++++++++++++++----------- src/core.js | 55 +++++++++++++++++++++++++++++++++--------- src/elements/hud.js | 28 +++++++++++++++------ tools/west-flicker.cjs | 27 ++++++++++++++++++--- 6 files changed, 128 insertions(+), 44 deletions(-) diff --git a/CONTRACT.md b/CONTRACT.md index 618ac47..da485ef 100644 --- a/CONTRACT.md +++ b/CONTRACT.md @@ -321,15 +321,22 @@ already carries. WHAT THEY SAID WHEN THIS LANDED. All seven passed in all four modes but one: lum-mode west-flicker at 400x120 FAILS at 10.75 big steps a second against the 8.0 backstop (seed 3, every preset), and the untouched tree at 7425bb2 fails identically, so this is not the underpainting or the density work. It -is `west-wagon` alone — 1.50/s at 200 columns, 3.00/s at 300, 10.00/s at 360 — and the shipped band -reached 360 (main.js MAXC) with this note still open, so it was chased down in the fix pass. It was not the rim: it +is `west-wagon` alone — 1.50/s at 200 columns, 3.00/s at 300, 10.00/s at 360 — inside the band the +browser ships (main.js MAXC is 360), so it was chased down in the fix pass. It was not the rim: it was the BED, 27 fixed samples printing as a comb once the wagon spans more columns than that, with the teeth sliding a sub-cell phase as it moves; and then the team's legs, one cell wide at 25 m on a 400-column grid so a near and far leg crossed a lit road cell as two pulses. Both now scale by -frame.D (identical at 200 columns): 10.75/s -> 3.25/s, 3-20 Hz 3.93% -> 3.07%, backstops passed. It -STILL FAILS the comparative rule at 400x120 — 3.25/s against the city's own 2.75 x 1.15 = 3.16 — -and that residual is the legs crossing the road at all, a solid object passing once, not an -aliasing beat. Composite mode, the light actually emitted, is 0.00 big steps a second at both sizes. +frame.D (identical at 200 columns): 10.75/s -> 3.25/s, 3-20 Hz 3.93% -> 3.07%, backstops passed. The +comparative rule at 400x120 still reads over — 3.25/s against the city's own 2.75 x 1.15 = 3.16 — +and that residual is solid legs crossing a lit road cell at all, an object passing once, not an +aliasing beat. Composite mode, the light actually emitted, is 0.00 big steps a second at both sizes, +and the browser never runs in lum mode: Compose.UNDER is 1 and nothing at runtime sets it to 0. So, +by the owner's decision, LUM MODE JUDGES THE COMPARATIVE RULE ONLY UP TO THE GRID IT WAS FITTED ON, +200x60, counted in cells (12,000) and not per axis, so the 120x40 default is judged and so is a +wide short grid like 201x40. On a grid of more cells lum mode enforces the absolute backstops +(8.0/s, 9%) and the general-flash rule, and prints the comparison with both numbers and +`REPORTED, NOT ENFORCED` rather than skipping it. Composite mode is unchanged at every size: it +judges the project's absolute 1.0/s and 2% and prints its ratio, for the reason below. Flash area was 0.0% in every real run. Lightning passes with the underpainting on: on the composite (2026-10-21, after the composite model learned the pixel path's ink lift — see below) the strongest stroke is 0.9% of full scale above the held night frame at 200x60 and 1.1% at 400x120, its largest diff --git a/README.md b/README.md index 3ec9f3f..b62f95b 100644 --- a/README.md +++ b/README.md @@ -438,8 +438,11 @@ crossing the sunset; it is now a continuous plume, drawn far paler, so the cells occupied and only the sway moves them. Measured now, at a four-second window with the camera pinned: the frontier's own elements take a big step 1.50 times a second against the city's own 1.50, and carry 2.53% of full scale in the 3-20 Hz band against the city's 2.28% — the two worlds -are the same shape, which is what the gate was for. The Moon's own elements are 0.00/s and 0.00%, -because `vacuum` has every parameter at zero and there is nothing out there that modulates. Edo's +are the same shape, which is what the gate was for. That comparison is judged in lum mode only up +to the 200x60 grid it was fitted on, counted in cells; on a grid of more cells the absolute +backstops gate and the comparison is printed, not judged — `CONTRACT.md` has the numbers and the +reason. The Moon's own elements are 0.00/s and 0.00%, because `vacuum` has every parameter at +zero and there is nothing out there that modulates. Edo's are 0.75/s and 2.23%. With every element in a world switched on at once, which is context rather than a gate, the big-step rates are 4.75/s for the city, 7.25/s for the frontier, 0.25/s for the Moon and 1.50/s for Edo. The tumbleweed's roll rate and the cloud bars' drift were sized against diff --git a/index.html b/index.html index f5cbc04..27798bb 100644 --- a/index.html +++ b/index.html @@ -409,14 +409,17 @@ var CC = (function () { fld(Wc[i], Wh[i] ? Wl[i] : 0, wk, wd, a, Wh[i]); r[0] = q[0]; r[1] = q[1]; r[2] = q[2]; - var vis = kd === 3 && d < 0.1, op = vis ? 1 : kd === 3 && d < wd ? (c === SH || !wk ? 1 : (THIN[gc] ? 0.25 : 0.75) * (L < 24 ? L / 24 : 1)) : 0; - if (op && !vis) fld(c, L, wk && 3, d, (d - f0) / fs, gc); - else if (vis) q[0] = q[1] = q[2] = 0; + if (kd === 3 && d < 0.1) { + for (t = gc && d < 0.025 ? G * Compose.HUD * 200 / Math.max(p[0], p[1], p[2]) : 0, k = 0; k < 3; k++) u[o + k] = p[k] * t, sp[o + k] = 0; + continue; + } + var op = kd === 3 && d < wd ? (c === SH || !wk ? 1 : (THIN[gc] ? 0.25 : 0.75) * (L < 24 ? L / 24 : 1)) : 0; + if (op) fld(c, L, wk && 3, d, (d - f0) / fs, gc); - var rim = y && wk === 1 && Wk[i - C] === 0, e = S && !vis && wk && d < SKY_D && L > 90 && EM[c] ? (L - 90) / 165 * 0.7 : 0; + var rim = y && wk === 1 && Wk[i - C] === 0, e = S && wk && d < SKY_D && L > 90 && EM[c] ? (L - 90) / 165 * 0.7 : 0; var hk = wk && L ? (EM[c] ? 1.7 : 1.25) * L / 255 : 0; - var mf = sun && kd ? sun * (kd === 2 ? (0.32 + 0.2 * L / 255) * (0.6 + 0.4 * (wd < FE ? wd / FE : 1)) : 0.43 * L / 255) : 0; + var mf = sun && kd ? sun * (kd === 2 ? (0.18 + 0.16 * L / 255) * (wd < FE ? (t = wd / FE, 1 - 0.85 * t * t) : 0.15) : 0.43 * L / 255) : 0; for (k = 0; k < 3; k++) { v = r[k] + (op ? (q[k] - r[k]) * op : 0); if (rim) v = Math.max(v, Z[k + 6] * 0.9); @@ -437,7 +440,7 @@ var CC = (function () { bs = sp.subarray(a0, a1), bp = tp.subarray(a0, a1), bq = tq.subarray(a0, a1); hbox(bs, bp, Rb, C, h1); hbox(bp, bq, Rb, C, h2); vbox(bq, bp, Rb, C3, v1); vbox(bp, bq, Rb, C3, v2); - for (i = y0 * C, j = a0; i < (y1 + 1) * C; i++, j += 3) if (tq[j] + tq[j + 1] + tq[j + 2] > 0.02 / A) { + for (i = y0 * C, j = a0; i < (y1 + 1) * C; i++, j += 3) if (tq[j] + tq[j + 1] + tq[j + 2] > 0.02 / A && !(fk[i] === 3 && fd[i] < 0.1)) { p = PALETTE[fc[i]]; b = Wk[i] && fh[i] ? (EM[fc[i]] ? 1.7 : 1.25) * fl[i] / 255 : 0; for (k = 0; k < 3; k++) if ((t = tq[j + k] * A) > 0.02) { pc = p[k]; v = 1 - sp[j + k] / (pc + 1); v *= v * t; v = 72 * v / (v + 72); @@ -462,7 +465,8 @@ var CC = (function () { f.uon = !!Compose.UNDER; }, world: world, - UNDER: 1 + UNDER: 1, + HUD: 1 }; var PAVE = 2.15; @@ -4325,6 +4329,8 @@ W("surf_west.js"); function textW(s) { return s.length * CW - 1; } + function gap(f, x, y, a) { plate(f, x, y, a); return x + CW; } + var PSEED = 1471; function plate(f, x, y, a) { @@ -4357,8 +4363,8 @@ W("surf_west.js"); var TIERS = [ ['WASD MOVE', 'DRAG LOOK'], - ['WASD MOVE SHIFT RUN', 'DRAG LOOK 1-3 WORLD T TIME'], - ['WASD MOVE SHIFT RUN C CROUCH', 'DRAG LOOK 1-3 WORLD T TIME Y HOLD N SEED'] + ['WASD MOVE SHIFT RUN', 'DRAG LOOK 1-4 WORLD T TIME'], + ['WASD MOVE SHIFT RUN C CROUCH', 'DRAG LOOK 1-4 WORLD T TIME Y HOLD N SEED'] ]; var TOUCH = [ @@ -4403,6 +4409,8 @@ W("surf_west.js"); draw: function (f, cam, t) { if (!CC.Control || !CC.Control.hintAlpha) return; var a = CC.Control.hintAlpha(t); + + if (CC.Compose) CC.Compose.HUD = a; if (a <= 0.01) return; var cols = f.cols, rows = f.rows; if (cols < MIN_COLS) return; @@ -4429,28 +4437,28 @@ W("surf_west.js"); if (sl < 1) return; var x = MARGIN_X; - if (paused) x = text(f, 'PAUSED', x, y, WHITE, sl, a) + CW; + if (paused) x = gap(f, text(f, 'PAUSED', x, y, WHITE, sl, a), y, a); else if (mode) { - x = text(f, 'MANUAL', x, y, WHITE, sl, a) + CW; + x = gap(f, text(f, 'MANUAL', x, y, WHITE, sl, a), y, a); if (tier > 0) { var d = Math.round(this.spd); if (!(d > 0)) d = 0; else if (d > 9) d = 9; x = text(f, this.dig[d], x, y, SLATE, kl, a); - x = text(f, 'M/S', x, y, SLATE, kl, a) + CW; + x = gap(f, text(f, 'M/S', x, y, SLATE, kl, a), y, a); } } if (tier > 0 && CC.World && CC.World.name) { var wn = CC.World.name; - if (x + textW(wn) + CW + 44 <= cols - MARGIN_X) x = text(f, wn, x, y, SLATE, kl, a) + CW; + if (x + textW(wn) + CW + 44 <= cols - MARGIN_X) x = gap(f, text(f, wn, x, y, SLATE, kl, a), y, a); } if (tier > 1 && CC.Daylight) { var dn = CC.Daylight.P.name.toUpperCase(); if (CC.Daylight.P.frozen) dn = '-' + dn; - if (x + textW(dn) + CW + 24 <= cols - MARGIN_X) x = text(f, dn, x, y, SLATE, kl, a) + CW; + if (x + textW(dn) + CW + 24 <= cols - MARGIN_X) x = gap(f, text(f, dn, x, y, SLATE, kl, a), y, a); } var w = CC.Weather ? CC.Weather.P.name : ''; for (var wi = 0; wi < this.wnames.length; wi++) { diff --git a/src/core.js b/src/core.js index a5d3730..4851d82 100644 --- a/src/core.js +++ b/src/core.js @@ -1082,7 +1082,7 @@ var CC = (function () { r[0] = q[0]; r[1] = q[1]; r[2] = q[2]; /* An element: dense ink hides the world and hairlines do not, so rain over a wall keeps the * wall. Against open sky it IS the sky's silhouette. The visor (HUD, dist < 0.1) is a stencil - * on the glass and gets nothing at all — not a wash, not a spill. + * on the glass and gets nothing of the world — not a wash, not a spill — only its own flat paint. * * AND AN ELEMENT HIDES THE WALL IN PROPORTION TO WHAT IT PRINTS, full only from lum 24 up. * The deliberate occluders — a police cordon's body, a cat, a dark figure — are drawn in the @@ -1095,23 +1095,55 @@ var CC = (function () { * right rule — a hologram composites as LIGHT and never darkens what it lands on — and a * ramp on printed lum is that rule without naming any one element: a thing too dim to see * is too dim to stand in front of anything, and a lit figure is still a solid one. */ - var vis = kd === 3 && d < 0.1, op = vis ? 1 : kd === 3 && d < wd ? (c === SH || !wk ? 1 : (THIN[gc] ? 0.25 : 0.75) * (L < 24 ? L / 24 : 1)) : 0; - if (op && !vis) fld(c, L, wk && 3, d, (d - f0) / fs, gc); - else if (vis) q[0] = q[1] = q[2] = 0; + /* THE VISOR IS PAINTED FLAT, AND IT IS THE ONE PLACE IN THE FIELD THAT IGNORES THE WORLD. Its + * plate cells used to take a black wash and its letters whatever the passes below laid on a + * cell — the rim, the Moon's regolith grey, a neighbour sign's spill — so the help strip read + * as dim slate '@'s on a blotched slab: ~15 grey levels under every letter on the lit plain, + * spill of up to 8 levels on 125 of the 1,195 plate cells in cyber night (seed 11), and + * letters that printed (17,27,38) by day because tone() had darkened them with the city. + * Now the plate is an even black and every lit pixel of a letter is a solid block of its + * own swatch, scaled so its brightest channel lands at 200 whatever the hour or world — + * slate keys at (90,142,200), the white status line brighter at (183,192,200) — times the + * overlay's own fade (Compose.HUD, set by hud.js each frame it draws), so the panel still + * warms up and lets go, and times G like every other cell, so a headless --under=0.5 dims + * the visor with the field instead of leaving it lit at full over a half-strength frame. + * Nothing reaches it: not the rim, not the floor, not the spill sweep further down, which + * skips these cells. + * + * A LETTER IS TOLD BY ITS DEPTH, not by having a glyph: hud.js prints letters at 0.02 and + * its plate at 0.03, and optics.js's lens drops land on the plate a hair nearer than it + * (0.02999) carrying the hue of the letter they bend. Keyed on `gc` alone, one such drop on + * the frontier (seed 11, cell 37,75) printed a full slate block above the E of MOVE. */ + if (kd === 3 && d < 0.1) { + for (t = gc && d < 0.025 ? G * Compose.HUD * 200 / Math.max(p[0], p[1], p[2]) : 0, k = 0; k < 3; k++) u[o + k] = p[k] * t, sp[o + k] = 0; + continue; + } + var op = kd === 3 && d < wd ? (c === SH || !wk ? 1 : (THIN[gc] ? 0.25 : 0.75) * (L < 24 ? L / 24 : 1)) : 0; + if (op) fld(c, L, wk && 3, d, (d - f0) / fs, gc); /* AN EMITTER SPILLS ONLY ONTO SOMETHING. The test is the world under the cell: a sign over a * wall lights the wall, but an amber cloud-bar dash over open night sky (west, seed 7) has * nothing within a hundred metres to light, and it was printing hard-edged horizontal slabs * of (26,29,21) into a sky of (3,5,13). Sky elements carry a distance past SKY_D and are out * for the same reason. */ - var rim = y && wk === 1 && Wk[i - C] === 0, e = S && !vis && wk && d < SKY_D && L > 90 && EM[c] ? (L - 90) / 165 * 0.7 : 0; - /* Lit regolith: grey with a breath of warmth, floors brighter than walls. Only lightly + var rim = y && wk === 1 && Wk[i - C] === 0, e = S && wk && d < SKY_D && L > 90 && EM[c] ? (L - 90) / 165 * 0.7 : 0; + /* Lit regolith: grey with a breath of warmth, floors brighter than walls. Only partly * ink-weighted on the floor — the plain is one lit surface, and a weight that followed every - * pebble's lum printed it as a grey checkerboard — but walked 0.6 -> 1.0 along the depth - * ramp's end, so it recedes instead of printing 3,555 cells of one value. The WALLS are wholly + * pebble's lum printed it as a grey checkerboard. + * + * THE DEPTH RAMP FADES THE PLAIN TOWARD THE HORIZON, NOT UP TO IT. It used to walk 0.6 -> 1.0 + * out to the depth ramp's end, which put the brightest grey of the whole floor in the last + * row before the sky and cut it straight to black: a ruler-edged band across every lit frame + * (seed 11 noon). It is 1 - 0.85 d^2 now, d the share of the ramp: square, so the near and + * middle plain keep their light and only the far reach goes, down to 0.15 at the edge, where + * the toe below takes it to ~1 level and the ground meets the sky without a seam. The base is + * near half the old one (0.18 against 0.32 at the near end) and the ink share is 0.16 of 255 + * on top: about 1.9x between a bare cell and the brightest pebble, against 1.6x before, which + * gives the plain back the texture the halving would have flattened and stops short of the + * checkerboard. Tuned by eye on seeds 7, 11 and 42 from morning to dusk. The WALLS are wholly * ink-weighted: a shadow face on an airless world is black, and a constant here printed * every blank cell of every unlit rock face at one identical grey, a slab of cardboard. */ var hk = wk && L ? (EM[c] ? 1.7 : 1.25) * L / 255 : 0; - var mf = sun && kd ? sun * (kd === 2 ? (0.32 + 0.2 * L / 255) * (0.6 + 0.4 * (wd < FE ? wd / FE : 1)) : 0.43 * L / 255) : 0; + var mf = sun && kd ? sun * (kd === 2 ? (0.18 + 0.16 * L / 255) * (wd < FE ? (t = wd / FE, 1 - 0.85 * t * t) : 0.15) : 0.43 * L / 255) : 0; for (k = 0; k < 3; k++) { v = r[k] + (op ? (q[k] - r[k]) * op : 0); if (rim) v = Math.max(v, Z[k + 6] * 0.9); @@ -1182,7 +1214,7 @@ var CC = (function () { * so a pool's faint skirt dies to black instead of greying the negative space round it. An * emitter's own cell takes the pool at (1 - its emission): the sign is lit from inside, the * wall beside it from the sign. The headroom cap again last, over the sum. */ - for (i = y0 * C, j = a0; i < (y1 + 1) * C; i++, j += 3) if (tq[j] + tq[j + 1] + tq[j + 2] > 0.02 / A) { + for (i = y0 * C, j = a0; i < (y1 + 1) * C; i++, j += 3) if (tq[j] + tq[j + 1] + tq[j + 2] > 0.02 / A && !(fk[i] === 3 && fd[i] < 0.1)) { p = PALETTE[fc[i]]; b = Wk[i] && fh[i] ? (EM[fc[i]] ? 1.7 : 1.25) * fl[i] / 255 : 0; for (k = 0; k < 3; k++) if ((t = tq[j + k] * A) > 0.02) { pc = p[k]; v = 1 - sp[j + k] / (pc + 1); v *= v * t; v = 72 * v / (v + 72); @@ -1211,7 +1243,8 @@ var CC = (function () { f.uon = !!Compose.UNDER; }, world: world, - UNDER: 1 + UNDER: 1, + HUD: 1 // the help strip's fade, 0..1 — hud.js writes it; see under() }; /* HOW WIDE THE PAVEMENT IS, in metres from the building face to the kerb face, and it lives here diff --git a/src/elements/hud.js b/src/elements/hud.js index c4bc1a4..1fc3be5 100644 --- a/src/elements/hud.js +++ b/src/elements/hud.js @@ -113,6 +113,11 @@ var LH = 5, LGAP = 1; // line box and the row between lines function textW(s) { return s.length * CW - 1; } + /* The column of air after a word that is followed by another one. Plated, not skipped: the + * status line printed 'MOONWALK', stepped one character and printed 'VACUUM', and the three + * columns between the two plates were the only unplated cells in the strip — a bar of lit + * regolith or frontier boards between two words, cut into the panel like a stray stroke. */ + function gap(f, x, y, a) { plate(f, x, y, a); return x + CW; } /* The dark a single character stands on: its 3x5 box plus a ring of one, laid down cell by cell * as the line is walked so the field of black ends exactly where the writing does. The first @@ -167,9 +172,13 @@ * is edited. */ var TIERS = [ ['WASD MOVE', 'DRAG LOOK'], - ['WASD MOVE SHIFT RUN', 'DRAG LOOK 1-3 WORLD T TIME'], - ['WASD MOVE SHIFT RUN C CROUCH', 'DRAG LOOK 1-3 WORLD T TIME Y HOLD N SEED'] + ['WASD MOVE SHIFT RUN', 'DRAG LOOK 1-4 WORLD T TIME'], + ['WASD MOVE SHIFT RUN C CROUCH', 'DRAG LOOK 1-4 WORLD T TIME Y HOLD N SEED'] ]; + /* 1-4 because control.js takes any digit up to CC.World.count and there are four worlds — it said + * 1-3, which hid the fourth (Edo, LIST[3]) behind a key the help text told nobody about. A + * literal and not a count read at draw time: the tiers are measured as written, and a fifth + * world is a line edited here on purpose, not a string that grows by itself. */ /* THE SAME LIST FOR A DEVICE WITH NO KEYS ON IT. Every string above names a key — WASD, SHIFT, * C, 1-6, N, P — and a phone has none of them; printing 'WASD MOVE' on a touchscreen is only @@ -249,6 +258,11 @@ draw: function (f, cam, t) { if (!CC.Control || !CC.Control.hintAlpha) return; var a = CC.Control.hintAlpha(t); + /* The fade is handed to core's underpainting as well as baked into the lum, because the visor + * is painted there as solid letter blocks at a fixed brightness (see under() in core.js) and a + * block that ignored the envelope would snap on at full strength under a letter still fading + * in. Written before the early return so a closed overlay can never leave a stale value. */ + if (CC.Compose) CC.Compose.HUD = a; if (a <= 0.01) return; var cols = f.cols, rows = f.rows; if (cols < MIN_COLS) return; @@ -284,9 +298,9 @@ // ---- status: what the sky is doing, and who is driving -------------------------------- var x = MARGIN_X; - if (paused) x = text(f, 'PAUSED', x, y, WHITE, sl, a) + CW; + if (paused) x = gap(f, text(f, 'PAUSED', x, y, WHITE, sl, a), y, a); else if (mode) { - x = text(f, 'MANUAL', x, y, WHITE, sl, a) + CW; + x = gap(f, text(f, 'MANUAL', x, y, WHITE, sl, a), y, a); /* The speed only appears where there is room for it. On the narrow tier those four extra * characters are the difference between a status line and a status line and a half. */ if (tier > 0) { @@ -294,7 +308,7 @@ var d = Math.round(this.spd); if (!(d > 0)) d = 0; else if (d > 9) d = 9; x = text(f, this.dig[d], x, y, SLATE, kl, a); - x = text(f, 'M/S', x, y, SLATE, kl, a) + CW; + x = gap(f, text(f, 'M/S', x, y, SLATE, kl, a), y, a); } } /* WHICH WORLD, ahead of what the sky is doing, and only when the frame is wide enough to @@ -325,7 +339,7 @@ * one frame. Naming the old world in that frame is the one wrong answer available here. */ if (tier > 0 && CC.World && CC.World.name) { var wn = CC.World.name; - if (x + textW(wn) + CW + 44 <= cols - MARGIN_X) x = text(f, wn, x, y, SLATE, kl, a) + CW; + if (x + textW(wn) + CW + 44 <= cols - MARGIN_X) x = gap(f, text(f, wn, x, y, SLATE, kl, a), y, a); } /* THE HOUR, between the world and the weather, and only on the widest tier. The status line * is read left to right as "where, when, what" — CYBERCITY NOON RAIN — which is the order a @@ -335,7 +349,7 @@ if (tier > 1 && CC.Daylight) { var dn = CC.Daylight.P.name.toUpperCase(); if (CC.Daylight.P.frozen) dn = '-' + dn; - if (x + textW(dn) + CW + 24 <= cols - MARGIN_X) x = text(f, dn, x, y, SLATE, kl, a) + CW; + if (x + textW(dn) + CW + 24 <= cols - MARGIN_X) x = gap(f, text(f, dn, x, y, SLATE, kl, a), y, a); } var w = CC.Weather ? CC.Weather.P.name : ''; for (var wi = 0; wi < this.wnames.length; wi++) { diff --git a/tools/west-flicker.cjs b/tools/west-flicker.cjs index 3e62f1e..7ce5f66 100644 --- a/tools/west-flicker.cjs +++ b/tools/west-flicker.cjs @@ -255,8 +255,21 @@ const SEEDS = [3, 42]; /* The backstop, not the gate — see the header. Nothing may be more than this bad in absolute * terms whatever the city does, and the city itself sits under both. */ const STEP_RATE_CAP = 8.0, BAND_CAP = 9.0; -/* The gate: the frontier's own worst, against the city's own worst, plus 15%. */ -const TOLERANCE = 1.15; +/* The gate: the frontier's own worst, against the city's own worst, plus 15%. + * + * IN LUM MODE IT IS JUDGED ONLY UP TO THE GRID IT WAS FITTED ON, 200x60 — counted in cells, + * 12,000, not per axis, so the 120x40 default is judged and so is a wide short 201x40 (8,040 + * cells, coarser than the fit), which an axis test silently dropped — and reported above it. + * At 400x120 it fails by a hair — 3.25/s against the city's 2.75 x 1.15 = 3.16 — and what is left + * is a horse's or the wagon team's solid legs crossing a lit road cell, an object passing once at + * twice the resolution, not a beat (the aliasing that was a beat, the wagon bed's comb, was fixed + * by scaling it with frame.D). Lum mode is also not the frame anybody sees: it switches the + * underpainting off, and the browser always runs with Compose.UNDER = 1 — nothing at runtime sets + * it to 0 — and on the composite, the light actually emitted, the same legs score 0.00 big steps a + * second at both sizes. So the owner's call: on a larger grid lum mode enforces the absolute backstops + * (8.0/s, 9%) and the flash rule and PRINTS the comparison with its numbers, never silently skipping + * it; composite mode keeps judging the project's absolute 1.0/s and 2% at every size. */ +const TOLERANCE = 1.15, FIT_COLS = 200, FIT_ROWS = 60; let fail = 0; console.log(`frontier flicker gate — ${M.tag}, ${SECONDS}s measured of ${NF} frames, ` + @@ -315,16 +328,22 @@ for (const seed of SEEDS) { * the day this landed, 200x60: the frontier's own 1.18% in band against the city's 0.79% on the * composite — and 1.14% against 0.80% on the glyph print with the underpainting OFF, so the wash * contributes 0.04 of it and the inversion is the averaging. Gating that ratio would be gating - * on how thin rain is. The lum run keeps the comparative rule, where it was fitted. */ + * on how thin rain is. The lum run keeps the comparative rule, at the 200x60 it was fitted on. */ const cmpRate = liveRate > cityRate * TOLERANCE, cmpBand = liveBand > cityBand * TOLERANCE; if (M.comp) { console.log(` comparison (printed, not judged in composite mode): rate ${liveRate.toFixed(2)} vs ${cityRate.toFixed(2)}/s` + `${cmpRate ? ' — over' : ''}, band ${liveBand.toFixed(2)}% vs ${cityBand.toFixed(2)}%${cmpBand ? ' — over' : ''}`); if (liveRate > 1.0) { fail++; console.log(` FAIL: big-step rate ${liveRate.toFixed(2)}/s over the absolute 1.0/s`); } if (liveBand > 2.0) { fail++; console.log(` FAIL: 3-20 Hz ${liveBand.toFixed(2)}% over the absolute 2%`); } -} else { +} else if (COLS * ROWS <= FIT_COLS * FIT_ROWS) { if (cmpRate) { fail++; console.log(' FAIL: the frontier steps more often than the city'); } if (cmpBand) { fail++; console.log(' FAIL: the frontier carries more 3-20 Hz than the city'); } +} else { + console.log(` comparison (REPORTED, NOT ENFORCED: lum mode judges it only up to ${FIT_COLS}x${FIT_ROWS} in cells, where it ` + + `was fitted; the backstops above are the gate here): rate ${liveRate.toFixed(2)} vs ` + + `${cityRate.toFixed(2)} x ${TOLERANCE} = ${(cityRate * TOLERANCE).toFixed(2)}/s${cmpRate ? ' — over' : ''}, ` + + `band ${liveBand.toFixed(2)}% vs ${cityBand.toFixed(2)}% x ${TOLERANCE} = ` + + `${(cityBand * TOLERANCE).toFixed(2)}%${cmpBand ? ' — over' : ''}`); } console.log('\n reduced motion');