In this section
- Engines render · galaxies-wafers / iterations/06-stars-as-engines/engines.mjs lines 1–208
- Iterations — 06 Stars As Engines Page render · galaxies-wafers / iterations/06-stars-as-engines/index.html lines 1–44
- Questions render · galaxies-wafers / iterations/06-stars-as-engines/questions.mjs lines 1–124
- Iterations — 06 Stars As Engines Style Sheet render · galaxies-wafers / iterations/06-stars-as-engines/style.css lines 1–88
Engines
A JavaScript module in the iterations folder of Galaxies Wafers that loads laws (`loadLaws`), builds facts (`buildFacts`), places under (`placeUnder`) and calculates planar distances. Served with the page at https://ventusltd.github.io/galaxies-wafers/iterations/06-stars-as-engines/.
rendergalaxies-wafers / iterations/06-stars-as-engines/engines.mjs · lines 1–208 of 208 · pattern placeKey (shared by 4 files)
- What it does
- It draws its content. Defines 18 functions or classes, including current, loadLaws, buildFacts, entity, lawOf. Side effects: changes the web page (DOM).
- Downstream impact
- Used directly by 2 files: Layers Panel (galaxies-wafers, https://ventusltd.github.io/galaxies-wafers/iterations/06-stars-as-engines/); Iterations — 06 Stars As Engines (galaxies-wafers, https://ventusltd.github.io/galaxies-wafers/iterations/06-stars-as-engines/). Reached from 1 other entry point, including Iterations — 06 Stars As Engines Page (galaxies-wafers, https://ventusltd.github.io/galaxies-wafers/iterations/06-stars-as-engines/).
- What it achieves
- It loads laws (`loadLaws`), builds facts (`buildFacts`) and places under (`placeUnder`). STARS AS ENGINES. A second substrate beside the wafer, never instead of it. It responds to change events.
- Why it matters
- Imported by Layers Panel and Iterations — 06 Stars As Engines.
- Application
- galaxies-wafers · iterations/06-stars-as-engines · JavaScript module
- Uses
- Galaxies Wafers — Lib (import), Physics (estate URL)
- Used by
- imported by Layers Panel (import), imported by Iterations — 06 Stars As Engines (import)
- Produces
- current, placeUnder, placeKey, select, attach, familiesReady
- Defines here
- current, loadLaws, buildFacts, entity, lawOf, target, placeUnder, ease, placeKey, at, select, step, writeURL, mountSelector, opt, wanted, attach, familiesReady
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- galaxies-wafers@5814793812add74605660fa821e6a39b8de80588 iterations/06-stars-as-engines/engines.mjs:1-208 · blob 8b6d37836c19f99f0d982a57610889f0fa9ffa66 · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom · domain stage: unknown · users: none · canonical: unknown
/* engines.mjs — STARS AS ENGINES. A second substrate beside the wafer, never
* instead of it.
*
* "Existing stars are also engines of your universe." The Ten Laws page already
* publishes ten placement laws, each a pure function of a key and published facts
* about it. This module imports them live and lets any one of them drive the
* wafer's points and every loaded layer's marks. Layers hold keys, not
* coordinates, so re-placing a layer under another law is nothing more than
* asking that law where each key goes. That is the whole point of keys.
*
* THE FROZEN SUBSTRATE IS UNTOUCHED. wafer.mjs is not imported, edited or
* shadowed. The engine called "wafer (frozen)" is lib.mjs's own place(), the
* page's default, and a link without ?engine= is exactly the inherited page.
*
* WHERE THE LAWS COME FROM. Fetched as an ES module from the live URL below. The
* same file is in the globalgrid2050 repository at
* testcode/202609151413/physics.mjs, the documented fallback: serve that
* repository and point LAWS_FALLBACK at it if the live site is unreachable.
*
* ONE SCALE PER LAW, MEASURED. The laws speak in their own units (collapse fits
* inside a few dozen, the wafer runs to the square root of the highest number
* issued). So the camera can frame every law the same way, each law's output is
* scaled so its farthest point lands on the wafer's own extent. The factor is
* measured from the data each time a law is chosen, never typed.
*/
import { place as waferPlace, indexOfKey } from '../../lib.mjs';
const LAWS_LIVE = 'https://globalgrid2050.com/testcode/202609151413/physics.mjs';
const LAWS_FALLBACK = '../../../globalgrid2050/testcode/202609151413/physics.mjs';
const TWEEN_MS = 900;
const DAY_MS = 864e5;
const E = {
laws: null, why: '', id: 'wafer',
U: null, wafer: null, /* the wafer's own positions, kept for ever */
from: null, to: null, /* tween endpoints; U.pos holds the current frame */
t: 1, scale: 1, fromScale: 1, fromId: 'wafer',
facts: null, /* per-index family facts, once tier 2 lands */
scaleOf: new Map(), /* measured scale per law, cleared when facts change */
onFrame: () => {}
};
export const current = () => E.id;
async function loadLaws() {
for (const url of [LAWS_LIVE, new URL(LAWS_FALLBACK, import.meta.url).href]) {
try { const m = await import(url); if (m.LAWS) { E.laws = m; return; } }
catch (e) { E.why = E.why || e.message; }
}
}
/* Facts the laws read, built once from the numbered database. */
function buildFacts() {
const U = E.U;
if (!U.families || !U.ownerOf || E.facts) return;
const n = U.n, fam = new Int32Array(n).fill(-1), inFam = new Int32Array(n);
for (let f = 0; f < U.families.length; f++) {
const o = U.families[f].lineOffset, c = U.families[f].lineCount;
for (let j = 0; j < c; j++) {
const i = indexOfKey(U.keys, U.famLines[o + j]);
if (i >= 0 && fam[i] < 0) { fam[i] = f; inFam[i] = j; }
}
}
const cats = [...new Set(U.families.map(f => f.category ?? ''))].sort();
const catIx = new Map(cats.map((c, i) => [c, i]));
const now = Date.parse(U.meta.built_utc);
E.facts = { fam, inFam, cats, catIx, now };
E.scaleOf.clear();
}
function entity(i) {
const U = E.U, key = U.keys[i], F = E.facts;
const e = { key, chars: U.lens[i] };
if (!F) return e;
const f = F.fam[i];
e.fanout = (U.ownerOf.get(key) || []).length;
if (f >= 0) {
const fa = U.families[f];
e.family = f; e.inFamily = F.inFam[i]; e.famCount = fa.lineCount;
e.cat = F.catIx.get(fa.category ?? ''); e.catCount = F.cats.length;
const w = Date.parse(fa.first_written);
if (Number.isFinite(w)) e.ageDays = (F.now - w) / DAY_MS;
}
return e;
}
const lawOf = id => (id === 'wafer' || !E.laws) ? null : E.laws.byId[id];
/* Every issued key's place under a law, scaled onto the wafer's extent. */
function target(id) {
const U = E.U, law = lawOf(id);
if (!law) return { pos: E.wafer, scale: 1 };
const raw = new Float32Array(U.n * 2);
let far = 0;
for (let i = 0; i < U.n; i++) {
let [x, y] = law.place(entity(i));
if (!Number.isFinite(x) || !Number.isFinite(y)) { x = 0; y = 0; }
raw[i * 2] = x; raw[i * 2 + 1] = y;
far = Math.max(far, Math.hypot(x, y));
}
const scale = far > 0 ? Math.sqrt(U.meta.max) / far : 1;
for (let i = 0; i < raw.length; i++) raw[i] *= scale;
E.scaleOf.set(id, scale);
return { pos: raw, scale };
}
/* A key's full place under a law, issued or not: what the proofs evaluate. */
export function placeUnder(key, id) {
const law = lawOf(id);
if (!law) return waferPlace(key);
const i = E.U ? indexOfKey(E.U.keys, key) : -1;
if (i >= 0) {
const s = E.scaleOf.get(id) ?? target(id).scale;
const [x, y] = law.place(entity(i));
return [x * s, y * s];
}
const [x, y] = law.place({ key });
return [x * E.scale, y * E.scale];
}
const ease = u => u < .5 ? 4 * u * u * u : 1 - Math.pow(-2 * u + 2, 3) / 2;
/* Where a key is drawn this frame: the wafer, the chosen law, or between them. */
export function placeKey(key) {
const U = E.U;
const i = U ? indexOfKey(U.keys, key) : -1;
if (i >= 0) return [U.pos[i * 2], U.pos[i * 2 + 1]];
const at = (id, s) => { const l = lawOf(id); if (!l) return waferPlace(key); const [x, y] = l.place({ key }); return [x * s, y * s]; };
const a = at(E.fromId, E.fromScale), b = at(E.id, E.scale), k = ease(E.t);
return [a[0] + (b[0] - a[0]) * k, a[1] + (b[1] - a[1]) * k];
}
export function select(id, { tween = true } = {}) {
if (!E.U) { E.id = id; return; }
if (id !== 'wafer' && !lawOf(id)) id = 'wafer';
const { pos, scale } = target(id);
E.from = Float32Array.from(E.U.pos); E.to = pos;
E.fromId = E.id; E.fromScale = E.scale;
E.id = id; E.scale = scale;
writeURL();
const sel = document.getElementById('engine'); if (sel) sel.value = id;
const t0 = performance.now(), P = E.U.pos;
const step = now => {
E.t = tween ? Math.min(1, (now - t0) / TWEEN_MS) : 1;
const k = ease(E.t);
for (let j = 0; j < P.length; j++) P[j] = E.from[j] + (E.to[j] - E.from[j]) * k;
E.onFrame();
if (E.t < 1) requestAnimationFrame(step);
};
requestAnimationFrame(step);
}
function writeURL() {
const u = new URL(location.href);
if (E.id === 'wafer') u.searchParams.delete('engine'); else u.searchParams.set('engine', E.id);
const next = u.pathname + u.search.replace(/%2C/gi, ',') + u.hash;
if (next !== location.pathname + location.search + location.hash) history.replaceState(history.state, '', next);
}
function mountSelector() {
const bar = document.getElementById('bar');
const label = document.createElement('label');
label.id = 'engineWrap';
label.title = 'wafer.v1 is the frozen substrate and never changes. Every other engine re-places the same permanent keys by one of the Ten Laws; nothing is stored.';
const sel = document.createElement('select');
sel.id = 'engine'; sel.setAttribute('aria-label', 'placement engine');
const opt = (v, t) => { const o = document.createElement('option'); o.value = v; o.textContent = t; sel.appendChild(o); };
opt('wafer', 'wafer (frozen)');
for (const l of (E.laws?.LAWS || [])) if (l.id !== 'wafer') opt(l.id, l.title.toLowerCase());
sel.value = E.id;
sel.addEventListener('change', () => select(sel.value));
const note = document.createElement('span');
note.className = 'dim'; note.id = 'engineNote';
note.textContent = E.laws ? ' engine · substrate wafer.v1 frozen' : ` engine · laws unavailable (${E.why}); wafer.v1 frozen`;
label.append(sel, note);
bar.appendChild(label);
}
const wanted = () => new URL(location.href).searchParams.get('engine') || 'wafer';
const lawsReady = loadLaws().then(mountSelector);
/* Called by app.mjs once tier 1 has placed every key by the wafer law. */
export async function attach(U, onFrame) {
E.U = U; E.onFrame = onFrame; E.wafer = Float32Array.from(U.pos);
await lawsReady;
const id = wanted();
if (id !== 'wafer') select(id);
}
/* Called when the family index lands: laws that read families re-place. */
export function familiesReady() {
buildFacts();
if (E.id !== 'wafer') select(E.id);
}
/* Read-only probe for the proofs: a key's screen position under any engine. */
window.__engines = Object.freeze({
get current() { return E.id; },
get settled() { return E.t >= 1; },
get hasFacts() { return !!E.facts; },
laws: () => ['wafer', ...(E.laws?.LAWS || []).filter(l => l.id !== 'wafer').map(l => l.id)],
placeUnder, placeKey,
screenOf(key, id) {
const v = window.__wafer?.view; if (!v) return null;
const [x, y] = id ? placeUnder(key, id) : placeKey(key);
return [(x - v.x) * v.zoom + v.w / 2, v.h / 2 - (y - v.y) * v.zoom];
}
});Iterations — 06 Stars As Engines Page
A web page in Galaxies Wafers. Published at https://ventusltd.github.io/galaxies-wafers/iterations/06-stars-as-engines/.
Set aside from the main view: 92% of its lines are the same as iterations/07-code-card/index.html (galaxies-wafers), which stays. (near-copy-of, proposed by families.py). 92% of lines shared with Iterations — 07 Code Card Page; read that one first. All set-aside files, with reasons. Nothing was deleted.
Evidence
- line-jaccard 0.9231 to galaxies-wafers@5814793812add74605660fa821e6a39b8de80588 iterations/07-code-card/index.html:1-45 127ac6e79d9bd8be6f0acfa48cb294528851cae9
- sha256 2cddb07b50a528e1c782f80b6c4f3b762dacb0fe0ed22f819e5717310b724944
- target sha256 ac6a73459d41ab611b731da9418ee7a28a66b77336513f1c9a98cee5fe83833d
- group of 2 (identity.json near-copy edges >= 0.9)
- canonical rule: reachable, newest stamp, core repo, most lines
rendergalaxies-wafers / iterations/06-stars-as-engines/index.html · lines 1–44 of 44 · Entry point
- What it does
- It draws its content. Side effects: changes the web page (DOM).
- Why it exists in the grid workflow
- README: "The page (`index.html`, `app.mjs`, `lib.mjs`) is inherited unchanged from testcode/202609151339."
- Inputs & outputs
- In: form fields (user input). Out: web page.
- Downstream impact
- It is itself an entry point, published at https://ventusltd.github.io/galaxies-wafers/iterations/06-stars-as-engines/.
- What it achieves
- Stars as Engines — the Line Wafer under ten laws.
- Why it matters
- No other file in the estate was found to import it; it is an entry point.
- Application
- galaxies-wafers · iterations/06-stars-as-engines · page
- Uses
- Iterations — 06 Stars As Engines Style Sheet (stylesheet), Questions (stylesheet), Galaxies Wafers — Proof Page (link), Iterations — 06 Stars As Engines (script src), Layers Panel (script src), Questions (script src)
- Used by
- none found
- Produces
- none declared
- Defines here
- none
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- galaxies-wafers@5814793812add74605660fa821e6a39b8de80588 iterations/06-stars-as-engines/index.html:1-44 · blob 7a71f1ee1667e35a9d547799cd3f0a2ada937238 · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom · domain stage: unknown · users: none · canonical: unknown
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, maximum-scale=5">
<meta name="color-scheme" content="dark">
<title>Stars as Engines — the Line Wafer under ten laws</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="questions.css">
</head>
<body>
<canvas id="stage" aria-label="Every permanently numbered line of code in the estate, placed by its own number."></canvas>
<header id="bar">
<span id="wordmark">THE LINE WAFER</span>
<span id="count" class="dim">loading the numbered database…</span>
<details id="questions"><summary>Questions</summary><dl id="qlist"></dl><p id="machine" class="dim"></p></details>
</header>
<form id="beam" autocomplete="off">
<input id="a" inputmode="numeric" pattern="[0-9]*" placeholder="line number" aria-label="line number to fly to">
<input id="b" inputmode="numeric" pattern="[0-9]*" placeholder="connect to…" aria-label="second line number to connect to">
<button id="go" type="submit">FLY</button>
</form>
<section id="panel" hidden>
<button id="close" type="button" aria-label="close">✕</button>
<div id="panelbody"></div>
</section>
<footer id="foot">
<span id="prov" class="dim">provenance loading</span>
<span id="hint" class="dim">drag to steer · pinch or scroll to focus the beam · tap a line</span>
<a id="proofs" href="../../proof/">check every claim on this page</a>
</footer>
<noscript><p class="dim" style="padding:1rem">This surface is drawn from the numbered database at run time, so it needs JavaScript. Nothing here is typed into the page.</p></noscript>
<script type="module" src="app.mjs"></script>
<script type="module" src="layers-panel.mjs"></script>
<script type="module" src="questions.mjs"></script>
</body>
</html>Questions
A JavaScript module in the iterations folder of Galaxies Wafers that works with layer tags (`layerTags`) and single-line diagram (SLD) sentence (`sldSentence`). Served with the page at https://ventusltd.github.io/galaxies-wafers/iterations/06-stars-as-engines/.
rendergalaxies-wafers / iterations/06-stars-as-engines/questions.mjs · lines 1–124 of 124 · Entry point · pattern sldSentence (shared by 8 files)
- What it does
- It draws its content. Defines 11 functions or classes, including $, fmt, answer, fill, readJSON. Side effects: changes the web page (DOM); makes network requests.
- Downstream impact
- Used directly by 1 file: Iterations — 06 Stars As Engines Page (galaxies-wafers, https://ventusltd.github.io/galaxies-wafers/iterations/06-stars-as-engines/). It is itself an entry point, published at https://ventusltd.github.io/galaxies-wafers/iterations/06-stars-as-engines/.
- What it achieves
- It reads JSON (`readJSON`) and is built from the fmt step (`fmt`) and the answer step (`answer`). Iteration 06, Stars as Engines: the owner's three questions and the machine detail line. It reads `../../layers/manifest.json`. It responds to resize and toggle events.
- Why it matters
- Loaded by the 06 Stars As Engines page at https://ventusltd.github.io/galaxies-wafers/iterations/06-stars-as-engines/.
- Application
- galaxies-wafers · iterations/06-stars-as-engines · JavaScript module
- Uses
- Physics (estate URL)
- Used by
- loaded by Iterations — 06 Stars As Engines Page (script src)
- Produces
- $, fmt, answer, fill, readJSON, layerTags, sldSentence, text, mount, fit, paint
- Defines here
- $, fmt, answer, fill, readJSON, layerTags, sldSentence, text, mount, fit, paint
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- galaxies-wafers@5814793812add74605660fa821e6a39b8de80588 iterations/06-stars-as-engines/questions.mjs:1-124 · blob 9a12e3e6b687e605c4e8bd990bbc4d4d1860728c · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom, network · domain stage: unknown · users: none · canonical: duplicate_candidate
/* questions.mjs — iteration 06, Stars as Engines: the owner's three questions
* and the machine detail line. The law list and the chosen engine are read at
* run time from window.__engines (engines.mjs line 197); layer counts from
* layers/manifest.json; functions are cited to file and line.
*/
const $ = id => document.getElementById(id);
const fmt = n => Number(n).toLocaleString('en-GB');
const DATA_PIN = 'https://globalgrid2050.com/testcode/202609142202/data/';
const SEARCH = 'repository search at ee082ea'; /* the commit the "who else" searches were run on */
/* One question and its answer. Parts are strings or [text, href] links; text only, never HTML. */
function answer(dl, q, parts) {
const dt = document.createElement('dt'); dt.textContent = q;
const dd = document.createElement('dd');
const fill = ps => {
dd.replaceChildren();
for (const p of [].concat(ps)) {
if (Array.isArray(p)) { const a = document.createElement('a'); a.textContent = p[0]; a.href = p[1]; dd.append(a); }
else dd.append(String(p));
}
};
fill(parts);
dl.append(dt, dd);
return fill;
}
/* One fetch, 15 s timeout, only when the reader opens the panel. */
async function readJSON(url) {
const c = new AbortController();
const t = setTimeout(() => c.abort(), 15000);
try {
const r = await fetch(url, { cache: 'default', signal: c.signal });
if (!r.ok) throw new Error(url + ' returned HTTP ' + r.status);
return await r.json();
} finally { clearTimeout(t); }
}
/* The layer rows' tags as the layers panel shows them now, counted from its own DOM. */
function layerTags() {
const c = new Map();
for (const t of document.querySelectorAll('#layersList .ltag')) {
const s = (t.textContent.match(/[A-Z]+/) || ['?'])[0];
c.set(s, (c.get(s) || 0) + 1);
}
return c.size ? [...c].map(([s, n]) => `${fmt(n)} ${s}`).join(', ') : 'layer rows not built yet';
}
/* Layers whose id names an SLD, read from a manifest at run time (name-match inference). */
function sldSentence(m, file) {
const hits = m.layers.filter(l => /sld/i.test(l.id));
if (!hits.length) return `None of the ${fmt(m.layers.length)} layers in ${file} carries "sld" in its id.`;
return `Of ${fmt(m.layers.length)} layers in ${file}, ${hits.length} carry "sld" in their id (name-match inference): ` +
hits.map(l => `${l.id} (${fmt(l.features)} features, draws ${l.draws})`).join(', ') + '.';
}
const text = id => ($(id)?.textContent || '').trim();
/* Collapsed by default. Nothing is read or fetched until the reader opens it; the
machine line repaints every 500 ms only while it is open. */
function mount(build, machine) {
const box = $('questions'), dl = $('qlist'), out = $('machine');
if (!box || !dl || !out) return;
let built = false, timer = 0;
/* Opened, the panel stops above whatever is drawn at the bottom (line panel, clock, strip, beam form), never over it. */
const fit = () => {
const top = box.getBoundingClientRect().top;
let floor = innerHeight;
for (const id of ['panel', 'clock', 'ptable', 'beam']) {
const el = $(id);
const r = el && !el.hidden ? el.getBoundingClientRect() : null;
if (r && r.height > 0 && r.top > top) floor = Math.min(floor, r.top);
}
box.style.maxHeight = Math.max(96, Math.min(innerHeight * 0.45, floor - top - 8)) + 'px';
};
const paint = () => {
fit();
try { out.textContent = 'Machine detail · ' + machine(); }
catch (e) { out.textContent = 'Machine detail · not established: ' + e.message; }
};
/* A bottom element that grows while the panel is open refits it at once, not at the next repaint. */
if ('ResizeObserver' in window) {
const ro = new ResizeObserver(() => { if (box.open) fit(); });
for (const id of ['panel', 'clock', 'ptable', 'beam']) if ($(id)) ro.observe($(id));
}
addEventListener('resize', () => { if (box.open) fit(); });
box.addEventListener('toggle', () => {
clearInterval(timer);
if (!box.open) return;
if (!built) { built = true; build(dl); }
paint();
timer = setInterval(paint, 500);
});
}
const COMMIT = 'b9664ee'; /* the commit that made this page; the Questions panel is added later */
mount(dl => {
const q1 = answer(dl, '1 · How does this help draw a system or a single-line diagram?', 'reading layers/manifest.json…');
answer(dl, '2 · What is this code used for?',
'Re-placing the same permanent keys by one of the Ten Laws, beside the frozen wafer. engines.mjs: loadLaws() line 45 imports physics.mjs from the live Ten Laws page (LAWS_LIVE line 28, documented fallback line 29); ' +
'entity() line 71 gives a law its facts; target() line 90 places every issued key and scales the law onto the wafer\'s extent, measured each time; select() line 133 tweens to it and writes ?engine=; placeKey() line 124 is where a key is drawn this frame. ' +
'layers-panel.mjs imports placeKey as place (line 28), so layer marks move with the law; app.mjs calls engines.attach() (line 552) and engines.familiesReady() (line 117). ' +
`Who else: physics.mjs is also imported by the Ten Laws page itself, testcode/202609151413/app.mjs in the globalgrid2050 repository (text search of that repository); nothing in this repository imports engines.mjs but this page (${SEARCH}); lib.mjs is imported by 42 files (${SEARCH}).`);
answer(dl, '3 · Where does it lead next?', [
'Not established as a lineage: no later page imports engines.mjs or reads ?engine= (' + SEARCH + '). The default engine, wafer (frozen), is lib.mjs place(); ',
['iteration 41, The Placement Law', '../41-golden-angle/'],
' examines that law and lists this page\'s engines.mjs among the files importing it (41-golden-angle/app.mjs line 350).']);
readJSON('../../layers/manifest.json').then(m => {
const laws = window.__engines?.laws() || [];
q1('It draws no electrical element; it maps code. Every law reads code facts only: key, characters, fanout, family, place in family, category and age in days (entity() engines.mjs lines 71–85); none reads an electrical quantity, and physics.mjs does no fetch (its header, line 6). ' +
`What that enables: a layer keeps its keys and follows whichever law is chosen (placeKey() line 124), so any layer, an SLD one included, can be seen under ${laws.length ? `${laws.length} engines (${laws.join(', ')}, read now)` : 'each engine once the laws load'}. ` +
sldSentence(m, 'layers/manifest.json'));
}).catch(e => q1(`Not established: layers/manifest.json could not be read (${e.message}). The page draws no electrical element.`));
}, () => {
const E = window.__engines;
const u = new URL(location.href).searchParams;
return `inputs: ?engine=<law id> (engines.mjs line 179; in the URL now: ${u.get('engine') ?? 'absent, wafer'}), ?line= and ?to= (permanent line keys, readURL() app.mjs line 500), ?layers= (layers-panel.mjs line 253); ` +
`data: all-lines.meta.json, all-lines.bin, all-lines.len.bin, all-lines.family.bin, families.json and lines.bin from ${DATA_PIN} (app.mjs line 49), ${text('prov') || 'provenance not loaded yet'}; ` +
'laws: https://globalgrid2050.com/testcode/202609151413/physics.mjs (live URL, dated folder, not pinned to a commit) · ' +
`outputs: ${text('count') || 'count not loaded yet'}; engine now ${E ? `${E.current}${E.settled ? ', settled' : ', moving'}, family facts ${E.hasFacts ? 'built' : 'not yet built'}, ${E.laws().length} engines offered` : 'not attached yet'}; layer rows now ${layerTags()} · ` +
'refusals: an unknown ?engine= falls back to wafer (select() line 135); if the laws cannot be imported the selector says "laws unavailable" with the reason and only the wafer is offered (line 174); a layer reads FAIL or EMPTY with its reason; unknown ?layers= ids are dropped without a warning (layers-panel.mjs line 255); refuse() app.mjs line 518 · ' +
`source: page commit ${COMMIT}; lib.mjs and layers/ from this repository`;
});Iterations — 06 Stars As Engines Style Sheet
A style sheet in Galaxies Wafers. Served with the page at https://ventusltd.github.io/galaxies-wafers/iterations/06-stars-as-engines/.
rendergalaxies-wafers / iterations/06-stars-as-engines/style.css · lines 1–88 of 88 · Entry point
- What it does
- Side effects: changes the web page (DOM).
- Downstream impact
- Used directly by 1 file: Iterations — 06 Stars As Engines Page (galaxies-wafers, https://ventusltd.github.io/galaxies-wafers/iterations/06-stars-as-engines/). It is itself an entry point, published at https://ventusltd.github.io/galaxies-wafers/iterations/06-stars-as-engines/.
- What it achieves
- The Line Wafer. Designed at 430 px first; the desktop is the same layout with more room.
- Why it matters
- Loaded by the 06 Stars As Engines page at https://ventusltd.github.io/galaxies-wafers/iterations/06-stars-as-engines/.
- Application
- galaxies-wafers · iterations/06-stars-as-engines · style sheet
- Uses
- none found
- Used by
- loaded by Iterations — 06 Stars As Engines Page (stylesheet)
- Produces
- none declared
- Defines here
- none
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- galaxies-wafers@5814793812add74605660fa821e6a39b8de80588 iterations/06-stars-as-engines/style.css:1-88 · blob c247585ee0fb59b5f8bf7da25be51577098c5fba · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom · domain stage: unknown · users: none · canonical: unknown
/* The Line Wafer. Designed at 430 px first; the desktop is the same layout with
more room. One canvas, three chrome strips, nothing that scrolls the page. */
:root{
--ink:#d8dee9; --dim:#8b93a7; --ground:#0b0d12; --edge:#1b2030;
--lit:#ffd54a; --beam:#5ec8f2;
--top:env(safe-area-inset-top,0px); --bot:env(safe-area-inset-bottom,0px);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
margin:0; background:var(--ground); color:var(--ink);
font:13px/1.45 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
overflow:hidden; overscroll-behavior:none; -webkit-text-size-adjust:100%;
}
#stage{position:fixed; inset:0; width:100%; height:100%; display:block; touch-action:none}
#bar{
position:fixed; left:0; right:0; top:0; z-index:2;
display:flex; gap:.75rem; align-items:baseline; flex-wrap:wrap;
padding:calc(var(--top) + .5rem) .75rem .5rem;
background:linear-gradient(#0b0d12ee,#0b0d1200); pointer-events:none;
}
#wordmark{letter-spacing:.14em; font-size:11px}
.dim{color:var(--dim)}
#beam{
position:fixed; z-index:3; left:.5rem; right:.5rem;
bottom:calc(var(--bot) + 3.4rem);
display:flex; gap:.4rem;
}
#beam input{
flex:1 1 0; min-width:0; padding:.6rem .55rem;
background:#11151f; color:var(--ink); border:1px solid var(--edge); border-radius:6px;
font:inherit; font-size:16px; /* 16px stops iOS zooming the page on focus */
}
#beam input:focus{outline:none; border-color:var(--beam)}
#beam button{
flex:0 0 auto; padding:.6rem .9rem; border-radius:6px; cursor:pointer;
background:#11151f; color:var(--beam); border:1px solid var(--beam);
font:inherit; font-size:13px; letter-spacing:.1em;
}
#beam button:active{background:#16202c}
#panel{
position:fixed; z-index:4; left:.5rem; right:.5rem;
bottom:calc(var(--bot) + 6.6rem);
max-height:52vh; overflow:auto; -webkit-overflow-scrolling:touch;
background:#0e121bf2; border:1px solid var(--edge); border-radius:8px;
padding:.75rem .8rem 1rem;
}
#panel[hidden]{display:none!important}
#close{
position:absolute; top:.35rem; right:.4rem; width:2rem; height:2rem;
background:none; border:0; color:var(--dim); font:inherit; font-size:15px; cursor:pointer;
}
#panel h2{margin:0 .5rem .5rem 0; font-size:15px; font-weight:600; letter-spacing:.02em}
#panel h2 .n{color:var(--lit)}
#panel dl{display:grid; grid-template-columns:auto 1fr; gap:.15rem .6rem; margin:.5rem 0}
#panel dt{color:var(--dim)}
#panel dd{margin:0; overflow-wrap:anywhere}
#panel p{margin:.5rem 0 0}
#panel ul{margin:.35rem 0 0; padding-left:1.1rem}
#panel li{margin:.15rem 0}
.fam{color:var(--beam)}
.refuse{color:var(--lit)}
#foot{
position:fixed; z-index:2; left:0; right:0; bottom:0;
display:flex; gap:.15rem; flex-direction:column;
padding:.35rem .75rem calc(var(--bot) + .35rem);
background:linear-gradient(#0b0d1200,#0b0d12ee); pointer-events:none;
font-size:10.5px;
}
#hint{text-align:left}
#foot a{color:var(--beam); pointer-events:auto; text-decoration:underline}
@media (min-width:760px){
#beam{left:auto; right:1rem; width:26rem; bottom:calc(var(--bot) + 2.9rem)}
#foot{flex-direction:row; gap:.6rem; justify-content:space-between}
#hint{text-align:right}
#panel{left:1rem; right:auto; width:26rem; bottom:calc(var(--bot) + 2.5rem); max-height:66vh}
#foot{font-size:11px}
}
/* Stars as Engines: the engine selector in the bar. */
#engineWrap{margin-left:auto;white-space:nowrap}
#engine{background:#11151f;color:var(--beam);border:1px solid var(--edge);border-radius:6px;font:inherit;padding:.1rem .3rem}