@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,592 @@
1
+ <meta charset="utf-8">
2
+ <title>Versus Split</title>
3
+ <meta name="claude:viewport-fit-sides" content="cover">
4
+ <link rel="preconnect" href="https://fonts.googleapis.com">
5
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
6
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@700;800;900&family=Anton&family=Instrument+Serif:ital@0;1&family=Inter:wght@400;600;700;800&display=block">
7
+ <style>
8
+ /* Layout: an editing-suite player. One dark look by choice: the stage, then the transport bar under it. */
9
+ :root {
10
+ color-scheme: dark;
11
+ --bg: #0b0b0d;
12
+ --panel: #141417;
13
+ --ink: #f2f0ea;
14
+ --dim: #8d8c93;
15
+ --line: #26262c;
16
+ --accent: #ffd60a;
17
+ --display: "Anton", "Bebas Neue", Impact, "Arial Narrow", sans-serif;
18
+ --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
19
+ --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
20
+ }
21
+ html, body { height: 100%; }
22
+ body {
23
+ background: var(--bg); color: var(--ink); font-family: var(--body);
24
+ padding-left: max(16px, env(safe-area-inset-left, 0px));
25
+ padding-right: max(16px, env(safe-area-inset-right, 0px));
26
+ padding-block: 20px 28px;
27
+ }
28
+ .wrap { max-width: 1180px; margin: 0 auto; display: grid; gap: 14px; }
29
+ .top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; }
30
+ .name { font-family: var(--display); font-weight: 400; font-size: clamp(26px, 4vw, 40px); letter-spacing: 0.02em; text-transform: uppercase; margin: 0; line-height: 1; }
31
+ .name em { font-family: var(--serif); font-style: italic; text-transform: none; color: var(--accent); letter-spacing: 0; font-size: 1.12em; }
32
+ .meta { color: var(--dim); font-size: 14px; margin: 0; }
33
+ .stage { position: relative; aspect-ratio: 720 / 1280; width: min(100%, calc(74vh * 720 / 1280)); max-width: 100%; margin-inline: auto; background: #000; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
34
+ .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
35
+ .bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
36
+ .bar button, .bar label.btn {
37
+ font: 600 14px var(--body); color: var(--ink); background: transparent; border: 1px solid var(--line);
38
+ border-radius: 7px; padding: 8px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
39
+ }
40
+ .bar button:hover, .bar label.btn:hover { border-color: var(--dim); }
41
+ .bar button:focus-visible, .bar label.btn:focus-within, #scrub:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
42
+ .bar button[aria-pressed="true"] { background: var(--accent); color: #0b0b0d; border-color: var(--accent); }
43
+ #play { min-width: 82px; justify-content: center; background: var(--ink); color: #0b0b0d; border-color: var(--ink); }
44
+ #scrub { flex: 1 1 220px; min-width: 0; accent-color: var(--accent); }
45
+ #time { font: 600 14px var(--body); font-variant-numeric: tabular-nums; color: var(--dim); min-width: 92px; text-align: right; }
46
+ #vofile, #footfile { position: absolute; width: 1px; height: 1px; opacity: 0; }
47
+ .note { color: var(--dim); font-size: 13px; margin: 0; max-width: 70ch; }
48
+ </style>
49
+
50
+ <div class="wrap">
51
+ <div class="top">
52
+ <h1 class="name">Versus <em>Split</em></h1>
53
+ <p class="meta">Reference animation · 13.0 s · 720×1280 · drawn in code, sound synthesized</p>
54
+ </div>
55
+ <div class="stage"><canvas id="stage" width="720" height="1280" aria-label="Versus Split reference animation"></canvas></div>
56
+ <div class="bar">
57
+ <button id="play" type="button">Play</button>
58
+ <input id="scrub" type="range" min="0" max="13" step="0.01" value="0" aria-label="Scrub timeline">
59
+ <span id="time">0.00 / 13.00</span>
60
+ <button id="sound" type="button" aria-pressed="true">Sound on</button>
61
+ <button id="loop" type="button" aria-pressed="true">Loop</button>
62
+ <label class="btn" for="vofile">Load voiceover<input id="vofile" type="file" accept="audio/*"></label>
63
+ </div>
64
+ <p class="note" id="vonote">Load a voiceover to play it in sync. The effects switch to a lighter mix under narration.</p>
65
+ </div>
66
+
67
+ <script>
68
+ // =====================================================================================================
69
+ // VERSUS SPLIT · core helpers (CM), sound kit (SFX), library helpers, style, player
70
+ // Every frame is a pure function of t. All randomness is seeded. Times are seconds.
71
+ // =====================================================================================================
72
+ // =====================================================================================================
73
+ const CM = (() => {
74
+ const clamp = (v, a = 0, b = 1) => (v < a ? a : v > b ? b : v);
75
+ const lerp = (a, b, u) => a + (b - a) * u;
76
+ const span = (t, a, b) => clamp((t - a) / (b - a));
77
+ const rotl = (x, k) => (x << k) | (x >>> (32 - k));
78
+ const hash = (s) => { s = String(s); let h = 0x9e3779b1; for (let i = 0; i < s.length; i++) { h = Math.imul(h ^ s.charCodeAt(i), 0x85ebca6b); h ^= h >>> 13; } return h >>> 0; };
79
+ // xoshiro128** style generator, seeded from a number or string
80
+ const rng = (seed) => {
81
+ const s = typeof seed === 'number' ? seed >>> 0 : hash(seed);
82
+ let a = (s ^ 0xa5a5a5a5) >>> 0, b = (Math.imul(s, 0x27d4eb2d) >>> 0) || 1, c = (0x165667b1 ^ s) >>> 0, d = (rotl(s, 7) >>> 0) || 7;
83
+ const r = () => { const res = Math.imul(rotl(Math.imul(b, 5), 7), 9) >>> 0; const t = b << 9; c ^= a; d ^= b; b ^= c; a ^= d; c ^= t; d = rotl(d, 11); return res / 4294967296; };
84
+ for (let i = 0; i < 8; i++) r();
85
+ r.in = (lo, hi) => lo + r() * (hi - lo);
86
+ r.pick = (arr) => arr[(r() * arr.length) | 0];
87
+ return r;
88
+ };
89
+ // smooth 1D value noise, roughly -1..1
90
+ const noise1 = (seed) => { const r = rng(seed), v = Float32Array.from({ length: 256 }, () => r() * 2 - 1); return (x) => { const i = Math.floor(x), f = x - i, u = f * f * (3 - 2 * f); return lerp(v[i & 255], v[(i + 1) & 255], u); }; };
91
+ const ez = {
92
+ out3: (u) => 1 - Math.pow(1 - u, 3),
93
+ in3: (u) => u * u * u,
94
+ inout3: (u) => (u < 0.5 ? 4 * u * u * u : 1 - Math.pow(-2 * u + 2, 3) / 2),
95
+ outExpo: (u) => (u >= 1 ? 1 : 1 - Math.pow(2, -10 * u)),
96
+ back: (u, s = 1.7) => (u <= 0 ? 0 : u >= 1 ? 1 : 1 + (s + 1) * Math.pow(u - 1, 3) + s * Math.pow(u - 1, 2)),
97
+ spring: (u) => (u <= 0 ? 0 : u >= 1 ? 1 : 1 - Math.exp(-6 * u) * Math.cos(13 * u)),
98
+ };
99
+ const layer = (w, h) => { const c = document.createElement('canvas'); c.width = w; c.height = h; return c; };
100
+ return { clamp, lerp, span, hash, rng, noise1, ez, layer };
101
+ })();
102
+
103
+ // =====================================================================================================
104
+ // SFX: synthesized creator-edit sound kit. Plain Web Audio, no files.
105
+ // voiceover mode keeps the music low under narration and plays sounds marked `soft` at 55%.
106
+ // =====================================================================================================
107
+ const SFX = (() => {
108
+ const SEMI = { C: -9, D: -7, E: -5, F: -4, G: -2, A: 0, B: 2 };
109
+ const hz = (n) => { if (typeof n === 'number') return n; const m = /^([A-G])(#|b)?(-?\d)$/.exec(n); return 440 * Math.pow(2, (SEMI[m[1]] + (m[2] === '#' ? 1 : m[2] === 'b' ? -1 : 0) + (+m[3] - 4) * 12) / 12); };
110
+
111
+ function kit(ac, o = {}) {
112
+ const VO = !!o.voiceover, SR = ac.sampleRate, T0 = o.from || 0, base = ac.currentTime + (o.lead || 0);
113
+ // snap every start a little past the sample grid (avoids level spikes on some browsers)
114
+ const at = (t) => (Math.round((base + (t - T0)) * SR) + 0.3) / SR;
115
+ const skip = (t, dur) => at(t) + dur < ac.currentTime || (t < T0 - 0.005 && dur < 1.2);
116
+
117
+ const comp = ac.createDynamicsCompressor();
118
+ comp.threshold.value = -14; comp.knee.value = 6; comp.ratio.value = 4; comp.attack.value = 0.003; comp.release.value = 0.15;
119
+ const master = ac.createGain(); master.gain.value = o.master == null ? 0.85 : o.master;
120
+ comp.connect(master); master.connect(o.dest || ac.destination);
121
+ const mk = (g) => { const n = ac.createGain(); n.gain.value = g; n.connect(comp); return n; };
122
+ const bus = { fx: mk(VO ? 0.78 : 0.95), music: mk(VO ? 0.3 : 0.62), amb: mk(0.45) };
123
+ const duckIn = ac.createGain(); duckIn.connect(bus.music);
124
+ const DUCKS = [];
125
+
126
+ // generated plate-style reverb
127
+ const verb = ac.createConvolver();
128
+ { const n = Math.floor(1.5 * SR), ir = ac.createBuffer(2, n, SR);
129
+ for (let ch = 0; ch < 2; ch++) { const r = CM.rng('plate' + ch), d = ir.getChannelData(ch); let lp = 0; for (let i = 0; i < n; i++) { const u = i / n; lp += (0.7 - 0.5 * u) * ((r() * 2 - 1) - lp); d[i] = lp * Math.pow(1 - u, 2.6) * 0.9; } }
130
+ verb.buffer = ir; }
131
+ const verbIn = ac.createGain(); verbIn.gain.value = 0.8; verbIn.connect(verb); verb.connect(comp);
132
+
133
+ // seeded noise buffers
134
+ const NB = {};
135
+ { const n = Math.floor(2 * SR);
136
+ for (const kind of ['white', 'pink', 'brown']) {
137
+ const b = ac.createBuffer(1, n, SR), d = b.getChannelData(0), r = CM.rng('nz' + kind); let b0 = 0, b1 = 0, b2 = 0, br = 0;
138
+ for (let i = 0; i < n; i++) { const w = r() * 2 - 1;
139
+ if (kind === 'white') d[i] = w;
140
+ else if (kind === 'pink') { b0 = 0.99765 * b0 + w * 0.099; b1 = 0.963 * b1 + w * 0.2965; b2 = 0.57 * b2 + w * 1.0527; d[i] = (b0 + b1 + b2 + w * 0.1848) * 0.18; }
141
+ else { br = (br + 0.02 * w) / 1.02; d[i] = br * 3.4; } }
142
+ NB[kind] = b; } }
143
+
144
+ const ramp = (param, v, t) => { if (!Array.isArray(v)) { param.setValueAtTime(v, t); return; } param.setValueAtTime(v[0][1], t + v[0][0]); for (let i = 1; i < v.length; i++) param.exponentialRampToValueAtTime(Math.max(1e-3, v[i][1]), t + v[i][0]); };
145
+ const env = (g, t, peak, dur, a = 0.004, hold = 0) => {
146
+ a = Math.min(a, dur * 0.9); hold = Math.min(hold, dur - a);
147
+ g.gain.setValueAtTime(0, t); g.gain.linearRampToValueAtTime(peak, t + a);
148
+ if (hold > 0) g.gain.setValueAtTime(peak, t + a + hold);
149
+ g.gain.exponentialRampToValueAtTime(1e-4, t + dur); g.gain.setValueAtTime(0, t + dur + 0.002);
150
+ };
151
+ const level = (p, d) => (p.gain == null ? d : p.gain) * (VO && p.soft ? 0.55 : 1);
152
+ const route = (node, p, t) => {
153
+ const pan = ac.createStereoPanner();
154
+ if (Array.isArray(p.pan)) { pan.pan.setValueAtTime(p.pan[0], t); pan.pan.linearRampToValueAtTime(p.pan[1], t + (p.dur || 0.2)); } else pan.pan.value = CM.clamp(p.pan || 0, -1, 1);
155
+ node.connect(pan); pan.connect(p.bus === 'music' ? duckIn : bus[p.bus || 'fx']);
156
+ if (p.verb) { const s = ac.createGain(); s.gain.value = p.verb; pan.connect(s); s.connect(verbIn); }
157
+ };
158
+ const filt = (p, t) => { if (!p.filter) return null; const f = ac.createBiquadFilter(); f.type = p.filter; f.Q.value = p.q == null ? 0.9 : p.q; ramp(f.frequency, p.ff == null ? 1200 : p.ff, t); return f; };
159
+
160
+ // primitive: oscillator voice. f may be a value or [[dt, hz], ...]
161
+ function voice(time, p) {
162
+ const dur = p.dur || 0.2; if (skip(time, dur)) return; const t = at(time);
163
+ const osc = ac.createOscillator(); osc.type = p.type || 'sine';
164
+ ramp(osc.frequency, Array.isArray(p.f) ? p.f.map(([d, v]) => [d, hz(v)]) : hz(p.f || 440), t);
165
+ const g = ac.createGain(); env(g, t, level(p, 0.3), dur, p.a, p.hold);
166
+ const f = filt(p, t); if (f) { osc.connect(f); f.connect(g); } else osc.connect(g);
167
+ route(g, p, t); osc.start(t); osc.stop(t + dur + 0.03);
168
+ }
169
+ // primitive: noise voice
170
+ function hiss(time, p) {
171
+ const dur = p.dur || 0.2; if (skip(time, dur)) return; const t = at(time);
172
+ const src = ac.createBufferSource(); src.buffer = NB[p.color || 'white']; src.loop = true; if (p.rate) src.playbackRate.value = p.rate;
173
+ const g = ac.createGain(); env(g, t, level(p, 0.3), dur, p.a, p.hold);
174
+ const f = filt(p, t); if (f) { src.connect(f); f.connect(g); } else src.connect(g);
175
+ route(g, p, t); src.start(t, CM.rng('off' + time)() * 1.5); src.stop(t + dur + 0.03);
176
+ }
177
+ function duck(t, depth = 0.5, hold = 0.25) { DUCKS.push({ t, depth, hold }); }
178
+
179
+ // ---------------- named sounds (creator-edit palette) ----------------
180
+ const S = {
181
+ // text slam: a tight low thump with a short papery crack
182
+ slam: (t, o) => { voice(t, { f: [[0, 150], [0.12, 52]], dur: 0.2, gain: 0.42 * o.g, pan: o.pan, soft: o.soft }); hiss(t, { dur: 0.07, filter: 'lowpass', ff: 2600, gain: 0.22 * o.g, pan: o.pan, soft: o.soft }); hiss(t, { dur: 0.012, filter: 'highpass', ff: 5000, gain: 0.12 * o.g, pan: o.pan, soft: o.soft }); },
183
+ // big drop: sub boom with a dark tail
184
+ boom: (t, o) => { voice(t, { f: [[0, 90], [0.08, 52], [1.6, 34]], dur: 1.7, gain: 0.7 * o.g, a: 0.006, hold: 0.12 }); hiss(t, { color: 'brown', dur: 0.6, filter: 'lowpass', ff: [[0, 600], [0.5, 90]], gain: 0.35 * o.g, verb: 0.3 }); duck(t, 0.7, 0.35); },
185
+ pop: (t, o) => { const f = o.f || 760; voice(t, { f: [[0, f * 1.7], [0.05, f]], dur: 0.08, gain: 0.22 * o.g, pan: o.pan, soft: o.soft }); hiss(t, { dur: 0.01, filter: 'highpass', ff: 4500, gain: 0.08 * o.g, pan: o.pan, soft: o.soft }); },
186
+ tick: (t, o) => hiss(t, { dur: 0.016, filter: 'bandpass', ff: o.f || 3800, q: 3, gain: 0.32 * o.g, pan: o.pan, soft: o.soft }),
187
+ click: (t, o) => { hiss(t, { dur: 0.012, filter: 'bandpass', ff: 3200, q: 2, gain: 0.35 * o.g, pan: o.pan }); hiss(t + 0.045, { dur: 0.01, filter: 'bandpass', ff: 2400, q: 2, gain: 0.22 * o.g, pan: o.pan }); },
188
+ whoosh: (t, o) => { const d = o.dur || 0.35, dir = o.dir || 1; hiss(t, { color: 'pink', dur: d, filter: 'bandpass', ff: [[0, 260], [d * 0.55, o.top || 3200], [d, 520]], q: 0.75, gain: 0.5 * o.g, a: d * 0.55, pan: [-0.7 * dir, 0.7 * dir], verb: 0.12, soft: o.soft }); hiss(t + d * 0.2, { dur: d * 0.6, filter: 'highpass', ff: [[0, 3000], [d * 0.6, 7000]], gain: 0.08 * o.g, a: d * 0.3, pan: [-0.4 * dir, 0.5 * dir], soft: o.soft }); },
189
+ riser: (t, o) => { const d = o.dur || 0.8; hiss(t, { color: 'pink', dur: d, filter: 'bandpass', ff: [[0, 300], [d, 5200]], q: 1.1, gain: 0.32 * o.g, a: d * 0.96, verb: 0.2, soft: o.soft }); voice(t, { type: 'sawtooth', f: [[0, 110], [d, 440]], dur: d, gain: 0.06 * o.g, a: d * 0.95, filter: 'lowpass', ff: [[0, 400], [d, 2400]], soft: o.soft }); },
190
+ glitch: (t, o) => { const r = CM.rng('gl' + t); for (let i = 0; i < 9; i++) voice(t + i * 0.021, { type: 'square', f: 180 + r() * 2200, dur: 0.018, gain: 0.07 * o.g, a: 0.001, hold: 0.012, pan: r() * 1.4 - 0.7 }); hiss(t, { dur: 0.2, filter: 'bandpass', ff: [[0, 4000], [0.2, 900]], q: 0.7, gain: 0.18 * o.g }); hiss(t + 0.1, { dur: 0.05, color: 'brown', gain: 0.25 * o.g }); },
191
+ ping: (t, o) => { voice(t, { f: 'E6', dur: 0.5, gain: 0.16 * o.g, a: 0.003, verb: 0.3, pan: o.pan }); voice(t + 0.11, { f: 'B6', dur: 0.7, gain: 0.14 * o.g, a: 0.003, verb: 0.35, pan: o.pan }); },
192
+ send: (t, o) => { voice(t, { f: [[0, 520], [0.11, 1500]], dur: 0.13, gain: 0.14 * o.g, pan: o.pan }); hiss(t, { dur: 0.1, filter: 'highpass', ff: [[0, 2000], [0.1, 6000]], gain: 0.07 * o.g, pan: o.pan }); },
193
+ keys: (t, o) => { const r = CM.rng('k' + t), end = t + (o.dur || 0.4); for (let x = t; x < end; x += 0.055 + r() * 0.035) { hiss(x, { dur: 0.014, filter: 'bandpass', ff: 3200 + r() * 900, q: 3, gain: 0.2 * o.g, pan: o.pan, soft: true }); voice(x, { f: 1900 + r() * 300, dur: 0.012, gain: 0.025 * o.g, pan: o.pan, soft: true }); } },
194
+ // highlighter / marker swipe: grainy felt drag
195
+ marker: (t, o) => { const d = o.dur || 0.25, r = CM.rng('m' + t); for (let x = 0; x < d; x += 0.022 + r() * 0.012) hiss(t + x, { dur: 0.03, filter: 'bandpass', ff: 1700 + r() * 900, q: 1.4, gain: 0.16 * o.g * (0.6 + r() * 0.5), pan: o.pan, soft: o.soft }); },
196
+ strike: (t, o) => { hiss(t, { dur: 0.15, filter: 'bandpass', ff: [[0, 1200], [0.15, 3200]], q: 1.2, gain: 0.3 * o.g, a: 0.02, pan: o.pan }); },
197
+ tapeStop: (t, o) => { voice(t, { type: 'sawtooth', f: [[0, 196], [0.62, 18]], dur: 0.66, gain: 0.22 * o.g, a: 0.004, hold: 0.3, filter: 'lowpass', ff: [[0, 1800], [0.6, 160]] }); voice(t, { f: [[0, 98], [0.62, 12]], dur: 0.66, gain: 0.3 * o.g, a: 0.004, hold: 0.3 }); hiss(t, { color: 'brown', dur: 0.5, filter: 'lowpass', ff: [[0, 900], [0.5, 120]], gain: 0.18 * o.g }); },
198
+ stamp: (t, o) => { voice(t, { f: [[0, 160], [0.18, 48]], dur: 0.28, gain: 0.6 * o.g }); hiss(t, { dur: 0.06, filter: 'bandpass', ff: 1300, q: 1.1, gain: 0.4 * o.g }); hiss(t + 0.004, { dur: 0.014, filter: 'highpass', ff: 4200, gain: 0.25 * o.g }); },
199
+ shimmer: (t, o) => { ['C6', 'E6', 'G6', 'B6', 'D7', 'E7'].forEach((n, i) => voice(t + i * 0.035, { f: n, dur: 0.75, gain: 0.045 * o.g, a: 0.003, verb: 0.45, pan: (i % 2 ? 0.35 : -0.35) })); },
200
+ sparkle: (t, o) => { const r = CM.rng('sp' + t); for (let i = 0; i < 5; i++) voice(t + i * 0.05, { f: 2400 + r() * 2400, dur: 0.25, gain: 0.03 * o.g, a: 0.002, verb: 0.4, pan: r() * 1.2 - 0.6 }); },
201
+ };
202
+ function play(name, t, opts = {}) { const fn = S[name]; if (!fn) throw new Error('unknown sound ' + name); fn(t, Object.assign({}, opts, { g: opts.gain == null ? 1 : opts.gain })); }
203
+
204
+ // ---------------- music: half-time beat with bass and soft pad ----------------
205
+ function music(t0, t1, p = {}) {
206
+ const bpm = p.bpm || 98, step = 60 / bpm / 4, bar = step * 16, g = p.gain == null ? 1 : p.gain;
207
+ const roots = p.roots || ['A1', 'F1', 'C2', 'G1'];
208
+ const pads = p.pads || [['A3', 'C4', 'E4'], ['F3', 'A3', 'C4'], ['C4', 'E4', 'G4'], ['G3', 'B3', 'D4']];
209
+ let bi = 0;
210
+ for (let tb = t0; tb < t1 - 0.05; tb += bar, bi++) {
211
+ const root = roots[bi % roots.length], pad = pads[bi % pads.length], blen = Math.min(bar, t1 - tb);
212
+ pad.forEach((n, k) => voice(tb, { type: 'triangle', f: n, dur: blen + 0.2, gain: 0.03 * g, a: 0.3, hold: blen - 0.5, filter: 'lowpass', ff: 1100, pan: (k - 1) * 0.35, verb: 0.3, bus: 'music' }));
213
+ for (let s = 0; s < 16; s++) {
214
+ const ts = tb + s * step; if (ts >= t1 - 0.02) break;
215
+ if (s === 0 || s === 10) { voice(ts, { f: [[0, 150], [0.09, 46]], dur: 0.32, gain: 0.5 * g, bus: 'music' }); hiss(ts, { dur: 0.012, filter: 'highpass', ff: 3000, gain: 0.05 * g, bus: 'music' }); }
216
+ if (s === 4 || s === 12) { hiss(ts, { dur: 0.16, filter: 'bandpass', ff: 1700, q: 0.8, gain: 0.26 * g, verb: 0.25, bus: 'music' }); hiss(ts + 0.008, { dur: 0.05, filter: 'highpass', ff: 4500, gain: 0.1 * g, bus: 'music' }); }
217
+ if (s % 2 === 0) hiss(ts, { dur: s % 4 === 2 ? 0.05 : 0.028, filter: 'highpass', ff: 7500, gain: (s % 4 === 2 ? 0.06 : 0.035) * g, bus: 'music' });
218
+ if ([0, 3, 6, 10, 14].includes(s)) voice(ts, { type: 'triangle', f: root, dur: step * 2.6, gain: 0.2 * g, a: 0.006, hold: step, filter: 'lowpass', ff: 380, bus: 'music' });
219
+ }
220
+ }
221
+ }
222
+ function drone(t0, t1, p = {}) { const d = t1 - t0, g = p.gain == null ? 1 : p.gain; voice(t0, { f: p.note || 'A1', dur: d, gain: 0.12 * g, a: d * 0.4, hold: d * 0.4, bus: 'music' }); hiss(t0, { color: 'pink', dur: d, filter: 'bandpass', ff: 900, q: 0.5, gain: 0.03 * g, a: d * 0.5, hold: d * 0.3, bus: 'amb' }); }
223
+ function finish() {
224
+ DUCKS.sort((a, b) => a.t - b.t);
225
+ for (const e of DUCKS) { const s = at(e.t); if (s + e.hold < ac.currentTime) continue; duckIn.gain.setTargetAtTime(1 - e.depth, Math.max(s, ac.currentTime), 0.008); duckIn.gain.setTargetAtTime(1, s + e.hold, 0.14); }
226
+ }
227
+ return { play, voice, hiss, music, drone, duck, finish, hz, vo: VO };
228
+ }
229
+ function live(score, from, opts = {}) {
230
+ const ac = new (window.AudioContext || window.webkitAudioContext)();
231
+ const k = kit(ac, Object.assign({}, opts, { from: from || 0, lead: 0.04 })); score(k); k.finish();
232
+ return () => { try { ac.close(); } catch (e) {} };
233
+ }
234
+ async function render(score, dur, sr = 48000, opts = {}) {
235
+ const len = Math.ceil(dur * sr), ac = new OfflineAudioContext(2, len, sr);
236
+ const k = kit(ac, Object.assign({}, opts, { from: 0 })); score(k); k.finish();
237
+ const buf = await ac.startRendering(), L = buf.getChannelData(0), R = buf.getChannelData(1), inter = new Float32Array(len * 2);
238
+ let peak = 0; for (let i = 0; i < len; i++) { inter[2 * i] = L[i]; inter[2 * i + 1] = R[i]; peak = Math.max(peak, Math.abs(L[i]), Math.abs(R[i])); }
239
+ return { inter, peak, sr, frames: len };
240
+ }
241
+ return { kit, live, render, hz };
242
+ })();
243
+
244
+ const STYLE = { name: 'Versus Split', em: 'Split', W: 720, H: 1280, three: false, footage: false, poster: 8.4,
245
+ fonts: 'family=Inter:wght@700;800;900',
246
+ loads: ['400 60px Anton', '800 30px Inter', '900 30px Inter'],
247
+ cat: { family: 'Shorts Format', fontsText: 'Anton, Inter (700 to 900)',
248
+ look: 'A head-to-head Short: the screen splits diagonally into coral and blue halves that slam in from the sides, a black VS badge with a yellow ring, two characters drawn in code, and stat bars that race toward each other row by row with a winner crown.',
249
+ how: 'Both sides slide in and collide, the VS badge slams, then each stat row runs: the two bars race out from the centre, the numbers count, and a small crown pops on the winner. A running score keeps track, and the final verdict slams at the end.',
250
+ demo: 'Cat vs dog',
251
+ replace: 'TL, the two SIDES (names, colours, the character painters), STATS (label, values, units, who wins), the verdict and scoreSound()',
252
+ keep: 'the diagonal split with slam-in, the VS badge, the character painters, the racing stat bars with counters, the winner crown, the running score and the verdict slam',
253
+ sizes: 'keep the names at 64 px or more, stat labels at 24 px or more and values at 28 px or more',
254
+ voLine: 'The halves slam in on the two names, each stat row starts as its label is read, the crown lands on the winner, and the verdict slams on the last word.',
255
+ full: '- Full mix (no voiceover): a fight-night beat, a "slam" for the halves, a whoosh per row, a ding for each crown and a crowd cheer for the verdict.',
256
+ voMix: '- Voiceover mix: the player calls SFX.live with { voiceover: true } once narration is loaded. Mark whooshes soft: true and keep the cheer short.',
257
+ sheet: [
258
+ 'Two halves split by a diagonal: coral (#ff6b4a) on the left, blue (#2b6cff) on the right. They slam in from the sides and hold.',
259
+ 'Each side gets a simple character drawn in code (shapes only, a clear silhouette and face) and its name in big white Anton.',
260
+ 'A black VS badge with a yellow (#ffd23f) ring sits on the seam and slams in after the halves.',
261
+ 'Stats sit in a dark translucent panel: the label in Inter 900 caps, two bars growing outward from the centre in each side\'s colour, values counting at the ends, and a yellow crown over the winner.',
262
+ 'Use real, typical values and footnote anything that only applies to one breed, model or case.',
263
+ 'Pace: halves in about 1 second, one stat row every 1.5 to 2 seconds, verdict held about 2 seconds.',
264
+ ],
265
+ sound: [
266
+ 'Bed: a punchy fight-night beat (kick and snare on padBed).',
267
+ 'Map events to the kit: halves get "slam" and "whoosh"; the badge gets "boom"; each row gets a soft "whoosh" and counter ticks; each crown gets a bright ding (SND.chime); the verdict gets "slam" and a crowd cheer (a wide noise swell).',
268
+ ] } };
269
+ const W = STYLE.W, H = STYLE.H;
270
+
271
+ // =====================================================================================================
272
+ // SHARED LIBRARY HELPERS (Style Library, Shorts set). Pure functions of t; all randomness seeded.
273
+ // W and H are the canvas size (set from STYLE). Coordinates are canvas pixels.
274
+ // =====================================================================================================
275
+ const { clamp, lerp, span, rng, noise1, ez } = CM;
276
+ const TAU = Math.PI * 2;
277
+ const rr = (c, x, y, w, h, r) => { c.beginPath(); c.roundRect(x, y, w, h, r); };
278
+ const lg = (c, x0, y0, x1, y1, stops) => { const g = c.createLinearGradient(x0, y0, x1, y1); stops.forEach(([o, col]) => g.addColorStop(o, col)); return g; };
279
+ const rg = (c, x, y, r0, r1, stops) => { const g = c.createRadialGradient(x, y, r0, x, y, r1); stops.forEach(([o, col]) => g.addColorStop(o, col)); return g; };
280
+ const fillAll = (c, f) => { c.fillStyle = f; c.fillRect(0, 0, W, H); };
281
+ // keyframe track: K = [[t, v1, v2, ...], ...], eased in-out between keys
282
+ function track(K, t, e = ez.inout3) {
283
+ if (t <= K[0][0]) return K[0].slice(1);
284
+ for (let i = 0; i < K.length - 1; i++) { const a = K[i], b = K[i + 1]; if (t <= b[0]) { const u = e((t - a[0]) / Math.max(1e-6, b[0] - a[0])); return a.slice(1).map((v, j) => lerp(v, b[j + 1], u)); } }
285
+ return K[K.length - 1].slice(1);
286
+ }
287
+ const textW = (c, s, font, ls = 0) => { c.save(); c.font = font; c.letterSpacing = ls + 'px'; const w = c.measureText(s).width; c.restore(); return w; };
288
+ const pxOf = (font) => parseFloat(/(\d+(?:\.\d+)?)px/.exec(font)[1]);
289
+ // text with options: a (align), b (baseline), ls (letter spacing), r (rotation), alpha, glow/gb, st/sw (stroke under fill), s (scale)
290
+ function txt(c, s, x, y, o = {}) {
291
+ c.save(); c.font = o.f || '700 40px Inter'; c.textAlign = o.a || 'left'; c.textBaseline = o.b || 'alphabetic'; c.letterSpacing = (o.ls || 0) + 'px';
292
+ c.translate(x, y); if (o.r) c.rotate(o.r); if (o.s != null) c.scale(o.s, o.s); if (o.alpha != null) c.globalAlpha *= o.alpha;
293
+ if (o.glow) { c.shadowColor = o.glow; c.shadowBlur = o.gb || 24; }
294
+ if (o.st) { c.lineJoin = 'round'; c.lineWidth = o.sw || 10; c.strokeStyle = o.st; c.strokeText(s, 0, 0); if (!o.glow) c.shadowColor = 'transparent'; }
295
+ if (o.c !== null) { c.fillStyle = o.c || '#fff'; c.fillText(s, 0, 0); }
296
+ c.restore();
297
+ }
298
+ // rounded label; returns its width. a: 'left' | 'center' | 'right' anchor at x; y is the top
299
+ function chip(c, s, x, y, o = {}) {
300
+ const f = o.f || '700 24px Inter', px = o.px == null ? pxOf(f) * 0.75 : o.px, h = o.h || pxOf(f) * 1.9, w = textW(c, s, f, o.ls || 0) + px * 2;
301
+ const x0 = o.a === 'center' ? x - w / 2 : o.a === 'right' ? x - w : x;
302
+ c.save(); if (o.alpha != null) c.globalAlpha *= o.alpha; if (o.shadow) { c.shadowColor = o.shadow; c.shadowBlur = o.sb || 24; c.shadowOffsetY = 8; }
303
+ rr(c, x0, y, w, h, o.r == null ? h / 2 : o.r); c.fillStyle = o.bg || '#fff'; c.fill(); c.shadowColor = 'transparent';
304
+ if (o.stroke) { c.strokeStyle = o.stroke; c.lineWidth = o.sw || 2; c.stroke(); }
305
+ txt(c, s, x0 + px, y + h / 2 + pxOf(f) * 0.05, { f, c: o.fg || '#111', b: 'middle', ls: o.ls }); c.restore(); return w;
306
+ }
307
+ // ---------- animation primitives ----------
308
+ const pop = (t, t0, d = 0.45, s = 1.9) => ez.back(span(t, t0, t0 + d), s);
309
+ const inn = (t, t0, d = 0.5) => ez.outExpo(span(t, t0, t0 + d));
310
+ const out = (t, t0, d = 0.35) => 1 - ez.in3(span(t, t0, t0 + d));
311
+ const typed = (full, t, a, b) => full.slice(0, Math.floor(full.length * span(t, a, b) + 1e-6));
312
+ const count = (v0, v1, t, a, b, e = ez.out3) => lerp(v0, v1, e(span(t, a, b)));
313
+ const pulse = (t, t0, d = 0.6) => { const u = (t - t0) / d; return u < 0 || u > 1 ? 0 : Math.sin(Math.PI * u); };
314
+ // a word slams in: big, blurred and transparent, settling with an expo ease
315
+ function slam(c, s, x, y, font, color, t0, t, o = {}) {
316
+ if (t < t0) return textW(c, s, font, o.ls || 0); const u = span(t, t0, t0 + (o.dur || 0.28)), e = ez.outExpo(u), sc = lerp(o.from || 1.9, 1, e);
317
+ c.save(); if (u < 1 && !o.noBlur) c.filter = `blur(${(1 - e) * 10}px)`;
318
+ txt(c, s, x, y, Object.assign({}, o, { f: font, c: color, s: sc * (o.s || 1), alpha: Math.min(1, e * 2.2) * (o.alpha == null ? 1 : o.alpha) })); c.restore();
319
+ return textW(c, s, font, o.ls || 0);
320
+ }
321
+ // a word rises from behind a mask line
322
+ function rise(c, s, x, y, font, color, t0, t, o = {}) {
323
+ const w = textW(c, s, font, o.ls || 0); if (t < t0) return w;
324
+ const px = pxOf(font), X = o.a === 'center' ? x - w / 2 : o.a === 'right' ? x - w : x, e = ez.outExpo(span(t, t0, t0 + (o.dur || 0.5)));
325
+ c.save(); c.beginPath(); c.rect(X - 20, y - px * 1.05, w + 40, px * 1.38); c.clip();
326
+ txt(c, s, X, y + (1 - e) * px * 1.0, { f: font, c: color, ls: o.ls, alpha: Math.min(1, e * 1.6) * (o.alpha == null ? 1 : o.alpha), st: o.st, sw: o.sw, glow: o.glow });
327
+ c.restore(); return w;
328
+ }
329
+ // words: [[text, t0, color?]]; kind: 'rise' | 'slam' | 'pop' | 'fade'; returns word boxes
330
+ function wordLine(c, words, x, y, font, color, t, o = {}) {
331
+ const sp = textW(c, ' ', font, o.ls || 0) * (o.space || 1), ws = words.map(([s]) => textW(c, s, font, o.ls || 0)), tot = ws.reduce((a, b) => a + b, 0) + sp * (words.length - 1);
332
+ let cx = o.a === 'center' ? x - tot / 2 : o.a === 'right' ? x - tot : x; const boxes = [];
333
+ words.forEach(([s, t0, col], i) => {
334
+ boxes.push({ x: cx, w: ws[i], y, t0 }); const k = o.kind || 'rise', cl = col || color;
335
+ if (k === 'slam') slam(c, s, cx + ws[i] / 2, y, font, cl, t0, t, Object.assign({}, o, { a: 'center' }));
336
+ else if (k === 'pop') { const p = pop(t, t0, 0.35); if (p > 0) txt(c, s, cx + ws[i] / 2, y, Object.assign({}, o, { f: font, c: cl, a: 'center', s: p, alpha: Math.min(1, p * 2) })); }
337
+ else if (k === 'fade') { const p = inn(t, t0, 0.4); if (p > 0) txt(c, s, cx, y + (1 - p) * 14, Object.assign({}, o, { f: font, c: cl, a: 'left', alpha: p * (o.alpha == null ? 1 : o.alpha) })); }
338
+ else rise(c, s, cx, y, font, cl, t0, t, Object.assign({}, o, { a: 'left' }));
339
+ cx += ws[i] + sp;
340
+ });
341
+ return boxes;
342
+ }
343
+ // highlighter swipe behind a word box, grows from the left
344
+ function swipeBehind(c, box, font, p, color, o = {}) {
345
+ if (p <= 0) return; const px = pxOf(font), pad = o.pad == null ? px * 0.16 : o.pad, e = ez.outExpo(clamp(p));
346
+ c.save(); c.fillStyle = color; if (o.skew) { c.translate(box.x, box.y); c.transform(1, 0, -0.18, 1, 0, 0); c.translate(-box.x, -box.y); }
347
+ rr(c, box.x - pad, box.y - px * (o.top || 0.86), (box.w + pad * 2) * e, px * (o.hh || 1.08), o.r == null ? px * 0.14 : o.r); c.fill(); c.restore();
348
+ }
349
+ // ---------- drawing helpers ----------
350
+ function leader(c, x1, y1, x2, y2, col = '#fff', w = 2, p = 1) {
351
+ if (p <= 0) return; c.save(); c.strokeStyle = col; c.fillStyle = col; c.lineWidth = w; c.beginPath(); c.moveTo(x1, y1); c.lineTo(lerp(x1, x2, clamp(p)), lerp(y1, y2, clamp(p))); c.stroke();
352
+ c.beginPath(); c.arc(x1, y1, w * 2.4, 0, TAU); c.fill(); c.restore();
353
+ }
354
+ function arrowHead(c, x, y, ang, s, col) { c.save(); c.translate(x, y); c.rotate(ang); c.fillStyle = col; c.beginPath(); c.moveTo(0, 0); c.lineTo(-s, -s * 0.55); c.lineTo(-s * 0.72, 0); c.lineTo(-s, s * 0.55); c.closePath(); c.fill(); c.restore(); }
355
+ // hand-drawn polyline revealed to progress p (0..1); jitter is seeded and stable
356
+ function hd(c, pts, o = {}) {
357
+ const p = o.p == null ? 1 : clamp(o.p); if (p <= 0) return; const r = rng(o.seed || 1), j = o.j == null ? 2 : o.j;
358
+ const J = pts.map(() => [(r() - 0.5) * j * 2, (r() - 0.5) * j * 2, (r() - 0.5) * j * 2, (r() - 0.5) * j * 2]);
359
+ let L = 0; const seg = []; for (let i = 1; i < pts.length; i++) { const d = Math.hypot(pts[i][0] - pts[i - 1][0], pts[i][1] - pts[i - 1][1]); seg.push(d); L += d; }
360
+ c.save(); c.strokeStyle = o.col || '#111'; c.lineWidth = o.w || 4; c.lineCap = c.lineJoin = 'round'; if (o.alpha != null) c.globalAlpha *= o.alpha;
361
+ for (let pass = 0; pass < (o.passes || 2); pass++) {
362
+ let left = L * p; c.beginPath(); c.moveTo(pts[0][0] + J[0][pass * 2], pts[0][1] + J[0][pass * 2 + 1]);
363
+ for (let i = 1; i < pts.length && left > 0; i++) { const u = Math.min(1, left / seg[i - 1]); left -= seg[i - 1];
364
+ c.lineTo(lerp(pts[i - 1][0] + J[i - 1][pass * 2], pts[i][0] + J[i][pass * 2], u), lerp(pts[i - 1][1] + J[i - 1][pass * 2 + 1], pts[i][1] + J[i][pass * 2 + 1], u)); }
365
+ c.stroke(); c.lineWidth *= 0.6; }
366
+ c.restore();
367
+ }
368
+ const ellipsePts = (cx, cy, rx, ry, turns = 1.08, n = 48, a0 = -0.5) => Array.from({ length: n + 1 }, (_, i) => { const a = a0 + i / n * TAU * turns, k = 1 + 0.03 * Math.sin(i * 1.7) + i * 0.0015; return [cx + Math.cos(a) * rx * k, cy + Math.sin(a) * ry * k]; });
369
+ const quadPts = (a, q, b, n = 40) => Array.from({ length: n + 1 }, (_, i) => { const u = i / n, v = 1 - u; return [v * v * a[0] + 2 * v * u * q[0] + u * u * b[0], v * v * a[1] + 2 * v * u * q[1] + u * u * b[1]]; });
370
+ function polyPart(c, pts, p) { const n = Math.max(2, Math.ceil(pts.length * clamp(p))); c.beginPath(); pts.slice(0, n).forEach(([x, y], i) => (i ? c.lineTo(x, y) : c.moveTo(x, y))); }
371
+ function blob(c, cx, cy, r, seed, k = 0.28, n = 18, sq = 0.85) { const R = rng(seed), rs = Array.from({ length: n }, () => 1 + (R() - 0.5) * 2 * k); c.beginPath(); for (let i = 0; i <= n; i++) { const a = i / n * TAU, q = rs[i % n]; const x = cx + Math.cos(a) * r * q, y = cy + Math.sin(a) * r * q * sq; i ? c.lineTo(x, y) : c.moveTo(x, y); } c.closePath(); }
372
+ function star(c, x, y, r1, r2, n = 5, rot = -Math.PI / 2) { c.beginPath(); for (let i = 0; i < n * 2; i++) { const a = rot + i / (n * 2) * TAU, q = i % 2 ? r2 : r1; c.lineTo(x + Math.cos(a) * q, y + Math.sin(a) * q); } c.closePath(); }
373
+ // pre-baked grain tiles, stepped at 24 fps
374
+ const GRAIN = (() => { const tiles = []; for (let k = 0; k < 6; k++) { const L = CM.layer(256, 256), x = L.getContext('2d'), r = rng('grain' + k), d = x.createImageData(256, 256); for (let i = 0; i < d.data.length; i += 4) { const v = r() * 255; d.data[i] = d.data[i + 1] = d.data[i + 2] = v; d.data[i + 3] = 255; } x.putImageData(d, 0, 0); tiles.push(L); } return tiles; })();
375
+ function grain(c, t, a = 0.06, mode = 'overlay') { c.save(); c.globalAlpha = a; c.globalCompositeOperation = mode; const tile = GRAIN[Math.floor(t * 24) % 6], pat = c.createPattern(tile, 'repeat'), r = rng(Math.floor(t * 24)); c.translate(-r() * 256, -r() * 256); c.fillStyle = pat; c.fillRect(0, 0, W + 512, H + 512); c.restore(); }
376
+ function vignette(c, a = 0.5, inner = 0.3, outer = 0.8) { c.fillStyle = rg(c, W / 2, H / 2, Math.max(W, H) * inner, Math.max(W, H) * outer, [[0, 'rgba(0,0,0,0)'], [1, `rgba(0,0,0,${a})`]]); c.fillRect(0, 0, W, H); }
377
+ // a simple faceless presenter used as a stand-in for footage
378
+ function person(c, cx, by, s, o = {}) {
379
+ const sk = o.skin || '#d9a284', hr = o.hair || '#2a1d17', shirt = o.shirt || '#2f4b7c', tilt = o.tilt || 0;
380
+ c.save(); c.translate(cx, by); c.rotate(tilt * 0.02); c.translate(-cx, -by);
381
+ c.fillStyle = shirt; c.beginPath(); c.moveTo(cx - 128 * s, by); c.bezierCurveTo(cx - 124 * s, by - 96 * s, cx - 86 * s, by - 132 * s, cx - 34 * s, by - 142 * s); c.lineTo(cx + 34 * s, by - 142 * s); c.bezierCurveTo(cx + 86 * s, by - 132 * s, cx + 124 * s, by - 96 * s, cx + 128 * s, by); c.closePath(); c.fill();
382
+ c.fillStyle = 'rgba(0,0,0,.18)'; c.beginPath(); c.moveTo(cx - 24 * s, by - 142 * s); c.lineTo(cx, by - 112 * s); c.lineTo(cx + 24 * s, by - 142 * s); c.fill();
383
+ c.fillStyle = sk; rr(c, cx - 21 * s, by - 178 * s, 42 * s, 48 * s, 12 * s); c.fill();
384
+ const hy = by - 220 * s + (o.nod || 0) * s; c.beginPath(); c.ellipse(cx, hy, 45 * s, 56 * s, 0, 0, TAU); c.fill();
385
+ c.beginPath(); c.ellipse(cx - 45 * s, hy + 6 * s, 7 * s, 12 * s, 0, 0, TAU); c.ellipse(cx + 45 * s, hy + 6 * s, 7 * s, 12 * s, 0, 0, TAU); c.fill();
386
+ c.fillStyle = rg(c, cx + 26 * s, hy + 10 * s, 4 * s, 60 * s, [[0, 'rgba(0,0,0,0)'], [1, 'rgba(0,0,0,.22)']]); c.beginPath(); c.ellipse(cx, hy, 45 * s, 56 * s, 0, 0, TAU); c.fill();
387
+ c.fillStyle = hr; c.beginPath(); c.ellipse(cx, hy - 18 * s, 49 * s, 42 * s, 0, Math.PI * 0.98, Math.PI * 2.02); c.fill(); c.beginPath(); c.ellipse(cx + 8 * s, hy - 42 * s, 40 * s, 20 * s, -0.2, 0, TAU); c.fill();
388
+ c.restore();
389
+ }
390
+ // footage: your own clip when loaded (window.loadFootage), else a defocused room with a faceless presenter
391
+ const FOOT = { video: null };
392
+ function footage(c, x, y, w, h, t, o = {}) {
393
+ c.save(); rr(c, x, y, w, h, o.r || 0); c.clip();
394
+ const v = FOOT.video;
395
+ if (v && v.readyState >= 2) { const s = Math.max(w / v.videoWidth, h / v.videoHeight), z = o.zoom || 1; c.translate(x + w / 2, y + h / 2); c.scale(z, z); c.drawImage(v, -v.videoWidth * s / 2, -v.videoHeight * s / 2, v.videoWidth * s, v.videoHeight * s); c.restore(); return true; }
396
+ const z = o.zoom || 1; c.translate(x + w / 2, y + h / 2); c.scale(z, z); c.translate(-(x + w / 2), -(y + h / 2));
397
+ c.fillStyle = lg(c, x, y, x, y + h, [[0, o.bg ? o.bg[0] : '#5a6b7d'], [1, o.bg ? o.bg[1] : '#2a3340']]); c.fillRect(x, y, w, h);
398
+ const r = rng(o.seed || 5); c.filter = `blur(${Math.max(4, w / 90)}px)`;
399
+ c.fillStyle = o.win || 'rgba(255,240,210,.22)'; c.fillRect(x + w * 0.08, y + h * 0.1, w * 0.32, h * 0.42);
400
+ c.fillStyle = 'rgba(0,0,0,.16)'; c.fillRect(x + w * 0.62, y + h * 0.18, w * 0.3, h * 0.07); c.fillRect(x + w * 0.62, y + h * 0.33, w * 0.3, h * 0.07);
401
+ for (let i = 0; i < 14; i++) { const bx = x + r() * w, by2 = y + r() * h * 0.7, br = (0.02 + r() * 0.05) * w; c.fillStyle = rg(c, bx, by2, 0, br, [[0, o.bokeh || 'rgba(255,214,150,.5)'], [1, 'rgba(255,214,150,0)']]); c.beginPath(); c.arc(bx, by2, br, 0, TAU); c.fill(); }
402
+ c.filter = 'none';
403
+ const nod = Math.sin(t * 2.1) * 3 + Math.sin(t * 5.3) * 1.2, sway = Math.sin(t * 0.9) * 0.6;
404
+ person(c, x + w / 2 + (o.dx || 0) * w, y + h + (o.dy || 0) * h, (o.s || 1.25) * h / 1280 * 2, Object.assign({}, o, { nod, tilt: sway }));
405
+ c.fillStyle = rg(c, x + w / 2, y + h / 2, Math.min(w, h) * 0.3, Math.max(w, h) * 0.75, [[0, 'rgba(0,0,0,0)'], [1, 'rgba(0,0,0,.42)']]); c.fillRect(x, y, w, h);
406
+ c.restore(); return false;
407
+ }
408
+ // ---------- scene layers and cuts ----------
409
+ const LA = CM.layer(W, H), LB = CM.layer(W, H);
410
+ function sceneLayer(L, draw, t) { const x = L.getContext('2d'); x.setTransform(1, 0, 0, 1, 0, 0); x.globalAlpha = 1; x.globalCompositeOperation = 'source-over'; x.filter = 'none'; x.clearRect(0, 0, W, H); draw(x, t); return L; }
411
+ // cut types: push (dir), up, fade, zoom (x, y), whip (dir), flash (color), iris (x, y, color), glitch, wipe (color), page
412
+ function composite(ctx, t, SCENES, CUTS, background) {
413
+ ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.globalAlpha = 1; ctx.globalCompositeOperation = 'source-over'; ctx.filter = 'none';
414
+ if (background) background(ctx, t);
415
+ let idx = 0; for (const c of CUTS) if (t >= c.t) idx++;
416
+ const cut = CUTS.find((c) => t >= c.t && t < c.t + c.d);
417
+ if (!cut) { ctx.drawImage(sceneLayer(LA, SCENES[idx], t), 0, 0); return; }
418
+ const u = (t - cut.t) / cut.d, e = ez.inout3(u), A = sceneLayer(LA, SCENES[idx - 1], t), B = sceneLayer(LB, SCENES[idx], t), dir = cut.dir || 1;
419
+ const ty = cut.type;
420
+ if (ty === 'push' || ty === 'up') {
421
+ const vx = ty === 'push', s = 1 - 0.04 * Math.sin(Math.PI * u), D = vx ? W : H;
422
+ for (const [L, off] of [[A, -e * D * dir], [B, (1 - e) * D * dir]]) { ctx.save(); ctx.translate(W / 2 + (vx ? off : 0), H / 2 + (vx ? 0 : off)); ctx.scale(s, s); ctx.drawImage(L, -W / 2, -H / 2); ctx.restore(); }
423
+ } else if (ty === 'whip') {
424
+ const L = u < 0.5 ? A : B, off = (u < 0.5 ? -ez.in3(u * 2) : 1 - ez.out3((u - 0.5) * 2)) * W * dir;
425
+ for (let i = 0; i < 7; i++) { ctx.save(); ctx.globalAlpha = 0.22; ctx.drawImage(L, off + (i - 3) * 26 * Math.sin(Math.PI * u) * dir, 0); ctx.restore(); }
426
+ } else if (ty === 'zoom') {
427
+ const z = lerp(1, 3.2, ez.in3(clamp(u / 0.65))); ctx.save(); ctx.globalAlpha = 1 - span(u, 0.38, 0.65); ctx.translate(cut.x, cut.y); ctx.scale(z, z); ctx.drawImage(A, -cut.x, -cut.y); ctx.restore();
428
+ const zb = lerp(1.15, 1, ez.out3(span(u, 0.35, 1))); ctx.save(); ctx.globalAlpha = span(u, 0.35, 0.72); ctx.translate(W / 2, H / 2); ctx.scale(zb, zb); ctx.drawImage(B, -W / 2, -H / 2); ctx.restore();
429
+ } else if (ty === 'flash') {
430
+ ctx.drawImage(u < 0.5 ? A : B, 0, 0); ctx.fillStyle = cut.color || '#fff'; ctx.globalAlpha = 1 - Math.abs(u - 0.5) * 2; ctx.fillRect(0, 0, W, H); ctx.globalAlpha = 1;
431
+ } else if (ty === 'iris') {
432
+ const cx = cut.x == null ? W / 2 : cut.x, cy = cut.y == null ? H / 2 : cut.y, R = Math.hypot(W, H);
433
+ if (u < 0.5) { const r = R * (1 - ez.in3(u * 2)); ctx.fillStyle = cut.color || '#111'; ctx.fillRect(0, 0, W, H); ctx.save(); ctx.beginPath(); ctx.arc(cx, cy, r, 0, TAU); ctx.clip(); ctx.drawImage(A, 0, 0); ctx.restore(); if (cut.ring) { ctx.strokeStyle = cut.ring; ctx.lineWidth = 14; ctx.beginPath(); ctx.arc(cx, cy, r, 0, TAU); ctx.stroke(); } }
434
+ else { const r = R * ez.out3((u - 0.5) * 2); ctx.fillStyle = cut.color || '#111'; ctx.fillRect(0, 0, W, H); ctx.save(); ctx.beginPath(); ctx.arc(cx, cy, r, 0, TAU); ctx.clip(); ctx.drawImage(B, 0, 0); ctx.restore(); if (cut.ring) { ctx.strokeStyle = cut.ring; ctx.lineWidth = 14; ctx.beginPath(); ctx.arc(cx, cy, r, 0, TAU); ctx.stroke(); } }
435
+ } else if (ty === 'glitch') {
436
+ const L = u < 0.5 ? A : B, r = rng('cut' + Math.floor(t * 30)); ctx.drawImage(L, 0, 0);
437
+ for (let i = 0; i < 9; i++) { const y = r() * H, h = 10 + r() * H * 0.06, dx = (r() - 0.5) * W * 0.18 * Math.sin(Math.PI * u); ctx.drawImage(L, 0, y, W, h, dx, y, W, h); }
438
+ ctx.globalCompositeOperation = 'screen'; ctx.globalAlpha = 0.5 * Math.sin(Math.PI * u); ctx.fillStyle = '#ff0040'; ctx.fillRect(0, 0, W, H); ctx.globalAlpha = 1; ctx.globalCompositeOperation = 'source-over';
439
+ } else if (ty === 'wipe') {
440
+ ctx.drawImage(A, 0, 0); const x = lerp(-W * 0.3, W * 1.3, e); ctx.save(); ctx.beginPath(); ctx.moveTo(x - H * 0.3, 0); ctx.lineTo(-10, 0); ctx.lineTo(-10, H); ctx.lineTo(x + H * 0.3 - H * 0.6, H); ctx.lineTo(x - H * 0.3 + 0, 0); ctx.closePath();
441
+ ctx.beginPath(); ctx.moveTo(-10, 0); ctx.lineTo(x, 0); ctx.lineTo(x - H * 0.35, H); ctx.lineTo(-10, H); ctx.closePath(); ctx.clip(); ctx.drawImage(B, 0, 0); ctx.restore();
442
+ if (cut.color) { ctx.save(); ctx.strokeStyle = cut.color; ctx.lineWidth = 26; ctx.beginPath(); ctx.moveTo(x, 0); ctx.lineTo(x - H * 0.35, H); ctx.stroke(); ctx.restore(); }
443
+ } else if (ty === 'page') {
444
+ ctx.drawImage(B, 0, 0); const x = W * (1 - e); ctx.save(); ctx.beginPath(); ctx.rect(0, 0, x, H); ctx.clip(); ctx.drawImage(A, 0, 0); ctx.restore();
445
+ ctx.fillStyle = lg(ctx, x - 60, 0, x + 40, 0, [[0, 'rgba(0,0,0,0)'], [0.6, 'rgba(0,0,0,0.25)'], [1, 'rgba(0,0,0,0)']]); ctx.fillRect(x - 60, 0, 100, H);
446
+ } else { ctx.save(); ctx.globalAlpha = 1 - e; ctx.drawImage(A, 0, 0); ctx.globalAlpha = e; ctx.drawImage(B, 0, 0); ctx.restore(); }
447
+ }
448
+ // camera: zoom z about (x, y), with optional rotation and shake
449
+ function cam(c, x, y, z = 1, rot = 0) { c.translate(x, y); c.scale(z, z); if (rot) c.rotate(rot); c.translate(-x, -y); }
450
+ function shake(c, t, hits, amp = 14, d = 0.35) { let dx = 0, dy = 0; for (const h of hits) { const u = (t - h) / d; if (u > 0 && u < 1) { const k = (1 - u) * amp; dx += Math.sin(u * 61) * k; dy += Math.cos(u * 47) * k; } } c.translate(dx, dy); }
451
+ function punch(t, hits, amt = 0.06, d = 0.45) { let z = 1; for (const h of hits) { const u = (t - h) / d; if (u > 0 && u < 1) z += amt * Math.exp(-u * 4) * Math.sin(Math.min(1, u * 6) * Math.PI / 2); } return z; }
452
+ // ---------- Three.js (3D styles) ----------
453
+ function makeGL() { if (typeof THREE === 'undefined') return null; const r = new THREE.WebGLRenderer({ antialias: true, preserveDrawingBuffer: true, alpha: true }); r.setPixelRatio(1); r.setSize(W, H, false); r.shadowMap.enabled = true; r.shadowMap.type = THREE.PCFSoftShadowMap; r.setClearColor(0x000000, 0); return r; }
454
+ function lights3(s, o) {
455
+ const out = {};
456
+ if (o.hemi) s.add(out.hemi = new THREE.HemisphereLight(o.hemi[0], o.hemi[1], o.hemi[2]));
457
+ if (o.amb) s.add(out.amb = new THREE.AmbientLight(o.amb[0], o.amb[1]));
458
+ if (o.dir) { const d = out.dir = new THREE.DirectionalLight(o.dir[0], o.dir[1]); d.position.set(o.dir[2], o.dir[3], o.dir[4]);
459
+ if (o.shadow) { d.castShadow = true; d.shadow.mapSize.set(2048, 2048); const sc = d.shadow.camera; sc.left = -o.shadow; sc.right = o.shadow; sc.top = o.shadow; sc.bottom = -o.shadow; sc.near = 0.5; sc.far = 90; d.shadow.bias = -0.0006; }
460
+ s.add(d); }
461
+ out.points = (o.points || []).map(([col, int, x, y, z, dist]) => { const p = new THREE.PointLight(col, int, dist || 0); p.position.set(x, y, z); s.add(p); return p; });
462
+ return out;
463
+ }
464
+ const M3 = (g, color, o = {}) => { const m = new THREE.Mesh(g, new THREE.MeshStandardMaterial(Object.assign({ color, roughness: 0.85, metalness: 0 }, o))); m.castShadow = m.receiveShadow = true; return m; };
465
+ const P3 = (g, color, o = {}) => { const m = new THREE.Mesh(g, new THREE.MeshPhysicalMaterial(Object.assign({ color, roughness: 0.2, metalness: 0, clearcoat: 1, clearcoatRoughness: 0.1 }, o))); m.castShadow = m.receiveShadow = true; return m; };
466
+ const put = (parent, m, x = 0, y = 0, z = 0) => { m.position.set(x, y, z); parent.add(m); return m; };
467
+ const proj3 = (camera, v) => { const p = v.clone().project(camera); return [(p.x + 1) / 2 * W, (1 - p.y) / 2 * H, p.z]; };
468
+ // ---------- sound helpers ----------
469
+ function padBed(k, t0, t1, o = {}) {
470
+ const bpm = o.bpm || 90, beat = 60 / bpm, bar = beat * 4, chords = o.chords || [['A3', 'C4', 'E4'], ['F3', 'A3', 'C4'], ['C4', 'E4', 'G4'], ['G3', 'B3', 'D4']], g = o.gain == null ? 1 : o.gain;
471
+ let i = 0;
472
+ for (let tb = t0; tb < t1 - 0.1; tb += bar, i++) {
473
+ const ch = chords[i % chords.length], len = Math.min(bar, t1 - tb);
474
+ ch.forEach((n, j) => { k.voice(tb, { type: o.wave || 'triangle', f: n, dur: len + 0.4, gain: 0.026 * g, a: 0.5, hold: Math.max(0, len - 0.9), filter: 'lowpass', ff: o.cut || 1300, pan: (j - (ch.length - 1) / 2) * 0.3, verb: 0.3, bus: 'music' }); });
475
+ k.voice(tb, { f: k.hz(ch[0]) / 2, dur: len + 0.2, gain: 0.05 * g, a: 0.3, hold: Math.max(0, len - 0.6), bus: 'music' });
476
+ for (let b = 0; b < 8; b++) {
477
+ const ts = tb + b * beat / 2; if (ts >= t1 - 0.05) break;
478
+ if (o.hats && ts >= o.hats[0] && ts < o.hats[1]) k.hiss(ts, { dur: b % 2 ? 0.03 : 0.045, filter: 'highpass', ff: 8000, gain: (b % 2 ? 0.014 : 0.022) * g, bus: 'music' });
479
+ if (o.kick && ts >= o.kick[0] && ts < o.kick[1] && (b === 0 || b === 4)) k.voice(ts, { f: [[0, 120], [0.09, 46]], dur: 0.26, gain: 0.16 * g, bus: 'music' });
480
+ if (o.snare && ts >= o.snare[0] && ts < o.snare[1] && (b === 2 || b === 6)) k.hiss(ts, { dur: 0.14, filter: 'bandpass', ff: 1800, q: 0.8, gain: 0.08 * g, verb: 0.2, bus: 'music' });
481
+ }
482
+ }
483
+ }
484
+ // overall level wrapper so a score can be written at comfortable gains
485
+ function gainKit(k0, G) { return Object.assign({}, k0, { voice: (t, p) => k0.voice(t, Object.assign({}, p, { gain: (p.gain == null ? 0.3 : p.gain) * G })), hiss: (t, p) => k0.hiss(t, Object.assign({}, p, { gain: (p.gain == null ? 0.3 : p.gain) * G })), play: (n, t, o = {}) => k0.play(n, t, Object.assign({}, o, { gain: (o.gain == null ? 1 : o.gain) * G })) }); }
486
+ const SND = {
487
+ tick1: (k, t, pan = 0, g = 1) => { k.voice(t, { f: [[0, 760], [0.05, 1150]], dur: 0.07, gain: 0.07 * g, pan, soft: true }); k.hiss(t, { dur: 0.012, filter: 'highpass', ff: 6000, gain: 0.05 * g, pan, soft: true }); },
488
+ chime: (k, t, pan = 0, g = 1, n = ['C6', 'G6']) => { k.voice(t, { f: n[0], dur: 0.5, gain: 0.08 * g, a: 0.003, verb: 0.3, pan }); k.voice(t + 0.07, { f: n[1], dur: 0.6, gain: 0.07 * g, a: 0.003, verb: 0.3, pan }); },
489
+ swipe: (k, t, pan = 0, g = 1) => { k.hiss(t, { dur: 0.24, filter: 'bandpass', ff: [[0, 2400], [0.22, 6200]], q: 1.2, gain: 0.14 * g, a: 0.08, pan }); k.voice(t + 0.12, { f: 'E6', dur: 0.5, gain: 0.05 * g, verb: 0.35, pan }); },
490
+ tap: (k, t, pan = 0, g = 1, f = 420) => { k.voice(t, { f: [[0, f * 1.6], [0.04, f]], dur: 0.09, gain: 0.16 * g, pan, soft: true }); k.hiss(t, { dur: 0.02, filter: 'bandpass', ff: 1200, q: 1.5, gain: 0.08 * g, pan, soft: true }); },
491
+ paper: (k, t, pan = 0, g = 1, d = 0.28) => k.hiss(t, { color: 'pink', dur: d, filter: 'bandpass', ff: [[0, 700], [d, 3200]], q: 0.8, gain: 0.12 * g, a: d * 0.4, pan: [pan - 0.3, pan + 0.3], soft: true }),
492
+ bloop: (k, t, pan = 0, g = 1, f = 520) => k.voice(t, { f: [[0, f], [0.12, f * 1.5]], dur: 0.16, gain: 0.12 * g, pan, verb: 0.15 }),
493
+ pluck: (k, t, n, pan = 0, g = 1) => { k.voice(t, { type: 'triangle', f: n, dur: 0.6, gain: 0.1 * g, a: 0.002, verb: 0.3, pan }); k.voice(t, { f: n, dur: 0.25, gain: 0.05 * g, a: 0.002, pan }); },
494
+ chord: (k, t, notes, g = 1, d = 1.6) => notes.forEach((n, i) => k.voice(t + i * 0.05, { f: n, dur: d, gain: 0.05 * g, a: 0.01, verb: 0.4, pan: (i - (notes.length - 1) / 2) * 0.25 })),
495
+ scratch: (k, t, d = 0.2, pan = 0, g = 1) => { const r = CM.rng('sc' + t); for (let x = 0; x < d; x += 0.018 + r() * 0.01) k.hiss(t + x, { dur: 0.025, filter: 'bandpass', ff: 2600 + r() * 1800, q: 2, gain: 0.08 * g * (0.5 + r() * 0.6), pan, soft: true }); },
496
+ thud: (k, t, g = 1) => { k.voice(t, { f: [[0, 110], [0.15, 45]], dur: 0.3, gain: 0.35 * g }); k.hiss(t, { color: 'brown', dur: 0.15, filter: 'lowpass', ff: 500, gain: 0.2 * g }); },
497
+ beep: (k, t, f = 880, d = 0.12, g = 1, pan = 0) => k.voice(t, { type: 'square', f, dur: d, gain: 0.05 * g, a: 0.002, hold: d * 0.7, filter: 'lowpass', ff: 3000, pan }),
498
+ };
499
+
500
+ // =====================================================================================================
501
+ // STYLE: Versus Split
502
+ // A diagonal split, a VS badge, racing stat bars with crowns, and a verdict.
503
+ // Demo topic: "Cat vs dog".
504
+ // =====================================================================================================
505
+ const C = { L: '#ff6b4a', R: '#2b6cff', yellow: '#ffd23f', ink: '#ffffff', panel: 'rgba(0,0,0,0.28)' };
506
+ const ANT = (px) => `400 ${px}px Anton, Impact, sans-serif`, BODY = (px, w = 900) => `${w} ${px}px Inter, system-ui, sans-serif`;
507
+ const TL = { D: 13, halves: 0.2, badge: 0.9, rows: [2.4, 4.4, 6.4], verdict: 9.4 };
508
+ // [label, left value, right value, left text, right text, winner 0 or 1]
509
+ const STATS = [['SLEEP PER DAY', 15, 13, '12–16 h', '12–14 h', 0], ['TOP SPEED', 48, 70, '48 km/h', '70 km/h*', 1], ['SCENT RECEPTORS', 80, 300, '~80 M', 'up to 300 M', 1]];
510
+ function cat(c, x, y, s) { c.save(); c.translate(x, y); c.scale(s, s); c.fillStyle = '#fff'; c.beginPath(); c.moveTo(-40, -20); c.lineTo(-34, -62); c.lineTo(-10, -36); c.lineTo(10, -36); c.lineTo(34, -62); c.lineTo(40, -20); c.quadraticCurveTo(46, 36, 0, 40); c.quadraticCurveTo(-46, 36, -40, -20); c.fill(); c.fillStyle = '#222'; c.beginPath(); c.ellipse(-15, 0, 5, 8, 0, 0, TAU); c.ellipse(15, 0, 5, 8, 0, 0, TAU); c.fill(); c.fillStyle = '#ff8fab'; c.beginPath(); c.moveTo(-5, 14); c.lineTo(5, 14); c.lineTo(0, 20); c.fill(); c.strokeStyle = '#222'; c.lineWidth = 1.5; [-1, 1].forEach((sd) => [-4, 3].forEach((o) => { c.beginPath(); c.moveTo(sd * 10, 18 + o); c.lineTo(sd * 38, 14 + o * 2); c.stroke(); })); c.restore(); }
511
+ function dog(c, x, y, s) { c.save(); c.translate(x, y); c.scale(s, s); c.fillStyle = '#8b5a2b'; c.beginPath(); c.ellipse(-38, -4, 14, 32, 0.35, 0, TAU); c.ellipse(38, -4, 14, 32, -0.35, 0, TAU); c.fill(); c.fillStyle = '#fff'; c.beginPath(); c.ellipse(0, 0, 38, 42, 0, 0, TAU); c.fill(); c.fillStyle = '#222'; c.beginPath(); c.arc(-14, -6, 5, 0, TAU); c.arc(14, -6, 5, 0, TAU); c.fill(); c.beginPath(); c.ellipse(0, 14, 10, 7, 0, 0, TAU); c.fill(); c.fillStyle = '#ff6b6b'; c.beginPath(); c.ellipse(0, 30, 7, 9, 0, 0, Math.PI); c.fill(); c.restore(); }
512
+ function crown(c, x, y, p) { if (p <= 0) return; c.save(); c.translate(x, y); c.scale(p, p); c.fillStyle = C.yellow; c.beginPath(); c.moveTo(-20, 10); c.lineTo(-22, -12); c.lineTo(-10, 0); c.lineTo(0, -16); c.lineTo(10, 0); c.lineTo(22, -12); c.lineTo(20, 10); c.closePath(); c.fill(); c.restore(); }
513
+ function explainer(c, t) {
514
+ c.setTransform(1, 0, 0, 1, 0, 0); c.globalAlpha = 1; c.filter = 'none'; fillAll(c, '#111');
515
+ const e = ez.outExpo(span(t, TL.halves, TL.halves + 0.5)); c.save(); shake(c, t, [TL.halves + 0.45, TL.badge], 12, 0.3);
516
+ c.fillStyle = C.L; c.beginPath(); c.moveTo(-W * (1 - e), 0); c.lineTo(W * 0.62 - W * (1 - e), 0); c.lineTo(W * 0.38 - W * (1 - e), H); c.lineTo(-W * (1 - e), H); c.fill();
517
+ c.fillStyle = C.R; c.beginPath(); c.moveTo(W * 0.62 + W * (1 - e), 0); c.lineTo(W + W * (1 - e), 0); c.lineTo(W + W * (1 - e), H); c.lineTo(W * 0.38 + W * (1 - e), H); c.fill();
518
+ if (e > 0.5) { cat(c, 170 - W * (1 - e), 290, 1.7); dog(c, 550 + W * (1 - e), 290, 1.7); txt(c, 'CAT', 170 - W * (1 - e), 470, { f: ANT(80), c: '#fff', a: 'center' }); txt(c, 'DOG', 550 + W * (1 - e), 470, { f: ANT(80), c: '#fff', a: 'center' }); }
519
+ { const p = ez.back(span(t, TL.badge, TL.badge + 0.35), 2.4); if (p > 0) { c.save(); c.translate(360, 380); c.scale(p, p); c.fillStyle = '#111'; c.beginPath(); c.arc(0, 0, 70, 0, TAU); c.fill(); c.strokeStyle = C.yellow; c.lineWidth = 8; c.stroke(); txt(c, 'VS', 0, 26, { f: ANT(72), c: '#fff', a: 'center' }); c.restore(); } }
520
+ c.restore();
521
+ // stats
522
+ { const p = inn(t, TL.rows[0] - 0.4, 0.4); if (p > 0) { c.save(); c.globalAlpha = p; rr(c, 24, 560, 672, 560, 30); c.fillStyle = C.panel; c.fill(); c.restore(); } }
523
+ let sL = 0, sR = 0;
524
+ STATS.forEach(([lab, a, b, ta, tb, win], i) => { const t0 = TL.rows[i], p = inn(t, t0, 0.3); if (p <= 0) return; const y = 640 + i * 160, mx = Math.max(a, b), L2 = 270, g = ez.out3(span(t, t0 + 0.2, t0 + 1.2));
525
+ txt(c, lab, 360, y, { f: BODY(26), c: '#fff', a: 'center', ls: 2, alpha: p });
526
+ c.fillStyle = 'rgba(255,255,255,0.15)'; rr(c, 360 - L2 - 6, y + 20, L2, 36, 10); c.fill(); rr(c, 366, y + 20, L2, 36, 10); c.fill();
527
+ c.fillStyle = '#ffffff'; rr(c, 360 - 6 - L2 * a / mx * g, y + 20, L2 * a / mx * g, 36, 10); c.fill(); c.fillStyle = '#0d1b3d'; rr(c, 366, y + 20, L2 * b / mx * g, 36, 10); c.fill();
528
+ txt(c, ta, 60, y + 104, { f: BODY(32), c: '#fff', alpha: g }); txt(c, tb, 660, y + 104, { f: BODY(32), c: '#fff', a: 'right', alpha: g });
529
+ const cp = pop(t, t0 + 1.3, 0.4, 2.6); crown(c, win ? 640 : 80, y - 10, cp); if (t > t0 + 1.3) { if (win) sR++; else sL++; } });
530
+ if (t > TL.rows[0] + 1.3) { txt(c, `${sL} – ${sR}`, 360, 1080, { f: ANT(60), c: '#fff', a: 'center' }); txt(c, '* greyhound · typical values', 360, 1110, { f: BODY(20, 700), c: 'rgba(255,255,255,0.75)', a: 'center' }); }
531
+ if (t > TL.verdict) { c.fillStyle = `rgba(0,0,0,${0.55 * inn(t, TL.verdict, 0.3)})`; c.fillRect(0, 0, W, H); slam(c, 'DOG WINS', 360, 690, ANT(150), C.yellow, TL.verdict, t, { a: 'center', st: '#111', sw: 14 }); wordLine(c, [['(the', TL.verdict + 0.6], ['cat', TL.verdict + 0.7], ['does', TL.verdict + 0.8], ['not', TL.verdict + 0.9], ['care)', TL.verdict + 1.0]], 360, 790, BODY(40, 800), '#fff', t, { a: 'center' }); }
532
+ }
533
+
534
+ // =================================== SOUND SCORE ===================================
535
+ // Fight night: a punchy beat, slams and whooshes as the halves collide, a boom for the badge, a whoosh and
536
+ // ticks per stat row, a bright ding for each crown, and a slam with a crowd cheer for the verdict.
537
+ function scoreSound(k) {
538
+ k = gainKit(k, 2.0);
539
+ padBed(k, 0, TL.D, { bpm: 124, wave: 'sawtooth', cut: 900, chords: [['E3', 'G3', 'B3'], ['C3', 'E3', 'G3'], ['D3', 'F#3', 'A3'], ['B2', 'D3', 'F#3']], kick: [0.2, TL.D], snare: [1.2, TL.D], hats: [1.2, TL.D], gain: 0.75 });
540
+ k.play('whoosh', TL.halves, { dur: 0.4, gain: 0.5, top: 2400 }); k.play('slam', TL.halves + 0.45, { gain: 1 }); k.play('boom', TL.badge, { gain: 0.8 }); k.play('slam', TL.badge, { gain: 0.7 });
541
+ STATS.forEach((s, i) => { const t0 = TL.rows[i]; k.play('whoosh', t0 + 0.2, { dur: 0.8, gain: 0.25, top: 2000, soft: true }); for (let x = t0 + 0.2; x < t0 + 1.2; x += 0.07) k.play('tick', x, { f: 3000 + (x - t0) * 600, gain: 0.15, soft: true }); SND.chime(k, t0 + 1.3, s[5] ? 0.5 : -0.5, 1.1, ['E6', 'B6']); });
542
+ k.play('slam', TL.verdict, { gain: 1 }); k.hiss(TL.verdict, { color: 'pink', dur: 2.2, filter: 'bandpass', ff: [[0, 1000], [0.3, 2400], [2.2, 900]], q: 0.4, gain: 0.3, a: 0.1 });
543
+ }
544
+
545
+ // =================================== PLAYER ===================================
546
+ const cvs = document.getElementById('stage'), ctx = cvs.getContext('2d');
547
+ const DURATION = TL.D;
548
+ window.seek = (t) => explainer(ctx, clamp(t, 0, DURATION));
549
+ window.DURATION = DURATION;
550
+ window.scoreSound = scoreSound;
551
+ window.SFX = SFX;
552
+ window.loadFootage = (url) => { const v = document.createElement('video'); v.src = url; v.muted = true; v.playsInline = true; v.loop = true; v.crossOrigin = 'anonymous'; v.addEventListener('loadeddata', () => { FOOT.video = v; try { v.currentTime = T % (v.duration || 1); } catch (e) {} draw(); }); v.load(); };
553
+
554
+ const ui = { play: document.getElementById('play'), scrub: document.getElementById('scrub'), time: document.getElementById('time'), sound: document.getElementById('sound'), loop: document.getElementById('loop'), vo: document.getElementById('vofile'), foot: document.getElementById('footfile'), note: document.getElementById('vonote') };
555
+ let T = 0, playing = false, last = 0, soundOn = true, loopOn = true, stopSound = null, voAudio = null;
556
+ const fmt = (t) => t.toFixed(2) + ' / ' + DURATION.toFixed(2);
557
+ function draw() { window.seek(T); ui.scrub.value = T; ui.time.textContent = fmt(T); }
558
+ function syncFoot() { const v = FOOT.video; if (!v) return; try { v.currentTime = T % (v.duration || 1); if (playing) v.play().catch(() => {}); else v.pause(); } catch (e) {} }
559
+ function startAudio() {
560
+ stopAudio(); if (!playing) return;
561
+ if (soundOn) stopSound = SFX.live(scoreSound, T, { voiceover: !!voAudio });
562
+ if (voAudio) { try { voAudio.currentTime = T; voAudio.play().catch(() => {}); } catch (e) {} }
563
+ syncFoot();
564
+ }
565
+ function stopAudio() { if (stopSound) { stopSound(); stopSound = null; } if (voAudio) voAudio.pause(); if (FOOT.video) FOOT.video.pause(); }
566
+ function setPlaying(p) { playing = p; ui.play.textContent = p ? 'Pause' : 'Play'; last = performance.now(); if (p) startAudio(); else stopAudio(); }
567
+ function tick(now) {
568
+ if (playing) {
569
+ T += (now - last) / 1000; last = now;
570
+ if (T >= DURATION) { if (loopOn) { T = 0; startAudio(); } else { T = DURATION; setPlaying(false); } }
571
+ draw();
572
+ }
573
+ requestAnimationFrame(tick);
574
+ }
575
+ ui.play.addEventListener('click', () => { if (!playing && T >= DURATION) T = 0; setPlaying(!playing); });
576
+ ui.scrub.addEventListener('input', () => { T = parseFloat(ui.scrub.value); draw(); if (playing) startAudio(); else syncFoot(); });
577
+ ui.sound.addEventListener('click', () => { soundOn = !soundOn; ui.sound.setAttribute('aria-pressed', soundOn); ui.sound.textContent = soundOn ? 'Sound on' : 'Sound off'; if (playing) startAudio(); });
578
+ ui.loop.addEventListener('click', () => { loopOn = !loopOn; ui.loop.setAttribute('aria-pressed', loopOn); });
579
+ ui.vo.addEventListener('change', () => {
580
+ const f = ui.vo.files && ui.vo.files[0]; if (!f) return;
581
+ if (voAudio) { voAudio.pause(); URL.revokeObjectURL(voAudio.src); }
582
+ voAudio = new Audio(URL.createObjectURL(f)); ui.note.textContent = 'Voiceover loaded: ' + f.name + '. Effects use the lighter mix.';
583
+ if (playing) startAudio();
584
+ });
585
+ if (ui.foot) ui.foot.addEventListener('change', () => { const f = ui.foot.files && ui.foot.files[0]; if (!f) return; window.loadFootage(URL.createObjectURL(f)); ui.note.textContent = 'Footage loaded: ' + f.name + '.'; });
586
+ (async () => {
587
+ try { await Promise.all(["400 60px Anton","800 30px Inter","900 30px Inter"].map((f) => document.fonts.load(f, 'AaZz09'))); await document.fonts.ready; } catch (e) {}
588
+ if (typeof setup === 'function') setup();
589
+ window.__posterT = 8.4; T = 8.4; draw(); window.__ready = true;
590
+ requestAnimationFrame((n) => { last = n; tick(n); });
591
+ })();
592
+ </script>