@blackbelt-technology/pi-dashboard-deck3d 0.0.0-stage → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/.pi/skills/deck3d/SKILL.md +227 -0
  2. package/.pi/skills/deck3d/examples/deck.json +388 -0
  3. package/.pi/skills/deck3d/examples/fixture.md +18 -0
  4. package/.pi/skills/deck3d/examples/snapshot-after.png +0 -0
  5. package/.pi/skills/deck3d/examples/snapshot-before.png +0 -0
  6. package/.pi/skills/deck3d/reference/effects.agent.md +78 -0
  7. package/.pi/skills/deck3d/reference/effects.md +1217 -0
  8. package/.pi/skills/deck3d/reference/ir-fields.agent.md +30 -0
  9. package/.pi/skills/deck3d/reference/ir-fields.md +246 -0
  10. package/README.md +177 -2
  11. package/assets/LICENSE-Poppins.txt +99 -0
  12. package/assets/Poppins-Bold.ttf +0 -0
  13. package/assets/props/LICENSES.txt +4 -0
  14. package/assets/props/brain.glb +0 -0
  15. package/assets/props/cloud.glb +0 -0
  16. package/assets/props/cube.glb +0 -0
  17. package/assets/props/database.glb +0 -0
  18. package/assets/props/laptop.glb +0 -0
  19. package/assets/props/manifest.json +119 -0
  20. package/assets/props/robot.glb +0 -0
  21. package/assets/props/server.glb +0 -0
  22. package/assets/props/shield.glb +0 -0
  23. package/bin/deck3d +49 -0
  24. package/dist/cli.js +10228 -0
  25. package/dist/harvest/harness.js +185718 -0
  26. package/dist/runtime.js +64597 -0
  27. package/fixtures/business-2031/build-deck.mjs +60 -0
  28. package/fixtures/business-2031/build-overrides.mjs +154 -0
  29. package/fixtures/business-2031/deck.json +4220 -0
  30. package/fixtures/business-2031/deck.md +470 -0
  31. package/fixtures/business-2031/fx/closing-mark.js +43 -0
  32. package/fixtures/business-2031/fx/closing-mark.meta.json +26 -0
  33. package/fixtures/business-2031/overrides.json +903 -0
  34. package/fixtures/harvest.md +23 -0
  35. package/fixtures/strategy-lab.json +891 -0
  36. package/fixtures/strategy-lab.md +85 -0
  37. package/package.json +80 -4
  38. package/scripts/build-cli.mjs +29 -0
  39. package/scripts/build-harvest.ts +8 -0
  40. package/scripts/build-runtime.mjs +22 -0
  41. package/scripts/gen-effects.ts +14 -0
  42. package/scripts/gen-ir-fields.ts +34 -0
  43. package/src/check/index.ts +315 -0
  44. package/src/check/rules.ts +393 -0
  45. package/src/cli-io.ts +23 -0
  46. package/src/cli.ts +823 -0
  47. package/src/fx/accent-cycle.meta.json +26 -0
  48. package/src/fx/accent-cycle.ts +8 -0
  49. package/src/fx/agent-depth.meta.json +42 -0
  50. package/src/fx/agent-depth.ts +62 -0
  51. package/src/fx/ascii.meta.json +35 -0
  52. package/src/fx/ascii.ts +4 -0
  53. package/src/fx/aurora.meta.json +26 -0
  54. package/src/fx/aurora.ts +18 -0
  55. package/src/fx/billboards.meta.json +34 -0
  56. package/src/fx/billboards.ts +67 -0
  57. package/src/fx/bloom.meta.json +26 -0
  58. package/src/fx/bloom.ts +4 -0
  59. package/src/fx/camera-drift.meta.json +26 -0
  60. package/src/fx/camera-drift.ts +8 -0
  61. package/src/fx/capital-flows.meta.json +30 -0
  62. package/src/fx/capital-flows.ts +64 -0
  63. package/src/fx/catalogue.ts +89 -0
  64. package/src/fx/chromatic-aberration.meta.json +32 -0
  65. package/src/fx/chromatic-aberration.ts +4 -0
  66. package/src/fx/city-grid.meta.json +37 -0
  67. package/src/fx/city-grid.ts +51 -0
  68. package/src/fx/clipped-solids.meta.json +49 -0
  69. package/src/fx/clipped-solids.ts +171 -0
  70. package/src/fx/cohort-grid.meta.json +48 -0
  71. package/src/fx/cohort-grid.ts +63 -0
  72. package/src/fx/compose.ts +114 -0
  73. package/src/fx/constellation.meta.json +51 -0
  74. package/src/fx/constellation.ts +103 -0
  75. package/src/fx/curve-flow.meta.json +40 -0
  76. package/src/fx/curve-flow.ts +63 -0
  77. package/src/fx/dashed-flow.meta.json +27 -0
  78. package/src/fx/dashed-flow.ts +8 -0
  79. package/src/fx/data-columns.meta.json +30 -0
  80. package/src/fx/data-columns.ts +18 -0
  81. package/src/fx/defaults.ts +92 -0
  82. package/src/fx/depth-of-field.meta.json +40 -0
  83. package/src/fx/depth-of-field.ts +4 -0
  84. package/src/fx/dolly.meta.json +26 -0
  85. package/src/fx/dolly.ts +4 -0
  86. package/src/fx/dot-screen.meta.json +35 -0
  87. package/src/fx/dot-screen.ts +4 -0
  88. package/src/fx/dynamic-instances.meta.json +40 -0
  89. package/src/fx/dynamic-instances.ts +57 -0
  90. package/src/fx/emissive.meta.json +26 -0
  91. package/src/fx/emissive.ts +8 -0
  92. package/src/fx/extruded-shapes.meta.json +62 -0
  93. package/src/fx/extruded-shapes.ts +133 -0
  94. package/src/fx/fab-wafer.meta.json +42 -0
  95. package/src/fx/fab-wafer.ts +72 -0
  96. package/src/fx/fade.meta.json +26 -0
  97. package/src/fx/fade.ts +4 -0
  98. package/src/fx/film.meta.json +26 -0
  99. package/src/fx/film.ts +4 -0
  100. package/src/fx/float.meta.json +26 -0
  101. package/src/fx/float.ts +8 -0
  102. package/src/fx/flythrough.meta.json +26 -0
  103. package/src/fx/flythrough.ts +4 -0
  104. package/src/fx/fog.meta.json +26 -0
  105. package/src/fx/fog.ts +8 -0
  106. package/src/fx/geo-fragments.meta.json +48 -0
  107. package/src/fx/geo-fragments.ts +59 -0
  108. package/src/fx/glass.meta.json +26 -0
  109. package/src/fx/glass.ts +8 -0
  110. package/src/fx/globe-arcs.meta.json +36 -0
  111. package/src/fx/globe-arcs.ts +67 -0
  112. package/src/fx/glow-tube.meta.json +26 -0
  113. package/src/fx/glow-tube.ts +8 -0
  114. package/src/fx/glyph-rain.meta.json +30 -0
  115. package/src/fx/glyph-rain.ts +18 -0
  116. package/src/fx/god-rays.meta.json +40 -0
  117. package/src/fx/god-rays.ts +4 -0
  118. package/src/fx/grid-horizon.meta.json +30 -0
  119. package/src/fx/grid-horizon.ts +18 -0
  120. package/src/fx/hex-grid.meta.json +29 -0
  121. package/src/fx/hex-grid.ts +18 -0
  122. package/src/fx/holo-fresnel.meta.json +26 -0
  123. package/src/fx/holo-fresnel.ts +8 -0
  124. package/src/fx/horizon-gates.meta.json +36 -0
  125. package/src/fx/horizon-gates.ts +60 -0
  126. package/src/fx/index.ts +258 -0
  127. package/src/fx/iridescent.meta.json +26 -0
  128. package/src/fx/iridescent.ts +8 -0
  129. package/src/fx/iris.meta.json +26 -0
  130. package/src/fx/iris.ts +4 -0
  131. package/src/fx/lightformers.meta.json +26 -0
  132. package/src/fx/lightformers.ts +8 -0
  133. package/src/fx/local.ts +200 -0
  134. package/src/fx/market-tape.meta.json +53 -0
  135. package/src/fx/market-tape.ts +97 -0
  136. package/src/fx/matcap.meta.json +26 -0
  137. package/src/fx/matcap.ts +8 -0
  138. package/src/fx/meta.schema.json +49 -0
  139. package/src/fx/metal.meta.json +26 -0
  140. package/src/fx/metal.ts +8 -0
  141. package/src/fx/mirror-floor.meta.json +26 -0
  142. package/src/fx/mirror-floor.ts +8 -0
  143. package/src/fx/neural-mesh.meta.json +54 -0
  144. package/src/fx/neural-mesh.ts +110 -0
  145. package/src/fx/orbit-agents.meta.json +36 -0
  146. package/src/fx/orbit-agents.ts +63 -0
  147. package/src/fx/orbit.meta.json +27 -0
  148. package/src/fx/orbit.ts +8 -0
  149. package/src/fx/outline.meta.json +43 -0
  150. package/src/fx/outline.ts +4 -0
  151. package/src/fx/paper-stack.meta.json +36 -0
  152. package/src/fx/paper-stack.ts +61 -0
  153. package/src/fx/particle-stream.meta.json +27 -0
  154. package/src/fx/particle-stream.ts +8 -0
  155. package/src/fx/particles.meta.json +26 -0
  156. package/src/fx/particles.ts +8 -0
  157. package/src/fx/pixelate.meta.json +28 -0
  158. package/src/fx/pixelate.ts +4 -0
  159. package/src/fx/points-on-geometry.meta.json +61 -0
  160. package/src/fx/points-on-geometry.ts +71 -0
  161. package/src/fx/proof-gate.meta.json +30 -0
  162. package/src/fx/proof-gate.ts +67 -0
  163. package/src/fx/rings.meta.json +27 -0
  164. package/src/fx/rings.ts +8 -0
  165. package/src/fx/room-ibl.meta.json +26 -0
  166. package/src/fx/room-ibl.ts +8 -0
  167. package/src/fx/sao.meta.json +32 -0
  168. package/src/fx/sao.ts +4 -0
  169. package/src/fx/scaffold.ts +172 -0
  170. package/src/fx/scatter.meta.json +49 -0
  171. package/src/fx/scatter.ts +74 -0
  172. package/src/fx/selective-bloom.meta.json +36 -0
  173. package/src/fx/selective-bloom.ts +4 -0
  174. package/src/fx/server-racks.meta.json +36 -0
  175. package/src/fx/server-racks.ts +54 -0
  176. package/src/fx/shader-particles.meta.json +46 -0
  177. package/src/fx/shader-particles.ts +75 -0
  178. package/src/fx/signal-pulse.meta.json +27 -0
  179. package/src/fx/signal-pulse.ts +8 -0
  180. package/src/fx/smaa.meta.json +19 -0
  181. package/src/fx/smaa.ts +4 -0
  182. package/src/fx/sobel.meta.json +24 -0
  183. package/src/fx/sobel.ts +4 -0
  184. package/src/fx/soft-shadows.meta.json +26 -0
  185. package/src/fx/soft-shadows.ts +8 -0
  186. package/src/fx/sprites.meta.json +40 -0
  187. package/src/fx/sprites.ts +57 -0
  188. package/src/fx/stagger-reveal.meta.json +26 -0
  189. package/src/fx/stagger-reveal.ts +8 -0
  190. package/src/fx/starfield.meta.json +32 -0
  191. package/src/fx/starfield.ts +18 -0
  192. package/src/fx/swarm.meta.json +27 -0
  193. package/src/fx/swarm.ts +8 -0
  194. package/src/fx/tessellate.meta.json +39 -0
  195. package/src/fx/tessellate.ts +79 -0
  196. package/src/fx/tokens.meta.json +27 -0
  197. package/src/fx/tokens.ts +8 -0
  198. package/src/fx/trail.meta.json +27 -0
  199. package/src/fx/trail.ts +8 -0
  200. package/src/fx/trust-ledger.meta.json +30 -0
  201. package/src/fx/trust-ledger.ts +47 -0
  202. package/src/fx/types.ts +83 -0
  203. package/src/fx/util.ts +108 -0
  204. package/src/fx/vault-glyphs.meta.json +37 -0
  205. package/src/fx/vault-glyphs.ts +55 -0
  206. package/src/fx/video-screen.meta.json +57 -0
  207. package/src/fx/video-screen.ts +99 -0
  208. package/src/fx/vignette.meta.json +32 -0
  209. package/src/fx/vignette.ts +4 -0
  210. package/src/fx/volume-cloud.meta.json +58 -0
  211. package/src/fx/volume-cloud.ts +87 -0
  212. package/src/fx/volume-perlin.meta.json +46 -0
  213. package/src/fx/volume-perlin.ts +82 -0
  214. package/src/fx/volumetric-spot.meta.json +26 -0
  215. package/src/fx/volumetric-spot.ts +8 -0
  216. package/src/fx/wireframe-overlay.meta.json +27 -0
  217. package/src/fx/wireframe-overlay.ts +8 -0
  218. package/src/ir/defaults.ts +62 -0
  219. package/src/ir/field-reference.ts +96 -0
  220. package/src/ir/hash.ts +34 -0
  221. package/src/ir/ids.ts +65 -0
  222. package/src/ir/merge.ts +155 -0
  223. package/src/ir/schema.json +1211 -0
  224. package/src/ir/types.ts +333 -0
  225. package/src/ir/validate.ts +196 -0
  226. package/src/parse/derive.ts +205 -0
  227. package/src/parse/harvest/bundle.ts +56 -0
  228. package/src/parse/harvest/harness.html +22 -0
  229. package/src/parse/harvest/harness.ts +191 -0
  230. package/src/parse/harvest/index.ts +169 -0
  231. package/src/parse/harvest/shapes.ts +75 -0
  232. package/src/parse/markdown.ts +215 -0
  233. package/src/props/embed.ts +92 -0
  234. package/src/props/fetch.ts +97 -0
  235. package/src/props/generate.ts +152 -0
  236. package/src/props/key.ts +13 -0
  237. package/src/props/search.ts +180 -0
  238. package/src/render/embed-video.ts +80 -0
  239. package/src/render/font.ts +86 -0
  240. package/src/render/index.ts +149 -0
  241. package/src/render/template.html +87 -0
  242. package/src/runtime/backgrounds.ts +146 -0
  243. package/src/runtime/builders.ts +808 -0
  244. package/src/runtime/camera.ts +73 -0
  245. package/src/runtime/hud.ts +887 -0
  246. package/src/runtime/index.ts +1168 -0
  247. package/src/runtime/local-fx.ts +151 -0
  248. package/src/runtime/materials.ts +136 -0
  249. package/src/runtime/measure.ts +73 -0
  250. package/src/runtime/node-geometry.ts +26 -0
  251. package/src/runtime/palette.ts +111 -0
  252. package/src/runtime/post.ts +649 -0
  253. package/src/runtime/props.ts +292 -0
  254. package/src/runtime/quality.ts +20 -0
  255. package/src/runtime/rng.ts +8 -0
  256. package/src/runtime/scene.ts +644 -0
  257. package/src/runtime/text.ts +174 -0
  258. package/src/runtime/types.ts +118 -0
  259. package/src/serve/index.ts +376 -0
  260. package/src/util/paths.ts +35 -0
