@amg555/frameforge-mcp 2.7.3 → 2.7.7
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/.claude-plugin/marketplace.json +3 -3
- package/AGENTS.md +33 -0
- package/CHANGELOG.md +49 -0
- package/CLAUDE.md +17 -6
- package/GEMINI.md +63 -0
- package/README.md +216 -426
- package/START_HERE.md +4 -2
- package/package.json +5 -3
- package/plugins/ai-video-editor/README.md +32 -0
- package/plugins/ai-video-editor/SKILL.md +152 -0
- package/plugins/ai-video-editor/assets/fonts/fonts.css +2409 -0
- package/plugins/ai-video-editor/assets/fonts/ttf/anton-400.ttf +0 -0
- package/plugins/ai-video-editor/assets/fonts/ttf/archivo-800.ttf +0 -0
- package/plugins/ai-video-editor/assets/fonts/ttf/cabin-sketch-700.ttf +0 -0
- package/plugins/ai-video-editor/assets/fonts/ttf/dm-sans-700.ttf +0 -0
- package/plugins/ai-video-editor/assets/fonts/ttf/fraunces-600.ttf +0 -0
- package/plugins/ai-video-editor/assets/fonts/ttf/fraunces-700.ttf +0 -0
- package/plugins/ai-video-editor/assets/fonts/ttf/fredoka-700.ttf +0 -0
- package/plugins/ai-video-editor/assets/fonts/ttf/inter-700.ttf +0 -0
- package/plugins/ai-video-editor/assets/fonts/ttf/inter-800.ttf +0 -0
- package/plugins/ai-video-editor/assets/fonts/ttf/inter-tight-800.ttf +0 -0
- package/plugins/ai-video-editor/assets/fonts/ttf/kalam-700.ttf +0 -0
- package/plugins/ai-video-editor/assets/fonts/ttf/noto-sans-devanagari-700.ttf +0 -0
- package/plugins/ai-video-editor/assets/fonts/web/noto-sans-devanagari-devanagari-400-normal.woff2 +0 -0
- package/plugins/ai-video-editor/assets/fonts/web/noto-sans-devanagari-devanagari-500-normal.woff2 +0 -0
- package/plugins/ai-video-editor/assets/fonts/web/noto-sans-devanagari-devanagari-600-normal.woff2 +0 -0
- package/plugins/ai-video-editor/assets/fonts/web/noto-sans-devanagari-devanagari-700-normal.woff2 +0 -0
- package/plugins/ai-video-editor/assets/fonts/web/noto-sans-devanagari-devanagari-800-normal.woff2 +0 -0
- package/plugins/ai-video-editor/engine/hidpi.js +117 -0
- package/plugins/ai-video-editor/engine/page.html +43 -0
- package/plugins/ai-video-editor/engine/player.js +145 -0
- package/plugins/ai-video-editor/references/example-story-warm-canvas.js +95 -0
- package/plugins/ai-video-editor/references/story-guide.md +112 -0
- package/plugins/ai-video-editor/requirements.txt +4 -0
- package/plugins/ai-video-editor/styles/chalk-talk/base.js +490 -0
- package/plugins/ai-video-editor/styles/chalk-talk/style.json +14 -0
- package/plugins/ai-video-editor/styles/chalk-talk/style.md +41 -0
- package/plugins/ai-video-editor/styles/clean-tech/base.js +447 -0
- package/plugins/ai-video-editor/styles/clean-tech/style.json +15 -0
- package/plugins/ai-video-editor/styles/clean-tech/style.md +38 -0
- package/plugins/ai-video-editor/styles/creator-motion-graphics/base.js +698 -0
- package/plugins/ai-video-editor/styles/creator-motion-graphics/style.json +16 -0
- package/plugins/ai-video-editor/styles/creator-motion-graphics/style.md +39 -0
- package/plugins/ai-video-editor/styles/data-story/base.js +432 -0
- package/plugins/ai-video-editor/styles/data-story/style.json +14 -0
- package/plugins/ai-video-editor/styles/data-story/style.md +38 -0
- package/plugins/ai-video-editor/styles/index.json +103 -0
- package/plugins/ai-video-editor/styles/pop-info/base.js +570 -0
- package/plugins/ai-video-editor/styles/pop-info/style.json +13 -0
- package/plugins/ai-video-editor/styles/pop-info/style.md +37 -0
- package/plugins/ai-video-editor/styles/software-walkthrough/base.js +544 -0
- package/plugins/ai-video-editor/styles/software-walkthrough/style.json +15 -0
- package/plugins/ai-video-editor/styles/software-walkthrough/style.md +38 -0
- package/plugins/ai-video-editor/styles/warm-canvas/base.js +610 -0
- package/plugins/ai-video-editor/styles/warm-canvas/style.json +14 -0
- package/plugins/ai-video-editor/styles/warm-canvas/style.md +37 -0
- package/plugins/aiinsight-shorts/CHANGELOG.md +6 -0
- package/plugins/aiinsight-shorts/README.md +43 -0
- package/plugins/aiinsight-shorts/SKILL.md +138 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/STYLE.md +58 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/data/cues.json +140 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/data/lines.json +67 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/data/words.json +614 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/data/words.txt +102 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/fonts/Inter-Black.otf +0 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/fonts/Inter-ExtraBold.otf +0 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/index.html +17 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/script.json +27 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/sheet.html +11 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/src/core/board.js +62 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/src/core/captions.js +68 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/src/core/engine.js +65 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/src/core/human.js +128 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/src/core/lib.js +44 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/src/core/look2d.js +33 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/src/core/sdf.js +79 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/src/core/sets.js +107 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/src/core/timing.js +23 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/src/main.js +56 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/src/sheet.js +79 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/src/shots.js +136 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/tools/capture.mjs +122 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/tools/mix.py +172 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/LICENSE-three.txt +21 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/environments/RoomEnvironment.js +144 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/postprocessing/BokehPass.js +141 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/postprocessing/EffectComposer.js +231 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/postprocessing/MaskPass.js +104 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/postprocessing/OutputPass.js +97 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/postprocessing/Pass.js +95 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/postprocessing/RenderPass.js +99 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/postprocessing/ShaderPass.js +77 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/postprocessing/UnrealBloomPass.js +415 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/shaders/BokehShader.js +145 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/shaders/CopyShader.js +45 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/shaders/LuminosityHighPassShader.js +64 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/addons/shaders/OutputShader.js +85 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/example/vendor/three.module.js +6 -0
- package/plugins/aiinsight-shorts/styles/deep-dive/style-sheet.png +0 -0
- package/plugins/aiinsight-shorts/styles/inside-out/STYLE.md +97 -0
- package/plugins/aiinsight-shorts/styles/inside-out/example/data/cues.json +178 -0
- package/plugins/aiinsight-shorts/styles/inside-out/example/data/lines.json +73 -0
- package/plugins/aiinsight-shorts/styles/inside-out/example/data/words.json +662 -0
- package/plugins/aiinsight-shorts/styles/inside-out/example/fonts/Inter-Black.otf +0 -0
- package/plugins/aiinsight-shorts/styles/inside-out/example/index.html +17 -0
- package/plugins/aiinsight-shorts/styles/inside-out/example/script.json +26 -0
- package/plugins/aiinsight-shorts/styles/inside-out/example/src/core/captions.js +68 -0
- package/plugins/aiinsight-shorts/styles/inside-out/example/src/core/kit.js +345 -0
- package/plugins/aiinsight-shorts/styles/inside-out/example/src/core/lib.js +44 -0
- package/plugins/aiinsight-shorts/styles/inside-out/example/src/core/timing.js +23 -0
- package/plugins/aiinsight-shorts/styles/inside-out/example/src/main.js +62 -0
- package/plugins/aiinsight-shorts/styles/inside-out/example/src/shots.js +195 -0
- package/plugins/aiinsight-shorts/styles/inside-out/example/tools/capture.mjs +122 -0
- package/plugins/aiinsight-shorts/styles/inside-out/example/tools/mix.py +172 -0
- package/plugins/aiinsight-shorts/styles/inside-out/style-sheet.png +0 -0
- package/plugins/aiinsight-shorts/styles/night-file/STYLE.md +36 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/data/cues.json +146 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/data/lines.json +73 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/data/words.json +572 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/data/words.txt +95 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/fonts/FreeMonoBold.ttf +0 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/fonts/Inter-Black.otf +0 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/index.html +18 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/script.json +26 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/sheet.html +13 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/src/core/board.js +62 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/src/core/captions.js +49 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/src/core/engine.js +65 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/src/core/human.js +128 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/src/core/kit.js +151 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/src/core/lib.js +44 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/src/core/sdf.js +79 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/src/core/sets3d.js +106 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/src/core/timing.js +23 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/src/main.js +56 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/src/sheet.js +86 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/src/shots.js +130 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/tools/capture.mjs +122 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/tools/mix.py +172 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/vendor/LICENSE-three.txt +21 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/environments/RoomEnvironment.js +144 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/postprocessing/BokehPass.js +141 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/postprocessing/EffectComposer.js +231 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/postprocessing/MaskPass.js +104 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/postprocessing/OutputPass.js +97 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/postprocessing/Pass.js +95 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/postprocessing/RenderPass.js +99 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/postprocessing/ShaderPass.js +77 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/postprocessing/UnrealBloomPass.js +415 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/shaders/BokehShader.js +145 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/shaders/CopyShader.js +45 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/shaders/LuminosityHighPassShader.js +64 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/vendor/addons/shaders/OutputShader.js +85 -0
- package/plugins/aiinsight-shorts/styles/night-file/example/vendor/three.module.js +6 -0
- package/plugins/aiinsight-shorts/styles/night-file/style-sheet.png +0 -0
- package/plugins/aiinsight-shorts/styles/paper-atlas/STYLE.md +30 -0
- package/plugins/aiinsight-shorts/styles/paper-atlas/example/data/cues.json +167 -0
- package/plugins/aiinsight-shorts/styles/paper-atlas/example/data/lines.json +67 -0
- package/plugins/aiinsight-shorts/styles/paper-atlas/example/data/words.json +614 -0
- package/plugins/aiinsight-shorts/styles/paper-atlas/example/data/words.txt +102 -0
- package/plugins/aiinsight-shorts/styles/paper-atlas/example/fonts/Caladea-Bold.ttf +0 -0
- package/plugins/aiinsight-shorts/styles/paper-atlas/example/fonts/Inter-Black.otf +0 -0
- package/plugins/aiinsight-shorts/styles/paper-atlas/example/index.html +15 -0
- package/plugins/aiinsight-shorts/styles/paper-atlas/example/script.json +26 -0
- package/plugins/aiinsight-shorts/styles/paper-atlas/example/sheet.html +12 -0
- package/plugins/aiinsight-shorts/styles/paper-atlas/example/src/core/board.js +62 -0
- package/plugins/aiinsight-shorts/styles/paper-atlas/example/src/core/captions.js +47 -0
- package/plugins/aiinsight-shorts/styles/paper-atlas/example/src/core/kit.js +152 -0
- package/plugins/aiinsight-shorts/styles/paper-atlas/example/src/core/lib.js +44 -0
- package/plugins/aiinsight-shorts/styles/paper-atlas/example/src/core/timing.js +23 -0
- package/plugins/aiinsight-shorts/styles/paper-atlas/example/src/main.js +62 -0
- package/plugins/aiinsight-shorts/styles/paper-atlas/example/src/sheet.js +61 -0
- package/plugins/aiinsight-shorts/styles/paper-atlas/example/src/shots.js +139 -0
- package/plugins/aiinsight-shorts/styles/paper-atlas/example/tools/capture.mjs +122 -0
- package/plugins/aiinsight-shorts/styles/paper-atlas/example/tools/mix.py +172 -0
- package/plugins/aiinsight-shorts/styles/paper-atlas/style-sheet.png +0 -0
- package/plugins/aiinsight-shorts/styles/stick-story/STYLE.md +32 -0
- package/plugins/aiinsight-shorts/styles/stick-story/example/data/cues.json +182 -0
- package/plugins/aiinsight-shorts/styles/stick-story/example/data/lines.json +79 -0
- package/plugins/aiinsight-shorts/styles/stick-story/example/data/words.json +662 -0
- package/plugins/aiinsight-shorts/styles/stick-story/example/data/words.txt +110 -0
- package/plugins/aiinsight-shorts/styles/stick-story/example/fonts/Inter-Black.otf +0 -0
- package/plugins/aiinsight-shorts/styles/stick-story/example/fonts/Inter-ExtraBold.otf +0 -0
- package/plugins/aiinsight-shorts/styles/stick-story/example/index.html +13 -0
- package/plugins/aiinsight-shorts/styles/stick-story/example/script.json +27 -0
- package/plugins/aiinsight-shorts/styles/stick-story/example/sheet.html +10 -0
- package/plugins/aiinsight-shorts/styles/stick-story/example/src/core/board.js +62 -0
- package/plugins/aiinsight-shorts/styles/stick-story/example/src/core/captions.js +47 -0
- package/plugins/aiinsight-shorts/styles/stick-story/example/src/core/kit.js +166 -0
- package/plugins/aiinsight-shorts/styles/stick-story/example/src/core/lib.js +44 -0
- package/plugins/aiinsight-shorts/styles/stick-story/example/src/core/timing.js +23 -0
- package/plugins/aiinsight-shorts/styles/stick-story/example/src/main.js +62 -0
- package/plugins/aiinsight-shorts/styles/stick-story/example/src/sheet.js +64 -0
- package/plugins/aiinsight-shorts/styles/stick-story/example/src/shots.js +148 -0
- package/plugins/aiinsight-shorts/styles/stick-story/example/tools/capture.mjs +122 -0
- package/plugins/aiinsight-shorts/styles/stick-story/example/tools/mix.py +172 -0
- package/plugins/aiinsight-shorts/styles/stick-story/style-sheet.png +0 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/STYLE.md +51 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/data/cues.json +271 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/data/lines.json +127 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/data/words.json +908 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/data/words.txt +151 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/fonts/Caladea-Bold.ttf +0 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/fonts/Inter-Black.otf +0 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/fonts/Inter-ExtraBold.otf +0 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/index.html +19 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/script.json +37 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/sheet.html +13 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/src/core/board.js +62 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/src/core/captions.js +56 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/src/core/engine.js +65 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/src/core/lib.js +44 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/src/core/props.js +166 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/src/core/timing.js +23 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/src/core/toon.js +352 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/src/core/world.js +340 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/src/main.js +56 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/src/sheet.js +99 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/src/shots.js +377 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/tools/capture.mjs +122 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/tools/mix.py +204 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/LICENSE-three.txt +21 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/environments/RoomEnvironment.js +144 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/postprocessing/BokehPass.js +141 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/postprocessing/EffectComposer.js +231 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/postprocessing/MaskPass.js +104 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/postprocessing/OutputPass.js +97 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/postprocessing/Pass.js +95 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/postprocessing/RenderPass.js +99 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/postprocessing/ShaderPass.js +77 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/postprocessing/UnrealBloomPass.js +415 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/shaders/BokehShader.js +145 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/shaders/CopyShader.js +45 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/shaders/LuminosityHighPassShader.js +64 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/addons/shaders/OutputShader.js +85 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/example/vendor/three.module.js +6 -0
- package/plugins/aiinsight-shorts/styles/tall-tale/style-sheet.png +0 -0
- package/plugins/faceless-shorts/README.md +34 -0
- package/plugins/faceless-shorts/SKILL.md +124 -0
- package/plugins/faceless-shorts/styles/deep-dive/STYLE.md +58 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/data/cues.json +140 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/data/lines.json +67 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/data/words.json +614 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/data/words.txt +102 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/fonts/Inter-Black.otf +0 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/fonts/Inter-ExtraBold.otf +0 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/index.html +16 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/script.json +27 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/sheet.html +10 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/src/core/board.js +62 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/src/core/captions.js +68 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/src/core/engine.js +65 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/src/core/human.js +128 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/src/core/lib.js +44 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/src/core/look2d.js +33 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/src/core/sdf.js +79 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/src/core/sets.js +107 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/src/core/timing.js +23 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/src/main.js +56 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/src/sheet.js +79 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/src/shots.js +136 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/tools/capture.mjs +122 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/tools/mix.py +172 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/vendor/LICENSE-three.txt +21 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/environments/RoomEnvironment.js +144 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/BokehPass.js +141 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/EffectComposer.js +231 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/MaskPass.js +104 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/OutputPass.js +97 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/Pass.js +95 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/RenderPass.js +99 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/ShaderPass.js +77 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/UnrealBloomPass.js +415 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/shaders/BokehShader.js +145 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/shaders/CopyShader.js +45 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/shaders/LuminosityHighPassShader.js +64 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/vendor/addons/shaders/OutputShader.js +85 -0
- package/plugins/faceless-shorts/styles/deep-dive/example/vendor/three.module.js +6 -0
- package/plugins/faceless-shorts/styles/deep-dive/style-sheet.png +0 -0
- package/plugins/faceless-shorts/styles/inside-out/STYLE.md +97 -0
- package/plugins/faceless-shorts/styles/inside-out/example/data/cues.json +178 -0
- package/plugins/faceless-shorts/styles/inside-out/example/data/lines.json +73 -0
- package/plugins/faceless-shorts/styles/inside-out/example/data/words.json +662 -0
- package/plugins/faceless-shorts/styles/inside-out/example/fonts/Inter-Black.otf +0 -0
- package/plugins/faceless-shorts/styles/inside-out/example/index.html +16 -0
- package/plugins/faceless-shorts/styles/inside-out/example/script.json +26 -0
- package/plugins/faceless-shorts/styles/inside-out/example/src/core/captions.js +68 -0
- package/plugins/faceless-shorts/styles/inside-out/example/src/core/kit.js +345 -0
- package/plugins/faceless-shorts/styles/inside-out/example/src/core/lib.js +44 -0
- package/plugins/faceless-shorts/styles/inside-out/example/src/core/timing.js +23 -0
- package/plugins/faceless-shorts/styles/inside-out/example/src/main.js +62 -0
- package/plugins/faceless-shorts/styles/inside-out/example/src/shots.js +195 -0
- package/plugins/faceless-shorts/styles/inside-out/example/tools/capture.mjs +122 -0
- package/plugins/faceless-shorts/styles/inside-out/example/tools/mix.py +172 -0
- package/plugins/faceless-shorts/styles/inside-out/style-sheet.png +0 -0
- package/plugins/faceless-shorts/styles/night-file/STYLE.md +36 -0
- package/plugins/faceless-shorts/styles/night-file/example/data/cues.json +146 -0
- package/plugins/faceless-shorts/styles/night-file/example/data/lines.json +73 -0
- package/plugins/faceless-shorts/styles/night-file/example/data/words.json +572 -0
- package/plugins/faceless-shorts/styles/night-file/example/data/words.txt +95 -0
- package/plugins/faceless-shorts/styles/night-file/example/fonts/FreeMonoBold.ttf +0 -0
- package/plugins/faceless-shorts/styles/night-file/example/fonts/Inter-Black.otf +0 -0
- package/plugins/faceless-shorts/styles/night-file/example/index.html +16 -0
- package/plugins/faceless-shorts/styles/night-file/example/script.json +26 -0
- package/plugins/faceless-shorts/styles/night-file/example/sheet.html +11 -0
- package/plugins/faceless-shorts/styles/night-file/example/src/core/board.js +62 -0
- package/plugins/faceless-shorts/styles/night-file/example/src/core/captions.js +49 -0
- package/plugins/faceless-shorts/styles/night-file/example/src/core/engine.js +65 -0
- package/plugins/faceless-shorts/styles/night-file/example/src/core/human.js +128 -0
- package/plugins/faceless-shorts/styles/night-file/example/src/core/kit.js +151 -0
- package/plugins/faceless-shorts/styles/night-file/example/src/core/lib.js +44 -0
- package/plugins/faceless-shorts/styles/night-file/example/src/core/sdf.js +79 -0
- package/plugins/faceless-shorts/styles/night-file/example/src/core/sets3d.js +106 -0
- package/plugins/faceless-shorts/styles/night-file/example/src/core/timing.js +23 -0
- package/plugins/faceless-shorts/styles/night-file/example/src/main.js +56 -0
- package/plugins/faceless-shorts/styles/night-file/example/src/sheet.js +86 -0
- package/plugins/faceless-shorts/styles/night-file/example/src/shots.js +130 -0
- package/plugins/faceless-shorts/styles/night-file/example/tools/capture.mjs +122 -0
- package/plugins/faceless-shorts/styles/night-file/example/tools/mix.py +172 -0
- package/plugins/faceless-shorts/styles/night-file/example/vendor/LICENSE-three.txt +21 -0
- package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/environments/RoomEnvironment.js +144 -0
- package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/BokehPass.js +141 -0
- package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/EffectComposer.js +231 -0
- package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/MaskPass.js +104 -0
- package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/OutputPass.js +97 -0
- package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/Pass.js +95 -0
- package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/RenderPass.js +99 -0
- package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/ShaderPass.js +77 -0
- package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/UnrealBloomPass.js +415 -0
- package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/shaders/BokehShader.js +145 -0
- package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/shaders/CopyShader.js +45 -0
- package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/shaders/LuminosityHighPassShader.js +64 -0
- package/plugins/faceless-shorts/styles/night-file/example/vendor/addons/shaders/OutputShader.js +85 -0
- package/plugins/faceless-shorts/styles/night-file/example/vendor/three.module.js +6 -0
- package/plugins/faceless-shorts/styles/night-file/style-sheet.png +0 -0
- package/plugins/faceless-shorts/styles/paper-atlas/STYLE.md +30 -0
- package/plugins/faceless-shorts/styles/paper-atlas/example/data/cues.json +167 -0
- package/plugins/faceless-shorts/styles/paper-atlas/example/data/lines.json +67 -0
- package/plugins/faceless-shorts/styles/paper-atlas/example/data/words.json +614 -0
- package/plugins/faceless-shorts/styles/paper-atlas/example/data/words.txt +102 -0
- package/plugins/faceless-shorts/styles/paper-atlas/example/fonts/Caladea-Bold.ttf +0 -0
- package/plugins/faceless-shorts/styles/paper-atlas/example/fonts/Inter-Black.otf +0 -0
- package/plugins/faceless-shorts/styles/paper-atlas/example/index.html +13 -0
- package/plugins/faceless-shorts/styles/paper-atlas/example/script.json +26 -0
- package/plugins/faceless-shorts/styles/paper-atlas/example/sheet.html +10 -0
- package/plugins/faceless-shorts/styles/paper-atlas/example/src/core/board.js +62 -0
- package/plugins/faceless-shorts/styles/paper-atlas/example/src/core/captions.js +47 -0
- package/plugins/faceless-shorts/styles/paper-atlas/example/src/core/kit.js +152 -0
- package/plugins/faceless-shorts/styles/paper-atlas/example/src/core/lib.js +44 -0
- package/plugins/faceless-shorts/styles/paper-atlas/example/src/core/timing.js +23 -0
- package/plugins/faceless-shorts/styles/paper-atlas/example/src/main.js +62 -0
- package/plugins/faceless-shorts/styles/paper-atlas/example/src/sheet.js +61 -0
- package/plugins/faceless-shorts/styles/paper-atlas/example/src/shots.js +139 -0
- package/plugins/faceless-shorts/styles/paper-atlas/example/tools/capture.mjs +122 -0
- package/plugins/faceless-shorts/styles/paper-atlas/example/tools/mix.py +172 -0
- package/plugins/faceless-shorts/styles/paper-atlas/style-sheet.png +0 -0
- package/plugins/faceless-shorts/styles/stick-story/STYLE.md +32 -0
- package/plugins/faceless-shorts/styles/stick-story/example/data/cues.json +182 -0
- package/plugins/faceless-shorts/styles/stick-story/example/data/lines.json +79 -0
- package/plugins/faceless-shorts/styles/stick-story/example/data/words.json +662 -0
- package/plugins/faceless-shorts/styles/stick-story/example/data/words.txt +110 -0
- package/plugins/faceless-shorts/styles/stick-story/example/fonts/Inter-Black.otf +0 -0
- package/plugins/faceless-shorts/styles/stick-story/example/fonts/Inter-ExtraBold.otf +0 -0
- package/plugins/faceless-shorts/styles/stick-story/example/index.html +12 -0
- package/plugins/faceless-shorts/styles/stick-story/example/script.json +27 -0
- package/plugins/faceless-shorts/styles/stick-story/example/sheet.html +9 -0
- package/plugins/faceless-shorts/styles/stick-story/example/src/core/board.js +62 -0
- package/plugins/faceless-shorts/styles/stick-story/example/src/core/captions.js +47 -0
- package/plugins/faceless-shorts/styles/stick-story/example/src/core/kit.js +166 -0
- package/plugins/faceless-shorts/styles/stick-story/example/src/core/lib.js +44 -0
- package/plugins/faceless-shorts/styles/stick-story/example/src/core/timing.js +23 -0
- package/plugins/faceless-shorts/styles/stick-story/example/src/main.js +62 -0
- package/plugins/faceless-shorts/styles/stick-story/example/src/sheet.js +64 -0
- package/plugins/faceless-shorts/styles/stick-story/example/src/shots.js +148 -0
- package/plugins/faceless-shorts/styles/stick-story/example/tools/capture.mjs +122 -0
- package/plugins/faceless-shorts/styles/stick-story/example/tools/mix.py +172 -0
- package/plugins/faceless-shorts/styles/stick-story/style-sheet.png +0 -0
- package/plugins/faceless-shorts/styles/tall-tale/STYLE.md +51 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/data/cues.json +271 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/data/lines.json +127 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/data/words.json +908 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/data/words.txt +151 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/fonts/Caladea-Bold.ttf +0 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/fonts/Inter-Black.otf +0 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/fonts/Inter-ExtraBold.otf +0 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/index.html +17 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/script.json +37 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/sheet.html +11 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/src/core/board.js +62 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/src/core/captions.js +56 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/src/core/engine.js +65 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/src/core/lib.js +44 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/src/core/props.js +166 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/src/core/timing.js +23 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/src/core/toon.js +352 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/src/core/world.js +340 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/src/main.js +56 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/src/sheet.js +99 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/src/shots.js +377 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/tools/capture.mjs +122 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/tools/mix.py +204 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/vendor/LICENSE-three.txt +21 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/environments/RoomEnvironment.js +144 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/BokehPass.js +141 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/EffectComposer.js +231 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/MaskPass.js +104 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/OutputPass.js +97 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/Pass.js +95 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/RenderPass.js +99 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/ShaderPass.js +77 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/UnrealBloomPass.js +415 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/shaders/BokehShader.js +145 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/shaders/CopyShader.js +45 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/shaders/LuminosityHighPassShader.js +64 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/vendor/addons/shaders/OutputShader.js +85 -0
- package/plugins/faceless-shorts/styles/tall-tale/example/vendor/three.module.js +6 -0
- package/plugins/faceless-shorts/styles/tall-tale/style-sheet.png +0 -0
- package/plugins/motion-styles/LIBRARY.md +896 -0
- package/plugins/motion-styles/README.md +29 -0
- package/plugins/motion-styles/SKILL.md +70 -0
- package/plugins/motion-styles/catalog.json +2253 -0
- package/plugins/motion-styles/prompts/bio-glow.md +149 -0
- package/plugins/motion-styles/prompts/blueprint.md +145 -0
- package/plugins/motion-styles/prompts/breaking-desk.md +147 -0
- package/plugins/motion-styles/prompts/callout-kit.md +147 -0
- package/plugins/motion-styles/prompts/chalk-talk.md +153 -0
- package/plugins/motion-styles/prompts/chat-story.md +143 -0
- package/plugins/motion-styles/prompts/clay-diorama.md +149 -0
- package/plugins/motion-styles/prompts/clean-tech.md +147 -0
- package/plugins/motion-styles/prompts/comic-panels.md +145 -0
- package/plugins/motion-styles/prompts/cosmic-scale.md +147 -0
- package/plugins/motion-styles/prompts/creator-motion.md +149 -0
- package/plugins/motion-styles/prompts/data-city.md +149 -0
- package/plugins/motion-styles/prompts/data-story.md +147 -0
- package/plugins/motion-styles/prompts/deep-layers.md +147 -0
- package/plugins/motion-styles/prompts/doc-cinema.md +145 -0
- package/plugins/motion-styles/prompts/evidence-board.md +145 -0
- package/plugins/motion-styles/prompts/exploded-view.md +149 -0
- package/plugins/motion-styles/prompts/glass-icons.md +147 -0
- package/plugins/motion-styles/prompts/glitch-pack.md +145 -0
- package/plugins/motion-styles/prompts/globe-arcs.md +147 -0
- package/plugins/motion-styles/prompts/headline-backdrop.md +145 -0
- package/plugins/motion-styles/prompts/iso-cutaway.md +147 -0
- package/plugins/motion-styles/prompts/isotype.md +145 -0
- package/plugins/motion-styles/prompts/karaoke-subs.md +145 -0
- package/plugins/motion-styles/prompts/low-poly-atlas.md +149 -0
- package/plugins/motion-styles/prompts/lower-thirds.md +147 -0
- package/plugins/motion-styles/prompts/marker-board.md +145 -0
- package/plugins/motion-styles/prompts/market-tape.md +145 -0
- package/plugins/motion-styles/prompts/math-canvas.md +145 -0
- package/plugins/motion-styles/prompts/myth-or-fact.md +145 -0
- package/plugins/motion-styles/prompts/neon-line.md +145 -0
- package/plugins/motion-styles/prompts/paper-craft.md +145 -0
- package/plugins/motion-styles/prompts/parchment-map.md +147 -0
- package/plugins/motion-styles/prompts/physics-toybox.md +147 -0
- package/plugins/motion-styles/prompts/pixel-quest.md +145 -0
- package/plugins/motion-styles/prompts/podcast-clip.md +147 -0
- package/plugins/motion-styles/prompts/pop-info.md +145 -0
- package/plugins/motion-styles/prompts/product-turntable.md +149 -0
- package/plugins/motion-styles/prompts/punch-captions.md +145 -0
- package/plugins/motion-styles/prompts/quiz-countdown.md +145 -0
- package/plugins/motion-styles/prompts/quote-cinema.md +145 -0
- package/plugins/motion-styles/prompts/recipe-steps.md +145 -0
- package/plugins/motion-styles/prompts/rubber-hose-reel.md +145 -0
- package/plugins/motion-styles/prompts/shadow-puppets.md +145 -0
- package/plugins/motion-styles/prompts/size-lineup.md +149 -0
- package/plugins/motion-styles/prompts/software-walkthrough.md +147 -0
- package/plugins/motion-styles/prompts/stack-split.md +145 -0
- package/plugins/motion-styles/prompts/sticker-pop.md +145 -0
- package/plugins/motion-styles/prompts/storybook.md +145 -0
- package/plugins/motion-styles/prompts/swiss-grid.md +145 -0
- package/plugins/motion-styles/prompts/synth-grid.md +147 -0
- package/plugins/motion-styles/prompts/tactics-board.md +145 -0
- package/plugins/motion-styles/prompts/terminal.md +145 -0
- package/plugins/motion-styles/prompts/tier-list.md +143 -0
- package/plugins/motion-styles/prompts/timeline-rail.md +145 -0
- package/plugins/motion-styles/prompts/top-5-countdown.md +145 -0
- package/plugins/motion-styles/prompts/versus-split.md +145 -0
- package/plugins/motion-styles/prompts/vhs-camcorder.md +145 -0
- package/plugins/motion-styles/prompts/visual-novel.md +145 -0
- package/plugins/motion-styles/prompts/warm-canvas.md +145 -0
- package/plugins/motion-styles/prompts/woodcut-tale.md +145 -0
- package/plugins/motion-styles/prompts/zine-collage.md +145 -0
- package/plugins/motion-styles/sources/bio-glow.html +639 -0
- package/plugins/motion-styles/sources/blueprint.html +617 -0
- package/plugins/motion-styles/sources/breaking-desk.html +585 -0
- package/plugins/motion-styles/sources/callout-kit.html +586 -0
- package/plugins/motion-styles/sources/chalk-talk.html +597 -0
- package/plugins/motion-styles/sources/chat-story.html +597 -0
- package/plugins/motion-styles/sources/clay-diorama.html +681 -0
- package/plugins/motion-styles/sources/clean-tech.html +554 -0
- package/plugins/motion-styles/sources/comic-panels.html +608 -0
- package/plugins/motion-styles/sources/cosmic-scale.html +628 -0
- package/plugins/motion-styles/sources/creator-motion.html +805 -0
- package/plugins/motion-styles/sources/data-city.html +613 -0
- package/plugins/motion-styles/sources/data-story.html +539 -0
- package/plugins/motion-styles/sources/deep-layers.html +624 -0
- package/plugins/motion-styles/sources/doc-cinema.html +590 -0
- package/plugins/motion-styles/sources/evidence-board.html +610 -0
- package/plugins/motion-styles/sources/exploded-view.html +618 -0
- package/plugins/motion-styles/sources/glass-icons.html +612 -0
- package/plugins/motion-styles/sources/glitch-pack.html +583 -0
- package/plugins/motion-styles/sources/globe-arcs.html +621 -0
- package/plugins/motion-styles/sources/headline-backdrop.html +584 -0
- package/plugins/motion-styles/sources/iso-cutaway.html +621 -0
- package/plugins/motion-styles/sources/isotype.html +588 -0
- package/plugins/motion-styles/sources/karaoke-subs.html +577 -0
- package/plugins/motion-styles/sources/low-poly-atlas.html +621 -0
- package/plugins/motion-styles/sources/lower-thirds.html +582 -0
- package/plugins/motion-styles/sources/marker-board.html +598 -0
- package/plugins/motion-styles/sources/market-tape.html +598 -0
- package/plugins/motion-styles/sources/math-canvas.html +592 -0
- package/plugins/motion-styles/sources/myth-or-fact.html +587 -0
- package/plugins/motion-styles/sources/neon-line.html +597 -0
- package/plugins/motion-styles/sources/paper-craft.html +612 -0
- package/plugins/motion-styles/sources/parchment-map.html +624 -0
- package/plugins/motion-styles/sources/physics-toybox.html +617 -0
- package/plugins/motion-styles/sources/pixel-quest.html +609 -0
- package/plugins/motion-styles/sources/podcast-clip.html +585 -0
- package/plugins/motion-styles/sources/pop-info.html +677 -0
- package/plugins/motion-styles/sources/product-turntable.html +611 -0
- package/plugins/motion-styles/sources/punch-captions.html +583 -0
- package/plugins/motion-styles/sources/quiz-countdown.html +593 -0
- package/plugins/motion-styles/sources/quote-cinema.html +581 -0
- package/plugins/motion-styles/sources/recipe-steps.html +599 -0
- package/plugins/motion-styles/sources/rubber-hose-reel.html +627 -0
- package/plugins/motion-styles/sources/shadow-puppets.html +609 -0
- package/plugins/motion-styles/sources/size-lineup.html +620 -0
- package/plugins/motion-styles/sources/software-walkthrough.html +651 -0
- package/plugins/motion-styles/sources/stack-split.html +588 -0
- package/plugins/motion-styles/sources/sticker-pop.html +587 -0
- package/plugins/motion-styles/sources/storybook.html +600 -0
- package/plugins/motion-styles/sources/swiss-grid.html +590 -0
- package/plugins/motion-styles/sources/synth-grid.html +614 -0
- package/plugins/motion-styles/sources/tactics-board.html +608 -0
- package/plugins/motion-styles/sources/terminal.html +593 -0
- package/plugins/motion-styles/sources/tier-list.html +600 -0
- package/plugins/motion-styles/sources/timeline-rail.html +598 -0
- package/plugins/motion-styles/sources/top-5-countdown.html +589 -0
- package/plugins/motion-styles/sources/versus-split.html +592 -0
- package/plugins/motion-styles/sources/vhs-camcorder.html +587 -0
- package/plugins/motion-styles/sources/visual-novel.html +623 -0
- package/plugins/motion-styles/sources/warm-canvas.html +742 -0
- package/plugins/motion-styles/sources/woodcut-tale.html +598 -0
- package/plugins/motion-styles/sources/zine-collage.html +594 -0
- package/plugins/video-pipeline/.claude-plugin/plugin.json +2 -2
- package/plugins/video-pipeline/skills/.upstream-skills.json +156 -143
- package/plugins/video-pipeline/skills/video-pipeline/references/mcp-tools.md +3 -3
- package/scripts/deep-validate.js +3 -2
- package/src/audio-mixer/mixer.js +69 -0
- package/src/cli/make.js +19 -0
- package/src/harness/lib/browser.mjs +22 -1
- package/src/harness/lib/capture.mjs +33 -11
- package/src/harness/lib/jobs.mjs +16 -1
- package/src/mcp-server/server.js +726 -10
- package/src/pipeline/providers.js +77 -17
- package/src/skills/sync-upstream.js +15 -3
- package/src/utils/media-downloader.js +7 -0
- package/src/utils/tool-installer.js +212 -0
- package/src/utils/transcribe.js +9 -1
- package/src/video-renderer/renderer.js +68 -38
- package/src/video-renderer/scene-animator.js +50 -15
- package/src/workflows/assets.js +49 -5
- package/src/workflows/render.js +2 -0
- package/src/workflows/script.js +14 -3
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Timing: everything on screen is placed on the narration's clock.
|
|
2
|
+
// data/lines.json { duration, lines: [{ i, text, start, end }] } (voice.py, or estimate.py for captions-only)
|
|
3
|
+
// data/words.json [{ w, line, s, e }] (words.py, or estimate.py)
|
|
4
|
+
// L(i) = line i start · Le(i) = line i end · Wd(word, line) = start of the first word in that line matching
|
|
5
|
+
// the prefix (case/punctuation ignored; throws if it isn't there, so a rewritten script can't silently drift).
|
|
6
|
+
export const T = { dur: 0, lines: [], words: [] };
|
|
7
|
+
const norm = (w) => String(w).toLowerCase().replace(/[^a-z0-9']+/g, '');
|
|
8
|
+
|
|
9
|
+
export async function loadTiming() {
|
|
10
|
+
const get = async (f) => { const r = await fetch(f, { cache: 'no-store' }); if (!r.ok) throw new Error(`missing ${f}: run voice.py + words.py (or estimate.py)`); return r.json(); };
|
|
11
|
+
const lines = await get('data/lines.json'), words = await get('data/words.json');
|
|
12
|
+
T.lines = lines.lines; T.words = words; T.dur = lines.duration;
|
|
13
|
+
return T;
|
|
14
|
+
}
|
|
15
|
+
export const L = (i) => { const l = T.lines[i]; if (!l) throw new Error(`no line ${i}`); return l.start; };
|
|
16
|
+
export const Le = (i) => { const l = T.lines[i]; if (!l) throw new Error(`no line ${i}`); return l.end; };
|
|
17
|
+
export function Wd(word, line, which = 's') {
|
|
18
|
+
const n = norm(word);
|
|
19
|
+
const hit = T.words.find((w) => (line == null || w.line === line) && norm(w.w).startsWith(n));
|
|
20
|
+
if (!hit) throw new Error(`word "${word}" not found${line != null ? ` in line ${line}` : ''}`);
|
|
21
|
+
return hit[which];
|
|
22
|
+
}
|
|
23
|
+
export const lineWords = (i) => T.words.filter((w) => w.line === i);
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
// Toon people: flat 2D cartoon characters (thick ink outlines, big round heads, bean bodies, stick limbs) that live
|
|
2
|
+
// inside the 3D world as camera-facing cut-outs with real shadows.
|
|
3
|
+
//
|
|
4
|
+
// drawToon(g, look, st) draws one character into any 2D context, in a 512 x 1024 box (feet at y 1000)
|
|
5
|
+
// new Toon(look, { height }) a 3D cut-out: .set(st) every frame, .face(camera), .group (position it), .tint(col)
|
|
6
|
+
//
|
|
7
|
+
// look = { body: '#E8734A', shade?, pattern: 'plain'|'check'|'stripes'|'overalls'|'vest'|'apron', patCol,
|
|
8
|
+
// hat: 'none'|'cap'|'bowler'|'boater'|'beanie'|'visor'|'tophat'|'bun'|'flower', hatCol, band,
|
|
9
|
+
// neck: 'none'|'bowtie'|'tie'|'scarf'|'collar', neckCol, dots,
|
|
10
|
+
// extra: ['mustache','glasses','freckles','blush','pencil','monocle'], head: '#F7F7FA' }
|
|
11
|
+
// st = { mood: 'neutral'|'smug'|'happy'|'laugh'|'shock'|'worried'|'angry'|'sad'|'sly'|'proud'|'tired'|'dizzy',
|
|
12
|
+
// look: [dx, dy] (-1..1 pupils), blink 0..1, talk 0..1 (mouth open), sweat, tears,
|
|
13
|
+
// armL / armR: [shoulder°, elbow°] (0 = hanging down, + = outward/up, elbow + = bends up),
|
|
14
|
+
// legs: 'stand'|'walk'|'run'|'sit'|'jump', phase (walk cycle, radians), lean°, bob (px), squash,
|
|
15
|
+
// holdL / holdR: (g, x, y, angle) => draws a prop in that hand, flip (mirror left/right) }
|
|
16
|
+
import * as THREE from 'three';
|
|
17
|
+
|
|
18
|
+
export const INK = '#1F1C33';
|
|
19
|
+
const LW = 9;
|
|
20
|
+
const R2D = Math.PI / 180;
|
|
21
|
+
|
|
22
|
+
export function shadeOf(hex, k = 0.78) {
|
|
23
|
+
const n = parseInt(hex.slice(1), 16), r = (n >> 16) & 255, gg = (n >> 8) & 255, b = n & 255;
|
|
24
|
+
const f = (v) => Math.max(0, Math.min(255, Math.round(v * k)));
|
|
25
|
+
return '#' + ((1 << 24) + (f(r) << 16) + (f(gg) << 8) + f(b)).toString(16).slice(1);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// ---------- the drawing ----------
|
|
29
|
+
export function drawToon(g, look = {}, st = {}) {
|
|
30
|
+
const L = { body: '#E8734A', head: '#F7F7FA', hat: 'none', neck: 'none', pattern: 'plain', extra: [], ...look };
|
|
31
|
+
const S = { mood: 'neutral', look: [0, 0], blink: 0, talk: 0, armL: [8, 6], armR: [8, 6], legs: 'stand', phase: 0, lean: 0, bob: 0, squash: 0, ...st };
|
|
32
|
+
g.save();
|
|
33
|
+
g.lineCap = 'round'; g.lineJoin = 'round';
|
|
34
|
+
if (S.flip) { g.translate(512, 0); g.scale(-1, 1); }
|
|
35
|
+
// whole-body lean pivots at the feet
|
|
36
|
+
g.translate(256, 1000); g.rotate((S.lean || 0) * R2D); g.translate(-256, -1000);
|
|
37
|
+
const sit = S.legs === 'sit', jump = S.legs === 'jump';
|
|
38
|
+
const by = (sit ? 210 : 0) + (L.kid ? 190 : 0) + (S.bob || 0) + (jump ? -60 : 0); // how far the upper body drops (kids: short legs)
|
|
39
|
+
const sq = 1 + (S.squash || 0);
|
|
40
|
+
// body box
|
|
41
|
+
const bx = 256, top = 330 + by, bot = 600 + by * 0.98, bw = 92; // half width at the hips
|
|
42
|
+
const hipY = bot - 26;
|
|
43
|
+
|
|
44
|
+
// ---- legs (behind the body) ----
|
|
45
|
+
g.strokeStyle = INK; g.lineWidth = 15;
|
|
46
|
+
const leg = (sx, side) => {
|
|
47
|
+
let kx, ky, fx, fy;
|
|
48
|
+
if (sit) { // thighs come toward us (short), shins hang down
|
|
49
|
+
const kx2 = sx + side * 30, ky2 = hipY + 44; fx = sx + side * 34; fy = 1000;
|
|
50
|
+
g.beginPath(); g.moveTo(sx, hipY); g.lineTo(kx2, ky2); g.lineTo(fx, fy); g.stroke();
|
|
51
|
+
g.fillStyle = INK; g.beginPath(); g.ellipse(fx + side * 10, fy - 4, 20, 10, 0, 0, Math.PI * 2); g.fill(); return;
|
|
52
|
+
}
|
|
53
|
+
else if (S.legs === 'walk' || S.legs === 'run') {
|
|
54
|
+
const amp = S.legs === 'run' ? 1.0 : 0.55, a = Math.sin(S.phase + (side > 0 ? Math.PI : 0)) * amp;
|
|
55
|
+
const lift = Math.max(0, -Math.cos(S.phase + (side > 0 ? Math.PI : 0))) * (S.legs === 'run' ? 70 : 34);
|
|
56
|
+
kx = sx + a * 22 + side * 6; ky = hipY + 200 - lift * 0.6; fx = sx + a * 34 + side * 8; fy = 1000 - lift;
|
|
57
|
+
} else if (jump) { kx = sx + side * 40; ky = hipY + 170; fx = sx + side * 18; fy = 940; }
|
|
58
|
+
else { kx = sx + side * 4; ky = hipY + 210; fx = sx + side * 10; fy = 1000; }
|
|
59
|
+
g.beginPath(); g.moveTo(sx, hipY); g.quadraticCurveTo(kx, ky, fx, fy); g.stroke();
|
|
60
|
+
g.fillStyle = INK; g.beginPath(); g.ellipse(fx + side * 10, fy - 4, 20, 10, 0, 0, Math.PI * 2); g.fill();
|
|
61
|
+
};
|
|
62
|
+
leg(bx - 42, -1); leg(bx + 42, 1);
|
|
63
|
+
|
|
64
|
+
// ---- body (a bean) ----
|
|
65
|
+
const body = new Path2D();
|
|
66
|
+
body.moveTo(bx - 58, top + 10);
|
|
67
|
+
body.bezierCurveTo(bx - 80, top + 40, bx - bw - 6, bot - 120, bx - bw, bot - 50);
|
|
68
|
+
body.bezierCurveTo(bx - bw + 4, bot + 6, bx + bw - 4, bot + 6, bx + bw, bot - 50);
|
|
69
|
+
body.bezierCurveTo(bx + bw + 6, bot - 120, bx + 80, top + 40, bx + 58, top + 10);
|
|
70
|
+
body.bezierCurveTo(bx + 30, top - 8, bx - 30, top - 8, bx - 58, top + 10);
|
|
71
|
+
body.closePath();
|
|
72
|
+
g.fillStyle = L.body; g.fill(body);
|
|
73
|
+
g.save(); g.clip(body);
|
|
74
|
+
drawPattern(g, L, bx, top, bot, bw);
|
|
75
|
+
g.fillStyle = L.shade || shadeOf(L.body, 0.8); g.globalAlpha = 0.85;
|
|
76
|
+
g.beginPath(); g.ellipse(bx + bw + 40, (top + bot) / 2 + 20, 70, 260, 0, 0, Math.PI * 2); g.fill();
|
|
77
|
+
g.globalAlpha = 0.25; g.fillStyle = '#FFFFFF'; g.beginPath(); g.ellipse(bx - 50, top + 90, 16, 60, 0.2, 0, Math.PI * 2); g.fill();
|
|
78
|
+
g.globalAlpha = 1; g.restore();
|
|
79
|
+
g.strokeStyle = INK; g.lineWidth = LW; g.stroke(body);
|
|
80
|
+
drawNeckwear(g, L, bx, top);
|
|
81
|
+
|
|
82
|
+
// ---- arms (in front of the body) ----
|
|
83
|
+
const hands = {};
|
|
84
|
+
const arm = (side, [a, e], hold) => {
|
|
85
|
+
const sx = bx + side * 66, sy = top + 46;
|
|
86
|
+
const u = 118, lo = 112;
|
|
87
|
+
const a1 = a * R2D, a2 = (a + e) * R2D;
|
|
88
|
+
const ex = sx + side * Math.sin(a1) * u, ey = sy + Math.cos(a1) * u;
|
|
89
|
+
const hx = ex + side * Math.sin(a2) * lo, hy = ey + Math.cos(a2) * lo;
|
|
90
|
+
g.strokeStyle = INK; g.lineWidth = 14;
|
|
91
|
+
g.beginPath(); g.moveTo(sx, sy); g.quadraticCurveTo(ex, ey, hx, hy); g.stroke();
|
|
92
|
+
if (hold) { g.save(); hold(g, hx, hy, side * (a + e) * R2D, side); g.restore(); }
|
|
93
|
+
g.fillStyle = INK; g.beginPath(); g.ellipse(hx, hy, 15, 17, 0, 0, Math.PI * 2); g.fill();
|
|
94
|
+
hands[side < 0 ? 'L' : 'R'] = [hx, hy];
|
|
95
|
+
};
|
|
96
|
+
arm(-1, S.armL, S.holdL); arm(1, S.armR, S.holdR);
|
|
97
|
+
|
|
98
|
+
// ---- head ----
|
|
99
|
+
const hx = 256, hy = 178 + by * 0.99, r = 138;
|
|
100
|
+
g.save(); g.translate(hx, hy); g.scale(1 + (S.squash || 0) * -0.3, sq); g.translate(-hx, -hy);
|
|
101
|
+
if (L.hat === 'bun') { g.fillStyle = L.hatCol || '#6B4A3A'; g.beginPath(); g.arc(hx + 10, hy - r - 8, 46, 0, Math.PI * 2); g.fill(); g.strokeStyle = INK; g.lineWidth = LW; g.stroke(); }
|
|
102
|
+
const head = new Path2D(); head.ellipse(hx, hy, r, r * 0.97, 0, 0, Math.PI * 2);
|
|
103
|
+
g.fillStyle = L.head; g.fill(head);
|
|
104
|
+
g.save(); g.clip(head);
|
|
105
|
+
g.fillStyle = shadeOf(L.head, 0.9); g.beginPath(); g.arc(hx + 52, hy + 44, r, 0, Math.PI * 2); g.rect(hx - 400, hy - 400, 800, 800); g.fill('evenodd');
|
|
106
|
+
g.restore();
|
|
107
|
+
g.strokeStyle = INK; g.lineWidth = LW + 1; g.stroke(head);
|
|
108
|
+
drawFace(g, L, S, hx, hy);
|
|
109
|
+
drawHat(g, L, hx, hy, r);
|
|
110
|
+
g.restore();
|
|
111
|
+
g.restore();
|
|
112
|
+
return hands;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function drawPattern(g, L, bx, top, bot, bw) {
|
|
116
|
+
const pc = L.patCol || shadeOf(L.body, 0.7);
|
|
117
|
+
if (L.pattern === 'check') {
|
|
118
|
+
g.strokeStyle = pc; g.globalAlpha = 0.55; g.lineWidth = 6;
|
|
119
|
+
for (let x = bx - 120; x < bx + 120; x += 34) { g.beginPath(); g.moveTo(x, top - 20); g.lineTo(x, bot + 20); g.stroke(); }
|
|
120
|
+
for (let y = top; y < bot + 20; y += 34) { g.beginPath(); g.moveTo(bx - 130, y); g.lineTo(bx + 130, y); g.stroke(); }
|
|
121
|
+
g.lineWidth = 2; g.globalAlpha = 0.5; g.strokeStyle = L.patCol2 || '#B5372E';
|
|
122
|
+
for (let x = bx - 103; x < bx + 120; x += 68) { g.beginPath(); g.moveTo(x, top - 20); g.lineTo(x, bot + 20); g.stroke(); }
|
|
123
|
+
g.globalAlpha = 1;
|
|
124
|
+
} else if (L.pattern === 'stripes') {
|
|
125
|
+
g.fillStyle = pc; for (let x = bx - 130; x < bx + 130; x += 36) g.fillRect(x, top - 20, 14, bot - top + 40);
|
|
126
|
+
} else if (L.pattern === 'overalls') {
|
|
127
|
+
g.fillStyle = L.patCol || '#3E5FA8';
|
|
128
|
+
g.beginPath(); g.roundRect(bx - 62, top + 110, 124, 110, 14); g.fill(); g.fillRect(bx - 130, top + 190, 260, 200);
|
|
129
|
+
g.strokeStyle = shadeOf(g.fillStyle, 0.75); g.lineWidth = 4; g.setLineDash([8, 7]); g.strokeRect(bx - 48, top + 124, 96, 80); g.setLineDash([]);
|
|
130
|
+
g.fillStyle = L.patCol || '#3E5FA8'; g.fillRect(bx - 58, top, 16, 120); g.fillRect(bx + 42, top, 16, 120);
|
|
131
|
+
g.fillStyle = '#F1C24B'; [[-50, 118], [50, 118]].forEach(([dx, dy]) => { g.beginPath(); g.arc(bx + dx, top + dy, 8, 0, 7); g.fill(); });
|
|
132
|
+
} else if (L.pattern === 'vest') {
|
|
133
|
+
g.fillStyle = L.patCol || '#3B3346';
|
|
134
|
+
g.beginPath(); g.moveTo(bx - 140, top - 10); g.lineTo(bx - 8, top + 120); g.lineTo(bx - 8, bot + 20); g.lineTo(bx - 140, bot + 20); g.fill();
|
|
135
|
+
g.beginPath(); g.moveTo(bx + 140, top - 10); g.lineTo(bx + 8, top + 120); g.lineTo(bx + 8, bot + 20); g.lineTo(bx + 140, bot + 20); g.fill();
|
|
136
|
+
g.fillStyle = '#E9C46A'; [150, 195, 240].forEach((dy) => { g.beginPath(); g.arc(bx + 26, top + dy, 6, 0, 7); g.fill(); });
|
|
137
|
+
} else if (L.pattern === 'stamps' || L.stamps) {
|
|
138
|
+
const n = L.stamps ?? 6; const spots = [[-50, 70, -0.2], [30, 60, 0.15], [-10, 140, 0.05], [50, 150, -0.12], [-60, 180, 0.18], [10, 215, -0.1], [-30, 100, 0.3], [60, 105, 0.08], [20, 175, 0.25], [-45, 240, -0.05]];
|
|
139
|
+
spots.slice(0, n).forEach(([dx, dy, r], i) => { g.save(); g.translate(bx + dx, top + dy); g.rotate(r); const cols = ['#D8343F', '#3C6FB6', '#2E8A5A', '#E2B33C', '#8C6FC9']; g.fillStyle = '#FFFDF4'; g.strokeStyle = INK; g.lineWidth = 3;
|
|
140
|
+
g.beginPath(); g.rect(-22, -27, 44, 54); g.fill(); g.stroke(); g.fillStyle = cols[i % 5]; g.fillRect(-15, -20, 30, 32); g.fillStyle = '#FFFDF4'; g.font = '900 13px Inter'; g.textAlign = 'center'; g.fillText(i % 2 ? '5¢' : '2¢', 0, 22);
|
|
141
|
+
g.beginPath(); g.arc(0, -6, 8, 0, 7); g.fill(); g.restore(); });
|
|
142
|
+
} else if (L.pattern === 'apron') {
|
|
143
|
+
g.fillStyle = L.patCol || '#F4EFE4'; g.beginPath(); g.roundRect(bx - 70, top + 90, 140, bot - top, 18); g.fill();
|
|
144
|
+
g.strokeStyle = shadeOf(L.patCol || '#F4EFE4', 0.8); g.lineWidth = 4; g.beginPath(); g.roundRect(bx - 40, top + 190, 80, 60, 8); g.stroke();
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function drawNeckwear(g, L, bx, top) {
|
|
149
|
+
const c = L.neckCol || '#D8343F';
|
|
150
|
+
g.strokeStyle = INK; g.lineWidth = 6;
|
|
151
|
+
if (L.neck === 'bowtie') {
|
|
152
|
+
const y = top + 24, bt = new Path2D();
|
|
153
|
+
bt.moveTo(bx, y); bt.bezierCurveTo(bx - 30, y - 30, bx - 64, y - 26, bx - 62, y); bt.bezierCurveTo(bx - 64, y + 26, bx - 30, y + 30, bx, y);
|
|
154
|
+
bt.bezierCurveTo(bx + 30, y - 30, bx + 64, y - 26, bx + 62, y); bt.bezierCurveTo(bx + 64, y + 26, bx + 30, y + 30, bx, y);
|
|
155
|
+
g.fillStyle = c; g.fill(bt);
|
|
156
|
+
if (L.dots) { g.save(); g.clip(bt); g.fillStyle = '#FFFFFF'; for (let i = -3; i <= 3; i++) for (let j = -1; j <= 1; j++) { g.beginPath(); g.arc(bx + i * 18 + (j & 1) * 9, y + j * 15, 4.5, 0, 7); g.fill(); } g.restore(); }
|
|
157
|
+
g.stroke(bt); g.fillStyle = shadeOf(c, 0.75); g.beginPath(); g.roundRect(bx - 13, y - 13, 26, 26, 6); g.fill(); g.stroke();
|
|
158
|
+
} else if (L.neck === 'tie') {
|
|
159
|
+
g.fillStyle = c; g.beginPath(); g.moveTo(bx - 14, top + 10); g.lineTo(bx + 14, top + 10); g.lineTo(bx + 20, top + 140); g.lineTo(bx, top + 170); g.lineTo(bx - 20, top + 140); g.closePath(); g.fill(); g.stroke();
|
|
160
|
+
} else if (L.neck === 'scarf') {
|
|
161
|
+
g.fillStyle = c; g.beginPath(); g.moveTo(bx + 20, top + 20); g.lineTo(bx + 58, top + 130); g.lineTo(bx + 24, top + 138); g.lineTo(bx + 6, top + 26); g.closePath(); g.fill(); g.stroke();
|
|
162
|
+
g.beginPath(); g.moveTo(bx - 70, top + 4); g.quadraticCurveTo(bx, top + 44, bx + 70, top + 4); g.lineTo(bx + 66, top + 34); g.quadraticCurveTo(bx, top + 76, bx - 66, top + 34); g.closePath(); g.fill(); g.stroke();
|
|
163
|
+
g.strokeStyle = shadeOf(c, 0.75); g.lineWidth = 4; g.beginPath(); g.moveTo(bx - 50, top + 26); g.quadraticCurveTo(bx, top + 56, bx + 50, top + 26); g.stroke();
|
|
164
|
+
} else if (L.neck === 'collar') {
|
|
165
|
+
g.fillStyle = '#FFFFFF';
|
|
166
|
+
[-1, 1].forEach((s) => { g.beginPath(); g.moveTo(bx, top + 18); g.lineTo(bx + s * 56, top + 2); g.lineTo(bx + s * 40, top + 46); g.closePath(); g.fill(); g.stroke(); });
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function eye(g, x, y, S, side, L) {
|
|
171
|
+
const [lx, ly] = S.look; const m = S.mood; const bl = S.blink || 0;
|
|
172
|
+
g.fillStyle = INK; g.strokeStyle = INK;
|
|
173
|
+
if (m === 'happy' || m === 'laugh' || (m === 'proud' && side > 0 && false)) {
|
|
174
|
+
g.lineWidth = 10; g.beginPath(); g.arc(x, y + 10, 20, Math.PI * 1.15, Math.PI * 1.85); g.stroke(); return;
|
|
175
|
+
}
|
|
176
|
+
if (m === 'dizzy') { g.lineWidth = 6; g.beginPath(); for (let a = 0; a < 12; a += 0.3) { const rr = a * 1.6; g.lineTo(x + Math.cos(a * side) * rr, y + Math.sin(a * side) * rr); } g.stroke(); return; }
|
|
177
|
+
if (m === 'angry' && false) return;
|
|
178
|
+
if (m === 'shock') {
|
|
179
|
+
g.fillStyle = '#FFFFFF'; g.lineWidth = 6; g.beginPath(); g.ellipse(x, y, 26, 30, 0, 0, 7); g.fill(); g.stroke();
|
|
180
|
+
g.fillStyle = INK; g.beginPath(); g.arc(x + lx * 8, y + ly * 8, 7, 0, 7); g.fill(); return;
|
|
181
|
+
}
|
|
182
|
+
if (bl > 0.6) { g.lineWidth = 8; g.beginPath(); g.moveTo(x - 14, y + 4); g.quadraticCurveTo(x, y + 10, x + 14, y + 4); g.stroke(); return; }
|
|
183
|
+
// pupil
|
|
184
|
+
const px = x + lx * 9, py = y + ly * 8;
|
|
185
|
+
g.beginPath(); g.ellipse(px, py, 13, 17 * (1 - bl * 0.6), 0, 0, 7); g.fill();
|
|
186
|
+
if (m === 'smug' || m === 'tired' || m === 'sly' || m === 'proud') { // heavy lid over the top half
|
|
187
|
+
g.fillStyle = L.head; g.fillRect(x - 24, y - 28, 48, 26 + (m === 'tired' ? 6 : 0));
|
|
188
|
+
g.lineWidth = 7; g.beginPath(); g.moveTo(x - 20, y - 2 + (m === 'tired' ? 6 : 0)); g.lineTo(x + 20, y - 2 + (m === 'tired' ? 6 : 0)); g.stroke();
|
|
189
|
+
}
|
|
190
|
+
if (m === 'sad' || m === 'worried') { g.fillStyle = '#FFFFFF'; g.beginPath(); g.arc(px - 3, py - 5, 3.5, 0, 7); g.fill(); }
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
function drawFace(g, L, S, hx, hy) {
|
|
194
|
+
const m = S.mood, ex = 46, ey = hy + 4;
|
|
195
|
+
// eyebrows
|
|
196
|
+
const brow = { neutral: [4, 0], smug: [-8, 10], happy: [8, 0], laugh: [10, 0], shock: [24, 0], worried: [10, -16], angry: [-10, 22],
|
|
197
|
+
sad: [8, -18], sly: [-6, 12], proud: [6, 4], tired: [-2, 0], dizzy: [14, 0] }[m] || [4, 0];
|
|
198
|
+
g.strokeStyle = INK; g.lineWidth = 12;
|
|
199
|
+
[-1, 1].forEach((s) => {
|
|
200
|
+
let lift = brow[0], tilt = brow[1] * s; // tilt > 0: inner end lower (angry)
|
|
201
|
+
if ((m === 'smug' || m === 'sly') && s > 0) { lift = 16; tilt = -4; }
|
|
202
|
+
const y = ey - 44 - lift;
|
|
203
|
+
g.beginPath(); g.moveTo(hx + s * (ex - 26), y + tilt * 0.5); g.quadraticCurveTo(hx + s * ex, y - 7, hx + s * (ex + 26), y - tilt * 0.5);
|
|
204
|
+
g.stroke();
|
|
205
|
+
});
|
|
206
|
+
eye(g, hx - ex, ey, S, -1, L); eye(g, hx + ex, ey, S, 1, L);
|
|
207
|
+
if (L.extra.includes('glasses')) { g.strokeStyle = INK; g.lineWidth = 5; [-1, 1].forEach((s) => { g.beginPath(); g.arc(hx + s * ex, ey, 30, 0, 7); g.stroke(); }); g.beginPath(); g.moveTo(hx - 16, ey - 4); g.lineTo(hx + 16, ey - 4); g.stroke(); }
|
|
208
|
+
if (L.extra.includes('monocle')) { g.strokeStyle = '#C9A13B'; g.lineWidth = 5; g.beginPath(); g.arc(hx + ex, ey, 30, 0, 7); g.stroke(); g.beginPath(); g.moveTo(hx + ex + 22, ey + 22); g.quadraticCurveTo(hx + ex + 40, ey + 90, hx + ex + 10, ey + 140); g.stroke(); }
|
|
209
|
+
if (L.extra.includes('blush') || m === 'laugh' || m === 'proud') { g.fillStyle = 'rgba(240,120,130,0.35)'; [-1, 1].forEach((s) => { g.beginPath(); g.ellipse(hx + s * 78, ey + 40, 22, 12, 0, 0, 7); g.fill(); }); }
|
|
210
|
+
if (L.extra.includes('freckles')) { g.fillStyle = '#C98A64'; [-1, 1].forEach((s) => [[0, 0], [12, 8], [-10, 10]].forEach(([dx, dy]) => { g.beginPath(); g.arc(hx + s * (74 + dx), ey + 36 + dy, 3.5, 0, 7); g.fill(); })); }
|
|
211
|
+
// mouth
|
|
212
|
+
const my = ey + 62, t = S.talk || 0;
|
|
213
|
+
g.strokeStyle = INK; g.fillStyle = INK; g.lineWidth = 8;
|
|
214
|
+
const openMouth = (w, h, tongue = true) => {
|
|
215
|
+
g.beginPath(); g.ellipse(hx, my + h * 0.3, w, Math.max(4, h), 0, 0, 7); g.fillStyle = '#3A1A2A'; g.fill(); g.stroke();
|
|
216
|
+
if (tongue && h > 12) { g.save(); g.clip(); g.fillStyle = '#E2697A'; g.beginPath(); g.ellipse(hx, my + h * 1.1, w * 0.7, h * 0.6, 0, 0, 7); g.fill(); g.restore(); }
|
|
217
|
+
};
|
|
218
|
+
if (m === 'shock') openMouth(16, 20 + t * 6);
|
|
219
|
+
else if (m === 'laugh') { g.beginPath(); g.moveTo(hx - 40, my - 6); g.quadraticCurveTo(hx, my - 2, hx + 40, my - 6); g.quadraticCurveTo(hx + 34, my + 52, hx, my + 52); g.quadraticCurveTo(hx - 34, my + 52, hx - 40, my - 6); g.closePath(); g.fillStyle = '#3A1A2A'; g.fill(); g.save(); g.clip(); g.fillStyle = '#E2697A'; g.beginPath(); g.ellipse(hx, my + 50, 24, 18, 0, 0, 7); g.fill(); g.fillStyle = '#FFFFFF'; g.fillRect(hx - 40, my - 10, 80, 12); g.restore(); g.stroke(); }
|
|
220
|
+
else if (t > 0.05) openMouth(14 + t * 10, 6 + t * 18);
|
|
221
|
+
else if (m === 'happy' || m === 'proud') { g.beginPath(); g.moveTo(hx - 28, my); g.quadraticCurveTo(hx, my + 26, hx + 28, my); g.stroke(); }
|
|
222
|
+
else if (m === 'smug' || m === 'sly') { g.beginPath(); g.moveTo(hx - 22, my + 6); g.quadraticCurveTo(hx + 4, my + 16, hx + 24, my - 4); g.stroke(); }
|
|
223
|
+
else if (m === 'worried') { g.beginPath(); g.moveTo(hx - 26, my + 8); g.bezierCurveTo(hx - 12, my - 4, hx + 8, my + 14, hx + 26, my + 2); g.stroke(); }
|
|
224
|
+
else if (m === 'angry') { g.beginPath(); g.moveTo(hx - 30, my + 12); g.quadraticCurveTo(hx, my - 8, hx + 30, my + 12); g.stroke(); g.lineWidth = 5; g.fillStyle = '#FFFFFF'; g.beginPath(); g.roundRect(hx - 24, my - 2, 48, 14, 6); g.fill(); g.stroke(); }
|
|
225
|
+
else if (m === 'sad') { g.beginPath(); g.moveTo(hx - 24, my + 12); g.quadraticCurveTo(hx, my - 4, hx + 24, my + 12); g.stroke(); }
|
|
226
|
+
else if (m === 'tired' || m === 'dizzy') { g.beginPath(); g.moveTo(hx - 18, my + 6); g.lineTo(hx + 18, my + 6); g.stroke(); }
|
|
227
|
+
else { g.beginPath(); g.moveTo(hx - 20, my + 2); g.quadraticCurveTo(hx, my + 14, hx + 20, my + 2); g.stroke(); }
|
|
228
|
+
if (L.extra.includes('mustache')) {
|
|
229
|
+
g.fillStyle = L.mustacheCol || '#3A2A22'; g.strokeStyle = INK; g.lineWidth = 4;
|
|
230
|
+
g.beginPath(); g.moveTo(hx, my - 18); g.bezierCurveTo(hx - 20, my - 32, hx - 60, my - 22, hx - 64, my - 2); g.bezierCurveTo(hx - 44, my - 8, hx - 20, my - 4, hx, my - 10);
|
|
231
|
+
g.bezierCurveTo(hx + 20, my - 4, hx + 44, my - 8, hx + 64, my - 2); g.bezierCurveTo(hx + 60, my - 22, hx + 20, my - 32, hx, my - 18); g.fill(); g.stroke();
|
|
232
|
+
}
|
|
233
|
+
if (L.extra.includes('pencil')) { g.save(); g.translate(hx + 132, hy - 50); g.rotate(-0.5); g.fillStyle = '#F2C230'; g.fillRect(-8, -60, 16, 120); g.fillStyle = '#E58A9A'; g.fillRect(-8, -70, 16, 14); g.strokeStyle = INK; g.lineWidth = 4; g.strokeRect(-8, -70, 16, 130); g.restore(); }
|
|
234
|
+
if (S.sweat || m === 'worried') { const k = S.sweat ?? 1; g.globalAlpha = Math.min(1, k); g.fillStyle = '#8FD3F4'; g.strokeStyle = INK; g.lineWidth = 4; g.beginPath(); const sx = hx + 104, sy = hy - 70; g.moveTo(sx, sy - 26); g.quadraticCurveTo(sx + 18, sy, sx, sy + 12); g.quadraticCurveTo(sx - 18, sy, sx, sy - 26); g.fill(); g.stroke(); g.globalAlpha = 1; }
|
|
235
|
+
if (S.tears || m === 'sad') { g.fillStyle = '#8FD3F4'; [-1, 1].forEach((s) => { g.beginPath(); g.ellipse(hx + s * (ex + 6), ey + 40, 7, 14, 0, 0, 7); g.fill(); }); }
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
function drawHat(g, L, hx, hy, r) {
|
|
239
|
+
const c = L.hatCol || '#7A5236', top = hy - r * 0.97;
|
|
240
|
+
g.strokeStyle = INK; g.lineWidth = LW; g.fillStyle = c;
|
|
241
|
+
const band = (y, w, col) => { g.fillStyle = col; g.fillRect(hx - w, y - 12, w * 2, 24); g.strokeRect(hx - w, y - 12, w * 2, 24); };
|
|
242
|
+
if (L.hat === 'cap') { // newsboy cap
|
|
243
|
+
g.beginPath(); g.ellipse(hx + 6, top + 34, r * 0.98, 62, -0.05, Math.PI, 0); g.closePath(); g.fill(); g.stroke();
|
|
244
|
+
g.fillStyle = shadeOf(c, 0.75); g.beginPath(); g.ellipse(hx - 24, top + 40, r * 0.78, 22, 0.05, 0, Math.PI); g.fill(); g.stroke();
|
|
245
|
+
g.fillStyle = shadeOf(c, 1.15); g.beginPath(); g.arc(hx + 6, top - 26, 12, 0, 7); g.fill(); g.stroke();
|
|
246
|
+
} else if (L.hat === 'bowler') {
|
|
247
|
+
g.beginPath(); g.ellipse(hx, top + 26, r * 1.02, 22, 0, 0, 7); g.fill(); g.stroke();
|
|
248
|
+
g.beginPath(); g.ellipse(hx, top + 14, r * 0.66, 80, 0, Math.PI, 0); g.closePath(); g.fill(); g.stroke();
|
|
249
|
+
band(top + 4, r * 0.64, L.band || shadeOf(c, 0.6));
|
|
250
|
+
} else if (L.hat === 'boater') {
|
|
251
|
+
g.fillStyle = c; g.beginPath(); g.ellipse(hx, top + 30, r * 1.3, 26, 0, 0, 7); g.fill(); g.stroke();
|
|
252
|
+
g.beginPath(); g.roundRect(hx - r * 0.66, top - 46, r * 1.32, 76, [16, 16, 4, 4]); g.fill(); g.stroke();
|
|
253
|
+
band(top + 8, r * 0.66, L.band || '#3C6FB6');
|
|
254
|
+
g.strokeStyle = shadeOf(c, 0.82); g.lineWidth = 3; for (let x = -r * 0.6; x < r * 0.6; x += 16) { g.beginPath(); g.moveTo(hx + x, top - 40); g.lineTo(hx + x + 6, top - 6); g.stroke(); }
|
|
255
|
+
} else if (L.hat === 'beanie') {
|
|
256
|
+
g.beginPath(); g.ellipse(hx, top + 50, r * 0.95, 96, 0, Math.PI, 0); g.closePath(); g.fill(); g.stroke();
|
|
257
|
+
g.fillStyle = shadeOf(c, 0.8); g.beginPath(); g.roundRect(hx - r * 0.98, top + 30, r * 1.96, 40, 18); g.fill(); g.stroke();
|
|
258
|
+
g.fillStyle = L.band || '#F4EFE4'; g.beginPath(); g.arc(hx, top - 52, 22, 0, 7); g.fill(); g.stroke();
|
|
259
|
+
} else if (L.hat === 'visor') {
|
|
260
|
+
g.fillStyle = 'rgba(70,190,120,0.85)'; g.beginPath(); g.moveTo(hx - r * 1.0, top + 70); g.quadraticCurveTo(hx, top + 10, hx + r * 1.0, top + 70); g.lineTo(hx + r * 1.15, top + 98); g.quadraticCurveTo(hx, top + 54, hx - r * 1.15, top + 98); g.closePath(); g.fill(); g.stroke();
|
|
261
|
+
g.fillStyle = c; g.beginPath(); g.moveTo(hx - r * 0.96, top + 64); g.quadraticCurveTo(hx, top + 4, hx + r * 0.96, top + 64); g.lineTo(hx + r * 0.9, top + 80); g.quadraticCurveTo(hx, top + 24, hx - r * 0.9, top + 80); g.closePath(); g.fill(); g.stroke();
|
|
262
|
+
} else if (L.hat === 'tophat') {
|
|
263
|
+
g.beginPath(); g.ellipse(hx, top + 24, r * 1.0, 20, 0, 0, 7); g.fill(); g.stroke();
|
|
264
|
+
g.beginPath(); g.roundRect(hx - r * 0.6, top - 140, r * 1.2, 164, 8); g.fill(); g.stroke();
|
|
265
|
+
band(top - 4, r * 0.6, L.band || '#B5372E');
|
|
266
|
+
} else if (L.hat === 'bow') {
|
|
267
|
+
const fx = hx + r * 0.5, fy = top + 26, c2 = L.hatCol || '#D8343F'; g.fillStyle = c2; g.lineWidth = 6;
|
|
268
|
+
[-1, 1].forEach((s2) => { g.beginPath(); g.moveTo(fx, fy); g.bezierCurveTo(fx + s2 * 30, fy - 46, fx + s2 * 66, fy - 30, fx + s2 * 60, fy); g.bezierCurveTo(fx + s2 * 66, fy + 30, fx + s2 * 30, fy + 40, fx, fy); g.fill(); g.stroke(); });
|
|
269
|
+
g.beginPath(); g.arc(fx, fy, 15, 0, 7); g.fill(); g.stroke();
|
|
270
|
+
g.fillStyle = L.hairCol || '#6B4A3A'; [-1, 1].forEach((s2) => { g.beginPath(); g.ellipse(hx + s2 * (r + 4), hy + 10, 22, 50, s2 * -0.2, 0, 7); g.fill(); g.stroke(); });
|
|
271
|
+
} else if (L.hat === 'mailcap') {
|
|
272
|
+
g.fillStyle = c; g.beginPath(); g.roundRect(hx - r * 0.72, top - 40, r * 1.44, 70, [20, 20, 4, 4]); g.fill(); g.stroke();
|
|
273
|
+
g.fillStyle = INK; g.beginPath(); g.ellipse(hx - 10, top + 34, r * 0.82, 18, 0.04, 0, Math.PI); g.fill();
|
|
274
|
+
g.fillStyle = '#E2B33C'; g.beginPath(); g.arc(hx, top - 6, 13, 0, 7); g.fill(); g.lineWidth = 4; g.stroke();
|
|
275
|
+
} else if (L.hat === 'flower') {
|
|
276
|
+
const fx = hx + r * 0.62, fy = top + 40;
|
|
277
|
+
for (let i = 0; i < 6; i++) { const a = i / 6 * Math.PI * 2; g.fillStyle = L.hatCol || '#F29BB5'; g.beginPath(); g.arc(fx + Math.cos(a) * 18, fy + Math.sin(a) * 18, 14, 0, 7); g.fill(); g.lineWidth = 4; g.stroke(); }
|
|
278
|
+
g.fillStyle = '#F6C945'; g.beginPath(); g.arc(fx, fy, 11, 0, 7); g.fill(); g.stroke();
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
// ---------- props held in a hand: (g, x, y, angle, side) ----------
|
|
283
|
+
export const PROPS = {
|
|
284
|
+
parcels: (g, x, y) => { [[0, 0, 150, 90], [10, -88, 120, 80], [-6, -160, 96, 64]].forEach(([dx, dy, w, h], i) => { g.fillStyle = ['#C8935A', '#B9844E', '#D3A26A'][i]; g.strokeStyle = INK; g.lineWidth = 6; g.beginPath(); g.rect(x - w / 2 + dx - 40, y - h + dy, w, h); g.fill(); g.stroke(); g.fillStyle = '#E9D7A5'; g.fillRect(x + dx - 46, y - h + dy, 12, h); g.fillStyle = '#D8343F'; g.fillRect(x + dx + w / 2 - 70, y - h + dy + 10, 18, 22); }); },
|
|
285
|
+
book: (title = 'RULES', open = 0) => (g, x, y) => { g.save(); g.translate(x, y - 70); g.strokeStyle = INK; g.lineWidth = 6;
|
|
286
|
+
if (open > 0.5) { g.fillStyle = '#F4EFE4'; g.beginPath(); g.rect(-110, -70, 110, 140); g.rect(0, -70, 110, 140); g.fill(); g.stroke(); g.fillStyle = '#9B958A'; for (let i = 0; i < 6; i++) { g.fillRect(-96, -50 + i * 20, 82, 6); g.fillRect(14, -50 + i * 20, 82, 6); } }
|
|
287
|
+
else { g.fillStyle = '#8A2E2E'; g.beginPath(); g.roundRect(-80, -100, 160, 200, 8); g.fill(); g.stroke(); g.fillStyle = '#E2B33C'; g.font = '900 30px Inter'; g.textAlign = 'center'; g.fillText(title, 0, -20); g.fillRect(-50, 10, 100, 6); }
|
|
288
|
+
g.restore(); },
|
|
289
|
+
ticket: (g, x, y) => { g.save(); g.translate(x + 10, y - 40); g.rotate(-0.2); g.fillStyle = '#F2D37A'; g.strokeStyle = INK; g.lineWidth = 5; g.beginPath(); g.roundRect(-70, -40, 140, 80, 6); g.fill(); g.stroke(); g.fillStyle = INK; g.font = '900 24px Inter'; g.textAlign = 'center'; g.fillText('TICKET', 0, -4); g.font = '900 30px Inter'; g.fillStyle = '#B5372E'; g.fillText('$$$', 0, 30); g.restore(); },
|
|
290
|
+
purse: (g, x, y) => { g.fillStyle = '#7A5236'; g.strokeStyle = INK; g.lineWidth = 5; g.beginPath(); g.ellipse(x, y - 30, 44, 34, 0, 0, 7); g.fill(); g.stroke(); g.strokeStyle = '#C9A13B'; g.beginPath(); g.moveTo(x - 30, y - 56); g.lineTo(x + 30, y - 56); g.stroke(); g.fillStyle = '#C9C2B5'; g.beginPath(); g.arc(x + 30, y - 6, 4, 0, 7); g.fill(); },
|
|
291
|
+
letters: (g, x, y) => { for (let i = 0; i < 3; i++) { g.save(); g.translate(x - 10 + i * 10, y - 40 - i * 8); g.rotate(-0.3 + i * 0.2); g.fillStyle = i === 1 ? '#F2E6CF' : '#FFFDF4'; g.strokeStyle = INK; g.lineWidth = 4; g.beginPath(); g.rect(-50, -30, 100, 60); g.fill(); g.stroke(); g.beginPath(); g.moveTo(-50, -30); g.lineTo(0, 6); g.lineTo(50, -30); g.stroke(); g.fillStyle = '#D8343F'; g.fillRect(28, -24, 14, 16); g.restore(); } },
|
|
292
|
+
rubberStamp: (g, x, y) => { g.strokeStyle = INK; g.lineWidth = 5; g.fillStyle = '#7A5236'; g.beginPath(); g.roundRect(x - 14, y - 90, 28, 60, 8); g.fill(); g.stroke(); g.fillStyle = '#B5372E'; g.beginPath(); g.roundRect(x - 40, y - 34, 80, 28, 4); g.fill(); g.stroke(); g.fillStyle = '#7A5236'; g.beginPath(); g.arc(x, y - 100, 20, 0, 7); g.fill(); g.stroke(); },
|
|
293
|
+
stamp: (g, x, y) => { g.save(); g.translate(x, y - 40); g.fillStyle = '#FFFDF4'; g.strokeStyle = INK; g.lineWidth = 4; g.beginPath(); g.rect(-24, -30, 48, 60); g.fill(); g.stroke(); g.fillStyle = '#D8343F'; g.fillRect(-16, -22, 32, 36); g.restore(); },
|
|
294
|
+
cash: (n = 1) => (g, x, y) => { for (let i = 0; i < n; i++) bill(g, x - 30, y - 34 - i * 12, 0.06 * (i % 2 ? -1 : 1)); },
|
|
295
|
+
bill: (g, x, y) => bill(g, x - 10, y - 50, -0.5),
|
|
296
|
+
stack: (g, x, y) => { for (let i = 0; i < 5; i++) { g.fillStyle = i % 2 ? '#7FBF7A' : '#8FD08A'; g.strokeStyle = INK; g.lineWidth = 5; g.beginPath(); g.roundRect(x - 60, y - 40 - i * 16, 120, 18, 4); g.fill(); g.stroke(); } g.fillStyle = '#E9D7A5'; g.fillRect(x - 12, y - 120, 24, 82); g.strokeRect(x - 12, y - 120, 24, 82); },
|
|
297
|
+
paper: (text = 'NEWS') => (g, x, y) => { g.save(); g.translate(x, y - 70); g.rotate(-0.08); g.fillStyle = '#F2EDE0'; g.strokeStyle = INK; g.lineWidth = 5; g.beginPath(); g.rect(-70, -90, 140, 180); g.fill(); g.stroke(); g.fillStyle = INK; g.font = '900 30px Inter'; g.textAlign = 'center'; g.fillText(text, 0, -50); g.fillStyle = '#9B958A'; for (let i = 0; i < 6; i++) g.fillRect(-56, -26 + i * 18, i === 2 ? 60 : 112, 7); g.restore(); },
|
|
298
|
+
mirror: (g, x, y) => { g.strokeStyle = '#B8862F'; g.lineWidth = 12; g.beginPath(); g.moveTo(x, y); g.lineTo(x, y - 60); g.stroke(); g.fillStyle = '#E6B850'; g.strokeStyle = INK; g.lineWidth = 6; g.beginPath(); g.arc(x, y - 110, 54, 0, 7); g.fill(); g.stroke(); g.fillStyle = '#BFE6F5'; g.beginPath(); g.arc(x, y - 110, 40, 0, 7); g.fill(); g.fillStyle = 'rgba(255,255,255,0.8)'; g.beginPath(); g.ellipse(x - 14, y - 124, 9, 18, 0.6, 0, 7); g.fill(); },
|
|
299
|
+
cup: (g, x, y) => { g.fillStyle = '#F4EFE4'; g.strokeStyle = INK; g.lineWidth = 6; g.beginPath(); g.roundRect(x - 30, y - 70, 60, 70, [4, 4, 14, 14]); g.fill(); g.stroke(); g.beginPath(); g.arc(x + 34, y - 36, 16, -1.4, 1.4); g.stroke(); g.fillStyle = '#7A4A2A'; g.fillRect(x - 24, y - 64, 48, 10); },
|
|
300
|
+
key: (g, x, y) => { g.strokeStyle = INK; g.lineWidth = 5; g.fillStyle = '#E6B850'; g.beginPath(); g.arc(x, y - 60, 22, 0, 7); g.fill(); g.stroke(); g.fillRect(x - 5, y - 40, 10, 50); g.strokeRect(x - 5, y - 40, 10, 50); },
|
|
301
|
+
sign: (text = 'SALE', col = '#F2EDE0') => (g, x, y) => { g.strokeStyle = INK; g.lineWidth = 6; g.fillStyle = '#9A6A43'; g.fillRect(x - 6, y - 150, 12, 160); g.strokeRect(x - 6, y - 150, 12, 160); g.fillStyle = col; g.beginPath(); g.roundRect(x - 100, y - 250, 200, 110, 10); g.fill(); g.stroke(); g.fillStyle = INK; g.font = '900 44px Inter'; g.textAlign = 'center'; g.textBaseline = 'middle'; g.fillText(text, x, y - 194); },
|
|
302
|
+
};
|
|
303
|
+
function bill(g, x, y, rot) {
|
|
304
|
+
g.save(); g.translate(x, y); g.rotate(rot); g.fillStyle = '#9ED39A'; g.strokeStyle = INK; g.lineWidth = 5;
|
|
305
|
+
g.beginPath(); g.roundRect(-10, -26, 100, 52, 6); g.fill(); g.stroke();
|
|
306
|
+
g.strokeStyle = '#4F8F55'; g.lineWidth = 3; g.beginPath(); g.roundRect(-2, -18, 84, 36, 4); g.stroke();
|
|
307
|
+
g.fillStyle = '#4F8F55'; g.beginPath(); g.arc(40, 0, 11, 0, 7); g.fill(); g.restore();
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// ---------- the 3D cut-out ----------
|
|
311
|
+
let shadowTex = null;
|
|
312
|
+
function blobTex() {
|
|
313
|
+
if (shadowTex) return shadowTex;
|
|
314
|
+
const c = document.createElement('canvas'); c.width = c.height = 128; const g = c.getContext('2d');
|
|
315
|
+
const gr = g.createRadialGradient(64, 64, 0, 64, 64, 64); gr.addColorStop(0, 'rgba(30,20,40,0.75)'); gr.addColorStop(0.6, 'rgba(30,20,40,0.25)'); gr.addColorStop(1, 'rgba(30,20,40,0)');
|
|
316
|
+
g.fillStyle = gr; g.fillRect(0, 0, 128, 128); shadowTex = new THREE.CanvasTexture(c); return shadowTex;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export class Toon {
|
|
320
|
+
/** height = metres from feet to the top of the head (≈1.75); res = canvas scale (2 = 1024x2048) */
|
|
321
|
+
constructor(look = {}, { height = 1.75, res = 2, castShadow = true } = {}) {
|
|
322
|
+
this.look = look; this.res = res;
|
|
323
|
+
this.canvas = document.createElement('canvas'); this.canvas.width = 512 * res; this.canvas.height = 1024 * res;
|
|
324
|
+
this.g = this.canvas.getContext('2d');
|
|
325
|
+
this.tex = new THREE.CanvasTexture(this.canvas); this.tex.colorSpace = THREE.SRGBColorSpace; this.tex.anisotropy = 4;
|
|
326
|
+
const H = height / 0.96, Wd = H / 2; // the head top sits ~4% below the canvas top
|
|
327
|
+
const geo = new THREE.PlaneGeometry(Wd, H); geo.translate(0, H / 2 - H * (24 / 1024), 0);
|
|
328
|
+
this.mat = new THREE.MeshBasicMaterial({ map: this.tex, transparent: true, alphaTest: 0.04, side: THREE.DoubleSide, toneMapped: false });
|
|
329
|
+
this.mesh = new THREE.Mesh(geo, this.mat);
|
|
330
|
+
this.mesh.castShadow = castShadow;
|
|
331
|
+
this.mesh.customDepthMaterial = new THREE.MeshDepthMaterial({ depthPacking: THREE.RGBADepthPacking, map: this.tex, alphaTest: 0.5 });
|
|
332
|
+
this.blob = new THREE.Mesh(new THREE.PlaneGeometry(Wd * 0.9, Wd * 0.34), new THREE.MeshBasicMaterial({ map: blobTex(), transparent: true, depthWrite: false, opacity: 0.55 }));
|
|
333
|
+
this.blob.rotation.x = -Math.PI / 2; this.blob.position.y = 0.01;
|
|
334
|
+
this.group = new THREE.Group(); this.pivot = new THREE.Group(); this.pivot.add(this.mesh); this.group.add(this.pivot, this.blob);
|
|
335
|
+
this.key = ''; this.H = H; this.set({});
|
|
336
|
+
}
|
|
337
|
+
/** redraws only when the state changed */
|
|
338
|
+
set(st = {}) {
|
|
339
|
+
const key = JSON.stringify(st, (k, v) => (typeof v === 'function' ? (v.name || String(v).length) : typeof v === 'number' ? Math.round(v * 100) / 100 : v));
|
|
340
|
+
if (key === this.key) return this;
|
|
341
|
+
this.key = key; this.st = st;
|
|
342
|
+
const g = this.g; g.setTransform(1, 0, 0, 1, 0, 0); g.clearRect(0, 0, this.canvas.width, this.canvas.height);
|
|
343
|
+
g.scale(this.res, this.res); this.hands = drawToon(g, this.look, st);
|
|
344
|
+
this.tex.needsUpdate = true; return this;
|
|
345
|
+
}
|
|
346
|
+
/** turn the cut-out to face the camera (around the vertical axis only) */
|
|
347
|
+
face(cam) { const p = new THREE.Vector3(); this.group.getWorldPosition(p); this.pivot.rotation.y = Math.atan2(cam.position.x - p.x, cam.position.z - p.z) - this.group.rotation.y; return this; }
|
|
348
|
+
tint(col) { this.mat.color.set(col); return this; }
|
|
349
|
+
/** change the look (e.g. more stamps) and force a redraw */
|
|
350
|
+
restyle(patch) { Object.assign(this.look, patch); this.key = ''; return this; }
|
|
351
|
+
at(x, y, z) { this.group.position.set(x, y, z); return this; }
|
|
352
|
+
}
|