@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,67 @@
|
|
|
1
|
+
// proof-gate — deals passing a proof gate before commercial terms (topic: sales). Licence: MIT.
|
|
2
|
+
import type { FxContext, FxFactory, FxHandle, FxParams } from "./types.js";
|
|
3
|
+
|
|
4
|
+
export const create: FxFactory = function (ctx: FxContext, params: FxParams): FxHandle {
|
|
5
|
+
const { THREE, palette, quality, rng } = ctx;
|
|
6
|
+
const density = typeof params.density === "number" ? params.density : 1;
|
|
7
|
+
const count = Math.max(16, Math.round((quality.particles / 20) * density));
|
|
8
|
+
|
|
9
|
+
const group = new THREE.Group();
|
|
10
|
+
const frame = new THREE.Mesh(
|
|
11
|
+
new THREE.TorusGeometry(2.6, 0.09, 8, 4),
|
|
12
|
+
new THREE.MeshStandardMaterial({ color: palette.accent, metalness: 0.7, roughness: 0.3 }),
|
|
13
|
+
);
|
|
14
|
+
frame.rotation.z = Math.PI / 4;
|
|
15
|
+
group.add(frame);
|
|
16
|
+
|
|
17
|
+
const dealGeo = new THREE.OctahedronGeometry(0.22, 0);
|
|
18
|
+
const passMat = new THREE.MeshStandardMaterial({ color: palette.accent, metalness: 0.6, roughness: 0.4 });
|
|
19
|
+
const holdMat = new THREE.MeshStandardMaterial({ color: palette.second, metalness: 0.3, roughness: 0.7, transparent: true, opacity: 0.5 });
|
|
20
|
+
const passing = new THREE.InstancedMesh(dealGeo, passMat, count);
|
|
21
|
+
const held = new THREE.InstancedMesh(dealGeo, holdMat, count);
|
|
22
|
+
group.add(passing, held);
|
|
23
|
+
|
|
24
|
+
const seeds: Array<Record<string, number>> = [];
|
|
25
|
+
for (let i = 0; i < count; i++) {
|
|
26
|
+
seeds.push({ x: (rng() - 0.5) * 3.2, y: (rng() - 0.5) * 3.2, off: rng(), speed: 0.12 + rng() * 0.2 });
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
group.position.set(0, 0, -9);
|
|
30
|
+
const holder = new THREE.Group();
|
|
31
|
+
holder.add(group);
|
|
32
|
+
holder.userData.count = count;
|
|
33
|
+
|
|
34
|
+
const m = new THREE.Matrix4();
|
|
35
|
+
const v = new THREE.Vector3();
|
|
36
|
+
const q = new THREE.Quaternion();
|
|
37
|
+
const sc = new THREE.Vector3();
|
|
38
|
+
// A deal used to blink out of existence at the wrap. Scaling it up at birth
|
|
39
|
+
// and down at death reads as arriving and clearing.
|
|
40
|
+
const fade = function (k: number) {
|
|
41
|
+
return Math.min(1, k / 0.18, (1 - k) / 0.18);
|
|
42
|
+
};
|
|
43
|
+
const place = function (t: number) {
|
|
44
|
+
for (let i = 0; i < count; i++) {
|
|
45
|
+
const s = seeds[i];
|
|
46
|
+
const k = (s.off + t * s.speed) % 1;
|
|
47
|
+
// Past the gate it accelerates; short of it, it stalls and drifts back.
|
|
48
|
+
const f = fade(k);
|
|
49
|
+
v.set(s.x * (1 - k * 0.7), s.y * (1 - k * 0.7), -12 + k * 24);
|
|
50
|
+
sc.setScalar(f);
|
|
51
|
+
passing.setMatrixAt(i, m.compose(v, q, sc));
|
|
52
|
+
const hk = (k * 0.35) % 1;
|
|
53
|
+
v.set(s.x * 2.4, s.y * 2.4, -14 + hk * 10);
|
|
54
|
+
sc.setScalar(fade(hk));
|
|
55
|
+
held.setMatrixAt(i, m.compose(v, q, sc));
|
|
56
|
+
}
|
|
57
|
+
passing.instanceMatrix.needsUpdate = true;
|
|
58
|
+
held.instanceMatrix.needsUpdate = true;
|
|
59
|
+
};
|
|
60
|
+
place(0);
|
|
61
|
+
|
|
62
|
+
return {
|
|
63
|
+
object: holder,
|
|
64
|
+
tick: function (t) { place(t); frame.rotation.z = Math.PI / 4 + Math.sin(t * 0.2) * 0.08; },
|
|
65
|
+
dispose: function () { dealGeo.dispose(); passMat.dispose(); holdMat.dispose(); },
|
|
66
|
+
};
|
|
67
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "rings",
|
|
3
|
+
"kind": "background",
|
|
4
|
+
"tags": {
|
|
5
|
+
"mood": [
|
|
6
|
+
"calm",
|
|
7
|
+
"loop"
|
|
8
|
+
],
|
|
9
|
+
"content": [
|
|
10
|
+
"loop",
|
|
11
|
+
"timeline"
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"cost": 1,
|
|
15
|
+
"modes": "both",
|
|
16
|
+
"params": {
|
|
17
|
+
"intensity": {
|
|
18
|
+
"type": "number",
|
|
19
|
+
"default": 1,
|
|
20
|
+
"minimum": 0,
|
|
21
|
+
"maximum": 2
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"conflicts": [],
|
|
25
|
+
"source": "https://threejs.org/examples/",
|
|
26
|
+
"licence": "MIT"
|
|
27
|
+
}
|
package/src/fx/rings.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BACKGROUNDS } from "../runtime/backgrounds.js";
|
|
2
|
+
import type { FxContext, FxFactory, FxHandle, FxParams } from "./types.js";
|
|
3
|
+
|
|
4
|
+
/** Ported from the strategy lab. */
|
|
5
|
+
export const create: FxFactory = (ctx: FxContext, _params: FxParams): FxHandle => {
|
|
6
|
+
const animator = BACKGROUNDS["rings"](ctx.palette, ctx.quality);
|
|
7
|
+
return { object: animator.g, tick: animator.tick, dispose: () => {} };
|
|
8
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "room-ibl",
|
|
3
|
+
"kind": "light",
|
|
4
|
+
"tags": {
|
|
5
|
+
"mood": [
|
|
6
|
+
"premium",
|
|
7
|
+
"clean"
|
|
8
|
+
],
|
|
9
|
+
"content": [
|
|
10
|
+
"staging"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"cost": 1,
|
|
14
|
+
"modes": "both",
|
|
15
|
+
"params": {
|
|
16
|
+
"intensity": {
|
|
17
|
+
"type": "number",
|
|
18
|
+
"default": 1,
|
|
19
|
+
"minimum": 0,
|
|
20
|
+
"maximum": 2
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"conflicts": [],
|
|
24
|
+
"source": "https://threejs.org/examples/",
|
|
25
|
+
"licence": "MIT"
|
|
26
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FxContext, FxFactory, FxHandle, FxParams } from "./types.js";
|
|
2
|
+
|
|
3
|
+
/** Permissive port of a three.js example. */
|
|
4
|
+
export const create: FxFactory = (ctx: FxContext, params: FxParams): FxHandle => {
|
|
5
|
+
const light = new ctx.THREE.PointLight(ctx.palette.accent, 1, 30);
|
|
6
|
+
void params;
|
|
7
|
+
return { object: light, dispose: () => light.dispose?.() };
|
|
8
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "sao",
|
|
3
|
+
"kind": "post",
|
|
4
|
+
"tags": {
|
|
5
|
+
"mood": [
|
|
6
|
+
"premium",
|
|
7
|
+
"technical"
|
|
8
|
+
],
|
|
9
|
+
"content": [
|
|
10
|
+
"staging"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"cost": 2,
|
|
14
|
+
"modes": "both",
|
|
15
|
+
"params": {
|
|
16
|
+
"intensity": {
|
|
17
|
+
"type": "number",
|
|
18
|
+
"default": 1,
|
|
19
|
+
"minimum": 0,
|
|
20
|
+
"maximum": 4
|
|
21
|
+
},
|
|
22
|
+
"radius": {
|
|
23
|
+
"type": "number",
|
|
24
|
+
"default": 1,
|
|
25
|
+
"minimum": 0.2,
|
|
26
|
+
"maximum": 3
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"conflicts": [],
|
|
30
|
+
"source": "https://github.com/mrdoob/three.js",
|
|
31
|
+
"licence": "MIT"
|
|
32
|
+
}
|
package/src/fx/sao.ts
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Authoring commands for local effects (design D1): `fx scaffold`, `fx hash`,
|
|
3
|
+
* `fx promote`. Kept out of `cli.ts` because the stub source is a large
|
|
4
|
+
* template that would fight the CLI's own template literals.
|
|
5
|
+
*/
|
|
6
|
+
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
7
|
+
import { join } from "node:path";
|
|
8
|
+
import { LOCAL_KINDS, LOCAL_NAME_RE, sha256 } from "./local.js";
|
|
9
|
+
import { PERMISSIVE_LICENCES } from "./types.js";
|
|
10
|
+
|
|
11
|
+
export interface ScaffoldResult {
|
|
12
|
+
ok: boolean;
|
|
13
|
+
message: string;
|
|
14
|
+
/** The override entry to paste, printed on success. */
|
|
15
|
+
entry?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const STUB_LINES = [
|
|
19
|
+
"// __NAME__ — local deck3d effect for this deck. Licence: MIT.",
|
|
20
|
+
"//",
|
|
21
|
+
"// ctx = { THREE, palette, mode, quality, rng, slide: { id, title, kind } }",
|
|
22
|
+
"// Determinism guardrail: Math.random() is the deck's seeded stream, and",
|
|
23
|
+
"// window/document/fetch/setTimeout/Date/Promise are all undefined here.",
|
|
24
|
+
"// No imports, no other exports.",
|
|
25
|
+
"export default function (ctx, params) {",
|
|
26
|
+
" const { THREE, palette, quality, rng } = ctx;",
|
|
27
|
+
" const density = typeof params.density === 'number' ? params.density : 1;",
|
|
28
|
+
" const count = Math.max(8, Math.round((quality.particles / 30) * density));",
|
|
29
|
+
"",
|
|
30
|
+
" const geo = new THREE.TetrahedronGeometry(0.4, 0);",
|
|
31
|
+
" const mat = new THREE.MeshStandardMaterial({ color: palette.accent, metalness: 0.6, roughness: 0.4 });",
|
|
32
|
+
" const mesh = new THREE.InstancedMesh(geo, mat, count);",
|
|
33
|
+
" const m = new THREE.Matrix4();",
|
|
34
|
+
" const seeds = [];",
|
|
35
|
+
" for (let i = 0; i < count; i++) {",
|
|
36
|
+
" seeds.push({ x: (rng() - 0.5) * 24, y: (rng() - 0.5) * 12, z: (rng() - 0.5) * 10, ph: rng() * 6.283 });",
|
|
37
|
+
" m.makeTranslation(seeds[i].x, seeds[i].y, seeds[i].z);",
|
|
38
|
+
" mesh.setMatrixAt(i, m);",
|
|
39
|
+
" }",
|
|
40
|
+
" mesh.instanceMatrix.needsUpdate = true;",
|
|
41
|
+
"",
|
|
42
|
+
" const group = new THREE.Group();",
|
|
43
|
+
" group.add(mesh);",
|
|
44
|
+
" group.userData.count = count;",
|
|
45
|
+
"",
|
|
46
|
+
" return {",
|
|
47
|
+
" object: group,",
|
|
48
|
+
" tick: function (t) {",
|
|
49
|
+
" for (let i = 0; i < count; i++) {",
|
|
50
|
+
" const s = seeds[i];",
|
|
51
|
+
" m.makeTranslation(s.x, s.y + Math.sin(t * 0.6 + s.ph) * 0.8, s.z);",
|
|
52
|
+
" mesh.setMatrixAt(i, m);",
|
|
53
|
+
" }",
|
|
54
|
+
" mesh.instanceMatrix.needsUpdate = true;",
|
|
55
|
+
" },",
|
|
56
|
+
" dispose: function () {",
|
|
57
|
+
" geo.dispose();",
|
|
58
|
+
" mat.dispose();",
|
|
59
|
+
" },",
|
|
60
|
+
" };",
|
|
61
|
+
"}",
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
function stubSource(name: string): string {
|
|
65
|
+
return `${STUB_LINES.join("\n").replace("__NAME__", name)}\n`;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function stubCard(name: string, kind: string): string {
|
|
69
|
+
return `${JSON.stringify(
|
|
70
|
+
{
|
|
71
|
+
id: name,
|
|
72
|
+
kind,
|
|
73
|
+
tags: { mood: ["custom"], content: [name], topic: [] },
|
|
74
|
+
cost: 2,
|
|
75
|
+
modes: "both",
|
|
76
|
+
params: { density: { type: "number", default: 1, minimum: 0.2, maximum: 3 } },
|
|
77
|
+
conflicts: [],
|
|
78
|
+
source: "local",
|
|
79
|
+
licence: "MIT",
|
|
80
|
+
},
|
|
81
|
+
null,
|
|
82
|
+
2,
|
|
83
|
+
)}\n`;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function fxDir(deckDir: string): string {
|
|
87
|
+
return join(deckDir, "fx");
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** `fx scaffold <name> [--kind k] [--for <slideId>]` — never overwrites. */
|
|
91
|
+
export function scaffoldLocalEffect(deckDir: string, name: string, kind: string, slideId?: string): ScaffoldResult {
|
|
92
|
+
if (!LOCAL_NAME_RE.test(name)) {
|
|
93
|
+
return { ok: false, message: `invalid local effect name '${name}' (must match ${LOCAL_NAME_RE.source})` };
|
|
94
|
+
}
|
|
95
|
+
if (!(LOCAL_KINDS as readonly string[]).includes(kind)) {
|
|
96
|
+
return { ok: false, message: `kind '${kind}' is not allowed for a local effect (one of ${LOCAL_KINDS.join(", ")})` };
|
|
97
|
+
}
|
|
98
|
+
const dir = fxDir(deckDir);
|
|
99
|
+
const modulePath = join(dir, `${name}.js`);
|
|
100
|
+
const cardPath = join(dir, `${name}.meta.json`);
|
|
101
|
+
if (existsSync(modulePath) || existsSync(cardPath)) {
|
|
102
|
+
return { ok: false, message: `fx/${name} already exists — edit it, or pick another name` };
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
mkdirSync(dir, { recursive: true });
|
|
106
|
+
const src = stubSource(name);
|
|
107
|
+
writeFileSync(modulePath, src);
|
|
108
|
+
writeFileSync(cardPath, stubCard(name, kind));
|
|
109
|
+
|
|
110
|
+
const ref = { id: `local:${name}`, sha256: sha256(src) };
|
|
111
|
+
const where = slideId ? `overrides.slides["${slideId}"].effects` : "overrides.effects";
|
|
112
|
+
return { ok: true, message: `wrote fx/${name}.js and fx/${name}.meta.json`, entry: `${where}: [${JSON.stringify(ref)}]` };
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/** `fx hash <name>` — the current digest, to re-pin after an edit. */
|
|
116
|
+
export function hashLocalEffect(deckDir: string, name: string): ScaffoldResult {
|
|
117
|
+
const modulePath = join(fxDir(deckDir), `${name}.js`);
|
|
118
|
+
if (!existsSync(modulePath)) return { ok: false, message: `missing fx/${name}.js` };
|
|
119
|
+
return { ok: true, message: sha256(readFileSync(modulePath)) };
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export interface PromoteOptions {
|
|
123
|
+
source?: string;
|
|
124
|
+
licence?: string;
|
|
125
|
+
/** Corpus directory to move into. Defaults to this package's `src/fx`. */
|
|
126
|
+
corpusDir: string;
|
|
127
|
+
/** Runs the corpus gate; a rejection rolls the move back. */
|
|
128
|
+
verify: () => { ok: boolean; detail: string };
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* `fx promote <name> --source <url> --licence <spdx>` — move a local pair into
|
|
133
|
+
* the corpus. Both flags are required because a local card carries
|
|
134
|
+
* `source: "local"`, which the corpus test rejects, and because scaffolds
|
|
135
|
+
* routinely adapt three.js examples whose licence must be re-confirmed.
|
|
136
|
+
*/
|
|
137
|
+
export function promoteLocalEffect(deckDir: string, name: string, opts: PromoteOptions): ScaffoldResult {
|
|
138
|
+
if (!opts.source) return { ok: false, message: "fx promote requires --source <url>" };
|
|
139
|
+
if (!opts.licence) return { ok: false, message: "fx promote requires --licence <spdx>" };
|
|
140
|
+
if (!(PERMISSIVE_LICENCES as readonly string[]).includes(opts.licence)) {
|
|
141
|
+
return { ok: false, message: `licence '${opts.licence}' is not permissive (one of ${PERMISSIVE_LICENCES.join(", ")})` };
|
|
142
|
+
}
|
|
143
|
+
if (!/^https:\/\//.test(opts.source)) return { ok: false, message: `--source must be an https URL, got '${opts.source}'` };
|
|
144
|
+
|
|
145
|
+
const fromModule = join(fxDir(deckDir), `${name}.js`);
|
|
146
|
+
const fromCard = join(fxDir(deckDir), `${name}.meta.json`);
|
|
147
|
+
if (!existsSync(fromModule) || !existsSync(fromCard)) return { ok: false, message: `missing fx/${name}.js or fx/${name}.meta.json` };
|
|
148
|
+
|
|
149
|
+
const toModule = join(opts.corpusDir, `${name}.ts`);
|
|
150
|
+
const toCard = join(opts.corpusDir, `${name}.meta.json`);
|
|
151
|
+
if (existsSync(toModule) || existsSync(toCard)) return { ok: false, message: `corpus already has an effect named '${name}'` };
|
|
152
|
+
|
|
153
|
+
const card = JSON.parse(readFileSync(fromCard, "utf8")) as Record<string, unknown>;
|
|
154
|
+
card.source = opts.source;
|
|
155
|
+
card.licence = opts.licence;
|
|
156
|
+
|
|
157
|
+
// The module becomes a corpus TS module: same body, corpus export shape.
|
|
158
|
+
const body = readFileSync(fromModule, "utf8").replace(/export\s+default\s+function/, "export const create = function");
|
|
159
|
+
writeFileSync(toModule, body);
|
|
160
|
+
writeFileSync(toCard, `${JSON.stringify(card, null, 2)}\n`);
|
|
161
|
+
|
|
162
|
+
const verdict = opts.verify();
|
|
163
|
+
if (!verdict.ok) {
|
|
164
|
+
rmSync(toModule, { force: true });
|
|
165
|
+
rmSync(toCard, { force: true });
|
|
166
|
+
return { ok: false, message: `corpus gate rejected '${name}': ${verdict.detail}` };
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
rmSync(fromModule, { force: true });
|
|
170
|
+
rmSync(fromCard, { force: true });
|
|
171
|
+
return { ok: true, message: `promoted ${name} into the corpus (source ${opts.source}, licence ${opts.licence})` };
|
|
172
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "scatter",
|
|
3
|
+
"kind": "background",
|
|
4
|
+
"tags": {
|
|
5
|
+
"mood": [
|
|
6
|
+
"organic",
|
|
7
|
+
"dense"
|
|
8
|
+
],
|
|
9
|
+
"content": [
|
|
10
|
+
"growth",
|
|
11
|
+
"surface",
|
|
12
|
+
"field"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"cost": 3,
|
|
16
|
+
"modes": "both",
|
|
17
|
+
"params": {
|
|
18
|
+
"density": {
|
|
19
|
+
"type": "number",
|
|
20
|
+
"default": 1,
|
|
21
|
+
"minimum": 0.2,
|
|
22
|
+
"maximum": 3
|
|
23
|
+
},
|
|
24
|
+
"surface": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"default": "knot",
|
|
27
|
+
"enum": [
|
|
28
|
+
"knot",
|
|
29
|
+
"sphere",
|
|
30
|
+
"plane"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"size": {
|
|
34
|
+
"type": "number",
|
|
35
|
+
"default": 1,
|
|
36
|
+
"minimum": 0.3,
|
|
37
|
+
"maximum": 3
|
|
38
|
+
},
|
|
39
|
+
"spin": {
|
|
40
|
+
"type": "number",
|
|
41
|
+
"default": 1,
|
|
42
|
+
"minimum": 0,
|
|
43
|
+
"maximum": 3
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"conflicts": [],
|
|
47
|
+
"source": "https://threejs.org/examples/#webgl_instancing_scatter",
|
|
48
|
+
"licence": "MIT"
|
|
49
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { MeshSurfaceSampler } from "three/examples/jsm/math/MeshSurfaceSampler.js";
|
|
2
|
+
import type { FxContext, FxFactory, FxHandle, FxParams } from "./types.js";
|
|
3
|
+
import { countFor, num, str } from "./util.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Small instanced sprouts scattered over a host surface (three
|
|
7
|
+
* `webgl_instancing_scatter`). The sampler is fed `ctx.rng` so the scatter is
|
|
8
|
+
* the same every run; `surface` = knot | sphere | plane.
|
|
9
|
+
*/
|
|
10
|
+
export const create: FxFactory = (ctx: FxContext, params: FxParams): FxHandle => {
|
|
11
|
+
const { THREE, palette, rng } = ctx;
|
|
12
|
+
const count = countFor(ctx, 1.2, num(params, "density", 1), 120);
|
|
13
|
+
const size = num(params, "size", 1);
|
|
14
|
+
const spin = num(params, "spin", 1);
|
|
15
|
+
const surface = str(params, "surface", "knot");
|
|
16
|
+
|
|
17
|
+
const hostGeo =
|
|
18
|
+
surface === "sphere" ? new THREE.SphereGeometry(3, 48, 32) : surface === "plane" ? new THREE.PlaneGeometry(18, 10, 1, 1) : new THREE.TorusKnotGeometry(2.4, 0.8, 128, 24);
|
|
19
|
+
const hostMat = new THREE.MeshStandardMaterial({ color: palette.card, metalness: 0.2, roughness: 0.8, transparent: true, opacity: surface === "plane" ? 0 : 0.35 });
|
|
20
|
+
const host = new THREE.Mesh(hostGeo, hostMat);
|
|
21
|
+
|
|
22
|
+
// `setRandomGenerator` exists at runtime (r160) but is missing from @types/three.
|
|
23
|
+
const sampler = (new MeshSurfaceSampler(host) as MeshSurfaceSampler & { setRandomGenerator: (f: () => number) => MeshSurfaceSampler }).setRandomGenerator(rng).build();
|
|
24
|
+
const sproutGeo = new THREE.ConeGeometry(0.06 * size, 0.32 * size, 5);
|
|
25
|
+
sproutGeo.translate(0, 0.16 * size, 0);
|
|
26
|
+
const sproutMat = new THREE.MeshStandardMaterial({ color: palette.accent, metalness: 0.3, roughness: 0.5 });
|
|
27
|
+
const sprouts = new THREE.InstancedMesh(sproutGeo, sproutMat, count);
|
|
28
|
+
|
|
29
|
+
const pos = new THREE.Vector3();
|
|
30
|
+
const nrm = new THREE.Vector3();
|
|
31
|
+
const up = new THREE.Vector3(0, 1, 0);
|
|
32
|
+
const q = new THREE.Quaternion();
|
|
33
|
+
const m = new THREE.Matrix4();
|
|
34
|
+
const phases = new Float32Array(count);
|
|
35
|
+
const bases: THREE.Matrix4[] = [];
|
|
36
|
+
for (let i = 0; i < count; i++) {
|
|
37
|
+
sampler.sample(pos, nrm);
|
|
38
|
+
q.setFromUnitVectors(up, nrm.normalize());
|
|
39
|
+
m.compose(pos, q, new THREE.Vector3(1, 1, 1));
|
|
40
|
+
bases.push(m.clone());
|
|
41
|
+
sprouts.setMatrixAt(i, m);
|
|
42
|
+
phases[i] = rng() * 6.28;
|
|
43
|
+
}
|
|
44
|
+
sprouts.instanceMatrix.needsUpdate = true;
|
|
45
|
+
|
|
46
|
+
const group = new THREE.Group();
|
|
47
|
+
group.add(host, sprouts);
|
|
48
|
+
if (surface === "plane") group.rotation.x = -0.9;
|
|
49
|
+
const holder = new THREE.Group();
|
|
50
|
+
holder.add(group);
|
|
51
|
+
holder.userData.count = count;
|
|
52
|
+
|
|
53
|
+
const s = new THREE.Vector3();
|
|
54
|
+
return {
|
|
55
|
+
object: holder,
|
|
56
|
+
tick: (t) => {
|
|
57
|
+
group.rotation.y = t * 0.12 * spin;
|
|
58
|
+
for (let i = 0; i < count; i++) {
|
|
59
|
+
// Sprouts breathe in height; the base matrix keeps their footing.
|
|
60
|
+
const k = 0.75 + 0.25 * Math.sin(t * 1.4 + phases[i]);
|
|
61
|
+
s.set(1, k, 1);
|
|
62
|
+
m.copy(bases[i]).scale(s);
|
|
63
|
+
sprouts.setMatrixAt(i, m);
|
|
64
|
+
}
|
|
65
|
+
sprouts.instanceMatrix.needsUpdate = true;
|
|
66
|
+
},
|
|
67
|
+
dispose: () => {
|
|
68
|
+
hostGeo.dispose();
|
|
69
|
+
hostMat.dispose();
|
|
70
|
+
sproutGeo.dispose();
|
|
71
|
+
sproutMat.dispose();
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "selective-bloom",
|
|
3
|
+
"kind": "post",
|
|
4
|
+
"tags": {
|
|
5
|
+
"mood": [
|
|
6
|
+
"dramatic",
|
|
7
|
+
"premium"
|
|
8
|
+
],
|
|
9
|
+
"content": [
|
|
10
|
+
"highlight"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"cost": 3,
|
|
14
|
+
"modes": "both",
|
|
15
|
+
"params": {
|
|
16
|
+
"intensity": {
|
|
17
|
+
"type": "number",
|
|
18
|
+
"default": 1,
|
|
19
|
+
"minimum": 0,
|
|
20
|
+
"maximum": 2
|
|
21
|
+
},
|
|
22
|
+
"parts": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"default": "diagram",
|
|
25
|
+
"enum": [
|
|
26
|
+
"diagram",
|
|
27
|
+
"title",
|
|
28
|
+
"props",
|
|
29
|
+
"all"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"conflicts": [],
|
|
34
|
+
"source": "https://github.com/pmndrs/postprocessing",
|
|
35
|
+
"licence": "Zlib"
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "server-racks",
|
|
3
|
+
"kind": "background",
|
|
4
|
+
"tags": {
|
|
5
|
+
"mood": [
|
|
6
|
+
"technical",
|
|
7
|
+
"dense"
|
|
8
|
+
],
|
|
9
|
+
"content": [
|
|
10
|
+
"infrastructure",
|
|
11
|
+
"compute"
|
|
12
|
+
],
|
|
13
|
+
"topic": [
|
|
14
|
+
"compute"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"cost": 3,
|
|
18
|
+
"modes": "both",
|
|
19
|
+
"params": {
|
|
20
|
+
"density": {
|
|
21
|
+
"type": "number",
|
|
22
|
+
"default": 1,
|
|
23
|
+
"minimum": 0.2,
|
|
24
|
+
"maximum": 3
|
|
25
|
+
},
|
|
26
|
+
"speed": {
|
|
27
|
+
"type": "number",
|
|
28
|
+
"default": 1,
|
|
29
|
+
"minimum": 0,
|
|
30
|
+
"maximum": 3
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"conflicts": [],
|
|
34
|
+
"source": "https://threejs.org/examples/#webgl_instancing_performance",
|
|
35
|
+
"licence": "MIT"
|
|
36
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { FxContext, FxFactory, FxHandle, FxParams } from "./types.js";
|
|
2
|
+
|
|
3
|
+
/** Rows of rack units with blinking status LEDs (topic: compute). */
|
|
4
|
+
export const create: FxFactory = (ctx: FxContext, params: FxParams): FxHandle => {
|
|
5
|
+
const { THREE, palette, quality, rng } = ctx;
|
|
6
|
+
const density = typeof params.density === "number" ? params.density : 1;
|
|
7
|
+
const speed = typeof params.speed === "number" ? params.speed : 1;
|
|
8
|
+
const count = Math.max(16, Math.round((quality.particles / 14) * density));
|
|
9
|
+
|
|
10
|
+
const unitGeo = new THREE.BoxGeometry(3.4, 0.34, 1.2);
|
|
11
|
+
const unitMat = new THREE.MeshStandardMaterial({ color: palette.second, metalness: 0.7, roughness: 0.4, transparent: true, opacity: 0.8 });
|
|
12
|
+
const units = new THREE.InstancedMesh(unitGeo, unitMat, count);
|
|
13
|
+
|
|
14
|
+
const ledGeo = new THREE.SphereGeometry(0.06, 6, 6);
|
|
15
|
+
const ledMat = new THREE.MeshBasicMaterial({ color: palette.accent });
|
|
16
|
+
const leds = new THREE.InstancedMesh(ledGeo, ledMat, count);
|
|
17
|
+
|
|
18
|
+
const perColumn = 10;
|
|
19
|
+
const m = new THREE.Matrix4();
|
|
20
|
+
const phases: number[] = [];
|
|
21
|
+
for (let i = 0; i < count; i++) {
|
|
22
|
+
const col = Math.floor(i / perColumn);
|
|
23
|
+
const x = (col - 1.5) * 5.2;
|
|
24
|
+
const y = -4 + (i % perColumn) * 0.46;
|
|
25
|
+
m.makeTranslation(x, y, 0);
|
|
26
|
+
units.setMatrixAt(i, m);
|
|
27
|
+
leds.setMatrixAt(i, m.clone().setPosition(x + 1.5, y, 0.65));
|
|
28
|
+
phases.push(rng() * Math.PI * 2);
|
|
29
|
+
}
|
|
30
|
+
units.instanceMatrix.needsUpdate = true;
|
|
31
|
+
leds.instanceMatrix.needsUpdate = true;
|
|
32
|
+
|
|
33
|
+
const group = new THREE.Group();
|
|
34
|
+
group.add(units, leds);
|
|
35
|
+
const holder = new THREE.Group();
|
|
36
|
+
holder.add(group);
|
|
37
|
+
holder.userData.count = count;
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
object: holder,
|
|
41
|
+
tick: (t) => {
|
|
42
|
+
group.rotation.y = Math.sin(t * 0.05 * speed) * 0.2;
|
|
43
|
+
// One shared blink phase keeps the cost flat while still reading as traffic.
|
|
44
|
+
ledMat.opacity = 0.45 + Math.sin(t * 2.4 * speed + phases[0]) * 0.4;
|
|
45
|
+
ledMat.transparent = true;
|
|
46
|
+
},
|
|
47
|
+
dispose: () => {
|
|
48
|
+
unitGeo.dispose();
|
|
49
|
+
unitMat.dispose();
|
|
50
|
+
ledGeo.dispose();
|
|
51
|
+
ledMat.dispose();
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "shader-particles",
|
|
3
|
+
"kind": "background",
|
|
4
|
+
"tags": {
|
|
5
|
+
"mood": [
|
|
6
|
+
"glow",
|
|
7
|
+
"dense"
|
|
8
|
+
],
|
|
9
|
+
"content": [
|
|
10
|
+
"particles",
|
|
11
|
+
"stars",
|
|
12
|
+
"dust"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"cost": 2,
|
|
16
|
+
"modes": "both",
|
|
17
|
+
"params": {
|
|
18
|
+
"density": {
|
|
19
|
+
"type": "number",
|
|
20
|
+
"default": 1,
|
|
21
|
+
"minimum": 0.2,
|
|
22
|
+
"maximum": 3
|
|
23
|
+
},
|
|
24
|
+
"size": {
|
|
25
|
+
"type": "number",
|
|
26
|
+
"default": 1,
|
|
27
|
+
"minimum": 0.3,
|
|
28
|
+
"maximum": 3
|
|
29
|
+
},
|
|
30
|
+
"radius": {
|
|
31
|
+
"type": "number",
|
|
32
|
+
"default": 12,
|
|
33
|
+
"minimum": 4,
|
|
34
|
+
"maximum": 30
|
|
35
|
+
},
|
|
36
|
+
"spin": {
|
|
37
|
+
"type": "number",
|
|
38
|
+
"default": 1,
|
|
39
|
+
"minimum": 0,
|
|
40
|
+
"maximum": 3
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"conflicts": [],
|
|
44
|
+
"source": "https://threejs.org/examples/#webgl_buffergeometry_custom_attributes_particles",
|
|
45
|
+
"licence": "MIT"
|
|
46
|
+
}
|