In this section
- Iterations — 22 Fast Zoom render · galaxies-wafers / iterations/22-fast-zoom/app.mjs lines 609–720
- Iterations — 22 Fast Zoom Page render · galaxies-wafers / iterations/22-fast-zoom/index.html lines 1–45
- Questions render · galaxies-wafers / iterations/22-fast-zoom/questions.mjs lines 1–57
- Iterations — 22 Fast Zoom Style Sheet render · galaxies-wafers / iterations/22-fast-zoom/style.css lines 1–94
- Iterations — 24 Electrification Model Page render · galaxies-wafers / iterations/24-electrification-model/index.html lines 1–62
- Seven render · galaxies-wafers / iterations/24-electrification-model/seven.css lines 1–72
Iterations — 22 Fast Zoom
A JavaScript module in Galaxies Wafers that draws lines meta and families, using SHA-256. Served with the page at https://ventusltd.github.io/galaxies-wafers/iterations/22-fast-zoom/.
rendergalaxies-wafers / iterations/22-fast-zoom/app.mjs · lines 609–720 of 720 (continued from section 1194) · Entry point · pattern recordFrame (shared by 2 files)
- What it does
- It draws lines meta and families. Defines 40 functions or classes, including $, snapshot, motion, indexOfKey, bin. Side effects: changes the web page (DOM); makes network requests.
- 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: JSON file all-lines.meta.json; JSON file families.json. Out: WebGL/WebGPU drawing.
- Downstream impact
- Used directly by 1 file: Iterations — 22 Fast Zoom Page (galaxies-wafers, https://ventusltd.github.io/galaxies-wafers/iterations/22-fast-zoom/). It is itself an entry point, published at https://ventusltd.github.io/galaxies-wafers/iterations/22-fast-zoom/.
- What it achieves
- It indexes key (`indexOfKey`), builds gl (`buildGL`) and draws marks (`drawMarks`). The Line Wafer. It responds to pointerdown, pointermove and pointerup events.
- Why it matters
- Loaded by the page of the same name at https://ventusltd.github.io/galaxies-wafers/iterations/22-fast-zoom/.
- Application
- galaxies-wafers · iterations/22-fast-zoom · JavaScript module
- Uses
- Galaxies Wafers — Lib (import)
- Used by
- loaded by Iterations — 22 Fast Zoom Page (script src)
- Produces
- $, snapshot, motion, indexOfKey, bin, tier1, tier2, compile, initGL, fallback2d, buildGL, put
- Defines here
- up, readURL, refuse, writeURL
- 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/22-fast-zoom/app.mjs:609-720 · blob 4383a0bc185f62e9ae042af85332700a79e0db99 · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom, network · domain stage: unknown · users: none · canonical: unknown
pts.set(e.pointerId, [e.clientX, e.clientY]);
if (pts.size === 1) { down = [e.clientX, e.clientY]; moved = 0; }
if (pts.size >= 2) wasPinch = true;
if (pts.size === 2) {
const [p, q] = [...pts.values()];
pinch = { d: Math.hypot(p[0] - q[0], p[1] - q[1]), z: view.zoom };
}
});
stage.addEventListener('pointermove', e => {
if (!pts.has(e.pointerId)) return;
const prev = pts.get(e.pointerId);
pts.set(e.pointerId, [e.clientX, e.clientY]);
if (pts.size === 2 && pinch) {
const [p, q] = [...pts.values()];
const d = Math.hypot(p[0] - q[0], p[1] - q[1]);
if (pinch.d > 0) view.zoom = Math.max(0.02, Math.min(4000, pinch.z * (d / pinch.d)));
motion(); draw(); return;
}
if (pts.size === 1) {
const dx = e.clientX - prev[0], dy = e.clientY - prev[1];
moved += Math.abs(dx) + Math.abs(dy);
view.x -= dx / view.zoom; view.y += dy / view.zoom;
motion(); draw();
}
});
const up = e => {
if (pts.size === 1 && down && moved < 7 && !wasPinch) {
const key = nearestKeyAt(e.clientX, e.clientY);
if (key >= 0) { view.focus = key; paintPanel(key); view.link = null; draw(); }
}
pts.delete(e.pointerId);
if (pts.size < 2) pinch = null;
if (pts.size === 0) { down = null; wasPinch = false; }
};
stage.addEventListener('pointerup', up);
stage.addEventListener('pointercancel', e => { pts.delete(e.pointerId); pinch = null; down = null; if (pts.size === 0) wasPinch = false; });
stage.addEventListener('wheel', e => {
e.preventDefault();
const f = Math.exp(-e.deltaY * 0.0016);
view.zoom = Math.max(0.02, Math.min(4000, view.zoom * f));
motion(); draw();
}, { passive: false });
stage.addEventListener('dblclick', () => { view.focus = -1; view.link = null; $('panel').hidden = true; home(); });
}
/* ── URL state: the whole of it, in permanent numbers ────────────────────── */
function readURL() {
const q = new URLSearchParams(location.search);
const pa = parseKey(q.get('line') ?? ''), pb = parseKey(q.get('to') ?? '');
if (!pa.ok) { if (q.get('line')) refuse(`The link carried a line number this page cannot use: ${pa.why}.`); return; }
$('a').value = String(pa.key);
const rawTo = q.get('to');
if (pb.ok) { $('b').value = String(pb.key); view.link = [pa.key, pb.key]; connect(pa.key, pb.key); }
else if (rawTo !== null && rawTo.trim() !== '') {
/* focus stays unset: tier 2 repaints the panel for a focused key when it
lands, which would silently replace this refusal with an ordinary card. */
refuse(`The link asked to connect to "${rawTo}", which is not a line number: ${pb.why}. `
+ `Line ${pa.key} is where the beam is pointing.`);
flyTo(pa.key);
}
else { view.focus = pa.key; paintPanel(pa.key); flyTo(pa.key); }
}
/* One refusal path, so a bad number is always visible rather than ignored. */
function refuse(sentence) {
$('panelbody').replaceChildren();
const h = document.createElement('h2'); h.textContent = 'Refused';
const p2 = document.createElement('p'); p2.className = 'refuse'; p2.textContent = sentence;
$('panelbody').append(h, p2);
$('panel').hidden = false;
}
function writeURL(a, b) {
const q = new URLSearchParams();
if (a) q.set('line', String(a));
if (b) q.set('to', String(b));
history.replaceState(null, '', q.toString() ? '?' + q : location.pathname);
}
/* ── start ───────────────────────────────────────────────────────────────── */
(async function start() {
try {
await tier1();
} catch (e) {
$('count').textContent = 'Could not load the numbered database: ' + e.message
+ '. Check the internet connection and reload.';
return;
}
resize();
try { initGL(); } catch (e) {
ctx2d = stage.getContext('2d');
$('hint').textContent = 'GPU not available: drawn without animation';
}
home();
gestures();
window.addEventListener('resize', () => { resize(); draw(); });
$('beam').addEventListener('submit', e => {
e.preventDefault();
const pa = parseKey($('a').value), pb = parseKey($('b').value);
if (!pa.ok) { refuse(`That is not a line number: ${pa.why}.`); return; }
if ($('b').value.trim() && !pb.ok) { refuse(`Second number: ${pb.why}.`); return; }
if (pb.ok) { view.focus = -1; connect(pa.key, pb.key); writeURL(pa.key, pb.key); }
else { view.focus = pa.key; view.link = null; paintPanel(pa.key); flyTo(pa.key); writeURL(pa.key, null); }
document.activeElement?.blur();
});
$('close').addEventListener('click', () => { $('panel').hidden = true; view.focus = -1; view.link = null; draw(); });
readURL();
tier2().catch(e => { $('prov').textContent = 'family index unavailable: ' + e.message; });
})();Iterations — 22 Fast Zoom Page
A web page in Galaxies Wafers. Published at https://ventusltd.github.io/galaxies-wafers/iterations/22-fast-zoom/.
rendergalaxies-wafers / iterations/22-fast-zoom/index.html · lines 1–45 of 45 · 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/22-fast-zoom/.
- What it achieves
- Fast Zoom — The Line Wafer, iteration 22.
- Why it matters
- No other file in the estate was found to import it; it is an entry point.
- Application
- galaxies-wafers · iterations/22-fast-zoom · page
- Uses
- Iterations — 22 Fast Zoom Style Sheet (stylesheet), Galaxies Wafers — Proof Page (link), Iterations — 22 Fast Zoom (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/22-fast-zoom/index.html:1-45 · blob 2118a01f2a9927949c573094c9d81964eb457c4c · 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>Fast Zoom — The Line Wafer, iteration 22</title>
<link rel="stylesheet" href="style.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 · FAST ZOOM</span>
<span id="count" class="dim">loading the numbered database…</span>
<span id="budget" class="dim">frame budget: waiting for the camera to move</span>
<span id="thin" class="dim"></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. Served with the page at https://ventusltd.github.io/galaxies-wafers/iterations/22-fast-zoom/.
rendergalaxies-wafers / iterations/22-fast-zoom/questions.mjs · lines 1–57 of 57 · Entry point · pattern answer (shared by 15 files)
- What it does
- It draws its content. Defines $, fmt, answer, paint. Side effects: changes the web page (DOM); makes network requests.
- Downstream impact
- Used directly by 1 file: Iterations — 22 Fast Zoom Page (galaxies-wafers, https://ventusltd.github.io/galaxies-wafers/iterations/22-fast-zoom/). It is itself an entry point, published at https://ventusltd.github.io/galaxies-wafers/iterations/22-fast-zoom/.
- What it achieves
- It is built from the fmt step (`fmt`), the answer step (`answer`) and the paint step (`paint`). Iteration 22: the owner's three questions and the machine detail line. It reads `../../layers/manifest.json`.
- Why it matters
- Loaded by the 22 Fast Zoom page at https://ventusltd.github.io/galaxies-wafers/iterations/22-fast-zoom/.
- Application
- galaxies-wafers · iterations/22-fast-zoom · JavaScript module
- Uses
- Layers Panel (import)
- Used by
- loaded by Iterations — 22 Fast Zoom Page (script src)
- Produces
- $, fmt, answer, paint
- Defines here
- $, fmt, answer, 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/22-fast-zoom/questions.mjs:1-57 · blob 91089c3556aa0030911ad274fe14c914bd64235f · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom, network · domain stage: unknown · users: none · canonical: unknown
/* questions.mjs — iteration 22: the owner's three questions and the machine
* detail line. Every count is read at run time from layers/manifest.json or from
* the live wafer; function names and files are cited from this directory's own
* source. Nothing here is a guess: where an answer is not established it says so.
*/
import { FEATURE_CAP, FETCH_TIMEOUT_MS, MAX_FETCH, THIN_STEP } from './layers-panel.mjs';
const BASE_COMMIT = 'abda58b'; /* the root commit this directory was copied from */
const $ = id => document.getElementById(id);
const fmt = n => Number(n).toLocaleString('en-GB');
function answer(dl, q, a) {
const dt = document.createElement('dt'); dt.textContent = q;
const dd = document.createElement('dd'); dd.textContent = a;
dl.append(dt, dd);
}
(async () => {
const dl = $('qlist');
if (!dl) return;
let sld = 'the layer manifest could not be read, so no SLD layer can be named';
try {
const r = await fetch('../../layers/manifest.json', { cache: 'default' });
if (!r.ok) throw new Error('HTTP ' + r.status);
const m = await r.json();
const hits = m.layers.filter(l => /sld/i.test(l.id));
sld = hits.length
? `Of ${fmt(m.layers.length)} layers in layers/manifest.json, ${hits.length} carry "sld" in their id (name-match inference): ` +
hits.map(l => `${l.id} (${fmt(l.features)} features)`).join(', ') + '.'
: `None of the ${fmt(m.layers.length)} layers in layers/manifest.json carries "sld" in its id.`;
} catch (e) { sld = `the layer manifest could not be read (${e.message}), so no SLD layer can be named`; }
answer(dl, '1 · How does this help draw a system or a single-line diagram?',
'None yet: this page draws no busbar, feeder, transformer, cable route, protection or earthing. ' +
'It is the drawing surface made cheap to move, so layers that mark SLD code stay readable during a pinch. ' + sld +
' Such a layer is drawn by drawOverlay() in layers-panel.mjs from each feature\'s geometry.key or geometry.keys.');
answer(dl, '2 · What is this code used for?',
`Pan and zoom of the numbered wafer. app.mjs: render(), blitCache(), rasterCache(), visibleRange(); ` +
`layers-panel.mjs: fetchJSON(), makeRoom(), updateTiles(), buildCache(), drawOverlay(). build_tiles.py writes the radius-band tiles. Copied from the root app.mjs and layers-panel.mjs at commit ${BASE_COMMIT}. ` +
'In the estate the root page and the iteration 09 deep-link receiver run the root versions of these functions (read from their source); nothing calls this copy.');
answer(dl, '3 · Where does it lead next?',
'Not established: the page carries no electrical element, so it joins no next element of a system. ' +
'The owner\'s link opens iteration 09, which still draws every point on every frame; this frame rule has not been carried there.');
const machine = $('machine');
const paint = () => {
const s = window.__wafer?.stats;
const L = window.__waferLayers?.stats;
machine.textContent = 'Machine detail · inputs: wheel deltaY and pointer positions (CSS px), layer files of permanent line keys (dimensionless) · ' +
`outputs: ${s ? `${fmt(s.drawn)} of ${fmt(s.total)} points in the last wafer draw, ${fmt(s.rasters)} cache rasters` : 'waiting for the wafer'}, frame ms (measured, above) · ` +
(L ? `layers: ${fmt(L.held)} of ${fmt(L.cap)} features in memory, ${fmt(L.bandsInMemory)} bands, ${fmt(L.keysDrawn)} keys in the last overlay frame, ${fmt(L.evictions)} released · ` : '') +
`refusals: REFUSED above ${fmt(FEATURE_CAP)} features in memory, FAIL with its HTTP status or a ${FETCH_TIMEOUT_MS / 1000} s timeout, EMPTY with the layer's reason · ` +
`moving frames keep every ${THIN_STEP}th layer vertex; at most ${MAX_FETCH} fetches at once · source: copied from ${BASE_COMMIT}`;
};
paint();
setInterval(() => { if ($('questions').open) paint(); }, 500);
})();Iterations — 22 Fast Zoom Style Sheet
A style sheet in Galaxies Wafers. Served with the page at https://ventusltd.github.io/galaxies-wafers/iterations/22-fast-zoom/.
rendergalaxies-wafers / iterations/22-fast-zoom/style.css · lines 1–94 of 94 · Entry point
- What it does
- Side effects: changes the web page (DOM).
- Downstream impact
- Used directly by 1 file: Iterations — 22 Fast Zoom Page (galaxies-wafers, https://ventusltd.github.io/galaxies-wafers/iterations/22-fast-zoom/). It is itself an entry point, published at https://ventusltd.github.io/galaxies-wafers/iterations/22-fast-zoom/.
- 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 22 Fast Zoom page at https://ventusltd.github.io/galaxies-wafers/iterations/22-fast-zoom/.
- Application
- galaxies-wafers · iterations/22-fast-zoom · style sheet
- Uses
- none found
- Used by
- loaded by Iterations — 22 Fast Zoom 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/22-fast-zoom/style.css:1-94 · blob 659f58446348cc093e55ce702a2ba26b17fced83 · 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}
}
/* iteration 22: the frame budget and the moving-frame rule, one dim line each */
#budget,#thin{flex-basis:100%; font-size:10px; line-height:1.3}
#questions{flex-basis:100%; pointer-events:auto; font-size:10.5px; max-width:26rem}
#questions summary{cursor:pointer; color:var(--beam); letter-spacing:.08em; width:max-content}
#questions[open]{background:#0e121bf2; border:1px solid var(--edge); border-radius:8px; padding:.4rem .55rem; max-height:45vh; overflow:auto}
#questions dl{margin:.35rem 0 0}
#questions dt{color:var(--ink); margin-top:.35rem}
#questions dd{margin:.1rem 0 0; color:var(--dim)}
#machine{margin:.45rem 0 0}Iterations — 24 Electrification Model Page
A web page in Galaxies Wafers. Published at https://ventusltd.github.io/galaxies-wafers/iterations/24-electrification-model/.
rendergalaxies-wafers / iterations/24-electrification-model/index.html · lines 1–62 of 62 · 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
- Out: web page.
- Downstream impact
- It is itself an entry point, published at https://ventusltd.github.io/galaxies-wafers/iterations/24-electrification-model/.
- What it achieves
- Seven Meanings — a kilowatt is not a kilowatt. Its code works with 100 kW.
- Why it matters
- No other file in the estate was found to import it; it is an entry point.
- Application
- galaxies-wafers · iterations/24-electrification-model · page
- Uses
- Seven (stylesheet), Galaxies Wafers — Iterations Page (link), Seven (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/24-electrification-model/index.html:1-62 · blob 6c6a02ee6687232f282bd5b5c476ba958e59df7d · 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">
<meta name="color-scheme" content="dark">
<title>Seven Meanings — a kilowatt is not a kilowatt</title>
<link rel="icon" href="data:,">
<link rel="stylesheet" href="seven.css">
</head>
<body>
<main id="page">
<div class="colA">
<header>
<h1>SEVEN MEANINGS</h1>
<p class="dim">Seven lanes, one for each meaning a quantity can carry in the electrification model. Several share a unit and none is the same quantity. Drag a bar onto another lane to try to add them; the module answers.</p>
<p id="status" class="dim" aria-live="polite">WAIT — loading the electrification model from the engine…</p>
</header>
<section id="lanesWrap" aria-label="The seven meanings">
<div id="lanes"></div>
<div id="axes" class="dim"></div>
</section>
<section id="boundary" class="read">
<p class="boundary">Illustrative physics drawn by a computer from published data. Not an engineering design or certified calculation. Any real design above 100 kW needs study and approval by a qualified chartered electrical engineer under the applicable standards.</p>
<p class="forecast"><b>Scenario, not a forecast.</b> <span id="notForecast" class="dim"></span></p>
</section>
<section id="detail" class="read" aria-live="polite">
<p class="dim">Tap a bar to read what the module says about it.</p>
</section>
</div>
<div class="colB">
<section id="inputs" aria-label="Scenario inputs">
<h2>SCENARIO INPUTS</h2>
<div id="sliders"></div>
<button id="loadExample" type="button">load the worked example inputs</button>
</section>
<section id="example" class="read">
<h2>THE WORKED EXAMPLE, COMPUTED BY THE MODULE</h2>
<div id="exampleOut" class="dim">WAIT</div>
</section>
<section id="refusedList" class="read" hidden>
<h2>WHAT THE MODULE REFUSED WITH THESE INPUTS</h2>
<ul id="refusals"></ul>
</section>
</div>
<footer class="dim">
<p>Every number on this page is computed at run time by <code>engine/electrification-model.js</code> from ventus-grid-engine, pinned at commit <span id="pin"></span>. The page only formats the results (kW ÷ 1,000,000 → GW and MWh ÷ 1,000,000 → TWh for display) and scales each bar against the largest value in its axis group.</p>
<p><a href="../">all iterations</a></p>
</footer>
</main>
<div id="ghost" hidden></div>
<div id="refusal" role="alertdialog" aria-live="assertive" hidden></div>
<script type="module" src="seven.mjs"></script>
</body>
</html>Seven
A style sheet in the iterations folder of Galaxies Wafers. Served with the page at https://ventusltd.github.io/galaxies-wafers/iterations/24-electrification-model/.
rendergalaxies-wafers / iterations/24-electrification-model/seven.css · lines 1–72 of 72 · Entry point
- What it does
- Side effects: changes the web page (DOM).
- Downstream impact
- Used directly by 1 file: Iterations — 24 Electrification Model Page (galaxies-wafers, https://ventusltd.github.io/galaxies-wafers/iterations/24-electrification-model/). It is itself an entry point, published at https://ventusltd.github.io/galaxies-wafers/iterations/24-electrification-model/.
- What it achieves
- No statement of purpose was found in the file, a README line naming it, or its name.
- Why it matters
- Loaded by the 24 Electrification Model page at https://ventusltd.github.io/galaxies-wafers/iterations/24-electrification-model/.
- Application
- galaxies-wafers · iterations/24-electrification-model · style sheet
- Uses
- none found
- Used by
- loaded by Iterations — 24 Electrification Model 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/24-electrification-model/seven.css:1-72 · blob 32f10b9caa8ca7e7d38c649a17438c1cd6bd7c25 · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: output · effects: dom · domain stage: unknown · users: none · canonical: unknown
: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{background:var(--ground)}
body{margin:0;background:var(--ground);color:var(--ink);
font:13px/1.45 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;-webkit-text-size-adjust:100%}
#page{max-width:980px;margin:0 auto;padding:calc(var(--top) + .75rem) 16px calc(var(--bot) + 1.5rem)}
h1{font-size:12px;letter-spacing:.16em;font-weight:400;margin:0 0 .4rem}
h2{font-size:10px;letter-spacing:.14em;font-weight:400;margin:0 0 .5rem;color:var(--dim)}
p{margin:.3rem 0}
.dim{color:var(--dim)}
a{color:var(--beam)}
code{color:var(--ink)}
section{margin-top:1rem}
.read{border:1px solid var(--edge);border-radius:8px;padding:.6rem .7rem;background:#0e1118}
#lanes{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;height:max(300px,48vh)}
.lane{position:relative;display:flex;flex-direction:column;min-width:0;border:1px solid var(--edge);
border-radius:6px;background:#07090d;overflow:hidden}
.lane.over{border-color:#fff}
.lane h3{margin:0;padding:.35rem .15rem .25rem;font-size:9px;line-height:1.2;font-weight:400;text-align:center;
letter-spacing:.06em;color:var(--dim);border-bottom:1px solid var(--edge);min-height:2.9em}
.lane h3 b{display:block;color:var(--ink);font-weight:400}
.lane h3{letter-spacing:0;font-size:8.5px}
.track{position:relative;flex:1 1 auto;display:flex;align-items:flex-end;justify-content:center;gap:3px;padding:0 5px}
.bar{position:relative;flex:0 1 26px;min-height:2px;border-radius:3px 3px 0 0;background:var(--c);
box-shadow:0 0 10px var(--c),0 0 1px #000 inset;touch-action:none;cursor:grab;
transition:height .18s ease-out;outline:1px solid #000}
.bar.sel{outline:1px solid #fff}
.bar .tag{position:absolute;left:50%;bottom:calc(100% + 3px);transform:translateX(-50%);font-size:8px;color:var(--dim);white-space:nowrap}
.bar.dragging{opacity:.35}
.note{position:absolute;inset:auto 2px 40%;text-align:center;font-size:9px;line-height:1.25;color:var(--dim)}
.note b{display:block;color:var(--ink);font-weight:400;letter-spacing:.08em}
.val{padding:.3rem .1rem .35rem;font-size:10px;line-height:1.2;text-align:center;border-top:1px solid var(--edge);min-height:3.8em;overflow-wrap:anywhere}
.val .u{display:block;color:var(--dim);font-size:9px}
#axes{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin-top:4px;font-size:9px;text-align:center}
#axes div{border-top:1px solid var(--dim);padding-top:2px}
.boundary{color:var(--ink)}
.forecast{margin-top:.5rem}
#detail p{overflow-wrap:anywhere}
#detail .k{color:var(--dim)}
#sliders{display:grid;gap:.7rem}
.slider label{display:flex;justify-content:space-between;gap:.5rem;flex-wrap:wrap}
.slider .si{font-size:9px;letter-spacing:.1em;color:var(--lit);border:1px solid #5a4b12;border-radius:3px;padding:0 .25rem}
.slider output{color:var(--ink)}
.slider input{width:100%;accent-color:var(--beam);height:28px}
.slider .hint{font-size:10px;color:var(--dim)}
button{margin-top:.8rem;padding:.6rem .9rem;border-radius:6px;cursor:pointer;background:#11151f;color:var(--beam);
border:1px solid var(--beam);font:inherit}
#exampleOut p{color:var(--ink)}
#refusals{margin:0;padding-left:1.1rem}
#refusals li{margin:.3rem 0;overflow-wrap:anywhere}
#ghost{position:fixed;z-index:9;pointer-events:none;width:24px;border-radius:3px;background:var(--c);
box-shadow:0 0 16px var(--c);transform:translate(-50%,-50%);opacity:.9}
#refusal{position:fixed;z-index:10;width:min(300px,calc(100vw - 24px));padding:.6rem .7rem;border-radius:8px;
background:#0b0d12f5;border:1px solid #fff;box-shadow:0 6px 30px #000;font-size:12px}
#refusal .h{font-size:10px;letter-spacing:.12em;color:var(--dim);margin-bottom:.3rem}
#refusal .said{color:#fff}
#refusal .thrown{color:var(--ink);margin-top:.4rem}
#refusal .close{margin-top:.5rem;padding:.35rem .7rem}
@media (min-width:760px){
#page{display:grid;grid-template-columns:3fr 2fr;column-gap:1.2rem;align-items:start}
footer{grid-column:1 / -1}
}