@autoaiai/aicut 0.1.7 → 0.1.13

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 (306) hide show
  1. package/MANUAL.md +94 -84
  2. package/package.json +1 -1
  3. package/product.json +2 -1
  4. package/skills/aicut/SKILL.md +4 -4
  5. package/skills/aicut/references/commands.md +15 -15
  6. package/skills/aicut/references/film-format.md +1 -1
  7. package/skills/aicut/references/recipes.md +4 -4
  8. package/skills/aicut/references/troubleshooting.md +2 -2
  9. package/skills/aicut-motion/SKILL.md +75 -9
  10. package/skills/aicut-motion/THIRD_PARTY_NOTICES.md +14 -0
  11. package/skills/aicut-motion/assets/atlas/lib/harness.js +116 -0
  12. package/skills/aicut-motion/assets/atlas/lib/sound.js +274 -0
  13. package/skills/aicut-motion/assets/atlas/styles/001-flat-vector-science/code.js +937 -0
  14. package/skills/aicut-motion/assets/atlas/styles/001-flat-vector-science/poster.jpg +0 -0
  15. package/skills/aicut-motion/assets/atlas/styles/001-flat-vector-science/style.json +13 -0
  16. package/skills/aicut-motion/assets/atlas/styles/002-watercolor-wash/code.js +909 -0
  17. package/skills/aicut-motion/assets/atlas/styles/002-watercolor-wash/poster.jpg +0 -0
  18. package/skills/aicut-motion/assets/atlas/styles/002-watercolor-wash/style.json +13 -0
  19. package/skills/aicut-motion/assets/atlas/styles/003-shadow-puppet-theatre/code.js +881 -0
  20. package/skills/aicut-motion/assets/atlas/styles/003-shadow-puppet-theatre/poster.jpg +0 -0
  21. package/skills/aicut-motion/assets/atlas/styles/003-shadow-puppet-theatre/style.json +13 -0
  22. package/skills/aicut-motion/assets/atlas/styles/004-whiteboard-explainer/code.js +897 -0
  23. package/skills/aicut-motion/assets/atlas/styles/004-whiteboard-explainer/poster.jpg +0 -0
  24. package/skills/aicut-motion/assets/atlas/styles/004-whiteboard-explainer/style.json +13 -0
  25. package/skills/aicut-motion/assets/atlas/styles/005-psychedelic-poster/code.js +814 -0
  26. package/skills/aicut-motion/assets/atlas/styles/005-psychedelic-poster/poster.jpg +0 -0
  27. package/skills/aicut-motion/assets/atlas/styles/005-psychedelic-poster/style.json +13 -0
  28. package/skills/aicut-motion/assets/atlas/styles/006-tech-glow-explainer/code.js +990 -0
  29. package/skills/aicut-motion/assets/atlas/styles/006-tech-glow-explainer/poster.jpg +0 -0
  30. package/skills/aicut-motion/assets/atlas/styles/006-tech-glow-explainer/style.json +13 -0
  31. package/skills/aicut-motion/assets/atlas/styles/007-papercraft-models/code.js +994 -0
  32. package/skills/aicut-motion/assets/atlas/styles/007-papercraft-models/poster.jpg +0 -0
  33. package/skills/aicut-motion/assets/atlas/styles/007-papercraft-models/style.json +13 -0
  34. package/skills/aicut-motion/assets/atlas/styles/008-1940s-film-noir/code.js +792 -0
  35. package/skills/aicut-motion/assets/atlas/styles/008-1940s-film-noir/poster.jpg +0 -0
  36. package/skills/aicut-motion/assets/atlas/styles/008-1940s-film-noir/style.json +13 -0
  37. package/skills/aicut-motion/assets/atlas/styles/009-manim-style-math/code.js +840 -0
  38. package/skills/aicut-motion/assets/atlas/styles/009-manim-style-math/poster.jpg +0 -0
  39. package/skills/aicut-motion/assets/atlas/styles/009-manim-style-math/style.json +13 -0
  40. package/skills/aicut-motion/assets/atlas/styles/010-illuminated-manuscript/code.js +1126 -0
  41. package/skills/aicut-motion/assets/atlas/styles/010-illuminated-manuscript/poster.jpg +0 -0
  42. package/skills/aicut-motion/assets/atlas/styles/010-illuminated-manuscript/style.json +13 -0
  43. package/skills/aicut-motion/assets/atlas/styles/011-editorial-essay-collage/code.js +854 -0
  44. package/skills/aicut-motion/assets/atlas/styles/011-editorial-essay-collage/poster.jpg +0 -0
  45. package/skills/aicut-motion/assets/atlas/styles/011-editorial-essay-collage/style.json +13 -0
  46. package/skills/aicut-motion/assets/atlas/styles/012-bioluminescent-deep-sea/code.js +1124 -0
  47. package/skills/aicut-motion/assets/atlas/styles/012-bioluminescent-deep-sea/poster.jpg +0 -0
  48. package/skills/aicut-motion/assets/atlas/styles/012-bioluminescent-deep-sea/style.json +13 -0
  49. package/skills/aicut-motion/assets/atlas/styles/013-product-launch-reveal/code.js +728 -0
  50. package/skills/aicut-motion/assets/atlas/styles/013-product-launch-reveal/poster.jpg +0 -0
  51. package/skills/aicut-motion/assets/atlas/styles/013-product-launch-reveal/style.json +13 -0
  52. package/skills/aicut-motion/assets/atlas/styles/014-halftone-pop-panel/code.js +664 -0
  53. package/skills/aicut-motion/assets/atlas/styles/014-halftone-pop-panel/poster.jpg +0 -0
  54. package/skills/aicut-motion/assets/atlas/styles/014-halftone-pop-panel/style.json +13 -0
  55. package/skills/aicut-motion/assets/atlas/styles/015-isometric-pastel/code.js +991 -0
  56. package/skills/aicut-motion/assets/atlas/styles/015-isometric-pastel/poster.jpg +0 -0
  57. package/skills/aicut-motion/assets/atlas/styles/015-isometric-pastel/style.json +13 -0
  58. package/skills/aicut-motion/assets/atlas/styles/016-oscilloscope-vector-art/code.js +801 -0
  59. package/skills/aicut-motion/assets/atlas/styles/016-oscilloscope-vector-art/poster.jpg +0 -0
  60. package/skills/aicut-motion/assets/atlas/styles/016-oscilloscope-vector-art/style.json +13 -0
  61. package/skills/aicut-motion/assets/atlas/styles/017-risograph-zine/code.js +692 -0
  62. package/skills/aicut-motion/assets/atlas/styles/017-risograph-zine/poster.jpg +0 -0
  63. package/skills/aicut-motion/assets/atlas/styles/017-risograph-zine/style.json +13 -0
  64. package/skills/aicut-motion/assets/atlas/styles/018-claymation-set/code.js +756 -0
  65. package/skills/aicut-motion/assets/atlas/styles/018-claymation-set/poster.jpg +0 -0
  66. package/skills/aicut-motion/assets/atlas/styles/018-claymation-set/style.json +13 -0
  67. package/skills/aicut-motion/assets/atlas/styles/019-neon-sign-at-night/code.js +922 -0
  68. package/skills/aicut-motion/assets/atlas/styles/019-neon-sign-at-night/poster.jpg +0 -0
  69. package/skills/aicut-motion/assets/atlas/styles/019-neon-sign-at-night/style.json +13 -0
  70. package/skills/aicut-motion/assets/atlas/styles/020-kawaii-anime/code.js +852 -0
  71. package/skills/aicut-motion/assets/atlas/styles/020-kawaii-anime/poster.jpg +0 -0
  72. package/skills/aicut-motion/assets/atlas/styles/020-kawaii-anime/style.json +13 -0
  73. package/skills/aicut-motion/assets/atlas/styles/021-ukiyo-e-woodblock/code.js +724 -0
  74. package/skills/aicut-motion/assets/atlas/styles/021-ukiyo-e-woodblock/poster.jpg +0 -0
  75. package/skills/aicut-motion/assets/atlas/styles/021-ukiyo-e-woodblock/style.json +13 -0
  76. package/skills/aicut-motion/assets/atlas/styles/022-16-bit-pixel-odyssey/code.js +793 -0
  77. package/skills/aicut-motion/assets/atlas/styles/022-16-bit-pixel-odyssey/poster.jpg +0 -0
  78. package/skills/aicut-motion/assets/atlas/styles/022-16-bit-pixel-odyssey/style.json +13 -0
  79. package/skills/aicut-motion/assets/atlas/styles/023-chalkboard-lesson/code.js +846 -0
  80. package/skills/aicut-motion/assets/atlas/styles/023-chalkboard-lesson/poster.jpg +0 -0
  81. package/skills/aicut-motion/assets/atlas/styles/023-chalkboard-lesson/style.json +13 -0
  82. package/skills/aicut-motion/assets/atlas/styles/024-cut-paper-diorama/code.js +1008 -0
  83. package/skills/aicut-motion/assets/atlas/styles/024-cut-paper-diorama/poster.jpg +0 -0
  84. package/skills/aicut-motion/assets/atlas/styles/024-cut-paper-diorama/style.json +13 -0
  85. package/skills/aicut-motion/assets/atlas/styles/025-cathedral-glass/code.js +680 -0
  86. package/skills/aicut-motion/assets/atlas/styles/025-cathedral-glass/poster.jpg +0 -0
  87. package/skills/aicut-motion/assets/atlas/styles/025-cathedral-glass/style.json +13 -0
  88. package/skills/aicut-motion/assets/atlas/styles/026-editorial-chart/code.js +633 -0
  89. package/skills/aicut-motion/assets/atlas/styles/026-editorial-chart/poster.jpg +0 -0
  90. package/skills/aicut-motion/assets/atlas/styles/026-editorial-chart/style.json +13 -0
  91. package/skills/aicut-motion/assets/atlas/styles/027-synthwave-outrun/code.js +757 -0
  92. package/skills/aicut-motion/assets/atlas/styles/027-synthwave-outrun/poster.jpg +0 -0
  93. package/skills/aicut-motion/assets/atlas/styles/027-synthwave-outrun/style.json +13 -0
  94. package/skills/aicut-motion/assets/atlas/styles/028-origami-studio/code.js +828 -0
  95. package/skills/aicut-motion/assets/atlas/styles/028-origami-studio/poster.jpg +0 -0
  96. package/skills/aicut-motion/assets/atlas/styles/028-origami-studio/style.json +13 -0
  97. package/skills/aicut-motion/assets/atlas/styles/029-linocut-relief-print/code.js +697 -0
  98. package/skills/aicut-motion/assets/atlas/styles/029-linocut-relief-print/poster.jpg +0 -0
  99. package/skills/aicut-motion/assets/atlas/styles/029-linocut-relief-print/style.json +13 -0
  100. package/skills/aicut-motion/assets/atlas/styles/030-holographic-foil-card/code.js +687 -0
  101. package/skills/aicut-motion/assets/atlas/styles/030-holographic-foil-card/poster.jpg +0 -0
  102. package/skills/aicut-motion/assets/atlas/styles/030-holographic-foil-card/style.json +13 -0
  103. package/skills/aicut-motion/assets/atlas/styles/031-voxel-diorama/code.js +727 -0
  104. package/skills/aicut-motion/assets/atlas/styles/031-voxel-diorama/poster.jpg +0 -0
  105. package/skills/aicut-motion/assets/atlas/styles/031-voxel-diorama/style.json +13 -0
  106. package/skills/aicut-motion/assets/atlas/styles/032-sumi-e-ink-wash/code.js +903 -0
  107. package/skills/aicut-motion/assets/atlas/styles/032-sumi-e-ink-wash/poster.jpg +0 -0
  108. package/skills/aicut-motion/assets/atlas/styles/032-sumi-e-ink-wash/style.json +13 -0
  109. package/skills/aicut-motion/assets/atlas/styles/033-etch-a-sketch-toy/code.js +662 -0
  110. package/skills/aicut-motion/assets/atlas/styles/033-etch-a-sketch-toy/poster.jpg +0 -0
  111. package/skills/aicut-motion/assets/atlas/styles/033-etch-a-sketch-toy/style.json +13 -0
  112. package/skills/aicut-motion/assets/atlas/styles/034-cosmic-star-chart/code.js +951 -0
  113. package/skills/aicut-motion/assets/atlas/styles/034-cosmic-star-chart/poster.jpg +0 -0
  114. package/skills/aicut-motion/assets/atlas/styles/034-cosmic-star-chart/style.json +13 -0
  115. package/skills/aicut-motion/assets/atlas/styles/035-punk-zine-collage/code.js +759 -0
  116. package/skills/aicut-motion/assets/atlas/styles/035-punk-zine-collage/poster.jpg +0 -0
  117. package/skills/aicut-motion/assets/atlas/styles/035-punk-zine-collage/style.json +13 -0
  118. package/skills/aicut-motion/assets/atlas/styles/036-thermal-camera/code.js +738 -0
  119. package/skills/aicut-motion/assets/atlas/styles/036-thermal-camera/poster.jpg +0 -0
  120. package/skills/aicut-motion/assets/atlas/styles/036-thermal-camera/style.json +13 -0
  121. package/skills/aicut-motion/assets/atlas/styles/037-engineering-blueprint/code.js +793 -0
  122. package/skills/aicut-motion/assets/atlas/styles/037-engineering-blueprint/poster.jpg +0 -0
  123. package/skills/aicut-motion/assets/atlas/styles/037-engineering-blueprint/style.json +13 -0
  124. package/skills/aicut-motion/assets/atlas/styles/038-impasto-night/code.js +673 -0
  125. package/skills/aicut-motion/assets/atlas/styles/038-impasto-night/poster.jpg +0 -0
  126. package/skills/aicut-motion/assets/atlas/styles/038-impasto-night/style.json +13 -0
  127. package/skills/aicut-motion/assets/atlas/styles/039-win95-desktop/code.js +907 -0
  128. package/skills/aicut-motion/assets/atlas/styles/039-win95-desktop/poster.jpg +0 -0
  129. package/skills/aicut-motion/assets/atlas/styles/039-win95-desktop/style.json +13 -0
  130. package/skills/aicut-motion/assets/atlas/styles/040-low-poly-faceted/code.js +833 -0
  131. package/skills/aicut-motion/assets/atlas/styles/040-low-poly-faceted/poster.jpg +0 -0
  132. package/skills/aicut-motion/assets/atlas/styles/040-low-poly-faceted/style.json +13 -0
  133. package/skills/aicut-motion/assets/atlas/styles/041-manga-page/code.js +845 -0
  134. package/skills/aicut-motion/assets/atlas/styles/041-manga-page/poster.jpg +0 -0
  135. package/skills/aicut-motion/assets/atlas/styles/041-manga-page/style.json +13 -0
  136. package/skills/aicut-motion/assets/atlas/styles/042-wood-type-letterpress/code.js +496 -0
  137. package/skills/aicut-motion/assets/atlas/styles/042-wood-type-letterpress/poster.jpg +0 -0
  138. package/skills/aicut-motion/assets/atlas/styles/042-wood-type-letterpress/style.json +13 -0
  139. package/skills/aicut-motion/assets/atlas/styles/043-light-painting/code.js +635 -0
  140. package/skills/aicut-motion/assets/atlas/styles/043-light-painting/poster.jpg +0 -0
  141. package/skills/aicut-motion/assets/atlas/styles/043-light-painting/style.json +13 -0
  142. package/skills/aicut-motion/assets/atlas/styles/044-felt-patchwork/code.js +799 -0
  143. package/skills/aicut-motion/assets/atlas/styles/044-felt-patchwork/poster.jpg +0 -0
  144. package/skills/aicut-motion/assets/atlas/styles/044-felt-patchwork/style.json +13 -0
  145. package/skills/aicut-motion/assets/atlas/styles/045-phosphor-terminal/code.js +547 -0
  146. package/skills/aicut-motion/assets/atlas/styles/045-phosphor-terminal/poster.jpg +0 -0
  147. package/skills/aicut-motion/assets/atlas/styles/045-phosphor-terminal/style.json +13 -0
  148. package/skills/aicut-motion/assets/atlas/styles/046-glassmorphism-ui/code.js +592 -0
  149. package/skills/aicut-motion/assets/atlas/styles/046-glassmorphism-ui/poster.jpg +0 -0
  150. package/skills/aicut-motion/assets/atlas/styles/046-glassmorphism-ui/style.json +13 -0
  151. package/skills/aicut-motion/assets/atlas/styles/047-tarot-card/code.js +768 -0
  152. package/skills/aicut-motion/assets/atlas/styles/047-tarot-card/poster.jpg +0 -0
  153. package/skills/aicut-motion/assets/atlas/styles/047-tarot-card/style.json +13 -0
  154. package/skills/aicut-motion/assets/atlas/styles/048-transit-map/code.js +666 -0
  155. package/skills/aicut-motion/assets/atlas/styles/048-transit-map/poster.jpg +0 -0
  156. package/skills/aicut-motion/assets/atlas/styles/048-transit-map/style.json +13 -0
  157. package/skills/aicut-motion/assets/atlas/styles/049-gouache-travel-poster/code.js +559 -0
  158. package/skills/aicut-motion/assets/atlas/styles/049-gouache-travel-poster/poster.jpg +0 -0
  159. package/skills/aicut-motion/assets/atlas/styles/049-gouache-travel-poster/style.json +13 -0
  160. package/skills/aicut-motion/assets/atlas/styles/050-napkin-sketch/code.js +943 -0
  161. package/skills/aicut-motion/assets/atlas/styles/050-napkin-sketch/poster.jpg +0 -0
  162. package/skills/aicut-motion/assets/atlas/styles/050-napkin-sketch/style.json +13 -0
  163. package/skills/aicut-motion/assets/atlas/styles/051-art-deco-foil/code.js +606 -0
  164. package/skills/aicut-motion/assets/atlas/styles/051-art-deco-foil/poster.jpg +0 -0
  165. package/skills/aicut-motion/assets/atlas/styles/051-art-deco-foil/style.json +13 -0
  166. package/skills/aicut-motion/assets/atlas/styles/052-radiograph-on-lightbox/code.js +730 -0
  167. package/skills/aicut-motion/assets/atlas/styles/052-radiograph-on-lightbox/poster.jpg +0 -0
  168. package/skills/aicut-motion/assets/atlas/styles/052-radiograph-on-lightbox/style.json +13 -0
  169. package/skills/aicut-motion/assets/atlas/styles/053-vaporwave/code.js +782 -0
  170. package/skills/aicut-motion/assets/atlas/styles/053-vaporwave/poster.jpg +0 -0
  171. package/skills/aicut-motion/assets/atlas/styles/053-vaporwave/style.json +13 -0
  172. package/skills/aicut-motion/assets/atlas/styles/054-ebru-paper-marbling/code.js +504 -0
  173. package/skills/aicut-motion/assets/atlas/styles/054-ebru-paper-marbling/poster.jpg +0 -0
  174. package/skills/aicut-motion/assets/atlas/styles/054-ebru-paper-marbling/style.json +13 -0
  175. package/skills/aicut-motion/assets/atlas/styles/055-isotype-pictograms/code.js +517 -0
  176. package/skills/aicut-motion/assets/atlas/styles/055-isotype-pictograms/poster.jpg +0 -0
  177. package/skills/aicut-motion/assets/atlas/styles/055-isotype-pictograms/style.json +13 -0
  178. package/skills/aicut-motion/assets/atlas/styles/056-soft-3d-clay/code.js +713 -0
  179. package/skills/aicut-motion/assets/atlas/styles/056-soft-3d-clay/poster.jpg +0 -0
  180. package/skills/aicut-motion/assets/atlas/styles/056-soft-3d-clay/style.json +13 -0
  181. package/skills/aicut-motion/assets/atlas/styles/057-cross-stitch-sampler/code.js +717 -0
  182. package/skills/aicut-motion/assets/atlas/styles/057-cross-stitch-sampler/poster.jpg +0 -0
  183. package/skills/aicut-motion/assets/atlas/styles/057-cross-stitch-sampler/style.json +13 -0
  184. package/skills/aicut-motion/assets/atlas/styles/058-constructivist-propaganda/code.js +540 -0
  185. package/skills/aicut-motion/assets/atlas/styles/058-constructivist-propaganda/poster.jpg +0 -0
  186. package/skills/aicut-motion/assets/atlas/styles/058-constructivist-propaganda/style.json +13 -0
  187. package/skills/aicut-motion/assets/atlas/styles/059-pocket-monochrome/code.js +524 -0
  188. package/skills/aicut-motion/assets/atlas/styles/059-pocket-monochrome/poster.jpg +0 -0
  189. package/skills/aicut-motion/assets/atlas/styles/059-pocket-monochrome/style.json +13 -0
  190. package/skills/aicut-motion/assets/atlas/styles/060-botanical-plate/code.js +934 -0
  191. package/skills/aicut-motion/assets/atlas/styles/060-botanical-plate/poster.jpg +0 -0
  192. package/skills/aicut-motion/assets/atlas/styles/060-botanical-plate/style.json +13 -0
  193. package/skills/aicut-motion/assets/atlas/styles/061-kinetic-type/code.js +690 -0
  194. package/skills/aicut-motion/assets/atlas/styles/061-kinetic-type/poster.jpg +0 -0
  195. package/skills/aicut-motion/assets/atlas/styles/061-kinetic-type/style.json +13 -0
  196. package/skills/aicut-motion/assets/atlas/styles/062-byzantine-mosaic/code.js +612 -0
  197. package/skills/aicut-motion/assets/atlas/styles/062-byzantine-mosaic/poster.jpg +0 -0
  198. package/skills/aicut-motion/assets/atlas/styles/062-byzantine-mosaic/style.json +13 -0
  199. package/skills/aicut-motion/assets/atlas/styles/063-y2k-liquid-chrome/code.js +666 -0
  200. package/skills/aicut-motion/assets/atlas/styles/063-y2k-liquid-chrome/poster.jpg +0 -0
  201. package/skills/aicut-motion/assets/atlas/styles/063-y2k-liquid-chrome/style.json +13 -0
  202. package/skills/aicut-motion/assets/atlas/styles/064-sticky-note-wall/code.js +651 -0
  203. package/skills/aicut-motion/assets/atlas/styles/064-sticky-note-wall/poster.jpg +0 -0
  204. package/skills/aicut-motion/assets/atlas/styles/064-sticky-note-wall/style.json +13 -0
  205. package/skills/aicut-motion/assets/atlas/styles/065-vintage-newsprint/code.js +656 -0
  206. package/skills/aicut-motion/assets/atlas/styles/065-vintage-newsprint/poster.jpg +0 -0
  207. package/skills/aicut-motion/assets/atlas/styles/065-vintage-newsprint/style.json +13 -0
  208. package/skills/aicut-motion/assets/atlas/styles/066-hidden-line-wireframe/code.js +672 -0
  209. package/skills/aicut-motion/assets/atlas/styles/066-hidden-line-wireframe/poster.jpg +0 -0
  210. package/skills/aicut-motion/assets/atlas/styles/066-hidden-line-wireframe/style.json +13 -0
  211. package/skills/aicut-motion/assets/atlas/styles/067-memphis-group/code.js +548 -0
  212. package/skills/aicut-motion/assets/atlas/styles/067-memphis-group/poster.jpg +0 -0
  213. package/skills/aicut-motion/assets/atlas/styles/067-memphis-group/style.json +13 -0
  214. package/skills/aicut-motion/assets/atlas/styles/068-ballpoint-notebook/code.js +989 -0
  215. package/skills/aicut-motion/assets/atlas/styles/068-ballpoint-notebook/poster.jpg +0 -0
  216. package/skills/aicut-motion/assets/atlas/styles/068-ballpoint-notebook/style.json +13 -0
  217. package/skills/aicut-motion/assets/atlas/styles/069-op-art-sphere/code.js +440 -0
  218. package/skills/aicut-motion/assets/atlas/styles/069-op-art-sphere/poster.jpg +0 -0
  219. package/skills/aicut-motion/assets/atlas/styles/069-op-art-sphere/style.json +13 -0
  220. package/skills/aicut-motion/assets/atlas/styles/070-topographic-survey/code.js +895 -0
  221. package/skills/aicut-motion/assets/atlas/styles/070-topographic-survey/poster.jpg +0 -0
  222. package/skills/aicut-motion/assets/atlas/styles/070-topographic-survey/style.json +13 -0
  223. package/skills/aicut-motion/assets/atlas/styles/071-pointillist-afternoon/code.js +563 -0
  224. package/skills/aicut-motion/assets/atlas/styles/071-pointillist-afternoon/poster.jpg +0 -0
  225. package/skills/aicut-motion/assets/atlas/styles/071-pointillist-afternoon/style.json +13 -0
  226. package/skills/aicut-motion/assets/atlas/styles/072-vector-arcade-1980/code.js +627 -0
  227. package/skills/aicut-motion/assets/atlas/styles/072-vector-arcade-1980/poster.jpg +0 -0
  228. package/skills/aicut-motion/assets/atlas/styles/072-vector-arcade-1980/style.json +13 -0
  229. package/skills/aicut-motion/assets/atlas/styles/073-patent-drawing/code.js +1096 -0
  230. package/skills/aicut-motion/assets/atlas/styles/073-patent-drawing/poster.jpg +0 -0
  231. package/skills/aicut-motion/assets/atlas/styles/073-patent-drawing/style.json +13 -0
  232. package/skills/aicut-motion/assets/atlas/styles/074-bauhaus-poster/code.js +595 -0
  233. package/skills/aicut-motion/assets/atlas/styles/074-bauhaus-poster/poster.jpg +0 -0
  234. package/skills/aicut-motion/assets/atlas/styles/074-bauhaus-poster/style.json +13 -0
  235. package/skills/aicut-motion/assets/atlas/styles/075-bitmap-paint-doodle/code.js +665 -0
  236. package/skills/aicut-motion/assets/atlas/styles/075-bitmap-paint-doodle/poster.jpg +0 -0
  237. package/skills/aicut-motion/assets/atlas/styles/075-bitmap-paint-doodle/style.json +13 -0
  238. package/skills/aicut-motion/assets/atlas/styles/076-nail-thread-string-art/code.js +645 -0
  239. package/skills/aicut-motion/assets/atlas/styles/076-nail-thread-string-art/poster.jpg +0 -0
  240. package/skills/aicut-motion/assets/atlas/styles/076-nail-thread-string-art/style.json +13 -0
  241. package/skills/aicut-motion/assets/atlas/styles/077-ridgeline/code.js +436 -0
  242. package/skills/aicut-motion/assets/atlas/styles/077-ridgeline/poster.jpg +0 -0
  243. package/skills/aicut-motion/assets/atlas/styles/077-ridgeline/style.json +13 -0
  244. package/skills/aicut-motion/assets/atlas/styles/078-sketchbook-graphite/code.js +1237 -0
  245. package/skills/aicut-motion/assets/atlas/styles/078-sketchbook-graphite/poster.jpg +0 -0
  246. package/skills/aicut-motion/assets/atlas/styles/078-sketchbook-graphite/style.json +13 -0
  247. package/skills/aicut-motion/assets/atlas/styles/079-teletext-page/code.js +622 -0
  248. package/skills/aicut-motion/assets/atlas/styles/079-teletext-page/poster.jpg +0 -0
  249. package/skills/aicut-motion/assets/atlas/styles/079-teletext-page/style.json +13 -0
  250. package/skills/aicut-motion/assets/atlas/styles/080-silkscreen-grid/code.js +524 -0
  251. package/skills/aicut-motion/assets/atlas/styles/080-silkscreen-grid/poster.jpg +0 -0
  252. package/skills/aicut-motion/assets/atlas/styles/080-silkscreen-grid/style.json +13 -0
  253. package/skills/aicut-motion/assets/atlas/styles/081-guilloch-security-print/code.js +689 -0
  254. package/skills/aicut-motion/assets/atlas/styles/081-guilloch-security-print/poster.jpg +0 -0
  255. package/skills/aicut-motion/assets/atlas/styles/081-guilloch-security-print/style.json +13 -0
  256. package/skills/aicut-motion/assets/atlas/styles/082-ascii-demoscene/code.js +574 -0
  257. package/skills/aicut-motion/assets/atlas/styles/082-ascii-demoscene/poster.jpg +0 -0
  258. package/skills/aicut-motion/assets/atlas/styles/082-ascii-demoscene/style.json +13 -0
  259. package/skills/aicut-motion/assets/atlas/styles/083-international-typographic-style/code.js +469 -0
  260. package/skills/aicut-motion/assets/atlas/styles/083-international-typographic-style/poster.jpg +0 -0
  261. package/skills/aicut-motion/assets/atlas/styles/083-international-typographic-style/style.json +13 -0
  262. package/skills/aicut-motion/assets/atlas/styles/084-flow-field/code.js +531 -0
  263. package/skills/aicut-motion/assets/atlas/styles/084-flow-field/poster.jpg +0 -0
  264. package/skills/aicut-motion/assets/atlas/styles/084-flow-field/style.json +13 -0
  265. package/skills/aicut-motion/assets/atlas/styles/085-macpaint-1984/code.js +675 -0
  266. package/skills/aicut-motion/assets/atlas/styles/085-macpaint-1984/poster.jpg +0 -0
  267. package/skills/aicut-motion/assets/atlas/styles/085-macpaint-1984/style.json +13 -0
  268. package/skills/aicut-motion/assets/atlas/styles/086-multi-scale-truchet/code.js +609 -0
  269. package/skills/aicut-motion/assets/atlas/styles/086-multi-scale-truchet/poster.jpg +0 -0
  270. package/skills/aicut-motion/assets/atlas/styles/086-multi-scale-truchet/style.json +13 -0
  271. package/skills/aicut-motion/references/design-systems/README.md +1 -1
  272. package/skills/aicut-motion/references/motion-delivery.md +55 -0
  273. package/skills/aicut-motion/references/pages.md +1 -1
  274. package/skills/aicut-motion/references/style-index.json +690 -0
  275. package/skills/aicut-motion/references/style-research.md +73 -0
  276. package/skills/aicut-motion/references/style-selection.md +71 -0
  277. package/skills/aicut-motion/scripts/atlas-viewer.html +195 -0
  278. package/skills/aicut-motion/scripts/atlas.mjs +109 -0
  279. package/studio/client.mjs +3 -3
  280. package/studio/server/fetch-github.mjs +14 -3
  281. package/studio/server/server.mjs +71 -6
  282. package/studio/server/skill-summaries.mjs +60 -0
  283. package/studio/server/skills.mjs +121 -7
  284. package/studio/server/styles-store.mjs +235 -0
  285. package/studio/server/template-posters.mjs +2 -2
  286. package/studio/server/templates-page.mjs +93 -93
  287. package/studio/server/templates.mjs +32 -7
  288. package/studio/ui/dist/assets/ExportCenter-DasulhAv.js +1 -0
  289. package/studio/ui/dist/assets/SettingsModal-BZw0Hz2_.js +2 -0
  290. package/studio/ui/dist/assets/apple-touch-icon-ClxQ7j-O.png +0 -0
  291. package/studio/ui/dist/assets/es-C8XPZARI.js +1 -0
  292. package/studio/ui/dist/assets/favicon-Blwx8Trs.png +0 -0
  293. package/studio/ui/dist/assets/index-BjJVmBzB.js +1623 -0
  294. package/studio/ui/dist/assets/index-C3BfKZFO.css +1 -0
  295. package/studio/ui/dist/assets/ja-BeNkdaEj.js +1 -0
  296. package/studio/ui/dist/assets/ko-DcTVhdzK.js +1 -0
  297. package/studio/ui/dist/assets/zh-CN-Cg51ctbL.js +1 -0
  298. package/studio/ui/dist/index.html +4 -3
  299. package/studio/ui/dist/assets/ExportCenter-F-2vF-lQ.js +0 -1
  300. package/studio/ui/dist/assets/SettingsModal-BgVYguNu.js +0 -2
  301. package/studio/ui/dist/assets/es-BRUzvuoM.js +0 -1
  302. package/studio/ui/dist/assets/index-Bhg-9dA3.css +0 -1
  303. package/studio/ui/dist/assets/index-CWur1Iw9.js +0 -1625
  304. package/studio/ui/dist/assets/ja-Cth-uDcW.js +0 -1
  305. package/studio/ui/dist/assets/ko-upvw591D.js +0 -1
  306. package/studio/ui/dist/assets/zh-CN-BCfJFazB.js +0 -1
