@machinal/mcp 0.0.0-stage → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/README.md +366 -2
  2. package/bin/machinal-mcp.mjs +19 -0
  3. package/bin/machinal-stdio.mjs +14 -0
  4. package/package.json +47 -4
  5. package/skills/machinal-cinema/SKILL.md +18 -0
  6. package/skills/machinal-cinema/references/film-library/DIRECTOR.md +149 -0
  7. package/skills/machinal-cinema/references/film-library/LICENSE +21 -0
  8. package/skills/machinal-cinema/references/film-library/MY-STYLES.md +139 -0
  9. package/skills/machinal-cinema/references/film-library/README.md +13 -0
  10. package/skills/machinal-cinema/references/film-library/TECHNIQUE.md +162 -0
  11. package/skills/machinal-cinema/references/film-library/core/lib.js +44 -0
  12. package/skills/machinal-cinema/references/film-library/core/post/crt.js +144 -0
  13. package/skills/machinal-cinema/references/film-library/core/three/post.js +102 -0
  14. package/skills/machinal-cinema/references/film-library/manifest.json +394 -0
  15. package/skills/machinal-cinema/references/film-library/styleboard/catalog.json +1128 -0
  16. package/skills/machinal-cinema/references/film-library/styles/README.md +126 -0
  17. package/skills/machinal-cinema/references/film-library/styles/archive-lighttable/STYLE.md +107 -0
  18. package/skills/machinal-cinema/references/film-library/styles/art-deco/STYLE.md +110 -0
  19. package/skills/machinal-cinema/references/film-library/styles/ascii-crt/STYLE.md +113 -0
  20. package/skills/machinal-cinema/references/film-library/styles/backrooms/STYLE.md +123 -0
  21. package/skills/machinal-cinema/references/film-library/styles/blueprint/STYLE.md +118 -0
  22. package/skills/machinal-cinema/references/film-library/styles/brick-toy/STYLE.md +112 -0
  23. package/skills/machinal-cinema/references/film-library/styles/briefing-board/STYLE.md +120 -0
  24. package/skills/machinal-cinema/references/film-library/styles/caption-news/STYLE.md +135 -0
  25. package/skills/machinal-cinema/references/film-library/styles/cel-anime-80s/STYLE.md +117 -0
  26. package/skills/machinal-cinema/references/film-library/styles/chalkboard/STYLE.md +153 -0
  27. package/skills/machinal-cinema/references/film-library/styles/circuit-board/STYLE.md +149 -0
  28. package/skills/machinal-cinema/references/film-library/styles/city-symphony/STYLE.md +140 -0
  29. package/skills/machinal-cinema/references/film-library/styles/countdown/STYLE.md +130 -0
  30. package/skills/machinal-cinema/references/film-library/styles/crayon-book/STYLE.md +107 -0
  31. package/skills/machinal-cinema/references/film-library/styles/dark-keynote/STYLE.md +115 -0
  32. package/skills/machinal-cinema/references/film-library/styles/data-physical/STYLE.md +117 -0
  33. package/skills/machinal-cinema/references/film-library/styles/dataviz/STYLE.md +121 -0
  34. package/skills/machinal-cinema/references/film-library/styles/desktop-flythrough/STYLE.md +145 -0
  35. package/skills/machinal-cinema/references/film-library/styles/engraving/STYLE.md +121 -0
  36. package/skills/machinal-cinema/references/film-library/styles/game-show/STYLE.md +116 -0
  37. package/skills/machinal-cinema/references/film-library/styles/glass-product/STYLE.md +108 -0
  38. package/skills/machinal-cinema/references/film-library/styles/halftone-dossier/STYLE.md +120 -0
  39. package/skills/machinal-cinema/references/film-library/styles/hd-2d/STYLE.md +109 -0
  40. package/skills/machinal-cinema/references/film-library/styles/hologram-hud/STYLE.md +127 -0
  41. package/skills/machinal-cinema/references/film-library/styles/impasto/STYLE.md +122 -0
  42. package/skills/machinal-cinema/references/film-library/styles/ink-wash/STYLE.md +118 -0
  43. package/skills/machinal-cinema/references/film-library/styles/iso-infographic/STYLE.md +115 -0
  44. package/skills/machinal-cinema/references/film-library/styles/isometric-picture-book/STYLE.md +130 -0
  45. package/skills/machinal-cinema/references/film-library/styles/kino-montage/STYLE.md +149 -0
  46. package/skills/machinal-cinema/references/film-library/styles/lidar-survey/STYLE.md +116 -0
  47. package/skills/machinal-cinema/references/film-library/styles/living-screencast/STYLE.md +122 -0
  48. package/skills/machinal-cinema/references/film-library/styles/lowpoly-island/STYLE.md +110 -0
  49. package/skills/machinal-cinema/references/film-library/styles/memphis-diorama/STYLE.md +142 -0
  50. package/skills/machinal-cinema/references/film-library/styles/microgame/STYLE.md +120 -0
  51. package/skills/machinal-cinema/references/film-library/styles/microscope/STYLE.md +106 -0
  52. package/skills/machinal-cinema/references/film-library/styles/midcentury-toon/STYLE.md +122 -0
  53. package/skills/machinal-cinema/references/film-library/styles/news-package/STYLE.md +156 -0
  54. package/skills/machinal-cinema/references/film-library/styles/newsreel/STYLE.md +134 -0
  55. package/skills/machinal-cinema/references/film-library/styles/one-line/STYLE.md +112 -0
  56. package/skills/machinal-cinema/references/film-library/styles/paper-lantern/STYLE.md +120 -0
  57. package/skills/machinal-cinema/references/film-library/styles/paper-popup/STYLE.md +117 -0
  58. package/skills/machinal-cinema/references/film-library/styles/papercut-red/STYLE.md +108 -0
  59. package/skills/machinal-cinema/references/film-library/styles/pictogram-motion/STYLE.md +119 -0
  60. package/skills/machinal-cinema/references/film-library/styles/pixel-rpg/STYLE.md +115 -0
  61. package/skills/machinal-cinema/references/film-library/styles/printed-long-take/STYLE.md +141 -0
  62. package/skills/machinal-cinema/references/film-library/styles/risograph/STYLE.md +123 -0
  63. package/skills/machinal-cinema/references/film-library/styles/rubber-hose/STYLE.md +110 -0
  64. package/skills/machinal-cinema/references/film-library/styles/satellite-briefing/STYLE.md +114 -0
  65. package/skills/machinal-cinema/references/film-library/styles/scifi-toon/STYLE.md +119 -0
  66. package/skills/machinal-cinema/references/film-library/styles/shadow-puppet/STYLE.md +122 -0
  67. package/skills/machinal-cinema/references/film-library/styles/silent-film/STYLE.md +107 -0
  68. package/skills/machinal-cinema/references/film-library/styles/silkscreen-poster/STYLE.md +138 -0
  69. package/skills/machinal-cinema/references/film-library/styles/spy-titles/STYLE.md +114 -0
  70. package/skills/machinal-cinema/references/film-library/styles/stained-glass/STYLE.md +121 -0
  71. package/skills/machinal-cinema/references/film-library/styles/swiss-motion/STYLE.md +113 -0
  72. package/skills/machinal-cinema/references/film-library/styles/teardown/STYLE.md +125 -0
  73. package/skills/machinal-cinema/references/film-library/styles/telestrator/STYLE.md +135 -0
  74. package/skills/machinal-cinema/references/film-library/styles/tilt-shift/STYLE.md +105 -0
  75. package/skills/machinal-cinema/references/film-library/styles/transit-map/STYLE.md +194 -0
  76. package/skills/machinal-cinema/references/film-library/styles/ukiyoe/STYLE.md +110 -0
  77. package/skills/machinal-cinema/references/film-library/styles/urban-sketch/STYLE.md +124 -0
  78. package/skills/machinal-cinema/references/film-library/styles/visual-investigation/STYLE.md +138 -0
  79. package/skills/machinal-cinema/references/film-library/styles/watercolor/STYLE.md +111 -0
  80. package/skills/machinal-cinema/references/film-library/styles/white-model/STYLE.md +113 -0
  81. package/skills/machinal-cinema/references/film-library/styles/whiteboard/STYLE.md +116 -0
  82. package/skills/machinal-cinema/references/film-library/styles/woodcut/STYLE.md +120 -0
  83. package/skills/machinal-cinema/references/film-library/upstream-skill.md +13 -0
  84. package/skills/machinal-cinema/references/film-styles.json +1322 -0
  85. package/skills/machinal-cinema/references/film-techniques.json +107 -0
  86. package/skills/machinal-cinema/references/workflow.md +58 -0
  87. package/skills/machinal-credits/SKILL.md +24 -0
  88. package/skills/machinal-editing/SKILL.md +43 -0
  89. package/skills/machinal-editing/references/brief.md +98 -0
  90. package/skills/machinal-editing/references/effects.md +58 -0
  91. package/skills/machinal-editing/references/looks-motion.md +37 -0
  92. package/skills/machinal-editing/references/styles.json +15 -0
  93. package/skills/machinal-editing/references/styles.md +16 -0
  94. package/skills/machinal-editing/references/transitions.md +46 -0
  95. package/skills/machinal-editing/references/workflow.md +43 -0
  96. package/skills/machinal-media/SKILL.md +23 -0
  97. package/skills/machinal-media/references/workflow.md +160 -0
  98. package/skills/machinal-recipes/SKILL.md +32 -0
  99. package/skills/machinal-recipes/references/catalog.v1.json +10445 -0
  100. package/skills/machinal-recipes/references/commands.md +45 -0
  101. package/skills/machinal-recipes/references/example.edit.yaml +26 -0
  102. package/skills/machinal-recipes/references/examples/caption-audio.yaml +28 -0
  103. package/skills/machinal-recipes/references/examples/cinematic-sequence.yaml +21 -0
  104. package/skills/machinal-recipes/references/examples/client-scene.yaml +26 -0
  105. package/skills/machinal-recipes/references/examples/generated-media.yaml +25 -0
  106. package/skills/machinal-recipes/references/examples/modify-snapshot.yaml +22 -0
  107. package/skills/machinal-recipes/references/examples/montage-v3.yaml +28 -0
  108. package/skills/machinal-recipes/references/examples/narrated-documentary.yaml +112 -0
  109. package/skills/machinal-recipes/references/examples/narration-timing.yaml +43 -0
  110. package/skills/machinal-recipes/references/examples/scene-edit.yaml +19 -0
  111. package/skills/machinal-recipes/references/examples/scene-generated-image.yaml +36 -0
  112. package/skills/machinal-recipes/references/examples/scene-generation.yaml +35 -0
  113. package/skills/machinal-recipes/references/examples/scene-image-insert.yaml +41 -0
  114. package/skills/machinal-recipes/references/examples/scene-three-explainer.yaml +38 -0
  115. package/skills/machinal-recipes/references/examples/social-hook.yaml +26 -0
  116. package/skills/machinal-recipes/references/examples/tutorial-clean.yaml +19 -0
  117. package/skills/machinal-recipes/references/examples.md +28 -0
  118. package/skills/machinal-recipes/references/jobs-scenes.md +206 -0
  119. package/skills/machinal-recipes/references/text-audio.md +118 -0
  120. package/skills/machinal-recipes/references/yaml.md +72 -0
  121. package/skills/machinal-review/SKILL.md +18 -0
  122. package/skills/machinal-review/references/production.md +146 -0
  123. package/skills/machinal-scenes/SKILL.md +44 -0
  124. package/skills/machinal-scenes/references/authoring.md +97 -0
  125. package/skills/machinal-scenes/references/runtime.md +136 -0
  126. package/skills/machinal-scenes/references/scene-templates/blueprint-mechanism.svelte +62 -0
  127. package/skills/machinal-scenes/references/scene-templates/glitch-handoff.svelte +30 -0
  128. package/skills/machinal-scenes/references/scene-templates/image-reveal.svelte +33 -0
  129. package/skills/machinal-scenes/references/scene-templates/kinetic-type.svelte +38 -0
  130. package/skills/machinal-scenes/references/scene-templates/layered-parallax.svelte +31 -0
  131. package/skills/machinal-scenes/references/scene-templates/lens-assembly-3d.svelte +57 -0
  132. package/skills/machinal-scenes/references/scene-templates/paper-stage-3d.svelte +83 -0
  133. package/skills/machinal-scenes/references/scene-templates/signal-diagram.svelte +43 -0
  134. package/skills/machinal-scenes/references/scene-templates/swiss-grid-motion.svelte +54 -0
  135. package/skills/machinal-scenes/references/scene-templates.json +178 -0
  136. package/skills/machinal-scenes/references/scene-templates.md +50 -0
  137. package/skills/machinal-scenes/references/workflow.md +206 -0
  138. package/skills/machinal-support/SKILL.md +42 -0
  139. package/src/bridge.mjs +287 -0
  140. package/src/cli.mjs +157 -0
  141. package/src/configuration.mjs +148 -0
  142. package/src/connection.mjs +187 -0
  143. package/src/credential-store.mjs +61 -0
  144. package/src/credits.mjs +86 -0
  145. package/src/docker.mjs +93 -0
  146. package/src/download.mjs +90 -0
  147. package/src/endpoints.mjs +3 -0
  148. package/src/errors.mjs +9 -0
  149. package/src/formats.mjs +140 -0
  150. package/src/keys.mjs +127 -0
  151. package/src/launch.mjs +29 -0
  152. package/src/local-setup.mjs +109 -0
  153. package/src/opencode-auth.mjs +246 -0
  154. package/src/opencode-checkpoints.mjs +90 -0
  155. package/src/opencode-configuration.mjs +53 -0
  156. package/src/opencode-media.mjs +139 -0
  157. package/src/opencode-plugin/index.mjs +7 -0
  158. package/src/opencode-plugin/package.json +5 -0
  159. package/src/opencode-recipes.mjs +130 -0
  160. package/src/opencode-routing.mjs +154 -0
  161. package/src/opencode-tools.mjs +30 -0
  162. package/src/opencode-workflow.mjs +32 -0
  163. package/src/presentation.mjs +31 -0
  164. package/src/prompts.mjs +32 -0
  165. package/src/reference-files.json +127 -0
  166. package/src/runtime.mjs +51 -0
  167. package/src/setup-options.mjs +69 -0
  168. package/src/setup-stdio.mjs +116 -0
  169. package/src/setup.mjs +173 -0
  170. package/src/skills.mjs +68 -0
  171. package/src/transfer-http.mjs +109 -0
  172. package/src/version.mjs +3 -0
  173. package/src/windows-key-prompt.mjs +37 -0
  174. package/src/windows-key-prompt.ps1 +77 -0
