@amg555/frameforge-mcp 2.7.3 → 2.7.7

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 (565) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/AGENTS.md +33 -0
  3. package/CHANGELOG.md +49 -0
  4. package/CLAUDE.md +17 -6
  5. package/GEMINI.md +63 -0
  6. package/README.md +216 -426
  7. package/START_HERE.md +4 -2
  8. package/package.json +5 -3
  9. package/plugins/ai-video-editor/README.md +32 -0
  10. package/plugins/ai-video-editor/SKILL.md +152 -0
  11. package/plugins/ai-video-editor/assets/fonts/fonts.css +2409 -0
  12. package/plugins/ai-video-editor/assets/fonts/ttf/anton-400.ttf +0 -0
  13. package/plugins/ai-video-editor/assets/fonts/ttf/archivo-800.ttf +0 -0
  14. package/plugins/ai-video-editor/assets/fonts/ttf/cabin-sketch-700.ttf +0 -0
  15. package/plugins/ai-video-editor/assets/fonts/ttf/dm-sans-700.ttf +0 -0
  16. package/plugins/ai-video-editor/assets/fonts/ttf/fraunces-600.ttf +0 -0
  17. package/plugins/ai-video-editor/assets/fonts/ttf/fraunces-700.ttf +0 -0
  18. package/plugins/ai-video-editor/assets/fonts/ttf/fredoka-700.ttf +0 -0
  19. package/plugins/ai-video-editor/assets/fonts/ttf/inter-700.ttf +0 -0
  20. package/plugins/ai-video-editor/assets/fonts/ttf/inter-800.ttf +0 -0
  21. package/plugins/ai-video-editor/assets/fonts/ttf/inter-tight-800.ttf +0 -0
  22. package/plugins/ai-video-editor/assets/fonts/ttf/kalam-700.ttf +0 -0
  23. package/plugins/ai-video-editor/assets/fonts/ttf/noto-sans-devanagari-700.ttf +0 -0
  24. package/plugins/ai-video-editor/assets/fonts/web/noto-sans-devanagari-devanagari-400-normal.woff2 +0 -0
  25. package/plugins/ai-video-editor/assets/fonts/web/noto-sans-devanagari-devanagari-500-normal.woff2 +0 -0
  26. package/plugins/ai-video-editor/assets/fonts/web/noto-sans-devanagari-devanagari-600-normal.woff2 +0 -0
  27. package/plugins/ai-video-editor/assets/fonts/web/noto-sans-devanagari-devanagari-700-normal.woff2 +0 -0
  28. package/plugins/ai-video-editor/assets/fonts/web/noto-sans-devanagari-devanagari-800-normal.woff2 +0 -0
  29. package/plugins/ai-video-editor/engine/hidpi.js +117 -0
  30. package/plugins/ai-video-editor/engine/page.html +43 -0
  31. package/plugins/ai-video-editor/engine/player.js +145 -0
  32. package/plugins/ai-video-editor/references/example-story-warm-canvas.js +95 -0
  33. package/plugins/ai-video-editor/references/story-guide.md +112 -0
  34. package/plugins/ai-video-editor/requirements.txt +4 -0
  35. package/plugins/ai-video-editor/styles/chalk-talk/base.js +490 -0
  36. package/plugins/ai-video-editor/styles/chalk-talk/style.json +14 -0
  37. package/plugins/ai-video-editor/styles/chalk-talk/style.md +41 -0
  38. package/plugins/ai-video-editor/styles/clean-tech/base.js +447 -0
  39. package/plugins/ai-video-editor/styles/clean-tech/style.json +15 -0
  40. package/plugins/ai-video-editor/styles/clean-tech/style.md +38 -0
  41. package/plugins/ai-video-editor/styles/creator-motion-graphics/base.js +698 -0
  42. package/plugins/ai-video-editor/styles/creator-motion-graphics/style.json +16 -0
  43. package/plugins/ai-video-editor/styles/creator-motion-graphics/style.md +39 -0
  44. package/plugins/ai-video-editor/styles/data-story/base.js +432 -0
  45. package/plugins/ai-video-editor/styles/data-story/style.json +14 -0
  46. package/plugins/ai-video-editor/styles/data-story/style.md +38 -0
  47. package/plugins/ai-video-editor/styles/index.json +103 -0
  48. package/plugins/ai-video-editor/styles/pop-info/base.js +570 -0
  49. package/plugins/ai-video-editor/styles/pop-info/style.json +13 -0
  50. package/plugins/ai-video-editor/styles/pop-info/style.md +37 -0
  51. package/plugins/ai-video-editor/styles/software-walkthrough/base.js +544 -0
  52. package/plugins/ai-video-editor/styles/software-walkthrough/style.json +15 -0
  53. package/plugins/ai-video-editor/styles/software-walkthrough/style.md +38 -0
  54. package/plugins/ai-video-editor/styles/warm-canvas/base.js +610 -0
  55. package/plugins/ai-video-editor/styles/warm-canvas/style.json +14 -0
  56. package/plugins/ai-video-editor/styles/warm-canvas/style.md +37 -0
  57. package/plugins/aiinsight-shorts/CHANGELOG.md +6 -0
  58. package/plugins/aiinsight-shorts/README.md +43 -0
  59. package/plugins/aiinsight-shorts/SKILL.md +138 -0
  60. package/plugins/aiinsight-shorts/styles/deep-dive/STYLE.md +58 -0
  61. package/plugins/aiinsight-shorts/styles/deep-dive/example/data/cues.json +140 -0
  62. package/plugins/aiinsight-shorts/styles/deep-dive/example/data/lines.json +67 -0
  63. package/plugins/aiinsight-shorts/styles/deep-dive/example/data/words.json +614 -0
  64. package/plugins/aiinsight-shorts/styles/deep-dive/example/data/words.txt +102 -0
  65. package/plugins/aiinsight-shorts/styles/deep-dive/example/fonts/Inter-Black.otf +0 -0
  66. package/plugins/aiinsight-shorts/styles/deep-dive/example/fonts/Inter-ExtraBold.otf +0 -0
  67. package/plugins/aiinsight-shorts/styles/deep-dive/example/index.html +17 -0
  68. package/plugins/aiinsight-shorts/styles/deep-dive/example/script.json +27 -0
  69. package/plugins/aiinsight-shorts/styles/deep-dive/example/sheet.html +11 -0
  70. package/plugins/aiinsight-shorts/styles/deep-dive/example/src/core/board.js +62 -0
  71. package/plugins/aiinsight-shorts/styles/deep-dive/example/src/core/captions.js +68 -0
  72. package/plugins/aiinsight-shorts/styles/deep-dive/example/src/core/engine.js +65 -0
  73. package/plugins/aiinsight-shorts/styles/deep-dive/example/src/core/human.js +128 -0
  74. package/plugins/aiinsight-shorts/styles/deep-dive/example/src/core/lib.js +44 -0
  75. package/plugins/aiinsight-shorts/styles/deep-dive/example/src/core/look2d.js +33 -0
  76. package/plugins/aiinsight-shorts/styles/deep-dive/example/src/core/sdf.js +79 -0
  77. package/plugins/aiinsight-shorts/styles/deep-dive/example/src/core/sets.js +107 -0
  78. package/plugins/aiinsight-shorts/styles/deep-dive/example/src/core/timing.js +23 -0
  79. package/plugins/aiinsight-shorts/styles/deep-dive/example/src/main.js +56 -0
  80. package/plugins/aiinsight-shorts/styles/deep-dive/example/src/sheet.js +79 -0
  81. package/plugins/aiinsight-shorts/styles/deep-dive/example/src/shots.js +136 -0
  82. package/plugins/aiinsight-shorts/styles/deep-dive/example/tools/capture.mjs +122 -0
  83. package/plugins/aiinsight-shorts/styles/deep-dive/example/tools/mix.py +172 -0
  84. package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/LICENSE-three.txt +21 -0
  85. package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/environments/RoomEnvironment.js +144 -0
  86. package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/postprocessing/BokehPass.js +141 -0
  87. package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/postprocessing/EffectComposer.js +231 -0
  88. package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/postprocessing/MaskPass.js +104 -0
  89. package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/postprocessing/OutputPass.js +97 -0
  90. package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/postprocessing/Pass.js +95 -0
  91. package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/postprocessing/RenderPass.js +99 -0
  92. package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/postprocessing/ShaderPass.js +77 -0
  93. package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/postprocessing/UnrealBloomPass.js +415 -0
  94. package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/shaders/BokehShader.js +145 -0
  95. package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/shaders/CopyShader.js +45 -0
  96. package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/shaders/LuminosityHighPassShader.js +64 -0
  97. package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/shaders/OutputShader.js +85 -0
  98. package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/three.module.js +6 -0
  99. package/plugins/aiinsight-shorts/styles/deep-dive/style-sheet.png +0 -0
  100. package/plugins/aiinsight-shorts/styles/inside-out/STYLE.md +97 -0
  101. package/plugins/aiinsight-shorts/styles/inside-out/example/data/cues.json +178 -0
  102. package/plugins/aiinsight-shorts/styles/inside-out/example/data/lines.json +73 -0
  103. package/plugins/aiinsight-shorts/styles/inside-out/example/data/words.json +662 -0
  104. package/plugins/aiinsight-shorts/styles/inside-out/example/fonts/Inter-Black.otf +0 -0
  105. package/plugins/aiinsight-shorts/styles/inside-out/example/index.html +17 -0
  106. package/plugins/aiinsight-shorts/styles/inside-out/example/script.json +26 -0
  107. package/plugins/aiinsight-shorts/styles/inside-out/example/src/core/captions.js +68 -0
  108. package/plugins/aiinsight-shorts/styles/inside-out/example/src/core/kit.js +345 -0
  109. package/plugins/aiinsight-shorts/styles/inside-out/example/src/core/lib.js +44 -0
  110. package/plugins/aiinsight-shorts/styles/inside-out/example/src/core/timing.js +23 -0
  111. package/plugins/aiinsight-shorts/styles/inside-out/example/src/main.js +62 -0
  112. package/plugins/aiinsight-shorts/styles/inside-out/example/src/shots.js +195 -0
  113. package/plugins/aiinsight-shorts/styles/inside-out/example/tools/capture.mjs +122 -0
  114. package/plugins/aiinsight-shorts/styles/inside-out/example/tools/mix.py +172 -0
  115. package/plugins/aiinsight-shorts/styles/inside-out/style-sheet.png +0 -0
  116. package/plugins/aiinsight-shorts/styles/night-file/STYLE.md +36 -0
  117. package/plugins/aiinsight-shorts/styles/night-file/example/data/cues.json +146 -0
  118. package/plugins/aiinsight-shorts/styles/night-file/example/data/lines.json +73 -0
  119. package/plugins/aiinsight-shorts/styles/night-file/example/data/words.json +572 -0
  120. package/plugins/aiinsight-shorts/styles/night-file/example/data/words.txt +95 -0
  121. package/plugins/aiinsight-shorts/styles/night-file/example/fonts/FreeMonoBold.ttf +0 -0
  122. package/plugins/aiinsight-shorts/styles/night-file/example/fonts/Inter-Black.otf +0 -0
  123. package/plugins/aiinsight-shorts/styles/night-file/example/index.html +18 -0
  124. package/plugins/aiinsight-shorts/styles/night-file/example/script.json +26 -0
  125. package/plugins/aiinsight-shorts/styles/night-file/example/sheet.html +13 -0
  126. package/plugins/aiinsight-shorts/styles/night-file/example/src/core/board.js +62 -0
  127. package/plugins/aiinsight-shorts/styles/night-file/example/src/core/captions.js +49 -0
  128. package/plugins/aiinsight-shorts/styles/night-file/example/src/core/engine.js +65 -0
  129. package/plugins/aiinsight-shorts/styles/night-file/example/src/core/human.js +128 -0
  130. package/plugins/aiinsight-shorts/styles/night-file/example/src/core/kit.js +151 -0
  131. package/plugins/aiinsight-shorts/styles/night-file/example/src/core/lib.js +44 -0
  132. package/plugins/aiinsight-shorts/styles/night-file/example/src/core/sdf.js +79 -0
  133. package/plugins/aiinsight-shorts/styles/night-file/example/src/core/sets3d.js +106 -0
  134. package/plugins/aiinsight-shorts/styles/night-file/example/src/core/timing.js +23 -0
  135. package/plugins/aiinsight-shorts/styles/night-file/example/src/main.js +56 -0
  136. package/plugins/aiinsight-shorts/styles/night-file/example/src/sheet.js +86 -0
  137. package/plugins/aiinsight-shorts/styles/night-file/example/src/shots.js +130 -0
  138. package/plugins/aiinsight-shorts/styles/night-file/example/tools/capture.mjs +122 -0
  139. package/plugins/aiinsight-shorts/styles/night-file/example/tools/mix.py +172 -0
  140. package/plugins/aiinsight-shorts/styles/night-file/example/vendor/LICENSE-three.txt +21 -0
  141. package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/environments/RoomEnvironment.js +144 -0
  142. package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/postprocessing/BokehPass.js +141 -0
  143. package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/postprocessing/EffectComposer.js +231 -0
  144. package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/postprocessing/MaskPass.js +104 -0
  145. package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/postprocessing/OutputPass.js +97 -0
  146. package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/postprocessing/Pass.js +95 -0
  147. package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/postprocessing/RenderPass.js +99 -0
  148. package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/postprocessing/ShaderPass.js +77 -0
  149. package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/postprocessing/UnrealBloomPass.js +415 -0
  150. package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/shaders/BokehShader.js +145 -0
  151. package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/shaders/CopyShader.js +45 -0
  152. package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/shaders/LuminosityHighPassShader.js +64 -0
  153. package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/shaders/OutputShader.js +85 -0
  154. package/plugins/aiinsight-shorts/styles/night-file/example/vendor/three.module.js +6 -0
  155. package/plugins/aiinsight-shorts/styles/night-file/style-sheet.png +0 -0
  156. package/plugins/aiinsight-shorts/styles/paper-atlas/STYLE.md +30 -0
  157. package/plugins/aiinsight-shorts/styles/paper-atlas/example/data/cues.json +167 -0
  158. package/plugins/aiinsight-shorts/styles/paper-atlas/example/data/lines.json +67 -0
  159. package/plugins/aiinsight-shorts/styles/paper-atlas/example/data/words.json +614 -0
  160. package/plugins/aiinsight-shorts/styles/paper-atlas/example/data/words.txt +102 -0
  161. package/plugins/aiinsight-shorts/styles/paper-atlas/example/fonts/Caladea-Bold.ttf +0 -0
  162. package/plugins/aiinsight-shorts/styles/paper-atlas/example/fonts/Inter-Black.otf +0 -0
  163. package/plugins/aiinsight-shorts/styles/paper-atlas/example/index.html +15 -0
  164. package/plugins/aiinsight-shorts/styles/paper-atlas/example/script.json +26 -0
  165. package/plugins/aiinsight-shorts/styles/paper-atlas/example/sheet.html +12 -0
  166. package/plugins/aiinsight-shorts/styles/paper-atlas/example/src/core/board.js +62 -0
  167. package/plugins/aiinsight-shorts/styles/paper-atlas/example/src/core/captions.js +47 -0
  168. package/plugins/aiinsight-shorts/styles/paper-atlas/example/src/core/kit.js +152 -0
  169. package/plugins/aiinsight-shorts/styles/paper-atlas/example/src/core/lib.js +44 -0
  170. package/plugins/aiinsight-shorts/styles/paper-atlas/example/src/core/timing.js +23 -0
  171. package/plugins/aiinsight-shorts/styles/paper-atlas/example/src/main.js +62 -0
  172. package/plugins/aiinsight-shorts/styles/paper-atlas/example/src/sheet.js +61 -0
  173. package/plugins/aiinsight-shorts/styles/paper-atlas/example/src/shots.js +139 -0
  174. package/plugins/aiinsight-shorts/styles/paper-atlas/example/tools/capture.mjs +122 -0
  175. package/plugins/aiinsight-shorts/styles/paper-atlas/example/tools/mix.py +172 -0
  176. package/plugins/aiinsight-shorts/styles/paper-atlas/style-sheet.png +0 -0
  177. package/plugins/aiinsight-shorts/styles/stick-story/STYLE.md +32 -0
  178. package/plugins/aiinsight-shorts/styles/stick-story/example/data/cues.json +182 -0
  179. package/plugins/aiinsight-shorts/styles/stick-story/example/data/lines.json +79 -0
  180. package/plugins/aiinsight-shorts/styles/stick-story/example/data/words.json +662 -0
  181. package/plugins/aiinsight-shorts/styles/stick-story/example/data/words.txt +110 -0
  182. package/plugins/aiinsight-shorts/styles/stick-story/example/fonts/Inter-Black.otf +0 -0
  183. package/plugins/aiinsight-shorts/styles/stick-story/example/fonts/Inter-ExtraBold.otf +0 -0
  184. package/plugins/aiinsight-shorts/styles/stick-story/example/index.html +13 -0
  185. package/plugins/aiinsight-shorts/styles/stick-story/example/script.json +27 -0
  186. package/plugins/aiinsight-shorts/styles/stick-story/example/sheet.html +10 -0
  187. package/plugins/aiinsight-shorts/styles/stick-story/example/src/core/board.js +62 -0
  188. package/plugins/aiinsight-shorts/styles/stick-story/example/src/core/captions.js +47 -0
  189. package/plugins/aiinsight-shorts/styles/stick-story/example/src/core/kit.js +166 -0
  190. package/plugins/aiinsight-shorts/styles/stick-story/example/src/core/lib.js +44 -0
  191. package/plugins/aiinsight-shorts/styles/stick-story/example/src/core/timing.js +23 -0
  192. package/plugins/aiinsight-shorts/styles/stick-story/example/src/main.js +62 -0
  193. package/plugins/aiinsight-shorts/styles/stick-story/example/src/sheet.js +64 -0
  194. package/plugins/aiinsight-shorts/styles/stick-story/example/src/shots.js +148 -0
  195. package/plugins/aiinsight-shorts/styles/stick-story/example/tools/capture.mjs +122 -0
  196. package/plugins/aiinsight-shorts/styles/stick-story/example/tools/mix.py +172 -0
  197. package/plugins/aiinsight-shorts/styles/stick-story/style-sheet.png +0 -0
  198. package/plugins/aiinsight-shorts/styles/tall-tale/STYLE.md +51 -0
  199. package/plugins/aiinsight-shorts/styles/tall-tale/example/data/cues.json +271 -0
  200. package/plugins/aiinsight-shorts/styles/tall-tale/example/data/lines.json +127 -0
  201. package/plugins/aiinsight-shorts/styles/tall-tale/example/data/words.json +908 -0
  202. package/plugins/aiinsight-shorts/styles/tall-tale/example/data/words.txt +151 -0
  203. package/plugins/aiinsight-shorts/styles/tall-tale/example/fonts/Caladea-Bold.ttf +0 -0
  204. package/plugins/aiinsight-shorts/styles/tall-tale/example/fonts/Inter-Black.otf +0 -0
  205. package/plugins/aiinsight-shorts/styles/tall-tale/example/fonts/Inter-ExtraBold.otf +0 -0
  206. package/plugins/aiinsight-shorts/styles/tall-tale/example/index.html +19 -0
  207. package/plugins/aiinsight-shorts/styles/tall-tale/example/script.json +37 -0
  208. package/plugins/aiinsight-shorts/styles/tall-tale/example/sheet.html +13 -0
  209. package/plugins/aiinsight-shorts/styles/tall-tale/example/src/core/board.js +62 -0
  210. package/plugins/aiinsight-shorts/styles/tall-tale/example/src/core/captions.js +56 -0
  211. package/plugins/aiinsight-shorts/styles/tall-tale/example/src/core/engine.js +65 -0
  212. package/plugins/aiinsight-shorts/styles/tall-tale/example/src/core/lib.js +44 -0
  213. package/plugins/aiinsight-shorts/styles/tall-tale/example/src/core/props.js +166 -0
  214. package/plugins/aiinsight-shorts/styles/tall-tale/example/src/core/timing.js +23 -0
  215. package/plugins/aiinsight-shorts/styles/tall-tale/example/src/core/toon.js +352 -0
  216. package/plugins/aiinsight-shorts/styles/tall-tale/example/src/core/world.js +340 -0
  217. package/plugins/aiinsight-shorts/styles/tall-tale/example/src/main.js +56 -0
  218. package/plugins/aiinsight-shorts/styles/tall-tale/example/src/sheet.js +99 -0
  219. package/plugins/aiinsight-shorts/styles/tall-tale/example/src/shots.js +377 -0
  220. package/plugins/aiinsight-shorts/styles/tall-tale/example/tools/capture.mjs +122 -0
  221. package/plugins/aiinsight-shorts/styles/tall-tale/example/tools/mix.py +204 -0
  222. package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/LICENSE-three.txt +21 -0
  223. package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/environments/RoomEnvironment.js +144 -0
  224. package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/postprocessing/BokehPass.js +141 -0
  225. package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/postprocessing/EffectComposer.js +231 -0
  226. package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/postprocessing/MaskPass.js +104 -0
  227. package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/postprocessing/OutputPass.js +97 -0
  228. package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/postprocessing/Pass.js +95 -0
  229. package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/postprocessing/RenderPass.js +99 -0
  230. package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/postprocessing/ShaderPass.js +77 -0
  231. package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/postprocessing/UnrealBloomPass.js +415 -0
  232. package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/shaders/BokehShader.js +145 -0
  233. package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/shaders/CopyShader.js +45 -0
  234. package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/shaders/LuminosityHighPassShader.js +64 -0
  235. package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/shaders/OutputShader.js +85 -0
  236. package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/three.module.js +6 -0
  237. package/plugins/aiinsight-shorts/styles/tall-tale/style-sheet.png +0 -0
  238. package/plugins/faceless-shorts/README.md +34 -0
  239. package/plugins/faceless-shorts/SKILL.md +124 -0
  240. package/plugins/faceless-shorts/styles/deep-dive/STYLE.md +58 -0
  241. package/plugins/faceless-shorts/styles/deep-dive/example/data/cues.json +140 -0
  242. package/plugins/faceless-shorts/styles/deep-dive/example/data/lines.json +67 -0
  243. package/plugins/faceless-shorts/styles/deep-dive/example/data/words.json +614 -0
  244. package/plugins/faceless-shorts/styles/deep-dive/example/data/words.txt +102 -0
  245. package/plugins/faceless-shorts/styles/deep-dive/example/fonts/Inter-Black.otf +0 -0
  246. package/plugins/faceless-shorts/styles/deep-dive/example/fonts/Inter-ExtraBold.otf +0 -0
  247. package/plugins/faceless-shorts/styles/deep-dive/example/index.html +16 -0
  248. package/plugins/faceless-shorts/styles/deep-dive/example/script.json +27 -0
  249. package/plugins/faceless-shorts/styles/deep-dive/example/sheet.html +10 -0
  250. package/plugins/faceless-shorts/styles/deep-dive/example/src/core/board.js +62 -0
  251. package/plugins/faceless-shorts/styles/deep-dive/example/src/core/captions.js +68 -0
  252. package/plugins/faceless-shorts/styles/deep-dive/example/src/core/engine.js +65 -0
  253. package/plugins/faceless-shorts/styles/deep-dive/example/src/core/human.js +128 -0
  254. package/plugins/faceless-shorts/styles/deep-dive/example/src/core/lib.js +44 -0
  255. package/plugins/faceless-shorts/styles/deep-dive/example/src/core/look2d.js +33 -0
  256. package/plugins/faceless-shorts/styles/deep-dive/example/src/core/sdf.js +79 -0
  257. package/plugins/faceless-shorts/styles/deep-dive/example/src/core/sets.js +107 -0
  258. package/plugins/faceless-shorts/styles/deep-dive/example/src/core/timing.js +23 -0
  259. package/plugins/faceless-shorts/styles/deep-dive/example/src/main.js +56 -0
  260. package/plugins/faceless-shorts/styles/deep-dive/example/src/sheet.js +79 -0
  261. package/plugins/faceless-shorts/styles/deep-dive/example/src/shots.js +136 -0
  262. package/plugins/faceless-shorts/styles/deep-dive/example/tools/capture.mjs +122 -0
  263. package/plugins/faceless-shorts/styles/deep-dive/example/tools/mix.py +172 -0
  264. package/plugins/faceless-shorts/styles/deep-dive/example/vendor/LICENSE-three.txt +21 -0
  265. package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/environments/RoomEnvironment.js +144 -0
  266. package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/BokehPass.js +141 -0
  267. package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/EffectComposer.js +231 -0
  268. package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/MaskPass.js +104 -0
  269. package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/OutputPass.js +97 -0
  270. package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/Pass.js +95 -0
  271. package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/RenderPass.js +99 -0
  272. package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/ShaderPass.js +77 -0
  273. package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/UnrealBloomPass.js +415 -0
  274. package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/shaders/BokehShader.js +145 -0
  275. package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/shaders/CopyShader.js +45 -0
  276. package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/shaders/LuminosityHighPassShader.js +64 -0
  277. package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/shaders/OutputShader.js +85 -0
  278. package/plugins/faceless-shorts/styles/deep-dive/example/vendor/three.module.js +6 -0
  279. package/plugins/faceless-shorts/styles/deep-dive/style-sheet.png +0 -0
  280. package/plugins/faceless-shorts/styles/inside-out/STYLE.md +97 -0
  281. package/plugins/faceless-shorts/styles/inside-out/example/data/cues.json +178 -0
  282. package/plugins/faceless-shorts/styles/inside-out/example/data/lines.json +73 -0
  283. package/plugins/faceless-shorts/styles/inside-out/example/data/words.json +662 -0
  284. package/plugins/faceless-shorts/styles/inside-out/example/fonts/Inter-Black.otf +0 -0
  285. package/plugins/faceless-shorts/styles/inside-out/example/index.html +16 -0
  286. package/plugins/faceless-shorts/styles/inside-out/example/script.json +26 -0
  287. package/plugins/faceless-shorts/styles/inside-out/example/src/core/captions.js +68 -0
  288. package/plugins/faceless-shorts/styles/inside-out/example/src/core/kit.js +345 -0
  289. package/plugins/faceless-shorts/styles/inside-out/example/src/core/lib.js +44 -0
  290. package/plugins/faceless-shorts/styles/inside-out/example/src/core/timing.js +23 -0
  291. package/plugins/faceless-shorts/styles/inside-out/example/src/main.js +62 -0
  292. package/plugins/faceless-shorts/styles/inside-out/example/src/shots.js +195 -0
  293. package/plugins/faceless-shorts/styles/inside-out/example/tools/capture.mjs +122 -0
  294. package/plugins/faceless-shorts/styles/inside-out/example/tools/mix.py +172 -0
  295. package/plugins/faceless-shorts/styles/inside-out/style-sheet.png +0 -0
  296. package/plugins/faceless-shorts/styles/night-file/STYLE.md +36 -0
  297. package/plugins/faceless-shorts/styles/night-file/example/data/cues.json +146 -0
  298. package/plugins/faceless-shorts/styles/night-file/example/data/lines.json +73 -0
  299. package/plugins/faceless-shorts/styles/night-file/example/data/words.json +572 -0
  300. package/plugins/faceless-shorts/styles/night-file/example/data/words.txt +95 -0
  301. package/plugins/faceless-shorts/styles/night-file/example/fonts/FreeMonoBold.ttf +0 -0
  302. package/plugins/faceless-shorts/styles/night-file/example/fonts/Inter-Black.otf +0 -0
  303. package/plugins/faceless-shorts/styles/night-file/example/index.html +16 -0
  304. package/plugins/faceless-shorts/styles/night-file/example/script.json +26 -0
  305. package/plugins/faceless-shorts/styles/night-file/example/sheet.html +11 -0
  306. package/plugins/faceless-shorts/styles/night-file/example/src/core/board.js +62 -0
  307. package/plugins/faceless-shorts/styles/night-file/example/src/core/captions.js +49 -0
  308. package/plugins/faceless-shorts/styles/night-file/example/src/core/engine.js +65 -0
  309. package/plugins/faceless-shorts/styles/night-file/example/src/core/human.js +128 -0
  310. package/plugins/faceless-shorts/styles/night-file/example/src/core/kit.js +151 -0
  311. package/plugins/faceless-shorts/styles/night-file/example/src/core/lib.js +44 -0
  312. package/plugins/faceless-shorts/styles/night-file/example/src/core/sdf.js +79 -0
  313. package/plugins/faceless-shorts/styles/night-file/example/src/core/sets3d.js +106 -0
  314. package/plugins/faceless-shorts/styles/night-file/example/src/core/timing.js +23 -0
  315. package/plugins/faceless-shorts/styles/night-file/example/src/main.js +56 -0
  316. package/plugins/faceless-shorts/styles/night-file/example/src/sheet.js +86 -0
  317. package/plugins/faceless-shorts/styles/night-file/example/src/shots.js +130 -0
  318. package/plugins/faceless-shorts/styles/night-file/example/tools/capture.mjs +122 -0
  319. package/plugins/faceless-shorts/styles/night-file/example/tools/mix.py +172 -0
  320. package/plugins/faceless-shorts/styles/night-file/example/vendor/LICENSE-three.txt +21 -0
  321. package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/environments/RoomEnvironment.js +144 -0
  322. package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/BokehPass.js +141 -0
  323. package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/EffectComposer.js +231 -0
  324. package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/MaskPass.js +104 -0
  325. package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/OutputPass.js +97 -0
  326. package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/Pass.js +95 -0
  327. package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/RenderPass.js +99 -0
  328. package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/ShaderPass.js +77 -0
  329. package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/UnrealBloomPass.js +415 -0
  330. package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/shaders/BokehShader.js +145 -0
  331. package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/shaders/CopyShader.js +45 -0
  332. package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/shaders/LuminosityHighPassShader.js +64 -0
  333. package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/shaders/OutputShader.js +85 -0
  334. package/plugins/faceless-shorts/styles/night-file/example/vendor/three.module.js +6 -0
  335. package/plugins/faceless-shorts/styles/night-file/style-sheet.png +0 -0
  336. package/plugins/faceless-shorts/styles/paper-atlas/STYLE.md +30 -0
  337. package/plugins/faceless-shorts/styles/paper-atlas/example/data/cues.json +167 -0
  338. package/plugins/faceless-shorts/styles/paper-atlas/example/data/lines.json +67 -0
  339. package/plugins/faceless-shorts/styles/paper-atlas/example/data/words.json +614 -0
  340. package/plugins/faceless-shorts/styles/paper-atlas/example/data/words.txt +102 -0
  341. package/plugins/faceless-shorts/styles/paper-atlas/example/fonts/Caladea-Bold.ttf +0 -0
  342. package/plugins/faceless-shorts/styles/paper-atlas/example/fonts/Inter-Black.otf +0 -0
  343. package/plugins/faceless-shorts/styles/paper-atlas/example/index.html +13 -0
  344. package/plugins/faceless-shorts/styles/paper-atlas/example/script.json +26 -0
  345. package/plugins/faceless-shorts/styles/paper-atlas/example/sheet.html +10 -0
  346. package/plugins/faceless-shorts/styles/paper-atlas/example/src/core/board.js +62 -0
  347. package/plugins/faceless-shorts/styles/paper-atlas/example/src/core/captions.js +47 -0
  348. package/plugins/faceless-shorts/styles/paper-atlas/example/src/core/kit.js +152 -0
  349. package/plugins/faceless-shorts/styles/paper-atlas/example/src/core/lib.js +44 -0
  350. package/plugins/faceless-shorts/styles/paper-atlas/example/src/core/timing.js +23 -0
  351. package/plugins/faceless-shorts/styles/paper-atlas/example/src/main.js +62 -0
  352. package/plugins/faceless-shorts/styles/paper-atlas/example/src/sheet.js +61 -0
  353. package/plugins/faceless-shorts/styles/paper-atlas/example/src/shots.js +139 -0
  354. package/plugins/faceless-shorts/styles/paper-atlas/example/tools/capture.mjs +122 -0
  355. package/plugins/faceless-shorts/styles/paper-atlas/example/tools/mix.py +172 -0
  356. package/plugins/faceless-shorts/styles/paper-atlas/style-sheet.png +0 -0
  357. package/plugins/faceless-shorts/styles/stick-story/STYLE.md +32 -0
  358. package/plugins/faceless-shorts/styles/stick-story/example/data/cues.json +182 -0
  359. package/plugins/faceless-shorts/styles/stick-story/example/data/lines.json +79 -0
  360. package/plugins/faceless-shorts/styles/stick-story/example/data/words.json +662 -0
  361. package/plugins/faceless-shorts/styles/stick-story/example/data/words.txt +110 -0
  362. package/plugins/faceless-shorts/styles/stick-story/example/fonts/Inter-Black.otf +0 -0
  363. package/plugins/faceless-shorts/styles/stick-story/example/fonts/Inter-ExtraBold.otf +0 -0
  364. package/plugins/faceless-shorts/styles/stick-story/example/index.html +12 -0
  365. package/plugins/faceless-shorts/styles/stick-story/example/script.json +27 -0
  366. package/plugins/faceless-shorts/styles/stick-story/example/sheet.html +9 -0
  367. package/plugins/faceless-shorts/styles/stick-story/example/src/core/board.js +62 -0
  368. package/plugins/faceless-shorts/styles/stick-story/example/src/core/captions.js +47 -0
  369. package/plugins/faceless-shorts/styles/stick-story/example/src/core/kit.js +166 -0
  370. package/plugins/faceless-shorts/styles/stick-story/example/src/core/lib.js +44 -0
  371. package/plugins/faceless-shorts/styles/stick-story/example/src/core/timing.js +23 -0
  372. package/plugins/faceless-shorts/styles/stick-story/example/src/main.js +62 -0
  373. package/plugins/faceless-shorts/styles/stick-story/example/src/sheet.js +64 -0
  374. package/plugins/faceless-shorts/styles/stick-story/example/src/shots.js +148 -0
  375. package/plugins/faceless-shorts/styles/stick-story/example/tools/capture.mjs +122 -0
  376. package/plugins/faceless-shorts/styles/stick-story/example/tools/mix.py +172 -0
  377. package/plugins/faceless-shorts/styles/stick-story/style-sheet.png +0 -0
  378. package/plugins/faceless-shorts/styles/tall-tale/STYLE.md +51 -0
  379. package/plugins/faceless-shorts/styles/tall-tale/example/data/cues.json +271 -0
  380. package/plugins/faceless-shorts/styles/tall-tale/example/data/lines.json +127 -0
  381. package/plugins/faceless-shorts/styles/tall-tale/example/data/words.json +908 -0
  382. package/plugins/faceless-shorts/styles/tall-tale/example/data/words.txt +151 -0
  383. package/plugins/faceless-shorts/styles/tall-tale/example/fonts/Caladea-Bold.ttf +0 -0
  384. package/plugins/faceless-shorts/styles/tall-tale/example/fonts/Inter-Black.otf +0 -0
  385. package/plugins/faceless-shorts/styles/tall-tale/example/fonts/Inter-ExtraBold.otf +0 -0
  386. package/plugins/faceless-shorts/styles/tall-tale/example/index.html +17 -0
  387. package/plugins/faceless-shorts/styles/tall-tale/example/script.json +37 -0
  388. package/plugins/faceless-shorts/styles/tall-tale/example/sheet.html +11 -0
  389. package/plugins/faceless-shorts/styles/tall-tale/example/src/core/board.js +62 -0
  390. package/plugins/faceless-shorts/styles/tall-tale/example/src/core/captions.js +56 -0
  391. package/plugins/faceless-shorts/styles/tall-tale/example/src/core/engine.js +65 -0
  392. package/plugins/faceless-shorts/styles/tall-tale/example/src/core/lib.js +44 -0
  393. package/plugins/faceless-shorts/styles/tall-tale/example/src/core/props.js +166 -0
  394. package/plugins/faceless-shorts/styles/tall-tale/example/src/core/timing.js +23 -0
  395. package/plugins/faceless-shorts/styles/tall-tale/example/src/core/toon.js +352 -0
  396. package/plugins/faceless-shorts/styles/tall-tale/example/src/core/world.js +340 -0
  397. package/plugins/faceless-shorts/styles/tall-tale/example/src/main.js +56 -0
  398. package/plugins/faceless-shorts/styles/tall-tale/example/src/sheet.js +99 -0
  399. package/plugins/faceless-shorts/styles/tall-tale/example/src/shots.js +377 -0
  400. package/plugins/faceless-shorts/styles/tall-tale/example/tools/capture.mjs +122 -0
  401. package/plugins/faceless-shorts/styles/tall-tale/example/tools/mix.py +204 -0
  402. package/plugins/faceless-shorts/styles/tall-tale/example/vendor/LICENSE-three.txt +21 -0
  403. package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/environments/RoomEnvironment.js +144 -0
  404. package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/BokehPass.js +141 -0
  405. package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/EffectComposer.js +231 -0
  406. package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/MaskPass.js +104 -0
  407. package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/OutputPass.js +97 -0
  408. package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/Pass.js +95 -0
  409. package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/RenderPass.js +99 -0
  410. package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/ShaderPass.js +77 -0
  411. package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/UnrealBloomPass.js +415 -0
  412. package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/shaders/BokehShader.js +145 -0
  413. package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/shaders/CopyShader.js +45 -0
  414. package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/shaders/LuminosityHighPassShader.js +64 -0
  415. package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/shaders/OutputShader.js +85 -0
  416. package/plugins/faceless-shorts/styles/tall-tale/example/vendor/three.module.js +6 -0
  417. package/plugins/faceless-shorts/styles/tall-tale/style-sheet.png +0 -0
  418. package/plugins/motion-styles/LIBRARY.md +896 -0
  419. package/plugins/motion-styles/README.md +29 -0
  420. package/plugins/motion-styles/SKILL.md +70 -0
  421. package/plugins/motion-styles/catalog.json +2253 -0
  422. package/plugins/motion-styles/prompts/bio-glow.md +149 -0
  423. package/plugins/motion-styles/prompts/blueprint.md +145 -0
  424. package/plugins/motion-styles/prompts/breaking-desk.md +147 -0
  425. package/plugins/motion-styles/prompts/callout-kit.md +147 -0
  426. package/plugins/motion-styles/prompts/chalk-talk.md +153 -0
  427. package/plugins/motion-styles/prompts/chat-story.md +143 -0
  428. package/plugins/motion-styles/prompts/clay-diorama.md +149 -0
  429. package/plugins/motion-styles/prompts/clean-tech.md +147 -0
  430. package/plugins/motion-styles/prompts/comic-panels.md +145 -0
  431. package/plugins/motion-styles/prompts/cosmic-scale.md +147 -0
  432. package/plugins/motion-styles/prompts/creator-motion.md +149 -0
  433. package/plugins/motion-styles/prompts/data-city.md +149 -0
  434. package/plugins/motion-styles/prompts/data-story.md +147 -0
  435. package/plugins/motion-styles/prompts/deep-layers.md +147 -0
  436. package/plugins/motion-styles/prompts/doc-cinema.md +145 -0
  437. package/plugins/motion-styles/prompts/evidence-board.md +145 -0
  438. package/plugins/motion-styles/prompts/exploded-view.md +149 -0
  439. package/plugins/motion-styles/prompts/glass-icons.md +147 -0
  440. package/plugins/motion-styles/prompts/glitch-pack.md +145 -0
  441. package/plugins/motion-styles/prompts/globe-arcs.md +147 -0
  442. package/plugins/motion-styles/prompts/headline-backdrop.md +145 -0
  443. package/plugins/motion-styles/prompts/iso-cutaway.md +147 -0
  444. package/plugins/motion-styles/prompts/isotype.md +145 -0
  445. package/plugins/motion-styles/prompts/karaoke-subs.md +145 -0
  446. package/plugins/motion-styles/prompts/low-poly-atlas.md +149 -0
  447. package/plugins/motion-styles/prompts/lower-thirds.md +147 -0
  448. package/plugins/motion-styles/prompts/marker-board.md +145 -0
  449. package/plugins/motion-styles/prompts/market-tape.md +145 -0
  450. package/plugins/motion-styles/prompts/math-canvas.md +145 -0
  451. package/plugins/motion-styles/prompts/myth-or-fact.md +145 -0
  452. package/plugins/motion-styles/prompts/neon-line.md +145 -0
  453. package/plugins/motion-styles/prompts/paper-craft.md +145 -0
  454. package/plugins/motion-styles/prompts/parchment-map.md +147 -0
  455. package/plugins/motion-styles/prompts/physics-toybox.md +147 -0
  456. package/plugins/motion-styles/prompts/pixel-quest.md +145 -0
  457. package/plugins/motion-styles/prompts/podcast-clip.md +147 -0
  458. package/plugins/motion-styles/prompts/pop-info.md +145 -0
  459. package/plugins/motion-styles/prompts/product-turntable.md +149 -0
  460. package/plugins/motion-styles/prompts/punch-captions.md +145 -0
  461. package/plugins/motion-styles/prompts/quiz-countdown.md +145 -0
  462. package/plugins/motion-styles/prompts/quote-cinema.md +145 -0
  463. package/plugins/motion-styles/prompts/recipe-steps.md +145 -0
  464. package/plugins/motion-styles/prompts/rubber-hose-reel.md +145 -0
  465. package/plugins/motion-styles/prompts/shadow-puppets.md +145 -0
  466. package/plugins/motion-styles/prompts/size-lineup.md +149 -0
  467. package/plugins/motion-styles/prompts/software-walkthrough.md +147 -0
  468. package/plugins/motion-styles/prompts/stack-split.md +145 -0
  469. package/plugins/motion-styles/prompts/sticker-pop.md +145 -0
  470. package/plugins/motion-styles/prompts/storybook.md +145 -0
  471. package/plugins/motion-styles/prompts/swiss-grid.md +145 -0
  472. package/plugins/motion-styles/prompts/synth-grid.md +147 -0
  473. package/plugins/motion-styles/prompts/tactics-board.md +145 -0
  474. package/plugins/motion-styles/prompts/terminal.md +145 -0
  475. package/plugins/motion-styles/prompts/tier-list.md +143 -0
  476. package/plugins/motion-styles/prompts/timeline-rail.md +145 -0
  477. package/plugins/motion-styles/prompts/top-5-countdown.md +145 -0
  478. package/plugins/motion-styles/prompts/versus-split.md +145 -0
  479. package/plugins/motion-styles/prompts/vhs-camcorder.md +145 -0
  480. package/plugins/motion-styles/prompts/visual-novel.md +145 -0
  481. package/plugins/motion-styles/prompts/warm-canvas.md +145 -0
  482. package/plugins/motion-styles/prompts/woodcut-tale.md +145 -0
  483. package/plugins/motion-styles/prompts/zine-collage.md +145 -0
  484. package/plugins/motion-styles/sources/bio-glow.html +639 -0
  485. package/plugins/motion-styles/sources/blueprint.html +617 -0
  486. package/plugins/motion-styles/sources/breaking-desk.html +585 -0
  487. package/plugins/motion-styles/sources/callout-kit.html +586 -0
  488. package/plugins/motion-styles/sources/chalk-talk.html +597 -0
  489. package/plugins/motion-styles/sources/chat-story.html +597 -0
  490. package/plugins/motion-styles/sources/clay-diorama.html +681 -0
  491. package/plugins/motion-styles/sources/clean-tech.html +554 -0
  492. package/plugins/motion-styles/sources/comic-panels.html +608 -0
  493. package/plugins/motion-styles/sources/cosmic-scale.html +628 -0
  494. package/plugins/motion-styles/sources/creator-motion.html +805 -0
  495. package/plugins/motion-styles/sources/data-city.html +613 -0
  496. package/plugins/motion-styles/sources/data-story.html +539 -0
  497. package/plugins/motion-styles/sources/deep-layers.html +624 -0
  498. package/plugins/motion-styles/sources/doc-cinema.html +590 -0
  499. package/plugins/motion-styles/sources/evidence-board.html +610 -0
  500. package/plugins/motion-styles/sources/exploded-view.html +618 -0
  501. package/plugins/motion-styles/sources/glass-icons.html +612 -0
  502. package/plugins/motion-styles/sources/glitch-pack.html +583 -0
  503. package/plugins/motion-styles/sources/globe-arcs.html +621 -0
  504. package/plugins/motion-styles/sources/headline-backdrop.html +584 -0
  505. package/plugins/motion-styles/sources/iso-cutaway.html +621 -0
  506. package/plugins/motion-styles/sources/isotype.html +588 -0
  507. package/plugins/motion-styles/sources/karaoke-subs.html +577 -0
  508. package/plugins/motion-styles/sources/low-poly-atlas.html +621 -0
  509. package/plugins/motion-styles/sources/lower-thirds.html +582 -0
  510. package/plugins/motion-styles/sources/marker-board.html +598 -0
  511. package/plugins/motion-styles/sources/market-tape.html +598 -0
  512. package/plugins/motion-styles/sources/math-canvas.html +592 -0
  513. package/plugins/motion-styles/sources/myth-or-fact.html +587 -0
  514. package/plugins/motion-styles/sources/neon-line.html +597 -0
  515. package/plugins/motion-styles/sources/paper-craft.html +612 -0
  516. package/plugins/motion-styles/sources/parchment-map.html +624 -0
  517. package/plugins/motion-styles/sources/physics-toybox.html +617 -0
  518. package/plugins/motion-styles/sources/pixel-quest.html +609 -0
  519. package/plugins/motion-styles/sources/podcast-clip.html +585 -0
  520. package/plugins/motion-styles/sources/pop-info.html +677 -0
  521. package/plugins/motion-styles/sources/product-turntable.html +611 -0
  522. package/plugins/motion-styles/sources/punch-captions.html +583 -0
  523. package/plugins/motion-styles/sources/quiz-countdown.html +593 -0
  524. package/plugins/motion-styles/sources/quote-cinema.html +581 -0
  525. package/plugins/motion-styles/sources/recipe-steps.html +599 -0
  526. package/plugins/motion-styles/sources/rubber-hose-reel.html +627 -0
  527. package/plugins/motion-styles/sources/shadow-puppets.html +609 -0
  528. package/plugins/motion-styles/sources/size-lineup.html +620 -0
  529. package/plugins/motion-styles/sources/software-walkthrough.html +651 -0
  530. package/plugins/motion-styles/sources/stack-split.html +588 -0
  531. package/plugins/motion-styles/sources/sticker-pop.html +587 -0
  532. package/plugins/motion-styles/sources/storybook.html +600 -0
  533. package/plugins/motion-styles/sources/swiss-grid.html +590 -0
  534. package/plugins/motion-styles/sources/synth-grid.html +614 -0
  535. package/plugins/motion-styles/sources/tactics-board.html +608 -0
  536. package/plugins/motion-styles/sources/terminal.html +593 -0
  537. package/plugins/motion-styles/sources/tier-list.html +600 -0
  538. package/plugins/motion-styles/sources/timeline-rail.html +598 -0
  539. package/plugins/motion-styles/sources/top-5-countdown.html +589 -0
  540. package/plugins/motion-styles/sources/versus-split.html +592 -0
  541. package/plugins/motion-styles/sources/vhs-camcorder.html +587 -0
  542. package/plugins/motion-styles/sources/visual-novel.html +623 -0
  543. package/plugins/motion-styles/sources/warm-canvas.html +742 -0
  544. package/plugins/motion-styles/sources/woodcut-tale.html +598 -0
  545. package/plugins/motion-styles/sources/zine-collage.html +594 -0
  546. package/plugins/video-pipeline/.claude-plugin/plugin.json +2 -2
  547. package/plugins/video-pipeline/skills/.upstream-skills.json +156 -143
  548. package/plugins/video-pipeline/skills/video-pipeline/references/mcp-tools.md +3 -3
  549. package/scripts/deep-validate.js +3 -2
  550. package/src/audio-mixer/mixer.js +69 -0
  551. package/src/cli/make.js +19 -0
  552. package/src/harness/lib/browser.mjs +22 -1
  553. package/src/harness/lib/capture.mjs +33 -11
  554. package/src/harness/lib/jobs.mjs +16 -1
  555. package/src/mcp-server/server.js +726 -10
  556. package/src/pipeline/providers.js +77 -17
  557. package/src/skills/sync-upstream.js +15 -3
  558. package/src/utils/media-downloader.js +7 -0
  559. package/src/utils/tool-installer.js +212 -0
  560. package/src/utils/transcribe.js +9 -1
  561. package/src/video-renderer/renderer.js +68 -38
  562. package/src/video-renderer/scene-animator.js +50 -15
  563. package/src/workflows/assets.js +49 -5
  564. package/src/workflows/render.js +2 -0
  565. package/src/workflows/script.js +14 -3
