@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,666 @@
1
+ {
2
+ // ---------- environment map for liquid chrome ----------
3
+ const SKY_HI = H.hex('#7fa8f5'), SKY_LO = H.hex('#f4f8ff'), HOR = H.hex('#1a1d45'), GR_HI = H.hex('#cbb8ff'), GR_LO = H.hex('#5a4a9a');
4
+ const IRI = ['#7ff3ff', '#c9a6ff', '#ff9ee6', '#b8f7ff'].map(H.hex);
5
+ const L = (() => { const v = [-0.45, -0.65, 0.62]; const m = Math.hypot(...v); return v.map((x) => x / m); })();
6
+ let ENVX = 0, IRIP = 0; // animated env-map rotation / film phase
7
+ let ENVH = -0.1, ENVS = 0; // lower edge of the dark horizon band (hero -0.1; the explainer narrows it for small chrome)
8
+ const EB = [0, 0, 0];
9
+ function envBase(e, rx, o) {
10
+ let r, g, b;
11
+ if (e > 0.04) {
12
+ const u = Math.pow(H.clamp((e - 0.04) / 0.9), 0.55);
13
+ r = H.lerp(SKY_LO[0], SKY_HI[0], u); g = H.lerp(SKY_LO[1], SKY_HI[1], u); b = H.lerp(SKY_LO[2], SKY_HI[2], u);
14
+ // softbox panels
15
+ if (e > 0.42 && e < 0.8 && Math.abs(rx + 0.25) < 0.22) { r = g = b = 255; }
16
+ if (e > 0.15 && e < 0.3 && rx > 0.35 && rx < 0.7) { r = H.lerp(r, 255, 0.85); g = H.lerp(g, 255, 0.85); b = H.lerp(b, 255, 0.85); }
17
+ } else if (e > ENVH) {
18
+ const u = (e - ENVH) / (0.04 - ENVH);
19
+ const k = Math.pow(Math.abs(u - 0.62) / 0.62, 2.4);
20
+ r = H.lerp(HOR[0], 210, k * 0.6); g = H.lerp(HOR[1], 200, k * 0.6); b = H.lerp(HOR[2], 255, k * 0.6);
21
+ } else {
22
+ const u = Math.pow(H.clamp((ENVH - e) / 0.85), 0.7);
23
+ r = H.lerp(GR_HI[0], GR_LO[0], u); g = H.lerp(GR_HI[1], GR_LO[1], u); b = H.lerp(GR_HI[2], GR_LO[2], u);
24
+ }
25
+ o[0] = r; o[1] = g; o[2] = b;
26
+ }
27
+ function env(nx, ny, nz, out) {
28
+ // reflect view (0,0,-1) about n
29
+ const rx = 2 * nz * nx + ENVX, ry = 2 * nz * ny, rz = 2 * nz * nz - 1;
30
+ const e = -ry; // elevation
31
+ envBase(e, rx, out);
32
+ let r = out[0], g = out[1], b = out[2];
33
+ if (ENVS > 0 && (Math.abs(e - 0.04) < ENVS || Math.abs(e - ENVH) < ENVS)) {
34
+ // explainer: filter the horizon band's edges over a few elevation taps, so it reads as a clean liquid line, not jaggies
35
+ for (let q = -2; q <= 2; q++) { if (!q) continue; envBase(e + q * ENVS * 0.5, rx, EB); r += EB[0]; g += EB[1]; b += EB[2]; }
36
+ r /= 5; g /= 5; b /= 5;
37
+ }
38
+ // thin-film iridescence at grazing angles
39
+ const f = Math.pow(1 - H.clamp(nz), 1.6);
40
+ const hp = ((rx * 0.9 + ry * 0.6 + f * 1.4 + IRIP) % 1 + 1) % 1 * IRI.length;
41
+ const i0 = Math.floor(hp) % IRI.length, i1 = (i0 + 1) % IRI.length, ft = hp - Math.floor(hp);
42
+ const ir = H.lerp(IRI[i0][0], IRI[i1][0], ft), ig = H.lerp(IRI[i0][1], IRI[i1][1], ft), ib = H.lerp(IRI[i0][2], IRI[i1][2], ft);
43
+ const im = 0.18 + f * 0.45;
44
+ r = H.lerp(r, ir, im); g = H.lerp(g, ig, im); b = H.lerp(b, ib, im);
45
+ // specular
46
+ const s = Math.pow(Math.max(0, rx * L[0] + ry * L[1] + rz * L[2]), 90) * 255;
47
+ out[0] = Math.min(255, r + s); out[1] = Math.min(255, g + s); out[2] = Math.min(255, b + s);
48
+ }
49
+
50
+ // shade a height field region onto ctx: z[] heights, sd[] signed distance (px, >0 inside)
51
+ function shadeRegion(ctx, x0, y0, w, h, z, sd, zscale, tilt = 0) {
52
+ const img = ctx.getImageData(x0, y0, w, h), d = img.data, out = [0, 0, 0];
53
+ for (let y = 1; y < h - 1; y++) for (let x = 1; x < w - 1; x++) {
54
+ const i = y * w + x; const a = H.clamp(sd[i] + 0.5);
55
+ if (a <= 0) continue;
56
+ const dzx = (z[i + 1] - z[i - 1]) * 0.5 * zscale, dzy = (z[i + w] - z[i - w]) * 0.5 * zscale;
57
+ const ny0 = -dzy - tilt; // tilt > 0 makes flat faces look up into the sky
58
+ const m = Math.hypot(dzx, ny0, 1);
59
+ env(-dzx / m, ny0 / m, 1 / m, out);
60
+ const p = i * 4;
61
+ d[p] = H.lerp(d[p], out[0], a); d[p + 1] = H.lerp(d[p + 1], out[1], a); d[p + 2] = H.lerp(d[p + 2], out[2], a);
62
+ }
63
+ ctx.putImageData(img, x0, y0);
64
+ }
65
+
66
+ function boxBlur(a, w, h, r, passes) {
67
+ const tmp = new Float32Array(a.length);
68
+ for (let p = 0; p < passes; p++) {
69
+ for (let y = 0; y < h; y++) { let acc = 0; const row = y * w; for (let x = -r; x <= r; x++) acc += a[row + H.clamp(x, 0, w - 1)]; for (let x = 0; x < w; x++) { tmp[row + x] = acc / (2 * r + 1); acc += a[row + Math.min(w - 1, x + r + 1)] - a[row + Math.max(0, x - r)]; } }
70
+ for (let x = 0; x < w; x++) { let acc = 0; for (let y = -r; y <= r; y++) acc += tmp[H.clamp(y, 0, h - 1) * w + x]; for (let y = 0; y < h; y++) { a[y * w + x] = acc / (2 * r + 1); acc += tmp[Math.min(h - 1, y + r + 1) * w + x] - tmp[Math.max(0, y - r) * w + x]; } }
71
+ }
72
+ }
73
+
74
+ function metaBlob(ctx, balls, bx, by, bw, bh, smooth = 0) {
75
+ const w = bw, h = bh, n = w * h;
76
+ const f = new Float32Array(n), z = new Float32Array(n), sd = new Float32Array(n);
77
+ for (let y = 0; y < h; y++) for (let x = 0; x < w; x++) {
78
+ let s = 0, rw = 0, ww = 0;
79
+ const px = bx + x, py = by + y;
80
+ for (const [cx, cy, r] of balls) { const dd = (px - cx) ** 2 + (py - cy) ** 2 + 1; const q = (r * r) / dd, v = q * q; s += v; rw += v * r; ww += v; }
81
+ const i = y * w + x; f[i] = s;
82
+ const g = s > 1 ? 1 - 1 / Math.sqrt(s) : 0;
83
+ z[i] = (rw / ww) * Math.sqrt(g);
84
+ }
85
+ for (let y = 1; y < h - 1; y++) for (let x = 1; x < w - 1; x++) {
86
+ const i = y * w + x; const gx = (f[i + 1] - f[i - 1]) * 0.5, gy = (f[i + w] - f[i - w]) * 0.5;
87
+ sd[i] = (f[i] - 1) / (Math.hypot(gx, gy) + 1e-6);
88
+ }
89
+ if (smooth) boxBlur(z, w, h, smooth, 2); // explainer: liquid-smooth height field (no torn horizon creases)
90
+ shadeRegion(ctx, bx, by, w, h, z, sd, 1.0);
91
+ }
92
+
93
+ let MEAS = null;
94
+ function bubbleText(ctx, text, cx, by, font, stroke, blur, W, Hh, scaleOf = () => 1, opt = null) {
95
+ // opt (explainer): ls letter spacing, zh inflate height, zs extra height smoothing, halo/haloA/haloBlur, tilt
96
+ const o = opt || {}, ls = o.ls != null ? o.ls : 12, zh = o.zh || 60;
97
+ if (!MEAS) MEAS = document.createElement('canvas').getContext('2d');
98
+ MEAS.font = font; MEAS.textAlign = 'center'; MEAS.textBaseline = 'alphabetic'; MEAS.letterSpacing = ls + 'px';
99
+ const m = MEAS.measureText(text);
100
+ const x0 = Math.floor(cx - m.width / 2 - 60), x1 = Math.ceil(cx + m.width / 2 + 60);
101
+ const y0 = Math.floor(by - m.actualBoundingBoxAscent - 60), y1 = Math.ceil(by + m.actualBoundingBoxDescent + 60);
102
+ const w = x1 - x0, h = y1 - y0;
103
+ // letters drawn sharp into a bbox-sized layer, then blurred once (was a full-frame blur per glyph draw)
104
+ const L0 = H.layer(w, h), l0 = L0.getContext('2d');
105
+ l0.font = font; l0.textBaseline = 'alphabetic'; l0.lineJoin = 'round'; l0.letterSpacing = ls + 'px'; l0.textAlign = 'left';
106
+ l0.fillStyle = '#fff'; l0.strokeStyle = '#fff'; l0.lineWidth = stroke; l0.translate(-x0, -y0);
107
+ const left = cx - m.width / 2;
108
+ for (let i = 0; i < text.length; i++) { // letters inflate individually
109
+ const k = scaleOf(i); if (k <= 0.01 || text[i] === ' ') continue;
110
+ const xa = left + l0.measureText(text.slice(0, i)).width, wch = l0.measureText(text[i]).width;
111
+ l0.save(); l0.translate(xa + wch / 2, by - m.actualBoundingBoxAscent * 0.45); l0.scale(k, k); l0.translate(-(xa + wch / 2), -(by - m.actualBoundingBoxAscent * 0.45));
112
+ l0.strokeText(text[i], xa, by); l0.fillText(text[i], xa, by);
113
+ l0.restore();
114
+ }
115
+ const Lr = H.layer(w, h), lc = Lr.getContext('2d', { willReadFrequently: true });
116
+ lc.filter = `blur(${blur}px)`; lc.drawImage(L0, 0, 0); lc.filter = 'none';
117
+ const a = lc.getImageData(0, 0, w, h).data;
118
+ const A = new Float32Array(w * h), z = new Float32Array(w * h), sd = new Float32Array(w * h);
119
+ for (let i = 0; i < w * h; i++) A[i] = a[i * 4 + 3] / 255;
120
+ boxBlur(A, w, h, o.ab || 3, 3);
121
+ const T = 0.5;
122
+ for (let i = 0; i < w * h; i++) z[i] = Math.sqrt(H.clamp((A[i] - T) / (1 - T))) * zh;
123
+ if (o.zs) boxBlur(z, w, h, o.zs, 1); // calmer normals on small glyphs: continuous reflections, no speckled horizon
124
+ for (let y = 1; y < h - 1; y++) for (let x = 1; x < w - 1; x++) {
125
+ const i = y * w + x; const gx = (A[i + 1] - A[i - 1]) * 0.5, gy = (A[i + w] - A[i - w]) * 0.5;
126
+ sd[i] = (A[i] - T) / (Math.hypot(gx, gy) + 1e-6);
127
+ }
128
+ // soft lilac drop shadow
129
+ ctx.save(); ctx.globalAlpha = 0.55; ctx.filter = 'blur(12px)';
130
+ const sh = H.layer(w, h), sc = sh.getContext('2d'); sc.drawImage(Lr, 0, 0); sc.globalCompositeOperation = 'source-in'; sc.fillStyle = '#5a3fa8'; sc.fillRect(0, 0, w, h);
131
+ ctx.drawImage(sh, x0 + 8, y0 + 18); ctx.restore();
132
+ if (o.halo) { // thin indigo rim for legibility on pale backgrounds (explainer only)
133
+ const hl = H.layer(w, h), hc = hl.getContext('2d'); hc.filter = `blur(${o.haloBlur != null ? o.haloBlur : 2}px)`; hc.drawImage(Lr, 0, 0); hc.filter = 'none'; hc.globalCompositeOperation = 'source-in'; hc.fillStyle = o.halo; hc.fillRect(0, 0, w, h);
134
+ ctx.save(); ctx.globalAlpha = o.haloA != null ? o.haloA : 0.95; ctx.drawImage(hl, x0, y0); if (o.haloA == null) ctx.drawImage(hl, x0, y0); ctx.restore();
135
+ }
136
+ shadeRegion(ctx, x0, y0, w, h, z, sd, 1.0, o.tilt != null ? o.tilt : 0.32);
137
+ }
138
+
139
+ function sparkle(c, x, y, s, a = 1) {
140
+ c.save(); c.globalCompositeOperation = 'lighter';
141
+ const g = c.createRadialGradient(x, y, 0, x, y, s * 0.6);
142
+ g.addColorStop(0, `rgba(255,255,255,${0.9 * a})`); g.addColorStop(0.3, `rgba(220,235,255,${0.35 * a})`); g.addColorStop(1, 'rgba(200,220,255,0)');
143
+ c.fillStyle = g; c.beginPath(); c.arc(x, y, s * 0.6, 0, 7); c.fill();
144
+ c.fillStyle = `rgba(255,255,255,${a})`;
145
+ const star = (len, wid, rot) => { c.save(); c.translate(x, y); c.rotate(rot); c.beginPath(); c.moveTo(-len, 0); c.quadraticCurveTo(0, -wid, len, 0); c.quadraticCurveTo(0, wid, -len, 0); c.fill(); c.restore(); };
146
+ star(s, s * 0.09, 0); star(s, s * 0.09, Math.PI / 2); star(s * 0.45, s * 0.06, Math.PI / 4); star(s * 0.45, s * 0.06, -Math.PI / 4);
147
+ c.restore();
148
+ }
149
+
150
+ function iriBubble(c, x, y, r, rot) {
151
+ c.save();
152
+ // body: mostly clear with faint tint
153
+ const g = c.createRadialGradient(x - r * 0.2, y - r * 0.25, r * 0.1, x, y, r);
154
+ g.addColorStop(0, 'rgba(255,255,255,0.04)'); g.addColorStop(0.75, 'rgba(220,235,255,0.10)'); g.addColorStop(0.93, 'rgba(255,255,255,0.45)'); g.addColorStop(1, 'rgba(255,255,255,0.0)');
155
+ c.fillStyle = g; c.beginPath(); c.arc(x, y, r, 0, 7); c.fill();
156
+ // thin-film rim
157
+ const cg = c.createConicGradient(rot, x, y);
158
+ ['#7ff3ff', '#b28cff', '#ff8fe0', '#ffe28f', '#8fffc8', '#7ff3ff'].forEach((col, i, arr) => cg.addColorStop(i / (arr.length - 1), col));
159
+ c.globalAlpha = 0.55; c.strokeStyle = cg; c.lineWidth = Math.max(2, r * 0.09);
160
+ c.beginPath(); c.arc(x, y, r * 0.93, 0, 7); c.stroke();
161
+ c.globalAlpha = 0.25; c.lineWidth = r * 0.22; c.beginPath(); c.arc(x, y, r * 0.84, rot, rot + 2.2); c.stroke();
162
+ // highlights
163
+ c.globalAlpha = 0.85; c.strokeStyle = '#fff'; c.lineWidth = Math.max(1.5, r * 0.06); c.lineCap = 'round';
164
+ c.beginPath(); c.arc(x, y, r * 0.72, Math.PI * 1.08, Math.PI * 1.42); c.stroke();
165
+ c.fillStyle = '#fff'; c.beginPath(); c.ellipse(x + r * 0.42, y + r * 0.45, r * 0.08, r * 0.05, -0.7, 0, 7); c.fill();
166
+ c.restore();
167
+ }
168
+
169
+ function frostedPill(ctx, snap, x, y, w, h, label, icon) {
170
+ ctx.save();
171
+ ctx.beginPath(); ctx.roundRect(x, y, w, h, h / 2); ctx.clip();
172
+ ctx.filter = 'blur(10px)'; ctx.drawImage(snap, 0, 0); ctx.filter = 'none';
173
+ const g = ctx.createLinearGradient(0, y, 0, y + h);
174
+ g.addColorStop(0, 'rgba(255,255,255,0.62)'); g.addColorStop(0.5, 'rgba(240,245,255,0.30)'); g.addColorStop(1, 'rgba(225,215,255,0.38)');
175
+ ctx.fillStyle = g; ctx.fillRect(x, y, w, h);
176
+ // glossy top lip
177
+ const gl = ctx.createLinearGradient(0, y, 0, y + h * 0.5);
178
+ gl.addColorStop(0, 'rgba(255,255,255,0.75)'); gl.addColorStop(1, 'rgba(255,255,255,0)');
179
+ ctx.fillStyle = gl; ctx.beginPath(); ctx.roundRect(x + 4, y + 2, w - 8, h * 0.45, h * 0.22); ctx.fill();
180
+ ctx.restore();
181
+ ctx.save();
182
+ ctx.strokeStyle = 'rgba(255,255,255,0.95)'; ctx.lineWidth = 1.5; ctx.beginPath(); ctx.roundRect(x + 0.75, y + 0.75, w - 1.5, h - 1.5, h / 2); ctx.stroke();
183
+ ctx.strokeStyle = 'rgba(110,100,190,0.35)'; ctx.lineWidth = 1; ctx.beginPath(); ctx.roundRect(x - 0.5, y - 0.5, w + 1, h + 1, h / 2 + 0.5); ctx.stroke();
184
+ let tx = x + h * 0.5;
185
+ if (icon) { icon(ctx, x + h * 0.5, y + h / 2); tx += h * 0.55; }
186
+ ctx.fillStyle = '#2c2a6b'; ctx.font = '700 15px "Space Grotesk"'; ctx.textBaseline = 'middle'; ctx.letterSpacing = '1.5px';
187
+ ctx.fillText(label, tx, y + h / 2 + 1);
188
+ ctx.restore();
189
+ }
190
+ const orbIcon = (c, x, y) => { const g = c.createRadialGradient(x - 3, y - 3, 1, x, y, 10); g.addColorStop(0, '#fff'); g.addColorStop(0.4, '#9ff0ff'); g.addColorStop(1, '#6a5cff'); c.fillStyle = g; c.beginPath(); c.arc(x, y, 9, 0, 7); c.fill(); };
191
+ const playIcon = (c, x, y) => { c.fillStyle = '#2c2a6b'; c.beginPath(); c.moveTo(x - 5, y - 7); c.lineTo(x + 7, y); c.lineTo(x - 5, y + 7); c.closePath(); c.fill(); };
192
+
193
+ // =====================================================================================
194
+ // EXPLAINER: a glossy millennium "AI 2000" interface. The model is a living mercury blob; scenes change by
195
+ // liquid morph (the blob slides and re-forms) while frosted glass panels swoosh in/out; arrows are
196
+ // iridescent ribbons; hero numbers are inflated chrome bubble digits.
197
+ // =====================================================================================
198
+ const cl = H.clamp, EZ = H.ease;
199
+ function y2kBackground(ctx, W, H_, t) {
200
+ const bg = ctx.createLinearGradient(0, 0, W * 0.4, H_);
201
+ bg.addColorStop(0, '#eef3ff'); bg.addColorStop(0.45, '#cfdcff'); bg.addColorStop(1, '#c6b6f4');
202
+ ctx.fillStyle = bg; ctx.fillRect(0, 0, W, H_);
203
+ const glow = (x, y, r, col) => { const g = ctx.createRadialGradient(x, y, 0, x, y, r); g.addColorStop(0, col); g.addColorStop(1, 'rgba(255,255,255,0)'); ctx.fillStyle = g; ctx.fillRect(x - r, y - r, r * 2, r * 2); };
204
+ glow(900 + Math.sin(t * 0.3) * 60, 300, 420, 'rgba(255,255,255,0.7)'); glow(200, 640, 380, 'rgba(190,160,255,0.45)'); glow(160, 90, 300, 'rgba(160,230,255,0.5)');
205
+ ctx.save(); ctx.strokeStyle = 'rgba(120,110,200,0.08)'; ctx.lineWidth = 1;
206
+ const off = (t * 12) % 32;
207
+ for (let x = -off; x < W; x += 32) { ctx.beginPath(); ctx.moveTo(x, 0); ctx.lineTo(x, H_); ctx.stroke(); }
208
+ for (let y = 0; y < H_; y += 32) { ctx.beginPath(); ctx.moveTo(0, y); ctx.lineTo(W, y); ctx.stroke(); }
209
+ ctx.restore();
210
+ }
211
+ function glass(ctx, x, y, w, h, r, a = 1) {
212
+ ctx.save(); ctx.globalAlpha = a;
213
+ ctx.shadowColor = 'rgba(80,60,160,0.25)'; ctx.shadowBlur = 24; ctx.shadowOffsetY = 10;
214
+ const g = ctx.createLinearGradient(0, y, 0, y + h); g.addColorStop(0, 'rgba(255,255,255,0.72)'); g.addColorStop(0.5, 'rgba(245,248,255,0.45)'); g.addColorStop(1, 'rgba(230,220,255,0.55)');
215
+ ctx.fillStyle = g; ctx.beginPath(); ctx.roundRect(x, y, w, h, r); ctx.fill();
216
+ ctx.shadowColor = 'transparent';
217
+ const gl = ctx.createLinearGradient(0, y, 0, y + Math.min(60, h * 0.4)); gl.addColorStop(0, 'rgba(255,255,255,0.8)'); gl.addColorStop(1, 'rgba(255,255,255,0)');
218
+ ctx.fillStyle = gl; ctx.beginPath(); ctx.roundRect(x + 6, y + 3, w - 12, Math.min(60, h * 0.4), r * 0.6); ctx.fill();
219
+ ctx.strokeStyle = 'rgba(255,255,255,0.95)'; ctx.lineWidth = 2; ctx.beginPath(); ctx.roundRect(x + 1, y + 1, w - 2, h - 2, r); ctx.stroke();
220
+ ctx.strokeStyle = 'rgba(110,100,190,0.35)'; ctx.lineWidth = 1; ctx.beginPath(); ctx.roundRect(x - 0.5, y - 0.5, w + 1, h + 1, r); ctx.stroke();
221
+ ctx.restore();
222
+ }
223
+ function label(ctx, txt, x, y, px, col = '#2c2a6b', align = 'center', a = 1) {
224
+ ctx.save(); ctx.globalAlpha = a; ctx.font = `700 ${px}px "Space Grotesk"`; ctx.textAlign = align; ctx.textBaseline = 'middle'; ctx.fillStyle = col; ctx.fillText(txt, x, y); ctx.restore();
225
+ }
226
+ function pillTag(ctx, txt, x, y, px, active = false, a = 1) { // glossy pill centred at x,y
227
+ ctx.save(); ctx.font = `700 ${px}px "Space Grotesk"`; const w = ctx.measureText(txt).width + px * 1.4, h = px * 1.8; ctx.restore();
228
+ glass(ctx, x - w / 2, y - h / 2, w, h, h / 2, a);
229
+ if (active) { ctx.save(); ctx.globalAlpha = a; const g = ctx.createLinearGradient(x - w / 2, 0, x + w / 2, 0); g.addColorStop(0, '#9ff0ff'); g.addColorStop(0.5, '#c4a6ff'); g.addColorStop(1, '#ff9be3'); ctx.fillStyle = g; ctx.beginPath(); ctx.roundRect(x - w / 2 + 3, y - h / 2 + 3, w - 6, h - 6, h / 2); ctx.fill(); ctx.fillStyle = 'rgba(255,255,255,0.5)'; ctx.beginPath(); ctx.roundRect(x - w / 2 + 8, y - h / 2 + 5, w - 16, h * 0.32, h / 4); ctx.fill(); ctx.restore(); }
230
+ label(ctx, txt, x, y + 1, px, '#2c2a6b', 'center', a);
231
+ return w;
232
+ }
233
+ function critter(ctx, kind, x, y, s) {
234
+ ctx.save(); ctx.translate(x, y); ctx.scale(s, s);
235
+ const face = ctx.createRadialGradient(-10, -14, 4, 0, 0, 44);
236
+ if (kind === 'cat') {
237
+ face.addColorStop(0, '#ffe2b8'); face.addColorStop(0.6, '#ffaa5c'); face.addColorStop(1, '#e8743a');
238
+ ctx.fillStyle = '#e8743a'; ctx.beginPath(); ctx.moveTo(-34, -6); ctx.lineTo(-28, -44); ctx.lineTo(-6, -28); ctx.closePath(); ctx.fill(); ctx.beginPath(); ctx.moveTo(34, -6); ctx.lineTo(28, -44); ctx.lineTo(6, -28); ctx.closePath(); ctx.fill();
239
+ ctx.fillStyle = face; ctx.beginPath(); ctx.ellipse(0, 4, 38, 32, 0, 0, 7); ctx.fill();
240
+ ctx.fillStyle = '#2c2a6b'; ctx.beginPath(); ctx.ellipse(-13, 0, 5, 7, 0, 0, 7); ctx.ellipse(13, 0, 5, 7, 0, 0, 7); ctx.fill();
241
+ ctx.fillStyle = '#ff6f9c'; ctx.beginPath(); ctx.moveTo(-5, 12); ctx.lineTo(5, 12); ctx.lineTo(0, 18); ctx.fill();
242
+ ctx.strokeStyle = '#2c2a6b'; ctx.lineWidth = 2; ctx.beginPath(); ctx.moveTo(-44, 10); ctx.lineTo(-20, 14); ctx.moveTo(44, 10); ctx.lineTo(20, 14); ctx.stroke();
243
+ } else {
244
+ face.addColorStop(0, '#fff2dc'); face.addColorStop(0.6, '#e2c08c'); face.addColorStop(1, '#b98a52');
245
+ ctx.fillStyle = face; ctx.beginPath(); ctx.ellipse(0, 2, 30, 36, 0, 0, 7); ctx.fill();
246
+ ctx.fillStyle = '#7a4a28'; ctx.beginPath(); ctx.ellipse(-32, 0, 12, 28, 0.35, 0, 7); ctx.ellipse(32, 0, 12, 28, -0.35, 0, 7); ctx.fill();
247
+ ctx.fillStyle = '#2c2a6b'; ctx.beginPath(); ctx.ellipse(-11, -6, 5, 6, 0, 0, 7); ctx.ellipse(11, -6, 5, 6, 0, 0, 7); ctx.fill();
248
+ ctx.beginPath(); ctx.ellipse(0, 14, 8, 6, 0, 0, 7); ctx.fill();
249
+ }
250
+ ctx.fillStyle = 'rgba(255,255,255,0.7)'; ctx.beginPath(); ctx.ellipse(-12, -18, 10, 5, -0.4, 0, 7); ctx.fill();
251
+ ctx.restore();
252
+ }
253
+ function card(ctx, x, y, s, kind, lab, a = 1) {
254
+ ctx.save(); ctx.translate(x, y); ctx.scale(s, s);
255
+ glass(ctx, -70, -80, 140, 160, 22, a);
256
+ ctx.globalAlpha = a; critter(ctx, kind, 0, -18, 0.9); ctx.globalAlpha = 1;
257
+ pillTag(ctx, lab, 0, 52, 26, false, a);
258
+ ctx.restore();
259
+ }
260
+ function ribbon(ctx, a, b, cp, prog, w = 12) { // iridescent swoosh arrow, quadratic
261
+ const pt = (u) => [(1 - u) * (1 - u) * a[0] + 2 * (1 - u) * u * cp[0] + u * u * b[0], (1 - u) * (1 - u) * a[1] + 2 * (1 - u) * u * cp[1] + u * u * b[1]];
262
+ const n = Math.max(2, Math.round(40 * cl(prog)));
263
+ const pts = []; for (let i = 0; i <= n; i++) pts.push(pt((i / 40)));
264
+ ctx.save(); ctx.lineCap = 'round';
265
+ const g = ctx.createLinearGradient(a[0], a[1], b[0], b[1]); g.addColorStop(0, '#9ff0ff'); g.addColorStop(0.5, '#c4a6ff'); g.addColorStop(1, '#ff9be3');
266
+ ctx.strokeStyle = 'rgba(90,70,170,0.18)'; ctx.lineWidth = w + 8; ctx.beginPath(); pts.forEach((p, i) => (i ? ctx.lineTo(...p) : ctx.moveTo(...p))); ctx.stroke();
267
+ ctx.strokeStyle = g; ctx.lineWidth = w; ctx.stroke();
268
+ ctx.strokeStyle = 'rgba(255,255,255,0.85)'; ctx.lineWidth = w * 0.25; ctx.beginPath(); pts.forEach((p, i) => (i ? ctx.lineTo(p[0], p[1] - w * 0.2) : ctx.moveTo(p[0], p[1] - w * 0.2))); ctx.stroke();
269
+ if (prog >= 1) {
270
+ const [ex, ey] = b, [px, py] = pt(0.95), ang = Math.atan2(ey - py, ex - px);
271
+ ctx.fillStyle = '#ff9be3'; ctx.beginPath(); ctx.moveTo(ex + Math.cos(ang) * 14, ey + Math.sin(ang) * 14); ctx.lineTo(ex + Math.cos(ang + 2.4) * 22, ey + Math.sin(ang + 2.4) * 22); ctx.lineTo(ex + Math.cos(ang - 2.4) * 22, ey + Math.sin(ang - 2.4) * 22); ctx.closePath(); ctx.fill();
272
+ ctx.strokeStyle = '#fff'; ctx.lineWidth = 2; ctx.stroke();
273
+ }
274
+ ctx.restore();
275
+ return pt;
276
+ }
277
+ function badge(ctx, x, y, r, ok, a = 1) {
278
+ ctx.save(); ctx.globalAlpha = a;
279
+ const g = ctx.createRadialGradient(x - r * 0.3, y - r * 0.4, 2, x, y, r); g.addColorStop(0, ok ? '#c8ffe6' : '#ffc8d8'); g.addColorStop(0.6, ok ? '#2fd39a' : '#ff3d6e'); g.addColorStop(1, ok ? '#14946a' : '#c0153f');
280
+ ctx.fillStyle = g; ctx.beginPath(); ctx.arc(x, y, r, 0, 7); ctx.fill(); ctx.strokeStyle = '#fff'; ctx.lineWidth = 3; ctx.stroke();
281
+ ctx.strokeStyle = '#fff'; ctx.lineWidth = r * 0.22; ctx.lineCap = 'round'; ctx.beginPath();
282
+ if (ok) { ctx.moveTo(x - r * 0.42, y + r * 0.02); ctx.lineTo(x - r * 0.1, y + r * 0.34); ctx.lineTo(x + r * 0.46, y - r * 0.32); }
283
+ else { ctx.moveTo(x - r * 0.35, y - r * 0.35); ctx.lineTo(x + r * 0.35, y + r * 0.35); ctx.moveTo(x + r * 0.35, y - r * 0.35); ctx.lineTo(x - r * 0.35, y + r * 0.35); }
284
+ ctx.stroke();
285
+ ctx.fillStyle = 'rgba(255,255,255,0.6)'; ctx.beginPath(); ctx.ellipse(x - r * 0.3, y - r * 0.5, r * 0.35, r * 0.16, -0.4, 0, 7); ctx.fill();
286
+ ctx.restore();
287
+ }
288
+ function blobAt(ctx, cx, cy, R, t, wob, extra = []) {
289
+ const ph = t * 0.9;
290
+ const balls = [
291
+ [cx + Math.cos(ph) * 6 * wob, cy + Math.sin(ph * 1.3) * 6 * wob, R],
292
+ [cx + R * 0.8 + Math.cos(ph + 2) * 10 * wob, cy - R * 0.7 + Math.sin(ph + 1) * 10 * wob, R * 0.48],
293
+ [cx - R * 0.75 + Math.cos(ph + 4) * 10 * wob, cy + R * 0.65 + Math.sin(ph + 2) * 8 * wob, R * 0.5],
294
+ [cx + R * 0.95, cy + R * 0.55 + Math.sin(ph) * 12 * wob, R * 0.32],
295
+ ...extra,
296
+ ].filter((b) => b[2] > 1);
297
+ const pad = R * 2.1;
298
+ metaBlob(ctx, balls, Math.max(0, Math.round(cx - pad)), Math.max(0, Math.round(cy - pad)), Math.round(pad * 2), Math.round(pad * 2), 4);
299
+ }
300
+
301
+ const HALO = { halo: '#3b2f8f', haloA: 0.6, haloBlur: 1, tilt: 0.32, zs: 2 };
302
+ const bt = (px, extra) => ({ ...HALO, zh: Math.round(px * 0.45), ...extra }); // inflate height scaled to glyph size (hero: 160px -> 60)
303
+ function explainY2K(ctx, W, H_, t) {
304
+ const T2 = 2.55, T3 = 6.0, T4 = 10.5, T5 = 12.9;
305
+ ENVX = -0.1 + Math.sin(t * 0.5) * 0.06; IRIP = t * 0.06; ENVH = -0.06; ENVS = 0.03; // own env state (was whatever the hero left behind)
306
+ y2kBackground(ctx, W, H_, t);
307
+ // ---- model blob position per scene (liquid morph between them) ----
308
+ const keys = [[0, 1000, 340, 0], [1.6, 1000, 340, 0], [2.3, 960, 330, 125], [T3, 960, 330, 125], [T3 + 0.6, 540, 300, 105], [T4, 540, 300, 105], [T4 + 0.5, 1170, 105, 42], [T5, 1170, 105, 42], [T5 + 0.5, 1090, 590, 55]];
309
+ let bx = 0, by = 0, bR = 0;
310
+ for (let i = 0; i < keys.length - 1; i++) { const [t0, x0, y0, r0] = keys[i], [t1, x1, y1, r1] = keys[i + 1]; if (t >= t0 && t < t1) { const e = EZ.inOut((t - t0) / (t1 - t0)); bx = H.lerp(x0, x1, e); by = H.lerp(y0, y1, e); bR = H.lerp(r0, r1, e); break; } if (i === keys.length - 2) { bx = x1; by = y1; bR = r1; } }
311
+ const moving = keys.some(([k0], i) => i < keys.length - 1 && t > k0 && t < keys[i + 1][0] && (keys[i + 1][1] !== keys[i][1]));
312
+ const adjusting = t > 8.9 && t < 9.6;
313
+ // droplets fly in to form the model during the hook
314
+ let extra = [];
315
+ if (t > 1.5 && t < 2.6) for (let k = 0; k < 4; k++) { const p = cl((t - 1.5 - k * 0.12) / 0.6); const a = k * 1.7; extra.push([bx + Math.cos(a) * 420 * (1 - EZ.out(p)), by + Math.sin(a) * 300 * (1 - EZ.out(p)), 40 * (1 - p * 0.7)]); }
316
+ if (adjusting) extra.push([bx + Math.sin(t * 9) * bR * 0.6, by + bR * 0.9, bR * 0.35]);
317
+ ctx.save(); ctx.filter = 'blur(22px)'; ctx.fillStyle = 'rgba(90,60,170,0.25)'; ctx.beginPath(); ctx.ellipse(bx, by + bR * 1.5, bR * 1.6 + 1, bR * 0.25 + 1, 0, 0, 7); ctx.fill(); ctx.restore();
318
+ if (bR > 2 || extra.length) blobAt(ctx, bx, by, Math.max(bR, 1), t, 1 + (moving ? 3 : 0) + (adjusting ? 4 : 0), extra);
319
+
320
+ // ---------------- S1: hook ----------------
321
+ if (t < T2) {
322
+ const def = cl((t - 2.1) / 0.35); // letters deflate into the header pill
323
+ const inflate = (i, t0) => EZ.back(cl((t - t0 - i * 0.05) / 0.3)) * (1 - EZ.in(def));
324
+ if (def < 1) { bubbleText(ctx, 'How does', 600, 280, '700 132px "Fredoka"', 5, 4, W, H_, (i) => inflate(i, 0.1), bt(132)); bubbleText(ctx, 'AI learn?', 600, 450, '700 132px "Fredoka"', 5, 4, W, H_, (i) => inflate(i, 0.4), bt(132)); }
325
+ }
326
+ // header pill (persistent)
327
+ if (t > 2.2) { const p = EZ.out(cl((t - 2.2) / 0.4)); ctx.save(); ctx.translate(-420 * (1 - p), 0); pillTag(ctx, 'How does AI learn?', 205, 54, 30, false, cl(p * 2)); ctx.restore(); }
328
+
329
+ // ---------------- S2: data ----------------
330
+ if (t > T2 - 0.1 && t < T3 + 0.5) {
331
+ const out = EZ.in(cl((t - T3) / 0.45)), ox = -900 * out;
332
+ ctx.save(); ctx.translate(ox, 0);
333
+ const A = [60, 280], B = [800, 320], CP = [420, 90];
334
+ const pt = ribbon(ctx, A, B, CP, cl((t - 2.5) / 0.45), 14);
335
+ for (let k = 0; k < 10; k++) {
336
+ const t0 = 2.8 + k * 0.32, p = (t - t0) / 1.3; if (p < 0 || p > 1) continue;
337
+ const [x, y] = pt(EZ.inOut(p)); const kind = k % 2 ? 'dog' : 'cat';
338
+ card(ctx, x, y - 10, H.lerp(1.15, 0.45, EZ.in(p)), kind, kind, cl((1 - p) * 6));
339
+ }
340
+ const n = 1e6 * EZ.inOut(cl((t - 2.9) / 2.6));
341
+ if (t > 2.6) {
342
+ bubbleText(ctx, Math.round(n).toLocaleString('en-US'), 330, 600, '700 96px "Fredoka"', 4, 3, W, H_, undefined, bt(96, { ab: 2, zs: 3 }));
343
+ label(ctx, 'labelled examples', 330, 660, 32);
344
+ }
345
+ if (t > 2.7) pillTag(ctx, 'THE MODEL', 960 - ox, 520, 30);
346
+ ctx.restore();
347
+ }
348
+
349
+ // ---------------- S3: guess -> check -> adjust ----------------
350
+ const step = t < 7.0 ? -1 : t < 7.9 ? 0 : t < 8.5 ? 1 : t < 9.6 ? 2 : t < 10.0 ? 0 : 1;
351
+ if (t > T3 + 0.2 && t < T4 + 0.32) {
352
+ const inn = EZ.out(cl((t - T3 - 0.2) / 0.45)), out = EZ.in(cl((t - T4) / 0.3));
353
+ const ox = 1300 * (1 - inn) - 1300 * out;
354
+ ctx.save(); ctx.translate(ox, 0);
355
+ card(ctx, 160, 300, 1.25, 'cat', '?');
356
+ ribbon(ctx, [258, 300], [405, 300], [330, 260], cl((t - 6.6) / 0.3), 10);
357
+ pillTag(ctx, 'THE MODEL', 540, 452, 28);
358
+ ribbon(ctx, [660, 260], [780, 230], [720, 200], cl((t - 7.0) / 0.3), 10);
359
+ if (t > 7.0) label(ctx, 'Guess', 720, 176, 30, '#4b3fa8');
360
+ // speech bubble
361
+ const sb = cl((t - 7.2) / 0.25);
362
+ if (sb > 0) {
363
+ const shake = t > 7.9 && t < 8.25 ? Math.sin(t * 90) * 10 * (8.25 - t) * 3 : 0;
364
+ ctx.save(); ctx.translate(shake, 0);
365
+ glass(ctx, 790, 120, 420, 220, 40, sb);
366
+ ctx.save(); ctx.globalAlpha = sb; ctx.fillStyle = 'rgba(255,255,255,0.6)'; ctx.beginPath(); ctx.moveTo(812, 260); ctx.lineTo(770, 300); ctx.lineTo(850, 280); ctx.fill(); ctx.restore();
367
+ if (t < 9.6) {
368
+ label(ctx, 'dog?', 950, 205, 96, '#2c2a6b', 'center', sb);
369
+ if (t > 7.9) {
370
+ badge(ctx, 1130, 200, 44, false, cl((t - 7.9) / 0.15));
371
+ const rg = cl((t - 7.9) / 0.4); ctx.save(); ctx.strokeStyle = `rgba(255,60,110,${0.8 * (1 - rg * 0.5)})`; ctx.lineWidth = 6; ctx.beginPath(); ctx.ellipse(1000, 230, 230 + rg * 20, 128 + rg * 12, 0, 0, 7); ctx.stroke(); ctx.restore();
372
+ label(ctx, "Check: it's a cat!", 1000, 296, 34, '#c0153f');
373
+ }
374
+ } else {
375
+ label(ctx, 'cat', 950, 205, 96, '#2c2a6b');
376
+ badge(ctx, 1110, 200, 44, true, cl((t - 9.6) / 0.15));
377
+ label(ctx, 'Correct!', 1000, 296, 34, '#14946a');
378
+ }
379
+ ctx.restore();
380
+ }
381
+ // error droplet back to the weights
382
+ if (t > 8.5 && t < 9.6) {
383
+ const pt = ribbon(ctx, [930, 350], [700, 560], [930, 560], cl((t - 8.5) / 0.35), 8);
384
+ const p = cl((t - 8.5) / 0.4); const [dx, dy] = pt(p);
385
+ const g = ctx.createRadialGradient(dx - 4, dy - 4, 1, dx, dy, 20); g.addColorStop(0, '#fff'); g.addColorStop(0.5, '#ff6fb5'); g.addColorStop(1, 'rgba(255,60,160,0)'); ctx.fillStyle = g; ctx.beginPath(); ctx.arc(dx, dy, 20, 0, 7); ctx.fill();
386
+ label(ctx, 'error', 980, 470, 30, '#c0153f');
387
+ }
388
+ // weights panel with chrome slider knobs
389
+ glass(ctx, 360, 500, 330, 130, 26);
390
+ label(ctx, 'weights', 525, 528, 28);
391
+ const adj = EZ.inOut(cl((t - 8.9) / 0.6));
392
+ [[0.2, 0.75], [0.8, 0.3], [0.45, 0.9]].forEach(([a0, b0], i) => {
393
+ const y = 562 + i * 24, x0 = 390, w = 270, v = H.lerp(a0, b0, adj);
394
+ ctx.fillStyle = 'rgba(80,70,160,0.25)'; ctx.beginPath(); ctx.roundRect(x0, y - 4, w, 8, 4); ctx.fill();
395
+ const kx = x0 + v * w, g = ctx.createRadialGradient(kx - 3, y - 4, 1, kx, y, 11); g.addColorStop(0, '#fff'); g.addColorStop(0.5, adjusting ? '#ff9be3' : '#b9c8ff'); g.addColorStop(1, '#5a5aa0');
396
+ ctx.fillStyle = g; ctx.beginPath(); ctx.arc(kx, y, 11, 0, 7); ctx.fill();
397
+ });
398
+ // loop pills
399
+ const xs = [800, 980, 1160];
400
+ ['Guess', 'Check', 'Adjust'].forEach((lab, i) => pillTag(ctx, lab, xs[i], 612, 30, i === step));
401
+ ribbon(ctx, [860, 612], [912, 612], [886, 600], 1, 5); ribbon(ctx, [1040, 612], [1094, 612], [1067, 600], 1, 5);
402
+ ribbon(ctx, [1160, 650], [800, 650], [980, 705], 1, 5);
403
+ label(ctx, 'repeat', 980, 690, 28, '#4b3fa8');
404
+ ctx.restore();
405
+ }
406
+
407
+ // ---------------- S4: progress ----------------
408
+ if (t > T4 + 0.3 && t < T5 + 0.37) {
409
+ const inn = EZ.out(cl((t - T4 - 0.3) / 0.45)), out = EZ.in(cl((t - T5) / 0.35));
410
+ const ox = 1300 * (1 - inn) - 1300 * out;
411
+ ctx.save(); ctx.translate(ox, 0);
412
+ glass(ctx, 50, 120, 700, 500, 36);
413
+ const gx0 = 110, gx1 = 710, gy0 = 170, gy1 = 540;
414
+ ctx.strokeStyle = 'rgba(80,70,160,0.18)'; ctx.lineWidth = 1.5;
415
+ for (let i = 0; i <= 4; i++) { ctx.beginPath(); ctx.moveTo(gx0, H.lerp(gy1, gy0, i / 4)); ctx.lineTo(gx1, H.lerp(gy1, gy0, i / 4)); ctx.stroke(); }
416
+ label(ctx, 'training rounds →', (gx0 + gx1) / 2, 585, 30);
417
+ label(ctx, '100%', gx0 - 6, gy0 - 22, 24, '#4b3fa8', 'left'); label(ctx, '50%', gx0 - 6, gy1 + 20, 24, '#4b3fa8', 'left');
418
+ const pr = cl((t - T4 - 0.55) / 1.2), N = 24, val = (u) => 61 + 36 * (1 - Math.pow(1 - u, 2.2));
419
+ const P = (u) => [H.lerp(gx0, gx1, u), H.lerp(gy1, gy0, (val(u) - 50) / 50)];
420
+ if (pr > 0) {
421
+ const g = ctx.createLinearGradient(gx0, 0, gx1, 0); g.addColorStop(0, '#9ff0ff'); g.addColorStop(0.5, '#b28cff'); g.addColorStop(1, '#ff8fe0');
422
+ ctx.save(); ctx.lineCap = 'round'; ctx.lineJoin = 'round';
423
+ ctx.strokeStyle = 'rgba(90,70,170,0.2)'; ctx.lineWidth = 16; ctx.beginPath(); for (let i = 0; i <= N * pr; i++) ctx.lineTo(...P(i / N)); ctx.lineTo(...P(pr)); ctx.stroke();
424
+ ctx.strokeStyle = g; ctx.lineWidth = 9; ctx.stroke(); ctx.restore();
425
+ const [hx, hy] = P(pr); const sg = ctx.createRadialGradient(hx - 5, hy - 6, 1, hx, hy, 16); sg.addColorStop(0, '#fff'); sg.addColorStop(0.5, '#c4d4ff'); sg.addColorStop(1, '#5a5aa0');
426
+ ctx.fillStyle = sg; ctx.beginPath(); ctx.arc(hx, hy, 16, 0, 7); ctx.fill();
427
+ }
428
+ const acc = pr >= 1 ? 97 : Math.round(val(pr));
429
+ pillTag(ctx, 'ACCURACY', 1010, 190, 32);
430
+ bubbleText(ctx, acc + '%', 1010, 410, '700 170px "Fredoka"', 8, 6, W, H_, undefined, bt(170));
431
+ if (pr >= 1) {
432
+ const k = cl((t - T4 - 1.8) / 0.35);
433
+ ctx.save(); const g = ctx.createConicGradient(t, 1010, 350); ['#9ff0ff', '#b28cff', '#ff8fe0', '#ffe28f', '#9ff0ff'].forEach((c2, i, a) => g.addColorStop(i / (a.length - 1), c2));
434
+ ctx.strokeStyle = g; ctx.lineWidth = 8; ctx.beginPath(); ctx.ellipse(1010, 350, 230 * EZ.back(k), 140 * EZ.back(k), 0, 0, 7); ctx.stroke(); ctx.restore();
435
+ sparkle(ctx, 1180, 250, 80 * Math.sin(k * Math.PI) + 30, 1);
436
+ label(ctx, 'up from 61%', 1010, 520, 34, '#4b3fa8');
437
+ }
438
+ ctx.restore();
439
+ }
440
+
441
+ // ---------------- S5: takeaway ----------------
442
+ if (t > T5 + 0.2) {
443
+ bubbleText(ctx, 'More examples', 640, 330, '700 120px "Fredoka"', 3, 4, W, H_, (i) => EZ.back(cl((t - T5 - 0.25 - i * 0.04) / 0.35)), bt(120, { ls: 8, ab: 2 }));
444
+ const p = EZ.out(cl((t - T5 - 0.8) / 0.4));
445
+ if (p > 0) {
446
+ ctx.save(); ctx.globalAlpha = p; ctx.translate(0, 30 * (1 - p));
447
+ ctx.font = '700 64px "Space Grotesk"'; ctx.textAlign = 'center'; ctx.textBaseline = 'middle';
448
+ const g = ctx.createLinearGradient(330, 0, 950, 0); g.addColorStop(0, '#4fb8ff'); g.addColorStop(0.5, '#8a5cff'); g.addColorStop(1, '#ff5cc8');
449
+ ctx.lineWidth = 8; ctx.strokeStyle = '#fff'; ctx.lineJoin = 'round'; ctx.strokeText('→ better guesses', 640, 470);
450
+ ctx.fillStyle = g; ctx.fillText('→ better guesses', 640, 470);
451
+ ctx.restore();
452
+ }
453
+ }
454
+ // ambient bubbles + glints
455
+ const bub = (x, y, r, rot, sp) => iriBubble(ctx, x + Math.sin(t * 0.9 + rot) * 8, ((y - t * sp) % 820 + 820) % 820 - 50, r, rot + t * 0.4);
456
+ bub(90, 700, 34, 3.0, 30); bub(1230, 760, 28, 2.0, 24); bub(700, 820, 20, 1.2, 36);
457
+ const tw = (k) => 0.6 + 0.4 * Math.sin(t * 3 + k);
458
+ sparkle(ctx, bx - bR * 0.45, by - bR * 0.55, bR * 0.5 * tw(0) + 4, 0.95);
459
+ sparkle(ctx, 1220, 40, 24 * tw(2), 0.8);
460
+ H.grain(ctx, W, H_, 0.025, 4 + Math.floor(t * 12), true);
461
+ }
462
+
463
+ // ---- SOUND: a glossy millennium UI. Inflating chrome letters are springy bubble pops, mercury droplets land with
464
+ // liquid plips, the blob morphs with a gloopy wobble, frosted glass panels glide with a soft smooth air slide, pills
465
+ // and badges are glass taps, all over a light airy maj9 pad. Times copy explainY2K (T2/T3/T4/T5 and the per-element
466
+ // offsets); tonal sounds stay below ~2 kHz.
467
+ function y2kSound(k) {
468
+ const END = 15, T2 = 2.55, T3 = 6.0, T4 = 10.5, T5 = 12.9;
469
+ // inflating bubble letter: quick rising "boing" body + the pop skin
470
+ const inflate = (t, f, g = 1, pan = 0, minor = true) => {
471
+ k.tone(t, { f: [[0, f * 0.55], [0.07, f]], dur: 0.12, gain: 0.16 * g, a: 0.003, pan, minor });
472
+ k.noise(t + 0.004, { dur: 0.012, filter: 'bandpass', f: 1800, q: 1.2, gain: 0.08 * g, a: 0.0005, pan, minor });
473
+ };
474
+ // mercury droplet landing: a wet "plip" (pitch jumps up fast like a water drop)
475
+ const plip = (t, f, g = 1, pan = 0, minor = true) => k.tone(t, { f: [[0, f], [0.045, f * 2.1]], dur: 0.07, gain: 0.16 * g, a: 0.002, pan, verb: 0.2, minor });
476
+ // liquid chrome morph: wobbling low sine + soft brown-noise slosh
477
+ const gloop = (t, d, g = 1, pan = 0) => {
478
+ const pts = []; for (let i = 0; i <= 6; i++) pts.push([(i / 6) * d, (i % 2 ? 230 : 160) * (1 + 0.15 * Math.sin(i))]);
479
+ k.tone(t, { f: pts, dur: d, gain: 0.06 * g, a: d * 0.3, hold: d * 0.3, filter: 'lowpass', f2: 600, pan });
480
+ k.noise(t, { dur: d, color: 'brown', filter: 'lowpass', f: [[0, 250], [d * 0.5, 550], [d, 200]], gain: 0.1 * g, a: d * 0.4, pan });
481
+ };
482
+ // frosted panel glide: a smooth, low air slide (no swoosh)
483
+ const glide = (t, d, g = 1, pan = 0) => k.noise(t, { dur: d, color: 'pink', filter: 'bandpass', f: [[0, 350], [d, 650]], q: 0.7, gain: 0.07 * g, a: d * 0.5, pan, minor: true });
484
+ // glass tap: soft sine with a fifth partial, short and shiny
485
+ const tap = (t, n, g = 1, pan = 0, minor = false) => { k.tone(t, { f: n, dur: 0.5, gain: 0.1 * g, a: 0.002, verb: 0.35, pan, minor }); k.tone(t, { f: k.hz(n) * 1.5, dur: 0.18, gain: 0.03 * g, a: 0.002, pan, minor }); };
486
+ // iridescent ribbon drawing on: a soft shimmering band of air rising with it
487
+ const shimmer = (t, d, g = 1, pan = 0) => k.noise(t, { dur: d + 0.05, color: 'pink', filter: 'bandpass', f: [[0, 700], [d, 1700]], q: 2.5, gain: 0.05 * g, a: d * 0.6, pan, minor: true });
488
+ const counter = (t0, t1, fn, step, play) => { let last = -1, lastV = fn(t0); for (let t = t0; t <= t1 + 1e-6; t += 1 / 120) { const v = fn(t); if (v - lastV >= step && t - last >= 1 / 12) { play(t); last = t; lastV = v; } } };
489
+
490
+ k.music('pad', 0, END, { bpm: 90, gain: 0.42, chords: [['D4', 'F#4', 'A4', 'C#5'], ['B3', 'D4', 'F#4', 'A4'], ['G3', 'B3', 'D4', 'F#4'], ['A3', 'C#4', 'E4', 'G4']] });
491
+
492
+ // ---- S1: chrome letters inflate (line 1 from 0.1, line 2 from 0.4, 0.05 s apart): a pop every other letter
493
+ const PENT = [294, 330, 370, 440, 494, 587, 659, 740];
494
+ for (let i = 0; i < 8; i += 2) inflate(0.1 + i * 0.05, PENT[i / 2], 1, -0.3);
495
+ for (let i = 0; i < 9; i += 2) inflate(0.4 + i * 0.05, PENT[Math.min(7, 2 + i / 2)], 1, 0.3);
496
+ // mercury droplets fly in and merge (each lands at 1.5 + 0.12k + 0.6), blob swells 1.6..2.3
497
+ for (let j = 0; j < 4; j++) plip(2.1 + j * 0.12, 260 + j * 40, 0.9, 0.4);
498
+ gloop(1.6, 0.75, 1.1, 0.4);
499
+ // letters deflate into the header (2.1..2.45): a soft falling air release; header pill glides in (2.2..2.6)
500
+ k.noise(2.1, { dur: 0.36, color: 'pink', filter: 'lowpass', f: [[0, 1400], [0.35, 300]], gain: 0.12, a: 0.03, hold: 0.15 });
501
+ k.tone(2.1, { f: [[0, 420], [0.35, 150]], dur: 0.36, gain: 0.07, a: 0.03, hold: 0.15 });
502
+ glide(2.2, 0.4, 1, -0.6);
503
+
504
+ // ---- S2: ribbon draws (2.5..2.95), model pill (2.7), cards ride in, bubble counter
505
+ shimmer(2.5, 0.45, 1, -0.3);
506
+ tap(2.7, 'A5', 0.8, 0.4, true);
507
+ for (let i = 0; 2.8 + i * 0.32 + 1.1 < T3; i++) plip(2.8 + i * 0.32 + 1.1, 220 + (i % 3) * 30, 0.8, 0.45); // card dissolves into the blob (p ~ 0.85)
508
+ counter(2.9, 5.5, (t) => EZ.inOut(cl((t - 2.9) / 2.6)), 1 / 40, (t) => k.play('pop', t, { f: 520, gain: 0.45, pan: -0.4, minor: true }));
509
+ inflate(5.5, 440, 1.6, -0.4, false); tap(5.55, 'D5', 0.8, -0.4); // lands on 1,000,000
510
+
511
+ // ---- T3: data panel out (6.0..6.45), blob morphs (6.0..6.6), loop panel glides in (6.2..6.65)
512
+ glide(T3, 0.45, 1.3, -0.5); gloop(T3, 0.6, 1); glide(T3 + 0.2, 0.45, 1.3, 0.5);
513
+ shimmer(6.6, 0.3, 0.8, -0.3); // card -> model ribbon
514
+ shimmer(7.0, 0.3, 0.8, 0.3); tap(7.0, 'E5', 0.6, 0.2, true); // model -> guess ribbon, Guess pill lights
515
+ inflate(7.2, 330, 1.6, 0.4, false); tap(7.32, 'B4', 0.7, 0.4); // speech bubble inflates: "dog?"
516
+ // CHECK (7.9): wrong. red badge pops, ring, the bubble shakes (7.9..8.25): rubbery falling "bwomp" + low knock
517
+ const WRONG = 7.9;
518
+ k.tone(WRONG, { f: [[0, 340], [0.3, 110]], type: 'triangle', dur: 0.45, gain: 0.3, a: 0.004, hold: 0.1, pan: 0.5 });
519
+ k.tone(WRONG, { f: [[0, 360], [0.3, 116]], type: 'sine', dur: 0.45, gain: 0.2, a: 0.004, hold: 0.1, pan: 0.5 });
520
+ k.play('thud', WRONG, { f: 100, gain: 0.85, pan: 0.5 });
521
+ inflate(WRONG, 250, 1.2, 0.6, false);
522
+ tap(WRONG, 'F#5', 0.4, 0.3, true); // Check pill
523
+ // ADJUST (8.5): error droplet slides down to the weights (8.5..8.9), then the blob wobbles while sliders glide
524
+ tap(8.5, 'G5', 0.4, -0.2, true);
525
+ k.tone(8.5, { f: [[0, 700], [0.38, 260]], dur: 0.42, gain: 0.09, a: 0.02, hold: 0.25, pan: 0.3, verb: 0.2 });
526
+ plip(8.88, 230, 1.2, -0.2, false);
527
+ gloop(8.9, 0.7, 0.9, -0.1);
528
+ k.withMinor(() => [0, 1, 2].forEach((i) => k.tone(8.9, { f: [[0, 300 + i * 50], [0.6, 380 + i * 70]], dur: 0.62, gain: 0.03, a: 0.2, hold: 0.2, pan: -0.4 + i * 0.1 })));
529
+ // GUESS again -> "cat" + green badge (9.6): bright glossy chime
530
+ inflate(9.6, 440, 1.3, 0.5, false);
531
+ ['D5', 'F#5', 'A5'].forEach((n, i) => tap(9.6 + i * 0.07, n, 1, 0.5));
532
+ tap(10.0, 'F#5', 0.4, 0.3, true); // Check pill
533
+
534
+ // ---- T4: loop panel out (10.5..10.8), blob morphs (10.5..11.0), chart panel in (10.8..11.25)
535
+ glide(T4, 0.3, 1.3, -0.5); gloop(T4, 0.5, 0.9, 0.5); glide(T4 + 0.3, 0.45, 1.3, 0.4);
536
+ shimmer(T4 + 0.55, 1.2, 0.9, -0.3); // the line draws 11.05..12.25
537
+ const val = (u) => 61 + 36 * (1 - Math.pow(1 - u, 2.2));
538
+ counter(T4 + 0.55, T4 + 1.75, (t) => Math.round(val(cl((t - T4 - 0.55) / 1.2))), 1, (t) => k.play('pop', t, { f: 560, gain: 0.45, pan: 0.4, minor: true }));
539
+ // 97% (pr >= 1 at T4 + 1.75; ring springs out from T4 + 1.8): biggest moment. big bubble burst + glossy chord bloom
540
+ const BEST = T4 + 1.75 + 1e-3;
541
+ k.play('impact', BEST, { f: 90, gain: 0.85 });
542
+ inflate(BEST, 300, 2.2, 0.3, false);
543
+ ['D4', 'A4', 'C#5', 'E5', 'F#5'].forEach((n, i) => { k.tone(BEST + 0.05 + i * 0.05, { f: n, type: 'triangle', dur: 1.5, gain: 0.09, a: 0.01, verb: 0.45, pan: -0.4 + i * 0.2 }); k.tone(BEST + 0.05 + i * 0.05, { f: n, detune: 8, dur: 1.5, gain: 0.07, a: 0.01, verb: 0.45, pan: 0.4 - i * 0.2 }); });
544
+ shimmer(BEST + 0.05, 0.35, 1.4, 0.5);
545
+
546
+ // ---- T5: chart panel out (12.9..13.25), blob morphs down (12.9..13.4), takeaway letters inflate (13.15 + 0.04i)
547
+ glide(T5, 0.35, 1.3, -0.5); gloop(T5, 0.5, 0.8, 0.5);
548
+ for (let i = 0; i < 13; i += 2) inflate(T5 + 0.25 + i * 0.04, PENT[Math.min(7, i / 2 + 1)], 1, -0.5 + i * 0.08);
549
+ // "→ better guesses" glides up (13.7..14.1): the takeaway resolves on the tonic
550
+ const TAKE = T5 + 0.8;
551
+ glide(TAKE, 0.4, 1, 0);
552
+ ['A4', 'D5'].forEach((n, i) => tap(TAKE + 0.1 + i * 0.12, n, 1));
553
+ k.tone(TAKE + 0.22, { f: 'D3', type: 'triangle', dur: 1.3, gain: 0.16, a: 0.02, hold: 0.3 });
554
+ }
555
+
556
+ registerStyle({
557
+ id: 'y2k-chrome',
558
+ name: 'Y2K Liquid Chrome',
559
+ category: 'Retro UI & Neon',
560
+ description: 'Millennium-futurist liquid chrome: environment-mapped metaball blobs and inflated chrome bubble letters with thin-film iridescence, soap bubbles, starburst glints and frosted pill UI in silver, ice-blue and lilac.',
561
+ motion: 'Mercury droplets fly in, overshoot and merge into one blob, chrome letters inflate one by one with a springy pop, frosted pills glide up, and reflections, bubbles and glints keep sliding and twinkling.',
562
+ fonts: ['700 190px "Fredoka"', '700 15px "Space Grotesk"', '500 13px "Orbitron"', '700 30px "Space Grotesk"', '700 132px "Fredoka"'],
563
+ frameT: 5.2,
564
+ duration: 5.5,
565
+ explainerDuration: 15,
566
+ explainerNote: 'A glossy millennium interface explains it: the model is a living mercury blob that liquid-morphs to a new spot at every scene change while frosted-glass panels swoosh in and out, arrows are iridescent ribbons, labels are glossy pills, and the counter and 97% are inflated chrome bubble digits.',
567
+ explainer(ctx, W, H_, t) { explainY2K(ctx, W, H_, t); },
568
+ explainerSound(k) { y2kSound(k); },
569
+ readsPixels: true,
570
+ draw(ctx, W, H_, t) {
571
+ // background: pearly silver to ice blue to lilac
572
+ const bg = ctx.createLinearGradient(0, 0, W * 0.4, H_);
573
+ bg.addColorStop(0, '#eef3ff'); bg.addColorStop(0.45, '#cfdcff'); bg.addColorStop(1, '#c6b6f4');
574
+ ctx.fillStyle = bg; ctx.fillRect(0, 0, W, H_);
575
+ const glow = (x, y, r, col) => { const g = ctx.createRadialGradient(x, y, 0, x, y, r); g.addColorStop(0, col); g.addColorStop(1, 'rgba(255,255,255,0)'); ctx.fillStyle = g; ctx.fillRect(x - r, y - r, r * 2, r * 2); };
576
+ glow(980, 300, 420, 'rgba(255,255,255,0.75)');
577
+ glow(200, 640, 380, 'rgba(190,160,255,0.45)');
578
+ glow(160, 90, 300, 'rgba(160,230,255,0.5)');
579
+ // concentric orbit rings + fine grid (tech wallpaper)
580
+ ctx.save();
581
+ ctx.strokeStyle = 'rgba(255,255,255,0.55)'; ctx.lineWidth = 1;
582
+ for (let k = 0; k < 6; k++) { const rp = H.ease.out(H.clamp((t - k * 0.08) / 1.2)); if (rp <= 0) continue; ctx.globalAlpha = rp; ctx.beginPath(); ctx.ellipse(930, 330, (230 + k * 70) * (0.6 + 0.4 * rp), (90 + k * 28) * (0.6 + 0.4 * rp), -0.25 + Math.sin(t * 0.4) * 0.03, 0, 7); ctx.stroke(); }
583
+ ctx.globalAlpha = 1;
584
+ ctx.strokeStyle = 'rgba(120,110,200,0.08)';
585
+ for (let x = 0; x < W; x += 32) { ctx.beginPath(); ctx.moveTo(x, 0); ctx.lineTo(x, H_); ctx.stroke(); }
586
+ for (let y = 0; y < H_; y += 32) { ctx.beginPath(); ctx.moveTo(0, y); ctx.lineTo(W, y); ctx.stroke(); }
587
+ ctx.restore();
588
+
589
+ // liquid chrome blob cluster (mercury): droplets fly in, overshoot and merge
590
+ const E = H.ease, cl = H.clamp;
591
+ ENVX = Math.sin(t * 0.7) * 0.18; IRIP = t * 0.06; ENVH = -0.1; ENVS = 0;
592
+ const ph = t * 0.6;
593
+ const arrive = (i, t0, dx, dy) => { const p = cl((t - t0) / 0.9); const e = E.back(p); return [dx * (1 - e), dy * (1 - e), cl(p * 2.2)]; };
594
+ const BL = [
595
+ [960 + Math.cos(ph) * 10, 320 + Math.sin(ph * 1.3) * 8, 118, 0.2, 0, 260],
596
+ [1112 + Math.cos(ph + 2) * 14, 196 + Math.sin(ph + 1) * 12, 64, 0.45, 260, -220],
597
+ [826 + Math.cos(ph + 4) * 12, 452 + Math.sin(ph + 2) * 10, 66, 0.6, -300, 160],
598
+ [1118 + Math.sin(ph) * 8, 470 + Math.cos(ph) * 10, 46, 0.75, 240, 240],
599
+ [1196, 330 + Math.sin(ph * 0.8) * 20, 28, 0.9, 260, 0],
600
+ [800 + Math.sin(ph * 1.2) * 10, 236, 26, 1.0, -220, -200],
601
+ ];
602
+ const balls = BL.map(([x, y, r, t0, dx, dy], i) => { const [ox, oy, k] = arrive(i, t0, dx, dy); return [x + ox, y + oy, r * k]; }).filter((b) => b[2] > 1);
603
+ const bk = cl((t - 0.2) / 1.0);
604
+ ctx.save(); ctx.filter = 'blur(26px)'; ctx.fillStyle = `rgba(90,60,170,${0.28 * bk})`;
605
+ ctx.beginPath(); ctx.ellipse(950, 590, 60 + 200 * bk, 14 + 26 * bk, 0, 0, 7); ctx.fill(); ctx.restore();
606
+ if (balls.length) metaBlob(ctx, balls, 650, 110, 590, 450);
607
+ const drops = [[1195, 140, 22, 1.25, 120, -120], [690, 560, 26, 1.35, -160, 120], [1210, 560, 16, 1.45, 120, 120]].map(([x, y, r, t0, dx, dy]) => { const [ox, oy, k] = arrive(0, t0, dx, dy); return [x + ox, y + oy, r * k]; }).filter((b) => b[2] > 1);
608
+ if (drops.length) metaBlob(ctx, drops, 640, 100, 600, 500);
609
+
610
+ // iridescent soap bubbles: pop into being, then drift up
611
+ const bub = (x, y, r, rot, t0, sp) => { const p = cl((t - t0) / 0.5); if (p <= 0) return; iriBubble(ctx, x + Math.sin(t * 0.9 + rot) * 6, y - (t - t0) * sp, r * E.back(p), rot + t * 0.4); };
612
+ bub(600, 168, 62, 0.4, 0.5, 9);
613
+ bub(1180, 660, 46, 2.0, 0.9, 11);
614
+ bub(470, 630, 30, 4.1, 1.2, 14);
615
+ bub(690, 84, 22, 1.2, 1.5, 7);
616
+ bub(80, 490, 40, 3.0, 0.7, 10);
617
+
618
+ // chrome bubble lettering: each letter inflates with a springy overshoot
619
+ const T_TX = 1.6;
620
+ bubbleText(ctx, 'AI 2000', 392, 398, '700 160px "Fredoka"', 7, 7, W, H_, (i) => E.back(cl((t - T_TX - i * 0.11) / 0.45)));
621
+
622
+ // small label types on
623
+ ctx.save();
624
+ ctx.font = '500 13px "Orbitron"'; ctx.letterSpacing = '6px'; ctx.fillStyle = 'rgba(60,55,140,0.85)';
625
+ const LAB = 'NEXT-GEN INTELLIGENCE';
626
+ ctx.fillText(LAB.slice(0, cl(Math.floor((t - 2.5) / 0.025), 0, LAB.length)), 112, 214);
627
+ const ul = E.out(cl((t - 2.4) / 0.5));
628
+ ctx.fillRect(112, 224, 36 * ul, 2); ctx.fillStyle = 'rgba(255,255,255,0.9)'; ctx.fillRect(152, 224, 170 * ul, 1);
629
+ ctx.restore();
630
+
631
+ // frosted UI pills glide up into place
632
+ const snap = H.layer(W, H_); snap.getContext('2d').drawImage(ctx.canvas, 0, 0, W, H_);
633
+ const pill = (t0, x, y, w, h, label, icon) => { const p = cl((t - t0) / 0.55); if (p <= 0) return; ctx.save(); ctx.globalAlpha = E.out(p); frostedPill(ctx, snap, x, y + 26 * (1 - E.out(p)), w, h, label, icon); ctx.restore(); };
634
+ const Q = 'ask me anything';
635
+ const typed = Q.slice(0, cl(Math.floor((t - 3.2) / 0.04), 0, Q.length)) + (Math.floor(t * 2.5) % 2 ? '_' : ' ');
636
+ pill(2.7, 112, 468, 370, 54, typed, orbIcon);
637
+ pill(2.85, 498, 468, 150, 54, 'LAUNCH', playIcon);
638
+ pill(2.3, 980, 46, 196, 40, 'v2.0 online', (c, x, y) => { c.fillStyle = '#41e0a0'; c.beginPath(); c.arc(x, y, 6, 0, 7); c.fill(); c.strokeStyle = `rgba(65,224,160,${0.25 + 0.25 * Math.sin(t * 5)})`; c.lineWidth = 4; c.beginPath(); c.arc(x, y, 10 + 2 * Math.sin(t * 5), 0, 7); c.stroke(); });
639
+ // loading bar pill
640
+ const lp = cl((t - 3.0) / 0.5);
641
+ if (lp > 0) {
642
+ ctx.save(); ctx.globalAlpha = E.out(lp);
643
+ const lx = 112, ly = 540, lw = 300, lh = 14;
644
+ ctx.beginPath(); ctx.roundRect(lx, ly, lw, lh, 7); ctx.fillStyle = 'rgba(255,255,255,0.45)'; ctx.fill(); ctx.strokeStyle = 'rgba(255,255,255,0.95)'; ctx.stroke();
645
+ const pr = 0.02 + 0.84 * E.inOut(cl((t - 3.1) / 2.4));
646
+ const lg = ctx.createLinearGradient(lx, 0, lx + lw * pr, 0); lg.addColorStop(0, '#9ff0ff'); lg.addColorStop(0.6, '#b9a2ff'); lg.addColorStop(1, '#ff9be3');
647
+ ctx.beginPath(); ctx.roundRect(lx + 2, ly + 2, (lw - 4) * pr, lh - 4, 5); ctx.fillStyle = lg; ctx.fill();
648
+ ctx.font = '500 11px "Orbitron"'; ctx.letterSpacing = '3px'; ctx.fillStyle = 'rgba(50,45,120,0.8)';
649
+ ctx.fillText('LOADING FUTURE ' + Math.round(pr * 100) + '%', lx + lw + 16, ly + 11);
650
+ ctx.restore();
651
+ }
652
+
653
+ // starburst glints
654
+ const on = (k, t0) => H.ease.back(H.clamp((t - t0) / 0.35));
655
+ const tw = (k) => (0.6 + 0.4 * Math.sin(t * 3 + k)) * on(k, [2.0, 2.2, 2.4, 2.6, 2.8][k]);
656
+ sparkle(ctx, 868, 214, 70 * tw(0), 1);
657
+ sparkle(ctx, 1052, 168, 34 * tw(1), 0.9);
658
+ sparkle(ctx, 182, 292, 52 * tw(2), 1);
659
+ sparkle(ctx, 560, 300, 30 * tw(3), 0.9);
660
+ sparkle(ctx, 300, 90, 22 * on(5, 1.0), 0.8);
661
+ sparkle(ctx, 1230, 380, 26 * tw(4), 0.8);
662
+ sparkle(ctx, 760, 620, 20 * on(6, 3.0), 0.7);
663
+ H.grain(ctx, W, H_, 0.025, 4 + Math.floor(t * 12), true);
664
+ },
665
+ });
666
+ }