@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,606 @@
1
+ {
2
+ const CREAM = '#efe3c4';
3
+
4
+ // metallic foil fill for an alpha mask
5
+ const foil = (W, HH, mask, seed, t) => {
6
+ const G = H.layer(W, HH), g = G.getContext('2d');
7
+ const lin = g.createLinearGradient(0, 0, W * 0.55, HH * 1.3);
8
+ const stops = ['#6b4a16', '#c99a3e', '#f6e2a0', '#fff6d2', '#d6a948', '#7d5719', '#b8863a', '#f3d98c', '#fff3c8', '#c08f36', '#6e4c16'];
9
+ stops.forEach((s, i) => lin.addColorStop(i / (stops.length - 1), s));
10
+ g.fillStyle = lin; g.fillRect(0, 0, W, HH);
11
+ // moving sheen band
12
+ const sx = H.lerp(-400, W + 400, H.ease.inOut(H.clamp((t - 3.1) / 1.3, 0, 1))); // one slow glint across the finished foil
13
+ const sh = g.createLinearGradient(sx - 220, 0, sx + 220, HH * 0.4);
14
+ sh.addColorStop(0, 'rgba(255,248,220,0)'); sh.addColorStop(0.5, 'rgba(255,248,220,0.45)'); sh.addColorStop(1, 'rgba(255,248,220,0)');
15
+ g.fillStyle = sh; g.fillRect(0, 0, W, HH);
16
+ // brushed micro-texture
17
+ const img = g.getImageData(0, 0, W, HH), d = img.data, r = H.rng(seed), nz = H.makeNoise(seed);
18
+ const rowN = new Float32Array(HH); for (let y = 0; y < HH; y++) rowN[y] = nz.n2(0.5, y * 0.35) * 0.06;
19
+ for (let i = 0, p = 0; i < d.length; i += 4, p++) {
20
+ const y = (p / W) | 0; const s = 1 + rowN[y] + (r() - 0.5) * 0.09;
21
+ d[i] *= s; d[i + 1] *= s; d[i + 2] *= s;
22
+ }
23
+ g.putImageData(img, 0, 0);
24
+ g.globalCompositeOperation = 'destination-in'; g.drawImage(mask, 0, 0);
25
+ return G;
26
+ };
27
+
28
+ // ===================== EXPLAINER: "How does AI learn?" =====================
29
+ // A gilded picture-palace sequence: scenes change behind closing/opening gold elevator doors, arrows are
30
+ // stepped deco chevron arrows, numbers roll on an odometer, the key result gets a beacon glint.
31
+ let FOILBASE = null;
32
+ const exGild = (ctx, W, HH, mask, sheen) => {
33
+ if (!FOILBASE) { FOILBASE = foil(W, HH, (() => { const m = H.layer(W, HH); m.getContext('2d').fillRect(0, 0, W, HH); return m; })(), 6, -99); }
34
+ const G = H.layer(W, HH), g = G.getContext('2d');
35
+ g.drawImage(FOILBASE, 0, 0);
36
+ if (sheen > -1 && sheen < 2) { const sx = H.lerp(-400, W + 400, sheen), sh = g.createLinearGradient(sx - 220, 0, sx + 220, HH * 0.4); sh.addColorStop(0, 'rgba(255,248,220,0)'); sh.addColorStop(0.5, 'rgba(255,248,220,0.5)'); sh.addColorStop(1, 'rgba(255,248,220,0)'); g.fillStyle = sh; g.fillRect(0, 0, W, HH); }
37
+ g.globalCompositeOperation = 'destination-in'; g.drawImage(mask, 0, 0);
38
+ const tint = (col) => { const T = H.layer(W, HH), tc = T.getContext('2d'); tc.drawImage(mask, 0, 0); tc.globalCompositeOperation = 'source-in'; tc.fillStyle = col; tc.fillRect(0, 0, W, HH); return T; };
39
+ ctx.drawImage(tint('rgba(0,0,0,0.85)'), 1.5, 2);
40
+ ctx.drawImage(G, 0, 0);
41
+ ctx.save(); ctx.globalCompositeOperation = 'screen'; ctx.globalAlpha = 0.3; ctx.drawImage(tint('#fff4cf'), -0.8, -0.8); ctx.restore();
42
+ };
43
+ const decoArrow = (m, x0, y0, x1, y1, p, k0 = 1) => { // shaft + stacked chevrons for a head
44
+ if (p <= 0) return; const a = Math.atan2(y1 - y0, x1 - x0), l = Math.hypot(x1 - x0, y1 - y0) * p;
45
+ m.save(); m.translate(x0, y0); m.rotate(a); m.fillRect(0, -2 * k0, Math.max(0, l - 18 * k0), 4 * k0);
46
+ m.lineWidth = 3 * k0; for (let k = 0; k < 3; k++) { const x = l - k * 9 * k0; if (x < 0) continue; m.beginPath(); m.moveTo(x - 14 * k0, -12 * k0); m.lineTo(x, 0); m.lineTo(x - 14 * k0, 12 * k0); m.stroke(); }
47
+ m.restore();
48
+ };
49
+ const cameo = (m, kind, x, y, r) => { // octagonal gold frame with a line-drawn animal
50
+ m.save(); m.translate(x, y); m.lineWidth = 3;
51
+ m.beginPath(); for (let i = 0; i < 8; i++) { const a = Math.PI / 8 + i * Math.PI / 4; m.lineTo(Math.cos(a) * r, Math.sin(a) * r); } m.closePath(); m.stroke();
52
+ m.lineWidth = 1.2; m.beginPath(); for (let i = 0; i < 8; i++) { const a = Math.PI / 8 + i * Math.PI / 4; m.lineTo(Math.cos(a) * r * 0.86, Math.sin(a) * r * 0.86); } m.closePath(); m.stroke();
53
+ const s = r * 0.62; m.lineWidth = Math.max(1.5, r * 0.06); m.lineJoin = 'miter';
54
+ if (kind === 'cat') {
55
+ m.beginPath(); m.moveTo(-s * 0.55, -s * 0.05); m.lineTo(-s * 0.5, -s * 0.75); m.lineTo(-s * 0.15, -s * 0.42); m.lineTo(s * 0.15, -s * 0.42); m.lineTo(s * 0.5, -s * 0.75); m.lineTo(s * 0.55, -s * 0.05); m.quadraticCurveTo(s * 0.5, s * 0.6, 0, s * 0.62); m.quadraticCurveTo(-s * 0.5, s * 0.6, -s * 0.55, -s * 0.05); m.stroke();
56
+ m.beginPath(); m.moveTo(-s * 0.3, -s * 0.05); m.lineTo(-s * 0.12, -s * 0.12); m.moveTo(s * 0.3, -s * 0.05); m.lineTo(s * 0.12, -s * 0.12); m.stroke();
57
+ for (const sd of [-1, 1]) for (let k = 0; k < 3; k++) { m.beginPath(); m.moveTo(sd * s * 0.12, s * 0.22 + k * s * 0.07); m.lineTo(sd * s * 0.7, s * 0.12 + k * s * 0.12); m.stroke(); }
58
+ } else {
59
+ m.beginPath(); m.arc(0, s * 0.05, s * 0.5, Math.PI * 1.1, Math.PI * 1.9); m.stroke();
60
+ m.beginPath(); m.moveTo(-s * 0.42, -s * 0.2); m.lineTo(-s * 0.72, s * 0.3); m.lineTo(-s * 0.5, s * 0.42); m.lineTo(-s * 0.4, s * 0.1); m.stroke();
61
+ m.beginPath(); m.moveTo(s * 0.42, -s * 0.2); m.lineTo(s * 0.72, s * 0.3); m.lineTo(s * 0.5, s * 0.42); m.lineTo(s * 0.4, s * 0.1); m.stroke();
62
+ m.beginPath(); m.moveTo(-s * 0.4, s * 0.1); m.quadraticCurveTo(-s * 0.35, s * 0.62, 0, s * 0.65); m.quadraticCurveTo(s * 0.35, s * 0.62, s * 0.4, s * 0.1); m.stroke();
63
+ m.beginPath(); m.arc(0, s * 0.3, s * 0.12, 0, 7); m.fill();
64
+ m.beginPath(); m.arc(-s * 0.18, -s * 0.02, s * 0.06, 0, 7); m.arc(s * 0.18, -s * 0.02, s * 0.06, 0, 7); m.fill();
65
+ }
66
+ m.restore();
67
+ };
68
+ const plaque = (ctx, txt, x, y, size, p = 1, font = 'Poiret One', col = CREAM, back = font === 'Poiret One', ls = 0.18) => { // cream lettering on a black plaque with gold rule
69
+ if (p <= 0) return; ctx.save(); ctx.globalAlpha = p; ctx.font = `400 ${size}px "${font}"`; ctx.letterSpacing = (size * ls).toFixed(1) + 'px'; ctx.textAlign = 'center'; ctx.textBaseline = 'middle';
70
+ if (back) { // black lacquer plaque, double gold hairline, tiny diamond studs at the ends
71
+ const w = ctx.measureText(txt).width - size * ls, bw = w + size * 1.15, bh = size * 1.25, x0 = Math.round(x - bw / 2) + 0.5, y0 = Math.round(y - bh / 2) + 0.5;
72
+ ctx.fillStyle = 'rgba(0,0,0,0.55)'; ctx.fillRect(x0 + 1.5, y0 + 2.5, bw, bh);
73
+ const g = ctx.createLinearGradient(0, y0, 0, y0 + bh); g.addColorStop(0, '#1a140c'); g.addColorStop(0.5, '#0d0a06'); g.addColorStop(1, '#070504'); ctx.fillStyle = g; ctx.fillRect(x0, y0, bw, bh);
74
+ ctx.strokeStyle = '#d9ab52'; ctx.lineWidth = 1; ctx.strokeRect(x0, y0, bw, bh);
75
+ ctx.strokeStyle = 'rgba(201,154,62,0.55)'; ctx.strokeRect(x0 + 3, y0 + 3, bw - 6, bh - 6);
76
+ ctx.fillStyle = '#e2b860'; for (const ex of [x0, x0 + bw]) { ctx.beginPath(); ctx.moveTo(ex - 4, y0 + bh / 2); ctx.lineTo(ex, y0 + bh / 2 - 4); ctx.lineTo(ex + 4, y0 + bh / 2); ctx.lineTo(ex, y0 + bh / 2 + 4); ctx.closePath(); ctx.fill(); }
77
+ }
78
+ const tx = x + size * ls / 2, ty = y + 1;
79
+ if (font === 'Poiret One') { ctx.strokeStyle = col; ctx.lineWidth = size * 0.035; ctx.lineJoin = 'round'; ctx.strokeText(txt, tx, ty); }
80
+ ctx.fillStyle = col; ctx.fillText(txt, tx, ty); ctx.restore(); ctx.letterSpacing = '0px';
81
+ };
82
+ // the deco border of the hero still (stepped double frame + quarter-fan corners), built once as a mask layer
83
+ let BORDER = null;
84
+ const decoBorder = (W, HH) => {
85
+ if (BORDER && BORDER.width === W && BORDER.height === HH) return BORDER;
86
+ BORDER = H.layer(W, HH); const m = BORDER.getContext('2d'); m.fillStyle = m.strokeStyle = '#fff';
87
+ const frame = (ins, lw) => {
88
+ const s = 34; m.lineWidth = lw; m.beginPath();
89
+ m.moveTo(ins + s, ins); m.lineTo(W - ins - s, ins); m.lineTo(W - ins - s, ins + s * 0.4); m.lineTo(W - ins - s * 0.4, ins + s * 0.4); m.lineTo(W - ins - s * 0.4, ins + s); m.lineTo(W - ins, ins + s);
90
+ m.lineTo(W - ins, HH - ins - s); m.lineTo(W - ins - s * 0.4, HH - ins - s); m.lineTo(W - ins - s * 0.4, HH - ins - s * 0.4); m.lineTo(W - ins - s, HH - ins - s * 0.4); m.lineTo(W - ins - s, HH - ins);
91
+ m.lineTo(ins + s, HH - ins); m.lineTo(ins + s, HH - ins - s * 0.4); m.lineTo(ins + s * 0.4, HH - ins - s * 0.4); m.lineTo(ins + s * 0.4, HH - ins - s); m.lineTo(ins, HH - ins - s);
92
+ m.lineTo(ins, ins + s); m.lineTo(ins + s * 0.4, ins + s); m.lineTo(ins + s * 0.4, ins + s * 0.4); m.lineTo(ins + s, ins + s * 0.4); m.closePath(); m.stroke();
93
+ };
94
+ frame(20, 3); frame(30, 1.2);
95
+ for (const [fx, fy, a0] of [[30, 30, 0], [W - 30, 30, Math.PI / 2], [W - 30, HH - 30, Math.PI], [30, HH - 30, Math.PI * 1.5]]) {
96
+ m.lineWidth = 1.4;
97
+ for (let k = 0; k < 3; k++) { m.beginPath(); m.arc(fx, fy, 58 + k * 12, a0 + 0.12, a0 + Math.PI / 2 - 0.12); m.stroke(); }
98
+ for (let k = 0; k < 7; k++) { const a = a0 + 0.2 + (k / 6) * (Math.PI / 2 - 0.4); m.beginPath(); m.moveTo(fx + Math.cos(a) * 58, fy + Math.sin(a) * 58); m.lineTo(fx + Math.cos(a) * 82, fy + Math.sin(a) * 82); m.stroke(); }
99
+ // small stepped diamond at the corner inside the fan
100
+ const dx = fx + Math.cos(a0 + Math.PI / 4) * 40, dy = fy + Math.sin(a0 + Math.PI / 4) * 40;
101
+ m.beginPath(); m.moveTo(dx, dy - 6); m.lineTo(dx + 6, dy); m.lineTo(dx, dy + 6); m.lineTo(dx - 6, dy); m.closePath(); m.fill();
102
+ }
103
+ // centre studs on the side rules
104
+ for (const [x, y] of [[W / 2, 20], [W / 2, HH - 20], [20, HH / 2], [W - 20, HH / 2]]) { m.beginPath(); m.moveTo(x, y - 7); m.lineTo(x + 7, y); m.lineTo(x, y + 7); m.lineTo(x - 7, y); m.closePath(); m.fill(); }
105
+ return BORDER;
106
+ };
107
+ const odoFrame = (m, x, y, digits, ch) => { const cw = ch * 0.62; m.lineWidth = 2.5; m.strokeRect(x - 8, y - 8, digits * (cw + 6) + 42, ch + 16); m.lineWidth = 1; m.strokeRect(x - 14, y - 14, digits * (cw + 6) + 54, ch + 28); };
108
+ const odometer = (ctx, n, x, y, digits, ch) => { // rolling digit wheels
109
+ const cw = ch * 0.62;
110
+ ctx.save(); ctx.font = `400 ${ch * 0.82}px "Limelight"`; ctx.textAlign = 'center'; ctx.textBaseline = 'middle';
111
+ for (let k = 0; k < digits; k++) {
112
+ const place = digits - 1 - k, v = n / Math.pow(10, place), dgt = Math.floor(v) % 10;
113
+ let off = place === 0 ? v % 1 : H.smooth(0.9, 1, (n % Math.pow(10, place)) / Math.pow(10, place));
114
+ const bx = x + k * (cw + 6) + (k >= 1 ? 16 : 0) + (k >= 4 ? 16 : 0);
115
+ if (k === 1 || k === 4) { ctx.save(); ctx.fillStyle = CREAM; ctx.font = `400 ${ch * 0.6}px "Limelight"`; ctx.textAlign = 'center'; ctx.fillText(',', bx - 11, y + ch * 0.85); ctx.restore(); }
116
+ ctx.fillStyle = '#16120c'; ctx.fillRect(bx, y, cw, ch);
117
+ ctx.save(); ctx.beginPath(); ctx.rect(bx, y, cw, ch); ctx.clip();
118
+ const lead = Math.floor(n).toString().length < digits - k && dgt === 0 && off === 0;
119
+ ctx.fillStyle = lead ? 'rgba(239,227,196,0.25)' : CREAM;
120
+ ctx.fillText(String(dgt), bx + cw / 2, y + ch / 2 - off * ch); ctx.fillText(String((dgt + 1) % 10), bx + cw / 2, y + ch / 2 + ch - off * ch);
121
+ ctx.restore();
122
+ const g = ctx.createLinearGradient(0, y, 0, y + ch); g.addColorStop(0, 'rgba(0,0,0,0.6)'); g.addColorStop(0.3, 'rgba(0,0,0,0)'); g.addColorStop(0.7, 'rgba(0,0,0,0)'); g.addColorStop(1, 'rgba(0,0,0,0.6)'); ctx.fillStyle = g; ctx.fillRect(bx, y, cw, ch);
123
+ }
124
+ ctx.restore();
125
+ };
126
+ const gaugeMask = (m, x, y, r) => { // semicircular dial: gold arc + ticks (needle drawn in cream later)
127
+ m.lineWidth = 2.5; m.beginPath(); m.arc(x, y, r, Math.PI, 0); m.stroke();
128
+ for (let k = 0; k <= 8; k++) { const a = Math.PI + k / 8 * Math.PI; m.beginPath(); m.moveTo(x + Math.cos(a) * r * 0.78, y + Math.sin(a) * r * 0.78); m.lineTo(x + Math.cos(a) * r, y + Math.sin(a) * r); m.stroke(); }
129
+ m.fillRect(x - r - 6, y, r * 2 + 12, 3);
130
+ };
131
+ // compact server ziggurat (the model) drawn into the gold mask
132
+ const miniZig = (m, ctx, cx, base, s, ledSeed) => {
133
+ const tiers = [[5, 40], [4, 36], [3, 32], [2, 30], [1, 28]], bay = 36 * s; let y = base; const leds = [];
134
+ tiers.forEach(([n, h]) => {
135
+ const w = n * bay + 10 * s, x = cx - w / 2; h *= s; y -= h;
136
+ m.globalCompositeOperation = 'destination-out'; m.fillRect(x, y, w, h + 1); m.globalCompositeOperation = 'source-over';
137
+ m.lineWidth = 2.5; m.strokeRect(x + 1, y + 1, w - 2, h - 2);
138
+ for (let b = 0; b < n; b++) { const bx = x + 5 * s + b * bay; if (b) m.fillRect(bx - 1.5, y + 3, 3, h - 6); m.lineWidth = 1; for (let u = y + 8 * s; u < y + h - 4; u += 7 * s) { m.beginPath(); m.moveTo(bx + 4, u); m.lineTo(bx + bay - 10, u); m.stroke(); leds.push([bx + bay - 6, u]); } }
139
+ m.beginPath(); m.moveTo(cx - 16 * s, y); m.lineTo(cx, y - 10 * s); m.lineTo(cx + 16 * s, y); m.closePath(); m.fill();
140
+ });
141
+ m.beginPath(); m.moveTo(cx - 8 * s, y - 6 * s); m.lineTo(cx, y - 60 * s); m.lineTo(cx + 8 * s, y - 6 * s); m.closePath(); m.fill();
142
+ return { leds, top: y - 60 * s };
143
+ };
144
+
145
+ const explainDeco = (ctx, W, HH, t) => {
146
+ const E = H.ease, cl = H.clamp, S = (a, b) => cl((t - a) / (b - a), 0, 1), CX = W / 2;
147
+ const DOORS = [5.55, 10.0, 12.5], mid = (d) => d + 0.55; // closed at mid
148
+ const scene = t < mid(DOORS[0]) ? 1 : t < mid(DOORS[1]) ? 2 : t < mid(DOORS[2]) ? 3 : 4;
149
+ const bg = ctx.createRadialGradient(CX, 420, 40, CX, 420, 820); bg.addColorStop(0, '#221a10'); bg.addColorStop(0.5, '#0f0c08'); bg.addColorStop(1, '#050403');
150
+ ctx.fillStyle = bg; ctx.fillRect(0, 0, W, HH);
151
+ const M = H.layer(W, HH), m = M.getContext('2d'); m.fillStyle = m.strokeStyle = '#fff';
152
+ const Md = H.layer(W, HH), md = Md.getContext('2d'); md.fillStyle = '#fff';
153
+ const post = []; // cream drawing after the gilding: fns(ctx)
154
+ const step = Math.floor(t * 5);
155
+ const ledsDraw = (leds, seed) => post.push(() => leds.forEach(([x, y], i) => { const r = H.rng(seed + i * 977 + step * 13); if (r() < 0.7) { ctx.fillStyle = r() < 0.25 ? '#ffcf8a' : CREAM; ctx.fillRect(x - 1.2, y - 1.2, 2.6, 2.6); } }));
156
+ const rays = (x, y, open, r0 = 120) => { md.save(); const f = md.createRadialGradient(x, y, r0, x, y, 700); f.addColorStop(0, 'rgba(255,255,255,0.5)'); f.addColorStop(1, 'rgba(255,255,255,0.03)'); md.fillStyle = f; for (let i = 0; i < 36; i++) { const a0 = Math.PI + (i / 36) * Math.PI, a1 = a0 + Math.PI / 36 * 0.42, aa = Math.PI * 1.5 + (a0 - Math.PI * 1.5) * open, ab = Math.PI * 1.5 + (a1 - Math.PI * 1.5) * open; md.beginPath(); md.moveTo(x, y); md.arc(x, y, 900, aa, ab); md.closePath(); md.fill(); } md.globalCompositeOperation = 'destination-out'; md.beginPath(); md.arc(x, y, r0, 0, 7); md.fill(); md.restore(); };
157
+
158
+ // ---------- frame border (always) ----------
159
+ m.drawImage(decoBorder(W, HH), 0, 0);
160
+
161
+ // ---------- hook: title, then it shrinks into the top plaque ----------
162
+ const hp = E.inOut(S(1.7, 2.4));
163
+ if (hp < 1) rays(CX, 470, E.inOut(S(0.0, 1.2)) * (1 - hp), 160);
164
+ {
165
+ const ty = H.lerp(360, 62, hp), sz = H.lerp(84, 30, hp);
166
+ post.push(() => {
167
+ ctx.save(); ctx.font = `400 ${sz}px "Limelight"`; ctx.textAlign = 'center'; ctx.textBaseline = 'middle'; ctx.letterSpacing = (sz * 0.08).toFixed(1) + 'px';
168
+ const title = 'HOW DOES AI LEARN?', w = ctx.measureText(title).width, x0 = CX - w / 2;
169
+ ctx.textAlign = 'left';
170
+ for (let i = 0; i < title.length; i++) { const a = cl((t - 0.3 - i * 0.05) / 0.15, 0, 1); if (a <= 0) continue; ctx.globalAlpha = a; ctx.fillStyle = CREAM; ctx.fillText(title[i], x0 + ctx.measureText(title.slice(0, i)).width, ty); }
171
+ ctx.restore(); ctx.letterSpacing = '0px';
172
+ });
173
+ const rw = H.lerp(420, 300, hp) * E.inOut(S(0.2, 1.0));
174
+ m.fillRect(CX - rw, ty + sz * 0.62, rw * 2, 2); m.fillRect(CX - rw, ty - sz * 0.72, rw * 2, 1.5);
175
+ if (hp >= 1) { m.beginPath(); m.moveTo(CX - 310, 62); m.lineTo(CX - 300, 54); m.lineTo(CX - 290, 62); m.lineTo(CX - 300, 70); m.closePath(); m.fill(); m.beginPath(); m.moveTo(CX + 310, 62); m.lineTo(CX + 300, 54); m.lineTo(CX + 290, 62); m.lineTo(CX + 300, 70); m.closePath(); m.fill(); }
176
+ }
177
+
178
+ // ---------- scene 1: data ----------
179
+ if (scene === 1 && t > 2.1) {
180
+ const zx = 1010, zb = 590, zp = E.out(S(2.1, 2.7));
181
+ rays(zx, zb, zp * 0.9, 110);
182
+ const z = miniZig(m, ctx, zx, zb + (1 - zp) * 300, 1.3, 1); ledsDraw(z.leds, 5);
183
+ // the gold rail and the cameos gliding along it
184
+ m.fillRect(60, 470, 700 * E.out(S(2.4, 2.9)), 3); m.fillRect(60, 476, 700 * E.out(S(2.4, 2.9)), 1);
185
+ decoArrow(m, 760, 470, 880, 470, E.out(S(2.9, 3.3)));
186
+ for (let i = 0; i < 10; i++) {
187
+ const u = (t - 2.6 - i * 0.38) * 0.55; if (u < 0 || u > 1) continue;
188
+ const kind = H.rng(i * 5 + 2)() < 0.5 ? 'cat' : 'dog', x = H.lerp(40, 820, u), fade = 1 - cl((u - 0.85) / 0.15, 0, 1), r = 66 * fade;
189
+ if (r < 4) continue;
190
+ cameo(m, kind, x, 390, r);
191
+ m.fillRect(x - 1, 456, 2, 14 * fade);
192
+ post.push(() => plaque(ctx, kind, x, 500, 30, fade));
193
+ }
194
+ post.push(() => plaque(ctx, 'TRAINING DATA', 410, 560, 30, S(3.2, 3.6)));
195
+ const cp = S(3.0, 5.3), n = cp < 1 ? Math.pow(cp, 3) * 1e6 : 1e6;
196
+ if (t > 2.9) { odoFrame(m, 120, 150, 7, 70); post.push(() => odometer(ctx, n, 120, 150, 7, 70)); post.push(() => plaque(ctx, 'EXAMPLES', 320, 272, 30, S(3.0, 3.3))); }
197
+ }
198
+
199
+ // ---------- scene 2: guess -> check -> adjust ----------
200
+ if (scene === 2) {
201
+ const t0 = mid(DOORS[0]) + 0.2, zx = 330, zb = 560;
202
+ rays(zx, zb, 0.85, 110);
203
+ const z = miniZig(m, ctx, zx, zb, 1.25, 2); ledsDraw(z.leds, 9);
204
+ // three weight gauges on the plinth
205
+ const adj = E.inOut(S(8.4, 9.2)), vals = [[0.2, 0.75], [0.8, 0.35], [0.45, 0.9]];
206
+ vals.forEach((_, i) => gaugeMask(m, zx - 120 + i * 120, 640, 40));
207
+ post.push(() => vals.forEach(([a, b], i) => { const v = H.lerp(a, b, adj) + (adj > 0 && adj < 1 ? Math.sin(t * 30 + i) * 0.03 : 0), x = zx - 120 + i * 120, y = 640, A = Math.PI + v * Math.PI; ctx.strokeStyle = adj > 0 && adj < 1 ? '#ffcf8a' : CREAM; ctx.lineWidth = 3; ctx.beginPath(); ctx.moveTo(x, y); ctx.lineTo(x + Math.cos(A) * 34, y + Math.sin(A) * 34); ctx.stroke(); ctx.fillStyle = CREAM; ctx.beginPath(); ctx.arc(x, y, 4, 0, 7); ctx.fill(); }));
208
+ post.push(() => plaque(ctx, 'WEIGHTS', zx, 667, 30, S(t0 + 0.3, t0 + 0.6)));
209
+ // the new picture
210
+ const cs = E.back(S(t0 + 0.1, t0 + 0.45)); cameo(m, 'cat', 700, 330, 80 * cs);
211
+ decoArrow(m, 610, 330, 460, 330, E.out(S(t0 + 0.4, t0 + 0.7)));
212
+ post.push(() => plaque(ctx, 'NEW PICTURE', 700, 440, 30, S(t0 + 0.3, t0 + 0.6)));
213
+ // guess plaque + check medallion
214
+ if (t < 9.35) {
215
+ post.push(() => plaque(ctx, 'dog?', 700, 175, 46, S(6.95, 7.2), 'Limelight'));
216
+ const xp = E.back(S(7.5, 7.75));
217
+ if (xp > 0) { m.save(); m.translate(820, 175); m.scale(xp, xp); m.lineWidth = 3; m.beginPath(); m.arc(0, 0, 26, 0, 7); m.stroke(); m.lineWidth = 5; m.beginPath(); m.moveTo(-11, -11); m.lineTo(11, 11); m.moveTo(11, -11); m.lineTo(-11, 11); m.stroke(); m.restore(); }
218
+ const sp = S(7.55, 8.0); // emphasis: a spotlight ring sweeps round the wrong guess
219
+ if (sp > 0) { m.lineWidth = 2; m.beginPath(); m.ellipse(745, 175, 140, 52, 0, -Math.PI / 2, -Math.PI / 2 + Math.PI * 2 * sp); m.stroke(); }
220
+ if (t > 7.8) post.push(() => plaque(ctx, 'WRONG — IT IS A CAT', 745, 244, 28, S(7.8, 8.0), 'Poiret One', '#ffcf8a'));
221
+ } else {
222
+ post.push(() => plaque(ctx, 'cat', 700, 175, 46, S(9.4, 9.6), 'Limelight'));
223
+ const cp = E.back(S(9.65, 9.85)); if (cp > 0) { m.save(); m.translate(790, 175); m.scale(cp, cp); m.lineWidth = 3; m.beginPath(); m.arc(0, 0, 26, 0, 7); m.stroke(); m.lineWidth = 5; m.beginPath(); m.moveTo(-12, 0); m.lineTo(-3, 10); m.lineTo(13, -10); m.stroke(); m.restore(); }
224
+ }
225
+ // error signal: a bead of light runs back along a gold line to the gauges
226
+ const ep = S(7.9, 8.45);
227
+ m.lineWidth = 1.5; if (t > 7.9 && t < 9.35) { m.beginPath(); m.moveTo(820, 205); m.quadraticCurveTo(820, 640, zx + 170, 640); m.stroke(); }
228
+ if (ep > 0 && ep < 1) post.push(() => { const u = E.inOut(ep), x = (1 - u) * (1 - u) * 820 + 2 * (1 - u) * u * 820 + u * u * (zx + 170), y = (1 - u) * (1 - u) * 205 + 2 * (1 - u) * u * 640 + u * u * 640; const g = ctx.createRadialGradient(x, y, 0, x, y, 26); g.addColorStop(0, 'rgba(255,240,200,1)'); g.addColorStop(1, 'rgba(255,200,120,0)'); ctx.fillStyle = g; ctx.fillRect(x - 26, y - 26, 52, 52); });
229
+ // loop medallions: Guess -> Check -> Adjust arranged on an arc, chevron arrows between
230
+ const MED = [['GUESS', 990, 190], ['CHECK', 1150, 370], ['ADJUST', 960, 540]], act = t < 7.45 ? 0 : t < 8.3 ? 1 : t < 9.35 ? 2 : Math.floor((t - 9.35) * 3) % 3;
231
+ MED.forEach(([s, x, y], i) => { const p = E.back(S(t0 + 0.2 + i * 0.15, t0 + 0.5 + i * 0.15)); if (p <= 0) return; m.lineWidth = i === act && t > 6.9 ? 4 : 2; m.beginPath(); m.arc(x, y, 76 * p, 0, 7); m.stroke(); m.lineWidth = 1; m.beginPath(); m.arc(x, y, 68 * p, 0, 7); m.stroke(); post.push(() => plaque(ctx, s, x, y, 28, p, 'Poiret One', i === act && t > 6.9 ? '#ffcf8a' : CREAM, false, 0.1)); });
232
+ decoArrow(m, 1050, 245, 1105, 300, E.out(S(7.2, 7.5)));
233
+ decoArrow(m, 1100, 440, 1030, 490, E.out(S(7.9, 8.2)));
234
+ decoArrow(m, 935, 465, 950, 268, E.out(S(9.0, 9.3)));
235
+ }
236
+
237
+ // ---------- scene 3: progress gauge ----------
238
+ if (scene === 3) {
239
+ const t0 = mid(DOORS[1]) + 0.2, gx = CX, gy = 530, R = 320, prog = E.inOut(S(t0 + 0.2, 12.0)), acc = H.lerp(61, 97, prog);
240
+ // sunburst gauge: rays light up to the current accuracy
241
+ const lit = (acc - 50) / 50;
242
+ for (let i = 0; i < 30; i++) { const u = (i + 0.5) / 30, a0 = Math.PI + u * Math.PI; if (u > lit) { m.globalAlpha = 0.18; } m.beginPath(); m.moveTo(gx + Math.cos(a0 - 0.03) * 168, gy + Math.sin(a0 - 0.03) * 168); m.lineTo(gx + Math.cos(a0 - 0.045) * R, gy + Math.sin(a0 - 0.045) * R); m.lineTo(gx + Math.cos(a0 + 0.045) * R, gy + Math.sin(a0 + 0.045) * R); m.lineTo(gx + Math.cos(a0 + 0.03) * 168, gy + Math.sin(a0 + 0.03) * 168); m.closePath(); m.fill(); m.globalAlpha = 1; }
243
+ m.lineWidth = 3; m.beginPath(); m.arc(gx, gy, R + 14, Math.PI, 0); m.stroke(); m.lineWidth = 1.5; m.beginPath(); m.arc(gx, gy, 156, Math.PI, 0); m.stroke();
244
+ m.fillRect(gx - R - 40, gy, (R + 40) * 2, 3);
245
+ [50, 75, 100].forEach((v) => { const a = Math.PI + (v - 50) / 50 * Math.PI, rr = v === 75 ? R + 66 : R + 62; post.push(() => plaque(ctx, v + '%', gx + Math.cos(a) * rr, gy + Math.sin(a) * rr + (v === 75 ? 0 : -30), 28)); });
246
+ post.push(() => { ctx.save(); ctx.font = '400 96px "Limelight"'; ctx.textAlign = 'center'; ctx.fillStyle = CREAM; ctx.fillText(Math.round(acc) + '%', gx, gy - 24); ctx.restore(); { // one lacquer plaque carrying the three caption lines
247
+ const bw = 470, bx = Math.round(gx - bw / 2) + 0.5, by = gy + 12.5, bh = 136; ctx.save(); ctx.fillStyle = 'rgba(0,0,0,0.55)'; ctx.fillRect(bx + 1.5, by + 2.5, bw, bh);
248
+ const g = ctx.createLinearGradient(0, by, 0, by + bh); g.addColorStop(0, '#1a140c'); g.addColorStop(0.5, '#0d0a06'); g.addColorStop(1, '#070504'); ctx.fillStyle = g; ctx.fillRect(bx, by, bw, bh);
249
+ ctx.strokeStyle = '#d9ab52'; ctx.lineWidth = 1; ctx.strokeRect(bx, by, bw, bh); ctx.strokeStyle = 'rgba(201,154,62,0.55)'; ctx.strokeRect(bx + 3, by + 3, bw - 6, bh - 6);
250
+ ctx.fillStyle = 'rgba(201,154,62,0.6)'; ctx.fillRect(gx - 90, gy + 54, 180, 1); ctx.restore(); }
251
+ plaque(ctx, 'ACCURACY', gx, gy + 34, 28, 1, 'Poiret One', CREAM, false); plaque(ctx, '61% → 97%', gx, gy + 76, 30, S(t0 + 0.3, t0 + 0.6), 'Poiret One', CREAM, false); plaque(ctx, 'OVER TRAINING ROUNDS', gx, gy + 120, 28, S(t0 + 0.3, t0 + 0.6), 'Poiret One', CREAM, false); });
252
+ // emphasis: beacon flash and a ring when it reaches 97%
253
+ const fl = S(12.0, 12.4);
254
+ if (fl > 0) { m.lineWidth = 3; m.lineWidth = 4; m.beginPath(); m.arc(gx, gy, R + 34 + fl * 10, Math.PI, Math.PI + Math.PI * Math.min(1, fl * 1.5)); m.stroke();
255
+ post.push(() => { const g = ctx.createRadialGradient(gx, gy - 52, 0, gx, gy - 52, 260); g.addColorStop(0, `rgba(255,236,190,${0.45 * (1 - Math.abs(fl - 0.4))})`); g.addColorStop(1, 'rgba(255,220,150,0)'); ctx.save(); ctx.globalCompositeOperation = 'lighter'; ctx.fillStyle = g; ctx.fillRect(gx - 260, gy - 312, 520, 520); ctx.restore(); }); }
256
+ }
257
+
258
+ // ---------- scene 4: takeaway plaque ----------
259
+ if (scene === 4) {
260
+ const t0 = mid(DOORS[2]) + 0.2;
261
+ rays(CX, 640, E.inOut(S(t0, t0 + 0.8)), 140);
262
+ post.push(() => { plaque(ctx, 'MORE EXAMPLES', CX, 300, 60, S(t0, t0 + 0.3), 'Limelight'); plaque(ctx, 'BETTER GUESSES', CX, 470, 60, S(t0 + 0.35, t0 + 0.65), 'Limelight'); });
263
+ decoArrow(m, CX, 340, CX, 428, E.out(S(t0 + 0.2, t0 + 0.45)), 1.8);
264
+ const rw = 380 * E.inOut(S(t0, t0 + 0.6)); m.fillRect(CX - rw, 528, rw * 2, 2); m.fillRect(CX - rw, 240, rw * 2, 2);
265
+ }
266
+
267
+ // ---------- gild ----------
268
+ const Gd = H.layer(W, HH), gd = Gd.getContext('2d'); gd.drawImage(Md, 0, 0); gd.globalCompositeOperation = 'source-in'; gd.fillStyle = '#c08a34'; gd.fillRect(0, 0, W, HH);
269
+ ctx.save(); ctx.globalAlpha = 0.85; ctx.drawImage(Gd, 0, 0); ctx.restore();
270
+ const sheen = t < 6 ? (t - 3.4) / 1.3 : (t - 12.1) / 1.2;
271
+ exGild(ctx, W, HH, M, sheen);
272
+ post.forEach((f) => f());
273
+
274
+ // ---------- the gold elevator doors ----------
275
+ for (const d of DOORS) {
276
+ const close = E.inOut(S(d, d + 0.5)), open = E.inOut(S(d + 0.65, d + 1.15)), k = close * (1 - open); if (k <= 0) continue;
277
+ const DM = H.layer(W, HH), dm = DM.getContext('2d'); dm.fillStyle = dm.strokeStyle = '#fff';
278
+ const wHalf = (W / 2) * k;
279
+ ctx.fillStyle = '#0d0a06'; ctx.fillRect(0, 0, wHalf, HH); ctx.fillRect(W - wHalf, 0, wHalf, HH);
280
+ for (const side of [-1, 1]) {
281
+ const ex = side < 0 ? wHalf : W - wHalf; // leading edge
282
+ const px = side < 0 ? ex - W / 2 : ex; // panel left
283
+ dm.save(); dm.beginPath(); dm.rect(side < 0 ? 0 : W - wHalf, 0, wHalf, HH); dm.clip();
284
+ dm.lineWidth = 3; dm.strokeRect(px + 20, 20, W / 2 - 40, HH - 40); dm.lineWidth = 1.2; dm.strokeRect(px + 32, 32, W / 2 - 64, HH - 64);
285
+ const fx = side < 0 ? px + W / 2 - 32 : px + 32; // fan anchored at the meeting edge
286
+ for (let i = 0; i < 9; i++) { const a = (side < 0 ? Math.PI / 2 : -Math.PI / 2) + (i + 0.5) / 9 * Math.PI; dm.beginPath(); dm.moveTo(fx, HH / 2); dm.lineTo(fx + Math.cos(a - 0.05) * 230, HH / 2 + Math.sin(a - 0.05) * 230); dm.lineTo(fx + Math.cos(a + 0.05) * 230, HH / 2 + Math.sin(a + 0.05) * 230); dm.closePath(); dm.fill(); }
287
+ dm.lineWidth = 2; for (let k2 = 0; k2 < 3; k2++) { dm.beginPath(); dm.arc(fx, HH / 2, 250 + k2 * 16, side < 0 ? Math.PI / 2 : -Math.PI / 2, side < 0 ? Math.PI * 1.5 : Math.PI / 2); dm.stroke(); }
288
+ for (let k2 = 0; k2 < 6; k2++) { const yy = 70 + k2 * 18; dm.beginPath(); dm.moveTo(px + W / 4 - 60, yy + 14); dm.lineTo(px + W / 4, yy); dm.lineTo(px + W / 4 + 60, yy + 14); dm.stroke(); const y2 = HH - 70 - k2 * 18; dm.beginPath(); dm.moveTo(px + W / 4 - 60, y2 - 14); dm.lineTo(px + W / 4, y2); dm.lineTo(px + W / 4 + 60, y2 - 14); dm.stroke(); }
289
+ dm.restore();
290
+ }
291
+ exGild(ctx, W, HH, DM, -5);
292
+ }
293
+ H.grain(ctx, W, HH, 0.035, 3 + Math.floor(t * 12), true);
294
+ H.vignette(ctx, W, HH, 0.45);
295
+ };
296
+
297
+ registerStyle({
298
+ id: 'art-deco',
299
+ name: 'Art Deco Foil',
300
+ category: 'Art & Design Movements',
301
+ description: 'A 1920s Art Deco poster in black lacquer and stamped gold foil: a symmetrical stepped ziggurat skyscraper built from server racks, sunburst fans radiating behind it, a stepped geometric border, and Limelight / Poiret One lettering with cream accents.',
302
+ motion: 'Like a gilded title sequence: the stepped border inscribes itself, the server ziggurat rises floor by floor with its LEDs waking, halo arcs close symmetrically and the sunburst fans open, the spire extends and its beacon ignites, the title is foil-stamped letter by letter, then one slow glint sweeps across the gold.',
303
+ fonts: ['400 76px "Limelight"', '400 30px "Poiret One"', '400 16px "Poiret One"'],
304
+ frameT: 4.7,
305
+ duration: 5,
306
+ readsPixels: true,
307
+ explainerDuration: 14.5,
308
+ explainerNote: 'A gilded picture-palace sequence: scenes change behind closing and opening gold elevator doors, cameos glide on a gold rail with cream name plaques, arrows are stepped chevron arrows, numbers roll on an odometer and fill a sunburst gauge, and the key moments get a spotlight ring or a beacon glint.',
309
+ explainer(ctx, W, HH, t) { explainDeco(ctx, W, HH, t); },
310
+ // Sound: a gilded picture palace. Heavy brass elevator doors roll shut on their track with a deep clunk, the lift
311
+ // chime sounds and they roll open on the next scene; the sunbursts open on soft harp glissandi, the odometer wheels
312
+ // tick, the guess/check moments are vibraphone and a muted brass stab, and a quiet jazz-age pad sits underneath.
313
+ // Times copied from explainDeco().
314
+ explainerSound(k) {
315
+ const D = 14.5, E = H.ease, cl = H.clamp;
316
+ const S = (t, a, b) => cl((t - a) / (b - a), 0, 1);
317
+ const pan = (px) => cl((px / 1280) * 2 - 1, -1, 1) * 0.7;
318
+ const when = (a, b, ease, u) => { for (let i = 0; i <= 400; i++) if (ease(i / 400) >= u - 1e-6) return a + ((b - a) * i) / 400; return b; };
319
+ const backLand = (a, b) => a + (b - a) * 0.37; // back ease first reaches full size at 37%
320
+ const DOORS = [5.55, 10.0, 12.5], mid = (d) => d + 0.55;
321
+ const HARP = ['C4', 'D4', 'E4', 'G4', 'A4', 'C5', 'D5', 'E5', 'G5', 'A5'];
322
+ // harp pluck: soft triangle with a quick decay
323
+ const pluck = (t, n, g, p, minor = true) => { const f = k.hz(n);
324
+ k.tone(t, { f, type: 'triangle', dur: 0.9, gain: 0.14 * g, a: 0.002, filter: 'lowpass', f2: 2200, pan: p, verb: 0.3, minor });
325
+ k.tone(t, { f: f * 2, dur: 0.25, gain: 0.028 * g, a: 0.002, pan: p, minor }); };
326
+ const gliss = (t0, t1, notes, g, p) => notes.forEach((n, i) => pluck(t0 + ((t1 - t0) * i) / Math.max(1, notes.length - 1), n, g, p));
327
+ // vibraphone: sine with a slow shimmer, low register only
328
+ const vibe = (t, n, g, p, minor) => { const f = k.hz(n);
329
+ k.tone(t, { f, dur: 1.4, gain: 0.13 * g, a: 0.004, pan: p, verb: 0.35, minor });
330
+ k.tone(t, { f: f * 1.003, dur: 1.2, gain: 0.07 * g, a: 0.004, pan: p, minor });
331
+ k.tone(t, { f: f * 4, dur: 0.12, gain: 0.015 * g, a: 0.002, pan: p, minor }); };
332
+ // muted brass stab
333
+ const brass = (t, notes, dur, g, p) => notes.forEach((n, i) => { for (const det of [-6, 6])
334
+ k.tone(t, { f: n, type: 'sawtooth', detune: det, dur, gain: 0.03 * g, a: 0.015, hold: dur * 0.5, filter: 'lowpass', f2: [[0, 500], [0.05, 1600], [dur, 600]], q: 1.2, pan: p + (i - 1) * 0.15, verb: 0.3 }); });
335
+ // odometer wheel tick
336
+ const odo = (t, g, p) => k.withMinor(() => { k.noise(t, { dur: 0.02, filter: 'bandpass', f: 2400, q: 2, gain: 0.24 * g, a: 0.001, pan: p }); k.tone(t, { f: 420, type: 'triangle', dur: 0.03, gain: 0.05 * g, pan: p }); });
337
+ // the elevator doors: roll shut on the track (inOut d..d+0.5), clunk, chime, roll open (d+0.65..d+1.15)
338
+ const roll = (t, dur, g) => {
339
+ k.noise(t, { dur, color: 'brown', filter: 'lowpass', f: [[0, 200], [dur * 0.5, 600], [dur, 250]], gain: 0.4 * g, a: dur * 0.4 });
340
+ for (let x = 0.06; x < dur - 0.05; x += 0.055) k.noise(t + x, { dur: 0.03, filter: 'bandpass', f: 700, q: 3, gain: 0.06 * g * Math.sin((x / dur) * Math.PI), a: 0.002, minor: true });
341
+ };
342
+ const doors = (d) => {
343
+ roll(d, 0.5, 1);
344
+ k.play('thud', d + 0.5, { f: 85, gain: 0.45 });
345
+ k.play('tock', d + 0.5, { f: 260, gain: 0.3 });
346
+ k.tone(d + 0.5, { f: 340, dur: 0.5, gain: 0.04, a: 0.003, verb: 0.3 }); k.tone(d + 0.5, { f: 523, dur: 0.35, gain: 0.025, a: 0.003 });
347
+ k.play('ding', d + 0.65, { f: 'E5', gain: 0.6 }); // the lift chime
348
+ roll(d + 0.65, 0.5, 0.8);
349
+ };
350
+
351
+ k.bed('room', 0, D, { gain: 0.35 });
352
+ k.music('pad', 0, D, { bpm: 76, gain: 0.45, chords: [['C3', 'E3', 'G3', 'B3'], ['A2', 'C3', 'E3', 'G3'], ['D3', 'F3', 'A3', 'C4'], ['G2', 'B2', 'D3', 'F3']] });
353
+
354
+ // ---- hook: sunburst opens (inOut 0-1.2) as the title fades in letter by letter (0.3 + i*0.05)
355
+ gliss(when(0, 1.2, E.inOut, 0.08), when(0, 1.2, E.inOut, 0.92), HARP, 0.9, 0);
356
+ vibe(1.25, 'C4', 0.6, 0, true); vibe(1.25, 'G4', 0.5, 0, true); // title complete
357
+ // title glides up into the top plaque (1.7-2.4): a soft slide
358
+ k.noise(1.7, { dur: 0.7, color: 'pink', filter: 'bandpass', f: [[0, 400], [0.7, 900]], q: 0.7, gain: 0.06, a: 0.3, minor: true });
359
+
360
+ // ---- scene 1: DATA
361
+ k.noise(2.1, { dur: 0.6, color: 'brown', filter: 'lowpass', f: [[0, 150], [0.6, 450]], gain: 0.25, a: 0.25, pan: pan(1010), minor: true }); // ziggurat rises
362
+ gliss(2.15, 2.6, ['G3', 'C4', 'D4', 'G4'], 0.6, pan(1010));
363
+ k.play('thud', when(2.1, 2.7, E.out, 0.95), { f: 90, gain: 0.35, pan: pan(1010), minor: true });
364
+ k.noise(2.4, { dur: 0.5, color: 'pink', filter: 'bandpass', f: [[0, 1200], [0.5, 1800]], q: 2, gain: 0.05, a: 0.1, pan: pan(400), minor: true }); // gold rail runs out
365
+ k.play('tock', 2.9, { f: 300, gain: 0.4, pan: pan(320), minor: true }); // odometer frame set
366
+ const chev = when(2.9, 3.3, E.out, 0.95); k.play('click', chev, { f: 900, gain: 0.8, pan: pan(880), minor: true }); // chevron arrow lands
367
+ // cameos arrive on the rail at 2.6 + 0.38 i: a soft felt tap each
368
+ const cams = []; for (let i = 0; 2.6 + i * 0.38 < mid(DOORS[0]) - 0.2; i++) cams.push(2.6 + i * 0.38);
369
+ cams.forEach((tc) => k.noise(tc, { dur: 0.05, color: 'pink', filter: 'bandpass', f: 900, q: 1, gain: 0.24, a: 0.003, pan: pan(40), minor: true }));
370
+ // odometer n = S(3.0,5.3)^3 * 1e6: wheel ticks speeding up, off the cameo taps
371
+ for (let t = 3.08; t < 5.24; ) { const s = S(t, 3.0, 5.3); if (![...cams, chev].some((c) => t > c - 0.06 && t < c + 0.08)) odo(t, 0.7 + 0.4 * s, pan(330)); t += 0.16 - 0.075 * s; }
372
+ k.play('tock', 5.3, { f: 280, gain: 0.6, pan: pan(330) }); vibe(5.31, 'G4', 0.8, pan(330)); // 1,000,000 locks
373
+
374
+ // ---- the elevator doors between scenes
375
+ DOORS.forEach(doors);
376
+
377
+ // ---- scene 2: GUESS / CHECK / ADJUST (t0 = 6.3)
378
+ const t0 = mid(DOORS[0]) + 0.2;
379
+ pluck(backLand(t0 + 0.1, t0 + 0.45), 'E4', 0.8, pan(700)); // cat cameo
380
+ [0, 1, 2].forEach((i) => pluck(backLand(t0 + 0.2 + i * 0.15, t0 + 0.5 + i * 0.15), ['G4', 'A4', 'C5'][i], 0.6, pan([990, 1150, 960][i]))); // medallions
381
+ // the guess: "dog?" fades up (6.95-7.2) on a questioning vibe pair
382
+ vibe(7.0, 'D4', 0.8, pan(700)); vibe(7.12, 'A4', 0.6, pan(700));
383
+ // CHECK: the X medallion snaps on (back 7.5-7.75) — muted brass stab, wrong
384
+ brass(backLand(7.5, 7.75), ['C3', 'Gb3', 'Bb3'], 0.45, 1.2, pan(820));
385
+ k.play('thud', backLand(7.5, 7.75), { f: 100, gain: 0.5, pan: pan(820) });
386
+ k.noise(7.6, { dur: 0.42, color: 'pink', filter: 'bandpass', f: [[0, 700], [0.2, 1500], [0.42, 800]], q: 1.2, gain: 0.06, a: 0.08, pan: pan(745), minor: true }); // spotlight ring sweeps round
387
+ // error bead runs back along the gold line (inOut 7.9-8.45): a soft falling glide
388
+ k.tone(7.92, { f: [[0, 620], [0.5, 260]], type: 'triangle', dur: 0.55, gain: 0.05, a: 0.15, filter: 'lowpass', f2: 1200, pan: pan(600) });
389
+ // weight gauges re-set (inOut 8.4-9.2): needle detents, at least 90 ms apart
390
+ for (let i = 1, lt = 0; i <= 8; i++) { const t = when(8.4, 9.2, E.inOut, i / 8); if (t - lt < 0.09) continue; lt = t; odo(t, 1, pan(330)); }
391
+ // the correction: "cat" fades up (9.4-9.6), the check medallion snaps on (back 9.65-9.85)
392
+ pluck(9.45, 'C4', 0.6, pan(700));
393
+ ['C4', 'E4', 'G4', 'C5'].forEach((n, i) => vibe(backLand(9.65, 9.85) + i * 0.06, n, 0.8, pan(790)));
394
+
395
+ // ---- scene 3: PROGRESS (t0 = 10.75): sunburst rays light one by one as accuracy rises (inOut 10.95-12.0)
396
+ const t3 = mid(DOORS[1]) + 0.2;
397
+ for (let i = 0, lt = 0; i < 30; i++) {
398
+ const u = (i + 0.5) / 30, acc = 50 + 50 * u; if (acc <= 61 || acc > 97) continue;
399
+ const t = when(t3 + 0.2, 12.0, E.inOut, (acc - 61) / 36); if (t - lt < 0.09) continue; lt = t;
400
+ pluck(t, HARP[Math.min(9, Math.floor((i - 6) / 2.2))], 0.6, pan(640 + Math.cos(Math.PI + u * Math.PI) * 300));
401
+ odo(t + 0.004, 0.6, pan(640));
402
+ }
403
+ // 97%: beacon flash and ring (12.0-12.4) — the biggest hit
404
+ k.play('impact', 12.0, { gain: 1.7 }); k.play('thud', 12.0, { f: 70, gain: 0.7 });
405
+ ['C3', 'G3', 'C4', 'E4', 'G4'].forEach((n, i) => vibe(12.0 + i * 0.015, n, 1.0, (i - 2) * 0.2));
406
+ brass(12.02, ['C3', 'E3', 'G3'], 0.6, 1.0, 0);
407
+ k.noise(12.0, { dur: 1.4, color: 'pink', filter: 'highpass', f: 5000, gain: 0.05, a: 0.25, verb: 0.4 }); // cymbal shimmer
408
+
409
+ // ---- scene 4: TAKEAWAY (t0 = 13.25): rays open (13.25-14.05), MORE EXAMPLES, arrow, BETTER GUESSES (13.6-13.9)
410
+ const t4 = mid(DOORS[2]) + 0.2;
411
+ gliss(t4 + 0.05, t4 + 0.6, ['C4', 'E4', 'G4', 'C5', 'E5'], 0.7, 0);
412
+ ['C3', 'G3', 'E4', 'B4', 'D5'].forEach((n, i) => vibe(t4 + 0.62 + i * 0.05, n, 0.75 - i * 0.07, (i - 2) * 0.2)); // resolves on BETTER GUESSES
413
+ },
414
+ draw(ctx, W, HH, t) {
415
+ const CX = W / 2;
416
+ const P = (d, dur = 0.8) => H.ease.out(H.clamp((t - d) / dur, 0, 1));
417
+
418
+ // ---------- lacquer black ground ----------
419
+ const bg = ctx.createRadialGradient(CX, 420, 40, CX, 420, 820);
420
+ bg.addColorStop(0, '#221a10'); bg.addColorStop(0.5, '#0f0c08'); bg.addColorStop(1, '#050403');
421
+ ctx.fillStyle = bg; ctx.fillRect(0, 0, W, HH);
422
+
423
+ const M = H.layer(W, HH), m = M.getContext('2d'); // full-strength gold
424
+ const Md = H.layer(W, HH), md = Md.getContext('2d'); // dim gold (rays)
425
+ m.fillStyle = m.strokeStyle = '#fff'; md.fillStyle = md.strokeStyle = '#fff';
426
+
427
+ // ---------- sunburst behind the tower ----------
428
+ const sy = 540, open = H.ease.inOut(H.clamp((t - 1.3) / 1.1, 0, 1));
429
+ const N = 40;
430
+ md.save(); md.beginPath(); md.rect(34, 34, W - 68, sy - 34); md.clip();
431
+ const fall = md.createRadialGradient(CX, sy, 280, CX, sy, 760);
432
+ fall.addColorStop(0, 'rgba(255,255,255,0.55)'); fall.addColorStop(0.6, 'rgba(255,255,255,0.22)'); fall.addColorStop(1, 'rgba(255,255,255,0.04)');
433
+ md.fillStyle = fall;
434
+ for (let i = 0; i < N; i++) {
435
+ const a0 = Math.PI + (i / N) * Math.PI, a1 = a0 + (Math.PI / N) * 0.42;
436
+ const aa = Math.PI * 1.5 + (a0 - Math.PI * 1.5) * open, ab = Math.PI * 1.5 + (a1 - Math.PI * 1.5) * open;
437
+ md.beginPath(); md.moveTo(CX, sy); md.arc(CX, sy, 900, aa, ab); md.closePath(); md.fill();
438
+ }
439
+ md.restore(); md.fillStyle = '#fff';
440
+ md.globalAlpha = 1;
441
+ // black disc mask so rays start from a halo
442
+ md.globalCompositeOperation = 'destination-out'; md.beginPath(); md.arc(CX, sy, 300, 0, 7); md.fill(); md.globalCompositeOperation = 'source-over';
443
+ // concentric fan arcs (scalloped halo)
444
+ // halo arcs inscribe from both ends and meet at the top (symmetry)
445
+ const arcIn = (r, p) => { if (p <= 0) return; m.beginPath(); m.arc(CX, sy, r, Math.PI, Math.PI + Math.PI / 2 * p); m.stroke(); m.beginPath(); m.arc(CX, sy, r, -Math.PI / 2 * p, 0); m.stroke(); };
446
+ m.lineWidth = 3;
447
+ for (let k = 0; k < 4; k++) arcIn(250 + k * 18, H.ease.inOut(H.clamp((t - 1.0 - k * 0.08) / 0.8, 0, 1)));
448
+ m.lineWidth = 1.5; arcIn(330, H.ease.inOut(H.clamp((t - 1.3) / 0.8, 0, 1)));
449
+ // scallop fan blades in the halo (pop on in pairs from the outside in)
450
+ for (let i = 0; i < 12; i++) {
451
+ if (t < 1.6 + Math.min(i, 11 - i) * 0.07) continue;
452
+ const a = Math.PI + (i + 0.5) / 12 * Math.PI;
453
+ m.beginPath(); m.moveTo(CX + Math.cos(a) * 304, sy + Math.sin(a) * 304);
454
+ m.lineTo(CX + Math.cos(a - 0.05) * 330, sy + Math.sin(a - 0.05) * 330); m.lineTo(CX + Math.cos(a + 0.05) * 330, sy + Math.sin(a + 0.05) * 330); m.closePath(); m.fill();
455
+ }
456
+
457
+ // ---------- ziggurat of server racks ----------
458
+ const BAY = 74; const tiers = [[6 * BAY + 12, 84], [5 * BAY + 12, 78], [4 * BAY + 12, 72], [3 * BAY + 12, 68], [2 * BAY + 12, 62], [BAY + 12, 56]];
459
+ let y = sy;
460
+ const tierBoxes = [];
461
+ for (const [w, h] of tiers) { tierBoxes.push([CX - w / 2, y - h, w, h]); y -= h; }
462
+ const topY = y;
463
+ // black body (knock out rays behind the tower)
464
+ const body = new Path2D();
465
+ // tiers rise floor by floor (stepped), bottom first
466
+ const tierP = tierBoxes.map((_, ti) => H.ease.out(H.clamp((t - 0.45 - ti * 0.17) / 0.22, 0, 1)));
467
+ tierBoxes.forEach(([x, yy, w, h], ti) => { if (tierP[ti] > 0) body.rect(x, yy + h * (1 - tierP[ti]), w, h * tierP[ti] + 1); });
468
+ md.globalCompositeOperation = 'destination-out'; md.fill(body); md.globalCompositeOperation = 'source-over';
469
+ m.globalCompositeOperation = 'destination-out'; m.fill(body); m.globalCompositeOperation = 'source-over';
470
+ const leds = [];
471
+ tierBoxes.forEach(([x, yy, w, h], ti) => {
472
+ if (tierP[ti] <= 0) return;
473
+ m.save(); m.beginPath(); m.rect(x - 60, yy - 30 + (h + 30) * (1 - tierP[ti]), w + 120, (h + 30) * tierP[ti] + 2); m.clip();
474
+ m.lineWidth = 3; m.strokeRect(x + 1.5, yy + 1.5, w - 3, h - 3);
475
+ // pilasters
476
+ const nP = Math.round((w - 12) / BAY);
477
+ const bayW = (w - 12) / nP;
478
+ for (let b = 0; b < nP; b++) {
479
+ const bx = x + 6 + b * bayW;
480
+ // rack units
481
+ m.lineWidth = 1.2;
482
+ for (let u = yy + 12; u < yy + h - 6; u += 9) { m.beginPath(); m.moveTo(bx + 6, u); m.lineTo(bx + bayW - 6, u); m.stroke(); }
483
+ if (b > 0) { m.fillRect(bx - 2, yy + 4, 4, h - 8); }
484
+ // LEDs
485
+ if (t > 0.75 + ti * 0.17) for (let u = yy + 16, k = 0; u < yy + h - 6; u += 9, k++) leds.push([bx + bayW - 14, u - 4, ti * 31 + b * 7 + k]);
486
+ }
487
+ // stepped crown on each setback
488
+ const cw = Math.min(46, w * 0.18);
489
+ m.beginPath(); m.moveTo(CX - cw, yy); m.lineTo(CX - cw * 0.6, yy - 8); m.lineTo(CX - cw * 0.2, yy - 8); m.lineTo(CX, yy - 16); m.lineTo(CX + cw * 0.2, yy - 8); m.lineTo(CX + cw * 0.6, yy - 8); m.lineTo(CX + cw, yy); m.closePath(); m.fill();
490
+ // chevrons on the setback ledges
491
+ if (ti < tiers.length - 1) {
492
+ const nw = tiers[ti + 1][0];
493
+ for (const side of [-1, 1]) {
494
+ const lx = CX + side * (nw / 2 + (w - nw) / 4);
495
+ for (let k = 0; k < 3; k++) { m.beginPath(); m.moveTo(lx - 12, yy - 2 - k * 5); m.lineTo(lx, yy - 9 - k * 5); m.lineTo(lx + 12, yy - 2 - k * 5); m.lineWidth = 1.6; m.stroke(); }
496
+ }
497
+ }
498
+ m.restore();
499
+ });
500
+ // spire
501
+ const spP = H.ease.out(H.clamp((t - 1.5) / 0.6, 0, 1)), spTop = topY - 14 - 66 * spP;
502
+ m.beginPath(); m.moveTo(CX - 14, topY - 14); m.lineTo(CX, spTop); m.lineTo(CX + 14, topY - 14); m.closePath(); m.fill();
503
+ m.lineWidth = 2; for (let k = 0; k < 4; k++) { const yy = topY - 26 - k * 14; if (yy < spTop + 6) continue; m.beginPath(); m.moveTo(CX - 10 + k * 2, yy); m.lineTo(CX + 10 - k * 2, yy); m.stroke(); }
504
+ // beacon star
505
+ const beacon = (0.6 + 0.4 * Math.sin(t * 3.0)) * H.clamp((t - 2.1) / 0.3, 0, 1);
506
+ m.save(); m.translate(CX, spTop - 6); { const bs = H.ease.back(H.clamp((t - 2.0) / 0.35, 0, 1)); m.scale(bs, bs); }
507
+ for (let i = 0; i < 8; i++) { m.rotate(Math.PI / 4); m.beginPath(); m.moveTo(0, 0); m.lineTo(2.5, -6); m.lineTo(0, -(i % 2 ? 12 : 22)); m.lineTo(-2.5, -6); m.closePath(); m.fill(); }
508
+ m.restore();
509
+
510
+ // ---------- geometric border frame ----------
511
+ const frame = (ins, lw) => {
512
+ const s = 34; m.lineWidth = lw; m.setLineDash([4400 * H.ease.inOut(H.clamp((t - (lw > 2 ? 0 : 0.15)) / 1.1, 0, 1)) + 0.01, 5000]); m.beginPath();
513
+ m.moveTo(ins + s, ins); m.lineTo(W - ins - s, ins); m.lineTo(W - ins - s, ins + s * 0.4); m.lineTo(W - ins - s * 0.4, ins + s * 0.4); m.lineTo(W - ins - s * 0.4, ins + s); m.lineTo(W - ins, ins + s);
514
+ m.lineTo(W - ins, HH - ins - s); m.lineTo(W - ins - s * 0.4, HH - ins - s); m.lineTo(W - ins - s * 0.4, HH - ins - s * 0.4); m.lineTo(W - ins - s, HH - ins - s * 0.4); m.lineTo(W - ins - s, HH - ins);
515
+ m.lineTo(ins + s, HH - ins); m.lineTo(ins + s, HH - ins - s * 0.4); m.lineTo(ins + s * 0.4, HH - ins - s * 0.4); m.lineTo(ins + s * 0.4, HH - ins - s); m.lineTo(ins, HH - ins - s);
516
+ m.lineTo(ins, ins + s); m.lineTo(ins + s * 0.4, ins + s); m.lineTo(ins + s * 0.4, ins + s * 0.4); m.lineTo(ins + s, ins + s * 0.4); m.closePath(); m.stroke();
517
+ };
518
+ frame(20, 3); frame(30, 1.2); m.setLineDash([]);
519
+ // corner fans
520
+ for (const [fx, fy, a0] of [[30, 30, 0], [W - 30, 30, Math.PI / 2], [W - 30, HH - 30, Math.PI], [30, HH - 30, Math.PI * 1.5]]) {
521
+ const fp = H.ease.out(H.clamp((t - 0.9) / 0.5, 0, 1)); if (fp <= 0) continue;
522
+ m.save(); m.translate(fx, fy); m.scale(fp, fp); m.translate(-fx, -fy);
523
+ m.lineWidth = 1.4;
524
+ for (let k = 0; k < 3; k++) { m.beginPath(); m.arc(fx, fy, 58 + k * 12, a0 + 0.12, a0 + Math.PI / 2 - 0.12); m.stroke(); }
525
+ for (let k = 0; k < 7; k++) { const a = a0 + 0.2 + (k / 6) * (Math.PI / 2 - 0.4); m.beginPath(); m.moveTo(fx + Math.cos(a) * 58, fy + Math.sin(a) * 58); m.lineTo(fx + Math.cos(a) * 82, fy + Math.sin(a) * 82); m.stroke(); }
526
+ m.restore();
527
+ }
528
+ // side pilasters: triple fluted lines, stepped capital and a fan crown (symmetric)
529
+ for (const side of [-1, 1]) {
530
+ const x = CX + side * 470;
531
+ const pp = H.ease.inOut(H.clamp((t - 0.7) / 0.8, 0, 1)); // pilasters grow up from their bases
532
+ m.save(); m.beginPath(); m.rect(x - 50, 510 - 420 * pp, 100, 420 * pp); m.clip();
533
+ m.fillRect(x - 2, 170, 4, 330); m.fillRect(x - 12, 186, 1.5, 300); m.fillRect(x + 10.5, 186, 1.5, 300);
534
+ m.fillRect(x - 20, 500, 40, 4); m.fillRect(x - 14, 492, 28, 4); m.fillRect(x - 20, 166, 40, 4); m.fillRect(x - 14, 174, 28, 3);
535
+ m.lineWidth = 1.5;
536
+ for (let k = 0; k < 3; k++) { m.beginPath(); m.arc(x, 160, 18 + k * 10, Math.PI, 0); m.stroke(); }
537
+ for (let k = 0; k < 7; k++) { const a = Math.PI + (k + 0.5) / 7 * Math.PI; m.beginPath(); m.moveTo(x, 160); m.lineTo(x + Math.cos(a) * 38, 160 + Math.sin(a) * 38); m.stroke(); }
538
+ m.beginPath(); m.moveTo(x, 104); m.lineTo(x + 8, 116); m.lineTo(x, 128); m.lineTo(x - 8, 116); m.closePath(); m.fill();
539
+ // dangling beads
540
+ for (let k = 0; k < 5; k++) { m.beginPath(); m.arc(x, 214 + k * 64, 3.2, 0, 7); m.fill(); }
541
+ m.restore();
542
+ }
543
+ // ---------- title plaque ----------
544
+ const ty = 628;
545
+ m.font = '400 76px "Limelight"'; m.textAlign = 'center'; m.textBaseline = 'alphabetic'; m.letterSpacing = '6px';
546
+ { // foil-stamped letter by letter
547
+ const title = 'THE GOLDEN AGE'; m.textAlign = 'left';
548
+ const x0 = CX + 3 - m.measureText(title).width / 2 + 3;
549
+ for (let i = 0; i < title.length; i++) {
550
+ const a = H.clamp((t - 2.25 - i * 0.055) / 0.12, 0, 1); if (a <= 0) continue;
551
+ m.globalAlpha = a; m.fillText(title[i], x0 + m.measureText(title.slice(0, i)).width, ty);
552
+ }
553
+ m.globalAlpha = 1; m.textAlign = 'center';
554
+ }
555
+ // rule lines with diamonds
556
+ const rp = H.ease.inOut(H.clamp((t - 1.9) / 0.6, 0, 1));
557
+ m.fillRect(CX - (CX - 150) * rp, sy + 8, (W - 300) * rp, 2.5);
558
+ if (rp >= 1) for (const x of [150, W - 150]) { m.beginPath(); m.moveTo(x, sy + 9); m.lineTo(x + (x < CX ? -10 : 10), sy + 1); m.lineTo(x + (x < CX ? -20 : 20), sy + 9); m.lineTo(x + (x < CX ? -10 : 10), sy + 17); m.closePath(); m.fill(); }
559
+
560
+ // ---------- composite foil with bevel ----------
561
+ const G = foil(W, HH, M, 6, t);
562
+
563
+ // bevel: dark offset under, light offset over edge
564
+ const tint = (src, col) => { const T = H.layer(W, HH), tc = T.getContext('2d'); tc.drawImage(src, 0, 0); tc.globalCompositeOperation = 'source-in'; tc.fillStyle = col; tc.fillRect(0, 0, W, HH); return T; };
565
+ { // dim warm-gold rays (flat ink, not foil)
566
+ const Gd = tint(Md, '#c08a34'); ctx.save(); ctx.globalAlpha = 0.85; ctx.drawImage(Gd, 0, 0); ctx.restore(); }
567
+ ctx.drawImage(tint(M, 'rgba(0,0,0,0.85)'), 1.5, 2);
568
+ ctx.drawImage(G, 0, 0);
569
+ ctx.save(); ctx.globalCompositeOperation = 'screen'; ctx.globalAlpha = 0.35; ctx.drawImage(tint(M, '#fff4cf'), -0.8, -0.8); ctx.drawImage(G, 0, 0); ctx.restore();
570
+
571
+ // ---------- cream accents ----------
572
+ ctx.fillStyle = CREAM; ctx.font = '400 30px "Poiret One"'; ctx.textAlign = 'left'; ctx.letterSpacing = '20px';
573
+ ctx.globalAlpha = H.clamp((t - 3.05) / 0.4, 0, 1);
574
+ const sub = 'OF COMPUTE', sw = ctx.measureText(sub).width - 20;
575
+ ctx.fillText(sub, CX - sw / 2, ty + 46);
576
+ ctx.letterSpacing = '0px';
577
+ for (const s2 of [-1, 1]) {
578
+ const x0 = CX + s2 * (sw / 2 + 26), x1 = CX + s2 * (sw / 2 + 170);
579
+ ctx.fillRect(Math.min(x0, x1), ty + 34, Math.abs(x1 - x0), 1.5);
580
+ ctx.beginPath(); ctx.moveTo(x1, ty + 29); ctx.lineTo(x1 + s2 * 6, ty + 35); ctx.lineTo(x1, ty + 41); ctx.lineTo(x1 - s2 * 6, ty + 35); ctx.closePath(); ctx.fill();
581
+ }
582
+ ctx.globalAlpha = 1;
583
+ // LEDs: cream with glow, twinkling
584
+ const step = Math.floor(t * 5);
585
+ ctx.save(); ctx.globalCompositeOperation = 'lighter';
586
+ leds.forEach(([x, yy, id]) => {
587
+ const r = H.rng(id * 977 + step * 13);
588
+ const on = r() < 0.72; if (!on) return;
589
+ const warm = r() < 0.25;
590
+ const g2 = ctx.createRadialGradient(x, yy, 0, x, yy, 7);
591
+ g2.addColorStop(0, warm ? 'rgba(255,200,120,0.55)' : 'rgba(255,240,205,0.4)'); g2.addColorStop(1, 'rgba(255,220,160,0)');
592
+ ctx.fillStyle = g2; ctx.fillRect(x - 7, yy - 7, 14, 14);
593
+ });
594
+ ctx.restore();
595
+ leds.forEach(([x, yy, id]) => { const r = H.rng(id * 977 + step * 13); if (r() < 0.72) { ctx.fillStyle = r() < 0.25 ? '#ffcf8a' : CREAM; ctx.fillRect(x - 1.5, yy - 1.5, 3, 3); } });
596
+ // beacon glow
597
+ const bgl = ctx.createRadialGradient(CX, spTop - 6, 0, CX, spTop - 6, 60);
598
+ bgl.addColorStop(0, `rgba(255,236,190,${0.55 * beacon})`); bgl.addColorStop(1, 'rgba(255,220,150,0)');
599
+ ctx.save(); ctx.globalCompositeOperation = 'lighter'; ctx.fillStyle = bgl; ctx.fillRect(CX - 60, spTop - 66, 120, 120); ctx.restore();
600
+
601
+ // ---------- print finish: subtle lacquer grain ----------
602
+ H.grain(ctx, W, HH, 0.035, 3 + Math.floor(t * 12), true);
603
+ H.vignette(ctx, W, HH, 0.45);
604
+ },
605
+ });
606
+ }