@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,68 @@
|
|
|
1
|
+
// Captions: 1-3 words, Inter Black, white with a thick ink outline, ONE yellow word, centre lower third.
|
|
2
|
+
// Each script line has "caps": "WHAT IF *YOU | SWALLOW *GUM?" ("|" = next caption, "*" = the yellow word).
|
|
3
|
+
// Without "caps", the line is chunked automatically (2-3 words, the longest word goes yellow).
|
|
4
|
+
// A chunk appears 0.05 s before its first word and stays until the next chunk (or shortly after the line ends).
|
|
5
|
+
import { ctx, C, clamp, lerp, seg, eob } from './lib.js';
|
|
6
|
+
import { T, lineWords } from './timing.js';
|
|
7
|
+
|
|
8
|
+
export const CAP = { y: 1400, size: 150, maxW: 900 };
|
|
9
|
+
let caps = [];
|
|
10
|
+
|
|
11
|
+
function autoChunks(text) {
|
|
12
|
+
const ws = text.toUpperCase().split(/\s+/).filter(Boolean), out = [];
|
|
13
|
+
for (let i = 0; i < ws.length;) { const n = ws.length - i === 4 ? 2 : Math.min(3, ws.length - i); out.push(ws.slice(i, i + n)); i += n; }
|
|
14
|
+
return out.map((c) => { const k = c.reduce((b, w, j) => (w.replace(/[^A-Z\u0D00-\u0D7F]/g, '').length > c[b].replace(/[^A-Z\u0D00-\u0D7F]/g, '').length ? j : b), 0); return c.map((w, j) => (j === k ? '*' + w : w)).join(' '); });
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function buildCaptions(script) {
|
|
18
|
+
caps = [];
|
|
19
|
+
script.lines.forEach((ln, i) => {
|
|
20
|
+
const chunks = (ln.caps ? ln.caps.split('|') : autoChunks(ln.text)).map((s) => s.trim()).filter(Boolean);
|
|
21
|
+
const ws = lineWords(i); if (!ws.length) return;
|
|
22
|
+
const counts = chunks.map((c) => c.split(/\s+/).length), N = counts.reduce((a, b) => a + b, 0);
|
|
23
|
+
const nm = (w) => String(w).toLowerCase().replace(/[^a-z0-9'\u0D00-\u0D7F]+/g, '');
|
|
24
|
+
let acc = 0, from = 0;
|
|
25
|
+
chunks.forEach((c, j) => {
|
|
26
|
+
// find the chunk's first word in the spoken line (from where the last chunk started); else place it by word count
|
|
27
|
+
const first = nm(c.split(/\s+/)[0]);
|
|
28
|
+
let idx = j === 0 ? 0 : ws.findIndex((w, k) => k > from && first && (nm(w.w) === first || (first.length > 2 && nm(w.w).startsWith(first))));
|
|
29
|
+
if (idx < 0) idx = Math.max(from + (j ? 1 : 0), Math.min(ws.length - 1, Math.round(acc * ws.length / N)));
|
|
30
|
+
acc += counts[j]; from = idx;
|
|
31
|
+
caps.push({ line: i, s: ws[idx].s - 0.05, words: c.split(/\s+/).map((w) => ({ txt: w.replace('*', ''), hi: w.startsWith('*') })) });
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
caps.forEach((c, k) => {
|
|
35
|
+
const next = caps[k + 1], lineEnd = T.lines[c.line].end;
|
|
36
|
+
c.e = next ? (next.s - lineEnd > 0.7 && next.line !== c.line ? lineEnd + 0.35 : next.s) : T.dur;
|
|
37
|
+
});
|
|
38
|
+
return caps;
|
|
39
|
+
}
|
|
40
|
+
export const captionList = () => caps;
|
|
41
|
+
|
|
42
|
+
export function drawCaption(t) {
|
|
43
|
+
const c = caps.find((c) => t >= c.s && t < c.e); if (!c) return;
|
|
44
|
+
const lt = t - c.s, size = CAP.size;
|
|
45
|
+
ctx.font = `900 ${size}px Inter`; ctx.letterSpacing = '-2px';
|
|
46
|
+
const sp = size * 0.26;
|
|
47
|
+
c.words.forEach((w) => (w.w = ctx.measureText(w.txt).width));
|
|
48
|
+
const width = (ws) => ws.reduce((a, w) => a + w.w, 0) + sp * (ws.length - 1);
|
|
49
|
+
let lines = [c.words];
|
|
50
|
+
if (width(c.words) > CAP.maxW && c.words.length > 1) {
|
|
51
|
+
let best = null;
|
|
52
|
+
for (let i = 1; i < c.words.length; i++) { const a = c.words.slice(0, i), b = c.words.slice(i), m = Math.max(width(a), width(b)); if (!best || m < best.m) best = { m, l: [a, b] }; }
|
|
53
|
+
lines = best.l;
|
|
54
|
+
}
|
|
55
|
+
const fit = Math.min(1, CAP.maxW / Math.max(...lines.map(width)));
|
|
56
|
+
const sc = (lt < 0.2 ? lerp(0.65, 1, eob(seg(lt, 0, 0.2))) : 1) * fit;
|
|
57
|
+
ctx.save(); ctx.translate(540, CAP.y); ctx.scale(sc, sc);
|
|
58
|
+
ctx.textBaseline = 'middle'; ctx.textAlign = 'left'; ctx.lineJoin = 'round';
|
|
59
|
+
const lh = size, y0 = -(lines.length - 1) * lh / 2;
|
|
60
|
+
lines.forEach((ln, li) => {
|
|
61
|
+
let x = -width(ln) / 2; const y = y0 + li * lh;
|
|
62
|
+
for (const w of ln) {
|
|
63
|
+
ctx.lineWidth = 30; ctx.strokeStyle = C.ink; ctx.strokeText(w.txt, x, y + 10); ctx.strokeText(w.txt, x, y);
|
|
64
|
+
ctx.fillStyle = w.hi ? C.yellow : C.white; ctx.fillText(w.txt, x, y); x += w.w + sp;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
ctx.letterSpacing = '0px'; ctx.restore();
|
|
68
|
+
}
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
// Inside Out engine: the COMPONENT ZOO. Every reusable thing on screen lives here.
|
|
2
|
+
// All functions draw immediately with the shared ctx, in 1080x1920 canvas pixels unless a scale is given.
|
|
3
|
+
import { ctx, C, W, H, TAU, lerp, clamp, rnd, rr, circle, ell, line, fillAll } from './lib.js';
|
|
4
|
+
|
|
5
|
+
// ═════════════════════════ PROPS ═════════════════════════
|
|
6
|
+
/** a piece of gum (pill shape). s = scale (1 = 80x52 px) */
|
|
7
|
+
export function gum(x, y, s, rot = 0, sx = 1, sy = 1) {
|
|
8
|
+
ctx.save(); ctx.translate(x, y); ctx.rotate(rot); ctx.scale(s * sx, s * sy);
|
|
9
|
+
rr(-40, -26, 80, 52, 24); ctx.fillStyle = C.gum; ctx.fill(); ctx.lineWidth = 5; ctx.strokeStyle = C.gumEdge; ctx.stroke();
|
|
10
|
+
ell(-14, -11, 14, 6, C.white, -0.3);
|
|
11
|
+
circle(14, 8, 4, '#E2DCD0'); circle(24, -4, 3, '#E2DCD0'); circle(-4, 10, 3, '#E2DCD0');
|
|
12
|
+
ctx.restore();
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** the J-shaped stomach (flat, pink, highlight). s = scale; pulse 0..1 swells it */
|
|
16
|
+
function stomachPath() {
|
|
17
|
+
ctx.beginPath(); ctx.moveTo(-30, -110);
|
|
18
|
+
ctx.bezierCurveTo(-30, -40, -120, -20, -100, 50);
|
|
19
|
+
ctx.bezierCurveTo(-80, 120, 40, 120, 90, 60);
|
|
20
|
+
ctx.bezierCurveTo(120, 25, 110, -10, 95, -20);
|
|
21
|
+
}
|
|
22
|
+
export function stomach(x, y, s, pulse = 0) {
|
|
23
|
+
ctx.save(); ctx.translate(x, y); ctx.scale(s, s); ctx.lineCap = 'round'; ctx.lineJoin = 'round';
|
|
24
|
+
stomachPath(); ctx.strokeStyle = C.pinkDark; ctx.lineWidth = 92 + pulse * 14; ctx.stroke();
|
|
25
|
+
stomachPath(); ctx.strokeStyle = C.pink; ctx.lineWidth = 80 + pulse * 14; ctx.stroke();
|
|
26
|
+
ctx.save(); ctx.translate(-8, -8); stomachPath(); ctx.strokeStyle = C.pinkLight; ctx.globalAlpha = 0.7; ctx.lineWidth = 22; ctx.stroke(); ctx.restore();
|
|
27
|
+
ctx.restore();
|
|
28
|
+
}
|
|
29
|
+
/** the stomach's top opening in local units (where the esophagus joins), for a stomach drawn at (x, y, s) */
|
|
30
|
+
export const stomachTop = (x, y, s) => [x - 30 * s, y - 110 * s];
|
|
31
|
+
|
|
32
|
+
/** flat heart icon. beat 0..1 scales it up */
|
|
33
|
+
export function heart(x, y, s, beat = 0) {
|
|
34
|
+
ctx.save(); ctx.translate(x, y); ctx.scale(s * (1 + beat * 0.12), s * (1 + beat * 0.12));
|
|
35
|
+
const p = () => { ctx.beginPath(); ctx.moveTo(0, 70); ctx.bezierCurveTo(-150, -20, -90, -130, 0, -60); ctx.bezierCurveTo(90, -130, 150, -20, 0, 70); };
|
|
36
|
+
p(); ctx.fillStyle = C.pinkDark; ctx.fill(); ctx.save(); ctx.translate(-6, -6); ctx.scale(0.92, 0.92); p(); ctx.fillStyle = C.red; ctx.fill(); ctx.restore();
|
|
37
|
+
ell(-48, -52, 22, 12, C.pinkLight, -0.6);
|
|
38
|
+
ctx.restore();
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** stopwatch. ang = hand angle in radians */
|
|
42
|
+
export function stopwatch(x, y, s, ang) {
|
|
43
|
+
ctx.save(); ctx.translate(x, y); ctx.scale(s, s);
|
|
44
|
+
rr(-40, -330, 80, 60, 14); ctx.fillStyle = C.watch; ctx.fill();
|
|
45
|
+
ctx.save(); ctx.rotate(0.75); rr(-22, -300, 44, 46, 10); ctx.fill(); ctx.restore();
|
|
46
|
+
circle(0, 0, 280, C.watch); circle(0, 0, 240, C.white);
|
|
47
|
+
for (let i = 0; i < 12; i++) { ctx.save(); ctx.rotate(i * Math.PI / 6); rr(-6, -226, 12, i % 3 === 0 ? 44 : 26, 6); ctx.fillStyle = C.watch; ctx.fill(); ctx.restore(); }
|
|
48
|
+
ctx.save(); ctx.rotate(ang); rr(-9, -200, 18, 220, 9); ctx.fillStyle = C.red; ctx.fill(); ctx.restore();
|
|
49
|
+
circle(0, 0, 24, C.watch);
|
|
50
|
+
ctx.restore();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** tear-off calendar card: big number + word under it. Card is 600x680 at s = 1 */
|
|
54
|
+
export function calendar(x, y, s, big, small, rot = 0) {
|
|
55
|
+
ctx.save(); ctx.translate(x, y); ctx.rotate(rot); ctx.scale(s, s);
|
|
56
|
+
rr(-300, -340, 600, 680, 46); ctx.fillStyle = C.white; ctx.fill(); ctx.lineWidth = 10; ctx.strokeStyle = C.ink; ctx.stroke();
|
|
57
|
+
rr(-300, -340, 600, 170, [46, 46, 0, 0]); ctx.fillStyle = C.red; ctx.fill(); ctx.lineWidth = 10; ctx.stroke();
|
|
58
|
+
for (const bx of [-150, 150]) { rr(bx - 18, -390, 36, 100, 18); ctx.fillStyle = C.ink; ctx.fill(); }
|
|
59
|
+
ctx.fillStyle = C.ink; ctx.textAlign = 'center'; ctx.textBaseline = 'alphabetic';
|
|
60
|
+
ctx.font = '900 330px Inter'; ctx.fillText(big, 0, 170);
|
|
61
|
+
ctx.font = '900 92px Inter'; ctx.letterSpacing = '4px'; ctx.fillText(small, 0, 285); ctx.letterSpacing = '0px';
|
|
62
|
+
ctx.restore();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// ═════════════════════════ GRAPHICS ═════════════════════════
|
|
66
|
+
/** dark rounded label ("GUM BASE"). sc animates the pop */
|
|
67
|
+
export function pill(text, x, y, size, bg = C.ink, fg = C.white, sc = 1) {
|
|
68
|
+
if (sc <= 0) return;
|
|
69
|
+
ctx.save(); ctx.translate(x, y); ctx.scale(sc, sc);
|
|
70
|
+
ctx.font = `900 ${size}px Inter`; ctx.letterSpacing = '2px';
|
|
71
|
+
const w = ctx.measureText(text).width + size * 1.1, h = size * 1.6;
|
|
72
|
+
rr(-w / 2, -h / 2, w, h, h / 2); ctx.fillStyle = bg; ctx.fill();
|
|
73
|
+
ctx.fillStyle = fg; ctx.textAlign = 'center'; ctx.textBaseline = 'middle'; ctx.fillText(text, 0, size * 0.05);
|
|
74
|
+
ctx.letterSpacing = '0px'; ctx.restore();
|
|
75
|
+
}
|
|
76
|
+
/** label with a pointer line down to a target point */
|
|
77
|
+
export function tag(text, x, y, tx, ty, size = 60, sc = 1) {
|
|
78
|
+
if (sc <= 0) return;
|
|
79
|
+
ctx.save(); ctx.globalAlpha = clamp(sc); line([[x, y], [tx, ty]], C.ink, 8); ctx.restore();
|
|
80
|
+
pill(text, x, y, size, C.ink, C.white, sc);
|
|
81
|
+
}
|
|
82
|
+
/** the danger X (red, ink outline). a = alpha */
|
|
83
|
+
export function redX(x, y, s, a = 1) {
|
|
84
|
+
if (a <= 0) return;
|
|
85
|
+
ctx.save(); ctx.translate(x, y); ctx.scale(s, s); ctx.globalAlpha = a; ctx.lineCap = 'round';
|
|
86
|
+
for (const [w, c] of [[96, C.ink], [72, C.red]]) { ctx.strokeStyle = c; ctx.lineWidth = w; ctx.beginPath(); ctx.moveTo(-230, -230); ctx.lineTo(230, 230); ctx.moveTo(230, -230); ctx.lineTo(-230, 230); ctx.stroke(); }
|
|
87
|
+
ctx.restore();
|
|
88
|
+
}
|
|
89
|
+
/** flat red arrow pointing along ang (radians). len in px */
|
|
90
|
+
export function arrow(x, y, len, ang = 0, a = 1) {
|
|
91
|
+
if (a <= 0) return;
|
|
92
|
+
ctx.save(); ctx.translate(x, y); ctx.rotate(ang); ctx.globalAlpha = a;
|
|
93
|
+
ctx.beginPath(); ctx.moveTo(-len / 2, -28); ctx.lineTo(len / 2 - 110, -28); ctx.lineTo(len / 2 - 110, -80); ctx.lineTo(len / 2, 0);
|
|
94
|
+
ctx.lineTo(len / 2 - 110, 80); ctx.lineTo(len / 2 - 110, 28); ctx.lineTo(-len / 2, 28); ctx.closePath(); ctx.fillStyle = C.red; ctx.fill();
|
|
95
|
+
ctx.restore();
|
|
96
|
+
}
|
|
97
|
+
/** red warning triangle with "!" */
|
|
98
|
+
export function warning(x, y, s) {
|
|
99
|
+
if (s <= 0) return;
|
|
100
|
+
ctx.save(); ctx.translate(x, y); ctx.scale(s, s);
|
|
101
|
+
ctx.beginPath(); ctx.moveTo(0, -130); ctx.lineTo(140, 110); ctx.lineTo(-140, 110); ctx.closePath();
|
|
102
|
+
ctx.lineJoin = 'round'; ctx.lineWidth = 40; ctx.strokeStyle = C.red; ctx.stroke(); ctx.fillStyle = C.red; ctx.fill();
|
|
103
|
+
rr(-14, -60, 28, 110, 14); ctx.fillStyle = C.white; ctx.fill(); circle(0, 82, 17, C.white);
|
|
104
|
+
ctx.restore();
|
|
105
|
+
}
|
|
106
|
+
/** "enzyme" chomper: pink pac-man. open = mouth angle (rad), flip = face left */
|
|
107
|
+
export function chomper(x, y, r, open, flip) {
|
|
108
|
+
ctx.save(); ctx.translate(x, y); if (flip) ctx.scale(-1, 1);
|
|
109
|
+
ctx.beginPath(); ctx.moveTo(0, 0); ctx.arc(0, 0, r, open, TAU - open); ctx.closePath(); ctx.fillStyle = C.pink; ctx.fill();
|
|
110
|
+
ctx.lineWidth = 6; ctx.strokeStyle = C.pinkDark; ctx.stroke(); circle(r * 0.15, -r * 0.5, r * 0.13, C.ink);
|
|
111
|
+
ctx.restore();
|
|
112
|
+
}
|
|
113
|
+
/** impact burst (yellow rays) */
|
|
114
|
+
export function burst(x, y, s, a) {
|
|
115
|
+
if (a <= 0) return;
|
|
116
|
+
ctx.save(); ctx.translate(x, y); ctx.globalAlpha = a; ctx.strokeStyle = C.yellow; ctx.lineCap = 'round'; ctx.lineWidth = 12;
|
|
117
|
+
for (let i = 0; i < 8; i++) { const an = i * Math.PI / 4; ctx.beginPath(); ctx.moveTo(Math.cos(an) * 30 * s, Math.sin(an) * 30 * s); ctx.lineTo(Math.cos(an) * 80 * s, Math.sin(an) * 80 * s); ctx.stroke(); }
|
|
118
|
+
ctx.restore();
|
|
119
|
+
}
|
|
120
|
+
/** horizontal speed lines trailing left of (x, y) */
|
|
121
|
+
export function speedLines(x, y, a) {
|
|
122
|
+
if (a <= 0) return;
|
|
123
|
+
ctx.save(); ctx.globalAlpha = a; for (let i = 0; i < 5; i++) line([[x - 80 - i * 20, y - 60 + i * 30], [x - 260 - i * 40, y - 60 + i * 30]], C.ink, 10); ctx.restore();
|
|
124
|
+
}
|
|
125
|
+
/** three "shock" strokes around a point (head reaction) */
|
|
126
|
+
export function shockLines(x, y, r, a) {
|
|
127
|
+
if (a <= 0) return;
|
|
128
|
+
ctx.save(); ctx.globalAlpha = a;
|
|
129
|
+
for (const an of [-2.4, -Math.PI / 2, -0.75]) line([[x + Math.cos(an) * r, y + Math.sin(an) * r], [x + Math.cos(an) * (r + 70), y + Math.sin(an) * (r + 70)]], C.ink, 14);
|
|
130
|
+
ctx.restore();
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// ═════════════════════════ BACKGROUNDS ═════════════════════════
|
|
134
|
+
/** (A) real world: a simple room with a window, framed picture, plant and floor */
|
|
135
|
+
export function room() {
|
|
136
|
+
fillAll(C.bg);
|
|
137
|
+
ctx.fillStyle = C.floor; ctx.fillRect(-300, 1560, W + 600, 700);
|
|
138
|
+
rr(600, 230, 360, 440, 22); ctx.fillStyle = C.white; ctx.fill();
|
|
139
|
+
rr(622, 252, 316, 396, 12); ctx.fillStyle = C.sky; ctx.fill();
|
|
140
|
+
ell(720, 360, 70, 30, C.white); ell(770, 345, 50, 34, C.white);
|
|
141
|
+
ctx.fillStyle = C.white; ctx.fillRect(772, 252, 14, 396); ctx.fillRect(622, 442, 316, 14);
|
|
142
|
+
rr(110, 330, 200, 150, 10); ctx.fillStyle = C.ink; ctx.fill(); rr(124, 344, 172, 122, 4); ctx.fillStyle = '#F7D88A'; ctx.fill();
|
|
143
|
+
ctx.beginPath(); ctx.moveTo(124, 466); ctx.lineTo(190, 390); ctx.lineTo(240, 440); ctx.lineTo(270, 410); ctx.lineTo(296, 466); ctx.fillStyle = '#E0956B'; ctx.fill();
|
|
144
|
+
for (const [x, y, r] of [[130, 1170, -0.5], [170, 1140, 0], [210, 1170, 0.5], [150, 1110, -0.2], [195, 1105, 0.25]]) ell(x, y, 26, 62, C.leaf, r);
|
|
145
|
+
rr(110, 1200, 120, 130, 14); ctx.fillStyle = C.pot; ctx.fill();
|
|
146
|
+
}
|
|
147
|
+
/** (B) x-ray: navy film with a cyan grid and a sweeping scan line */
|
|
148
|
+
export function xray(t) {
|
|
149
|
+
fillAll(C.navy);
|
|
150
|
+
ctx.strokeStyle = C.cyan; ctx.globalAlpha = 0.07; ctx.lineWidth = 2;
|
|
151
|
+
for (let x = 0; x <= W; x += 90) { ctx.beginPath(); ctx.moveTo(x, -300); ctx.lineTo(x, H + 300); ctx.stroke(); }
|
|
152
|
+
for (let y = 0; y <= H; y += 90) { ctx.beginPath(); ctx.moveTo(-300, y); ctx.lineTo(W + 300, y); ctx.stroke(); }
|
|
153
|
+
const sy = ((t * 700) % (H + 400)) - 200;
|
|
154
|
+
ctx.globalAlpha = 0.1; ctx.fillStyle = C.cyan; ctx.fillRect(-300, sy, W + 600, 70);
|
|
155
|
+
ctx.globalAlpha = 0.25; ctx.fillRect(-300, sy + 66, W + 600, 6); ctx.globalAlpha = 1;
|
|
156
|
+
}
|
|
157
|
+
/** (C) inside the stomach: wobbling pink wall, folds, acid pool (acid = 0..1 strength), rising bubbles */
|
|
158
|
+
export function insideStomach(t, acid = 1) {
|
|
159
|
+
fillAll(C.stomachBg);
|
|
160
|
+
for (let i = 0; i < 7; i++) circle(rnd(i) * W + Math.sin(t + i) * 20, rnd(i + 9) * H + Math.cos(t * 0.8 + i) * 20, 120 + rnd(i + 3) * 140, C.stomachBgDark);
|
|
161
|
+
ctx.beginPath();
|
|
162
|
+
for (let a = 0; a <= TAU + 0.01; a += 0.05) {
|
|
163
|
+
const r = 1 + 0.035 * Math.sin(3 * a + t * 2) + 0.02 * Math.sin(5 * a - t * 3);
|
|
164
|
+
const x = 540 + 480 * r * Math.cos(a), y = 880 + 660 * r * Math.sin(a); a === 0 ? ctx.moveTo(x, y) : ctx.lineTo(x, y);
|
|
165
|
+
}
|
|
166
|
+
ctx.closePath(); ctx.fillStyle = C.pink; ctx.fill();
|
|
167
|
+
ctx.save(); ctx.clip();
|
|
168
|
+
ctx.strokeStyle = C.stomachFold; ctx.lineWidth = 20; ctx.lineCap = 'round';
|
|
169
|
+
for (let i = 0; i < 5; i++) { const y0 = 360 + i * 120; ctx.beginPath(); for (let x = 80; x <= 1000; x += 20) { const y = y0 + Math.sin(x * 0.012 + t * 1.5 + i) * 26; x === 80 ? ctx.moveTo(x, y) : ctx.lineTo(x, y); } ctx.stroke(); }
|
|
170
|
+
if (acid > 0) {
|
|
171
|
+
ctx.beginPath(); ctx.moveTo(0, H); for (let x = 0; x <= W; x += 20) ctx.lineTo(x, 1180 + Math.sin(x * 0.015 + t * 3) * 18); ctx.lineTo(W, H); ctx.closePath();
|
|
172
|
+
ctx.fillStyle = C.yellow; ctx.globalAlpha = 0.55 * acid; ctx.fill(); ctx.globalAlpha = 1;
|
|
173
|
+
for (let i = 0; i < 16; i++) {
|
|
174
|
+
const ph = (t * 0.6 + rnd(i)) % 1; ctx.globalAlpha = 0.85 * (1 - ph) * acid;
|
|
175
|
+
ctx.beginPath(); ctx.arc(120 + rnd(i + 20) * 840 + Math.sin(t * 3 + i) * 12, 1400 - ph * 700, 10 + rnd(i + 5) * 18, 0, TAU);
|
|
176
|
+
ctx.strokeStyle = C.yellow; ctx.lineWidth = 6; ctx.stroke();
|
|
177
|
+
}
|
|
178
|
+
ctx.globalAlpha = 1;
|
|
179
|
+
}
|
|
180
|
+
ctx.restore();
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// ═════════════════════════ INTESTINE ═════════════════════════
|
|
184
|
+
/** serpentine gut path (5 rows) filling the upper screen; returns { pts, at(u) -> [x, y, angle], draw() } */
|
|
185
|
+
export function makeGut({ L = 210, R = 870, r = 100, y0 = 320, rows = 5 } = {}) {
|
|
186
|
+
const pts = [];
|
|
187
|
+
for (let y = y0 - 260; y < y0; y += 8) pts.push([L, y]);
|
|
188
|
+
for (let row = 0; row < rows; row++) {
|
|
189
|
+
const y = y0 + row * 2 * r, ltr = row % 2 === 0;
|
|
190
|
+
for (let i = 0; i <= 60; i++) pts.push([ltr ? lerp(L, R, i / 60) : lerp(R, L, i / 60), y]);
|
|
191
|
+
if (row < rows - 1) { const cy = y + r; for (let i = 1; i <= 24; i++) { const k = i / 24, a = ltr ? -Math.PI / 2 + k * Math.PI : -Math.PI / 2 - k * Math.PI; pts.push([(ltr ? R : L) + r * Math.cos(a), cy + r * Math.sin(a)]); } }
|
|
192
|
+
}
|
|
193
|
+
const last = pts[pts.length - 1]; for (let x = last[0]; x < 1250; x += 10) pts.push([x, last[1]]);
|
|
194
|
+
const cum = [0]; for (let i = 1; i < pts.length; i++) cum.push(cum[i - 1] + Math.hypot(pts[i][0] - pts[i - 1][0], pts[i][1] - pts[i - 1][1]));
|
|
195
|
+
const len = cum[cum.length - 1];
|
|
196
|
+
const at = (u) => { const d = clamp(u) * len; let i = 1; while (i < cum.length - 1 && cum[i] < d) i++; const a = pts[i - 1], b = pts[i], k = (d - cum[i - 1]) / ((cum[i] - cum[i - 1]) || 1); return [lerp(a[0], b[0], k), lerp(a[1], b[1], k), Math.atan2(b[1] - a[1], b[0] - a[0])]; };
|
|
197
|
+
const draw = () => {
|
|
198
|
+
const path = () => { ctx.beginPath(); ctx.moveTo(pts[0][0], pts[0][1]); for (const q of pts) ctx.lineTo(q[0], q[1]); };
|
|
199
|
+
ctx.lineCap = 'round'; ctx.lineJoin = 'round';
|
|
200
|
+
path(); ctx.strokeStyle = C.cyan; ctx.globalAlpha = 0.25; ctx.lineWidth = 112; ctx.stroke(); ctx.globalAlpha = 1;
|
|
201
|
+
path(); ctx.strokeStyle = C.pinkDark; ctx.lineWidth = 92; ctx.stroke();
|
|
202
|
+
path(); ctx.strokeStyle = C.pink; ctx.lineWidth = 76; ctx.stroke();
|
|
203
|
+
path(); ctx.strokeStyle = C.pinkLight; ctx.globalAlpha = 0.6; ctx.lineWidth = 22; ctx.stroke(); ctx.globalAlpha = 1;
|
|
204
|
+
};
|
|
205
|
+
return { pts, at, draw };
|
|
206
|
+
}
|
|
207
|
+
/** a straight gut segment across the screen at y (close-up). Returns nothing; draw blockages on top */
|
|
208
|
+
export function gutTube(y, t = 0, width = 300) {
|
|
209
|
+
const tube = () => { ctx.beginPath(); for (let x = -150; x <= 1230; x += 20) { const yy = y + Math.sin(x * 0.006 + t * 0.5) * 20; x === -150 ? ctx.moveTo(x, yy) : ctx.lineTo(x, yy); } };
|
|
210
|
+
ctx.lineCap = 'round';
|
|
211
|
+
tube(); ctx.strokeStyle = C.pinkDark; ctx.lineWidth = width + 30; ctx.stroke();
|
|
212
|
+
tube(); ctx.strokeStyle = C.pink; ctx.lineWidth = width; ctx.stroke();
|
|
213
|
+
tube(); ctx.strokeStyle = C.pinkLight; ctx.globalAlpha = 0.5; ctx.lineWidth = width * 0.2; ctx.stroke(); ctx.globalAlpha = 1;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// ═════════════════════════ CHARACTER ═════════════════════════
|
|
217
|
+
// One hero: flat man, blue tee, navy pants. Origin = chest centre; at s = 1 he is ~950 px tall (head top -480, feet +620).
|
|
218
|
+
// Arm poses are elbow/hand points for the RIGHT arm (the left mirrors). Blend them with armPose(a, b, t).
|
|
219
|
+
export const ARM = {
|
|
220
|
+
down: { e: [172, 0], h: [176, 138] },
|
|
221
|
+
mouth: { e: [220, -50], h: [58, -262] }, // hand at the mouth (eating, gasp)
|
|
222
|
+
point: { e: [240, -90], h: [205, -300] }, // index finger up (pass finger: angle)
|
|
223
|
+
wave: { e: [250, -120], h: [300, -330] },
|
|
224
|
+
hip: { e: [250, 20], h: [150, 110] },
|
|
225
|
+
};
|
|
226
|
+
export const armPose = (a, b, t) => ({ e: [lerp(a.e[0], b.e[0], t), lerp(a.e[1], b.e[1], t)], h: [lerp(a.h[0], b.h[0], t), lerp(a.h[1], b.h[1], t)] });
|
|
227
|
+
/** mouth position in the man's local coords (for things going in / out of the mouth) */
|
|
228
|
+
export const MOUTH = [0, -272];
|
|
229
|
+
/** points along the food path in local coords: mouth -> throat -> stomach top -> inside stomach */
|
|
230
|
+
export const FOOD_PATH = [[0, -262], [0, -200], [-4, -80], [-12, 58]];
|
|
231
|
+
|
|
232
|
+
function arm(side, pose, finger, xr) {
|
|
233
|
+
const sx = side, sh = [140 * sx, -170], e = [pose.e[0] * sx, pose.e[1]], h = [pose.h[0] * sx, pose.h[1]];
|
|
234
|
+
const ang = Math.atan2(h[1] - e[1], h[0] - e[0]);
|
|
235
|
+
if (xr) {
|
|
236
|
+
line([sh, e], C.cyan, 58); line([e, h], C.cyan, 52);
|
|
237
|
+
ctx.save(); ctx.translate(h[0], h[1]); ctx.rotate(ang); ell(6, 0, 38, 32, C.cyan); ctx.restore();
|
|
238
|
+
if (finger != null) { ctx.save(); ctx.translate(h[0], h[1]); ctx.rotate(finger); rr(-15, -90, 30, 88, 15); ctx.fillStyle = C.cyan; ctx.fill(); rr(-10, -85, 20, 78, 10); ctx.fillStyle = C.xnavy; ctx.fill(); line([[0, -76], [0, -10]], C.cyan, 6); ctx.restore(); }
|
|
239
|
+
line([sh, e], C.xnavy, 48); line([e, h], C.xnavy, 42);
|
|
240
|
+
ctx.save(); ctx.translate(h[0], h[1]); ctx.rotate(ang); ell(6, 0, 33, 27, C.xnavy); for (const k of [-12, 0, 12]) line([[-10, k * 0.8], [28, k]], C.cyan, 6); ctx.restore();
|
|
241
|
+
line([sh, e], C.cyan, 13); circle(e[0], e[1], 11, C.cyan);
|
|
242
|
+
const nx = -(h[1] - e[1]), ny = h[0] - e[0], nl = Math.hypot(nx, ny) || 1, ox = nx / nl * 7, oy = ny / nl * 7;
|
|
243
|
+
line([[e[0] + ox, e[1] + oy], [h[0] + ox, h[1] + oy]], C.cyan, 7); line([[e[0] - ox, e[1] - oy], [h[0] - ox, h[1] - oy]], C.cyan, 7);
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
line([sh, e], C.skin, 50); line([e, h], C.skin, 44);
|
|
247
|
+
line([sh, [lerp(sh[0], e[0], 0.55), lerp(sh[1], e[1], 0.55)]], C.shirt, 72); // short sleeve
|
|
248
|
+
if (finger != null) { ctx.save(); ctx.translate(h[0], h[1]); ctx.rotate(finger); rr(-11, -86, 22, 80, 11); ctx.fillStyle = C.skin; ctx.fill(); ctx.restore(); }
|
|
249
|
+
ctx.save(); ctx.translate(h[0], h[1]); ctx.rotate(ang); ell(6, 0, 34, 28, C.skin); ell(-2, -sx * 22, 15, 10, C.skin, -0.5 * sx); ctx.restore();
|
|
250
|
+
}
|
|
251
|
+
function torsoPath() {
|
|
252
|
+
ctx.beginPath(); ctx.moveTo(-50, -214);
|
|
253
|
+
ctx.bezierCurveTo(-130, -214, -162, -196, -164, -120); ctx.lineTo(-140, 192); ctx.quadraticCurveTo(-138, 210, -120, 210);
|
|
254
|
+
ctx.lineTo(120, 210); ctx.quadraticCurveTo(138, 210, 140, 192); ctx.lineTo(164, -120); ctx.bezierCurveTo(162, -196, 130, -214, 50, -214); ctx.closePath();
|
|
255
|
+
}
|
|
256
|
+
function skeletonTorso(pulse) {
|
|
257
|
+
ctx.save(); torsoPath(); ctx.clip();
|
|
258
|
+
ctx.fillStyle = C.xnavy; ctx.fillRect(-170, -220, 340, 440);
|
|
259
|
+
for (let y = -192; y < 200; y += 32) { rr(-14, y, 28, 24, 7); ctx.fillStyle = C.cyan; ctx.globalAlpha = 0.9; ctx.fill(); }
|
|
260
|
+
ctx.globalAlpha = 1; ctx.strokeStyle = C.cyan; ctx.lineCap = 'round';
|
|
261
|
+
for (const sd of [-1, 1]) {
|
|
262
|
+
ctx.lineWidth = 13; ctx.beginPath(); ctx.moveTo(sd * 22, -186); ctx.quadraticCurveTo(sd * 80, -202, sd * 146, -180); ctx.stroke();
|
|
263
|
+
for (let i = 0; i < 6; i++) { const y = -150 + i * 37; ctx.lineWidth = 11; ctx.beginPath(); ctx.moveTo(sd * 18, y); ctx.quadraticCurveTo(sd * 152, y - 26, sd * 116, y + 56); ctx.stroke(); }
|
|
264
|
+
ctx.lineWidth = 12; ctx.beginPath(); ctx.ellipse(sd * 72, 232, 74, 46, 0, Math.PI, TAU); ctx.stroke();
|
|
265
|
+
}
|
|
266
|
+
line([[0, -205], [-4, -80]], C.pink, 22);
|
|
267
|
+
stomach(20, 10, 0.8, pulse);
|
|
268
|
+
ctx.restore();
|
|
269
|
+
ctx.save(); ctx.globalAlpha = 0.8; torsoPath(); ctx.strokeStyle = C.cyan; ctx.lineWidth = 7; ctx.stroke(); ctx.restore();
|
|
270
|
+
}
|
|
271
|
+
function head(o) {
|
|
272
|
+
ctx.save(); ctx.translate(0, -350);
|
|
273
|
+
ell(0, -34, 116, 94, C.hair);
|
|
274
|
+
for (const sd of [-1, 1]) { ell(sd * 104, 14, 22, 28, C.skin); ell(sd * 106, 14, 10, 15, C.skinShade); }
|
|
275
|
+
ell(0, 12, 102, 112, C.skin);
|
|
276
|
+
// fringe with side part
|
|
277
|
+
ctx.beginPath(); ctx.moveTo(-104, -6); ctx.quadraticCurveTo(-118, -112, -14, -124); ctx.quadraticCurveTo(96, -132, 112, -26);
|
|
278
|
+
ctx.quadraticCurveTo(92, -70, 40, -74); ctx.quadraticCurveTo(-20, -76, -58, -50); ctx.quadraticCurveTo(-86, -34, -104, -6); ctx.closePath();
|
|
279
|
+
ctx.fillStyle = C.hair; ctx.fill(); rr(-106, -40, 18, 46, 8); ctx.fill(); rr(88, -40, 18, 46, 8); ctx.fill();
|
|
280
|
+
ctx.beginPath(); ctx.moveTo(-60, -98); ctx.quadraticCurveTo(0, -118, 62, -96); ctx.strokeStyle = C.hairHi; ctx.lineWidth = 9; ctx.lineCap = 'round'; ctx.stroke();
|
|
281
|
+
// brows: brow 0..1 raises them; smirk tilts
|
|
282
|
+
const br = (o.brow || 0) * 16, tl = o.smirk ? 1 : 0, fr = o.frown ? 1 : 0;
|
|
283
|
+
ctx.strokeStyle = C.hair; ctx.lineWidth = 12;
|
|
284
|
+
ctx.beginPath(); ctx.moveTo(-66, -26 - br - fr * 6); ctx.quadraticCurveTo(-44, -40 - br - tl * 4, -20, -32 - br + tl * 6 + fr * 12); ctx.stroke();
|
|
285
|
+
ctx.beginPath(); ctx.moveTo(20, -32 - br - tl * 8 + fr * 12); ctx.quadraticCurveTo(44, -42 - br - tl * 10, 66, -28 - br - tl * 6 - fr * 6); ctx.stroke();
|
|
286
|
+
// eyes: 'n' | 'wide' | 'closed'
|
|
287
|
+
if (o.eyes === 'wide') {
|
|
288
|
+
for (const sd of [-1, 1]) { ctx.beginPath(); ctx.ellipse(sd * 40, 6, 24, 27, 0, 0, TAU); ctx.fillStyle = C.white; ctx.fill(); ctx.lineWidth = 4; ctx.strokeStyle = C.ink; ctx.stroke(); circle(sd * 40, 8, 12, C.ink); circle(sd * 40 + 4, 3, 4, C.white); }
|
|
289
|
+
} else if (o.eyes === 'closed') {
|
|
290
|
+
for (const sd of [-1, 1]) { ctx.beginPath(); ctx.arc(sd * 40, 2, 13, 0.15 * Math.PI, 0.85 * Math.PI); ctx.strokeStyle = C.ink; ctx.lineWidth = 7; ctx.stroke(); }
|
|
291
|
+
} else {
|
|
292
|
+
const look = o.look || 0;
|
|
293
|
+
for (const sd of [-1, 1]) { ell(sd * 40 + look * 6, 6, 11, 14, C.ink); circle(sd * 40 + 4 + look * 6, 1, 4, C.white); }
|
|
294
|
+
}
|
|
295
|
+
ctx.beginPath(); ctx.moveTo(4, 26); ctx.quadraticCurveTo(16, 44, 0, 48); ctx.strokeStyle = C.skinShade; ctx.lineWidth = 7; ctx.lineCap = 'round'; ctx.stroke();
|
|
296
|
+
ctx.globalAlpha = 0.3; for (const sd of [-1, 1]) ell(sd * 62, 46, 20, 12, C.pink); ctx.globalAlpha = 1;
|
|
297
|
+
// mouth: 'smile' | 'smirk' | 'chew' | 'o' | 'flat' | 'grin'
|
|
298
|
+
const m = o.mouth || 'smile'; ctx.lineCap = 'round'; ctx.strokeStyle = C.mouth; ctx.lineWidth = 8;
|
|
299
|
+
if (m === 'smile') { ctx.beginPath(); ctx.moveTo(-24, 70); ctx.quadraticCurveTo(0, 90, 24, 70); ctx.stroke(); }
|
|
300
|
+
if (m === 'smirk') { ctx.beginPath(); ctx.moveTo(-22, 74); ctx.quadraticCurveTo(8, 88, 32, 64); ctx.stroke(); }
|
|
301
|
+
if (m === 'flat') { ctx.beginPath(); ctx.moveTo(-20, 76); ctx.lineTo(20, 76); ctx.stroke(); }
|
|
302
|
+
if (m === 'chew') ell(0, 76, 18, 4 + 8 * (o.chew || 0), C.mouth);
|
|
303
|
+
if (m === 'o') { ell(0, 80, 20, 27, C.mouth); ell(0, 96, 13, 8, C.pink); }
|
|
304
|
+
if (m === 'grin') { ctx.beginPath(); ctx.moveTo(-34, 66); ctx.quadraticCurveTo(0, 112, 34, 66); ctx.closePath(); ctx.fillStyle = C.mouth; ctx.fill(); rr(-26, 66, 52, 12, 4); ctx.fillStyle = C.white; ctx.fill(); }
|
|
305
|
+
ctx.restore();
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* The hero. o = { x, y, s, arm (pose), finger (rad or null), eyes, mouth, chew, brow, smirk, frown, look (-1..1),
|
|
309
|
+
* xray (bool: whole body becomes x-ray, head stays normal), pulse (stomach swell 0..1),
|
|
310
|
+
* holding: [drawFn(x, y)] drawn at the right hand, inside: [x, y, rot] a gum drawn inside the body (local coords) }
|
|
311
|
+
*/
|
|
312
|
+
export function man(o) {
|
|
313
|
+
const s = o.s || 1, XR = !!o.xray;
|
|
314
|
+
ctx.save(); ctx.translate(o.x, o.y); ctx.scale(s, s);
|
|
315
|
+
if (XR) {
|
|
316
|
+
for (const x of [-128, 6]) {
|
|
317
|
+
rr(x, 180, 122, 440, 40); ctx.fillStyle = C.xnavy; ctx.fill(); ctx.lineWidth = 7; ctx.strokeStyle = C.cyan; ctx.stroke();
|
|
318
|
+
const cx = x + 61; line([[cx, 200], [cx, 380]], C.cyan, 16); circle(cx, 400, 20, C.cyan); line([[cx - 9, 420], [cx - 9, 600]], C.cyan, 8); line([[cx + 9, 420], [cx + 9, 600]], C.cyan, 8);
|
|
319
|
+
}
|
|
320
|
+
rr(-36, -250, 72, 60, 20); ctx.fillStyle = C.xnavy; ctx.fill();
|
|
321
|
+
for (let y = -246; y < -200; y += 22) { rr(-13, y, 26, 16, 6); ctx.fillStyle = C.cyan; ctx.fill(); }
|
|
322
|
+
} else {
|
|
323
|
+
rr(-128, 180, 122, 440, 40); ctx.fillStyle = C.pants; ctx.fill(); rr(6, 180, 122, 440, 40); ctx.fill();
|
|
324
|
+
rr(6, 180, 40, 440, [0, 0, 0, 30]); ctx.fillStyle = C.pantsShade; ctx.fill();
|
|
325
|
+
rr(-36, -250, 72, 60, 20); ctx.fillStyle = C.skin; ctx.fill();
|
|
326
|
+
}
|
|
327
|
+
arm(-1, o.armL || ARM.down, null, XR);
|
|
328
|
+
if (XR) skeletonTorso(o.pulse || 0);
|
|
329
|
+
else {
|
|
330
|
+
torsoPath(); ctx.fillStyle = C.shirt; ctx.fill();
|
|
331
|
+
ctx.save(); torsoPath(); ctx.clip(); ctx.beginPath(); ctx.moveTo(95, -220); ctx.quadraticCurveTo(70, 0, 100, 220); ctx.lineTo(200, 220); ctx.lineTo(200, -220); ctx.closePath(); ctx.fillStyle = C.shirtShade; ctx.fill(); ctx.restore();
|
|
332
|
+
ctx.beginPath(); ctx.ellipse(0, -214, 46, 26, 0, 0, Math.PI); ctx.fillStyle = C.skin; ctx.fill(); ctx.strokeStyle = C.shirtShade; ctx.lineWidth = 12; ctx.stroke();
|
|
333
|
+
}
|
|
334
|
+
head(o);
|
|
335
|
+
const ra = o.arm || ARM.down;
|
|
336
|
+
arm(1, ra, o.finger ?? null, XR);
|
|
337
|
+
if (o.holding) o.holding(ra.h[0] - 34, ra.h[1] - 14);
|
|
338
|
+
if (o.inside) gum(o.inside[0], o.inside[1], 0.5, o.inside[2] || 0);
|
|
339
|
+
ctx.restore();
|
|
340
|
+
}
|
|
341
|
+
/** follow FOOD_PATH: u 0..1 → [x, y] in the man's local coords */
|
|
342
|
+
export function foodAt(u) {
|
|
343
|
+
const P = FOOD_PATH, n = P.length - 1, k = clamp(u) * n, i = Math.min(n - 1, Math.floor(k)), f = k - i;
|
|
344
|
+
return [lerp(P[i][0], P[i + 1][0], f), lerp(P[i][1], P[i + 1][1], f)];
|
|
345
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Inside Out engine: canvas, palette, math and drawing primitives.
|
|
2
|
+
// Every drawing function in the kit uses the shared `ctx` exported here (set once by main.js).
|
|
3
|
+
export const W = 1080, H = 1920, FPS = 30;
|
|
4
|
+
export let ctx = null;
|
|
5
|
+
export function setCtx(c) { ctx = c; }
|
|
6
|
+
|
|
7
|
+
// The style sheet palette. Only these (plus the derived shades) appear on screen.
|
|
8
|
+
export const C = {
|
|
9
|
+
skin: '#E8B89A', pink: '#E57A8A', red: '#D62839', cyan: '#4FD1E8', yellow: '#FFD43B', bg: '#F4F1EA',
|
|
10
|
+
// derived shades (darker / lighter tones of the palette, used for flat shading)
|
|
11
|
+
pinkLight: '#F29AA7', pinkDark: '#C9566E', skinShade: '#D49C7E', navy: '#0E1A2B', xnavy: '#0B2238',
|
|
12
|
+
hair: '#3B2A20', hairHi: '#5A4030', shirt: '#3A7BD5', shirtShade: '#2F67BE', pants: '#1F2A44', pantsShade: '#18213A',
|
|
13
|
+
ink: '#1A1A1E', mouth: '#6B2A2A', gum: '#F7F4EE', gumEdge: '#C9C2B5', white: '#FFFFFF',
|
|
14
|
+
stomachBg: '#B83A55', stomachBgDark: '#A3304A', stomachFold: '#D4637C', floor: '#E4DCCB', sky: '#BFE3F2',
|
|
15
|
+
leaf: '#5BAE6A', pot: '#C8734A', watch: '#1E2A44',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// ---------- math ----------
|
|
19
|
+
export const clamp = (v, a = 0, b = 1) => Math.max(a, Math.min(b, v));
|
|
20
|
+
export const lerp = (a, b, t) => a + (b - a) * t;
|
|
21
|
+
export const seg = (t, a, b) => clamp((t - a) / ((b - a) || 1e-6));
|
|
22
|
+
export const eo = (t) => 1 - Math.pow(1 - t, 3);
|
|
23
|
+
export const eio = (t) => (t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2);
|
|
24
|
+
export const eob = (t) => { const c1 = 1.70158, c3 = c1 + 1; return 1 + c3 * Math.pow(t - 1, 3) + c1 * Math.pow(t - 1, 2); };
|
|
25
|
+
export const rnd = (i) => { const x = Math.sin(i * 127.1 + 311.7) * 43758.5453; return x - Math.floor(x); };
|
|
26
|
+
export const TAU = Math.PI * 2;
|
|
27
|
+
|
|
28
|
+
// ---------- primitives ----------
|
|
29
|
+
export function rr(x, y, w, h, r) { ctx.beginPath(); ctx.roundRect(x, y, w, h, r); }
|
|
30
|
+
export function circle(x, y, r, fill) { ctx.beginPath(); ctx.arc(x, y, r, 0, TAU); ctx.fillStyle = fill; ctx.fill(); }
|
|
31
|
+
export function ell(x, y, rx, ry, fill, rot = 0) { ctx.beginPath(); ctx.ellipse(x, y, rx, ry, rot, 0, TAU); ctx.fillStyle = fill; ctx.fill(); }
|
|
32
|
+
export function line(pts, color, w) {
|
|
33
|
+
ctx.beginPath(); ctx.moveTo(pts[0][0], pts[0][1]);
|
|
34
|
+
for (let i = 1; i < pts.length; i++) ctx.lineTo(pts[i][0], pts[i][1]);
|
|
35
|
+
ctx.strokeStyle = color; ctx.lineWidth = w; ctx.lineCap = 'round'; ctx.lineJoin = 'round'; ctx.stroke();
|
|
36
|
+
}
|
|
37
|
+
export function fillAll(color) { ctx.fillStyle = color; ctx.fillRect(-300, -300, W + 600, H + 600); }
|
|
38
|
+
/** outlined bold text (the caption look), centred at x, y */
|
|
39
|
+
export function bigText(text, x, y, size, fill = C.white, rot = 0, sc = 1) {
|
|
40
|
+
ctx.save(); ctx.translate(x, y); ctx.rotate(rot); ctx.scale(sc, sc);
|
|
41
|
+
ctx.font = `900 ${size}px Inter`; ctx.textAlign = 'center'; ctx.textBaseline = 'middle'; ctx.lineJoin = 'round';
|
|
42
|
+
ctx.lineWidth = size * 0.2; ctx.strokeStyle = C.ink; ctx.strokeText(text, 0, 0); ctx.fillStyle = fill; ctx.fillText(text, 0, 0);
|
|
43
|
+
ctx.restore();
|
|
44
|
+
}
|
|
@@ -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'\u0D00-\u0D7F]+/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,62 @@
|
|
|
1
|
+
// Boot: fonts → script + timing → captions → shots. Then draw(t) renders film time t (pure function of t).
|
|
2
|
+
// window.OP is the API tools/capture.mjs drives: ready, bootError, duration(), draw(t), frame(t, q), cues(), shots().
|
|
3
|
+
import { W, H, setCtx, ctx, clamp, eo, eio } from './core/lib.js';
|
|
4
|
+
import { T, loadTiming } from './core/timing.js';
|
|
5
|
+
import { buildCaptions, drawCaption, captionList } from './core/captions.js';
|
|
6
|
+
import { buildShots } from './shots.js';
|
|
7
|
+
|
|
8
|
+
const cv = document.getElementById('cv');
|
|
9
|
+
setCtx(cv.getContext('2d'));
|
|
10
|
+
const OP = (window.OP = { ready: false });
|
|
11
|
+
|
|
12
|
+
function draw(t) {
|
|
13
|
+
t = clamp(t, 0, T.dur - 1e-4);
|
|
14
|
+
ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.globalAlpha = 1; ctx.letterSpacing = '0px';
|
|
15
|
+
ctx.fillStyle = '#000'; ctx.fillRect(0, 0, W, H);
|
|
16
|
+
const S = OP._shots; let i = S.length - 1; while (i > 0 && S[i].at > t) i--;
|
|
17
|
+
const sh = S[i], end = i < S.length - 1 ? S[i + 1].at : T.dur, d = end - sh.at, lt = t - sh.at;
|
|
18
|
+
// camera: punch-in on the cut + a slow push across the shot ("camera always moving")
|
|
19
|
+
const punch = 1 + 0.13 * (1 - eo(clamp(lt / 0.32)));
|
|
20
|
+
const drift = 1 + (sh.zoom ?? 0.06) * eio(clamp(lt / d));
|
|
21
|
+
const [cx, cy] = sh.cam || [540, 900];
|
|
22
|
+
ctx.save(); ctx.translate(cx, cy); ctx.scale(punch * drift, punch * drift); ctx.translate(-cx, -cy);
|
|
23
|
+
sh.draw(lt, d, t);
|
|
24
|
+
ctx.restore();
|
|
25
|
+
ctx.globalAlpha = 1; ctx.letterSpacing = '0px';
|
|
26
|
+
if (i > 0 && lt < 0.12) { ctx.fillStyle = '#FFFFFF'; ctx.globalAlpha = 0.55 * (1 - lt / 0.12); ctx.fillRect(0, 0, W, H); ctx.globalAlpha = 1; }
|
|
27
|
+
// fade from / to black on the first and last 0.25 s
|
|
28
|
+
const fade = Math.min(clamp(t / 0.25), clamp((T.dur - t) / 0.35));
|
|
29
|
+
if (fade < 1) { ctx.fillStyle = '#000'; ctx.globalAlpha = 1 - fade; ctx.fillRect(0, 0, W, H); ctx.globalAlpha = 1; }
|
|
30
|
+
drawCaption(t);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
(async () => {
|
|
34
|
+
try {
|
|
35
|
+
await document.fonts.load('900 100px Inter'); await document.fonts.load('900 100px Inter', 'മലയാളം').catch(() => {});
|
|
36
|
+
const script = await (await fetch('script.json', { cache: 'no-store' })).json();
|
|
37
|
+
await loadTiming();
|
|
38
|
+
buildCaptions(script);
|
|
39
|
+
const { shots, cues } = buildShots();
|
|
40
|
+
shots.sort((a, b) => a.at - b.at);
|
|
41
|
+
OP._shots = shots; OP.script = script;
|
|
42
|
+
OP.duration = () => T.dur;
|
|
43
|
+
OP.draw = draw;
|
|
44
|
+
OP.frame = (t, q = 0.92) => { draw(t); return cv.toDataURL('image/jpeg', q); };
|
|
45
|
+
OP.shots = () => shots.map((s, i) => ({ id: s.id, at: +s.at.toFixed(3), end: +(i < shots.length - 1 ? shots[i + 1].at : T.dur).toFixed(3), note: s.note || '' }));
|
|
46
|
+
OP.captions = () => captionList().map((c) => ({ s: +c.s.toFixed(3), e: +c.e.toFixed(3), text: c.words.map((w) => (w.hi ? '*' : '') + w.txt).join(' ') }));
|
|
47
|
+
OP.cues = () => cues.slice().sort((a, b) => a.t - b.t);
|
|
48
|
+
OP.ready = true;
|
|
49
|
+
// preview mode (not capture): play in real time, ?t=12.3 to hold a frame
|
|
50
|
+
const q = new URLSearchParams(location.search);
|
|
51
|
+
if (!q.has('capture')) {
|
|
52
|
+
if (q.has('t')) draw(+q.get('t'));
|
|
53
|
+
else {
|
|
54
|
+
const audio = new Audio('data/mix.wav'); let t0 = null;
|
|
55
|
+
const btn = document.getElementById('play'); btn.hidden = false;
|
|
56
|
+
btn.onclick = () => { btn.hidden = true; t0 = performance.now(); audio.currentTime = 0; audio.play().catch(() => {}); };
|
|
57
|
+
const loop = (now) => { const t = t0 == null ? 0 : (now - t0) / 1000; draw(t0 == null ? 0 : t); if (t0 != null && t > T.dur) { t0 = null; btn.hidden = false; } requestAnimationFrame(loop); };
|
|
58
|
+
requestAnimationFrame(loop);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
} catch (e) { OP.bootError = String(e && e.stack || e); console.error(e); }
|
|
62
|
+
})();
|