@blackbelt-technology/pi-dashboard-deck3d 0.0.0-stage → 0.9.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.
- package/.pi/skills/deck3d/SKILL.md +227 -0
- package/.pi/skills/deck3d/examples/deck.json +388 -0
- package/.pi/skills/deck3d/examples/fixture.md +18 -0
- package/.pi/skills/deck3d/examples/snapshot-after.png +0 -0
- package/.pi/skills/deck3d/examples/snapshot-before.png +0 -0
- package/.pi/skills/deck3d/reference/effects.agent.md +78 -0
- package/.pi/skills/deck3d/reference/effects.md +1217 -0
- package/.pi/skills/deck3d/reference/ir-fields.agent.md +30 -0
- package/.pi/skills/deck3d/reference/ir-fields.md +246 -0
- package/README.md +177 -2
- package/assets/LICENSE-Poppins.txt +99 -0
- package/assets/Poppins-Bold.ttf +0 -0
- package/assets/props/LICENSES.txt +4 -0
- package/assets/props/brain.glb +0 -0
- package/assets/props/cloud.glb +0 -0
- package/assets/props/cube.glb +0 -0
- package/assets/props/database.glb +0 -0
- package/assets/props/laptop.glb +0 -0
- package/assets/props/manifest.json +119 -0
- package/assets/props/robot.glb +0 -0
- package/assets/props/server.glb +0 -0
- package/assets/props/shield.glb +0 -0
- package/bin/deck3d +49 -0
- package/dist/cli.js +10228 -0
- package/dist/harvest/harness.js +185718 -0
- package/dist/runtime.js +64597 -0
- package/fixtures/business-2031/build-deck.mjs +60 -0
- package/fixtures/business-2031/build-overrides.mjs +154 -0
- package/fixtures/business-2031/deck.json +4220 -0
- package/fixtures/business-2031/deck.md +470 -0
- package/fixtures/business-2031/fx/closing-mark.js +43 -0
- package/fixtures/business-2031/fx/closing-mark.meta.json +26 -0
- package/fixtures/business-2031/overrides.json +903 -0
- package/fixtures/harvest.md +23 -0
- package/fixtures/strategy-lab.json +891 -0
- package/fixtures/strategy-lab.md +85 -0
- package/package.json +80 -4
- package/scripts/build-cli.mjs +29 -0
- package/scripts/build-harvest.ts +8 -0
- package/scripts/build-runtime.mjs +22 -0
- package/scripts/gen-effects.ts +14 -0
- package/scripts/gen-ir-fields.ts +34 -0
- package/src/check/index.ts +315 -0
- package/src/check/rules.ts +393 -0
- package/src/cli-io.ts +23 -0
- package/src/cli.ts +823 -0
- package/src/fx/accent-cycle.meta.json +26 -0
- package/src/fx/accent-cycle.ts +8 -0
- package/src/fx/agent-depth.meta.json +42 -0
- package/src/fx/agent-depth.ts +62 -0
- package/src/fx/ascii.meta.json +35 -0
- package/src/fx/ascii.ts +4 -0
- package/src/fx/aurora.meta.json +26 -0
- package/src/fx/aurora.ts +18 -0
- package/src/fx/billboards.meta.json +34 -0
- package/src/fx/billboards.ts +67 -0
- package/src/fx/bloom.meta.json +26 -0
- package/src/fx/bloom.ts +4 -0
- package/src/fx/camera-drift.meta.json +26 -0
- package/src/fx/camera-drift.ts +8 -0
- package/src/fx/capital-flows.meta.json +30 -0
- package/src/fx/capital-flows.ts +64 -0
- package/src/fx/catalogue.ts +89 -0
- package/src/fx/chromatic-aberration.meta.json +32 -0
- package/src/fx/chromatic-aberration.ts +4 -0
- package/src/fx/city-grid.meta.json +37 -0
- package/src/fx/city-grid.ts +51 -0
- package/src/fx/clipped-solids.meta.json +49 -0
- package/src/fx/clipped-solids.ts +171 -0
- package/src/fx/cohort-grid.meta.json +48 -0
- package/src/fx/cohort-grid.ts +63 -0
- package/src/fx/compose.ts +114 -0
- package/src/fx/constellation.meta.json +51 -0
- package/src/fx/constellation.ts +103 -0
- package/src/fx/curve-flow.meta.json +40 -0
- package/src/fx/curve-flow.ts +63 -0
- package/src/fx/dashed-flow.meta.json +27 -0
- package/src/fx/dashed-flow.ts +8 -0
- package/src/fx/data-columns.meta.json +30 -0
- package/src/fx/data-columns.ts +18 -0
- package/src/fx/defaults.ts +92 -0
- package/src/fx/depth-of-field.meta.json +40 -0
- package/src/fx/depth-of-field.ts +4 -0
- package/src/fx/dolly.meta.json +26 -0
- package/src/fx/dolly.ts +4 -0
- package/src/fx/dot-screen.meta.json +35 -0
- package/src/fx/dot-screen.ts +4 -0
- package/src/fx/dynamic-instances.meta.json +40 -0
- package/src/fx/dynamic-instances.ts +57 -0
- package/src/fx/emissive.meta.json +26 -0
- package/src/fx/emissive.ts +8 -0
- package/src/fx/extruded-shapes.meta.json +62 -0
- package/src/fx/extruded-shapes.ts +133 -0
- package/src/fx/fab-wafer.meta.json +42 -0
- package/src/fx/fab-wafer.ts +72 -0
- package/src/fx/fade.meta.json +26 -0
- package/src/fx/fade.ts +4 -0
- package/src/fx/film.meta.json +26 -0
- package/src/fx/film.ts +4 -0
- package/src/fx/float.meta.json +26 -0
- package/src/fx/float.ts +8 -0
- package/src/fx/flythrough.meta.json +26 -0
- package/src/fx/flythrough.ts +4 -0
- package/src/fx/fog.meta.json +26 -0
- package/src/fx/fog.ts +8 -0
- package/src/fx/geo-fragments.meta.json +48 -0
- package/src/fx/geo-fragments.ts +59 -0
- package/src/fx/glass.meta.json +26 -0
- package/src/fx/glass.ts +8 -0
- package/src/fx/globe-arcs.meta.json +36 -0
- package/src/fx/globe-arcs.ts +67 -0
- package/src/fx/glow-tube.meta.json +26 -0
- package/src/fx/glow-tube.ts +8 -0
- package/src/fx/glyph-rain.meta.json +30 -0
- package/src/fx/glyph-rain.ts +18 -0
- package/src/fx/god-rays.meta.json +40 -0
- package/src/fx/god-rays.ts +4 -0
- package/src/fx/grid-horizon.meta.json +30 -0
- package/src/fx/grid-horizon.ts +18 -0
- package/src/fx/hex-grid.meta.json +29 -0
- package/src/fx/hex-grid.ts +18 -0
- package/src/fx/holo-fresnel.meta.json +26 -0
- package/src/fx/holo-fresnel.ts +8 -0
- package/src/fx/horizon-gates.meta.json +36 -0
- package/src/fx/horizon-gates.ts +60 -0
- package/src/fx/index.ts +258 -0
- package/src/fx/iridescent.meta.json +26 -0
- package/src/fx/iridescent.ts +8 -0
- package/src/fx/iris.meta.json +26 -0
- package/src/fx/iris.ts +4 -0
- package/src/fx/lightformers.meta.json +26 -0
- package/src/fx/lightformers.ts +8 -0
- package/src/fx/local.ts +200 -0
- package/src/fx/market-tape.meta.json +53 -0
- package/src/fx/market-tape.ts +97 -0
- package/src/fx/matcap.meta.json +26 -0
- package/src/fx/matcap.ts +8 -0
- package/src/fx/meta.schema.json +49 -0
- package/src/fx/metal.meta.json +26 -0
- package/src/fx/metal.ts +8 -0
- package/src/fx/mirror-floor.meta.json +26 -0
- package/src/fx/mirror-floor.ts +8 -0
- package/src/fx/neural-mesh.meta.json +54 -0
- package/src/fx/neural-mesh.ts +110 -0
- package/src/fx/orbit-agents.meta.json +36 -0
- package/src/fx/orbit-agents.ts +63 -0
- package/src/fx/orbit.meta.json +27 -0
- package/src/fx/orbit.ts +8 -0
- package/src/fx/outline.meta.json +43 -0
- package/src/fx/outline.ts +4 -0
- package/src/fx/paper-stack.meta.json +36 -0
- package/src/fx/paper-stack.ts +61 -0
- package/src/fx/particle-stream.meta.json +27 -0
- package/src/fx/particle-stream.ts +8 -0
- package/src/fx/particles.meta.json +26 -0
- package/src/fx/particles.ts +8 -0
- package/src/fx/pixelate.meta.json +28 -0
- package/src/fx/pixelate.ts +4 -0
- package/src/fx/points-on-geometry.meta.json +61 -0
- package/src/fx/points-on-geometry.ts +71 -0
- package/src/fx/proof-gate.meta.json +30 -0
- package/src/fx/proof-gate.ts +67 -0
- package/src/fx/rings.meta.json +27 -0
- package/src/fx/rings.ts +8 -0
- package/src/fx/room-ibl.meta.json +26 -0
- package/src/fx/room-ibl.ts +8 -0
- package/src/fx/sao.meta.json +32 -0
- package/src/fx/sao.ts +4 -0
- package/src/fx/scaffold.ts +172 -0
- package/src/fx/scatter.meta.json +49 -0
- package/src/fx/scatter.ts +74 -0
- package/src/fx/selective-bloom.meta.json +36 -0
- package/src/fx/selective-bloom.ts +4 -0
- package/src/fx/server-racks.meta.json +36 -0
- package/src/fx/server-racks.ts +54 -0
- package/src/fx/shader-particles.meta.json +46 -0
- package/src/fx/shader-particles.ts +75 -0
- package/src/fx/signal-pulse.meta.json +27 -0
- package/src/fx/signal-pulse.ts +8 -0
- package/src/fx/smaa.meta.json +19 -0
- package/src/fx/smaa.ts +4 -0
- package/src/fx/sobel.meta.json +24 -0
- package/src/fx/sobel.ts +4 -0
- package/src/fx/soft-shadows.meta.json +26 -0
- package/src/fx/soft-shadows.ts +8 -0
- package/src/fx/sprites.meta.json +40 -0
- package/src/fx/sprites.ts +57 -0
- package/src/fx/stagger-reveal.meta.json +26 -0
- package/src/fx/stagger-reveal.ts +8 -0
- package/src/fx/starfield.meta.json +32 -0
- package/src/fx/starfield.ts +18 -0
- package/src/fx/swarm.meta.json +27 -0
- package/src/fx/swarm.ts +8 -0
- package/src/fx/tessellate.meta.json +39 -0
- package/src/fx/tessellate.ts +79 -0
- package/src/fx/tokens.meta.json +27 -0
- package/src/fx/tokens.ts +8 -0
- package/src/fx/trail.meta.json +27 -0
- package/src/fx/trail.ts +8 -0
- package/src/fx/trust-ledger.meta.json +30 -0
- package/src/fx/trust-ledger.ts +47 -0
- package/src/fx/types.ts +83 -0
- package/src/fx/util.ts +108 -0
- package/src/fx/vault-glyphs.meta.json +37 -0
- package/src/fx/vault-glyphs.ts +55 -0
- package/src/fx/video-screen.meta.json +57 -0
- package/src/fx/video-screen.ts +99 -0
- package/src/fx/vignette.meta.json +32 -0
- package/src/fx/vignette.ts +4 -0
- package/src/fx/volume-cloud.meta.json +58 -0
- package/src/fx/volume-cloud.ts +87 -0
- package/src/fx/volume-perlin.meta.json +46 -0
- package/src/fx/volume-perlin.ts +82 -0
- package/src/fx/volumetric-spot.meta.json +26 -0
- package/src/fx/volumetric-spot.ts +8 -0
- package/src/fx/wireframe-overlay.meta.json +27 -0
- package/src/fx/wireframe-overlay.ts +8 -0
- package/src/ir/defaults.ts +62 -0
- package/src/ir/field-reference.ts +96 -0
- package/src/ir/hash.ts +34 -0
- package/src/ir/ids.ts +65 -0
- package/src/ir/merge.ts +155 -0
- package/src/ir/schema.json +1211 -0
- package/src/ir/types.ts +333 -0
- package/src/ir/validate.ts +196 -0
- package/src/parse/derive.ts +205 -0
- package/src/parse/harvest/bundle.ts +56 -0
- package/src/parse/harvest/harness.html +22 -0
- package/src/parse/harvest/harness.ts +191 -0
- package/src/parse/harvest/index.ts +169 -0
- package/src/parse/harvest/shapes.ts +75 -0
- package/src/parse/markdown.ts +215 -0
- package/src/props/embed.ts +92 -0
- package/src/props/fetch.ts +97 -0
- package/src/props/generate.ts +152 -0
- package/src/props/key.ts +13 -0
- package/src/props/search.ts +180 -0
- package/src/render/embed-video.ts +80 -0
- package/src/render/font.ts +86 -0
- package/src/render/index.ts +149 -0
- package/src/render/template.html +87 -0
- package/src/runtime/backgrounds.ts +146 -0
- package/src/runtime/builders.ts +808 -0
- package/src/runtime/camera.ts +73 -0
- package/src/runtime/hud.ts +887 -0
- package/src/runtime/index.ts +1168 -0
- package/src/runtime/local-fx.ts +151 -0
- package/src/runtime/materials.ts +136 -0
- package/src/runtime/measure.ts +73 -0
- package/src/runtime/node-geometry.ts +26 -0
- package/src/runtime/palette.ts +111 -0
- package/src/runtime/post.ts +649 -0
- package/src/runtime/props.ts +292 -0
- package/src/runtime/quality.ts +20 -0
- package/src/runtime/rng.ts +8 -0
- package/src/runtime/scene.ts +644 -0
- package/src/runtime/text.ts +174 -0
- package/src/runtime/types.ts +118 -0
- package/src/serve/index.ts +376 -0
- package/src/util/paths.ts +35 -0
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deck3d
|
|
3
|
+
description: 'Build a self-contained 3D presentation from a Markdown outline — parse, tune via `overrides`, render to one offline deck.html. Use on "make a 3D deck from this outline", "build a presentation from these notes", "deck3d this markdown", "turn this talk into a 3D deck".'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# deck3d
|
|
7
|
+
|
|
8
|
+
Turn a Markdown outline into one self-contained, offline `deck.html`: extruded 3D
|
|
9
|
+
titles, harvested mermaid diagrams built as 3D objects, animated backgrounds, and
|
|
10
|
+
an optional glTF prop. The converter code is deterministic; **you tune the result
|
|
11
|
+
by writing `overrides` in `deck.json`**, never by editing the HTML.
|
|
12
|
+
|
|
13
|
+
## When to use
|
|
14
|
+
|
|
15
|
+
- The user has a Markdown outline (headings + bullets + ```mermaid blocks) and
|
|
16
|
+
wants a presentation they can open offline in a browser.
|
|
17
|
+
- You need to tune placement, legibility, mode, effects or props of an existing
|
|
18
|
+
`deck.json`.
|
|
19
|
+
|
|
20
|
+
## Markdown grammar
|
|
21
|
+
|
|
22
|
+
- `---` front-matter: deck defaults (`mode`, `palette`, `material`, `quality`, `transition`, …).
|
|
23
|
+
- `# Title` starts a slide. Zero headings ⇒ one slide id `slide`.
|
|
24
|
+
- The first paragraph after the heading (before bullets) is the subtitle.
|
|
25
|
+
- `- bullet` lines are body bullets.
|
|
26
|
+
- A fenced ```mermaid `flowchart` / `sequenceDiagram` block becomes the slide's
|
|
27
|
+
diagram (harvested in headless chromium). Any other diagram type ⇒ warn + no diagram.
|
|
28
|
+
- `<!-- deck3d: {...} -->` inline overrides win over `deck.json` and warn on clobber.
|
|
29
|
+
- Pin a slide id with `# Final {#outro}` so renames never orphan tuning.
|
|
30
|
+
|
|
31
|
+
## The tune loop
|
|
32
|
+
|
|
33
|
+
Interactive authoring path: `deck3d serve talk.md [--check]`. Watches sources,
|
|
34
|
+
rebuilds on change, reloads in place, re-pins local fx hashes, and lets the
|
|
35
|
+
configurator save or apply overrides directly.
|
|
36
|
+
|
|
37
|
+
Manual headless / agent / CI path:
|
|
38
|
+
|
|
39
|
+
1. `deck3d parse talk.md` → `talk.json` (derived IR + empty `overrides`).
|
|
40
|
+
2. `deck3d validate talk.json` → schema + derived-edit + orphan/prop warnings.
|
|
41
|
+
3. `deck3d build talk.md -o talk.html` → `talk.json` + `talk.html`; runs `check`
|
|
42
|
+
and prints `style: <n>/<N> slides styled`.
|
|
43
|
+
4. **Style** — mandatory, and the step that decides whether the deck looks
|
|
44
|
+
designed. `deck3d check talk.html --style` warns `style-defaults` for every
|
|
45
|
+
slide still running only what `parse` chose. For each one:
|
|
46
|
+
- pick a corpus effect (`deck3d fx list --topic geo`, `--kind background`;
|
|
47
|
+
the stylistic set — `clipped-solids`, `extruded-shapes`, `volume-cloud`,
|
|
48
|
+
`curve-flow`, … — is never auto-picked, so it is always an explicit choice)
|
|
49
|
+
*or* write a per-deck one with `deck3d fx scaffold <name> --for <slideId>`;
|
|
50
|
+
- give a content slide without a mermaid block a built topology
|
|
51
|
+
(`overrides.slides["<id>"].diagram.kind` + `data`);
|
|
52
|
+
- illustrate the section: `deck3d props search <kw> --role hero`,
|
|
53
|
+
`--role illustration`, and `props search --role ambient` for
|
|
54
|
+
low-triangle background instances;
|
|
55
|
+
- if extruded titles read as a solid block, set `titleEdge: "contrast"`
|
|
56
|
+
(deck default, or per slide) — it outlines every character in the
|
|
57
|
+
palette text colour;
|
|
58
|
+
- for a deck that wants a horizon, set `overrides.deck.floor: "water"`
|
|
59
|
+
(one global surface; per-slide is not a thing);
|
|
60
|
+
- the floor reflects the backgrounds too; `overrides.deck.reflectBackdrop:
|
|
61
|
+
false` limits the reflection to slide content (one less backdrop pass per
|
|
62
|
+
frame), and `overrides.deck.floorMatte` (0-1) roughens it — 0 is a perfect
|
|
63
|
+
mirror, ~0.35 reads as polished concrete, ~0.85 as scattered stone (the
|
|
64
|
+
`⚙` panel drags it on a slider), while `overrides.deck.floorReflectivity`
|
|
65
|
+
(0-1, default 1) sets how STRONG the reflection is; all deck-scope only;
|
|
66
|
+
- grade the frame with a `post` card (`deck3d fx list --kind post`): add
|
|
67
|
+
`{ "id": "outline", "params": { "parts": "diagram" } }` (or
|
|
68
|
+
`selective-bloom`, `god-rays`, `depth-of-field`, `pixelate`, `ascii`, …)
|
|
69
|
+
to the slide's `effects[]`. One or two per slide; they stack in a fixed
|
|
70
|
+
order, and `check` flags declared `conflicts`.
|
|
71
|
+
5. Read the `check` findings. **Fix only the suggested key** (e.g.
|
|
72
|
+
`overrides.slides["arch"].diagram.scale`), then re-run step 3.
|
|
73
|
+
6. `deck3d snapshot talk.html --slide 5 -o s5.png` to eyeball one slide.
|
|
74
|
+
7. Repeat until `check` is clean **and** the style line accounts for every slide
|
|
75
|
+
you meant to design.
|
|
76
|
+
|
|
77
|
+
Tune by writing `deck.json`'s `overrides` only:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
overrides: {
|
|
81
|
+
deck: { ...defaults knobs... },
|
|
82
|
+
effects: [{ id, params? }],
|
|
83
|
+
props: [{ source, id, licence, author, sha256, slide, role, size?, count?, restyle?, anim? }],
|
|
84
|
+
slides: { "<slideId>": { mode?, palette?, material?, scene?, quality?,
|
|
85
|
+
diagram: { scale?, offset? }, camera: { distance? }, labels: { size? },
|
|
86
|
+
check: { ignore? }, effects? } },
|
|
87
|
+
nodes: { "<slideId>/<nodeId>": { shape?, label?, position?, size?, material? } },
|
|
88
|
+
edges: { "<slideId>/<edgeId>": { kind?, material? } }
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Objects deep-merge; **arrays replace** (an `effects`/`props` list is the whole list);
|
|
93
|
+
`diagram.data` replaces as a whole object so labels and values never mix provenance.
|
|
94
|
+
Full field list: [`reference/ir-fields.md`](reference/ir-fields.md).
|
|
95
|
+
|
|
96
|
+
The deck's `⚙` configurator (`C` key, or the gear) tries knobs live. Its **Effects**
|
|
97
|
+
block ticks composed effects off and adds any corpus or `local:` card from the
|
|
98
|
+
`add effect…` picker; both rebuild the slide immediately. Under
|
|
99
|
+
`deck3d serve`, **Apply to deck.json** merges straight into `talk.json` and rebuilds;
|
|
100
|
+
**Save overrides.json** writes `overrides.json` beside the deck. In unserved decks
|
|
101
|
+
or headless workflows, **Export** writes an `overrides.json` in exactly this grammar.
|
|
102
|
+
Merge it manually with:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
deck3d overrides apply talk.json overrides.json
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
It deep-merges, re-validates, and refuses to write on a validation error. Note
|
|
109
|
+
that **markdown inline overrides win** over anything in that file, and an
|
|
110
|
+
exported `effects` list pins that scope's whole list.
|
|
111
|
+
|
|
112
|
+
## Styling with effects
|
|
113
|
+
|
|
114
|
+
`deck3d fx list [--kind k] [--tag t] [--json]` prints the catalogue;
|
|
115
|
+
[`reference/effects.md`](reference/effects.md) has params and licences.
|
|
116
|
+
|
|
117
|
+
- `parse` assigns deterministic defaults (title→`swarm`, flowchart→`tokens`,
|
|
118
|
+
sequence→`rings`, security→`glyph-rain`, data→`data-columns`), then routes the
|
|
119
|
+
rest by topic (`deck3d fx list --topic <t>`; `ai agents geo trust security
|
|
120
|
+
compute data money work timeline sales process`). `autoStyle: false` restores
|
|
121
|
+
the plain v1 fallback.
|
|
122
|
+
- Replace them with `overrides.slides["<id>"].effects = [{ id, params? }]`.
|
|
123
|
+
|
|
124
|
+
### Video on a slide
|
|
125
|
+
|
|
126
|
+
`video-screen` puts a looping clip on a framed screen standing in the scene:
|
|
127
|
+
|
|
128
|
+
```json
|
|
129
|
+
{ "id": "video-screen", "params": { "src": "video/demo.mp4", "width": 7.5, "x": 5, "y": 1, "tilt": -0.25 } }
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
The clip MUST be same-origin, or the browser taints the canvas and the frame
|
|
133
|
+
never renders. Two ways to satisfy that:
|
|
134
|
+
|
|
135
|
+
- `deck3d serve` serves media sitting beside the deck (`video/demo.mp4`), which
|
|
136
|
+
is the authoring path.
|
|
137
|
+
- `deck3d render deck.json -o deck.html --embed-video` inlines clips as `data:`
|
|
138
|
+
URLs for ONE portable file. Opt-in, because base64 costs ~33% on top of the
|
|
139
|
+
clip's own size.
|
|
140
|
+
|
|
141
|
+
A bare `file://deck.html` next to a `video/` folder does NOT work — that clip is
|
|
142
|
+
cross-origin. Playback freezes during transitions and runs only while the slide
|
|
143
|
+
is settled, so `check` and `snapshot` stay deterministic.
|
|
144
|
+
|
|
145
|
+
### Per-deck (local) effects
|
|
146
|
+
|
|
147
|
+
When no corpus effect fits the topic, write one beside `deck.md`:
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
deck3d fx scaffold neural-mesh --for ai # writes fx/neural-mesh.{js,meta.json}
|
|
151
|
+
deck3d fx preview local:neural-mesh --palette ember -o p.png
|
|
152
|
+
deck3d fx hash neural-mesh # re-pin after every edit
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Paste the printed `{ id: "local:<name>", sha256 }` entry into the slide's
|
|
156
|
+
`effects`. `render` embeds the source and refuses a stale hash, so the deck
|
|
157
|
+
stays byte-deterministic and offline.
|
|
158
|
+
|
|
159
|
+
Inside a local module the deck shadows the non-deterministic and I/O globals:
|
|
160
|
+
`Math.random` **is the deck's seeded per-slide generator**, and `window`,
|
|
161
|
+
`document`, `fetch`, `setTimeout`, `Date`, `Promise`, `eval` and friends are all
|
|
162
|
+
`undefined`. No `import`, one default export, 64 KiB cap. A throw disables that
|
|
163
|
+
effect only and shows up as `local-fx-error` in `check`; any network the deck
|
|
164
|
+
attempts shows up as `local-fx-network`. Promote a good one with
|
|
165
|
+
`deck3d fx promote <name> --source <url> --licence <spdx>`.
|
|
166
|
+
- Conflicts fail `render`; mode-incompatible effects are skipped with a warning;
|
|
167
|
+
the summed `cost` warns over the quality budget (`low` 6 / `medium` 12 / `high` 20).
|
|
168
|
+
|
|
169
|
+
## Props (content illustrations)
|
|
170
|
+
|
|
171
|
+
`deck3d props search <keywords>` → candidate table (vendored first, then Poly Pizza).
|
|
172
|
+
**You** pick by relevance then style — code never picks. Then:
|
|
173
|
+
|
|
174
|
+
1. Prefer one pack per deck and `restyle: "palette"`.
|
|
175
|
+
2. `deck3d props fetch <source> <id>` → prints the `overrides.props[]` entry
|
|
176
|
+
(with the `sha256`) and caches it in `.deck3d/props/`.
|
|
177
|
+
3. Add the entry to `overrides.props` (roles: `hero`, `illustration`,
|
|
178
|
+
`ambient`, `node:<id>`), then `build`/`snapshot`.
|
|
179
|
+
4. `deck3d props search <kw> --role ambient` filters to models cheap enough to
|
|
180
|
+
instance in the background and prints a ready `ambient` entry.
|
|
181
|
+
5. No model fits? `deck3d props generate --prompt "<text>" --name <n>` (or
|
|
182
|
+
`--from-image`). Optional python path; network at authoring time only.
|
|
183
|
+
|
|
184
|
+
Licences: CC0 needs no credits; CC-BY (and any non-CC0, non-`generated`) produces a
|
|
185
|
+
last `credits` slide at render. Never fetch a model whose licence you cannot name.
|
|
186
|
+
|
|
187
|
+
## Forbidden edits
|
|
188
|
+
|
|
189
|
+
- **Never edit `deck.html`** — it is regenerated; tune `deck.json` `overrides`.
|
|
190
|
+
- **Never edit derived fields** (`slides[]` and below) — `validate` warns
|
|
191
|
+
`edited outside overrides`; the next `parse` loses the change.
|
|
192
|
+
- If you need a knob that does not exist, propose a schema field — do not hack the HTML.
|
|
193
|
+
|
|
194
|
+
## Pitfalls
|
|
195
|
+
|
|
196
|
+
- `parse` of a deck **with mermaid needs chromium**; missing ⇒
|
|
197
|
+
`npx playwright install chromium`. `render`/`validate` never need a browser.
|
|
198
|
+
- Every three.js `typeface.json` has corrupt `ő ű Ő Ű` glyphs; deck3d uses a real
|
|
199
|
+
Poppins TTF through opentype.js — do not swap in a typeface.json.
|
|
200
|
+
- Extruded small text blooms and is unreadable; diagram labels are flat canvas
|
|
201
|
+
planes with a background-colour outline. Tune `labels.size`, not the material.
|
|
202
|
+
- Placement: `defaults.rail` (`line` `orbit` `tunnel` `helix` `grid`) strings the
|
|
203
|
+
slides in space, `defaults.spacing` sets the gap, `layout` (`split`
|
|
204
|
+
`split-reverse`) composes one slide, `cardOffset` nudges the card. Every rail
|
|
205
|
+
frames a slide identically, so a rail switch never needs a per-slide re-tune.
|
|
206
|
+
- The mermaid engine is pinned exactly; a bump is a deliberate change and the
|
|
207
|
+
harvest fixtures will fail if the rendered id scheme moves.
|
|
208
|
+
- Headless/background tabs stall `requestAnimationFrame`; the loop falls back to
|
|
209
|
+
`setTimeout` so snapshots capture a finished frame.
|
|
210
|
+
- **A `check: clean` deck can still be bare.** `check` measures fit and
|
|
211
|
+
legibility, not ambition — read the `style: <n>/<N> slides styled` line and
|
|
212
|
+
run `check --style` before calling a deck done.
|
|
213
|
+
|
|
214
|
+
## Contributing an effect
|
|
215
|
+
|
|
216
|
+
Development-time procedure on the package (distinct from the deck tune loop):
|
|
217
|
+
|
|
218
|
+
1. Search a source; check its licence against the allow-list: **MIT, Zlib,
|
|
219
|
+
BSD-2/3-Clause, CC0-1.0, Apache-2.0, OFL-1.1**. LYGIA (Prosperity) and
|
|
220
|
+
Shadertoy content (default CC BY-NC-SA) are **inspiration only** — never port
|
|
221
|
+
them verbatim.
|
|
222
|
+
2. Port to the module interface: `create(ctx, params) → { object?, pass?, material?, tick?, dispose() }`.
|
|
223
|
+
3. Write the card `src/fx/<id>.meta.json` (kind, tags, cost, modes, params schema,
|
|
224
|
+
conflicts, `source` URL, `licence`).
|
|
225
|
+
4. `deck3d fx preview <id>` → check the PNG is not black.
|
|
226
|
+
5. `npm run gen:effects` → regenerate `reference/effects.md`.
|
|
227
|
+
6. `npm test` → the corpus test validates every card and the catalogue hash.
|
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"engine": "0.1.0",
|
|
4
|
+
"mermaid": "11.17.2",
|
|
5
|
+
"source": "fixture.md",
|
|
6
|
+
"derivedHash": "fa060f4b7cc10bb8a84d6698df96f76ce85afdef9fd2ce44466a913a5e1b3e71"
|
|
7
|
+
},
|
|
8
|
+
"defaults": {
|
|
9
|
+
"mode": "dark",
|
|
10
|
+
"palette": "blackbelt",
|
|
11
|
+
"material": "glass",
|
|
12
|
+
"envReflections": true,
|
|
13
|
+
"mirrorFloor": true,
|
|
14
|
+
"softShadows": true,
|
|
15
|
+
"bloom": true,
|
|
16
|
+
"rimLight": true,
|
|
17
|
+
"fog": true,
|
|
18
|
+
"backgroundIntensity": 0.7,
|
|
19
|
+
"transition": "dolly",
|
|
20
|
+
"durationSec": 1.4,
|
|
21
|
+
"depthRelief": 0.7,
|
|
22
|
+
"quality": "high",
|
|
23
|
+
"extrudeDepth": 0.18,
|
|
24
|
+
"titleEdge": "none",
|
|
25
|
+
"camera": {
|
|
26
|
+
"distance": 9
|
|
27
|
+
},
|
|
28
|
+
"labels": {
|
|
29
|
+
"size": 0.28
|
|
30
|
+
},
|
|
31
|
+
"check": {
|
|
32
|
+
"ignore": []
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"slides": [
|
|
36
|
+
{
|
|
37
|
+
"index": 1,
|
|
38
|
+
"id": "agens-munkafolyamat",
|
|
39
|
+
"title": "Ágens munkafolyamat",
|
|
40
|
+
"bullets": [
|
|
41
|
+
"Mermaid flowchart → 3D",
|
|
42
|
+
"Szemantika: diagram.db",
|
|
43
|
+
"Layout: dagre"
|
|
44
|
+
],
|
|
45
|
+
"scene": "tokens",
|
|
46
|
+
"diagram": {
|
|
47
|
+
"kind": "flowchart",
|
|
48
|
+
"dir": "LR",
|
|
49
|
+
"nodes": [
|
|
50
|
+
{
|
|
51
|
+
"id": "U",
|
|
52
|
+
"label": "Fejlesztő",
|
|
53
|
+
"shape": "stadium",
|
|
54
|
+
"x": 52.38,
|
|
55
|
+
"y": 35,
|
|
56
|
+
"w": 88.76,
|
|
57
|
+
"h": 39
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "P",
|
|
61
|
+
"label": "Prompt",
|
|
62
|
+
"shape": "rect",
|
|
63
|
+
"x": 202.55,
|
|
64
|
+
"y": 35,
|
|
65
|
+
"w": 111.58,
|
|
66
|
+
"h": 54
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": "L",
|
|
70
|
+
"label": "LLM",
|
|
71
|
+
"shape": "hexagon",
|
|
72
|
+
"x": 341.15,
|
|
73
|
+
"y": 35,
|
|
74
|
+
"w": 65.63,
|
|
75
|
+
"h": 39
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": "K",
|
|
79
|
+
"label": "Kód + PR",
|
|
80
|
+
"shape": "rect",
|
|
81
|
+
"x": 488.43,
|
|
82
|
+
"y": 35,
|
|
83
|
+
"w": 128.94,
|
|
84
|
+
"h": 54
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"edges": [
|
|
88
|
+
{
|
|
89
|
+
"id": "U->P#0",
|
|
90
|
+
"from": "U",
|
|
91
|
+
"to": "P",
|
|
92
|
+
"kind": "normal",
|
|
93
|
+
"path": [
|
|
94
|
+
[
|
|
95
|
+
97.26,
|
|
96
|
+
35.5
|
|
97
|
+
],
|
|
98
|
+
[
|
|
99
|
+
100.1,
|
|
100
|
+
35.44
|
|
101
|
+
],
|
|
102
|
+
[
|
|
103
|
+
102.95,
|
|
104
|
+
35.38
|
|
105
|
+
],
|
|
106
|
+
[
|
|
107
|
+
105.79,
|
|
108
|
+
35.33
|
|
109
|
+
],
|
|
110
|
+
[
|
|
111
|
+
108.63,
|
|
112
|
+
35.27
|
|
113
|
+
],
|
|
114
|
+
[
|
|
115
|
+
111.48,
|
|
116
|
+
35.22
|
|
117
|
+
],
|
|
118
|
+
[
|
|
119
|
+
114.32,
|
|
120
|
+
35.18
|
|
121
|
+
],
|
|
122
|
+
[
|
|
123
|
+
117.17,
|
|
124
|
+
35.13
|
|
125
|
+
],
|
|
126
|
+
[
|
|
127
|
+
120.01,
|
|
128
|
+
35.1
|
|
129
|
+
],
|
|
130
|
+
[
|
|
131
|
+
122.85,
|
|
132
|
+
35.07
|
|
133
|
+
],
|
|
134
|
+
[
|
|
135
|
+
125.7,
|
|
136
|
+
35.04
|
|
137
|
+
],
|
|
138
|
+
[
|
|
139
|
+
128.54,
|
|
140
|
+
35.02
|
|
141
|
+
],
|
|
142
|
+
[
|
|
143
|
+
131.39,
|
|
144
|
+
35.01
|
|
145
|
+
],
|
|
146
|
+
[
|
|
147
|
+
134.23,
|
|
148
|
+
35
|
|
149
|
+
],
|
|
150
|
+
[
|
|
151
|
+
137.07,
|
|
152
|
+
35
|
|
153
|
+
],
|
|
154
|
+
[
|
|
155
|
+
139.92,
|
|
156
|
+
35
|
|
157
|
+
],
|
|
158
|
+
[
|
|
159
|
+
142.76,
|
|
160
|
+
35
|
|
161
|
+
]
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"id": "P->L#0",
|
|
166
|
+
"from": "P",
|
|
167
|
+
"to": "L",
|
|
168
|
+
"kind": "normal",
|
|
169
|
+
"path": [
|
|
170
|
+
[
|
|
171
|
+
258.34,
|
|
172
|
+
35
|
|
173
|
+
],
|
|
174
|
+
[
|
|
175
|
+
261.25,
|
|
176
|
+
35
|
|
177
|
+
],
|
|
178
|
+
[
|
|
179
|
+
264.15,
|
|
180
|
+
35
|
|
181
|
+
],
|
|
182
|
+
[
|
|
183
|
+
267.06,
|
|
184
|
+
35
|
|
185
|
+
],
|
|
186
|
+
[
|
|
187
|
+
269.97,
|
|
188
|
+
35.01
|
|
189
|
+
],
|
|
190
|
+
[
|
|
191
|
+
272.87,
|
|
192
|
+
35.01
|
|
193
|
+
],
|
|
194
|
+
[
|
|
195
|
+
275.78,
|
|
196
|
+
35.02
|
|
197
|
+
],
|
|
198
|
+
[
|
|
199
|
+
278.68,
|
|
200
|
+
35.04
|
|
201
|
+
],
|
|
202
|
+
[
|
|
203
|
+
281.59,
|
|
204
|
+
35.06
|
|
205
|
+
],
|
|
206
|
+
[
|
|
207
|
+
284.5,
|
|
208
|
+
35.09
|
|
209
|
+
],
|
|
210
|
+
[
|
|
211
|
+
287.4,
|
|
212
|
+
35.12
|
|
213
|
+
],
|
|
214
|
+
[
|
|
215
|
+
290.31,
|
|
216
|
+
35.16
|
|
217
|
+
],
|
|
218
|
+
[
|
|
219
|
+
293.22,
|
|
220
|
+
35.21
|
|
221
|
+
],
|
|
222
|
+
[
|
|
223
|
+
296.12,
|
|
224
|
+
35.25
|
|
225
|
+
],
|
|
226
|
+
[
|
|
227
|
+
299.03,
|
|
228
|
+
35.31
|
|
229
|
+
],
|
|
230
|
+
[
|
|
231
|
+
301.93,
|
|
232
|
+
35.36
|
|
233
|
+
],
|
|
234
|
+
[
|
|
235
|
+
304.84,
|
|
236
|
+
35.42
|
|
237
|
+
]
|
|
238
|
+
]
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"id": "L->K#0",
|
|
242
|
+
"from": "L",
|
|
243
|
+
"to": "K",
|
|
244
|
+
"kind": "normal",
|
|
245
|
+
"path": [
|
|
246
|
+
[
|
|
247
|
+
374.46,
|
|
248
|
+
35.5
|
|
249
|
+
],
|
|
250
|
+
[
|
|
251
|
+
377.31,
|
|
252
|
+
35.44
|
|
253
|
+
],
|
|
254
|
+
[
|
|
255
|
+
380.15,
|
|
256
|
+
35.38
|
|
257
|
+
],
|
|
258
|
+
[
|
|
259
|
+
382.99,
|
|
260
|
+
35.33
|
|
261
|
+
],
|
|
262
|
+
[
|
|
263
|
+
385.84,
|
|
264
|
+
35.27
|
|
265
|
+
],
|
|
266
|
+
[
|
|
267
|
+
388.68,
|
|
268
|
+
35.22
|
|
269
|
+
],
|
|
270
|
+
[
|
|
271
|
+
391.52,
|
|
272
|
+
35.18
|
|
273
|
+
],
|
|
274
|
+
[
|
|
275
|
+
394.37,
|
|
276
|
+
35.13
|
|
277
|
+
],
|
|
278
|
+
[
|
|
279
|
+
397.21,
|
|
280
|
+
35.1
|
|
281
|
+
],
|
|
282
|
+
[
|
|
283
|
+
400.06,
|
|
284
|
+
35.07
|
|
285
|
+
],
|
|
286
|
+
[
|
|
287
|
+
402.9,
|
|
288
|
+
35.04
|
|
289
|
+
],
|
|
290
|
+
[
|
|
291
|
+
405.74,
|
|
292
|
+
35.02
|
|
293
|
+
],
|
|
294
|
+
[
|
|
295
|
+
408.59,
|
|
296
|
+
35.01
|
|
297
|
+
],
|
|
298
|
+
[
|
|
299
|
+
411.43,
|
|
300
|
+
35.01
|
|
301
|
+
],
|
|
302
|
+
[
|
|
303
|
+
414.28,
|
|
304
|
+
35
|
|
305
|
+
],
|
|
306
|
+
[
|
|
307
|
+
417.12,
|
|
308
|
+
35
|
|
309
|
+
],
|
|
310
|
+
[
|
|
311
|
+
419.96,
|
|
312
|
+
35
|
|
313
|
+
]
|
|
314
|
+
]
|
|
315
|
+
}
|
|
316
|
+
],
|
|
317
|
+
"groups": []
|
|
318
|
+
},
|
|
319
|
+
"camera": {
|
|
320
|
+
"distance": 9
|
|
321
|
+
},
|
|
322
|
+
"labels": {
|
|
323
|
+
"size": 0.28
|
|
324
|
+
},
|
|
325
|
+
"check": {
|
|
326
|
+
"ignore": []
|
|
327
|
+
},
|
|
328
|
+
"effects": [
|
|
329
|
+
{
|
|
330
|
+
"id": "tokens"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"id": "signal-pulse"
|
|
334
|
+
}
|
|
335
|
+
],
|
|
336
|
+
"subtitle": "Egy ügynök munkafolyamata."
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"index": 2,
|
|
340
|
+
"id": "osszegzes",
|
|
341
|
+
"title": "Összegzés",
|
|
342
|
+
"bullets": [],
|
|
343
|
+
"scene": "swarm",
|
|
344
|
+
"diagram": {
|
|
345
|
+
"kind": "none"
|
|
346
|
+
},
|
|
347
|
+
"camera": {
|
|
348
|
+
"distance": 9
|
|
349
|
+
},
|
|
350
|
+
"labels": {
|
|
351
|
+
"size": 0.28
|
|
352
|
+
},
|
|
353
|
+
"check": {
|
|
354
|
+
"ignore": []
|
|
355
|
+
},
|
|
356
|
+
"effects": [
|
|
357
|
+
{
|
|
358
|
+
"id": "swarm"
|
|
359
|
+
}
|
|
360
|
+
],
|
|
361
|
+
"subtitle": "A jövő már itt van."
|
|
362
|
+
}
|
|
363
|
+
],
|
|
364
|
+
"overrides": {
|
|
365
|
+
"slides": {
|
|
366
|
+
"agens-munkafolyamat": {
|
|
367
|
+
"mode": "light"
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
"nodes": {
|
|
371
|
+
"agens-munkafolyamat/L": {
|
|
372
|
+
"shape": "diamond"
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
"props": [
|
|
376
|
+
{
|
|
377
|
+
"source": "vendored",
|
|
378
|
+
"id": "brain",
|
|
379
|
+
"licence": "CC0-1.0",
|
|
380
|
+
"author": "deck3d corpus",
|
|
381
|
+
"sha256": "a942bf2afd4fde7bcc173331b27f400db9e27473966ed588766e7c309d1ee351",
|
|
382
|
+
"slide": "agens-munkafolyamat",
|
|
383
|
+
"role": "node:L",
|
|
384
|
+
"restyle": "palette"
|
|
385
|
+
}
|
|
386
|
+
]
|
|
387
|
+
}
|
|
388
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Ágens munkafolyamat
|
|
2
|
+
|
|
3
|
+
Egy ügynök munkafolyamata.
|
|
4
|
+
|
|
5
|
+
- Mermaid flowchart → 3D
|
|
6
|
+
- Szemantika: diagram.db
|
|
7
|
+
- Layout: dagre
|
|
8
|
+
|
|
9
|
+
```mermaid
|
|
10
|
+
flowchart LR
|
|
11
|
+
U([Fejlesztő]) --> P[Prompt]
|
|
12
|
+
P --> L{{LLM}}
|
|
13
|
+
L --> K[Kód + PR]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
# Összegzés
|
|
17
|
+
|
|
18
|
+
A jövő már itt van.
|
|
Binary file
|
|
Binary file
|