@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,677 @@
1
+ <meta charset="utf-8">
2
+ <title>Pop Info</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=Fredoka:wght@500;600;700&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; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; 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 { 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">Pop <em>Info</em></h1>
53
+ <p class="meta">Reference animation · 12.0 s · drawn in code, sound synthesized</p>
54
+ </div>
55
+ <div class="stage"><canvas id="stage" width="1280" height="720" aria-label="Pop Info 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="12" step="0.01" value="0" aria-label="Scrub timeline">
59
+ <span id="time">0.00 / 12.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
+ // CREATOR MOTION GRAPHICS · core helpers (CM), sound kit (SFX), style, player
70
+ // Every frame is a pure function of t. All randomness is seeded. Times are seconds.
71
+ // =====================================================================================================
72
+ const CM = (() => {
73
+ const clamp = (v, a = 0, b = 1) => (v < a ? a : v > b ? b : v);
74
+ const lerp = (a, b, u) => a + (b - a) * u;
75
+ const span = (t, a, b) => clamp((t - a) / (b - a));
76
+ const rotl = (x, k) => (x << k) | (x >>> (32 - k));
77
+ 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; };
78
+ // xoshiro128** style generator, seeded from a number or string
79
+ const rng = (seed) => {
80
+ const s = typeof seed === 'number' ? seed >>> 0 : hash(seed);
81
+ let a = (s ^ 0xa5a5a5a5) >>> 0, b = (Math.imul(s, 0x27d4eb2d) >>> 0) || 1, c = (0x165667b1 ^ s) >>> 0, d = (rotl(s, 7) >>> 0) || 7;
82
+ 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; };
83
+ for (let i = 0; i < 8; i++) r();
84
+ r.in = (lo, hi) => lo + r() * (hi - lo);
85
+ r.pick = (arr) => arr[(r() * arr.length) | 0];
86
+ return r;
87
+ };
88
+ // smooth 1D value noise, roughly -1..1
89
+ 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); }; };
90
+ const ez = {
91
+ out3: (u) => 1 - Math.pow(1 - u, 3),
92
+ in3: (u) => u * u * u,
93
+ inout3: (u) => (u < 0.5 ? 4 * u * u * u : 1 - Math.pow(-2 * u + 2, 3) / 2),
94
+ outExpo: (u) => (u >= 1 ? 1 : 1 - Math.pow(2, -10 * u)),
95
+ 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)),
96
+ spring: (u) => (u <= 0 ? 0 : u >= 1 ? 1 : 1 - Math.exp(-6 * u) * Math.cos(13 * u)),
97
+ };
98
+ const layer = (w, h) => { const c = document.createElement('canvas'); c.width = w; c.height = h; return c; };
99
+ return { clamp, lerp, span, hash, rng, noise1, ez, layer };
100
+ })();
101
+
102
+ // =====================================================================================================
103
+ // SFX: synthesized creator-edit sound kit. Plain Web Audio, no files.
104
+ // voiceover mode keeps the music low under narration and plays sounds marked `soft` at 55%.
105
+ // =====================================================================================================
106
+ const SFX = (() => {
107
+ const SEMI = { C: -9, D: -7, E: -5, F: -4, G: -2, A: 0, B: 2 };
108
+ 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); };
109
+
110
+ function kit(ac, o = {}) {
111
+ const VO = !!o.voiceover, SR = ac.sampleRate, T0 = o.from || 0, base = ac.currentTime + (o.lead || 0);
112
+ // snap every start a little past the sample grid (avoids level spikes on some browsers)
113
+ const at = (t) => (Math.round((base + (t - T0)) * SR) + 0.3) / SR;
114
+ const skip = (t, dur) => at(t) + dur < ac.currentTime || (t < T0 - 0.005 && dur < 1.2);
115
+
116
+ const comp = ac.createDynamicsCompressor();
117
+ comp.threshold.value = -14; comp.knee.value = 6; comp.ratio.value = 4; comp.attack.value = 0.003; comp.release.value = 0.15;
118
+ const master = ac.createGain(); master.gain.value = o.master == null ? 0.85 : o.master;
119
+ comp.connect(master); master.connect(o.dest || ac.destination);
120
+ const mk = (g) => { const n = ac.createGain(); n.gain.value = g; n.connect(comp); return n; };
121
+ const bus = { fx: mk(VO ? 0.78 : 0.95), music: mk(VO ? 0.3 : 0.62), amb: mk(0.45) };
122
+ const duckIn = ac.createGain(); duckIn.connect(bus.music);
123
+ const DUCKS = [];
124
+
125
+ // generated plate-style reverb
126
+ const verb = ac.createConvolver();
127
+ { const n = Math.floor(1.5 * SR), ir = ac.createBuffer(2, n, SR);
128
+ 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; } }
129
+ verb.buffer = ir; }
130
+ const verbIn = ac.createGain(); verbIn.gain.value = 0.8; verbIn.connect(verb); verb.connect(comp);
131
+
132
+ // seeded noise buffers
133
+ const NB = {};
134
+ { const n = Math.floor(2 * SR);
135
+ for (const kind of ['white', 'pink', 'brown']) {
136
+ 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;
137
+ for (let i = 0; i < n; i++) { const w = r() * 2 - 1;
138
+ if (kind === 'white') d[i] = w;
139
+ 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; }
140
+ else { br = (br + 0.02 * w) / 1.02; d[i] = br * 3.4; } }
141
+ NB[kind] = b; } }
142
+
143
+ 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]); };
144
+ const env = (g, t, peak, dur, a = 0.004, hold = 0) => {
145
+ a = Math.min(a, dur * 0.9); hold = Math.min(hold, dur - a);
146
+ g.gain.setValueAtTime(0, t); g.gain.linearRampToValueAtTime(peak, t + a);
147
+ if (hold > 0) g.gain.setValueAtTime(peak, t + a + hold);
148
+ g.gain.exponentialRampToValueAtTime(1e-4, t + dur); g.gain.setValueAtTime(0, t + dur + 0.002);
149
+ };
150
+ const level = (p, d) => (p.gain == null ? d : p.gain) * (VO && p.soft ? 0.55 : 1);
151
+ const route = (node, p, t) => {
152
+ const pan = ac.createStereoPanner();
153
+ 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);
154
+ node.connect(pan); pan.connect(p.bus === 'music' ? duckIn : bus[p.bus || 'fx']);
155
+ if (p.verb) { const s = ac.createGain(); s.gain.value = p.verb; pan.connect(s); s.connect(verbIn); }
156
+ };
157
+ 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; };
158
+
159
+ // primitive: oscillator voice. f may be a value or [[dt, hz], ...]
160
+ function voice(time, p) {
161
+ const dur = p.dur || 0.2; if (skip(time, dur)) return; const t = at(time);
162
+ const osc = ac.createOscillator(); osc.type = p.type || 'sine';
163
+ ramp(osc.frequency, Array.isArray(p.f) ? p.f.map(([d, v]) => [d, hz(v)]) : hz(p.f || 440), t);
164
+ const g = ac.createGain(); env(g, t, level(p, 0.3), dur, p.a, p.hold);
165
+ const f = filt(p, t); if (f) { osc.connect(f); f.connect(g); } else osc.connect(g);
166
+ route(g, p, t); osc.start(t); osc.stop(t + dur + 0.03);
167
+ }
168
+ // primitive: noise voice
169
+ function hiss(time, p) {
170
+ const dur = p.dur || 0.2; if (skip(time, dur)) return; const t = at(time);
171
+ const src = ac.createBufferSource(); src.buffer = NB[p.color || 'white']; src.loop = true; if (p.rate) src.playbackRate.value = p.rate;
172
+ const g = ac.createGain(); env(g, t, level(p, 0.3), dur, p.a, p.hold);
173
+ const f = filt(p, t); if (f) { src.connect(f); f.connect(g); } else src.connect(g);
174
+ route(g, p, t); src.start(t, CM.rng('off' + time)() * 1.5); src.stop(t + dur + 0.03);
175
+ }
176
+ function duck(t, depth = 0.5, hold = 0.25) { DUCKS.push({ t, depth, hold }); }
177
+
178
+ // ---------------- named sounds (creator-edit palette) ----------------
179
+ const S = {
180
+ // text slam: a tight low thump with a short papery crack
181
+ 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 }); },
182
+ // big drop: sub boom with a dark tail
183
+ 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); },
184
+ 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 }); },
185
+ 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 }),
186
+ 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 }); },
187
+ 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 }); },
188
+ 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 }); },
189
+ 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 }); },
190
+ 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 }); },
191
+ 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 }); },
192
+ 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 }); } },
193
+ // highlighter / marker swipe: grainy felt drag
194
+ 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 }); },
195
+ 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 }); },
196
+ 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 }); },
197
+ 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 }); },
198
+ 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) })); },
199
+ 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 }); },
200
+ };
201
+ 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 })); }
202
+
203
+ // ---------------- music: half-time beat with bass and soft pad ----------------
204
+ function music(t0, t1, p = {}) {
205
+ const bpm = p.bpm || 98, step = 60 / bpm / 4, bar = step * 16, g = p.gain == null ? 1 : p.gain;
206
+ const roots = p.roots || ['A1', 'F1', 'C2', 'G1'];
207
+ const pads = p.pads || [['A3', 'C4', 'E4'], ['F3', 'A3', 'C4'], ['C4', 'E4', 'G4'], ['G3', 'B3', 'D4']];
208
+ let bi = 0;
209
+ for (let tb = t0; tb < t1 - 0.05; tb += bar, bi++) {
210
+ const root = roots[bi % roots.length], pad = pads[bi % pads.length], blen = Math.min(bar, t1 - tb);
211
+ 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' }));
212
+ for (let s = 0; s < 16; s++) {
213
+ const ts = tb + s * step; if (ts >= t1 - 0.02) break;
214
+ 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' }); }
215
+ 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' }); }
216
+ 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' });
217
+ 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' });
218
+ }
219
+ }
220
+ }
221
+ 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' }); }
222
+ function finish() {
223
+ DUCKS.sort((a, b) => a.t - b.t);
224
+ 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); }
225
+ }
226
+ return { play, voice, hiss, music, drone, duck, finish, hz, vo: VO };
227
+ }
228
+ function live(score, from, opts = {}) {
229
+ const ac = new (window.AudioContext || window.webkitAudioContext)();
230
+ const k = kit(ac, Object.assign({}, opts, { from: from || 0, lead: 0.04 })); score(k); k.finish();
231
+ return () => { try { ac.close(); } catch (e) {} };
232
+ }
233
+ async function render(score, dur, sr = 48000, opts = {}) {
234
+ const len = Math.ceil(dur * sr), ac = new OfflineAudioContext(2, len, sr);
235
+ const k = kit(ac, Object.assign({}, opts, { from: 0 })); score(k); k.finish();
236
+ const buf = await ac.startRendering(), L = buf.getChannelData(0), R = buf.getChannelData(1), inter = new Float32Array(len * 2);
237
+ 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])); }
238
+ return { inter, peak, sr, frames: len };
239
+ }
240
+ return { kit, live, render, hz };
241
+ })();
242
+
243
+ // =====================================================================================================
244
+ // STYLE: Pop Info (family: Illustrated Explainer)
245
+ // A flat-vector animated infographic: a cosy cartoon scene drawn in code (no images), one small
246
+ // character with a big feeling, a speech or thought bubble that carries the idea, one counter,
247
+ // one dotted path or arrow, and an iris wipe in and out. Soft muted room, warm product colours,
248
+ // a deep teal for the idea and coral and sunny yellow for emphasis. Rounded Fredoka type.
249
+ // Everything is drawn in a 680 x 383 design space and scaled up to fill the canvas.
250
+ // Demo topic: "Why is the milk always at the back of the store?"
251
+ // =====================================================================================================
252
+ const W = 1280, HH = 720;
253
+ const { clamp, lerp, rng } = CM;
254
+ const DW = 680, DH = 383; // design space: every shape below uses these coordinates
255
+
256
+ // ---------- the timeline: picture and sound both read these ----------
257
+ const TL = {
258
+ D: 12,
259
+ iris: { open: 0.75, close: 11.25 }, // iris wipe in and out
260
+ shelves: 0.2, // shelves slide in from both sides
261
+ shopper: { rise: 1.0, land: 1.4, annoyed: 1.85, look: 2.5, lookBack: 6.0, sigh: 9.0, sighOut: 10.6, sweat: 9.3 },
262
+ bubble: { pop: 3.0, carton: 3.3, count: 3.9, countDur: 2.0, away: 6.1, wink: 7.45, winkEnd: 8.1 },
263
+ path: { draw: 6.2, dur: 2.3, pin: 8.5 }, // dotted path to the dairy cooler, then the pin drops
264
+ cam: { push: 6.0, dur: 5.0 }, // slow push toward the back of the aisle
265
+ };
266
+
267
+ // ---------- tiny helpers ----------
268
+ const prog = (t, a, d) => clamp((t - a) / d);
269
+ const eOutCubic = (x) => 1 - Math.pow(1 - x, 3);
270
+ const eInOut = (x) => (x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2);
271
+ const eOutBack = (x, s = 2.0) => 1 + (s + 1) * Math.pow(x - 1, 3) + s * Math.pow(x - 1, 2);
272
+ const popS = (t, a, d = 0.45, s = 2.2) => (t < a ? 0 : eOutBack(clamp((t - a) / d), s)); // springy pop-in scale
273
+ function wobble(t, a) { if (t < a) return 0; const x = t - a; return Math.exp(-x * 6) * Math.sin(x * 20) * 0.13; } // decaying jiggle
274
+ function blink(t, off, period) { const p = (t + off) % period; return p < 0.13 ? Math.sin(Math.PI * p / 0.13) : 0; } // eye blinks
275
+
276
+ const C = {
277
+ wall: '#D7DCCB', ceil: '#E6E2D2', back: '#D2CAB4', floor: '#C4B79D', floorLight: '#CDC2A9', tile: 'rgba(150,135,105,.35)',
278
+ ink: '#3B2A26', teal: '#2F6F73', tealD: '#24585B', coral: '#E85D4A',
279
+ skin: '#F2B48C', skinD: '#E39C77', hood: '#E8A33D', hoodD: '#D18B2B', hoodDD: '#B97420',
280
+ cool: '#7FAEC8', glass: '#B7D9EA', milk: '#FAF8F2', blue: '#5B9BD5'
281
+ };
282
+ const PALETTE = ['#E07A5F', '#F2CC8F', '#81B29A', '#6C9BB8', '#E9A178', '#3D405B', '#C8553D'];
283
+
284
+ // shelf products (design coords, left shelf; right is mirrored)
285
+ const ROWS = [
286
+ [[15, 72, 34, 62], [60, 82, 30, 56], [100, 92, 28, 50], [140, 100, 26, 46], [180, 111, 24, 40], [220, 119, 22, 36], [258, 127, 20, 32]],
287
+ [[15, 172, 34, 62], [60, 173, 30, 56], [100, 175, 28, 50], [140, 175, 26, 46], [180, 178, 24, 40], [220, 178, 22, 36], [258, 178, 20, 32]],
288
+ [[15, 275, 34, 60], [60, 267, 30, 55], [100, 260, 28, 50], [140, 253, 26, 45], [180, 246, 24, 40], [220, 239, 22, 35], [258, 232, 20, 31]]
289
+ ];
290
+ function buildProducts(seed) {
291
+ const r = rng(seed), out = [];
292
+ for (const row of ROWS) for (const [x, y, w, h] of row) {
293
+ // split each slot into 1-2 items for density
294
+ const n = r() < .45 ? 2 : 1;
295
+ for (let k = 0; k < n; k++) {
296
+ const ww = w / n - (n > 1 ? 1.5 : 0), xx = x + k * (w / n);
297
+ const hh = h * (n > 1 ? lerp(.7, .95, r()) : 1);
298
+ out.push({ x: xx, y: y + (h - hh), w: ww, h: hh, c: PALETTE[Math.floor(r() * PALETTE.length)], bottle: r() < .3, label: r() });
299
+ }
300
+ }
301
+ return out;
302
+ }
303
+ const PL = buildProducts('shelfL'), PR = buildProducts('shelfR');
304
+ const DUST = (() => { const r = rng('dust'); return Array.from({ length: 46 }, () => ({ x: r() * 680, y: r() * 383, s: .5 + r() * 1.2, v: 2 + r() * 5, ph: r() * 6.28 })); })();
305
+
306
+ function rr(ctx, x, y, w, h, r) { ctx.beginPath(); ctx.roundRect(x, y, w, h, r); }
307
+
308
+ function drawProduct(ctx, p) {
309
+ ctx.fillStyle = p.c;
310
+ if (p.bottle) {
311
+ const nw = p.w * .38, nh = p.h * .22;
312
+ rr(ctx, p.x + (p.w - nw) / 2, p.y, nw, nh + 2, 1.5); ctx.fill();
313
+ rr(ctx, p.x, p.y + nh, p.w, p.h - nh, p.w * .3); ctx.fill();
314
+ ctx.fillStyle = 'rgba(0,0,0,.12)'; rr(ctx, p.x + p.w * .72, p.y + nh + 2, p.w * .22, p.h - nh - 4, 2); ctx.fill();
315
+ ctx.fillStyle = 'rgba(255,255,255,.55)'; ctx.fillRect(p.x + 1, p.y + nh + (p.h - nh) * .38, p.w - 2, (p.h - nh) * .2);
316
+ } else {
317
+ rr(ctx, p.x, p.y, p.w, p.h, 1.8); ctx.fill();
318
+ ctx.fillStyle = 'rgba(0,0,0,.12)'; ctx.fillRect(p.x + p.w * .78, p.y, p.w * .22, p.h);
319
+ ctx.fillStyle = 'rgba(255,255,255,.45)';
320
+ ctx.fillRect(p.x + 2, p.y + p.h * (.2 + p.label * .2), p.w * .62, p.h * .14);
321
+ ctx.fillStyle = 'rgba(255,255,255,.25)';
322
+ ctx.beginPath(); ctx.arc(p.x + p.w * .38, p.y + p.h * .68, Math.min(p.w, p.h) * .14, 0, 6.29); ctx.fill();
323
+ }
324
+ }
325
+
326
+ function drawShelf(ctx, products, panel, board) {
327
+ ctx.fillStyle = panel;
328
+ ctx.beginPath(); ctx.moveTo(0, 30); ctx.lineTo(300, 120); ctx.lineTo(300, 250); ctx.lineTo(0, 340); ctx.closePath(); ctx.fill();
329
+ // back shading strip near the vanishing end
330
+ ctx.fillStyle = 'rgba(0,0,0,.05)';
331
+ ctx.beginPath(); ctx.moveTo(240, 102); ctx.lineTo(300, 120); ctx.lineTo(300, 250); ctx.lineTo(240, 268); ctx.closePath(); ctx.fill();
332
+ for (const p of products) drawProduct(ctx, p);
333
+ ctx.fillStyle = board;
334
+ for (const [a, b] of [[132, 163], [235, 206]]) {
335
+ ctx.beginPath(); ctx.moveTo(0, a); ctx.lineTo(300, b); ctx.lineTo(300, b + 5); ctx.lineTo(0, a + 9); ctx.closePath(); ctx.fill();
336
+ }
337
+ // price tags on shelf edges
338
+ ctx.fillStyle = '#FBF8EE';
339
+ for (let i = 0; i < 6; i++) { const x = 20 + i * 46, f = x / 300; ctx.fillRect(x, lerp(134, 165, f) + 1, 10 * (1 - f * .5), 4 * (1 - f * .4)); ctx.fillRect(x, lerp(237, 208, f) + 1, 10 * (1 - f * .5), 4 * (1 - f * .4)); }
340
+ // end-cap upright on the near edge
341
+ ctx.fillStyle = 'rgba(0,0,0,.08)';
342
+ ctx.beginPath(); ctx.moveTo(0, 30); ctx.lineTo(8, 32); ctx.lineTo(8, 338); ctx.lineTo(0, 340); ctx.closePath(); ctx.fill();
343
+ }
344
+
345
+ function drawRoom(ctx, t) {
346
+ ctx.fillStyle = C.wall; ctx.fillRect(-200, -200, 1080, 800);
347
+ ctx.fillStyle = C.ceil;
348
+ ctx.beginPath(); ctx.moveTo(-200, -200); ctx.lineTo(880, -200); ctx.lineTo(880, -30); ctx.lineTo(500, 120); ctx.lineTo(300, 120); ctx.lineTo(-200, -30); ctx.closePath(); ctx.fill();
349
+ // ceiling light panels receding to the back
350
+ for (const d of [.05, .3, .55, .75, .9]) {
351
+ const y = lerp(-10, 112, d), w = lerp(170, 26, d), h = lerp(9, 2, d);
352
+ ctx.fillStyle = '#FBF8EE'; rr(ctx, 400 - w / 2, y, w, h, h / 2); ctx.fill();
353
+ ctx.fillStyle = 'rgba(255,250,235,.25)'; rr(ctx, 400 - w * .65, y - h * .6, w * 1.3, h * 2.2, h); ctx.fill();
354
+ }
355
+ ctx.fillStyle = C.back; ctx.fillRect(300, 120, 200, 130);
356
+ // floor
357
+ ctx.fillStyle = C.floor;
358
+ ctx.beginPath(); ctx.moveTo(-200, 400); ctx.lineTo(300, 250); ctx.lineTo(500, 250); ctx.lineTo(880, 400); ctx.lineTo(880, 600); ctx.lineTo(-200, 600); ctx.closePath(); ctx.fill();
359
+ ctx.fillStyle = C.floorLight;
360
+ ctx.beginPath(); ctx.moveTo(360, 250); ctx.lineTo(440, 250); ctx.lineTo(540, 420); ctx.lineTo(260, 420); ctx.closePath(); ctx.fill();
361
+ ctx.strokeStyle = C.tile; ctx.lineWidth = .7;
362
+ for (let k = 1; k < 9; k++) { const y = 250 + Math.pow(k / 8, 1.8) * 170; const xl = (340 - y) / .3; ctx.beginPath(); ctx.moveTo(xl, y); ctx.lineTo(680 - xl, y); ctx.stroke(); }
363
+ for (let k = -6; k <= 6; k++) { ctx.beginPath(); ctx.moveTo(400 + k * 16, 250); ctx.lineTo(400 + k * 130, 420); ctx.stroke(); }
364
+ // cooler glow
365
+ const pulse = .85 + .15 * Math.sin(t * 2.3);
366
+ const g = ctx.createRadialGradient(400, 190, 10, 400, 190, 150);
367
+ g.addColorStop(0, `rgba(175,220,242,${.55 * pulse})`); g.addColorStop(1, 'rgba(175,220,242,0)');
368
+ ctx.fillStyle = g; ctx.fillRect(240, 60, 320, 260);
369
+ // cooler
370
+ ctx.fillStyle = '#6E9CB6'; rr(ctx, 316, 130, 168, 116, 4); ctx.fill();
371
+ ctx.fillStyle = C.cool; rr(ctx, 318, 132, 164, 112, 3); ctx.fill();
372
+ for (const x of [326, 377, 428]) {
373
+ ctx.fillStyle = C.glass; rr(ctx, x, 140, 46, 96, 2); ctx.fill();
374
+ for (const y of [158, 198]) for (let i = 0; i < 3; i++) {
375
+ const cx = x + 4 + i * 13; ctx.fillStyle = C.milk; rr(ctx, cx, y, 10, 18, 1); ctx.fill();
376
+ ctx.fillStyle = '#E8E3D6'; ctx.fillRect(cx + 6, y, 4, 18);
377
+ ctx.fillStyle = C.blue; ctx.fillRect(cx, y + 8, 10, 4);
378
+ }
379
+ ctx.fillStyle = '#9CC4DA'; ctx.fillRect(x, 186, 46, 4); ctx.fillRect(x, 226, 46, 4);
380
+ ctx.fillStyle = 'rgba(255,255,255,.35)';
381
+ ctx.beginPath(); ctx.moveTo(x + 30, 140); ctx.lineTo(x + 40, 140); ctx.lineTo(x + 16, 236); ctx.lineTo(x + 6, 236); ctx.closePath(); ctx.fill();
382
+ }
383
+ // hanging dairy sign
384
+ const sw = Math.sin(t * 1.6) * .03;
385
+ ctx.save(); ctx.translate(400, 84); ctx.rotate(sw);
386
+ ctx.strokeStyle = '#8E8670'; ctx.lineWidth = .8; ctx.beginPath(); ctx.moveTo(-22, -10); ctx.lineTo(-22, 8); ctx.moveTo(22, -10); ctx.lineTo(22, 8); ctx.stroke();
387
+ ctx.fillStyle = '#C24B39'; rr(ctx, -33, 9, 66, 20, 4); ctx.fill();
388
+ ctx.fillStyle = C.coral; rr(ctx, -33, 7, 66, 20, 4); ctx.fill();
389
+ ctx.fillStyle = '#FFF6EC'; ctx.font = '600 11px Fredoka, sans-serif'; ctx.textAlign = 'center'; ctx.textBaseline = 'middle';
390
+ ctx.fillText('DAIRY', 0, 17.5); ctx.restore();
391
+ }
392
+
393
+ function drawPath(ctx, t) {
394
+ const p = eInOut(prog(t, TL.path.draw, TL.path.dur)); if (p <= 0) return;
395
+ const P0 = [318, 372], P1 = [370, 322], P2 = [430, 300], P3 = [402, 254];
396
+ const pt = u => { const a = 1 - u; return [a * a * a * P0[0] + 3 * a * a * u * P1[0] + 3 * a * u * u * P2[0] + u * u * u * P3[0], a * a * a * P0[1] + 3 * a * a * u * P1[1] + 3 * a * u * u * P2[1] + u * u * u * P3[1]]; };
397
+ const n = 34;
398
+ for (let i = 0; i <= n; i++) {
399
+ const u = i / n; if (u > p) break;
400
+ const [x, y] = pt(u); const r = .9 + (y - 250) / 120 * 2.2;
401
+ const a = clamp((p - u) * 12);
402
+ ctx.fillStyle = `rgba(232,93,74,${.9 * a})`; ctx.beginPath(); ctx.arc(x, y, r * (.6 + .4 * a), 0, 6.29); ctx.fill();
403
+ }
404
+ // destination pin
405
+ const s = popS(t, TL.path.pin, .5);
406
+ if (s > 0) {
407
+ const bob = Math.sin((t - 8.5) * 5) * 1.5;
408
+ ctx.save(); ctx.translate(402, 246 + bob); ctx.scale(s, s);
409
+ ctx.fillStyle = 'rgba(0,0,0,.12)'; ctx.beginPath(); ctx.ellipse(0, 8 - bob, 6, 1.8, 0, 0, 6.29); ctx.fill();
410
+ ctx.fillStyle = C.coral; ctx.beginPath(); ctx.moveTo(0, 6); ctx.bezierCurveTo(-9, -4, -8, -16, 0, -16); ctx.bezierCurveTo(8, -16, 9, -4, 0, 6); ctx.fill();
411
+ ctx.fillStyle = '#FFF6EC'; ctx.beginPath(); ctx.arc(0, -9, 3.2, 0, 6.29); ctx.fill();
412
+ ctx.restore();
413
+ }
414
+ }
415
+
416
+ function drawShopper(ctx, t) {
417
+ const rise = t < TL.shopper.rise ? 1 : 1 - eOutBack(prog(t, TL.shopper.rise, .55), 1.6);
418
+ const w = wobble(t, TL.shopper.land);
419
+ const sigh = eOutCubic(prog(t, TL.shopper.sigh, .5)) * (1 - eOutCubic(prog(t, TL.shopper.sighOut, .6)));
420
+ const breath = Math.sin(t * 2.4) * .008;
421
+ ctx.save();
422
+ ctx.translate(0, rise * 170);
423
+ ctx.translate(200, 383); ctx.scale(1 + w, 1 - w + breath); ctx.translate(-200, -383);
424
+ ctx.translate(0, sigh * 4);
425
+ // body
426
+ ctx.fillStyle = C.hoodDD; ctx.beginPath(); ctx.ellipse(197, 292, 44, 14, 0, 0, 6.29); ctx.fill(); // hood behind neck
427
+ ctx.fillStyle = C.hood; ctx.fill(new Path2D('M108 400 C108 322 140 292 197 286 C252 292 288 322 292 400 Z'));
428
+ ctx.fillStyle = C.hoodD; ctx.fill(new Path2D('M200 286 C252 292 288 322 292 400 L246 400 C249 342 233 306 200 286 Z'));
429
+ ctx.strokeStyle = C.hoodDD; ctx.lineWidth = 2; ctx.lineCap = 'round';
430
+ ctx.beginPath(); ctx.moveTo(150, 372); ctx.quadraticCurveTo(197, 380, 236, 372); ctx.stroke(); // pocket
431
+ ctx.strokeStyle = '#F6E3C0'; ctx.lineWidth = 2.4;
432
+ const sway = Math.sin(t * 2.4) * 1.2;
433
+ ctx.beginPath(); ctx.moveTo(186, 304); ctx.lineTo(184 + sway, 330); ctx.moveTo(208, 304); ctx.lineTo(210 + sway, 330); ctx.stroke();
434
+ ctx.fillStyle = '#F6E3C0'; ctx.beginPath(); ctx.arc(184 + sway, 331, 2, 0, 6.29); ctx.arc(210 + sway, 331, 2, 0, 6.29); ctx.fill();
435
+ // neck
436
+ ctx.fillStyle = C.skinD; ctx.fillRect(183, 262, 30, 30);
437
+ // head (tilts toward the bubble once it appears)
438
+ const look = eInOut(prog(t, TL.shopper.look, .5)) * (1 - .6 * eInOut(prog(t, TL.shopper.lookBack, .6)));
439
+ ctx.save(); ctx.translate(197, 270); ctx.rotate(-look * .05 + sigh * .04); ctx.translate(-197, -270);
440
+ ctx.fillStyle = C.skin; ctx.beginPath(); ctx.ellipse(197, 226, 50, 56, 0, 0, 6.29); ctx.fill();
441
+ ctx.fillStyle = C.skinD; ctx.fill(new Path2D('M232 186 C254 206 254 250 228 278 C242 250 244 210 232 186 Z'));
442
+ ctx.fillStyle = '#E7A57E'; ctx.beginPath(); ctx.ellipse(150, 232, 9, 13, 0, 0, 6.29); ctx.fill();
443
+ ctx.fillStyle = '#D48D69'; ctx.beginPath(); ctx.ellipse(151, 233, 4, 7, 0, 0, 6.29); ctx.fill();
444
+ ctx.fillStyle = C.ink; ctx.fill(new Path2D('M146 222 C138 172 178 156 206 164 C240 160 257 186 249 210 C237 192 216 190 202 197 C186 190 166 200 160 228 Z'));
445
+ ctx.fillStyle = '#4E3A33'; ctx.fill(new Path2D('M170 178 C185 168 205 167 220 172 C205 172 186 176 176 184 Z'));
446
+ // eyes
447
+ const bl = Math.max(blink(t, .3, 3.7), blink(t, 2.1, 5.3));
448
+ const lid = Math.max(bl, sigh * .55);
449
+ const ex = lerp(1.5, 2.5, look), ey = lerp(0, -2.4, look);
450
+ for (const cx of [208, 236]) {
451
+ ctx.fillStyle = C.ink; ctx.beginPath(); ctx.ellipse(cx + ex, 226 + ey, 5, 5 * (1 - lid * .92), 0, 0, 6.29); ctx.fill();
452
+ ctx.fillStyle = 'rgba(255,255,255,.8)'; if (lid < .5) { ctx.beginPath(); ctx.arc(cx + ex + 1.6, 224 + ey, 1.3, 0, 6.29); ctx.fill(); }
453
+ }
454
+ // brows: neutral -> annoyed (1.8s) -> tired (9s)
455
+ const ann = eOutBack(prog(t, TL.shopper.annoyed, .3)) * (1 - sigh);
456
+ const lb = [[200, 211 - ann * 3 + sigh * 3], [215, 211 + ann * 3 - sigh * 3]];
457
+ const rb = [[230, 211 + ann * 3 - sigh * 3], [244, 211 - ann * 3 + sigh * 3]];
458
+ ctx.strokeStyle = C.ink; ctx.lineWidth = 3; ctx.lineCap = 'round';
459
+ for (const b of [lb, rb]) { ctx.beginPath(); ctx.moveTo(b[0][0] + ex * .4, b[0][1]); ctx.lineTo(b[1][0] + ex * .4, b[1][1]); ctx.stroke(); }
460
+ // mouth
461
+ if (sigh > .25) {
462
+ ctx.fillStyle = '#9E3B3B'; ctx.beginPath(); ctx.ellipse(226, 255, 6 + sigh * 2, 3 + sigh * 4, 0, 0, 6.29); ctx.fill();
463
+ ctx.fillStyle = '#D9686A'; ctx.beginPath(); ctx.ellipse(226, 257 + sigh * 2, 3.5, 1.6 + sigh, 0, 0, 6.29); ctx.fill();
464
+ } else {
465
+ ctx.strokeStyle = '#9E3B3B'; ctx.lineWidth = 2.2;
466
+ ctx.beginPath(); ctx.moveTo(219, 254 - ann * .5); ctx.quadraticCurveTo(226, 254 - ann * 2.5 + 1.5, 233, 254 + ann * 1.2); ctx.stroke();
467
+ }
468
+ ctx.fillStyle = 'rgba(240,143,122,.45)'; ctx.beginPath(); ctx.ellipse(243, 244, 7, 4, 0, 0, 6.29); ctx.fill();
469
+ ctx.beginPath(); ctx.ellipse(191, 244, 6, 3.5, 0, 0, 6.29); ctx.fill();
470
+ // sweat drop
471
+ const sd = prog(t, TL.shopper.sweat, 1.3);
472
+ if (sd > 0 && sd < 1) {
473
+ const a = Math.sin(Math.PI * sd), y = lerp(196, 222, eInOut(sd));
474
+ ctx.save(); ctx.globalAlpha = a; ctx.fillStyle = '#8CC8E8';
475
+ ctx.beginPath(); ctx.moveTo(252, y - 9); ctx.bezierCurveTo(247, y - 2, 246, y + 4, 252, y + 4); ctx.bezierCurveTo(258, y + 4, 257, y - 2, 252, y - 9); ctx.fill();
476
+ ctx.fillStyle = 'rgba(255,255,255,.7)'; ctx.beginPath(); ctx.arc(250.5, y, 1.2, 0, 6.29); ctx.fill(); ctx.restore();
477
+ }
478
+ ctx.restore();
479
+ // arm + basket
480
+ ctx.fillStyle = C.hoodDD; ctx.fill(new Path2D('M262 300 C286 320 293 345 288 370 L264 372 C264 350 257 330 247 315 Z'));
481
+ ctx.strokeStyle = '#24585B'; ctx.lineWidth = 5; ctx.lineCap = 'round';
482
+ ctx.beginPath(); ctx.moveTo(248, 360); ctx.bezierCurveTo(252, 330, 300, 330, 304, 360); ctx.stroke();
483
+ ctx.fillStyle = C.skin; ctx.beginPath(); ctx.ellipse(276, 368, 12, 9, 0, 0, 6.29); ctx.fill();
484
+ ctx.fillStyle = '#3E8A8E'; rr(ctx, 238, 358, 76, 40, 5); ctx.fill();
485
+ ctx.fillStyle = C.teal; for (const y of [366, 376, 386]) ctx.fillRect(244, y, 64, 3.5);
486
+ ctx.restore();
487
+ }
488
+
489
+ function drawBubble(ctx, t) {
490
+ const dots = [[262, 170, 6, 2.5], [290, 148, 10, 2.65], [322, 122, 14, 2.8]];
491
+ for (const [x, y, r, a] of dots) { const s = popS(t, a, .35); if (s <= 0) continue; ctx.fillStyle = C.teal; ctx.beginPath(); ctx.arc(x, y + Math.sin(t * 2 + x) * 1.2, r * s, 0, 6.29); ctx.fill(); }
492
+ const s = popS(t, TL.bubble.pop, .5, 1.8); if (s <= 0) return;
493
+ const bw = wobble(t, TL.bubble.carton) * .5;
494
+ ctx.save(); ctx.translate(432, 72); ctx.scale(s * (1 + bw), s * (1 - bw)); ctx.translate(-432, -72);
495
+ ctx.fillStyle = C.teal; ctx.beginPath(); ctx.ellipse(432, 72, 102, 57, 0, 0, 6.29); ctx.fill();
496
+ ctx.fillStyle = C.tealD; ctx.beginPath(); ctx.ellipse(432, 92, 92, 34, 0, 0, Math.PI); ctx.fill();
497
+ ctx.fillStyle = C.teal; ctx.beginPath(); ctx.ellipse(432, 86, 96, 30, 0, 0, Math.PI); ctx.fill();
498
+ // little speed streaks
499
+ ctx.strokeStyle = 'rgba(255,255,255,.12)'; ctx.lineWidth = 2.5; ctx.lineCap = 'round';
500
+ for (const [x, y, l] of [[352, 52, 14], [358, 90, 10], [500, 40, 12], [505, 100, 9]]) { ctx.beginPath(); ctx.moveTo(x, y); ctx.lineTo(x + l, y); ctx.stroke(); }
501
+ // milk carton character
502
+ const cs = popS(t, TL.bubble.carton, .55, 2.6);
503
+ if (cs > 0) {
504
+ const bob = Math.sin(t * 4.2) * 2.2, cw = wobble(t, TL.bubble.carton);
505
+ ctx.save(); ctx.translate(405, 104); ctx.scale(cs * (1 + cw), cs * (1 - cw)); ctx.translate(-405, -104);
506
+ ctx.fillStyle = C.tealD; ctx.beginPath(); ctx.ellipse(405, 105, 26 - bob, 3.5, 0, 0, 6.29); ctx.fill();
507
+ // legs tapping
508
+ const tap = Math.max(0, Math.sin(t * 8.4)) * 3;
509
+ ctx.strokeStyle = C.ink; ctx.lineWidth = 3; ctx.lineCap = 'round';
510
+ ctx.beginPath(); ctx.moveTo(394, 92 + bob); ctx.lineTo(390, 104); ctx.lineTo(386, 104); ctx.moveTo(416, 92 + bob); ctx.lineTo(421, 104 - tap); ctx.lineTo(425, 104 - tap); ctx.stroke();
511
+ ctx.save(); ctx.translate(0, bob);
512
+ ctx.fillStyle = C.milk; rr(ctx, 385, 42, 40, 52, 3); ctx.fill();
513
+ ctx.fillStyle = '#E9E5DA'; rr(ctx, 407, 42, 18, 52, 2); ctx.fill();
514
+ ctx.fillStyle = '#E3DED1'; ctx.beginPath(); ctx.moveTo(385, 43); ctx.lineTo(393, 26); ctx.lineTo(417, 26); ctx.lineTo(425, 43); ctx.closePath(); ctx.fill();
515
+ ctx.fillStyle = '#D6D0C1'; ctx.beginPath(); ctx.moveTo(405, 26); ctx.lineTo(417, 26); ctx.lineTo(425, 43); ctx.lineTo(411, 43); ctx.closePath(); ctx.fill();
516
+ ctx.fillStyle = C.blue; rr(ctx, 400, 19, 10, 8, 2); ctx.fill();
517
+ ctx.fillStyle = C.blue; ctx.fillRect(385, 72, 40, 10);
518
+ ctx.fillStyle = '#4A86BE'; ctx.fillRect(407, 72, 18, 10);
519
+ // face: wink at 7.5
520
+ const wink = prog(t, TL.bubble.wink, .1) * (1 - prog(t, TL.bubble.winkEnd, .1));
521
+ const cb = blink(t, 1.1, 4.1);
522
+ ctx.fillStyle = C.ink;
523
+ ctx.beginPath(); ctx.ellipse(397, 55, 2.9, 2.9 * (1 - cb * .9), 0, 0, 6.29); ctx.fill();
524
+ if (wink > .5) { ctx.strokeStyle = C.ink; ctx.lineWidth = 2; ctx.beginPath(); ctx.moveTo(409, 55); ctx.quadraticCurveTo(412, 52, 415, 55); ctx.stroke(); }
525
+ else { ctx.beginPath(); ctx.ellipse(412, 55, 2.9, 2.9 * (1 - cb * .9), 0, 0, 6.29); ctx.fill(); }
526
+ ctx.fillStyle = 'rgba(255,255,255,.9)'; ctx.beginPath(); ctx.arc(398, 54, .9, 0, 6.29); ctx.fill();
527
+ ctx.strokeStyle = C.ink; ctx.lineWidth = 2; ctx.lineCap = 'round';
528
+ ctx.beginPath(); ctx.moveTo(398, 62); ctx.quadraticCurveTo(405, 69, 412, 62); ctx.stroke();
529
+ ctx.fillStyle = 'rgba(240,143,122,.6)'; ctx.beginPath(); ctx.ellipse(392, 63, 3, 1.8, 0, 0, 6.29); ctx.ellipse(418, 63, 3, 1.8, 0, 0, 6.29); ctx.fill();
530
+ // arms: left waves, right on hip
531
+ const wave = Math.sin(t * 9) * .45;
532
+ ctx.strokeStyle = C.milk; ctx.lineWidth = 4;
533
+ ctx.save(); ctx.translate(385, 60); ctx.rotate(-.9 + wave);
534
+ ctx.beginPath(); ctx.moveTo(0, 0); ctx.quadraticCurveTo(-10, -4, -14, -14); ctx.stroke();
535
+ ctx.fillStyle = C.milk; ctx.beginPath(); ctx.arc(-14, -15, 3.2, 0, 6.29); ctx.fill(); ctx.restore();
536
+ ctx.beginPath(); ctx.moveTo(425, 60); ctx.quadraticCurveTo(436, 64, 431, 74); ctx.stroke();
537
+ ctx.restore(); ctx.restore();
538
+ }
539
+ // sparkle on wink
540
+ const sp = prog(t, TL.bubble.wink + 0.05, .7);
541
+ if (sp > 0 && sp < 1) {
542
+ const sc = Math.sin(Math.PI * sp) * 2.2;
543
+ ctx.save(); ctx.translate(432, 34); ctx.rotate(sp * 2); ctx.scale(sc, sc); ctx.fillStyle = '#FFD86B';
544
+ ctx.beginPath(); for (let i = 0; i < 8; i++) { const a = i * Math.PI / 4, r = i % 2 ? 2 : 7; ctx.lineTo(Math.cos(a) * r, Math.sin(a) * r); } ctx.closePath(); ctx.fill(); ctx.restore();
545
+ }
546
+ // counter
547
+ const cp = prog(t, TL.bubble.count + 0.1, TL.bubble.countDur);
548
+ if (t >= TL.bubble.count) {
549
+ const n = Math.round(500 * eOutCubic(cp)), ts = popS(t, TL.bubble.count, .35);
550
+ ctx.save(); ctx.translate(446, 62); ctx.scale(ts, ts);
551
+ ctx.fillStyle = '#FFFFFF'; ctx.font = '600 21px Fredoka, sans-serif'; ctx.textAlign = 'left'; ctx.textBaseline = 'alphabetic';
552
+ ctx.fillText(String(n), 0, 0);
553
+ const nw = ctx.measureText(String(n)).width;
554
+ ctx.font = '600 12px Fredoka, sans-serif'; ctx.fillStyle = '#CDE7E5'; ctx.fillText('steps', nw + 4, 0);
555
+ ctx.restore();
556
+ const as = popS(t, TL.bubble.away, .4);
557
+ if (as > 0) {
558
+ ctx.save(); ctx.translate(446, 82); ctx.scale(as, as);
559
+ ctx.fillStyle = '#FFD86B'; rr(ctx, -2, -12, 42, 17, 8.5); ctx.fill();
560
+ ctx.fillStyle = C.tealD; ctx.font = '600 11px Fredoka, sans-serif'; ctx.textAlign = 'left'; ctx.fillText('away!', 5, 0.5);
561
+ ctx.restore();
562
+ }
563
+ }
564
+ ctx.restore();
565
+ }
566
+
567
+ function drawWipe(ctx, t) {
568
+ let r = null;
569
+ if (t < TL.iris.open) r = eInOut(prog(t, 0, TL.iris.open)) * 520;
570
+ else if (t > TL.iris.close) r = (1 - eInOut(prog(t, TL.iris.close, .7))) * 520;
571
+ if (r === null) return;
572
+ ctx.fillStyle = C.teal; ctx.beginPath(); ctx.rect(-10, -10, 700, 410); ctx.moveTo(340 + Math.max(.01, r), 191); ctx.arc(340, 191, Math.max(.01, r), 0, 6.29, true); ctx.fill('evenodd');
573
+ ctx.strokeStyle = '#FFD86B'; ctx.lineWidth = 6; ctx.beginPath(); ctx.moveTo(340 + Math.max(.01, r), 191); ctx.arc(340, 191, Math.max(.01, r), 0, 6.29); ctx.stroke();
574
+ }
575
+
576
+ function renderAt(ctx, t, W, H) {
577
+ t = clamp(t, 0, TL.D - 1e-6);
578
+ ctx.save(); ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.clearRect(0, 0, W, H);
579
+ const S = W / DW; ctx.scale(S, S);
580
+ const cam = 1.03 + .15 * eInOut(prog(t, TL.cam.push, TL.cam.dur));
581
+ const dx = Math.sin(t * .5) * 1.2, dy = Math.cos(t * .4) * .8;
582
+ ctx.save();
583
+ ctx.translate(400 + dx, 190 + dy); ctx.scale(cam, cam); ctx.translate(-400, -190);
584
+ drawRoom(ctx, t);
585
+ const slide = 1 - eOutBack(prog(t, TL.shelves, .7), 1.4);
586
+ ctx.save(); ctx.translate(-280 * slide, 0); drawShelf(ctx, PL, '#ECE7DA', '#C9BEA6'); ctx.restore();
587
+ ctx.save(); ctx.translate(680 + 280 * slide, 0); ctx.scale(-1, 1); drawShelf(ctx, PR, '#E6E0D1', '#C2B79F'); ctx.restore();
588
+ drawPath(ctx, t);
589
+ for (const d of DUST) {
590
+ const y = ((d.y - t * d.v) % 383 + 383) % 383, x = d.x + Math.sin(t * .7 + d.ph) * 6;
591
+ ctx.fillStyle = 'rgba(255,253,240,.35)'; ctx.beginPath(); ctx.arc(x, y, d.s, 0, 6.29); ctx.fill();
592
+ }
593
+ ctx.restore();
594
+ // foreground: shopper with gentle parallax
595
+ const fc = 1 + (cam - 1.03) * .3;
596
+ ctx.save(); ctx.translate(200, 383); ctx.scale(fc, fc); ctx.translate(-200, -383);
597
+ drawShopper(ctx, t); ctx.restore();
598
+ ctx.save(); ctx.translate(0, 9); drawBubble(ctx, t); ctx.restore();
599
+ drawWipe(ctx, t);
600
+ ctx.restore();
601
+ }
602
+
603
+ // ---------- compositor ----------
604
+ // renderAt scales the 680 x 383 design space to whatever the canvas is (1280x720, or 2x for a crisp render)
605
+ function explainer(ctx, t) {
606
+ ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.globalAlpha = 1; ctx.globalCompositeOperation = 'source-over'; ctx.filter = 'none';
607
+ renderAt(ctx, t, ctx.canvas.width, ctx.canvas.height);
608
+ }
609
+
610
+ // =================================== SOUND SCORE ===================================
611
+ // Soft, toy-like and sparse: rounded pops, airy whooshes, wooden taps and one breathy sigh.
612
+ // No chimes, bells or pings: the cartoon carries the charm, the sound only gives it weight.
613
+ function scoreSound(k) {
614
+ const B = TL.bubble, P = TL.path, H = TL.shopper;
615
+ const tap = (t, g = 1, pan = 0, f = 190) => k.voice(t, { f: [[0, f * 1.4], [0.09, f]], dur: 0.14, gain: 0.12 * g, pan, soft: true });
616
+ const bloop = (t, g = 1, f = 330, pan = 0) => k.voice(t, { type: 'sine', f: [[0, f * 0.7], [0.07, f * 1.25], [0.16, f]], dur: 0.2, gain: 0.13 * g, pan });
617
+ k.music(0.6, TL.D - 0.4, { bpm: 96, gain: 0.55, roots: ['F1', 'D1', 'G1', 'C2'], pads: [['F3', 'A3', 'C4'], ['D3', 'F3', 'A3'], ['G3', 'B3', 'D4'], ['C3', 'E3', 'G3']] });
618
+ k.play('whoosh', 0.02, { dur: 0.7, top: 1800, gain: 0.5 }); // iris opens
619
+ k.play('whoosh', TL.shelves + 0.05, { dur: 0.5, top: 1400, gain: 0.35, pan: -0.5 }); // shelves slide in
620
+ k.play('whoosh', TL.shelves + 0.12, { dur: 0.5, top: 1400, gain: 0.35, pan: 0.5 });
621
+ k.play('whoosh', H.rise, { dur: 0.35, top: 1600, gain: 0.35 }); tap(H.land, 1.2, -0.3, 150); // shopper pops up and lands
622
+ bloop(H.annoyed, 0.7, 220, -0.3); // little huff
623
+ k.play('pop', B.pop, { gain: 0.7, f: 520 }); bloop(B.carton, 1, 392, 0.3); // bubble, then the carton
624
+ const r = rng('steps'); // counter: soft wooden ticks that thin out as it lands
625
+ for (let x = B.count + 0.12; x < B.count + B.countDur; x += 0.06 + 0.16 * ((x - B.count) / B.countDur) + r() * 0.02) tap(x, 0.45, 0.35, 420);
626
+ tap(B.count + B.countDur + 0.02, 1, 0.35, 300);
627
+ k.play('pop', B.away, { gain: 0.6, f: 640, pan: 0.35 }); // "away!" tag
628
+ bloop(B.wink, 0.6, 523, 0.3); // wink
629
+ for (let i = 0; i < 9; i++) tap(P.draw + 0.2 + i * (P.dur - 0.3) / 9, 0.3, -0.2 + i * 0.06, 260); // path dots
630
+ k.play('pop', P.pin, { gain: 0.8, f: 420 }); tap(P.pin + 0.08, 0.9, 0.1, 140); // pin drops
631
+ k.hiss(H.sigh, { color: 'pink', dur: 0.9, filter: 'bandpass', ff: [[0, 900], [0.9, 380]], q: 0.8, gain: 0.07, a: 0.25 }); // sigh
632
+ k.play('whoosh', TL.iris.close, { dur: 0.7, top: 1600, gain: 0.5, dir: -1 }); // iris closes
633
+ }
634
+
635
+ // =================================== PLAYER ===================================
636
+ const cvs = document.getElementById('stage'), ctx = cvs.getContext('2d');
637
+ const DURATION = TL.D;
638
+ window.seek = (t) => explainer(ctx, clamp(t, 0, DURATION));
639
+ window.DURATION = DURATION;
640
+ window.scoreSound = scoreSound;
641
+ window.SFX = SFX;
642
+
643
+ 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'), note: document.getElementById('vonote') };
644
+ let T = 0, playing = false, last = 0, soundOn = true, loopOn = true, stopSound = null, voAudio = null;
645
+ const fmt = (t) => t.toFixed(2) + ' / ' + DURATION.toFixed(2);
646
+ function draw() { window.seek(T); ui.scrub.value = T; ui.time.textContent = fmt(T); }
647
+ function startAudio() {
648
+ stopAudio(); if (!playing) return;
649
+ if (soundOn) stopSound = SFX.live(scoreSound, T, { voiceover: !!voAudio });
650
+ if (voAudio) { try { voAudio.currentTime = T; voAudio.play().catch(() => {}); } catch (e) {} }
651
+ }
652
+ function stopAudio() { if (stopSound) { stopSound(); stopSound = null; } if (voAudio) voAudio.pause(); }
653
+ function setPlaying(p) { playing = p; ui.play.textContent = p ? 'Pause' : 'Play'; last = performance.now(); if (p) startAudio(); else stopAudio(); }
654
+ function tick(now) {
655
+ if (playing) {
656
+ T += (now - last) / 1000; last = now;
657
+ if (T >= DURATION) { if (loopOn) { T = 0; startAudio(); } else { T = DURATION; setPlaying(false); } }
658
+ draw();
659
+ }
660
+ requestAnimationFrame(tick);
661
+ }
662
+ ui.play.addEventListener('click', () => { if (!playing && T >= DURATION) T = 0; setPlaying(!playing); });
663
+ ui.scrub.addEventListener('input', () => { T = parseFloat(ui.scrub.value); draw(); if (playing) startAudio(); });
664
+ ui.sound.addEventListener('click', () => { soundOn = !soundOn; ui.sound.setAttribute('aria-pressed', soundOn); ui.sound.textContent = soundOn ? 'Sound on' : 'Sound off'; if (playing) startAudio(); });
665
+ ui.loop.addEventListener('click', () => { loopOn = !loopOn; ui.loop.setAttribute('aria-pressed', loopOn); });
666
+ ui.vo.addEventListener('change', () => {
667
+ const f = ui.vo.files && ui.vo.files[0]; if (!f) return;
668
+ if (voAudio) { voAudio.pause(); URL.revokeObjectURL(voAudio.src); }
669
+ voAudio = new Audio(URL.createObjectURL(f)); ui.note.textContent = 'Voiceover loaded: ' + f.name + '. Effects use the lighter mix.';
670
+ if (playing) startAudio();
671
+ });
672
+ (async () => {
673
+ try { await Promise.all(['600 20px "Fredoka"', '500 20px "Fredoka"', '700 20px "Fredoka"'].map((f) => document.fonts.load(f, 'AaZz09'))); await document.fonts.ready; } catch (e) {}
674
+ T = 4.6; draw(); window.__ready = true;
675
+ requestAnimationFrame((n) => { last = n; tick(n); });
676
+ })();
677
+ </script>