@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,692 @@
|
|
|
1
|
+
{
|
|
2
|
+
// ---------- Risograph: 3 spot-ink separations, multiplied onto stock ----------
|
|
3
|
+
const INK = { pink: [255, 72, 176], blue: [50, 85, 164], yellow: [255, 226, 0] };
|
|
4
|
+
const PAPER = [242, 237, 224];
|
|
5
|
+
|
|
6
|
+
const hash = (x, y, s) => {
|
|
7
|
+
let h = (Math.imul(x, 374761393) + Math.imul(y, 668265263) + Math.imul(s, 1442695041)) | 0;
|
|
8
|
+
h = Math.imul(h ^ (h >>> 13), 1274126177); h ^= h >>> 16;
|
|
9
|
+
return (h >>> 0) / 4294967296;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
// smooth low-frequency noise field (3 channels) via upscaled tiny canvas
|
|
13
|
+
const lowField = (W, H_, seed, gw, gh, freq) => {
|
|
14
|
+
const nz = H.makeNoise(seed), s = H.layer(gw, gh), sx = s.getContext('2d');
|
|
15
|
+
const im = sx.createImageData(gw, gh), d = im.data;
|
|
16
|
+
for (let y = 0; y < gh; y++) for (let x = 0; x < gw; x++) {
|
|
17
|
+
const i = (y * gw + x) * 4;
|
|
18
|
+
d[i] = 128 + 127 * H.clamp(nz.fbm2(x * freq, y * freq, 3) * 1.6, -1, 1);
|
|
19
|
+
d[i + 1] = 128 + 127 * H.clamp(nz.fbm2(x * freq + 40, y * freq + 9, 3) * 1.6, -1, 1);
|
|
20
|
+
d[i + 2] = 128 + 127 * H.clamp(nz.fbm2(x * freq + 80, y * freq + 31, 3) * 1.6, -1, 1);
|
|
21
|
+
d[i + 3] = 255;
|
|
22
|
+
}
|
|
23
|
+
sx.putImageData(im, 0, 0);
|
|
24
|
+
const big = H.layer(W, H_), bx = big.getContext('2d');
|
|
25
|
+
bx.imageSmoothingEnabled = true; bx.imageSmoothingQuality = 'high';
|
|
26
|
+
bx.drawImage(s, 0, 0, W, H_);
|
|
27
|
+
return bx.getImageData(0, 0, W, H_).data;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const sparkle = (x, cx, cy, r, rot) => {
|
|
31
|
+
x.save(); x.translate(cx, cy); x.rotate(rot); x.beginPath();
|
|
32
|
+
for (let i = 0; i < 4; i++) {
|
|
33
|
+
const a = (i / 4) * Math.PI * 2;
|
|
34
|
+
x.lineTo(Math.cos(a) * r, Math.sin(a) * r);
|
|
35
|
+
const b = a + Math.PI / 4;
|
|
36
|
+
x.lineTo(Math.cos(b) * r * 0.2, Math.sin(b) * r * 0.2);
|
|
37
|
+
}
|
|
38
|
+
x.closePath(); x.fill(); x.restore();
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// rocket geometry (local coords, nose up)
|
|
42
|
+
const bodyPath = (x) => {
|
|
43
|
+
x.beginPath(); x.moveTo(0, -200);
|
|
44
|
+
x.bezierCurveTo(62, -150, 80, -60, 72, 40);
|
|
45
|
+
x.lineTo(62, 130); x.lineTo(-62, 130); x.lineTo(-72, 40);
|
|
46
|
+
x.bezierCurveTo(-80, -60, -62, -150, 0, -200); x.closePath();
|
|
47
|
+
};
|
|
48
|
+
const finL = (x) => { x.beginPath(); x.moveTo(-68, 20); x.quadraticCurveTo(-150, 90, -138, 188); x.quadraticCurveTo(-104, 150, -62, 132); x.closePath(); };
|
|
49
|
+
const finR = (x) => { x.beginPath(); x.moveTo(68, 20); x.quadraticCurveTo(150, 90, 138, 188); x.quadraticCurveTo(104, 150, 62, 132); x.closePath(); };
|
|
50
|
+
const finC = (x) => { x.beginPath(); x.moveTo(-9, 70); x.lineTo(9, 70); x.lineTo(7, 196); x.lineTo(-7, 196); x.closePath(); };
|
|
51
|
+
const flame = (x, L, w) => {
|
|
52
|
+
x.beginPath(); x.moveTo(-w, 150);
|
|
53
|
+
x.bezierCurveTo(-w * 1.1, 150 + L * 0.35, -w * 0.3, 150 + L * 0.8, 0, 150 + L);
|
|
54
|
+
x.bezierCurveTo(w * 0.3, 150 + L * 0.8, w * 1.1, 150 + L * 0.35, w, 150);
|
|
55
|
+
x.closePath();
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const clouds = [
|
|
59
|
+
[560, 700, 70], [640, 668, 64], [720, 690, 82], [800, 650, 58], [690, 610, 46], [880, 690, 76], [960, 660, 66],
|
|
60
|
+
[1040, 700, 80], [1120, 670, 70], [1200, 690, 80], [1270, 650, 62], [470, 712, 52], [760, 600, 38], [1000, 625, 40],
|
|
61
|
+
];
|
|
62
|
+
const cloudPath = (x, grow) => {
|
|
63
|
+
x.beginPath();
|
|
64
|
+
for (const [cx, cy, r] of clouds) { x.moveTo(cx + r + grow, cy); x.arc(cx, cy, r + grow, 0, Math.PI * 2); }
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
// ------ draw one separation (black = ink, grey = tint) ------
|
|
68
|
+
const sepDraw = (x, ink, t) => {
|
|
69
|
+
const K = '#000', tint = (a) => `rgba(0,0,0,${a})`;
|
|
70
|
+
const rx = 905 + (t - 4.6) * 10, ry = 300 - (t - 4.6) * 16, rot = 0.52;
|
|
71
|
+
const flick = 1 + 0.08 * Math.sin(t * 23) + 0.05 * Math.sin(t * 37 + 1);
|
|
72
|
+
|
|
73
|
+
// --- sun ---
|
|
74
|
+
if (ink === 'yellow') { x.fillStyle = K; x.beginPath(); x.arc(935, 305, 248, 0, Math.PI * 2); x.fill(); }
|
|
75
|
+
if (ink === 'pink') {
|
|
76
|
+
x.save(); x.beginPath(); x.arc(935, 305, 248, 0, Math.PI * 2); x.clip();
|
|
77
|
+
const g = x.createLinearGradient(0, 120, 0, 560);
|
|
78
|
+
g.addColorStop(0, tint(0)); g.addColorStop(0.45, tint(0.12)); g.addColorStop(1, tint(0.78));
|
|
79
|
+
x.fillStyle = g; x.fillRect(600, 40, 700, 560);
|
|
80
|
+
// sunset bands knocked out
|
|
81
|
+
x.fillStyle = '#fff';
|
|
82
|
+
for (let i = 0; i < 5; i++) { const yy = 420 + i * 30 + i * i * 2; x.fillRect(600, yy, 700, 4 + i * 2.2); }
|
|
83
|
+
x.restore();
|
|
84
|
+
}
|
|
85
|
+
// ring planet
|
|
86
|
+
if (ink === 'blue') {
|
|
87
|
+
x.save(); x.translate(1150, 120); x.rotate(-0.35);
|
|
88
|
+
x.lineWidth = 6; x.strokeStyle = K;
|
|
89
|
+
x.beginPath(); x.ellipse(0, 0, 70, 16, 0, Math.PI, Math.PI * 2); x.stroke();
|
|
90
|
+
x.fillStyle = tint(0.5); x.beginPath(); x.arc(0, 0, 38, 0, Math.PI * 2); x.fill();
|
|
91
|
+
x.lineWidth = 6; x.beginPath(); x.ellipse(0, 0, 70, 16, 0, 0, Math.PI); x.stroke();
|
|
92
|
+
x.restore();
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// --- speed lines ---
|
|
96
|
+
if (ink === 'pink') {
|
|
97
|
+
x.save(); x.lineCap = 'round'; x.strokeStyle = K;
|
|
98
|
+
const lines = [[-150, 30, 0.9], [-170, -60, 0.6], [140, 120, 0.7], [-125, 150, 0.45]];
|
|
99
|
+
x.translate(rx, ry); x.rotate(rot);
|
|
100
|
+
for (const [ox, oy, l] of lines) { x.lineWidth = 9; x.beginPath(); x.moveTo(ox, oy); x.lineTo(ox, oy + 220 * l); x.stroke(); }
|
|
101
|
+
x.restore();
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// --- rocket ---
|
|
105
|
+
x.save(); x.translate(rx, ry); x.rotate(rot);
|
|
106
|
+
if (ink === 'yellow') {
|
|
107
|
+
// knock the sun out under the rocket (trap is thin so misregistration shows paper slivers)
|
|
108
|
+
x.fillStyle = '#fff'; bodyPath(x); x.fill(); finL(x); x.fill(); finR(x); x.fill();
|
|
109
|
+
x.fillRect(-52, 128, 104, 34);
|
|
110
|
+
x.fillStyle = '#fff'; flame(x, 270 * flick + 14, 62); x.fill();
|
|
111
|
+
x.fillStyle = K; flame(x, 270 * flick, 50); x.fill();
|
|
112
|
+
x.beginPath(); x.arc(0, -40, 32, 0, Math.PI * 2); x.fill();
|
|
113
|
+
}
|
|
114
|
+
if (ink === 'pink') {
|
|
115
|
+
x.fillStyle = K;
|
|
116
|
+
finL(x); x.fill(); finR(x); x.fill(); finC(x); x.fill();
|
|
117
|
+
x.save(); bodyPath(x); x.clip(); x.fillRect(-100, -260, 200, 140);
|
|
118
|
+
x.restore();
|
|
119
|
+
flame(x, 175 * flick, 28); x.fill();
|
|
120
|
+
// window glint
|
|
121
|
+
x.fillStyle = tint(0.6); x.beginPath(); x.arc(-8, -50, 14, 0, Math.PI * 2); x.fill();
|
|
122
|
+
}
|
|
123
|
+
if (ink === 'blue') {
|
|
124
|
+
x.save(); bodyPath(x); x.clip();
|
|
125
|
+
const g = x.createLinearGradient(-20, 0, 74, 0);
|
|
126
|
+
g.addColorStop(0, tint(0)); g.addColorStop(0.5, tint(0.28)); g.addColorStop(1, tint(0.72));
|
|
127
|
+
x.fillStyle = g; x.fillRect(-100, -260, 200, 400);
|
|
128
|
+
x.fillStyle = K; x.fillRect(-100, 38, 200, 26);
|
|
129
|
+
x.restore();
|
|
130
|
+
// fins shading
|
|
131
|
+
x.save(); finR(x); x.clip(); x.fillStyle = tint(0.45); x.fillRect(0, 0, 200, 220); x.restore();
|
|
132
|
+
x.save(); finL(x); x.clip(); x.fillStyle = tint(0.12); x.fillRect(-200, 0, 200, 220); x.restore();
|
|
133
|
+
// outline + details
|
|
134
|
+
x.lineJoin = 'round'; x.lineWidth = 6; x.strokeStyle = K; bodyPath(x); x.stroke();
|
|
135
|
+
x.lineWidth = 5; finL(x); x.stroke(); finR(x); x.stroke();
|
|
136
|
+
x.lineWidth = 9; x.beginPath(); x.arc(0, -40, 36, 0, Math.PI * 2); x.stroke();
|
|
137
|
+
x.fillStyle = K;
|
|
138
|
+
x.beginPath(); x.moveTo(-44, 130); x.lineTo(44, 130); x.lineTo(54, 162); x.lineTo(-54, 162); x.closePath(); x.fill();
|
|
139
|
+
for (let i = -3; i <= 3; i++) { x.fillStyle = '#fff'; x.beginPath(); x.arc(i * 17, 51, 3.2, 0, Math.PI * 2); x.fill(); }
|
|
140
|
+
x.fillStyle = K; for (let i = 0; i < 6; i++) { const a = -Math.PI / 2 + (i - 2.5) * 0.35; x.beginPath(); x.arc(Math.cos(a) * 52, -40 + Math.sin(a) * 52 + 4, 2.6, 0, 7); x.fill(); }
|
|
141
|
+
// panel lines
|
|
142
|
+
x.lineWidth = 3; x.beginPath(); x.moveTo(-74, -10); x.quadraticCurveTo(0, 6, 74, -10); x.stroke();
|
|
143
|
+
}
|
|
144
|
+
x.restore();
|
|
145
|
+
|
|
146
|
+
// --- exhaust clouds ---
|
|
147
|
+
if (ink === 'blue') {
|
|
148
|
+
x.save();
|
|
149
|
+
cloudPath(x, 0); x.lineWidth = 11; x.strokeStyle = K; x.stroke();
|
|
150
|
+
x.fillStyle = '#fff'; cloudPath(x, 0); x.fill();
|
|
151
|
+
cloudPath(x, 0); x.clip();
|
|
152
|
+
const g = x.createLinearGradient(0, 590, 0, 720); g.addColorStop(0, tint(0)); g.addColorStop(1, tint(0.42));
|
|
153
|
+
x.fillStyle = g; x.fillRect(400, 540, 900, 200);
|
|
154
|
+
// puff contour strokes
|
|
155
|
+
x.lineWidth = 5; x.lineCap = 'round';
|
|
156
|
+
for (const [cx, cy, r] of clouds) { if (r < 60) continue; x.beginPath(); x.arc(cx + r * 0.1, cy + r * 0.15, r * 0.7, Math.PI * 1.05, Math.PI * 1.35); x.stroke(); }
|
|
157
|
+
x.restore();
|
|
158
|
+
}
|
|
159
|
+
if (ink === 'pink') {
|
|
160
|
+
x.save(); cloudPath(x, 0); x.clip();
|
|
161
|
+
const g = x.createLinearGradient(0, 560, 0, 720); g.addColorStop(0, tint(0)); g.addColorStop(1, tint(0.5));
|
|
162
|
+
x.fillStyle = g; x.fillRect(400, 540, 900, 200); x.restore();
|
|
163
|
+
}
|
|
164
|
+
if (ink === 'yellow') {
|
|
165
|
+
// clouds knock out the sun below them
|
|
166
|
+
x.fillStyle = '#fff'; cloudPath(x, 4); x.fill();
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// --- sparkles & specks ---
|
|
170
|
+
const r = H.rng(77);
|
|
171
|
+
if (ink === 'yellow') {
|
|
172
|
+
x.fillStyle = K;
|
|
173
|
+
[[612, 96, 34, 0.1], [1220, 470, 26, 0.3], [560, 520, 20, 0.6], [1236, 236, 18, 0], [700, 200, 16, 0.2], [1080, 40, 22, 0.4]].forEach(([a, b, s, ro]) => sparkle(x, a, b, s * (1 + 0.15 * Math.sin(t * 5 + a)), ro));
|
|
174
|
+
}
|
|
175
|
+
if (ink === 'pink') {
|
|
176
|
+
x.fillStyle = K;
|
|
177
|
+
for (let i = 0; i < 22; i++) { const a = r.range(540, 1270), b = r.range(20, 540); x.beginPath(); x.arc(a, b, r.range(2.5, 5.5), 0, 7); x.fill(); }
|
|
178
|
+
}
|
|
179
|
+
if (ink === 'blue') {
|
|
180
|
+
x.strokeStyle = K; x.lineWidth = 4; x.lineCap = 'round';
|
|
181
|
+
[[1180, 330], [760, 70], [598, 330], [1250, 560]].forEach(([a, b]) => { x.beginPath(); x.moveTo(a - 9, b); x.lineTo(a + 9, b); x.moveTo(a, b - 9); x.lineTo(a, b + 9); x.stroke(); });
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// --- typography ---
|
|
185
|
+
x.textBaseline = 'alphabetic';
|
|
186
|
+
const L = 66;
|
|
187
|
+
if (ink === 'yellow') { x.fillStyle = K; x.fillRect(L - 10, 64, 344, 40); }
|
|
188
|
+
if (ink === 'blue') {
|
|
189
|
+
x.fillStyle = K; x.font = '700 19px "Space Mono"'; x.letterSpacing = '2px';
|
|
190
|
+
x.fillText('ZINE Nº07 · MACHINES', L, 91);
|
|
191
|
+
x.letterSpacing = '0px';
|
|
192
|
+
}
|
|
193
|
+
const title = (dx, dy) => {
|
|
194
|
+
x.font = '400 250px "Archivo Black"'; x.letterSpacing = '-10px'; x.fillText('AI', L - 10 + dx, 330 + dy);
|
|
195
|
+
x.font = '400 112px "Archivo Black"'; x.letterSpacing = '-4px';
|
|
196
|
+
x.fillText('TAKES', L - 4 + dx, 450 + dy); x.fillText('OFF!', L - 4 + dx, 562 + dy);
|
|
197
|
+
x.letterSpacing = '0px';
|
|
198
|
+
};
|
|
199
|
+
if (ink === 'pink') { x.fillStyle = K; title(11, 9); }
|
|
200
|
+
if (ink === 'blue') {
|
|
201
|
+
x.fillStyle = K; title(0, 0);
|
|
202
|
+
x.font = '400 17px "Space Mono"';
|
|
203
|
+
['a pocket field guide to the', 'machines that learn. print run', 'of 200 — read it, pass it on.'].forEach((s, i) => x.fillText(s, L, 616 + i * 25));
|
|
204
|
+
}
|
|
205
|
+
if (ink === 'pink') {
|
|
206
|
+
x.lineWidth = 5; x.strokeStyle = K; x.beginPath(); x.moveTo(L, 590); x.lineTo(L + 380, 590); x.stroke();
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
// ================= EXPLAINER: "How does AI learn?" printed as a riso zine =================
|
|
211
|
+
const XE = H.ease, cl = H.clamp;
|
|
212
|
+
const seg = (t, a, b) => cl((t - a) / (b - a));
|
|
213
|
+
let RX_CACHE = null;
|
|
214
|
+
const rxStatic = (W, H_) => {
|
|
215
|
+
if (RX_CACHE) return RX_CACHE;
|
|
216
|
+
const mott = lowField(W, H_, 5, 96, 54, 0.11), fine = lowField(W, H_, 9, 320, 180, 0.22);
|
|
217
|
+
const streaks = [11, 22, 33].map((sd) => {
|
|
218
|
+
const a = new Float32Array(W), nz = H.makeNoise(sd + 3), rr = H.rng(sd + 5), lines = [];
|
|
219
|
+
for (let i = 0; i < 6; i++) lines.push([rr.range(0, W), rr.range(1, 4), rr.range(0.15, 0.35)]);
|
|
220
|
+
for (let x = 0; x < W; x++) { let v = 1 - 0.1 * Math.abs(nz.fbm2(x * 0.012, 0.3, 3)) * 2 - 0.05 * (nz.n2(x * 0.09, 3.1) + 1); for (const [lx, lw, ls] of lines) v -= ls * Math.exp(-((x - lx) * (x - lx)) / (lw * lw)); a[x] = v; }
|
|
221
|
+
return a;
|
|
222
|
+
});
|
|
223
|
+
return (RX_CACHE = { mott, fine, streaks });
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
// draw-on quadratic arrow (ink line), u = 0..1 progress
|
|
227
|
+
const qpt = (p0, c, p1, s) => [(1 - s) * (1 - s) * p0[0] + 2 * (1 - s) * s * c[0] + s * s * p1[0], (1 - s) * (1 - s) * p0[1] + 2 * (1 - s) * s * c[1] + s * s * p1[1]];
|
|
228
|
+
const arrowQ = (x, p0, c, p1, u, w, dash) => {
|
|
229
|
+
if (u <= 0) return;
|
|
230
|
+
x.save(); x.lineWidth = w; x.lineCap = 'round'; x.lineJoin = 'round'; if (dash) x.setLineDash(dash);
|
|
231
|
+
x.beginPath(); x.moveTo(p0[0], p0[1]);
|
|
232
|
+
const N = 30; for (let i = 1; i <= N * u; i++) { const q = qpt(p0, c, p1, i / N); x.lineTo(q[0], q[1]); }
|
|
233
|
+
const e = qpt(p0, c, p1, u); x.lineTo(e[0], e[1]); x.stroke(); x.setLineDash([]);
|
|
234
|
+
const b = qpt(p0, c, p1, Math.max(0, u - 0.04)), a = Math.atan2(e[1] - b[1], e[0] - b[0]), hs = w * 3.2;
|
|
235
|
+
x.beginPath(); x.moveTo(e[0] + Math.cos(a) * hs * 0.6, e[1] + Math.sin(a) * hs * 0.6);
|
|
236
|
+
x.lineTo(e[0] + Math.cos(a + 2.5) * hs, e[1] + Math.sin(a + 2.5) * hs); x.lineTo(e[0] + Math.cos(a - 2.5) * hs, e[1] + Math.sin(a - 2.5) * hs); x.closePath(); x.fill();
|
|
237
|
+
x.restore();
|
|
238
|
+
};
|
|
239
|
+
const T = (x, s, font, px, py, align = 'left', ls = 0) => { x.font = font; x.textAlign = align; x.letterSpacing = ls + 'px'; x.fillText(s, px, py); x.letterSpacing = '0px'; };
|
|
240
|
+
|
|
241
|
+
// animal line drawings (blue plate) for cards
|
|
242
|
+
const animal = (x, kind, s) => {
|
|
243
|
+
x.lineWidth = Math.max(2.5, s * 0.045); x.lineCap = 'round'; x.lineJoin = 'round';
|
|
244
|
+
x.beginPath(); x.arc(0, 0, s * 0.3, 0, 7); x.stroke();
|
|
245
|
+
if (kind === 'cat') {
|
|
246
|
+
x.beginPath(); x.moveTo(-s * 0.26, -s * 0.12); x.lineTo(-s * 0.24, -s * 0.42); x.lineTo(-s * 0.06, -s * 0.28); x.moveTo(s * 0.26, -s * 0.12); x.lineTo(s * 0.24, -s * 0.42); x.lineTo(s * 0.06, -s * 0.28); x.stroke();
|
|
247
|
+
x.beginPath(); for (const sg of [-1, 1]) for (const dy of [-0.02, 0.05]) { x.moveTo(sg * s * 0.1, s * 0.08); x.lineTo(sg * s * 0.42, s * (0.06 + dy)); } x.stroke();
|
|
248
|
+
} else {
|
|
249
|
+
for (const sg of [-1, 1]) { x.beginPath(); x.ellipse(sg * s * 0.3, s * 0.0, s * 0.09, s * 0.2, sg * 0.4, 0, 7); x.fill(); }
|
|
250
|
+
x.beginPath(); x.ellipse(0, s * 0.12, s * 0.07, s * 0.05, 0, 0, 7); x.fill();
|
|
251
|
+
}
|
|
252
|
+
x.beginPath(); x.arc(-s * 0.1, -s * 0.04, s * 0.035, 0, 7); x.arc(s * 0.1, -s * 0.04, s * 0.035, 0, 7); x.fill();
|
|
253
|
+
};
|
|
254
|
+
// a labelled training card: yellow photo, blue drawing, pink tag
|
|
255
|
+
const card = (x, ink, cx, cy, s, kind, label, rot) => {
|
|
256
|
+
x.save(); x.translate(cx, cy); x.rotate(rot); x.fillStyle = '#000'; x.strokeStyle = '#000';
|
|
257
|
+
const w = s, h = s * 1.22;
|
|
258
|
+
if (ink !== 'yellow') { x.fillStyle = '#fff'; x.fillRect(-w / 2, -h / 2, w, h); x.fillStyle = '#000'; }
|
|
259
|
+
if (ink === 'yellow') { // tonal photo: lit from the top-left, so it screens from a light dot tint into a solid
|
|
260
|
+
const g = x.createLinearGradient(-w / 2, -h / 2, w / 2, h * 0.2); g.addColorStop(0, 'rgba(0,0,0,0.42)'); g.addColorStop(0.6, 'rgba(0,0,0,0.85)'); g.addColorStop(1, '#000');
|
|
261
|
+
x.fillStyle = g; x.beginPath(); x.roundRect(-w / 2 + 6, -h / 2 + 6, w - 12, h * 0.68, 4); x.fill(); x.fillStyle = '#000'; }
|
|
262
|
+
if (ink === 'blue') {
|
|
263
|
+
x.lineWidth = Math.max(2, s * 0.035); x.beginPath(); x.roundRect(-w / 2, -h / 2, w, h, 6); x.stroke();
|
|
264
|
+
x.save(); x.translate(0, -h * 0.13); animal(x, kind, s * 0.8); x.restore();
|
|
265
|
+
if (label) T(x, label, `700 ${Math.round(s * 0.25)}px "Space Mono"`, 0, h * 0.42, 'center');
|
|
266
|
+
}
|
|
267
|
+
if (ink === 'pink' && label) { const g = x.createLinearGradient(-w / 2, 0, w / 2, 0); g.addColorStop(0, 'rgba(0,0,0,0.8)'); g.addColorStop(1, 'rgba(0,0,0,0.3)'); x.fillStyle = g; x.fillRect(-w / 2 + 6, h * 0.24, w - 12, h * 0.22); }
|
|
268
|
+
x.restore();
|
|
269
|
+
};
|
|
270
|
+
// the model: a chunky machine with a hopper, a screen and three knobs
|
|
271
|
+
const machine = (x, ink, cx, cy, s, knobs, glow) => {
|
|
272
|
+
x.save(); x.translate(cx, cy); x.scale(s, s); x.fillStyle = '#000'; x.strokeStyle = '#000'; x.lineJoin = 'round';
|
|
273
|
+
const body = () => { x.beginPath(); x.roundRect(-150, -110, 300, 230, 22); };
|
|
274
|
+
const hopper = () => { x.beginPath(); x.moveTo(-110, -200); x.lineTo(110, -200); x.lineTo(46, -110); x.lineTo(-46, -110); x.closePath(); };
|
|
275
|
+
if (ink === 'yellow') { // body shaded as a dot gradient (light top-left -> solid bottom-right), like the hero rocket
|
|
276
|
+
const g = x.createLinearGradient(-150, -110, 150, 120); g.addColorStop(0, 'rgba(0,0,0,0.45)'); g.addColorStop(0.5, 'rgba(0,0,0,0.8)'); g.addColorStop(0.85, '#000');
|
|
277
|
+
x.fillStyle = g; body(); x.fill(); x.fillStyle = '#fff'; x.fillRect(-112, -84, 224, 92); x.fillStyle = '#000'; if (glow) { x.globalAlpha = glow; x.fillRect(-112, -84, 224, 92); x.globalAlpha = 1; } }
|
|
278
|
+
if (ink === 'pink') {
|
|
279
|
+
{ const g = x.createLinearGradient(0, -200, 0, -110); g.addColorStop(0, 'rgba(0,0,0,0.7)'); g.addColorStop(1, 'rgba(0,0,0,0.22)'); x.fillStyle = g; hopper(); x.fill(); }
|
|
280
|
+
knobs.forEach((a, i) => { // domed knobs: a dotted highlight top-left, solid at the rim
|
|
281
|
+
const kx = -90 + i * 90, g = x.createRadialGradient(kx - 9, 52, 2, kx, 62, 27); g.addColorStop(0, 'rgba(0,0,0,0.35)'); g.addColorStop(0.75, '#000');
|
|
282
|
+
x.fillStyle = g; x.beginPath(); x.arc(kx, 62, 26, 0, 7); x.fill(); });
|
|
283
|
+
x.fillStyle = '#000';
|
|
284
|
+
}
|
|
285
|
+
if (ink === 'blue') {
|
|
286
|
+
x.lineWidth = 8; body(); x.stroke(); x.lineWidth = 6; hopper(); x.stroke();
|
|
287
|
+
// the screen prints as a dotted blue tint with a paper-white glare streak
|
|
288
|
+
{ const g = x.createLinearGradient(0, -84, 0, 8); g.addColorStop(0, 'rgba(0,0,0,0.34)'); g.addColorStop(1, 'rgba(0,0,0,0.2)'); x.fillStyle = g; x.fillRect(-112, -84, 224, 92);
|
|
289
|
+
x.fillStyle = '#fff'; x.beginPath(); x.moveTo(-70, -84); x.lineTo(-38, -84); x.lineTo(-84, 8); x.lineTo(-112, 8); x.lineTo(-112, 0); x.closePath(); x.fill(); x.fillStyle = '#000'; }
|
|
290
|
+
x.lineWidth = 6; x.strokeRect(-112, -84, 224, 92);
|
|
291
|
+
x.save(); body(); x.clip(); x.fillStyle = 'rgba(0,0,0,0.3)'; x.fillRect(100, -120, 60, 260); x.restore();
|
|
292
|
+
knobs.forEach((a, i) => {
|
|
293
|
+
const kx = -90 + i * 90; x.lineWidth = 5; x.beginPath(); x.arc(kx, 62, 26, 0, 7); x.stroke();
|
|
294
|
+
x.lineWidth = 7; x.lineCap = 'round'; x.beginPath(); x.moveTo(kx, 62); x.lineTo(kx + Math.cos(a) * 20, 62 + Math.sin(a) * 20); x.stroke();
|
|
295
|
+
});
|
|
296
|
+
T(x, 'MODEL', '700 30px "Space Mono"', 0, 158, 'center', 4);
|
|
297
|
+
}
|
|
298
|
+
x.restore();
|
|
299
|
+
};
|
|
300
|
+
const bubble = (x, ink, cx, cy, w, h) => {
|
|
301
|
+
const path = () => { x.beginPath(); x.roundRect(cx - w / 2, cy - h / 2, w, h, 26); x.moveTo(cx - w * 0.3, cy + h / 2 - 2); x.lineTo(cx - w * 0.42, cy + h / 2 + 34); x.lineTo(cx - w * 0.12, cy + h / 2 - 2); };
|
|
302
|
+
if (ink === 'pink') { x.fillStyle = '#fff'; path(); x.fill(); x.fillStyle = '#000'; }
|
|
303
|
+
if (ink === 'yellow') { const g = x.createLinearGradient(cx - w / 2, cy - h / 2, cx + w / 2, cy + h / 2); g.addColorStop(0, 'rgba(0,0,0,0.05)'); g.addColorStop(1, 'rgba(0,0,0,0.5)'); x.fillStyle = g; path(); x.fill(); x.fillStyle = '#000'; }
|
|
304
|
+
if (ink === 'blue') { x.fillStyle = '#fff'; path(); x.fill(); x.fillStyle = '#000'; x.lineWidth = 7; x.lineJoin = 'round'; path(); x.stroke(); }
|
|
305
|
+
};
|
|
306
|
+
const scribbleCircle = (x, cx, cy, rx, ry, u, w) => {
|
|
307
|
+
if (u <= 0) return;
|
|
308
|
+
x.save(); x.lineWidth = w; x.lineCap = 'round'; x.beginPath();
|
|
309
|
+
const N = 60, turns = 1.15;
|
|
310
|
+
for (let i = 0; i <= N * u; i++) { const a = -2.2 + (i / N) * turns * Math.PI * 2, rr = 1 + 0.06 * Math.sin(i * 0.5); const px = cx + Math.cos(a) * rx * rr, py = cy + Math.sin(a) * ry * rr; i ? x.lineTo(px, py) : x.moveTo(px, py); }
|
|
311
|
+
x.stroke(); x.restore();
|
|
312
|
+
};
|
|
313
|
+
const fmt = (n) => Math.round(n).toLocaleString('en-US');
|
|
314
|
+
|
|
315
|
+
// flowing card stream path for the DATA beat
|
|
316
|
+
const P0 = [130, 460], PC = [430, 120], P1 = [905, 205];
|
|
317
|
+
|
|
318
|
+
const exScene = (x, ink, sc, t) => {
|
|
319
|
+
x.fillStyle = '#000'; x.strokeStyle = '#000';
|
|
320
|
+
if (sc === 0) {
|
|
321
|
+
// --- machine + card stream + counter ---
|
|
322
|
+
const mIn = XE.back(seg(t, 2.2, 2.8));
|
|
323
|
+
if (t > 2.2) machine(x, ink, 1010, 400 + (1 - mIn) * 400, 1.15, [-2.4 + t * 0.5, -0.8, 0.6 - t * 0.3], 0);
|
|
324
|
+
if (ink === 'blue') arrowQ(x, P0, PC, P1, XE.inOut(seg(t, 2.5, 3.1)), 9, [2, 18]);
|
|
325
|
+
// cards: spawn faster and faster
|
|
326
|
+
for (let i = 0, t0 = 2.85; i < 22; i++, t0 += Math.max(0.13, 0.36 - i * 0.02)) {
|
|
327
|
+
const u = seg(t, t0, t0 + 1.25); if (u <= 0 || u >= 1) continue;
|
|
328
|
+
const e = 1 - Math.pow(1 - u, 1.6), q = qpt(P0, PC, P1, e), kind = i % 3 === 1 ? 'dog' : 'cat';
|
|
329
|
+
card(x, ink, q[0], q[1] - 40, 150 * (1 - e * 0.6), kind, kind, Math.sin(i * 2.1) * 0.15 + e * 0.3);
|
|
330
|
+
}
|
|
331
|
+
// counter
|
|
332
|
+
if (t > 2.6) {
|
|
333
|
+
const n = 1e6 * Math.pow(seg(t, 2.7, 5.4), 2.2);
|
|
334
|
+
if (ink === 'blue' || ink === 'pink') { const o = ink === 'pink' ? 5 : 0; T(x, fmt(n), '400 78px "Archivo Black"', 70 + o, 650 + o, 'left', -2); }
|
|
335
|
+
if (ink === 'blue') T(x, 'EXAMPLES SEEN', '700 28px "Space Mono"', 74, 573, 'left', 3);
|
|
336
|
+
if (ink === 'yellow') { const w = 520 * XE.out(seg(t, 2.6, 3.0)); x.fillRect(60, 548, w, 30); }
|
|
337
|
+
if (ink === 'pink' && t > 5.4) { x.lineWidth = 7; x.lineCap = 'round'; x.beginPath(); const u = XE.out(seg(t, 5.4, 5.75)); x.moveTo(70, 676); x.lineTo(70 + 470 * u, 672 + 4 * u); x.stroke(); }
|
|
338
|
+
}
|
|
339
|
+
// hook title travels from centre to header
|
|
340
|
+
if (t < 2.4) {
|
|
341
|
+
const u = XE.inOut(seg(t, 1.5, 2.35)), s = H.lerp(1, 0.3, u), cx = H.lerp(640, 64, u), cy = H.lerp(330, 62, u);
|
|
342
|
+
const al = H.lerp(0.5, 0, u); // anchor: centre -> left
|
|
343
|
+
x.save(); x.translate(cx, cy); x.scale(s, s);
|
|
344
|
+
x.textAlign = 'left';
|
|
345
|
+
x.font = '400 128px "Archivo Black"'; x.letterSpacing = '-4px';
|
|
346
|
+
const w1 = x.measureText('How does').width, w2 = x.measureText('AI learn?').width, wm = Math.max(w1, w2);
|
|
347
|
+
const ox = -wm * al;
|
|
348
|
+
const o = ink === 'pink' ? 9 : 0;
|
|
349
|
+
if (ink === 'blue' || ink === 'pink') { x.fillText('How does', ox + o, -10 + o); x.fillText('AI learn?', ox + o, 120 + o); }
|
|
350
|
+
if (ink === 'yellow') { x.beginPath(); x.arc(ox + wm * 0.82, -60, 120 * (1 - u), 0, 7); x.fill(); }
|
|
351
|
+
x.letterSpacing = '0px'; x.restore();
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
if (sc === 1) {
|
|
355
|
+
const lt = t;
|
|
356
|
+
// new photo, no label yet
|
|
357
|
+
const cIn = XE.back(seg(lt, 6.2, 6.6));
|
|
358
|
+
if (cIn > 0) card(x, ink, 190, 380 - (1 - cIn) * 60, 190, 'cat', '?', -0.05);
|
|
359
|
+
const kn = [-2.4 + 6 * 0.5, -0.8, 0.6 - 6 * 0.3];
|
|
360
|
+
const adj = XE.inOut(seg(lt, 8.5, 9.2));
|
|
361
|
+
machine(x, ink, 600, 400, 0.88, [kn[0] + adj * 1.6, kn[1] - adj * 1.2, kn[2] + adj * 2.1], ink === 'yellow' ? 0 : 0);
|
|
362
|
+
// GUESS arrow
|
|
363
|
+
if (ink === 'blue') { arrowQ(x, [300, 300], [420, 230], [500, 285], XE.out(seg(lt, 6.55, 7.0)), 8); if (lt > 6.8) T(x, 'GUESS', '400 30px "Archivo Black"', 400, 228, 'center'); }
|
|
364
|
+
if (ink === 'blue') arrowQ(x, [740, 300], [800, 230], [860, 250], XE.out(seg(lt, 7.0, 7.3)), 8);
|
|
365
|
+
// output bubble: dog? -> cat
|
|
366
|
+
const bIn = XE.back(seg(lt, 7.15, 7.45));
|
|
367
|
+
if (bIn > 0) {
|
|
368
|
+
x.save(); x.translate(1030, 250); x.scale(bIn, bIn); x.translate(-1030, -250);
|
|
369
|
+
bubble(x, ink, 1030, 250, 250, 120);
|
|
370
|
+
const right = lt > 9.4;
|
|
371
|
+
if (ink === 'blue') T(x, right ? 'cat' : 'dog?', '400 64px "Archivo Black"', 1030, 274, 'center');
|
|
372
|
+
x.restore();
|
|
373
|
+
}
|
|
374
|
+
// CHECK: big pink X + circle on the wrong guess
|
|
375
|
+
if (lt > 7.75 && lt < 9.4) {
|
|
376
|
+
const u = XE.out(seg(lt, 7.75, 7.95));
|
|
377
|
+
if (ink === 'pink') { x.save(); x.lineWidth = 16; x.lineCap = 'round'; x.translate(1150, 170); x.scale(u, u); x.beginPath(); x.moveTo(-34, -34); x.lineTo(34, 34); x.moveTo(34, -34); x.lineTo(-34, 34); x.stroke(); x.restore(); }
|
|
378
|
+
if (ink === 'pink') scribbleCircle(x, 1030, 250, 160, 92, seg(lt, 7.8, 8.2), 7);
|
|
379
|
+
if (ink === 'blue' && lt > 7.9) { T(x, 'CHECK', '400 30px "Archivo Black"', 1030, 120, 'center'); T(x, "it's a cat!", '700 28px "Space Mono"', 1030, 404, 'center'); }
|
|
380
|
+
}
|
|
381
|
+
// ADJUST: error travels back along the bottom to the knobs
|
|
382
|
+
if (ink === 'pink') arrowQ(x, [1010, 420], [900, 620], [700, 495], XE.inOut(seg(lt, 8.05, 8.55)), 9, [18, 14]);
|
|
383
|
+
if (lt > 8.2 && ink === 'blue') T(x, 'ADJUST', '400 30px "Archivo Black"', 880, 620, 'center');
|
|
384
|
+
// error pulse dot riding the return arrow
|
|
385
|
+
if (ink === 'pink' && lt > 8.05 && lt < 8.75) { const q = qpt([1010, 420], [900, 620], [700, 495], XE.inOut(seg(lt, 8.05, 8.75))); x.beginPath(); x.arc(q[0], q[1], 16, 0, 7); x.fill(); }
|
|
386
|
+
if (ink === 'yellow' && lt > 8.5 && lt < 9.4) for (let i = 0; i < 3; i++) sparkle(x, 600 - 79 + i * 79 + 30, 455 - 30, 16 * (1 + 0.3 * Math.sin(lt * 20 + i)), lt);
|
|
387
|
+
// CORRECT: tick
|
|
388
|
+
if (lt > 9.4) {
|
|
389
|
+
const u = XE.back(seg(lt, 9.4, 9.65));
|
|
390
|
+
if (ink === 'yellow') { x.beginPath(); x.arc(1160, 170, 44 * u, 0, 7); x.fill(); }
|
|
391
|
+
if (ink === 'blue') { x.save(); x.translate(1160, 170); x.scale(u, u); x.lineWidth = 12; x.lineCap = 'round'; x.lineJoin = 'round'; x.beginPath(); x.moveTo(-22, 2); x.lineTo(-6, 18); x.lineTo(24, -18); x.stroke(); x.restore(); }
|
|
392
|
+
if (ink === 'blue') T(x, 'CHECK', '400 30px "Archivo Black"', 1030, 120, 'center');
|
|
393
|
+
}
|
|
394
|
+
// the loop keeps running: little dots circulating guess -> check -> adjust
|
|
395
|
+
if (lt > 9.6 && ink === 'pink') for (let i = 0; i < 6; i++) { const u = ((lt - 9.6) * 0.9 + i / 6) % 1; const q = qpt([1010, 420], [900, 620], [700, 495], u); x.beginPath(); x.arc(q[0], q[1], 7, 0, 7); x.fill(); }
|
|
396
|
+
}
|
|
397
|
+
if (sc === 2) {
|
|
398
|
+
const lt = t - 10.6;
|
|
399
|
+
// chart frame
|
|
400
|
+
const X0 = 90, Y0 = 560, CW = 640, CHh = 360;
|
|
401
|
+
if (ink === 'blue') {
|
|
402
|
+
x.lineWidth = 7; x.lineCap = 'round'; x.beginPath(); x.moveTo(X0, Y0 - CHh - 10); x.lineTo(X0, Y0); x.lineTo(X0 + CW + 10, Y0); x.stroke();
|
|
403
|
+
T(x, 'TRAINING ROUNDS', '700 28px "Space Mono"', X0 + CW - 48, Y0 + 40, 'right', 1);
|
|
404
|
+
arrowQ(x, [X0 + CW - 38, Y0 + 30], [X0 + CW - 18, Y0 + 30], [X0 + CW + 4, Y0 + 30], 1, 6);
|
|
405
|
+
x.font = '700 24px "Space Mono"'; for (let i = 0; i <= 4; i++) { x.textAlign = 'right'; x.fillText(`${50 + i * 12.5 | 0}`, X0 - 12, Y0 - i * CHh / 4 + 8); }
|
|
406
|
+
}
|
|
407
|
+
const prog = XE.inOut(seg(lt, 0.35, 2.1));
|
|
408
|
+
const acc = (u) => 61 + 36 * (1 - Math.exp(-u * 3.2)) / (1 - Math.exp(-3.2)) + Math.sin(u * 40) * 2.2 * (1 - u);
|
|
409
|
+
const yv = (v) => Y0 - ((v - 50) / 50) * CHh;
|
|
410
|
+
const pts = []; for (let i = 0; i <= 80 * prog; i++) { const u = i / 80; pts.push([X0 + u * CW, yv(acc(u))]); }
|
|
411
|
+
if (pts.length > 1) {
|
|
412
|
+
if (ink === 'blue') { x.fillStyle = 'rgba(0,0,0,0.3)'; x.beginPath(); x.moveTo(X0, Y0); pts.forEach((p) => x.lineTo(p[0], p[1])); x.lineTo(pts[pts.length - 1][0], Y0); x.closePath(); x.fill(); x.fillStyle = '#000'; }
|
|
413
|
+
if (ink === 'pink') { x.lineWidth = 10; x.lineJoin = 'round'; x.lineCap = 'round'; x.beginPath(); pts.forEach((p, i) => (i ? x.lineTo(p[0], p[1]) : x.moveTo(p[0], p[1]))); x.stroke(); const e = pts[pts.length - 1]; x.beginPath(); x.arc(e[0], e[1], 14, 0, 7); x.fill(); }
|
|
414
|
+
}
|
|
415
|
+
// big counter
|
|
416
|
+
const v = Math.round(61 + 36 * prog);
|
|
417
|
+
if (ink === 'blue') T(x, 'ACCURACY', '700 28px "Space Mono"', 990, 222, 'center', 6);
|
|
418
|
+
if (ink === 'pink') T(x, v + '%', '400 150px "Archivo Black"', 990, 400, 'center', -6);
|
|
419
|
+
if (ink === 'blue') { x.font = '400 150px "Archivo Black"'; x.textAlign = 'center'; x.letterSpacing = '-6px'; x.lineWidth = 3; x.lineJoin = 'round'; x.strokeText(v + '%', 990, 400); x.letterSpacing = '0px'; }
|
|
420
|
+
if (ink === 'yellow') { // the sun-disc behind the number: solid core screening out to a dotted rim
|
|
421
|
+
const g = x.createRadialGradient(970, 325, 10, 990, 345, 152); g.addColorStop(0, '#000'); g.addColorStop(0.62, '#000'); g.addColorStop(0.8, 'rgba(0,0,0,0.8)'); g.addColorStop(1, 'rgba(0,0,0,0.5)');
|
|
422
|
+
x.fillStyle = g; x.beginPath(); x.arc(990, 345, 150, 0, 7); x.fill(); x.fillStyle = '#000'; }
|
|
423
|
+
if (ink === 'pink') scribbleCircle(x, 990, 345, 190, 110, seg(lt, 2.1, 2.5), 8);
|
|
424
|
+
if (ink === 'yellow' && lt > 2.2) [[810, 210], [1170, 230], [1180, 470]].forEach(([a, b], i) => sparkle(x, a, b, 24 * XE.back(seg(lt, 2.2 + i * 0.08, 2.5 + i * 0.08)), 0.3));
|
|
425
|
+
// takeaway band prints across the bottom
|
|
426
|
+
const tw = seg(t, 12.85, 13.25);
|
|
427
|
+
if (tw > 0) {
|
|
428
|
+
if (ink === 'yellow') { x.fillRect(0, 600, W_ * XE.out(tw), 100); }
|
|
429
|
+
if (ink === 'blue' || ink === 'yellow' || ink === 'pink') { if (ink !== 'yellow') { x.fillStyle = '#fff'; x.fillRect(0, 600, W_ * XE.out(tw), 100); x.fillStyle = '#000'; } }
|
|
430
|
+
if (ink === 'blue' && t > 13.0) {
|
|
431
|
+
x.font = '400 46px "Archivo Black"'; x.letterSpacing = '-1px';
|
|
432
|
+
const a = 'More examples', b = 'better guesses', wa = x.measureText(a).width, wb = x.measureText(b).width, gap = 90, tot = wa + gap + wb, sx = 640 - tot / 2;
|
|
433
|
+
x.textAlign = 'left'; x.fillText(a, sx, 666); x.fillText(b, sx + wa + gap, 666); x.letterSpacing = '0px';
|
|
434
|
+
arrowQ(x, [sx + wa + 16, 650], [sx + wa + 45, 646], [sx + wa + gap - 20, 650], XE.out(seg(t, 13.1, 13.4)), 7);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
const W_ = 1280;
|
|
440
|
+
|
|
441
|
+
const explainerFn = (ctx, W, H_, t) => {
|
|
442
|
+
const st = rxStatic(W, H_);
|
|
443
|
+
const step = Math.floor(t * 8), jr = H.rng(2000 + step);
|
|
444
|
+
const TR = [6.0, 10.6];
|
|
445
|
+
const base = [
|
|
446
|
+
{ k: 'yellow', ink: INK.yellow, dx: -5, dy: 6, ang: 0.26, cell: 5.2 },
|
|
447
|
+
{ k: 'pink', ink: INK.pink, dx: 6, dy: -3, ang: 1.31, cell: 5.2 },
|
|
448
|
+
{ k: 'blue', ink: INK.blue, dx: 0, dy: 0, ang: 0.79, cell: 5.2 },
|
|
449
|
+
];
|
|
450
|
+
const seps = base.map((p, k) => {
|
|
451
|
+
// plate re-registration: each drum pass slides the old scene off and the new one in, one ink at a time
|
|
452
|
+
let sc = 0, off = 0;
|
|
453
|
+
for (let j = 0; j < TR.length; j++) {
|
|
454
|
+
const s0 = TR[j] - 0.3 + k * 0.11;
|
|
455
|
+
if (t >= s0) { const u = cl((t - s0) / 0.6); if (u < 0.5) { sc = j; off = -XE.in(u * 2) * 1450; } else { sc = j + 1; off = (1 - XE.out((u - 0.5) * 2)) * 1450; } }
|
|
456
|
+
}
|
|
457
|
+
const intro = 1 - XE.out(seg(t, k * 0.18, k * 0.18 + 0.55));
|
|
458
|
+
p.reveal = t < 1.2 ? seg(t, k * 0.18, k * 0.18 + 0.55) * (H_ + 60) - 30 : 1e9;
|
|
459
|
+
const c = H.layer(W, H_), x = c.getContext('2d', { willReadFrequently: true });
|
|
460
|
+
x.fillStyle = '#fff'; x.fillRect(0, 0, W, H_);
|
|
461
|
+
x.save();
|
|
462
|
+
x.translate(p.dx + jr.range(-1, 1) * (k < 2) + off, p.dy + jr.range(-1, 1) * (k < 2) - intro * 40);
|
|
463
|
+
if (sc === 1) { x.translate(650, 400); x.scale(1.1, 1.1); x.translate(-650, -400); }
|
|
464
|
+
exScene(x, p.k, sc, t);
|
|
465
|
+
x.restore();
|
|
466
|
+
// running header (stays put while scenes swap underneath)
|
|
467
|
+
if (t >= 2.35) {
|
|
468
|
+
x.save(); x.translate(p.dx, p.dy); x.fillStyle = '#000';
|
|
469
|
+
if (p.k === 'blue') { x.font = '400 38px "Archivo Black"'; x.letterSpacing = '-1px'; x.fillText('How does AI learn?', 64, 62); x.letterSpacing = '0px'; }
|
|
470
|
+
if (p.k === 'pink') { x.fillRect(64, 76, 380, 6); }
|
|
471
|
+
x.restore();
|
|
472
|
+
}
|
|
473
|
+
return x.getImageData(0, 0, W, H_).data;
|
|
474
|
+
});
|
|
475
|
+
const { mott, fine, streaks } = st;
|
|
476
|
+
const out = ctx.createImageData(W, H_), o = out.data;
|
|
477
|
+
const cs = base.map((p) => Math.cos(p.ang)), sn = base.map((p) => Math.sin(p.ang));
|
|
478
|
+
for (let y = 0; y < H_; y++) for (let x = 0; x < W; x++) {
|
|
479
|
+
const i = (y * W + x) * 4;
|
|
480
|
+
const pf = (fine[i] - 128) / 128, pg = hash(x, y, 7) - 0.5;
|
|
481
|
+
let r = PAPER[0] * (1 + pf * 0.018 + pg * 0.035), g = PAPER[1] * (1 + pf * 0.018 + pg * 0.035), b = PAPER[2] * (1 + pf * 0.022 + pg * 0.04);
|
|
482
|
+
for (let k = 0; k < 3; k++) {
|
|
483
|
+
const d = 1 - seps[k][i] / 255; if (d < 0.01) continue;
|
|
484
|
+
const p = base[k];
|
|
485
|
+
let edgeF = 1;
|
|
486
|
+
if (p.reveal < 1e8) { const ed = p.reveal + Math.sin(x * 0.031 + k * 2) * 5 - y; if (ed < 0) continue; if (ed < 18) edgeF = ed / 18; }
|
|
487
|
+
let cov;
|
|
488
|
+
if (d > 0.96) cov = 1;
|
|
489
|
+
else {
|
|
490
|
+
const u = (x * cs[k] + y * sn[k]) * (6.2832 / p.cell), v = (-x * sn[k] + y * cs[k]) * (6.2832 / p.cell);
|
|
491
|
+
const thr = (0.5 + 0.25 * (Math.cos(u) + Math.cos(v))) * 0.72 + hash(x, y, 50 + k) * 0.28;
|
|
492
|
+
cov = cl((d * 1.05 - thr) * 5 + 0.5);
|
|
493
|
+
}
|
|
494
|
+
if (cov <= 0) continue;
|
|
495
|
+
const m = (k === 0 ? mott[i + 2] - 128 : k === 1 ? mott[i] - 128 : mott[i + 1] - 128) / 128;
|
|
496
|
+
let dens = 0.88 + m * 0.15 + ((fine[i + k] - 128) / 128) * 0.07 + (hash(x, y, 90 + k + step * 7) - 0.5) * 0.16;
|
|
497
|
+
dens *= streaks[k][x];
|
|
498
|
+
if (hash(x, y, 120 + k) < 0.012 + Math.max(0, -m) * 0.04) dens *= 0.35;
|
|
499
|
+
cov *= cl(dens) * edgeF;
|
|
500
|
+
r *= 1 - cov * (1 - p.ink[0] / 255); g *= 1 - cov * (1 - p.ink[1] / 255); b *= 1 - cov * (1 - p.ink[2] / 255);
|
|
501
|
+
}
|
|
502
|
+
o[i] = r; o[i + 1] = g; o[i + 2] = b; o[i + 3] = 255;
|
|
503
|
+
}
|
|
504
|
+
ctx.putImageData(out, 0, 0);
|
|
505
|
+
};
|
|
506
|
+
|
|
507
|
+
registerStyle({
|
|
508
|
+
id: 'risograph',
|
|
509
|
+
name: 'Risograph Zine',
|
|
510
|
+
category: 'Print',
|
|
511
|
+
description: 'Three fluorescent spot inks (pink, medium blue, yellow) laid down as separate drum passes and multiplied on off-white stock — misregistered plates, grainy patchy solids, dotted tints and roller streaks.',
|
|
512
|
+
motion: 'The sheet goes through the drum three times — yellow, then pink, then blue roll down the page and slide into misregistration — then the print boils at 8 fps while the rocket creeps upward and its flame flickers in the screen.',
|
|
513
|
+
fonts: ['400 250px "Archivo Black"', '700 19px "Space Mono"', '400 17px "Space Mono"'],
|
|
514
|
+
duration: 5,
|
|
515
|
+
frameT: 4.6,
|
|
516
|
+
readsPixels: true,
|
|
517
|
+
explainerDuration: 15,
|
|
518
|
+
explainerNote: 'Scenes change by re-registering the plates — yellow, pink and blue slide off and the next scene\'s plates slide in one drum pass at a time — with dotted blue flow arrows, pink error arrows and scribbled circles, and counters set in big two-plate zine type.',
|
|
519
|
+
explainer(ctx, W, H_, t) { explainerFn(ctx, W, H_, t); },
|
|
520
|
+
// Sound: a riso duplicator. Drum passes = roller + paper feed + one registration clack per plate,
|
|
521
|
+
// dotted arrows tick dot by dot, stamps for the X / tick / 97%, quiet machine hum and room under it.
|
|
522
|
+
// Timings mirror explainerFn/exScene above (TR, plate offsets k*0.11, seg() windows).
|
|
523
|
+
// Voiceover mode (k.vo): beds drop out and everything flagged minor (or inside k.withMinor) plays quieter, so the
|
|
524
|
+
// plate clacks, the title press, 1,000,000 stamp, the X, the correction, the 97% hit and the closing chord lead.
|
|
525
|
+
explainerSound(k) {
|
|
526
|
+
const D = 15, TR = [6.0, 10.6];
|
|
527
|
+
const pan = (px) => H.clamp((px / 1280) * 2 - 1, -1, 1) * 0.7;
|
|
528
|
+
// first time an eased progress over [t0,t1] reaches u
|
|
529
|
+
const when = (t0, t1, ease, u) => { for (let i = 0; i <= 400; i++) { const t = t0 + ((t1 - t0) * i) / 400; if (ease(i / 400) >= u - 1e-6) return t; } return t1; };
|
|
530
|
+
// dotted / dashed arrow: one ink dot per step, following the arrow's ease, panned along it
|
|
531
|
+
// ink dab: one dot of the dotted/dashed arrows (a short damped tap with a little body)
|
|
532
|
+
const dab = (t, f, g, p) => { k.withMinor(() => { k.noise(t, { dur: 0.03, filter: 'bandpass', f, q: 1.1, gain: 0.32 * g, a: 0.001, pan: p }); k.tone(t, { f: f * 0.14, dur: 0.035, gain: 0.1 * g, pan: p }); }); };
|
|
533
|
+
// numbering machine: the counter digits advance with a small metal clack
|
|
534
|
+
const numb = (t, f, g, p) => { k.withMinor(() => { k.noise(t, { dur: 0.025, filter: 'bandpass', f, q: 1.5, gain: 0.34 * g, a: 0.001, pan: p }); k.tone(t, { f: f * 0.22, type: 'triangle', dur: 0.03, gain: 0.08 * g, pan: p }); }); };
|
|
535
|
+
const dots = (t0, t1, ease, n, f, g, pa, pb) => { for (let i = 1; i <= n; i++) dab(when(t0, t1, ease, i / n), f, g, pa + (pb - pa) * (i / n)); };
|
|
536
|
+
// a drum pass: roller under the slide, sheet feed, then a registration clack as each plate lands (Y, P, B)
|
|
537
|
+
const drum = (s0, lands, g) => {
|
|
538
|
+
k.play('roller', s0, { dur: lands[2] - s0 + 0.04, gain: 0.45 * g, minor: true });
|
|
539
|
+
k.play('paper', s0, { dur: 0.3, gain: 0.3 * g, minor: true });
|
|
540
|
+
lands.forEach((tl, i) => k.play('tock', tl, { f: [470, 590, 700][i], gain: 0.6 * g, pan: [-0.2, 0.2, 0][i] }));
|
|
541
|
+
};
|
|
542
|
+
|
|
543
|
+
k.bed('room', 0, D, { gain: 0.2 });
|
|
544
|
+
k.bed('hum', 0, D, { gain: 0.12 }); // the duplicator idling
|
|
545
|
+
|
|
546
|
+
// ---- intro: yellow, pink, blue roll down the sheet (reveal k*0.18 .. +0.55), title prints
|
|
547
|
+
k.play('roller', 0.0, { dur: 0.92, gain: 0.5, minor: true });
|
|
548
|
+
k.play('paper', 0.0, { dur: 0.3, gain: 0.35, minor: true });
|
|
549
|
+
k.play('tock', 0.55, { f: 470, gain: 0.5, pan: -0.2, minor: true });
|
|
550
|
+
k.play('tock', 0.73, { f: 590, gain: 0.5, pan: 0.2, minor: true });
|
|
551
|
+
k.play('press', 0.91, { gain: 0.38 }); // last plate down: "How does AI learn?" is complete
|
|
552
|
+
// title shrinks into the running header (1.5 -> 2.35)
|
|
553
|
+
k.noise(1.5, { dur: 0.5, color: 'pink', filter: 'bandpass', f: [[0, 450], [0.5, 1300]], q: 0.7, gain: 0.1, a: 0.18, minor: true }); // title slides to the corner: a soft sheet slide
|
|
554
|
+
|
|
555
|
+
// ---- scene 0: DATA
|
|
556
|
+
k.play('press', when(2.2, 2.8, XE.back, 1), { gain: 0.38, pan: pan(1010), minor: true }); // machine rises in
|
|
557
|
+
dots(2.5, 3.1, XE.inOut, 8, 2600, 0.9, pan(130), pan(905)); // dotted card stream arrow
|
|
558
|
+
k.play('roller', 2.6, { dur: 0.4, gain: 0.5, pan: pan(320), minor: true }); // yellow bar under the counter
|
|
559
|
+
// cards drop onto the stream, faster and faster (same spawn schedule as exScene)
|
|
560
|
+
for (let i = 0, t0 = 2.85; t0 < 5.4; i++, t0 += Math.max(0.13, 0.36 - i * 0.02))
|
|
561
|
+
k.noise(t0, { dur: 0.05, filter: 'bandpass', f: 2000 + (i % 3) * 300, q: 0.8, gain: 0.2, pan: pan(130), minor: true });
|
|
562
|
+
// EXAMPLES SEEN counter (n = 1e6 * seg(2.7, 5.4)^2.2): throttled ticks speeding up with the count
|
|
563
|
+
for (let t = 2.78; t < 5.34; ) { const s = seg(t, 2.7, 5.4); numb(t, 3800, 0.8 + 0.3 * s, pan(250)); t += 0.17 - 0.087 * s; }
|
|
564
|
+
k.play('stamp', 5.4, { gain: 0.7, pan: pan(250) }); // 1,000,000 lands
|
|
565
|
+
k.play('stroke', 5.42, { material: 'marker', dur: 0.32, gain: 0.45, pan: pan(300), minor: true }); // pink underline
|
|
566
|
+
|
|
567
|
+
// ---- drum pass 1 -> scene 1 (plates leave at TR-0.3+k*0.11, land 0.6 later)
|
|
568
|
+
drum(TR[0] - 0.3, [0, 1, 2].map((p) => TR[0] + 0.3 + p * 0.11), 1);
|
|
569
|
+
|
|
570
|
+
// ---- scene 1: GUESS / CHECK / ADJUST
|
|
571
|
+
k.play('stroke', 6.55, { material: 'brush', dur: 0.32, gain: 1, pan: pan(400), minor: true }); // GUESS arrow
|
|
572
|
+
k.play('tock', 6.8, { f: 820, gain: 0.35, pan: pan(400), minor: true }); // GUESS label
|
|
573
|
+
k.play('stroke', 7.0, { material: 'brush', dur: 0.22, gain: 0.6, pan: pan(800), minor: true });
|
|
574
|
+
k.play('pop', when(7.15, 7.45, XE.back, 1), { f: 520, gain: 0.8, pan: pan(1030), minor: true }); // "dog?" bubble
|
|
575
|
+
k.play('stamp', 7.76, { gain: 0.65, pan: pan(1150) }); // big pink X
|
|
576
|
+
k.play('error', 7.76, { f: 'A3', gain: 0.7, pan: pan(1100) });
|
|
577
|
+
k.play('stroke', 7.82, { material: 'sharpie', dur: 0.38, gain: 0.7, pan: pan(1030), minor: true }); // scribbled circle
|
|
578
|
+
dots(8.05, 8.55, XE.inOut, 7, 1700, 0.95, pan(1010), pan(700)); // dashed error arrow back to the knobs
|
|
579
|
+
for (let i = 1; i <= 6; i++) k.play('click', when(8.5, 9.2, XE.inOut, i / 6), { f: 1300 + i * 60, gain: 1.2, pan: pan(600), minor: true }); // knobs turn
|
|
580
|
+
k.play('stamp', 9.42, { gain: 0.5, pan: pan(1160), minor: true }); // tick printed, bubble reads "cat"
|
|
581
|
+
k.play('success', 9.42, { f: 'C6', gain: 0.8, pan: pan(1100) });
|
|
582
|
+
|
|
583
|
+
// ---- drum pass 2 -> scene 2
|
|
584
|
+
drum(TR[1] - 0.3, [0, 1, 2].map((p) => TR[1] + 0.3 + p * 0.11), 1);
|
|
585
|
+
|
|
586
|
+
// ---- scene 2: ACCURACY
|
|
587
|
+
const c0 = TR[1] + 0.35, c1 = TR[1] + 2.1;
|
|
588
|
+
k.play('stroke', c0, { material: 'brush', dur: c1 - c0, gain: 0.4, pan: pan(400), minor: true }); // pink line inks along
|
|
589
|
+
for (let t = c0, last = 61, lastT = -1; t < c1 + 0.05; t += 1 / 120) {
|
|
590
|
+
const v = Math.round(61 + 36 * XE.inOut(seg(t, c0, c1)));
|
|
591
|
+
if (v !== last && t - lastT >= 1 / 12) { numb(t, 3200 + (v - 61) * 50, 1, pan(990)); last = v; lastT = t; }
|
|
592
|
+
}
|
|
593
|
+
k.play('impact', c1, { gain: 1.25, pan: pan(990) }); // 97% circled: the big hit
|
|
594
|
+
// takeaway band prints across the bottom, arrow inks, then it resolves
|
|
595
|
+
k.play('roller', 12.85, { dur: 0.42, gain: 0.55, minor: true });
|
|
596
|
+
k.play('press', 13.0, { gain: 0.35, minor: true });
|
|
597
|
+
k.play('stroke', 13.1, { material: 'brush', dur: 0.25, gain: 0.7, minor: true });
|
|
598
|
+
['C5', 'G5', 'E6'].forEach((f, i) => k.play('ding', 13.4 + i * 0.07, { f, gain: 0.42 - i * 0.07, pan: (i - 1) * 0.25 }));
|
|
599
|
+
},
|
|
600
|
+
draw(ctx, W, H_, t) {
|
|
601
|
+
const step = Math.floor(t * 8); // registration "boils" a little per printed frame
|
|
602
|
+
const jr = H.rng(1000 + step);
|
|
603
|
+
const plates = [
|
|
604
|
+
{ k: 'yellow', ink: INK.yellow, dx: -5 + jr.range(-1, 1), dy: 6 + jr.range(-1, 1), rot: -0.002, ang: 0.26, cell: 5.2, seed: 11 },
|
|
605
|
+
{ k: 'pink', ink: INK.pink, dx: 6 + jr.range(-1, 1), dy: -3 + jr.range(-1, 1), rot: 0.003, ang: 1.31, cell: 5.2, seed: 22 },
|
|
606
|
+
{ k: 'blue', ink: INK.blue, dx: 0, dy: 0, rot: 0, ang: 0.79, cell: 5.2, seed: 33 },
|
|
607
|
+
];
|
|
608
|
+
// each plate prints in turn: the sheet feeds top->bottom while the plate slides into its (mis)registration
|
|
609
|
+
const STARTS = [0.2, 1.0, 1.8], PASS = 0.8;
|
|
610
|
+
plates.forEach((p, k) => {
|
|
611
|
+
const u = H.clamp((t - STARTS[k]) / PASS);
|
|
612
|
+
p.prog = u; p.reveal = u * (H_ + 60) - 30;
|
|
613
|
+
const sl = 1 - H.ease.out(H.clamp((t - STARTS[k]) / 0.6));
|
|
614
|
+
p.dx += sl * [-16, 22, -10][k]; p.dy += sl * -46;
|
|
615
|
+
});
|
|
616
|
+
const seps = plates.map((p) => {
|
|
617
|
+
if (p.prog <= 0) return null;
|
|
618
|
+
const c = H.layer(W, H_), x = c.getContext('2d', { willReadFrequently: true });
|
|
619
|
+
x.fillStyle = '#fff'; x.fillRect(0, 0, W, H_);
|
|
620
|
+
x.translate(W / 2 + p.dx, H_ / 2 + p.dy); x.rotate(p.rot); x.translate(-W / 2, -H_ / 2);
|
|
621
|
+
sepDraw(x, p.k, t);
|
|
622
|
+
return x.getImageData(0, 0, W, H_).data;
|
|
623
|
+
});
|
|
624
|
+
const mott = lowField(W, H_, 5, 96, 54, 0.11);
|
|
625
|
+
const fine = lowField(W, H_, 9, 320, 180, 0.22);
|
|
626
|
+
|
|
627
|
+
// per-plate column streaks from the drum (paper feeds top->bottom)
|
|
628
|
+
const streaks = plates.map((p, k) => {
|
|
629
|
+
const a = new Float32Array(W), nz = H.makeNoise(p.seed + 3), rr = H.rng(p.seed + 5);
|
|
630
|
+
const lines = []; for (let i = 0; i < 6; i++) lines.push([rr.range(0, W), rr.range(1, 4), rr.range(0.15, 0.35)]);
|
|
631
|
+
for (let x = 0; x < W; x++) {
|
|
632
|
+
let v = 1 - 0.1 * Math.abs(nz.fbm2(x * 0.012, 0.3, 3)) * 2 - 0.05 * (nz.n2(x * 0.09, 3.1) + 1);
|
|
633
|
+
for (const [lx, lw, ls] of lines) v -= ls * Math.exp(-((x - lx) * (x - lx)) / (lw * lw));
|
|
634
|
+
a[x] = v;
|
|
635
|
+
}
|
|
636
|
+
return a;
|
|
637
|
+
});
|
|
638
|
+
|
|
639
|
+
const out = ctx.getImageData(0, 0, W, H_), o = out.data;
|
|
640
|
+
const cs = plates.map((p) => Math.cos(p.ang)), sn = plates.map((p) => Math.sin(p.ang));
|
|
641
|
+
for (let y = 0; y < H_; y++) {
|
|
642
|
+
for (let x = 0; x < W; x++) {
|
|
643
|
+
const i = (y * W + x) * 4;
|
|
644
|
+
const pf = (fine[i] - 128) / 128, pm = (mott[i] - 128) / 128;
|
|
645
|
+
const pg = hash(x, y, 7) - 0.5;
|
|
646
|
+
let r = PAPER[0] * (1 + pf * 0.018 + pg * 0.035), g = PAPER[1] * (1 + pf * 0.018 + pg * 0.035), b = PAPER[2] * (1 + pf * 0.022 + pg * 0.04);
|
|
647
|
+
// paper fibre flecks
|
|
648
|
+
if (hash(x >> 1, y, 3) > 0.9985) { r *= 0.9; g *= 0.9; b *= 0.88; }
|
|
649
|
+
for (let k = 0; k < 3; k++) {
|
|
650
|
+
if (!seps[k]) continue;
|
|
651
|
+
let edgeF = 1;
|
|
652
|
+
if (plates[k].prog < 1) {
|
|
653
|
+
const ed = plates[k].reveal + Math.sin(x * 0.031 + k * 2) * 5 + Math.sin(x * 0.11 + k) * 2 - y;
|
|
654
|
+
if (ed < 0) continue;
|
|
655
|
+
if (ed < 18) edgeF = (ed / 18) * (0.6 + 0.4 * hash(x, y, 300 + k));
|
|
656
|
+
}
|
|
657
|
+
const d = 1 - seps[k][i] / 255;
|
|
658
|
+
if (d < 0.01) continue;
|
|
659
|
+
const p = plates[k];
|
|
660
|
+
let cov;
|
|
661
|
+
if (d > 0.96) cov = 1;
|
|
662
|
+
else {
|
|
663
|
+
const u = (x * cs[k] + y * sn[k]) * (6.2832 / p.cell), v = (-x * sn[k] + y * cs[k]) * (6.2832 / p.cell);
|
|
664
|
+
const scr = 0.5 + 0.25 * (Math.cos(u) + Math.cos(v));
|
|
665
|
+
const thr = scr * 0.72 + hash(x, y, 50 + k) * 0.28;
|
|
666
|
+
cov = H.clamp((d * 1.05 - thr) * 5 + 0.5);
|
|
667
|
+
}
|
|
668
|
+
if (cov <= 0) continue;
|
|
669
|
+
// grainy, patchy ink transfer
|
|
670
|
+
const m = (k === 0 ? (mott[i + 2] - 128) : k === 1 ? (mott[i] - 128) : (mott[i + 1] - 128)) / 128;
|
|
671
|
+
const fn = (fine[i + k] - 128) / 128;
|
|
672
|
+
let dens = 0.88 + m * 0.15 + fn * 0.07 + (hash(x, y, 90 + k + step * 7) - 0.5) * 0.16;
|
|
673
|
+
dens *= streaks[k][x];
|
|
674
|
+
dens -= Math.max(0, (y / H_ - 0.55)) * 0.12 * (k === 2 ? 1 : 0.6); // ink starves toward tail of sheet
|
|
675
|
+
if (hash(x, y, 120 + k) < 0.012 + Math.max(0, -m) * 0.04) dens *= 0.35; // pinholes
|
|
676
|
+
cov *= H.clamp(dens) * edgeF;
|
|
677
|
+
const ik = p.ink;
|
|
678
|
+
r *= 1 - cov * (1 - ik[0] / 255);
|
|
679
|
+
g *= 1 - cov * (1 - ik[1] / 255);
|
|
680
|
+
b *= 1 - cov * (1 - ik[2] / 255);
|
|
681
|
+
}
|
|
682
|
+
o[i] = r; o[i + 1] = g; o[i + 2] = b; o[i + 3] = 255;
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
ctx.putImageData(out, 0, 0);
|
|
686
|
+
// a trace of drum toner haze along the leading edge
|
|
687
|
+
const gr = ctx.createLinearGradient(0, 0, 0, 30);
|
|
688
|
+
gr.addColorStop(0, 'rgba(50,85,164,0.06)'); gr.addColorStop(1, 'rgba(50,85,164,0)');
|
|
689
|
+
ctx.fillStyle = gr; ctx.fillRect(0, 0, W, 30);
|
|
690
|
+
},
|
|
691
|
+
});
|
|
692
|
+
}
|