@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,756 @@
|
|
|
1
|
+
{
|
|
2
|
+
const TAU = Math.PI * 2;
|
|
3
|
+
const nrm = (a) => { const l = Math.hypot(a[0], a[1], a[2]) || 1; return [a[0] / l, a[1] / l, a[2] / l]; };
|
|
4
|
+
const LIGHT = nrm([-0.5, -0.66, 0.58]);
|
|
5
|
+
const HALF = nrm([LIGHT[0], LIGHT[1], LIGHT[2] + 1]);
|
|
6
|
+
|
|
7
|
+
// lumpy closed shape from a centre + radius function
|
|
8
|
+
const lumpy = (c, nz, cx, cy, rx, ry, seed, amp = 0.05, rot = 0) => {
|
|
9
|
+
c.beginPath();
|
|
10
|
+
const N = 72, cr = Math.cos(rot), sr = Math.sin(rot);
|
|
11
|
+
for (let i = 0; i <= N; i++) {
|
|
12
|
+
const a = (i / N) * TAU, k = 1 + amp * nz.n2(Math.cos(a) * 1.3 + seed, Math.sin(a) * 1.3 + seed * 0.7);
|
|
13
|
+
const x = Math.cos(a) * rx * k, y = Math.sin(a) * ry * k;
|
|
14
|
+
const px = cx + x * cr - y * sr, py = cy + x * sr + y * cr;
|
|
15
|
+
i ? c.lineTo(px, py) : c.moveTo(px, py);
|
|
16
|
+
}
|
|
17
|
+
c.closePath();
|
|
18
|
+
c.fill();
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
let WALL = null; // static set wall: identical every frame, rendered once
|
|
22
|
+
const SEQ = {
|
|
23
|
+
pop: [[0.5, 0.42], [1.16, 0.8], [0.9, 1.14], [1.04, 0.97], [1, 1]],
|
|
24
|
+
lid: [[1, 0.12], [1, 0.38], [1, 0.66], [1, 0.9], [1, 1.05], [1, 1]],
|
|
25
|
+
};
|
|
26
|
+
// =====================================================================
|
|
27
|
+
// EXPLAINER: a fixed clay set; every prop is a baked plasticine lump that
|
|
28
|
+
// is placed, popped, slid and dropped on twos (12 fps) like a real animator
|
|
29
|
+
// moving pieces between exposures. Sprites are baked once and cached.
|
|
30
|
+
// =====================================================================
|
|
31
|
+
const CLX = {};
|
|
32
|
+
const cnz = () => CLX.nz || (CLX.nz = H.makeNoise(8));
|
|
33
|
+
// bake a clay lump; draw(c) paints the silhouette in local coords [0..w]x[0..h]
|
|
34
|
+
const bake = (key, w, h, o) => {
|
|
35
|
+
if (CLX[key]) return CLX[key];
|
|
36
|
+
const nz = cnz(), R = o.R || 14, pad = Math.ceil(R * 2 + 6), ox = o.ox || 0, oy = o.oy || 0;
|
|
37
|
+
const W2 = Math.ceil(w + pad * 2), H2 = Math.ceil(h + pad * 2);
|
|
38
|
+
const M = H.layer(W2, H2), mc = M.getContext('2d', { willReadFrequently: true });
|
|
39
|
+
mc.translate(pad, pad); mc.fillStyle = '#fff'; mc.strokeStyle = '#fff'; o.draw(mc);
|
|
40
|
+
const ds = 3, sw = Math.ceil(W2 / ds), sh = Math.ceil(H2 / ds);
|
|
41
|
+
const Bs = H.layer(sw, sh), bsc = Bs.getContext('2d'); bsc.filter = `blur(${R / ds}px)`; bsc.drawImage(M, 0, 0, sw, sh);
|
|
42
|
+
const B = H.layer(W2, H2), bc = B.getContext('2d', { willReadFrequently: true }); bc.drawImage(Bs, 0, 0, W2, H2);
|
|
43
|
+
const md = mc.getImageData(0, 0, W2, H2).data, bd = bc.getImageData(0, 0, W2, H2).data;
|
|
44
|
+
const Hh = new Float32Array(W2 * H2), A = new Float32Array(W2 * H2), lump = o.lump ?? 1.2, seed = o.seed || 1;
|
|
45
|
+
for (let y = 0; y < H2; y++) for (let x = 0; x < W2; x++) {
|
|
46
|
+
const i = y * W2 + x, a = bd[i * 4 + 3] / 255, ap = H.clamp((a - 0.42) / 0.58);
|
|
47
|
+
A[i] = ap;
|
|
48
|
+
if (!md[i * 4 + 3]) continue;
|
|
49
|
+
const X = x + ox, Y = y + oy;
|
|
50
|
+
Hh[i] = Math.sqrt(1 - (1 - ap) * (1 - ap)) * R * (o.dome ?? 1.1) + nz.n2(X * 0.025 + seed, Y * 0.025) * lump + nz.n2(X * 0.11 + (o.boil || 0) * 1.7, Y * 0.11 + seed) * 0.35;
|
|
51
|
+
}
|
|
52
|
+
(o.fps || []).forEach((f) => {
|
|
53
|
+
const R2 = f[2], ang = f[3], ca = Math.cos(ang), sa = Math.sin(ang);
|
|
54
|
+
for (let y = Math.max(0, Math.floor(f[1] + pad - R2)); y <= Math.min(H2 - 1, f[1] + pad + R2); y++) for (let x = Math.max(0, Math.floor(f[0] + pad - R2)); x <= Math.min(W2 - 1, f[0] + pad + R2); x++) {
|
|
55
|
+
const dx0 = x - pad - f[0], dy0 = y - pad - f[1], dx = dx0 * ca + dy0 * sa, dy = (-dx0 * sa + dy0 * ca) * 1.45, d = Math.hypot(dx, dy);
|
|
56
|
+
if (d >= R2) continue;
|
|
57
|
+
Hh[y * W2 + x] += Math.sin(d * 1.6 + nz.n2(dx * 0.06 + ang, dy * 0.06) * 2.5) * 0.22 * Math.pow(1 - d / R2, 1.5) * H.smooth(-0.6, 0.4, Math.cos(Math.atan2(dy, dx) - ang * 2));
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
(o.marks || []).forEach((m) => {
|
|
61
|
+
const [ax, ay, bx, by] = m.map((v, i) => (i < 4 ? v + pad : v)), vx = bx - ax, vy = by - ay, L2 = vx * vx + vy * vy || 1, dep = m[4] || 1.2;
|
|
62
|
+
for (let y = Math.max(0, Math.floor(Math.min(ay, by) - 9)); y <= Math.min(H2 - 1, Math.max(ay, by) + 9); y++) for (let x = Math.max(0, Math.floor(Math.min(ax, bx) - 9)); x <= Math.min(W2 - 1, Math.max(ax, bx) + 9); x++) {
|
|
63
|
+
const u = H.clamp(((x - ax) * vx + (y - ay) * vy) / L2), d = Math.hypot(x - ax - vx * u, y - ay - vy * u);
|
|
64
|
+
if (d > 8) continue;
|
|
65
|
+
Hh[y * W2 + x] += Math.sin(Math.PI * Math.min(1, u * 1.05 + 0.02)) * (-dep * Math.exp((-d * d) / (o.markW || 3.2)) + 0.4 * dep * Math.exp(-((d - 3.4) ** 2) / 2));
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
const out = mc.createImageData(W2, H2), od = out.data, base = H.hex(o.color), sss = o.sss || [1.12, 0.92, 0.85];
|
|
69
|
+
for (let y = 1; y < H2 - 1; y++) for (let x = 1; x < W2 - 1; x++) {
|
|
70
|
+
const i = y * W2 + x, ma = md[i * 4 + 3];
|
|
71
|
+
if (!ma) continue;
|
|
72
|
+
const n = nrm([-(Hh[i + 1] - Hh[i - 1]) * 0.5, -(Hh[i + W2] - Hh[i - W2]) * 0.5, 1]);
|
|
73
|
+
const diff = H.clamp((n[0] * LIGHT[0] + n[1] * LIGHT[1] + n[2] * LIGHT[2] + 0.42) / 1.42);
|
|
74
|
+
const spec = Math.pow(Math.max(0, n[0] * HALF[0] + n[1] * HALF[1] + n[2] * HALF[2]), 26) * (o.spec ?? 0.3);
|
|
75
|
+
const k = (0.3 + 0.86 * diff) * (0.72 + 0.28 * Math.min(1, A[i] * 1.4)), sh2 = 1 - diff, k4 = i * 4;
|
|
76
|
+
od[k4] = Math.min(255, base[0] * k * (1 + (sss[0] - 1) * sh2) + spec * 255);
|
|
77
|
+
od[k4 + 1] = Math.min(255, base[1] * k * (1 + (sss[1] - 1) * sh2) + spec * 245);
|
|
78
|
+
od[k4 + 2] = Math.min(255, base[2] * k * (1 + (sss[2] - 1) * sh2) + spec * 230);
|
|
79
|
+
od[k4 + 3] = ma;
|
|
80
|
+
}
|
|
81
|
+
const O = H.layer(W2, H2); O.getContext('2d').putImageData(out, 0, 0); O.pad = pad; O.w = w; O.h = h;
|
|
82
|
+
return (CLX[key] = O);
|
|
83
|
+
};
|
|
84
|
+
// place a sprite: (x,y) = top-left of its shape box; anchor (ax,ay) in local coords for squash/rotate
|
|
85
|
+
const place = (ctx, spr, x, y, o = {}) => {
|
|
86
|
+
if (!spr) return;
|
|
87
|
+
const ax = o.ax ?? spr.w / 2, ay = o.ay ?? spr.h;
|
|
88
|
+
ctx.save();
|
|
89
|
+
if (o.shadow !== false) { const s = o.shadow || {}; ctx.shadowColor = `rgba(40,20,10,${s.a ?? 0.4})`; ctx.shadowBlur = s.blur ?? 10; ctx.shadowOffsetX = s.dx ?? 6; ctx.shadowOffsetY = s.dy ?? 7; }
|
|
90
|
+
ctx.translate(x + ax, y + ay); if (o.rot) ctx.rotate(o.rot); ctx.scale(o.sx ?? 1, o.sy ?? 1); ctx.translate(-ax, -ay);
|
|
91
|
+
ctx.drawImage(spr, -spr.pad, -spr.pad); ctx.restore();
|
|
92
|
+
};
|
|
93
|
+
const prn = (seed, w, h, n, R) => { const r = H.rng(seed); return Array.from({ length: n }, () => [r.range(w * 0.15, w * 0.85), r.range(h * 0.15, h * 0.85), R * r.range(0.7, 1.2), r() * 50]); };
|
|
94
|
+
const FR = (px) => `700 ${px}px "Fredoka"`;
|
|
95
|
+
const mctx = () => CLX.m || (CLX.m = H.layer(4, 4).getContext('2d'));
|
|
96
|
+
const glyph = (ch, px, col) => {
|
|
97
|
+
const c = mctx(); c.font = FR(px); const w = Math.ceil(c.measureText(ch).width) + 4, h = Math.ceil(px * 1.05);
|
|
98
|
+
return bake('g' + ch + px + col, w, h, { R: Math.max(4, px * 0.075), dome: 1.3, lump: 0.8, seed: ch.charCodeAt(0), color: col, draw: (x) => { x.font = FR(px); x.fillText(ch, 2, px * 0.82); }, fps: px > 60 ? prn(ch.charCodeAt(0) + px, w, h, 1, px * 0.18) : [] });
|
|
99
|
+
};
|
|
100
|
+
const PAL = ['#f2c14e', '#f07b5a', '#f6efe3', '#ef8fb0', '#a8dd8a', '#7fd0e0'];
|
|
101
|
+
|
|
102
|
+
const EXPLAIN = (ctx, W, H_, t) => {
|
|
103
|
+
const nz = cnz();
|
|
104
|
+
const tq = Math.floor(t * 12) / 12, fr = Math.floor(t * 12);
|
|
105
|
+
// ---- stepped life of a piece: pops on (squash & stretch), then leaves by falling / sliding ----
|
|
106
|
+
const life = (st, en = 99, seed = 0, mode = 'fall') => {
|
|
107
|
+
if (tq + 1e-6 < st) return null;
|
|
108
|
+
const k = Math.floor((tq - st) * 12 + 1e-6), e = SEQ.pop[Math.min(4, k >> 1)];
|
|
109
|
+
let sx = e[0], sy = e[1], dx = 0, dy = 0, rot = 0;
|
|
110
|
+
if (tq >= en) {
|
|
111
|
+
const d = tq - en + 1 / 12;
|
|
112
|
+
if (mode === 'fall') { dy = 2400 * d * d; rot = ((((seed * 37) % 10) / 10) - 0.5) * d * 5; }
|
|
113
|
+
else if (mode === 'right') dx = 2600 * d * d;
|
|
114
|
+
else if (mode === 'left') dx = -2600 * d * d;
|
|
115
|
+
if (dy > 900 || Math.abs(dx) > 1500) return null;
|
|
116
|
+
}
|
|
117
|
+
return { sx, sy, dx, dy, rot };
|
|
118
|
+
};
|
|
119
|
+
const word = (str, x, y, px, st, en, mode = 'fall', cols = PAL, step = 1 / 12, colOff = 0) => {
|
|
120
|
+
const c = mctx(); c.font = FR(px);
|
|
121
|
+
let cx = x, i = 0;
|
|
122
|
+
for (const ch of str) {
|
|
123
|
+
const w = c.measureText(ch).width;
|
|
124
|
+
if (ch !== ' ') {
|
|
125
|
+
const L = life(st + i * step, en == null ? 99 : en + (mode === 'fall' ? i * (1 / 24) : 0), i + colOff, mode);
|
|
126
|
+
if (L) {
|
|
127
|
+
const jr = H.rng(ch.charCodeAt(0) * 7 + i + colOff);
|
|
128
|
+
const col = typeof cols === 'string' ? cols : cols[(i + colOff) % cols.length];
|
|
129
|
+
place(ctx, glyph(ch, px, col), cx + L.dx, y - px * 0.82 + L.dy, { sx: L.sx, sy: L.sy, rot: (jr() - 0.5) * 0.14 + L.rot, shadow: { blur: px * 0.09, dx: px * 0.05, dy: px * 0.07, a: 0.45 } });
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
cx += w + px * 0.04; i++;
|
|
133
|
+
}
|
|
134
|
+
return cx;
|
|
135
|
+
};
|
|
136
|
+
const wordW = (str, px) => { const c = mctx(); c.font = FR(px); let w = 0; for (const ch of str) w += c.measureText(ch).width + px * 0.04; return w; };
|
|
137
|
+
const obj = (spr, x, y, L, o = {}) => { if (L) place(ctx, spr, x + L.dx, y + L.dy, { ...o, sx: (o.sx ?? 1) * L.sx, sy: (o.sy ?? 1) * L.sy, rot: (o.rot || 0) + L.rot }); };
|
|
138
|
+
const boil = fr % 3;
|
|
139
|
+
// contact AO: one cached blurred ellipse, scaled under anything resting on the table
|
|
140
|
+
const AO = CLX.ao || (CLX.ao = (() => { const C = H.layer(240, 100), c = C.getContext('2d'); c.filter = 'blur(10px)'; c.fillStyle = 'rgb(70,20,5)'; c.beginPath(); c.ellipse(120, 50, 90, 22, 0, 0, TAU); c.fill(); return C; })());
|
|
141
|
+
const contact = (cx, cy, rx, ry, a = 0.45) => { ctx.save(); ctx.globalAlpha = a; ctx.drawImage(AO, cx - (rx * 120) / 90, cy - (ry * 50) / 22, (rx * 240) / 90, (ry * 100) / 22); ctx.restore(); };
|
|
142
|
+
|
|
143
|
+
// ---------- set: wall + table, baked once ----------
|
|
144
|
+
if (!CLX.bg) {
|
|
145
|
+
const C = H.layer(W, H_), c = C.getContext('2d');
|
|
146
|
+
c.fillStyle = '#3f8593'; c.fillRect(0, 0, W, H_);
|
|
147
|
+
const wall = bake('wall', W, 520, { R: 4, dome: 0, lump: 3.2, seed: 3, color: '#4f9fae', spec: 0.12, draw: (x) => x.fillRect(-30, -30, W + 60, 580), fps: prn(11, W, 470, 12, 30), markW: 14 });
|
|
148
|
+
c.save(); c.filter = 'blur(1.6px)'; c.drawImage(wall, -wall.pad, -wall.pad); c.restore();
|
|
149
|
+
const g = c.createRadialGradient(620, 220, 30, 640, 300, 760); g.addColorStop(0, 'rgba(255,240,200,0.22)'); g.addColorStop(1, 'rgba(10,20,30,0.35)');
|
|
150
|
+
c.fillStyle = g; c.fillRect(0, 0, W, H_);
|
|
151
|
+
const tab = bake('table', W + 80, 240, { R: 22, dome: 1.0, lump: 2.4, seed: 80, color: '#d0703f', draw: (x) => { x.beginPath(); x.moveTo(0, 14); for (let X = 0; X <= W + 80; X += 20) x.lineTo(X, 6 + nz.n2(X * 0.01, 3) * 8); x.lineTo(W + 80, 300); x.lineTo(0, 300); x.closePath(); x.fill(); }, fps: prn(81, W, 200, 7, 30), marks: (() => { const r = H.rng(82); return Array.from({ length: 6 }, () => { const x = r.range(40, W), y = r.range(40, 200), a = r() * TAU, l = r.range(50, 110); return [x, y, x + Math.cos(a) * l, y + Math.sin(a) * l, 1.2]; }); })(), markW: 16 });
|
|
152
|
+
c.save(); c.shadowColor = 'rgba(40,20,10,0.35)'; c.shadowBlur = 30; c.shadowOffsetY = -10; c.drawImage(tab, -40 - tab.pad, 500 - tab.pad); c.restore();
|
|
153
|
+
const g2 = c.createLinearGradient(0, 600, 0, H_); g2.addColorStop(0, 'rgba(60,20,10,0)'); g2.addColorStop(1, 'rgba(60,20,10,0.35)');
|
|
154
|
+
c.fillStyle = g2; c.fillRect(0, 600, W, 120);
|
|
155
|
+
CLX.bg = C;
|
|
156
|
+
}
|
|
157
|
+
ctx.drawImage(CLX.bg, 0, 0);
|
|
158
|
+
|
|
159
|
+
// ---------- props (baked) ----------
|
|
160
|
+
const brainS = bake('brain' + boil, 280, 210, { R: 26, lump: 1.6, seed: 31, color: '#ef8fb0', boil, draw: (c) => {
|
|
161
|
+
[[70, 90, 70], [130, 60, 68], [200, 75, 66], [225, 130, 58], [160, 140, 70], [85, 145, 62], [140, 100, 80]].forEach(([x, y, r]) => { c.beginPath(); c.arc(x, y, r * 0.95, 0, TAU); c.fill(); });
|
|
162
|
+
}, markW: 7, marks: [[140, 18, 140, 192, 3.0], [40, 80, 75, 70, 2.2], [75, 70, 100, 100, 2.2], [55, 125, 105, 120, 2.2], [90, 165, 125, 145, 2.2], [100, 40, 120, 60, 2.0], [170, 40, 200, 65, 2.2], [200, 65, 240, 60, 2.2], [175, 105, 230, 120, 2.2], [165, 160, 210, 150, 2.2], [210, 150, 245, 165, 2.0], [60, 100, 120, 92, 1.8]], fps: prn(33, 280, 210, 2, 24) });
|
|
163
|
+
const card = (kind) => CLX['card' + kind] || (CLX['card' + kind] = (() => {
|
|
164
|
+
const cat = kind === 'cat', C = H.layer(190, 210), c = C.getContext('2d');
|
|
165
|
+
const slab = bake('slab', 150, 170, { R: 10, dome: 0.7, lump: 0.8, seed: 5, color: '#f6efe3', sss: [1.04, 1, 1], draw: (x) => { x.beginPath(); x.roundRect(0, 0, 150, 170, 14); x.fill(); }, fps: prn(6, 150, 170, 2, 18) });
|
|
166
|
+
const pc = (spr, x, y) => { c.save(); c.shadowColor = 'rgba(40,20,10,0.4)'; c.shadowBlur = 5; c.shadowOffsetX = 3; c.shadowOffsetY = 4; c.drawImage(spr, x - spr.pad, y - spr.pad); c.restore(); };
|
|
167
|
+
pc(slab, 15, 10);
|
|
168
|
+
const head = bake('head' + kind, 104, 96, { R: 14, lump: 0.8, seed: cat ? 41 : 42, color: cat ? '#f08a3c' : '#a8673c', draw: (x) => {
|
|
169
|
+
x.beginPath(); x.ellipse(52, 56, 46, 38, 0, 0, TAU); x.fill();
|
|
170
|
+
if (cat) { x.beginPath(); x.moveTo(12, 40); x.lineTo(20, 0); x.lineTo(46, 24); x.fill(); x.beginPath(); x.moveTo(92, 40); x.lineTo(84, 0); x.lineTo(58, 24); x.fill(); }
|
|
171
|
+
else { x.beginPath(); x.ellipse(10, 54, 12, 30, 0.25, 0, TAU); x.fill(); x.beginPath(); x.ellipse(94, 54, 12, 30, -0.25, 0, TAU); x.fill(); }
|
|
172
|
+
}, fps: prn(cat ? 43 : 44, 104, 96, 1, 16) });
|
|
173
|
+
pc(head, 38, 28);
|
|
174
|
+
const eye = bake('eye', 12, 12, { R: 5, dome: 1.4, lump: 0.2, seed: 9, color: '#23202a', spec: 0.9, draw: (x) => { x.beginPath(); x.arc(6, 6, 6, 0, TAU); x.fill(); } });
|
|
175
|
+
pc(eye, 66, 72); pc(eye, 100, 72);
|
|
176
|
+
const nose = bake('nose' + kind, 16, 11, { R: 5, dome: 1.4, lump: 0.2, seed: 10, color: cat ? '#e0607a' : '#23202a', spec: 0.6, draw: (x) => { x.beginPath(); x.ellipse(8, 5.5, 8, 5.5, 0, 0, TAU); x.fill(); } });
|
|
177
|
+
pc(nose, 82, 92);
|
|
178
|
+
// the label is part of the card: clay letters pressed into the slab
|
|
179
|
+
const lw = wordW(kind, 40); let lx = 95 - lw / 2;
|
|
180
|
+
for (const ch of kind) { const g = glyph(ch, 40, cat ? '#e0607a' : '#2e6f9a'); pc(g, lx, 132); lx += mctx().measureText(ch).width + 1.6; }
|
|
181
|
+
C.pad = 0; C.w = 190; C.h = 210;
|
|
182
|
+
return C;
|
|
183
|
+
})());
|
|
184
|
+
const coilAbs = (key, pts, col, L, wdt) => {
|
|
185
|
+
if (!L) return;
|
|
186
|
+
let x0 = 1e9, y0 = 1e9, x1 = -1e9, y1 = -1e9; pts.forEach(([x, y]) => { x0 = Math.min(x0, x); y0 = Math.min(y0, y); x1 = Math.max(x1, x); y1 = Math.max(y1, y); });
|
|
187
|
+
x0 -= 30; y0 -= 30; x1 += 30; y1 += 30;
|
|
188
|
+
const spr = bake('coil' + key, x1 - x0, y1 - y0, { R: 7, dome: 1.3, lump: 0.6, seed: key.length * 7, color: col, draw: (c) => {
|
|
189
|
+
c.translate(-x0, -y0); c.lineCap = 'round'; c.lineJoin = 'round'; c.lineWidth = wdt || 16;
|
|
190
|
+
c.beginPath(); pts.forEach(([x, y], i) => (i ? c.lineTo(x, y) : c.moveTo(x, y))); c.stroke();
|
|
191
|
+
const [ex, ey] = pts[pts.length - 1], [px, py] = pts[pts.length - 2], a = Math.atan2(ey - py, ex - px);
|
|
192
|
+
c.beginPath(); c.moveTo(ex + Math.cos(a) * 22, ey + Math.sin(a) * 22); c.lineTo(ex + Math.cos(a + 2.3) * 26, ey + Math.sin(a + 2.3) * 26); c.lineTo(ex + Math.cos(a - 2.3) * 26, ey + Math.sin(a - 2.3) * 26); c.closePath(); c.fill();
|
|
193
|
+
} });
|
|
194
|
+
place(ctx, spr, x0 + L.dx, y0 + L.dy, { sx: L.sx, sy: L.sy, ax: pts[0][0] - x0, ay: pts[0][1] - y0, rot: L.rot, shadow: { blur: 6, dx: 4, dy: 6, a: 0.4 } });
|
|
195
|
+
};
|
|
196
|
+
const curve = (ax, ay, cx, cy, bx, by) => Array.from({ length: 21 }, (_, i) => { const u = i / 20; return [(1 - u) * (1 - u) * ax + 2 * u * (1 - u) * cx + u * u * bx, (1 - u) * (1 - u) * ay + 2 * u * (1 - u) * cy + u * u * by]; });
|
|
197
|
+
|
|
198
|
+
// ================= BEAT 1: the question, pressed letters on the wall =================
|
|
199
|
+
word('How does', 640 - wordW('How does', 104) / 2, 230, 104, 0.1, 2.0, 'fall', PAL);
|
|
200
|
+
word('AI learn?', 640 - wordW('AI learn?', 120) / 2, 390, 120, 0.85, 2.15, 'fall', PAL, 1 / 12, 3);
|
|
201
|
+
// header: the question rides along, top-left
|
|
202
|
+
word('How does AI learn?', 28, 64, 44, 2.35, null, 'fall', '#f6efe3', 1 / 24);
|
|
203
|
+
|
|
204
|
+
// ================= BEAT 2: labelled examples slide into the clay brain =================
|
|
205
|
+
// brain position: on the right in beat 2, pushed to centre for beat 3, off right for beat 4
|
|
206
|
+
const bShift = Math.round(H.ease.inOut(H.clamp((tq - 5.9) / 0.5)) * 6) / 6;
|
|
207
|
+
let bx = H.lerp(880, 470, bShift), by = 300;
|
|
208
|
+
let gulp = 0;
|
|
209
|
+
const KINDS = ['cat', 'dog', 'dog', 'cat', 'dog', 'cat', 'cat', 'dog'];
|
|
210
|
+
KINDS.forEach((k, i) => { const s0 = 2.5 + i * 0.36, arrive = s0 + (bx - 40 + 150) / 600; if (tq >= arrive && tq < arrive + 0.17) gulp = 1; });
|
|
211
|
+
const exitB = tq >= 10.25 ? 2600 * (tq - 10.25 + 1 / 12) ** 2 : 0;
|
|
212
|
+
const drawBrain = () => { if (tq >= 2.4 && exitB < 1400) {
|
|
213
|
+
const L = life(2.4);
|
|
214
|
+
contact(bx + 140 + exitB, by + 206, 128 * L.sx, 13 * L.sy, 0.55);
|
|
215
|
+
contact(bx + 140 + exitB, by + 210, 70 * L.sx, 6, 0.4);
|
|
216
|
+
place(ctx, brainS, bx + exitB, by, { sx: L.sx * (gulp ? 1.07 : 1), sy: L.sy * (gulp ? 0.93 : 1), shadow: { blur: 22, dx: 12, dy: 14, a: 0.42 } });
|
|
217
|
+
word('model', bx + 140 - wordW('model', 52) / 2 + exitB, 600, 52, 2.6, 6.25, 'fall', '#ef8fb0');
|
|
218
|
+
} };
|
|
219
|
+
if (tq < 6.3) {
|
|
220
|
+
// counter: clay digits re-pressed each time the number changes
|
|
221
|
+
const n = Math.round(1e6 * Math.pow(H.clamp((tq - 2.7) / 2.5), 2)), str = n.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
222
|
+
if (tq >= 2.55) {
|
|
223
|
+
const e = word(str, 40, 200, 88, 2.55, 5.8, 'fall', '#f2c14e', 0);
|
|
224
|
+
word('examples', e + 14, 196, 48, 2.7, 5.85, 'fall', '#a8dd8a', 1 / 24);
|
|
225
|
+
}
|
|
226
|
+
coilAbs('a1', curve(70, 270, 420, 235, 800, 290), '#f6efe3', life(2.55, 5.75, 3), 16);
|
|
227
|
+
KINDS.forEach((k, i) => {
|
|
228
|
+
const s0 = 2.5 + i * 0.36;
|
|
229
|
+
if (tq < s0) return;
|
|
230
|
+
const x = -190 + (tq - s0) * 600;
|
|
231
|
+
if (x > bx - 40) return;
|
|
232
|
+
const hop = ((fr + i) % 2) * 5;
|
|
233
|
+
const L = life(s0, 5.75, i);
|
|
234
|
+
if (L && L.dy < 40) contact(x + L.dx + 95, 512, 78, 9 - hop * 0.6, 0.32 - hop * 0.02);
|
|
235
|
+
if (L) place(ctx, card(k), x + L.dx, 300 - hop + L.dy, { rot: (((i * 37) % 10) / 100 - 0.05) + L.rot, shadow: { blur: 12, dx: 8, dy: 8, a: 0.4 } });
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
drawBrain();
|
|
240
|
+
// ================= BEAT 3: guess -> check -> adjust =================
|
|
241
|
+
if (tq >= 6.1 && tq < 10.7) {
|
|
242
|
+
const out = 10.25;
|
|
243
|
+
{ const L = life(6.2, out, 1, 'right'); if (L) contact(135 + L.dx, 512, 78 * L.sx, 9, 0.32); }
|
|
244
|
+
obj(card('cat'), 40, 300, life(6.2, out, 1, 'right'), { shadow: { blur: 12, dx: 8, dy: 8, a: 0.4 } });
|
|
245
|
+
coilAbs('a2', curve(250, 400, 330, 380, 440, 400), '#f6efe3', life(6.45, out, 2, 'right'));
|
|
246
|
+
coilAbs('a3', curve(770, 360, 810, 320, 860, 340), '#f6efe3', life(6.9, out, 3, 'right'));
|
|
247
|
+
word('Guess', 735, 290, 50, 7.0, out, 'right', '#f2c14e', 1 / 24);
|
|
248
|
+
// knobs (weights) under the brain turn in steps
|
|
249
|
+
const kn = bake('knob', 64, 64, { R: 12, dome: 1.2, lump: 0.6, seed: 61, color: '#c9c5bd', sss: [1.04, 1, 1.02], draw: (c) => { c.beginPath(); c.arc(32, 32, 32, 0, TAU); c.fill(); }, fps: [[32, 32, 14, 1]] });
|
|
250
|
+
const ptr = bake('ptr', 10, 30, { R: 4, dome: 1.3, lump: 0.2, seed: 62, color: '#c43a46', draw: (c) => c.fillRect(0, 0, 10, 30) });
|
|
251
|
+
const turn = Math.round(H.clamp((tq - 8.9) / 0.6) * 4) / 4;
|
|
252
|
+
[0, 1, 2].forEach((i) => {
|
|
253
|
+
const L = life(6.3 + i * 0.08, out, i, 'right'); if (!L) return;
|
|
254
|
+
const kx = bx + 30 + i * 80, ky = 540;
|
|
255
|
+
contact(kx + 34 + L.dx, ky + 60, 38 * L.sx, 8, 0.7);
|
|
256
|
+
place(ctx, kn, kx + L.dx, ky, { sx: L.sx, sy: L.sy, shadow: { blur: 8, dx: 5, dy: 6, a: 0.45 } });
|
|
257
|
+
const a = [-0.9, 0.6, -0.3][i] + [1.5, -1.1, 1.2][i] * turn;
|
|
258
|
+
place(ctx, ptr, kx + 27 + L.dx, ky + 2, { ax: 5, ay: 30, rot: a, sx: L.sx, sy: L.sy, shadow: { blur: 3, dx: 2, dy: 3, a: 0.4 } });
|
|
259
|
+
});
|
|
260
|
+
// speech bubble with the guess
|
|
261
|
+
const bub = bake('bubble', 330, 220, { R: 18, lump: 1.0, seed: 71, color: '#f6efe3', sss: [1.05, 1, 0.98], draw: (c) => { c.beginPath(); c.ellipse(170, 90, 160, 88, 0, 0, TAU); c.fill(); c.beginPath(); c.moveTo(60, 140); c.lineTo(20, 215); c.lineTo(120, 165); c.closePath(); c.fill(); }, fps: prn(72, 330, 180, 2, 22) });
|
|
262
|
+
const shake = tq >= 7.92 && tq < 8.4 ? ((fr % 2) * 2 - 1) * 9 : 0;
|
|
263
|
+
obj(bub, 880 + shake, 210, life(7.25, out, 4, 'right'), { shadow: { blur: 16, dx: 10, dy: 10, a: 0.4 } });
|
|
264
|
+
if (tq < out) {
|
|
265
|
+
word('dog?', 945 + shake, 340, 96, 7.4, 9.55, 'fall', '#2e3760', 1 / 12);
|
|
266
|
+
// wrong: red clay X slapped on, "Check" pressed below
|
|
267
|
+
const xs = bake('xmark', 120, 120, { R: 10, lump: 0.6, seed: 73, color: '#d9473b', draw: (c) => { c.lineWidth = 28; c.lineCap = 'round'; c.beginPath(); c.moveTo(16, 16); c.lineTo(104, 104); c.moveTo(104, 16); c.lineTo(16, 104); c.stroke(); } });
|
|
268
|
+
obj(xs, 1130, 160, life(7.9, 9.5, 5), { rot: 0.1, shadow: { blur: 10, dx: 6, dy: 8, a: 0.45 } });
|
|
269
|
+
word('Check', 935, 492, 52, 8.0, 9.55, 'fall', '#f07b5a', 1 / 24);
|
|
270
|
+
coilAbs('a4', curve(1010, 520, 980, 640, 760, 600), '#d9473b', life(8.35, 9.55, 6));
|
|
271
|
+
word('Adjust', 520, 690, 52, 8.6, 9.6, 'fall', '#f07b5a', 1 / 24);
|
|
272
|
+
word('cat', 965, 340, 104, 9.7, out, 'right', '#4f9a52', 1 / 12);
|
|
273
|
+
const ck = bake('check', 120, 100, { R: 10, lump: 0.6, seed: 74, color: '#4f9a52', draw: (c) => { c.lineWidth = 26; c.lineCap = 'round'; c.lineJoin = 'round'; c.beginPath(); c.moveTo(14, 54); c.lineTo(44, 84); c.lineTo(106, 16); c.stroke(); } });
|
|
274
|
+
obj(ck, 1130, 160, life(9.9, out, 7, 'right'), { shadow: { blur: 10, dx: 6, dy: 8, a: 0.45 } });
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// ================= BEAT 4: accuracy bars squished up from the table =================
|
|
279
|
+
if (tq >= 10.4) {
|
|
280
|
+
const accs = [61, 72, 80, 86, 90, 93, 95, 97];
|
|
281
|
+
let shown = 61;
|
|
282
|
+
accs.forEach((a, i) => {
|
|
283
|
+
const st = 10.6 + i * 0.25, hgt = Math.round(a * 3.4);
|
|
284
|
+
if (tq < st) return;
|
|
285
|
+
const spr = bake('bar' + i, 70, hgt, { R: 16, lump: 1.2, seed: 90 + i, color: i === 7 ? '#d9473b' : i % 2 ? '#7fd0e0' : '#f2c14e', draw: (c) => { c.beginPath(); c.roundRect(0, 0, 70, hgt + 20, 22); c.fill(); }, fps: prn(95 + i, 70, hgt, 1, 18) });
|
|
286
|
+
const k = Math.floor((tq - st) * 12 + 1e-6), e = [[1.25, 0.2], [1.12, 0.55], [0.95, 1.08], [1.03, 0.97], [1, 1]][Math.min(4, k >> 1)];
|
|
287
|
+
contact(187 + i * 96, 538, 46 * e[0], 9, 0.7);
|
|
288
|
+
place(ctx, spr, 150 + i * 96, 520 - hgt, { sx: e[0], sy: e[1], ay: hgt + 20, shadow: { blur: 14, dx: 9, dy: 6, a: 0.4 } });
|
|
289
|
+
shown = H.lerp(i ? accs[i - 1] : 61, a, H.clamp((tq - st) / 0.25));
|
|
290
|
+
});
|
|
291
|
+
word('Accuracy', 40, 175, 64, 10.45, null, 'fall', '#a8dd8a', 1 / 24);
|
|
292
|
+
const v = Math.round(shown) + '%';
|
|
293
|
+
const big = tq >= 12.6 ? [1.25, 1.12, 1.05, 1][Math.min(3, Math.floor((tq - 12.6) * 6))] : 1;
|
|
294
|
+
ctx.save(); ctx.translate(560, 140); ctx.scale(big, big); ctx.translate(-560, -140);
|
|
295
|
+
word(v, 400, 205, 128, 10.5, null, 'fall', tq >= 12.6 ? '#f07b5a' : '#f6efe3', 0);
|
|
296
|
+
ctx.restore();
|
|
297
|
+
if (tq >= 12.6) {
|
|
298
|
+
const star = bake('star', 120, 120, { R: 12, lump: 0.6, seed: 75, color: '#f2c14e', spec: 0.5, draw: (c) => { c.beginPath(); for (let i = 0; i < 10; i++) { const a = -Math.PI / 2 + (i / 10) * TAU, r = i % 2 ? 24 : 58; c.lineTo(60 + Math.cos(a) * r, 62 + Math.sin(a) * r); } c.closePath(); c.fill(); } });
|
|
299
|
+
obj(star, 822, 40, life(12.6), { rot: Math.round((tq - 12.6) * 6) * 0.08, ax: 60, ay: 60, shadow: { blur: 10, dx: 6, dy: 8, a: 0.45 } });
|
|
300
|
+
}
|
|
301
|
+
word('training rounds', 640 - wordW('training rounds', 44) / 2, 600, 44, 11.0, 12.95, 'fall', '#f6efe3', 1 / 24);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// ================= BEAT 5: takeaway pressed into the table front =================
|
|
305
|
+
if (tq >= 13.0) {
|
|
306
|
+
const p = 50, l1 = 'More examples', l2 = 'better guesses';
|
|
307
|
+
const w1 = wordW(l1, p), w2 = wordW(l2, p), tot = w1 + 90 + w2, x0 = 640 - tot / 2;
|
|
308
|
+
word(l1, x0, 640, p, 13.0, null, 'fall', '#f6efe3', 1 / 24);
|
|
309
|
+
coilAbs('a5', [[x0 + w1 + 14, 622], [x0 + w1 + 52, 622]], '#f2c14e', life(13.5), 12);
|
|
310
|
+
word(l2, x0 + w1 + 90, 640, p, 13.55, null, 'fall', '#f2c14e', 1 / 24, 2);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
// ---------- lens finish ----------
|
|
314
|
+
ctx.save(); ctx.globalCompositeOperation = 'soft-light';
|
|
315
|
+
const gg = ctx.createLinearGradient(0, 0, W, H_); gg.addColorStop(0, 'rgba(255,220,170,0.5)'); gg.addColorStop(1, 'rgba(40,60,90,0.4)');
|
|
316
|
+
ctx.fillStyle = gg; ctx.fillRect(0, 0, W, H_); ctx.restore();
|
|
317
|
+
H.vignette(ctx, W, H_, 0.42, '20,12,8');
|
|
318
|
+
{ const f = (H.rng(900 + fr)() - 0.5) * 0.06; ctx.fillStyle = f > 0 ? `rgba(255,240,220,${f})` : `rgba(0,0,0,${-f})`; ctx.fillRect(0, 0, W, H_); }
|
|
319
|
+
H.grain(ctx, W, H_, 0.03, 4 + fr);
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
registerStyle({
|
|
323
|
+
id: 'claymation',
|
|
324
|
+
name: 'Claymation Set',
|
|
325
|
+
category: 'Paper & Craft',
|
|
326
|
+
description: 'A plasticine stop-motion still: chunky hand-squished characters and props with soft waxy subsurface shading, thumbprints, tool marks and lumpy silhouettes on a sculpted clay set, shot with shallow depth of field.',
|
|
327
|
+
motion: 'Animated on twos: the character boils subtly between frames, fingerprints shift, the waving arm snaps pose-to-pose and the chat-bubble dots pop like little clay balls.',
|
|
328
|
+
fonts: ['700 92px "Fredoka"', '700 44px "Fredoka"'],
|
|
329
|
+
frameT: 4.8,
|
|
330
|
+
duration: 5,
|
|
331
|
+
readsPixels: true,
|
|
332
|
+
explainerDuration: 15,
|
|
333
|
+
explainerNote: 'Animated on twos on one clay set: every piece is a baked plasticine lump that the "animator" pops on with squash-and-stretch, slides along the table or knocks off so it falls out of frame; arrows are rolled clay coils, labels and the counter are pressed clay letters re-sculpted each time the number changes, and the wrong guess gets a red clay X slapped on with a shake.',
|
|
334
|
+
explainer(ctx, W, H_, t) { EXPLAIN(ctx, W, H_, t); },
|
|
335
|
+
// Sound: plasticine on a stop-motion set, animated on twos. Every event lands on the 12 fps grid (a piece set to
|
|
336
|
+
// appear at s shows on the first frame >= s), and every piece that pops on gets a soft, low clay "plop" (no
|
|
337
|
+
// chirps); squashes squelch, coils slap down, pieces knocked off the table land offscreen as dull thuds, pieces
|
|
338
|
+
// swept off to the right smear across the table. Times mirror EXPLAIN() above (life()/word() starts, step 1/12 or 1/24).
|
|
339
|
+
explainerSound(k) {
|
|
340
|
+
const q = (s) => Math.ceil(s * 12 - 1e-6) / 12;
|
|
341
|
+
const pan = (x) => H.clamp((x / 1280) * 2 - 1, -1, 1) * 0.6;
|
|
342
|
+
const plop = (t, g = 1, f = 170, p = 0, minor = true) => {
|
|
343
|
+
k.tone(t, { f: [[0, f * 1.6], [0.06, f * 0.7]], dur: 0.11, gain: 0.3 * g, pan: p, minor });
|
|
344
|
+
k.noise(t, { dur: 0.05, color: 'brown', filter: 'lowpass', f: 700, gain: 0.28 * g, a: 0.002, pan: p, minor });
|
|
345
|
+
k.noise(t, { dur: 0.04, filter: 'bandpass', f: 520, q: 1.5, gain: 0.1 * g, a: 0.002, pan: p, minor });
|
|
346
|
+
};
|
|
347
|
+
const squelch = (t, g = 1, p = 0, d = 0.14, minor = true) => {
|
|
348
|
+
k.noise(t, { dur: d, color: 'pink', filter: 'bandpass', f: [[0, 280], [d, 650]], q: 2, gain: 0.3 * g, a: 0.02, pan: p, minor });
|
|
349
|
+
k.tone(t, { f: [[0, 90], [d, 130]], dur: d, gain: 0.12 * g, pan: p, minor });
|
|
350
|
+
};
|
|
351
|
+
const floor = (t, n, g = 1, minor = true) => { // pieces knocked off the table landing offscreen
|
|
352
|
+
for (let i = 0; i < n; i++) k.noise(t + i * 0.07 + (i % 2) * 0.02, { dur: 0.09, color: 'brown', filter: 'lowpass', f: 260, gain: 0.32 * g * (1 - i * 0.08), a: 0.003, pan: (i % 3 - 1) * 0.3, minor });
|
|
353
|
+
};
|
|
354
|
+
const smear = (t, d, g = 1) => { // lumps pushed along the table
|
|
355
|
+
k.noise(t, { dur: d, color: 'brown', filter: 'bandpass', f: [[0, 260], [d, 520]], q: 1.3, gain: 0.28 * g, a: d * 0.3 });
|
|
356
|
+
for (let x = 0; x < d; x += 1 / 12) k.noise(t + x, { dur: 0.05, color: 'pink', filter: 'bandpass', f: 380, q: 2.5, gain: 0.08 * g, a: 0.01, minor: true });
|
|
357
|
+
};
|
|
358
|
+
// a clay word: one plop per frame on which new letters appear
|
|
359
|
+
const word = (str, x, w, st, step, g = 0.6, f = 190) => {
|
|
360
|
+
const fr = new Map(); [...str].forEach((ch, i) => { if (ch !== ' ') { const t = q(st + i * step); if (!fr.has(t)) fr.set(t, i / str.length); } });
|
|
361
|
+
[...fr].forEach(([t, u]) => plop(t, g * 0.42, f, pan(x + w * u)));
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
k.bed('room', 0, 15, { gain: 0.45 });
|
|
365
|
+
|
|
366
|
+
// BEAT 1: the question pressed onto the wall letter by letter, then knocked off (fall at 2.0 / 2.15)
|
|
367
|
+
word('How does', 410, 460, 0.1, 1 / 12, 0.7, 200);
|
|
368
|
+
word('AI learn?', 380, 520, 0.85, 1 / 12, 0.75, 180);
|
|
369
|
+
floor(2.45, 4, 0.9, false); floor(2.62, 4, 0.7);
|
|
370
|
+
word('How does AI learn?', 28, 420, 2.35, 1 / 24, 0.35, 240); // header
|
|
371
|
+
|
|
372
|
+
// BEAT 2: brain plopped down, coil arrow, cards slide in, counter re-pressed
|
|
373
|
+
plop(q(2.4), 1.05, 110, pan(1020), false); squelch(q(2.4) + 1 / 12, 0.7, pan(1020));
|
|
374
|
+
word('model', 960, 160, 2.6, 1 / 12, 0.5, 210);
|
|
375
|
+
plop(q(2.55), 0.9, 140, pan(420)); squelch(q(2.55) + 1 / 12, 0.6, pan(420), 0.2); // coil laid down
|
|
376
|
+
word('examples', 420, 220, 2.7, 1 / 24, 0.4, 230);
|
|
377
|
+
[0, 1, 2, 3, 4, 5, 6, 7].forEach((i) => plop(q(2.5 + i * 0.36), 0.4, 150, -0.6)); // each card set on
|
|
378
|
+
{ // brain gulps a card (squash for 0.17 s) when it arrives; bx moves with bShift from 5.9
|
|
379
|
+
let was = false;
|
|
380
|
+
for (let f = 30; f < 80; f++) {
|
|
381
|
+
const tq = f / 12, bx = H.lerp(880, 470, Math.round(H.ease.inOut(H.clamp((tq - 5.9) / 0.5)) * 6) / 6);
|
|
382
|
+
let gulp = false; for (let i = 0; i < 8; i++) { const a = 2.5 + i * 0.36 + (bx - 40 + 150) / 600; if (tq >= a && tq < a + 0.17) gulp = true; }
|
|
383
|
+
if (gulp && !was && tq < 6.3) squelch(tq, 0.9, pan(bx + 140), 0.12);
|
|
384
|
+
was = gulp;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
{ // counter: n = 1e6 * ((tq-2.7)/2.5)^2 re-pressed; a squish every other frame, 1,000,000 at 5.25
|
|
388
|
+
for (let f = 33; f < 63; f += 2) plop(f / 12, 0.28, 230, pan(200));
|
|
389
|
+
plop(q(5.2), 1.1, 160, pan(200), false); squelch(q(5.2) + 1 / 12, 0.5, pan(200));
|
|
390
|
+
}
|
|
391
|
+
// everything knocked off at 5.75..5.85, lands offscreen; brain shoved to centre (5.9..6.4, steps of 1/6)
|
|
392
|
+
floor(6.3, 5, 0.8);
|
|
393
|
+
smear(q(5.9), 0.5, 0.8);
|
|
394
|
+
|
|
395
|
+
// BEAT 3
|
|
396
|
+
plop(q(6.2), 0.9, 150, pan(130));
|
|
397
|
+
[6.3, 6.38, 6.46].forEach((s, i) => plop(q(s), 0.35, 200, pan(520 + i * 80))); // knobs
|
|
398
|
+
plop(q(6.45), 0.6, 140, pan(340)); plop(q(6.9), 0.6, 140, pan(810)); // coils
|
|
399
|
+
word('Guess', 735, 140, 7.0, 1 / 24, 0.45, 220);
|
|
400
|
+
plop(q(7.25), 1.0, 120, pan(1040)); // bubble
|
|
401
|
+
word('dog?', 945, 200, 7.4, 1 / 12, 0.7, 170);
|
|
402
|
+
// wrong guess: red clay X slapped on (7.92) and the bubble shakes (7.92..8.4)
|
|
403
|
+
const tX = q(7.9);
|
|
404
|
+
k.play('slap', tX, { gain: 0.7, pan: pan(1190) });
|
|
405
|
+
plop(tX, 1.3, 100, pan(1190), false);
|
|
406
|
+
k.tone(tX + 0.02, { f: 'D3', type: 'triangle', dur: 0.16, gain: 0.22, filter: 'lowpass', f2: 700 });
|
|
407
|
+
k.tone(tX + 0.18, { f: 'A2', type: 'triangle', dur: 0.32, gain: 0.24, filter: 'lowpass', f2: 600 });
|
|
408
|
+
for (let f = 96; f < 101; f += 2) squelch(f / 12 + 1 / 12, 0.45, pan(1040), 0.08); // wobble
|
|
409
|
+
word('Check', 935, 150, 8.0, 1 / 24, 0.45, 200);
|
|
410
|
+
plop(q(8.35), 0.6, 140, pan(880)); squelch(q(8.35) + 1 / 12, 0.4, pan(880), 0.18); // red coil back to the knobs
|
|
411
|
+
word('Adjust', 520, 170, 8.6, 1 / 24, 0.45, 200);
|
|
412
|
+
[9.0, 9.125, 9.3333, 9.5].forEach((t) => k.play('tock', q(t), { f: 240, gain: 0.45, pan: pan(600), minor: true })); // knobs twisted
|
|
413
|
+
floor(10.05, 4, 0.6); // X, dog?, Check, Adjust dropped off (9.5..9.6)
|
|
414
|
+
// correction: 'cat' pressed in, green tick plopped on
|
|
415
|
+
word('cat', 965, 170, 9.7, 1 / 12, 0.75, 170);
|
|
416
|
+
plop(q(9.9), 0.85, 130, pan(1190), false);
|
|
417
|
+
k.play('success', q(9.9), { f: 'G5', gain: 0.55, pan: pan(1190) });
|
|
418
|
+
// everything swept off to the right (10.25)
|
|
419
|
+
smear(q(10.25), 0.45, 1.1);
|
|
420
|
+
|
|
421
|
+
// BEAT 4: bars squeezed up out of the table (squash 1.25x0.2 -> stretch), % re-pressed
|
|
422
|
+
word('Accuracy', 40, 260, 10.45, 1 / 24, 0.45, 200);
|
|
423
|
+
for (let i = 0; i < 8; i++) { const t = q(10.6 + i * 0.25); squelch(t, 0.6, pan(185 + i * 96), 0.16); }
|
|
424
|
+
for (let f = 129; f < 151; f += 2) plop(f / 12, 0.24, 240, pan(500)); // % changing
|
|
425
|
+
word('training rounds', 450, 380, 11.0, 1 / 24, 0.3, 230);
|
|
426
|
+
// 97% (12.6): number swells red, gold clay star plopped on: biggest hit
|
|
427
|
+
k.play('impact', 12.6, { gain: 1.45, pan: 0.2 });
|
|
428
|
+
plop(12.6, 2.1, 95, pan(880), false);
|
|
429
|
+
squelch(12.6 + 1 / 6, 0.7, pan(560), 0.2);
|
|
430
|
+
k.play('ding', 12.6, { f: 'E5', gain: 0.6, pan: 0.3 });
|
|
431
|
+
floor(13.45, 4, 0.5); // 'training rounds' knocked off at 12.95
|
|
432
|
+
|
|
433
|
+
// BEAT 5: takeaway pressed into the table front, then it resolves
|
|
434
|
+
word('More examples', 300, 330, 13.0, 1 / 24, 0.45, 200);
|
|
435
|
+
plop(q(13.5), 0.6, 150, pan(660));
|
|
436
|
+
word('better guesses', 720, 360, 13.55, 1 / 24, 0.45, 200);
|
|
437
|
+
['C4', 'G4', 'E5'].forEach((f, i) => k.play('ding', 14.25 + i * 0.08, { f, gain: 0.45 - i * 0.04, pan: (i - 1) * 0.25 }));
|
|
438
|
+
},
|
|
439
|
+
draw(ctx, W, H_, t) {
|
|
440
|
+
const nz = H.makeNoise(8);
|
|
441
|
+
// stop-motion "boil": texture seeds change on twos (12 fps)
|
|
442
|
+
const fr = Math.floor(t * 12);
|
|
443
|
+
const boil = H.rng(500 + fr);
|
|
444
|
+
const tq = fr / 12; // all animation is stepped on 12 fps (shot on twos)
|
|
445
|
+
const boilOff = (Math.floor(t * 12) % 3) * 1.7;
|
|
446
|
+
|
|
447
|
+
// ---------- core: inflate a 2D mask into a lit clay lump ----------
|
|
448
|
+
const blob = (o) => {
|
|
449
|
+
let SX = 1, SY = 1, AX = (o.bb[0] + o.bb[2]) / 2, AY = o.bb[3];
|
|
450
|
+
if (o.at) {
|
|
451
|
+
const k = Math.floor((tq - o.at[0]) * 12 + 1e-6);
|
|
452
|
+
if (k < 0) return;
|
|
453
|
+
const seq = SEQ[o.at[1] || 'pop'], e = seq[Math.min(seq.length - 1, k >> 1)];
|
|
454
|
+
SX = e[0]; SY = e[1];
|
|
455
|
+
if (o.at[2] != null) { AX = o.at[2]; AY = o.at[3]; }
|
|
456
|
+
}
|
|
457
|
+
if (o.sc) { SX *= o.sc[0]; SY *= o.sc[1]; if (o.sc[2] != null) { AX = o.sc[2]; AY = o.sc[3]; } }
|
|
458
|
+
const R = o.R || 14, pad = Math.ceil(R * 2 + 6);
|
|
459
|
+
let [x0, y0, x1, y1] = o.bb;
|
|
460
|
+
x0 = Math.floor(Math.max(0, x0 - pad)); y0 = Math.floor(Math.max(0, y0 - pad));
|
|
461
|
+
x1 = Math.ceil(Math.min(W, x1 + pad)); y1 = Math.ceil(Math.min(H_, y1 + pad));
|
|
462
|
+
const w = x1 - x0, h = y1 - y0;
|
|
463
|
+
if (w < 3 || h < 3) return;
|
|
464
|
+
const M = H.layer(w, h), mc = M.getContext('2d', { willReadFrequently: true });
|
|
465
|
+
mc.translate(-x0, -y0); mc.fillStyle = '#fff'; o.draw(mc);
|
|
466
|
+
const ds = 3, sw = Math.ceil(w / ds), sh = Math.ceil(h / ds);
|
|
467
|
+
const Bs = H.layer(sw, sh), bsc = Bs.getContext('2d');
|
|
468
|
+
bsc.filter = `blur(${R / ds}px)`; bsc.drawImage(M, 0, 0, sw, sh);
|
|
469
|
+
const B = H.layer(w, h), bc = B.getContext('2d', { willReadFrequently: true });
|
|
470
|
+
bc.imageSmoothingEnabled = true; bc.drawImage(Bs, 0, 0, w, h);
|
|
471
|
+
const md = mc.getImageData(0, 0, w, h).data, bd = bc.getImageData(0, 0, w, h).data;
|
|
472
|
+
const Hh = new Float32Array(w * h), A = new Float32Array(w * h);
|
|
473
|
+
const fps = o.fps || [], marks = o.marks || [], lump = o.lump ?? 2.2;
|
|
474
|
+
for (let y = 0; y < h; y++) for (let x = 0; x < w; x++) {
|
|
475
|
+
const i = y * w + x;
|
|
476
|
+
const a = bd[i * 4 + 3] / 255, ap = H.clamp((a - 0.42) / 0.58);
|
|
477
|
+
A[i] = ap;
|
|
478
|
+
if (md[i * 4 + 3] === 0) continue;
|
|
479
|
+
const X = x + x0, Y = y + y0;
|
|
480
|
+
let hh = Math.sqrt(1 - (1 - ap) * (1 - ap)) * R * (o.dome ?? 1.1);
|
|
481
|
+
hh += nz.n2(X * 0.025 + o.seed, Y * 0.025) * lump + nz.n2(X * 0.11 + (o.target ? 0 : boilOff), Y * 0.11 + o.seed) * 0.35;
|
|
482
|
+
Hh[i] = hh;
|
|
483
|
+
}
|
|
484
|
+
// thumbprints: partial, warped whorls (only inside their own box)
|
|
485
|
+
for (const f of fps) {
|
|
486
|
+
const R2 = f[2], fx0 = Math.max(0, Math.floor(f[0] - R2 - x0)), fx1 = Math.min(w - 1, Math.ceil(f[0] + R2 - x0));
|
|
487
|
+
const fy0 = Math.max(0, Math.floor(f[1] - R2 - y0)), fy1 = Math.min(h - 1, Math.ceil(f[1] + R2 - y0));
|
|
488
|
+
const ang = f[3], ca = Math.cos(ang), sa = Math.sin(ang);
|
|
489
|
+
for (let y = fy0; y <= fy1; y++) for (let x = fx0; x <= fx1; x++) {
|
|
490
|
+
const dx0 = x + x0 - f[0], dy0 = y + y0 - f[1];
|
|
491
|
+
const dx = dx0 * ca + dy0 * sa, dy = (-dx0 * sa + dy0 * ca) * 1.45;
|
|
492
|
+
const d = Math.hypot(dx, dy);
|
|
493
|
+
if (d >= R2) continue;
|
|
494
|
+
const fall = Math.pow(1 - d / R2, 1.5) * H.smooth(-0.6, 0.4, Math.cos(Math.atan2(dy, dx) - ang * 2));
|
|
495
|
+
const warp = nz.n2(dx * 0.06 + ang, dy * 0.06) * 2.5;
|
|
496
|
+
Hh[y * w + x] += Math.sin(d * 1.6 + warp) * 0.22 * fall;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
// sculpting-tool smears: soft wide grooves with a raised lip
|
|
500
|
+
for (const m of marks) {
|
|
501
|
+
const [ax, ay, bx, by] = m, vx = bx - ax, vy = by - ay, L2 = vx * vx + vy * vy || 1, dep = m[4] || 1.2;
|
|
502
|
+
const mx0 = Math.max(0, Math.floor(Math.min(ax, bx) - 9 - x0)), mx1 = Math.min(w - 1, Math.ceil(Math.max(ax, bx) + 9 - x0));
|
|
503
|
+
const my0 = Math.max(0, Math.floor(Math.min(ay, by) - 9 - y0)), my1 = Math.min(h - 1, Math.ceil(Math.max(ay, by) + 9 - y0));
|
|
504
|
+
for (let y = my0; y <= my1; y++) for (let x = mx0; x <= mx1; x++) {
|
|
505
|
+
const X = x + x0, Y = y + y0;
|
|
506
|
+
const u = H.clamp(((X - ax) * vx + (Y - ay) * vy) / L2);
|
|
507
|
+
const d = Math.hypot(X - ax - vx * u, Y - ay - vy * u);
|
|
508
|
+
if (d > 8) continue;
|
|
509
|
+
const taper = Math.sin(Math.PI * Math.min(1, u * 1.05 + 0.02));
|
|
510
|
+
Hh[y * w + x] += taper * (-dep * Math.exp((-d * d) / (o.markW || 3.2)) + 0.4 * dep * Math.exp((-(d - 3.4) * (d - 3.4)) / 2));
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
const out = mc.createImageData(w, h), od = out.data;
|
|
514
|
+
const base = H.hex(o.color);
|
|
515
|
+
const sss = o.sss || [1.12, 0.92, 0.85];
|
|
516
|
+
for (let y = 1; y < h - 1; y++) for (let x = 1; x < w - 1; x++) {
|
|
517
|
+
const i = y * w + x, ma = md[i * 4 + 3];
|
|
518
|
+
if (!ma) continue;
|
|
519
|
+
const dx = (Hh[i + 1] - Hh[i - 1]) * 0.5, dy = (Hh[i + w] - Hh[i - w]) * 0.5;
|
|
520
|
+
const n = nrm([-dx, -dy, 1]);
|
|
521
|
+
const nl = n[0] * LIGHT[0] + n[1] * LIGHT[1] + n[2] * LIGHT[2];
|
|
522
|
+
const diff = H.clamp((nl + 0.42) / 1.42);
|
|
523
|
+
const nh = Math.max(0, n[0] * HALF[0] + n[1] * HALF[1] + n[2] * HALF[2]);
|
|
524
|
+
const spec = Math.pow(nh, 26) * (o.spec ?? 0.3);
|
|
525
|
+
const ao = 0.72 + 0.28 * Math.min(1, A[i] * 1.4);
|
|
526
|
+
const k = (0.3 + 0.86 * diff) * ao;
|
|
527
|
+
const sh = 1 - diff;
|
|
528
|
+
const k4 = i * 4;
|
|
529
|
+
od[k4] = Math.min(255, base[0] * k * (1 + (sss[0] - 1) * sh) + spec * 255);
|
|
530
|
+
od[k4 + 1] = Math.min(255, base[1] * k * (1 + (sss[1] - 1) * sh) + spec * 245);
|
|
531
|
+
od[k4 + 2] = Math.min(255, base[2] * k * (1 + (sss[2] - 1) * sh) + spec * 230);
|
|
532
|
+
od[k4 + 3] = ma;
|
|
533
|
+
}
|
|
534
|
+
const O = H.layer(w, h); O.getContext('2d').putImageData(out, 0, 0);
|
|
535
|
+
const tgt = o.target || ctx;
|
|
536
|
+
tgt.save();
|
|
537
|
+
if (o.shadow !== false) {
|
|
538
|
+
const s = o.shadow || {};
|
|
539
|
+
tgt.shadowColor = `rgba(40,20,10,${s.a ?? 0.38})`; tgt.shadowBlur = s.blur ?? 16; tgt.shadowOffsetX = s.dx ?? 7; tgt.shadowOffsetY = s.dy ?? 9;
|
|
540
|
+
}
|
|
541
|
+
if (o.dof) tgt.filter = `blur(${o.dof}px)`;
|
|
542
|
+
if (SX !== 1 || SY !== 1) { tgt.translate(AX, AY); tgt.scale(SX, SY); tgt.translate(-AX, -AY); }
|
|
543
|
+
tgt.drawImage(O, x0, y0);
|
|
544
|
+
tgt.restore();
|
|
545
|
+
};
|
|
546
|
+
// random thumbprints within a box
|
|
547
|
+
const prints = (seed, bb, n, R = 22) => { const r = H.rng(seed); return Array.from({ length: n }, () => [r.range(bb[0], bb[2]), r.range(bb[1], bb[3]), R * r.range(0.7, 1.2), r() * 50]); };
|
|
548
|
+
const marksIn = (seed, bb, n, len = 30) => { const r = H.rng(seed); return Array.from({ length: n }, () => { const x = r.range(bb[0], bb[2]), y = r.range(bb[1], bb[3]), a = r() * TAU, l = r.range(len * 0.5, len); return [x, y, x + Math.cos(a) * l, y + Math.sin(a) * l, r.range(0.8, 1.6)]; }); };
|
|
549
|
+
|
|
550
|
+
// ---------- clay set: smeared back wall (slightly out of focus) ----------
|
|
551
|
+
if (!WALL) {
|
|
552
|
+
WALL = H.layer(W, H_);
|
|
553
|
+
const wc = WALL.getContext('2d');
|
|
554
|
+
wc.fillStyle = '#3f8593'; wc.fillRect(0, 0, W, H_);
|
|
555
|
+
blob({
|
|
556
|
+
bb: [0, 0, W, H_], R: 4, dome: 0, lump: 3.2, seed: 3, color: '#4f9fae', shadow: false, spec: 0.12, dof: 1.6, target: wc,
|
|
557
|
+
draw: (c) => c.fillRect(-40, -40, W + 80, H_ + 80),
|
|
558
|
+
fps: prints(11, [0, 0, W, 470], 12, 30),
|
|
559
|
+
marks: marksIn(12, [0, 0, W, 480], 10, 90), markW: 14,
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
ctx.drawImage(WALL, 0, 0);
|
|
563
|
+
// soft key-light pool on the wall
|
|
564
|
+
{
|
|
565
|
+
const g = ctx.createRadialGradient(620, 220, 30, 640, 300, 760);
|
|
566
|
+
g.addColorStop(0, 'rgba(255,240,200,0.22)'); g.addColorStop(1, 'rgba(10,20,30,0.35)');
|
|
567
|
+
ctx.fillStyle = g; ctx.fillRect(0, 0, W, H_);
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
// ---------- pressed clay letters on the wall ----------
|
|
571
|
+
{
|
|
572
|
+
const txt = 'ASK ME ANYTHING';
|
|
573
|
+
const cols = ['#f2c14e', '#f07b5a', '#f6efe3', '#ef8fb0', '#a8dd8a'];
|
|
574
|
+
ctx.save(); ctx.font = '700 92px "Fredoka"';
|
|
575
|
+
const sp = 4;
|
|
576
|
+
let total = 0; for (const ch of txt) total += ctx.measureText(ch).width + sp;
|
|
577
|
+
ctx.restore();
|
|
578
|
+
let x = W / 2 - total / 2;
|
|
579
|
+
const r = H.rng(77);
|
|
580
|
+
let ci = 0;
|
|
581
|
+
for (const ch of txt) {
|
|
582
|
+
ctx.save(); ctx.font = '700 92px "Fredoka"'; const cw = ctx.measureText(ch).width; ctx.restore();
|
|
583
|
+
if (ch !== ' ') {
|
|
584
|
+
const rot = r.range(-0.09, 0.09) + (boil() - 0.5) * 0.015, yy = 140 + r.range(-6, 6), lx = x;
|
|
585
|
+
blob({
|
|
586
|
+
bb: [lx - 10, yy - 90, lx + cw + 10, yy + 20], R: 7, dome: 1.3, lump: 1.2, seed: 20 + ci, color: cols[ci % cols.length],
|
|
587
|
+
draw: (c) => { c.save(); c.translate(lx + cw / 2, yy - 34); c.rotate(rot); c.font = '700 92px "Fredoka"'; c.fillText(ch, -cw / 2, 34); c.restore(); },
|
|
588
|
+
fps: prints(40 + ci, [lx, yy - 70, lx + cw, yy], 1, 16),
|
|
589
|
+
shadow: { blur: 8, dx: 5, dy: 7, a: 0.45 }, dof: 0.8, at: [0.25 + ci * 0.1, 'pop', lx + cw / 2, yy + 8],
|
|
590
|
+
});
|
|
591
|
+
ci++;
|
|
592
|
+
}
|
|
593
|
+
x += cw + sp;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
// ---------- character (behind the table) ----------
|
|
598
|
+
const wave = Math.round(Math.sin(t * 5) * 2) / 2; // pose-to-pose
|
|
599
|
+
const rise = H.clamp((tq - 1.6) / 0.6);
|
|
600
|
+
const CH = { x: 945, y: 380 + 330 * (1 - H.ease.back(rise)) };
|
|
601
|
+
const land = tq - 2.2;
|
|
602
|
+
const bodySc = rise < 1 ? [0.94, 1.07] : land < 0.17 ? [1.08, 0.92] : land < 0.34 ? [0.97, 1.03] : [1, 1];
|
|
603
|
+
const showCH = tq >= 1.6;
|
|
604
|
+
const blink = tq >= 3.75 && tq < 3.92;
|
|
605
|
+
if (showCH) blob({ // body bean
|
|
606
|
+
sc: [...bodySc, CH.x, CH.y + 170],
|
|
607
|
+
bb: [CH.x - 140, CH.y - 175, CH.x + 140, CH.y + 180], R: 30, lump: 2.6, seed: 31, color: '#f2b84b',
|
|
608
|
+
draw: (c) => lumpy(c, nz, CH.x, CH.y, 118, 168, 3.1 + boil() * 0.02, 0.05, 0.05),
|
|
609
|
+
fps: prints(32, [CH.x - 100, CH.y - 140, CH.x + 100, CH.y + 120], 7, 24),
|
|
610
|
+
marks: marksIn(33, [CH.x - 90, CH.y - 120, CH.x + 90, CH.y + 120], 4, 26),
|
|
611
|
+
shadow: { blur: 26, dx: 14, dy: 16, a: 0.4 },
|
|
612
|
+
});
|
|
613
|
+
// waving arm (behind-right) + mitten
|
|
614
|
+
{
|
|
615
|
+
const ax = CH.x + 100, ay = CH.y + 10, a = (tq < 2.5 ? 0.9 : -1.05 + wave * 0.18), L = 120;
|
|
616
|
+
const hx = ax + Math.cos(a) * L, hy = ay + Math.sin(a) * L;
|
|
617
|
+
blob({
|
|
618
|
+
bb: [Math.min(ax, hx) - 50, Math.min(ay, hy) - 50, Math.max(ax, hx) + 50, Math.max(ay, hy) + 50], R: 12, lump: 1.2, seed: 41, color: '#f2b84b',
|
|
619
|
+
draw: (c) => { c.lineCap = 'round'; c.strokeStyle = '#fff'; c.lineWidth = 40; c.beginPath(); c.moveTo(ax - 20, ay + 10); c.quadraticCurveTo(ax + 30, ay - 20, hx, hy); c.stroke(); lumpy(c, nz, hx, hy, 32, 28, 9, 0.12, a); c.fill(); lumpy(c, nz, hx - 22, hy + 6, 13, 10, 4, 0.1, a); c.fill(); },
|
|
620
|
+
fps: prints(42, [hx - 25, hy - 25, hx + 25, hy + 25], 2, 14), at: [2.3, 'pop', ax, ay],
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
// eyes: white balls + glossy black pupils
|
|
624
|
+
[[-48, -70, 40], [44, -74, 44]].forEach(([dx, dy, rr], i) => {
|
|
625
|
+
const ex = CH.x + dx, ey = CH.y + dy;
|
|
626
|
+
blob({ at: [2.2 + i * 0.08, 'pop', ex, ey], sc: blink ? [1.04, 0.14, ex, ey] : null, bb: [ex - rr, ey - rr, ex + rr, ey + rr], R: 14, dome: 1.3, lump: 0.6, seed: 50 + i, color: '#f7f3ea', spec: 0.45, sss: [1.04, 1.0, 1.0],
|
|
627
|
+
draw: (c) => lumpy(c, nz, ex, ey, rr * 0.92, rr, 7 + i, 0.05), fps: prints(52 + i, [ex - 20, ey - 20, ex + 20, ey + 20], 1, 14), shadow: { blur: 6, dx: 3, dy: 4, a: 0.35 } });
|
|
628
|
+
const px = ex - 10 + i * 4 + (tq > 2.9 && tq < 4.3 ? -10 : 0), py = ey + 4;
|
|
629
|
+
if (!blink) blob({ at: [2.3 + i * 0.08, 'pop', px, py], bb: [px - 18, py - 18, px + 18, py + 18], R: 7, dome: 1.4, lump: 0.3, seed: 60 + i, color: '#23202a', spec: 0.9, sss: [1, 1, 1.05],
|
|
630
|
+
draw: (c) => lumpy(c, nz, px, py, 15, 16, 2 + i, 0.06), shadow: { blur: 3, dx: 1.5, dy: 2, a: 0.4 } });
|
|
631
|
+
});
|
|
632
|
+
// nose bump + mouth
|
|
633
|
+
blob({ at: [2.35, 'pop', CH.x, CH.y + 5], bb: [CH.x - 22, CH.y - 30, CH.x + 26, CH.y + 10], R: 10, lump: 0.6, seed: 70, color: '#f0a63e',
|
|
634
|
+
draw: (c) => lumpy(c, nz, CH.x + 2, CH.y - 12, 22, 16, 1, 0.08), shadow: { blur: 7, dx: 4, dy: 5, a: 0.35 } });
|
|
635
|
+
blob({ at: [2.45, 'pop', CH.x, CH.y + 40], bb: [CH.x - 60, CH.y + 15, CH.x + 60, CH.y + 70], R: 6, dome: 0.6, lump: 0.4, seed: 71, color: '#7a2230', spec: 0.15,
|
|
636
|
+
draw: (c) => { c.beginPath(); c.moveTo(CH.x - 50, CH.y + 24); c.quadraticCurveTo(CH.x, CH.y + 92, CH.x + 52, CH.y + 20); c.quadraticCurveTo(CH.x, CH.y + 48, CH.x - 50, CH.y + 24); c.fill(); },
|
|
637
|
+
shadow: { blur: 3, dx: -1, dy: -2, a: 0.4 } });
|
|
638
|
+
blob({ at: [2.5, 'pop', CH.x, CH.y + 60], bb: [CH.x - 30, CH.y + 40, CH.x + 30, CH.y + 70], R: 5, lump: 0.3, seed: 72, color: '#e9737c',
|
|
639
|
+
draw: (c) => lumpy(c, nz, CH.x + 4, CH.y + 52, 18, 7, 5, 0.1), shadow: false });
|
|
640
|
+
|
|
641
|
+
// ---------- table slab ----------
|
|
642
|
+
blob({
|
|
643
|
+
bb: [0, 490, W, H_], R: 22, dome: 1.0, lump: 2.4, seed: 80, color: '#d0703f',
|
|
644
|
+
draw: (c) => { c.beginPath(); c.moveTo(-40, 520); for (let x = -40; x <= W + 40; x += 20) c.lineTo(x, 506 + nz.n2(x * 0.01, 3) * 8); c.lineTo(W + 40, H_ + 60); c.lineTo(-40, H_ + 60); c.closePath(); c.fill(); },
|
|
645
|
+
fps: prints(81, [0, 520, W, 700], 7, 30),
|
|
646
|
+
marks: marksIn(82, [0, 520, W, 700], 7, 110), markW: 16,
|
|
647
|
+
shadow: { blur: 30, dx: 0, dy: -10, a: 0.35 },
|
|
648
|
+
});
|
|
649
|
+
// table front-edge shading (slab turns down)
|
|
650
|
+
{
|
|
651
|
+
const g = ctx.createLinearGradient(0, 600, 0, H_);
|
|
652
|
+
g.addColorStop(0, 'rgba(60,20,10,0)'); g.addColorStop(1, 'rgba(60,20,10,0.35)');
|
|
653
|
+
ctx.fillStyle = g; ctx.fillRect(0, 600, W, 120);
|
|
654
|
+
}
|
|
655
|
+
// contact shadows on the table
|
|
656
|
+
const contact = (cx, cy, rx, ry, a = 0.45) => {
|
|
657
|
+
ctx.save(); ctx.filter = 'blur(10px)'; ctx.fillStyle = `rgba(70,20,5,${a})`; ctx.beginPath(); ctx.ellipse(cx, cy, rx, ry, 0, 0, TAU); ctx.fill(); ctx.restore();
|
|
658
|
+
};
|
|
659
|
+
if (tq >= 0.9) contact(600, 588, 230, 26);
|
|
660
|
+
if (tq >= 0.6) contact(1165, 590, 70, 16);
|
|
661
|
+
if (tq >= 2.25) contact(CH.x - 120, 545, 60, 12, 0.35);
|
|
662
|
+
|
|
663
|
+
// resting arm on the table
|
|
664
|
+
blob({
|
|
665
|
+
bb: [CH.x - 190, CH.y + 60, CH.x - 60, CH.y + 190], R: 13, lump: 1.0, seed: 90, color: '#f2b84b',
|
|
666
|
+
draw: (c) => { c.lineCap = 'round'; c.strokeStyle = '#fff'; c.lineWidth = 40; c.beginPath(); c.moveTo(CH.x - 80, CH.y + 70); c.quadraticCurveTo(CH.x - 120, CH.y + 150, CH.x - 150, CH.y + 160); c.stroke(); lumpy(c, nz, CH.x - 152, CH.y + 160, 28, 22, 6, 0.12); c.fill(); },
|
|
667
|
+
fps: prints(91, [CH.x - 170, CH.y + 130, CH.x - 120, CH.y + 180], 1, 14), at: [2.2, 'pop', CH.x - 80, CH.y + 70],
|
|
668
|
+
});
|
|
669
|
+
|
|
670
|
+
// ---------- laptop ----------
|
|
671
|
+
const LX = 600;
|
|
672
|
+
blob({ // lid
|
|
673
|
+
bb: [LX - 170, 270, LX + 170, 540], R: 12, dome: 0.8, lump: 1.0, seed: 100, color: '#c9c5bd', sss: [1.04, 1.0, 1.02],
|
|
674
|
+
draw: (c) => { const P = [[LX - 155, 290], [LX + 160, 282], [LX + 150, 535], [LX - 150, 538]]; c.beginPath(); c.moveTo((P[0][0] + P[3][0]) / 2, (P[0][1] + P[3][1]) / 2); for (let i = 0; i < 4; i++) c.arcTo(P[i][0], P[i][1], P[(i + 1) % 4][0], P[(i + 1) % 4][1], 12); c.closePath(); c.fill(); },
|
|
675
|
+
fps: prints(101, [LX - 140, 300, LX + 140, 520], 4, 20), at: [1.1, 'lid', LX, 536],
|
|
676
|
+
shadow: { blur: 22, dx: 12, dy: 10, a: 0.4 },
|
|
677
|
+
});
|
|
678
|
+
blob({ // screen inset
|
|
679
|
+
bb: [LX - 140, 300, LX + 140, 520], R: 6, dome: 0.4, lump: 0.6, seed: 102, color: '#2b3c64', spec: 0.5,
|
|
680
|
+
draw: (c) => { c.beginPath(); c.moveTo(LX - 132, 308); c.lineTo(LX + 138, 302); c.lineTo(LX + 130, 512); c.lineTo(LX - 128, 515); c.closePath(); c.fill(); },
|
|
681
|
+
marks: marksIn(103, [LX - 120, 320, LX + 120, 500], 3, 40), at: [1.1, 'lid', LX, 536],
|
|
682
|
+
shadow: { blur: 4, dx: -2, dy: -3, a: 0.5 },
|
|
683
|
+
});
|
|
684
|
+
blob({ // chat bubble on the screen
|
|
685
|
+
bb: [LX - 105, 340, LX + 100, 470], R: 12, lump: 0.9, seed: 104, color: '#f6f1e7',
|
|
686
|
+
draw: (c) => { lumpy(c, nz, LX - 5, 395, 95, 50, 12, 0.05); c.fill(); c.beginPath(); c.moveTo(LX - 70, 425); c.lineTo(LX - 92, 470); c.lineTo(LX - 30, 438); c.closePath(); c.fill(); },
|
|
687
|
+
fps: prints(105, [LX - 70, 360, LX + 60, 430], 2, 18), at: [2.6, 'pop', LX - 80, 460],
|
|
688
|
+
shadow: { blur: 8, dx: 5, dy: 6, a: 0.45 },
|
|
689
|
+
});
|
|
690
|
+
['#ef7f9e', '#f2c14e', '#7fd0b8'].forEach((col, i) => {
|
|
691
|
+
const pop = 1 + 0.25 * Math.max(0, Math.sin(tq * 6 - i * 1.2));
|
|
692
|
+
const dx = LX - 55 + i * 50, dy = 395, rr = 15 * pop;
|
|
693
|
+
blob({ bb: [dx - rr, dy - rr, dx + rr, dy + rr], R: 8, dome: 1.4, lump: 0.3, seed: 110 + i, color: col, spec: 0.5,
|
|
694
|
+
draw: (c) => lumpy(c, nz, dx, dy, rr, rr * 0.95, i * 3, 0.08), shadow: { blur: 4, dx: 3, dy: 4, a: 0.4 }, at: [2.85 + i * 0.12, 'pop', dx, dy + rr] });
|
|
695
|
+
});
|
|
696
|
+
blob({ // keyboard deck
|
|
697
|
+
bb: [LX - 200, 528, LX + 205, 600], R: 10, dome: 0.7, lump: 0.9, seed: 120, color: '#d3cfc6', sss: [1.04, 1.0, 1.02],
|
|
698
|
+
draw: (c) => { c.beginPath(); c.moveTo(LX - 160, 532); c.lineTo(LX + 160, 530); c.lineTo(LX + 200, 590); c.lineTo(LX - 198, 594); c.closePath(); c.fill(); },
|
|
699
|
+
marks: (() => {
|
|
700
|
+
const m = [];
|
|
701
|
+
for (let row = 0; row < 3; row++) {
|
|
702
|
+
const y = 546 + row * 14, inset = 150 - row * 8 + (row ? 0 : 0);
|
|
703
|
+
m.push([LX - inset - row * 4, y, LX + inset + row * 4, y - 1, 1.6]);
|
|
704
|
+
for (let k = -6; k <= 6; k++) m.push([LX + k * 22 * (1 + row * 0.06) - 2, y - 6, LX + k * 22 * (1 + row * 0.06) + 1, y + 6, 1.2]);
|
|
705
|
+
}
|
|
706
|
+
m.push([LX - 40, 586, LX + 40, 586, 1.4]);
|
|
707
|
+
return m;
|
|
708
|
+
})(),
|
|
709
|
+
fps: prints(121, [LX - 150, 540, LX + 150, 590], 3, 16), at: [0.9, 'pop', LX, 594],
|
|
710
|
+
shadow: { blur: 12, dx: 6, dy: 6, a: 0.4 },
|
|
711
|
+
});
|
|
712
|
+
|
|
713
|
+
// ---------- potted plant (right) ----------
|
|
714
|
+
{
|
|
715
|
+
const px = 1165, py = 540;
|
|
716
|
+
[[-30, -95, -0.5, '#5aa65b'], [26, -105, 0.45, '#4f9a52'], [-2, -125, 0.02, '#6bb865'], [-42, -55, -1.0, '#5aa65b'], [40, -60, 0.95, '#4f9a52']].forEach(([dx, dy, a, col], i) => {
|
|
717
|
+
blob({ bb: [px + dx - 50, py + dy - 50, px + dx + 50, py + dy + 50], R: 10, lump: 0.8, seed: 130 + i, color: col,
|
|
718
|
+
draw: (c) => lumpy(c, nz, px + dx, py + dy, 18, 44, i * 2, 0.08, a),
|
|
719
|
+
marks: [[px + dx - Math.sin(a) * 30, py + dy - Math.cos(a) * 30 * -1 - 30, px + dx + Math.sin(a) * 30, py + dy + 30, 1.0]],
|
|
720
|
+
shadow: { blur: 10, dx: 6, dy: 7, a: 0.35 }, at: [0.75 + i * 0.08, 'pop', px, py - 25] });
|
|
721
|
+
});
|
|
722
|
+
blob({ bb: [px - 60, py - 40, px + 60, py + 50], R: 14, lump: 1.2, seed: 140, color: '#e07d4f',
|
|
723
|
+
draw: (c) => { c.beginPath(); c.moveTo(px - 52, py - 30); c.lineTo(px + 52, py - 30); c.lineTo(px + 38, py + 44); c.lineTo(px - 38, py + 44); c.closePath(); c.fill(); },
|
|
724
|
+
marks: [[px - 50, py - 12, px + 50, py - 12, 1.8]], fps: prints(141, [px - 40, py - 20, px + 40, py + 40], 2, 16), shadow: { blur: 14, dx: 8, dy: 6, a: 0.4 }, at: [0.6, 'pop', px, py + 44] });
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
// ---------- stray clay crumbs on the table ----------
|
|
728
|
+
{
|
|
729
|
+
const r = H.rng(160);
|
|
730
|
+
[[330, 640, '#f2b84b'], [905, 655, '#ef8fb0'], [968, 668, '#4f9fae'], [1040, 610, '#f2b84b'], [780, 690, '#a8dd8a'], [420, 600, '#f6efe3']].forEach(([x, y, col], i) => {
|
|
731
|
+
const rr = r.range(5, 9);
|
|
732
|
+
blob({ bb: [x - rr, y - rr, x + rr, y + rr], R: 4, dome: 1.4, lump: 0.3, seed: 170 + i, color: col, spec: 0.35,
|
|
733
|
+
draw: (c) => lumpy(c, nz, x, y, rr * 1.2, rr * 0.85, i, 0.2, r() * 3), shadow: { blur: 4, dx: 3, dy: 3, a: 0.45 } });
|
|
734
|
+
});
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
// ---------- out-of-focus foreground mug ----------
|
|
738
|
+
{
|
|
739
|
+
const mx = 150, my = 610;
|
|
740
|
+
blob({ bb: [mx - 120, my - 110, mx + 120, my + 130], R: 20, lump: 2, seed: 150, color: '#e86f7f', dof: 3.5,
|
|
741
|
+
draw: (c) => { c.beginPath(); c.moveTo(mx - 85, my - 95); c.lineTo(mx + 85, my - 95); c.lineTo(mx + 80, my + 130); c.lineTo(mx - 80, my + 130); c.closePath(); c.fill(); c.lineWidth = 30; c.strokeStyle = '#fff'; c.beginPath(); c.arc(mx + 78, my + 10, 45, -1.5, 1.5); c.stroke(); },
|
|
742
|
+
fps: prints(151, [mx - 60, my - 70, mx + 60, my + 100], 3, 24), shadow: { blur: 30, dx: 16, dy: 10, a: 0.35 } });
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
// ---------- lens finish: soft DOF falloff on far wall edges, warm grade, vignette ----------
|
|
746
|
+
ctx.save(); ctx.globalCompositeOperation = 'soft-light';
|
|
747
|
+
const gg = ctx.createLinearGradient(0, 0, W, H_);
|
|
748
|
+
gg.addColorStop(0, 'rgba(255,220,170,0.5)'); gg.addColorStop(1, 'rgba(40,60,90,0.4)');
|
|
749
|
+
ctx.fillStyle = gg; ctx.fillRect(0, 0, W, H_); ctx.restore();
|
|
750
|
+
H.vignette(ctx, W, H_, 0.45, '20,12,8');
|
|
751
|
+
// stop-motion exposure flicker (changes on twos)
|
|
752
|
+
{ const f = (H.rng(900 + fr)() - 0.5) * 0.06; ctx.fillStyle = f > 0 ? `rgba(255,240,220,${f})` : `rgba(0,0,0,${-f})`; ctx.fillRect(0, 0, W, H_); }
|
|
753
|
+
H.grain(ctx, W, H_, 0.03, 4 + fr);
|
|
754
|
+
},
|
|
755
|
+
});
|
|
756
|
+
}
|