@blackbelt-technology/pi-dashboard-deck3d 0.9.0 → 0.11.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.agent.md +78 -0
- package/.pi/skills/deck3d/SKILL.md +68 -0
- package/.pi/skills/deck3d/reference/effects.md +185 -2
- package/.pi/skills/deck3d/reference/ir-fields.md +26 -3
- package/.pi/skills/deck3d-from-pptx/SKILL.md +134 -0
- package/.pi/skills/deck3d-from-pptx/reference/steps.md +72 -0
- package/README.md +30 -2
- package/assets/preview/stub-chrome.png +0 -0
- package/assets/preview/stub-icon.json +59 -0
- package/assets/preview/stub-layout.json +195 -0
- package/assets/preview/stub-outline.json +48 -0
- package/dist/cli.js +11780 -5934
- package/dist/runtime.js +5916 -4007
- package/fixtures/business-2031/assets/stub-chrome.png +0 -0
- package/fixtures/business-2031/assets/stub-icon.json +59 -0
- package/fixtures/business-2031/assets/stub-layout.json +195 -0
- package/fixtures/business-2031/assets/stub-outline.json +48 -0
- package/fixtures/business-2031/build-overrides.mjs +58 -13
- package/fixtures/business-2031/deck.agent.md +60 -0
- package/fixtures/business-2031/deck.json +133 -8
- package/fixtures/business-2031/overrides.json +133 -8
- package/package.json +8 -4
- package/scripts/gen-stub-assets.ts +31 -0
- package/src/art/cutout.ts +97 -0
- package/src/art/decode.ts +169 -0
- package/src/art/icon.ts +380 -0
- package/src/art/png.ts +232 -0
- package/src/art/trace.ts +288 -0
- package/src/check/rules.ts +13 -8
- package/src/cli.ts +313 -51
- package/src/compare/index.ts +131 -0
- package/src/compare/ssim.ts +91 -0
- package/src/fx/art-geometry.ts +137 -0
- package/src/fx/art3d.meta.json +30 -0
- package/src/fx/art3d.ts +131 -0
- package/src/fx/bank.meta.json +26 -0
- package/src/fx/bank.ts +8 -0
- package/src/fx/compose.ts +5 -4
- package/src/fx/crane.meta.json +26 -0
- package/src/fx/crane.ts +8 -0
- package/src/fx/dolly.ts +5 -1
- package/src/fx/fade.ts +5 -1
- package/src/fx/flythrough.ts +5 -1
- package/src/fx/frame-chrome.meta.json +17 -0
- package/src/fx/frame-chrome.ts +134 -0
- package/src/fx/haze.meta.json +19 -0
- package/src/fx/haze.ts +91 -0
- package/src/fx/icon3d.meta.json +21 -0
- package/src/fx/icon3d.ts +167 -0
- package/src/fx/index.ts +96 -66
- package/src/fx/iris.ts +5 -1
- package/src/fx/meta.schema.json +10 -2
- package/src/fx/path.meta.json +25 -0
- package/src/fx/path.ts +8 -0
- package/src/fx/persistent.ts +11 -0
- package/src/fx/revolve.meta.json +26 -0
- package/src/fx/revolve.ts +8 -0
- package/src/fx/slide-layer.meta.json +26 -0
- package/src/fx/slide-layer.ts +557 -0
- package/src/fx/slide-space.ts +142 -0
- package/src/fx/stub-assets.ts +117 -0
- package/src/fx/swing.meta.json +26 -0
- package/src/fx/swing.ts +8 -0
- package/src/fx/types.ts +63 -2
- package/src/ir/merge.ts +5 -2
- package/src/ir/schema.json +140 -3
- package/src/ir/types.ts +54 -0
- package/src/ir/validate.ts +91 -3
- package/src/parse/harvest/index.ts +4 -1
- package/src/parse/markdown.ts +38 -7
- package/src/pptx/baseline.ts +183 -0
- package/src/pptx/extract.ts +161 -0
- package/src/pptx/fallback.ts +70 -0
- package/src/pptx/import.ts +256 -0
- package/src/pptx/master.ts +135 -0
- package/src/pptx/media.ts +81 -0
- package/src/pptx/package.ts +109 -0
- package/src/pptx/ref.ts +100 -0
- package/src/pptx/shapes.ts +276 -0
- package/src/pptx/stage.ts +82 -0
- package/src/pptx/text.ts +202 -0
- package/src/pptx/theme.ts +194 -0
- package/src/pptx/types.ts +159 -0
- package/src/pptx/xfrm.ts +93 -0
- package/src/pptx/xml.ts +106 -0
- package/src/pptx/zip.ts +239 -0
- package/src/render/assets.ts +57 -0
- package/src/render/build.ts +75 -0
- package/src/render/index.ts +7 -2
- package/src/render/template.html +1 -1
- package/src/runtime/assets.ts +75 -0
- package/src/runtime/fade.ts +110 -0
- package/src/runtime/hud.ts +37 -9
- package/src/runtime/index.ts +431 -67
- package/src/runtime/post.ts +11 -5
- package/src/runtime/scene.ts +25 -2
- package/src/runtime/transition.ts +222 -0
- package/src/runtime/types.ts +13 -2
- package/src/serve/index.ts +199 -16
- package/src/util/cleanup.ts +13 -0
- package/src/util/confine.ts +15 -0
- package/src/variants/pick.ts +282 -0
- package/src/variants/render.ts +179 -0
- package/src/variants/schema.json +48 -0
- package/src/variants/style.ts +318 -0
package/src/fx/haze.ts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `haze` — background-coloured, soft-edged translucent planes between the
|
|
3
|
+
* slide and its distant background world, so a bold backdrop recedes behind
|
|
4
|
+
* the content (design D4). Every plane's bottom edge sits at `floor` (default
|
|
5
|
+
* the deck floor, y −2.6) and no vertex goes below it, so the planes never
|
|
6
|
+
* poke through the floor and there is no hard horizontal seam where they meet
|
|
7
|
+
* it: the texture is opaque-soft at the bottom edge, fading upward and
|
|
8
|
+
* sideways.
|
|
9
|
+
*/
|
|
10
|
+
import type * as THREE_NS from "three";
|
|
11
|
+
import type { FxContext, FxFactory, FxHandle, FxParams } from "./types.js";
|
|
12
|
+
|
|
13
|
+
/** y of the deck floor (`runtime/scene.ts`). */
|
|
14
|
+
export const FLOOR_Y = -2.6;
|
|
15
|
+
|
|
16
|
+
const num = (v: unknown, d: number): number => (typeof v === "number" && Number.isFinite(v) ? v : d);
|
|
17
|
+
|
|
18
|
+
function softTexture(): HTMLCanvasElement {
|
|
19
|
+
const c = document.createElement("canvas");
|
|
20
|
+
c.width = 256;
|
|
21
|
+
c.height = 128;
|
|
22
|
+
const g = c.getContext("2d") as CanvasRenderingContext2D;
|
|
23
|
+
// Alpha: soft on the sides and top, strongest toward (but gently into) the bottom edge.
|
|
24
|
+
const horiz = g.createLinearGradient(0, 0, 256, 0);
|
|
25
|
+
horiz.addColorStop(0, "rgba(255,255,255,0)");
|
|
26
|
+
horiz.addColorStop(0.25, "rgba(255,255,255,1)");
|
|
27
|
+
horiz.addColorStop(0.75, "rgba(255,255,255,1)");
|
|
28
|
+
horiz.addColorStop(1, "rgba(255,255,255,0)");
|
|
29
|
+
g.fillStyle = horiz;
|
|
30
|
+
g.fillRect(0, 0, 256, 128);
|
|
31
|
+
g.globalCompositeOperation = "destination-in";
|
|
32
|
+
const vert = g.createLinearGradient(0, 0, 0, 128);
|
|
33
|
+
vert.addColorStop(0, "rgba(0,0,0,0)");
|
|
34
|
+
vert.addColorStop(0.55, "rgba(0,0,0,1)");
|
|
35
|
+
vert.addColorStop(1, "rgba(0,0,0,0.55)");
|
|
36
|
+
g.fillStyle = vert;
|
|
37
|
+
g.fillRect(0, 0, 256, 128);
|
|
38
|
+
return c;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export const create: FxFactory = (ctx: FxContext, params: FxParams): FxHandle => {
|
|
42
|
+
const THREE = ctx.THREE;
|
|
43
|
+
const layers = Math.max(1, Math.round(num(params.layers, 4)));
|
|
44
|
+
const near = num(params.near, 6);
|
|
45
|
+
const far = num(params.far, 26);
|
|
46
|
+
const density = Math.min(1, Math.max(0, num(params.density, 0.5)));
|
|
47
|
+
const drift = num(params.drift, 0.15);
|
|
48
|
+
const floor = num(params.floor, FLOOR_Y);
|
|
49
|
+
const color = new THREE.Color(typeof params.color === "string" ? params.color : ctx.palette.bg);
|
|
50
|
+
|
|
51
|
+
const root = new THREE.Group();
|
|
52
|
+
const tex = new THREE.CanvasTexture(softTexture());
|
|
53
|
+
const geom = new THREE.PlaneGeometry(1, 1);
|
|
54
|
+
// Bottom edge at y = 0 in the plane's local space, so `position.y = floor` pins it there.
|
|
55
|
+
geom.translate(0, 0.5, 0);
|
|
56
|
+
const mats: THREE_NS.MeshBasicMaterial[] = [];
|
|
57
|
+
const planes: THREE_NS.Mesh[] = [];
|
|
58
|
+
for (let i = 0; i < layers; i++) {
|
|
59
|
+
const k = layers === 1 ? 0 : i / (layers - 1);
|
|
60
|
+
const z = -(near + (far - near) * k);
|
|
61
|
+
const mat = new THREE.MeshBasicMaterial({ map: tex, color, transparent: true, opacity: density * (0.35 + 0.65 * k), depthWrite: false, fog: false });
|
|
62
|
+
mats.push(mat);
|
|
63
|
+
const mesh = new THREE.Mesh(geom, mat);
|
|
64
|
+
const h = 9 + 7 * k;
|
|
65
|
+
const w = 26 + 22 * k;
|
|
66
|
+
mesh.scale.set(w, h, 1);
|
|
67
|
+
mesh.position.set(0, floor, z);
|
|
68
|
+
mesh.renderOrder = 2;
|
|
69
|
+
planes.push(mesh);
|
|
70
|
+
root.add(mesh);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return {
|
|
74
|
+
object: root,
|
|
75
|
+
// Probe for tests: lowest world y over every plane vertex.
|
|
76
|
+
debug: () => {
|
|
77
|
+
root.updateWorldMatrix(true, true);
|
|
78
|
+
return { minY: new THREE.Box3().setFromObject(root).min.y, floor };
|
|
79
|
+
},
|
|
80
|
+
tick: (t: number) => {
|
|
81
|
+
planes.forEach((p, i) => {
|
|
82
|
+
p.position.x = Math.sin(t * drift + i * 1.7) * 1.2;
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
dispose: () => {
|
|
86
|
+
geom.dispose();
|
|
87
|
+
tex.dispose();
|
|
88
|
+
for (const m of mats) m.dispose();
|
|
89
|
+
},
|
|
90
|
+
} as FxHandle;
|
|
91
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "icon3d",
|
|
3
|
+
"kind": "layer",
|
|
4
|
+
"tags": { "mood": ["playful", "tactile"], "content": ["icon", "pictogram", "traced-art"] },
|
|
5
|
+
"cost": 1,
|
|
6
|
+
"modes": "both",
|
|
7
|
+
"params": {
|
|
8
|
+
"asset": { "type": "string" },
|
|
9
|
+
"item": { "type": "string" },
|
|
10
|
+
"layout": { "type": "string", "default": "pptx-layout" },
|
|
11
|
+
"slide": { "type": "string" },
|
|
12
|
+
"card": { "type": "boolean", "default": false },
|
|
13
|
+
"color": { "type": "string" },
|
|
14
|
+
"rim": { "type": "string" },
|
|
15
|
+
"depth": { "type": "number", "default": 0.6, "minimum": -1, "maximum": 3 },
|
|
16
|
+
"sway": { "type": "number", "default": 0.12, "minimum": 0, "maximum": 1 }
|
|
17
|
+
},
|
|
18
|
+
"conflicts": [],
|
|
19
|
+
"source": "https://github.com/BlackBeltTechnology/pi-agent-dashboard/tree/develop/packages/deck3d/src/fx/icon3d.ts",
|
|
20
|
+
"licence": "MIT"
|
|
21
|
+
}
|
package/src/fx/icon3d.ts
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `icon3d` — builds an icon as a 3D object at a layout item's rect:
|
|
3
|
+
* - an `art icon` polyline asset → capsule tubes (radius = stroke width / 2,
|
|
4
|
+
* rounded at joints and ends), or
|
|
5
|
+
* - an outline asset (`art trace`) → extruded.
|
|
6
|
+
* Optionally seats it on a glass card with a rim. The ENTRY animation (spin +
|
|
7
|
+
* flash) starts when the runtime reports the slide settled (`setActive(true)`)
|
|
8
|
+
* — never from frame-timing gaps — and plays once per arrival; an idle sway,
|
|
9
|
+
* bob and periodic flash follow. List the item in `slide-layer.skip` so the
|
|
10
|
+
* flat glyph is not drawn as well.
|
|
11
|
+
*/
|
|
12
|
+
import type * as THREE_NS from "three";
|
|
13
|
+
import type { IconOutput } from "../art/icon.js";
|
|
14
|
+
import type { Outline } from "../art/trace.js";
|
|
15
|
+
import type { Layout } from "../pptx/types.js";
|
|
16
|
+
import { extrudePolygon, outlineBounds, segmentMatrix } from "./art-geometry.js";
|
|
17
|
+
import { planeMap, poseBasis, projectPoints } from "./slide-space.js";
|
|
18
|
+
import type { FxContext, FxFactory, FxHandle, FxParams } from "./types.js";
|
|
19
|
+
|
|
20
|
+
const num = (v: unknown, d: number): number => (typeof v === "number" && Number.isFinite(v) ? v : d);
|
|
21
|
+
const ENTRY_SECONDS = 1.1;
|
|
22
|
+
const easeOut = (x: number) => 1 - (1 - x) ** 3;
|
|
23
|
+
|
|
24
|
+
export const create: FxFactory = (ctx: FxContext, params: FxParams): FxHandle => {
|
|
25
|
+
const THREE = ctx.THREE;
|
|
26
|
+
if (!ctx.view) throw new Error("icon3d needs the runtime view (corpus layer effect)");
|
|
27
|
+
const view = ctx.view;
|
|
28
|
+
const layout = ctx.assets.get(String(params.layout ?? "pptx-layout")) as Layout;
|
|
29
|
+
const slide = layout.slides.find((s) => s.id === (typeof params.slide === "string" ? params.slide : ctx.slide.id));
|
|
30
|
+
const item = slide?.items.find((i) => i.id === params.item);
|
|
31
|
+
if (!item) throw new Error(`icon3d: no layout item '${String(params.item)}' on slide '${ctx.slide.id}'`);
|
|
32
|
+
const asset = ctx.assets.get(String(params.asset)) as IconOutput | Outline;
|
|
33
|
+
const color = new THREE.Color(typeof params.color === "string" ? params.color : ctx.palette.accent);
|
|
34
|
+
const rim = new THREE.Color(typeof params.rim === "string" ? params.rim : ctx.palette.second);
|
|
35
|
+
const card = params.card === true;
|
|
36
|
+
|
|
37
|
+
const { width, height } = view.viewport();
|
|
38
|
+
const basis = poseBasis(THREE, view);
|
|
39
|
+
const map = planeMap(THREE, basis, view.pose.fov, width, height, layout.size, num(params.depth, 0.6));
|
|
40
|
+
const cx = item.rect.x + item.rect.w / 2;
|
|
41
|
+
const cy = item.rect.y + item.rect.h / 2;
|
|
42
|
+
const centre = map.point(cx, cy);
|
|
43
|
+
const box = Math.min(item.rect.w, item.rect.h) * map.unit;
|
|
44
|
+
|
|
45
|
+
const root = new THREE.Group();
|
|
46
|
+
root.position.copy(centre);
|
|
47
|
+
root.quaternion.copy(map.quaternion);
|
|
48
|
+
const spinner = new THREE.Group();
|
|
49
|
+
root.add(spinner);
|
|
50
|
+
const disposables: Array<{ dispose(): void }> = [];
|
|
51
|
+
|
|
52
|
+
const mat = new THREE.MeshStandardMaterial({ color, metalness: 0.35, roughness: 0.3, emissive: color, emissiveIntensity: 0.05 });
|
|
53
|
+
disposables.push(mat);
|
|
54
|
+
|
|
55
|
+
if ("polylines" in asset) {
|
|
56
|
+
const [vx, vy, vw, vh] = asset.viewBox;
|
|
57
|
+
const k = (card ? 0.62 : 0.92) * box / Math.max(vw, vh);
|
|
58
|
+
const segs: Array<[THREE_NS.Vector3, THREE_NS.Vector3, number]> = [];
|
|
59
|
+
const joints: Array<[THREE_NS.Vector3, number]> = [];
|
|
60
|
+
for (const line of asset.polylines) {
|
|
61
|
+
const pts = line.points.map(([x, y]) => new THREE.Vector3((x - vx - vw / 2) * k, -(y - vy - vh / 2) * k, 0));
|
|
62
|
+
const r = Math.max(0.01, (line.width * k) / 2);
|
|
63
|
+
const n = line.closed ? pts.length : pts.length - 1;
|
|
64
|
+
for (let i = 0; i < n; i++) segs.push([pts[i], pts[(i + 1) % pts.length], r]);
|
|
65
|
+
for (const p of pts) joints.push([p, r]);
|
|
66
|
+
}
|
|
67
|
+
const cyl = new THREE.CylinderGeometry(1, 1, 1, 10, 1, true);
|
|
68
|
+
const ball = new THREE.SphereGeometry(1, 10, 8);
|
|
69
|
+
disposables.push(cyl, ball);
|
|
70
|
+
const tubes = new THREE.InstancedMesh(cyl, mat, Math.max(1, segs.length));
|
|
71
|
+
segs.forEach(([a, b, r], i) => tubes.setMatrixAt(i, segmentMatrix(THREE, a, b, r)));
|
|
72
|
+
tubes.count = segs.length;
|
|
73
|
+
const balls = new THREE.InstancedMesh(ball, mat, Math.max(1, joints.length));
|
|
74
|
+
joints.forEach(([p, r], i) => balls.setMatrixAt(i, new THREE.Matrix4().compose(p, new THREE.Quaternion(), new THREE.Vector3(r, r, r))));
|
|
75
|
+
balls.count = joints.length;
|
|
76
|
+
spinner.add(tubes, balls);
|
|
77
|
+
} else {
|
|
78
|
+
const b = outlineBounds(asset);
|
|
79
|
+
const w = Math.max(1, b.maxX - b.minX);
|
|
80
|
+
const h = Math.max(1, b.maxY - b.minY);
|
|
81
|
+
const scale = ((card ? 0.62 : 0.92) * box) / Math.max(w, h);
|
|
82
|
+
for (const poly of asset.polygons) {
|
|
83
|
+
const geom = extrudePolygon(THREE, poly.outer, poly.holes, { depth: box * 0.12, bevel: box * 0.01, scale, cx: (b.minX + b.maxX) / 2, cy: (b.minY + b.maxY) / 2 });
|
|
84
|
+
if (!geom) continue;
|
|
85
|
+
disposables.push(geom);
|
|
86
|
+
spinner.add(new THREE.Mesh(geom, mat));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (card) {
|
|
91
|
+
const cardMat = new THREE.MeshPhysicalMaterial({ color: ctx.palette.card, transparent: true, opacity: 0.6, roughness: 0.15, transmission: 0.35, thickness: 0.2, depthWrite: false });
|
|
92
|
+
const rimMat = new THREE.MeshBasicMaterial({ color: rim, toneMapped: false });
|
|
93
|
+
const half = box / 2;
|
|
94
|
+
const r = box * 0.12;
|
|
95
|
+
const shape = new THREE.Shape();
|
|
96
|
+
shape.moveTo(-half + r, -half);
|
|
97
|
+
shape.lineTo(half - r, -half);
|
|
98
|
+
shape.quadraticCurveTo(half, -half, half, -half + r);
|
|
99
|
+
shape.lineTo(half, half - r);
|
|
100
|
+
shape.quadraticCurveTo(half, half, half - r, half);
|
|
101
|
+
shape.lineTo(-half + r, half);
|
|
102
|
+
shape.quadraticCurveTo(-half, half, -half, half - r);
|
|
103
|
+
shape.lineTo(-half, -half + r);
|
|
104
|
+
shape.quadraticCurveTo(-half, -half, -half + r, -half);
|
|
105
|
+
const slab = new THREE.Mesh(new THREE.ShapeGeometry(shape), cardMat);
|
|
106
|
+
slab.position.z = -box * 0.08;
|
|
107
|
+
const edge = new THREE.LineLoop(new THREE.BufferGeometry().setFromPoints(shape.getPoints(8)), new THREE.LineBasicMaterial({ color: rim }));
|
|
108
|
+
edge.position.z = -box * 0.075;
|
|
109
|
+
root.add(slab, edge);
|
|
110
|
+
disposables.push(cardMat, rimMat, slab.geometry, edge.geometry, edge.material as THREE_NS.Material);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// ── animation ───────────────────────────────────────────────────────────────
|
|
114
|
+
let active = false;
|
|
115
|
+
/** Clock time the current arrival's entry began; null until the first tick after arrival. */
|
|
116
|
+
let entryStart: number | null = null;
|
|
117
|
+
let arrivals = 0;
|
|
118
|
+
let progress = 0;
|
|
119
|
+
let last = 0;
|
|
120
|
+
const idleSway = num(params.sway, 0.12);
|
|
121
|
+
|
|
122
|
+
function pose(t: number): void {
|
|
123
|
+
last = t;
|
|
124
|
+
if (!active) {
|
|
125
|
+
spinner.rotation.set(0, 0, 0);
|
|
126
|
+
progress = 0;
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
if (entryStart === null) {
|
|
130
|
+
entryStart = t;
|
|
131
|
+
arrivals++;
|
|
132
|
+
}
|
|
133
|
+
const e = Math.min(1, Math.max(0, (t - entryStart) / ENTRY_SECONDS));
|
|
134
|
+
progress = e;
|
|
135
|
+
const spin = (1 - easeOut(e)) * Math.PI * 2;
|
|
136
|
+
const idle = e >= 1 ? Math.sin((t - entryStart) * 0.9) * idleSway : 0;
|
|
137
|
+
spinner.rotation.y = spin + idle;
|
|
138
|
+
spinner.position.y = e >= 1 ? Math.sin((t - entryStart) * 1.3) * box * 0.02 : 0;
|
|
139
|
+
// A flash as the spin lands, then a slow periodic pulse.
|
|
140
|
+
const flash = e < 1 ? Math.sin(Math.PI * e) : Math.max(0, Math.sin((t - entryStart) * 0.7)) ** 8 * 0.5;
|
|
141
|
+
mat.emissiveIntensity = 0.05 + flash * 0.9;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return {
|
|
145
|
+
object: root,
|
|
146
|
+
setActive: (a: boolean) => {
|
|
147
|
+
if (a === active) return;
|
|
148
|
+
active = a;
|
|
149
|
+
// Arrival: the entry begins on the NEXT tick, with the clock that tick
|
|
150
|
+
// carries (a pose here would use the previous slide's stale time).
|
|
151
|
+
if (a) entryStart = null;
|
|
152
|
+
else pose(last);
|
|
153
|
+
},
|
|
154
|
+
tick: pose,
|
|
155
|
+
// Probe for tests: how many arrivals have started an entry, and its progress.
|
|
156
|
+
debug: () => {
|
|
157
|
+
const { width: vw, height: vh } = view.viewport();
|
|
158
|
+
root.updateWorldMatrix(true, false);
|
|
159
|
+
const half = box / 2;
|
|
160
|
+
const corners = [[-half, -half], [half, -half], [half, half], [-half, half]].map(([x, y]) => root.localToWorld(new THREE.Vector3(x, y, 0)));
|
|
161
|
+
return { arrivals, progress, active, rect: projectPoints(corners, view.camera, vw, vh) };
|
|
162
|
+
},
|
|
163
|
+
dispose: () => {
|
|
164
|
+
for (const d of disposables) d.dispose();
|
|
165
|
+
},
|
|
166
|
+
} as FxHandle;
|
|
167
|
+
};
|
package/src/fx/index.ts
CHANGED
|
@@ -3,86 +3,40 @@
|
|
|
3
3
|
* with its module factory (design D9).
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { create as accent_cycle } from "./accent-cycle.js";
|
|
7
|
+
import accent_cycleCard from "./accent-cycle.meta.json";
|
|
6
8
|
import { create as agent_depth } from "./agent-depth.js";
|
|
7
9
|
import agent_depthCard from "./agent-depth.meta.json";
|
|
8
|
-
import { create as
|
|
9
|
-
import
|
|
10
|
-
import { create as cohort_grid } from "./cohort-grid.js";
|
|
11
|
-
import cohort_gridCard from "./cohort-grid.meta.json";
|
|
12
|
-
import { create as fab_wafer } from "./fab-wafer.js";
|
|
13
|
-
import fab_waferCard from "./fab-wafer.meta.json";
|
|
14
|
-
import { create as geo_fragments } from "./geo-fragments.js";
|
|
15
|
-
import geo_fragmentsCard from "./geo-fragments.meta.json";
|
|
16
|
-
import { create as horizon_gates } from "./horizon-gates.js";
|
|
17
|
-
import horizon_gatesCard from "./horizon-gates.meta.json";
|
|
18
|
-
import { create as proof_gate } from "./proof-gate.js";
|
|
19
|
-
import proof_gateCard from "./proof-gate.meta.json";
|
|
20
|
-
import { create as trust_ledger } from "./trust-ledger.js";
|
|
21
|
-
import trust_ledgerCard from "./trust-ledger.meta.json";
|
|
10
|
+
import { create as art3d } from "./art3d.js";
|
|
11
|
+
import art3dCard from "./art3d.meta.json";
|
|
22
12
|
import { create as ascii } from "./ascii.js";
|
|
23
13
|
import asciiCard from "./ascii.meta.json";
|
|
24
|
-
import { create as dot_screen } from "./dot-screen.js";
|
|
25
|
-
import dot_screenCard from "./dot-screen.meta.json";
|
|
26
|
-
import { create as outline } from "./outline.js";
|
|
27
|
-
import outlineCard from "./outline.meta.json";
|
|
28
|
-
import { create as pixelate } from "./pixelate.js";
|
|
29
|
-
import pixelateCard from "./pixelate.meta.json";
|
|
30
|
-
import { create as sao } from "./sao.js";
|
|
31
|
-
import saoCard from "./sao.meta.json";
|
|
32
|
-
import { create as sobel } from "./sobel.js";
|
|
33
|
-
import sobelCard from "./sobel.meta.json";
|
|
34
|
-
import { create as billboards } from "./billboards.js";
|
|
35
|
-
import billboardsCard from "./billboards.meta.json";
|
|
36
|
-
import { create as clipped_solids } from "./clipped-solids.js";
|
|
37
|
-
import clipped_solidsCard from "./clipped-solids.meta.json";
|
|
38
|
-
import { create as curve_flow } from "./curve-flow.js";
|
|
39
|
-
import curve_flowCard from "./curve-flow.meta.json";
|
|
40
|
-
import { create as dynamic_instances } from "./dynamic-instances.js";
|
|
41
|
-
import dynamic_instancesCard from "./dynamic-instances.meta.json";
|
|
42
|
-
import { create as extruded_shapes } from "./extruded-shapes.js";
|
|
43
|
-
import extruded_shapesCard from "./extruded-shapes.meta.json";
|
|
44
|
-
import { create as points_on_geometry } from "./points-on-geometry.js";
|
|
45
|
-
import points_on_geometryCard from "./points-on-geometry.meta.json";
|
|
46
|
-
import { create as scatter } from "./scatter.js";
|
|
47
|
-
import scatterCard from "./scatter.meta.json";
|
|
48
|
-
import { create as shader_particles } from "./shader-particles.js";
|
|
49
|
-
import shader_particlesCard from "./shader-particles.meta.json";
|
|
50
|
-
import { create as sprites } from "./sprites.js";
|
|
51
|
-
import spritesCard from "./sprites.meta.json";
|
|
52
|
-
import { create as tessellate } from "./tessellate.js";
|
|
53
|
-
import tessellateCard from "./tessellate.meta.json";
|
|
54
|
-
import { create as volume_cloud } from "./volume-cloud.js";
|
|
55
|
-
import volume_cloudCard from "./volume-cloud.meta.json";
|
|
56
|
-
import { create as volume_perlin } from "./volume-perlin.js";
|
|
57
|
-
import volume_perlinCard from "./volume-perlin.meta.json";
|
|
58
|
-
import { create as accent_cycle } from "./accent-cycle.js";
|
|
59
|
-
import accent_cycleCard from "./accent-cycle.meta.json";
|
|
60
14
|
import { create as aurora } from "./aurora.js";
|
|
61
15
|
import auroraCard from "./aurora.meta.json";
|
|
16
|
+
import { create as tr_bank } from "./bank.js";
|
|
17
|
+
import tr_bankCard from "./bank.meta.json";
|
|
18
|
+
import { create as billboards } from "./billboards.js";
|
|
19
|
+
import billboardsCard from "./billboards.meta.json";
|
|
62
20
|
import { create as bloom } from "./bloom.js";
|
|
63
21
|
import bloomCard from "./bloom.meta.json";
|
|
64
22
|
import { create as camera_drift } from "./camera-drift.js";
|
|
65
23
|
import camera_driftCard from "./camera-drift.meta.json";
|
|
24
|
+
import { create as capital_flows } from "./capital-flows.js";
|
|
25
|
+
import capital_flowsCard from "./capital-flows.meta.json";
|
|
66
26
|
import { create as chromatic_aberration } from "./chromatic-aberration.js";
|
|
67
27
|
import chromatic_aberrationCard from "./chromatic-aberration.meta.json";
|
|
68
28
|
import { create as city_grid } from "./city-grid.js";
|
|
69
29
|
import city_gridCard from "./city-grid.meta.json";
|
|
70
|
-
import { create as
|
|
71
|
-
import
|
|
72
|
-
import { create as
|
|
73
|
-
import
|
|
74
|
-
import { create as neural_mesh } from "./neural-mesh.js";
|
|
75
|
-
import neural_meshCard from "./neural-mesh.meta.json";
|
|
76
|
-
import { create as orbit_agents } from "./orbit-agents.js";
|
|
77
|
-
import orbit_agentsCard from "./orbit-agents.meta.json";
|
|
78
|
-
import { create as paper_stack } from "./paper-stack.js";
|
|
79
|
-
import paper_stackCard from "./paper-stack.meta.json";
|
|
80
|
-
import { create as server_racks } from "./server-racks.js";
|
|
81
|
-
import server_racksCard from "./server-racks.meta.json";
|
|
82
|
-
import { create as vault_glyphs } from "./vault-glyphs.js";
|
|
83
|
-
import vault_glyphsCard from "./vault-glyphs.meta.json";
|
|
30
|
+
import { create as clipped_solids } from "./clipped-solids.js";
|
|
31
|
+
import clipped_solidsCard from "./clipped-solids.meta.json";
|
|
32
|
+
import { create as cohort_grid } from "./cohort-grid.js";
|
|
33
|
+
import cohort_gridCard from "./cohort-grid.meta.json";
|
|
84
34
|
import { create as constellation } from "./constellation.js";
|
|
85
35
|
import constellationCard from "./constellation.meta.json";
|
|
36
|
+
import { create as tr_crane } from "./crane.js";
|
|
37
|
+
import tr_craneCard from "./crane.meta.json";
|
|
38
|
+
import { create as curve_flow } from "./curve-flow.js";
|
|
39
|
+
import curve_flowCard from "./curve-flow.meta.json";
|
|
86
40
|
import { create as dashed_flow } from "./dashed-flow.js";
|
|
87
41
|
import dashed_flowCard from "./dashed-flow.meta.json";
|
|
88
42
|
import { create as data_columns } from "./data-columns.js";
|
|
@@ -91,8 +45,16 @@ import { create as depth_of_field } from "./depth-of-field.js";
|
|
|
91
45
|
import depth_of_fieldCard from "./depth-of-field.meta.json";
|
|
92
46
|
import { create as dolly } from "./dolly.js";
|
|
93
47
|
import dollyCard from "./dolly.meta.json";
|
|
48
|
+
import { create as dot_screen } from "./dot-screen.js";
|
|
49
|
+
import dot_screenCard from "./dot-screen.meta.json";
|
|
50
|
+
import { create as dynamic_instances } from "./dynamic-instances.js";
|
|
51
|
+
import dynamic_instancesCard from "./dynamic-instances.meta.json";
|
|
94
52
|
import { create as emissive } from "./emissive.js";
|
|
95
53
|
import emissiveCard from "./emissive.meta.json";
|
|
54
|
+
import { create as extruded_shapes } from "./extruded-shapes.js";
|
|
55
|
+
import extruded_shapesCard from "./extruded-shapes.meta.json";
|
|
56
|
+
import { create as fab_wafer } from "./fab-wafer.js";
|
|
57
|
+
import fab_waferCard from "./fab-wafer.meta.json";
|
|
96
58
|
import { create as fade } from "./fade.js";
|
|
97
59
|
import fadeCard from "./fade.meta.json";
|
|
98
60
|
import { create as film } from "./film.js";
|
|
@@ -102,11 +64,15 @@ import floatCard from "./float.meta.json";
|
|
|
102
64
|
import { create as flythrough } from "./flythrough.js";
|
|
103
65
|
import flythroughCard from "./flythrough.meta.json";
|
|
104
66
|
import { create as fog } from "./fog.js";
|
|
105
|
-
import { create as videoScreen } from "./video-screen.js";
|
|
106
|
-
import videoScreenCard from "./video-screen.meta.json";
|
|
107
67
|
import fogCard from "./fog.meta.json";
|
|
68
|
+
import { create as frame_chrome } from "./frame-chrome.js";
|
|
69
|
+
import frame_chromeCard from "./frame-chrome.meta.json";
|
|
70
|
+
import { create as geo_fragments } from "./geo-fragments.js";
|
|
71
|
+
import geo_fragmentsCard from "./geo-fragments.meta.json";
|
|
108
72
|
import { create as glass } from "./glass.js";
|
|
109
73
|
import glassCard from "./glass.meta.json";
|
|
74
|
+
import { create as globe_arcs } from "./globe-arcs.js";
|
|
75
|
+
import globe_arcsCard from "./globe-arcs.meta.json";
|
|
110
76
|
import { create as glow_tube } from "./glow-tube.js";
|
|
111
77
|
import glow_tubeCard from "./glow-tube.meta.json";
|
|
112
78
|
import { create as glyph_rain } from "./glyph-rain.js";
|
|
@@ -115,53 +81,107 @@ import { create as god_rays } from "./god-rays.js";
|
|
|
115
81
|
import god_raysCard from "./god-rays.meta.json";
|
|
116
82
|
import { create as grid_horizon } from "./grid-horizon.js";
|
|
117
83
|
import grid_horizonCard from "./grid-horizon.meta.json";
|
|
84
|
+
import { create as haze } from "./haze.js";
|
|
85
|
+
import hazeCard from "./haze.meta.json";
|
|
118
86
|
import { create as hex_grid } from "./hex-grid.js";
|
|
119
87
|
import hex_gridCard from "./hex-grid.meta.json";
|
|
120
88
|
import { create as holo_fresnel } from "./holo-fresnel.js";
|
|
121
89
|
import holo_fresnelCard from "./holo-fresnel.meta.json";
|
|
90
|
+
import { create as horizon_gates } from "./horizon-gates.js";
|
|
91
|
+
import horizon_gatesCard from "./horizon-gates.meta.json";
|
|
92
|
+
import { create as icon3d } from "./icon3d.js";
|
|
93
|
+
import icon3dCard from "./icon3d.meta.json";
|
|
122
94
|
import { create as iridescent } from "./iridescent.js";
|
|
123
95
|
import iridescentCard from "./iridescent.meta.json";
|
|
124
96
|
import { create as iris } from "./iris.js";
|
|
125
97
|
import irisCard from "./iris.meta.json";
|
|
126
98
|
import { create as lightformers } from "./lightformers.js";
|
|
127
99
|
import lightformersCard from "./lightformers.meta.json";
|
|
100
|
+
import { create as market_tape } from "./market-tape.js";
|
|
101
|
+
import market_tapeCard from "./market-tape.meta.json";
|
|
128
102
|
import { create as matcap } from "./matcap.js";
|
|
129
103
|
import matcapCard from "./matcap.meta.json";
|
|
130
104
|
import { create as metal } from "./metal.js";
|
|
131
105
|
import metalCard from "./metal.meta.json";
|
|
132
106
|
import { create as mirror_floor } from "./mirror-floor.js";
|
|
133
107
|
import mirror_floorCard from "./mirror-floor.meta.json";
|
|
108
|
+
import { create as neural_mesh } from "./neural-mesh.js";
|
|
109
|
+
import neural_meshCard from "./neural-mesh.meta.json";
|
|
134
110
|
import { create as orbit } from "./orbit.js";
|
|
135
111
|
import orbitCard from "./orbit.meta.json";
|
|
112
|
+
import { create as orbit_agents } from "./orbit-agents.js";
|
|
113
|
+
import orbit_agentsCard from "./orbit-agents.meta.json";
|
|
114
|
+
import { create as outline } from "./outline.js";
|
|
115
|
+
import outlineCard from "./outline.meta.json";
|
|
116
|
+
import { create as paper_stack } from "./paper-stack.js";
|
|
117
|
+
import paper_stackCard from "./paper-stack.meta.json";
|
|
136
118
|
import { create as particle_stream } from "./particle-stream.js";
|
|
137
119
|
import particle_streamCard from "./particle-stream.meta.json";
|
|
138
120
|
import { create as particles } from "./particles.js";
|
|
139
121
|
import particlesCard from "./particles.meta.json";
|
|
122
|
+
import { create as tr_path } from "./path.js";
|
|
123
|
+
import tr_pathCard from "./path.meta.json";
|
|
124
|
+
import { create as pixelate } from "./pixelate.js";
|
|
125
|
+
import pixelateCard from "./pixelate.meta.json";
|
|
126
|
+
import { create as points_on_geometry } from "./points-on-geometry.js";
|
|
127
|
+
import points_on_geometryCard from "./points-on-geometry.meta.json";
|
|
128
|
+
import { create as proof_gate } from "./proof-gate.js";
|
|
129
|
+
import proof_gateCard from "./proof-gate.meta.json";
|
|
130
|
+
import { create as tr_revolve } from "./revolve.js";
|
|
131
|
+
import tr_revolveCard from "./revolve.meta.json";
|
|
140
132
|
import { create as rings } from "./rings.js";
|
|
141
133
|
import ringsCard from "./rings.meta.json";
|
|
142
134
|
import { create as room_ibl } from "./room-ibl.js";
|
|
143
135
|
import room_iblCard from "./room-ibl.meta.json";
|
|
136
|
+
import { create as sao } from "./sao.js";
|
|
137
|
+
import saoCard from "./sao.meta.json";
|
|
138
|
+
import { create as scatter } from "./scatter.js";
|
|
139
|
+
import scatterCard from "./scatter.meta.json";
|
|
144
140
|
import { create as selective_bloom } from "./selective-bloom.js";
|
|
145
141
|
import selective_bloomCard from "./selective-bloom.meta.json";
|
|
142
|
+
import { create as server_racks } from "./server-racks.js";
|
|
143
|
+
import server_racksCard from "./server-racks.meta.json";
|
|
144
|
+
import { create as shader_particles } from "./shader-particles.js";
|
|
145
|
+
import shader_particlesCard from "./shader-particles.meta.json";
|
|
146
146
|
import { create as signal_pulse } from "./signal-pulse.js";
|
|
147
147
|
import signal_pulseCard from "./signal-pulse.meta.json";
|
|
148
|
+
import { create as slide_layer } from "./slide-layer.js";
|
|
149
|
+
import slide_layerCard from "./slide-layer.meta.json";
|
|
148
150
|
import { create as smaa } from "./smaa.js";
|
|
149
151
|
import smaaCard from "./smaa.meta.json";
|
|
152
|
+
import { create as sobel } from "./sobel.js";
|
|
153
|
+
import sobelCard from "./sobel.meta.json";
|
|
150
154
|
import { create as soft_shadows } from "./soft-shadows.js";
|
|
151
155
|
import soft_shadowsCard from "./soft-shadows.meta.json";
|
|
156
|
+
import { create as sprites } from "./sprites.js";
|
|
157
|
+
import spritesCard from "./sprites.meta.json";
|
|
152
158
|
import { create as stagger_reveal } from "./stagger-reveal.js";
|
|
153
159
|
import stagger_revealCard from "./stagger-reveal.meta.json";
|
|
154
160
|
import { create as starfield } from "./starfield.js";
|
|
155
161
|
import starfieldCard from "./starfield.meta.json";
|
|
156
162
|
import { create as swarm } from "./swarm.js";
|
|
157
163
|
import swarmCard from "./swarm.meta.json";
|
|
164
|
+
import { create as tr_swing } from "./swing.js";
|
|
165
|
+
import tr_swingCard from "./swing.meta.json";
|
|
166
|
+
import { create as tessellate } from "./tessellate.js";
|
|
167
|
+
import tessellateCard from "./tessellate.meta.json";
|
|
158
168
|
import { create as tokens } from "./tokens.js";
|
|
159
169
|
import tokensCard from "./tokens.meta.json";
|
|
160
170
|
import { create as trail } from "./trail.js";
|
|
161
171
|
import trailCard from "./trail.meta.json";
|
|
172
|
+
import { create as trust_ledger } from "./trust-ledger.js";
|
|
173
|
+
import trust_ledgerCard from "./trust-ledger.meta.json";
|
|
162
174
|
import type { FxCard, FxEntry } from "./types.js";
|
|
175
|
+
import { create as vault_glyphs } from "./vault-glyphs.js";
|
|
176
|
+
import vault_glyphsCard from "./vault-glyphs.meta.json";
|
|
177
|
+
import { create as videoScreen } from "./video-screen.js";
|
|
178
|
+
import videoScreenCard from "./video-screen.meta.json";
|
|
163
179
|
import { create as vignette } from "./vignette.js";
|
|
164
180
|
import vignetteCard from "./vignette.meta.json";
|
|
181
|
+
import { create as volume_cloud } from "./volume-cloud.js";
|
|
182
|
+
import volume_cloudCard from "./volume-cloud.meta.json";
|
|
183
|
+
import { create as volume_perlin } from "./volume-perlin.js";
|
|
184
|
+
import volume_perlinCard from "./volume-perlin.meta.json";
|
|
165
185
|
import { create as volumetric_spot } from "./volumetric-spot.js";
|
|
166
186
|
import volumetric_spotCard from "./volumetric-spot.meta.json";
|
|
167
187
|
import { create as wireframe_overlay } from "./wireframe-overlay.js";
|
|
@@ -184,6 +204,11 @@ export const REGISTRY: Record<string, FxEntry> = {
|
|
|
184
204
|
"room-ibl": { card: room_iblCard as FxCard, create: room_ibl },
|
|
185
205
|
"signal-pulse": { card: signal_pulseCard as FxCard, create: signal_pulse },
|
|
186
206
|
"dolly": { card: dollyCard as FxCard, create: dolly },
|
|
207
|
+
"swing": { card: tr_swingCard as FxCard, create: tr_swing },
|
|
208
|
+
"revolve": { card: tr_revolveCard as FxCard, create: tr_revolve },
|
|
209
|
+
"crane": { card: tr_craneCard as FxCard, create: tr_crane },
|
|
210
|
+
"bank": { card: tr_bankCard as FxCard, create: tr_bank },
|
|
211
|
+
"path": { card: tr_pathCard as FxCard, create: tr_path },
|
|
187
212
|
"starfield": { card: starfieldCard as FxCard, create: starfield },
|
|
188
213
|
"aurora": { card: auroraCard as FxCard, create: aurora },
|
|
189
214
|
"grid-horizon": { card: grid_horizonCard as FxCard, create: grid_horizon },
|
|
@@ -249,6 +274,11 @@ export const REGISTRY: Record<string, FxEntry> = {
|
|
|
249
274
|
"horizon-gates": { card: horizon_gatesCard as FxCard, create: horizon_gates },
|
|
250
275
|
"proof-gate": { card: proof_gateCard as FxCard, create: proof_gate },
|
|
251
276
|
"trust-ledger": { card: trust_ledgerCard as FxCard, create: trust_ledger },
|
|
277
|
+
"slide-layer": { card: slide_layerCard as FxCard, create: slide_layer },
|
|
278
|
+
"art3d": { card: art3dCard as FxCard, create: art3d },
|
|
279
|
+
"icon3d": { card: icon3dCard as FxCard, create: icon3d },
|
|
280
|
+
"frame-chrome": { card: frame_chromeCard as FxCard, create: frame_chrome },
|
|
281
|
+
"haze": { card: hazeCard as FxCard, create: haze },
|
|
252
282
|
};
|
|
253
283
|
|
|
254
284
|
export const FX_IDS: string[] = Object.keys(REGISTRY);
|
package/src/fx/iris.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { FxFactory, FxHandle } from "./types.js";
|
|
2
2
|
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Camera transition `iris`: closes a circular mask to the centre, switches the camera, reopens.
|
|
5
|
+
* Motion lives in `runtime/transition.ts` (`makeMotion`); this card only
|
|
6
|
+
* registers the id. Scale with the IR knob `transitionAmount`.
|
|
7
|
+
*/
|
|
4
8
|
export const create: FxFactory = (): FxHandle => ({ pass: "transition:iris", dispose: () => {} });
|
package/src/fx/meta.schema.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"required": ["id", "kind", "tags", "cost", "modes", "params", "conflicts", "source", "licence"],
|
|
7
7
|
"properties": {
|
|
8
8
|
"id": { "type": "string", "pattern": "^[a-z0-9-]+$" },
|
|
9
|
-
"kind": { "enum": ["background", "post", "material", "light", "motion", "edge", "transition"] },
|
|
9
|
+
"kind": { "enum": ["background", "post", "material", "light", "motion", "edge", "transition", "layer"] },
|
|
10
10
|
"tags": {
|
|
11
11
|
"type": "object",
|
|
12
12
|
"additionalProperties": false,
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"type": "object",
|
|
32
32
|
"required": ["type"],
|
|
33
33
|
"properties": {
|
|
34
|
-
"type": { "enum": ["number", "string", "boolean"] },
|
|
34
|
+
"type": { "enum": ["number", "string", "boolean", "array", "object"] },
|
|
35
35
|
"default": {},
|
|
36
36
|
"minimum": { "type": "number" },
|
|
37
37
|
"maximum": { "type": "number" },
|
|
@@ -40,6 +40,14 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"conflicts": { "type": "array", "items": { "type": "string" } },
|
|
43
|
+
"replacesContent": {
|
|
44
|
+
"type": "boolean",
|
|
45
|
+
"description": "A slide composing this effect builds none of its native title/subtitle/card/diagram (and measures none)."
|
|
46
|
+
},
|
|
47
|
+
"persistent": {
|
|
48
|
+
"type": "boolean",
|
|
49
|
+
"description": "Deck-scope only: created once per deck load, outside every slide group, driven by transition({from,to,p})."
|
|
50
|
+
},
|
|
43
51
|
"source": {
|
|
44
52
|
"description": "Upstream URL for a corpus card, or the literal `local` for a per-deck module in `fx/`.",
|
|
45
53
|
"anyOf": [{ "type": "string", "pattern": "^https://" }, { "const": "local" }]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "path",
|
|
3
|
+
"kind": "transition",
|
|
4
|
+
"tags": {
|
|
5
|
+
"mood": [
|
|
6
|
+
"cinematic"
|
|
7
|
+
],
|
|
8
|
+
"content": [
|
|
9
|
+
"motion"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"cost": 2,
|
|
13
|
+
"modes": "both",
|
|
14
|
+
"params": {
|
|
15
|
+
"intensity": {
|
|
16
|
+
"type": "number",
|
|
17
|
+
"default": 1,
|
|
18
|
+
"minimum": 0,
|
|
19
|
+
"maximum": 2
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"conflicts": [],
|
|
23
|
+
"source": "https://threejs.org/examples/",
|
|
24
|
+
"licence": "MIT"
|
|
25
|
+
}
|
package/src/fx/path.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FxFactory, FxHandle } from "./types.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Camera transition `path`: author keyframed move from the slide's `cameraPath` (travel-frame offsets, look, roll, fov).
|
|
5
|
+
* Motion lives in `runtime/transition.ts` (`makeMotion`); this card only
|
|
6
|
+
* registers the id. Scale with the IR knob `transitionAmount`.
|
|
7
|
+
*/
|
|
8
|
+
export const create: FxFactory = (): FxHandle => ({ pass: "transition:path", dispose: () => {} });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ids of corpus cards declaring `persistent: true`. A static list so the IR
|
|
3
|
+
* layer (`applyOverrides`, `validate`) can apply the deck-scope-only rule
|
|
4
|
+
* without importing every effect module; `persistent.test.ts` fails when it
|
|
5
|
+
* drifts from the cards.
|
|
6
|
+
*/
|
|
7
|
+
export const PERSISTENT_FX: ReadonlySet<string> = new Set(["frame-chrome"]);
|
|
8
|
+
|
|
9
|
+
export function isPersistentFx(id: string): boolean {
|
|
10
|
+
return PERSISTENT_FX.has(id);
|
|
11
|
+
}
|