@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,759 @@
|
|
|
1
|
+
{
|
|
2
|
+
const TAU = Math.PI * 2;
|
|
3
|
+
const SPOT = [255, 47, 109]; // fluoro pink, the one spot ink
|
|
4
|
+
|
|
5
|
+
const RANSOM_FONTS = [
|
|
6
|
+
'400 S "Anton"', '400 S "Abril Fatface"', '400 S "Bebas Neue"', '400 S "Archivo Black"', '800 S "Playfair Display"',
|
|
7
|
+
'italic 400 S "Playfair Display"', '400 S "Special Elite"', '400 S "Courier Prime"', '400 S "UnifrakturMaguntia"',
|
|
8
|
+
'400 S "Rubik Mono One"', '400 S "Shrikhand"', '400 S "DM Serif Display"', '700 S "Oswald"', '400 S "Black Ops One"',
|
|
9
|
+
'900 S "Fraunces"', '800 S "Inter"', '400 S "Limelight"',
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
// rectangle -> polygon with torn (noisy) or scissor-cut edges
|
|
13
|
+
const scrapPoly = (r, nz, cx, cy, w, h, rot, torn = [1, 1, 1, 1], amp = 4) => {
|
|
14
|
+
const c = Math.cos(rot), s = Math.sin(rot);
|
|
15
|
+
const corners = [[-w / 2, -h / 2], [w / 2, -h / 2], [w / 2, h / 2], [-w / 2, h / 2]];
|
|
16
|
+
const out = [];
|
|
17
|
+
const seed = r() * 100;
|
|
18
|
+
for (let e = 0; e < 4; e++) {
|
|
19
|
+
const [ax, ay] = corners[e], [bx, by] = corners[(e + 1) % 4];
|
|
20
|
+
const len = Math.hypot(bx - ax, by - ay), nx = -(by - ay) / len, ny = (bx - ax) / len;
|
|
21
|
+
const step = torn[e] ? 3 : 18;
|
|
22
|
+
for (let d = 0; d < len; d += step) {
|
|
23
|
+
const u = d / len;
|
|
24
|
+
let off = 0;
|
|
25
|
+
if (torn[e]) off = nz.fbm2(seed + e * 10 + d * 0.035, seed, 4) * amp * 2.2 + (r() - 0.5) * 1.6;
|
|
26
|
+
else off = (r() - 0.5) * 1.2 + (d === 0 ? 0 : 0);
|
|
27
|
+
const px = ax + (bx - ax) * u + nx * off, py = ay + (by - ay) * u + ny * off;
|
|
28
|
+
out.push([cx + px * c - py * s, cy + px * s + py * c]);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return out;
|
|
32
|
+
};
|
|
33
|
+
const pathPoly = (c, p) => { c.beginPath(); c.moveTo(p[0][0], p[0][1]); for (let i = 1; i < p.length; i++) c.lineTo(p[i][0], p[i][1]); c.closePath(); };
|
|
34
|
+
|
|
35
|
+
// masking tape (drawn after the copier crush so it stays translucent grey); knocks the spot plate back a little
|
|
36
|
+
const maskTape = (b, sp, r, nz, cx, cy, w, h, rot) => {
|
|
37
|
+
const p = scrapPoly(r, nz, cx, cy, w, h, rot, [0, 1, 0, 1], 2.2);
|
|
38
|
+
b.save(); b.translate(2, 2); pathPoly(b, p); b.strokeStyle = 'rgba(0,0,0,0.5)'; b.lineWidth = 1.5; b.stroke(); b.restore();
|
|
39
|
+
b.save(); pathPoly(b, p); b.fillStyle = 'rgba(120,116,105,0.42)'; b.fill(); b.clip();
|
|
40
|
+
const tr = H.rng(Math.round(cx * 7 + cy));
|
|
41
|
+
{ // fibre speckle, batched into one light and one dark path
|
|
42
|
+
const lt = new Path2D(), dk = new Path2D();
|
|
43
|
+
for (let i = 0; i < 900; i++) { const pth = tr() < 0.5 ? lt : dk; pth.rect(cx - w / 1.4 + tr() * w * 1.4, cy - w / 1.4 + tr() * w * 1.4, 1.2, 1.2); }
|
|
44
|
+
b.fillStyle = 'rgba(255,255,255,0.35)'; b.fill(lt); b.fillStyle = 'rgba(0,0,0,0.35)'; b.fill(dk);
|
|
45
|
+
}
|
|
46
|
+
for (let i = 0; i < 14; i++) { b.fillStyle = `rgba(255,255,255,${tr.range(0.05, 0.12)})`; b.save(); b.translate(cx, cy); b.rotate(rot); b.fillRect(-w, -h / 2 + tr() * h, w * 2, tr.range(1, 3)); b.restore(); }
|
|
47
|
+
b.restore();
|
|
48
|
+
sp.save(); sp.globalAlpha = 0.35; sp.globalCompositeOperation = 'destination-out'; pathPoly(sp, p); sp.fill(); sp.restore();
|
|
49
|
+
return p;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// halftone render of a greyscale function g(u,v)->0..1 (1=white)
|
|
53
|
+
const halftone = (w, h, cell, ang, g) => {
|
|
54
|
+
const cv = H.layer(w, h), x = cv.getContext('2d'), img = x.createImageData(w, h), d = img.data;
|
|
55
|
+
const ca = Math.cos(ang), sa = Math.sin(ang);
|
|
56
|
+
for (let py = 0; py < h; py++) for (let px = 0; px < w; px++) {
|
|
57
|
+
const rx = px * ca + py * sa, ry = -px * sa + py * ca;
|
|
58
|
+
const gx = (Math.floor(rx / cell) + 0.5) * cell, gy = (Math.floor(ry / cell) + 0.5) * cell;
|
|
59
|
+
const dist = Math.hypot(rx - gx, ry - gy);
|
|
60
|
+
const D = 1 - g(px / w, py / h);
|
|
61
|
+
const rad = cell * 0.74 * Math.sqrt(Math.max(0, D));
|
|
62
|
+
const ink = H.clamp(rad - dist + 0.5);
|
|
63
|
+
const k = (py * w + px) * 4, v = 255 * (1 - ink);
|
|
64
|
+
d[k] = d[k + 1] = d[k + 2] = v; d[k + 3] = 255;
|
|
65
|
+
}
|
|
66
|
+
x.putImageData(img, 0, 0);
|
|
67
|
+
return cv;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
// =====================================================================
|
|
71
|
+
// EXPLAINER: each beat is a new photocopied sheet slapped down over the
|
|
72
|
+
// last (stop-motion at 8 fps). Arrows are marker, labels are typed strips
|
|
73
|
+
// or ransom letters, numbers are re-cut ransom digits.
|
|
74
|
+
// =====================================================================
|
|
75
|
+
const ZC = {};
|
|
76
|
+
const faceHT = (kind) => ZC['ht' + kind] || (ZC['ht' + kind] = halftone(200, 200, 5.5, 0.785, (u, v) => {
|
|
77
|
+
const x = u - 0.5, y = v - 0.52;
|
|
78
|
+
let g = 0.78 - 0.2 * v;
|
|
79
|
+
const cat = kind === 'cat';
|
|
80
|
+
const head = (x * x) / 0.1 + (y * y) / 0.085;
|
|
81
|
+
if (cat) {
|
|
82
|
+
const ear = (ex) => { const dx = x - ex, dy = y + 0.28; return dy < 0 && dy > -0.2 && Math.abs(dx) < (dy + 0.2) * 0.7; };
|
|
83
|
+
if (ear(-0.2) || ear(0.2)) g = 0.35;
|
|
84
|
+
} else {
|
|
85
|
+
const ear = (ex) => ((x - ex) * (x - ex)) / 0.006 + ((y - 0.02) * (y - 0.02)) / 0.05 < 1;
|
|
86
|
+
if (ear(-0.3) || ear(0.3)) g = 0.18;
|
|
87
|
+
}
|
|
88
|
+
if (head < 1) {
|
|
89
|
+
g = (cat ? 0.64 : 0.72) + 0.12 * Math.sin(u * 40 + v * 13) * 0.3 - 0.25 * Math.max(0, x + y) ;
|
|
90
|
+
if (((x + 0.12) ** 2) / 0.003 + ((y + 0.02) ** 2) / 0.004 < 1 || ((x - 0.12) ** 2) / 0.003 + ((y + 0.02) ** 2) / 0.004 < 1) g = 0.04;
|
|
91
|
+
if (Math.hypot(x + 0.11, y + 0.04) < 0.018 || Math.hypot(x - 0.13, y + 0.04) < 0.018) g = 1;
|
|
92
|
+
if (!cat && (x * x) / 0.02 + ((y - 0.13) ** 2) / 0.012 < 1) g = 0.9;
|
|
93
|
+
if ((x * x) / 0.002 + ((y - 0.1) ** 2) / 0.0012 < 1) g = 0.05;
|
|
94
|
+
if (cat && Math.abs(y - 0.12 - Math.abs(x) * 0.1) < 0.006 && Math.abs(x) > 0.07 && Math.abs(x) < 0.3) g = 0.1;
|
|
95
|
+
}
|
|
96
|
+
return H.clamp(g);
|
|
97
|
+
}));
|
|
98
|
+
|
|
99
|
+
// coarse 45-degree halftone screen (light dots) used to make solid fills read as printed matter
|
|
100
|
+
const barScreen = (c) => {
|
|
101
|
+
if (!ZC.scr) { const cv = H.layer(10, 10), x = cv.getContext('2d'); x.fillStyle = '#fff'; x.beginPath(); x.arc(5, 5, 1.45, 0, TAU); x.fill(); x.beginPath(); [[0, 0], [10, 0], [0, 10], [10, 10]].forEach(([a, bb]) => { x.moveTo(a + 1.45, bb); x.arc(a, bb, 1.45, 0, TAU); }); x.fill(); ZC.scr = cv; }
|
|
102
|
+
return c.createPattern(ZC.scr, 'repeat'); // centre + corner dots = a 45-degree screen
|
|
103
|
+
};
|
|
104
|
+
const EXPLAIN = (ctx, W, H_, t) => {
|
|
105
|
+
const nz = ZC.nz || (ZC.nz = H.makeNoise(13));
|
|
106
|
+
const ts = Math.floor(t * 8) / 8, fr = Math.floor(t * 8), jr = H.rng(1000 + fr);
|
|
107
|
+
const BW = ZC.BW || (ZC.BW = H.layer(W, H_)), SPL = ZC.SPL || (ZC.SPL = H.layer(W, H_));
|
|
108
|
+
const b = BW.getContext('2d'), sp = SPL.getContext('2d');
|
|
109
|
+
b.setTransform(1, 0, 0, 1, 0, 0); sp.setTransform(1, 0, 0, 1, 0, 0);
|
|
110
|
+
sp.clearRect(0, 0, W, H_);
|
|
111
|
+
const spotCol = H.rgba(SPOT, 1);
|
|
112
|
+
const stepIn = (st) => ts + 1e-6 >= st;
|
|
113
|
+
const prog = (a, d) => H.clamp((ts - a) / d);
|
|
114
|
+
const occlude = (poly) => { sp.save(); sp.globalCompositeOperation = 'destination-out'; pathPoly(sp, poly); sp.fill(); sp.restore(); };
|
|
115
|
+
// masking tape is laid on after the copier pass (like the still); a piece is dropped if a later scrap covers it
|
|
116
|
+
const tapes = [];
|
|
117
|
+
const pip = (x, y, P) => { let ins = false; for (let i = 0, j = P.length - 1; i < P.length; j = i++) { const xi = P[i][0], yi = P[i][1], xj = P[j][0], yj = P[j][1]; if ((yi > y) !== (yj > y) && x < ((xj - xi) * (y - yi)) / (yj - yi) + xi) ins = !ins; } return ins; };
|
|
118
|
+
const cull = (poly) => {
|
|
119
|
+
if (!tapes.length) return;
|
|
120
|
+
const m = b.getTransform(), P = poly.map(([x, y]) => [m.a * x + m.c * y + m.e, m.b * x + m.d * y + m.f]);
|
|
121
|
+
for (let i = tapes.length - 1; i >= 0; i--) if (pip(tapes[i].dx, tapes[i].dy, P)) tapes.splice(i, 1);
|
|
122
|
+
};
|
|
123
|
+
const tape = (cx, cy, w, rot, seed, h = 30) => { const m = b.getTransform(); tapes.push({ m, cx, cy, w, h, rot, seed, dx: m.a * cx + m.c * cy + m.e, dy: m.b * cx + m.d * cy + m.f }); };
|
|
124
|
+
const shadowP = (poly, dx = 2.5, dy = 2, a = 0.7) => { cull(poly); b.save(); b.translate(dx, dy); pathPoly(b, poly); b.fillStyle = `rgba(0,0,0,${a})`; b.fill(); b.restore(); };
|
|
125
|
+
const both = (f) => { f(b); f(sp); };
|
|
126
|
+
const slap = (st, cx, cy) => { const first = ts - st < 0.12, s1 = first ? 1.08 : 1, k = first ? 0.04 : 0; both((c) => { c.save(); c.translate(cx, cy); c.rotate(k); c.scale(s1, s1); c.translate(-cx, -cy); }); };
|
|
127
|
+
const unslap = () => both((c) => c.restore());
|
|
128
|
+
const scrap = (seed, cx, cy, w, h, rot, torn, fill) => { const r = H.rng(seed); const p = scrapPoly(r, nz, cx, cy, w, h, rot, torn, 4); shadowP(p); occlude(p); b.save(); pathPoly(b, p); b.fillStyle = fill || '#f4f2ec'; b.fill(); b.strokeStyle = 'rgba(0,0,0,0.75)'; b.lineWidth = 1.6; b.stroke(); b.restore(); return p; };
|
|
129
|
+
const typed = (str, x, y, px = 26, rot = 0, seed = 1) => {
|
|
130
|
+
b.save(); b.font = `400 ${px}px "Special Elite"`; const w = b.measureText(str).width; b.restore();
|
|
131
|
+
const p = scrap(seed, x + w / 2 + 10, y - px * 0.3, w + 26, px * 1.5, rot, [0, 0, 0, 0], '#ece9e1');
|
|
132
|
+
b.save(); b.translate(x + w / 2 + 10, y - px * 0.3); b.rotate(rot); b.fillStyle = '#151515'; b.font = `400 ${px}px "Special Elite"`; b.textBaseline = 'middle'; b.fillText(str, -w / 2, 2); b.restore();
|
|
133
|
+
return p;
|
|
134
|
+
};
|
|
135
|
+
const ransom = (str, x, y, size, seed, stepStart = null) => {
|
|
136
|
+
const rl = H.rng(seed); let cx = x, idx = 0;
|
|
137
|
+
for (const ch0 of str) {
|
|
138
|
+
if (ch0 === ' ') { cx += size * 0.35; continue; }
|
|
139
|
+
const fnt = rl.pick(RANSOM_FONTS).replace('S', Math.round(size * rl.range(0.82, 1.1)) + 'px');
|
|
140
|
+
const ch = rl.chance(0.25) && /[A-Z]/.test(ch0) ? ch0.toLowerCase() : ch0;
|
|
141
|
+
b.font = fnt;
|
|
142
|
+
const m = b.measureText(ch), gw = m.width, asc = m.actualBoundingBoxAscent, desc = m.actualBoundingBoxDescent;
|
|
143
|
+
const padX = rl.range(5, 10), padY = rl.range(5, 9), tw = gw + padX * 2, th = asc + desc + padY * 2;
|
|
144
|
+
const style = rl.pick(['white', 'white', 'black', 'spot', 'white', 'black']);
|
|
145
|
+
const rot = rl.range(-0.12, 0.12) + (jr() - 0.5) * 0.04;
|
|
146
|
+
const tcx = cx + tw / 2 + (jr() - 0.5) * 2, tcy = y + rl.range(-6, 6) + (jr() - 0.5) * 2;
|
|
147
|
+
const tile = scrapPoly(rl, nz, tcx, tcy, tw, th, rot, [0, 0, 0, 0]);
|
|
148
|
+
const vis = stepStart == null || stepIn(stepStart + idx * 0.0625);
|
|
149
|
+
idx++;
|
|
150
|
+
if (vis) {
|
|
151
|
+
shadowP(tile, 2, 2, 0.75);
|
|
152
|
+
b.save(); pathPoly(b, tile); b.fillStyle = style === 'black' ? '#141414' : '#f6f4ee'; b.fill(); b.clip();
|
|
153
|
+
b.translate(tcx, tcy); b.rotate(rot); b.fillStyle = style === 'black' ? '#f6f4ee' : '#111'; b.textBaseline = 'alphabetic';
|
|
154
|
+
b.font = fnt; b.fillText(ch, -gw / 2, (asc - desc) / 2); b.restore();
|
|
155
|
+
if (style === 'spot') { pathPoly(sp, tile); sp.fillStyle = spotCol; sp.fill(); } else occlude(tile);
|
|
156
|
+
}
|
|
157
|
+
cx += tw + rl.range(-3, 4);
|
|
158
|
+
}
|
|
159
|
+
return cx;
|
|
160
|
+
};
|
|
161
|
+
const marker = (c, pts, p, col, wdt = 7, head = true) => { // hand-drawn marker line, revealed in steps
|
|
162
|
+
if (p <= 0) return;
|
|
163
|
+
const n = Math.max(2, Math.ceil(pts.length * p));
|
|
164
|
+
c.save(); c.strokeStyle = col; c.lineWidth = wdt; c.lineCap = 'round'; c.lineJoin = 'round';
|
|
165
|
+
c.beginPath(); for (let i = 0; i < n; i++) { const [x, y] = pts[i]; i ? c.lineTo(x, y) : c.moveTo(x, y); } c.stroke();
|
|
166
|
+
if (head && p >= 1) { const [x1, y1] = pts[pts.length - 1], [x0, y0] = pts[Math.max(0, pts.length - 3)], a = Math.atan2(y1 - y0, x1 - x0); c.beginPath(); c.moveTo(x1 + Math.cos(a + 2.5) * 26, y1 + Math.sin(a + 2.5) * 26); c.lineTo(x1, y1); c.lineTo(x1 + Math.cos(a - 2.5) * 26, y1 + Math.sin(a - 2.5) * 26); c.stroke(); }
|
|
167
|
+
c.restore();
|
|
168
|
+
};
|
|
169
|
+
const curve = (ax, ay, cx, cy, bx, by, seed) => { const r = H.rng(seed), pts = []; for (let i = 0; i <= 24; i++) { const u = i / 24; pts.push([(1 - u) * (1 - u) * ax + 2 * u * (1 - u) * cx + u * u * bx + (r() - 0.5) * 2, (1 - u) * (1 - u) * ay + 2 * u * (1 - u) * cy + u * u * by + (r() - 0.5) * 2]); } return pts; };
|
|
170
|
+
const scrawl = (str, x, y, px, rot, col = '#111') => { b.save(); b.translate(x, y); b.rotate(rot); b.fillStyle = col; b.font = `400 ${px}px "Permanent Marker"`; b.fillText(str, 0, 0); b.restore(); };
|
|
171
|
+
const photo = (kind, cx, cy, s, rot, seed, label = true) => {
|
|
172
|
+
const p = scrap(seed, cx, cy, 170 * s, 170 * s, rot, [1, 0, 1, 0]);
|
|
173
|
+
b.save(); pathPoly(b, p); b.clip(); b.translate(cx, cy); b.rotate(rot); b.drawImage(faceHT(kind), -100 * s, -100 * s, 200 * s, 200 * s); b.restore();
|
|
174
|
+
tape(cx + 86 * s * Math.sin(rot), cy - 86 * s * Math.cos(rot), 80 * s, rot + ((seed % 5) - 2) * 0.07, seed * 3 + 1, 26 * Math.max(1, s * 0.9));
|
|
175
|
+
if (label) typed(kind, cx - 34, cy + 92 * s, 30, -rot * 0.6, seed + 1);
|
|
176
|
+
};
|
|
177
|
+
const circuit = (cx, cy, w, h, rot, knobAng) => {
|
|
178
|
+
const p = scrap(77, cx, cy, w, h, rot, [0, 1, 0, 1], '#111');
|
|
179
|
+
b.save(); pathPoly(b, p); b.clip(); b.translate(cx, cy); b.rotate(rot);
|
|
180
|
+
b.strokeStyle = '#eee'; b.lineWidth = 3; b.lineJoin = 'round';
|
|
181
|
+
const rr = H.rng(5);
|
|
182
|
+
for (let i = 0; i < 12; i++) {
|
|
183
|
+
let x = rr.range(-w * 0.45, w * 0.45), y = rr.range(-h * 0.45, h * 0.45); b.beginPath(); b.moveTo(x, y);
|
|
184
|
+
for (let k = 0; k < 3; k++) { const L = rr.range(15, 50), dir = rr.int(0, 3); if (dir === 0) x += L; else if (dir === 1) y += L; else if (dir === 2) { x += L * 0.7; y += L * 0.7; } else { x -= L * 0.7; y += L * 0.7; } b.lineTo(x, y); }
|
|
185
|
+
b.stroke(); b.fillStyle = '#eee'; b.beginPath(); b.arc(x, y, 4, 0, TAU); b.fill();
|
|
186
|
+
}
|
|
187
|
+
b.fillStyle = '#eee'; b.fillRect(-36, -40, 72, 52); b.fillStyle = '#111'; b.fillRect(-29, -33, 58, 38);
|
|
188
|
+
if (knobAng) knobAng.forEach((a, i) => { const kx = -60 + i * 60, ky = h * 0.3; b.fillStyle = '#eee'; b.beginPath(); b.arc(kx, ky, 17, 0, TAU); b.fill(); b.strokeStyle = '#111'; b.lineWidth = 5; b.beginPath(); b.moveTo(kx, ky); b.lineTo(kx + Math.sin(a) * 14, ky - Math.cos(a) * 14); b.stroke(); });
|
|
189
|
+
b.restore();
|
|
190
|
+
const cc = Math.cos(rot), ss = Math.sin(rot), at = (lx, ly) => [cx + lx * cc - ly * ss, cy + lx * ss + ly * cc];
|
|
191
|
+
const [ax, ay] = at(-w / 2 + 8, -h / 2 + 6), [bx, by] = at(w / 2 - 8, h / 2 - 6);
|
|
192
|
+
tape(ax, ay, 112, rot - 0.75, Math.round(cx) + 7);
|
|
193
|
+
tape(bx, by, 104, rot - 0.62, Math.round(cx) + 8);
|
|
194
|
+
};
|
|
195
|
+
let flash = false;
|
|
196
|
+
const sheet = (st, top, seed, rot) => {
|
|
197
|
+
if (!stepIn(st)) return false;
|
|
198
|
+
if (ts - st < 0.12) flash = true;
|
|
199
|
+
slap(st, 640, 400);
|
|
200
|
+
const p = scrapPoly(H.rng(seed), nz, 640, (top + 760) / 2, 1360, 760 - top, rot, [1, 0, 0, 0], 7);
|
|
201
|
+
shadowP(p, 3, 4, 0.6); occlude(p);
|
|
202
|
+
b.save(); pathPoly(b, p); b.fillStyle = '#f4f2ec'; b.fill(); b.clip();
|
|
203
|
+
if (seed === 12) { b.fillStyle = '#555'; for (let y = top; y < 760; y += 11) for (let x = (y % 22 ? 0 : 5.5); x < W; x += 11) { b.beginPath(); b.arc(x, y, 1.25, 0, TAU); b.fill(); } }
|
|
204
|
+
if (seed === 13) { b.strokeStyle = '#6a6a6a'; b.lineWidth = 1.5; for (let y = top + 40; y < 760; y += 30) { b.beginPath(); b.moveTo(0, y); b.lineTo(W, y); b.stroke(); } b.strokeStyle = '#555'; b.beginPath(); b.moveTo(52, top); b.lineTo(52, 760); b.stroke(); }
|
|
205
|
+
b.restore();
|
|
206
|
+
b.save(); pathPoly(b, p); b.strokeStyle = '#111'; b.lineWidth = 3; b.stroke(); b.restore();
|
|
207
|
+
return true;
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
// ---- page 0: the question ----
|
|
211
|
+
b.fillStyle = '#f4f2ec'; b.fillRect(0, 0, W, H_);
|
|
212
|
+
{
|
|
213
|
+
const p = scrapPoly(H.rng(3), nz, 640, 330, 1500, 230, -0.12, [1, 0, 1, 0], 6);
|
|
214
|
+
// the band is a pink-printed strip: its copier shadow falls on the page, the strip itself is clean paper under the spot
|
|
215
|
+
if (stepIn(0.0)) { shadowP(p, 3, 3, 0.5); b.save(); pathPoly(b, p); b.fillStyle = '#f4f2ec'; b.fill(); b.restore(); pathPoly(sp, p); sp.fillStyle = spotCol; sp.fill(); tape(112, 280, 100, 1.32, 31, 40); tape(1186, 380, 100, 1.66, 32, 40); }
|
|
216
|
+
ransom('HOW DOES', 250, 250, 104, 4242, 0.125);
|
|
217
|
+
ransom('AI LEARN?', 210, 410, 118, 4343, 0.625);
|
|
218
|
+
}
|
|
219
|
+
// ---- page 1: data (slapped at 2.0) ----
|
|
220
|
+
if (sheet(2.0, -20, 11, -0.006)) {
|
|
221
|
+
typed('how does AI learn?', 36, 46, 28, -0.02, 5);
|
|
222
|
+
tape(30, 22, 54, -0.7, 15, 22);
|
|
223
|
+
// counter: digits re-cut from magazines every time they change
|
|
224
|
+
const n = Math.round(1e6 * Math.pow(prog(2.5, 2.6), 2)), str = n.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
225
|
+
const end = ransom(str, 70, 150, 74, 900 + n % 997);
|
|
226
|
+
typed('examples', end + 8, 160, 34, 0.02, 6);
|
|
227
|
+
// photos travel along the marker arrow into the model
|
|
228
|
+
marker(b, curve(90, 600, 450, 640, 840, 560, 3), prog(2.3, 0.5), '#111', 8);
|
|
229
|
+
const kinds = ['cat', 'dog', 'cat', 'dog', 'dog', 'cat', 'dog', 'cat'];
|
|
230
|
+
kinds.forEach((k, i) => {
|
|
231
|
+
const s0 = 2.3 + i * 0.4, x = -80 + (ts - s0) * 420;
|
|
232
|
+
if (ts < s0 || x > 900) return;
|
|
233
|
+
const bob = (Math.floor((ts - s0) * 8) % 2) * 4;
|
|
234
|
+
photo(k, x, 380 + bob + ((i * 37) % 30) - 15, 0.9, ((i * 53) % 20) / 100 - 0.1, 200 + i);
|
|
235
|
+
});
|
|
236
|
+
// model is drawn last so photos disappear into it
|
|
237
|
+
circuit(1040, 420, 320, 280, 0.05, [0.3, -0.8, 1.2]);
|
|
238
|
+
ransom('MODEL', 900, 220, 46, 77, 2.25);
|
|
239
|
+
unslap();
|
|
240
|
+
}
|
|
241
|
+
// ---- page 2: guess / check / adjust (slapped at 6.0) ----
|
|
242
|
+
if (sheet(6.0, 96, 12, 0.008)) {
|
|
243
|
+
if (stepIn(6.25)) photo('cat', 200, 390, 1.25, -0.05, 301, false);
|
|
244
|
+
if (stepIn(6.25)) typed('new photo', 110, 540, 28, 0.03, 302);
|
|
245
|
+
marker(b, curve(320, 390, 380, 370, 450, 385, 4), prog(6.5, 0.25), '#111');
|
|
246
|
+
const adj = prog(8.9, 0.5);
|
|
247
|
+
if (stepIn(6.375)) { circuit(610, 390, 260, 230, -0.04, [0.3 + adj * 1.6, -0.8 - adj * 1.2, 1.2 + adj * 2]); typed('model', 555, 285, 30, -0.04, 303); }
|
|
248
|
+
marker(b, curve(760, 380, 820, 340, 880, 370, 5), prog(6.875, 0.25), '#111');
|
|
249
|
+
if (stepIn(7.0)) scrawl('guess', 770, 330, 34, -0.12);
|
|
250
|
+
if (stepIn(7.25)) {
|
|
251
|
+
const bp = scrap(310, 1060, 380, 330, 210, 0.04, [0, 0, 0, 0], '#f6f4ee');
|
|
252
|
+
b.save(); b.beginPath(); b.moveTo(950, 460); b.lineTo(915, 520); b.lineTo(1000, 470); b.closePath(); b.fillStyle = '#f6f4ee'; b.fill(); b.strokeStyle = '#111'; b.lineWidth = 2; b.stroke(); b.restore();
|
|
253
|
+
void bp;
|
|
254
|
+
tape(1056, 276, 112, 0.11, 312);
|
|
255
|
+
ransom('DOG?', 945, 385, 92, 311, 7.25);
|
|
256
|
+
}
|
|
257
|
+
// wrong! big spot-ink X slashed over the guess + rubber stamp
|
|
258
|
+
if (ts < 9.6) {
|
|
259
|
+
marker(sp, curve(940, 290, 1060, 380, 1190, 480, 6), prog(7.875, 0.25), spotCol, 22, false);
|
|
260
|
+
marker(sp, curve(1190, 280, 1070, 380, 930, 480, 7), prog(8.0, 0.25), spotCol, 22, false);
|
|
261
|
+
if (stepIn(8.125)) { b.save(); b.translate(1080, 560); b.rotate(-0.12); b.strokeStyle = '#111'; b.lineWidth = 5; b.strokeRect(-95, -34, 190, 64); b.font = '400 46px "Black Ops One"'; b.fillStyle = '#111'; b.textAlign = 'center'; b.fillText('CHECK', 0, 14); b.restore(); }
|
|
262
|
+
marker(b, curve(980, 610, 820, 690, 650, 540, 8), prog(8.375, 0.375), '#111');
|
|
263
|
+
if (stepIn(8.625)) scrawl('adjust!', 720, 680, 38, -0.05);
|
|
264
|
+
} else {
|
|
265
|
+
// a fresh scrap with the right answer is pasted over the wrong one
|
|
266
|
+
scrap(320, 1060, 375, 300, 180, -0.05, [1, 1, 1, 1], '#f6f4ee');
|
|
267
|
+
tape(1202, 456, 92, -0.68, 322);
|
|
268
|
+
ransom('CAT', 975, 385, 100, 321, 9.625);
|
|
269
|
+
marker(b, [[1190, 380], [1210, 410], [1250, 330]], prog(9.875, 0.125), '#111', 12, false);
|
|
270
|
+
}
|
|
271
|
+
unslap();
|
|
272
|
+
}
|
|
273
|
+
// ---- page 3: progress (slapped at 10.375) ----
|
|
274
|
+
if (sheet(10.375, 96, 13, -0.01)) {
|
|
275
|
+
// photocopied graph paper scrap
|
|
276
|
+
const gp = scrap(400, 560, 420, 760, 400, 0.02, [1, 0, 1, 0], '#f1efe8');
|
|
277
|
+
b.save(); pathPoly(b, gp); b.clip(); b.strokeStyle = 'rgba(0,0,0,0.35)'; b.lineWidth = 1;
|
|
278
|
+
for (let x = 160; x < 960; x += 24) { b.beginPath(); b.moveTo(x, 200); b.lineTo(x, 640); b.stroke(); }
|
|
279
|
+
for (let y = 210; y < 640; y += 24) { b.beginPath(); b.moveTo(160, y); b.lineTo(960, y); b.stroke(); }
|
|
280
|
+
b.restore();
|
|
281
|
+
tape(176, 228, 112, -0.7, 402);
|
|
282
|
+
tape(942, 236, 112, 0.7, 403);
|
|
283
|
+
const accs = [61, 72, 80, 86, 90, 93, 95, 97];
|
|
284
|
+
let shown = 61;
|
|
285
|
+
accs.forEach((a, i) => {
|
|
286
|
+
const st = 10.75 + i * 0.25, u = prog(st, 0.25);
|
|
287
|
+
if (u <= 0) return;
|
|
288
|
+
const hgt = a * 3.4 * u, x = 230 + i * 86;
|
|
289
|
+
// each bar is a strip torn from printed matter: ragged on all sides, screened with a coarse halftone
|
|
290
|
+
const p = scrapPoly(H.rng(500 + i), nz, x, 590 - hgt / 2, 58, hgt, ((i * 37) % 10) / 200 - 0.025, [1, 1, 1, 1], 2.2);
|
|
291
|
+
shadowP(p, 2, 2, 0.6);
|
|
292
|
+
const scr = barScreen(b);
|
|
293
|
+
if (i % 2 || i === 7) {
|
|
294
|
+
pathPoly(sp, p); sp.fillStyle = spotCol; sp.fill();
|
|
295
|
+
sp.save(); pathPoly(sp, p); sp.clip(); sp.globalCompositeOperation = 'destination-out'; sp.globalAlpha = 0.9; sp.fillStyle = scr; sp.fillRect(x - 60, 150, 120, 460); sp.restore();
|
|
296
|
+
b.save(); pathPoly(b, p); b.fillStyle = '#f4f2ec'; b.fill(); b.restore();
|
|
297
|
+
} else {
|
|
298
|
+
occlude(p); b.save(); pathPoly(b, p); b.fillStyle = '#151515'; b.fill(); b.clip(); b.fillStyle = scr; b.fillRect(x - 60, 150, 120, 460); b.restore();
|
|
299
|
+
}
|
|
300
|
+
shown = H.lerp(i ? accs[i - 1] : 61, a, u);
|
|
301
|
+
});
|
|
302
|
+
marker(b, [[180, 600], [960, 596]], prog(10.625, 0.25), '#111', 6);
|
|
303
|
+
if (stepIn(10.75)) typed('training rounds', 600, 640, 28, 0.01, 401);
|
|
304
|
+
ransom('ACCURACY', 60, 160, 58, 410, 10.5);
|
|
305
|
+
const v = Math.round(shown), endX = ransom(v + '%', 640, 160, 96, 950 + v);
|
|
306
|
+
if (stepIn(12.75)) marker(sp, (() => { const pts = []; for (let i = 0; i <= 26; i++) { const a = -2.4 + (i / 26) * (TAU + 0.5); pts.push([(640 + endX) / 2 + Math.cos(a) * ((endX - 640) / 2 + 40 + i * 0.6), 160 + Math.sin(a) * 72]); } return pts; })(), prog(12.75, 0.375), spotCol, 9, false);
|
|
307
|
+
void endX;
|
|
308
|
+
unslap();
|
|
309
|
+
}
|
|
310
|
+
// ---- takeaway strip (13.0) ----
|
|
311
|
+
if (stepIn(13.0)) {
|
|
312
|
+
slap(13.0, 640, 600);
|
|
313
|
+
const p = scrapPoly(H.rng(600), nz, 660, 600, 1020, 210, -0.02, [1, 1, 1, 1], 5);
|
|
314
|
+
shadowP(p, 4, 5, 0.75); occlude(p); b.save(); pathPoly(b, p); b.fillStyle = '#f6f4ee'; b.fill(); b.strokeStyle = '#111'; b.lineWidth = 2; b.stroke(); b.restore();
|
|
315
|
+
const e1 = ransom('MORE EXAMPLES', 200, 548, 54, 610, 13.0);
|
|
316
|
+
marker(b, [[e1 + 14, 548], [e1 + 90, 548]], prog(13.5, 0.125), '#111', 9);
|
|
317
|
+
ransom('BETTER GUESSES', 300, 648, 54, 620, 13.625);
|
|
318
|
+
tape(150, 506, 104, -0.7, 601);
|
|
319
|
+
tape(1166, 488, 104, 0.66, 602);
|
|
320
|
+
// the finished zine gets stapled (the stapler hit in the score at 14.5)
|
|
321
|
+
if (stepIn(14.5)) [[180, 602, -0.08], [1118, 588, 0.1]].forEach(([x, y, a]) => {
|
|
322
|
+
b.save(); b.translate(x, y); b.rotate(a); b.scale(1.25, 1.25);
|
|
323
|
+
b.fillStyle = 'rgba(0,0,0,0.7)'; b.fillRect(-21, 3, 42, 5);
|
|
324
|
+
const g = b.createLinearGradient(0, -2, 0, 3); g.addColorStop(0, '#fff'); g.addColorStop(0.5, '#9a9a9a'); g.addColorStop(1, '#333');
|
|
325
|
+
b.fillStyle = g; b.fillRect(-20, -2, 40, 6);
|
|
326
|
+
b.fillStyle = '#111'; b.fillRect(-22, -3, 4, 8); b.fillRect(18, -3, 4, 8);
|
|
327
|
+
b.restore();
|
|
328
|
+
});
|
|
329
|
+
unslap();
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
// ---- photocopier crush + spot grain (as in the still) ----
|
|
333
|
+
b.setTransform(1, 0, 0, 1, 0, 0);
|
|
334
|
+
{ // toner smudges on the copier glass (same as the still)
|
|
335
|
+
const rs = H.rng(909);
|
|
336
|
+
for (let i = 0; i < 5; i++) {
|
|
337
|
+
const x = rs.range(0, W), y = rs.range(0, H_), R0 = rs.range(30, 90);
|
|
338
|
+
const g = b.createRadialGradient(x, y, 0, x, y, R0);
|
|
339
|
+
g.addColorStop(0, 'rgba(0,0,0,0.32)'); g.addColorStop(1, 'rgba(0,0,0,0)');
|
|
340
|
+
b.fillStyle = g; b.fillRect(x - R0, y - R0, R0 * 2, R0 * 2);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
{
|
|
344
|
+
const img = b.getImageData(0, 0, W, H_), d = img.data, rn = H.rng(31 + fr);
|
|
345
|
+
// static part of the copier: low-frequency toner mottle, drum streaks, dark lead edges (cached once)
|
|
346
|
+
const bias = ZC.bias && ZC.biasW === W ? ZC.bias : (ZC.biasW = W, ZC.bias = (() => {
|
|
347
|
+
const s = new Float32Array(W), rs = H.rng(77); for (let i = 0; i < 9; i++) { const x0 = rs.int(0, W - 1), wdt = rs.int(1, 4), a = rs.range(0.05, 0.16); for (let k = 0; k < wdt; k++) if (x0 + k < W) s[x0 + k] += a; }
|
|
348
|
+
const out = new Float32Array(W * H_);
|
|
349
|
+
for (let y = 0; y < H_; y++) {
|
|
350
|
+
const edge = Math.max(0, 1 - y / 40) * 0.25 + Math.max(0, (y - H_ + 50) / 50) * 0.2;
|
|
351
|
+
for (let x = 0; x < W; x++) out[y * W + x] = nz.n2(x * 0.012, y * 0.012) * 0.06 - s[x] - edge - Math.max(0, 1 - x / 30) * 0.3;
|
|
352
|
+
}
|
|
353
|
+
return out;
|
|
354
|
+
})());
|
|
355
|
+
for (let i = 0, k = 0, n = W * H_; i < n; i++, k += 4) {
|
|
356
|
+
const L = d[k] / 255 + (rn() - 0.5) * 0.22 + bias[i];
|
|
357
|
+
let v = H.smooth(0.32, 0.62, L);
|
|
358
|
+
if (v > 0.6 && rn() < 0.0025) v = 0.1;
|
|
359
|
+
if (v < 0.4 && rn() < 0.01) v = 0.7;
|
|
360
|
+
v = 0.06 + v * 0.9;
|
|
361
|
+
d[k] = 255 * v; d[k + 1] = 255 * v * 0.995; d[k + 2] = 255 * v * 0.975;
|
|
362
|
+
}
|
|
363
|
+
b.putImageData(img, 0, 0);
|
|
364
|
+
const si = sp.getImageData(0, 0, W, H_), sd = si.data, rs2 = H.rng(55 + fr);
|
|
365
|
+
for (let i = 3; i < sd.length; i += 4) { if (!sd[i]) continue; const x = ((i - 3) / 4) % W, y = ((i - 3) / 4 / W) | 0; sd[i] *= H.clamp(0.82 + nz.n2(x * 0.02 + 40, y * 0.02) * 0.2 + (rs2() - 0.5) * 0.35); }
|
|
366
|
+
sp.putImageData(si, 0, 0);
|
|
367
|
+
}
|
|
368
|
+
// tape goes on last, over the copy, so it keeps its translucent grey
|
|
369
|
+
// each piece is rendered once into a small sprite (cached by its seed and shape) and stamped where its owner is
|
|
370
|
+
const TS = ZC.tapeS || (ZC.tapeS = {}), dummy = ZC.tapeDummy || (ZC.tapeDummy = H.layer(2, 2).getContext('2d'));
|
|
371
|
+
for (const tp of tapes) {
|
|
372
|
+
const key = tp.seed + '|' + tp.w + '|' + tp.h + '|' + tp.rot;
|
|
373
|
+
let spr = TS[key];
|
|
374
|
+
if (!spr) {
|
|
375
|
+
const S2 = Math.ceil(tp.w + tp.h + 24), cv = H.layer(S2, S2), c = cv.getContext('2d');
|
|
376
|
+
const poly = maskTape(c, dummy, H.rng(tp.seed), nz, S2 / 2, S2 / 2, tp.w, tp.h, tp.rot);
|
|
377
|
+
spr = TS[key] = { cv, S2, poly: poly.map(([x, y]) => [x - S2 / 2, y - S2 / 2]) };
|
|
378
|
+
}
|
|
379
|
+
b.setTransform(tp.m); b.drawImage(spr.cv, tp.cx - spr.S2 / 2, tp.cy - spr.S2 / 2);
|
|
380
|
+
sp.setTransform(tp.m); sp.translate(tp.cx, tp.cy);
|
|
381
|
+
sp.save(); sp.globalAlpha = 0.35; sp.globalCompositeOperation = 'destination-out'; pathPoly(sp, spr.poly); sp.fill(); sp.restore();
|
|
382
|
+
}
|
|
383
|
+
b.setTransform(1, 0, 0, 1, 0, 0); sp.setTransform(1, 0, 0, 1, 0, 0);
|
|
384
|
+
ctx.drawImage(BW, 0, 0);
|
|
385
|
+
const wob = H.rng(300 + fr);
|
|
386
|
+
ctx.save(); ctx.globalCompositeOperation = 'multiply'; ctx.drawImage(SPL, 4 + Math.round((wob() - 0.5) * 2), -3 + Math.round((wob() - 0.5) * 2)); ctx.restore();
|
|
387
|
+
if (flash) { ctx.fillStyle = 'rgba(255,255,250,0.22)'; ctx.fillRect(0, 0, W, H_); }
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
registerStyle({
|
|
391
|
+
id: 'collage-zine',
|
|
392
|
+
name: 'Punk Zine Collage',
|
|
393
|
+
category: 'Paper & Craft',
|
|
394
|
+
description: 'A photocopied cut-and-paste zine spread: torn halftone scraps, ransom-note letters cut from mismatched magazines, masking tape and staples, crushed to high-contrast black toner with one fluoro-pink spot ink overprinted off-register.',
|
|
395
|
+
motion: 'Scraps slam onto the page one per beat with a copier-flash flicker, ransom letters jitter in stop-motion, toner noise boils every frame.',
|
|
396
|
+
fonts: [...RANSOM_FONTS.map((f) => f.replace('S', '64px')), '400 17px "Special Elite"', '400 30px "Permanent Marker"'],
|
|
397
|
+
frameT: 4.8,
|
|
398
|
+
duration: 5,
|
|
399
|
+
readsPixels: true,
|
|
400
|
+
explainerDuration: 15,
|
|
401
|
+
explainerNote: 'Shot on 8 fps steps, each beat is a new photocopied sheet slapped down over the last (copier flash on impact); arrows are marker scrawls, labels are typed strips and ransom letters pasted onto the thing they name, the counter is re-cut from magazine letters every time it ticks, and the wrong guess gets slashed with the pink spot ink.',
|
|
402
|
+
explainer(ctx, W, H_, t) { EXPLAIN(ctx, W, H_, t); },
|
|
403
|
+
// Sound: a zine made at the copy shop. Everything lives on the 8 fps step grid (an event at time s shows on the first
|
|
404
|
+
// frame >= s), so every sound is quantised the same way. New pages are copies slapped down with the copier's
|
|
405
|
+
// ka-chunk; ransom letters are glued on with a pat; the counter digits are re-cut with scissors (one snip per change);
|
|
406
|
+
// photos are taped on; arrows are marker; CHECK is a rubber stamp; the finished zine gets stapled.
|
|
407
|
+
// Times mirror EXPLAIN() above (sheets 2.0 / 6.0 / 10.375 / 13.0, ransom letters stepStart + idx*0.0625).
|
|
408
|
+
explainerSound(k) {
|
|
409
|
+
const q = (s) => Math.ceil(s * 8 - 1e-6) / 8; // first 8 fps frame that shows an event scheduled at s
|
|
410
|
+
const pan = (x) => H.clamp((x / 1280) * 2 - 1, -1, 1) * 0.6;
|
|
411
|
+
const pat = (t, g = 1, p = 0, minor = true) => { // glued scrap pressed down
|
|
412
|
+
k.noise(t, { dur: 0.025, filter: 'bandpass', f: 1400, q: 1, gain: 0.22 * g, a: 0.001, pan: p, minor });
|
|
413
|
+
k.noise(t, { dur: 0.06, color: 'brown', filter: 'lowpass', f: 520, gain: 0.3 * g, a: 0.002, pan: p, minor });
|
|
414
|
+
};
|
|
415
|
+
const snip = (t, g = 1, p = 0) => { // scissors through magazine paper
|
|
416
|
+
k.noise(t, { dur: 0.018, filter: 'bandpass', f: 2100, q: 2, gain: 0.22 * g, a: 0.001, pan: p, minor: true });
|
|
417
|
+
k.noise(t + 0.022, { dur: 0.03, filter: 'bandpass', f: 1500, q: 1.6, gain: 0.2 * g, a: 0.001, pan: p, minor: true });
|
|
418
|
+
};
|
|
419
|
+
const tapeOn = (t, p = 0) => { // a strip of tape pulled off the roll and smoothed down over a photo
|
|
420
|
+
k.play('tape', t, { dur: 0.2, gain: 1.5, pan: p, minor: true });
|
|
421
|
+
k.noise(t, { dur: 0.16, filter: 'bandpass', f: [[0, 1100], [0.16, 1700]], q: 0.7, gain: 0.12, a: 0.01, hold: 0.07, pan: p, minor: true });
|
|
422
|
+
};
|
|
423
|
+
// ransom letters: glue pats on the frames where new letters appear (two letters per frame at 0.0625 spacing)
|
|
424
|
+
const letters = (st, n, x0, x1, g = 0.7) => {
|
|
425
|
+
const frames = [...new Set(Array.from({ length: n }, (_, i) => q(st + i * 0.0625)))];
|
|
426
|
+
frames.forEach((t, j) => pat(t, g, pan(x0 + ((x1 - x0) * j) / Math.max(1, frames.length - 1))));
|
|
427
|
+
};
|
|
428
|
+
// a copied page slapped onto the pile, copier flash: slap + low ka-chunk + a short lamp/roller tail
|
|
429
|
+
const page = (t, g = 1) => {
|
|
430
|
+
k.play('slap', t, { gain: 1.05 * g });
|
|
431
|
+
k.play('thud', t, { f: 105, gain: 0.75 * g });
|
|
432
|
+
k.noise(t + 0.03, { dur: 0.35, color: 'brown', filter: 'bandpass', f: 260, q: 1.2, gain: 0.16 * g, a: 0.04, hold: 0.15 });
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
k.bed('room', 0, 15, { gain: 0.3 });
|
|
436
|
+
k.bed('hum', 0, 15, { gain: 0.1 }); // the copier idling
|
|
437
|
+
|
|
438
|
+
// ---- page 0: pink band, then the question pasted letter by letter
|
|
439
|
+
pat(0.0, 1.0, 0, false);
|
|
440
|
+
letters(0.125, 7, 250, 980, 0.75);
|
|
441
|
+
letters(0.625, 8, 210, 1060, 0.8);
|
|
442
|
+
|
|
443
|
+
// ---- page 1: data
|
|
444
|
+
page(2.0);
|
|
445
|
+
letters(2.25, 5, 900, 1180, 0.6); // MODEL
|
|
446
|
+
k.play('stroke', 2.3, { material: 'marker', dur: 0.5, gain: 1.2, pan: pan(450), minor: true }); // arrow (stepped reveal)
|
|
447
|
+
[2.3, 2.7, 3.1, 3.5, 3.9, 4.3, 4.7, 5.1].forEach((s0) => tapeOn(q(s0), pan(0))); // photos taped on
|
|
448
|
+
// counter re-cut on every frame it changes (n = 1e6 * prog(2.5, 2.6)^2): 2.625 .. 5.0, then 1,000,000 glued down
|
|
449
|
+
for (let t = 2.625; t < 5.1; t += 0.125) snip(t, 0.75, pan(250));
|
|
450
|
+
pat(5.125, 1.4, pan(250), false);
|
|
451
|
+
k.play('tock', 5.125, { f: 300, gain: 0.35, pan: pan(250) });
|
|
452
|
+
|
|
453
|
+
// ---- page 2: guess / check / adjust
|
|
454
|
+
page(6.0);
|
|
455
|
+
tapeOn(6.25, pan(200)); // new photo
|
|
456
|
+
pat(6.375, 0.8, pan(610)); // model scrap
|
|
457
|
+
k.play('stroke', 6.5, { material: 'marker', dur: 0.25, gain: 1.0, pan: pan(380), minor: true });
|
|
458
|
+
k.play('stroke', 6.875, { material: 'marker', dur: 0.25, gain: 0.7, pan: pan(820), minor: true });
|
|
459
|
+
k.play('stroke', 7.0, { material: 'marker', dur: 0.12, gain: 0.9, pan: pan(800), minor: true }); // 'guess' scrawl
|
|
460
|
+
pat(7.25, 0.9, pan(1060)); letters(7.25, 4, 945, 1180, 0.6); // bubble scrap + DOG?
|
|
461
|
+
// wrong: two fat spot-ink slashes, then the CHECK rubber stamp
|
|
462
|
+
k.play('stroke', 7.875, { material: 'sharpie', dur: 0.25, gain: 1.5, pan: pan(1060) });
|
|
463
|
+
k.play('stroke', 8.0, { material: 'sharpie', dur: 0.25, gain: 1.5, pan: pan(1060) });
|
|
464
|
+
k.tone(7.88, { f: 'D3', type: 'triangle', dur: 0.16, gain: 0.2, filter: 'lowpass', f2: 700 });
|
|
465
|
+
k.tone(8.04, { f: 'A2', type: 'triangle', dur: 0.32, gain: 0.22, filter: 'lowpass', f2: 600 });
|
|
466
|
+
k.play('stamp', 8.125, { gain: 0.85, pan: pan(1080) });
|
|
467
|
+
k.play('stroke', 8.375, { material: 'marker', dur: 0.375, gain: 0.8, pan: pan(820), minor: true }); // arrow back
|
|
468
|
+
k.play('stroke', 8.625, { material: 'marker', dur: 0.15, gain: 0.9, pan: pan(720), minor: true }); // 'adjust!'
|
|
469
|
+
for (let t = 9.0; t < 9.45; t += 0.125) k.play('click', t, { f: 900, gain: 0.5, pan: pan(610), minor: true }); // knobs turned (prog(8.9, 0.5) steps)
|
|
470
|
+
// correction: fresh scrap pasted over, CAT glued, marker tick
|
|
471
|
+
pat(9.625, 1.3, pan(1060), false);
|
|
472
|
+
letters(9.75, 2, 1000, 1080, 0.6);
|
|
473
|
+
k.play('stroke', 9.875, { material: 'marker', dur: 0.13, gain: 1.0, pan: pan(1220), minor: true });
|
|
474
|
+
k.play('success', 9.875, { f: 'G5', gain: 0.45, pan: pan(1200) });
|
|
475
|
+
|
|
476
|
+
// ---- page 3: progress
|
|
477
|
+
page(10.375);
|
|
478
|
+
letters(10.5, 8, 60, 520, 0.55); // ACCURACY
|
|
479
|
+
k.play('stroke', 10.625, { material: 'marker', dur: 0.25, gain: 0.9, minor: true }); // axis
|
|
480
|
+
pat(10.75, 0.6, pan(600)); // training rounds strip
|
|
481
|
+
for (let i = 0; i < 8; i++) { const st = 10.75 + i * 0.25; k.noise(q(st), { dur: 0.12, filter: 'bandpass', f: 1300, q: 0.8, gain: 0.12, a: 0.01, pan: pan(230 + i * 86), minor: true }); } // torn bar strips
|
|
482
|
+
for (let t = 10.875; t < 12.75; t += 0.125) snip(t, 0.6, pan(700)); // % re-cut each frame
|
|
483
|
+
// 97% (12.75): spot-ink circle slashed round it, slammed with the copier (biggest hit)
|
|
484
|
+
k.play('impact', 12.75, { gain: 1.1 });
|
|
485
|
+
k.play('stamp', 12.75, { gain: 0.7, pan: pan(700) });
|
|
486
|
+
k.play('stroke', 12.76, { material: 'sharpie', dur: 0.375, gain: 1.0, pan: pan(700), minor: true });
|
|
487
|
+
|
|
488
|
+
// ---- takeaway strip slapped on, glued, stapled
|
|
489
|
+
page(13.0, 0.85);
|
|
490
|
+
letters(13.0, 12, 200, 900, 0.55);
|
|
491
|
+
k.play('stroke', 13.5, { material: 'marker', dur: 0.125, gain: 0.6, minor: true });
|
|
492
|
+
letters(13.625, 13, 300, 1000, 0.55);
|
|
493
|
+
k.play('press', 14.5, { gain: 0.32 }); // stapler
|
|
494
|
+
k.noise(14.51, { dur: 0.02, filter: 'bandpass', f: 1900, q: 3, gain: 0.25 });
|
|
495
|
+
['C4', 'G4', 'E5'].forEach((f, i) => k.play('ding', 14.6 + i * 0.07, { f, gain: 0.34 - i * 0.03, pan: (i - 1) * 0.25 }));
|
|
496
|
+
},
|
|
497
|
+
draw(ctx, W, H_, t) {
|
|
498
|
+
const r = H.rng(666), nz = H.makeNoise(13);
|
|
499
|
+
const BW = H.layer(W, H_), SPL = H.layer(W, H_);
|
|
500
|
+
const realB = BW.getContext('2d'), realSp = SPL.getContext('2d');
|
|
501
|
+
const dumB = H.layer(2, 2).getContext('2d'), dumSp = H.layer(2, 2).getContext('2d');
|
|
502
|
+
let b = realB, sp = realSp;
|
|
503
|
+
// stop-motion build on 8 fps steps: each piece slaps down (oversized + kicked on its first step), then sits
|
|
504
|
+
const ts = Math.floor(t * 8) / 8;
|
|
505
|
+
const flashes = [];
|
|
506
|
+
const show = (st, cx, cy, big) => {
|
|
507
|
+
if (ts + 1e-6 < st) { b = dumB; sp = dumSp; return; }
|
|
508
|
+
b = realB; sp = realSp;
|
|
509
|
+
const first = ts - st < 0.12, s1 = first ? 1.1 : 1, k = first ? 0.05 * (((st * 8) % 2) ? 1 : -1) : 0;
|
|
510
|
+
if (first && big) flashes.push(1);
|
|
511
|
+
[b, sp].forEach((c) => { c.save(); c.translate(cx, cy); c.rotate(k); c.scale(s1, s1); c.translate(-cx, -cy); });
|
|
512
|
+
};
|
|
513
|
+
const hide = () => { if (b === realB) { realB.restore(); realSp.restore(); } b = realB; sp = realSp; };
|
|
514
|
+
const spotCol = H.rgba(SPOT, 1);
|
|
515
|
+
// stop-motion jitter: changes every 1/8 s
|
|
516
|
+
const fr = Math.floor(t * 8), jr = H.rng(1000 + fr);
|
|
517
|
+
|
|
518
|
+
// ---------- paper ----------
|
|
519
|
+
b.fillStyle = '#f4f2ec'; b.fillRect(0, 0, W, H_);
|
|
520
|
+
|
|
521
|
+
const occlude = (poly) => { sp.save(); sp.globalCompositeOperation = 'destination-out'; pathPoly(sp, poly); sp.fill(); sp.restore(); };
|
|
522
|
+
const copierShadow = (poly, dx = 2.5, dy = 2, a = 0.7) => {
|
|
523
|
+
b.save(); b.translate(dx, dy); pathPoly(b, poly); b.fillStyle = `rgba(0,0,0,${a})`; b.fill(); b.restore();
|
|
524
|
+
};
|
|
525
|
+
|
|
526
|
+
// ---------- spot: big torn pink strip ----------
|
|
527
|
+
{
|
|
528
|
+
show(0.125, 560, 420, true);
|
|
529
|
+
const p = scrapPoly(r, nz, 560, 420, 1500, 210, -0.32, [1, 0, 1, 0], 6);
|
|
530
|
+
copierShadow(p, 3, 3, 0.5);
|
|
531
|
+
b.save(); pathPoly(b, p); b.fillStyle = '#f4f2ec'; b.fill(); b.restore();
|
|
532
|
+
pathPoly(sp, p); sp.fillStyle = spotCol; sp.fill();
|
|
533
|
+
hide();
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
// ---------- circuit scrap (black with white traces) ----------
|
|
537
|
+
{
|
|
538
|
+
const cx = 1090, cy = 130, w = 330, h = 230, rot = 0.09;
|
|
539
|
+
show(0.625, cx, cy, true);
|
|
540
|
+
const p = scrapPoly(r, nz, cx, cy, w, h, rot, [0, 1, 0, 1], 4);
|
|
541
|
+
copierShadow(p);
|
|
542
|
+
occlude(p);
|
|
543
|
+
b.save(); pathPoly(b, p); b.clip();
|
|
544
|
+
b.fillStyle = '#111'; b.fillRect(cx - 250, cy - 200, 500, 400);
|
|
545
|
+
b.translate(cx, cy); b.rotate(rot);
|
|
546
|
+
b.strokeStyle = '#eee'; b.lineWidth = 3; b.lineJoin = 'round';
|
|
547
|
+
const rr = H.rng(5);
|
|
548
|
+
for (let i = 0; i < 16; i++) {
|
|
549
|
+
let x = rr.range(-170, 170), y = rr.range(-120, 120);
|
|
550
|
+
b.beginPath(); b.moveTo(x, y);
|
|
551
|
+
for (let k = 0; k < 4; k++) {
|
|
552
|
+
const L = rr.range(20, 70), dir = rr.int(0, 3);
|
|
553
|
+
if (dir === 0) x += L; else if (dir === 1) y += L; else if (dir === 2) { x += L * 0.7; y += L * 0.7; } else { x -= L * 0.7; y += L * 0.7; }
|
|
554
|
+
b.lineTo(x, y);
|
|
555
|
+
}
|
|
556
|
+
b.stroke();
|
|
557
|
+
b.fillStyle = '#eee'; b.beginPath(); b.arc(x, y, 5, 0, TAU); b.fill();
|
|
558
|
+
b.fillStyle = '#111'; b.beginPath(); b.arc(x, y, 2, 0, TAU); b.fill();
|
|
559
|
+
}
|
|
560
|
+
b.fillStyle = '#eee'; b.fillRect(-40, -30, 80, 60); b.fillStyle = '#111'; b.fillRect(-32, -22, 64, 44);
|
|
561
|
+
for (let i = -3; i <= 3; i++) { b.fillStyle = '#eee'; b.fillRect(i * 10 - 2, -42, 4, 12); b.fillRect(i * 10 - 2, 30, 4, 12); }
|
|
562
|
+
b.restore();
|
|
563
|
+
hide();
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
// ---------- lens scrap: halftone photo of a camera eye ----------
|
|
567
|
+
const lens = { cx: 905, cy: 420, w: 520, h: 450, rot: -0.07 };
|
|
568
|
+
{
|
|
569
|
+
const { cx, cy, w, h, rot } = lens;
|
|
570
|
+
show(0.375, cx, cy, true);
|
|
571
|
+
const p = scrapPoly(r, nz, cx, cy, w, h, rot, [1, 0, 1, 1], 5);
|
|
572
|
+
copierShadow(p, 3, 2.5, 0.75);
|
|
573
|
+
occlude(p);
|
|
574
|
+
const img = halftone(w + 40, h + 40, 6.5, 0.785, (u, v) => {
|
|
575
|
+
const x = (u - 0.47) * (w + 40), y = (v - 0.5) * (h + 40), d = Math.hypot(x, y) / 185, a = Math.atan2(y, x);
|
|
576
|
+
let gv;
|
|
577
|
+
if (d > 1.12) gv = 0.78 - 0.25 * (v) + 0.08 * Math.sin(x * 0.02);
|
|
578
|
+
else if (d > 0.98) gv = 0.2 + 0.25 * (Math.sin(a * 60) > 0 ? 1 : 0);
|
|
579
|
+
else if (d > 0.84) gv = 0.55 + 0.25 * Math.cos(a - 2.2);
|
|
580
|
+
else if (d > 0.7) gv = 0.12;
|
|
581
|
+
else if (d > 0.62) gv = 0.38 + 0.2 * Math.cos(a + 1);
|
|
582
|
+
else {
|
|
583
|
+
gv = 0.05 + 0.18 * (1 - d / 0.62);
|
|
584
|
+
const hex = Math.cos(Math.PI / 6) / Math.cos(((a % (TAU / 6)) + TAU) % (TAU / 6) - Math.PI / 6);
|
|
585
|
+
if (d < 0.26 * hex) gv = 0.02;
|
|
586
|
+
// glass reflections
|
|
587
|
+
const hl = Math.hypot(x + 55, y + 60) / 185;
|
|
588
|
+
if (Math.abs(hl - 0.3) < 0.05 && a < -1.2 && a > -2.9) gv = 0.96;
|
|
589
|
+
if (Math.hypot(x + 40, y + 45) < 16) gv = 1;
|
|
590
|
+
if (Math.hypot(x - 52, y - 40) < 8) gv = 0.9;
|
|
591
|
+
}
|
|
592
|
+
return H.clamp(gv);
|
|
593
|
+
});
|
|
594
|
+
b.save(); pathPoly(b, p); b.clip();
|
|
595
|
+
b.translate(cx, cy); b.rotate(rot); b.drawImage(img, -(w + 40) / 2, -(h + 40) / 2);
|
|
596
|
+
// caption strip printed on the photo
|
|
597
|
+
b.fillStyle = '#111'; b.fillRect(-w / 2 + 18, h / 2 - 58, 230, 30);
|
|
598
|
+
b.fillStyle = '#f4f2ec'; b.font = '400 17px "Special Elite"'; b.fillText('FIG. 1 — IT SEES YOU', -w / 2 + 28, h / 2 - 37);
|
|
599
|
+
b.restore();
|
|
600
|
+
hide();
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
// ---------- typewritten manifesto scrap ----------
|
|
604
|
+
{
|
|
605
|
+
const cx = 255, cy = 560, w = 380, h = 250, rot = 0.05;
|
|
606
|
+
show(0.875, cx, cy, true);
|
|
607
|
+
const p = scrapPoly(r, nz, cx, cy, w, h, rot, [0, 0, 1, 0], 4);
|
|
608
|
+
copierShadow(p);
|
|
609
|
+
occlude(p);
|
|
610
|
+
b.save(); pathPoly(b, p); b.clip();
|
|
611
|
+
b.fillStyle = '#ece9e1'; b.fillRect(cx - 260, cy - 200, 520, 400);
|
|
612
|
+
b.translate(cx - w / 2 + 22, cy - h / 2 + 36); b.rotate(rot);
|
|
613
|
+
b.fillStyle = '#151515'; b.font = '400 17px "Special Elite"';
|
|
614
|
+
const lines = ['the feed never sleeps.', 'every click is counted.', 'every face is a dataset.', 'who signed the terms?', 'not you. not me.', ''];
|
|
615
|
+
lines.forEach((ln, i) => { b.globalAlpha = 0.85 + 0.15 * Math.sin(i * 7); b.fillText(ln, 0, i * 27); });
|
|
616
|
+
b.globalAlpha = 1;
|
|
617
|
+
b.fillRect(0, 5 * 27 - 15, 120, 19); b.fillRect(130, 5 * 27 - 15, 70, 19); b.fillRect(210, 5 * 27 - 15, 100, 19);
|
|
618
|
+
// strike-through
|
|
619
|
+
b.fillRect(-2, 3 * 27 - 6, 200, 2.5);
|
|
620
|
+
b.restore();
|
|
621
|
+
hide();
|
|
622
|
+
// staples
|
|
623
|
+
[[cx - w / 2 + 26, cy - h / 2 + 14, -0.1], [cx + w / 2 - 40, cy - h / 2 + 22, 0.15]].forEach(([x, y, a], si) => {
|
|
624
|
+
show(3.875 + si * 0.125, x + 20, y);
|
|
625
|
+
b.save(); b.translate(x, y); b.rotate(a);
|
|
626
|
+
b.fillStyle = 'rgba(0,0,0,0.7)'; b.fillRect(-1, 3, 42, 5);
|
|
627
|
+
const g = b.createLinearGradient(0, -2, 0, 3); g.addColorStop(0, '#fff'); g.addColorStop(0.5, '#9a9a9a'); g.addColorStop(1, '#333');
|
|
628
|
+
b.fillStyle = g; b.fillRect(0, -2, 40, 6);
|
|
629
|
+
b.fillStyle = '#111'; b.fillRect(-2, -3, 4, 8); b.fillRect(38, -3, 4, 8);
|
|
630
|
+
b.restore();
|
|
631
|
+
hide();
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
// ---------- spot marker: circle + arrow over the lens ----------
|
|
636
|
+
{
|
|
637
|
+
sp.save(); sp.strokeStyle = spotCol; sp.lineCap = 'round'; sp.lineJoin = 'round';
|
|
638
|
+
const ccx = lens.cx - 10, ccy = lens.cy - 5;
|
|
639
|
+
sp.lineWidth = 9;
|
|
640
|
+
sp.beginPath();
|
|
641
|
+
const prog = H.clamp((ts - 3.0) / 0.5);
|
|
642
|
+
for (let i = 0; i <= 80 * prog; i++) {
|
|
643
|
+
const u = i / 80, a = -2.6 + u * (TAU + 0.6), rr = 238 + Math.sin(u * 9) * 6 + u * 14;
|
|
644
|
+
const x = ccx + Math.cos(a) * rr * 1.05, y = ccy + Math.sin(a) * rr * 0.93;
|
|
645
|
+
i ? sp.lineTo(x, y) : sp.moveTo(x, y);
|
|
646
|
+
}
|
|
647
|
+
sp.stroke();
|
|
648
|
+
sp.lineWidth = 8;
|
|
649
|
+
if (ts >= 3.625) {
|
|
650
|
+
sp.beginPath(); sp.moveTo(470, 300); sp.quadraticCurveTo(560, 250, 640, 300); sp.stroke();
|
|
651
|
+
sp.beginPath(); sp.moveTo(612, 270); sp.lineTo(644, 302); sp.lineTo(604, 314); sp.stroke();
|
|
652
|
+
}
|
|
653
|
+
sp.restore();
|
|
654
|
+
// marker scrawl in black toner
|
|
655
|
+
if (ts >= 3.75) b.save(); else b = dumB;
|
|
656
|
+
b.save(); b.translate(380, 318); b.rotate(-0.12); b.fillStyle = '#111'; b.font = '400 30px "Permanent Marker"'; b.fillText('wake up', 0, 0); b.restore();
|
|
657
|
+
if (b === realB) b.restore(); b = realB;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
// ---------- ransom-note title ----------
|
|
661
|
+
{
|
|
662
|
+
const lines = [{ s: 'WHO OWNS', x: 64, y: 58, size: 76 }, { s: 'THE ALGORITHM?', x: 46, y: 170, size: 66 }];
|
|
663
|
+
const rl = H.rng(4242);
|
|
664
|
+
let li2 = 0;
|
|
665
|
+
lines.forEach((ln, li) => {
|
|
666
|
+
let x = ln.x;
|
|
667
|
+
for (const ch0 of ln.s) {
|
|
668
|
+
if (ch0 === ' ') { x += ln.size * 0.35; continue; }
|
|
669
|
+
const fnt = rl.pick(RANSOM_FONTS).replace('S', Math.round(ln.size * rl.range(0.78, 1.12)) + 'px');
|
|
670
|
+
const ch = rl.chance(0.3) && ch0 !== '?' ? ch0.toLowerCase() : ch0;
|
|
671
|
+
b.font = fnt;
|
|
672
|
+
const m = b.measureText(ch), gw = m.width;
|
|
673
|
+
const asc = m.actualBoundingBoxAscent, desc = m.actualBoundingBoxDescent;
|
|
674
|
+
const padX = rl.range(5, 12), padY = rl.range(5, 11);
|
|
675
|
+
const tw = gw + padX * 2, th = asc + desc + padY * 2;
|
|
676
|
+
const style = rl.pick(['white', 'white', 'black', 'spot', 'grey', 'white', 'spot', 'black']);
|
|
677
|
+
const rot = rl.range(-0.13, 0.13) + (jr() - 0.5) * 0.04;
|
|
678
|
+
const cx = x + tw / 2 + (jr() - 0.5) * 2, cy = ln.y + th / 2 + rl.range(-8, 8) + (jr() - 0.5) * 2;
|
|
679
|
+
const tile = scrapPoly(rl, nz, cx, cy, tw, th, rot, [0, 0, 0, 0]);
|
|
680
|
+
show(1.125 + li2 * 0.0625, cx, cy); li2++;
|
|
681
|
+
copierShadow(tile, 2, 2, 0.75);
|
|
682
|
+
b.save(); pathPoly(b, tile);
|
|
683
|
+
b.fillStyle = style === 'black' ? '#141414' : '#f6f4ee'; b.fill();
|
|
684
|
+
b.clip();
|
|
685
|
+
if (style === 'grey') { b.fillStyle = '#111'; for (let yy = -60; yy < 60; yy += 6) for (let xx = -60; xx < 60; xx += 6) { b.beginPath(); b.arc(cx + xx + (yy % 12 ? 3 : 0), cy + yy, 1.5, 0, TAU); b.fill(); } }
|
|
686
|
+
b.translate(cx, cy); b.rotate(rot);
|
|
687
|
+
b.fillStyle = style === 'black' ? '#f6f4ee' : '#111';
|
|
688
|
+
b.textBaseline = 'alphabetic';
|
|
689
|
+
b.fillText(ch, -gw / 2, (asc - desc) / 2);
|
|
690
|
+
b.restore();
|
|
691
|
+
if (style === 'spot') { pathPoly(sp, tile); sp.fillStyle = spotCol; sp.fill(); }
|
|
692
|
+
else occlude(tile);
|
|
693
|
+
hide();
|
|
694
|
+
x += tw + rl.range(-4, 5);
|
|
695
|
+
}
|
|
696
|
+
});
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
// ---------- masking tape ----------
|
|
700
|
+
const tape = (cx, cy, w, h, rot) => maskTape(b, sp, r, nz, cx, cy, w, h, rot);
|
|
701
|
+
|
|
702
|
+
// toner smudges
|
|
703
|
+
{
|
|
704
|
+
const rs = H.rng(909);
|
|
705
|
+
for (let i = 0; i < 5; i++) {
|
|
706
|
+
const x = rs.range(0, W), y = rs.range(0, H_), R0 = rs.range(30, 90);
|
|
707
|
+
const g = b.createRadialGradient(x, y, 0, x, y, R0);
|
|
708
|
+
g.addColorStop(0, 'rgba(0,0,0,0.32)'); g.addColorStop(1, 'rgba(0,0,0,0)');
|
|
709
|
+
b.fillStyle = g; b.fillRect(x - R0, y - R0, R0 * 2, R0 * 2);
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
// ---------- photocopier: crush to toner ----------
|
|
713
|
+
{
|
|
714
|
+
const img = b.getImageData(0, 0, W, H_), d = img.data, rn = H.rng(31 + fr);
|
|
715
|
+
// drum streaks (fixed columns)
|
|
716
|
+
const streak = new Float32Array(W);
|
|
717
|
+
const rs = H.rng(77);
|
|
718
|
+
for (let i = 0; i < 9; i++) { const x0 = rs.int(0, W - 1), wdt = rs.int(1, 4), a = rs.range(0.05, 0.16); for (let k = 0; k < wdt; k++) if (x0 + k < W) streak[x0 + k] += a; }
|
|
719
|
+
for (let y = 0; y < H_; y++) {
|
|
720
|
+
const edge = Math.max(0, 1 - y / 40) * 0.25 + Math.max(0, (y - H_ + 50) / 50) * 0.2;
|
|
721
|
+
for (let x = 0; x < W; x++) {
|
|
722
|
+
const k = (y * W + x) * 4;
|
|
723
|
+
let L = d[k] / 255;
|
|
724
|
+
const n = (rn() - 0.5) * 0.22 + nz.n2(x * 0.012, y * 0.012) * 0.06;
|
|
725
|
+
L = L + n - streak[x] - edge - Math.max(0, 1 - x / 30) * 0.3;
|
|
726
|
+
// high-contrast toner curve, keeps a little grey for tape
|
|
727
|
+
let v = H.smooth(0.32, 0.62, L);
|
|
728
|
+
if (v > 0.6 && rn() < 0.0025) v = 0.1; // toner specks
|
|
729
|
+
if (v < 0.4 && rn() < 0.01) v = 0.7; // dropouts
|
|
730
|
+
v = 0.06 + v * 0.9;
|
|
731
|
+
d[k] = 255 * v; d[k + 1] = 255 * v * 0.995; d[k + 2] = 255 * v * 0.975;
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
b.putImageData(img, 0, 0);
|
|
735
|
+
}
|
|
736
|
+
// ---------- spot ink: grainy coverage ----------
|
|
737
|
+
{
|
|
738
|
+
const img = sp.getImageData(0, 0, W, H_), d = img.data, rn = H.rng(55 + fr);
|
|
739
|
+
for (let y = 0; y < H_; y++) for (let x = 0; x < W; x++) {
|
|
740
|
+
const k = (y * W + x) * 4;
|
|
741
|
+
if (!d[k + 3]) continue;
|
|
742
|
+
const cov = 0.82 + nz.n2(x * 0.02 + 40, y * 0.02) * 0.2 + (rn() - 0.5) * 0.35;
|
|
743
|
+
d[k + 3] = d[k + 3] * H.clamp(cov);
|
|
744
|
+
}
|
|
745
|
+
sp.putImageData(img, 0, 0);
|
|
746
|
+
}
|
|
747
|
+
[[668, 205, 150, 44, -0.75], [1150, 640, 160, 46, -0.6], [250, 432, 130, 40, 0.06], [1180, 250, 110, 38, 0.5]].forEach((a, i) => {
|
|
748
|
+
show(2.625 + i * 0.125, a[0], a[1]); tape(...a); hide();
|
|
749
|
+
});
|
|
750
|
+
ctx.drawImage(BW, 0, 0);
|
|
751
|
+
// spot plate slides into (mis)registration
|
|
752
|
+
const reg = 1 - H.ease.out(H.clamp(ts / 2.5));
|
|
753
|
+
ctx.save(); ctx.globalCompositeOperation = 'multiply'; const wob = H.rng(300 + Math.floor(t * 8)); // plate wobbles a pixel per step
|
|
754
|
+
ctx.drawImage(SPL, 4 + 12 * reg + Math.round((wob() - 0.5) * 2), -3 - 9 * reg + Math.round((wob() - 0.5) * 2)); ctx.restore();
|
|
755
|
+
// copier-lamp flash on the frame a big scrap lands
|
|
756
|
+
if (flashes.length) { ctx.fillStyle = 'rgba(255,255,250,0.22)'; ctx.fillRect(0, 0, W, H_); }
|
|
757
|
+
},
|
|
758
|
+
});
|
|
759
|
+
}
|