[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DDVBCYXW6TN4NWGPKT244C":3,"skill-same:01M7DDVBCYXW6TN4NWGPKT244C":83},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M7DDVBCYXW6TN4NWGPKT244C","colorfigures",null,"Use when someone wants a colourful, hand-drawn or sketchy isometric figure of an everyday object or machine, such as a toaster, kettle, lamp, or claw machine; a Colorfigures figure; a \"how does X work\" or \"what's inside X\" cutaway; or a clickable object illustration as one HTML page. For a precise technical figure that explains an idea, use anatomy.","pascalandy\u002Fskills","pascalandy","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6694151?v=4","01M7DDRR1T4AMR6J3FV6RHHV5M","Pascal Andy","01M7DDRR2B04BJ8S7QZYZV1WFK",0,"MIT","https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fauthoring\u002Fandy\u002Fcolorfigures\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fauthoring\u002Fandy\u002Fcolorfigures\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: \"colorfigures\"\ndescription: \"Use when someone wants a colourful, hand-drawn or sketchy isometric figure of an everyday object or machine, such as a toaster, kettle, lamp, or claw machine; a Colorfigures figure; a \\\"how does X work\\\" or \\\"what's inside X\\\" cutaway; or a clickable object illustration as one HTML page. For a precise technical figure that explains an idea, use anatomy.\"\nkind: \"general\"\n---\n\n# Colorfigures\n\nHand-inked, flat-coloured isometric objects you can turn round, see inside and play with. Each figure is one HTML\npage: a small engine (`assets\u002Fcore.js`) plus your figure script, which models the object in 3D and draws it with the\nengine's shapes. The engine owns the camera (drag to turn, a Turntable and Front view button, arrow keys), the\nshading (three flat tones by the way a face meets the light, which turns with the viewer), the ink and the cast\nshadow. `scripts\u002Fbuild.py` makes the finished page: it inlines the engine and adds zoom, notices, the See-through \u002F\nLabels switches and the phone layout.\n\nA figure has three looks, all from the same model:\n1. **The object**, closed, as you would see it in a shop: correct from every side, back and underside included.\n2. **See-through**: the case fades to a ghost and the real working parts show inside it, moving with the buttons.\n3. **Labels**: short name tags on the parts, lit in the accent colour while that part is working.\n\n## Workflow\n\n1. **Set up:** copy `assets\u002Fcore.js` next to your figure (the page loads it with `\u003Cscript src=\"core.js\">` while you work).\n2. **Read the references** before writing. They are complete demo figures:\n   - `assets\u002Fexamples\u002Ftoaster.html`: the smallest. A rounded case, a lever, bread that toasts and pops, and a\n     see-through with heating cards, carriage, spring, latch and bimetal strip.\n   - `assets\u002Fexamples\u002Flamp.html`: a scene on a desk board with a jointed arm, a light pool and parts sorted per angle.\n   - `assets\u002Fexamples\u002Fclaw.html`: a big machine with glass, a game played on a keypad, stats, and a dense\n     see-through (gantry, motors, harness, coin path).\n   Read `core.js` too: its helpers are short and commented, and the `mountFigure({...})` options are listed above it.\n3. **Research the real object** (below, *Truth first*) and write the notes and the parts list at the top of your\n   figure script before any geometry.\n4. **Write `figure.html`** (name it after the object): a doctype\u002Fhead shell, `\u003Cscript src=\"core.js\">\u003C\u002Fscript>`, then one\n   inline `\u003Cscript>` that defines the geometry and calls `mountFigure({...})`, then `xrMount(() => ui, () => '')`.\n5. **Look at it from every side** with headless Chrome (*Verify*), fix, repeat (at most 3 rounds).\n6. **Build one file:** `uv run \"\u003Cskill folder>\u002Fscripts\u002Fbuild.py\" figure.html OUT.html`. Hand over OUT.html and say\n   what the buttons do (the page shows no instructions).\n\n## Truth first (how the real thing is built)\n\nThe figure is only as good as its model of the real object. Before drawing:\n- **Write how it really works** as a short list of steps, and where every material is after each one (coin in the\n  slot → coin chute → acceptor → cash box; water in the tank → pump → boiler → group → cup). Each button is one real\n  step and things only move along their real path.\n- **Write the parts list in the code** (a comment block, grouped: case, structure, mechanism, power, controls). For\n  the see-through aim for 30–60 real parts: motors, gears, shafts, springs, boards, sensors, wiring, tubes, brackets.\n  Look up proportions you are unsure of (a home espresso tank is 1.5–2.5 L: nearly full height, half the width).\n- **Every part is held by another**: name what it is fixed to. Nothing floats. Cables and tubes run from a real port\n  to a real port along walls and floor, never across open space.\n- **Every driving part touches what it drives** (shaft to gear, gear rim to gear rim, pipe end to port): work the\n  contact points out with numbers.\n- **Lay out moving paths with numbers**: a capsule's fall, a coin's drop or a tube must clear every gear and shaft.\n  Things moving into a container go up and over the rim, then down inside.\n- **Scale things people use against people**: a push button at hand height (~1.1 m), facing where people stand.\n- For buildings, research the building type first (for heritage types, the planning authority's own guide).\n\n## Coordinates and camera\n- `x` = depth (the front face is at `x = W`), `y` = width (+y goes viewer-left at the default view), `z` = up.\n  Ground at `z = 0`. Scale ≈ 1 unit per cm (washer 62 × 65 × 88); small objects (a kettle) can be modelled bigger\n  (60–100 units) so detail reads. Framing and line weight adapt automatically.\n- The engine turns the camera; your scene is redrawn for the current view. `YAW`, `PITCH` (degrees) and `CAM_V` (unit\n  vector toward the viewer) are readable. `?yaw=200&pitch=40` sets the view; `?free=1` lifts the turning limit.\n- A figure turns ±60° around its front until you have checked it from every side; then add `turn:'full'` to its\n  `mountFigure({...})` call and it turns all the way round. Ship with `turn:'full'` unless something can't be fixed.\n- `size` = the object's true bounding box (handles, trays, a lifted part at its highest). `center:[x, y]` if the\n  object isn't centred in it.\n\n## Drawing correctly from every angle (there is no depth buffer)\n\nThe most repeated bugs, in order. Check every one before handing over.\n1. **Never write a fixed back-to-front order.** \"A then B\" is only true for one view. Every separate part goes\n   through `byDepth([{ at:[x,y,z], box:[[x0,y0,z0],[x1,y1,z1]], svg }])`, and **every part gets a `box`**: two boxes\n   separated along an axis sort by which side the viewer is on; a centre point alone gets long or wrapping parts\n   wrong (a pole beside keys, a spout past a cup, a door beside its shelves). A function that draws several things\n   one after another is a fixed order too: return items and sort them.\n2. **Faces: draw a face, and everything on it, only when it faces the viewer**: `vis(n)` \u002F `facing(n)`. Buttons,\n   displays, decals, windows, knobs, and their labels included. Something mounted on a face is drawn in front of the\n   body while that face is toward you and *before* the body when it turns away, so the body hides it.\n3. **Parts with no single correct order** (a fan head, a jug with a handle): test which side faces the viewer and\n   write both orders: facing → far end first; facing away → the exact reverse.\n4. **Things that wrap other things are split**: far half, contents, near half (`openShell(A, B, colour, contents)`\n   for cups, cones, bins, drums). Never hard-code the visible half of a ring: `nearHalf()` \u002F `farHalf()`.\n5. **Split tall parts by height** (a pole, a stand, a spine): one section per thing beside it, each only as thick\n   as the part, or sorting loops appear. When many long parts overlap, sort only the pairs that overlap on screen.\n6. **Every solid has its far end and every face**: caps on whichever end faces the viewer, doors and flaps with both\n   faces and both edges, wheels and plates with thickness and a rim (nothing real is a flat disc), open tubes with a\n   rim and a dark bore.\n7. **Concave parts are built from convex pieces** (`extrude`\u002F`loft` handle convex profiles only), each with its own\n   ink; no ink on the joins.\n8. **Real objects have backs**: service panels, cords, coils, vents, a chassis under a truck. Parts seen only from\n   behind still have real proportions. A part drawn only when \"its\" side faces you vanishes from other sides; wheels,\n   mirrors and shelves always exist, sorted.\n9. **Contents in an opening are real 3D objects behind the glass**, clipped to the opening (`clipTo`), and centred\n   in it as seen straight on. Check numerically: list every opening and every item in one, compare centres and edges.\n10. **Text sits on a face**: `tx`\u002F`txY`\u002F`txM` hide it when the face turns away; draw it after its face.\n11. **After resizing or moving a part, re-check the order of everything it now overlaps.**\n12. Flat things on the floor may go first, but after the cast shadows (opaque shadow fills paint over what's under them).\n\n## Look\n- Body: one palette `m = {l, m, d}` (light \u002F mid \u002F dark), shaded with `tone(normal, m)`. Small props and interiors use\n  `toneI`. Other materials: `METAL`, `CLEAR`, `CERAMIC`, `DARK`, or `matOf('#hex')`.\n- **Rounded bodies** (most machines): an `rrUV(...)` profile swept along an axis with `extrude(profile, x0, x1, m)`,\n  which draws the banded rounded sides; draw the cap that faces the viewer and the silhouette ink yourself.\n  Round things: `cyl` (upright), `cylX`, `rod(a, b, r, m)` (between any two points; a second radius makes a cone),\n  `loft` between rings (`on(PZ(z), ellUV(...))`) for cones, cups, bottles, domes.\n- **Ink:** silhouette `hullInk(points, ~2.8)` after the body; panel outlines ~2.2; openings 1.6–1.8; details\n  0.8–1.4. Always draw through `pd()` on 3D points; `pd(pts, false)` for an open line.\n- **Stand it on a board** if it sits on a table or desk: `board(...)` drawn first, a little bigger than the\n  footprint, included in `size`. Floor-standing machines stand on the paper.\n- **Cast shadow:** `castShadow(points, z0, clip)`, short and connected to the object (on a board, clip to\n  `boardTop(...)`). Tall things on a thin support cast base, support and high part so the shadows touch.\n  See-through parts (a cage, a glass dome) cast a lighter shadow: `\u003Cg opacity=\".45\">`. One shadow per object.\n- Accent colours sparingly: status lights (`#43c25c` \u002F `#e2483d`), screens (`#1d2a26` with `#8af0ae` text), glass\n  (`#cfe9f0` at low opacity + 1–2 white streaks at ~.38 opacity). Only ink strokes are dark.\n- **Neat over busy, slender like the real thing**: repeated hairlines 8–18, thin parts thin, attached parts touch\n  their body at both ends, every detail big enough to read at normal size. Fill empty space with things from the\n  scene's story (props on a board), sorted and shadowed like the rest.\n- Plain letters and digits only in text: emoji and symbols render as blobs.\n\n## See-through and labels\n\nGive every machine or appliance with a working inside a see-through (a cup or a chair has none). The switches start\noff, so the closed object is what people see first.\n- Wire it like `toaster.html`: in `scene`, `const k = ease(st.xr || 0)`; while `k > 0`, draw\n  `xrGhost(body, '', k, outline, x0, x1, m)` (far walls faint, the case as a ghost) and then the working parts at\n  opacity `k` **over** the ghost. Bodies that aren't one box: `xrGhostRings` (between two rings) or `xrUnder`.\n  After `mountFigure`, call `xrMount(() => ui, () => '')` (it adds the switches; captions are not shown).\n- **Inside parts and every label draw above the ghosted shell**, never inside it, or they fade with the case.\n  Whatever covers the mechanism fades too: glass, doors, awnings, globes, collars; handles and knobs on them are\n  redrawn on top.\n- **Cutaways belong only to see-through.** The normal view is the real closed object.\n- Anything the case used to hide partly is drawn whole in see-through (bread down in the slots, a drink falling all\n  the way to the bin), and motions that relied on a clip need real limits.\n- A flat picture of a mechanism on a plate is not a see-through: build it in 3D. Long parts through a ring are drawn\n  in pieces either side of it. Bearing plates are brackets, not slabs. Wires are short pieces so they sort with solids.\n- **Labels**: `xrCallouts([{ at:[x,y,z], text:'BIMETAL STRIP', on }], bounds)` gives pills in two columns either side\n  of the object, sorted so leaders never cross; draw them last, only when `k > .6`. Outside see-through, label\n  surface parts with `tag([x,y,z], dx, dy, 'TEXT', on)`. Short names in capitals; `on` while that part works. Labels\n  only name parts that are drawn. Anchor each label on its part and move it with the part.\n- On a phone the engine draws each label as a numbered badge and the page lists the names under the figure, so keep\n  to these two functions (or emit `data-n`\u002F`data-t` on `.tag` and honour `LBL_U` if you write your own).\n\n## Interaction (the fun part)\n- **Follow the real process** (*Truth first*). 2–5 meaningful actions with real outcomes. **`buttons` are the\n  interface**, in the order a person would use them (`{label, onClick(st, ui)}`, or `{label, choices: st => [...]}`\n  for a picker, with `current: true` \u002F `disabled: true, why: '…'`). Parts wrapped in `act('name', svg)` respond on\n  *press* through `acts`; never add `click` listeners to drawn parts (the scene is redrawn every frame).\n- **Every supply comes from something in the scene** (water from a jug, coins from a slot).\n- Out-of-order presses do something sensible: run the missing step, or `ui.flash('Insert a coin first')`, a notice\n  shown on the figure. `stats: st => [{label, value}]` (top right) for a measured quantity: credit, litres, score.\n- Animations: `ui.animate(dt => { ...; return stillRunning; })`, eased, mostly under ~2 s, safe if another button is\n  pressed meanwhile (one state object).\n- **Games** (a claw machine, an arcade): `mountKeypad({...})` adds an inked pad (arrows + a round action button)\n  that sends the same keys as the keyboard; set `window.GAME_KEYS = true` so the arrows play instead of turning the\n  camera, and let space always trigger the action. On a phone it becomes one slim row under the figure.\n- `params(st, q)`: read URL params for every interesting state (`?open=1&mode=spin`) so a screenshot can show it.\n- No hint line, no captions, no explanation text on the page: words live on buttons and labels only.\n\n## Reserved names\n`core.js` owns these global names: **never declare them in a figure** (a clash blanks the page; short names like `S`,\n`C`, `L`, `SH`, `f` are the usual trap). Prefix your own (`toastS`, `armL`, `tWire`).\n`PALS METAL CLEAR CERAMIC DARK INK SHADOW C S OX OY VIEW RC RCZ VIEW_NAMES TURNS YAW0 PITCH0 YAW PITCH CAM_R CAM_U CAM_V\nCAM_D CAM_B0 CAM_LIM camBasis setCam camDot camTo rotV yawTurn rotXY P0 P Dv depthOf boxMid sepOrder byDepth nearHalf\nfarHalf openShell f pd sp arcUV rrUV rectUV ellUV PX PY PZ on sub dot cross norm avg vis facing SHADOW_K AZ_MIN AZ_MAX\nSHADOW_LEN L SH setLight LIN SOFT step3 tone toneI mix matOf ease ink fill face shape line loft hull hullInk box extrude\ncyl cylX rod txM tx txY castShadow BOARD WOOD boardTop board act tag clipTo INK_REF_VB INK_K inkScale CORE_CSS\nfilterFor bakeNoise mountFigure xrCallouts xrGhost xrGhostRings xrUnder xrWrap xrMount mountKeypad`.\n\n## Verify (the owner turns it round and zooms in, so you do first)\nRender with headless Chrome over `file:\u002F\u002F` (Linux: `google-chrome` \u002F `chromium`), each run with its own\n`--user-data-dir`, one after another:\n```bash\nG=\"\u002FApplications\u002FGoogle Chrome.app\u002FContents\u002FMacOS\u002FGoogle Chrome\"\nfor v in \"yaw=45\" \"yaw=110\" \"yaw=170\" \"yaw=230\" \"yaw=300\" \"yaw=20&pitch=62\" \"yaw=200&pitch=70\"; do\n  \"$G\" --headless=new --hide-scrollbars --user-data-dir=\"$(mktemp -d)\" --force-device-scale-factor=2 \\\n    --window-size=900,800 --virtual-time-budget=3000 --screenshot=\"shot-${v\u002F\u002F[&=]\u002F_}.png\" \"file:\u002F\u002F$PWD\u002FOUT.html?free=1&$v\"\ndone\n```\n1. **Every angle above**, closed and with `&xr=1&labels=1`. Look at 2–3× crops of each part, not just the whole\n   image: nothing painted over a nearer part, no missing face, no floating part, no mirrored text, no part visible\n   through a solid wall, the back makes sense.\n2. **One `?press=` run of the main sequence** (`figure.html?press=Coin@300,Left@1500,Drop@2500`; `Label>Choice`\n   picks from a picker), shot at two or three budgets, at the default view and from behind, in see-through too.\n   Add one out-of-order press to see it answers sensibly.\n3. **A 4× close-up of the mechanism in see-through**: every part held, every drive touching, wires port to port.\n4. **A phone shot** (`--window-size=390,844`) with `&xr=1&labels=1`: badges and the label list read, nothing cut off.\n5. **Errors:** run the press URL once with `--dump-dom` and check `\u003Chtml data-errors=\"…\">`; grep for `NaN`.\nFix what you find; when every angle passes, add `turn:'full'`. The figure's state is `window.__st`.\n\n## When to use something else\n- Dark, glowing line art → **iso-glow**.\n","# Colorfigures\n\nHand-inked, flat-coloured isometric objects you can turn round, see inside and play with. Each figure is one HTML\npage: a small engine (`assets\u002Fcore.js`) plus your figure script, which models the object in 3D and draws it with the\nengine's shapes. The engine owns the camera (drag to turn, a Turntable and Front view button, arrow keys), the\nshading (three flat tones by the way a face meets the light, which turns with the viewer), the ink and the cast\nshadow. `scripts\u002Fbuild.py` makes the finished page: it inlines the engine and adds zoom, notices, the See-through \u002F\nLabels switches and the phone layout.\n\nA figure has three looks, all from the same model:\n1. **The object**, closed, as you would see it in a shop: correct from every side, back and underside included.\n2. **See-through**: the case fades to a ghost and the real working parts show inside it, moving with the buttons.\n3. **Labels**: short name tags on the parts, lit in the accent colour while that part is working.\n\n## Workflow\n\n1. **Set up:** copy `assets\u002Fcore.js` next to your figure (the page loads it with `\u003Cscript src=\"core.js\">` while you work).\n2. **Read the references** before writing. They are complete demo figures:\n   - `assets\u002Fexamples\u002Ftoaster.html`: the smallest. A rounded case, a lever, bread that toasts and pops, and a\n     see-through with heating cards, carriage, spring, latch and bimetal strip.\n   - `assets\u002Fexamples\u002Flamp.html`: a scene on a desk board with a jointed arm, a light pool and parts sorted per angle.\n   - `assets\u002Fexamples\u002Fclaw.html`: a big machine with glass, a game played on a keypad, stats, and a dense\n     see-through (gantry, motors, harness, coin path).\n   Read `core.js` too: its helpers are short and commented, and the `mountFigure({...})` options are listed above it.\n3. **Research the real object** (below, *Truth first*) and write the notes and the parts list at the top of your\n   figure script before any geometry.\n4. **Write `figure.html`** (name it after the object): a doctype\u002Fhead shell, `\u003Cscript src=\"core.js\">\u003C\u002Fscript>`, then one\n   inline `\u003Cscript>` that defines the geometry and calls `mountFigure({...})`, then `xrMount(() => ui, () => '')`.\n5. **Look at it from every side** with headless Chrome (*Verify*), fix, repeat (at most 3 rounds).\n6. **Build one file:** `uv run \"\u003Cskill folder>\u002Fscripts\u002Fbuild.py\" figure.html OUT.html`. Hand over OUT.html and say\n   what the buttons do (the page shows no instructions).\n\n## Truth first (how the real thing is built)\n\nThe figure is only as good as its model of the real object. Before drawing:\n- **Write how it really works** as a short list of steps, and where every material is after each one (coin in the\n  slot → coin chute → acceptor → cash box; water in the tank → pump → boiler → group → cup). Each button is one real\n  step and things only move along their real path.\n- **Write the parts list in the code** (a comment block, grouped: case, structure, mechanism, power, controls). For\n  the see-through aim for 30–60 real parts: motors, gears, shafts, springs, boards, sensors, wiring, tubes, brackets.\n  Look up proportions you are unsure of (a home espresso tank is 1.5–2.5 L: nearly full height, half the width).\n- **Every part is held by another**: name what it is fixed to. Nothing floats. Cables and tubes run from a real port\n  to a real port along walls and floor, never across open space.\n- **Every driving part touches what it drives** (shaft to gear, gear rim to gear rim, pipe end to port): work the\n  contact points out with numbers.\n- **Lay out moving paths with numbers**: a capsule's fall, a coin's drop or a tube must clear every gear and shaft.\n  Things moving into a container go up and over the rim, then down inside.\n- **Scale things people use against people**: a push button at hand height (~1.1 m), facing where people stand.\n- For buildings, research the building type first (for heritage types, the planning authority's own guide).\n\n## Coordinates and camera\n- `x` = depth (the front face is at `x = W`), `y` = width (+y goes viewer-left at the default view), `z` = up.\n  Ground at `z = 0`. Scale ≈ 1 unit per cm (washer 62 × 65 × 88); small objects (a kettle) can be modelled bigger\n  (60–100 units) so detail reads. Framing and line weight adapt automatically.\n- The engine turns the camera; your scene is redrawn for the current view. `YAW`, `PITCH` (degrees) and `CAM_V` (unit\n  vector toward the viewer) are readable. `?yaw=200&pitch=40` sets the view; `?free=1` lifts the turning limit.\n- A figure turns ±60° around its front until you have checked it from every side; then add `turn:'full'` to its\n  `mountFigure({...})` call and it turns all the way round. Ship with `turn:'full'` unless something can't be fixed.\n- `size` = the object's true bounding box (handles, trays, a lifted part at its highest). `center:[x, y]` if the\n  object isn't centred in it.\n\n## Drawing correctly from every angle (there is no depth buffer)\n\nThe most repeated bugs, in order. Check every one before handing over.\n1. **Never write a fixed back-to-front order.** \"A then B\" is only true for one view. Every separate part goes\n   through `byDepth([{ at:[x,y,z], box:[[x0,y0,z0],[x1,y1,z1]], svg }])`, and **every part gets a `box`**: two boxes\n   separated along an axis sort by which side the viewer is on; a centre point alone gets long or wrapping parts\n   wrong (a pole beside keys, a spout past a cup, a door beside its shelves). A function that draws several things\n   one after another is a fixed order too: return items and sort them.\n2. **Faces: draw a face, and everything on it, only when it faces the viewer**: `vis(n)` \u002F `facing(n)`. Buttons,\n   displays, decals, windows, knobs, and their labels included. Something mounted on a face is drawn in front of the\n   body while that face is toward you and *before* the body when it turns away, so the body hides it.\n3. **Parts with no single correct order** (a fan head, a jug with a handle): test which side faces the viewer and\n   write both orders: facing → far end first; facing away → the exact reverse.\n4. **Things that wrap other things are split**: far half, contents, near half (`openShell(A, B, colour, contents)`\n   for cups, cones, bins, drums). Never hard-code the visible half of a ring: `nearHalf()` \u002F `farHalf()`.\n5. **Split tall parts by height** (a pole, a stand, a spine): one section per thing beside it, each only as thick\n   as the part, or sorting loops appear. When many long parts overlap, sort only the pairs that overlap on screen.\n6. **Every solid has its far end and every face**: caps on whichever end faces the viewer, doors and flaps with both\n   faces and both edges, wheels and plates with thickness and a rim (nothing real is a flat disc), open tubes with a\n   rim and a dark bore.\n7. **Concave parts are built from convex pieces** (`extrude`\u002F`loft` handle convex profiles only), each with its own\n   ink; no ink on the joins.\n8. **Real objects have backs**: service panels, cords, coils, vents, a chassis under a truck. Parts seen only from\n   behind still have real proportions. A part drawn only when \"its\" side faces you vanishes from other sides; wheels,\n   mirrors and shelves always exist, sorted.\n9. **Contents in an opening are real 3D objects behind the glass**, clipped to the opening (`clipTo`), and centred\n   in it as seen straight on. Check numerically: list every opening and every item in one, compare centres and edges.\n10. **Text sits on a face**: `tx`\u002F`txY`\u002F`txM` hide it when the face turns away; draw it after its face.\n11. **After resizing or moving a part, re-check the order of everything it now overlaps.**\n12. Flat things on the floor may go first, but after the cast shadows (opaque shadow fills paint over what's under them).\n\n## Look\n- Body: one palette `m = {l, m, d}` (light \u002F mid \u002F dark), shaded with `tone(normal, m)`. Small props and interiors use\n  `toneI`. Other materials: `METAL`, `CLEAR`, `CERAMIC`, `DARK`, or `matOf('#hex')`.\n- **Rounded bodies** (most machines): an `rrUV(...)` profile swept along an axis with `extrude(profile, x0, x1, m)`,\n  which draws the banded rounded sides; draw the cap that faces the viewer and the silhouette ink yourself.\n  Round things: `cyl` (upright), `cylX`, `rod(a, b, r, m)` (between any two points; a second radius makes a cone),\n  `loft` between rings (`on(PZ(z), ellUV(...))`) for cones, cups, bottles, domes.\n- **Ink:** silhouette `hullInk(points, ~2.8)` after the body; panel outlines ~2.2; openings 1.6–1.8; details\n  0.8–1.4. Always draw through `pd()` on 3D points; `pd(pts, false)` for an open line.\n- **Stand it on a board** if it sits on a table or desk: `board(...)` drawn first, a little bigger than the\n  footprint, included in `size`. Floor-standing machines stand on the paper.\n- **Cast shadow:** `castShadow(points, z0, clip)`, short and connected to the object (on a board, clip to\n  `boardTop(...)`). Tall things on a thin support cast base, support and high part so the shadows touch.\n  See-through parts (a cage, a glass dome) cast a lighter shadow: `\u003Cg opacity=\".45\">`. One shadow per object.\n- Accent colours sparingly: status lights (`#43c25c` \u002F `#e2483d`), screens (`#1d2a26` with `#8af0ae` text), glass\n  (`#cfe9f0` at low opacity + 1–2 white streaks at ~.38 opacity). Only ink strokes are dark.\n- **Neat over busy, slender like the real thing**: repeated hairlines 8–18, thin parts thin, attached parts touch\n  their body at both ends, every detail big enough to read at normal size. Fill empty space with things from the\n  scene's story (props on a board), sorted and shadowed like the rest.\n- Plain letters and digits only in text: emoji and symbols render as blobs.\n\n## See-through and labels\n\nGive every machine or appliance with a working inside a see-through (a cup or a chair has none). The switches start\noff, so the closed object is what people see first.\n- Wire it like `toaster.html`: in `scene`, `const k = ease(st.xr || 0)`; while `k > 0`, draw\n  `xrGhost(body, '', k, outline, x0, x1, m)` (far walls faint, the case as a ghost) and then the working parts at\n  opacity `k` **over** the ghost. Bodies that aren't one box: `xrGhostRings` (between two rings) or `xrUnder`.\n  After `mountFigure`, call `xrMount(() => ui, () => '')` (it adds the switches; captions are not shown).\n- **Inside parts and every label draw above the ghosted shell**, never inside it, or they fade with the case.\n  Whatever covers the mechanism fades too: glass, doors, awnings, globes, collars; handles and knobs on them are\n  redrawn on top.\n- **Cutaways belong only to see-through.** The normal view is the real closed object.\n- Anything the case used to hide partly is drawn whole in see-through (bread down in the slots, a drink falling all\n  the way to the bin), and motions that relied on a clip need real limits.\n- A flat picture of a mechanism on a plate is not a see-through: build it in 3D. Long parts through a ring are drawn\n  in pieces either side of it. Bearing plates are brackets, not slabs. Wires are short pieces so they sort with solids.\n- **Labels**: `xrCallouts([{ at:[x,y,z], text:'BIMETAL STRIP', on }], bounds)` gives pills in two columns either side\n  of the object, sorted so leaders never cross; draw them last, only when `k > .6`. Outside see-through, label\n  surface parts with `tag([x,y,z], dx, dy, 'TEXT', on)`. Short names in capitals; `on` while that part works. Labels\n  only name parts that are drawn. Anchor each label on its part and move it with the part.\n- On a phone the engine draws each label as a numbered badge and the page lists the names under the figure, so keep\n  to these two functions (or emit `data-n`\u002F`data-t` on `.tag` and honour `LBL_U` if you write your own).\n\n## Interaction (the fun part)\n- **Follow the real process** (*Truth first*). 2–5 meaningful actions with real outcomes. **`buttons` are the\n  interface**, in the order a person would use them (`{label, onClick(st, ui)}`, or `{label, choices: st => [...]}`\n  for a picker, with `current: true` \u002F `disabled: true, why: '…'`). Parts wrapped in `act('name', svg)` respond on\n  *press* through `acts`; never add `click` listeners to drawn parts (the scene is redrawn every frame).\n- **Every supply comes from something in the scene** (water from a jug, coins from a slot).\n- Out-of-order presses do something sensible: run the missing step, or `ui.flash('Insert a coin first')`, a notice\n  shown on the figure. `stats: st => [{label, value}]` (top right) for a measured quantity: credit, litres, score.\n- Animations: `ui.animate(dt => { ...; return stillRunning; })`, eased, mostly under ~2 s, safe if another button is\n  pressed meanwhile (one state object).\n- **Games** (a claw machine, an arcade): `mountKeypad({...})` adds an inked pad (arrows + a round action button)\n  that sends the same keys as the keyboard; set `window.GAME_KEYS = true` so the arrows play instead of turning the\n  camera, and let space always trigger the action. On a phone it becomes one slim row under the figure.\n- `params(st, q)`: read URL params for every interesting state (`?open=1&mode=spin`) so a screenshot can show it.\n- No hint line, no captions, no explanation text on the page: words live on buttons and labels only.\n\n## Reserved names\n`core.js` owns these global names: **never declare them in a figure** (a clash blanks the page; short names like `S`,\n`C`, `L`, `SH`, `f` are the usual trap). Prefix your own (`toastS`, `armL`, `tWire`).\n`PALS METAL CLEAR CERAMIC DARK INK SHADOW C S OX OY VIEW RC RCZ VIEW_NAMES TURNS YAW0 PITCH0 YAW PITCH CAM_R CAM_U CAM_V\nCAM_D CAM_B0 CAM_LIM camBasis setCam camDot camTo rotV yawTurn rotXY P0 P Dv depthOf boxMid sepOrder byDepth nearHalf\nfarHalf openShell f pd sp arcUV rrUV rectUV ellUV PX PY PZ on sub dot cross norm avg vis facing SHADOW_K AZ_MIN AZ_MAX\nSHADOW_LEN L SH setLight LIN SOFT step3 tone toneI mix matOf ease ink fill face shape line loft hull hullInk box extrude\ncyl cylX rod txM tx txY castShadow BOARD WOOD boardTop board act tag clipTo INK_REF_VB INK_K inkScale CORE_CSS\nfilterFor bakeNoise mountFigure xrCallouts xrGhost xrGhostRings xrUnder xrWrap xrMount mountKeypad`.\n\n## Verify (the owner turns it round and zooms in, so you do first)\nRender with headless Chrome over `file:\u002F\u002F` (Linux: `google-chrome` \u002F `chromium`), each run with its own\n`--user-data-dir`, one after another:\n```bash\nG=\"\u002FApplications\u002FGoogle Chrome.app\u002FContents\u002FMacOS\u002FGoogle Chrome\"\nfor v in \"yaw=45\" \"yaw=110\" \"yaw=170\" \"yaw=230\" \"yaw=300\" \"yaw=20&pitch=62\" \"yaw=200&pitch=70\"; do\n  \"$G\" --headless=new --hide-scrollbars --user-data-dir=\"$(mktemp -d)\" --force-device-scale-factor=2 \\\n    --window-size=900,800 --virtual-time-budget=3000 --screenshot=\"shot-${v\u002F\u002F[&=]\u002F_}.png\" \"file:\u002F\u002F$PWD\u002FOUT.html?free=1&$v\"\ndone\n```\n1. **Every angle above**, closed and with `&xr=1&labels=1`. Look at 2–3× crops of each part, not just the whole\n   image: nothing painted over a nearer part, no missing face, no floating part, no mirrored text, no part visible\n   through a solid wall, the back makes sense.\n2. **One `?press=` run of the main sequence** (`figure.html?press=Coin@300,Left@1500,Drop@2500`; `Label>Choice`\n   picks from a picker), shot at two or three budgets, at the default view and from behind, in see-through too.\n   Add one out-of-order press to see it answers sensibly.\n3. **A 4× close-up of the mechanism in see-through**: every part held, every drive touching, wires port to port.\n4. **A phone shot** (`--window-size=390,844`) with `&xr=1&labels=1`: badges and the label list read, nothing cut off.\n5. **Errors:** run the press URL once with `--dump-dom` and check `\u003Chtml data-errors=\"…\">`; grep for `NaN`.\nFix what you find; when every angle passes, add `turn:'full'`. The figure's state is `window.__st`.\n\n## When to use something else\n- Dark, glowing line art → **iso-glow**.\n",{"kind":25,"name":5,"description":7},"general","main","c2b929d1a54305e77aad0296872e90e08d68a637","authoring\u002Fandy\u002Fcolorfigures",1,"https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills","https:\u002F\u002Fgithub.com\u002Fpascalandy","https:\u002F\u002Fblog.pascalandy.com","The question: how can I build the default one-stop place where entrepreneurs can start their mobile-first websites and blog? Psst psst… play-with-ghost.com","2026-11-15 03:34:59",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add pascalandy\u002Fskills --skill colorfigures",{"tool":41,"command":42},"bunx","bunx skills add pascalandy\u002Fskills --skill colorfigures",{"tool":44,"command":45},"pnpm","pnpm dlx skills add pascalandy\u002Fskills --skill colorfigures","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fauthoring\u002Fandy\u002Fcolorfigures\u002FSKILL.md",true,[49,55,61,65,69,73,79],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"assets\u002Fcore.js","SCRIPT","脚本",56076,"https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fauthoring\u002Fandy\u002Fcolorfigures\u002Fassets\u002Fcore.js",{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"assets\u002Fexamples\u002Fclaw.html","ASSET","资产文件",66362,"https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fauthoring\u002Fandy\u002Fcolorfigures\u002Fassets\u002Fexamples\u002Fclaw.html",{"path":62,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":63,"sourceHtmlUrl":64},"assets\u002Fexamples\u002Flamp.html",30001,"https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fauthoring\u002Fandy\u002Fcolorfigures\u002Fassets\u002Fexamples\u002Flamp.html",{"path":66,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":67,"sourceHtmlUrl":68},"assets\u002Fexamples\u002Ftoaster.html",29735,"https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fauthoring\u002Fandy\u002Fcolorfigures\u002Fassets\u002Fexamples\u002Ftoaster.html",{"path":70,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":16},"LICENSE","许可证",1606,{"path":74,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":78},"README.md","REFERENCE","参考文档",2625,"https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fauthoring\u002Fandy\u002Fcolorfigures\u002FREADME.md",{"path":80,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":81,"sourceHtmlUrl":82},"scripts\u002Fbuild.py",14542,"https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fauthoring\u002Fandy\u002Fcolorfigures\u002Fscripts\u002Fbuild.py",[84,91,98,105,112,119],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":20},"01M7DEA67FREYEGQJYTWD9D0GB","writing-great-skills","Use when creating, modifying, evaluating a skill.","https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-great-skills\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":20},"01M7DEA3ZN566HSV6YJ8KPE824","writing-for-agents","Use when creating, editing, or reviewing a skill, AGENTS.md, CLAUDE.md, or another document agents read.","https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":20},"01M7DEA0FRE0FEYV9XS0YTTBPJ","why","Use for questions about design rationale, the history of regressions or incidents, or the evidence behind thresholds and tradeoffs. Use `how` for runtime behavior. Do not use for plain commit or date lookups.","https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwhy\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":20},"01M7DE9XVZASJS9PC1A5BVMVHG","verify-video-archive","Use when validating the macOS or Linux archive workflow reached by `just convert-video`, including real media, prerequisites, terminal progress, source safety, locking, and recovery.","https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fverify-video-archive\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":20},"01M7DE9VTG6ZEQH1M10J66T8MR","verify-transcript","Use when validating transcript CLI behavior, locating its verification features, or running the paid YouTube end-to-end check.","https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fverify-transcript\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":20},"01M7DE9RWQ6WNVG455HQFHVNFR","verify-skills","Use when verifying `just compile-skills`, `just remote-skills`, `just install-skills`, or `just skills-discover` in the skills repository, such as after changing their scripts or adding, renaming, or moving a skill.","https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fverify-skills\u002FSKILL.md",[],[]]