@@ -0,0 +1,30 @@
1
+ <script>
2
+ import { SceneCanvas, useScene } from '@direction/scene-svelte';
3
+ import { clamp } from '@direction/scene-runtime';
4
+
5
+ const scene = useScene();
6
+ const design = { before: 'Semnal primit', after: 'Conexiune stabilă', amount: 24, accent: '#79d5ce' };
7
+ const progress = $derived(scene.frame.progress);
8
+ const safeHeight = $derived(scene.frame.config.height * (1 - (scene.frame.config.captionSafeBottom ?? 0)));
9
+ const pulse = $derived(Math.sin(clamp((progress - 0.32) / 0.3, 0, 1) * Math.PI) ** 2);
10
+ const shift = $derived(design.amount * pulse * Math.sin(progress * Math.PI * 6));
11
+ const incoming = $derived(progress >= 0.48);
12
+ </script>
13
+
14
+ <SceneCanvas background="#101c26">
15
+ <svg width="100%" height={safeHeight} viewBox="0 0 1000 700" aria-label={incoming ? design.after : design.before}>
16
+ <path d="M90 170 H910 M90 530 H910" stroke="#34505a" stroke-width="2" />
17
+ <g transform="translate({shift} 0)">
18
+ <text x="100" y="360" fill="#edf2ed" font-size="72" font-weight="700">{incoming ? design.after : design.before}</text>
19
+ <rect x="100" y="405" width={incoming ? 800 : 300} height="5" fill={design.accent} />
20
+ </g>
21
+ {#each [0, 1, 2, 3, 4] as band}
22
+ <rect x={90 + (band % 2 === 0 ? shift * 3 : -shift * 2)} y={220 + band * 51} width={180 + band * 120} height={4 + band * 2} fill={design.accent} opacity={pulse * 0.45} />
23
+ {/each}
24
+ <circle cx="900" cy="530" r={6 + pulse * 8} fill={design.accent} />
25
+ </svg>
26
+ </SceneCanvas>
27
+
28
+ <style>
29
+ svg { display: block; font-family: 'Direction Sans'; line-height: 1.15; }
30
+ </style>
@@ -0,0 +1,33 @@
1
+ <script>
2
+ import { SceneCanvas, useScene } from '@direction/scene-svelte';
3
+ import { clamp, easeOutCubic } from '@direction/scene-runtime';
4
+
5
+ let { images = {} } = $props();
6
+ const scene = useScene();
7
+ const design = { label: 'O nouă perspectivă', accent: '#e3bb72', push: 0.045 };
8
+ const progress = $derived(scene.frame.progress);
9
+ const safeHeight = $derived(scene.frame.config.height * (1 - (scene.frame.config.captionSafeBottom ?? 0)));
10
+ const opening = $derived(easeOutCubic(clamp(progress / 0.3, 0, 1)));
11
+ const focus = $derived(easeOutCubic(clamp((progress - 0.15) / 0.47, 0, 1)));
12
+ const scale = $derived(1 + design.push * focus);
13
+ const line = $derived(1 - clamp((progress - 0.92) / 0.08, 0, 1));
14
+ </script>
15
+
16
+ <SceneCanvas background="#151c24">
17
+ <svg width="100%" height={safeHeight} viewBox="0 0 1000 700" aria-label={design.label}>
18
+ <svg x="120" y="80" width="760" height="470" viewBox="0 0 760 470">
19
+ <g transform="translate(380 235) scale({scale}) translate(-380 -235)">
20
+ <image href={images.image_1} width="760" height="470" preserveAspectRatio="xMidYMid meet" />
21
+ </g>
22
+ <rect width={380 * (1 - opening)} height="470" fill="#151c24" />
23
+ <rect x={760 - 380 * (1 - opening)} width={380 * (1 - opening)} height="470" fill="#151c24" />
24
+ </svg>
25
+ <rect x={110 - 14 * focus} y={70 - 14 * focus} width={780 + 28 * focus} height={490 + 28 * focus} fill="none" stroke={design.accent} stroke-width="2" opacity={opening} />
26
+ <path d="M100 610 H900" pathLength="1" stroke={design.accent} stroke-width="3" stroke-dasharray="1" stroke-dashoffset={1 - line} />
27
+ <text x="120" y="660" fill="#eee9df" font-size="36" opacity={focus}>{design.label}</text>
28
+ </svg>
29
+ </SceneCanvas>
30
+
31
+ <style>
32
+ svg { display: block; font-family: 'Direction Sans'; line-height: 1.2; }
33
+ </style>
@@ -0,0 +1,38 @@
1
+ <script>
2
+ import { SceneCanvas, useScene } from '@direction/scene-svelte';
3
+ import { clamp, easeOutCubic } from '@direction/scene-runtime';
4
+
5
+ const scene = useScene();
6
+
7
+ const design = {
8
+ words: ['Ideea', 'prinde', 'formă.'],
9
+ accent: '#d5f36b',
10
+ stagger: 0.09,
11
+ };
12
+
13
+ const progress = $derived(scene.frame.progress);
14
+ const safeHeight = $derived(scene.frame.config.height * (1 - (scene.frame.config.captionSafeBottom ?? 0)));
15
+ const underline = $derived(easeOutCubic(clamp((progress - 0.16) / 0.25, 0, 1)) * (1 - clamp((progress - 0.9) / 0.1, 0, 1)));
16
+
17
+ function entrance(index, time) {
18
+ return easeOutCubic(clamp((time - index * design.stagger) / 0.16, 0, 1));
19
+ }
20
+ </script>
21
+
22
+ <SceneCanvas background="#111a19">
23
+ <svg width="100%" height={safeHeight} viewBox="0 0 1000 700" aria-label={design.words.join(' ')}>
24
+ <path d="M100 116 H900 M100 584 H900" stroke="#35423b" stroke-width="2" />
25
+ {#each design.words as word, index}
26
+ {@const enter = entrance(index, progress)}
27
+ <g opacity={enter} transform="translate(100 {210 + index * 128 + (1 - enter) * 40})">
28
+ <text fill={index === design.words.length - 1 ? design.accent : '#f0eee5'} font-size="104" font-weight="700">{word}</text>
29
+ </g>
30
+ {/each}
31
+ <rect x="100" y="510" width={540 * underline} height="8" fill={design.accent} />
32
+ <circle cx={100 + 700 * easeOutCubic(clamp(progress / 0.48, 0, 1))} cy="584" r="7" fill={design.accent} />
33
+ </svg>
34
+ </SceneCanvas>
35
+
36
+ <style>
37
+ svg { display: block; font-family: 'Direction Sans'; line-height: 1.1; }
38
+ </style>
@@ -0,0 +1,31 @@
1
+ <script>
2
+ import { SceneCanvas, useScene } from '@direction/scene-svelte';
3
+ import { clamp, easeOutCubic } from '@direction/scene-runtime';
4
+
5
+ let { images = {} } = $props();
6
+ const scene = useScene();
7
+ const design = { depth: 38, label: 'Planuri în mișcare', accent: '#b1d8cb' };
8
+ const progress = $derived(scene.frame.progress);
9
+ const safeHeight = $derived(scene.frame.config.height * (1 - (scene.frame.config.captionSafeBottom ?? 0)));
10
+ const camera = $derived(easeOutCubic(clamp((progress - 0.1) / 0.62, 0, 1)));
11
+ const enter = $derived(easeOutCubic(clamp(progress / 0.2, 0, 1)));
12
+ const travel = $derived((camera - 0.5) * design.depth);
13
+ </script>
14
+
15
+ <SceneCanvas background="#10232b">
16
+ <svg width="100%" height={safeHeight} viewBox="0 0 1000 700" aria-label={design.label}>
17
+ <svg x="80" y="70" width="840" height="500" viewBox="0 0 840 500">
18
+ <image href={images.image_1} x={-60 - travel * 0.3} y="-25" width="960" height="550" preserveAspectRatio="xMidYMid slice" />
19
+ <path d="M60 400 Q420 80 780 400" fill="none" stroke={design.accent} stroke-width="2" opacity="0.45" />
20
+ <image href={images.image_2} x={60 + travel} y={35 + (1 - enter) * 40} width="720" height="440" preserveAspectRatio="xMidYMid meet" opacity={enter} />
21
+ <circle cx={110 + 620 * camera} cy={370 - 140 * Math.sin(camera * Math.PI)} r="7" fill={design.accent} />
22
+ <circle cx={730 - 620 * camera} cy={430 + 25 * Math.sin(camera * Math.PI)} r="4" fill="#f1c983" />
23
+ </svg>
24
+ <path d="M80 600 H920" stroke={design.accent} stroke-width="2" />
25
+ <text x="80" y="655" fill="#eef3ea" font-size="38">{design.label}</text>
26
+ </svg>
27
+ </SceneCanvas>
28
+
29
+ <style>
30
+ svg { display: block; font-family: 'Direction Sans'; line-height: 1.2; }
31
+ </style>
@@ -0,0 +1,57 @@
1
+ <script>
2
+ import { SceneCanvas, SceneThree, useScene } from '@direction/scene-svelte';
3
+ import { clamp, easeOutCubic } from '@direction/scene-runtime';
4
+
5
+ const scene = useScene();
6
+ const design = { spread: 1.15, metal: '#729c91', glass: '#a7d9e1', label: 'Elemente în echilibru' };
7
+ const safeHeight = $derived(Math.round(scene.frame.config.height * (1 - (scene.frame.config.captionSafeBottom ?? 0))));
8
+ const labelSize = $derived(Math.min(scene.frame.config.width, safeHeight) * 0.045);
9
+
10
+ function setup({ THREE, world, camera }) {
11
+ const barrel = new THREE.MeshStandardMaterial({ color: design.metal, metalness: 0.65, roughness: 0.3 });
12
+ const glass = new THREE.MeshStandardMaterial({ color: design.glass, metalness: 0.25, roughness: 0.16 });
13
+ const parts = [-2, -1, 0, 1, 2].map((offset, index) => {
14
+ const isGlass = index % 2 === 1;
15
+ const geometry = isGlass
16
+ ? new THREE.CylinderGeometry(0.93, 0.93, 0.12, 64)
17
+ : new THREE.TorusGeometry(1.05, 0.13, 16, 64);
18
+ const mesh = new THREE.Mesh(geometry, isGlass ? glass : barrel);
19
+ if (isGlass) mesh.rotation.x = Math.PI / 2;
20
+ world.add(mesh);
21
+ return { mesh, offset, index };
22
+ });
23
+
24
+ world.add(new THREE.HemisphereLight(0xe2faf1, 0x172b35, 2.4));
25
+ const key = new THREE.DirectionalLight(0xffe2b5, 4);
26
+ key.position.set(4, 5, 7);
27
+ world.add(key);
28
+ const rim = new THREE.DirectionalLight(0x83c7e6, 3);
29
+ rim.position.set(-4, 1, -3);
30
+ world.add(rim);
31
+
32
+ return {
33
+ update(frame) {
34
+ const progress = frame.progress;
35
+ const arc = easeOutCubic(clamp((progress - 0.08) / 0.62, 0, 1));
36
+ for (const { mesh, offset, index } of parts) {
37
+ const assemble = easeOutCubic(clamp((progress - 0.18 - index * 0.025) / 0.42, 0, 1));
38
+ mesh.position.set(0, 0, offset * (0.27 + design.spread * (1 - assemble)));
39
+ mesh.rotation.z = (1 - assemble) * offset * 0.12;
40
+ }
41
+ const distance = camera.aspect < 1 ? 11.5 : 8.5;
42
+ const angle = 0.78 - arc * 0.28;
43
+ camera.position.set(distance * Math.sin(angle), 2.8 - arc * 0.7, distance * Math.cos(angle));
44
+ camera.lookAt(0, 0, 0);
45
+ },
46
+ };
47
+ }
48
+ </script>
49
+
50
+ <SceneCanvas background="#101d26">
51
+ <SceneThree {setup} width={scene.frame.config.width} height={safeHeight} label="Schematic optical assembly" />
52
+ <div class="label" style:top="{safeHeight * 0.08}px" style:left="{scene.frame.config.width * 0.08}px" style:font-size="{labelSize}px">{design.label}</div>
53
+ </SceneCanvas>
54
+
55
+ <style>
56
+ .label { position: absolute; color: #e9eee4; font-family: 'Direction Sans'; line-height: 1.2; max-width: 84%; }
57
+ </style>
@@ -0,0 +1,83 @@
1
+ <script>
2
+ import { SceneCanvas, SceneThree, useScene } from '@direction/scene-svelte';
3
+ import { clamp } from '@direction/scene-runtime';
4
+
5
+ const scene = useScene();
6
+ const design = {
7
+ paper: '#f0e4cb',
8
+ facades: ['#d98764', '#4f918b', '#d6ac57'],
9
+ spread: 0.9,
10
+ label: 'O lume se deschide',
11
+ };
12
+ const safeHeight = $derived(Math.round(scene.frame.config.height * (1 - (scene.frame.config.captionSafeBottom ?? 0))));
13
+ const labelSize = $derived(Math.min(scene.frame.config.width, safeHeight) * 0.045);
14
+
15
+ function smooth(value) {
16
+ const t = clamp(value, 0, 1);
17
+ return t * t * (3 - 2 * t);
18
+ }
19
+
20
+ function setup({ THREE, world, camera }) {
21
+ const paper = new THREE.MeshStandardMaterial({ color: design.paper, roughness: 0.95, side: THREE.DoubleSide });
22
+ const ink = new THREE.MeshStandardMaterial({ color: '#284d50', roughness: 0.9 });
23
+ const leaves = [-1, 1].map(side => {
24
+ const hinge = new THREE.Group();
25
+ const page = new THREE.Mesh(new THREE.BoxGeometry(3.2, 0.1, 4.4), paper);
26
+ page.position.x = side * 1.6;
27
+ hinge.add(page);
28
+ world.add(hinge);
29
+ return { hinge, side };
30
+ });
31
+ const panels = [-1.7, 0, 1.7].map((x, index) => {
32
+ const hinge = new THREE.Group();
33
+ hinge.position.set(x, 0.08, index === 1 ? -0.7 : 0.6);
34
+ const height = index === 1 ? 2 : 1.45;
35
+ const outline = new THREE.Shape();
36
+ outline.moveTo(-0.6, 0);
37
+ outline.lineTo(0.6, 0);
38
+ outline.lineTo(0.6, height - 0.45);
39
+ outline.lineTo(0, height);
40
+ outline.lineTo(-0.6, height - 0.45);
41
+ outline.closePath();
42
+ const material = new THREE.MeshStandardMaterial({ color: design.facades[index], roughness: 0.9, side: THREE.DoubleSide });
43
+ const facade = new THREE.Mesh(new THREE.ExtrudeGeometry(outline, { depth: 0.045, bevelEnabled: false }), material);
44
+ hinge.add(facade);
45
+ const door = new THREE.Mesh(new THREE.BoxGeometry(0.23, 0.6, 0.025), ink);
46
+ door.position.set(0, 0.3, 0.065);
47
+ hinge.add(door);
48
+ const window = new THREE.Mesh(new THREE.BoxGeometry(0.25, 0.25, 0.025), paper);
49
+ window.position.set(0, height - 0.58, 0.065);
50
+ hinge.add(window);
51
+ leaves[index === 0 ? 0 : 1].hinge.add(hinge);
52
+ return { hinge, index };
53
+ });
54
+ world.add(new THREE.HemisphereLight(0xfff5dc, 0x315462, 2.8));
55
+ const key = new THREE.DirectionalLight(0xffe2bb, 4);
56
+ key.position.set(-3, 6, 5);
57
+ world.add(key);
58
+ const rim = new THREE.DirectionalLight(0xb5dedc, 2.2);
59
+ rim.position.set(4, 3, -3);
60
+ world.add(rim);
61
+
62
+ return {
63
+ update(frame) {
64
+ const p = frame.progress;
65
+ for (const { hinge, side } of leaves) hinge.rotation.z = side * design.spread * (1 - smooth(p / 0.24));
66
+ for (const { hinge, index } of panels) hinge.rotation.x = -Math.PI / 2 * (1 - smooth((p - 0.25 - index * 0.08) / 0.24));
67
+ const arc = smooth((p - 0.18) / 0.56);
68
+ const distance = camera.aspect < 1 ? 13.8 : 10.4;
69
+ camera.position.set(distance * (0.32 - arc * 0.16), distance * 0.5, distance * 0.84);
70
+ camera.lookAt(0, 0.65, 0);
71
+ },
72
+ };
73
+ }
74
+ </script>
75
+
76
+ <SceneCanvas background="#18363c">
77
+ <SceneThree {setup} width={scene.frame.config.width} height={safeHeight} label="Paper pages unfold; three illustrated house panels rise independently" />
78
+ <div class="label" style:top="{safeHeight * 0.07}px" style:left="{scene.frame.config.width * 0.08}px" style:font-size="{labelSize}px">{design.label}</div>
79
+ </SceneCanvas>
80
+
81
+ <style>
82
+ .label { position: absolute; color: #f0e4cb; font-family: 'Direction Sans'; line-height: 1.2; max-width: 84%; }
83
+ </style>
@@ -0,0 +1,43 @@
1
+ <script>
2
+ import { SceneCanvas, useScene } from '@direction/scene-svelte';
3
+ import { clamp, easeOutCubic } from '@direction/scene-runtime';
4
+
5
+ const scene = useScene();
6
+
7
+ const design = {
8
+ title: 'De la sursă la rezultat',
9
+ labels: ['Sursă', 'Proces', 'Rezultat'],
10
+ accent: '#b6dd80',
11
+ };
12
+
13
+ const progress = $derived(scene.frame.progress);
14
+ const safeHeight = $derived(scene.frame.config.height * (1 - (scene.frame.config.captionSafeBottom ?? 0)));
15
+ const flow = $derived(clamp((progress - 0.22) / 0.48, 0, 1));
16
+
17
+ function entrance(index, time) {
18
+ return easeOutCubic(clamp((time - index * 0.045) / 0.13, 0, 1));
19
+ }
20
+ </script>
21
+
22
+ <SceneCanvas background="#182521">
23
+ <svg width="100%" height={safeHeight} viewBox="0 0 1000 700" aria-label={design.title}>
24
+ <text x="100" y="140" fill="#f2f1e7" font-size="48" font-weight="700">{design.title}</text>
25
+ <path d="M180 360 H820" stroke="#476151" stroke-width="4" />
26
+ <path d="M180 360 H820" pathLength="1" stroke={design.accent} stroke-width="5" stroke-dasharray="1" stroke-dashoffset={1 - flow} />
27
+ {#each design.labels as label, index}
28
+ {@const enter = entrance(index, progress)}
29
+ {@const active = flow >= index / 2}
30
+ <g transform="translate({180 + index * 320} 360) scale({0.8 + enter * 0.2})" opacity={enter}>
31
+ <circle r="78" fill="#243a2d" stroke={active ? design.accent : '#476151'} stroke-width="3" />
32
+ <circle r="51" fill={active ? design.accent : '#476151'} opacity="0.18" />
33
+ <text text-anchor="middle" y="12" fill="#f2f1e7" font-size="32">{index + 1}</text>
34
+ <text text-anchor="middle" y="145" fill="#f2f1e7" font-size="34">{label}</text>
35
+ </g>
36
+ {/each}
37
+ <circle cx={180 + flow * 640} cy="360" r="11" fill="#f3cb83" />
38
+ </svg>
39
+ </SceneCanvas>
40
+
41
+ <style>
42
+ svg { display: block; font-family: 'Direction Sans'; line-height: 1.2; }
43
+ </style>
@@ -0,0 +1,54 @@
1
+ <script>
2
+ import { SceneCanvas, useScene } from '@direction/scene-svelte';
3
+ import { clamp } from '@direction/scene-runtime';
4
+
5
+ const scene = useScene();
6
+ const design = {
7
+ title: 'Ritmul formei',
8
+ accent: '#e74423',
9
+ paper: '#eeece5',
10
+ displacement: 68,
11
+ };
12
+ const modules = [
13
+ { x: 120, y: 240, width: 440 },
14
+ { x: 340, y: 310, width: 440 },
15
+ { x: 120, y: 380, width: 220 },
16
+ { x: 560, y: 380, width: 220 },
17
+ { x: 340, y: 450, width: 440 },
18
+ ];
19
+ const progress = $derived(scene.frame.progress);
20
+ const safeHeight = $derived(scene.frame.config.height * (1 - (scene.frame.config.captionSafeBottom ?? 0)));
21
+ const exception = $derived(snap((progress - 0.45) / 0.23));
22
+
23
+ function snap(value) {
24
+ const t = clamp(value, 0, 1);
25
+ return t * t * t * (t * (t * 6 - 15) + 10);
26
+ }
27
+ </script>
28
+
29
+ <SceneCanvas background={design.paper}>
30
+ <svg width="100%" height={safeHeight} viewBox="0 0 1000 700" aria-label="Grid modules assemble; one signal tile breaks the alignment">
31
+ <defs>
32
+ <clipPath id="swiss-title"><rect x="100" y="75" width="800" height="100" /></clipPath>
33
+ </defs>
34
+ <g stroke="#d2d0c9" stroke-width="1">
35
+ {#each [120, 230, 340, 450, 560, 670, 780] as x}<path d="M{x} 212 V545" />{/each}
36
+ {#each [240, 310, 380, 450, 520] as y}<path d="M100 {y} H900" />{/each}
37
+ </g>
38
+ <g clip-path="url(#swiss-title)">
39
+ <text x="100" y={145 + 100 * (1 - snap(progress / 0.18))} fill="#141414" font-size="60" font-weight="700">{design.title}</text>
40
+ </g>
41
+ {#each modules as module, index}
42
+ {@const arrival = snap((progress - 0.08 - index * 0.045) / 0.18)}
43
+ <rect x={module.x} y={module.y} width={module.width * arrival} height="48" fill="#141414" />
44
+ {/each}
45
+ <rect x={120 + design.displacement * exception} y={450 - design.displacement * exception} width={110 * snap((progress - 0.3) / 0.12)} height="48" fill={design.accent} />
46
+ <path d="M100 586 H900" stroke="#141414" stroke-width="2" pathLength="1" stroke-dasharray="1" stroke-dashoffset={1 - snap((progress - 0.16) / 0.3)} />
47
+ <text x="100" y="635" fill="#42423d" font-size="24">Cadru / contrast / o singură excepție</text>
48
+ <rect x="100" y="665" width={800 * snap((progress - 0.9) / 0.1)} height="6" fill={design.accent} />
49
+ </svg>
50
+ </SceneCanvas>
51
+
52
+ <style>
53
+ svg { display: block; font-family: 'Direction Sans'; }
54
+ </style>
@@ -0,0 +1,178 @@
1
+ [
2
+ {
3
+ "id": "kinetic-type",
4
+ "version": "1",
5
+ "label": "Kinetic typography / text cinetic",
6
+ "category": "typography",
7
+ "description": "Staggered word reveals with a moving underline and a quiet reading hold. Text cinetic cu intrare pe cuvinte, accent și pauză de lectură.",
8
+ "visualMode": "2d",
9
+ "whenToUse": ["A short supplied hook or chapter heading whose wording is the subject."],
10
+ "avoid": ["Long captions, invented claims or using this heading as a substitute for an illustrative scene."],
11
+ "config": {"width": 1920, "height": 1080, "fps": 30, "duration": 5, "captionSafeArea": true},
12
+ "parameters": [
13
+ {"path": "design.words", "description": "One to three short supplied words; change SVG line positions for more copy."},
14
+ {"path": "design.accent", "description": "Accent/underline CSS color."},
15
+ {"path": "design.stagger", "description": "Delay between words, as a fraction of scene progress; keep the last reveal before 0.40."}
16
+ ],
17
+ "requiredImages": [],
18
+ "choreography": {"reveal": "0–0.32: words rise independently; underline grows.", "action": "0.32–0.48: accent settles on the final word.", "hold": "0.48–0.90: all supplied words remain readable.", "exit": "0.90–1: underline contracts; words stay visible for a cut."},
19
+ "adaptation": ["Replace sample words with exact user copy; do not invent narration cues.", "Match the underline direction/color to the next shot. Avoid an additional timeline fade over its reveal."]
20
+ },
21
+ {
22
+ "id": "image-reveal",
23
+ "version": "1",
24
+ "label": "Image shutter reveal / dezvăluire imagine",
25
+ "category": "image",
26
+ "description": "An approved image revealed by opposing shutters, an independent focus frame and a restrained push-in. Dezvăluire de fotografie cu mască și ramă animată.",
27
+ "visualMode": "2d",
28
+ "whenToUse": ["Introduce a supplied portrait, product image or document with a deliberate visual reveal."],
29
+ "avoid": ["No approved image is available, or the brief prohibits animated image treatment."],
30
+ "config": {"width": 1920, "height": 1080, "fps": 30, "duration": 6, "captionSafeArea": true},
31
+ "parameters": [
32
+ {"path": "design.label", "description": "Short exact supplied label; empty string removes it."},
33
+ {"path": "design.accent", "description": "Focus-frame CSS color."},
34
+ {"path": "design.push", "description": "Image scale change; use 0–0.08 and preserve meaningful image edges."}
35
+ ],
36
+ "requiredImages": [{"id": "image_1", "role": "Approved primary subject image; preserve aspect ratio."}],
37
+ "choreography": {"reveal": "0–0.30: opposing shutters open across the image.", "action": "0.15–0.62: image push and focus-frame expansion move independently.", "hold": "0.62–0.92: image and label remain clear.", "exit": "0.92–1: focus line retracts; image stays visible."},
38
+ "adaptation": ["Attach the actual approved project filename as image_1; images.image_1 is supplied by the host, never a filename/URL.", "Change meet/slice only after considering whether cropping hides the subject.", "The sample label is not required copy and the supplied raster is not a 3D reconstruction."]
39
+ },
40
+ {
41
+ "id": "layered-parallax",
42
+ "version": "1",
43
+ "label": "Layered parallax / straturi independente",
44
+ "category": "image",
45
+ "description": "Different camera-relative motion for an approved background and separate transparent foreground, with independent orbit markers. Parallax pe straturi reale, nu zoom pe o singură fotografie.",
46
+ "visualMode": "2d",
47
+ "whenToUse": ["There are two genuinely separate approved artwork layers and depth helps direct attention."],
48
+ "avoid": ["Only one flat image is available; do not claim to reconstruct hidden geometry or invent a cutout."],
49
+ "config": {"width": 1920, "height": 1080, "fps": 30, "duration": 7, "captionSafeArea": true},
50
+ "parameters": [
51
+ {"path": "design.depth", "description": "Foreground horizontal travel in SVG units, 0–45; background moves at a smaller opposing rate."},
52
+ {"path": "design.label", "description": "Short exact supplied title, or empty string."},
53
+ {"path": "design.accent", "description": "Independent marker CSS color."}
54
+ ],
55
+ "requiredImages": [{"id": "image_1", "role": "Approved background plate."}, {"id": "image_2", "role": "Approved separate foreground with transparent alpha, not a second opaque copy."}],
56
+ "choreography": {"reveal": "0–0.20: foreground settles while background is already visible.", "action": "0.20–0.72: separate layers travel at different rates; markers trace independent paths.", "hold": "0.72–0.94: camera/layers settle with the subject visible.", "exit": "0.94–1: composition holds for a matching cut; no extra fade."},
57
+ "adaptation": ["Attach both actual project images only after source-use approval; never silently generate a missing layer.", "Preserve foreground alpha and test layer coverage throughout travel.", "This is 2D layered depth, not genuine SceneThree or inferred 3D geometry."]
58
+ },
59
+ {
60
+ "id": "glitch-handoff",
61
+ "version": "1",
62
+ "label": "Glitch handoff / tranziție glitch",
63
+ "category": "transition",
64
+ "description": "A single restrained strip-displacement pulse hands off between two supplied text states. Tranziție internă glitch fără stroboscop, revenită la o imagine stabilă.",
65
+ "visualMode": "2d",
66
+ "whenToUse": ["A brief explicitly calls for a digital interruption or state change within one scene."],
67
+ "avoid": ["Quiet documentary/minimal briefs, sustained flashing, or pretending this is a recipe transition between clips."],
68
+ "config": {"width": 1920, "height": 1080, "fps": 30, "duration": 4, "captionSafeArea": true},
69
+ "parameters": [
70
+ {"path": "design.before", "description": "Short exact supplied outgoing state."},
71
+ {"path": "design.after", "description": "Short exact supplied incoming state."},
72
+ {"path": "design.amount", "description": "Displacement in SVG units, 0–28; no repeating flash cycle."},
73
+ {"path": "design.accent", "description": "Strip CSS color; keep background luminance stable."}
74
+ ],
75
+ "requiredImages": [],
76
+ "choreography": {"reveal": "0–0.32: outgoing state is fully readable.", "action": "0.32–0.62: one displacement envelope; state switches at 0.48.", "hold": "0.62–0.94: incoming state is stable and readable.", "exit": "0.94–1: retain incoming state for a clean cut."},
77
+ "adaptation": ["Use an actual supported recipe transition with real clip overlap for a junction between separate clips; this component is an internal handoff only.", "Never add rapid full-frame flashes or increase frequency to imply more impact.", "If retiming to speech, use measured cues rather than guessing word times."]
78
+ },
79
+ {
80
+ "id": "signal-diagram",
81
+ "version": "1",
82
+ "label": "Animated process / diagramă animată",
83
+ "category": "diagram",
84
+ "description": "Three named stages activate sequentially as a signal traverses connecting paths, followed by a complete reading hold. Diagramă de proces cu noduri și conexiuni animate independent.",
85
+ "visualMode": "2d",
86
+ "whenToUse": ["Explain a supplied three-step sequence or information flow without inventing factual values."],
87
+ "avoid": ["A process is not actually sequential, or more stages require redesigning the layout."],
88
+ "config": {"width": 1920, "height": 1080, "fps": 30, "duration": 7, "captionSafeArea": true},
89
+ "parameters": [
90
+ {"path": "design.labels", "description": "Exactly three short supplied stage names; fit each within its node."},
91
+ {"path": "design.accent", "description": "Active-node/signal CSS color."},
92
+ {"path": "design.title", "description": "Exact supplied process title, or empty string."}
93
+ ],
94
+ "requiredImages": [],
95
+ "choreography": {"reveal": "0–0.22: nodes enter with staggered scale/opacity.", "action": "0.22–0.70: links draw and a signal moves from source through processing to result.", "hold": "0.70–0.94: all nodes and links remain legible.", "exit": "0.94–1: complete state holds; use a matching next-shot line or cut."},
96
+ "adaptation": ["Use the real process and its supplied labels; the demo is not evidence of a real system.", "Move nodes/paths together when changing layout; one shared SVG coordinate system prevents drift.", "Keep an explanation scene, not a heading-only substitute; preserve node activation and path motion during repairs."]
97
+ },
98
+ {
99
+ "id": "lens-assembly-3d",
100
+ "version": "1",
101
+ "label": "Exploded lens assembly / reveal 3D",
102
+ "category": "spatial",
103
+ "description": "Genuine SceneThree schematic lens assembly: separate barrel rings and glass elements converge along an optical axis as a lit camera view settles. Reveal 3D cu geometrie, lumini și cameră reale.",
104
+ "visualMode": "3d",
105
+ "whenToUse": ["A schematic optical assembly or layered product reveal benefits from depth and independently moving parts."],
106
+ "avoid": ["Claiming the schematic is a verified physical product teardown; arbitrary unrelated subjects with unchanged lens geometry."],
107
+ "config": {"width": 1920, "height": 1080, "fps": 30, "duration": 8, "captionSafeArea": true},
108
+ "parameters": [
109
+ {"path": "design.spread", "description": "Initial extra separation along the optical axis, 0–1.5 world units."},
110
+ {"path": "design.metal", "description": "Barrel/ring Three.js color."},
111
+ {"path": "design.glass", "description": "Illustrative glass-element Three.js color."},
112
+ {"path": "design.label", "description": "Exact supplied DOM label, or empty string."}
113
+ ],
114
+ "requiredImages": [],
115
+ "choreography": {"reveal": "0–0.18: separated physical parts are framed and lit.", "action": "0.18–0.70: parts converge independently along the axis while the camera makes a short arc.", "hold": "0.70–0.94: assembled silhouette and lit glass hold in a three-quarter view.", "exit": "0.94–1: maintain the subject for a matching cut; no automatic fade."},
116
+ "adaptation": ["Use visualMode=3d and preserve actual SceneThree geometry/lights/update(frame), not CSS perspective.", "Replace the schematic geometry when the subject is not a lens; do not merely rename the title.", "Every update sets complete positions/rotations/camera from frame.progress; never accumulate deltas or start another render loop.", "Frame the object for portrait as well as landscape; keep overlays above the caption band."]
117
+ },
118
+ {
119
+ "id": "swiss-grid-motion",
120
+ "version": "1",
121
+ "label": "Swiss grid motion / grilă tipografică",
122
+ "category": "graphic",
123
+ "description": "Precision Swiss motion: independently wiped modular bars align, then a single signal tile breaks the grid. No bounce, gradients or generic title-only reveal.",
124
+ "visualMode": "2d",
125
+ "whenToUse": ["A graphic identity or design-system beat where alignment, rhythm and a single exception are the subject."],
126
+ "avoid": ["Replacing a documentary subject or requested illustration with unrelated abstract bars."],
127
+ "config": {"width": 1920, "height": 1080, "fps": 30, "duration": 7, "captionSafeArea": true},
128
+ "parameters": [
129
+ {"path": "design.title", "description": "Short supplied heading; the sample is technique-demo copy, not narration."},
130
+ {"path": "design.accent", "description": "The single signal ink color."},
131
+ {"path": "design.paper", "description": "Flat paper color; preserve contrast with black modules."},
132
+ {"path": "design.displacement", "description": "Off-grid tile travel, 0–68 SVG units."}
133
+ ],
134
+ "requiredImages": [],
135
+ "choreography": {"reveal": "0–0.44: title clip-reveal and five staggered bar wipes.", "action": "0.45–0.68: only the signal tile departs from alignment.", "hold": "0.68–0.90: complete grid/exception remains readable.", "exit": "0.90–1: bottom signal rule grows to motivate a matching cut."},
136
+ "adaptation": ["Read film-styles/swiss-motion for visual grammar; this native component does not execute upstream code.", "Replace the actual artifact/modules when the subject is not a design system; do not only rename the title.", "Retain one signal color, precise non-bouncing motion and existing separate captions."]
137
+ },
138
+ {
139
+ "id": "blueprint-mechanism",
140
+ "version": "1",
141
+ "label": "Blueprint mechanism / mecanism în mișcare",
142
+ "category": "diagram",
143
+ "description": "A cyanotype-style crank, connecting rod and slider convert rotation to translation; independent flow markers trace an outlet before a stable hold. A schematic, not measured engineering evidence.",
144
+ "visualMode": "2d",
145
+ "whenToUse": ["Explain schematic mechanical conversion or an approved supplied mechanism with adapted geometry."],
146
+ "avoid": ["Claiming verified pump dynamics, dimensions or using unchanged machinery for an unrelated topic."],
147
+ "config": {"width": 1920, "height": 1080, "fps": 30, "duration": 8, "captionSafeArea": true},
148
+ "parameters": [
149
+ {"path": "design.title", "description": "Short exact supplied mechanism heading."},
150
+ {"path": "design.accent", "description": "Warm moving-part and outlet-marker color."},
151
+ {"path": "design.crankRadius", "description": "Crank throw in SVG units, 40–68; the rod length remains 190."},
152
+ {"path": "design.turns", "description": "Complete turns before settling, 1–3; retime to measured cues."}
153
+ ],
154
+ "requiredImages": [],
155
+ "choreography": {"reveal": "0–0.30: engineering lines draw; piston and linkage appear.", "action": "0.26–0.76: crank drives the rod and piston with geometric constraints; outlet markers move separately.", "hold": "0.80–0.94: mechanism is still, complete and readable.", "exit": "0.94–1: retain the schematic for a justified cut or matching next-shot line."},
156
+ "adaptation": ["Read film-styles/blueprint; no external CAD or empirical values are bundled.", "Edit the actual linkage/path and labels for the real process; a new name is not a new subject.", "Keep all positions absolute functions of progress so backward seeks reproduce the same frame."]
157
+ },
158
+ {
159
+ "id": "paper-stage-3d",
160
+ "version": "1",
161
+ "label": "Paper stage 3D / carte care prinde volum",
162
+ "category": "spatial",
163
+ "description": "Genuine SceneThree paper-book stage: two page leaves unfold, three roof/facade panels rise on independent hinges, warm/cool lights and a camera arc settle on a visible miniature street.",
164
+ "visualMode": "3d",
165
+ "whenToUse": ["A paper architecture/pop-up scene where folding and spatial staging carry the narrative."],
166
+ "avoid": ["Pretending simple house panels are a realistic place, or substituting them for complex characters/approved artwork."],
167
+ "config": {"width": 1920, "height": 1080, "fps": 30, "duration": 8, "captionSafeArea": true},
168
+ "parameters": [
169
+ {"path": "design.paper", "description": "Matte paper/page material color."},
170
+ {"path": "design.facades", "description": "Three facade colors; preserve the page/material contrast."},
171
+ {"path": "design.spread", "description": "Initial page hinge angle, 0–0.9 radians."},
172
+ {"path": "design.label", "description": "Short supplied label, or empty to remove it."}
173
+ ],
174
+ "requiredImages": [],
175
+ "choreography": {"reveal": "0–0.24: page leaves rotate around the book spine.", "action": "0.25–0.65: three independent paper panels rise; camera arcs until 0.74.", "hold": "0.74–0.94: open book and all facades remain visible with stable lighting.", "exit": "0.94–1: retain open stage; match the next shot's paper palette or cut."},
176
+ "adaptation": ["Read film-styles/paper-popup or paper-lantern for direction; this native example is not an upstream film copy.", "Use genuine SceneThree geometry/lighting, not CSS perspective. Change the panels/artwork to explain the subject.", "Use approved image attachments for detailed illustrations instead of inventing fragile shape-stack characters; preserve no-generation choices."]
177
+ }
178
+ ]
@@ -0,0 +1,50 @@
1
+ # Reusable scene effects
2
+
3
+ This is a versioned example library, not model training, persistent conversation memory or a new rendering engine. The CURRENT client AI retrieves a relevant working component, understands its motion, adapts it to the actual subject and sends complete source to `compile_scene`. MCP does not learn from a submitted component automatically. New examples become persistent only when explicitly added to this bundled catalog and deployed.
4
+
5
+ ## Discover → retrieve → adapt → compile
6
+
7
+ Use `get_editing_reference` with these independent argument examples:
8
+
9
+ ```json
10
+ {"topic":"scene-templates","limit":3}
11
+ {"topic":"scene-templates","query":"parallax"}
12
+ {"topic":"scene-templates","id":"lens-assembly-3d"}
13
+ ```
14
+
15
+ Discovery/query pages return metadata only, with `nextOffset` for pagination. An exact `id` returns the same metadata plus the complete `component` string. Alternatively read the returned `uri` (`machinal://scene-templates/<id>`) for source only. Read `scene-runtime` for the authoritative runtime API and `scene-authoring` for submission/repair semantics. Cache unchanged entries within a workflow.
16
+
17
+ Entries describe the version, visual mode, example output configuration, source-level parameters, required image IDs, when to use/avoid the effect, choreography and adaptation rules. `parameters[].path` refers to constants inside the component's `design` object, **not tool arguments or runtime props**. Edit that source yourself. Do not invent `templateId`, `scenePreset`, inline YAML components or a server-side instantiation tool. Template IDs are not recipe effects/transitions. `config` is an example of compile_scene output settings; pass `visualMode` separately. No compiled JavaScript, project files or customer media are in the library.
18
+
19
+ 1. Choose an example for its actual action, not just its label. Keep the production contract and current brief over sample styling. It is valid to choose no template or author a new scene.
20
+ 2. Retrieve only the chosen source. Replace demo copy, palette, geometry and layout as needed; a renamed lens is not an illustration of an unrelated subject. Do not impose every effect on every video.
21
+ 3. Preserve deterministic frame-driven motion, independent moving objects, a readable central hold and caption-safe regions. Normalized progress makes the samples retimable, but narration-specific changes must use measured cues. All examples respond to width/height and `captionSafeBottom`; verify the adapted aspect and copy, not only the sample config.
22
+ 4. For image templates, obtain source-use approval for the specific files, then attach their real project filenames through compile_scene's `images` argument. Components use embedded `images.image_1`/`image_2`, never paths/URLs/base64 literals. Parallax needs an actual separate transparent foreground. A missing layer does not authorize generating one or inventing hidden geometry. Do not ship an empty image frame as a substitute for the subject.
23
+ 5. Send the full adapted component to `compile_scene` with the actual duration, dimensions/fps, visualMode, captionSafeArea and approved attachments. Reuse the existing job/idempotency workflow and returned pinned asset. No local imports of these `.svelte` files are supported in submitted scene source.
24
+ 6. Review diagnostics and preserve the intended effects when repairing. Compilation/layout checks are not aesthetic approval. Source authoring, reference lookup and compilation have no server-model fee; **server scene-frame rendering and final encoding remain billed**. No preview/render spending is implied by catalog selection.
25
+
26
+ ## Sample production contracts
27
+
28
+ Times below are fractions of scene progress, not measured narration cues. Each sample is a technique demonstration, not verified factual media.
29
+
30
+ | ID | Visible action and independent motion | Staging / hold / handoff |
31
+ | --- | --- | --- |
32
+ | `kinetic-type` | Three supplied words rise at staggered offsets; underline and edge marker travel separately. | Dark green/ivory with lime accent; readable hold from .48; underline contracts at .90 while copy remains for a cut. |
33
+ | `image-reveal` | Two opposing shutters uncover the approved image; image push and focus frame settle independently. | Image above separate label, amber line; stable hold .62–.92; leave image visible at exit. |
34
+ | `layered-parallax` | Real background/alpha foreground move at different rates; small markers follow independent paths. | Cropped background, contained foreground; settle by .72; preserve layer coverage and match the final composition to a cut. |
35
+ | `glitch-handoff` | One bounded displacement pulse changes two supplied states at .48. | Constant dark background; no rapid full-frame flashing; stable incoming copy from .62. Internal scene action, not a clip-junction transition. |
36
+ | `signal-diagram` | Three stages enter independently; links draw and a signal activates the process in sequence. | One SVG coordinate system, distinct label regions; completed process holds from .70; line can motivate next shot. |
37
+ | `lens-assembly-3d` | Real barrel rings/glass elements converge separately on the optical axis; lit camera arc settles. | Schematic metal/glass geometry, key/rim/hemisphere lights; framed portrait/landscape; assembled hold from .70. |
38
+ | `swiss-grid-motion` | Independent modular bars wipe onto a precise grid; one signal tile departs from alignment. | Flat paper/black/one ink, no bounce; completed design holds .68–.90; exit rule motivates a matching cut. |
39
+ | `blueprint-mechanism` | A rotating crank constrains a connecting rod and sliding piston; outlet markers move separately. | Cyanotype/ivory/warm accent; true geometric linkage, not asserted engineering measurements; settles by .80. |
40
+ | `paper-stage-3d` | Two book leaves unfold, three facade panels rise on separate hinges and a lit camera arc settles. | Genuine SceneThree paper stage with actual depth; hold .74–.94; not a realistic reconstruction or substitute for detailed approved artwork. |
41
+
42
+ These three native components accompany the cinematic reference library (`film-styles`/`film-techniques`). Pre-code critic: the grid is only appropriate when graphic organization is the subject; the mechanism needs actual moving linkage rather than a label; the paper stage must retain independently hinged scenery and a readable lit hold rather than one rotating box. Their reference contracts are source-reviewed, not proof of inspected pixels, sound or beauty. Adapt complete source to each production; importing style prompts does not train a model.
43
+
44
+ Focused design review: the image demos must not silently replace missing attachments with invented subjects; the parallax demo must not imply inferred 3D; the glitch is intentionally a single low-luminance displacement rather than a strobe; the 3D demo uses meaningful assembly rather than the runtime's rotating primitive. Source/contract review is not visual inspection. Automated compiler/layout/seek tests live in scene-engine; inspect actual adapted work within normal approval rules before claiming visual quality.
45
+
46
+ ## Add another example
47
+
48
+ Maintain the source of truth in `api/internal/platform/mcpserver/reference/scene-templates.json` and `reference/scene-templates/<id>.svelte`. Use a unique lowercase hyphenated ID and increment the entry's string version when changing its contract. Keep the component standalone, JavaScript Svelte 5, at most 64000 UTF-8 bytes, using only allowed runtime imports. Add selection/avoid rules, actual source-level settings, requirements and reveal/action/hold/exit directions. Do not include customer media, credentials, external loaders or generated provenance banners.
49
+
50
+ Run the MCP reference tests and scene-service template tests. Run `npm run sync:reference` in `packages/mcp-installer` to package the guide, manifest and components for OpenCode/Claude/Codex. Rebuild/restart the API and reconnect MCP to publish the new catalog. Existing customized installed skills still require their normal explicit replacement approval; updating source does not modify a running API or train its host model.