@@ -0,0 +1,107 @@
1
+ // Deep Dive sets: each returns { scene, update(t) } built around the origin; people stand on y = 0, facing +z.
2
+ import * as THREE from 'three';
3
+ import { rbox, ellipsoid, capsule, smin, sphere, mesh, rgb, noise3 } from './sdf.js';
4
+ import { lightRig } from './engine.js';
5
+
6
+ const std = (color, rough = 0.7, extra = {}) => new THREE.MeshStandardMaterial({ color, roughness: rough, ...extra });
7
+ function canvasTex(w, h, draw, rep = [1, 1]) { const c = document.createElement('canvas'); c.width = w; c.height = h; draw(c.getContext('2d'), w, h); const t = new THREE.CanvasTexture(c); t.colorSpace = THREE.SRGBColorSpace; t.wrapS = t.wrapT = THREE.RepeatWrapping; t.repeat.set(...rep); t.anisotropy = 8; return t; }
8
+ const shadowed = (m) => { m.castShadow = true; m.receiveShadow = true; return m; };
9
+ function sdfMesh(f, b, step, mat) { return shadowed(new THREE.Mesh(mesh(f, b, step), mat)); }
10
+
11
+ // ═════════════════════════ KITCHEN (warm low sun through a window) ═════════════════════════
12
+ export function kitchen(E) {
13
+ const scene = new THREE.Scene(); scene.environment = E.envMap; scene.environmentIntensity = 0.3;
14
+ scene.background = new THREE.Color('#E8DCCB'); scene.fog = new THREE.Fog('#E8DCCB', 8, 20);
15
+ const planks = canvasTex(1024, 1024, (g, w, h) => { for (let i = 0; i < 8; i++) { const l = 150 + (i * 37) % 30; g.fillStyle = `rgb(${l + 20},${l - 18},${l - 60})`; g.fillRect(0, i * h / 8, w, h / 8); g.fillStyle = 'rgba(60,35,15,0.35)'; g.fillRect(0, i * h / 8, w, 3); for (let k = 0; k < 40; k++) { g.fillStyle = 'rgba(80,50,25,0.08)'; g.fillRect(Math.random() * w, i * h / 8 + Math.random() * h / 8, 120 + Math.random() * 200, 2); } } }, [6, 6]);
16
+ const floor = new THREE.Mesh(new THREE.PlaneGeometry(14, 14), std('#ffffff', 0.55, { map: planks })); floor.rotation.x = -Math.PI / 2; floor.receiveShadow = true; scene.add(floor);
17
+ const wallM = std('#EFE3D0', 0.9), back = shadowed(new THREE.Mesh(new THREE.BoxGeometry(14, 4, 0.2), wallM)); back.position.set(0, 2, -2.2); scene.add(back);
18
+ const side = shadowed(new THREE.Mesh(new THREE.BoxGeometry(0.2, 4, 8), wallM)); side.position.set(-3, 2, 1.5); scene.add(side);
19
+ // window in the back wall: bright sky panel + frame
20
+ const sky = new THREE.Mesh(new THREE.PlaneGeometry(1.6, 1.3), new THREE.MeshBasicMaterial({ color: new THREE.Color('#DDEEFF').multiplyScalar(1.6) })); sky.position.set(1.3, 2.05, -2.09); scene.add(sky);
21
+ const frM = std('#FFFFFF', 0.4); for (const [w, h, x, y] of [[1.75, 0.08, 1.3, 2.74], [1.75, 0.08, 1.3, 1.36], [0.08, 1.4, 0.42, 2.05], [0.08, 1.4, 2.18, 2.05], [0.05, 1.3, 1.3, 2.05]]) { const b = shadowed(new THREE.Mesh(new THREE.BoxGeometry(w, h, 0.12), frM)); b.position.set(x, y, -2.05); scene.add(b); }
22
+ // counter run with rounded doors, worktop, sink, kettle, plant
23
+ const cab = std('#5F8F7E', 0.55), top = new THREE.MeshPhysicalMaterial({ color: '#F2EEE6', roughness: 0.25, clearcoat: 0.6 });
24
+ const run = sdfMesh((p) => rbox(p, [0, 0.45, 0], [1.6, 0.45, 0.32], 0.03), [[-1.7, -0.02, -0.4], [1.7, 0.94, 0.4]], 0.02, cab); run.position.set(0.2, 0, -1.75); scene.add(run);
25
+ for (let i = 0; i < 5; i++) { const d = shadowed(new THREE.Mesh(new THREE.BoxGeometry(0.58, 0.7, 0.02), std('#6FA08E', 0.5))); d.position.set(-1.05 + i * 0.63, 0.47, -1.42); scene.add(d); const k = new THREE.Mesh(new THREE.SphereGeometry(0.018, 12, 8), std('#E2C27A', 0.3, { metalness: 0.8 })); k.position.set(-0.83 + i * 0.63, 0.72, -1.4); scene.add(k); }
26
+ const wt = shadowed(new THREE.Mesh(new THREE.BoxGeometry(3.4, 0.05, 0.72), top)); wt.position.set(0.2, 0.93, -1.75); scene.add(wt);
27
+ const kettle = sdfMesh((p) => smin(ellipsoid(p, [0, 0.12, 0], [0.11, 0.12, 0.11]), capsule(p, [0.09, 0.12, 0], [0.17, 0.2, 0], 0.018), 0.03), [[-0.15, -0.02, -0.15], [0.22, 0.28, 0.15]], 0.008, new THREE.MeshPhysicalMaterial({ color: '#D9534F', roughness: 0.3, clearcoat: 1 })); kettle.position.set(-0.9, 0.95, -1.7); scene.add(kettle);
28
+ const pot = sdfMesh((p) => capsule(p, [0, 0, 0], [0, 0.16, 0], 0.09, 0.11), [[-0.13, -0.1, -0.13], [0.13, 0.28, 0.13]], 0.01, std('#C8734A', 0.6)); pot.position.set(1.5, 1.04, -1.7); scene.add(pot);
29
+ for (let i = 0; i < 9; i++) { const l = shadowed(new THREE.Mesh(new THREE.SphereGeometry(0.07, 16, 12), std('#5E9A50', 0.6))); l.scale.set(0.6, 1.6, 0.4); l.position.set(1.5 + Math.sin(i * 2.4) * 0.08, 1.33 + (i % 3) * 0.04, -1.7 + Math.cos(i * 2.4) * 0.08); l.rotation.z = Math.sin(i * 2.4) * 0.7; scene.add(l); }
30
+ const L = lightRig(scene, { key: '#FFD9AE', keyI: 4.2, keyPos: [2.6, 3.2, -4], target: [0.3, 0.8, 0], rimCol: '#CFE0FF', rimI: 1.2, hemiI: 0.75, shadowBox: 3.2 });
31
+ const fill = new THREE.DirectionalLight('#FFF1E2', 1.1); fill.position.set(-1, 2.5, 4); scene.add(fill);
32
+ return { scene, lights: L, update() {} };
33
+ }
34
+
35
+ // ═════════════════════════ X-RAY STAGE ═════════════════════════
36
+ /** glass x-ray body material: cyan fresnel edges, transparent middle */
37
+ export function xrayMaterial(color = '#4FD1E8', strength = 1) {
38
+ return new THREE.ShaderMaterial({
39
+ uniforms: { uCol: { value: new THREE.Color(color) }, uS: { value: strength } }, transparent: true, depthWrite: false, blending: THREE.AdditiveBlending,
40
+ vertexShader: 'varying vec3 vN; varying vec3 vV; void main(){ vec4 mv = modelViewMatrix * vec4(position, 1.0); vN = normalize(normalMatrix * normal); vV = normalize(-mv.xyz); gl_Position = projectionMatrix * mv; }',
41
+ fragmentShader: 'uniform vec3 uCol; uniform float uS; varying vec3 vN; varying vec3 vV; void main(){ float f = pow(1.0 - abs(dot(normalize(vN), normalize(vV))), 2.2); gl_FragColor = vec4(uCol * (0.06 + f * 1.6) * uS, 1.0); }',
42
+ });
43
+ }
44
+ export function xrayStage(E) {
45
+ const scene = new THREE.Scene();
46
+ scene.background = canvasTex(64, 512, (g, w, h) => { const gr = g.createLinearGradient(0, 0, 0, h); gr.addColorStop(0, '#0B1A30'); gr.addColorStop(1, '#03070F'); g.fillStyle = gr; g.fillRect(0, 0, w, h); });
47
+ scene.add(new THREE.HemisphereLight('#9FD9FF', '#05080F', 0.6));
48
+ const k = new THREE.DirectionalLight('#DDF4FF', 2.2); k.position.set(2, 3, 3); scene.add(k);
49
+ const grid = new THREE.GridHelper(20, 40, '#1F6F88', '#123A4A'); grid.material.transparent = true; grid.material.opacity = 0.35; scene.add(grid);
50
+ return { scene, update() {} };
51
+ }
52
+ /** bones + organs to put inside a Human's torso (add to human.spine). Returns { group, stomach, heart } */
53
+ export function insides() {
54
+ const g = new THREE.Group();
55
+ const bone = new THREE.MeshStandardMaterial({ color: '#E6F7FF', emissive: '#7FDDF2', emissiveIntensity: 0.28, roughness: 0.4 });
56
+ const spineGeo = new THREE.CylinderGeometry(0.018, 0.02, 0.03, 16);
57
+ for (let i = 0; i < 17; i++) { const v = new THREE.Mesh(spineGeo, bone); v.position.set(0, -0.05 + i * 0.034, -0.085 + Math.sin(i / 16 * Math.PI) * 0.015); g.add(v); }
58
+ for (let i = 0; i < 9; i++) { const r = 0.12 + Math.sin(Math.min(1, i / 4) * 1.4) * 0.05 - (i > 5 ? (i - 5) * 0.012 : 0); const rib = new THREE.Mesh(new THREE.TorusGeometry(r, 0.0085, 8, 48, Math.PI * 1.55), bone); rib.rotation.set(Math.PI / 2 + 0.3, 0, Math.PI * 0.725); rib.scale.set(1.2, 0.85, 1); rib.position.set(0, 0.47 - i * 0.04, -0.02); g.add(rib); }
59
+ const sternum = new THREE.Mesh(new THREE.CapsuleGeometry(0.014, 0.18, 6, 12), bone); sternum.position.set(0, 0.33, 0.1); g.add(sternum);
60
+ for (const s of [-1, 1]) { const cl = new THREE.Mesh(new THREE.CapsuleGeometry(0.011, 0.14, 6, 12), bone); cl.rotation.z = Math.PI / 2 + s * 0.15; cl.position.set(s * 0.09, 0.47, 0.06); g.add(cl); }
61
+ const pelvis = new THREE.Mesh(new THREE.TorusGeometry(0.11, 0.02, 10, 40, Math.PI), bone); pelvis.rotation.x = Math.PI / 2 + 0.6; pelvis.position.set(0, -0.06, 0); g.add(pelvis);
62
+ const organ = (col) => new THREE.MeshPhysicalMaterial({ color: col, roughness: 0.35, clearcoat: 0.8, clearcoatRoughness: 0.3, emissive: col, emissiveIntensity: 0.18 });
63
+ const stomach = new THREE.Mesh(mesh((p) => { let d = capsule(p, [-0.02, 0.1, 0], [-0.07, 0.02, 0.01], 0.045, 0.06); d = smin(d, capsule(p, [-0.07, 0.02, 0.01], [0.03, -0.03, 0.02], 0.06, 0.045), 0.04); d = smin(d, capsule(p, [0.03, -0.03, 0.02], [0.07, 0.02, 0.02], 0.045, 0.028), 0.03); return smin(d, capsule(p, [-0.02, 0.1, 0], [-0.01, 0.2, -0.02], 0.016), 0.02); }, [[-0.15, -0.11, -0.09], [0.13, 0.24, 0.1]], 0.005), organ('#E87A8C'));
64
+ stomach.position.set(0.03, 0.14, 0.02); g.add(stomach);
65
+ const heart = new THREE.Mesh(mesh((p) => smin(smin(sphere(p, [-0.018, 0.02, 0], 0.035), sphere(p, [0.018, 0.02, 0], 0.035), 0.02), ellipsoid(p, [0, -0.02, 0], [0.04, 0.05, 0.035]), 0.03), [[-0.07, -0.08, -0.06], [0.07, 0.07, 0.06]], 0.004), organ('#D62839'));
66
+ heart.position.set(0.025, 0.36, 0.03); heart.rotation.z = -0.4; g.add(heart);
67
+ const lungs = [];
68
+ for (const s of [-1, 1]) { const lung = new THREE.Mesh(mesh((p) => ellipsoid(p, [0, 0, 0], [0.06, 0.11, 0.07]), [[-0.08, -0.13, -0.09], [0.08, 0.13, 0.09]], 0.008), new THREE.MeshPhysicalMaterial({ color: '#F2A3AE', roughness: 0.6, transparent: true, opacity: 0.45, emissive: '#F2A3AE', emissiveIntensity: 0.1 })); lung.position.set(s * 0.085, 0.36, 0); g.add(lung); lungs.push(lung); }
69
+ g.position.y = 0.04; return { group: g, stomach, heart, lungs };
70
+ }
71
+
72
+ // ═════════════════════════ BLOOD VESSEL (macro) ═════════════════════════
73
+ export function vessel(E) {
74
+ const scene = new THREE.Scene(); scene.background = new THREE.Color('#2A0508'); scene.fog = new THREE.FogExp2('#3A070C', 0.11);
75
+ const tubeGeo = new THREE.CylinderGeometry(1.6, 1.6, 40, 96, 200, true); const pos = tubeGeo.attributes.position;
76
+ for (let i = 0; i < pos.count; i++) { const x = pos.getX(i), y = pos.getY(i), z = pos.getZ(i), a = Math.atan2(z, x), n = 1 + 0.08 * noise3(Math.cos(a) * 3, y * 0.6, Math.sin(a) * 3) + 0.03 * Math.sin(y * 3 + a * 5); pos.setXYZ(i, x * n, y, z * n); }
77
+ tubeGeo.computeVertexNormals();
78
+ const wall = new THREE.Mesh(tubeGeo, new THREE.MeshPhysicalMaterial({ color: '#B8283A', roughness: 0.35, clearcoat: 1, side: THREE.BackSide, emissive: '#5A0A14', emissiveIntensity: 0.5 }));
79
+ wall.rotation.x = Math.PI / 2; scene.add(wall);
80
+ const prof = []; for (let i = 0; i <= 24; i++) { const r = i / 24 * 0.32; const t = r / 0.32; prof.push(new THREE.Vector2(r, 0.05 * (0.35 + 0.65 * Math.sqrt(1 - t * t)) * (0.6 + 0.8 * t * t))); }
81
+ const half = new THREE.LatheGeometry(prof, 48), cellGeo = half.clone(); { const p2 = half.clone(); p2.scale(1, -1, 1); }
82
+ const rbc = new THREE.MeshPhysicalMaterial({ color: '#D8243A', roughness: 0.3, clearcoat: 1, clearcoatRoughness: 0.2, emissive: '#5C0610', emissiveIntensity: 0.4, side: THREE.DoubleSide, sheen: 0.6, sheenColor: new THREE.Color('#ff8090') });
83
+ const N = 46, inst = new THREE.InstancedMesh(cellGeo, rbc, N * 2), seeds = [];
84
+ for (let i = 0; i < N; i++) seeds.push([Math.random() * Math.PI * 2, 0.55 + Math.random() * 0.75, Math.random() * 26, Math.random() * 6, Math.random() * 6]);
85
+ scene.add(inst);
86
+ const NB = 60, bub = new THREE.InstancedMesh(new THREE.SphereGeometry(0.07, 20, 14), new THREE.MeshPhysicalMaterial({ color: '#CFE3EA', roughness: 0.1, transparent: true, opacity: 0.55, emissive: '#7FA6B4', emissiveIntensity: 0.35 }), NB); bub.count = 0; scene.add(bub);
87
+ const bseeds = []; for (let i = 0; i < NB; i++) bseeds.push([Math.random() * Math.PI * 2, 0.3 + Math.random() * 1.0, Math.random() * 24, 0.4 + Math.random() * 1.2]);
88
+ const RED = new THREE.Color('#D8243A'), DARK = new THREE.Color('#5E0E1C');
89
+ const l1 = new THREE.PointLight('#FFB0A0', 60, 14, 1.4); scene.add(l1); scene.add(new THREE.HemisphereLight('#FF6B6B', '#300308', 0.9));
90
+ const m = new THREE.Matrix4(), q = new THREE.Quaternion(), e = new THREE.Euler(), v = new THREE.Vector3(), sc = new THREE.Vector3(0.5, 0.5, 0.5);
91
+ return {
92
+ scene, light: l1,
93
+ /** co2 0..1 fills the vessel with grey CO2 bubbles; dark 0..1 turns the cells from bright to dark red (less oxygen) */
94
+ update(t, camZ = 0, co2 = 0, dark = 0) {
95
+ rbc.color.copy(RED).lerp(DARK, dark);
96
+ bub.count = Math.floor(NB * co2);
97
+ for (let i = 0; i < bub.count; i++) { const [a, r, z0, sz] = bseeds[i]; v.set(Math.cos(a + t * 0.2) * r, Math.sin(a + t * 0.2) * r + Math.sin(t * 2 + i) * 0.05, camZ - 1.5 - ((z0 + t * 1.8) % 24)); q.identity(); sc.setScalar(sz); m.compose(v, q, sc); bub.setMatrixAt(i, m); }
98
+ bub.instanceMatrix.needsUpdate = true; sc.setScalar(0.5);
99
+ l1.position.set(0.2, 0.3, camZ - 3.5);
100
+ seeds.forEach(([a, r, z0, rx, ry], i) => {
101
+ const z = camZ - 2.2 - ((z0 + t * 2.2) % 26); e.set(rx + t * 0.6, ry + t * 0.4, 0); q.setFromEuler(e); v.set(Math.cos(a + t * 0.1) * r, Math.sin(a + t * 0.1) * r, z);
102
+ m.compose(v, q, sc); inst.setMatrixAt(i * 2, m); e.set(rx + t * 0.6 + Math.PI, ry + t * 0.4, 0); q.setFromEuler(e); m.compose(v, q, sc); inst.setMatrixAt(i * 2 + 1, m);
103
+ });
104
+ inst.instanceMatrix.needsUpdate = true;
105
+ },
106
+ };
107
+ }
@@ -0,0 +1,23 @@
1
+ // Timing: everything on screen is placed on the narration's clock.
2
+ // data/lines.json { duration, lines: [{ i, text, start, end }] } (voice.py, or estimate.py for captions-only)
3
+ // data/words.json [{ w, line, s, e }] (words.py, or estimate.py)
4
+ // L(i) = line i start · Le(i) = line i end · Wd(word, line) = start of the first word in that line matching
5
+ // the prefix (case/punctuation ignored; throws if it isn't there, so a rewritten script can't silently drift).
6
+ export const T = { dur: 0, lines: [], words: [] };
7
+ const norm = (w) => String(w).toLowerCase().replace(/[^a-z0-9']+/g, '');
8
+
9
+ export async function loadTiming() {
10
+ const get = async (f) => { const r = await fetch(f, { cache: 'no-store' }); if (!r.ok) throw new Error(`missing ${f}: run voice.py + words.py (or estimate.py)`); return r.json(); };
11
+ const lines = await get('data/lines.json'), words = await get('data/words.json');
12
+ T.lines = lines.lines; T.words = words; T.dur = lines.duration;
13
+ return T;
14
+ }
15
+ export const L = (i) => { const l = T.lines[i]; if (!l) throw new Error(`no line ${i}`); return l.start; };
16
+ export const Le = (i) => { const l = T.lines[i]; if (!l) throw new Error(`no line ${i}`); return l.end; };
17
+ export function Wd(word, line, which = 's') {
18
+ const n = norm(word);
19
+ const hit = T.words.find((w) => (line == null || w.line === line) && norm(w.w).startsWith(n));
20
+ if (!hit) throw new Error(`word "${word}" not found${line != null ? ` in line ${line}` : ''}`);
21
+ return hit[which];
22
+ }
23
+ export const lineWords = (i) => T.words.filter((w) => w.line === i);
@@ -0,0 +1,56 @@
1
+ // Boot: fonts → script + timing → 3D engine + sets → captions → shots. draw(t) renders film time t (pure function of t):
2
+ // the shot renders its 3D frame into the hidden WebGL canvas, which is copied onto the 2D canvas, then the 2D layer
3
+ // (labels, counters) and the captions go on top. window.OP is the API tools/capture.mjs drives.
4
+ import { W, H, setCtx, ctx, clamp } from './core/lib.js';
5
+ import { T, loadTiming } from './core/timing.js';
6
+ import { buildCaptions, drawCaption, captionList } from './core/captions.js';
7
+ import { makeEngine, RES, AA } from './core/engine.js';
8
+ import { buildShots } from './shots.js';
9
+
10
+ const cv = document.getElementById('cv'), GL = document.getElementById('gl');
11
+ setCtx(cv.getContext('2d'));
12
+ const OP = (window.OP = { ready: false });
13
+
14
+ function draw(t) {
15
+ t = clamp(t, 0, T.dur - 1e-4);
16
+ ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.globalAlpha = 1; ctx.letterSpacing = '0px';
17
+ const S = OP._shots; let i = S.length - 1; while (i > 0 && S[i].at > t) i--;
18
+ const sh = S[i], end = i < S.length - 1 ? S[i + 1].at : T.dur, d = end - sh.at, lt = t - sh.at;
19
+ const blit = () => ctx.drawImage(GL, 0, 0, W, H);
20
+ ctx.save(); sh.draw(lt, d, t, blit); ctx.restore();
21
+ ctx.globalAlpha = 1; ctx.letterSpacing = '0px';
22
+ const fade = Math.min(clamp(t / 0.25), clamp((T.dur - t) / 0.4));
23
+ if (fade < 1) { ctx.fillStyle = '#000'; ctx.globalAlpha = 1 - fade; ctx.fillRect(0, 0, W, H); ctx.globalAlpha = 1; }
24
+ drawCaption(t);
25
+ }
26
+
27
+ (async () => {
28
+ try {
29
+ await document.fonts.load('900 100px Inter'); await document.fonts.load('800 100px Inter');
30
+ const script = await (await fetch('script.json', { cache: 'no-store' })).json();
31
+ await loadTiming();
32
+ buildCaptions(script);
33
+ GL.width = Math.round(1080 * RES); GL.height = Math.round(1920 * RES);
34
+ const E = makeEngine(GL, { w: GL.width, h: GL.height, samples: AA });
35
+ const { shots, cues } = buildShots(E);
36
+ shots.sort((a, b) => a.at - b.at);
37
+ OP._shots = shots; OP.script = script;
38
+ OP.duration = () => T.dur;
39
+ OP.draw = draw;
40
+ OP.frame = (t, q = 0.92) => { draw(t); return cv.toDataURL('image/jpeg', q); };
41
+ OP.shots = () => shots.map((s, i) => ({ id: s.id, at: +s.at.toFixed(3), end: +(i < shots.length - 1 ? shots[i + 1].at : T.dur).toFixed(3), note: s.note || '' }));
42
+ OP.captions = () => captionList().map((c) => ({ s: +c.s.toFixed(3), e: +c.e.toFixed(3), text: c.words.map((w) => (w.hi ? '*' : '') + w.txt).join(' ') }));
43
+ OP.cues = () => cues.slice().sort((a, b) => a.t - b.t);
44
+ OP.ready = true;
45
+ const q = new URLSearchParams(location.search);
46
+ if (!q.has('capture')) {
47
+ if (q.has('t')) draw(+q.get('t'));
48
+ else {
49
+ const audio = new Audio('data/mix.wav'); let t0 = null; const btn = document.getElementById('play'); btn.hidden = false;
50
+ btn.onclick = () => { btn.hidden = true; t0 = performance.now(); audio.currentTime = 0; audio.play().catch(() => {}); };
51
+ const loop = (now) => { const t = t0 == null ? 0 : (now - t0) / 1000; draw(t); if (t0 != null && t > T.dur) { t0 = null; btn.hidden = false; } requestAnimationFrame(loop); };
52
+ requestAnimationFrame(loop);
53
+ }
54
+ }
55
+ } catch (e) { OP.bootError = String(e && e.stack || e); console.error(e); }
56
+ })();
@@ -0,0 +1,79 @@
1
+ // The Deep Dive style sheet: every picture is a real render from the style's 3D engine.
2
+ import * as THREE from 'three';
3
+ import { ctx } from './core/lib.js';
4
+ import { startBoard, panel, frame, small, swatches, rules } from './core/board.js';
5
+ import { makeEngine, camera, lightRig } from './core/engine.js';
6
+ import { Human } from './core/human.js';
7
+ import * as SETS from './core/sets.js';
8
+ import { caption, label } from './core/look2d.js';
9
+
10
+ await document.fonts.load('900 40px Inter'); await document.fonts.load('800 40px Inter');
11
+ const E = makeEngine(document.getElementById('gl')), E2 = makeEngine(document.getElementById('gl2'), { w: 1280, h: 860 });
12
+ const GL = document.getElementById('gl'), GL2 = document.getElementById('gl2');
13
+ const cam = camera(30);
14
+ const B = startBoard(document.getElementById('cv'), { title: 'DEEP DIVE 3D: VIDEO STYLE SHEET', bg: '#14161B', line: '#3B4150', head: '#F4F1EA', accent: '#FFD43B' });
15
+ const shot = (x, y, w, renderFn, over) => frame(x, y, w, () => { renderFn(); ctx.drawImage(GL, 0, 0); if (over) over(); });
16
+ const wide = (box, renderFn, over) => { renderFn(); B.save(); B.beginPath(); B.roundRect(box.x, box.y, box.w, box.h, 12); B.clip(); B.drawImage(GL2, box.x, box.y, box.w, box.h); B.restore(); if (over) over(); };
17
+
18
+ // sets reused across panels
19
+ const K = SETS.kitchen(E), hero = new Human({}); K.scene.add(hero.group);
20
+
21
+ // 1 · hero frame
22
+ let b = panel(20, 80, 560, 520, 1, 'HERO FRAME');
23
+ shot(b.x + 6, b.y, 240, () => {
24
+ hero.group.position.set(0.1, 0, -0.6); hero.pose({ head: [10, 14, -4], spine: [6, 8, 0], shR: [28, 0, -6], elR: 78, shL: [20, 0, -4], elL: 60, look: [-10, 8], lid: -0.4 });
25
+ cam.position.set(0.95, 1.42, 1.9); cam.lookAt(0.1, 1.22, -0.6); E.render(K.scene, cam, { focus: 2.35, aperture: 0.004, maxblur: 0.01, bloom: 0.2 });
26
+ }, () => { caption([{ txt: 'What' }, { txt: 'if' }, { txt: 'you' }], 540, 1500); caption([{ txt: 'swallowed' }, { txt: 'gum?', hi: 1 }], 540, 1640); });
27
+ small('STYLIZED 3D PEOPLE\nIN SUNLIT SETS', b.x + 270, b.y + 40, 'left', 17);
28
+ small('X-RAY CUTAWAYS\nINTO THE BODY', b.x + 270, b.y + 130, 'left', 17);
29
+ small('MACRO JOURNEYS\nTHROUGH CELLS', b.x + 270, b.y + 220, 'left', 17);
30
+ small('SHALLOW FOCUS,\nWARM LOW SUN', b.x + 270, b.y + 310, 'left', 17);
31
+
32
+ // 2 · palette + cast
33
+ b = panel(590, 80, 660, 520, 2, 'PALETTE & CAST');
34
+ const yy = swatches(b, [['SUN', '#FFD9AE'], ['SKIN', '#E3A988'], ['SHIRT', '#3E7CC9'], ['CREAM', '#E8DCCB'], ['X-RAY', '#4FD1E8'], ['ORGAN', '#E87A8C'], ['BLOOD', '#B8283A'], ['NIGHT', '#0B1A30']]);
35
+ const castScene = new THREE.Scene(); castScene.background = new THREE.Color('#E8DCCB'); castScene.environment = E2.envMap; castScene.environmentIntensity = 0.3;
36
+ { const f = new THREE.Mesh(new THREE.PlaneGeometry(30, 30), new THREE.MeshStandardMaterial({ color: '#DCCDB8', roughness: 0.9 })); f.rotation.x = -Math.PI / 2; f.receiveShadow = true; castScene.add(f); lightRig(castScene, { keyPos: [2, 4, 4], shadowBox: 3 }); }
37
+ [[{}, -0.75, { head: [0, 15, 0], shR: [10, 0, 30], elR: 40 }], [{ skin: '#B97A56', shirt: '#E07A3F', pants: '#4A4F5C', hair: '#16100C', iris: '#2A1C12' }, 0, { head: [5, -5, 0], shL: [80, 0, 20], elL: 70 }], [{ skin: '#F0C3A2', shirt: '#6DAA6A', pants: '#3D3A5C', hair: '#C98C3E', iris: '#4E7A94' }, 0.75, { head: [-4, -18, 0], shR: [0, 0, 18] }]]
38
+ .forEach(([look, x, pose]) => { const h = new Human(look); h.group.position.x = x; h.group.rotation.y = -x * 0.35; h.pose(pose); castScene.add(h.group); });
39
+ const c2 = new THREE.PerspectiveCamera(26, 1280 / 860, 0.05, 100); c2.position.set(0, 1.25, 4.6); c2.lookAt(0, 0.95, 0);
40
+ wide({ x: b.x, y: yy + 6, w: b.w, h: 262 }, () => E2.render(castScene, c2, { aperture: 0, bloom: 0.15 }));
41
+ small('ONE BODY, MANY LOOKS: SKIN, HAIR, CLOTHES SWAP PER VIDEO', b.x + b.w / 2, yy + 300, 'center', 14, '#C9CDD6');
42
+
43
+ // 3 · components
44
+ b = panel(1260, 80, 640, 520, 3, 'COMPONENTS');
45
+ {
46
+ const s = new THREE.Scene(); s.background = new THREE.Color('#0B1A30'); s.add(new THREE.HemisphereLight('#CFEFFF', '#0A1020', 1.2)); const k = new THREE.DirectionalLight('#FFFFFF', 2.5); k.position.set(2, 3, 4); s.add(k); s.environment = E2.envMap; s.environmentIntensity = 0.5;
47
+ const I = SETS.insides(); const st = I.stomach.clone(); st.position.set(-0.1, 0.02, 0); st.scale.setScalar(1.5); st.rotation.set(0.2, -0.4, 0); s.add(st);
48
+ const ht = I.heart.clone(); ht.position.set(0.2, 0.02, 0); ht.scale.setScalar(1.9); s.add(ht);
49
+ const V = SETS.vessel(E2); const cell = V.scene.children.find((o) => o.isInstancedMesh);
50
+ const rb = new THREE.Mesh(cell.geometry, cell.material); rb.position.set(0.46, 0.02, 0); rb.rotation.set(1.1, 0.3, 0); rb.scale.setScalar(0.27); s.add(rb); const rb2 = rb.clone(); rb2.rotation.x += Math.PI; s.add(rb2);
51
+ const xr = new Human({}); xr.setBodyMaterial(SETS.xrayMaterial()); const ins = SETS.insides(); xr.spine.add(ins.group); xr.group.scale.setScalar(0.48); xr.group.position.set(-0.42, -0.62, 0); xr.pose({}); s.add(xr.group);
52
+ const cc = new THREE.PerspectiveCamera(30, 1280 / 860, 0.05, 50); cc.position.set(0, 0.0, 1.55); cc.lookAt(0, 0.0, 0);
53
+ wide({ x: b.x, y: b.y, w: b.w, h: b.h - 8 }, () => E2.render(s, cc, { aperture: 0, bloom: 0.5, bloomThreshold: 0.4 }), () => {
54
+ [['X-RAY BODY', 0.15], ['STOMACH', 0.41], ['HEART', 0.64], ['BLOOD CELL', 0.87]].forEach(([t, fx]) => small(t, b.x + b.w * fx, b.y + b.h - 30, 'center', 15, '#CFEFFF'));
55
+ });
56
+ }
57
+
58
+ // 4 · scenes
59
+ b = panel(20, 610, 760, 456, 4, 'SCENES');
60
+ const sw = 200, sx = (i) => b.x + 20 + i * (sw + 45);
61
+ shot(sx(0), b.y, sw, () => { hero.group.position.set(0.1, 0, -0.4); hero.group.rotation.y = 0.5; hero.walk(0.9); cam.position.set(1.2, 1.35, 3.3); cam.lookAt(0.3, 1.0, -0.9); E.render(K.scene, cam, { focus: 3.6, aperture: 0.002, bloom: 0.2 }); });
62
+ const X = SETS.xrayStage(E), xh = new Human({}); X.scene.add(xh.group); xh.setBodyMaterial(SETS.xrayMaterial()); xh.spine.add(SETS.insides().group); xh.pose({ head: [4, -10, 0], look: [8, 0] });
63
+ shot(sx(1), b.y, sw, () => { cam.position.set(0.3, 1.25, 2.4); cam.lookAt(0, 1.15, 0); E.render(X.scene, cam, { focus: 2.4, aperture: 0.0015, bloom: 0.55, bloomThreshold: 0.4 }); }, () => label('STOMACH', 300, 880, 520, 1060));
64
+ const VS = SETS.vessel(E); shot(sx(2), b.y, sw, () => { VS.update(1.3, 0); cam.position.set(0, 0, 0); cam.lookAt(0.15, -0.1, -5); E.render(VS.scene, cam, { focus: 3.2, aperture: 0.005, maxblur: 0.012, bloom: 0.6, bloomThreshold: 0.5 }); });
65
+ ['(A) THE REAL WORLD', '(B) THE X-RAY', '(C) INSIDE THE BODY'].forEach((t, i) => small(t, sx(i) + sw / 2, b.y + sw * 16 / 9 + 26, 'center', 15));
66
+
67
+ // 5 · captions
68
+ b = panel(790, 610, 520, 456, 5, 'CAPTIONS');
69
+ wide({ x: b.x, y: b.y, w: b.w, h: b.h - 10 }, () => { hero.group.position.set(0.1, 0, -0.6); hero.pose({ head: [0, 10, 0] }); const c3 = new THREE.PerspectiveCamera(30, 1280 / 860, 0.05, 100); c3.position.set(1.2, 1.4, 2.2); c3.lookAt(0.6, 1.1, -1.4); E2.render(K.scene, c3, { focus: 0.6, aperture: 0.02, maxblur: 0.02, bloom: 0.2 }); }, () => {
70
+ const sc = 0.42, mid = b.x + b.w / 2;
71
+ [[[{ txt: 'Your' }, { txt: 'stomach', hi: 1 }], 70], [[{ txt: 'can\'t' }, { txt: 'digest', hi: 1 }, { txt: 'it' }], 170], [[{ txt: 'In' }, { txt: '3', hi: 1 }, { txt: 'days...' }], 270]]
72
+ .forEach(([w, y]) => { B.save(); B.translate(mid, b.y + y); B.scale(sc, sc); caption(w, 0, 0); B.restore(); });
73
+ small('SENTENCE CASE · 1-3 WORDS · ONE YELLOW WORD', mid, b.y + b.h - 30, 'center', 14, '#FFFFFF');
74
+ });
75
+
76
+ // 6 · rules
77
+ b = panel(1320, 610, 580, 456, 6, 'RULES');
78
+ rules(b, ['OPEN ON THE MOST DRAMATIC MOMENT.', 'CAMERA ALWAYS MOVING; CUT EVERY 1-2 S.', 'REAL WORLD → X-RAY → INSIDE, AND BACK.', 'WARM SUN OUTSIDE, CYAN INSIDE THE BODY.', 'SHALLOW FOCUS: SOFT BACKGROUND ALWAYS.', 'NO GORE: INJURY SHOWN AS X-RAY OR GLOW.', 'MOOD: CURIOUS, SHOCKING, SATISFYING.'], b.y + 26, 17, 52);
79
+ window.SHEET_READY = true;
@@ -0,0 +1,136 @@
1
+ // WHAT HAPPENS IF YOU HOLD YOUR BREATH? : the shot list (Deep Dive 3D example).
2
+ // A shot: { id, at, note, draw(lt, d, t, blit) } : render the 3D frame with E.render(...), call blit() to put it on the
3
+ // 2D canvas, then draw 2D overlays (labels, pills). The camera moves in EVERY shot. Times come from the voice:
4
+ // cut(i) = just before line i, Wd('word', i) = when that word is said.
5
+ import * as THREE from 'three';
6
+ import { ctx, W, H, clamp, lerp, seg, eo, eio, eob } from './core/lib.js';
7
+ import { L, Wd, T } from './core/timing.js';
8
+ import { camera } from './core/engine.js';
9
+ import { Human } from './core/human.js';
10
+ import * as SETS from './core/sets.js';
11
+ import { label, pill, warning, blackout } from './core/look2d.js';
12
+
13
+ const V3 = (x, y, z) => new THREE.Vector3(x, y, z);
14
+ const lerpV = (a, b, k) => a.clone().lerp(b, k);
15
+ function screen(p, cam) { const v = p.clone().project(cam); return [(v.x + 1) / 2 * W, (1 - v.y) / 2 * H]; }
16
+
17
+ export function buildShots(E) {
18
+ const S = [], CUES = [], add = (o) => (S.push(o), o), cue = (t, type, o = {}) => CUES.push({ t: +t.toFixed(3), type, ...o });
19
+ const cut = (i) => (i === 0 ? 0 : L(i) - 0.08);
20
+ const cam = camera(30);
21
+ const KLOOK = { aperture: 0.003, maxblur: 0.01, bloom: 0.2 }, XLOOK = { aperture: 0.0015, bloom: 0.55, bloomThreshold: 0.4, vignette: 0.45 }, VLOOK = { aperture: 0.005, maxblur: 0.012, bloom: 0.6, bloomThreshold: 0.5, focus: 3.2 };
22
+
23
+ // ── the world ──────────────────────────────────────────────────────────
24
+ const K = SETS.kitchen(E), hero = new Human({}); hero.group.position.set(0.1, 0, -0.6); K.scene.add(hero.group);
25
+ const X = SETS.xrayStage(E), xh = new Human({}), xmat = SETS.xrayMaterial(); xh.setBodyMaterial(xmat); const I = SETS.insides(); xh.spine.add(I.group); X.scene.add(xh.group);
26
+ const VS = SETS.vessel(E);
27
+ const CYAN = new THREE.Color('#4FD1E8'), RED = new THREE.Color('#FF3B3B');
28
+ const chest = (h, k) => h.parts[0].scale.set(1 + 0.03 * k, 1 + 0.012 * k, 1 + 0.08 * k); // inhale 0..1
29
+ const lungs = (k) => I.lungs.forEach((l) => l.scale.set(1 + 0.12 * k, 1 + 0.1 * k, 1 + 0.12 * k));
30
+ const reset = () => { hero.pose({}); chest(hero, 0); xh.pose({}); chest(xh, 0); lungs(0); I.heart.scale.setScalar(1); xmat.uniforms.uCol.value.copy(CYAN); };
31
+ const kitchenRender = (focus, extra = {}) => E.render(K.scene, cam, { ...KLOOK, focus, ...extra });
32
+ const FACE = V3(0.1, 1.68, -0.6);
33
+
34
+ // 1 · HOOK: deep breath in, then hold (face close-up, camera pushing in)
35
+ { const st = cut(0);
36
+ add({ id: 'S01', at: st, note: 'face close-up: big inhale, then hold, wide eyes', draw(lt, d, t, blit) {
37
+ reset(); const k = eo(seg(lt, 0.1, 1.1));
38
+ hero.pose({ head: [-8 * k + 6 * seg(lt, 1.1, 1.6), 4, 0], spine: [-3 * k, 0, 0], lid: lerp(0, -0.35, k), look: [0, -4 * k], shL: [5, 0, 6 + 4 * k], shR: [5, 0, 6 + 4 * k] }); chest(hero, k);
39
+ cam.position.copy(lerpV(V3(0.42, 1.72, 0.45), V3(0.3, 1.7, 0.12), eio(lt / d))); cam.lookAt(FACE); kitchenRender(cam.position.distanceTo(FACE)); blit();
40
+ } });
41
+ cue(st + 0.12, 'inhale', { dur: 1.0 }); }
42
+
43
+ // 2 · the first 30 seconds: nothing much (medium shot, orbit, a timer counts up)
44
+ { const st = cut(1);
45
+ add({ id: 'S02', at: st, note: 'medium shot orbit, timer 0:00 to 0:30', draw(lt, d, t, blit) {
46
+ reset(); hero.pose({ head: [2, -6 + Math.sin(lt * 2) * 3, 0], lid: -0.15, look: [6, 0] }); chest(hero, 1); hero.group.position.y = Math.sin(lt * 3) * 0.003;
47
+ const a = lerp(0.55, 0.2, eio(lt / d)); cam.position.set(0.1 + Math.sin(a) * 2.1, 1.45, -0.6 + Math.cos(a) * 2.1); cam.lookAt(0.1, 1.25, -0.6); kitchenRender(2.1); blit();
48
+ const s = Math.round(30 * clamp(lt / (d * 0.85))); pill(`0:${String(s).padStart(2, '0')}`, 540, 1180, eob(seg(lt, 0, 0.25)), '#FFD43B', 'rgba(12,14,20,0.8)', 74);
49
+ } });
50
+ cue(st, 'whoosh'); cue(st + 0.05, 'pop', { gain: 0.6 }); }
51
+
52
+ // 3 · lungs are full (x-ray) …
53
+ const blood = Wd('blood', 2) - 0.08;
54
+ { const st = cut(2);
55
+ add({ id: 'S03', at: st, note: 'x-ray chest, lungs full', draw(lt, d, t, blit) {
56
+ reset(); lungs(1 + Math.sin(lt * 3) * 0.05); chest(xh, 1); xh.pose({ head: [4, -6, 0] });
57
+ cam.position.copy(lerpV(V3(0.55, 1.5, 1.6), V3(0.3, 1.42, 1.1), eio(lt / d))); cam.lookAt(0, 1.33, 0); E.render(X.scene, cam, { ...XLOOK, focus: cam.position.distanceTo(V3(0, 1.33, 0)) }); blit();
58
+ const [lx, ly] = screen(V3(0.1, 1.42, 0.05), cam); label('LUNGS: FULL', 760, 520, lx, ly, eob(seg(lt, 0.2, 0.45)));
59
+ } });
60
+ cue(st, 'whoosh'); cue(st + 0.25, 'pop', { gain: 0.5 }); }
61
+ // … and your blood is still full of oxygen (macro, bright red cells)
62
+ add({ id: 'S04', at: blood, note: 'blood vessel, bright red cells, OXYGEN pill', draw(lt, d, t, blit) {
63
+ VS.update(t, -lt * 1.6, 0, 0); cam.position.set(0, 0, -lt * 1.6); cam.lookAt(0.15, -0.08, -lt * 1.6 - 5); E.render(VS.scene, cam, VLOOK); blit();
64
+ pill('OXYGEN ✓', 540, 330, eob(seg(lt, 0.15, 0.4)), '#7CF29A');
65
+ } });
66
+ cue(blood, 'whoosh'); cue(blood, 'slide', { dur: cut(3) - blood, gain: 0.5 });
67
+
68
+ // 5 · carbon dioxide builds up (bubbles fill the vessel, cells darken)
69
+ { const st = cut(3);
70
+ add({ id: 'S05', at: st, note: 'CO2 bubbles fill the vessel, cells darken', draw(lt, d, t, blit) {
71
+ const k = eio(clamp(lt / d)); VS.update(t, -lt * 1.2, 0.15 + 0.85 * k, 0.45 * k);
72
+ cam.position.set(Math.sin(lt) * 0.1, 0, -lt * 1.2); cam.lookAt(0.1, -0.05, -lt * 1.2 - 5); E.render(VS.scene, cam, VLOOK); blit();
73
+ pill('CO₂ ↑', 540, 330, eob(seg(lt, 0.1, 0.35)) * (1 + 0.06 * Math.sin(lt * 8)), '#C9D6DD');
74
+ } });
75
+ cue(st, 'whoosh'); cue(st + 0.1, 'bubbles', { dur: cut(4) - st }); }
76
+
77
+ // 6 · that's what makes you desperate (x-ray turns red, alarm)
78
+ { const st = cut(4);
79
+ add({ id: 'S06', at: st, note: 'x-ray body pulses red: CO2 alarm', draw(lt, d, t, blit) {
80
+ reset(); chest(xh, 1); lungs(1); const p = 0.5 + 0.5 * Math.sin(lt * 7); xmat.uniforms.uCol.value.copy(CYAN).lerp(RED, clamp(lt / 0.8) * (0.55 + 0.45 * p));
81
+ xh.pose({ head: [-4, 10 * Math.sin(lt * 1.3), 0], spine: [0, 0, Math.sin(lt * 9) * 1.2], lid: -0.4 });
82
+ cam.position.copy(lerpV(V3(-0.4, 1.6, 1.9), V3(-0.15, 1.6, 1.25), eio(lt / d))); cam.lookAt(0, 1.45, 0); E.render(X.scene, cam, { ...XLOOK, bloom: 0.75, focus: cam.position.distanceTo(V3(0, 1.45, 0)) }); blit();
83
+ pill('CO₂ ALARM', 540, 1200, eob(seg(lt, 0.2, 0.45)), '#FF5A5A');
84
+ } });
85
+ cue(st, 'whoosh'); cue(st + 0.2, 'alarm', { dur: cut(5) - st - 0.2 }); }
86
+
87
+ // 7 · diaphragm twitches (3/4 x-ray, lungs jerk)
88
+ { const st = cut(5), P = 0.62, twitch = (lt) => { const c = (lt - 0.25) % P; return lt < 0.25 ? 0 : Math.exp(-c * 14) * (c >= 0 ? 1 : 0); };
89
+ add({ id: 'S07', at: st, note: 'diaphragm spasms: lungs jerk, body jolts', draw(lt, d, t, blit) {
90
+ reset(); const j = twitch(lt); chest(xh, 1 + j * 0.8); lungs(1 + j * 1.2); xmat.uniforms.uCol.value.copy(CYAN).lerp(RED, 0.25);
91
+ xh.pose({ spine: [6 * j, 0, 0], head: [4 * j, -15, 0], lid: -0.3 });
92
+ cam.position.copy(lerpV(V3(1.25, 1.35, 1.05), V3(0.95, 1.3, 0.8), eio(lt / d))); cam.lookAt(0, 1.25, 0); E.render(X.scene, cam, { ...XLOOK, focus: cam.position.distanceTo(V3(0, 1.25, 0)) }); blit();
93
+ const [lx, ly] = screen(V3(0.02, 1.2, 0.08), cam); label('DIAPHRAGM', 330, 1150, lx, ly, eob(seg(lt, 0.3, 0.55)));
94
+ } });
95
+ cue(st, 'whoosh'); for (let k = 0; st + 0.25 + k * P < cut(6); k++) cue(st + 0.25 + k * P, 'thud', { gain: 0.45 }); }
96
+
97
+ // 8 · the heart slows (heart close-up, beats spreading out)
98
+ { const st = cut(6), end = cut(7), beats = []; let bt = 0.15, gap = 0.5; while (st + bt < end) { beats.push(bt); bt += gap; gap = Math.min(1.05, gap * 1.18); }
99
+ const pulse = (lt) => beats.reduce((a, b) => Math.max(a, lt >= b ? Math.exp(-(lt - b) * 9) : 0), 0);
100
+ add({ id: 'S08', at: st, note: 'heart close-up, beats slow down', draw(lt, d, t, blit) {
101
+ reset(); chest(xh, 1); lungs(1); const p = pulse(lt); I.heart.scale.setScalar(1 + p * 0.16); I.heart.material.emissiveIntensity = 0.18 + p * 0.8;
102
+ const H0 = V3(0.025, 1.41, 0.07); cam.position.copy(lerpV(V3(0.25, 1.48, 0.62), V3(0.12, 1.44, 0.42), eio(lt / d))); cam.lookAt(H0); E.render(X.scene, cam, { ...XLOOK, bloom: 0.6, focus: cam.position.distanceTo(H0), aperture: 0.004 }); blit();
103
+ pill('HEART RATE ↓', 540, 330, eob(seg(lt, 0.2, 0.45)), '#FF8A8A');
104
+ } });
105
+ cue(st, 'whoosh'); beats.forEach((b) => cue(st + b, 'heartbeat')); }
106
+
107
+ // 9 · the brain switches you off (face, eyes close, fade to black)
108
+ { const st = cut(7), off = Wd('switches', 7) - st;
109
+ add({ id: 'S09', at: st, note: 'face: eyes close, head drops, blackout', draw(lt, d, t, blit) {
110
+ reset(); const k = eio(seg(lt, off - 0.4, d)); chest(hero, 1 - k * 0.5);
111
+ hero.pose({ head: [12 * k, -4, 6 * k], spine: [5 * k, 0, 2 * k], lid: lerp(-0.1, 1.05, k), look: [0, 6 * k] });
112
+ cam.position.copy(lerpV(V3(-0.25, 1.7, 0.2), V3(-0.18, 1.62, 0.0), eio(lt / d))); cam.up.set(Math.sin(k * 0.12), 1, 0); cam.lookAt(V3(0.1, 1.64 - 0.05 * k, -0.6)); kitchenRender(0.75, { aperture: 0.004 }); cam.up.set(0, 1, 0); blit();
113
+ blackout(seg(lt, off, d));
114
+ } });
115
+ cue(st + off, 'slide', { dur: 1.2, gain: 0.5 }); }
116
+
117
+ // 10 · you pass out, and breathing restarts on its own (dark → x-ray lungs inflate)
118
+ { const st = cut(8), br = Wd('breathing', 8) - st;
119
+ add({ id: 'S10', at: st, note: 'from black: lungs inflate by themselves', draw(lt, d, t, blit) {
120
+ reset(); const on = seg(lt, 0.3, br), cyc = lt > br ? 0.5 - 0.5 * Math.cos((lt - br) * 3.2) : 0; lungs(0.2 + cyc * 1.1); chest(xh, cyc); xh.pose({ head: [10, 0, 4], lid: 1 });
121
+ cam.position.copy(lerpV(V3(0, 1.4, 1.4), V3(0.05, 1.38, 1.05), eio(lt / d))); cam.lookAt(0, 1.33, 0); E.render(X.scene, cam, { ...XLOOK, exposure: 0.15 + 0.85 * on, focus: cam.position.distanceTo(V3(0, 1.33, 0)) }); blit();
122
+ label('AUTOMATIC', 780, 560, ...screen(V3(0.1, 1.4, 0.05), cam), lt > br ? eob(seg(lt, br, br + 0.3)) : 0);
123
+ } });
124
+ cue(st + br, 'inhale', { dur: 1.0 }); cue(st + br + 1.6, 'inhale', { dur: 1.0, gain: 0.7 }); }
125
+
126
+ // 11 · never underwater (back in the kitchen, he looks at us; warning)
127
+ { const st = cut(9);
128
+ add({ id: 'S11', at: st, note: 'hero looks at camera, warning sign', draw(lt, d, t, blit) {
129
+ reset(); hero.pose({ head: [-2, 0, 0], lid: 0.05, look: [0, 0] }); chest(hero, 0.3);
130
+ cam.position.copy(lerpV(V3(0.0, 1.62, 0.9), V3(0.05, 1.64, 0.55), eio(lt / d))); cam.lookAt(0.1, 1.6, -0.6); kitchenRender(cam.position.distanceTo(FACE)); blit();
131
+ warning(540, 1150, eob(seg(lt, 0.25, 0.55)) * 0.95);
132
+ } });
133
+ cue(st, 'whoosh'); cue(st + 0.25, 'slam', { gain: 0.7 }); }
134
+
135
+ return { shots: S, cues: CUES };
136
+ }
@@ -0,0 +1,122 @@
1
+ // Frame-exact capture through headless Chrome. No npm packages (Node 22+). Run from the project folder.
2
+ // node tools/capture.mjs check boot, list shots + captions, report errors
3
+ // node tools/capture.mjs cues write data/cues.json (the sound cues, for tools/mix.py)
4
+ // node tools/capture.mjs sheet review/all.jpg [step=0.5] [cols=9] contact sheet, a frame every `step` s, time-stamped
5
+ // node tools/capture.mjs frames review/full "1.2,8.4" full-size JPEGs of those times
6
+ // node tools/capture.mjs video renders/out.mp4 [start end] [--draft] the film (30 fps) with data/mix.wav if it exists
7
+ // node tools/capture.mjs preview serve the project and print a URL to watch it in a browser
8
+ // CHROME=/path/to/chrome overrides the browser.
9
+ import { spawn, spawnSync } from 'node:child_process';
10
+ import http from 'node:http';
11
+ import fs from 'node:fs';
12
+ import os from 'node:os';
13
+ import path from 'node:path';
14
+ import { fileURLToPath } from 'node:url';
15
+
16
+ const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
17
+ const FPS = +(process.env.FPS || 30);
18
+ const CHROME = [process.env.CHROME, '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', '/Applications/Chromium.app/Contents/MacOS/Chromium',
19
+ '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge', '/usr/bin/google-chrome', '/usr/bin/google-chrome-stable', '/usr/bin/chromium',
20
+ '/usr/bin/chromium-browser', '/snap/bin/chromium', 'C:/Program Files/Google/Chrome/Application/chrome.exe',
21
+ 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe'].find((p) => p && fs.existsSync(p));
22
+ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
23
+ const args = process.argv.slice(2), flags = new Set(args.filter((a) => a.startsWith('--')));
24
+ const [mode, ...rest] = args.filter((a) => !a.startsWith('--'));
25
+
26
+ const MIME = { '.html': 'text/html', '.js': 'text/javascript', '.mjs': 'text/javascript', '.json': 'application/json', '.otf': 'font/otf',
27
+ '.ttf': 'font/ttf', '.woff2': 'font/woff2', '.wav': 'audio/wav', '.mp3': 'audio/mpeg', '.png': 'image/png', '.jpg': 'image/jpeg' };
28
+ function serve(port = 0) {
29
+ return new Promise((res) => {
30
+ const srv = http.createServer((req, r) => {
31
+ const u = decodeURIComponent(req.url.split('?')[0]), f = path.join(ROOT, u === '/' ? 'index.html' : u);
32
+ if (!f.startsWith(ROOT) || !fs.existsSync(f) || fs.statSync(f).isDirectory()) { r.writeHead(404); r.end(); return; }
33
+ r.writeHead(200, { 'Content-Type': MIME[path.extname(f)] || 'application/octet-stream', 'Cache-Control': 'no-store' });
34
+ fs.createReadStream(f).pipe(r);
35
+ });
36
+ srv.listen(port, '127.0.0.1', () => res(srv));
37
+ });
38
+ }
39
+
40
+ async function openPage(port) {
41
+ if (!CHROME) throw new Error('Chrome not found: install Google Chrome or set CHROME=/path/to/chrome');
42
+ const prof = fs.mkdtempSync(path.join(os.tmpdir(), 'fs-chrome-'));
43
+ const chrome = spawn(CHROME, ['--headless=new', '--remote-debugging-port=0', `--user-data-dir=${prof}`, '--no-first-run', '--no-default-browser-check',
44
+ '--hide-scrollbars', '--window-size=1080,1920', '--ignore-gpu-blocklist', '--enable-unsafe-swiftshader', ...(process.env.SOFTWARE_GL ? ['--use-angle=swiftshader'] : []), ...(process.getuid?.() === 0 ? ['--no-sandbox'] : []), '--disable-background-timer-throttling', '--disable-renderer-backgrounding', 'about:blank'], { stdio: 'ignore' });
45
+ let dbg;
46
+ for (let i = 0; i < 200 && !dbg; i++) { try { dbg = fs.readFileSync(path.join(prof, 'DevToolsActivePort'), 'utf8').split('\n')[0].trim(); } catch { await sleep(100); } }
47
+ if (!dbg) throw new Error('Chrome did not start');
48
+ const r = await fetch(`http://127.0.0.1:${dbg}/json/new?${encodeURIComponent(`http://127.0.0.1:${port}/index.html?capture=1${process.env.QS || ''}`)}`, { method: 'PUT' });
49
+ const target = await r.json();
50
+ const ws = new WebSocket(target.webSocketDebuggerUrl);
51
+ await new Promise((res, rej) => { ws.onopen = res; ws.onerror = rej; });
52
+ let id = 0; const pend = new Map(), logs = [];
53
+ ws.onmessage = (e) => {
54
+ const m = JSON.parse(e.data);
55
+ if (m.id && pend.has(m.id)) { const p = pend.get(m.id); pend.delete(m.id); m.error ? p.rej(new Error(m.error.message)) : p.res(m.result); }
56
+ else if (m.method === 'Runtime.exceptionThrown') logs.push('EXCEPTION ' + (m.params.exceptionDetails.exception?.description || m.params.exceptionDetails.text));
57
+ else if (m.method === 'Runtime.consoleAPICalled' && m.params.type === 'error') logs.push('ERROR ' + m.params.args.map((a) => a.value ?? a.description).join(' '));
58
+ };
59
+ const send = (method, params = {}) => new Promise((res, rej) => { const i = ++id; pend.set(i, { res, rej }); ws.send(JSON.stringify({ id: i, method, params })); });
60
+ const ev = async (expr) => { const x = await send('Runtime.evaluate', { expression: expr, returnByValue: true, awaitPromise: true }); if (x.exceptionDetails) throw new Error(x.exceptionDetails.exception?.description || x.exceptionDetails.text); return x.result.value; };
61
+ await send('Runtime.enable');
62
+ for (let i = 0; ; i++) {
63
+ const st = await ev('window.OP ? (OP.bootError ? "ERR:" + OP.bootError : OP.ready) : false').catch(() => false);
64
+ if (st === true) break;
65
+ if (typeof st === 'string') throw new Error('boot failed: ' + st + '\n' + logs.join('\n'));
66
+ if (i > 1200) throw new Error('boot timeout\n' + logs.join('\n'));
67
+ await sleep(100);
68
+ }
69
+ const close = () => { try { ws.close(); } catch {} chrome.kill('SIGKILL'); setTimeout(() => { try { fs.rmSync(prof, { recursive: true, force: true }); } catch {} }, 300); };
70
+ return { ev, logs, close };
71
+ }
72
+ const jpg = (d) => Buffer.from(d.slice(d.indexOf(',') + 1), 'base64');
73
+ const FRAME = (t, q, label) => `(() => { const d = OP.frame(${t}, ${q}); ${label ? `const cv = document.getElementById('cv'), c = cv.getContext('2d'); c.setTransform(1,0,0,1,0,0); c.fillStyle = '#000'; c.fillRect(0, 0, 250, 86); c.fillStyle = '#fff'; c.font = '700 60px sans-serif'; c.textAlign = 'left'; c.textBaseline = 'alphabetic'; c.fillText('${(+t).toFixed(2)}', 14, 64); return cv.toDataURL('image/jpeg', ${q});` : 'return d;'} })()`;
74
+
75
+ const srv = await serve(mode === 'preview' ? 8765 : 0), port = srv.address().port;
76
+ if (mode === 'preview') { console.log(`open http://127.0.0.1:${port}/ (Ctrl+C to stop)`); }
77
+ else {
78
+ const P = await openPage(port);
79
+ try {
80
+ const dur = await P.ev('OP.duration()');
81
+ if (mode === 'check') {
82
+ console.log(`duration ${dur.toFixed(2)} s`);
83
+ for (const s of await P.ev('OP.shots()')) console.log(`${s.id.padEnd(5)} ${s.at.toFixed(2).padStart(6)} → ${s.end.toFixed(2).padStart(6)} (${(s.end - s.at).toFixed(2)} s) ${s.note}`);
84
+ console.log('captions:'); for (const c of await P.ev('OP.captions()')) console.log(` ${c.s.toFixed(2).padStart(6)}–${c.e.toFixed(2).padEnd(6)} ${c.text}`);
85
+ let bad = 0; for (let t = 0; t < dur; t += 0.25) { try { await P.ev(`OP.draw(${t})`); } catch (e) { bad++; console.log(`ERROR at ${t.toFixed(2)}: ${e.message.split('\n')[0]}`); } }
86
+ if (P.logs.length) console.log(P.logs.join('\n'));
87
+ console.log(bad || P.logs.length ? 'CHECK FAILED' : 'CHECK OK');
88
+ } else if (mode === 'cues') {
89
+ const cues = await P.ev('OP.cues()');
90
+ fs.mkdirSync(path.join(ROOT, 'data'), { recursive: true });
91
+ fs.writeFileSync(path.join(ROOT, 'data/cues.json'), JSON.stringify({ duration: dur, cues }, null, 1));
92
+ console.log(`data/cues.json: ${cues.length} cues, ${dur.toFixed(2)} s`);
93
+ } else if (mode === 'frames') {
94
+ const dir = path.resolve(ROOT, rest[0] || 'review/frames'); fs.mkdirSync(dir, { recursive: true });
95
+ for (const t of (rest[1] || '0').split(',').map(Number)) { fs.writeFileSync(path.join(dir, `t${t.toFixed(2)}.jpg`), jpg(await P.ev(FRAME(t, 0.92)))); }
96
+ console.log(dir);
97
+ } else if (mode === 'sheet') {
98
+ const out = path.resolve(ROOT, rest[0] || 'review/all.jpg'), step = +(rest[1] || 0.5), cols = +(rest[2] || 9);
99
+ const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'fs-sheet-')); let n = 0;
100
+ for (let t = step / 2; t < dur; t += step) fs.writeFileSync(path.join(tmp, `f${String(n++).padStart(4, '0')}.jpg`), jpg(await P.ev(FRAME(t, 0.8, true))));
101
+ const rows = Math.ceil(n / cols); fs.mkdirSync(path.dirname(out), { recursive: true });
102
+ const r = spawnSync('ffmpeg', ['-v', 'error', '-y', '-framerate', '1', '-i', path.join(tmp, 'f%04d.jpg'), '-vf', `scale=216:384,tile=${cols}x${rows}:padding=4:color=black`, '-frames:v', '1', '-q:v', '3', out]);
103
+ fs.rmSync(tmp, { recursive: true, force: true });
104
+ if (r.status) throw new Error('ffmpeg: ' + r.stderr); console.log(`${out} (${n} frames, every ${step} s)`);
105
+ } else if (mode === 'video') {
106
+ const out = path.resolve(ROOT, rest[0] || 'renders/video.mp4'); fs.mkdirSync(path.dirname(out), { recursive: true });
107
+ const mix = path.join(ROOT, 'data/mix.wav'), hasMix = fs.existsSync(mix), a0 = rest[1] ? +rest[1] : 0, a1 = rest[2] ? Math.min(+rest[2], dur) : dur, n = Math.round((a1 - a0) * FPS);
108
+ const ff = spawn('ffmpeg', ['-v', 'error', '-y', '-f', 'image2pipe', '-framerate', String(FPS), '-i', '-',
109
+ ...(hasMix ? ['-ss', String(a0), '-t', String(a1 - a0), '-i', mix] : ['-f', 'lavfi', '-i', 'anullsrc=r=48000:cl=stereo']), '-map', '0:v', '-map', '1:a',
110
+ '-c:v', 'libx264', '-preset', flags.has('--draft') ? 'ultrafast' : 'veryfast', '-crf', flags.has('--draft') ? '28' : '18', '-pix_fmt', 'yuv420p',
111
+ '-c:a', 'aac', '-b:a', '192k', '-shortest', '-movflags', '+faststart', out], { stdio: ['pipe', 'inherit', 'inherit'] });
112
+ const t0 = Date.now();
113
+ for (let i = 0; i < n; i++) {
114
+ const b = jpg(await P.ev(FRAME(a0 + i / FPS, flags.has('--draft') ? 0.8 : 0.93)));
115
+ if (!ff.stdin.write(b)) await new Promise((r) => ff.stdin.once('drain', r));
116
+ if (i % 150 === 0) process.stdout.write(`\r${i}/${n} frames`);
117
+ }
118
+ ff.stdin.end(); await new Promise((r) => ff.on('close', r));
119
+ console.log(`\r${out} (${n} frames, ${hasMix ? 'with data/mix.wav' : 'SILENT: no data/mix.wav'}, ${((Date.now() - t0) / 1000).toFixed(0)} s)`);
120
+ } else console.log('modes: check · cues · sheet · frames · video · preview');
121
+ } finally { P.close(); srv.close(); }
122
+ }