@@ -0,0 +1,651 @@
1
+ {
2
+ // ---------- brainstorming cork board ----------
3
+ const TAU = Math.PI * 2;
4
+ let CORK = null; // static cork texture, computed once (deterministic)
5
+ const INK = '#1b1f29', BLUE = '#1f3c8f', RED = '#c3202a';
6
+
7
+ function grainPattern(ctx, seed) {
8
+ const c = H.layer(160, 160), x = c.getContext('2d'), img = x.createImageData(160, 160), d = img.data, r = H.rng(seed), nz = H.makeNoise(seed);
9
+ for (let i = 0; i < 160 * 160; i++) {
10
+ const px = i % 160, py = (i / 160) | 0;
11
+ const v = 200 + (r() - 0.5) * 50 + nz.n2(px * 0.4, py * 0.05) * 20;
12
+ d[i * 4] = d[i * 4 + 1] = d[i * 4 + 2] = v; d[i * 4 + 3] = 255;
13
+ }
14
+ x.putImageData(img, 0, 0);
15
+ return ctx.createPattern(c, 'repeat');
16
+ }
17
+
18
+ // handwriting: per-word jitter on baseline/rotation, light double-pass for marker bleed
19
+ function hand(ctx, lines, x, y, font, color, seed, lh, opts = {}) {
20
+ const r = H.rng(seed);
21
+ ctx.save(); ctx.font = font; ctx.fillStyle = color; ctx.textBaseline = 'middle';
22
+ lines.forEach((ln, li) => {
23
+ const words = ln.split(' ');
24
+ const sp = ctx.measureText(' ').width * 0.9;
25
+ const total = words.reduce((a, w) => a + ctx.measureText(w).width, 0) + sp * (words.length - 1);
26
+ let cx = x - total / 2 + r.range(-4, 4);
27
+ const cy = y + (li - (lines.length - 1) / 2) * lh;
28
+ words.forEach((w) => {
29
+ const ww = ctx.measureText(w).width;
30
+ ctx.save(); ctx.translate(cx + ww / 2, cy + r.range(-2, 2)); ctx.rotate(r.range(-0.045, 0.045));
31
+ ctx.textAlign = 'center';
32
+ ctx.globalAlpha = 0.35; ctx.fillText(w, 0.7, 0.5);
33
+ ctx.globalAlpha = opts.alpha || 0.93; ctx.fillText(w, 0, 0);
34
+ ctx.restore();
35
+ cx += ww + sp;
36
+ });
37
+ });
38
+ ctx.restore();
39
+ }
40
+ // wobbly marker line
41
+ function mline(ctx, pts, w, color, r, close) {
42
+ ctx.save(); ctx.strokeStyle = color; ctx.lineWidth = w; ctx.lineCap = 'round'; ctx.lineJoin = 'round'; ctx.globalAlpha = 0.9;
43
+ ctx.beginPath();
44
+ pts.forEach((p, i) => { const x = p[0] + r.range(-0.8, 0.8), y = p[1] + r.range(-0.8, 0.8); i ? ctx.lineTo(x, y) : ctx.moveTo(x, y); });
45
+ if (close) ctx.closePath();
46
+ ctx.stroke(); ctx.restore();
47
+ }
48
+ const arcPts = (cx, cy, rx, ry, a0, a1, n = 20) => { const o = []; for (let k = 0; k <= n; k++) { const a = a0 + (a1 - a0) * k / n; o.push([cx + Math.cos(a) * rx, cy + Math.sin(a) * ry]); } return o; };
49
+
50
+ function note(ctx, o, pat) {
51
+ const { x, y, w, h, rot, col } = o;
52
+ const r = H.rng(o.seed);
53
+ ctx.save(); ctx.translate(x, y); ctx.rotate(rot);
54
+ const hw = w / 2, hh = h / 2, lift = (o.lift ?? 1) * 1.35;
55
+ // shadow (bottom lifts off the board -> bigger, softer shadow there)
56
+ const air = Math.max(0, o.air || 0); ctx.save(); ctx.filter = `blur(${7 + air * 40}px)`; ctx.translate(air * 50, air * 70); ctx.fillStyle = `rgba(40,20,5,${0.42 - air * 0.5})`;
57
+ ctx.beginPath(); ctx.moveTo(-hw + 3, -hh + 5); ctx.lineTo(hw + 3, -hh + 5); ctx.lineTo(hw + 6 + 6 * lift, hh + 8 + 10 * lift); ctx.quadraticCurveTo(0, hh + 4 + 6 * lift, -hw + 1, hh + 6 + 9 * lift); ctx.closePath(); ctx.fill();
58
+ ctx.restore();
59
+ ctx.save(); ctx.filter = 'blur(1.5px)'; ctx.fillStyle = 'rgba(40,20,5,0.3)'; ctx.fillRect(-hw + 1, -hh + 2, w, h * 0.3); ctx.restore();
60
+ // paper with curled bottom edge
61
+ const bc = 5 * lift;
62
+ const shape = () => { ctx.beginPath(); ctx.moveTo(-hw, -hh); ctx.lineTo(hw, -hh); ctx.lineTo(hw + 0.5, hh - bc); ctx.quadraticCurveTo(hw * 0.2, hh + bc * 0.4, -hw, hh - bc * 0.4); ctx.closePath(); };
63
+ shape(); ctx.fillStyle = col; ctx.fill();
64
+ ctx.save(); shape(); ctx.clip();
65
+ // paper grain
66
+ ctx.globalCompositeOperation = 'multiply'; ctx.globalAlpha = 0.16; ctx.fillStyle = pat; ctx.fillRect(-hw, -hh, w, h + 10);
67
+ ctx.globalCompositeOperation = 'source-over'; ctx.globalAlpha = 1;
68
+ // adhesive strip (slightly darker, flatter band at top)
69
+ const ag = ctx.createLinearGradient(0, -hh, 0, -hh + h * 0.2);
70
+ ag.addColorStop(0, 'rgba(90,60,0,0.07)'); ag.addColorStop(0.9, 'rgba(90,60,0,0.05)'); ag.addColorStop(1, 'rgba(255,255,255,0.10)');
71
+ ctx.fillStyle = ag; ctx.fillRect(-hw, -hh, w, h * 0.2 + 1);
72
+ // curl shading (lower part bends toward the light, then dips)
73
+ const cg = ctx.createLinearGradient(0, hh * 0.25, 0, hh + 4);
74
+ cg.addColorStop(0, 'rgba(255,255,255,0)'); cg.addColorStop(0.55, `rgba(255,255,240,${0.14 * lift})`); cg.addColorStop(0.85, `rgba(60,30,0,${0.1 * lift})`); cg.addColorStop(1, `rgba(60,30,0,${0.2 * lift})`);
75
+ ctx.fillStyle = cg; ctx.fillRect(-hw, -hh, w, h + 10);
76
+ // corner lift
77
+ const rg = ctx.createRadialGradient(hw, hh, 2, hw, hh, w * 0.45); rg.addColorStop(0, `rgba(60,30,0,${0.16 * lift})`); rg.addColorStop(1, 'rgba(60,30,0,0)');
78
+ ctx.fillStyle = rg; ctx.fillRect(-hw, -hh, w, h + 10);
79
+ // light falloff across the sheet (lamp at upper-left)
80
+ const lg = ctx.createLinearGradient(-hw, -hh, hw, hh); lg.addColorStop(0, 'rgba(255,255,255,0.10)'); lg.addColorStop(1, 'rgba(0,0,0,0.06)');
81
+ ctx.fillStyle = lg; ctx.fillRect(-hw, -hh, w, h + 10);
82
+ ctx.restore();
83
+ ctx.strokeStyle = 'rgba(80,50,10,0.18)'; ctx.lineWidth = 0.8; shape(); ctx.stroke();
84
+ // content
85
+ if (o.draw) { ctx.save(); ctx.translate(0, o.pin ? 8 : 0); o.draw(ctx, r, hw, hh); ctx.restore(); }
86
+ ctx.restore();
87
+ }
88
+
89
+ function tape(ctx, x, y, w, h, rot, seed) {
90
+ const r = H.rng(seed);
91
+ ctx.save(); ctx.translate(x, y); ctx.rotate(rot);
92
+ const edge = (x0, sgn) => { const pts = []; for (let k = 0; k <= 8; k++) pts.push([x0 + sgn * r.range(0, 3.5), -h / 2 + k * h / 8]); return pts; };
93
+ const L = edge(-w / 2, 1), R = edge(w / 2, -1);
94
+ const path = () => { ctx.beginPath(); L.forEach((p, i) => i ? ctx.lineTo(...p) : ctx.moveTo(...p)); R.slice().reverse().forEach((p) => ctx.lineTo(...p)); ctx.closePath(); };
95
+ ctx.save(); ctx.filter = 'blur(2px)'; ctx.translate(2, 3); path(); ctx.fillStyle = 'rgba(40,25,5,0.18)'; ctx.fill(); ctx.restore();
96
+ path(); ctx.fillStyle = 'rgba(232,218,170,0.62)'; ctx.fill();
97
+ ctx.save(); path(); ctx.clip();
98
+ for (let k = 0; k < 40; k++) { ctx.fillStyle = `rgba(255,255,255,${r.range(0, 0.12)})`; ctx.fillRect(r.range(-w / 2, w / 2), r.range(-h / 2, h / 2), r.range(4, 18), 1); }
99
+ const g = ctx.createLinearGradient(0, -h / 2, 0, h / 2); g.addColorStop(0, 'rgba(255,255,255,0.25)'); g.addColorStop(0.5, 'rgba(255,255,255,0)'); g.addColorStop(1, 'rgba(120,90,30,0.12)');
100
+ ctx.fillStyle = g; ctx.fillRect(-w / 2 - 4, -h / 2, w + 8, h);
101
+ ctx.restore();
102
+ ctx.restore();
103
+ }
104
+
105
+ function pinShadow(ctx, x, y) {
106
+ ctx.save(); ctx.filter = 'blur(3px)'; ctx.fillStyle = 'rgba(30,15,0,0.45)';
107
+ ctx.beginPath(); ctx.ellipse(x + 9, y + 12, 10, 8, 0.5, 0, TAU); ctx.fill();
108
+ ctx.restore();
109
+ ctx.save(); ctx.strokeStyle = 'rgba(30,15,0,0.35)'; ctx.lineWidth = 1.6; ctx.filter = 'blur(0.8px)';
110
+ ctx.beginPath(); ctx.moveTo(x, y); ctx.lineTo(x + 16, y + 20); ctx.stroke(); ctx.restore();
111
+ }
112
+ function pinHead(ctx, x, y, col) {
113
+ const c = H.hex(col);
114
+ // collar
115
+ ctx.save();
116
+ let g = ctx.createRadialGradient(x - 4, y - 4, 1, x, y, 12);
117
+ g.addColorStop(0, H.rgba(H.mix(c, [255, 255, 255], 0.35))); g.addColorStop(0.6, H.rgba(c)); g.addColorStop(1, H.rgba(H.mix(c, [0, 0, 0], 0.5)));
118
+ ctx.fillStyle = g; ctx.beginPath(); ctx.arc(x, y, 11, 0, TAU); ctx.fill();
119
+ // dome
120
+ g = ctx.createRadialGradient(x - 4, y - 5, 0.5, x - 1, y - 2, 9);
121
+ g.addColorStop(0, 'rgba(255,255,255,0.95)'); g.addColorStop(0.25, H.rgba(H.mix(c, [255, 255, 255], 0.25))); g.addColorStop(1, H.rgba(H.mix(c, [0, 0, 0], 0.35)));
122
+ ctx.fillStyle = g; ctx.beginPath(); ctx.arc(x - 1, y - 2, 7.5, 0, TAU); ctx.fill();
123
+ ctx.strokeStyle = H.rgba(H.mix(c, [0, 0, 0], 0.55), 0.6); ctx.lineWidth = 0.8; ctx.beginPath(); ctx.arc(x, y, 11, 0, TAU); ctx.stroke();
124
+ ctx.restore();
125
+ }
126
+ function yarn(ctx, a, b, sag, prog, r) {
127
+ if (prog <= 0) return;
128
+ const mx = (a[0] + b[0]) / 2, my = (a[1] + b[1]) / 2 + sag;
129
+ const pts = [];
130
+ const n = 60, m = Math.max(1, Math.round(n * prog));
131
+ for (let k = 0; k <= m; k++) { const t = k / n, u = 1 - t; pts.push([u * u * a[0] + 2 * u * t * mx + t * t * b[0], u * u * a[1] + 2 * u * t * my + t * t * b[1]]); }
132
+ const path = (dx = 0, dy = 0) => { ctx.beginPath(); pts.forEach((p, i) => i ? ctx.lineTo(p[0] + dx, p[1] + dy) : ctx.moveTo(p[0] + dx, p[1] + dy)); };
133
+ ctx.save(); ctx.lineCap = 'round'; ctx.lineJoin = 'round';
134
+ ctx.filter = 'blur(2.5px)'; ctx.strokeStyle = 'rgba(30,10,0,0.4)'; ctx.lineWidth = 3; path(5, 9); ctx.stroke(); ctx.filter = 'none';
135
+ ctx.strokeStyle = '#a8121b'; ctx.lineWidth = 3.4; path(); ctx.stroke();
136
+ ctx.strokeStyle = '#d8323a'; ctx.lineWidth = 2; path(-0.4, -0.5); ctx.stroke();
137
+ // twist highlights
138
+ ctx.setLineDash([2.2, 3.2]); ctx.strokeStyle = 'rgba(255,150,140,0.75)'; ctx.lineWidth = 1.1; path(-0.6, -0.8); ctx.stroke();
139
+ ctx.lineDashOffset = 2.6; ctx.strokeStyle = 'rgba(90,0,0,0.5)'; ctx.lineWidth = 1; path(0.8, 0.8); ctx.stroke();
140
+ ctx.setLineDash([]);
141
+ // stray fibers
142
+ for (let k = 0; k < 6; k++) { const p = pts[Math.floor(r() * pts.length)]; ctx.strokeStyle = 'rgba(200,40,40,0.5)'; ctx.lineWidth = 0.5; ctx.beginPath(); ctx.moveTo(p[0], p[1]); ctx.lineTo(p[0] + r.range(-4, 4), p[1] + r.range(-4, 4)); ctx.stroke(); }
143
+ ctx.restore();
144
+ }
145
+
146
+ // ===== EXPLAINER HELPERS =====
147
+ let BIGCORK = null;
148
+ const XW = 3200, XH = 1600;
149
+ function bigCork() {
150
+ if (BIGCORK) return BIGCORK;
151
+ const L = H.layer(XW, XH), c = L.getContext('2d'), img = c.createImageData(XW, XH), d = img.data, nz = H.makeNoise(12);
152
+ const A = [176, 128, 78], B = [214, 170, 112], Dk = [120, 78, 40];
153
+ for (let y = 0; y < XH; y++) for (let x = 0; x < XW; x++) {
154
+ const g1 = nz.n2(x * 0.21, y * 0.21), h = ((x * 374761393 + y * 668265263) ^ 0x5bd1e995) >>> 0, rr = ((h ^ (h >>> 13)) * 1274126177 >>> 0) / 4294967296;
155
+ // second, finer granule octave (as in the hero's cork) so the texture stays crisp when the camera zooms in
156
+ const g2 = nz.n2(x * 0.55 + 40, y * 0.55);
157
+ const v = H.clamp(0.5 + g1 * 0.8 + g2 * 0.45 + (rr - 0.5) * 0.3), low = nz.n2(x * 0.006, y * 0.006) * 0.1;
158
+ const pore = g2 > 0.42 ? H.clamp((g2 - 0.42) * 5) * 0.85 : (rr > 0.95 ? 0.6 : 0);
159
+ const rr2 = (((h * 2246822519) ^ (h >>> 16)) >>> 0) / 4294967296;
160
+ const i = (y * XW + x) * 4, s = 1 + low + (rr2 - 0.5) * 0.12; // 1px granules, +-6% luminance
161
+ d[i] = H.lerp(A[0] + (B[0] - A[0]) * v, Dk[0], pore) * s; d[i + 1] = H.lerp(A[1] + (B[1] - A[1]) * v, Dk[1], pore) * s; d[i + 2] = H.lerp(A[2] + (B[2] - A[2]) * v, Dk[2], pore) * s; d[i + 3] = 255;
162
+ }
163
+ c.putImageData(img, 0, 0);
164
+ // old pin holes from earlier brainstorms
165
+ { const r = H.rng(77); for (let k = 0; k < 260; k++) { const x = r() * XW, y = r() * XH, rad = r.range(0.9, 1.8); c.fillStyle = 'rgba(40,20,5,0.6)'; c.beginPath(); c.arc(x, y, rad, 0, Math.PI * 2); c.fill(); c.fillStyle = 'rgba(255,230,190,0.18)'; c.beginPath(); c.arc(x - rad * 0.6, y - rad * 0.6, rad * 0.7, 0, Math.PI * 2); c.fill(); } }
166
+ // frame (wood with grain lines, like the hero's)
167
+ const f = 26;
168
+ const wood = (x, y, w, h, vert) => {
169
+ const g = vert ? c.createLinearGradient(x, 0, x + w, 0) : c.createLinearGradient(0, y, 0, y + h);
170
+ g.addColorStop(0, '#7a4e2a'); g.addColorStop(0.4, '#9a6a3c'); g.addColorStop(1, '#5a361b');
171
+ c.fillStyle = g; c.fillRect(x, y, w, h);
172
+ c.save(); c.beginPath(); c.rect(x, y, w, h); c.clip(); c.strokeStyle = 'rgba(60,30,10,0.35)'; c.lineWidth = 0.9;
173
+ const len = vert ? h : w, n = Math.ceil(len / 6);
174
+ for (let k = 0; k < 10; k++) { c.beginPath(); for (let s2 = 0; s2 <= n; s2++) { const q = s2 / n; const px = vert ? x + 2 + k * 2.4 + Math.sin(q * len / 40 + k) * 0.9 : x + q * w; const py = vert ? y + q * h : y + 2 + k * 2.4 + Math.sin(q * len / 40 + k) * 0.9; s2 ? c.lineTo(px, py) : c.moveTo(px, py); } c.stroke(); }
175
+ c.restore();
176
+ };
177
+ wood(0, 0, XW, f, false); wood(0, XH - f, XW, f, false); wood(0, 0, f, XH, true); wood(XW - f, 0, f, XH, true);
178
+ c.strokeStyle = 'rgba(20,10,0,0.35)'; c.lineWidth = 8; c.filter = 'blur(5px)'; c.strokeRect(f + 3, f + 3, XW - 2 * f - 6, XH - 2 * f - 6); c.filter = 'none';
179
+ BIGCORK = L; return L;
180
+ }
181
+ const fmt = (n) => Math.round(n).toLocaleString('en-US');
182
+ // write-on: reveal content left to right like a marker moving
183
+ function wr(ctx, p, x0, y0, w, h, fn) { if (p <= 0) return; ctx.save(); ctx.beginPath(); ctx.rect(x0, y0, w * Math.min(1, p), h); ctx.clip(); fn(); ctx.restore(); }
184
+ function catDoodle(c, x, y, s, col, r) {
185
+ mline(c, arcPts(x, y, 20 * s, 17 * s, 0, TAU, 24), 2.6 * s, col, r, true);
186
+ mline(c, [[x - 17 * s, y - 8 * s], [x - 14 * s, y - 27 * s], [x - 4 * s, y - 16 * s]], 2.6 * s, col, r);
187
+ mline(c, [[x + 17 * s, y - 8 * s], [x + 14 * s, y - 27 * s], [x + 4 * s, y - 16 * s]], 2.6 * s, col, r);
188
+ c.fillStyle = col; [[-7, -3], [7, -3]].forEach(([dx, dy]) => { c.beginPath(); c.arc(x + dx * s, y + dy * s, 2.2 * s, 0, TAU); c.fill(); });
189
+ mline(c, [[x - 3 * s, y + 4 * s], [x, y + 7 * s], [x + 3 * s, y + 4 * s]], 1.8 * s, col, r);
190
+ [[-1, 5], [1, 5], [-1, 9], [1, 9]].forEach(([sg, dy]) => mline(c, [[x + sg * 7 * s, y + dy * s], [x + sg * 26 * s, y + (dy - 2 + (dy > 6 ? 4 : 0)) * s]], 1.4 * s, col, r));
191
+ }
192
+ function dogDoodle(c, x, y, s, col, r) {
193
+ mline(c, arcPts(x, y, 19 * s, 18 * s, 0, TAU, 24), 2.6 * s, col, r, true);
194
+ [-1, 1].forEach((sg) => mline(c, arcPts(x + sg * 20 * s, y - 2 * s, 7 * s, 15 * s, 0, TAU, 16), 2.6 * s, col, r, true));
195
+ mline(c, arcPts(x, y + 8 * s, 9 * s, 6 * s, 0, TAU, 16), 2 * s, col, r, true);
196
+ c.fillStyle = col; c.beginPath(); c.ellipse(x, y + 5 * s, 3.5 * s, 2.5 * s, 0, 0, TAU); c.fill();
197
+ [[-7, -5], [7, -5]].forEach(([dx, dy]) => { c.beginPath(); c.arc(x + dx * s, y + dy * s, 2.2 * s, 0, TAU); c.fill(); });
198
+ }
199
+ function arrowM(ctx, pts, p, col, w, r) {
200
+ if (p <= 0) return;
201
+ const n = Math.max(2, Math.round(pts.length * Math.min(1, p)));
202
+ const seg = pts.slice(0, n);
203
+ mline(ctx, seg, w, col, r);
204
+ if (p >= 1) { const a = pts[pts.length - 1], b = pts[pts.length - 3] || pts[0], an = Math.atan2(a[1] - b[1], a[0] - b[0]); mline(ctx, [[a[0] + Math.cos(an + 2.6) * 22, a[1] + Math.sin(an + 2.6) * 22], a, [a[0] + Math.cos(an - 2.6) * 22, a[1] + Math.sin(an - 2.6) * 22]], w, col, r); }
205
+ }
206
+ const qpts = (a, c, b, n = 24) => { const o = []; for (let k = 0; k <= n; k++) { const t = k / n, m = 1 - t; o.push([m * m * a[0] + 2 * m * t * c[0] + t * t * b[0], m * m * a[1] + 2 * m * t * c[1] + t * t * b[1]]); } return o; };
207
+
208
+ // ===== END EXPLAINER HELPERS =====
209
+ registerStyle({
210
+ id: 'sticky-notes',
211
+ name: 'Sticky-Note Wall',
212
+ category: 'Illustration',
213
+ description: 'A brainstorming cork board: curling Post-its with adhesive bands and lifted-corner shadows, marker handwriting and doodles, a taped index card, push pins and red yarn connecting the ideas.',
214
+ motion: 'Notes slap onto the board one by one with a tiny bounce, then red yarn unspools from pin to pin linking the ideas.',
215
+ fonts: ['400 30px "Permanent Marker"', '700 28px "Kalam"', '700 30px "Caveat"', '400 22px "Gloria Hallelujah"', '400 22px "Rock Salt"'],
216
+ frameT: 5.4,
217
+ duration: 5.5,
218
+ readsPixels: true,
219
+ draw(ctx, W, H_, t) {
220
+ const r = H.rng(2024), nz = H.makeNoise(12);
221
+ // ---------- cork ----------
222
+ if (!CORK) {
223
+ const img = ctx.createImageData(W, H_), d = img.data;
224
+ const A = [176, 128, 78], B = [214, 170, 112], Dk = [120, 78, 40];
225
+ for (let y = 0; y < H_; y++) for (let x = 0; x < W; x++) {
226
+ const g1 = nz.n2(x * 0.21, y * 0.21), g2 = nz.n2(x * 0.55 + 40, y * 0.55);
227
+ let v = H.clamp(0.5 + g1 * 0.9 + g2 * 0.45);
228
+ const low = nz.n2(x * 0.012, y * 0.012) * 0.12;
229
+ let c0 = A[0] + (B[0] - A[0]) * v, c1 = A[1] + (B[1] - A[1]) * v, c2 = A[2] + (B[2] - A[2]) * v;
230
+ const pore = g2 > 0.42 ? H.clamp((g2 - 0.42) * 5) : 0;
231
+ c0 = H.lerp(c0, Dk[0], pore); c1 = H.lerp(c1, Dk[1], pore); c2 = H.lerp(c2, Dk[2], pore);
232
+ const i = (y * W + x) * 4, s = 1 + low;
233
+ d[i] = c0 * s; d[i + 1] = c1 * s; d[i + 2] = c2 * s; d[i + 3] = 255;
234
+ }
235
+ CORK = img;
236
+ }
237
+ ctx.putImageData(CORK, 0, 0);
238
+ // lamp light from upper-left
239
+ { const g = ctx.createRadialGradient(330, 120, 50, 400, 200, 1100); g.addColorStop(0, 'rgba(255,240,210,0.22)'); g.addColorStop(0.5, 'rgba(255,240,210,0)'); g.addColorStop(1, 'rgba(40,20,0,0.35)'); ctx.fillStyle = g; ctx.fillRect(0, 0, W, H_); }
240
+ // old pin holes
241
+ for (let k = 0; k < 40; k++) { ctx.fillStyle = 'rgba(40,20,5,0.6)'; ctx.beginPath(); ctx.arc(r() * W, r() * H_, r.range(0.8, 1.6), 0, TAU); ctx.fill(); }
242
+ // wooden frame
243
+ {
244
+ const f = 16;
245
+ const wood = (x, y, w, h, vert) => {
246
+ const g = vert ? ctx.createLinearGradient(x, 0, x + w, 0) : ctx.createLinearGradient(0, y, 0, y + h);
247
+ g.addColorStop(0, '#7a4e2a'); g.addColorStop(0.4, '#9a6a3c'); g.addColorStop(1, '#5a361b');
248
+ ctx.fillStyle = g; ctx.fillRect(x, y, w, h);
249
+ ctx.save(); ctx.beginPath(); ctx.rect(x, y, w, h); ctx.clip(); ctx.strokeStyle = 'rgba(60,30,10,0.35)'; ctx.lineWidth = 0.8;
250
+ for (let k = 0; k < 7; k++) { ctx.beginPath(); for (let s = 0; s <= 60; s++) { const q = s / 60; const px = vert ? x + 2 + k * 2 + Math.sin(q * 20 + k) * 0.8 : x + q * w; const py = vert ? y + q * h : y + 2 + k * 2 + Math.sin(q * 30 + k) * 0.8; s ? ctx.lineTo(px, py) : ctx.moveTo(px, py); } ctx.stroke(); }
251
+ ctx.restore();
252
+ };
253
+ wood(0, 0, W, f, false); wood(0, H_ - f, W, f, false); wood(0, 0, f, H_, true); wood(W - f, 0, f, H_, true);
254
+ // inner shadow on cork
255
+ ctx.save(); ctx.strokeStyle = 'rgba(20,10,0,0.35)'; ctx.lineWidth = 6; ctx.filter = 'blur(4px)'; ctx.strokeRect(f + 2, f + 2, W - 2 * f - 4, H_ - 2 * f - 4); ctx.restore();
256
+ }
257
+ const pat = grainPattern(ctx, 3);
258
+
259
+ // appearance timing: each item slaps on with a small bounce
260
+ const appear = (i) => H.clamp((t - 0.2 - i * 0.2) / 0.3);
261
+ // slap: arrives large (close to camera), overshoots flat against the cork, settles
262
+ const S = (i) => { const a = appear(i); return a <= 0 ? 0 : 1 + 0.32 * (1 - H.ease.back(a)); };
263
+ const pinT = (i) => 0.2 + i * 0.2 + 0.32;
264
+
265
+ const YEL = '#fbe36a', PNK = '#ff8db5', ORG = '#ffb04f', GRN = '#b6e27a', BLU = '#86d0f2';
266
+ const notes = [
267
+ { x: 40, y: 92, w: 160, h: 160, rot: 0.12, col: ORG, seed: 1, lift: 0.6 },
268
+ { x: 210, y: 220, w: 168, h: 168, rot: -0.07, col: YEL, seed: 2, pin: [0, -58, '#d22b2b'],
269
+ draw(c, rr, hw, hh) { hand(c, ['COLLECT', 'DATA'], 0, -18, '400 31px "Permanent Marker"', INK, 11, 34); const R = H.rng(5); mline(c, arcPts(0, 36, 22, 6, 0, TAU), 2.6, INK, R, true); mline(c, [[-22, 36], [-22, 60]], 2.6, INK, R); mline(c, [[22, 36], [22, 60]], 2.6, INK, R); mline(c, arcPts(0, 60, 22, 6, 0, Math.PI), 2.6, INK, R); mline(c, arcPts(0, 48, 22, 6, 0, Math.PI), 2, INK, R); } },
270
+ { x: 455, y: 330, w: 168, h: 168, rot: 0.05, col: PNK, seed: 3, pin: [0, -60, '#2a62c9'],
271
+ draw(c, rr, hw, hh) { hand(c, ['TRAIN THE', 'MODEL'], 0, -26, '400 28px "Permanent Marker"', INK, 12, 32); const R = H.rng(6); mline(c, [[-50, 20], [-50, 66], [50, 66]], 2.4, INK, R); const cv = []; for (let k = 0; k <= 16; k++) { const q = k / 16; cv.push([-46 + q * 92, 24 + 38 * (1 - Math.exp(-q * 4)) + Math.sin(q * 40) * 2]); } mline(c, cv, 2.6, RED, R); hand(c, ['loss'], -26, 76, '700 15px "Kalam"', INK, 4, 14); } },
272
+ { x: 182, y: 505, w: 160, h: 160, rot: 0.06, col: ORG, seed: 4, pin: [0, -56, '#f2f2ee'],
273
+ draw(c) { hand(c, ['TOKENS??'], 0, -22, '400 30px "Permanent Marker"', INK, 13, 30); hand(c, ['~ ¾ of a word'], 0, 22, '700 23px "Caveat"', BLUE, 7, 22); const R = H.rng(9); mline(c, [[-50, 40], [-20, 44], [10, 40], [48, 43]], 2, BLUE, R); } },
274
+ { x: 650, y: 478, w: 176, h: 176, rot: -0.03, col: GRN, seed: 5, pin: [0, -62, '#d22b2b'],
275
+ draw(c) { hand(c, ['USERS', 'FIRST!'], 0, -22, '400 34px "Permanent Marker"', INK, 14, 38); const R = H.rng(10); const hp = []; for (let k = 0; k <= 30; k++) { const a = k / 30 * TAU; hp.push([16 * Math.pow(Math.sin(a), 3) * 1.3, 42 - (13 * Math.cos(a) - 5 * Math.cos(2 * a) - 2 * Math.cos(3 * a) - Math.cos(4 * a)) * 1.25]); } mline(c, hp, 3, RED, R, true); } },
276
+ { x: 880, y: 300, w: 168, h: 168, rot: -0.06, col: BLU, seed: 6, pin: [0, -60, '#f0c419'],
277
+ draw(c) { hand(c, ['EVALS', 'EVALS', 'EVALS'], 6, -4, '400 28px "Permanent Marker"', INK, 15, 31); const R = H.rng(11); [-35, -4, 27].forEach((yy) => mline(c, [[-62, yy], [-56, yy + 7], [-44, yy - 9]], 3, '#1d7a33', R)); } },
278
+ { x: 1100, y: 196, w: 160, h: 160, rot: 0.07, col: YEL, seed: 7, pin: [0, -56, '#2a62c9'],
279
+ draw(c) { hand(c, ['FINE-', 'TUNE?'], 0, -14, '400 32px "Permanent Marker"', INK, 16, 36); hand(c, ['maybe later'], 0, 48, '400 16px "Gloria Hallelujah"', BLUE, 3, 18); } },
280
+ { x: 1088, y: 500, w: 170, h: 170, rot: -0.05, col: PNK, seed: 8, pin: [0, -60, '#f2f2ee'],
281
+ draw(c) { hand(c, ['SHIP IT'], 0, -42, '400 34px "Permanent Marker"', INK, 17, 34); const R = H.rng(12);
282
+ const rk = [[0, -14], [12, 4], [12, 34], [-12, 34], [-12, 4]]; mline(c, rk, 2.6, INK, R, true); mline(c, arcPts(0, 14, 4.5, 4.5, 0, TAU), 2, INK, R, true);
283
+ mline(c, [[-12, 22], [-22, 36], [-12, 34]], 2.4, INK, R); mline(c, [[12, 22], [22, 36], [12, 34]], 2.4, INK, R); mline(c, [[-7, 38], [0, 58], [7, 38]], 2.4, '#e2611b', R); mline(c, [[-3, 40], [0, 50], [3, 40]], 2, '#e2611b', R);
284
+ hand(c, ['Fri!'], 48, 40, '700 26px "Caveat"', RED, 2, 20); } },
285
+ { x: 430, y: 592, w: 128, h: 128, rot: -0.09, col: YEL, seed: 9, pin: null, lift: 1.4,
286
+ draw(c) { hand(c, ['cost?', 'latency?'], 0, 0, '700 26px "Kalam"', BLUE, 18, 30); } },
287
+ { x: 870, y: 592, w: 132, h: 132, rot: 0.08, col: BLU, seed: 10, pin: null, lift: 1.2,
288
+ draw(c) { hand(c, ['< 1 sec', 'replies'], 0, -4, '700 27px "Caveat"', INK, 19, 30); const R = H.rng(13); mline(c, [[-40, 32], [40, 30]], 2.2, RED, R); } },
289
+ { x: 1262, y: 700, w: 160, h: 160, rot: -0.1, col: GRN, seed: 11, lift: 0.5 },
290
+ ];
291
+ // index card (title), drawn first among top items
292
+ const card = { x: 650, y: 140, w: 330, h: 190, rot: -0.022 };
293
+ const pinPos = (n) => { if (!n.pin) return null; const ca = Math.cos(n.rot), sa = Math.sin(n.rot), py = -n.h / 2 + 14; return [n.x + n.pin[0] * ca - py * sa, n.y + n.pin[0] * sa + py * ca, n.pin[2]]; };
294
+
295
+ const order = [0, 1, 2, 3, 5, 6, 4, 7, 8, 9, 10];
296
+ notes[0].lift = 0.6 + 0.3 * Math.sin(t * 2.3); notes[10].lift = 0.5 + 0.25 * Math.sin(t * 1.9 + 1);
297
+ // shadows of pins under notes are drawn after each note
298
+ order.forEach((idx, k) => {
299
+ const n = notes[idx], s = S(k);
300
+ if (!s) return;
301
+ n.air = s - 1;
302
+ ctx.save(); ctx.translate(n.x, n.y); ctx.scale(s, s); ctx.translate(-n.x, -n.y);
303
+ note(ctx, n, pat);
304
+ ctx.restore();
305
+ });
306
+ // index card
307
+ if (S(3.5)) {
308
+ const s = S(3.5);
309
+ ctx.save(); ctx.translate(card.x, card.y); ctx.rotate(card.rot); ctx.scale(s, s);
310
+ const { w, h } = card;
311
+ ctx.save(); ctx.filter = 'blur(6px)'; ctx.fillStyle = 'rgba(40,20,5,0.4)'; ctx.fillRect(-w / 2 + 4, -h / 2 + 8, w, h); ctx.restore();
312
+ ctx.fillStyle = '#fbfaf3'; ctx.fillRect(-w / 2, -h / 2, w, h);
313
+ ctx.save(); ctx.globalCompositeOperation = 'multiply'; ctx.globalAlpha = 0.12; ctx.fillStyle = pat; ctx.fillRect(-w / 2, -h / 2, w, h); ctx.restore();
314
+ ctx.fillStyle = 'rgba(220,60,70,0.7)'; ctx.fillRect(-w / 2, -h / 2 + 40, w, 1.4);
315
+ ctx.fillStyle = 'rgba(80,140,210,0.5)'; for (let k = 0; k < 7; k++) ctx.fillRect(-w / 2, -h / 2 + 62 + k * 19, w, 1);
316
+ const lg = ctx.createLinearGradient(-w / 2, -h / 2, w / 2, h / 2); lg.addColorStop(0, 'rgba(255,255,255,0.08)'); lg.addColorStop(1, 'rgba(60,40,0,0.08)'); ctx.fillStyle = lg; ctx.fillRect(-w / 2, -h / 2, w, h);
317
+ hand(ctx, ['AI HELPER v1'], 0, -h / 2 + 22, '400 30px "Permanent Marker"', INK, 21, 30);
318
+ hand(ctx, ['what does it need', 'to actually be useful?'], -4, 14, '700 26px "Caveat"', BLUE, 22, 19);
319
+ const R = H.rng(23);
320
+ mline(ctx, [[-118, 70], [-40, 66], [40, 69], [120, 64]], 2.4, RED, R);
321
+ hand(ctx, ['brainstorm · tues'], 92, 82, '400 13px "Gloria Hallelujah"', INK, 24, 14, { alpha: 0.7 });
322
+ ctx.restore();
323
+ // tape at the two top corners
324
+ const ca = Math.cos(card.rot), sa = Math.sin(card.rot);
325
+ const cp = (px, py) => [card.x + px * ca - py * sa, card.y + px * sa + py * ca];
326
+ const t1 = cp(-card.w / 2 + 6, -card.h / 2 + 4), t2 = cp(card.w / 2 - 6, -card.h / 2 + 4);
327
+ tape(ctx, t1[0], t1[1], 78, 26, -0.7, 31); tape(ctx, t2[0], t2[1], 78, 26, 0.65, 32);
328
+ const t3 = cp(0, card.h / 2 - 2); tape(ctx, t3[0], t3[1], 70, 24, 0.04, 33);
329
+ }
330
+
331
+ // pins: shadows, yarn, heads
332
+ const pins = notes.map(pinPos);
333
+ pins.forEach((p, i) => { if (p && t >= pinT(order.indexOf(i))) pinShadow(ctx, p[0], p[1]); });
334
+ const links = [[1, 2, 40], [2, 5, 50], [5, 7, 40], [3, 2, 36], [4, 7, 55], [2, 4, 30], [6, 5, 30]];
335
+ links.forEach(([a, b, sag], k) => {
336
+ const pa = pins[a], pb = pins[b];
337
+ yarn(ctx, pa, pb, sag + Math.sin(t * 1.6 + k) * 2.5, H.clamp((t - 2.75 - k * 0.18) / 0.45), H.rng(50 + k));
338
+ });
339
+ pins.forEach((p, i) => { const k = (t - pinT(order.indexOf(i))) / 0.14; if (!p || k < 0) return; const sc = 1 + 0.9 * Math.pow(1 - H.clamp(k), 2); ctx.save(); ctx.translate(p[0], p[1]); ctx.scale(sc, sc); ctx.translate(-p[0], -p[1]); pinHead(ctx, p[0], p[1], p[2]); ctx.restore(); });
340
+ // a spare pin stuck in the cork
341
+ if (t > 0.3) { pinShadow(ctx, 330, 82); pinHead(ctx, 330, 82, '#3fae4a'); }
342
+
343
+ // warm overall grade + vignette + grain
344
+ H.vignette(ctx, W, H_, 0.35, '30,15,0');
345
+ H.grain(ctx, W, H_, 0.04, 8 + Math.floor(t * 12));
346
+ },
347
+ // ===== EXPLAINER =====
348
+ explainerDuration: 14.5,
349
+ explainerNote: 'A detective-board camera move across one big cork wall: notes slap in on cue, marker arrows and red yarn draw the flow, numbers are crossed out and rewritten by hand, and red marker circles the key moments.',
350
+ explainer(ctx, W, H_, t) {
351
+ const pat = grainPattern(ctx, 3), r0 = H.rng(9);
352
+ const YEL = '#fbe36a', PNK = '#ff8db5', ORG = '#ffb04f', GRN = '#b6e27a', BLU = '#86d0f2', GREEN = '#1d7a33';
353
+ // ---- camera keyframes [t, cx, cy, zoom] ----
354
+ const K = [[0, 560, 260, 1.25], [1.5, 560, 260, 1.25], [2.4, 1200, 560, 0.84], [5.9, 1200, 560, 0.84], [6.8, 2490, 590, 1.0], [10.1, 2490, 590, 1.0], [10.9, 1260, 1210, 0.92], [12.9, 1260, 1210, 0.92], [13.7, 1720, 850, 0.56], [99, 1720, 850, 0.56]];
355
+ let ki = 0; while (ki < K.length - 2 && t > K[ki + 1][0]) ki++;
356
+ const [ta, ax, ay, az] = K[ki], [tb, bx, by, bz] = K[ki + 1], e = H.ease.inOut(H.clamp((t - ta) / (tb - ta)));
357
+ const z = Math.exp(H.lerp(Math.log(az), Math.log(bz), e)), hwv = W / 2 / z, hhv = H_ / 2 / z;
358
+ const cx = H.clamp(H.lerp(ax, bx, e), hwv, XW - hwv), cy = H.clamp(H.lerp(ay, by, e), hhv, XH - hhv);
359
+ ctx.save(); ctx.translate(W / 2, H_ / 2); ctx.scale(z, z); ctx.translate(-cx, -cy);
360
+ ctx.drawImage(bigCork(), 0, 0);
361
+ const slap = (t0) => { const a = H.clamp((t - t0) / 0.3); return a <= 0 ? 0 : 1 + 0.32 * (1 - H.ease.back(a)); };
362
+ const put = (n, t0) => { const s = slap(t0); if (!s) return false; n.air = s - 1; ctx.save(); ctx.translate(n.x, n.y); ctx.scale(s, s); ctx.translate(-n.x, -n.y); note(ctx, n, pat); ctx.restore(); return true; };
363
+ const pin = (x, y, col, t0) => { const k = (t - t0) / 0.14; if (k < 0) return; pinShadow(ctx, x, y); const sc = 1 + 0.9 * Math.pow(1 - H.clamp(k), 2); ctx.save(); ctx.translate(x, y); ctx.scale(sc, sc); ctx.translate(-x, -y); pinHead(ctx, x, y, col); ctx.restore(); };
364
+ const MK = '400 30px "Permanent Marker"';
365
+
366
+ // ===== yarn trail linking the regions (camera follows it) =====
367
+ const Y1 = [[560, 110], [1560, 408]], Y2 = [[1560, 408], [2440, 234]], Y3 = [[2470, 960], [1450, 1060]];
368
+ yarn(ctx, Y1[0], Y1[1], 60, H.clamp((t - 1.6) / 0.9), H.rng(61));
369
+ yarn(ctx, Y2[0], Y2[1], 90, H.clamp((t - 5.9) / 0.85), H.rng(62));
370
+ yarn(ctx, Y3[0], Y3[1], 70, H.clamp((t - 10.1) / 0.8), H.rng(63));
371
+
372
+ // ===== BEAT 1: hook card =====
373
+ {
374
+ const s = slap(0.1);
375
+ if (s) {
376
+ ctx.save(); ctx.translate(560, 260); ctx.rotate(-0.03); ctx.scale(s, s);
377
+ const w = 560, h = 300;
378
+ ctx.save(); ctx.filter = `blur(${7 + (s - 1) * 40}px)`; ctx.fillStyle = 'rgba(40,20,5,0.4)'; ctx.fillRect(-w / 2 + 6 + (s - 1) * 60, -h / 2 + 10 + (s - 1) * 80, w, h); ctx.restore();
379
+ ctx.fillStyle = '#fbfaf3'; ctx.fillRect(-w / 2, -h / 2, w, h);
380
+ ctx.save(); ctx.globalCompositeOperation = 'multiply'; ctx.globalAlpha = 0.12; ctx.fillStyle = pat; ctx.fillRect(-w / 2, -h / 2, w, h); ctx.restore();
381
+ ctx.fillStyle = 'rgba(220,60,70,0.7)'; ctx.fillRect(-w / 2, -h / 2 + 52, w, 1.6);
382
+ ctx.fillStyle = 'rgba(80,140,210,0.5)'; for (let k = 0; k < 9; k++) ctx.fillRect(-w / 2, -h / 2 + 80 + k * 24, w, 1);
383
+ wr(ctx, (t - 0.35) / 0.55, -w / 2, -h / 2, w, 150, () => hand(ctx, ['How does AI'], 0, -60, '400 54px "Permanent Marker"', INK, 41, 54));
384
+ wr(ctx, (t - 0.85) / 0.45, -w / 2, -10, w, 120, () => hand(ctx, ['learn?'], 0, 30, '400 62px "Permanent Marker"', INK, 42, 54));
385
+ if (t > 1.3) { const R = H.rng(43); const pp = qpts([-200, 92], [0, 104], [200, 86]); arrowM(ctx, pp, (t - 1.3) / 0.3, RED, 5, R); }
386
+ ctx.restore();
387
+ if (t > 0.4) { tape(ctx, 300, 120, 90, 30, -0.6, 31); tape(ctx, 820, 104, 90, 30, 0.55, 32); }
388
+ pin(560, 110, '#d22b2b', 1.55);
389
+ }
390
+ }
391
+
392
+ // ===== BEAT 2: data -> model =====
393
+ const cols = [YEL, BLU, GRN, ORG];
394
+ const ex = [];
395
+ for (let k = 0; k < 12; k++) ex.push({ x: 920 + (k % 3) * 135 + r0.range(-10, 10), y: 400 + Math.floor(k / 3) * 125 + r0.range(-8, 8), rot: r0.range(-0.12, 0.12), cat: (k * 7) % 3 !== 0, t0: 2.2 + k * 0.13 });
396
+ for (let k = 0; k < 10; k++) ex.push({ x: 930 + r0.range(0, 260), y: 410 + r0.range(0, 360), rot: r0.range(-0.3, 0.3), cat: k % 2 === 0, t0: 4.15 + k * 0.1 });
397
+ ex.forEach((q, k) => {
398
+ put({ x: q.x, y: q.y, w: 118, h: 118, rot: q.rot, col: cols[k % 4], seed: 100 + k, lift: 0.6, draw(c) { const R = H.rng(200 + k); (q.cat ? catDoodle : dogDoodle)(c, 0, -14, 1.1, INK, R); hand(c, [q.cat ? 'cat' : 'dog'], 0, 38, '700 32px "Kalam"', BLUE, 300 + k, 20); } }, q.t0);
399
+ });
400
+ // model note
401
+ const MX = 1560, MY = 520;
402
+ put({ x: MX, y: MY, w: 250, h: 250, rot: 0.03, col: PNK, seed: 51, lift: 0.8, pin: [0, 0, '#2a62c9'],
403
+ draw(c) { const R = H.rng(52); mline(c, arcPts(-14, -20, 46, 38, Math.PI * 0.95, Math.PI * 2.05, 20), 3, INK, R); mline(c, arcPts(16, -20, 46, 38, Math.PI * 0.95, Math.PI * 2.05, 20), 3, INK, R); mline(c, [[-60, -14], [-50, 14], [60, 14], [62, -14]], 3, INK, R); mline(c, [[0, -56], [2, -30], [-6, -6], [0, 12]], 2.4, INK, R); mline(c, arcPts(-24, -22, 10, 8, 0, Math.PI * 1.5), 2, INK, R); mline(c, arcPts(28, -26, 10, 8, Math.PI, Math.PI * 2.4), 2, INK, R); hand(c, ['MODEL'], 0, 62, MK, INK, 53, 30); } }, 1.95);
404
+ pin(MX, MY - 112, "#2a62c9", 2.25);
405
+ { const R = H.rng(54); arrowM(ctx, qpts([1290, 520], [1350, 490], [1415, 520], 20), (t - 3.0) / 0.4, RED, 7, R); arrowM(ctx, qpts([1285, 640], [1350, 640], [1415, 580], 20), (t - 3.4) / 0.4, RED, 5, R); arrowM(ctx, qpts([1285, 410], [1350, 410], [1415, 460], 20), (t - 3.7) / 0.4, RED, 5, R); }
406
+ // counter card: numbers crossed out and rewritten by hand
407
+ {
408
+ const s = slap(2.9);
409
+ if (s) {
410
+ ctx.save(); ctx.translate(1560, 850); ctx.rotate(-0.025); ctx.scale(s, s);
411
+ const w = 500, h = 230;
412
+ ctx.save(); ctx.filter = 'blur(6px)'; ctx.fillStyle = 'rgba(40,20,5,0.4)'; ctx.fillRect(-w / 2 + 5, -h / 2 + 8, w, h); ctx.restore();
413
+ ctx.fillStyle = '#fbfaf3'; ctx.fillRect(-w / 2, -h / 2, w, h);
414
+ ctx.fillStyle = 'rgba(80,140,210,0.45)'; for (let k = 0; k < 6; k++) ctx.fillRect(-w / 2, -h / 2 + 34 + k * 24, w, 1);
415
+ const nums = [[3.05, '10'], [3.65, '1,000'], [4.3, '80,000'], [4.95, '1,000,000']];
416
+ let shown = nums.filter((q) => t >= q[0]);
417
+ shown.forEach(([t0, txt], i) => {
418
+ const last = i === shown.length - 1, row = i - Math.max(0, shown.length - 3);
419
+ if (row < 0) return;
420
+ const y = last ? 6 : -82 + row * 34;
421
+ wr(ctx, (t - t0) / 0.3, -w / 2, y - 46, w, 92, () => hand(ctx, [txt], 0, y, last ? '400 80px "Permanent Marker"' : '400 28px "Permanent Marker"', last ? INK : 'rgba(27,31,41,0.6)', 70 + i, 30));
422
+ if (!last) { const R = H.rng(80 + i); mline(ctx, [[-70, y + 2], [70, y - 3]], 3, RED, R); }
423
+ });
424
+ if (t > 5.2) wr(ctx, (t - 5.2) / 0.35, -w / 2, 60, w, 60, () => hand(ctx, ['examples'], 0, 86, '700 40px "Caveat"', BLUE, 90, 20));
425
+ ctx.restore();
426
+ }
427
+ pin(1560, 750, '#f0c419', 3.1);
428
+ }
429
+
430
+ // ===== BEAT 3: guess -> check -> adjust loop =====
431
+ const GX = 2440, GY = 330, CXn = 2860, CYn = 560, AX = 2440, AY = 820;
432
+ // new photo (polaroid)
433
+ {
434
+ const s = slap(6.5);
435
+ if (s) {
436
+ ctx.save(); ctx.translate(2100, 560); ctx.rotate(-0.06); ctx.scale(s, s);
437
+ ctx.save(); ctx.filter = 'blur(6px)'; ctx.fillStyle = 'rgba(40,20,5,0.45)'; ctx.fillRect(-100 + 6, -120 + 9, 200, 240); ctx.restore();
438
+ ctx.fillStyle = '#f7f5ee'; ctx.fillRect(-100, -120, 200, 240); ctx.fillStyle = '#cfd6d2'; ctx.fillRect(-84, -104, 168, 168);
439
+ catDoodle(ctx, 0, -14, 2.2, '#2b2f36', H.rng(91));
440
+ hand(ctx, ['new photo'], 0, 92, '700 34px "Caveat"', INK, 92, 20);
441
+ ctx.restore();
442
+ tape(ctx, 2100, 440, 80, 26, 0.05, 93);
443
+ }
444
+ }
445
+ put({ x: GX, y: GY, w: 220, h: 220, rot: -0.04, col: YEL, seed: 61, lift: 0.8, pin: [0, 0, '#d22b2b'],
446
+ draw(c) {
447
+ hand(c, ['GUESS'], 0, -66, MK, INK, 62, 30);
448
+ wr(c, (t - 7.0) / 0.3, -110, -40, 220, 70, () => hand(c, ['dog?'], 0, -4, '400 44px "Permanent Marker"', INK, 63, 40));
449
+ const R = H.rng(64);
450
+ if (t > 7.7) { mline(c, [[-60, -30], [-50 + 110 * H.clamp((t - 7.7) / 0.15), -30 + 50 * H.clamp((t - 7.7) / 0.15)]], 6, RED, R); }
451
+ if (t > 7.85) { mline(c, [[50, -30], [50 - 110 * H.clamp((t - 7.85) / 0.15), -30 + 50 * H.clamp((t - 7.85) / 0.15)]], 6, RED, R); }
452
+ if (t > 8.0) { const pr = H.clamp((t - 8.0) / 0.3); mline(c, arcPts(0, -6, 86, 40, -0.5, -0.5 + TAU * 1.05 * pr, 30), 4, RED, R); }
453
+ wr(c, (t - 9.5) / 0.35, -110, 30, 220, 70, () => { hand(c, ['cat'], -18, 60, '400 46px "Permanent Marker"', GREEN, 65, 40); mline(c, [[40, 58], [52, 72], [78, 36]], 6, GREEN, H.rng(66)); });
454
+ } }, 6.7);
455
+ pin(GX, GY - 96, '#d22b2b', 6.9);
456
+ put({ x: CXn, y: CYn, w: 220, h: 220, rot: 0.05, col: BLU, seed: 71, lift: 0.8,
457
+ draw(c) { hand(c, ['CHECK'], 0, -66, MK, INK, 72, 30); wr(c, (t - 7.75) / 0.4, -110, -30, 220, 120, () => hand(c, ["it's a", 'cat!'], 0, 14, '400 36px "Permanent Marker"', RED, 73, 40)); } }, 7.3);
458
+ pin(CXn, CYn - 96, '#f2f2ee', 7.5);
459
+ put({ x: AX, y: AY, w: 220, h: 220, rot: 0.03, col: GRN, seed: 81, lift: 0.8,
460
+ draw(c) {
461
+ hand(c, ['ADJUST'], 0, -66, MK, INK, 82, 30);
462
+ const R = H.rng(83), tq = Math.floor(t * 12) / 12;
463
+ [-30, 10, 50].forEach((yy, i) => {
464
+ mline(c, [[-80, yy], [80, yy]], 3, INK, R);
465
+ const k0 = [-40, 30, -10][i], k1 = [35, -45, 50][i], kp = k0 + (k1 - k0) * H.ease.inOut(H.clamp((tq - 8.6 - i * 0.15) / 0.6));
466
+ c.fillStyle = '#fbfaf3'; c.beginPath(); c.arc(kp, yy, 11, 0, TAU); c.fill(); mline(c, arcPts(kp, yy, 11, 11, 0, TAU, 14), 3, INK, R, true);
467
+ if (tq > 8.6 + i * 0.15 && tq < 9.3 + i * 0.15) { mline(c, [[kp - 26, yy - 14], [kp - 18, yy - 14]], 2, INK, R); mline(c, [[kp + 18, yy - 14], [kp + 26, yy - 14]], 2, INK, R); }
468
+ });
469
+ } }, 8.2);
470
+ pin(AX, AY - 96, '#3fae4a', 8.4);
471
+ {
472
+ const R = H.rng(85);
473
+ arrowM(ctx, qpts([2205, 540], [2240, 420], [2320, 360]), (t - 6.85) / 0.3, INK, 6, R);
474
+ arrowM(ctx, qpts([2560, 300], [2720, 300], [2770, 440]), (t - 7.35) / 0.3, INK, 6, R);
475
+ arrowM(ctx, qpts([2780, 680], [2740, 830], [2570, 850]), (t - 8.3) / 0.3, RED, 6, R);
476
+ if (t > 8.5) hand(ctx, ['error'], 2800, 820, '700 46px "Caveat"', RED, 86, 20);
477
+ arrowM(ctx, qpts([2320, 760], [2250, 620], [2330, 470]), (t - 9.2) / 0.3, INK, 6, R);
478
+ }
479
+
480
+ // ===== BEAT 4: progress chart =====
481
+ {
482
+ const s = slap(10.55);
483
+ if (s) {
484
+ ctx.save(); ctx.translate(1060, 1250); ctx.rotate(0.015); ctx.scale(s, s);
485
+ const w = 700, h = 430;
486
+ ctx.save(); ctx.filter = `blur(${8 + (s - 1) * 40}px)`; ctx.fillStyle = 'rgba(40,20,5,0.42)'; ctx.fillRect(-w / 2 + 6, -h / 2 + 10, w, h); ctx.restore();
487
+ ctx.fillStyle = '#fbfaf3'; ctx.fillRect(-w / 2, -h / 2, w, h);
488
+ ctx.fillStyle = 'rgba(80,140,210,0.4)'; for (let k = 0; k < 15; k++) ctx.fillRect(-w / 2, -h / 2 + 50 + k * 26, w, 1);
489
+ ctx.fillStyle = 'rgba(220,60,70,0.6)'; ctx.fillRect(-w / 2 + 60, -h / 2, 1.4, h);
490
+ wr(ctx, (t - 10.75) / 0.35, -w / 2, -h / 2, w, 60, () => hand(ctx, ['Accuracy'], -120, -h / 2 + 30, '400 34px "Permanent Marker"', INK, 101, 30));
491
+ const R = H.rng(102), ox = -260, oy = 150, gw = 520, gh = 300;
492
+ arrowM(ctx, [[ox, oy + 6], [ox, oy - gh * 0.5], [ox, oy - gh]], (t - 10.85) / 0.2, INK, 3.5, R);
493
+ arrowM(ctx, [[ox - 6, oy], [ox + gw * 0.5, oy], [ox + gw, oy]], (t - 10.95) / 0.2, INK, 3.5, R);
494
+ if (t > 11.1) hand(ctx, ['training rounds →'], ox + gw - 160, oy + 36, '700 48px "Caveat"', BLUE, 103, 20);
495
+ const acc = (u) => 61 + 36 * (1 - Math.pow(1 - u, 2.2));
496
+ const pr = H.clamp((t - 11.1) / 1.4), pts = [];
497
+ for (let k = 0; k <= 40; k++) { const u = k / 40; if (u > pr) break; pts.push([ox + u * gw, oy - (acc(u) - 50) / 50 * gh]); }
498
+ if (pts.length > 1) mline(ctx, pts, 4.5, RED, R);
499
+ ctx.fillStyle = RED; for (let k = 0; k <= 8; k++) { const u = k / 8; if (u > pr) break; ctx.beginPath(); ctx.arc(ox + u * gw, oy - (acc(u) - 50) / 50 * gh, 6, 0, TAU); ctx.fill(); }
500
+ { // axis ticks, sized to stay legible at the final pull-back; right edge kept just left of the axis
501
+ const TF = '700 34px "Kalam"'; ctx.save(); ctx.font = TF; const w50 = ctx.measureText('50%').width, w100 = ctx.measureText('100%').width; ctx.restore();
502
+ hand(ctx, ['50%'], ox - 8 - w50 / 2, oy, TF, INK, 104, 20); hand(ctx, ['100%'], ox - 8 - w100 / 2, oy - gh, TF, INK, 105, 20);
503
+ }
504
+ ctx.restore();
505
+ pin(1060, 1050, '#d22b2b', 10.75);
506
+ }
507
+ }
508
+ put({ x: 1610, y: 1200, w: 300, h: 300, rot: -0.04, col: YEL, seed: 111, lift: 0.8, pin: [0, 0, '#2a62c9'],
509
+ draw(c) {
510
+ hand(c, ['ACCURACY'], 0, -100, '400 34px "Permanent Marker"', INK, 112, 30);
511
+ const seq = [[11.1, '61%'], [11.6, '74%'], [12.05, '88%'], [12.45, '97%']].filter((q) => t >= q[0]);
512
+ seq.forEach(([t0, txt], i) => {
513
+ const last = i === seq.length - 1, row = i - Math.max(0, seq.length - 2);
514
+ if (row < 0) return;
515
+ const y = last ? 40 : -52; // crossed-out row nudged up 16px to clear the larger ring
516
+ wr(c, (t - t0) / 0.25, -150, y - (last ? 72 : 50), 300, last ? 144 : 100, () => hand(c, [txt], 0, y, last ? '400 116px "Permanent Marker"' : '400 34px "Permanent Marker"', last && i === 3 ? GREEN : (last ? INK : 'rgba(27,31,41,0.6)'), 113 + i, 40));
517
+ if (!last) mline(c, [[-40, y + 2], [40, y - 4]], 4, RED, H.rng(120 + i));
518
+ });
519
+ if (t > 12.7) { const pr = H.clamp((t - 12.7) / 0.35); mline(c, arcPts(0, 42, 136, 68, -0.3, -0.3 + TAU * 1.08 * pr, 30), 5, RED, H.rng(125)); }
520
+ } }, 10.7);
521
+ pin(1610, 1064, '#2a62c9', 10.9);
522
+ { const R = H.rng(130); arrowM(ctx, qpts([1420, 1130], [1450, 1110], [1470, 1150], 12), (t - 11.2) / 0.3, RED, 5, R); }
523
+
524
+ // ===== BEAT 5: takeaway =====
525
+ put({ x: 1740, y: 850, w: 900, h: 360, rot: -0.02, col: ORG, seed: 141, lift: 0.7, pin: [0, 0, '#d22b2b'],
526
+ draw(c) { hand(c, ['More examples →'], 0, -60, '400 84px "Permanent Marker"', INK, 142, 70); hand(c, ['better guesses'], 0, 56, '400 84px "Permanent Marker"', INK, 143, 70); if (t > 13.9) mline(c, [[-260, 104], [-80, 98], [100, 104], [270, 96]], 6, RED, H.rng(144)); } }, 13.35);
527
+ pin(1740, 685, '#d22b2b', 13.6);
528
+ ctx.restore();
529
+ // lamp + vignette + grain (screen space)
530
+ { const g = ctx.createRadialGradient(330, 120, 50, 400, 200, 1100); g.addColorStop(0, 'rgba(255,240,210,0.18)'); g.addColorStop(0.5, 'rgba(255,240,210,0)'); g.addColorStop(1, 'rgba(40,20,0,0.3)'); ctx.fillStyle = g; ctx.fillRect(0, 0, W, H_); }
531
+ H.vignette(ctx, W, H_, 0.35, '30,15,0');
532
+ H.grain(ctx, W, H_, 0.04, 8 + Math.floor(t * 12));
533
+ },
534
+ // Sound: an evidence board in a quiet office. Notes slap flat onto cork (a papery smack with a soft cork thump,
535
+ // bigger cards land heavier), push pins press into the cork (a short dull stab), strips of tape tear and press,
536
+ // marker squeaks are avoided: writing is a felt-tip drag, one stroke per word. Red yarn is pulled across the board
537
+ // (a soft fibrous draw that ends in a low twang as it catches the pin). Times copied from explainer() above:
538
+ // a note slapped at t0 (scale 1.32 -> 1 on back ease over 0.3 s) first hits the board at t0 + 0.11; a pin at t0
539
+ // seats at t0 + 0.14.
540
+ explainerSound(k) {
541
+ // Chrome glitch: a noise buffer that starts within ~1e-8 s of a sample boundary (float error like 4.15 + 0.1 * 1 + 0.11)
542
+ // spikes far above its gain. Put every start a quarter sample past the 48 kHz grid so none land there.
543
+ { const k0 = k, sn = (t) => (Math.round(t * 48000) + 0.25) / 48000; k = { ...k0, play: (n, t, o) => k0.play(n, sn(t), o), tone: (t, o) => k0.tone(sn(t), o), noise: (t, o) => k0.noise(sn(t), o) }; }
544
+ const D = 14.5, XW = 3200, XH = 1600, W = 1280, Hh = 720;
545
+ const K = [[0, 560, 260, 1.25], [1.5, 560, 260, 1.25], [2.4, 1200, 560, 0.84], [5.9, 1200, 560, 0.84], [6.8, 2490, 590, 1.0], [10.1, 2490, 590, 1.0], [10.9, 1260, 1210, 0.92], [12.9, 1260, 1210, 0.92], [13.7, 1720, 850, 0.56], [99, 1720, 850, 0.56]];
546
+ // stereo position of a board x at time t, through the same camera as explainer()
547
+ const pan = (x, t) => {
548
+ let ki = 0; while (ki < K.length - 2 && t > K[ki + 1][0]) ki++;
549
+ const [ta, ax, , az] = K[ki], [tb, bx, , bz] = K[ki + 1], e = H.ease.inOut(H.clamp((t - ta) / (tb - ta)));
550
+ const z = Math.exp(H.lerp(Math.log(az), Math.log(bz), e)), hw = W / 2 / z, cx = H.clamp(H.lerp(ax, bx, e), hw, XW - hw);
551
+ return H.clamp((x - cx) * z / (W / 2), -1, 1) * 0.6;
552
+ };
553
+ const LAND = 0.11, SEAT = 0.14;
554
+ // sticky note slapped onto cork; size 0 (small note) .. 1 (big card)
555
+ const slapN = (t0, x, size = 0, g = 1, minor = false) => {
556
+ const t = t0 + LAND, p = pan(x, t);
557
+ k.play('slap', t, { gain: (0.3 + 0.2 * size) * g, pan: p, minor });
558
+ k.noise(t, { dur: 0.08, color: 'pink', filter: 'lowpass', f: 450 + 250 * size, gain: (0.25 + 0.2 * size) * g, a: 0.002, pan: p, minor }); k.tone(t, { f: [[0, 150 - 40 * size], [0.07, 65]], dur: 0.1, gain: (0.1 + 0.12 * size) * g, pan: p, minor }); // cork takes it
559
+ };
560
+ // push pin pressed into cork: a short dull stab
561
+ const pinIn = (t0, x, g = 1, minor = true) => {
562
+ const t = t0 + SEAT, p = pan(x, t);
563
+ k.noise(t, { dur: 0.035, filter: 'bandpass', f: 1300, q: 1.6, gain: 0.3 * g, a: 0.001, pan: p, minor });
564
+ k.tone(t, { f: [[0, 260], [0.05, 140]], dur: 0.07, gain: 0.16 * g, pan: p, minor });
565
+ };
566
+ // felt-tip marker: touch down, then the stroke
567
+ const mk = (a, b, x, g = 1, minor = true) => { const p = pan(x, a); k.noise(a, { dur: 0.02, filter: 'bandpass', f: 1500, q: 1.4, gain: 0.18 * g, a: 0.001, pan: p, minor }); k.play('stroke', a, { material: 'marker', dur: b - a, gain: g, pan: p, minor }); };
568
+ // handwriting revealed left to right over [a, a+d]: one marker stroke per word
569
+ const write = (s, a, d, x, g = 0.85, minor = true) => { const n = s.length, re = /\S+/g; let m; while ((m = re.exec(s))) mk(a + d * m.index / n, a + d * (m.index + m[0].length) / n, x, g, minor); };
570
+ // red yarn drawn across the board, catching on its pin at the end
571
+ const yarnPull = (a, d, x0, x1) => {
572
+ k.noise(a, { dur: d, color: 'pink', filter: 'bandpass', f: [[0, 500], [d, 900]], q: 0.9, gain: 0.08, a: d * 0.3, hold: d * 0.4, pan: (pan(x0, a) + pan(x1, a + d)) / 2, minor: true });
573
+ k.tone(a + d, { f: 'A2', type: 'triangle', dur: 0.35, gain: 0.12, a: 0.003, pan: pan(x1, a + d) });
574
+ k.tone(a + d, { f: 'A3', dur: 0.2, gain: 0.03, a: 0.003, pan: pan(x1, a + d) });
575
+ };
576
+
577
+ k.bed('room', 0, D, { gain: 0.45 });
578
+
579
+ // ---- BEAT 1: index card slaps on (0.1), "How does AI" (0.35..0.9) "learn?" (0.85..1.3), red arrow (1.3..1.6)
580
+ slapN(0.1, 560, 1, 0.9);
581
+ write('How does AI', 0.35, 0.55, 560, 0.95);
582
+ k.play('tape', 0.4, { dur: 0.12, gain: 0.5, pan: pan(300, 0.4), minor: true }); k.play('tape', 0.47, { dur: 0.1, gain: 0.45, pan: pan(820, 0.47), minor: true });
583
+ write('learn?', 0.85, 0.45, 560, 1.0, false);
584
+ mk(1.3, 1.6, 560, 1.1, false);
585
+ pinIn(1.55, 560, 1.1, false);
586
+ yarnPull(1.6, 0.9, 560, 1560);
587
+
588
+ // ---- BEAT 2: model note (1.95), its pin (2.25), twelve example notes (2.2 + k*0.13), ten more (4.15 + k*0.1)
589
+ slapN(1.95, 1560, 0.6, 1);
590
+ pinIn(2.25, 1560);
591
+ for (let i = 0; i < 12; i++) slapN(2.2 + i * 0.13, 920 + (i % 3) * 135, 0, 0.6, true);
592
+ for (let i = 0; i < 10; i++) slapN(4.15 + i * 0.1, 1060, 0, 0.45, true);
593
+ // counter card (2.9) and its pin (3.1); numbers crossed out and rewritten
594
+ slapN(2.9, 1560, 0.8, 0.9);
595
+ pinIn(3.1, 1560);
596
+ mk(3.0, 3.4, 1350); mk(3.4, 3.8, 1350); mk(3.7, 4.1, 1350); // three red arrows into the model
597
+ write('10', 3.05, 0.3, 1560);
598
+ [[3.65, '1,000'], [4.3, '80,000']].forEach(([t0, s]) => { mk(t0, t0 + 0.06, 1560, 0.8); write(s, t0 + 0.02, 0.3, 1560); }); // strike the old number, write the new
599
+ mk(4.95, 5.01, 1560, 0.9); write('1,000,000', 4.97, 0.3, 1560, 1.25, false);
600
+ k.play('tock', 5.27, { f: 300, gain: 0.45, pan: pan(1560, 5.27) }); // the marker taps a full stop under it
601
+ write('examples', 5.2, 0.35, 1560, 0.7);
602
+
603
+ // ---- camera follows the yarn to the loop (5.9 -> 6.8)
604
+ yarnPull(5.9, 0.85, 1560, 2440);
605
+ slapN(6.5, 2100, 0.7, 1); k.play('tape', 6.55, { dur: 0.12, gain: 0.5, pan: pan(2100, 6.55), minor: true }); // the new photo, taped
606
+ slapN(6.7, 2440, 0.4, 1); pinIn(6.9, 2440); // GUESS
607
+ mk(6.85, 7.15, 2260, 0.8); // arrow photo -> guess
608
+ write('dog?', 7.0, 0.3, 2440, 1.0, false);
609
+ slapN(7.3, 2860, 0.4, 1); pinIn(7.5, 2860); // CHECK
610
+ mk(7.35, 7.65, 2700, 0.8);
611
+ // WRONG: two red slashes over "dog?" (7.7, 7.85), then a red ring (8.0 -> 8.3)
612
+ mk(7.7, 7.85, 2440, 1.6, false); mk(7.85, 8.0, 2440, 1.6, false);
613
+ k.play('error', 7.7, { f: 'F3', gain: 0.55, pan: pan(2440, 7.7) });
614
+ write("it's a cat!", 7.75, 0.4, 2860, 0.8);
615
+ mk(8.0, 8.3, 2440, 1.1, false);
616
+ slapN(8.2, 2440, 0.4, 0.9); pinIn(8.4, 2440); // ADJUST
617
+ mk(8.3, 8.6, 2700, 0.9); write('error', 8.5, 0.15, 2800, 0.7);
618
+ // sliders slide on twos (8.6 + i*0.15, 0.6 s each): a tiny dry tick per moving frame
619
+ for (let f = Math.floor(8.6 * 12) + 1; f / 12 < 9.5; f++) k.noise(f / 12, { dur: 0.025, filter: 'bandpass', f: 1100 + (f % 3) * 120, q: 1.5, gain: 0.22, a: 0.001, pan: pan(2440, f / 12), minor: true });
620
+ mk(9.2, 9.5, 2290, 0.9); // arrow back to the guess
621
+ // CORRECTION: "cat ✓" in green (9.5 -> 9.85)
622
+ mk(9.5, 9.66, 2420, 1.1, false); mk(9.72, 9.85, 2490, 1.2, false);
623
+ k.play('success', 9.85, { f: 'G5', gain: 0.6, pan: pan(2440, 9.85) });
624
+
625
+ // ---- yarn down to the chart (10.1 -> 10.9)
626
+ yarnPull(10.1, 0.8, 2470, 1450);
627
+ slapN(10.55, 1060, 1, 1); slapN(10.7, 1610, 0.6, 0.9); // chart card, accuracy note
628
+ pinIn(10.75, 1060); pinIn(10.9, 1610);
629
+ write('Accuracy', 10.75, 0.35, 940, 0.75);
630
+ mk(10.85, 11.05, 800, 0.7); mk(10.95, 11.15, 1060, 0.7); // axes
631
+ mk(11.1, 12.5, 1060, 0.5); // the red curve
632
+ mk(11.2, 11.5, 1445, 0.7); // little arrow to the note
633
+ write('61%', 11.1, 0.25, 1610);
634
+ [[11.6, '74%'], [12.05, '88%']].forEach(([t0, s]) => { mk(t0, t0 + 0.05, 1610, 0.8); write(s, t0 + 0.02, 0.25, 1610); });
635
+ // 97% lands (12.45), in green, big: the big hit; red ring (12.7 -> 13.05)
636
+ mk(12.45, 12.5, 1610, 0.9);
637
+ k.play('impact', 12.47, { gain: 1.35, pan: pan(1610, 12.47) });
638
+ write('97%', 12.47, 0.25, 1610, 1.4, false);
639
+ k.play('ding', 12.5, { f: 'E5', gain: 0.45, pan: pan(1610, 12.5) });
640
+ mk(12.7, 13.05, 1610, 1.2, false);
641
+
642
+ // ---- BEAT 5: camera pulls back (12.9 -> 13.7), the takeaway note slaps on (13.35), pinned (13.6), underlined (13.9)
643
+ slapN(13.35, 1740, 1, 1.15);
644
+ pinIn(13.6, 1740, 1.2, false);
645
+ ['C5', 'E5', 'G5'].forEach((f, i) => k.play('ding', 13.5 + i * 0.08, { f, gain: 0.38 - i * 0.06, pan: (i - 1) * 0.25 }));
646
+ mk(13.9, 14.02, 1740, 1.1, false);
647
+ },
648
+
649
+ // ===== END EXPLAINER =====
650
+ });
651
+ }