@@ -0,0 +1,30 @@
1
+ # ir-fields.md — index
2
+
3
+ Pull-only condensed map. Source: `.pi/skills/deck3d/reference/ir-fields.md` (generated). Full per-field types/defaults live there; this file is the tuning cheat sheet.
4
+
5
+ ## Rule
6
+ - `defaults` + `slides[]` = DERIVED. `parse` regenerates them. Edit → lost on re-parse (`validate` warns via `meta.derivedHash`).
7
+ - `overrides` = ONLY write region. Survives re-parse. Objects merge; arrays replace.
8
+ - Fix a `check` finding by writing its suggested `overrides` key — never patch HTML or engine code.
9
+
10
+ ## Deck overrides
11
+ - `overrides.deck.*` — same fields as `defaults`: `mode` (dark|light), `palette` (blackbelt|zenit|dapp|custom), `material` (glass|metal|matte), `transition`, `quality` (low|medium|high), `depthRelief` (number, z per rank), `backgroundIntensity` 0–1, `extrudeDepth`, `camera.distance`, `labels.size`, `check.ignore[]`.
12
+ - `overrides.effects[]` — replaces the deck-level effect list. `{id, params?}`.
13
+ - `overrides.props[]` — `{source, id, licence, author, sha256, slide, role, size?, count?, restyle?, anim?}`. `role` = `hero|illustration|ambient|node:<id>`.
14
+
15
+ ## Per-slide overrides
16
+ - Key `overrides.slides["<slideId>"]`; slide ids are ASCII-folded title slugs (`-<ordinal>` on collision) or `{#pin}`.
17
+ - Framing: `diagram.scale`, `diagram.offset.{x,y}`, `camera.distance`, `labels.size`.
18
+ - Palette/scene: `mode`, `palette`, `material`, `transition`, `quality`, `scene`, `backgroundIntensity`.
19
+ - Effects: `effects[]` (replaces this slide's derived defaults).
20
+ - Exemptions: `check.ignore[]` (ids still reported as `skipped`).
21
+
22
+ ## Diagram-element overrides
23
+ - Node: `overrides.nodes["<slideId>/<nodeId>"]` — `shape` (rect|stadium|round|hexagon|circle|doublecircle|diamond|cylinder), `label`, `position.{x,y,z}`, `size.{w,h}`, `material`.
24
+ - Edge: `overrides.edges["<slideId>/<edgeId>"]` — `kind` (normal|dotted|thick), `material`.
25
+ - Edge ids are `<from>-><to>#<k>`; node ids are the mermaid node names.
26
+
27
+ ## Suggestion map
28
+ - `fit` → `diagram.scale` / `diagram.offset` (or `camera.distance`).
29
+ - `legibility` → `labels.size` (or `camera.distance`).
30
+ - `overlap` / `occlusion` → `diagram.scale` / `diagram.offset` / `node.position`.
@@ -0,0 +1,246 @@
1
+ # Deck IR field reference
2
+
3
+ > Generated from `src/ir/schema.json` by `scripts/gen-ir-fields.ts` (`npm run build`). Do not edit by hand.
4
+
5
+ `defaults` and `slides[]` are **derived** — regenerated by `parse`; edit them and the change is lost on re-parse. `overrides` is the only region you may write.
6
+
7
+ | Path | Type | Default | Effect |
8
+ |------|------|---------|--------|
9
+ | `meta` | object | | Provenance and integrity metadata. Written by parse; not a tuning surface. |
10
+ | `meta.source` | string | | Path to the markdown source this IR was derived from. Relative to the deck.json location when possible. |
11
+ | `meta.engine` | string | | deck3d engine version that produced the derived fields. |
12
+ | `meta.mermaid` | string | | Exact pinned mermaid version used for harvesting diagram layout. |
13
+ | `meta.derivedHash` | string | | sha256 over the canonical derived fields (defaults + slides). `validate` recomputes it to detect edits made outside `overrides`. |
14
+ | `defaults` | object | | Deck-level visual defaults applied to every slide unless a slide overrides them. |
15
+ | `defaults.mode` | dark \| light | `"dark"` | Dark or light palette variant. Switches background, card and text colours together. |
16
+ | `defaults.palette` | blackbelt \| zenit \| dapp \| midnight \| ember \| arctic \| forest \| mono \| neon \| custom | `"blackbelt"` | Named colour palette. `custom` reads `colors` below. |
17
+ | `defaults.colors` | object | | Colour overrides used when palette is `custom` (CSS hex). |
18
+ | `defaults.colors.card` | string | | Card/surface colour for the custom palette. |
19
+ | `defaults.colors.accent` | string | | Accent (primary highlight) colour. |
20
+ | `defaults.colors.secondary` | string | | Secondary colour for edges and secondary meshes. |
21
+ | `defaults.material` | glass \| metal \| matte | `"glass"` | PBR material family for node cards and diagram primitives. |
22
+ | `defaults.envReflections` | boolean | `true` | Enable environment-map reflections on metallic/glass materials. |
23
+ | `defaults.mirrorFloor` | boolean | `true` | Show the reflective floor plane. |
24
+ | `defaults.floor` | mirror \| water | `"mirror"` | Floor surface: the reflective plane, or an animated water surface (three shaders_ocean) driven by the deck clock. |
25
+ | `defaults.reflectBackdrop` | boolean | `true` | Include backdrop geometry (scene backgrounds and local effects) in the floor reflection. Off reflects slide content only, which costs one less pass over the backdrop per frame. |
26
+ | `defaults.floorReflectivity` | number | `1` | How strong the floor reflection reads: 1 = the full mirror, 0 = none (the reflection fades into the floor colour). `mirrorFloor: false` is the hard off switch and also skips the reflector pass. |
27
+ | `defaults.floorMatte` | number | `0` | How rough the reflective floor reads: 0 = a perfect mirror, 1 = fully scattered. Distorts the reflection with seeded noise, blurs it with a multi-tap sample, and fades it toward the floor colour as it rises. |
28
+ | `defaults.softShadows` | boolean | `true` | Enable soft (PCF) shadows under objects. |
29
+ | `defaults.bloom` | boolean | `true` | Enable the bloom post pass (titles glow). Disabled at `quality: low`. |
30
+ | `defaults.rimLight` | boolean | `true` | Enable the rim light that outlines silhouettes. |
31
+ | `defaults.fog` | boolean | `true` | Enable depth fog so distant slides fade into the background. |
32
+ | `defaults.backgroundIntensity` | number | `0.7` | Opacity of the animated background scene (0 = hidden, 1 = full). |
33
+ | `defaults.transition` | string | `"dolly"` | Transition effect id (from the `transition` kind of the fx corpus) played on slide change. |
34
+ | `defaults.durationSec` | number | `1.4` | Transition duration in seconds. |
35
+ | `defaults.depthRelief` | number | `0.7` | Depth offset (world units) applied per diagram rank so a 2D layout reads as a 3D staircase. Higher = more relief. |
36
+ | `defaults.quality` | low \| medium \| high | `"high"` | Quality tier: scales bloom, reflections, shadow resolution and particle count, and sets the effect cost budget (low 6 / medium 12 / high 20). |
37
+ | `defaults.extrudeDepth` | number | `0.18` | Extrusion depth of 3D title glyphs. |
38
+ | `defaults.titleEdge` | none \| contrast | `"none"` | Contour on extruded title glyphs. `contrast` paints the SIDE walls (ExtrudeGeometry material group 1) in the palette text colour, so each character keeps a readable outline against its own lit face; `none` uses one material throughout. |
39
+ | `defaults.autoStyle` | boolean | `true` | Let parse pick a built diagram kind and a topic-matched background per slide. `false` restores the v1 fallback routing (no built kinds, `particles` background). |
40
+ | `defaults.layout` | split \| split-reverse | `"split"` | Slide composition preset. `split` = title and card left, diagram right; `split-reverse` mirrors it. |
41
+ | `defaults.rail` | line \| orbit \| tunnel \| helix \| grid | `"line"` | Topology the slides are strung along. `line` dollies along a straight rail; `orbit` rings them facing outward; `tunnel` recedes along -Z; `helix` is an ascending orbit; `grid` wraps into rows and columns. Deck-level only. |
42
+ | `defaults.spacing` | number | `40` | World-unit gap between consecutive slide anchors on the rail. Deck-level only; also scales the cull radius. |
43
+ | `defaults.camera` | object | | Default camera framing. |
44
+ | `defaults.camera.distance` | number | `9` | Distance from the slide's focal plane. Larger = more content in frame but smaller labels. |
45
+ | `defaults.labels` | object | | Default diagram-label treatment. |
46
+ | `defaults.labels.size` | number | `0.28` | World-space cap height of diagram label planes. Projected cap height must stay ≥ 14 px at 1920×1080. |
47
+ | `defaults.check` | object | | Per-slide check configuration. |
48
+ | `defaults.check.ignore` | array | | Object ids the fit/legibility check should skip (reported as `skipped`, never silently). |
49
+ | `defaults.check.ignore[]` | string | | |
50
+ | `slides` | array | | Derived per-slide content, in presentation order. Regenerated by parse; edit `overrides.slides` instead. |
51
+ | `slides[]` | object | | A single derived slide. Regenerated by parse. |
52
+ | `slides[].index` | integer | | 1-based position used by the `#<n>` deep link. |
53
+ | `slides[].id` | string | | Stable slide id: ASCII-folded title slug, `-<ordinal>` on collision, or the `{#id}` pin from the heading. Never starts with `deck3d-` (reserved for generated slides). |
54
+ | `slides[].kind` | title \| content \| section \| credits | `"content"` | Slide role. Governs title treatment and layout; `credits` is appended by render, never authored. |
55
+ | `slides[].title` | string | | Slide title, rendered as extruded 3D text. |
56
+ | `slides[].subtitle` | string | | Optional subtitle paragraph shown under the title. |
57
+ | `slides[].bullets` | array | | Bullet lines shown in the side panel. |
58
+ | `slides[].bullets[]` | string | | |
59
+ | `slides[].scene` | string | | Background scene id (e.g. `tokens`, `rings`, `swarm`, `aurora`, `none`). |
60
+ | `slides[].diagram` | object | | Derived diagram geometry. `kind: none` means no diagram (unsupported or absent). |
61
+ | `slides[].diagram.kind` | none \| flowchart \| sequence \| brain \| loop \| swarm \| bars \| funnel \| timeline-rail \| globe \| orbit-cluster \| stack | | Diagram builder to use. `none` = no diagram. |
62
+ | `slides[].diagram.data` | object | | Label/value series driving a built diagram topology. Replaced as a whole object by an override — never deep-merged, so labels and values cannot mix provenance. |
63
+ | `slides[].diagram.data.labels` | array | | One caption per series entry, in source order. |
64
+ | `slides[].diagram.data.labels[]` | string | | |
65
+ | `slides[].diagram.data.values` | array | | One magnitude per series entry. Absent → the builder uses equal magnitudes. |
66
+ | `slides[].diagram.data.values[]` | number | | |
67
+ | `slides[].diagram.dir` | TD \| TB \| BT \| LR \| RL | | Flowchart rank direction as declared in the source. |
68
+ | `slides[].diagram.scale` | number | `1` | Overall diagram scale in world units (override: `overrides.slides[id].diagram.scale`). |
69
+ | `slides[].diagram.offset` | object | | Diagram translation in world units (override: `overrides.slides[id].diagram.offset`). |
70
+ | `slides[].diagram.offset.x` | number | | Horizontal offset (+ right). |
71
+ | `slides[].diagram.offset.y` | number | | Vertical offset (+ up). |
72
+ | `slides[].diagram.nodes` | array | | Flowchart nodes with engine layout. |
73
+ | `slides[].diagram.nodes[]` | object | | A flowchart node. |
74
+ | `slides[].diagram.nodes[].id` | string | | Mermaid node id (author-chosen, stable). |
75
+ | `slides[].diagram.nodes[].label` | string | | Displayed label text. |
76
+ | `slides[].diagram.nodes[].shape` | rect \| stadium \| round \| hexagon \| circle \| doublecircle \| diamond \| cylinder | | 3D primitive to build for this node. |
77
+ | `slides[].diagram.nodes[].x` | number | | X position from the engine layout (layout units). |
78
+ | `slides[].diagram.nodes[].y` | number | | Y position from the engine layout (layout units). |
79
+ | `slides[].diagram.nodes[].w` | number | | Node width from the engine layout. |
80
+ | `slides[].diagram.nodes[].h` | number | | Node height from the engine layout. |
81
+ | `slides[].diagram.nodes[].group` | string | | Subgraph title this node belongs to, when any. |
82
+ | `slides[].diagram.edges` | array | | Flowchart edges with sampled path geometry. |
83
+ | `slides[].diagram.edges[]` | object | | A flowchart edge. |
84
+ | `slides[].diagram.edges[].id` | string | | Stable edge id `<from>-><to>#<k>` (k = ordinal among parallel edges in source order). |
85
+ | `slides[].diagram.edges[].from` | string | | Source node id (must exist in `nodes`). |
86
+ | `slides[].diagram.edges[].to` | string | | Target node id (must exist in `nodes`). |
87
+ | `slides[].diagram.edges[].kind` | normal \| dotted \| thick | | Edge stroke kind: solid arrow, dotted, or thick labelled. |
88
+ | `slides[].diagram.edges[].label` | string | | Edge label text, when present. |
89
+ | `slides[].diagram.edges[].path` | array | | Sampled points along the rendered edge curve, as [x, y] pairs. |
90
+ | `slides[].diagram.edges[].path[]` | array | | |
91
+ | `slides[].diagram.edges[].path[][]` | number | | |
92
+ | `slides[].diagram.groups` | array | | Flowchart subgraphs. |
93
+ | `slides[].diagram.groups[]` | object | | A flowchart subgraph. |
94
+ | `slides[].diagram.groups[].id` | string | | Subgraph id from the source. |
95
+ | `slides[].diagram.groups[].title` | string | | Subgraph title. |
96
+ | `slides[].diagram.groups[].nodes` | array | | Member node ids. |
97
+ | `slides[].diagram.groups[].nodes[]` | string | | |
98
+ | `slides[].diagram.actors` | array | | Sequence-diagram actors in declaration order. |
99
+ | `slides[].diagram.actors[]` | object | | A sequence-diagram actor. |
100
+ | `slides[].diagram.actors[].id` | string | | Actor name from the source (stable). |
101
+ | `slides[].diagram.actors[].label` | string | | Display label (description or name). |
102
+ | `slides[].diagram.messages` | array | | Sequence-diagram messages in source order. |
103
+ | `slides[].diagram.messages[]` | object | | A sequence-diagram message. |
104
+ | `slides[].diagram.messages[].id` | string | | Stable message id `m<index>` in source order. |
105
+ | `slides[].diagram.messages[].from` | string | | Sender actor id. |
106
+ | `slides[].diagram.messages[].to` | string | | Receiver actor id (equal to `from` for self-messages). |
107
+ | `slides[].diagram.messages[].text` | string | | Message label text. |
108
+ | `slides[].diagram.messages[].kind` | solid \| dotted | | Solid request/response vs dotted reply. |
109
+ | `slides[].layout` | split \| split-reverse | | Composition preset for this slide. Falls back to `defaults.layout`. |
110
+ | `slides[].cardOffset` | object | | World-unit nudge applied to the text card AFTER the layout preset places it. Leaves the title, diagram and background where they are. |
111
+ | `slides[].cardOffset.x` | number | | Horizontal nudge, positive = right. |
112
+ | `slides[].cardOffset.y` | number | | Vertical nudge, positive = up. |
113
+ | `slides[].camera` | object | | Camera framing for this slide. |
114
+ | `slides[].camera.distance` | number | | Distance from the focal plane. Larger pulls back and shrinks labels. |
115
+ | `slides[].labels` | object | | Diagram-label treatment for this slide. |
116
+ | `slides[].labels.size` | number | | World-space cap height of diagram label planes. |
117
+ | `slides[].check` | object | | Per-slide check configuration. |
118
+ | `slides[].check.ignore` | array | | Object ids the fit/legibility check should skip (reported as `skipped`, never silently). |
119
+ | `slides[].check.ignore[]` | string | | |
120
+ | `slides[].effects` | array | | Derived default effect list for this slide (replaced wholesale by `overrides.slides[id].effects`). |
121
+ | `slides[].effects[]` | object | | Reference to an effect in the fx corpus (`{id, params}`), or to a per-deck module in `fx/` beside the deck (`{id: "local:<name>", sha256, params}`). |
122
+ | `slides[].effects[].id` | string | | Effect id from `fx list` (e.g. `bloom`, `starfield`), or `local:<name>` for a module in `fx/` beside the deck. |
123
+ | `slides[].effects[].sha256` | string | | Lowercase hex sha256 of the `fx/<name>.js` bytes. Required for `local:` ids, forbidden for corpus ids. |
124
+ | `slides[].effects[].params` | object | | Effect parameters; each is bounded by the effect's card schema and validated by `validate`. |
125
+ | `overrides` | object | | The ONLY user-writable region. Objects deep-merge over derived values; arrays replace. |
126
+ | `overrides.deck` | object | | Deck-level visual defaults applied to every slide unless a slide overrides them. |
127
+ | `overrides.deck.mode` | dark \| light | `"dark"` | Dark or light palette variant. Switches background, card and text colours together. |
128
+ | `overrides.deck.palette` | blackbelt \| zenit \| dapp \| midnight \| ember \| arctic \| forest \| mono \| neon \| custom | `"blackbelt"` | Named colour palette. `custom` reads `colors` below. |
129
+ | `overrides.deck.colors` | object | | Colour overrides used when palette is `custom` (CSS hex). |
130
+ | `overrides.deck.colors.card` | string | | Card/surface colour for the custom palette. |
131
+ | `overrides.deck.colors.accent` | string | | Accent (primary highlight) colour. |
132
+ | `overrides.deck.colors.secondary` | string | | Secondary colour for edges and secondary meshes. |
133
+ | `overrides.deck.material` | glass \| metal \| matte | `"glass"` | PBR material family for node cards and diagram primitives. |
134
+ | `overrides.deck.envReflections` | boolean | `true` | Enable environment-map reflections on metallic/glass materials. |
135
+ | `overrides.deck.mirrorFloor` | boolean | `true` | Show the reflective floor plane. |
136
+ | `overrides.deck.floor` | mirror \| water | `"mirror"` | Floor surface: the reflective plane, or an animated water surface (three shaders_ocean) driven by the deck clock. |
137
+ | `overrides.deck.reflectBackdrop` | boolean | `true` | Include backdrop geometry (scene backgrounds and local effects) in the floor reflection. Off reflects slide content only, which costs one less pass over the backdrop per frame. |
138
+ | `overrides.deck.floorReflectivity` | number | `1` | How strong the floor reflection reads: 1 = the full mirror, 0 = none (the reflection fades into the floor colour). `mirrorFloor: false` is the hard off switch and also skips the reflector pass. |
139
+ | `overrides.deck.floorMatte` | number | `0` | How rough the reflective floor reads: 0 = a perfect mirror, 1 = fully scattered. Distorts the reflection with seeded noise, blurs it with a multi-tap sample, and fades it toward the floor colour as it rises. |
140
+ | `overrides.deck.softShadows` | boolean | `true` | Enable soft (PCF) shadows under objects. |
141
+ | `overrides.deck.bloom` | boolean | `true` | Enable the bloom post pass (titles glow). Disabled at `quality: low`. |
142
+ | `overrides.deck.rimLight` | boolean | `true` | Enable the rim light that outlines silhouettes. |
143
+ | `overrides.deck.fog` | boolean | `true` | Enable depth fog so distant slides fade into the background. |
144
+ | `overrides.deck.backgroundIntensity` | number | `0.7` | Opacity of the animated background scene (0 = hidden, 1 = full). |
145
+ | `overrides.deck.transition` | string | `"dolly"` | Transition effect id (from the `transition` kind of the fx corpus) played on slide change. |
146
+ | `overrides.deck.durationSec` | number | `1.4` | Transition duration in seconds. |
147
+ | `overrides.deck.depthRelief` | number | `0.7` | Depth offset (world units) applied per diagram rank so a 2D layout reads as a 3D staircase. Higher = more relief. |
148
+ | `overrides.deck.quality` | low \| medium \| high | `"high"` | Quality tier: scales bloom, reflections, shadow resolution and particle count, and sets the effect cost budget (low 6 / medium 12 / high 20). |
149
+ | `overrides.deck.extrudeDepth` | number | `0.18` | Extrusion depth of 3D title glyphs. |
150
+ | `overrides.deck.titleEdge` | none \| contrast | `"none"` | Contour on extruded title glyphs. `contrast` paints the SIDE walls (ExtrudeGeometry material group 1) in the palette text colour, so each character keeps a readable outline against its own lit face; `none` uses one material throughout. |
151
+ | `overrides.deck.autoStyle` | boolean | `true` | Let parse pick a built diagram kind and a topic-matched background per slide. `false` restores the v1 fallback routing (no built kinds, `particles` background). |
152
+ | `overrides.deck.layout` | split \| split-reverse | `"split"` | Slide composition preset. `split` = title and card left, diagram right; `split-reverse` mirrors it. |
153
+ | `overrides.deck.rail` | line \| orbit \| tunnel \| helix \| grid | `"line"` | Topology the slides are strung along. `line` dollies along a straight rail; `orbit` rings them facing outward; `tunnel` recedes along -Z; `helix` is an ascending orbit; `grid` wraps into rows and columns. Deck-level only. |
154
+ | `overrides.deck.spacing` | number | `40` | World-unit gap between consecutive slide anchors on the rail. Deck-level only; also scales the cull radius. |
155
+ | `overrides.deck.camera` | object | | Default camera framing. |
156
+ | `overrides.deck.camera.distance` | number | `9` | Distance from the slide's focal plane. Larger = more content in frame but smaller labels. |
157
+ | `overrides.deck.labels` | object | | Default diagram-label treatment. |
158
+ | `overrides.deck.labels.size` | number | `0.28` | World-space cap height of diagram label planes. Projected cap height must stay ≥ 14 px at 1920×1080. |
159
+ | `overrides.deck.check` | object | | Per-slide check configuration. |
160
+ | `overrides.deck.check.ignore` | array | | Object ids the fit/legibility check should skip (reported as `skipped`, never silently). |
161
+ | `overrides.deck.check.ignore[]` | string | | |
162
+ | `overrides.effects` | array | | Deck-level effect list (replaces the deck default list). |
163
+ | `overrides.effects[]` | object | | Reference to an effect in the fx corpus (`{id, params}`), or to a per-deck module in `fx/` beside the deck (`{id: "local:<name>", sha256, params}`). |
164
+ | `overrides.effects[].id` | string | | Effect id from `fx list` (e.g. `bloom`, `starfield`), or `local:<name>` for a module in `fx/` beside the deck. |
165
+ | `overrides.effects[].sha256` | string | | Lowercase hex sha256 of the `fx/<name>.js` bytes. Required for `local:` ids, forbidden for corpus ids. |
166
+ | `overrides.effects[].params` | object | | Effect parameters; each is bounded by the effect's card schema and validated by `validate`. |
167
+ | `overrides.props` | array | | Models placed on slides. |
168
+ | `overrides.props[]` | object | | A glTF model placed on a slide. Selection is the LLM's job; code fetches, hash-pins and renders it. |
169
+ | `overrides.props[].source` | vendored \| poly-pizza \| generated | | Where the model came from. |
170
+ | `overrides.props[].id` | string | | Source-specific model id. |
171
+ | `overrides.props[].licence` | string | | SPDX licence id (e.g. `CC0-1.0`, `CC-BY-4.0`, or `generated`). |
172
+ | `overrides.props[].author` | string | | Attribution string for the credits slide. |
173
+ | `overrides.props[].sha256` | string | | sha256 of the cached normalised GLB. `render` refuses a mismatch. |
174
+ | `overrides.props[].slide` | string | | Target slide id. |
175
+ | `overrides.props[].role` | string | | Placement: `hero`, `illustration`, `ambient` (background instances), or `node:<nodeId>` (replaces a diagram node). |
176
+ | `overrides.props[].size` | number | | Target world-space bounding-box size (longest axis). |
177
+ | `overrides.props[].count` | integer | | Instance count for the `ambient` role. |
178
+ | `overrides.props[].restyle` | palette \| original | | `palette` swaps materials for the deck PBR palette; `original` keeps the source materials. |
179
+ | `overrides.props[].anim` | none \| float \| orbit \| spin | | Animation preset applied to the prop group. |
180
+ | `overrides.slides` | object | | Per-slide overrides keyed by slide id. |
181
+ | `overrides.slides["<key>"]` | object | | Per-slide overrides. Look knobs mirror `defaults` by $ref so the scopes cannot drift; `rail`/`spacing` stay deck-only because they position every anchor on the rail. |
182
+ | `overrides.slides["<key>"].backgroundIntensity` | number | | Override the background scene opacity. |
183
+ | `overrides.slides["<key>"].bloom` | any | | |
184
+ | `overrides.slides["<key>"].camera` | object | | Camera framing override. |
185
+ | `overrides.slides["<key>"].camera.distance` | number | | Pull the camera closer/further to fix fit or label size. |
186
+ | `overrides.slides["<key>"].cardOffset` | object | | World-unit nudge applied to the text card AFTER the layout preset places it. Leaves the title, diagram and background where they are. |
187
+ | `overrides.slides["<key>"].cardOffset.x` | number | | Horizontal nudge, positive = right. |
188
+ | `overrides.slides["<key>"].cardOffset.y` | number | | Vertical nudge, positive = up. |
189
+ | `overrides.slides["<key>"].check` | object | | Per-slide check configuration. |
190
+ | `overrides.slides["<key>"].check.ignore` | array | | Object ids the fit/legibility check should skip (reported as `skipped`, never silently). |
191
+ | `overrides.slides["<key>"].check.ignore[]` | string | | |
192
+ | `overrides.slides["<key>"].colors` | any | | |
193
+ | `overrides.slides["<key>"].depthRelief` | any | | |
194
+ | `overrides.slides["<key>"].diagram` | object | | Diagram framing overrides. |
195
+ | `overrides.slides["<key>"].diagram.kind` | none \| brain \| loop \| swarm \| bars \| funnel \| timeline-rail \| globe \| orbit-cluster \| stack | | Force a built topology on a slide without a mermaid block. `flowchart`/`sequence` are derived from markdown and cannot be set here. |
196
+ | `overrides.slides["<key>"].diagram.data` | object | | Label/value series driving a built diagram topology. Replaced as a whole object by an override — never deep-merged, so labels and values cannot mix provenance. |
197
+ | `overrides.slides["<key>"].diagram.data.labels` | array | | One caption per series entry, in source order. |
198
+ | `overrides.slides["<key>"].diagram.data.labels[]` | string | | |
199
+ | `overrides.slides["<key>"].diagram.data.values` | array | | One magnitude per series entry. Absent → the builder uses equal magnitudes. |
200
+ | `overrides.slides["<key>"].diagram.data.values[]` | number | | |
201
+ | `overrides.slides["<key>"].diagram.scale` | number | | Scale the diagram up/down to fit. |
202
+ | `overrides.slides["<key>"].diagram.offset` | object | | Translate the diagram. |
203
+ | `overrides.slides["<key>"].diagram.offset.x` | number | | Horizontal offset. |
204
+ | `overrides.slides["<key>"].diagram.offset.y` | number | | Vertical offset. |
205
+ | `overrides.slides["<key>"].durationSec` | any | | |
206
+ | `overrides.slides["<key>"].effects` | array | | Replaces the slide's derived default effect list. |
207
+ | `overrides.slides["<key>"].effects[]` | object | | Reference to an effect in the fx corpus (`{id, params}`), or to a per-deck module in `fx/` beside the deck (`{id: "local:<name>", sha256, params}`). |
208
+ | `overrides.slides["<key>"].effects[].id` | string | | Effect id from `fx list` (e.g. `bloom`, `starfield`), or `local:<name>` for a module in `fx/` beside the deck. |
209
+ | `overrides.slides["<key>"].effects[].sha256` | string | | Lowercase hex sha256 of the `fx/<name>.js` bytes. Required for `local:` ids, forbidden for corpus ids. |
210
+ | `overrides.slides["<key>"].effects[].params` | object | | Effect parameters; each is bounded by the effect's card schema and validated by `validate`. |
211
+ | `overrides.slides["<key>"].envReflections` | any | | |
212
+ | `overrides.slides["<key>"].extrudeDepth` | any | | |
213
+ | `overrides.slides["<key>"].floor` | any | | |
214
+ | `overrides.slides["<key>"].floorMatte` | any | | |
215
+ | `overrides.slides["<key>"].floorReflectivity` | any | | |
216
+ | `overrides.slides["<key>"].fog` | any | | |
217
+ | `overrides.slides["<key>"].labels` | object | | Label treatment override. |
218
+ | `overrides.slides["<key>"].labels.size` | number | | Grow labels to fix legibility. |
219
+ | `overrides.slides["<key>"].layout` | split \| split-reverse | | Override the composition preset for this slide. |
220
+ | `overrides.slides["<key>"].material` | glass \| metal \| matte | | Override the slide's material family. |
221
+ | `overrides.slides["<key>"].mirrorFloor` | any | | |
222
+ | `overrides.slides["<key>"].mode` | dark \| light | | Override the slide's palette mode. |
223
+ | `overrides.slides["<key>"].palette` | blackbelt \| zenit \| dapp \| midnight \| ember \| arctic \| forest \| mono \| neon \| custom | | Override the slide's palette. |
224
+ | `overrides.slides["<key>"].quality` | low \| medium \| high | | Override the quality tier for this slide. |
225
+ | `overrides.slides["<key>"].reflectBackdrop` | any | | |
226
+ | `overrides.slides["<key>"].rimLight` | any | | |
227
+ | `overrides.slides["<key>"].scene` | string | | Override the background scene id. |
228
+ | `overrides.slides["<key>"].softShadows` | any | | |
229
+ | `overrides.slides["<key>"].titleEdge` | none \| contrast | | Override the title contour for this slide. |
230
+ | `overrides.slides["<key>"].transition` | string | | Override the transition effect id for entering this slide. |
231
+ | `overrides.nodes` | object | | Per-node overrides keyed by `<slideId>/<nodeId>`. |
232
+ | `overrides.nodes["<key>"]` | object | | |
233
+ | `overrides.nodes["<key>"].shape` | rect \| stadium \| round \| hexagon \| circle \| doublecircle \| diamond \| cylinder | | Change the node's 3D primitive. |
234
+ | `overrides.nodes["<key>"].label` | string | | Reword the node's label. |
235
+ | `overrides.nodes["<key>"].position` | object | | Nudge the node in world units. |
236
+ | `overrides.nodes["<key>"].position.x` | number | | Horizontal nudge. |
237
+ | `overrides.nodes["<key>"].position.y` | number | | Vertical nudge. |
238
+ | `overrides.nodes["<key>"].position.z` | number | | Depth nudge. |
239
+ | `overrides.nodes["<key>"].size` | object | | Override the node's box size. |
240
+ | `overrides.nodes["<key>"].size.w` | number | | Width. |
241
+ | `overrides.nodes["<key>"].size.h` | number | | Height. |
242
+ | `overrides.nodes["<key>"].material` | glass \| metal \| matte | | Override the node's material family. |
243
+ | `overrides.edges` | object | | Per-edge overrides keyed by `<slideId>/<edgeId>`. |
244
+ | `overrides.edges["<key>"]` | object | | |
245
+ | `overrides.edges["<key>"].kind` | normal \| dotted \| thick | | Change the edge stroke kind. |
246
+ | `overrides.edges["<key>"].material` | glass \| metal \| matte | | Override the edge material family. |
package/README.md CHANGED
@@ -1,3 +1,178 @@
1
- # Temporary Holding Version
1
+ # @blackbelt-technology/pi-dashboard-deck3d
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Deterministic Markdown → self-contained 3D presentation.
4
+
5
+ - Input: markdown outline (headings, bullets, ```mermaid blocks).
6
+ - Output: one offline `deck.html` (three.js runtime + IR + subset font inlined).
7
+ - Two stages: markdown → schema-validated Deck IR (`deck.json`) → `deck.html`.
8
+ - Ships: `deck3d` CLI + `deck3d` pi skill.
9
+
10
+ Never hand-edit `deck.html`. Tune `deck.json` `overrides` only.
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ pnpm install # repo root; pnpm only
16
+ npx playwright install chromium # for mermaid harvest / check / snapshot
17
+ ```
18
+
19
+ Deps: `three@0.160.0`, `mermaid@11.17.2` (exact pin, harvest), `opentype.js`,
20
+ `ajv`, `esbuild`, `playwright`. `render` / `validate` never need a browser.
21
+
22
+ ## Commands
23
+
24
+ ```bash
25
+ deck3d parse <deck.md> [-o deck.json] [--fresh] # markdown (+ mermaid) → IR
26
+ deck3d validate <deck.json> # schema + derived-edit checks
27
+ deck3d render <deck.json> -o deck.html [--embed-video] # IR → self-contained HTML
28
+ deck3d build <deck.md> -o deck.html # parse → render; writes .json beside
29
+ deck3d serve <deck.md> [--port n] [--check] # watch + rebuild + live reload; panel saves to disk
30
+ deck3d check <deck.html> [--viewport WxH[,WxH]] [--slide n] [--strict] [-o report.json]
31
+ deck3d snapshot <deck.html> [--slide n] [-o png] # one slide → PNG
32
+ deck3d check <deck.html> [--style] # + warn on slides still on parse defaults
33
+ deck3d fx list [--kind k] [--tag t] [--topic p] # effect catalogue
34
+ deck3d fx preview <id|local:name> [--palette p] # one effect → PNG
35
+ deck3d fx scaffold <name> [--kind k] [--for id] # write fx/<name>.{js,meta.json}
36
+ deck3d fx hash <name> # sha256 of fx/<name>.js
37
+ deck3d fx promote <name> --source u --licence l # local effect → corpus
38
+ deck3d props search <query> [--role ambient] # candidate models
39
+ deck3d props fetch <source> <id> # cache + hash-pin, prints override entry
40
+ deck3d props generate --prompt <text> --name <n> # text → image → GLB
41
+ deck3d overrides apply <deck.json> <file> # merge an overrides-grammar file
42
+ ```
43
+
44
+ Exit codes: `0` ok, `1` failure (one-line stderr reason), `2` usage.
45
+ Default check viewports: `1920x1080,1280x720`. Default `check` timeout 120 s/viewport.
46
+
47
+ ## Serve
48
+
49
+ `deck3d serve <deck.md> [--port n] [--check]` starts authoring server.
50
+
51
+ - Binds `127.0.0.1` only (exposes filesystem write endpoints). `--port` omitted ⇒ OS assigns free port.
52
+ - Serves media sitting beside the deck (`video/`, `.mp4/.webm/.png/.jpg/.webp`), confined to the deck directory. A video layer needs this: a `file://` clip is cross-origin, taints the canvas, and cannot be uploaded as a WebGL texture.
53
+ - Watches `deck.md`, `fx/`, `deck.json`. Rebuilds on change (debounced, default 120 ms) — including an out-of-band `deck3d overrides apply` or hand edit of `deck.json`.
54
+ - Re-pins local effect `sha256` in `deck.json` on rebuild; editing `fx/*.js` live never trips render hash check.
55
+ - Broken edit keeps serving last good deck; reports error overlay in browser; recovers on next valid edit.
56
+ - Injects SSE reload client (`/__events`) into served copy only; `build` output stays offline and self-contained.
57
+ - Live reload preserves current slide via `location.hash` and staged configurator values via `localStorage`.
58
+ - Title contour: `titleEdge: "contrast"` (deck default or per slide; configurator Camera & labels) paints the extruded glyph SIDE walls in the palette text colour, so each character keeps a readable outline instead of merging into one lit silhouette. Unlit on purpose — the walls face sideways, where a lit material goes black — and held under the bloom threshold, so the contour does not halo.
59
+ - Water floor: `overrides.deck.floor: "water"` (or the configurator's Lighting & FX → floor) swaps the mirror for an animated ocean surface tinted from the palette; `mirrorFloor: false` hides either.
60
+ - Stylistic backgrounds (explicit presets, never auto-routed): `clipped-solids`, `extruded-shapes` (`shape` or an SVG `svgPath`), `scatter`, `tessellate`, `curve-flow`, `sprites`, `volume-cloud`, `volume-perlin`, `billboards`, `points-on-geometry`, `shader-particles`, `dynamic-instances`; `constellation` gained `nodeShape`. `deck3d fx list --kind background` shows them all.
61
+ - Post-processing: list any `post` card in a slide's `effects[]` and it enables a real composer pass for that slide only — `bloom`, `selective-bloom` (`parts: diagram|title|props|all`), `film`, `vignette`, `smaa`, `sao`, `depth-of-field` (`focus: 0` = auto), `chromatic-aberration`, `god-rays`, `pixelate`, `outline`, `sobel`, `dot-screen`, `ascii`. Pass order is canonical (not list order); params surface in the configurator's per-effect block.
62
+ - Configurator (`C`) adds **Save overrides.json** (POST `/__overrides`) and **Apply to deck.json** (POST `/__apply`, merges via `overrides apply` grammar, then rebuilds). Unserved decks fall back to panel copy/download (avoids silent drops in download-restricted iframes).
63
+ - Write endpoints IR-validate payload before write. Invalid payload returns 400 and leaves target file untouched. Write targets confined to deck directory (path traversal refused). 1 MB body cap.
64
+ - `--check` runs fit check out of band after rebuild; findings stream over SSE as `findings` event; reload never waits for check.
65
+
66
+ ## Markdown grammar
67
+
68
+ - `---` front-matter: deck defaults.
69
+ - `# Title` starts a slide. Zero headings ⇒ one slide id `slide`.
70
+ - First paragraph after heading = subtitle.
71
+ - `- bullet` = body bullets.
72
+ - ```mermaid `flowchart` / `sequenceDiagram` = slide diagram (harvested headless).
73
+ Other diagram types: warn + `diagram: none`.
74
+ - `<!-- deck3d: {...} -->` inline overrides win over `deck.json`.
75
+ - Pin an id: `# Final {#outro}`.
76
+
77
+ ## IR + overrides
78
+
79
+ `deck.json` = `{ meta, defaults, slides[], overrides }`.
80
+
81
+ - `slides[]` and below are DERIVED (regenerated every parse).
82
+ - Write only `overrides`: `deck`, `slides`, `nodes`, `edges`, `effects`, `props`.
83
+ - Objects deep-merge. Arrays replace. `diagram.data` replaces as a whole object.
84
+ - Suggest keys spell the overrides grammar: `overrides.slides["arch"].diagram.scale`.
85
+ - The deck's `⚙` configurator (`C` key) exports an `overrides.json` in this
86
+ grammar; merge it with `deck3d overrides apply`.
87
+ - Its **Effects** block adds as well as removes: the `add effect…` picker lists
88
+ the whole corpus plus the deck's `local:` cards, grouped by kind. Either way
89
+ the current slide is rebuilt live and `window.__DECK` is untouched.
90
+
91
+ ## Tune loop
92
+
93
+ Interactive authoring: `deck3d serve talk.md [--check]` watches sources, reloads browser in place, and lets configurator save/apply overrides directly. Headless/scripted loop:
94
+
95
+ 1. `deck3d parse talk.md`
96
+ 2. `deck3d validate talk.json`
97
+ 3. `deck3d build talk.md -o talk.html` (runs `check`, prints `style: n/N slides styled`)
98
+ 4. Style: `deck3d check talk.html --style`, then pick an effect / built diagram /
99
+ props per flagged slide.
100
+ 5. Fix only the suggested override key. Re-run 3.
101
+ 6. `deck3d snapshot talk.html --slide 5 -o s5.png`
102
+ 7. Repeat.
103
+
104
+ Full knobs: `.pi/skills/deck3d/reference/ir-fields.md`.
105
+ Effect catalogue: `.pi/skills/deck3d/reference/effects.md`.
106
+ Playbook: `.pi/skills/deck3d/SKILL.md`.
107
+
108
+ ## Effects
109
+
110
+ - `parse` assigns deterministic defaults: title→`swarm`, flowchart→`tokens`,
111
+ sequence→`rings`, security→`glyph-rain`, data→`data-columns`, then routes the
112
+ remainder by `tags.topic`. `autoStyle: false` restores the v1 fallback.
113
+ - Replace: `overrides.slides["<id>"].effects = [{ id, params? }]`.
114
+ - Per-deck effects live in `fx/<name>.js` + `.meta.json` beside `deck.md`, are
115
+ referenced as `{ id: "local:<name>", sha256 }`, and are embedded at render.
116
+ Inside one, `Math.random` is the deck's seeded stream and `window`/`fetch`/
117
+ `setTimeout`/`Date` are `undefined`.
118
+ - `video-screen` plays a looping clip on a framed screen in the scene:
119
+ `{ "id": "video-screen", "params": { "src": "video/demo.mp4", "width": 7.5, "x": 5 } }`.
120
+ The clip must be **same-origin**: `deck3d serve` serves it from beside the
121
+ deck, or `render --embed-video` inlines clips as `data:` URLs for one portable
122
+ file (~33% size cost). A bare `file://` deck next to a `video/` folder will not
123
+ render the clip, because that source is cross-origin and taints the canvas.
124
+ Playback freezes during transitions and runs only while the slide is settled,
125
+ so `check`/`snapshot` stay deterministic.
126
+ - Conflicts fail `render`. Mode-incompatible effects skip + warn.
127
+ - Quality budget: `low` 6, `medium` 12, `high` 20.
128
+ - Palettes: `blackbelt zenit dapp midnight ember arctic forest mono neon custom`.
129
+ - Built topologies (no mermaid needed): `brain loop swarm bars funnel
130
+ timeline-rail globe orbit-cluster stack`, driven by `diagram.data`.
131
+
132
+ ## Backgrounds never cover text
133
+
134
+ Backgrounds and every `local:` effect render in a depth-isolated pass behind the
135
+ slide, so an effect cannot occlude a title, card or diagram whatever its
136
+ geometry reaches. A module that attaches geometry AFTER creation escapes that
137
+ pass; `check` reports it as `fx-content-layer`.
138
+
139
+ ## Placement
140
+
141
+ - `defaults.rail` — how the slides are strung in space: `line` (straight dolly,
142
+ default), `orbit` (ring, each slide turned to face its camera), `tunnel`
143
+ (recedes along -Z), `helix` (ascending orbit), `grid` (rows + columns).
144
+ Deck-level; `defaults.spacing` (default 40) sets the gap and scales culling.
145
+ - `layout` — composition within a slide: `split` (title + card left, diagram
146
+ right, default) or `split-reverse` (mirrored). Deck-wide or per slide.
147
+ - `cardOffset: {x, y}` and `diagram.offset`/`diagram.scale` — per-slide nudges
148
+ applied after the preset places things.
149
+ - All of it is live in the configurator (`C`) under the **Layout** block.
150
+
151
+ ## Props
152
+
153
+ - `deck3d props search <keywords>` — vendored CC0 corpus first, Poly Pizza second
154
+ (`POLY_PIZZA_KEY`). Offline/unreachable ⇒ vendored-only + notice.
155
+ - `deck3d props fetch <source> <id>` — writes `.deck3d/props/<source>-<id>.glb`,
156
+ pins sha256, prints the `overrides.props[]` entry.
157
+ - `--role ambient` filters to ≤ 2 000-triangle models and prints a placement entry.
158
+ - `deck3d props generate --prompt "<text>" --name <n>` — text → image
159
+ (`DECK3D_T2I_URL`) → GLB. Optional python path; authoring-time network only.
160
+ - Roles: `hero`, `illustration`, `ambient`, `node:<id>`.
161
+ - Cap: `.glb` ≤ 8 MiB (inclusive). External `.gltf` URIs rejected.
162
+
163
+ ## Tests
164
+
165
+ ```bash
166
+ pnpm -F @blackbelt-technology/pi-dashboard-deck3d test
167
+ ```
168
+
169
+ Browser suites self-skip without chromium (`describe.skipIf(!chromiumAvailable())`).
170
+
171
+ Env hooks: `DECK3D_HARVEST_TIMEOUT_MS` (60000), `DECK3D_CHECK_TIMEOUT_MS` (120000),
172
+ `DECK3D_HTTP_TIMEOUT_MS` (10000), `DECK3D_HARVEST_STALL`.
173
+
174
+ ## Build
175
+
176
+ ```bash
177
+ npm run build # build:harvest + build:runtime + gen:ir-fields + gen:effects
178
+ ```
@@ -0,0 +1,99 @@
1
+ Poppins-Bold.ttf — SIL Open Font License 1.1
2
+ Source: https://cdn.jsdelivr.net/gh/google/fonts@main/ofl/poppins/Poppins-Bold.ttf
3
+ Vendored so `render` can subset the TTF offline and deterministically.
4
+ Why TTF (not typeface.json): every three.js typeface.json corrupts the
5
+ Hungarian double-acute glyphs (ő ű Ő Ű) and triggers earcut failures.
6
+
7
+ Copyright 2020 The Poppins Project Authors (https://github.com/itfoundry/Poppins)
8
+
9
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
10
+ This license is copied below, and is also available with a FAQ at:
11
+ http://scripts.sil.org/OFL
12
+
13
+
14
+ -----------------------------------------------------------
15
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
16
+ -----------------------------------------------------------
17
+
18
+ PREAMBLE
19
+ The goals of the Open Font License (OFL) are to stimulate worldwide
20
+ development of collaborative font projects, to support the font creation
21
+ efforts of academic and linguistic communities, and to provide a free and
22
+ open framework in which fonts may be shared and improved in partnership
23
+ with others.
24
+
25
+ The OFL allows the licensed fonts to be used, studied, modified and
26
+ redistributed freely as long as they are not sold by themselves. The
27
+ fonts, including any derivative works, can be bundled, embedded,
28
+ redistributed and/or sold with any software provided that any reserved
29
+ names are not used by derivative works. The fonts and derivatives,
30
+ however, cannot be released under any other type of license. The
31
+ requirement for fonts to remain under this license does not apply
32
+ to any document created using the fonts or their derivatives.
33
+
34
+ DEFINITIONS
35
+ "Font Software" refers to the set of files released by the Copyright
36
+ Holder(s) under this license and clearly marked as such. This may
37
+ include source files, build scripts and documentation.
38
+
39
+ "Reserved Font Name" refers to any names specified as such after the
40
+ copyright statement(s).
41
+
42
+ "Original Version" refers to the collection of Font Software components as
43
+ distributed by the Copyright Holder(s).
44
+
45
+ "Modified Version" refers to any derivative made by adding to, deleting,
46
+ or substituting -- in part or in whole -- any of the components of the
47
+ Original Version, by changing formats or by porting the Font Software to a
48
+ new environment.
49
+
50
+ "Author" refers to any designer, engineer, programmer, technical
51
+ writer or other person who contributed to the Font Software.
52
+
53
+ PERMISSION & CONDITIONS
54
+ Permission is hereby granted, free of charge, to any person obtaining
55
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
56
+ redistribute, and sell modified and unmodified copies of the Font
57
+ Software, subject to the following conditions:
58
+
59
+ 1) Neither the Font Software nor any of its individual components,
60
+ in Original or Modified Versions, may be sold by itself.
61
+
62
+ 2) Original or Modified Versions of the Font Software may be bundled,
63
+ redistributed and/or sold with any software, provided that each copy
64
+ contains the above copyright notice and this license. These can be
65
+ included either as stand-alone text files, human-readable headers or
66
+ in the appropriate machine-readable metadata fields within text or
67
+ binary files as long as those fields can be easily viewed by the user.
68
+
69
+ 3) No Modified Version of the Font Software may use the Reserved Font
70
+ Name(s) unless explicit written permission is granted by the corresponding
71
+ Copyright Holder. This restriction only applies to the primary font name as
72
+ presented to the users.
73
+
74
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
75
+ Software shall not be used to promote, endorse or advertise any
76
+ Modified Version, except to acknowledge the contribution(s) of the
77
+ Copyright Holder(s) and the Author(s) or with their explicit written
78
+ permission.
79
+
80
+ 5) The Font Software, modified or unmodified, in part or in whole,
81
+ must be distributed entirely under this license, and must not be
82
+ distributed under any other license. The requirement for fonts to
83
+ remain under this license does not apply to any document created
84
+ using the Font Software.
85
+
86
+ TERMINATION
87
+ This license becomes null and void if any of the above conditions are
88
+ not met.
89
+
90
+ DISCLAIMER
91
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
92
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
93
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
94
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
95
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
96
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
97
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
98
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
99
+ OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file
@@ -0,0 +1,4 @@
1
+ deck3d vendored prop corpus
2
+
3
+ All models in this directory are dedicated to the public domain under CC0-1.0.
4
+ Author: deck3d corpus. These are minimal synthetic glTF stand-ins.
Binary file
Binary file
Binary file
Binary file
Binary file