@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.
- package/MANUAL.md +94 -84
- package/package.json +1 -1
- package/product.json +2 -1
- package/skills/aicut/SKILL.md +4 -4
- package/skills/aicut/references/commands.md +15 -15
- package/skills/aicut/references/film-format.md +1 -1
- package/skills/aicut/references/recipes.md +4 -4
- package/skills/aicut/references/troubleshooting.md +2 -2
- package/skills/aicut-motion/SKILL.md +75 -9
- package/skills/aicut-motion/THIRD_PARTY_NOTICES.md +14 -0
- package/skills/aicut-motion/assets/atlas/lib/harness.js +116 -0
- package/skills/aicut-motion/assets/atlas/lib/sound.js +274 -0
- package/skills/aicut-motion/assets/atlas/styles/001-flat-vector-science/code.js +937 -0
- package/skills/aicut-motion/assets/atlas/styles/001-flat-vector-science/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/001-flat-vector-science/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/002-watercolor-wash/code.js +909 -0
- package/skills/aicut-motion/assets/atlas/styles/002-watercolor-wash/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/002-watercolor-wash/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/003-shadow-puppet-theatre/code.js +881 -0
- package/skills/aicut-motion/assets/atlas/styles/003-shadow-puppet-theatre/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/003-shadow-puppet-theatre/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/004-whiteboard-explainer/code.js +897 -0
- package/skills/aicut-motion/assets/atlas/styles/004-whiteboard-explainer/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/004-whiteboard-explainer/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/005-psychedelic-poster/code.js +814 -0
- package/skills/aicut-motion/assets/atlas/styles/005-psychedelic-poster/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/005-psychedelic-poster/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/006-tech-glow-explainer/code.js +990 -0
- package/skills/aicut-motion/assets/atlas/styles/006-tech-glow-explainer/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/006-tech-glow-explainer/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/007-papercraft-models/code.js +994 -0
- package/skills/aicut-motion/assets/atlas/styles/007-papercraft-models/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/007-papercraft-models/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/008-1940s-film-noir/code.js +792 -0
- package/skills/aicut-motion/assets/atlas/styles/008-1940s-film-noir/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/008-1940s-film-noir/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/009-manim-style-math/code.js +840 -0
- package/skills/aicut-motion/assets/atlas/styles/009-manim-style-math/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/009-manim-style-math/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/010-illuminated-manuscript/code.js +1126 -0
- package/skills/aicut-motion/assets/atlas/styles/010-illuminated-manuscript/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/010-illuminated-manuscript/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/011-editorial-essay-collage/code.js +854 -0
- package/skills/aicut-motion/assets/atlas/styles/011-editorial-essay-collage/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/011-editorial-essay-collage/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/012-bioluminescent-deep-sea/code.js +1124 -0
- package/skills/aicut-motion/assets/atlas/styles/012-bioluminescent-deep-sea/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/012-bioluminescent-deep-sea/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/013-product-launch-reveal/code.js +728 -0
- package/skills/aicut-motion/assets/atlas/styles/013-product-launch-reveal/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/013-product-launch-reveal/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/014-halftone-pop-panel/code.js +664 -0
- package/skills/aicut-motion/assets/atlas/styles/014-halftone-pop-panel/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/014-halftone-pop-panel/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/015-isometric-pastel/code.js +991 -0
- package/skills/aicut-motion/assets/atlas/styles/015-isometric-pastel/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/015-isometric-pastel/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/016-oscilloscope-vector-art/code.js +801 -0
- package/skills/aicut-motion/assets/atlas/styles/016-oscilloscope-vector-art/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/016-oscilloscope-vector-art/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/017-risograph-zine/code.js +692 -0
- package/skills/aicut-motion/assets/atlas/styles/017-risograph-zine/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/017-risograph-zine/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/018-claymation-set/code.js +756 -0
- package/skills/aicut-motion/assets/atlas/styles/018-claymation-set/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/018-claymation-set/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/019-neon-sign-at-night/code.js +922 -0
- package/skills/aicut-motion/assets/atlas/styles/019-neon-sign-at-night/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/019-neon-sign-at-night/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/020-kawaii-anime/code.js +852 -0
- package/skills/aicut-motion/assets/atlas/styles/020-kawaii-anime/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/020-kawaii-anime/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/021-ukiyo-e-woodblock/code.js +724 -0
- package/skills/aicut-motion/assets/atlas/styles/021-ukiyo-e-woodblock/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/021-ukiyo-e-woodblock/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/022-16-bit-pixel-odyssey/code.js +793 -0
- package/skills/aicut-motion/assets/atlas/styles/022-16-bit-pixel-odyssey/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/022-16-bit-pixel-odyssey/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/023-chalkboard-lesson/code.js +846 -0
- package/skills/aicut-motion/assets/atlas/styles/023-chalkboard-lesson/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/023-chalkboard-lesson/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/024-cut-paper-diorama/code.js +1008 -0
- package/skills/aicut-motion/assets/atlas/styles/024-cut-paper-diorama/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/024-cut-paper-diorama/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/025-cathedral-glass/code.js +680 -0
- package/skills/aicut-motion/assets/atlas/styles/025-cathedral-glass/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/025-cathedral-glass/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/026-editorial-chart/code.js +633 -0
- package/skills/aicut-motion/assets/atlas/styles/026-editorial-chart/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/026-editorial-chart/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/027-synthwave-outrun/code.js +757 -0
- package/skills/aicut-motion/assets/atlas/styles/027-synthwave-outrun/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/027-synthwave-outrun/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/028-origami-studio/code.js +828 -0
- package/skills/aicut-motion/assets/atlas/styles/028-origami-studio/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/028-origami-studio/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/029-linocut-relief-print/code.js +697 -0
- package/skills/aicut-motion/assets/atlas/styles/029-linocut-relief-print/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/029-linocut-relief-print/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/030-holographic-foil-card/code.js +687 -0
- package/skills/aicut-motion/assets/atlas/styles/030-holographic-foil-card/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/030-holographic-foil-card/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/031-voxel-diorama/code.js +727 -0
- package/skills/aicut-motion/assets/atlas/styles/031-voxel-diorama/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/031-voxel-diorama/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/032-sumi-e-ink-wash/code.js +903 -0
- package/skills/aicut-motion/assets/atlas/styles/032-sumi-e-ink-wash/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/032-sumi-e-ink-wash/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/033-etch-a-sketch-toy/code.js +662 -0
- package/skills/aicut-motion/assets/atlas/styles/033-etch-a-sketch-toy/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/033-etch-a-sketch-toy/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/034-cosmic-star-chart/code.js +951 -0
- package/skills/aicut-motion/assets/atlas/styles/034-cosmic-star-chart/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/034-cosmic-star-chart/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/035-punk-zine-collage/code.js +759 -0
- package/skills/aicut-motion/assets/atlas/styles/035-punk-zine-collage/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/035-punk-zine-collage/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/036-thermal-camera/code.js +738 -0
- package/skills/aicut-motion/assets/atlas/styles/036-thermal-camera/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/036-thermal-camera/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/037-engineering-blueprint/code.js +793 -0
- package/skills/aicut-motion/assets/atlas/styles/037-engineering-blueprint/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/037-engineering-blueprint/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/038-impasto-night/code.js +673 -0
- package/skills/aicut-motion/assets/atlas/styles/038-impasto-night/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/038-impasto-night/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/039-win95-desktop/code.js +907 -0
- package/skills/aicut-motion/assets/atlas/styles/039-win95-desktop/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/039-win95-desktop/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/040-low-poly-faceted/code.js +833 -0
- package/skills/aicut-motion/assets/atlas/styles/040-low-poly-faceted/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/040-low-poly-faceted/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/041-manga-page/code.js +845 -0
- package/skills/aicut-motion/assets/atlas/styles/041-manga-page/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/041-manga-page/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/042-wood-type-letterpress/code.js +496 -0
- package/skills/aicut-motion/assets/atlas/styles/042-wood-type-letterpress/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/042-wood-type-letterpress/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/043-light-painting/code.js +635 -0
- package/skills/aicut-motion/assets/atlas/styles/043-light-painting/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/043-light-painting/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/044-felt-patchwork/code.js +799 -0
- package/skills/aicut-motion/assets/atlas/styles/044-felt-patchwork/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/044-felt-patchwork/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/045-phosphor-terminal/code.js +547 -0
- package/skills/aicut-motion/assets/atlas/styles/045-phosphor-terminal/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/045-phosphor-terminal/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/046-glassmorphism-ui/code.js +592 -0
- package/skills/aicut-motion/assets/atlas/styles/046-glassmorphism-ui/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/046-glassmorphism-ui/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/047-tarot-card/code.js +768 -0
- package/skills/aicut-motion/assets/atlas/styles/047-tarot-card/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/047-tarot-card/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/048-transit-map/code.js +666 -0
- package/skills/aicut-motion/assets/atlas/styles/048-transit-map/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/048-transit-map/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/049-gouache-travel-poster/code.js +559 -0
- package/skills/aicut-motion/assets/atlas/styles/049-gouache-travel-poster/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/049-gouache-travel-poster/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/050-napkin-sketch/code.js +943 -0
- package/skills/aicut-motion/assets/atlas/styles/050-napkin-sketch/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/050-napkin-sketch/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/051-art-deco-foil/code.js +606 -0
- package/skills/aicut-motion/assets/atlas/styles/051-art-deco-foil/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/051-art-deco-foil/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/052-radiograph-on-lightbox/code.js +730 -0
- package/skills/aicut-motion/assets/atlas/styles/052-radiograph-on-lightbox/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/052-radiograph-on-lightbox/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/053-vaporwave/code.js +782 -0
- package/skills/aicut-motion/assets/atlas/styles/053-vaporwave/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/053-vaporwave/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/054-ebru-paper-marbling/code.js +504 -0
- package/skills/aicut-motion/assets/atlas/styles/054-ebru-paper-marbling/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/054-ebru-paper-marbling/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/055-isotype-pictograms/code.js +517 -0
- package/skills/aicut-motion/assets/atlas/styles/055-isotype-pictograms/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/055-isotype-pictograms/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/056-soft-3d-clay/code.js +713 -0
- package/skills/aicut-motion/assets/atlas/styles/056-soft-3d-clay/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/056-soft-3d-clay/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/057-cross-stitch-sampler/code.js +717 -0
- package/skills/aicut-motion/assets/atlas/styles/057-cross-stitch-sampler/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/057-cross-stitch-sampler/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/058-constructivist-propaganda/code.js +540 -0
- package/skills/aicut-motion/assets/atlas/styles/058-constructivist-propaganda/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/058-constructivist-propaganda/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/059-pocket-monochrome/code.js +524 -0
- package/skills/aicut-motion/assets/atlas/styles/059-pocket-monochrome/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/059-pocket-monochrome/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/060-botanical-plate/code.js +934 -0
- package/skills/aicut-motion/assets/atlas/styles/060-botanical-plate/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/060-botanical-plate/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/061-kinetic-type/code.js +690 -0
- package/skills/aicut-motion/assets/atlas/styles/061-kinetic-type/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/061-kinetic-type/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/062-byzantine-mosaic/code.js +612 -0
- package/skills/aicut-motion/assets/atlas/styles/062-byzantine-mosaic/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/062-byzantine-mosaic/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/063-y2k-liquid-chrome/code.js +666 -0
- package/skills/aicut-motion/assets/atlas/styles/063-y2k-liquid-chrome/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/063-y2k-liquid-chrome/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/064-sticky-note-wall/code.js +651 -0
- package/skills/aicut-motion/assets/atlas/styles/064-sticky-note-wall/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/064-sticky-note-wall/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/065-vintage-newsprint/code.js +656 -0
- package/skills/aicut-motion/assets/atlas/styles/065-vintage-newsprint/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/065-vintage-newsprint/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/066-hidden-line-wireframe/code.js +672 -0
- package/skills/aicut-motion/assets/atlas/styles/066-hidden-line-wireframe/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/066-hidden-line-wireframe/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/067-memphis-group/code.js +548 -0
- package/skills/aicut-motion/assets/atlas/styles/067-memphis-group/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/067-memphis-group/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/068-ballpoint-notebook/code.js +989 -0
- package/skills/aicut-motion/assets/atlas/styles/068-ballpoint-notebook/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/068-ballpoint-notebook/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/069-op-art-sphere/code.js +440 -0
- package/skills/aicut-motion/assets/atlas/styles/069-op-art-sphere/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/069-op-art-sphere/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/070-topographic-survey/code.js +895 -0
- package/skills/aicut-motion/assets/atlas/styles/070-topographic-survey/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/070-topographic-survey/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/071-pointillist-afternoon/code.js +563 -0
- package/skills/aicut-motion/assets/atlas/styles/071-pointillist-afternoon/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/071-pointillist-afternoon/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/072-vector-arcade-1980/code.js +627 -0
- package/skills/aicut-motion/assets/atlas/styles/072-vector-arcade-1980/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/072-vector-arcade-1980/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/073-patent-drawing/code.js +1096 -0
- package/skills/aicut-motion/assets/atlas/styles/073-patent-drawing/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/073-patent-drawing/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/074-bauhaus-poster/code.js +595 -0
- package/skills/aicut-motion/assets/atlas/styles/074-bauhaus-poster/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/074-bauhaus-poster/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/075-bitmap-paint-doodle/code.js +665 -0
- package/skills/aicut-motion/assets/atlas/styles/075-bitmap-paint-doodle/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/075-bitmap-paint-doodle/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/076-nail-thread-string-art/code.js +645 -0
- package/skills/aicut-motion/assets/atlas/styles/076-nail-thread-string-art/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/076-nail-thread-string-art/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/077-ridgeline/code.js +436 -0
- package/skills/aicut-motion/assets/atlas/styles/077-ridgeline/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/077-ridgeline/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/078-sketchbook-graphite/code.js +1237 -0
- package/skills/aicut-motion/assets/atlas/styles/078-sketchbook-graphite/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/078-sketchbook-graphite/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/079-teletext-page/code.js +622 -0
- package/skills/aicut-motion/assets/atlas/styles/079-teletext-page/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/079-teletext-page/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/080-silkscreen-grid/code.js +524 -0
- package/skills/aicut-motion/assets/atlas/styles/080-silkscreen-grid/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/080-silkscreen-grid/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/081-guilloch-security-print/code.js +689 -0
- package/skills/aicut-motion/assets/atlas/styles/081-guilloch-security-print/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/081-guilloch-security-print/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/082-ascii-demoscene/code.js +574 -0
- package/skills/aicut-motion/assets/atlas/styles/082-ascii-demoscene/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/082-ascii-demoscene/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/083-international-typographic-style/code.js +469 -0
- package/skills/aicut-motion/assets/atlas/styles/083-international-typographic-style/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/083-international-typographic-style/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/084-flow-field/code.js +531 -0
- package/skills/aicut-motion/assets/atlas/styles/084-flow-field/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/084-flow-field/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/085-macpaint-1984/code.js +675 -0
- package/skills/aicut-motion/assets/atlas/styles/085-macpaint-1984/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/085-macpaint-1984/style.json +13 -0
- package/skills/aicut-motion/assets/atlas/styles/086-multi-scale-truchet/code.js +609 -0
- package/skills/aicut-motion/assets/atlas/styles/086-multi-scale-truchet/poster.jpg +0 -0
- package/skills/aicut-motion/assets/atlas/styles/086-multi-scale-truchet/style.json +13 -0
- package/skills/aicut-motion/references/design-systems/README.md +1 -1
- package/skills/aicut-motion/references/motion-delivery.md +55 -0
- package/skills/aicut-motion/references/pages.md +1 -1
- package/skills/aicut-motion/references/style-index.json +690 -0
- package/skills/aicut-motion/references/style-research.md +73 -0
- package/skills/aicut-motion/references/style-selection.md +71 -0
- package/skills/aicut-motion/scripts/atlas-viewer.html +195 -0
- package/skills/aicut-motion/scripts/atlas.mjs +109 -0
- package/studio/client.mjs +3 -3
- package/studio/server/fetch-github.mjs +14 -3
- package/studio/server/server.mjs +71 -6
- package/studio/server/skill-summaries.mjs +60 -0
- package/studio/server/skills.mjs +121 -7
- package/studio/server/styles-store.mjs +235 -0
- package/studio/server/template-posters.mjs +2 -2
- package/studio/server/templates-page.mjs +93 -93
- package/studio/server/templates.mjs +32 -7
- package/studio/ui/dist/assets/ExportCenter-DasulhAv.js +1 -0
- package/studio/ui/dist/assets/SettingsModal-BZw0Hz2_.js +2 -0
- package/studio/ui/dist/assets/apple-touch-icon-ClxQ7j-O.png +0 -0
- package/studio/ui/dist/assets/es-C8XPZARI.js +1 -0
- package/studio/ui/dist/assets/favicon-Blwx8Trs.png +0 -0
- package/studio/ui/dist/assets/index-BjJVmBzB.js +1623 -0
- package/studio/ui/dist/assets/index-C3BfKZFO.css +1 -0
- package/studio/ui/dist/assets/ja-BeNkdaEj.js +1 -0
- package/studio/ui/dist/assets/ko-DcTVhdzK.js +1 -0
- package/studio/ui/dist/assets/zh-CN-Cg51ctbL.js +1 -0
- package/studio/ui/dist/index.html +4 -3
- package/studio/ui/dist/assets/ExportCenter-F-2vF-lQ.js +0 -1
- package/studio/ui/dist/assets/SettingsModal-BgVYguNu.js +0 -2
- package/studio/ui/dist/assets/es-BRUzvuoM.js +0 -1
- package/studio/ui/dist/assets/index-Bhg-9dA3.css +0 -1
- package/studio/ui/dist/assets/index-CWur1Iw9.js +0 -1625
- package/studio/ui/dist/assets/ja-Cth-uDcW.js +0 -1
- package/studio/ui/dist/assets/ko-upvw591D.js +0 -1
- package/studio/ui/dist/assets/zh-CN-BCfJFazB.js +0 -1
|
@@ -0,0 +1,728 @@
|
|
|
1
|
+
{
|
|
2
|
+
// ---------- Product Launch Reveal: big-tech keynote film ----------
|
|
3
|
+
// A single glossy hero object (an invented "model" chip-slab) on a near-black stage, lit like a studio product
|
|
4
|
+
// shot: soft key, rim light, a specular sweep, a floor reflection. Huge tight-tracked Inter, words revealed one at
|
|
5
|
+
// a time, gradient key numbers with a soft glow, hairline callouts with small spec labels, slow eased camera moves.
|
|
6
|
+
const PI = Math.PI;
|
|
7
|
+
const sm = (a, b, x) => H.smooth(a, b, x);
|
|
8
|
+
const io = (x) => H.ease.inOut(H.clamp(x));
|
|
9
|
+
const eo = (x) => H.ease.out(H.clamp(x));
|
|
10
|
+
const GV = ['#b69cff', '#e879f9', '#ff9a4d']; // violet -> orange
|
|
11
|
+
const GT = ['#5eead4', '#38bdf8', '#6d7cff']; // teal -> blue
|
|
12
|
+
const GG = ['#7cf0b8', '#2dd4bf']; // green -> teal
|
|
13
|
+
const RED = '#ff453a';
|
|
14
|
+
const INK = '#f5f5f7', GREY = '#a1a1a6', DIM = '#6e6e73';
|
|
15
|
+
|
|
16
|
+
// ---------- geometry: a rounded slab (x-z plane), with an inset die carrying a 4-layer network ----------
|
|
17
|
+
const HALF = 1, RAD = 0.27, THICK = 0.12, SEG = 48; // fine corner segments so the machined side wall shades smoothly
|
|
18
|
+
function rr(a, r, seg) {
|
|
19
|
+
const pts = [], cs = [[a - r, a - r], [-(a - r), a - r], [-(a - r), -(a - r)], [a - r, -(a - r)]];
|
|
20
|
+
cs.forEach(([cx, cz], k) => { for (let i = 0; i <= seg; i++) { const an = k * PI / 2 + (i / seg) * PI / 2; pts.push([cx + r * Math.cos(an), cz + r * Math.sin(an), an]); } });
|
|
21
|
+
return pts;
|
|
22
|
+
}
|
|
23
|
+
const OUT = rr(HALF, RAD, SEG), DIE = rr(0.66, 0.12, 5);
|
|
24
|
+
const LX = [-0.45, -0.15, 0.15, 0.45], LN = [4, 5, 5, 3];
|
|
25
|
+
const NODES = LX.map((x, li) => Array.from({ length: LN[li] }, (_, k) => [x, -0.42 + (0.84 * k) / (LN[li] - 1)]));
|
|
26
|
+
const EDGES = [];
|
|
27
|
+
{ const ra = H.rng(11), rb = H.rng(29);
|
|
28
|
+
for (let li = 0; li < 3; li++) for (let a = 0; a < LN[li]; a++) for (let b = 0; b < LN[li + 1]; b++) EDGES.push({ li, a, b, wa: Math.pow(ra(), 1.6), wb: Math.pow(rb(), 1.6) }); }
|
|
29
|
+
|
|
30
|
+
// camera: c = {cx, cy (screen point of the floor under the object), s (zoom), yaw, pitch}
|
|
31
|
+
function cam(c) {
|
|
32
|
+
const cyw = Math.cos(c.yaw), syw = Math.sin(c.yaw), cp = Math.cos(c.pitch), sp = Math.sin(c.pitch), D = 7, F = c.s * 1900;
|
|
33
|
+
const P = (x, y, z) => { const X = x * cyw - z * syw, Z = x * syw + z * cyw, up = y * cp - Z * sp, dep = Z * cp + y * sp, k = F / (D - dep); return [c.cx + X * k, c.cy - up * k, dep]; };
|
|
34
|
+
const N = (nx, nz) => [nx * cyw - nz * syw, nx * syw + nz * cyw];
|
|
35
|
+
return Object.assign({}, c, { P, N, unit: F / D });
|
|
36
|
+
}
|
|
37
|
+
function keyed(keys, t) {
|
|
38
|
+
if (t <= keys[0].t) return Object.assign({}, keys[0]);
|
|
39
|
+
for (let i = 0; i < keys.length - 1; i++) {
|
|
40
|
+
const a = keys[i], b = keys[i + 1];
|
|
41
|
+
if (t <= b.t) { const e = io((t - a.t) / (b.t - a.t)), o = {}; for (const k in a) o[k] = H.lerp(a[k], b[k], e); return o; }
|
|
42
|
+
}
|
|
43
|
+
return Object.assign({}, keys[keys.length - 1]);
|
|
44
|
+
}
|
|
45
|
+
const poly = (x, pts) => { x.beginPath(); pts.forEach((p, i) => (i ? x.lineTo(p[0], p[1]) : x.moveTo(p[0], p[1]))); x.closePath(); };
|
|
46
|
+
const gauss = (d, k) => Math.exp(-d * d * k);
|
|
47
|
+
|
|
48
|
+
// ---------- stage ----------
|
|
49
|
+
function stage(x, W, Hh, c, L, t) {
|
|
50
|
+
if (L.white) {
|
|
51
|
+
x.fillStyle = '#e4e4e9'; x.fillRect(0, 0, W, Hh);
|
|
52
|
+
let g = x.createRadialGradient(c.cx, c.cy - 220, 40, c.cx, c.cy - 120, 900);
|
|
53
|
+
g.addColorStop(0, '#ffffff'); g.addColorStop(0.55, '#f4f4f7'); g.addColorStop(1, '#dcdce2');
|
|
54
|
+
x.fillStyle = g; x.fillRect(0, 0, W, Hh);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
x.fillStyle = '#030304'; x.fillRect(0, 0, W, Hh);
|
|
58
|
+
const k = L.key;
|
|
59
|
+
let g = x.createRadialGradient(c.cx, c.cy - c.unit * 0.9, 10, c.cx, c.cy - c.unit * 0.6, 820);
|
|
60
|
+
g.addColorStop(0, `rgba(44,47,60,${0.9 * k})`); g.addColorStop(0.45, `rgba(20,21,28,${0.8 * k})`); g.addColorStop(1, 'rgba(3,3,4,0)');
|
|
61
|
+
x.fillStyle = g; x.fillRect(0, 0, W, Hh);
|
|
62
|
+
// floor pool of light
|
|
63
|
+
x.save(); x.translate(c.cx, c.cy); x.scale(1, 0.24);
|
|
64
|
+
g = x.createRadialGradient(0, 0, 0, 0, 0, c.unit * 2.6);
|
|
65
|
+
g.addColorStop(0, `rgba(70,74,92,${0.42 * k})`); g.addColorStop(1, 'rgba(70,74,92,0)');
|
|
66
|
+
x.fillStyle = g; x.beginPath(); x.arc(0, 0, c.unit * 2.6, 0, 7); x.fill(); x.restore();
|
|
67
|
+
// out-of-focus background bokeh (shallow depth of field)
|
|
68
|
+
const r = H.rng(404);
|
|
69
|
+
for (let i = 0; i < 6; i++) {
|
|
70
|
+
const bx = r() * W + Math.sin(t * 0.2 + i) * 14 - (c.cx - 640) * 0.15, by = r.range(0.05, 0.5) * Hh, rad = r.range(40, 110), hue = r.pick(['120,110,255', '255,140,90', '90,200,255']);
|
|
71
|
+
const a = r.range(0.025, 0.05) * k;
|
|
72
|
+
g = x.createRadialGradient(bx, by, 0, bx, by, rad);
|
|
73
|
+
g.addColorStop(0, `rgba(${hue},${a})`); g.addColorStop(0.6, `rgba(${hue},${a * 0.6})`); g.addColorStop(1, `rgba(${hue},0)`);
|
|
74
|
+
x.fillStyle = g; x.beginPath(); x.arc(bx, by, rad, 0, 7); x.fill();
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// ---------- the hero object ----------
|
|
79
|
+
function body(x, c, L, mirror) {
|
|
80
|
+
const hv = L.hover, yT = hv + THICK / 2, yB = hv - THICK / 2, sc = c.unit / 271;
|
|
81
|
+
const P = mirror ? (a, y, b) => c.P(a, -y, b) : c.P;
|
|
82
|
+
const n = OUT.length, top = OUT.map((p) => P(p[0], yT, p[1])), bot = OUT.map((p) => P(p[0], yB, p[1]));
|
|
83
|
+
const white = L.white ? 1 : 0;
|
|
84
|
+
const segs = [];
|
|
85
|
+
for (let i = 0; i < n; i++) {
|
|
86
|
+
const j = (i + 1) % n, a1 = OUT[i][2], a2 = OUT[j][2];
|
|
87
|
+
let nx = Math.cos(a1) + Math.cos(a2), nz = Math.sin(a1) + Math.sin(a2); const nl = Math.hypot(nx, nz) || 1; nx /= nl; nz /= nl;
|
|
88
|
+
const [NX, NZ] = c.N(nx, nz);
|
|
89
|
+
segs.push({ i, j, NX, NZ });
|
|
90
|
+
if (NZ < -0.03) continue;
|
|
91
|
+
// softbox key: a broad soft specular lobe (exp 18) plus a wide sheen, peak clamped so it never blows out to a bar
|
|
92
|
+
const lam = Math.max(0, NX * -0.6 + NZ * 0.8), sd = Math.max(0, NX * -0.25 + NZ * 0.97), spec = Math.pow(sd, 18), sheen = Math.pow(sd, 4);
|
|
93
|
+
const rim = Math.pow(Math.max(0, NX), 3);
|
|
94
|
+
let v = 14 + lam * 62 * L.key + Math.min(1, spec * 0.85 + sheen * 0.3) * 140 * L.key + rim * 120 * L.rim + white * 40;
|
|
95
|
+
if (mirror) v *= 0.9;
|
|
96
|
+
const cc = (m) => `rgb(${Math.min(255, v * 0.96 * m) | 0},${Math.min(255, v * 0.98 * m) | 0},${Math.min(255, (v * 1.05 + 3) * m) | 0})`;
|
|
97
|
+
// long straight faces are split into short pieces so the vertical profile follows the perspective-sloped edges
|
|
98
|
+
const m = Math.max(1, Math.ceil(Math.hypot(top[j][0] - top[i][0], top[j][1] - top[i][1]) / 40));
|
|
99
|
+
const lp = (A, B, f) => [A[0] + (B[0] - A[0]) * f, A[1] + (B[1] - A[1]) * f];
|
|
100
|
+
for (let q = 0; q < m; q++) {
|
|
101
|
+
const t0 = lp(top[i], top[j], q / m), t1 = lp(top[i], top[j], (q + 1) / m), b0 = lp(bot[i], bot[j], q / m), b1 = lp(bot[i], bot[j], (q + 1) / m);
|
|
102
|
+
// gradient axis perpendicular to the top edge, so the bands run parallel to the edge (no sawtooth)
|
|
103
|
+
let ex = t1[0] - t0[0], ey = t1[1] - t0[1]; const el = Math.hypot(ex, ey) || 1; ex /= el; ey /= el;
|
|
104
|
+
const tm = [(t0[0] + t1[0]) / 2, (t0[1] + t1[1]) / 2], bm = [(b0[0] + b1[0]) / 2, (b0[1] + b1[1]) / 2];
|
|
105
|
+
let gx = -ey, gy = ex, hh = (bm[0] - tm[0]) * gx + (bm[1] - tm[1]) * gy;
|
|
106
|
+
if (Math.abs(hh) < 0.5) { gx = bm[0] - tm[0]; gy = bm[1] - tm[1]; hh = 1; }
|
|
107
|
+
const sg = x.createLinearGradient(tm[0], tm[1], tm[0] + gx * hh, tm[1] + gy * hh);
|
|
108
|
+
// polished metal: bright softbox reflection at the top, the dark studio horizon across the middle, a soft floor bounce low
|
|
109
|
+
if (mirror) { sg.addColorStop(0, cc(0.5)); sg.addColorStop(0.45, cc(1)); sg.addColorStop(1, cc(1.2)); }
|
|
110
|
+
else { sg.addColorStop(0, cc(1.32)); sg.addColorStop(0.3, cc(1.05)); sg.addColorStop(0.52, cc(0.62)); sg.addColorStop(0.74, cc(0.82)); sg.addColorStop(1, cc(0.42)); }
|
|
111
|
+
x.fillStyle = sg; x.strokeStyle = sg; x.lineWidth = 0.9;
|
|
112
|
+
poly(x, [t1, t0, b0, b1]); x.fill(); x.stroke();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
// bottom crease
|
|
116
|
+
x.lineWidth = 1.2 * sc; x.strokeStyle = 'rgba(0,0,0,0.6)';
|
|
117
|
+
for (const s of segs) if (s.NZ > 0) { x.beginPath(); x.moveTo(bot[s.i][0], bot[s.i][1]); x.lineTo(bot[s.j][0], bot[s.j][1]); x.stroke(); }
|
|
118
|
+
if (mirror) { x.fillStyle = '#060608'; poly(x, bot); x.fill(); return; }
|
|
119
|
+
|
|
120
|
+
// top: dark glass
|
|
121
|
+
let minY = 1e9, maxY = -1e9; top.forEach((p) => { minY = Math.min(minY, p[1]); maxY = Math.max(maxY, p[1]); });
|
|
122
|
+
poly(x, top);
|
|
123
|
+
let g = x.createLinearGradient(0, minY, 0, maxY);
|
|
124
|
+
g.addColorStop(0, white ? '#2a2c33' : '#1d2028'); g.addColorStop(1, '#08090c');
|
|
125
|
+
x.fillStyle = g; x.fill();
|
|
126
|
+
x.save(); poly(x, top); x.clip();
|
|
127
|
+
// softbox reflection (glossy)
|
|
128
|
+
g = x.createLinearGradient(0, minY, 0, maxY);
|
|
129
|
+
g.addColorStop(0, `rgba(255,255,255,${0.16 * L.key})`); g.addColorStop(0.35, `rgba(255,255,255,${0.035 * L.key})`); g.addColorStop(1, 'rgba(255,255,255,0)');
|
|
130
|
+
x.fillStyle = g; x.fillRect(0, minY, 1280, maxY - minY);
|
|
131
|
+
// fixed soft streak of the softbox on the glass
|
|
132
|
+
{ const A = P(-1.1, yT, 0.6), B = P(0.6, yT, -1.1); const sg = x.createLinearGradient(A[0], A[1], B[0], B[1]);
|
|
133
|
+
sg.addColorStop(0, 'rgba(255,255,255,0)'); sg.addColorStop(0.3, 'rgba(255,255,255,0)'); sg.addColorStop(0.46, `rgba(255,255,255,${0.11 * L.key})`); sg.addColorStop(0.5, `rgba(255,255,255,${0.05 * L.key})`); sg.addColorStop(0.66, 'rgba(255,255,255,0)'); sg.addColorStop(1, 'rgba(255,255,255,0)');
|
|
134
|
+
x.fillStyle = sg; x.fillRect(0, minY, 1280, maxY - minY); }
|
|
135
|
+
// die
|
|
136
|
+
const die = DIE.map((p) => P(p[0], yT, p[1]));
|
|
137
|
+
poly(x, die); x.fillStyle = 'rgba(4,5,8,0.92)'; x.fill();
|
|
138
|
+
// micro-grid
|
|
139
|
+
x.lineWidth = 0.6; x.strokeStyle = `rgba(150,160,200,${0.06 + 0.05 * L.act})`; x.beginPath();
|
|
140
|
+
for (let q = -0.56; q <= 0.57; q += 0.08) { let a = P(q, yT, -0.6), b = P(q, yT, 0.6); x.moveTo(a[0], a[1]); x.lineTo(b[0], b[1]); a = P(-0.6, yT, q); b = P(0.6, yT, q); x.moveTo(a[0], a[1]); x.lineTo(b[0], b[1]); }
|
|
141
|
+
x.stroke();
|
|
142
|
+
// network
|
|
143
|
+
const fp = L.fwd >= 0 ? L.fwd * 3.8 - 0.4 : -9, bp = L.back >= 0 ? (1 - L.back) * 3.8 - 0.4 : -9;
|
|
144
|
+
const np = NODES.map((ly) => ly.map(([nx, nz]) => P(nx, yT, nz)));
|
|
145
|
+
x.lineCap = 'round';
|
|
146
|
+
for (const e of EDGES) {
|
|
147
|
+
const w = H.lerp(e.wa, e.wb, L.adj), fi = gauss(fp - (e.li + 0.5), 3) * (0.35 + 0.65 * w), bi = gauss(bp - (e.li + 0.5), 3) * (0.35 + 0.65 * w);
|
|
148
|
+
const a = 0.05 + 0.26 * w * L.act + 0.85 * Math.max(fi, bi);
|
|
149
|
+
const col = bi > fi ? '255,140,80' : (fi > 0.05 ? '140,230,255' : '190,180,255');
|
|
150
|
+
const A = np[e.li][e.a], B = np[e.li + 1][e.b];
|
|
151
|
+
x.strokeStyle = `rgba(${col},${Math.min(1, a)})`; x.lineWidth = (0.7 + 1.3 * w) * sc;
|
|
152
|
+
x.beginPath(); x.moveTo(A[0], A[1]); x.lineTo(B[0], B[1]); x.stroke();
|
|
153
|
+
}
|
|
154
|
+
np.forEach((ly, li) => ly.forEach((p) => {
|
|
155
|
+
const fi = gauss(fp - li, 3), bi = gauss(bp - li, 3), on = Math.max(fi, bi);
|
|
156
|
+
const col = bi > fi ? '255,150,90' : '170,235,255';
|
|
157
|
+
const rad = (2.6 + 2.4 * on) * sc;
|
|
158
|
+
if (on > 0.08) { const gg = x.createRadialGradient(p[0], p[1], 0, p[0], p[1], rad * 4); gg.addColorStop(0, `rgba(${col},${0.5 * on})`); gg.addColorStop(1, `rgba(${col},0)`); x.fillStyle = gg; x.beginPath(); x.arc(p[0], p[1], rad * 4, 0, 7); x.fill(); }
|
|
159
|
+
x.fillStyle = `rgba(${on > 0.15 ? col : '215,215,235'},${0.35 + 0.25 * L.act + 0.4 * on})`; x.beginPath(); x.arc(p[0], p[1], rad, 0, 7); x.fill();
|
|
160
|
+
}));
|
|
161
|
+
// specular sweep
|
|
162
|
+
if (L.spec > -0.3 && L.spec < 1.3) {
|
|
163
|
+
const A = P(-1.1, yT, 1.1), B = P(1.1, yT, -1.1), u = L.spec;
|
|
164
|
+
g = x.createLinearGradient(A[0], A[1], B[0], B[1]);
|
|
165
|
+
const st = (o, a) => { const q = u + o; if (q > 0 && q < 1) g.addColorStop(q, `rgba(255,255,255,${a})`); };
|
|
166
|
+
g.addColorStop(0, 'rgba(255,255,255,0)'); st(-0.16, 0); st(-0.05, 0.08); st(0, 0.42 * L.key); st(0.02, 0.18); st(0.1, 0); g.addColorStop(1, 'rgba(255,255,255,0)');
|
|
167
|
+
x.fillStyle = g; x.fillRect(0, 0, 1280, 720);
|
|
168
|
+
}
|
|
169
|
+
x.restore();
|
|
170
|
+
// glowing ring around the die
|
|
171
|
+
if (L.ring > 0.01) {
|
|
172
|
+
const ctr = P(0, yT, 0);
|
|
173
|
+
x.save();
|
|
174
|
+
const cg = x.createConicGradient(L.ringRot || 0, ctr[0], ctr[1]);
|
|
175
|
+
['#b69cff', '#e879f9', '#ff9a4d', '#5eead4', '#6d7cff', '#b69cff'].forEach((s, i, arr) => cg.addColorStop(i / (arr.length - 1), s));
|
|
176
|
+
x.strokeStyle = cg; x.globalAlpha = Math.min(1, L.ring); x.lineWidth = 2.2 * sc;
|
|
177
|
+
x.shadowColor = 'rgba(200,130,255,0.9)'; x.shadowBlur = 16 * sc * Math.min(1.6, L.ring);
|
|
178
|
+
poly(x, die); x.stroke();
|
|
179
|
+
x.shadowBlur = 0; x.lineWidth = 0.8 * sc; x.strokeStyle = `rgba(255,255,255,${0.5 * Math.min(1, L.ring)})`; poly(x, die); x.stroke();
|
|
180
|
+
x.restore();
|
|
181
|
+
}
|
|
182
|
+
// top chamfer edge: rim-lit at the back, key-lit at the front
|
|
183
|
+
x.lineWidth = 1.5 * sc;
|
|
184
|
+
for (const s of segs) {
|
|
185
|
+
const back = Math.max(0, -s.NZ), front = Math.max(0, s.NX * -0.6 + s.NZ * 0.8);
|
|
186
|
+
const a = Math.min(1, Math.pow(back, 1.2) * 0.95 * L.rim + front * 0.45 * L.key + 0.06);
|
|
187
|
+
x.strokeStyle = `rgba(235,238,255,${a})`;
|
|
188
|
+
x.beginPath(); x.moveTo(top[s.i][0], top[s.i][1]); x.lineTo(top[s.j][0], top[s.j][1]); x.stroke();
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
let RL = null;
|
|
192
|
+
function chip(x, c, L) {
|
|
193
|
+
const u = c.unit, white = !!L.white;
|
|
194
|
+
// contact shadow + coloured light spill on the floor
|
|
195
|
+
x.save(); x.translate(c.cx, c.cy); x.scale(1, Math.max(0.18, Math.sin(c.pitch) * 0.8));
|
|
196
|
+
let g = x.createRadialGradient(0, 0, 0, 0, 0, u * 1.45);
|
|
197
|
+
g.addColorStop(0, `rgba(0,0,0,${white ? 0.32 : 0.75})`); g.addColorStop(0.6, `rgba(0,0,0,${white ? 0.1 : 0.3})`); g.addColorStop(1, 'rgba(0,0,0,0)');
|
|
198
|
+
x.fillStyle = g; x.beginPath(); x.arc(0, 0, u * 1.45, 0, 7); x.fill();
|
|
199
|
+
if (L.ring > 0.01 && !white) {
|
|
200
|
+
g = x.createRadialGradient(0, 0, 0, 0, 0, u * 1.9);
|
|
201
|
+
g.addColorStop(0, `rgba(170,110,255,${0.16 * Math.min(1.5, L.ring)})`); g.addColorStop(0.5, `rgba(255,130,90,${0.05 * Math.min(1.5, L.ring)})`); g.addColorStop(1, 'rgba(0,0,0,0)');
|
|
202
|
+
x.globalCompositeOperation = 'lighter'; x.fillStyle = g; x.beginPath(); x.arc(0, 0, u * 1.9, 0, 7); x.fill();
|
|
203
|
+
}
|
|
204
|
+
x.restore();
|
|
205
|
+
// floor reflection
|
|
206
|
+
if (!RL) RL = H.layer(1280, 720);
|
|
207
|
+
const r = RL.getContext('2d'); r.setTransform(1, 0, 0, 1, 0, 0); r.globalCompositeOperation = 'source-over'; r.clearRect(0, 0, 1280, 720);
|
|
208
|
+
body(r, c, L, true);
|
|
209
|
+
r.globalCompositeOperation = 'destination-in';
|
|
210
|
+
g = r.createLinearGradient(0, c.cy, 0, c.cy + u * 0.75);
|
|
211
|
+
g.addColorStop(0, 'rgba(0,0,0,1)'); g.addColorStop(1, 'rgba(0,0,0,0)');
|
|
212
|
+
r.fillStyle = g; r.fillRect(0, 0, 1280, 720);
|
|
213
|
+
x.save(); x.globalAlpha = white ? 0.22 : 0.45 * Math.max(0.2, L.key); x.drawImage(RL, 0, 0, 1280, 720); x.restore();
|
|
214
|
+
body(x, c, L, false);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// ---------- type ----------
|
|
218
|
+
function setF(x, w, px) { x.font = `${w} ${px}px "Inter"`; try { x.letterSpacing = (px >= 40 ? -Math.round(px * 0.035) : 0) + 'px'; } catch (e) {} }
|
|
219
|
+
function grad(x, x0, x1, stops) { const g = x.createLinearGradient(x0, 0, x1, 0); stops.forEach((s, i) => g.addColorStop(i / (stops.length - 1), s)); return g; }
|
|
220
|
+
function wordsW(x, list, w, px) { setF(x, w, px); const sp = x.measureText(' ').width + px * 0.08; let tot = 0; list.forEach((it, i) => { it._w = x.measureText(it.s).width; tot += it._w + (i ? sp : 0); }); return { tot, sp }; }
|
|
221
|
+
// one-word-at-a-time reveal: focus-pull from blur, rise and fade. list: [{s, t, fill?}]
|
|
222
|
+
function words(x, list, X, Y, w, px, t, o) {
|
|
223
|
+
o = o || {};
|
|
224
|
+
x.save();
|
|
225
|
+
const { tot, sp } = wordsW(x, list, w, px);
|
|
226
|
+
let cx = o.align === 'center' ? X - tot / 2 : o.align === 'right' ? X - tot : X;
|
|
227
|
+
const x0 = cx;
|
|
228
|
+
for (const it of list) {
|
|
229
|
+
const e = eo((t - it.t) / (o.dur || 0.6));
|
|
230
|
+
if (e > 0.001) {
|
|
231
|
+
x.globalAlpha = e * (o.alpha == null ? 1 : o.alpha);
|
|
232
|
+
const b = (1 - e) * (o.blur == null ? 10 : o.blur);
|
|
233
|
+
x.filter = b > 0.3 ? `blur(${b.toFixed(1)}px)` : 'none';
|
|
234
|
+
x.fillStyle = it.fill === 'grad' ? grad(x, o.gx0 == null ? x0 : o.gx0, o.gx1 == null ? x0 + tot : o.gx1, o.stops || GV) : it.fill || o.fill || INK;
|
|
235
|
+
x.textAlign = 'left'; x.textBaseline = 'alphabetic';
|
|
236
|
+
x.fillText(it.s, cx, Y + (1 - e) * px * 0.28);
|
|
237
|
+
}
|
|
238
|
+
cx += it._w + sp;
|
|
239
|
+
}
|
|
240
|
+
x.restore();
|
|
241
|
+
return { x0, tot };
|
|
242
|
+
}
|
|
243
|
+
function label(x, s, X, Y, w, px, fill, align, a) {
|
|
244
|
+
x.save(); setF(x, w, px); x.globalAlpha = a == null ? 1 : a; x.fillStyle = fill; x.textAlign = align || 'left'; x.textBaseline = 'alphabetic'; x.fillText(s, X, Y); x.restore();
|
|
245
|
+
}
|
|
246
|
+
// hairline callout: anchor dot -> elbow -> end, label sits at the end
|
|
247
|
+
function callout(x, pts, p, lab, sub, side, o) {
|
|
248
|
+
o = o || {};
|
|
249
|
+
if (p <= 0) return;
|
|
250
|
+
const ink = o.ink || '255,255,255';
|
|
251
|
+
x.save();
|
|
252
|
+
const [A] = pts, e = eo(p / 0.35);
|
|
253
|
+
x.fillStyle = `rgba(${ink},${0.95 * e})`; x.beginPath(); x.arc(A[0], A[1], 3.6, 0, 7); x.fill();
|
|
254
|
+
x.strokeStyle = `rgba(${ink},${0.35 * e})`; x.lineWidth = 1; x.beginPath(); x.arc(A[0], A[1], 5 + 6 * e, 0, 7); x.stroke();
|
|
255
|
+
let len = 0; for (let i = 1; i < pts.length; i++) len += Math.hypot(pts[i][0] - pts[i - 1][0], pts[i][1] - pts[i - 1][1]);
|
|
256
|
+
let rem = len * io(sm(0.1, 0.75, p));
|
|
257
|
+
x.strokeStyle = `rgba(${ink},0.7)`; x.lineWidth = 1; x.beginPath(); x.moveTo(A[0], A[1]);
|
|
258
|
+
for (let i = 1; i < pts.length && rem > 0; i++) {
|
|
259
|
+
const a = pts[i - 1], b = pts[i], d = Math.hypot(b[0] - a[0], b[1] - a[1]), f = Math.min(1, rem / d);
|
|
260
|
+
x.lineTo(a[0] + (b[0] - a[0]) * f, a[1] + (b[1] - a[1]) * f); rem -= d;
|
|
261
|
+
}
|
|
262
|
+
x.stroke();
|
|
263
|
+
const la = sm(0.6, 1, p), E = pts[pts.length - 1], dx = (1 - la) * 10 * (side === 'r' ? 1 : -1);
|
|
264
|
+
if (la > 0) {
|
|
265
|
+
const tx = side === 'r' ? E[0] + 14 + dx : E[0] - 14 + dx, al = side === 'r' ? 'left' : 'right';
|
|
266
|
+
label(x, lab, tx, E[1] + 10, 600, o.px || 28, o.labFill || `rgb(${ink})`, al, la);
|
|
267
|
+
if (sub) label(x, sub, tx, E[1] + 10 + (o.px || 28) * 1.05, 400, o.subPx || 21, o.subFill || GREY, al, la);
|
|
268
|
+
}
|
|
269
|
+
x.restore();
|
|
270
|
+
}
|
|
271
|
+
// arrow along a polyline/bezier sample list, drawn to progress p
|
|
272
|
+
function arrow(x, pts, p, stroke, lw, head) {
|
|
273
|
+
if (p <= 0) return;
|
|
274
|
+
const n = Math.max(2, Math.round(pts.length * H.clamp(p)));
|
|
275
|
+
x.save(); x.strokeStyle = stroke; x.lineWidth = lw || 1.2; x.lineCap = 'round'; x.beginPath();
|
|
276
|
+
for (let i = 0; i < n; i++) (i ? x.lineTo : x.moveTo).call(x, pts[i][0], pts[i][1]);
|
|
277
|
+
x.stroke();
|
|
278
|
+
if (head !== false && n >= 2) {
|
|
279
|
+
const a = pts[n - 2], b = pts[n - 1], an = Math.atan2(b[1] - a[1], b[0] - a[0]), hl = 10;
|
|
280
|
+
x.beginPath(); x.moveTo(b[0] - hl * Math.cos(an - 0.45), b[1] - hl * Math.sin(an - 0.45)); x.lineTo(b[0], b[1]); x.lineTo(b[0] - hl * Math.cos(an + 0.45), b[1] - hl * Math.sin(an + 0.45)); x.stroke();
|
|
281
|
+
}
|
|
282
|
+
x.restore();
|
|
283
|
+
}
|
|
284
|
+
const bez = (p0, p1, p2, p3, n) => Array.from({ length: n + 1 }, (_, i) => { const u = i / n, v = 1 - u; return [v * v * v * p0[0] + 3 * v * v * u * p1[0] + 3 * v * u * u * p2[0] + u * u * u * p3[0], v * v * v * p0[1] + 3 * v * v * u * p1[1] + 3 * v * u * u * p2[1] + u * u * u * p3[1]]; });
|
|
285
|
+
|
|
286
|
+
// ---------- example "photo" cards (cached sprites, pre-blurred for depth of field) ----------
|
|
287
|
+
const CARD = {}, CW = 150, CH = 184, CS = 2, CP = 40;
|
|
288
|
+
function cardSprite(kind, tag, tagCol, blur) {
|
|
289
|
+
const key = [kind, tag, tagCol, blur].join('|');
|
|
290
|
+
if (CARD[key]) return CARD[key];
|
|
291
|
+
const c = H.layer(CW * CS + CP * 2, CH * CS + CP * 2), x = c.getContext('2d');
|
|
292
|
+
if (blur) { const b = cardSprite(kind, tag, tagCol, 0); x.filter = `blur(${blur * CS}px)`; x.drawImage(b, 0, 0); return (CARD[key] = c); }
|
|
293
|
+
x.translate(CP, CP); x.scale(CS, CS);
|
|
294
|
+
x.beginPath(); x.roundRect(0, 0, CW, CH, 20); x.save(); x.clip();
|
|
295
|
+
let g = x.createLinearGradient(0, 0, CW * 0.4, CH);
|
|
296
|
+
if (kind === 'cat') { g.addColorStop(0, '#ffd2a6'); g.addColorStop(1, '#ee7d55'); } else if (kind === 'dog') { g.addColorStop(0, '#a9ccff'); g.addColorStop(1, '#5b6ff0'); } else { g.addColorStop(0, '#ffd2a6'); g.addColorStop(1, '#ee7d55'); }
|
|
297
|
+
x.fillStyle = g; x.fillRect(0, 0, CW, CH);
|
|
298
|
+
g = x.createRadialGradient(CW * 0.5, 70, 10, CW * 0.5, 70, 110); g.addColorStop(0, 'rgba(255,255,255,0.35)'); g.addColorStop(1, 'rgba(255,255,255,0)'); x.fillStyle = g; x.fillRect(0, 0, CW, CH);
|
|
299
|
+
const bg = kind === 'dog' ? '#4d5fd6' : '#d8673f';
|
|
300
|
+
x.fillStyle = '#fff';
|
|
301
|
+
if (kind !== 'dog') {
|
|
302
|
+
x.beginPath(); x.moveTo(44, 70); x.lineTo(40, 28); x.lineTo(68, 52); x.closePath(); x.fill();
|
|
303
|
+
x.beginPath(); x.moveTo(106, 70); x.lineTo(110, 28); x.lineTo(82, 52); x.closePath(); x.fill();
|
|
304
|
+
x.beginPath(); x.ellipse(75, 80, 40, 34, 0, 0, 7); x.fill();
|
|
305
|
+
x.fillStyle = bg; x.beginPath(); x.ellipse(60, 77, 4.5, 7, 0, 0, 7); x.ellipse(90, 77, 4.5, 7, 0, 0, 7); x.fill();
|
|
306
|
+
x.beginPath(); x.moveTo(70, 91); x.lineTo(80, 91); x.lineTo(75, 97); x.closePath(); x.fill();
|
|
307
|
+
x.strokeStyle = bg; x.lineWidth = 1.6; x.lineCap = 'round'; x.beginPath();
|
|
308
|
+
x.moveTo(75, 97); x.quadraticCurveTo(70, 103, 64, 100); x.moveTo(75, 97); x.quadraticCurveTo(80, 103, 86, 100);
|
|
309
|
+
x.moveTo(52, 92); x.lineTo(30, 88); x.moveTo(52, 97); x.lineTo(32, 100); x.moveTo(98, 92); x.lineTo(120, 88); x.moveTo(98, 97); x.lineTo(118, 100); x.stroke();
|
|
310
|
+
} else {
|
|
311
|
+
x.fillStyle = 'rgba(255,255,255,0.78)';
|
|
312
|
+
x.beginPath(); x.ellipse(42, 76, 14, 30, 0.35, 0, 7); x.ellipse(108, 76, 14, 30, -0.35, 0, 7); x.fill();
|
|
313
|
+
x.fillStyle = '#fff'; x.beginPath(); x.ellipse(75, 76, 36, 38, 0, 0, 7); x.fill();
|
|
314
|
+
x.beginPath(); x.ellipse(75, 100, 20, 15, 0, 0, 7); x.fill();
|
|
315
|
+
x.fillStyle = bg; x.beginPath(); x.ellipse(61, 72, 4.5, 5.5, 0, 0, 7); x.ellipse(89, 72, 4.5, 5.5, 0, 0, 7); x.fill();
|
|
316
|
+
x.beginPath(); x.ellipse(75, 92, 8, 5.5, 0, 0, 7); x.fill();
|
|
317
|
+
x.strokeStyle = bg; x.lineWidth = 1.6; x.beginPath(); x.moveTo(75, 97); x.lineTo(75, 104); x.quadraticCurveTo(69, 109, 64, 105); x.moveTo(75, 104); x.quadraticCurveTo(81, 109, 86, 105); x.stroke();
|
|
318
|
+
}
|
|
319
|
+
// tag pill
|
|
320
|
+
x.font = '600 28px "Inter"';
|
|
321
|
+
const tw = x.measureText(tag).width + 30;
|
|
322
|
+
x.fillStyle = tagCol || 'rgba(10,10,14,0.55)'; x.beginPath(); x.roundRect(75 - tw / 2, 132, tw, 40, 20); x.fill();
|
|
323
|
+
x.fillStyle = '#fff'; x.textAlign = 'center'; x.textBaseline = 'middle'; x.fillText(tag, 75, 153);
|
|
324
|
+
// gloss
|
|
325
|
+
g = x.createLinearGradient(0, 0, CW, CH * 0.7); g.addColorStop(0, 'rgba(255,255,255,0.28)'); g.addColorStop(0.45, 'rgba(255,255,255,0)'); x.fillStyle = g; x.fillRect(0, 0, CW, CH);
|
|
326
|
+
x.restore();
|
|
327
|
+
x.strokeStyle = 'rgba(255,255,255,0.45)'; x.lineWidth = 1; x.beginPath(); x.roundRect(0.5, 0.5, CW - 1, CH - 1, 20); x.stroke();
|
|
328
|
+
return (CARD[key] = c);
|
|
329
|
+
}
|
|
330
|
+
function drawCard(x, kind, tag, tagCol, cx, cy, s, blur, rot, a) {
|
|
331
|
+
const lv = [0, 2, 5, 9]; let bi = 0; for (let i = 0; i < lv.length; i++) if (Math.abs(lv[i] - blur) < Math.abs(lv[bi] - blur)) bi = i;
|
|
332
|
+
const sp = cardSprite(kind, tag, tagCol, lv[bi]);
|
|
333
|
+
x.save(); x.globalAlpha = a; x.translate(cx, cy); x.rotate(rot || 0); x.scale(s / CS, s / CS);
|
|
334
|
+
x.drawImage(sp, -sp.width / 2, -sp.height / 2); x.restore();
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
// ---------- finishing ----------
|
|
338
|
+
let GR = null;
|
|
339
|
+
function finish(x, W, Hh, t, white) {
|
|
340
|
+
if (!GR) { GR = H.layer(256, 256); const g = GR.getContext('2d'), img = g.createImageData(256, 256), r = H.rng(77); for (let i = 0; i < img.data.length; i += 4) { const v = r() * 255; img.data[i] = img.data[i + 1] = img.data[i + 2] = v; img.data[i + 3] = 255; } g.putImageData(img, 0, 0); }
|
|
341
|
+
if (!white) H.vignette(x, W, Hh, 0.55);
|
|
342
|
+
const r = H.rng(900 + Math.floor(t * 24));
|
|
343
|
+
x.save(); x.globalAlpha = white ? 0.04 : 0.06; x.globalCompositeOperation = 'soft-light';
|
|
344
|
+
x.translate(-r() * 256, -r() * 256); x.fillStyle = x.createPattern(GR, 'repeat'); x.fillRect(0, 0, W + 256, Hh + 256); x.restore();
|
|
345
|
+
}
|
|
346
|
+
function ringGlow(base, t, pulses) { let v = base; for (const p of pulses) if (t > p) v += 0.9 * Math.exp(-(t - p) * 5); return v; }
|
|
347
|
+
|
|
348
|
+
// ================= STILL / CLIP =================
|
|
349
|
+
function drawHero(ctx, W, Hh, t) {
|
|
350
|
+
const D = 6, q = io(t / D);
|
|
351
|
+
const c = cam({ cx: 640, cy: 572, s: H.lerp(0.68, 0.8, q), yaw: H.lerp(-0.95, -0.42, q), pitch: H.lerp(0.32, 0.42, q) });
|
|
352
|
+
const L = { key: sm(0.7, 2.2, t), rim: sm(0.1, 1.1, t), ring: sm(1.5, 2.1, t) + 0.8 * Math.exp(-Math.max(0, t - 1.6) * 3) * (t > 1.6 ? 1 : 0), spec: H.map(t, 2.0, 3.8, -0.25, 1.25),
|
|
353
|
+
fwd: t > 2.4 ? ((t - 2.4) % 1.8) / 1.4 : -1, back: -1, adj: 0, act: sm(1.6, 2.6, t), hover: 0.36 + 0.015 * Math.sin(t * 1.2), ringRot: t * 0.25 };
|
|
354
|
+
if (L.fwd > 1) L.fwd = -1;
|
|
355
|
+
stage(ctx, W, Hh, c, L, t);
|
|
356
|
+
chip(ctx, c, L);
|
|
357
|
+
// headline
|
|
358
|
+
words(ctx, [{ s: 'Introducing', t: 1.75, fill: 'grad' }], 640, 92, 600, 26, t, { align: 'center', stops: GV });
|
|
359
|
+
words(ctx, [{ s: 'Thinks', t: 2.05 }, { s: 'in', t: 2.3 }, { s: 'layers.', t: 2.55 }], 640, 176, 800, 88, t, { align: 'center' });
|
|
360
|
+
// callouts on the object
|
|
361
|
+
const yT = L.hover + THICK / 2;
|
|
362
|
+
const a1 = c.P(NODES[0][1][0], yT, NODES[0][1][1]), a2 = c.P(DIE[3][0], yT, DIE[3][1]), a3 = c.P(0.55, L.hover - THICK * 0.2, 1.0);
|
|
363
|
+
callout(ctx, [a1, [a1[0] - 60, 300], [380, 300]], sm(3.0, 3.9, t), '4-layer neural core', 'Learns from every example', 'l');
|
|
364
|
+
callout(ctx, [a2, [a2[0] + 50, 300], [920, 300]], sm(3.35, 4.25, t), 'Edge-lit glass', 'Sapphire top, 0.4 mm', 'r');
|
|
365
|
+
callout(ctx, [a3, [a3[0] + 40, 590], [920, 590]], sm(3.7, 4.6, t), 'Graphite unibody', 'Machined from one block', 'r');
|
|
366
|
+
finish(ctx, W, Hh, t, false);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
// ================= EXPLAINER =================
|
|
370
|
+
const D_EX = 15.5;
|
|
371
|
+
// timing (shared by explainer() and explainerSound())
|
|
372
|
+
const T = {
|
|
373
|
+
hook: [0.3, 0.55, 0.8, 1.05], key: [1.15, 2.4], rim: [0.6, 1.5], ringOn: 1.95, head: [1.85, 2.6],
|
|
374
|
+
path: [2.6, 3.1], cards: Array.from({ length: 14 }, (_, i) => 2.68 + i * 0.18), travel: 1.25, cnt: [2.95, 5.5],
|
|
375
|
+
inCard: 6.15, inArrow: [6.5, 6.8], fwd1: [6.8, 7.25], outArrow: [7.2, 7.45], dog: 7.45,
|
|
376
|
+
check: 8.1, strike: [8.15, 8.4], xmark: 8.42, err: [8.5, 8.95], back: [8.92, 9.42], adjust: 8.95,
|
|
377
|
+
fwd2: [9.45, 9.75], dogOut: [9.5, 9.72], cat: 9.75, loop: [9.95, 10.6],
|
|
378
|
+
acc: 10.8, num: [11.0, 12.4], lock: 12.4, gleam: [12.45, 12.95],
|
|
379
|
+
sweep: [13.0, 13.45], tag: [13.35, 13.52, 13.69, 13.86, 14.03],
|
|
380
|
+
};
|
|
381
|
+
const KEYS = [
|
|
382
|
+
{ t: 0, cx: 640, cy: 640, s: 0.58, yaw: -0.8, pitch: 0.30 },
|
|
383
|
+
{ t: 1.7, cx: 640, cy: 628, s: 0.62, yaw: -0.66, pitch: 0.32 },
|
|
384
|
+
{ t: 2.8, cx: 860, cy: 520, s: 0.8, yaw: -0.32, pitch: 0.42 },
|
|
385
|
+
{ t: 5.8, cx: 880, cy: 515, s: 0.85, yaw: -0.08, pitch: 0.46 },
|
|
386
|
+
{ t: 6.6, cx: 580, cy: 500, s: 0.76, yaw: 0.06, pitch: 0.72 },
|
|
387
|
+
{ t: 10.25, cx: 590, cy: 500, s: 0.79, yaw: 0.2, pitch: 0.74 },
|
|
388
|
+
{ t: 11.0, cx: 300, cy: 520, s: 0.64, yaw: -0.3, pitch: 0.42 },
|
|
389
|
+
{ t: 13.0, cx: 290, cy: 520, s: 0.68, yaw: -0.12, pitch: 0.42 },
|
|
390
|
+
{ t: 14.3, cx: 640, cy: 590, s: 0.7, yaw: 0.3, pitch: 0.36 },
|
|
391
|
+
{ t: 15.5, cx: 640, cy: 585, s: 0.72, yaw: 0.42, pitch: 0.36 },
|
|
392
|
+
];
|
|
393
|
+
const accVal = (p) => 61 + 36 * (1 - Math.pow(1 - p, 2.2)) + Math.sin(p * 23) * 2.2 * (1 - p) * p;
|
|
394
|
+
|
|
395
|
+
function lighting(t) {
|
|
396
|
+
const pulses = T.cards.map((c) => c + T.travel - 0.05).concat([T.fwd1[1], T.fwd2[1], T.lock, T.sweep[1]]);
|
|
397
|
+
let fwd = -1, back = -1;
|
|
398
|
+
if (t > T.fwd1[0] && t < T.fwd1[1] + 0.2) fwd = (t - T.fwd1[0]) / (T.fwd1[1] - T.fwd1[0]);
|
|
399
|
+
else if (t > T.fwd2[0] && t < T.fwd2[1] + 0.2) fwd = (t - T.fwd2[0]) / (T.fwd2[1] - T.fwd2[0]);
|
|
400
|
+
else if (t > 2.8 && t < 6.4) fwd = ((t - 2.8) % 0.72) / 0.6;
|
|
401
|
+
else if (t > 11.0 && t < 12.4) fwd = ((t - 11.0) % 0.47) / 0.4;
|
|
402
|
+
if (fwd > 1.15) fwd = -1;
|
|
403
|
+
if (t > T.back[0] && t < T.back[1] + 0.2) back = (t - T.back[0]) / (T.back[1] - T.back[0]);
|
|
404
|
+
return { key: sm(T.key[0], T.key[1], t), rim: sm(T.rim[0], T.rim[1], t), ring: t < T.ringOn ? 0 : ringGlow(sm(T.ringOn, T.ringOn + 0.5, t) * 0.85, t, pulses),
|
|
405
|
+
spec: t < 8 ? H.map(t, 2.2, 4.0, -0.25, 1.25) : t < 13.3 ? H.map(t, 12.35, 13.0, -0.25, 1.25) : H.map(t, 13.6, 14.9, -0.25, 1.25),
|
|
406
|
+
fwd, back, adj: io(sm(T.back[0], T.back[1] + 0.1, t)), act: sm(1.9, 2.8, t), hover: 0.36 + 0.015 * Math.sin(t * 1.2), ringRot: t * 0.3 };
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
function darkScene(x, W, Hh, t, c, L) {
|
|
410
|
+
stage(x, W, Hh, c, L, t);
|
|
411
|
+
const yT = L.hover + THICK / 2, top = c.P(0, yT, 0);
|
|
412
|
+
// loop ring (back half before the chip)
|
|
413
|
+
const ringP = sm(T.loop[0], T.loop[1], t), ringA = (1 - sm(T.loop[1], T.loop[1] + 0.35, t));
|
|
414
|
+
if (ringP > 0 && ringA > 0) loopRing(x, c, L, ringP, ringA, false);
|
|
415
|
+
chip(x, c, L);
|
|
416
|
+
if (ringP > 0 && ringA > 0) loopRing(x, c, L, ringP, ringA, true);
|
|
417
|
+
|
|
418
|
+
// ---- beat 1: hook, then shrink to a corner header
|
|
419
|
+
{
|
|
420
|
+
const list = [{ s: 'How', t: T.hook[0] }, { s: 'does', t: T.hook[1] }, { s: 'AI', t: T.hook[2] }, { s: 'learn?', t: T.hook[3] }];
|
|
421
|
+
const m = io(sm(T.head[0], T.head[1], t)), px = 108;
|
|
422
|
+
const { tot } = wordsW(x, list, 800, px);
|
|
423
|
+
const k = H.lerp(1, 44 / px, m), X = H.lerp(640 - tot / 2, 56, m), Y = H.lerp(330, 82, m);
|
|
424
|
+
const fade = 1 - sm(12.6, 13.0, t);
|
|
425
|
+
if (fade > 0) {
|
|
426
|
+
x.save(); x.translate(X, Y); x.scale(k, k);
|
|
427
|
+
words(x, list, 0, 0, 800, px, t, { alpha: H.lerp(1, 0.9, m) * fade });
|
|
428
|
+
x.restore();
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
// ---- beat 2: training data streams into the model
|
|
433
|
+
const b2 = 1 - sm(5.85, 6.35, t), dx2 = c.cx - 880;
|
|
434
|
+
if (t > T.path[0] && b2 > 0) {
|
|
435
|
+
x.save(); x.globalAlpha = b2;
|
|
436
|
+
const P0 = [-160, 690 + 0], P1 = [80, 380], P2 = [360, 230], P3 = [top[0] - 30, top[1] - 6];
|
|
437
|
+
const path = bez(P0, P1, P2, P3, 60).map((p) => [p[0] + (p === null ? 0 : 0), p[1]]);
|
|
438
|
+
arrow(x, path.slice(8, 57), sm(T.path[0], T.path[1], t), 'rgba(255,255,255,0.32)', 1.2);
|
|
439
|
+
callout(x, [[path[24][0], path[24][1]], [path[24][0] + 30, 172], [250, 172]], sm(2.95, 3.8, t), 'Training data', 'labeled examples', 'r');
|
|
440
|
+
const kinds = ['cat', 'dog', 'dog', 'cat', 'cat', 'dog', 'cat', 'dog', 'dog', 'cat', 'dog', 'cat', 'cat', 'dog'];
|
|
441
|
+
// draw far-to-near: later cards (closer to camera at start) on top
|
|
442
|
+
for (let i = 0; i < T.cards.length; i++) {
|
|
443
|
+
const u = (t - T.cards[i]) / T.travel;
|
|
444
|
+
if (u <= 0 || u >= 1) continue;
|
|
445
|
+
const v = H.ease.inOut(u) * 0.9 + u * 0.1;
|
|
446
|
+
const pts = bez(P0, P1, P2, P3, 1), p = (() => { const w = 1 - v; return [w * w * w * P0[0] + 3 * w * w * v * P1[0] + 3 * w * v * v * P2[0] + v * v * v * P3[0], w * w * w * P0[1] + 3 * w * w * v * P1[1] + 3 * w * v * v * P2[1] + v * v * v * P3[1]]; })();
|
|
447
|
+
void pts;
|
|
448
|
+
const s = v < 0.42 ? H.lerp(1.7, 1.05, v / 0.42) : H.lerp(1.05, 0.08, Math.pow((v - 0.42) / 0.58, 1.25));
|
|
449
|
+
const blur = v < 0.38 ? H.lerp(9, 0, v / 0.38) : v > 0.85 ? (v - 0.85) * 20 : 0;
|
|
450
|
+
const a = Math.min(1, u * 6) * (1 - sm(0.86, 1, v));
|
|
451
|
+
drawCard(x, kinds[i], kinds[i], null, p[0], p[1], s, blur, H.lerp(-0.22, 0.12, v) + Math.sin(i * 2.1) * 0.06, a);
|
|
452
|
+
}
|
|
453
|
+
// counter
|
|
454
|
+
const cv = Math.round(Math.pow(10, 6 * io(sm(T.cnt[0], T.cnt[1], t))));
|
|
455
|
+
const ca = sm(T.cnt[0] - 0.2, T.cnt[0] + 0.15, t);
|
|
456
|
+
if (ca > 0) {
|
|
457
|
+
x.save(); x.globalAlpha = ca * b2; setF(x, 800, 80);
|
|
458
|
+
const s = cv.toLocaleString('en-US'), w = x.measureText(s).width, X = 1216 + dx2 * 0.3 - w;
|
|
459
|
+
x.shadowColor = 'rgba(60,170,255,0.55)'; x.shadowBlur = 30; x.fillStyle = grad(x, X, X + w, GT); x.fillText(s, X, 636);
|
|
460
|
+
x.shadowBlur = 0; x.fillText(s, X, 636);
|
|
461
|
+
label(x, 'examples', 1216 + dx2 * 0.3, 680, 400, 30, GREY, 'right');
|
|
462
|
+
x.restore();
|
|
463
|
+
}
|
|
464
|
+
x.restore();
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
// ---- beat 3: guess -> check -> adjust
|
|
468
|
+
const b3 = sm(6.05, 6.5, t) * (1 - sm(10.3, 10.65, t)), dx3 = c.cx - 580;
|
|
469
|
+
if (b3 > 0) {
|
|
470
|
+
x.save(); x.globalAlpha = b3; x.translate(dx3 * 0.9, 0);
|
|
471
|
+
const ix = 172, iy = 396;
|
|
472
|
+
const cardIn = eo(sm(T.inCard, T.inCard + 0.55, t));
|
|
473
|
+
const flip = sm(T.check, T.check + 0.25, t);
|
|
474
|
+
const cs = H.lerp(0.9, 1.18, cardIn), cb = (1 - cardIn) * 8;
|
|
475
|
+
drawCard(x, 'cat', '?', null, ix - (1 - cardIn) * 80, iy, cs, cb, -0.04, cardIn * (1 - flip));
|
|
476
|
+
if (flip > 0) drawCard(x, 'cat', 'cat', 'rgba(32,190,140,0.95)', ix, iy, cs, 0, -0.04, flip);
|
|
477
|
+
callout(x, [[ix, iy - 112], [ix, 232], [ix + 24, 232]], sm(T.check, T.check + 0.7, t), '02 Check', 'it\'s a cat', 'r');
|
|
478
|
+
const L0 = c.P(-1.0, yT, 0.05), R0 = c.P(1.0, yT, -0.05);
|
|
479
|
+
arrow(x, bez([ix + 96, iy], [ix + 150, iy], [L0[0] - 70, L0[1]], [L0[0] - 14 - dx3 * 0.9, L0[1]], 24), sm(T.inArrow[0], T.inArrow[1], t), 'rgba(255,255,255,0.6)', 1.3);
|
|
480
|
+
const ox = 930, oy = 404;
|
|
481
|
+
arrow(x, bez([R0[0] + 14 - dx3 * 0.9, R0[1]], [R0[0] + 40 - dx3 * 0.9, R0[1]], [ox - 60, oy - 34], [ox - 18, oy - 34], 24), sm(T.outArrow[0], T.outArrow[1], t), 'rgba(255,255,255,0.6)', 1.3);
|
|
482
|
+
// guess
|
|
483
|
+
const out1 = 1 - sm(T.dogOut[0], T.dogOut[1], t);
|
|
484
|
+
if (t > T.dog && out1 > 0) {
|
|
485
|
+
x.save(); x.globalAlpha *= out1; x.translate(0, -(1 - out1) * 30);
|
|
486
|
+
const r = words(x, [{ s: 'dog?', t: T.dog }], ox, oy, 800, 104, t, {});
|
|
487
|
+
const sp = sm(T.strike[0], T.strike[1], t);
|
|
488
|
+
if (sp > 0) {
|
|
489
|
+
x.strokeStyle = RED; x.lineWidth = 7; x.lineCap = 'round'; x.shadowColor = 'rgba(255,69,58,0.6)'; x.shadowBlur = 14;
|
|
490
|
+
x.beginPath(); x.moveTo(ox - 8, oy - 34); x.lineTo(ox - 8 + (r.tot + 16) * io(sp), oy - 34); x.stroke(); x.shadowBlur = 0;
|
|
491
|
+
}
|
|
492
|
+
const xm = eo(sm(T.xmark, T.xmark + 0.3, t));
|
|
493
|
+
if (xm > 0) {
|
|
494
|
+
const mx = ox + r.tot + 52, my = oy - 36, rr_ = 26 * (0.6 + 0.4 * xm);
|
|
495
|
+
x.globalAlpha *= xm; x.strokeStyle = RED; x.lineWidth = 3.5;
|
|
496
|
+
x.beginPath(); x.arc(mx, my, rr_, 0, 7); x.stroke();
|
|
497
|
+
x.beginPath(); x.moveTo(mx - 9, my - 9); x.lineTo(mx + 9, my + 9); x.moveTo(mx + 9, my - 9); x.lineTo(mx - 9, my + 9); x.stroke();
|
|
498
|
+
}
|
|
499
|
+
x.restore();
|
|
500
|
+
}
|
|
501
|
+
if (t > T.cat) {
|
|
502
|
+
const r = words(x, [{ s: 'cat', t: T.cat, fill: 'grad' }], ox, oy, 800, 104, t, { stops: GG });
|
|
503
|
+
x.save(); x.shadowColor = 'rgba(60,230,170,0.6)'; x.shadowBlur = 24 * Math.exp(-(t - T.cat) * 2);
|
|
504
|
+
const cm = eo(sm(T.cat + 0.1, T.cat + 0.4, t)), mx = ox + r.tot + 52, my = oy - 36;
|
|
505
|
+
x.globalAlpha *= cm; x.fillStyle = '#2fd6a0'; x.beginPath(); x.arc(mx, my, 26 * (0.6 + 0.4 * cm), 0, 7); x.fill();
|
|
506
|
+
x.shadowBlur = 0; x.strokeStyle = '#04120c'; x.lineWidth = 4; x.lineCap = 'round'; x.lineJoin = 'round';
|
|
507
|
+
x.beginPath(); x.moveTo(mx - 11, my + 1); x.lineTo(mx - 3, my + 9); x.lineTo(mx + 12, my - 8); x.stroke();
|
|
508
|
+
x.restore();
|
|
509
|
+
}
|
|
510
|
+
callout(x, [[ox + 4, oy - 108], [ox + 4, 238], [ox + 28, 238]], sm(T.dog + 0.05, T.dog + 0.75, t), '01 Guess', null, 'r');
|
|
511
|
+
// error signal travelling back to the model
|
|
512
|
+
const ep = sm(T.err[0], T.err[1], t), ea = 1 - sm(T.back[1], T.back[1] + 0.4, t);
|
|
513
|
+
if (ep > 0 && ea > 0) {
|
|
514
|
+
const F0 = c.P(0.55, yT - THICK, 1.0);
|
|
515
|
+
const epath = bez([ox + 70, oy + 28], [ox + 60, 640], [F0[0] + 180 - dx3 * 0.9, 650], [F0[0] + 10 - dx3 * 0.9, F0[1] + 26], 50);
|
|
516
|
+
x.save(); x.globalAlpha *= ea;
|
|
517
|
+
arrow(x, epath, ep, 'rgba(255,110,80,0.75)', 1.6);
|
|
518
|
+
// the struck word charges with a soft red underglow, and the signal leaves it as a small comet with a tail
|
|
519
|
+
{ const ug = (1 - sm(T.err[0] + 0.25, T.back[1], t)) * 0.2;
|
|
520
|
+
if (ug > 0.005) { x.save(); x.translate(ox + 150, oy - 30); x.scale(1, 0.32); const g = x.createRadialGradient(0, 0, 0, 0, 0, 240); g.addColorStop(0, `rgba(255,70,50,${ug})`); g.addColorStop(1, 'rgba(255,60,40,0)'); x.globalCompositeOperation = 'lighter'; x.fillStyle = g; x.beginPath(); x.arc(0, 0, 240, 0, 7); x.fill(); x.restore(); } }
|
|
521
|
+
if (ep < 1) {
|
|
522
|
+
const hi = Math.min(epath.length - 1, Math.round(ep * (epath.length - 1))), hp = epath[hi], ha = sm(0, 0.14, ep);
|
|
523
|
+
const ti = Math.max(0, hi - 7), tp = epath[ti];
|
|
524
|
+
if (hi > ti) { const tg = x.createLinearGradient(tp[0], tp[1], hp[0], hp[1]); tg.addColorStop(0, 'rgba(255,90,60,0)'); tg.addColorStop(1, `rgba(255,150,120,${0.9 * ha})`); x.strokeStyle = tg; x.lineWidth = 3; x.lineCap = 'round'; x.beginPath(); for (let q = ti; q <= hi; q++) (q > ti ? x.lineTo : x.moveTo).call(x, epath[q][0], epath[q][1]); x.stroke(); }
|
|
525
|
+
const g = x.createRadialGradient(hp[0], hp[1], 0, hp[0], hp[1], 18); g.addColorStop(0, `rgba(255,225,205,${ha})`); g.addColorStop(0.3, `rgba(255,100,70,${0.75 * ha})`); g.addColorStop(1, 'rgba(255,60,40,0)'); x.fillStyle = g; x.beginPath(); x.arc(hp[0], hp[1], 18, 0, 7); x.fill();
|
|
526
|
+
}
|
|
527
|
+
label(x, 'error', epath[22][0] + 18, epath[22][1] + 8, 600, 28, '#ff7a5c', 'left', sm(T.err[0] + 0.15, T.err[0] + 0.4, t));
|
|
528
|
+
x.restore();
|
|
529
|
+
}
|
|
530
|
+
// adjust callout on the inner layers
|
|
531
|
+
const an = c.P(NODES[2][1][0], yT, NODES[2][1][1]);
|
|
532
|
+
callout(x, [[an[0] - dx3 * 0.9, an[1]], [an[0] + 30 - dx3 * 0.9, 150], [an[0] + 70 - dx3 * 0.9, 150]], sm(T.adjust, T.adjust + 0.75, t), '03 Adjust', 'weights shift', 'r', { ink: '255,190,150' });
|
|
533
|
+
if (ringP > 0.05 && ringA > 0) { const fr = c.P(1.42 * Math.cos(0.75), L.hover, 1.42 * Math.sin(0.75)); label(x, 'Repeat × 1,000,000', fr[0] + 22 - dx3 * 0.9, fr[1] + 10, 600, 30, INK, 'left', sm(T.loop[0] + 0.05, T.loop[0] + 0.3, t) * ringA); }
|
|
534
|
+
x.restore();
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
// ---- beat 4: accuracy, the giant gradient number
|
|
538
|
+
const b4 = sm(10.6, 11.0, t);
|
|
539
|
+
if (b4 > 0) {
|
|
540
|
+
const p = eo(sm(T.num[0], T.num[1], t)), val = Math.round(accVal(p));
|
|
541
|
+
const lk = t > T.lock ? Math.exp(-(t - T.lock) * 2.2) : 0;
|
|
542
|
+
const zoom = 1 + 0.05 * sm(T.lock, T.lock + 0.5, t) + 0.035 * lk;
|
|
543
|
+
x.save(); x.globalAlpha = b4;
|
|
544
|
+
label(x, 'Accuracy', 566, 196, 600, 36, GREY, 'left', sm(T.acc, T.acc + 0.4, t));
|
|
545
|
+
// chart
|
|
546
|
+
const cx0 = 572, cx1 = 1196, yOf = (v) => 640 - ((v - 55) / 45) * 170, N = 60;
|
|
547
|
+
x.strokeStyle = 'rgba(255,255,255,0.18)'; x.lineWidth = 1; x.beginPath(); x.moveTo(cx0, 642); x.lineTo(cx0 + (cx1 - cx0) * sm(10.85, 11.3, t), 642); x.stroke();
|
|
548
|
+
const cp = sm(T.num[0], T.num[1], t);
|
|
549
|
+
const pts = []; for (let i = 0; i <= N * cp; i++) { const r = i / N; pts.push([H.lerp(cx0, cx1, r), yOf(accVal(r))]); }
|
|
550
|
+
if (pts.length > 1) {
|
|
551
|
+
const hp = [H.lerp(cx0, cx1, cp), yOf(accVal(cp))]; pts.push(hp);
|
|
552
|
+
x.beginPath(); pts.forEach((q, i) => (i ? x.lineTo(q[0], q[1]) : x.moveTo(q[0], q[1]))); x.lineTo(hp[0], 642); x.lineTo(cx0, 642); x.closePath();
|
|
553
|
+
let g = x.createLinearGradient(0, 440, 0, 642); g.addColorStop(0, 'rgba(232,121,249,0.22)'); g.addColorStop(1, 'rgba(232,121,249,0)'); x.fillStyle = g; x.fill();
|
|
554
|
+
x.beginPath(); pts.forEach((q, i) => (i ? x.lineTo(q[0], q[1]) : x.moveTo(q[0], q[1])));
|
|
555
|
+
x.strokeStyle = grad(x, cx0, cx1, GV); x.lineWidth = 3; x.lineJoin = 'round'; x.shadowColor = 'rgba(232,121,249,0.7)'; x.shadowBlur = 14; x.stroke(); x.shadowBlur = 0;
|
|
556
|
+
g = x.createRadialGradient(hp[0], hp[1], 0, hp[0], hp[1], 22); g.addColorStop(0, 'rgba(255,255,255,1)'); g.addColorStop(0.3, 'rgba(255,170,110,0.8)'); g.addColorStop(1, 'rgba(255,150,80,0)'); x.fillStyle = g; x.beginPath(); x.arc(hp[0], hp[1], 22, 0, 7); x.fill();
|
|
557
|
+
}
|
|
558
|
+
label(x, 'Training rounds →', cx0, 682, 400, 28, '#8e8e93', 'left', sm(10.9, 11.3, t));
|
|
559
|
+
// number
|
|
560
|
+
const s = val + '%', na = sm(T.num[0] - 0.25, T.num[0] + 0.1, t);
|
|
561
|
+
x.save(); x.translate(566, 404); x.scale(zoom, zoom); x.globalAlpha = b4 * na; setF(x, 800, 200);
|
|
562
|
+
const w = x.measureText(s).width;
|
|
563
|
+
const fill = grad(x, 0, w, GV);
|
|
564
|
+
x.shadowColor = `rgba(220,110,255,${0.5 + 0.4 * lk})`; x.shadowBlur = 50 + 60 * lk; x.fillStyle = fill; x.fillText(s, 0, 0);
|
|
565
|
+
x.shadowBlur = 0; x.fillText(s, 0, 0);
|
|
566
|
+
x.restore();
|
|
567
|
+
// gleam across the number
|
|
568
|
+
const gp = sm(T.gleam[0], T.gleam[1], t);
|
|
569
|
+
if (gp > 0 && gp < 1) {
|
|
570
|
+
const Lr = gleamLayer(); const g2 = Lr.getContext('2d'); g2.setTransform(1, 0, 0, 1, 0, 0); g2.globalCompositeOperation = 'source-over'; g2.clearRect(0, 0, 1280, 720);
|
|
571
|
+
g2.save(); g2.translate(566, 404); g2.scale(zoom, zoom); setF(g2, 800, 200); g2.fillStyle = '#fff'; g2.fillText(s, 0, 0); g2.restore();
|
|
572
|
+
g2.globalCompositeOperation = 'source-in';
|
|
573
|
+
const bx = 566 - 200 + gp * (w * zoom + 400), gg = g2.createLinearGradient(bx - 90, 0, bx + 90, 0);
|
|
574
|
+
gg.addColorStop(0, 'rgba(255,255,255,0)'); gg.addColorStop(0.5, 'rgba(255,255,255,0.85)'); gg.addColorStop(1, 'rgba(255,255,255,0)');
|
|
575
|
+
g2.fillStyle = gg; g2.fillRect(0, 0, 1280, 720);
|
|
576
|
+
x.drawImage(Lr, 0, 0, 1280, 720);
|
|
577
|
+
}
|
|
578
|
+
x.restore();
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
let GL = null; const gleamLayer = () => GL || (GL = H.layer(1280, 720));
|
|
582
|
+
|
|
583
|
+
function loopRing(x, c, L, p, a, front) {
|
|
584
|
+
const N = 90, R = 1.42, y = L.hover, a0 = 1.6, cd = c.P(0, L.hover, 0)[2];
|
|
585
|
+
const pts = []; for (let i = 0; i <= N * p; i++) { const an = a0 + (i / N) * PI * 2; pts.push(c.P(R * Math.cos(an), y, R * Math.sin(an))); }
|
|
586
|
+
if (pts.length < 2) return;
|
|
587
|
+
x.save(); x.globalAlpha *= a; x.lineCap = 'round'; x.lineWidth = 2;
|
|
588
|
+
const g = grad(x, c.cx - c.unit * 1.8, c.cx + c.unit * 1.8, GV); x.strokeStyle = g; x.shadowColor = 'rgba(220,120,255,0.6)'; x.shadowBlur = 10;
|
|
589
|
+
for (let i = 1; i < pts.length; i++) { if ((pts[i][2] > cd) !== front) continue; x.beginPath(); x.moveTo(pts[i - 1][0], pts[i - 1][1]); x.lineTo(pts[i][0], pts[i][1]); x.stroke(); }
|
|
590
|
+
const hp = pts[pts.length - 1];
|
|
591
|
+
if ((hp[2] > cd) === front) { const b = pts[pts.length - 2], an = Math.atan2(hp[1] - b[1], hp[0] - b[0]); x.fillStyle = '#ffd0f0'; x.beginPath(); x.moveTo(hp[0] + 12 * Math.cos(an), hp[1] + 12 * Math.sin(an)); x.lineTo(hp[0] + 9 * Math.cos(an + 2.3), hp[1] + 9 * Math.sin(an + 2.3)); x.lineTo(hp[0] + 9 * Math.cos(an - 2.3), hp[1] + 9 * Math.sin(an - 2.3)); x.fill(); }
|
|
592
|
+
x.restore();
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
function whiteScene(x, W, Hh, t, c, L) {
|
|
596
|
+
const Lw = Object.assign({}, L, { white: 1, key: 1, rim: 1 });
|
|
597
|
+
stage(x, W, Hh, c, Lw, t);
|
|
598
|
+
chip(x, c, Lw);
|
|
599
|
+
const list = [{ s: 'More', t: T.tag[0], fill: '#1d1d1f' }, { s: 'examples', t: T.tag[1], fill: '#1d1d1f' }, { s: '→', t: T.tag[2], fill: '#86868b' }, { s: 'better', t: T.tag[3], fill: 'grad' }, { s: 'guesses', t: T.tag[4], fill: 'grad' }];
|
|
600
|
+
const { tot, sp } = wordsW(x, list, 800, 66);
|
|
601
|
+
const gx0 = 640 - tot / 2 + list[0]._w + list[1]._w + list[2]._w + sp * 3;
|
|
602
|
+
words(x, list, 640, 196, 800, 66, t, { align: 'center', gx0, gx1: 640 + tot / 2, stops: ['#7c4dff', '#d946ef', '#ff7a2f'] });
|
|
603
|
+
label(x, 'That’s how AI learns.', 640, 262, 400, 30, '#6e6e73', 'center', sm(14.45, 14.9, t));
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
function explainer(ctx, W, Hh, t) {
|
|
607
|
+
const c = cam(keyed(KEYS, t));
|
|
608
|
+
const L = lighting(t);
|
|
609
|
+
const s0 = T.sweep[0], s1 = T.sweep[1];
|
|
610
|
+
if (t < s1) darkScene(ctx, W, Hh, t, c, L);
|
|
611
|
+
if (t >= s0) {
|
|
612
|
+
const bx = H.lerp(-260, W + 260, io(sm(s0, s1, t)));
|
|
613
|
+
ctx.save();
|
|
614
|
+
if (t < s1) { ctx.beginPath(); ctx.rect(0, 0, Math.max(0, bx), Hh); ctx.clip(); }
|
|
615
|
+
whiteScene(ctx, W, Hh, t, c, L);
|
|
616
|
+
ctx.restore();
|
|
617
|
+
if (t < s1 + 0.05) {
|
|
618
|
+
const g = ctx.createLinearGradient(bx - 260, 0, bx + 120, 0);
|
|
619
|
+
g.addColorStop(0, 'rgba(255,255,255,0)'); g.addColorStop(0.7, 'rgba(255,255,255,0.9)'); g.addColorStop(0.85, 'rgba(255,255,255,0.55)'); g.addColorStop(1, 'rgba(255,255,255,0)');
|
|
620
|
+
ctx.save(); ctx.globalCompositeOperation = 'lighter'; ctx.fillStyle = g; ctx.fillRect(bx - 260, 0, 380, Hh); ctx.restore();
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
finish(ctx, W, Hh, t, t >= s1);
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
registerStyle({
|
|
627
|
+
id: 'product-launch',
|
|
628
|
+
name: 'Product Launch Reveal',
|
|
629
|
+
category: 'Popular Explainer Looks',
|
|
630
|
+
description: 'A big-tech keynote product film: one glossy hero object on a near-black stage, lit like a studio shot with soft key, rim light, a sweeping specular highlight and a floor reflection, huge tight-tracked sans headlines, gradient key numbers with a soft glow and hairline spec callouts.',
|
|
631
|
+
motion: 'Rim light finds the object in the dark, the key light fades up as the camera slowly orbits and pushes in, a highlight glides across the glass, the edge ring ignites, then the headline arrives one word at a time and hairline callouts draw out to their spec labels.',
|
|
632
|
+
fonts: ['800 108px "Inter"', '800 88px "Inter"', '800 200px "Inter"', '600 28px "Inter"', '600 36px "Inter"', '400 30px "Inter"', '400 21px "Inter"'],
|
|
633
|
+
frameT: 5.6,
|
|
634
|
+
duration: 6,
|
|
635
|
+
draw: drawHero,
|
|
636
|
+
explainerDuration: D_EX,
|
|
637
|
+
explainerNote: 'Told as a keynote launch film around one hero object (the model, a glass-topped chip): one continuous studio camera that orbits and pushes between beats, hairline callouts and arrows for flow, a clean red strike for the wrong guess while the chip’s inner layers light up backwards to adjust, a giant violet-to-orange 97% with a glow bloom and gleam, and a light-sweep wipe to a pristine white stage for the tagline.',
|
|
638
|
+
explainer,
|
|
639
|
+
// Keynote-film score: a quiet pad, then a minimal synth pulse under the data/learning beats, deep soft sub "bwooms"
|
|
640
|
+
// on reveals, airy risers into the big moments, clean low clicks for labels and words, smooth low whooshes for every
|
|
641
|
+
// camera move, a muted low two-note for the wrong guess, warm chords for "cat" and the 97% lock, and a resolving
|
|
642
|
+
// chord under the tagline. All times come from T / the same easing used in explainer().
|
|
643
|
+
explainerSound(k) {
|
|
644
|
+
const D = D_EX, when = (f, v, a, b) => { for (let t = a; t <= b; t += 0.001) if (f(t) >= v) return t; return b; };
|
|
645
|
+
const bwoom = (t, g, dur = 1.4, f = 58) => {
|
|
646
|
+
k.tone(t, { f: [[0, f * 1.7], [0.1, f], [dur, f * 0.72]], dur, gain: 0.5 * g, a: 0.012, hold: dur * 0.15 });
|
|
647
|
+
k.tone(t, { f: f * 2, dur: dur * 0.45, gain: 0.07 * g, a: 0.012 });
|
|
648
|
+
k.noise(t, { dur: 0.6, color: 'brown', filter: 'lowpass', f: [[0, 420], [0.6, 80]], gain: 0.22 * g, a: 0.008, verb: 0.25 });
|
|
649
|
+
};
|
|
650
|
+
const air = (t, dur, g) => { k.noise(t, { dur, color: 'pink', filter: 'bandpass', f: [[0, 450], [dur, 4200]], q: 0.7, gain: 0.13 * g, a: dur * 0.92, verb: 0.35 }); k.tone(t, { f: [[0, 'D3'], [dur, 'D4']], type: 'triangle', dur, gain: 0.025 * g, a: dur * 0.9, filter: 'lowpass', f2: 900 }); };
|
|
651
|
+
const click = (t, g = 1, pan = 0, minor = true) => { k.noise(t, { dur: 0.014, filter: 'bandpass', f: 2300, q: 1.6, gain: 0.2 * g, pan, minor }); k.tone(t, { f: [[0, 420], [0.03, 260]], dur: 0.04, gain: 0.07 * g, pan, minor }); };
|
|
652
|
+
const glide = (t, dur, g, pan = 0, minor = true) => k.noise(t, { dur, color: 'pink', filter: 'lowpass', f: [[0, 160], [dur * 0.5, 720], [dur, 190]], q: 0.9, gain: 0.26 * g, a: dur * 0.45, pan, verb: 0.15, minor });
|
|
653
|
+
const chord = (t, notes, dur, g, minor = false) => notes.forEach((n, i) => {
|
|
654
|
+
const pan = (i - (notes.length - 1) / 2) * 0.22;
|
|
655
|
+
k.tone(t, { f: n, type: 'triangle', dur, gain: 0.05 * g, a: 0.03, hold: dur * 0.3, filter: 'lowpass', f2: [[0, 2200], [dur, 700]], pan, verb: 0.4, minor });
|
|
656
|
+
k.tone(t, { f: k.hz(n) * 1.003, dur, gain: 0.04 * g, a: 0.05, hold: dur * 0.3, pan: -pan, verb: 0.4, minor });
|
|
657
|
+
});
|
|
658
|
+
const ticks = (val, a, b, gap, g, pan) => { let last = -1, prev = val(a); for (let t = a; t <= b; t += 0.002) { const v = val(t); if (v !== prev && t - last >= gap) { click(t, g, pan); last = t; } prev = v; } };
|
|
659
|
+
|
|
660
|
+
// ---- music: quiet pad, minimal pulse through the middle, pad again for the resolve
|
|
661
|
+
const CH = [['D3', 'A3', 'E4', 'F#4'], ['B2', 'F#3', 'D4', 'A4'], ['G2', 'D3', 'B3', 'F#4'], ['A2', 'E3', 'C#4', 'E4']];
|
|
662
|
+
k.music('pad', 0.2, 2.65, { bpm: 64, gain: 0.32, chords: [CH[0]] });
|
|
663
|
+
k.music('pulse', 2.65, 12.4, { bpm: 64, gain: 0.26, chords: [CH[1], CH[2], CH[3]] });
|
|
664
|
+
k.music('pad', 12.4, D, { bpm: 64, gain: 0.3, chords: [CH[0]] });
|
|
665
|
+
|
|
666
|
+
// ---- beat 1: words, light finds the object
|
|
667
|
+
T.hook.forEach((t, i) => click(t, 0.8, (i - 1.5) * 0.15));
|
|
668
|
+
air(0.4, 0.8, 0.8);
|
|
669
|
+
bwoom(T.key[0] + 0.05, 0.7, 1.6);
|
|
670
|
+
chord(T.ringOn, ['A3', 'E4'], 1.0, 0.5, true); // edge ring ignites
|
|
671
|
+
glide(1.75, 1.05, 1.0, 0, false); // header slides up, camera orbits right
|
|
672
|
+
|
|
673
|
+
// ---- beat 2: data into the model
|
|
674
|
+
click(T.path[1], 0.7, -0.3);
|
|
675
|
+
click(when((t) => sm(2.95, 3.8, t), 0.6, 2.95, 3.8), 0.8, -0.4); // "Training data" label lands
|
|
676
|
+
T.cards.forEach((c) => { const ta = c + T.travel - 0.05; k.tone(ta, { f: [[0, 200], [0.12, 105]], dur: 0.16, gain: 0.12, pan: 0.3, minor: true }); k.noise(ta, { dur: 0.06, color: 'brown', filter: 'lowpass', f: 600, gain: 0.12, pan: 0.3, minor: true }); });
|
|
677
|
+
ticks((t) => Math.round(Math.pow(10, 6 * io(sm(T.cnt[0], T.cnt[1], t))) / 1000), T.cnt[0] + 0.05, T.cnt[1] - 0.02, 0.085, 0.55, 0.5);
|
|
678
|
+
k.play('tock', T.cnt[1], { f: 520, gain: 0.35, pan: 0.5 }); bwoom(T.cnt[1], 0.35, 0.9, 70);
|
|
679
|
+
|
|
680
|
+
// ---- beat 3: guess, check, adjust
|
|
681
|
+
glide(5.8, 0.85, 1.0, 0, false); // camera swings round to the top view
|
|
682
|
+
k.noise(T.inCard, { dur: 0.5, color: 'pink', filter: 'bandpass', f: [[0, 600], [0.5, 1800]], q: 0.8, gain: 0.07, a: 0.4, pan: -0.5, minor: true });
|
|
683
|
+
click(T.inArrow[1], 0.7, -0.3);
|
|
684
|
+
k.noise(T.fwd1[0], { dur: 0.45, color: 'pink', filter: 'bandpass', f: [[0, 500], [0.45, 2200]], q: 1.2, gain: 0.08, a: 0.3, minor: true });
|
|
685
|
+
click(T.outArrow[1], 0.7, 0.3);
|
|
686
|
+
bwoom(T.dog, 0.5, 0.9, 72); click(T.dog, 0.9, 0.4, false); // "dog?"
|
|
687
|
+
click(when((t) => sm(T.dog + 0.05, T.dog + 0.75, t), 0.6, T.dog, T.dog + 0.8), 0.6, 0.4);
|
|
688
|
+
click(T.check, 0.8, -0.5); // tag turns to "cat"
|
|
689
|
+
click(when((t) => sm(T.check, T.check + 0.7, t), 0.6, T.check, T.check + 0.8), 0.6, -0.5);
|
|
690
|
+
k.noise(T.strike[0], { dur: 0.26, filter: 'bandpass', f: [[0, 900], [0.26, 2600]], q: 0.9, gain: 0.13, a: 0.08, pan: 0.4 }); // red strike
|
|
691
|
+
k.tone(T.xmark, { f: 'E3', type: 'triangle', dur: 0.22, gain: 0.2, hold: 0.1, filter: 'lowpass', f2: 900, pan: 0.45 }); // muted "wrong"
|
|
692
|
+
k.tone(T.xmark + 0.14, { f: 'C3', type: 'triangle', dur: 0.45, gain: 0.2, hold: 0.15, filter: 'lowpass', f2: 800, pan: 0.45 });
|
|
693
|
+
bwoom(T.xmark, 0.45, 0.6, 50);
|
|
694
|
+
k.tone(T.err[0], { f: [[0, 520], [0.45, 140]], dur: 0.5, gain: 0.07, a: 0.05, pan: 0.2 }); // error signal travels back
|
|
695
|
+
k.noise(T.err[0], { dur: 0.48, color: 'pink', filter: 'bandpass', f: [[0, 1800], [0.48, 400]], q: 1, gain: 0.1, a: 0.1, pan: 0.2 });
|
|
696
|
+
click(T.err[0] + 0.3, 0.5, 0.3);
|
|
697
|
+
[3, 2, 1, 0].forEach((li, i) => click(T.back[0] + (1 - (li + 0.4) / 3.8) * (T.back[1] - T.back[0]), 0.75, 0.3 - i * 0.2)); // layers light up backwards
|
|
698
|
+
k.noise(T.back[0], { dur: 0.6, color: 'brown', filter: 'lowpass', f: [[0, 250], [0.6, 900]], gain: 0.12, a: 0.3, minor: true });
|
|
699
|
+
click(when((t) => sm(T.adjust, T.adjust + 0.75, t), 0.6, T.adjust, T.adjust + 0.8), 0.6, 0.1);
|
|
700
|
+
k.noise(T.fwd2[0], { dur: 0.3, color: 'pink', filter: 'bandpass', f: [[0, 500], [0.3, 2200]], q: 1.2, gain: 0.08, a: 0.2, minor: true });
|
|
701
|
+
chord(T.cat, ['D4', 'F#4', 'A4'], 1.1, 0.9); bwoom(T.cat, 0.45, 0.9, 74); // "cat" correct
|
|
702
|
+
// loop ring: one smooth circular pass, panned around
|
|
703
|
+
[[-0.6, 0], [0, 0.2], [0.6, 0.4]].forEach(([pan, dt]) => k.noise(T.loop[0] + dt, { dur: 0.35, color: 'pink', filter: 'bandpass', f: [[0, 400], [0.18, 1300], [0.35, 500]], q: 0.9, gain: 0.12, a: 0.15, pan, minor: true }));
|
|
704
|
+
click(T.loop[0] + 0.2, 0.6, 0.4);
|
|
705
|
+
|
|
706
|
+
// ---- beat 4: accuracy
|
|
707
|
+
glide(10.25, 0.85, 1.0, 0, false);
|
|
708
|
+
click(T.acc + 0.15, 0.6, 0.2);
|
|
709
|
+
bwoom(T.num[0] - 0.15, 0.35, 0.9, 66);
|
|
710
|
+
ticks((t) => Math.round(accVal(eo(sm(T.num[0], T.num[1], t)))), T.num[0] + 0.02, T.num[1] - 0.02, 0.085, 0.6, 0.3);
|
|
711
|
+
air(T.num[0] + 0.2, T.lock - T.num[0] - 0.2, 1.2);
|
|
712
|
+
bwoom(T.lock, 1.35, 2.2, 52); // the 97% lock: biggest hit
|
|
713
|
+
chord(T.lock, ['D3', 'A3', 'D4', 'F#4', 'A4'], 1.8, 1.0);
|
|
714
|
+
k.noise(T.lock, { dur: 0.9, color: 'pink', filter: 'lowpass', f: [[0, 2000], [0.9, 200]], gain: 0.16, a: 0.01, verb: 0.4 });
|
|
715
|
+
k.noise(T.gleam[0], { dur: 0.5, color: 'pink', filter: 'bandpass', f: [[0, 1400], [0.25, 2600], [0.5, 1500]], q: 1.5, gain: 0.05, a: 0.2, minor: true });
|
|
716
|
+
|
|
717
|
+
// ---- beat 5: light sweep to the white stage, tagline, resolve
|
|
718
|
+
air(12.75, 0.3, 0.6);
|
|
719
|
+
k.noise(T.sweep[0], { dur: 0.5, color: 'pink', filter: 'bandpass', f: [[0, 380], [0.25, 3000], [0.5, 900]], q: 0.8, gain: 0.26, a: 0.22, pan: -0.4, verb: 0.3 });
|
|
720
|
+
k.noise(T.sweep[0] + 0.12, { dur: 0.4, color: 'pink', filter: 'bandpass', f: [[0, 600], [0.2, 2600], [0.4, 900]], q: 0.8, gain: 0.18, a: 0.15, pan: 0.5, verb: 0.3 });
|
|
721
|
+
bwoom(T.sweep[0] + 0.25, 0.55, 1.2, 60);
|
|
722
|
+
T.tag.forEach((t, i) => click(t, 0.7, (i - 2) * 0.15));
|
|
723
|
+
chord(T.tag[4], ['D2', 'A2', 'D3', 'F#3', 'A3', 'E4'], 1.45, 1.0); // the resolve under the tagline
|
|
724
|
+
bwoom(T.tag[4], 0.6, 1.4, 55);
|
|
725
|
+
click(14.5, 0.5);
|
|
726
|
+
},
|
|
727
|
+
});
|
|
728
|
+
}
|