@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,793 @@
|
|
|
1
|
+
// Blueprint — cyanotype engineering drawing of a service robot.
|
|
2
|
+
{
|
|
3
|
+
// >>>XE-ENGINE
|
|
4
|
+
// ===================== explainer story engine (shared script: "How does AI learn?") =====================
|
|
5
|
+
// Builds the diagram as timed world-space strokes/texts; each style renders them with its own medium.
|
|
6
|
+
const XC = {}; // cache for static textures (output still depends only on t)
|
|
7
|
+
const XE = (() => {
|
|
8
|
+
const clamp = (v, a = 0, b = 1) => Math.max(a, Math.min(b, v));
|
|
9
|
+
const win = (t, a, b) => clamp((t - a) / (b - a));
|
|
10
|
+
const eio = (x) => (x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2);
|
|
11
|
+
const camAt = (keys, t) => {
|
|
12
|
+
if (t <= keys[0][0]) return keys[0].slice(1);
|
|
13
|
+
for (let i = 0; i < keys.length - 1; i++) {
|
|
14
|
+
const a = keys[i], b = keys[i + 1];
|
|
15
|
+
if (t <= b[0]) {
|
|
16
|
+
const u = eio((t - a[0]) / Math.max(1e-6, b[0] - a[0]));
|
|
17
|
+
return [a[1] + (b[1] - a[1]) * u, a[2] + (b[2] - a[2]) * u, Math.exp(Math.log(a[3]) + (Math.log(b[3]) - Math.log(a[3])) * u)];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return keys[keys.length - 1].slice(1);
|
|
21
|
+
};
|
|
22
|
+
const circ = (x, y, rx, ry, a0 = 0, a1 = Math.PI * 2, n = 0) => {
|
|
23
|
+
n = n || Math.max(12, Math.ceil(Math.abs(a1 - a0) * Math.max(rx, ry) / 6)); const o = [];
|
|
24
|
+
for (let i = 0; i <= n; i++) { const a = a0 + (a1 - a0) * i / n; o.push([x + Math.cos(a) * rx, y + Math.sin(a) * ry]); }
|
|
25
|
+
return o;
|
|
26
|
+
};
|
|
27
|
+
const quad = (p0, p1, p2, n = 30) => { const o = []; for (let i = 0; i <= n; i++) { const t = i / n, m = 1 - t; o.push([m * m * p0[0] + 2 * m * t * p1[0] + t * t * p2[0], m * m * p0[1] + 2 * m * t * p1[1] + t * t * p2[1]]); } return o; };
|
|
28
|
+
const cubic = (p0, p1, p2, p3, n = 40) => { const o = []; for (let i = 0; i <= n; i++) { const t = i / n, m = 1 - t; o.push([m * m * m * p0[0] + 3 * m * m * t * p1[0] + 3 * m * t * t * p2[0] + t * t * t * p3[0], m * m * m * p0[1] + 3 * m * m * t * p1[1] + 3 * m * t * t * p2[1] + t * t * t * p3[1]]); } return o; };
|
|
29
|
+
const rrect = (x, y, w, h, r) => {
|
|
30
|
+
const o = [[x + r, y], [x + w - r, y]]; o.push(...circ(x + w - r, y + r, r, r, -Math.PI / 2, 0, 5).slice(1));
|
|
31
|
+
o.push([x + w, y + h - r]); o.push(...circ(x + w - r, y + h - r, r, r, 0, Math.PI / 2, 5).slice(1));
|
|
32
|
+
o.push([x + r, y + h]); o.push(...circ(x + r, y + h - r, r, r, Math.PI / 2, Math.PI, 5).slice(1));
|
|
33
|
+
o.push([x, y + r]); o.push(...circ(x + r, y + r, r, r, Math.PI, Math.PI * 1.5, 5).slice(1));
|
|
34
|
+
o.push([x + r + 6, y - 1]); return o;
|
|
35
|
+
};
|
|
36
|
+
const head = (P, len = 20, spread = 0.5) => {
|
|
37
|
+
const a = P[P.length - 1], b = P[Math.max(0, P.length - 4)], an = Math.atan2(a[1] - b[1], a[0] - b[0]);
|
|
38
|
+
return [[a[0] - Math.cos(an - spread) * len, a[1] - Math.sin(an - spread) * len], a, [a[0] - Math.cos(an + spread) * len, a[1] - Math.sin(an + spread) * len]];
|
|
39
|
+
};
|
|
40
|
+
const cat = (x, y, s) => [
|
|
41
|
+
circ(x, y + 0.06 * s, 0.3 * s, 0.27 * s, -1.2, 5.1),
|
|
42
|
+
[[x - 0.27 * s, y - 0.02 * s], [x - 0.24 * s, y - 0.34 * s], [x - 0.07 * s, y - 0.2 * s]],
|
|
43
|
+
[[x + 0.07 * s, y - 0.2 * s], [x + 0.24 * s, y - 0.34 * s], [x + 0.27 * s, y - 0.02 * s]],
|
|
44
|
+
[[x - 0.03 * s, y + 0.1 * s], [x, y + 0.13 * s], [x + 0.03 * s, y + 0.1 * s]],
|
|
45
|
+
[[x - 0.12 * s, y + 0.12 * s], [x - 0.36 * s, y + 0.08 * s]], [[x - 0.12 * s, y + 0.16 * s], [x - 0.35 * s, y + 0.2 * s]],
|
|
46
|
+
[[x + 0.12 * s, y + 0.12 * s], [x + 0.36 * s, y + 0.08 * s]], [[x + 0.12 * s, y + 0.16 * s], [x + 0.35 * s, y + 0.2 * s]],
|
|
47
|
+
];
|
|
48
|
+
const dog = (x, y, s) => [
|
|
49
|
+
circ(x, y + 0.04 * s, 0.26 * s, 0.28 * s, -1.4, 4.9),
|
|
50
|
+
circ(x - 0.29 * s, y + 0.04 * s, 0.09 * s, 0.2 * s, 0, 6.4),
|
|
51
|
+
circ(x + 0.29 * s, y + 0.04 * s, 0.09 * s, 0.2 * s, 0, 6.4),
|
|
52
|
+
circ(x, y + 0.15 * s, 0.07 * s, 0.045 * s, 0, 6.4),
|
|
53
|
+
[[x - 0.08 * s, y + 0.23 * s], [x, y + 0.26 * s], [x + 0.08 * s, y + 0.23 * s]],
|
|
54
|
+
];
|
|
55
|
+
const eyes = (x, y, s, dy = 0.02) => [[x - 0.1 * s, y + dy * s], [x + 0.1 * s, y + dy * s]];
|
|
56
|
+
const fmt = (n) => Math.round(n).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
57
|
+
|
|
58
|
+
// L: layout options. mode: 'same' (progress drawn where the loop was) | 'below' | 'right'
|
|
59
|
+
// model(cx, cy, adj, add): style supplies its model drawing; adj 0..1 = how far the knobs have been adjusted.
|
|
60
|
+
const story = (t, L) => {
|
|
61
|
+
const items = [];
|
|
62
|
+
const line = (pts, role, w, a, b, g) => items.push({ k: 'line', pts, role, w, a, b, g });
|
|
63
|
+
const text = (s, x, y, size, font, role, a, b, opt = {}) => items.push({ k: 'text', s, x, y, size, font, role, a, b, rot: opt.rot || 0, align: opt.align || 'left', g: opt.g });
|
|
64
|
+
const dot = (x, y, r, role, a, g) => items.push({ k: 'dot', x, y, r, role, a, b: a + 0.05, g });
|
|
65
|
+
const S = L.s || 1;
|
|
66
|
+
// ---- 1 HOOK ----
|
|
67
|
+
const TX = L.titleX ?? 640, TY = L.titleY ?? 350;
|
|
68
|
+
text('How does AI learn?', TX, TY, 84 * S, 'title', 'ink', 0.15, 1.3, { align: 'center', rot: -0.015, g: 'A' });
|
|
69
|
+
line([[TX - 330 * S, TY + 32 * S], [TX + 330 * S, TY + 24 * S]], 'acc1', 7, 1.3, 1.55, 'A');
|
|
70
|
+
// ---- 2 DATA ----
|
|
71
|
+
const MX = L.modelX ?? 2250, MY = L.modelY ?? 640;
|
|
72
|
+
const mAdj = eio(win(t, 8.95, 9.5));
|
|
73
|
+
L.model(MX, MY, mAdj, (it) => { it.g = it.g || 'M'; items.push(it); }, { line, text, dot }, t);
|
|
74
|
+
text(L.modelName || 'model', MX, MY + 228, 38, 'label', 'ink', 3.15, 3.4, { align: 'center', g: 'M' });
|
|
75
|
+
const CS = 118, cx0 = MX - 870, cy0 = MY - 175;
|
|
76
|
+
for (let i = 0; i < 6; i++) {
|
|
77
|
+
const col = i % 3, row = (i / 3) | 0, x = cx0 + col * 150 + (row ? 40 : 0), y = cy0 + row * 170, isCat = [1, 0, 1, 1, 0, 0][i];
|
|
78
|
+
const a = 3.0 + i * 0.17;
|
|
79
|
+
line(rrect(x - CS / 2, y - CS / 2, CS, CS, 12), 'ink', 4, a, a + 0.12, 'B');
|
|
80
|
+
(isCat ? cat : dog)(x, y - 6, CS * 0.82).forEach((p) => line(p, 'ink', 3.2, a + 0.1, a + 0.22, 'B'));
|
|
81
|
+
eyes(x, y - 6, CS * 0.82).forEach(([ex, ey]) => dot(ex, ey, 3.2, 'ink', a + 0.22, 'B'));
|
|
82
|
+
// label tag hanging off the card
|
|
83
|
+
const tx = x + 18, ty = y + CS / 2 - 4;
|
|
84
|
+
line([[tx, ty], [tx + 70, ty], [tx + 84, ty + 19], [tx + 70, ty + 38], [tx, ty + 38], [tx, ty]], isCat ? 'acc1' : 'acc3', 3, a + 0.2, a + 0.3, 'B');
|
|
85
|
+
text(isCat ? 'cat' : 'dog', tx + 8, ty + 30, 31, 'label', isCat ? 'acc1' : 'acc3', a + 0.28, a + 0.36, { g: 'B' });
|
|
86
|
+
}
|
|
87
|
+
// flow arrow into the model
|
|
88
|
+
const fa = cubic([cx0 + 370, MY - 10], [cx0 + 470, MY - 60], [MX - 260, MY - 40], [MX - 165, MY - 10]);
|
|
89
|
+
line(fa, 'ink', 5, 4.15, 4.45, 'B'); line(head(fa, 24), 'ink', 5, 4.45, 4.55, 'B');
|
|
90
|
+
// little example cards streaming along the arrow
|
|
91
|
+
if (t > 4.5 && t < 6.2) {
|
|
92
|
+
for (let k = 0; k < 9; k++) {
|
|
93
|
+
const u = ((t - 4.5) * 0.9 + k / 9) % 1, ix = Math.min(fa.length - 1, Math.floor(u * fa.length));
|
|
94
|
+
const [px, py] = fa[ix], sz = 26 * (1 - 0.5 * u);
|
|
95
|
+
if (t - 4.5 < k / 9 / 0.9) continue;
|
|
96
|
+
items.push({ k: 'line', pts: rrect(px - sz / 2, py - sz / 2 - 18, sz, sz, 4), role: k % 2 ? 'acc1' : 'acc3', w: 2.5, a: -1, b: 0, g: 'F', inst: true });
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
// counter (numerals redrawn on twos)
|
|
100
|
+
if (t > 4.5) {
|
|
101
|
+
const u = win(Math.floor(t * 12) / 12, 4.55, 5.25), n = u >= 1 ? 1e6 : (Math.pow(10, u * 6) - 1) / (1e6 - 1) * 1e6;
|
|
102
|
+
items.push({ k: 'text', s: fmt(n), x: cx0 + 150, y: cy0 + 425, size: 76, font: 'num', role: 'ink', a: -1, b: 0, align: 'center', g: 'B', inst: true, live: true });
|
|
103
|
+
text('examples', cx0 + 150, cy0 + 472, 36, 'label', 'ink', 4.55, 4.8, { align: 'center', g: 'B' });
|
|
104
|
+
}
|
|
105
|
+
if (L.model2At) L.model(MX, MY, mAdj, (it) => { it.g = 'M2'; if (!it.inst) { it.a += L.model2At - 2.5; it.b += L.model2At - 2.5; } items.push(it); }, { line: (p, r, w, a, b) => line(p, r, w, a + L.model2At - 2.5, b + L.model2At - 2.5, 'M2'), text: (s2, x, y, sz, f, r, a, b, o = {}) => text(s2, x, y, sz, f, r, a + L.model2At - 2.5, b + L.model2At - 2.5, { ...o, g: 'M2' }), dot }, t - (L.model2At - 2.5));
|
|
106
|
+
// ---- 3 GUESS -> CHECK -> ADJUST ----
|
|
107
|
+
const qx = MX, qy = MY - 300;
|
|
108
|
+
line(rrect(qx - 62, qy - 62, 124, 124, 12), 'acc2', 4, 6.4, 6.55, 'C');
|
|
109
|
+
cat(qx, qy - 4, 100).forEach((p) => line(p, 'ink', 3.2, 6.5, 6.7, 'C'));
|
|
110
|
+
eyes(qx, qy - 4, 100).forEach(([ex, ey]) => dot(ex, ey, 3, 'ink', 6.7, 'C'));
|
|
111
|
+
text('new!', qx + 72, qy - 30, 30, 'label', 'acc2', 6.65, 6.8, { g: 'C' });
|
|
112
|
+
const dn = [[qx, qy + 70], [qx + 2, MY - 170]];
|
|
113
|
+
line(dn, 'ink', 5, 6.8, 6.95, 'C'); line(head(dn, 18), 'ink', 5, 6.95, 7.02, 'C');
|
|
114
|
+
const gA = [[MX + 175, MY - 10], [MX + 300, MY - 14], [MX + 400, MY - 8]];
|
|
115
|
+
line(gA, 'ink', 5, 7.02, 7.2, 'C'); line(head(gA, 20), 'ink', 5, 7.2, 7.26, 'C');
|
|
116
|
+
text('Guess', MX + 290, MY - 40, 38, 'label', 'ink', 7.15, 7.4, { align: 'center', g: 'C' });
|
|
117
|
+
const BX = MX + 540, BY = MY - 10;
|
|
118
|
+
line(rrect(BX - 120, BY - 55, 240, 110, 40), 'ink', 5, 7.3, 7.5, 'C');
|
|
119
|
+
line([[BX - 70, BY + 52], [BX - 96, BY + 92], [BX - 40, BY + 54]], 'ink', 5, 7.48, 7.55, 'C');
|
|
120
|
+
text('dog?', BX, BY + 18, 52, 'title', 'ink', 7.52, 7.75, { align: 'center', g: 'C' });
|
|
121
|
+
text('Check', BX, BY - 82, 38, 'label', 'acc2', 7.85, 8.05, { align: 'center', g: 'C' });
|
|
122
|
+
line([[BX + 140, BY - 40], [BX + 200, BY + 30]], 'acc2', 8, 8.0, 8.08, 'C');
|
|
123
|
+
line([[BX + 200, BY - 40], [BX + 140, BY + 30]], 'acc2', 8, 8.08, 8.16, 'C');
|
|
124
|
+
line(circ(BX + 4, BY + 2, 150, 82, -2.2, 4.4), 'acc2', 5, 8.15, 8.45, 'C'); // emphasis ring
|
|
125
|
+
const back = cubic([BX - 60, BY + 70], [BX - 80, BY + 290], [MX + 290, MY + 300], [MX + 155, MY + 190]);
|
|
126
|
+
line(back, 'acc2', 6, 8.45, 8.95, 'C'); line(head(back, 22), 'acc2', 6, 8.95, 9.02, 'C');
|
|
127
|
+
text('Adjust', (BX + MX) / 2 - 10, MY + 315, 40, 'label', 'acc2', 8.8, 9.05, { align: 'center', g: 'C' });
|
|
128
|
+
if (t > 8.95 && t < 9.4) { // error signal travelling back
|
|
129
|
+
const u = win(t, 8.95, 9.35), p = back[Math.min(back.length - 1, Math.floor((1 - u) * (back.length - 1)))];
|
|
130
|
+
items.push({ k: 'dot', x: p[0], y: p[1], r: 13, role: 'acc2', a: -1, b: 0, g: 'C', inst: true });
|
|
131
|
+
}
|
|
132
|
+
line([[BX - 66, BY + 4], [BX - 20, BY - 6], [BX + 24, BY + 6], [BX + 66, BY - 4]], 'ink', 5, 9.5, 9.62, 'C'); // strike
|
|
133
|
+
text('cat', BX + 30, BY + 118, 52, 'title', 'acc3', 9.62, 9.85, { align: 'center', g: 'C' });
|
|
134
|
+
line([[BX + 92, BY + 96], [BX + 112, BY + 122], [BX + 156, BY + 66]], 'acc3', 8, 9.85, 10.05, 'C');
|
|
135
|
+
if (L.bridge) { // a connector the hand draws while the camera travels to the next part
|
|
136
|
+
const B = L.bridge;
|
|
137
|
+
line(B.pts, 'acc1', 5, B.a, B.b, 'D'); line(head(B.pts, 22), 'acc1', 5, B.b, B.b + 0.06, 'D');
|
|
138
|
+
text(B.label, B.lx, B.ly, 40, 'label', 'acc1', B.b + 0.06, B.b + 0.3, { align: 'center', rot: B.rot || 0, g: 'D' });
|
|
139
|
+
}
|
|
140
|
+
// ---- 4 PROGRESS ----
|
|
141
|
+
const D = L.D;
|
|
142
|
+
const ox = D[0] - 380, oy = D[1] + 150, cw = 560, ch = 330;
|
|
143
|
+
line([[ox, oy - ch], [ox, oy], [ox + cw, oy]], 'ink', 5, L.pT, L.pT + 0.35, 'D');
|
|
144
|
+
line(head([[ox, oy], [ox, oy - ch]], 16), 'ink', 5, L.pT + 0.35, L.pT + 0.4, 'D');
|
|
145
|
+
line(head([[ox, oy], [ox + cw, oy]], 16), 'ink', 5, L.pT + 0.4, L.pT + 0.45, 'D');
|
|
146
|
+
text('training rounds', ox + cw / 2, oy + 48, 34, 'label', 'ink', L.pT + 0.3, L.pT + 0.55, { align: 'center', g: 'D' });
|
|
147
|
+
const cpts = [];
|
|
148
|
+
for (let i = 0; i <= 40; i++) {
|
|
149
|
+
const u = i / 40, acc = 61 + 36 * (1 - Math.pow(1 - u, 2.2)) + (i % 3 === 1 ? -2.5 : i % 3 === 2 ? 1.5 : 0) * (1 - u);
|
|
150
|
+
cpts.push([ox + 20 + u * (cw - 50), oy - (acc - 50) / 50 * ch]);
|
|
151
|
+
}
|
|
152
|
+
line(cpts, 'acc1', 6, L.pT + 0.5, L.pT + 1.7, 'D');
|
|
153
|
+
text('accuracy', D[0] + 330, D[1] - 120, 40, 'label', 'ink', L.pT + 0.45, L.pT + 0.7, { align: 'center', g: 'D' });
|
|
154
|
+
if (t > L.pT + 0.55) {
|
|
155
|
+
const u = win(Math.floor(t * 12) / 12, L.pT + 0.6, L.pT + 1.7), v = 61 + 36 * (1 - Math.pow(1 - u, 2.2));
|
|
156
|
+
items.push({ k: 'text', s: Math.round(v) + '%', x: D[0] + 330, y: D[1] + 10, size: 110, font: 'num', role: u >= 1 ? 'acc3' : 'ink', a: -1, b: 0, align: 'center', g: 'D', inst: true, live: true });
|
|
157
|
+
}
|
|
158
|
+
line(circ(D[0] + 335, D[1] - 25, 140, 90, -2.4, 4.2), 'acc2', 6, L.pT + 1.75, L.pT + 2.05, 'D');
|
|
159
|
+
// ---- 5 TAKEAWAY ----
|
|
160
|
+
text('More examples → better guesses', D[0], D[1] + 290, 62, 'title', 'ink', L.kT, L.kT + 0.75, { align: 'center', rot: -0.01, g: 'E' });
|
|
161
|
+
line([[D[0] - 450, D[1] + 316], [D[0] + 455, D[1] + 308]], 'acc1', 6, L.kT + 0.75, L.kT + 0.95, 'E');
|
|
162
|
+
return items;
|
|
163
|
+
};
|
|
164
|
+
// the 'tip' of whatever is currently being drawn (for the hand/tool)
|
|
165
|
+
const tipOf = (items, t, measure) => {
|
|
166
|
+
let tip = null;
|
|
167
|
+
for (const it of items) {
|
|
168
|
+
if (it.inst || it.k === 'dot') continue;
|
|
169
|
+
const p = win(t, it.a, it.b);
|
|
170
|
+
if (p > 0 && p < 1) {
|
|
171
|
+
if (it.k === 'line') { const P = it.pts; tip = P[Math.min(P.length - 1, Math.floor(p * (P.length - 1)))]; }
|
|
172
|
+
else tip = measure ? measure(it, p) : [it.x, it.y];
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
return tip;
|
|
176
|
+
};
|
|
177
|
+
return { clamp, win, eio, camAt, circ, quad, cubic, rrect, head, cat, dog, story, tipOf, fmt };
|
|
178
|
+
})();
|
|
179
|
+
// <<<XE-ENGINE
|
|
180
|
+
registerStyle({
|
|
181
|
+
id: 'blueprint',
|
|
182
|
+
name: 'Engineering Blueprint',
|
|
183
|
+
category: 'Hand-Drawn',
|
|
184
|
+
description: 'A drafted cyanotype: white line-work bleeding slightly into mottled, sun-faded Prussian-blue paper, orthographic front/side views with a hatched section, dimension chains, a zoned border, title block and worn fold creases.',
|
|
185
|
+
motion: 'Construction and projection lines sweep across first, object lines ink in view by view, then dimensions and lettering pop in as the camera slowly pans along the sheet.',
|
|
186
|
+
fonts: ['700 26px "Space Mono"', '400 13px "IBM Plex Mono"', '600 15px "IBM Plex Mono"', '700 15px "Space Mono"'],
|
|
187
|
+
frameT: 5.4,
|
|
188
|
+
duration: 5.5,
|
|
189
|
+
readsPixels: true,
|
|
190
|
+
draw(ctx, W, H_, t) {
|
|
191
|
+
const nz = H.makeNoise(88);
|
|
192
|
+
|
|
193
|
+
// ---------- paper: mottled, sun-faded prussian blue (half-res) ----------
|
|
194
|
+
{
|
|
195
|
+
const w2 = W / 2, h2 = H_ / 2, pl = H.layer(w2, h2), pc = pl.getContext('2d');
|
|
196
|
+
const id = pc.createImageData(w2, h2), d = id.data;
|
|
197
|
+
const base = [22, 58, 112];
|
|
198
|
+
for (let y = 0; y < h2; y++) for (let x = 0; x < w2; x++) {
|
|
199
|
+
const m = nz.fbm2(x * 0.008, y * 0.008, 4) * 0.2 + nz.fbm2(x * 0.05 + 10, y * 0.05, 2) * 0.06 + Math.max(0, nz.fbm2(x * 0.004 + 40, y * 0.004, 3) - 0.15) * 0.5;
|
|
200
|
+
const fade = Math.max(0, 1 - Math.hypot(x - w2 * 0.2, y - h2 * 0.15) / (w2 * 0.9)) * 0.16; // sun-faded corner
|
|
201
|
+
const ex = Math.min(x, w2 - x) / w2, ey = Math.min(y, h2 - y) / h2;
|
|
202
|
+
const edge = (1 - H.smooth(0, 0.12, Math.min(ex * 1.8, ey))) * 0.3;
|
|
203
|
+
const k = 1 + m + fade - edge;
|
|
204
|
+
const i = (y * w2 + x) * 4;
|
|
205
|
+
d[i] = base[0] * k + fade * 40; d[i + 1] = base[1] * k + fade * 30; d[i + 2] = base[2] * k + fade * 25; d[i + 3] = 255;
|
|
206
|
+
}
|
|
207
|
+
pc.putImageData(id, 0, 0);
|
|
208
|
+
ctx.imageSmoothingEnabled = true; ctx.drawImage(pl, 0, 0, W, H_);
|
|
209
|
+
// speckle flaws
|
|
210
|
+
const rr = H.rng(4);
|
|
211
|
+
for (let i = 0; i < 1600; i++) {
|
|
212
|
+
ctx.fillStyle = rr.chance(0.7) ? `rgba(160,190,230,${rr.range(0.05, 0.25)})` : `rgba(5,20,50,${rr.range(0.1, 0.3)})`;
|
|
213
|
+
ctx.fillRect(rr.range(0, W), rr.range(0, H_), rr.range(0.6, 1.8), rr.range(0.6, 1.8));
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// ---------- line layer ----------
|
|
218
|
+
const LL = H.layer(W, H_), lc = LL.getContext('2d');
|
|
219
|
+
let c = lc;
|
|
220
|
+
const ink = (k) => { k.strokeStyle = '#eef4ff'; k.fillStyle = '#eef4ff'; k.lineCap = 'round'; k.lineJoin = 'round'; };
|
|
221
|
+
ink(c);
|
|
222
|
+
const T = (a, b) => H.clamp((t - a) / (b - a));
|
|
223
|
+
// each group "develops" onto the print behind a soft wipe
|
|
224
|
+
const group = (t0, t1, dir, x0, y0, x1, y1, fn) => {
|
|
225
|
+
const p = T(t0, t1); if (p <= 0) return;
|
|
226
|
+
const GLy = H.layer(W, H_); c = GLy.getContext('2d'); ink(c);
|
|
227
|
+
fn();
|
|
228
|
+
if (p < 1) {
|
|
229
|
+
const e = H.ease.inOut(p), soft = 60;
|
|
230
|
+
const g = dir === 'x' ? c.createLinearGradient(x0 - soft + (x1 - x0 + 2 * soft) * e - soft, 0, x0 - soft + (x1 - x0 + 2 * soft) * e, 0)
|
|
231
|
+
: c.createLinearGradient(0, y0 - soft + (y1 - y0 + 2 * soft) * e - soft, 0, y0 - soft + (y1 - y0 + 2 * soft) * e);
|
|
232
|
+
g.addColorStop(0, 'rgba(0,0,0,1)'); g.addColorStop(1, 'rgba(0,0,0,0)');
|
|
233
|
+
c.save(); c.globalCompositeOperation = 'destination-in'; c.fillStyle = g; c.fillRect(0, 0, W, H_); c.restore();
|
|
234
|
+
}
|
|
235
|
+
lc.drawImage(GLy, 0, 0); c = lc;
|
|
236
|
+
};
|
|
237
|
+
let POP = 2.45;
|
|
238
|
+
const pop = () => { const tp = POP; POP += 0.085; return t >= tp; };
|
|
239
|
+
const lw = (w) => { c.lineWidth = w; };
|
|
240
|
+
const dash = (d) => c.setLineDash(d || []);
|
|
241
|
+
const ln = (x0, y0, x1, y1, w = 1, d) => { lw(w); dash(d); c.beginPath(); c.moveTo(x0, y0); c.lineTo(x1, y1); c.stroke(); dash(); };
|
|
242
|
+
const rr_ = (x, y, w, h, r, lwid = 2.2, d) => { lw(lwid); dash(d); c.beginPath(); c.roundRect(x, y, w, h, r); c.stroke(); dash(); };
|
|
243
|
+
const circ = (x, y, r, lwid = 2.2, d) => { lw(lwid); dash(d); c.beginPath(); c.arc(x, y, r, 0, 7); c.stroke(); dash(); };
|
|
244
|
+
const CENTER = [18, 4, 3, 4], HIDDEN = [7, 4];
|
|
245
|
+
const arrow = (x, y, ang, s = 11) => {
|
|
246
|
+
c.save(); c.translate(x, y); c.rotate(ang);
|
|
247
|
+
c.beginPath(); c.moveTo(0, 0); c.lineTo(-s, -3); c.lineTo(-s, 3); c.closePath(); c.fill(); c.restore();
|
|
248
|
+
};
|
|
249
|
+
const label = (str, x, y, font = '400 13px "IBM Plex Mono"', align = 'center', rot = 0) => {
|
|
250
|
+
c.save(); c.font = font; c.textAlign = align; c.textBaseline = 'middle'; c.translate(x, y); c.rotate(rot); c.fillText(str, 0, 0); c.restore();
|
|
251
|
+
};
|
|
252
|
+
// horizontal dimension: object span x0..x1, extension from yObj to yDim
|
|
253
|
+
const dimH = (x0, x1, yObj, yDim, txt) => {
|
|
254
|
+
if (!pop()) return;
|
|
255
|
+
const s = Math.sign(yDim - yObj) || 1;
|
|
256
|
+
ln(x0, yObj + s * 4, x0, yDim + s * 6, 0.9); ln(x1, yObj + s * 4, x1, yDim + s * 6, 0.9);
|
|
257
|
+
ln(x0, yDim, x1, yDim, 0.9); arrow(x0, yDim, Math.PI); arrow(x1, yDim, 0);
|
|
258
|
+
// gap behind text
|
|
259
|
+
c.save(); c.font = '400 13px "IBM Plex Mono"'; const tw = c.measureText(txt).width; c.restore();
|
|
260
|
+
c.save(); c.globalCompositeOperation = 'destination-out'; c.fillRect((x0 + x1) / 2 - tw / 2 - 4, yDim - 8, tw + 8, 16); c.restore();
|
|
261
|
+
label(txt, (x0 + x1) / 2, yDim);
|
|
262
|
+
};
|
|
263
|
+
const dimV = (y0, y1, xObj, xDim, txt) => {
|
|
264
|
+
if (!pop()) return;
|
|
265
|
+
const s = Math.sign(xDim - xObj) || 1;
|
|
266
|
+
ln(xObj + s * 4, y0, xDim + s * 6, y0, 0.9); ln(xObj + s * 4, y1, xDim + s * 6, y1, 0.9);
|
|
267
|
+
ln(xDim, y0, xDim, y1, 0.9); arrow(xDim, y0, -Math.PI / 2); arrow(xDim, y1, Math.PI / 2);
|
|
268
|
+
c.save(); c.font = '400 13px "IBM Plex Mono"'; const tw = c.measureText(txt).width; c.restore();
|
|
269
|
+
c.save(); c.globalCompositeOperation = 'destination-out'; c.fillRect(xDim - 8, (y0 + y1) / 2 - tw / 2 - 4, 16, tw + 8); c.restore();
|
|
270
|
+
label(txt, xDim, (y0 + y1) / 2, undefined, 'center', -Math.PI / 2);
|
|
271
|
+
};
|
|
272
|
+
const leader = (x0, y0, x1, y1, txt, align = 'left') => {
|
|
273
|
+
if (!pop()) return;
|
|
274
|
+
ln(x0, y0, x1, y1, 0.9); ln(x1, y1, x1 + (align === 'left' ? 30 : -30), y1, 0.9);
|
|
275
|
+
c.beginPath(); c.arc(x0, y0, 2.5, 0, 7); c.fill();
|
|
276
|
+
label(txt, x1 + (align === 'left' ? 36 : -36), y1, '400 13px "IBM Plex Mono"', align);
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
// ---------- sheet border with zones ----------
|
|
280
|
+
group(0.0, 0.5, 'x', 0, 0, W, H_, () => {
|
|
281
|
+
lw(2.4); c.strokeRect(30, 30, W - 60, H_ - 60);
|
|
282
|
+
lw(1); c.strokeRect(20, 20, W - 40, H_ - 40);
|
|
283
|
+
for (let i = 1; i < 6; i++) { const x = 30 + (W - 60) * i / 6; ln(x, 20, x, 30, 1); ln(x, H_ - 30, x, H_ - 20, 1); }
|
|
284
|
+
for (let i = 1; i < 4; i++) { const y = 30 + (H_ - 60) * i / 4; ln(20, y, 30, y, 1); ln(W - 30, y, W - 20, y, 1); }
|
|
285
|
+
for (let i = 0; i < 6; i++) { const x = 30 + (W - 60) * (i + 0.5) / 6; label(String(6 - i), x, 25.5, '400 9px "IBM Plex Mono"'); label(String(6 - i), x, H_ - 25, '400 9px "IBM Plex Mono"'); }
|
|
286
|
+
['D', 'C', 'B', 'A'].forEach((L, i) => { const y = 30 + (H_ - 60) * (i + 0.5) / 4; label(L, 25, y, '400 9px "IBM Plex Mono"'); label(L, W - 25, y, '400 9px "IBM Plex Mono"'); });
|
|
287
|
+
|
|
288
|
+
});
|
|
289
|
+
// ---------- FRONT VIEW ----------
|
|
290
|
+
const fx = 270, GY = 560;
|
|
291
|
+
group(0.2, 1.3, 'y', 0, 90, W, 640, () => {
|
|
292
|
+
ln(fx, 88, fx, 584, 0.8, CENTER);
|
|
293
|
+
// antenna + head
|
|
294
|
+
ln(fx, 140, fx, 112, 1.8); circ(fx, 105, 7, 1.8);
|
|
295
|
+
rr_(fx - 62, 140, 124, 86, 14);
|
|
296
|
+
rr_(fx - 48, 158, 96, 42, 10, 1.6);
|
|
297
|
+
circ(fx - 22, 179, 9, 1.6); circ(fx + 22, 179, 9, 1.6);
|
|
298
|
+
rr_(fx - 72, 164, 10, 36, 3, 1.6); rr_(fx + 62, 164, 10, 36, 3, 1.6);
|
|
299
|
+
// neck + torso
|
|
300
|
+
rr_(fx - 18, 226, 36, 18, 2, 1.8);
|
|
301
|
+
rr_(fx - 86, 244, 172, 166, 18);
|
|
302
|
+
rr_(fx - 74, 256, 148, 142, 12, 1, [3, 3]);
|
|
303
|
+
circ(fx, 304, 30, 2); circ(fx, 304, 18, 1.4);
|
|
304
|
+
for (let k = 0; k < 6; k++) { const a = k * Math.PI / 3; ln(fx + Math.cos(a) * 19, 304 + Math.sin(a) * 19, fx + Math.cos(a) * 29, 304 + Math.sin(a) * 29, 1); }
|
|
305
|
+
rr_(fx - 46, 346, 92, 48, 4, 1.3, HIDDEN); // battery (hidden)
|
|
306
|
+
// shoulders + arms
|
|
307
|
+
[-1, 1].forEach((s) => {
|
|
308
|
+
const ax = fx + s * 104;
|
|
309
|
+
circ(ax, 266, 20, 2); circ(ax, 266, 6, 1.2);
|
|
310
|
+
rr_(ax - 13, 284, 26, 48, 6, 2); circ(ax, 340, 11, 1.8);
|
|
311
|
+
rr_(ax - 12, 350, 24, 46, 6, 2);
|
|
312
|
+
c.beginPath(); lw(2); c.moveTo(ax - 10, 396); c.lineTo(ax - 14, 418); c.lineTo(ax - 4, 426); c.moveTo(ax + 10, 396); c.lineTo(ax + 14, 418); c.lineTo(ax + 4, 426); c.stroke();
|
|
313
|
+
});
|
|
314
|
+
// waist skirt + base + tracks
|
|
315
|
+
c.beginPath(); lw(2.2); c.moveTo(fx - 70, 410); c.lineTo(fx - 96, 470); c.lineTo(fx + 96, 470); c.lineTo(fx + 70, 410); c.stroke();
|
|
316
|
+
for (let k = 0; k < 4; k++) ln(fx - 52 + k * 2, 426 + k * 11, fx + 52 - k * 2, 426 + k * 11, 1.2);
|
|
317
|
+
rr_(fx - 100, 470, 200, 36, 6);
|
|
318
|
+
rr_(fx - 116, 500, 46, 60, 8); rr_(fx + 70, 500, 46, 60, 8);
|
|
319
|
+
for (let k = 0; k < 5; k++) { ln(fx - 116, 510 + k * 10, fx - 70, 510 + k * 10, 0.8); ln(fx + 70, 510 + k * 10, fx + 116, 510 + k * 10, 0.8); }
|
|
320
|
+
// ground line
|
|
321
|
+
ln(110, GY, 760, GY, 1.2);
|
|
322
|
+
for (let x = 116; x < 760; x += 12) ln(x, GY + 1, x - 8, GY + 9, 0.7);
|
|
323
|
+
// section cut A-A
|
|
324
|
+
ln(fx - 140, 304, fx + 140, 304, 1.4, [22, 5, 4, 5]);
|
|
325
|
+
lw(3); c.beginPath(); c.moveTo(fx - 140, 304); c.lineTo(fx - 120, 304); c.moveTo(fx + 120, 304); c.lineTo(fx + 140, 304); c.stroke();
|
|
326
|
+
[-1, 1].forEach((s) => { ln(fx + s * 140, 304, fx + s * 140, 282, 1.4); arrow(fx + s * 140, 280, -Math.PI / 2, 12); label('A', fx + s * 140 + s * 14, 278, '700 15px "Space Mono"'); });
|
|
327
|
+
// dims
|
|
328
|
+
dimV(98, GY, fx - 116, 130, '1450');
|
|
329
|
+
dimV(140, 226, fx + 62, 362, '320');
|
|
330
|
+
dimH(fx - 116, fx + 116, GY, 592, '620');
|
|
331
|
+
label('FRONT VIEW', fx, 626, '600 15px "IBM Plex Mono"');
|
|
332
|
+
ln(fx - 52, 636, fx + 52, 636, 1);
|
|
333
|
+
leader(fx + 22, 179, fx + 96, 128, 'LiDAR ARRAY');
|
|
334
|
+
|
|
335
|
+
});
|
|
336
|
+
// ---------- projection lines ----------
|
|
337
|
+
group(0.95, 1.35, 'x', 400, 0, 520, H_, () => {
|
|
338
|
+
c.save(); c.globalAlpha = 0.35;
|
|
339
|
+
[105, 140, 226, 244, 410, 470, 500].forEach((y) => ln(400, y, 520, y, 0.7, [2, 5]));
|
|
340
|
+
c.restore();
|
|
341
|
+
|
|
342
|
+
});
|
|
343
|
+
// ---------- SIDE VIEW ----------
|
|
344
|
+
const sx = 620;
|
|
345
|
+
group(1.1, 2.15, 'y', 0, 90, W, 640, () => {
|
|
346
|
+
ln(sx, 88, sx, 584, 0.8, CENTER);
|
|
347
|
+
ln(sx - 10, 140, sx - 10, 112, 1.8); circ(sx - 10, 105, 7, 1.8);
|
|
348
|
+
rr_(sx - 50, 140, 100, 86, 14);
|
|
349
|
+
rr_(sx + 50, 158, 14, 42, 6, 1.8);
|
|
350
|
+
ln(sx + 20, 150, sx + 20, 216, 1, HIDDEN);
|
|
351
|
+
rr_(sx - 16, 226, 32, 18, 2, 1.8);
|
|
352
|
+
rr_(sx - 60, 244, 120, 166, 18);
|
|
353
|
+
c.beginPath(); lw(2); c.arc(sx + 60, 304, 30, -Math.PI / 2, Math.PI / 2); c.stroke();
|
|
354
|
+
ln(sx + 60, 274, sx + 60, 334, 1.2);
|
|
355
|
+
rr_(sx - 40, 346, 80, 48, 4, 1.3, HIDDEN);
|
|
356
|
+
// the arm sits in front of the torso: knock out what it hides
|
|
357
|
+
c.save(); c.globalCompositeOperation = 'destination-out'; c.beginPath();
|
|
358
|
+
c.arc(sx, 266, 21.5, 0, 7); c.roundRect(sx - 14.5, 282, 29, 51, 7); c.arc(sx, 340, 12.5, 0, 7); c.roundRect(sx - 13.5, 349, 27, 49, 7); c.fill(); c.restore();
|
|
359
|
+
circ(sx, 266, 20, 2); circ(sx, 266, 6, 1.2);
|
|
360
|
+
rr_(sx - 13, 284, 26, 48, 6, 2); circ(sx, 340, 11, 1.8); rr_(sx - 12, 350, 24, 46, 6, 2);
|
|
361
|
+
c.beginPath(); lw(2); c.moveTo(sx + 10, 396); c.lineTo(sx + 26, 414); c.lineTo(sx + 18, 426); c.moveTo(sx - 6, 396); c.lineTo(sx + 2, 420); c.lineTo(sx + 12, 428); c.stroke();
|
|
362
|
+
c.beginPath(); lw(2.2); c.moveTo(sx - 48, 410); c.lineTo(sx - 70, 470); c.lineTo(sx + 70, 470); c.lineTo(sx + 48, 410); c.stroke();
|
|
363
|
+
rr_(sx - 82, 470, 164, 32, 6);
|
|
364
|
+
rr_(sx - 100, 502, 200, 58, 29);
|
|
365
|
+
[-66, 0, 66].forEach((o) => { circ(sx + o, 531, 22, 1.8); circ(sx + o, 531, 7, 1.2); ln(sx + o - 4, 531, sx + o + 4, 531, 0.8); ln(sx + o, 527, sx + o, 535, 0.8); });
|
|
366
|
+
dimH(sx - 100, sx + 100, GY, 592, '480');
|
|
367
|
+
dimV(244, 410, sx - 60, sx - 112, '410');
|
|
368
|
+
label('SIDE VIEW', sx, 626, '600 15px "IBM Plex Mono"');
|
|
369
|
+
ln(sx - 46, 636, sx + 46, 636, 1);
|
|
370
|
+
leader(sx + 60, 266, sx + 110, 228, 'SERVO JOINT ×4');
|
|
371
|
+
|
|
372
|
+
});
|
|
373
|
+
// ---------- SECTION A-A ----------
|
|
374
|
+
group(1.85, 2.7, 'x', 900, 0, 1230, H_, () => {
|
|
375
|
+
{
|
|
376
|
+
const qx = 1050, qy = 290, w = 248, h = 176, th = 12;
|
|
377
|
+
ln(qx - w / 2 - 30, qy, qx + w / 2 + 30, qy, 0.8, CENTER); ln(qx, qy - h / 2 - 30, qx, qy + h / 2 + 30, 0.8, CENTER);
|
|
378
|
+
// hatched shell
|
|
379
|
+
c.save();
|
|
380
|
+
c.beginPath(); c.roundRect(qx - w / 2, qy - h / 2, w, h, 26); c.roundRect(qx - w / 2 + th, qy - h / 2 + th, w - 2 * th, h - 2 * th, 16); c.clip('evenodd');
|
|
381
|
+
for (let o = -400; o < 400; o += 6) ln(qx + o, qy - 120, qx + o + 240, qy + 120, 0.9);
|
|
382
|
+
c.restore();
|
|
383
|
+
rr_(qx - w / 2, qy - h / 2, w, h, 26); rr_(qx - w / 2 + th, qy - h / 2 + th, w - 2 * th, h - 2 * th, 16, 1.6);
|
|
384
|
+
// power core: solid, cross-hatched
|
|
385
|
+
c.save(); c.beginPath(); c.arc(qx, qy, 44, 0, 7); c.arc(qx, qy, 18, 0, 7); c.clip('evenodd');
|
|
386
|
+
for (let o = -120; o < 120; o += 7) { ln(qx + o, qy - 60, qx + o + 120, qy + 60, 0.9); ln(qx + o, qy + 60, qx + o + 120, qy - 60, 0.9); }
|
|
387
|
+
c.restore();
|
|
388
|
+
circ(qx, qy, 44, 2); circ(qx, qy, 18, 1.6);
|
|
389
|
+
// bosses + cable bundle
|
|
390
|
+
[[-1, -1], [1, -1], [-1, 1], [1, 1]].forEach(([a, b]) => { circ(qx + a * (w / 2 - 30), qy + b * (h / 2 - 28), 8, 1.4); circ(qx + a * (w / 2 - 30), qy + b * (h / 2 - 28), 3, 1); });
|
|
391
|
+
[[70, -20], [80, -6], [72, 8], [86, 10]].forEach(([dx, dy]) => circ(qx + dx, qy + dy, 6, 1.2));
|
|
392
|
+
ln(qx + 44, qy, qx + 64, qy - 6, 1.2, HIDDEN);
|
|
393
|
+
dimH(qx - w / 2, qx + w / 2, qy + h / 2, qy + h / 2 + 34, '520');
|
|
394
|
+
dimV(qy - h / 2, qy + h / 2, qx + w / 2, qx + w / 2 + 34, '360');
|
|
395
|
+
leader(qx - 30, qy - 30, qx - 90, qy - 128, 'POWER CORE', 'right');
|
|
396
|
+
leader(qx - w / 2 + 6, qy + 30, qx - w / 2 - 10, qy + 120, 'SHELL t=12', 'right');
|
|
397
|
+
label('SECTION A-A', qx, qy + h / 2 + 76, '600 15px "IBM Plex Mono"');
|
|
398
|
+
ln(qx - 54, qy + h / 2 + 86, qx + 54, qy + h / 2 + 86, 1);
|
|
399
|
+
label('SCALE 1:5', qx, qy + h / 2 + 102, '400 12px "IBM Plex Mono"');
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
});
|
|
403
|
+
// ---------- notes ----------
|
|
404
|
+
group(3.35, 3.75, 'x', 50, 0, 420, H_, () => {
|
|
405
|
+
label('NOTES: 1. ALL DIMS IN MM 2. BREAK SHARP EDGES', 52, 668, '400 12px "IBM Plex Mono"', 'left');
|
|
406
|
+
|
|
407
|
+
});
|
|
408
|
+
// ---------- title block ----------
|
|
409
|
+
group(3.0, 3.6, 'x', 868, 0, W - 30, H_, () => {
|
|
410
|
+
{
|
|
411
|
+
const x0 = 868, y0 = 560, x1 = W - 30, y1 = H_ - 30;
|
|
412
|
+
lw(2.2); c.strokeRect(x0, y0, x1 - x0, y1 - y0);
|
|
413
|
+
ln(x0, y0 + 56, x1, y0 + 56, 1.2); ln(x0, y0 + 92, x1, y0 + 92, 1.2);
|
|
414
|
+
const cw = (x1 - x0) / 3;
|
|
415
|
+
ln(x0 + cw, y0 + 56, x0 + cw, y1, 1.2); ln(x0 + 2 * cw, y0 + 56, x0 + 2 * cw, y1, 1.2);
|
|
416
|
+
label('SERVICE ROBOT MK-II', x0 + 14, y0 + 24, '700 26px "Space Mono"', 'left');
|
|
417
|
+
label('GENERAL ARRANGEMENT', x0 + 14, y0 + 46, '400 12px "IBM Plex Mono"', 'left');
|
|
418
|
+
const cell = (i, row, k, v) => {
|
|
419
|
+
label(k, x0 + cw * i + 8, y0 + (row ? 102 : 66), '400 9px "IBM Plex Mono"', 'left');
|
|
420
|
+
label(v, x0 + cw * i + 8, y0 + (row ? 118 : 82), '600 15px "IBM Plex Mono"', 'left');
|
|
421
|
+
};
|
|
422
|
+
cell(0, 0, 'DWG NO.', 'SR-2042'); cell(1, 0, 'SCALE', '1:10'); cell(2, 0, 'SHEET', '1 OF 3');
|
|
423
|
+
cell(0, 1, 'DRAWN', 'J.K.'); cell(1, 1, 'DATE', '09.10.26'); cell(2, 1, 'REV', 'B');
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
});
|
|
427
|
+
// ---------- cyanotype line character: uneven exposure + bleed ----------
|
|
428
|
+
{
|
|
429
|
+
const id = lc.getImageData(0, 0, W, H_), d = id.data;
|
|
430
|
+
for (let i = 3, p = 0; i < d.length; i += 4, p++) {
|
|
431
|
+
if (!d[i]) continue;
|
|
432
|
+
const x = p % W, y = (p / W) | 0;
|
|
433
|
+
const k = 0.72 + 0.28 * (0.5 + 0.5 * nz.n2(x * 0.03, y * 0.03)) - (nz.n2(x * 0.5, y * 0.5) > 0.55 ? 0.3 : 0);
|
|
434
|
+
d[i] = d[i] * k;
|
|
435
|
+
}
|
|
436
|
+
lc.putImageData(id, 0, 0);
|
|
437
|
+
}
|
|
438
|
+
ctx.save(); ctx.filter = 'blur(2.5px)'; ctx.globalAlpha = 0.45; ctx.drawImage(LL, 0, 0); ctx.restore();
|
|
439
|
+
ctx.save(); ctx.filter = 'blur(0.6px)'; ctx.globalAlpha = 0.95; ctx.drawImage(LL, 0, 0); ctx.restore();
|
|
440
|
+
|
|
441
|
+
// fine grid (printed underneath conceptually, but faint so draw after)
|
|
442
|
+
ctx.save();
|
|
443
|
+
for (let x = 30; x < W - 30; x += 20) { ctx.fillStyle = (x - 30) % 100 === 0 ? 'rgba(200,220,255,0.10)' : 'rgba(200,220,255,0.045)'; ctx.fillRect(x, 30, 1, H_ - 60); }
|
|
444
|
+
for (let y = 30; y < H_ - 30; y += 20) { ctx.fillStyle = (y - 30) % 100 === 0 ? 'rgba(200,220,255,0.10)' : 'rgba(200,220,255,0.045)'; ctx.fillRect(30, y, W - 60, 1); }
|
|
445
|
+
ctx.restore();
|
|
446
|
+
|
|
447
|
+
// ---------- fold creases + wear ----------
|
|
448
|
+
{
|
|
449
|
+
const rr = H.rng(31);
|
|
450
|
+
const fold = (vertical, pos) => {
|
|
451
|
+
const g = vertical ? ctx.createLinearGradient(pos - 40, 0, pos + 40, 0) : ctx.createLinearGradient(0, pos - 34, 0, pos + 34);
|
|
452
|
+
g.addColorStop(0, 'rgba(0,10,30,0)'); g.addColorStop(0.48, 'rgba(0,10,30,0.22)'); g.addColorStop(0.5, 'rgba(190,210,240,0.22)'); g.addColorStop(0.56, 'rgba(190,210,240,0.06)'); g.addColorStop(1, 'rgba(190,210,240,0)');
|
|
453
|
+
ctx.fillStyle = g;
|
|
454
|
+
if (vertical) ctx.fillRect(pos - 40, 0, 80, H_); else ctx.fillRect(0, pos - 34, W, 68);
|
|
455
|
+
// abraded fibres along the crease
|
|
456
|
+
for (let i = 0; i < 700; i++) {
|
|
457
|
+
const a = rr.range(0, vertical ? H_ : W), o = rr.gauss() * 1.8;
|
|
458
|
+
ctx.fillStyle = `rgba(200,220,245,${rr.range(0.1, 0.45)})`;
|
|
459
|
+
const s = rr.range(0.6, 2.2);
|
|
460
|
+
if (vertical) ctx.fillRect(pos + o, a, s * 0.7, s); else ctx.fillRect(a, pos + o, s, s * 0.7);
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
fold(true, 427); fold(true, 853); fold(false, 362);
|
|
464
|
+
// crossing points wear most
|
|
465
|
+
[[427, 362], [853, 362]].forEach(([x, y]) => {
|
|
466
|
+
const g = ctx.createRadialGradient(x, y, 0, x, y, 26); g.addColorStop(0, 'rgba(200,220,245,0.28)'); g.addColorStop(1, 'rgba(200,220,245,0)');
|
|
467
|
+
ctx.fillStyle = g; ctx.fillRect(x - 26, y - 26, 52, 52);
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
// slow camera drift across the sheet, settling on the full drawing
|
|
471
|
+
{
|
|
472
|
+
const e = H.ease.inOut(T(0, 4.6)), k = 1 + 0.05 * (1 - e);
|
|
473
|
+
if (k > 1.0005) {
|
|
474
|
+
const cv = ctx.canvas, snap = H.layer(cv.width, cv.height);
|
|
475
|
+
snap.getContext('2d').drawImage(cv, 0, 0);
|
|
476
|
+
const fx0 = W * (0.3 + 0.2 * e), fy0 = H_ * (0.4 + 0.1 * e);
|
|
477
|
+
ctx.save(); ctx.translate(fx0, fy0); ctx.scale(k, k); ctx.translate(-fx0, -fy0); ctx.drawImage(snap, 0, 0, W, H_); ctx.restore();
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
H.grain(ctx, W, H_, 0.04, 6 + (Math.floor(t * 12) % 4));
|
|
481
|
+
H.vignette(ctx, W, H_, 0.3, '0,8,25');
|
|
482
|
+
},
|
|
483
|
+
// >>>EXPLAINER
|
|
484
|
+
explainerDuration: 15,
|
|
485
|
+
explainerNote: 'One large drafting sheet: a plotter head inks crisp white line-work and stencilled lettering while the camera tracks across and then down the sheet to the chart detail; the model is a gear-and-knob mechanism whose dials turn, arrows are drafted leaders, and numbers tick over in mono lettering inside dimension-style callouts.',
|
|
486
|
+
explainer(ctx, W, H_, t) {
|
|
487
|
+
const nz = H.makeNoise(88);
|
|
488
|
+
const seg = (pts, step = 3) => {
|
|
489
|
+
const out = [];
|
|
490
|
+
for (let i = 0; i < pts.length - 1; i++) {
|
|
491
|
+
const [x0, y0] = pts[i], [x1, y1] = pts[i + 1], n = Math.max(1, Math.ceil(Math.hypot(x1 - x0, y1 - y0) / step));
|
|
492
|
+
for (let j = 0; j < n; j++) out.push([x0 + (x1 - x0) * j / n, y0 + (y1 - y0) * j / n]);
|
|
493
|
+
}
|
|
494
|
+
out.push(pts[pts.length - 1]); return out;
|
|
495
|
+
};
|
|
496
|
+
const D = [2560, 1520];
|
|
497
|
+
const L = {
|
|
498
|
+
D, pT: 10.95, kT: 13.05, modelName: 'MODEL UNIT M-1',
|
|
499
|
+
bridge: { pts: [[2760, 1010], [2760, 1150], [2700, 1210], [2620, 1290]], a: 10.15, b: 10.6, label: 'REPEAT x1000', lx: 2960, ly: 1250 },
|
|
500
|
+
model: (cx, cy, adj, push, api, tt) => {
|
|
501
|
+
const g = 'M';
|
|
502
|
+
api.line([[cx - 165, cy - 150], [cx + 165, cy - 150], [cx + 165, cy + 175], [cx - 165, cy + 175], [cx - 165, cy - 150]], 'ink', 5, 2.5, 2.8, g);
|
|
503
|
+
api.line([[cx - 150, cy - 135], [cx + 150, cy - 135], [cx + 150, cy + 160], [cx - 150, cy + 160], [cx - 150, cy - 135]], 'ink', 2, 2.75, 2.95, g);
|
|
504
|
+
api.line([[cx - 55, cy - 150], [cx - 85, cy - 195], [cx + 85, cy - 195], [cx + 55, cy - 150]], 'ink', 4, 2.85, 2.98, g);
|
|
505
|
+
const gear = (x, y, r, n, rot) => { const o = []; for (let i = 0; i <= n * 4; i++) { const k = i % 4, b = Math.floor(i / 4) * (Math.PI * 2 / n) + rot; const a = b + [0, 0.1, 0.4, 0.5][k] * (Math.PI * 2 / n); const rr = k === 1 || k === 2 ? r : r * 0.82; o.push([x + Math.cos(a) * rr, y + Math.sin(a) * rr]); } return o; };
|
|
506
|
+
const spin = adj * 1.4;
|
|
507
|
+
const gears = [[cx - 60, cy - 40, 62, 12, spin], [cx + 58, cy - 62, 44, 9, -spin * 1.38 + 0.2]];
|
|
508
|
+
gears.forEach(([x, y, r, n, rot], i) => {
|
|
509
|
+
if (adj > 0) push({ k: 'line', pts: gear(x, y, r, n, rot), role: adj < 1 ? 'acc2' : 'ink', w: 3.5, a: -1, b: 0, inst: true, g });
|
|
510
|
+
else api.line(gear(x, y, r, n, rot), 'ink', 3.5, 2.95 + i * 0.12, 3.12 + i * 0.12, g);
|
|
511
|
+
api.line(XE.circ(x, y, r * 0.3, r * 0.3), 'ink', 2.5, 3.1 + i * 0.1, 3.16 + i * 0.1, g);
|
|
512
|
+
api.line([[x - r - 12, y], [x + r + 12, y]], 'cl', 1.2, 3.0, 3.1, g);
|
|
513
|
+
api.line([[x, y - r - 12], [x, y + r + 12]], 'cl', 1.2, 3.0, 3.1, g);
|
|
514
|
+
});
|
|
515
|
+
[-1, 0, 1].forEach((k, i) => {
|
|
516
|
+
const x = cx + k * 90, y = cy + 100;
|
|
517
|
+
api.line(XE.circ(x, y, 26, 26), 'ink', 3.5, 3.15 + i * 0.05, 3.25 + i * 0.05, g);
|
|
518
|
+
for (let m = 0; m < 7; m++) { const a = -Math.PI + m * Math.PI / 6; api.line([[x + Math.cos(a) * 30, y + Math.sin(a) * 30], [x + Math.cos(a) * 37, y + Math.sin(a) * 37]], 'ink', 1.5, 3.25 + i * 0.05, 3.27 + i * 0.05, g); }
|
|
519
|
+
if (tt > 3.25 + i * 0.05) {
|
|
520
|
+
const a0 = [-2.4, -0.6, -1.9][i], a1 = [-0.7, -2.2, -0.4][i], a = a0 + (a1 - a0) * adj + Math.sin(adj * Math.PI) * 0.3;
|
|
521
|
+
push({ k: 'line', pts: [[x, y], [x + Math.cos(a) * 22, y + Math.sin(a) * 22]], role: adj > 0 && adj < 1 ? 'acc2' : 'ink', w: 4, a: -1, b: 0, inst: true, g });
|
|
522
|
+
}
|
|
523
|
+
});
|
|
524
|
+
},
|
|
525
|
+
};
|
|
526
|
+
const items = XE.story(t, L);
|
|
527
|
+
const cam = XE.camAt([[0, 640, 360, 1.0], [2.0, 650, 362, 1.05], [2.8, 1830, 610, 0.95], [5.95, 1860, 620, 0.97], [6.55, 2580, 640, 0.9], [10.3, 2600, 660, 0.93],
|
|
528
|
+
[11.0, 2560, 1540, 0.92], [12.9, 2570, 1550, 0.95], [13.6, 2680, 1620, 0.84], [15, 2680, 1620, 0.85]], t);
|
|
529
|
+
const z = cam[2];
|
|
530
|
+
const apply = (c) => { c.translate(W / 2, H_ / 2); c.scale(z, z); c.translate(-cam[0], -cam[1]); };
|
|
531
|
+
const toS = ([x, y]) => [(x - cam[0]) * z + W / 2, (y - cam[1]) * z + H_ / 2];
|
|
532
|
+
const vx0 = cam[0] - W / 2 / z, vx1 = cam[0] + W / 2 / z, vy0 = cam[1] - H_ / 2 / z, vy1 = cam[1] + H_ / 2 / z;
|
|
533
|
+
|
|
534
|
+
// ---------- the sheet (mottled prussian blue, built once; 2 world px per texel so the mottle stays crisp) ----------
|
|
535
|
+
// world sheet: outer border 232..3418 x 42..2068; the paper's own edge sits a little outside it and darkens like the still's
|
|
536
|
+
const PX0 = 172, PY0 = -18, PX1 = 3478, PY1 = 2128;
|
|
537
|
+
if (!XC.sheet) {
|
|
538
|
+
const sw = 2000, sh = 1300, sl = H.layer(sw, sh), sc = sl.getContext('2d'), id = sc.createImageData(sw, sh), d = id.data, base = [22, 58, 112];
|
|
539
|
+
// the broad terms are smooth, so they are sampled on coarser grids and interpolated; only the fine mottle is per texel
|
|
540
|
+
const grid = (step, fn) => { const gw = Math.ceil(sw / step) + 2, gh = Math.ceil(sh / step) + 2, G = new Float32Array(gw * gh);
|
|
541
|
+
for (let j = 0; j < gh; j++) for (let i = 0; i < gw; i++) G[j * gw + i] = fn(i * step, j * step);
|
|
542
|
+
return (x, y) => { const fx = x / step, fy = y / step, i = fx | 0, j = fy | 0, u = fx - i, v = fy - j, o = j * gw + i;
|
|
543
|
+
return (G[o] * (1 - u) + G[o + 1] * u) * (1 - v) + (G[o + gw] * (1 - u) + G[o + gw + 1] * u) * v; }; };
|
|
544
|
+
const gA = grid(2, (x, y) => nz.fbm2(x * 0.006, y * 0.006, 4) * 0.24), gB = grid(4, (x, y) => Math.max(0, nz.fbm2(x * 0.003 + 40, y * 0.003, 3) - 0.15) * 0.55);
|
|
545
|
+
// fine mottle: cheap 2-octave value noise per texel
|
|
546
|
+
const VN = 256, vl = new Float32Array(VN * VN), vr = H.rng(881); for (let i = 0; i < vl.length; i++) vl[i] = vr() * 2 - 1;
|
|
547
|
+
const vn = (x, y) => { const ix = Math.floor(x), iy = Math.floor(y), u = x - ix, v = y - iy, su = u * u * (3 - 2 * u), sv = v * v * (3 - 2 * v);
|
|
548
|
+
const x0 = ix & 255, x1 = (ix + 1) & 255, y0 = (iy & 255) * VN, y1 = ((iy + 1) & 255) * VN;
|
|
549
|
+
const a = vl[y0 + x0], b = vl[y0 + x1], c2 = vl[y1 + x0], e = vl[y1 + x1]; return (a + (b - a) * su) * (1 - sv) + (c2 + (e - c2) * su) * sv; };
|
|
550
|
+
for (let y = 0; y < sh; y++) for (let x = 0; x < sw; x++) {
|
|
551
|
+
const m = gA(x, y) + (vn(x * 0.06 + 10, y * 0.06) * 0.65 + vn(x * 0.14, y * 0.14 + 7) * 0.35) * 0.07 + gB(x, y);
|
|
552
|
+
const fade = Math.max(0, 1 - Math.hypot(x - 240, y - 160) / 1400) * 0.16;
|
|
553
|
+
const wx = x * 2 - 300, wy = y * 2 - 300, dE = Math.min(wx - PX0, PX1 - wx, wy - PY0, PY1 - wy);
|
|
554
|
+
const edge = (1 - H.smooth(0, 230, dE)) * 0.3;
|
|
555
|
+
const k = 1 + m + fade - edge, i = (y * sw + x) * 4;
|
|
556
|
+
d[i] = base[0] * k + fade * 40; d[i + 1] = base[1] * k + fade * 30; d[i + 2] = base[2] * k + fade * 25; d[i + 3] = 255;
|
|
557
|
+
}
|
|
558
|
+
sc.putImageData(id, 0, 0); XC.sheet = sl;
|
|
559
|
+
// speckle flaws (the still's light/dark flecks), as a 1024px tile anchored to the paper
|
|
560
|
+
const TS = 1024, tl = H.layer(TS, TS), tc = tl.getContext('2d'), rr = H.rng(4);
|
|
561
|
+
for (let i = 0; i < 1900; i++) {
|
|
562
|
+
tc.fillStyle = rr.chance(0.7) ? `rgba(160,190,230,${rr.range(0.05, 0.25)})` : `rgba(5,20,50,${rr.range(0.1, 0.3)})`;
|
|
563
|
+
tc.fillRect(rr.range(0, TS - 2), rr.range(0, TS - 2), rr.range(0.6, 1.8), rr.range(0.6, 1.8));
|
|
564
|
+
}
|
|
565
|
+
XC.speck = tl;
|
|
566
|
+
// abraded fibres along the fold creases (the still's fold() scatter), pre-rendered as strips
|
|
567
|
+
const fr = H.rng(31), fib = (vert) => {
|
|
568
|
+
const len = vert ? 2600 : 4000, st = vert ? H.layer(24, len) : H.layer(len, 24), fc = st.getContext('2d');
|
|
569
|
+
for (let i = 0; i < 2300; i++) {
|
|
570
|
+
const a = fr.range(0, len), o = 12 + fr.gauss() * 1.8, sz = fr.range(0.6, 2.2);
|
|
571
|
+
fc.fillStyle = `rgba(200,220,245,${fr.range(0.1, 0.45)})`;
|
|
572
|
+
if (vert) fc.fillRect(o, a, sz * 0.7, sz); else fc.fillRect(a, o, sz, sz * 0.7);
|
|
573
|
+
}
|
|
574
|
+
return st;
|
|
575
|
+
};
|
|
576
|
+
XC.fibV = [fib(true), fib(true)]; XC.fibH = fib(false);
|
|
577
|
+
}
|
|
578
|
+
ctx.save(); apply(ctx);
|
|
579
|
+
ctx.imageSmoothingEnabled = true; ctx.drawImage(XC.sheet, -300, -300, 4000, 2600);
|
|
580
|
+
ctx.fillStyle = ctx.createPattern(XC.speck, 'repeat'); ctx.fillRect(vx0 - 4, vy0 - 4, vx1 - vx0 + 8, vy1 - vy0 + 8);
|
|
581
|
+
for (let x = Math.floor(vx0 / 40) * 40; x < vx1; x += 40) { ctx.fillStyle = x % 200 === 0 ? 'rgba(200,220,255,0.10)' : 'rgba(200,220,255,0.045)'; ctx.fillRect(x, vy0, 1 / z, vy1 - vy0); }
|
|
582
|
+
for (let y = Math.floor(vy0 / 40) * 40; y < vy1; y += 40) { ctx.fillStyle = y % 200 === 0 ? 'rgba(200,220,255,0.10)' : 'rgba(200,220,255,0.045)'; ctx.fillRect(vx0, y, vx1 - vx0, 1 / z); }
|
|
583
|
+
ctx.restore();
|
|
584
|
+
|
|
585
|
+
// ---------- line work ----------
|
|
586
|
+
const LL = H.layer(W, H_), c = LL.getContext('2d');
|
|
587
|
+
c.save(); apply(c);
|
|
588
|
+
c.strokeStyle = '#eef4ff'; c.fillStyle = '#eef4ff'; c.lineCap = 'round'; c.lineJoin = 'round';
|
|
589
|
+
// sheet border, zone ticks and title block
|
|
590
|
+
c.lineWidth = 4; c.strokeRect(250, 60, 3150, 1990); c.lineWidth = 1.5; c.strokeRect(232, 42, 3186, 2026);
|
|
591
|
+
for (let x = 250; x <= 3400; x += 525) { c.beginPath(); c.moveTo(x, 42); c.lineTo(x, 60); c.moveTo(x, 2050); c.lineTo(x, 2068); c.stroke(); }
|
|
592
|
+
c.lineWidth = 3; c.strokeRect(3030, 1880, 370, 170); c.lineWidth = 1.5;
|
|
593
|
+
c.beginPath(); c.moveTo(3030, 1945); c.lineTo(3400, 1945); c.moveTo(3150, 1945); c.lineTo(3150, 2050); c.moveTo(3275, 1945); c.lineTo(3275, 2050); c.stroke();
|
|
594
|
+
c.font = '700 32px "Space Mono"'; c.fillText('HOW AI LEARNS', 3045, 1925);
|
|
595
|
+
c.font = '400 16px "IBM Plex Mono"'; c.fillText('DWG NO.', 3042, 1968); c.fillText('SCALE', 3162, 1968); c.fillText('SHEET', 3287, 1968);
|
|
596
|
+
c.font = '600 24px "IBM Plex Mono"'; c.fillText('ML-0001', 3042, 2015); c.fillText('NTS', 3162, 2015); c.fillText('1/1', 3287, 2015);
|
|
597
|
+
const font = (it) => (it.font === 'label' ? `600 ${it.size * 0.86}px "IBM Plex Mono"` : `700 ${it.size * (it.font === 'num' ? 0.95 : 0.9)}px "Space Mono"`);
|
|
598
|
+
const measure = (it, p) => {
|
|
599
|
+
c.save(); c.font = font(it); const s = it.s.toUpperCase(), w = c.measureText(s).width, x0 = it.align === 'center' ? it.x - w / 2 : it.x;
|
|
600
|
+
const w2 = c.measureText(s.slice(0, Math.ceil(s.length * p))).width; c.restore(); return [x0 + w2, it.y - it.size * 0.3];
|
|
601
|
+
};
|
|
602
|
+
for (const it of items) {
|
|
603
|
+
const p = it.inst ? 1 : XE.win(t, it.a, it.b);
|
|
604
|
+
if (p <= 0) continue;
|
|
605
|
+
const alpha = it.role === 'acc2' ? 1 : it.role === 'cl' ? 0.7 : 0.95;
|
|
606
|
+
c.globalAlpha = alpha;
|
|
607
|
+
if (it.k === 'line') {
|
|
608
|
+
let P = seg(it.pts, 3); if (p < 1) P = P.slice(0, Math.max(2, Math.ceil(P.length * p)));
|
|
609
|
+
c.lineWidth = it.role === 'acc2' ? it.w * 0.75 : Math.max(1.8, it.w * 0.55);
|
|
610
|
+
c.setLineDash(it.role === 'cl' ? [22, 5, 4, 5] : it.role === 'acc2' && it.w <= 6 && it.pts.length > 30 ? [16, 7] : []);
|
|
611
|
+
c.beginPath(); P.forEach(([x, y], i) => (i ? c.lineTo(x, y) : c.moveTo(x, y))); c.stroke(); c.setLineDash([]);
|
|
612
|
+
// drafted arrows: fill arrowheads
|
|
613
|
+
if (it.pts.length === 3 && it.w >= 4 && p >= 1 && Math.hypot(it.pts[0][0] - it.pts[2][0], it.pts[0][1] - it.pts[2][1]) < 40) { c.beginPath(); c.moveTo(...it.pts[0]); c.lineTo(...it.pts[1]); c.lineTo(...it.pts[2]); c.closePath(); c.fill(); }
|
|
614
|
+
} else if (it.k === 'dot') {
|
|
615
|
+
c.beginPath(); c.arc(it.x, it.y, it.r * 0.8, 0, 7); c.fill();
|
|
616
|
+
} else {
|
|
617
|
+
c.save(); c.font = font(it); const s = it.s.toUpperCase(), w = c.measureText(s).width;
|
|
618
|
+
c.translate(it.align === 'center' ? it.x - w / 2 : it.x, it.y); c.rotate(it.rot * 0.3);
|
|
619
|
+
c.fillText(s.slice(0, Math.ceil(s.length * p)), 0, 0);
|
|
620
|
+
if (it.live) { c.globalAlpha = 0.6; c.lineWidth = 1.5; c.strokeRect(-14, -it.size * 0.8, w + 28, it.size * 1.0); } // counter callout box
|
|
621
|
+
c.restore();
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
c.globalAlpha = 1; c.restore();
|
|
625
|
+
// uneven exposure: knock a little out of the lines (anchored to the sheet)
|
|
626
|
+
{
|
|
627
|
+
const id = c.getImageData(0, 0, W, H_), d = id.data, iz = 1 / z;
|
|
628
|
+
for (let i = 3, q = 0; i < d.length; i += 4, q++) {
|
|
629
|
+
if (!d[i]) continue;
|
|
630
|
+
const x = q % W, y = (q / W) | 0, wx = (x - W / 2) * iz + cam[0], wy = (y - H_ / 2) * iz + cam[1];
|
|
631
|
+
// + the still's pinhole dropouts (unexposed specks in the white line), hashed on 2px world cells
|
|
632
|
+
const hx = (wx * 0.5) | 0, hy = (wy * 0.5) | 0, hh = Math.imul(hx * 73856093 ^ hy * 19349663, 0x9E3779B1) >>> 0;
|
|
633
|
+
d[i] *= 0.74 + 0.26 * (0.5 + 0.5 * nz.n2(wx * 0.03, wy * 0.03)) - ((hh & 1023) < 70 ? 0.3 : 0);
|
|
634
|
+
}
|
|
635
|
+
c.putImageData(id, 0, 0);
|
|
636
|
+
}
|
|
637
|
+
ctx.save(); ctx.filter = 'blur(2.5px)'; ctx.globalAlpha = 0.45; ctx.drawImage(LL, 0, 0); ctx.restore();
|
|
638
|
+
ctx.save(); ctx.filter = 'blur(0.5px)'; ctx.drawImage(LL, 0, 0); ctx.restore();
|
|
639
|
+
|
|
640
|
+
// fold creases (on the sheet)
|
|
641
|
+
ctx.save(); apply(ctx);
|
|
642
|
+
[[1480, true], [2760, true], [1180, false]].forEach(([pos, vert]) => {
|
|
643
|
+
const g = vert ? ctx.createLinearGradient(pos - 40, 0, pos + 40, 0) : ctx.createLinearGradient(0, pos - 34, 0, pos + 34);
|
|
644
|
+
g.addColorStop(0, 'rgba(0,10,30,0)'); g.addColorStop(0.48, 'rgba(0,10,30,0.22)'); g.addColorStop(0.5, 'rgba(190,210,240,0.22)'); g.addColorStop(0.56, 'rgba(190,210,240,0.06)'); g.addColorStop(1, 'rgba(190,210,240,0)');
|
|
645
|
+
ctx.fillStyle = g; if (vert) ctx.fillRect(pos - 40, vy0, 80, vy1 - vy0); else ctx.fillRect(vx0, pos - 34, vx1 - vx0, 68);
|
|
646
|
+
});
|
|
647
|
+
// abraded fibres along each crease, and the extra wear where the creases cross
|
|
648
|
+
if (vx0 < 1500 && vx1 > 1460) ctx.drawImage(XC.fibV[0], 1480 - 12, -300);
|
|
649
|
+
if (vx0 < 2780 && vx1 > 2740) ctx.drawImage(XC.fibV[1], 2760 - 12, -300);
|
|
650
|
+
if (vy0 < 1200 && vy1 > 1160) ctx.drawImage(XC.fibH, -300, 1180 - 12);
|
|
651
|
+
[[1480, 1180], [2760, 1180]].forEach(([x, y]) => {
|
|
652
|
+
if (x + 70 < vx0 || x - 70 > vx1 || y + 70 < vy0 || y - 70 > vy1) return;
|
|
653
|
+
const g = ctx.createRadialGradient(x, y, 0, x, y, 64); g.addColorStop(0, 'rgba(200,220,245,0.28)'); g.addColorStop(1, 'rgba(200,220,245,0)');
|
|
654
|
+
ctx.fillStyle = g; ctx.fillRect(x - 64, y - 64, 128, 128);
|
|
655
|
+
});
|
|
656
|
+
ctx.restore();
|
|
657
|
+
|
|
658
|
+
// plotter head over the current stroke
|
|
659
|
+
const tp = XE.tipOf(items, t, measure);
|
|
660
|
+
if (tp) {
|
|
661
|
+
const [x, y] = toS(tp);
|
|
662
|
+
const gl = ctx.createRadialGradient(x, y, 0, x, y, 26); gl.addColorStop(0, 'rgba(230,245,255,0.8)'); gl.addColorStop(1, 'rgba(230,245,255,0)');
|
|
663
|
+
ctx.fillStyle = gl; ctx.fillRect(x - 26, y - 26, 52, 52);
|
|
664
|
+
ctx.strokeStyle = 'rgba(240,248,255,0.9)'; ctx.lineWidth = 1.2;
|
|
665
|
+
ctx.beginPath(); ctx.arc(x, y, 9, 0, 7); ctx.moveTo(x - 18, y); ctx.lineTo(x - 5, y); ctx.moveTo(x + 5, y); ctx.lineTo(x + 18, y); ctx.moveTo(x, y - 18); ctx.lineTo(x, y - 5); ctx.moveTo(x, y + 5); ctx.lineTo(x, y + 18); ctx.stroke();
|
|
666
|
+
ctx.setLineDash([3, 4]); ctx.globalAlpha = 0.35; ctx.beginPath(); ctx.moveTo(x, 0); ctx.lineTo(x, H_); ctx.moveTo(0, y); ctx.lineTo(W, y); ctx.stroke(); ctx.setLineDash([]); ctx.globalAlpha = 1;
|
|
667
|
+
}
|
|
668
|
+
H.grain(ctx, W, H_, 0.04, 6 + (Math.floor(t * 12) % 4));
|
|
669
|
+
H.vignette(ctx, W, H_, 0.3, '0,8,25');
|
|
670
|
+
},
|
|
671
|
+
// <<<EXPLAINER
|
|
672
|
+
// Sound: a pen plotter drafting on a big sheet in a quiet drawing office. Each line is a plot move: the pen solenoid
|
|
673
|
+
// drops (a dull "tuk"), the stepper motors sing a low square-ish whine whose pitch changes from move to move while the
|
|
674
|
+
// technical pen drags faintly, then the pen lifts. Stencil lettering is quick pen-down ticks with tiny motor blips per
|
|
675
|
+
// character. The drafted "REPEAT x1000" leader is a long carriage run that carries the camera down the sheet; the head
|
|
676
|
+
// parks when the drawing is done. Times mirror explainer()/XE.story (pT 10.95, kT 13.05, bridge 10.15-10.6, model
|
|
677
|
+
// timings from explainer()).
|
|
678
|
+
explainerSound(k) {
|
|
679
|
+
const pT = 10.95, kT = 13.05, LV = 0.5; // LV: drawing sits well under the hits
|
|
680
|
+
const rnd = (i) => { const x = Math.sin(i * 12.9898 + 78.233) * 43758.5453; return x - Math.floor(x); };
|
|
681
|
+
// first time XE.eio(win(t, t0, t1)) reaches u (the gears' and dials' eased turn)
|
|
682
|
+
const when = (t0, t1, u) => { for (let i = 0; i <= 400; i++) if (XE.eio(i / 400) >= u - 1e-6) return t0 + (t1 - t0) * i / 400; return t1; };
|
|
683
|
+
const penDown = (t, g = 1, pan = 0, minor = true) => {
|
|
684
|
+
k.noise(t, { dur: 0.02, filter: 'bandpass', f: 1300, q: 1.5, gain: 0.25 * g, a: 0.001, pan, minor });
|
|
685
|
+
k.tone(t, { f: [[0, 180], [0.03, 110]], dur: 0.045, gain: 0.1 * g, pan, minor });
|
|
686
|
+
};
|
|
687
|
+
const penUp = (t, g = 1, pan = 0) => k.noise(t, { dur: 0.012, filter: 'bandpass', f: 1900, q: 2, gain: 0.12 * g, a: 0.001, pan, minor: true });
|
|
688
|
+
// the steppers during a move: a square whine (lowpassed) plus a sub an octave down; f = steps per second
|
|
689
|
+
const motor = (t, d, f, g = 1, pan = 0, minor = true) => {
|
|
690
|
+
k.tone(t, { f, type: 'square', dur: d, gain: 0.03 * g, a: 0.012, hold: d * 0.75, filter: 'lowpass', f2: 950, q: 0.7, pan, minor });
|
|
691
|
+
k.tone(t, { f: f / 2, type: 'triangle', dur: d, gain: 0.05 * g, a: 0.012, hold: d * 0.75, pan, minor });
|
|
692
|
+
};
|
|
693
|
+
// one drafted line from a to b: pen down, move, pen up. The pitch is per-move (seeded from its start time).
|
|
694
|
+
const plot = (a, b, g = 1, pan = 0, minor = true, f = 0) => {
|
|
695
|
+
const d = Math.max(0.03, b - a); g *= LV;
|
|
696
|
+
f = f || 200 + Math.round(rnd(a * 100) * 6) * 25;
|
|
697
|
+
penDown(a, g, pan, minor);
|
|
698
|
+
motor(a + 0.01, d, f, g, pan, minor);
|
|
699
|
+
k.noise(a, { dur: d, filter: 'bandpass', f: 2800, q: 0.9, gain: 0.03 * g, a: 0.02, hold: d * 0.7, pan, minor }); // pen drag
|
|
700
|
+
penUp(b, g, pan);
|
|
701
|
+
};
|
|
702
|
+
// stencil lettering: per character a pen tick and a short motor blip (spaces are pen-up travel);
|
|
703
|
+
// long fast lines tick on every 2nd/3rd character so it stays under ~20 ticks a second
|
|
704
|
+
const letter = (s, a, b, g = 0.9, pan = 0) => {
|
|
705
|
+
g *= LV; const n = s.length, step = (b - a) / n, stride = Math.max(1, Math.ceil(n / (b - a) / 20));
|
|
706
|
+
for (let i = 0; i < n; i++) {
|
|
707
|
+
if (s[i] === ' ' || i % stride) continue;
|
|
708
|
+
const t = a + step * i, c = s.charCodeAt(i);
|
|
709
|
+
k.noise(t, { dur: 0.012, filter: 'bandpass', f: 1500, q: 1.6, gain: 0.2 * g, a: 0.001, pan, minor: true });
|
|
710
|
+
motor(t + 0.005, Math.min(0.06, step * stride * 0.75), 220 + (c % 5) * 30, 0.8 * g, pan, true);
|
|
711
|
+
}
|
|
712
|
+
};
|
|
713
|
+
|
|
714
|
+
k.bed('room', 0, 15, { gain: 0.35 });
|
|
715
|
+
k.bed('hum', 0, 15, { gain: 0.25 }); // the plotter powered up, idling
|
|
716
|
+
|
|
717
|
+
// 1 HOOK
|
|
718
|
+
letter('HOW DOES AI LEARN?', 0.15, 1.3, 1.0);
|
|
719
|
+
plot(1.3, 1.55, 1.3, 0, false, 300); // underline: one long straight move
|
|
720
|
+
|
|
721
|
+
// 2 DATA: the gear-and-dial unit, then six cards
|
|
722
|
+
plot(2.5, 2.8, 1.1, 0.1, false, 250); // outer frame: first mark in the new scene
|
|
723
|
+
plot(2.8, 2.95, 0.7, 0.1); // inner frame
|
|
724
|
+
plot(2.95, 3.19, 0.8, 0.1, true, 175); // the two gears, tooth by tooth (lower, slower stepping)
|
|
725
|
+
for (let i = 0; i < 6; i++) { const a = 3.0 + i * 0.17; plot(a + 0.02, a + (i < 5 ? 0.15 : 0.21), 0.8, (i % 3 - 1) * 0.15); }
|
|
726
|
+
for (let j = 0; j < 4; j++) penDown(3.0 + j * 0.025, 0.35 * LV, 0.15); // centre-line dashes
|
|
727
|
+
plot(4.15, 4.45, 1.0, 0, true, 275); plot(4.46, 4.55, 0.8); // flow leader + arrowhead
|
|
728
|
+
letter('EXAMPLES', 4.55, 4.8, 0.6);
|
|
729
|
+
// counter digits roll over in the callout (12 fps grid): a small relay click each change
|
|
730
|
+
for (let f = 55; f < 63; f++) { k.play('count', f / 12, { gain: 1.4, f: 2000 + (f - 55) * 100, minor: true }); k.tone(f / 12, { f: 140, dur: 0.03, gain: 0.04, minor: true }); }
|
|
731
|
+
k.play('tock', 63 / 12, { f: 480, gain: 0.45 }); // 1,000,000 lands
|
|
732
|
+
|
|
733
|
+
// 3 GUESS -> CHECK -> ADJUST
|
|
734
|
+
plot(6.4, 6.55, 0.9, 0, true, 250); // frame of the new photo
|
|
735
|
+
plot(6.55, 6.7, 0.8); penDown(6.7, 0.5 * LV); // cat + eyes
|
|
736
|
+
letter('NEW!', 6.65, 6.8, 0.6, 0.2);
|
|
737
|
+
plot(6.8, 6.95, 0.9, 0, true, 225); plot(6.96, 7.02, 0.7); // leader down into the unit + head
|
|
738
|
+
plot(7.02, 7.15, 0.9, 0, true, 275); // guess leader out
|
|
739
|
+
letter('GUESS', 7.15, 7.4, 0.6);
|
|
740
|
+
plot(7.3, 7.55, 0.85, 0, true, 200); // speech bubble + tail
|
|
741
|
+
letter('DOG?', 7.52, 7.75, 1.0);
|
|
742
|
+
letter('CHECK', 7.85, 8.0, 0.6);
|
|
743
|
+
// the wrong guess: two hard cross strokes (pen slams down) + a low "nope"
|
|
744
|
+
plot(8.0, 8.08, 2.0, 0.1, false, 350); plot(8.08, 8.16, 2.0, 0.1, false, 350);
|
|
745
|
+
k.play('error', 8.0, { f: 'F3', gain: 0.55 });
|
|
746
|
+
plot(8.16, 8.45, 1.0, 0, true, 225); // dashed ring
|
|
747
|
+
plot(8.45, 8.8, 1.0, -0.1, true, 200); // long dashed leader back to the unit
|
|
748
|
+
letter('ADJUST', 8.8, 9.05, 0.6, -0.1);
|
|
749
|
+
// gears and dials turn (eio 8.95..9.5, gear 1.4 rad): a soft detent click every 0.2 rad, slowing as they settle
|
|
750
|
+
for (let j = 1; j <= 7; j++) k.play('tock', when(8.95, 9.5, j / 7), { f: 900, gain: 0.3, pan: -0.15, minor: true });
|
|
751
|
+
plot(9.5, 9.62, 1.0, 0, true, 300); // strike through "DOG?"
|
|
752
|
+
letter('CAT', 9.62, 9.85, 1.0);
|
|
753
|
+
plot(9.85, 10.05, 1.15, 0, false, 250); // check mark
|
|
754
|
+
k.play('success', 9.98, { f: 'A5', gain: 0.6 });
|
|
755
|
+
|
|
756
|
+
// bridge: the "REPEAT x1000" leader, a long carriage run while the camera tracks down the sheet
|
|
757
|
+
penDown(10.15, 1.3 * LV, 0.2, false);
|
|
758
|
+
k.tone(10.16, { f: [[0, 180], [0.2, 320], [0.45, 240]], type: 'square', dur: 0.45, gain: 0.03 * LV * 1.4, a: 0.02, hold: 0.36, filter: 'lowpass', f2: 950, q: 0.7, pan: 0.2 });
|
|
759
|
+
k.tone(10.16, { f: [[0, 90], [0.2, 160], [0.45, 120]], type: 'triangle', dur: 0.45, gain: 0.05 * LV * 1.4, a: 0.02, hold: 0.36, pan: 0.2 });
|
|
760
|
+
k.noise(10.15, { dur: 0.45, filter: 'bandpass', f: 2800, q: 0.9, gain: 0.03 * LV * 1.4, a: 0.02, hold: 0.3, pan: 0.2, minor: true });
|
|
761
|
+
plot(10.6, 10.66, 0.8, 0.25);
|
|
762
|
+
letter('REPEAT X1000', 10.66, 10.9, 0.7, 0.3);
|
|
763
|
+
|
|
764
|
+
// 4 PROGRESS
|
|
765
|
+
plot(pT, pT + 0.3, 1.0, 0, false, 250); // axes
|
|
766
|
+
letter('TRAINING ROUNDS', pT + 0.3, pT + 0.55, 0.5);
|
|
767
|
+
letter('ACCURACY', pT + 0.45, pT + 0.7, 0.5, 0.3);
|
|
768
|
+
plot(pT + 0.7, pT + 1.7, 0.45, 0, true, 175); // the rising curve: one long slow move
|
|
769
|
+
{ // % counter: a relay click whenever the shown number changes (12 fps grid), slowing as it settles.
|
|
770
|
+
// The digits don't change colour, so the hit lands on the frame 97% first shows.
|
|
771
|
+
let last = -1;
|
|
772
|
+
for (let f = Math.ceil((pT + 0.6) * 12); f < 160; f++) {
|
|
773
|
+
const u = Math.min(1, (f / 12 - (pT + 0.6)) / 1.1), v = Math.round(61 + 36 * (1 - Math.pow(1 - u, 2.2)));
|
|
774
|
+
if (v === 97) { // 97% lands: the biggest hit
|
|
775
|
+
k.play('impact', f / 12, { gain: 1.0, pan: 0.2 });
|
|
776
|
+
k.play('ding', f / 12 + 0.01, { f: 'C6', gain: 0.42, pan: 0.2 });
|
|
777
|
+
break;
|
|
778
|
+
}
|
|
779
|
+
if (v !== last) { k.play('tick', f / 12, { gain: 1.2, f: 2200 + (v - 61) * 20, pan: 0.25, minor: true }); last = v; }
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
plot(pT + 1.75, pT + 2.05, 1.2, 0.25, false, 225); // dashed ring round the 97%
|
|
783
|
+
|
|
784
|
+
// 5 TAKEAWAY
|
|
785
|
+
letter('MORE EXAMPLES → BETTER GUESSES', kT, kT + 0.75, 0.85);
|
|
786
|
+
k.play('success', kT + 0.75, { f: 'G5', gain: 0.7 }); // resolving landing
|
|
787
|
+
plot(kT + 0.75, kT + 0.95, 1.15, 0, false, 300);
|
|
788
|
+
// the head parks: one last quick run, then the motors settle
|
|
789
|
+
k.tone(kT + 1.05, { f: [[0, 300], [0.25, 180]], type: 'square', dur: 0.3, gain: 0.025 * LV, a: 0.02, hold: 0.2, filter: 'lowpass', f2: 900, minor: true });
|
|
790
|
+
k.play('tock', kT + 1.37, { f: 300, gain: 0.35, minor: true });
|
|
791
|
+
},
|
|
792
|
+
});
|
|
793
|
+
}
|