[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7E7NEQ6PE0PR83X1MSMR2R7":3,"skill-same:01M7E7NEQ6PE0PR83X1MSMR2R7":104},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":15,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":13,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7E7NEQ6PE0PR83X1MSMR2R7","iso-glow",null,"irfanfaraaz\u002Fclaude-kit","irfanfaraaz","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F87533725?v=4","01M7E6ZGQPF7DTPAFQ4N695DBW","Syed Irfan Faraz","01M7E6ZGR6NERV5QMACPYC8GK2",0,"MIT","https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fiso-glow\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fiso-glow\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: iso-glow\ndescription: Build interactive isometric line-art figures with glow lighting in a single HTML file — a dark hairline drawing where whatever is live glows in one accent colour (pressed keys, lit screens and windows, beams, wires with travelling light pulses), plus an accent-colour picker. One figure, or a gallery of several figures with sidebar navigation. Also builds the same look in real 3D (three.js: orbit, true isometric view, revolve), including cleaning up a user's own .glb model into iso-glow hairlines. Also has a Lumen style: solid, lit, filled objects with geometric light cones, for product showcases and web\u002Flanding-page illustration. Use for isometric objects, devices, buildings and cityscapes, \"Fig N\" plates, glowing interactive isometric illustrations, Lumen \u002F solid isometric product illustrations, and 3D versions of them, including exploded and sectioned real objects.\n---\n\n# Iso glow\n\nInteractive isometric figures with glow lighting. Builds on **iso-figure** by Tolga Cohce (MIT, github.com\u002FMrBongoC\u002Fai-iso-skill): the projection kernel, the \"Fig N\" plate and the rule that every figure must do something real all come from there. This skill adds the lighting, colour palettes, a multi-figure gallery shell, and lessons from building twenty figures (desk objects and city buildings).\n\n## The look in one sentence\n\nA monochrome hairline drawing on a dark panel; **one accent colour, only on what is live** — and live things glow. Lit display content, the key you just pressed, a floor whose lights are on, a wire carrying signal, a sweeping beam. That contrast is the whole effect.\n\n## Fast path (follow this; it is quick and can't hang)\n\nYou never need to open `assets\u002Fgallery.html` or the example files. Everything required is on this page.\n\n1. **Write the figure to `fig.js`** in the working folder, starting from the starter below. Default to **one figure** unless the user asks for several (then put several `FIGS.push` calls in the file). Aim for roughly 150–300 lines.\n2. **Assemble the page with this one command** (it copies the template, sets the name and palette, and inserts `fig.js`). Replace `\u003Cskill folder>` with the base directory shown when this skill loaded (usually `~\u002F.claude\u002Fskills\u002Fiso-glow`), `NAME` with the piece's name and `PALETTE` with `ember` (default) or `city`:\n\n```bash\npython3 - \"\u003Cskill folder>\u002Fassets\u002Fgallery.html\" NAME.html fig.js \"NAME\" PALETTE \u003C\u003C'PY'\nimport sys\nsrc, out, fig, name, pal = sys.argv[1:6]\ns = open(src).read()\nfor a, b in [('\u003Ctitle>Iso Figures\u003C\u002Ftitle>', f'\u003Ctitle>{name}\u003C\u002Ftitle>'), ('Iso figures\u003C\u002Fspan>', f'{name}\u003C\u002Fspan>'),\n             (\"palette: 'ember'\", f\"palette: '{pal}'\"), ('\u002F* paste figure scripts here (see examples\u002F) *\u002F', open(fig).read())]:\n    assert a in s, a\n    s = s.replace(a, b, 1)\nopen(out, 'w').write(s)\nprint('wrote', out)\nPY\n```\n\n   No Python? Copy the template (`cp`) and make the same four text replacements with your edit tool, without reading the rest of the file.\n3. **Finish without browser automation.** Do **not** install or launch Playwright, Puppeteer, headless Chrome or any other browser tool: they need downloads or can hang indefinitely. Instead re-read `fig.js` once for obvious mistakes (`node --check fig.js` if Node is available), open the page in the user's normal browser and return immediately (`open NAME.html` on macOS, `xdg-open` on Linux, `start` on Windows), and tell the user what to click or press. If they report a problem, fix that. Some preview panes show local `file:\u002F\u002F` pages as static snapshots without running scripts, which makes a working page look blank.\n\n### Starter figure (complete and working: a lamp whose window lights up)\n\n```js\nFIGS.push({\n  id: 'lamp', name: 'Lamp', hint: 'Click the lamp · space toggles', aria: 'Isometric lamp. Click it or press space to switch it on.',\n  mount(stage, api) {\n    const K = api.iso.frame([[0,0,0],[200,0,0],[0,160,0],[200,160,0],[70,50,98]]);   \u002F\u002F extreme corners incl. tallest point\n    const { TOP, FRONT, box } = K;\n    let svg = box(0,0,0, 200,160,8, 12);                                                 \u002F\u002F ground plate\n    svg += `\u003Cg transform=\"${TOP(0,0,8)}\">\u003Crect class=\"detail\" x=\"8\" y=\"8\" width=\"184\" height=\"144\" rx=\"8\"\u002F>\u003C\u002Fg>`;\n    svg += `\u003Cg class=\"press\" id=\"lamp-body\">${box(70,50,8, 60,60,90, 6)}\u003C\u002Fg>`;          \u002F\u002F pressable body\n    svg += `\u003Cg transform=\"${FRONT(70,110,98)}\">\u003Crect id=\"lamp-glass\" class=\"face led\" filter=\"url(#soft)\" x=\"10\" y=\"12\" width=\"40\" height=\"40\" rx=\"4\"\u002F>\u003C\u002Fg>`;\n    stage.setAttribute('viewBox', K.viewBox); stage.innerHTML = svg;\n    const st = { on: false };\n    const glass = stage.querySelector('#lamp-glass'), body = stage.querySelector('#lamp-body');\n    function render() { glass.classList.toggle('hot', st.on); api.power(st.on); api.readout(st.on ? 'on' : 'off'); }\n    const toggle = () => { st.on = !st.on; render(); };\n    body.addEventListener('click', toggle);\n    render();\n    return { key: e => (e.key === ' ' || e.key === 'Enter') ? (toggle(), true) : false, demo: () => api.after(200, toggle) };\n  },\n});\n```\n\nGrow this: more `box()` parts for the object, detail drawn on face planes (`FRONT`\u002F`SIDE`\u002F`TOP` groups), one state object, one `render()`, keyboard and click calling the same functions, and a `demo()` that leaves it lit. Only what is live gets the accent (`.hot`, `.lit`, `.latched`).\n\n## Start from the template\n\n`assets\u002Fgallery.html` is a complete, self-contained page: tokens for dark and light themes, glow filters, the shared CSS vocabulary below, the kernel, navigation, the palette picker, and an empty slot for figures. Copy it (never read it), set `\u003Ctitle>` and the brand text, choose a palette in `window.GALLERY`, and paste the figure code over the placeholder `\u002F* paste figure scripts here (see examples\u002F) *\u002F`. The placeholder is already inside a `\u003Cscript>` tag, so paste plain JavaScript (one `FIGS.push({...})` per figure), not another `\u003Cscript>` tag. With one figure the sidebar simply lists one item; delete the nav if you want a bare plate.\n\n`assets\u002Fexamples\u002Fdesk-computer.js` (typing, power toggle, coiled cable with a light pulse) and `assets\u002Fexamples\u002Foffice-tower.js` (window grids, floor toggles, cascading lights) are complete figures. You don't need to read them; the starter figure above shows the structure.\n\n## Figure contract\n\n```js\nFIGS.push({\n  id: 'lamp', name: 'Desk lamp', hint: 'Click the switch · ↑↓ dim', aria: 'Isometric desk lamp. …',\n  css: `[data-fig=\"lamp\"] …`,            \u002F\u002F optional, always scoped to the figure\n  mount(stage, api) {                      \u002F\u002F stage: a fresh \u003Csvg> per mount\n    const K = api.iso.frame([\u002F* extreme 3D corners, incl. the tallest point *\u002F]);\n    const { P, D, TOP, FRONT, SIDE, rect, box, boxc, path } = K;\n    stage.setAttribute('viewBox', K.viewBox); stage.innerHTML = svg;\n    \u002F\u002F listeners on stage; one state object; one render()\n    return { key(e) { \u002F* true if handled *\u002F }, keyup(e) {}, unmount() {}, demo() {} };\n  },\n});\n```\n\n`api`: `iso.frame(points)` (kernel + 4:3 viewBox), `iso.slits(a0,a1,step,b0,b1,vertical=true,cls='detail')` (parallel hairlines at a0, a0+step … a1, each spanning b0→b1, in face-local units; vertical lines by default), `iso.esc`, `readout(str)`, `audio()` → `{ctx,out,analyser}` (call inside a user gesture), `after(ms,fn)` \u002F `every(ms,fn)` \u002F `loop(fn)` (all auto-cleared on unmount; `loop` calls `fn(timestampMs)` every animation frame and returns a stop function, so animate from the timestamp rather than counting frames), `flash(el)` (press + glow, then fade), `replay(el,'go')` (restart a one-shot animation such as a pulse), `power(bool)` (warm haze behind the figure while it is on). The figure's `name` becomes the \"Fig N · Name\" label, the sidebar entry and the browser-tab title; the template's brand text (`Iso figures`) is the only other name to change. Prefix every id with the figure id. `demo()` is a short scripted sequence using the same functions as real input; it runs with `?demo`, or on every arrival when `GALLERY.autoDemo` is true, so a figure can open already lit.\n\n## Kernel (from iso-figure)\n\n```js\nconst C = Math.cos(Math.PI\u002F6), S = Math.sin(Math.PI\u002F6);\nconst P = (x,y,z) => [(x-y)*C + OX, (x+y)*S - z + OY];\nconst D = (x,y,z) => [(x-y)*C, (x+y)*S - z];\nconst plane = (O,U,V) => { const o=P(...O), u=D(...U), v=D(...V); return `matrix(${u[0]} ${u[1]} ${v[0]} ${v[1]} ${o[0]} ${o[1]})`; };\nconst TOP   = (x,y,z) => plane([x,y,z],[1,0,0],[0,1,0]);\nconst FRONT = (x,y,z) => plane([x,y,z],[1,0,0],[0,0,-1]);   \u002F\u002F y = max face, lower-left\nconst SIDE  = (x,y,z) => plane([x,y,z],[0,-1,0],[0,0,-1]);  \u002F\u002F x = max face, lower-right\n```\n\n+x runs down-right, +y down-left, +z up. Draw ordinary rects, text and paths inside `\u003Cg transform=\"${FRONT(x, y+d, z+h)}\">` (face top-left corner, local v grows downward) and they land on the plane. A box is its three visible faces. `box(x,y,z,w,d,h,r)` always draws a full, opaque top over its whole footprint, so don't use it for thin trim, ledges or bands that sit against a wall (the top would cover what is above or behind); draw those as flat strips on the wall's FRONT\u002FSIDE plane instead. `rect(transform, w, h, r = 0, cls = 'face')` draws one rectangle on a plane, e.g. `rect(FRONT(x, y+d, z+h), w, 4, 0, 'face')` for a strip. Paint order is the only depth sort: back to front (smaller x+y first, lower z first). Faces need opaque fills. `vector-effect: non-scaling-stroke` on every stroke.\n\n## Glow kit (classes in the template)\n\n| Class | Use |\n|---|---|\n| `.face`, `.face.top`, `.face.recess`, `.detail`, `.label` | structure, decks, insets, hairline texture, printed text |\n| `.press` + `.down` \u002F `.lit` \u002F `.latched` | pressable part; sinks 3px; transient orange glow (`api.flash`); persistent on-state |\n| `.glass` + `.hot` | display glass, lit: warm fill + accent stroke |\n| `.halo` + `.hot` with `filter=\"url(#bloom)\"` | soft light spilling behind a lit glass, beam or bulb |\n| `.scr`, `.scr-accent` | lit display content |\n| `.led` + `.hot` | indicator on |\n| `.wire` + `.hot`, `.wire-under` | wire, carrying signal; background-coloured stroke under it for crossings |\n| `.pulse` + `.go` on a `path` with `pathLength=\"1000\"` | a dash of light travelling along a wire (`api.replay`) |\n| filters `#glow`, `#soft`, `#bloom` | strong glow, subtle glow, blur only |\n\nColour only through tokens: `--body --deck --line --detail --recess --ink --ink-hi --glass --glass-on --accent --accent-hi --accent-dim --panel`. Never a literal hue in a figure, or the palette picker and light theme break.\n\n## Palettes\n\nSet `window.GALLERY.palette` to `'ember'` (Ember, Cyan, Lime, Violet, Rose, Ice) or `'city'` (Sodium street-lamp amber, Tungsten, Neon, Signal, Dusk, Moon), or pass your own `[[name, darkAccent, darkHi, lightAccent, lightHi], …]`. Pick a set that matches the subject: city lights for buildings, warm ember for desk objects. The light theme uses **the same accent as the dark theme**; only near-white colours (Ice, Moon) get a dark light-theme variant, because white would vanish on a pale panel. The choice is remembered per viewer.\n\n**Light theme has no glow.** It keeps the accent fills, strokes and lit text exactly as in the dark theme but drops every ambient, radiating light: the template turns `#glow`\u002F`#soft` into pass-through and `#bloom` into nothing, and hides `.halo` in the light theme. Don't add light pools, beams or haze that only work as glow; in the light theme a lit thing is a flat, bright accent.\n\n## Procedure\n\n1. **Name the output** of each figure before drawing: typed text, a number, a sound, lights that switch, a vehicle that moves. A figure you can only watch is decoration.\n2. **Decompose** into 3–8 boxes; write `(x,y,z,w,d,h)` down first. Give the long, detailed face to FRONT or SIDE.\n3. **Draw back to front**, detail on faces, texture by repetition (slits, window grids, ribs). Start from a ground plate (rounded box, inset line, screws).\n4. **Light it**: decide what glows in each state. At least one large lit element per figure (a display, a lit floor band, a beam, a sign) should read as solid accent with bloom.\n5. **Wire state**: one state object, one `render()`, keyboard and pointer calling the same functions. Readout bottom-right, terse and lowercase: `on · 9 chars · key t`.\n6. **Frame** with `api.iso.frame` including the tallest point. **Finish** as in Fast path step 3: open it in the user's browser and hand over; no browser automation.\n\n## Lessons (from building twenty figures)\n\n- **Make the lit state unmistakable.** A faint glow was the most common failure. Push opacity and bloom until it reads at thumbnail size.\n- **Point the detail at the viewer.** Only the top, FRONT and SIDE faces show. A server rack with its front on the narrow face looked like a blank box.\n- **Moving things**: animate with `api.loop`, timed from `performance.now()`; move along an axis by translating with `D(dx,dy,dz)`. Objects that pass in front of and behind others need their draw order recomputed per frame.\n- **Filters on straight lines**: the template's filters use `filterUnits=\"userSpaceOnUse\"` because a perfectly horizontal or vertical path has a zero-height box and vanishes under a default filter region.\n- **Escape before writing text into SVG**; clip scrolling screen text to its glass with a `\u003CclipPath>`.\n- **Rounded boxes**: `box(..., r)` draws a rounded top plus one continuous side wall, so corners line up. Don't round the FRONT and SIDE faces separately; three separately rounded faces leave notched, misaligned corners.\n- **Round things** (domes, lamp shades, beams) can be drawn as hulls of projected circles or as stacked boxes; keep the hairline style.\n- **After a nav click, focus the stage** (the template does this) so Space and Enter go to the figure instead of re-clicking the button.\n- Audio only after a user gesture; wrap it in try\u002Fcatch.\n\n## 3D mode\n\nUse it when the user asks for 3D, something to orbit, a true isometric view of a real model, or gives you a `.glb`\u002F`.gltf`. Same look as the SVG figures: dark hairline drawing, one accent colour on what is live, every figure does something real. The page is built on three.js; you never write a renderer, lines, lights or UI.\n\n`assets\u002Fgallery-3d.html` is the complete shell: renderer, three line tiers (silhouette shell, major folds, dim detail, always 1 CSS px), crease extraction, light points and soft pools, dark\u002Flight themes, accent picker (Ember, Cyan, Lime, Violet, Rose, Ice), **Revolve** toggle, **Iso view** (true orthographic isometric), per-figure button panel, readout, sound helpers and twelve working figures that double as references (typewriter, drum machine, cassette deck, kitchen timer, vending machine, computer, lamp, logic board, server rack, system stack, turntable, instant camera). Copy it, never read it. When you paste figures into its `FIGS3D` slot only yours get tabs (one figure: no tab bar).\n\n### Fast path\n\n1. Write the figure module to `fig3d.js`, starting from the starter below (aim for 100–250 lines).\n2. Assemble:\n\n```bash\npython3 - \"\u003Cskill folder>\u002Fassets\u002Fgallery-3d.html\" NAME.html fig3d.js \"NAME\" \u003C\u003C'PY'\nimport sys\nsrc, out, fig, name = sys.argv[1:5]\ns = open(src).read()\nfor a, b in [('\u003Ctitle>Iso 3D\u003C\u002Ftitle>', f'\u003Ctitle>{name}\u003C\u002Ftitle>'), ('\u003Ci>\u003C\u002Fi>Iso 3D\u003C\u002Fdiv>', f'\u003Ci>\u003C\u002Fi>{name}\u003C\u002Fdiv>'),\n             ('\u002F* paste 3D figure modules here *\u002F', open(fig).read())]:\n    assert a in s, a\n    s = s.replace(a, b, 1)\nopen(out, 'w').write(s)\nprint('wrote', out)\nPY\n```\n\n3. Check `fig3d.js` (`node --check` won't parse it on its own because it uses the page's helpers, so re-read it once), open the page in the user's browser (it needs internet once for three.js) and hand over, as in the 2D fast path. No browser automation.\n\n### Starter 3D figure (complete: a button that counts on a lit screen)\n\n```js\nFIGS3D.push({ id: 'clicker', name: 'Clicker', mod: (() => {\n  const g0 = new THREE.Group(); g0.visible = false; scene.add(g0);\n  const first = twMeshes.length;                                    \u002F\u002F parts built from here get crease lines\n  plateWith(g0, 240, 200, [[18, 18], [222, 18], [18, 182], [222, 182]]);\n  rbox(50, 40, 7, 140, 110, 60, 10, bodyMat, g0);                   \u002F\u002F body: x, y, z, w (x), d (y), h (z), plan radius\n  const btn = new THREE.Group(); btn.userData = { hit: 'btn' }; g0.add(btn);   \u002F\u002F flash(btn) sinks it and lights it\n  const mat = capMat(); twCaps.push(mat); rbox(90, 60, 67, 60, 50, 8, 8, mat, btn);\n  label('PUSH', 30, 8, 7, onTop(120, 85, 75), btn);\n  frontInset(g0, 64, 150, 58, 112, 30, 4);                          \u002F\u002F recess on the front face (y = 150)\n  const scr = faceCanvas('front', 68, 150, 54, 104, 22, 10, g0);    \u002F\u002F a screen drawn on a canvas\n  const led = dotFront(160, 150, 18, 2, g0), ledGlow = glowPoints([W(160, 151, 18)], 0.2); g0.add(ledGlow);\n  slitsUV(frontUV(50, 150, 67), 14, 40, 3, 50, 56, g0);             \u002F\u002F hairline texture on the front\n  hazeAndShadow(g0, 120, 100, 2.6, 2.1);\n  creases(first);\n  const st = { n: 0 };\n  function readout() { if (active === 'clicker') document.getElementById('read').textContent = `${st.n} clicks`; }\n  function render() {\n    const { x, P } = scr, { C, A_ } = screenBg(scr, st.n > 0, 3);\n    x.fillStyle = st.n ? A_ : C.ink; x.font = `${14 * P}px ${MONO3}`; x.textAlign = 'center'; x.textBaseline = 'middle';\n    x.fillText(String(st.n).padStart(4, '0'), 52 * P, 11.5 * P); scr.tex.needsUpdate = true;\n    led.material = st.n % 2 ? ledOnMat : ledOffMat; ledGlow.material.uniforms.intensity.value = st.n % 2 ? 0.8 : 0;\n    readout();\n  }\n  const push = () => { st.n++; flash(btn, 120); SFX.button(); render(); return true; };\n  themeHooks.push(render); render();\n  return { group: g0, readout, demo: push, stop: () => {},\n    key: e => e.key === ' ' && !e.repeat ? push() : false,\n    click: hit => { let o = hit?.object; while (o && !o.userData.hit) o = o.parent; if (o) push(); },\n    tick: now => tickFlashes(now),\n    panel: [['Push', 'space', push]],\n    view: { target: W(120, 100, 40), dist: 6.4 },\n    info: '\u003Ch2>Clicker\u003C\u002Fh2>\u003Cp>Press the button (or space): it sinks, flashes and counts on the front screen; the LED toggles on every odd count.\u003C\u002Fp>',\n    hint: 'click the button · space' };\n})() });\n```\n\n### Module contract and helpers\n\nCoordinates are the SVG figures' units: +x right-down, +y left-down (the FRONT face is at the larger y), +z up; `W(x, y, z)` turns them into a three.js point (100 units = 1). `mod` returns `{ group, key(e) → bool, click(hit, event), tick(now, dt), stop(), readout(), demo(), panel: [[label, key, fn]], view: { target, dist }, info, hint }`; `readout` writes `#read` only when `active` is your id. Ids must not clash with the built-ins (`tw dr cs tm vm pc lp lg rk sk tt pl`).\n\n- Solids: `rbox(x,y,z,w,d,h,r,mat,parent)` (rounded in plan, sharp rims), `plateWith(g,w,d,screws,slot)` ground plate, `inset(x,y,z,w,d,r,parent)` \u002F `frontInset(parent,x,y,ztop,w,h,r)` \u002F `sideInset(parent,x,yRight,ztop,w,h,r)` recesses. Cylinders and other shapes: plain three.js meshes with `bodyMat`, then `addOutline(m); twMeshes.push(m)`.\n- Lines: call `creases(first)` once after building (`first` = `twMeshes.length` at the start); `seg([[a,b],…], parent, mat)`, `polyLine(points, mat, parent)`, `slitsUV(frontUV(x0,y,ztop) | sideUV(…) | topUV(…), u0, u1, step, v0, v1, parent)`. Materials: `lineMat` (detail), `majorMat` (folds), `accentLineMat` (a wire carrying signal: swap `line.material`).\n- Live parts: `capMat()` pushed to `twCaps`; `flash(group, ms)` sinks and lights it (`group.userData.pressAxis = 'z'` for front buttons that push in); a latched part keeps `mat.userData.base = 0.55`; call `tickFlashes(now)` in `tick`. `dotFront(x,y,z,r,parent)` + `ledOnMat`\u002F`ledOffMat` for LEDs.\n- Light: `glowPoints([W(…)], size)` (set `.material.uniforms.intensity.value`), `hazeAndShadow(g,cx,cy,w,d)` returns a haze material to fade in while on, real `THREE.SpotLight`\u002F`PointLight` for lamps and flashes. Glow sprites and haze are hidden automatically in the light theme, and lit `capMat` parts turn flat accent there.\n- Print and screens: `label(text,w,h,size,onTop(cx,cy,z) | onFront(cx,y,cz),parent,{align})`, `faceCanvas('top'|'front',x,y,z,w,h,P,parent,transparent)` + `screenBg(cv,on)` (returns `{C, A_}`: theme colours and the accent), `sideCanvas(…)`; redraw from `themeHooks.push(fn)` so theme and accent changes repaint.\n- Sound: `SFX.button() \u002F switch() \u002F key() \u002F coin() \u002F thunk() \u002F detent() \u002F bit(on)`, `tone(f, dur, peak, {type, to, at})`, `tap(freq, gain, q)`.\n- Movement along a wire: `bezier(…)`, `cumLen(pts)`, `alongPts(pts, cum, t)`, `moveGlow(sprite, p, intensity)`.\n\n### Bring your own model (.glb)\n\nEmbed the file as base64 (browsers block `fetch()` from `file:\u002F\u002F`): add `\u003Cscript type=\"application\u002Foctet-stream\" id=\"glb\">BASE64\u003C\u002Fscript>` before `\u003C\u002Fbody>`, and use this module. It scales the model and gives every mesh the dark body, the silhouette shell and crease hairlines:\n\n```js\nFIGS3D.push({ id: 'model', name: 'My model', mod: (() => {\n  const g0 = new THREE.Group(); g0.visible = false; scene.add(g0);\n  const SIZE = 3;                                                    \u002F\u002F longest side in scene units\n  const bin = Uint8Array.from(atob(document.getElementById('glb').textContent.trim()), c => c.charCodeAt(0));\n  new GLTFLoader().parse(bin.buffer, '', gltf => {\n    const root = gltf.scene; root.updateMatrixWorld(true);\n    const box = new THREE.Box3().setFromObject(root), size = box.getSize(new THREE.Vector3()), k = SIZE \u002F Math.max(size.x, size.y, size.z);\n    const c = box.getCenter(new THREE.Vector3()), first = twMeshes.length;\n    root.traverse(o => { if (!o.isMesh) return;\n      const geo = o.geometry.clone().applyMatrix4(o.matrixWorld).translate(-c.x, -box.min.y, -c.z).scale(k, k, k);\n      geo.deleteAttribute('uv'); geo.computeVertexNormals();\n      const m = new THREE.Mesh(geo, bodyMat); addOutline(m); twMeshes.push(m); g0.add(m); });\n    creases(first);\n  });\n  hazeAndShadow(g0, 0, 0, SIZE * 1.1, SIZE * 0.9);\n  const readout = () => { if (active === 'model') document.getElementById('read').textContent = 'drag to orbit · scroll to zoom'; };\n  return { group: g0, readout, demo: () => {}, stop: () => {}, key: () => false, click: () => {}, tick: now => tickFlashes(now),\n    panel: [], view: { target: new THREE.Vector3(0, SIZE * 0.25, 0), dist: SIZE * 2.4 },\n    info: '\u003Ch2>My model\u003C\u002Fh2>\u003Cp>Drag to orbit, scroll to zoom.\u003C\u002Fp>', hint: 'drag to orbit' };\n})() });\n```\n\nThen make it live: name the parts that should move or light (rotors, doors, lamps), give them pivots and a state, as in the built-in figures. Clean the model first when it needs it (Blender headless works well): split it into named parts, check handedness against the real object and mirror if needed, remove duplicate coincident faces (they flicker), delete glass and transparent panels (they glitch; leave open frames), and set rotation pivots from the geometry. Credit CC-BY models on the page (author, licence, \"restyled\").\n\n### Anatomy builds\n\nOnly when the user wants a real object taken apart (exploded views, section cut, part labels, true dimensions): read `references\u002Fanatomy-builds.md` before building. Skip it otherwise.\n\n### 3D rules (learned the hard way)\n\n- Lines stay 1 CSS px at every zoom; detail lines dimmer than folds, folds dimmer than the silhouette. Never a line-weight control.\n- No fake light: no cone beams, glowing glass plates, rotor-disc glows or glow on fans and exhausts. Light comes from a real source (a bulb, an LED, a screen) and lights real surfaces.\n- Build from the SVG figure's own box numbers when a 2D version exists; keep every interaction (keys, clicks, sound, readout, demo).\n- Light theme: the same accent as dark, lit parts flat accent, no ambient glow (the shell does this; don't add your own pools there).\n- Hold-to-act controls act on pointerdown; front buttons push in (`pressAxis: 'z'`); screens need their own canvas, redrawn on theme change.\n\n## Lumen style (solid, lit)\n\nA second look for the same figures: **filled, shaded objects with geometric light** (solid accent parts, light cones, beams, floor rings, rising square particles) instead of hairlines. Made for product showcases and web illustration: landing-page heroes, feature sections, onboarding. Use it when the user asks for Lumen, \"solid\" or \"filled\" isometric illustrations, product or landing-page illustrations, or shows glossy isometric icon references; otherwise use the hairline look above.\n\nRead `references\u002Flumen.md` first. It holds the build command (the kit `assets\u002Flumen\u002Fkit.js` goes before the figures and `assets\u002Flumen\u002Fpicker.js` after), the style rules, the kit API and three example figures in `assets\u002Flumen\u002Fexamples\u002F`. The figure contract, kernel and gallery template are unchanged.\n\n## Footer credit\n\nThe template ends with a light footer, **Made with ISO-GLOW ↗**, linking to https:\u002F\u002Fiso-glow.vercel.app. Keep it by default, including on single-figure pages you build without the template (a small, muted link under the figure). Remove it whenever the user asks or says they don't want it. Never turn it into an author credit such as \"Made by …\"; the finished work belongs to the user.\n\n## Don'ts\n\n- No real company logos, product silhouettes or trademarks on objects or screens; invent signage and glyphs.\n- No hand-written skewed polygons for faces; use `plane()`.\n- No external scripts; the page must run when opened from disk. (Exception: 3D mode loads three.js from cdn.jsdelivr.net through the template's import map.)\n- No hue anywhere except through the accent tokens.\n- Give the svg `role=\"img\"` and an `aria-label` that says what it is and how to operate it (the template sets this from `aria`).\n","# Iso glow\n\nInteractive isometric figures with glow lighting. Builds on **iso-figure** by Tolga Cohce (MIT, github.com\u002FMrBongoC\u002Fai-iso-skill): the projection kernel, the \"Fig N\" plate and the rule that every figure must do something real all come from there. This skill adds the lighting, colour palettes, a multi-figure gallery shell, and lessons from building twenty figures (desk objects and city buildings).\n\n## The look in one sentence\n\nA monochrome hairline drawing on a dark panel; **one accent colour, only on what is live** — and live things glow. Lit display content, the key you just pressed, a floor whose lights are on, a wire carrying signal, a sweeping beam. That contrast is the whole effect.\n\n## Fast path (follow this; it is quick and can't hang)\n\nYou never need to open `assets\u002Fgallery.html` or the example files. Everything required is on this page.\n\n1. **Write the figure to `fig.js`** in the working folder, starting from the starter below. Default to **one figure** unless the user asks for several (then put several `FIGS.push` calls in the file). Aim for roughly 150–300 lines.\n2. **Assemble the page with this one command** (it copies the template, sets the name and palette, and inserts `fig.js`). Replace `\u003Cskill folder>` with the base directory shown when this skill loaded (usually `~\u002F.claude\u002Fskills\u002Fiso-glow`), `NAME` with the piece's name and `PALETTE` with `ember` (default) or `city`:\n\n```bash\npython3 - \"\u003Cskill folder>\u002Fassets\u002Fgallery.html\" NAME.html fig.js \"NAME\" PALETTE \u003C\u003C'PY'\nimport sys\nsrc, out, fig, name, pal = sys.argv[1:6]\ns = open(src).read()\nfor a, b in [('\u003Ctitle>Iso Figures\u003C\u002Ftitle>', f'\u003Ctitle>{name}\u003C\u002Ftitle>'), ('Iso figures\u003C\u002Fspan>', f'{name}\u003C\u002Fspan>'),\n             (\"palette: 'ember'\", f\"palette: '{pal}'\"), ('\u002F* paste figure scripts here (see examples\u002F) *\u002F', open(fig).read())]:\n    assert a in s, a\n    s = s.replace(a, b, 1)\nopen(out, 'w').write(s)\nprint('wrote', out)\nPY\n```\n\n   No Python? Copy the template (`cp`) and make the same four text replacements with your edit tool, without reading the rest of the file.\n3. **Finish without browser automation.** Do **not** install or launch Playwright, Puppeteer, headless Chrome or any other browser tool: they need downloads or can hang indefinitely. Instead re-read `fig.js` once for obvious mistakes (`node --check fig.js` if Node is available), open the page in the user's normal browser and return immediately (`open NAME.html` on macOS, `xdg-open` on Linux, `start` on Windows), and tell the user what to click or press. If they report a problem, fix that. Some preview panes show local `file:\u002F\u002F` pages as static snapshots without running scripts, which makes a working page look blank.\n\n### Starter figure (complete and working: a lamp whose window lights up)\n\n```js\nFIGS.push({\n  id: 'lamp', name: 'Lamp', hint: 'Click the lamp · space toggles', aria: 'Isometric lamp. Click it or press space to switch it on.',\n  mount(stage, api) {\n    const K = api.iso.frame([[0,0,0],[200,0,0],[0,160,0],[200,160,0],[70,50,98]]);   \u002F\u002F extreme corners incl. tallest point\n    const { TOP, FRONT, box } = K;\n    let svg = box(0,0,0, 200,160,8, 12);                                                 \u002F\u002F ground plate\n    svg += `\u003Cg transform=\"${TOP(0,0,8)}\">\u003Crect class=\"detail\" x=\"8\" y=\"8\" width=\"184\" height=\"144\" rx=\"8\"\u002F>\u003C\u002Fg>`;\n    svg += `\u003Cg class=\"press\" id=\"lamp-body\">${box(70,50,8, 60,60,90, 6)}\u003C\u002Fg>`;          \u002F\u002F pressable body\n    svg += `\u003Cg transform=\"${FRONT(70,110,98)}\">\u003Crect id=\"lamp-glass\" class=\"face led\" filter=\"url(#soft)\" x=\"10\" y=\"12\" width=\"40\" height=\"40\" rx=\"4\"\u002F>\u003C\u002Fg>`;\n    stage.setAttribute('viewBox', K.viewBox); stage.innerHTML = svg;\n    const st = { on: false };\n    const glass = stage.querySelector('#lamp-glass'), body = stage.querySelector('#lamp-body');\n    function render() { glass.classList.toggle('hot', st.on); api.power(st.on); api.readout(st.on ? 'on' : 'off'); }\n    const toggle = () => { st.on = !st.on; render(); };\n    body.addEventListener('click', toggle);\n    render();\n    return { key: e => (e.key === ' ' || e.key === 'Enter') ? (toggle(), true) : false, demo: () => api.after(200, toggle) };\n  },\n});\n```\n\nGrow this: more `box()` parts for the object, detail drawn on face planes (`FRONT`\u002F`SIDE`\u002F`TOP` groups), one state object, one `render()`, keyboard and click calling the same functions, and a `demo()` that leaves it lit. Only what is live gets the accent (`.hot`, `.lit`, `.latched`).\n\n## Start from the template\n\n`assets\u002Fgallery.html` is a complete, self-contained page: tokens for dark and light themes, glow filters, the shared CSS vocabulary below, the kernel, navigation, the palette picker, and an empty slot for figures. Copy it (never read it), set `\u003Ctitle>` and the brand text, choose a palette in `window.GALLERY`, and paste the figure code over the placeholder `\u002F* paste figure scripts here (see examples\u002F) *\u002F`. The placeholder is already inside a `\u003Cscript>` tag, so paste plain JavaScript (one `FIGS.push({...})` per figure), not another `\u003Cscript>` tag. With one figure the sidebar simply lists one item; delete the nav if you want a bare plate.\n\n`assets\u002Fexamples\u002Fdesk-computer.js` (typing, power toggle, coiled cable with a light pulse) and `assets\u002Fexamples\u002Foffice-tower.js` (window grids, floor toggles, cascading lights) are complete figures. You don't need to read them; the starter figure above shows the structure.\n\n## Figure contract\n\n```js\nFIGS.push({\n  id: 'lamp', name: 'Desk lamp', hint: 'Click the switch · ↑↓ dim', aria: 'Isometric desk lamp. …',\n  css: `[data-fig=\"lamp\"] …`,            \u002F\u002F optional, always scoped to the figure\n  mount(stage, api) {                      \u002F\u002F stage: a fresh \u003Csvg> per mount\n    const K = api.iso.frame([\u002F* extreme 3D corners, incl. the tallest point *\u002F]);\n    const { P, D, TOP, FRONT, SIDE, rect, box, boxc, path } = K;\n    stage.setAttribute('viewBox', K.viewBox); stage.innerHTML = svg;\n    \u002F\u002F listeners on stage; one state object; one render()\n    return { key(e) { \u002F* true if handled *\u002F }, keyup(e) {}, unmount() {}, demo() {} };\n  },\n});\n```\n\n`api`: `iso.frame(points)` (kernel + 4:3 viewBox), `iso.slits(a0,a1,step,b0,b1,vertical=true,cls='detail')` (parallel hairlines at a0, a0+step … a1, each spanning b0→b1, in face-local units; vertical lines by default), `iso.esc`, `readout(str)`, `audio()` → `{ctx,out,analyser}` (call inside a user gesture), `after(ms,fn)` \u002F `every(ms,fn)` \u002F `loop(fn)` (all auto-cleared on unmount; `loop` calls `fn(timestampMs)` every animation frame and returns a stop function, so animate from the timestamp rather than counting frames), `flash(el)` (press + glow, then fade), `replay(el,'go')` (restart a one-shot animation such as a pulse), `power(bool)` (warm haze behind the figure while it is on). The figure's `name` becomes the \"Fig N · Name\" label, the sidebar entry and the browser-tab title; the template's brand text (`Iso figures`) is the only other name to change. Prefix every id with the figure id. `demo()` is a short scripted sequence using the same functions as real input; it runs with `?demo`, or on every arrival when `GALLERY.autoDemo` is true, so a figure can open already lit.\n\n## Kernel (from iso-figure)\n\n```js\nconst C = Math.cos(Math.PI\u002F6), S = Math.sin(Math.PI\u002F6);\nconst P = (x,y,z) => [(x-y)*C + OX, (x+y)*S - z + OY];\nconst D = (x,y,z) => [(x-y)*C, (x+y)*S - z];\nconst plane = (O,U,V) => { const o=P(...O), u=D(...U), v=D(...V); return `matrix(${u[0]} ${u[1]} ${v[0]} ${v[1]} ${o[0]} ${o[1]})`; };\nconst TOP   = (x,y,z) => plane([x,y,z],[1,0,0],[0,1,0]);\nconst FRONT = (x,y,z) => plane([x,y,z],[1,0,0],[0,0,-1]);   \u002F\u002F y = max face, lower-left\nconst SIDE  = (x,y,z) => plane([x,y,z],[0,-1,0],[0,0,-1]);  \u002F\u002F x = max face, lower-right\n```\n\n+x runs down-right, +y down-left, +z up. Draw ordinary rects, text and paths inside `\u003Cg transform=\"${FRONT(x, y+d, z+h)}\">` (face top-left corner, local v grows downward) and they land on the plane. A box is its three visible faces. `box(x,y,z,w,d,h,r)` always draws a full, opaque top over its whole footprint, so don't use it for thin trim, ledges or bands that sit against a wall (the top would cover what is above or behind); draw those as flat strips on the wall's FRONT\u002FSIDE plane instead. `rect(transform, w, h, r = 0, cls = 'face')` draws one rectangle on a plane, e.g. `rect(FRONT(x, y+d, z+h), w, 4, 0, 'face')` for a strip. Paint order is the only depth sort: back to front (smaller x+y first, lower z first). Faces need opaque fills. `vector-effect: non-scaling-stroke` on every stroke.\n\n## Glow kit (classes in the template)\n\n| Class | Use |\n|---|---|\n| `.face`, `.face.top`, `.face.recess`, `.detail`, `.label` | structure, decks, insets, hairline texture, printed text |\n| `.press` + `.down` \u002F `.lit` \u002F `.latched` | pressable part; sinks 3px; transient orange glow (`api.flash`); persistent on-state |\n| `.glass` + `.hot` | display glass, lit: warm fill + accent stroke |\n| `.halo` + `.hot` with `filter=\"url(#bloom)\"` | soft light spilling behind a lit glass, beam or bulb |\n| `.scr`, `.scr-accent` | lit display content |\n| `.led` + `.hot` | indicator on |\n| `.wire` + `.hot`, `.wire-under` | wire, carrying signal; background-coloured stroke under it for crossings |\n| `.pulse` + `.go` on a `path` with `pathLength=\"1000\"` | a dash of light travelling along a wire (`api.replay`) |\n| filters `#glow`, `#soft`, `#bloom` | strong glow, subtle glow, blur only |\n\nColour only through tokens: `--body --deck --line --detail --recess --ink --ink-hi --glass --glass-on --accent --accent-hi --accent-dim --panel`. Never a literal hue in a figure, or the palette picker and light theme break.\n\n## Palettes\n\nSet `window.GALLERY.palette` to `'ember'` (Ember, Cyan, Lime, Violet, Rose, Ice) or `'city'` (Sodium street-lamp amber, Tungsten, Neon, Signal, Dusk, Moon), or pass your own `[[name, darkAccent, darkHi, lightAccent, lightHi], …]`. Pick a set that matches the subject: city lights for buildings, warm ember for desk objects. The light theme uses **the same accent as the dark theme**; only near-white colours (Ice, Moon) get a dark light-theme variant, because white would vanish on a pale panel. The choice is remembered per viewer.\n\n**Light theme has no glow.** It keeps the accent fills, strokes and lit text exactly as in the dark theme but drops every ambient, radiating light: the template turns `#glow`\u002F`#soft` into pass-through and `#bloom` into nothing, and hides `.halo` in the light theme. Don't add light pools, beams or haze that only work as glow; in the light theme a lit thing is a flat, bright accent.\n\n## Procedure\n\n1. **Name the output** of each figure before drawing: typed text, a number, a sound, lights that switch, a vehicle that moves. A figure you can only watch is decoration.\n2. **Decompose** into 3–8 boxes; write `(x,y,z,w,d,h)` down first. Give the long, detailed face to FRONT or SIDE.\n3. **Draw back to front**, detail on faces, texture by repetition (slits, window grids, ribs). Start from a ground plate (rounded box, inset line, screws).\n4. **Light it**: decide what glows in each state. At least one large lit element per figure (a display, a lit floor band, a beam, a sign) should read as solid accent with bloom.\n5. **Wire state**: one state object, one `render()`, keyboard and pointer calling the same functions. Readout bottom-right, terse and lowercase: `on · 9 chars · key t`.\n6. **Frame** with `api.iso.frame` including the tallest point. **Finish** as in Fast path step 3: open it in the user's browser and hand over; no browser automation.\n\n## Lessons (from building twenty figures)\n\n- **Make the lit state unmistakable.** A faint glow was the most common failure. Push opacity and bloom until it reads at thumbnail size.\n- **Point the detail at the viewer.** Only the top, FRONT and SIDE faces show. A server rack with its front on the narrow face looked like a blank box.\n- **Moving things**: animate with `api.loop`, timed from `performance.now()`; move along an axis by translating with `D(dx,dy,dz)`. Objects that pass in front of and behind others need their draw order recomputed per frame.\n- **Filters on straight lines**: the template's filters use `filterUnits=\"userSpaceOnUse\"` because a perfectly horizontal or vertical path has a zero-height box and vanishes under a default filter region.\n- **Escape before writing text into SVG**; clip scrolling screen text to its glass with a `\u003CclipPath>`.\n- **Rounded boxes**: `box(..., r)` draws a rounded top plus one continuous side wall, so corners line up. Don't round the FRONT and SIDE faces separately; three separately rounded faces leave notched, misaligned corners.\n- **Round things** (domes, lamp shades, beams) can be drawn as hulls of projected circles or as stacked boxes; keep the hairline style.\n- **After a nav click, focus the stage** (the template does this) so Space and Enter go to the figure instead of re-clicking the button.\n- Audio only after a user gesture; wrap it in try\u002Fcatch.\n\n## 3D mode\n\nUse it when the user asks for 3D, something to orbit, a true isometric view of a real model, or gives you a `.glb`\u002F`.gltf`. Same look as the SVG figures: dark hairline drawing, one accent colour on what is live, every figure does something real. The page is built on three.js; you never write a renderer, lines, lights or UI.\n\n`assets\u002Fgallery-3d.html` is the complete shell: renderer, three line tiers (silhouette shell, major folds, dim detail, always 1 CSS px), crease extraction, light points and soft pools, dark\u002Flight themes, accent picker (Ember, Cyan, Lime, Violet, Rose, Ice), **Revolve** toggle, **Iso view** (true orthographic isometric), per-figure button panel, readout, sound helpers and twelve working figures that double as references (typewriter, drum machine, cassette deck, kitchen timer, vending machine, computer, lamp, logic board, server rack, system stack, turntable, instant camera). Copy it, never read it. When you paste figures into its `FIGS3D` slot only yours get tabs (one figure: no tab bar).\n\n### Fast path\n\n1. Write the figure module to `fig3d.js`, starting from the starter below (aim for 100–250 lines).\n2. Assemble:\n\n```bash\npython3 - \"\u003Cskill folder>\u002Fassets\u002Fgallery-3d.html\" NAME.html fig3d.js \"NAME\" \u003C\u003C'PY'\nimport sys\nsrc, out, fig, name = sys.argv[1:5]\ns = open(src).read()\nfor a, b in [('\u003Ctitle>Iso 3D\u003C\u002Ftitle>', f'\u003Ctitle>{name}\u003C\u002Ftitle>'), ('\u003Ci>\u003C\u002Fi>Iso 3D\u003C\u002Fdiv>', f'\u003Ci>\u003C\u002Fi>{name}\u003C\u002Fdiv>'),\n             ('\u002F* paste 3D figure modules here *\u002F', open(fig).read())]:\n    assert a in s, a\n    s = s.replace(a, b, 1)\nopen(out, 'w').write(s)\nprint('wrote', out)\nPY\n```\n\n3. Check `fig3d.js` (`node --check` won't parse it on its own because it uses the page's helpers, so re-read it once), open the page in the user's browser (it needs internet once for three.js) and hand over, as in the 2D fast path. No browser automation.\n\n### Starter 3D figure (complete: a button that counts on a lit screen)\n\n```js\nFIGS3D.push({ id: 'clicker', name: 'Clicker', mod: (() => {\n  const g0 = new THREE.Group(); g0.visible = false; scene.add(g0);\n  const first = twMeshes.length;                                    \u002F\u002F parts built from here get crease lines\n  plateWith(g0, 240, 200, [[18, 18], [222, 18], [18, 182], [222, 182]]);\n  rbox(50, 40, 7, 140, 110, 60, 10, bodyMat, g0);                   \u002F\u002F body: x, y, z, w (x), d (y), h (z), plan radius\n  const btn = new THREE.Group(); btn.userData = { hit: 'btn' }; g0.add(btn);   \u002F\u002F flash(btn) sinks it and lights it\n  const mat = capMat(); twCaps.push(mat); rbox(90, 60, 67, 60, 50, 8, 8, mat, btn);\n  label('PUSH', 30, 8, 7, onTop(120, 85, 75), btn);\n  frontInset(g0, 64, 150, 58, 112, 30, 4);                          \u002F\u002F recess on the front face (y = 150)\n  const scr = faceCanvas('front', 68, 150, 54, 104, 22, 10, g0);    \u002F\u002F a screen drawn on a canvas\n  const led = dotFront(160, 150, 18, 2, g0), ledGlow = glowPoints([W(160, 151, 18)], 0.2); g0.add(ledGlow);\n  slitsUV(frontUV(50, 150, 67), 14, 40, 3, 50, 56, g0);             \u002F\u002F hairline texture on the front\n  hazeAndShadow(g0, 120, 100, 2.6, 2.1);\n  creases(first);\n  const st = { n: 0 };\n  function readout() { if (active === 'clicker') document.getElementById('read').textContent = `${st.n} clicks`; }\n  function render() {\n    const { x, P } = scr, { C, A_ } = screenBg(scr, st.n > 0, 3);\n    x.fillStyle = st.n ? A_ : C.ink; x.font = `${14 * P}px ${MONO3}`; x.textAlign = 'center'; x.textBaseline = 'middle';\n    x.fillText(String(st.n).padStart(4, '0'), 52 * P, 11.5 * P); scr.tex.needsUpdate = true;\n    led.material = st.n % 2 ? ledOnMat : ledOffMat; ledGlow.material.uniforms.intensity.value = st.n % 2 ? 0.8 : 0;\n    readout();\n  }\n  const push = () => { st.n++; flash(btn, 120); SFX.button(); render(); return true; };\n  themeHooks.push(render); render();\n  return { group: g0, readout, demo: push, stop: () => {},\n    key: e => e.key === ' ' && !e.repeat ? push() : false,\n    click: hit => { let o = hit?.object; while (o && !o.userData.hit) o = o.parent; if (o) push(); },\n    tick: now => tickFlashes(now),\n    panel: [['Push', 'space', push]],\n    view: { target: W(120, 100, 40), dist: 6.4 },\n    info: '\u003Ch2>Clicker\u003C\u002Fh2>\u003Cp>Press the button (or space): it sinks, flashes and counts on the front screen; the LED toggles on every odd count.\u003C\u002Fp>',\n    hint: 'click the button · space' };\n})() });\n```\n\n### Module contract and helpers\n\nCoordinates are the SVG figures' units: +x right-down, +y left-down (the FRONT face is at the larger y), +z up; `W(x, y, z)` turns them into a three.js point (100 units = 1). `mod` returns `{ group, key(e) → bool, click(hit, event), tick(now, dt), stop(), readout(), demo(), panel: [[label, key, fn]], view: { target, dist }, info, hint }`; `readout` writes `#read` only when `active` is your id. Ids must not clash with the built-ins (`tw dr cs tm vm pc lp lg rk sk tt pl`).\n\n- Solids: `rbox(x,y,z,w,d,h,r,mat,parent)` (rounded in plan, sharp rims), `plateWith(g,w,d,screws,slot)` ground plate, `inset(x,y,z,w,d,r,parent)` \u002F `frontInset(parent,x,y,ztop,w,h,r)` \u002F `sideInset(parent,x,yRight,ztop,w,h,r)` recesses. Cylinders and other shapes: plain three.js meshes with `bodyMat`, then `addOutline(m); twMeshes.push(m)`.\n- Lines: call `creases(first)` once after building (`first` = `twMeshes.length` at the start); `seg([[a,b],…], parent, mat)`, `polyLine(points, mat, parent)`, `slitsUV(frontUV(x0,y,ztop) | sideUV(…) | topUV(…), u0, u1, step, v0, v1, parent)`. Materials: `lineMat` (detail), `majorMat` (folds), `accentLineMat` (a wire carrying signal: swap `line.material`).\n- Live parts: `capMat()` pushed to `twCaps`; `flash(group, ms)` sinks and lights it (`group.userData.pressAxis = 'z'` for front buttons that push in); a latched part keeps `mat.userData.base = 0.55`; call `tickFlashes(now)` in `tick`. `dotFront(x,y,z,r,parent)` + `ledOnMat`\u002F`ledOffMat` for LEDs.\n- Light: `glowPoints([W(…)], size)` (set `.material.uniforms.intensity.value`), `hazeAndShadow(g,cx,cy,w,d)` returns a haze material to fade in while on, real `THREE.SpotLight`\u002F`PointLight` for lamps and flashes. Glow sprites and haze are hidden automatically in the light theme, and lit `capMat` parts turn flat accent there.\n- Print and screens: `label(text,w,h,size,onTop(cx,cy,z) | onFront(cx,y,cz),parent,{align})`, `faceCanvas('top'|'front',x,y,z,w,h,P,parent,transparent)` + `screenBg(cv,on)` (returns `{C, A_}`: theme colours and the accent), `sideCanvas(…)`; redraw from `themeHooks.push(fn)` so theme and accent changes repaint.\n- Sound: `SFX.button() \u002F switch() \u002F key() \u002F coin() \u002F thunk() \u002F detent() \u002F bit(on)`, `tone(f, dur, peak, {type, to, at})`, `tap(freq, gain, q)`.\n- Movement along a wire: `bezier(…)`, `cumLen(pts)`, `alongPts(pts, cum, t)`, `moveGlow(sprite, p, intensity)`.\n\n### Bring your own model (.glb)\n\nEmbed the file as base64 (browsers block `fetch()` from `file:\u002F\u002F`): add `\u003Cscript type=\"application\u002Foctet-stream\" id=\"glb\">BASE64\u003C\u002Fscript>` before `\u003C\u002Fbody>`, and use this module. It scales the model and gives every mesh the dark body, the silhouette shell and crease hairlines:\n\n```js\nFIGS3D.push({ id: 'model', name: 'My model', mod: (() => {\n  const g0 = new THREE.Group(); g0.visible = false; scene.add(g0);\n  const SIZE = 3;                                                    \u002F\u002F longest side in scene units\n  const bin = Uint8Array.from(atob(document.getElementById('glb').textContent.trim()), c => c.charCodeAt(0));\n  new GLTFLoader().parse(bin.buffer, '', gltf => {\n    const root = gltf.scene; root.updateMatrixWorld(true);\n    const box = new THREE.Box3().setFromObject(root), size = box.getSize(new THREE.Vector3()), k = SIZE \u002F Math.max(size.x, size.y, size.z);\n    const c = box.getCenter(new THREE.Vector3()), first = twMeshes.length;\n    root.traverse(o => { if (!o.isMesh) return;\n      const geo = o.geometry.clone().applyMatrix4(o.matrixWorld).translate(-c.x, -box.min.y, -c.z).scale(k, k, k);\n      geo.deleteAttribute('uv'); geo.computeVertexNormals();\n      const m = new THREE.Mesh(geo, bodyMat); addOutline(m); twMeshes.push(m); g0.add(m); });\n    creases(first);\n  });\n  hazeAndShadow(g0, 0, 0, SIZE * 1.1, SIZE * 0.9);\n  const readout = () => { if (active === 'model') document.getElementById('read').textContent = 'drag to orbit · scroll to zoom'; };\n  return { group: g0, readout, demo: () => {}, stop: () => {}, key: () => false, click: () => {}, tick: now => tickFlashes(now),\n    panel: [], view: { target: new THREE.Vector3(0, SIZE * 0.25, 0), dist: SIZE * 2.4 },\n    info: '\u003Ch2>My model\u003C\u002Fh2>\u003Cp>Drag to orbit, scroll to zoom.\u003C\u002Fp>', hint: 'drag to orbit' };\n})() });\n```\n\nThen make it live: name the parts that should move or light (rotors, doors, lamps), give them pivots and a state, as in the built-in figures. Clean the model first when it needs it (Blender headless works well): split it into named parts, check handedness against the real object and mirror if needed, remove duplicate coincident faces (they flicker), delete glass and transparent panels (they glitch; leave open frames), and set rotation pivots from the geometry. Credit CC-BY models on the page (author, licence, \"restyled\").\n\n### Anatomy builds\n\nOnly when the user wants a real object taken apart (exploded views, section cut, part labels, true dimensions): read `references\u002Fanatomy-builds.md` before building. Skip it otherwise.\n\n### 3D rules (learned the hard way)\n\n- Lines stay 1 CSS px at every zoom; detail lines dimmer than folds, folds dimmer than the silhouette. Never a line-weight control.\n- No fake light: no cone beams, glowing glass plates, rotor-disc glows or glow on fans and exhausts. Light comes from a real source (a bulb, an LED, a screen) and lights real surfaces.\n- Build from the SVG figure's own box numbers when a 2D version exists; keep every interaction (keys, clicks, sound, readout, demo).\n- Light theme: the same accent as dark, lit parts flat accent, no ambient glow (the shell does this; don't add your own pools there).\n- Hold-to-act controls act on pointerdown; front buttons push in (`pressAxis: 'z'`); screens need their own canvas, redrawn on theme change.\n\n## Lumen style (solid, lit)\n\nA second look for the same figures: **filled, shaded objects with geometric light** (solid accent parts, light cones, beams, floor rings, rising square particles) instead of hairlines. Made for product showcases and web illustration: landing-page heroes, feature sections, onboarding. Use it when the user asks for Lumen, \"solid\" or \"filled\" isometric illustrations, product or landing-page illustrations, or shows glossy isometric icon references; otherwise use the hairline look above.\n\nRead `references\u002Flumen.md` first. It holds the build command (the kit `assets\u002Flumen\u002Fkit.js` goes before the figures and `assets\u002Flumen\u002Fpicker.js` after), the style rules, the kit API and three example figures in `assets\u002Flumen\u002Fexamples\u002F`. The figure contract, kernel and gallery template are unchanged.\n\n## Footer credit\n\nThe template ends with a light footer, **Made with ISO-GLOW ↗**, linking to https:\u002F\u002Fiso-glow.vercel.app. Keep it by default, including on single-figure pages you build without the template (a small, muted link under the figure). Remove it whenever the user asks or says they don't want it. Never turn it into an author credit such as \"Made by …\"; the finished work belongs to the user.\n\n## Don'ts\n\n- No real company logos, product silhouettes or trademarks on objects or screens; invent signage and glyphs.\n- No hand-written skewed polygons for faces; use `plane()`.\n- No external scripts; the page must run when opened from disk. (Exception: 3D mode loads three.js from cdn.jsdelivr.net through the template's import map.)\n- No hue anywhere except through the accent tokens.\n- Give the svg `role=\"img\"` and an `aria-label` that says what it is and how to operate it (the template sets this from `aria`).\n",{},"main","3ae3bc0cf4ff6299a28a9721fecddc617cf23713","skills\u002Fiso-glow","https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit","https:\u002F\u002Fgithub.com\u002Firfanfaraaz","irfanfaraaz.in","AI-native Software Engineer","2026-10-20 19:39:08",{"source":7,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add irfanfaraaz\u002Fclaude-kit --skill iso-glow",{"tool":38,"command":39},"bunx","bunx skills add irfanfaraaz\u002Fclaude-kit --skill iso-glow",{"tool":41,"command":42},"pnpm","pnpm dlx skills add irfanfaraaz\u002Fclaude-kit --skill iso-glow","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fiso-glow\u002FSKILL.md",true,[46,52,56,60,66,70,74,78,82,86,90,94,100],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"assets\u002Fexamples\u002Fdesk-computer.js","SCRIPT","脚本",8242,"https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fiso-glow\u002Fassets\u002Fexamples\u002Fdesk-computer.js",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"assets\u002Fexamples\u002Flens-camera-3d.js",80561,"https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fiso-glow\u002Fassets\u002Fexamples\u002Flens-camera-3d.js",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"assets\u002Fexamples\u002Foffice-tower.js",11734,"https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fiso-glow\u002Fassets\u002Fexamples\u002Foffice-tower.js",{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"assets\u002Fgallery-3d.html","ASSET","资产文件",236792,"https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fiso-glow\u002Fassets\u002Fgallery-3d.html",{"path":67,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":68,"sourceHtmlUrl":69},"assets\u002Fgallery.html",25249,"https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fiso-glow\u002Fassets\u002Fgallery.html",{"path":71,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":72,"sourceHtmlUrl":73},"assets\u002Flumen\u002Fexamples\u002Fcard-terminal.js",13819,"https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fiso-glow\u002Fassets\u002Flumen\u002Fexamples\u002Fcard-terminal.js",{"path":75,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":76,"sourceHtmlUrl":77},"assets\u002Flumen\u002Fexamples\u002Feth-blocks.js",8347,"https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fiso-glow\u002Fassets\u002Flumen\u002Fexamples\u002Feth-blocks.js",{"path":79,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":80,"sourceHtmlUrl":81},"assets\u002Flumen\u002Fexamples\u002Fvault-safe.js",10675,"https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fiso-glow\u002Fassets\u002Flumen\u002Fexamples\u002Fvault-safe.js",{"path":83,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":84,"sourceHtmlUrl":85},"assets\u002Flumen\u002Fkit.js",15858,"https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fiso-glow\u002Fassets\u002Flumen\u002Fkit.js",{"path":87,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":88,"sourceHtmlUrl":89},"assets\u002Flumen\u002Fpicker.js",16161,"https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fiso-glow\u002Fassets\u002Flumen\u002Fpicker.js",{"path":91,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":93,"sourceHtmlUrl":15},"LICENSE","许可证",1194,{"path":95,"resourceType":96,"resourceTypeDesc":97,"sizeBytes":98,"sourceHtmlUrl":99},"references\u002Fanatomy-builds.md","REFERENCE","参考文档",3550,"https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fiso-glow\u002Freferences\u002Fanatomy-builds.md",{"path":101,"resourceType":96,"resourceTypeDesc":97,"sizeBytes":102,"sourceHtmlUrl":103},"references\u002Flumen.md",7506,"https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fiso-glow\u002Freferences\u002Flumen.md",[105,114,122,130,137,144],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":109,"licenseFileUrl":110,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":19},"01M7E86STEC48SA7NJPTKS52X6","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":109,"licenseFileUrl":118,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":19},"01M7E86KJEDAHV8X8TAZVJGH20","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fweb-artifacts-builder\u002FSKILL.md",[],[],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":126,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":19},"01M7E85NJYTPHAFDTEEDX2YSHD","video-use","Edit any video by conversation. Transcribe, cut, color grade, generate overlay animations, burn subtitles — for talking heads, montages, tutorials, travel, interviews. No presets, no menus. Ask questions, confirm the plan, execute, iterate, persist. Production-correctness rules are hard; everything else is artistic freedom.","https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fvideo-use\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fvideo-use\u002FSKILL.md",[],[],{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":19},"01M7E85B7TYMKMW2CTH86PENS7","vercel-react-native-skills","React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.","https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fvercel-react-native-skills\u002FSKILL.md",[],[],{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":19},"01M7E847V548VFTH4TK2VQWAMC","threejs","Build 3D web apps with Three.js (WebGL\u002FWebGPU). Use for 3D scenes, animations, custom shaders, PBR materials, VR\u002FXR experiences, games, data visualizations, product configurators.","https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fthreejs\u002FSKILL.md",[],[],{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":148,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":19},"01M7E83TBAQ8K371G1NS0NFXQA","threads-carousel","Convert text posts into visual carousel images or presentations for Threads, Instagram, LinkedIn, TikTok, YouTube. 12 slide types (incl. image\u002Femoji\u002Fnumber), 6 format presets (incl. 1920×1080 wide), 8 background styles (incl. ruled paper), 3-axis style system (font × color × purpose), highlighted keywords with optional italic-box style. Generates PNG or single-file PDF via Next.js preview + browser export. RU\u002FEN toolbar. Triggers: threads carousel, instagram carousel, linkedin carousel, tiktok carousel, карусель, slides, carousel images, presentation deck, presentation pdf.","https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fthreads-carousel\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Firfanfaraaz\u002Fclaude-kit\u002Fblob\u002Fmain\u002Fskills\u002Fthreads-carousel\u002FSKILL.md",[],[]]