kasaframe 0.0.0-stage → 0.1.3
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/LICENSE +21 -0
- package/NOTICE +148 -0
- package/README.md +92 -2
- package/app/package.json +12 -0
- package/app/server/engine.ts +533 -0
- package/app/server/main.ts +209 -0
- package/app/web/env.d.ts +2 -0
- package/app/web/icons.ts +31 -0
- package/app/web/index.html +21 -0
- package/app/web/main.ts +1195 -0
- package/app/web/style.css +463 -0
- package/bin/hooks.mjs +64 -0
- package/bin/kf.mjs +32 -0
- package/docs/AGENTS.md +286 -0
- package/music/README.md +37 -0
- package/package.json +44 -4
- package/packages/adapters/package.json +36 -0
- package/packages/adapters/src/css.ts +11 -0
- package/packages/adapters/src/gsap.ts +26 -0
- package/packages/adapters/src/index.ts +9 -0
- package/packages/adapters/src/lottie.ts +22 -0
- package/packages/adapters/src/media.ts +59 -0
- package/packages/adapters/src/page.ts +229 -0
- package/packages/adapters/src/project.ts +214 -0
- package/packages/adapters/src/react.ts +36 -0
- package/packages/adapters/src/svelte.ts +22 -0
- package/packages/adapters/src/three.ts +18 -0
- package/packages/adapters/src/vue.ts +27 -0
- package/packages/check/package.json +19 -0
- package/packages/check/src/check.ts +280 -0
- package/packages/check/src/cli.ts +70 -0
- package/packages/check/src/image.ts +146 -0
- package/packages/check/src/index.ts +9 -0
- package/packages/check/src/ocr.swift +37 -0
- package/packages/check/src/probe.ts +328 -0
- package/packages/check/src/report.ts +44 -0
- package/packages/check/src/rules/assets.ts +45 -0
- package/packages/check/src/rules/beats.ts +212 -0
- package/packages/check/src/rules/camera.ts +217 -0
- package/packages/check/src/rules/captions.ts +49 -0
- package/packages/check/src/rules/flash.ts +235 -0
- package/packages/check/src/rules/frames.ts +136 -0
- package/packages/check/src/rules/layout.ts +281 -0
- package/packages/check/src/rules/page.ts +87 -0
- package/packages/check/src/rules/runs.ts +20 -0
- package/packages/check/src/rules/text.ts +326 -0
- package/packages/check/src/scan.ts +240 -0
- package/packages/check/src/serve.ts +67 -0
- package/packages/check/src/types.ts +80 -0
- package/packages/check/src/video.ts +137 -0
- package/packages/cli/package.json +30 -0
- package/packages/cli/src/blur.ts +80 -0
- package/packages/cli/src/browser.ts +203 -0
- package/packages/cli/src/command.ts +44 -0
- package/packages/cli/src/commands/app.ts +25 -0
- package/packages/cli/src/commands/beats.ts +36 -0
- package/packages/cli/src/commands/bench.ts +123 -0
- package/packages/cli/src/commands/blender.ts +293 -0
- package/packages/cli/src/commands/check.ts +25 -0
- package/packages/cli/src/commands/direct.ts +210 -0
- package/packages/cli/src/commands/doctor.ts +30 -0
- package/packages/cli/src/commands/gen.ts +173 -0
- package/packages/cli/src/commands/look.ts +46 -0
- package/packages/cli/src/commands/lyrics.ts +157 -0
- package/packages/cli/src/commands/make.ts +1121 -0
- package/packages/cli/src/commands/music.ts +78 -0
- package/packages/cli/src/commands/narrate.ts +238 -0
- package/packages/cli/src/commands/new.ts +185 -0
- package/packages/cli/src/commands/preview.ts +43 -0
- package/packages/cli/src/commands/render.ts +250 -0
- package/packages/cli/src/commands/series.ts +110 -0
- package/packages/cli/src/commands/setup.ts +102 -0
- package/packages/cli/src/commands/sheet.ts +114 -0
- package/packages/cli/src/commands/skill.ts +43 -0
- package/packages/cli/src/commands/still.ts +40 -0
- package/packages/cli/src/commands/theme.ts +172 -0
- package/packages/cli/src/commands/transitions.ts +40 -0
- package/packages/cli/src/deps.ts +122 -0
- package/packages/cli/src/ffmpeg.ts +81 -0
- package/packages/cli/src/index.ts +8 -0
- package/packages/cli/src/kf.ts +64 -0
- package/packages/cli/src/lock.ts +72 -0
- package/packages/cli/src/mix.ts +131 -0
- package/packages/cli/src/out.ts +13 -0
- package/packages/cli/src/pool.ts +34 -0
- package/packages/cli/src/segments.ts +402 -0
- package/packages/cli/src/serve.ts +124 -0
- package/packages/clock/package.json +14 -0
- package/packages/clock/src/index.ts +25 -0
- package/packages/clock/src/install.ts +351 -0
- package/packages/clock/src/types.ts +45 -0
- package/packages/core/package.json +9 -0
- package/packages/core/src/beats.ts +283 -0
- package/packages/core/src/ease.ts +87 -0
- package/packages/core/src/frame.ts +99 -0
- package/packages/core/src/index.ts +27 -0
- package/packages/core/src/project.ts +157 -0
- package/packages/core/src/rand.ts +56 -0
- package/packages/core/src/spring.ts +52 -0
- package/packages/core/src/style.ts +100 -0
- package/packages/core/src/time.ts +88 -0
- package/packages/director/package.json +23 -0
- package/packages/director/src/assemble.ts +361 -0
- package/packages/director/src/brief.ts +122 -0
- package/packages/director/src/catalog.ts +49 -0
- package/packages/director/src/content.ts +343 -0
- package/packages/director/src/fallback.ts +58 -0
- package/packages/director/src/index.ts +13 -0
- package/packages/director/src/pattern.ts +90 -0
- package/packages/director/src/patterns/fill/cells.ts +115 -0
- package/packages/director/src/patterns/formula/stack.ts +93 -0
- package/packages/director/src/patterns/util.ts +58 -0
- package/packages/director/src/scene.ts +62 -0
- package/packages/director/src/select.ts +163 -0
- package/packages/director/src/transitions.ts +115 -0
- package/packages/gen/PROVIDERS.md +90 -0
- package/packages/gen/package.json +9 -0
- package/packages/gen/src/ask.ts +132 -0
- package/packages/gen/src/audio.ts +91 -0
- package/packages/gen/src/blender.ts +54 -0
- package/packages/gen/src/capabilities.ts +151 -0
- package/packages/gen/src/generate.ts +206 -0
- package/packages/gen/src/image/codex.ts +117 -0
- package/packages/gen/src/image/og.ts +133 -0
- package/packages/gen/src/index.ts +26 -0
- package/packages/gen/src/keys.ts +86 -0
- package/packages/gen/src/media.ts +150 -0
- package/packages/gen/src/music/elevenlabs.ts +41 -0
- package/packages/gen/src/music/index.ts +120 -0
- package/packages/gen/src/music/library.ts +73 -0
- package/packages/gen/src/music/lyria.ts +52 -0
- package/packages/gen/src/music/types.ts +28 -0
- package/packages/gen/src/plan.ts +106 -0
- package/packages/gen/src/registry.ts +54 -0
- package/packages/gen/src/seam.ts +103 -0
- package/packages/gen/src/tts/dashscope.ts +64 -0
- package/packages/gen/src/tts/elevenlabs.ts +84 -0
- package/packages/gen/src/tts/gemini.ts +73 -0
- package/packages/gen/src/tts/index.ts +241 -0
- package/packages/gen/src/tts/local.ts +42 -0
- package/packages/gen/src/tts/types.ts +44 -0
- package/packages/gen/src/types.ts +90 -0
- package/packages/gen/src/video/fal.ts +140 -0
- package/packages/gen/src/video/h3.ts +112 -0
- package/packages/gen/src/video/http.ts +44 -0
- package/packages/gen/src/video/ltx.ts +60 -0
- package/packages/gen/src/video/minimax.ts +55 -0
- package/packages/gen/src/video/veo.ts +71 -0
- package/packages/jizura/package.json +16 -0
- package/packages/jizura/src/deny.ts +73 -0
- package/packages/jizura/src/index.ts +7 -0
- package/packages/jizura/src/install.ts +269 -0
- package/packages/jizura/src/layer.ts +325 -0
- package/packages/jizura/src/lyrics.ts +81 -0
- package/packages/jizura/src/pin.ts +8 -0
- package/packages/jizura/src/vendor.ts +140 -0
- package/packages/jizura/src/vite.ts +63 -0
- package/packages/jizura/vendor/JIZURA_LICENSE.txt +21 -0
- package/packages/jizura/vendor/NOTICE +43 -0
- package/packages/jizura/vendor/engine.json +47 -0
- package/packages/jizura/vendor/fonts/BlackHanSans-Regular.woff2 +0 -0
- package/packages/jizura/vendor/fonts/DotGothic16-Regular.woff2 +0 -0
- package/packages/jizura/vendor/fonts/GowunBatang-Bold.woff2 +0 -0
- package/packages/jizura/vendor/fonts/IBMPlexMono-Medium.ttf +0 -0
- package/packages/jizura/vendor/fonts/IBMPlexMono-SemiBold.ttf +0 -0
- package/packages/jizura/vendor/fonts/NotoSansKR-VF.woff2 +0 -0
- package/packages/jizura/vendor/fonts/NotoSerifKR-VF.woff2 +0 -0
- package/packages/jizura/vendor/fonts/OFL-blackhansans.txt +93 -0
- package/packages/jizura/vendor/fonts/OFL-dotgothic16.txt +93 -0
- package/packages/jizura/vendor/fonts/OFL-gowunbatang.txt +94 -0
- package/packages/jizura/vendor/fonts/OFL-ibmplexmono.txt +93 -0
- package/packages/jizura/vendor/fonts/OFL-notosanskr.txt +93 -0
- package/packages/jizura/vendor/fonts/OFL-notoserifkr.txt +94 -0
- package/packages/jizura/vendor/fonts/fonts.json +52 -0
- package/packages/jizura/vendor/jizura_engine.js +35024 -0
- package/packages/motion/README.md +153 -0
- package/packages/motion/package.json +30 -0
- package/packages/motion/src/camera.ts +97 -0
- package/packages/motion/src/captions.ts +487 -0
- package/packages/motion/src/enter.ts +128 -0
- package/packages/motion/src/hangul.ts +129 -0
- package/packages/motion/src/impact.ts +100 -0
- package/packages/motion/src/index.ts +17 -0
- package/packages/motion/src/moves/brushWipe.ts +103 -0
- package/packages/motion/src/moves/cloneArray.ts +111 -0
- package/packages/motion/src/moves/curtains.ts +81 -0
- package/packages/motion/src/moves/dress.ts +191 -0
- package/packages/motion/src/moves/echoStack.ts +70 -0
- package/packages/motion/src/moves/fit.ts +70 -0
- package/packages/motion/src/moves/flood.ts +61 -0
- package/packages/motion/src/moves/ghostStack.ts +88 -0
- package/packages/motion/src/moves/gridFloor.ts +100 -0
- package/packages/motion/src/moves/imageSwarm.ts +113 -0
- package/packages/motion/src/moves/index.ts +38 -0
- package/packages/motion/src/moves/irisBlades.ts +113 -0
- package/packages/motion/src/moves/karaokeLine.ts +108 -0
- package/packages/motion/src/moves/ledBoard.ts +94 -0
- package/packages/motion/src/moves/liquidTab.ts +72 -0
- package/packages/motion/src/moves/markerWrite.ts +63 -0
- package/packages/motion/src/moves/menu.ts +138 -0
- package/packages/motion/src/moves/morphBox.ts +96 -0
- package/packages/motion/src/moves/neonSign.ts +78 -0
- package/packages/motion/src/moves/panelPop.ts +78 -0
- package/packages/motion/src/moves/paperTear.ts +75 -0
- package/packages/motion/src/moves/path.ts +64 -0
- package/packages/motion/src/moves/pathText.ts +107 -0
- package/packages/motion/src/moves/pointSphere.ts +109 -0
- package/packages/motion/src/moves/ransomLetters.ts +73 -0
- package/packages/motion/src/moves/shapeMorph.ts +143 -0
- package/packages/motion/src/moves/slamWords.ts +96 -0
- package/packages/motion/src/moves/sparkTrail.ts +130 -0
- package/packages/motion/src/moves/speedLines.ts +91 -0
- package/packages/motion/src/moves/splitFlap.ts +149 -0
- package/packages/motion/src/moves/stepWords.ts +128 -0
- package/packages/motion/src/moves/strikeOut.ts +98 -0
- package/packages/motion/src/moves/sunburst.ts +58 -0
- package/packages/motion/src/moves/tickerRows.ts +91 -0
- package/packages/motion/src/moves/tokenPicker.ts +115 -0
- package/packages/motion/src/moves/truchet.ts +85 -0
- package/packages/motion/src/moves/wordWall.ts +78 -0
- package/packages/motion/src/moves/worldRoll.ts +32 -0
- package/packages/motion/src/particles.ts +102 -0
- package/packages/motion/src/react/index.tsx +21 -0
- package/packages/motion/src/react/parts.tsx +431 -0
- package/packages/motion/src/react/time.tsx +97 -0
- package/packages/motion/src/text.ts +103 -0
- package/packages/motion/src/transition.ts +82 -0
- package/packages/motion/src/transition3d/cards.ts +65 -0
- package/packages/motion/src/transition3d/chain.ts +84 -0
- package/packages/motion/src/transition3d/dive.ts +181 -0
- package/packages/motion/src/transition3d/fold.ts +110 -0
- package/packages/motion/src/transition3d/gl.ts +219 -0
- package/packages/motion/src/transition3d/index.ts +235 -0
- package/packages/motion/src/transition3d/live.ts +70 -0
- package/packages/motion/src/transition3d/portal.ts +115 -0
- package/packages/motion/src/transition3d/react.tsx +29 -0
- package/packages/motion/src/transition3d/rig.ts +600 -0
- package/packages/motion/src/transition3d/shatter.ts +104 -0
- package/packages/motion/src/transition3d/space.ts +173 -0
- package/packages/motion/src/transition3d/whip.ts +78 -0
- package/packages/motion/src/transition3d/world.ts +737 -0
- package/packages/motion/src/transition3d/zoomOut.ts +114 -0
- package/packages/motion/src/transitions2d/catalog.ts +127 -0
- package/packages/motion/src/transitions2d/css.d.ts +2 -0
- package/packages/motion/src/transitions2d/cult-ui/LICENSE.md +9 -0
- package/packages/motion/src/transitions2d/cult-ui/RollingNumber.tsx +43 -0
- package/packages/motion/src/transitions2d/gl-transitions/LICENSE +25 -0
- package/packages/motion/src/transitions2d/gl-transitions/shaders.ts +1931 -0
- package/packages/motion/src/transitions2d/index.ts +2 -0
- package/packages/motion/src/transitions2d/kokonutui/LICENSE +21 -0
- package/packages/motion/src/transitions2d/kokonutui/MatrixText.css +16 -0
- package/packages/motion/src/transitions2d/kokonutui/MatrixText.tsx +94 -0
- package/packages/motion/src/transitions2d/magicui/HyperText.css +15 -0
- package/packages/motion/src/transitions2d/magicui/HyperText.tsx +115 -0
- package/packages/motion/src/transitions2d/magicui/LICENSE.md +21 -0
- package/packages/motion/src/transitions2d/magicui/MorphingText.css +25 -0
- package/packages/motion/src/transitions2d/magicui/MorphingText.tsx +130 -0
- package/packages/motion/src/transitions2d/magicui/WordRotate.tsx +42 -0
- package/packages/motion/src/transitions2d/react.ts +13 -0
- package/packages/motion/src/transitions2d/skiper-ui/ClipDiv.css +39 -0
- package/packages/motion/src/transitions2d/skiper-ui/ClipDiv.tsx +32 -0
- package/packages/motion/src/transitions2d/smoothui/LICENSE +21 -0
- package/packages/motion/src/transitions2d/smoothui/SharedAxisY.tsx +50 -0
- package/packages/motion/src/transitions2d/smoothui/TextMorph.tsx +90 -0
- package/packages/motion/src/transitions2d/smoothui/shaders.ts +223 -0
- package/packages/motion/src/transitions2d/unlumen/LICENSE +21 -0
- package/packages/motion/src/transitions2d/unlumen/ScrambleText.tsx +114 -0
- package/packages/motion/src/transitions2d/vengeance-ui/LICENSE +21 -0
- package/packages/motion/src/transitions2d/vengeance-ui/MorphText.css +69 -0
- package/packages/motion/src/transitions2d/vengeance-ui/MorphText.tsx +45 -0
- package/packages/motion/src/type.ts +131 -0
- package/packages/motion/src/ui.ts +172 -0
- package/packages/patterns/package.json +15 -0
- package/packages/patterns/src/bars/rank.ts +119 -0
- package/packages/patterns/src/before-after/shrink.ts +127 -0
- package/packages/patterns/src/before-after/strike.ts +125 -0
- package/packages/patterns/src/code/terminal.ts +133 -0
- package/packages/patterns/src/compare/bars.ts +142 -0
- package/packages/patterns/src/compare/duel.ts +103 -0
- package/packages/patterns/src/end/lockup.ts +85 -0
- package/packages/patterns/src/end/slam.ts +91 -0
- package/packages/patterns/src/flow/graph.ts +250 -0
- package/packages/patterns/src/hook-number/counter.ts +101 -0
- package/packages/patterns/src/hook-number/roll.ts +179 -0
- package/packages/patterns/src/hook-number/slam.ts +91 -0
- package/packages/patterns/src/index.ts +38 -0
- package/packages/patterns/src/kit.ts +449 -0
- package/packages/patterns/src/limit/gauge.ts +117 -0
- package/packages/patterns/src/list/cards.ts +131 -0
- package/packages/patterns/src/list/cycle.ts +22 -0
- package/packages/patterns/src/media/panels.ts +100 -0
- package/packages/patterns/src/objects.ts +234 -0
- package/packages/patterns/src/quote/karaoke.ts +126 -0
- package/packages/patterns/src/quote/slam.ts +22 -0
- package/packages/patterns/src/screen/focus.ts +85 -0
- package/packages/patterns/src/steps/path.ts +137 -0
- package/packages/patterns/src/steps/stack.ts +111 -0
- package/packages/patterns/src/term-reveal/chips.ts +92 -0
- package/packages/patterns/src/term-reveal/expand.ts +127 -0
- package/packages/patterns/src/timeline/axis.ts +144 -0
- package/packages/patterns/src/title/mask.ts +85 -0
- package/packages/patterns/src/title/slam.ts +23 -0
- package/packages/patterns/src/toggle-sim/switch.ts +92 -0
- package/packages/patterns/src/trend/columns.ts +108 -0
- package/packages/patterns/src/trend/draw.ts +140 -0
- package/packages/patterns/src/types.ts +67 -0
- package/packages/patterns/src/words/moves.ts +42 -0
- package/packages/patterns/src/words/slam.ts +4 -0
- package/packages/plan/package.json +15 -0
- package/packages/plan/src/asks.ts +256 -0
- package/packages/plan/src/brief.ts +383 -0
- package/packages/plan/src/captions.ts +78 -0
- package/packages/plan/src/detect.ts +93 -0
- package/packages/plan/src/index.ts +27 -0
- package/packages/plan/src/layout.ts +176 -0
- package/packages/plan/src/llm.ts +172 -0
- package/packages/plan/src/look.ts +222 -0
- package/packages/plan/src/plan.ts +179 -0
- package/packages/plan/src/request.ts +55 -0
- package/packages/plan/src/series.ts +76 -0
- package/packages/plan/src/studio.ts +53 -0
- package/packages/plan/src/templates.ts +42 -0
- package/packages/plan/src/themes.ts +48 -0
- package/packages/plan/src/types.ts +157 -0
- package/packages/studio/package.json +12 -0
- package/packages/studio/src/index.ts +1 -0
- package/packages/studio/src/plugin.ts +236 -0
- package/packages/studio/src/ui/main.ts +503 -0
- package/packages/studio/src/ui/studio.css +165 -0
- package/packages/studio/src/ui/timeline.ts +317 -0
- package/packages/themes/kit/THEME-MAKE.md +68 -0
- package/packages/themes/kit/THEME.md +30 -0
- package/packages/themes/kit/briefs/og-intro-15s/brief.json +16 -0
- package/packages/themes/kit/briefs/og-intro-15s/facts.ts +29 -0
- package/packages/themes/kit/briefs/og-intro-15s/logo.svg +12 -0
- package/packages/themes/kit/effects.ts +5 -0
- package/packages/themes/kit/sample/index.html +11 -0
- package/packages/themes/kit/sample/main.ts +9 -0
- package/packages/themes/kit/sample/scenes/scene.ts +15 -0
- package/packages/themes/package.json +19 -0
- package/packages/themes/src/factory.ts +296 -0
- package/packages/themes/src/fx.ts +14 -0
- package/packages/themes/src/index.ts +114 -0
- package/packages/themes/src/slotkit.ts +79 -0
- package/packages/themes/src/slots.ts +46 -0
- package/packages/themes/src/stage3d.ts +197 -0
- package/packages/themes/src/types.ts +58 -0
- package/presets/kawaii-pastel.json +94 -0
- package/presets/neutral-dark.json +82 -0
- package/presets/og.json +98 -0
- package/series/og-shorts.json +14 -0
- package/skills/kasaframe/SKILL.md +33 -0
- package/templates/_shared/project/index.html +11 -0
- package/templates/_shared/project/lib/react.ts +22 -0
- package/templates/_shared/project/lib/stage.ts +292 -0
- package/templates/_shared/project/main.ts +9 -0
- package/templates/_shared/scenes/default.ts +21 -0
- package/templates/_shared/scenes/drop.ts +33 -0
- package/templates/_shared/scenes/end.ts +26 -0
- package/templates/_shared/scenes/hook.ts +18 -0
- package/templates/_shared/scenes/seam.ts +41 -0
- package/templates/_shared/scenes/step.ts +49 -0
- package/templates/ad/preview.png +0 -0
- package/templates/ad/template.json +151 -0
- package/templates/demo/preview.png +0 -0
- package/templates/demo/template.json +141 -0
- package/templates/explainer/preview.png +0 -0
- package/templates/explainer/template.json +193 -0
- package/templates/launch/preview.png +0 -0
- package/templates/launch/template.json +163 -0
- package/templates/mv/preview.png +0 -0
- package/templates/mv/scenes/default.ts +98 -0
- package/templates/mv/template.json +178 -0
- package/templates/promo/preview.png +0 -0
- package/templates/promo/template.json +185 -0
- package/templates/shorts/preview.png +0 -0
- package/templates/shorts/scenes/hook.ts +37 -0
- package/templates/shorts/template.json +196 -0
- package/templates/square/preview.png +0 -0
- package/templates/square/template.json +133 -0
- package/themes/debug-hud/THEME.md +39 -0
- package/themes/debug-hud/effects.ts +389 -0
- package/themes/debug-hud/sample/assets/og/logo.svg +12 -0
- package/themes/debug-hud/sample/beats.json +1 -0
- package/themes/debug-hud/sample/index.html +11 -0
- package/themes/debug-hud/sample/kf.json +59 -0
- package/themes/debug-hud/sample/lib/hudkit.ts +49 -0
- package/themes/debug-hud/sample/lib/og.ts +29 -0
- package/themes/debug-hud/sample/main.ts +9 -0
- package/themes/debug-hud/sample/scenes/end.ts +62 -0
- package/themes/debug-hud/sample/scenes/gather.ts +67 -0
- package/themes/debug-hud/sample/scenes/models.ts +70 -0
- package/themes/debug-hud/sample/scenes/price.ts +79 -0
- package/themes/debug-hud/sample/style.json +91 -0
- package/themes/debug-hud/slots.ts +99 -0
- package/themes/debug-hud/still.png +0 -0
- package/themes/debug-hud/style.json +91 -0
- package/themes/debug-hud/theme.json +68 -0
- package/themes/og-measure/THEME.md +47 -0
- package/themes/og-measure/effects.ts +432 -0
- package/themes/og-measure/sample/assets/brand/og-logo-full.svg +12 -0
- package/themes/og-measure/sample/assets/brand/og-logo.svg +12 -0
- package/themes/og-measure/sample/assets/data/measure.json +353 -0
- package/themes/og-measure/sample/beats.json +1 -0
- package/themes/og-measure/sample/index.html +11 -0
- package/themes/og-measure/sample/kf.json +66 -0
- package/themes/og-measure/sample/lib/data.ts +62 -0
- package/themes/og-measure/sample/main.ts +9 -0
- package/themes/og-measure/sample/measure.ts +78 -0
- package/themes/og-measure/sample/scenes/end.ts +47 -0
- package/themes/og-measure/sample/scenes/gather.ts +51 -0
- package/themes/og-measure/sample/scenes/models.ts +34 -0
- package/themes/og-measure/sample/scenes/one.ts +39 -0
- package/themes/og-measure/sample/scenes/price.ts +56 -0
- package/themes/og-measure/sample/style.json +97 -0
- package/themes/og-measure/slots.ts +88 -0
- package/themes/og-measure/still.png +0 -0
- package/themes/og-measure/style.json +97 -0
- package/themes/og-measure/theme.json +79 -0
- package/themes/riso-zine/THEME.md +43 -0
- package/themes/riso-zine/effects.ts +321 -0
- package/themes/riso-zine/sample/assets/og/logo.svg +12 -0
- package/themes/riso-zine/sample/beats.json +1 -0
- package/themes/riso-zine/sample/index.html +11 -0
- package/themes/riso-zine/sample/kf.json +59 -0
- package/themes/riso-zine/sample/lib/og.ts +29 -0
- package/themes/riso-zine/sample/lib/shot.ts +86 -0
- package/themes/riso-zine/sample/lib/zine.ts +42 -0
- package/themes/riso-zine/sample/main.ts +9 -0
- package/themes/riso-zine/sample/scenes/end.ts +61 -0
- package/themes/riso-zine/sample/scenes/gather.ts +62 -0
- package/themes/riso-zine/sample/scenes/models.ts +52 -0
- package/themes/riso-zine/sample/scenes/price.ts +82 -0
- package/themes/riso-zine/sample/style.json +99 -0
- package/themes/riso-zine/slots.ts +81 -0
- package/themes/riso-zine/still.png +0 -0
- package/themes/riso-zine/style.json +99 -0
- package/themes/riso-zine/theme.json +75 -0
- package/tools/beats/beats.py +372 -0
- package/tools/beats/requirements.txt +3 -0
- package/tools/lyrics/align.py +164 -0
- package/tools/lyrics/requirements.txt +9 -0
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
export interface TimelineData {
|
|
2
|
+
duration: number;
|
|
3
|
+
fps: number;
|
|
4
|
+
scenes: { id: string; from: number; end: number }[];
|
|
5
|
+
sections: { t: number; kind: string; strength?: number }[];
|
|
6
|
+
beats: number[];
|
|
7
|
+
downbeats: number[];
|
|
8
|
+
phrases: number[];
|
|
9
|
+
drops: { t: number; label: string }[];
|
|
10
|
+
energy?: { hz: number; low: number[]; mid: number[]; high: number[] };
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface TimelineHooks {
|
|
14
|
+
/** snap 이면 가까운 박·마커에 붙인 시각이다 */
|
|
15
|
+
seek(t: number, snapped: boolean): void;
|
|
16
|
+
scrubStart(): void;
|
|
17
|
+
scrubEnd(): void;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const C = {
|
|
21
|
+
bg: "#14161b",
|
|
22
|
+
line: "#262a33",
|
|
23
|
+
ink: "#e9ebf0",
|
|
24
|
+
dim: "#8b91a0",
|
|
25
|
+
faint: "#5a606d",
|
|
26
|
+
sceneA: "#20252f",
|
|
27
|
+
sceneB: "#272d39",
|
|
28
|
+
accent: "#ff6b9a",
|
|
29
|
+
sky: "#7cc4ff",
|
|
30
|
+
energy: "rgba(124,196,255,0.16)",
|
|
31
|
+
};
|
|
32
|
+
const RULER = [0, 18];
|
|
33
|
+
const SCENES = [20, 46];
|
|
34
|
+
const SECTIONS = [48, 64];
|
|
35
|
+
const BEATS = [66, 152];
|
|
36
|
+
const SNAP_PX = 10;
|
|
37
|
+
const STEPS = [1 / 60, 0.05, 0.1, 0.25, 0.5, 1, 2, 5, 10, 15, 30, 60, 120];
|
|
38
|
+
|
|
39
|
+
export class Timeline {
|
|
40
|
+
private canvas: HTMLCanvasElement;
|
|
41
|
+
private ctx: CanvasRenderingContext2D;
|
|
42
|
+
private hooks: TimelineHooks;
|
|
43
|
+
private data: TimelineData = { duration: 1, fps: 60, scenes: [], sections: [], beats: [], downbeats: [], phrases: [], drops: [] };
|
|
44
|
+
private a = 0;
|
|
45
|
+
private b = 1;
|
|
46
|
+
private t = 0;
|
|
47
|
+
private hover: number | null = null;
|
|
48
|
+
private dragging = false;
|
|
49
|
+
private W = 0;
|
|
50
|
+
private H = 0;
|
|
51
|
+
|
|
52
|
+
constructor(host: HTMLElement, hooks: TimelineHooks) {
|
|
53
|
+
this.hooks = hooks;
|
|
54
|
+
this.canvas = document.createElement("canvas");
|
|
55
|
+
host.appendChild(this.canvas);
|
|
56
|
+
this.ctx = this.canvas.getContext("2d")!;
|
|
57
|
+
new ResizeObserver(() => this.resize()).observe(host);
|
|
58
|
+
this.bind();
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
setData(d: TimelineData) {
|
|
62
|
+
const fresh = d.duration !== this.data.duration;
|
|
63
|
+
this.data = d;
|
|
64
|
+
if (fresh) {
|
|
65
|
+
this.a = 0;
|
|
66
|
+
this.b = d.duration;
|
|
67
|
+
}
|
|
68
|
+
this.draw();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
setTime(t: number, follow: boolean) {
|
|
72
|
+
this.t = t;
|
|
73
|
+
const span = this.b - this.a;
|
|
74
|
+
if (follow && (t > this.b - span * 0.02 || t < this.a)) {
|
|
75
|
+
this.a = Math.max(0, Math.min(t - span * 0.1, this.data.duration - span));
|
|
76
|
+
this.b = this.a + span;
|
|
77
|
+
}
|
|
78
|
+
this.draw();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
private resize() {
|
|
82
|
+
const r = this.canvas.getBoundingClientRect();
|
|
83
|
+
const dpr = window.devicePixelRatio || 1;
|
|
84
|
+
this.W = r.width;
|
|
85
|
+
this.H = r.height;
|
|
86
|
+
this.canvas.width = Math.round(r.width * dpr);
|
|
87
|
+
this.canvas.height = Math.round(r.height * dpr);
|
|
88
|
+
this.ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
89
|
+
this.draw();
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
private x(t: number) {
|
|
93
|
+
return ((t - this.a) / (this.b - this.a)) * this.W;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
private tAt(x: number) {
|
|
97
|
+
return this.a + (x / this.W) * (this.b - this.a);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
private snapTargets(): number[] {
|
|
101
|
+
const d = this.data;
|
|
102
|
+
return [...d.beats, ...d.downbeats, ...d.phrases, ...d.drops.map((m) => m.t), ...d.scenes.map((s) => s.from), ...d.sections.map((s) => s.t), 0, d.duration];
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
private pick(x: number, snap: boolean): { t: number; snapped: boolean } {
|
|
106
|
+
const t = Math.max(0, Math.min(this.data.duration, this.tAt(x)));
|
|
107
|
+
if (!snap) return { t, snapped: false };
|
|
108
|
+
let best = t;
|
|
109
|
+
let bestPx = SNAP_PX;
|
|
110
|
+
for (const s of this.snapTargets()) {
|
|
111
|
+
const px = Math.abs(this.x(s) - x);
|
|
112
|
+
if (px < bestPx) {
|
|
113
|
+
bestPx = px;
|
|
114
|
+
best = s;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return { t: best, snapped: best !== t };
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
private bind() {
|
|
121
|
+
const c = this.canvas;
|
|
122
|
+
const local = (e: PointerEvent | WheelEvent | MouseEvent) => e.clientX - c.getBoundingClientRect().left;
|
|
123
|
+
c.addEventListener("pointerdown", (e) => {
|
|
124
|
+
if (e.button !== 0) return;
|
|
125
|
+
c.setPointerCapture(e.pointerId);
|
|
126
|
+
this.dragging = true;
|
|
127
|
+
this.hooks.scrubStart();
|
|
128
|
+
const p = this.pick(local(e), e.shiftKey);
|
|
129
|
+
this.hooks.seek(p.t, p.snapped);
|
|
130
|
+
});
|
|
131
|
+
c.addEventListener("pointermove", (e) => {
|
|
132
|
+
this.hover = local(e);
|
|
133
|
+
if (this.dragging) {
|
|
134
|
+
const p = this.pick(this.hover, e.shiftKey);
|
|
135
|
+
this.hooks.seek(p.t, p.snapped);
|
|
136
|
+
} else this.draw();
|
|
137
|
+
});
|
|
138
|
+
const end = (e: PointerEvent) => {
|
|
139
|
+
if (!this.dragging) return;
|
|
140
|
+
this.dragging = false;
|
|
141
|
+
if (c.hasPointerCapture(e.pointerId)) c.releasePointerCapture(e.pointerId);
|
|
142
|
+
this.hooks.scrubEnd();
|
|
143
|
+
};
|
|
144
|
+
c.addEventListener("pointerup", end);
|
|
145
|
+
c.addEventListener("pointercancel", end);
|
|
146
|
+
c.addEventListener("pointerleave", () => {
|
|
147
|
+
this.hover = null;
|
|
148
|
+
this.draw();
|
|
149
|
+
});
|
|
150
|
+
c.addEventListener(
|
|
151
|
+
"wheel",
|
|
152
|
+
(e) => {
|
|
153
|
+
e.preventDefault();
|
|
154
|
+
const span = this.b - this.a;
|
|
155
|
+
const D = this.data.duration;
|
|
156
|
+
if (Math.abs(e.deltaX) > Math.abs(e.deltaY) || e.shiftKey) {
|
|
157
|
+
const dt = ((e.shiftKey ? e.deltaY : e.deltaX) / this.W) * span;
|
|
158
|
+
this.a = Math.max(0, Math.min(D - span, this.a + dt));
|
|
159
|
+
this.b = this.a + span;
|
|
160
|
+
} else {
|
|
161
|
+
const at = this.tAt(local(e));
|
|
162
|
+
const next = Math.max(Math.min(1, D), Math.min(D, span * Math.exp(e.deltaY * 0.004)));
|
|
163
|
+
const k = (at - this.a) / span;
|
|
164
|
+
this.a = Math.max(0, Math.min(D - next, at - k * next));
|
|
165
|
+
this.b = this.a + next;
|
|
166
|
+
}
|
|
167
|
+
this.draw();
|
|
168
|
+
},
|
|
169
|
+
{ passive: false },
|
|
170
|
+
);
|
|
171
|
+
c.addEventListener("dblclick", () => {
|
|
172
|
+
this.a = 0;
|
|
173
|
+
this.b = this.data.duration;
|
|
174
|
+
this.draw();
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
private label(text: string, x: number, y: number, color: string, maxW?: number) {
|
|
179
|
+
const g = this.ctx;
|
|
180
|
+
g.fillStyle = color;
|
|
181
|
+
if (maxW !== undefined && maxW < 14) return;
|
|
182
|
+
if (maxW !== undefined && g.measureText(text).width > maxW) {
|
|
183
|
+
let s = text;
|
|
184
|
+
while (s.length > 1 && g.measureText(`${s}…`).width > maxW) s = s.slice(0, -1);
|
|
185
|
+
text = `${s}…`;
|
|
186
|
+
}
|
|
187
|
+
g.fillText(text, x, y);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
draw() {
|
|
191
|
+
const g = this.ctx;
|
|
192
|
+
const { W, H } = this;
|
|
193
|
+
if (!W || !H) return;
|
|
194
|
+
const d = this.data;
|
|
195
|
+
const pxPerSec = W / (this.b - this.a);
|
|
196
|
+
g.clearRect(0, 0, W, H);
|
|
197
|
+
g.fillStyle = C.bg;
|
|
198
|
+
g.fillRect(0, 0, W, H);
|
|
199
|
+
g.font = "11px ui-monospace, SFMono-Regular, Menlo, monospace";
|
|
200
|
+
g.textBaseline = "middle";
|
|
201
|
+
|
|
202
|
+
const step = STEPS.find((s) => s * pxPerSec >= 64) ?? 300;
|
|
203
|
+
g.strokeStyle = C.line;
|
|
204
|
+
g.lineWidth = 1;
|
|
205
|
+
for (let t = Math.ceil(this.a / step) * step; t <= this.b + 1e-9; t += step) {
|
|
206
|
+
const x = Math.round(this.x(t)) + 0.5;
|
|
207
|
+
g.beginPath();
|
|
208
|
+
g.moveTo(x, RULER[1] - 5);
|
|
209
|
+
g.lineTo(x, RULER[1]);
|
|
210
|
+
g.stroke();
|
|
211
|
+
const txt = step < 1 ? t.toFixed(step < 0.1 ? 3 : 2) : step < 60 ? `${Math.round(t)}s` : `${Math.floor(t / 60)}:${String(Math.round(t % 60)).padStart(2, "0")}`;
|
|
212
|
+
this.label(txt, x + 3, 8, C.faint);
|
|
213
|
+
}
|
|
214
|
+
g.fillStyle = C.line;
|
|
215
|
+
g.fillRect(0, RULER[1], W, 1);
|
|
216
|
+
|
|
217
|
+
d.scenes.forEach((s, i) => {
|
|
218
|
+
const x0 = this.x(s.from);
|
|
219
|
+
const x1 = this.x(s.end);
|
|
220
|
+
if (x1 < 0 || x0 > W) return;
|
|
221
|
+
g.fillStyle = i % 2 ? C.sceneB : C.sceneA;
|
|
222
|
+
g.fillRect(x0, SCENES[0], Math.max(1, x1 - x0 - 1), SCENES[1] - SCENES[0]);
|
|
223
|
+
const lx = Math.max(x0, 0) + 6;
|
|
224
|
+
this.label(s.id, lx, (SCENES[0] + SCENES[1]) / 2, C.ink, x1 - lx - 6);
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
d.sections.forEach((s, i) => {
|
|
228
|
+
const x0 = this.x(s.t);
|
|
229
|
+
const x1 = i + 1 < d.sections.length ? this.x(d.sections[i + 1].t) : this.x(d.duration);
|
|
230
|
+
if (x1 < 0 || x0 > W) return;
|
|
231
|
+
g.fillStyle = s.kind === "drop" ? C.accent : C.dim;
|
|
232
|
+
g.fillRect(Math.round(x0), SECTIONS[0] + 2, 2, SECTIONS[1] - SECTIONS[0] - 4);
|
|
233
|
+
const strength = s.strength !== undefined ? ` ${s.strength.toFixed(2)}` : "";
|
|
234
|
+
this.label(`${s.kind}${strength}`, Math.max(x0, 0) + 6, (SECTIONS[0] + SECTIONS[1]) / 2, s.kind === "drop" ? C.accent : C.dim, x1 - Math.max(x0, 0) - 10);
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
const laneTop = BEATS[0];
|
|
238
|
+
const laneBot = BEATS[1];
|
|
239
|
+
const laneH = laneBot - laneTop;
|
|
240
|
+
if (d.energy && d.energy.low.length) {
|
|
241
|
+
const { hz, low } = d.energy;
|
|
242
|
+
const curve = (vals: number[]) => {
|
|
243
|
+
const pts: [number, number][] = [];
|
|
244
|
+
for (let x = 0; x <= W; x += 2) {
|
|
245
|
+
const i = Math.floor(this.tAt(x) * hz);
|
|
246
|
+
const v = vals[Math.max(0, Math.min(vals.length - 1, i))] ?? 0;
|
|
247
|
+
pts.push([x, laneBot - v * laneH * 0.92]);
|
|
248
|
+
}
|
|
249
|
+
return pts;
|
|
250
|
+
};
|
|
251
|
+
g.beginPath();
|
|
252
|
+
g.moveTo(0, laneBot);
|
|
253
|
+
for (const [x, y] of curve(low)) g.lineTo(x, y);
|
|
254
|
+
g.lineTo(W, laneBot);
|
|
255
|
+
g.closePath();
|
|
256
|
+
g.fillStyle = C.energy;
|
|
257
|
+
g.fill();
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
const visible = (ts: number[]) => ts.filter((t) => t >= this.a - 1 && t <= this.b + 1);
|
|
261
|
+
const beatPx = d.beats.length > 1 ? (pxPerSec * d.duration) / d.beats.length : 99;
|
|
262
|
+
g.fillStyle = C.faint;
|
|
263
|
+
if (beatPx >= 3) for (const t of visible(d.beats)) g.fillRect(Math.round(this.x(t)), laneTop, 1, 7);
|
|
264
|
+
g.fillStyle = C.dim;
|
|
265
|
+
if (beatPx * 4 >= 3) for (const t of visible(d.downbeats)) g.fillRect(Math.round(this.x(t)), laneTop, 1, 15);
|
|
266
|
+
g.fillStyle = "rgba(233,235,240,0.35)";
|
|
267
|
+
for (const t of visible(d.phrases)) g.fillRect(Math.round(this.x(t)), laneTop, 1, laneH);
|
|
268
|
+
|
|
269
|
+
for (const m of d.drops) {
|
|
270
|
+
const x = Math.round(this.x(m.t));
|
|
271
|
+
if (x < -40 || x > W + 40) continue;
|
|
272
|
+
g.fillStyle = C.accent;
|
|
273
|
+
g.fillRect(x, SCENES[0], 2, laneBot - SCENES[0]);
|
|
274
|
+
g.beginPath();
|
|
275
|
+
g.moveTo(x + 1, laneTop - 1);
|
|
276
|
+
g.lineTo(x + 6, laneTop + 5);
|
|
277
|
+
g.lineTo(x + 1, laneTop + 11);
|
|
278
|
+
g.lineTo(x - 4, laneTop + 5);
|
|
279
|
+
g.closePath();
|
|
280
|
+
g.fill();
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
if (this.hover !== null && !this.dragging) {
|
|
284
|
+
const x = Math.round(this.hover) + 0.5;
|
|
285
|
+
g.strokeStyle = "rgba(233,235,240,0.25)";
|
|
286
|
+
g.beginPath();
|
|
287
|
+
g.moveTo(x, 0);
|
|
288
|
+
g.lineTo(x, H);
|
|
289
|
+
g.stroke();
|
|
290
|
+
const ht = this.tAt(this.hover);
|
|
291
|
+
const txt = ht.toFixed(3);
|
|
292
|
+
const w = g.measureText(txt).width + 8;
|
|
293
|
+
const bx = Math.min(W - w, x + 4);
|
|
294
|
+
g.fillStyle = "#0c0d10";
|
|
295
|
+
g.fillRect(bx, H - 18, w, 16);
|
|
296
|
+
this.label(txt, bx + 4, H - 10, C.dim);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
const px = Math.round(this.x(this.t)) + 0.5;
|
|
300
|
+
if (px >= -1 && px <= W + 1) {
|
|
301
|
+
g.strokeStyle = C.ink;
|
|
302
|
+
g.lineWidth = 1.5;
|
|
303
|
+
g.beginPath();
|
|
304
|
+
g.moveTo(px, 0);
|
|
305
|
+
g.lineTo(px, H);
|
|
306
|
+
g.stroke();
|
|
307
|
+
g.lineWidth = 1;
|
|
308
|
+
g.fillStyle = C.ink;
|
|
309
|
+
g.beginPath();
|
|
310
|
+
g.moveTo(px - 5, 0);
|
|
311
|
+
g.lineTo(px + 5, 0);
|
|
312
|
+
g.lineTo(px, 7);
|
|
313
|
+
g.closePath();
|
|
314
|
+
g.fill();
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# 테마 만들기 지시서 — `{{id}}`
|
|
2
|
+
|
|
3
|
+
너는 kasaframe 테마 하나를 처음부터 끝까지 만든다: 참고 자료를 보고 → 비유를 정하고 → 스타일·효과를 짜고 → 공통 브리프로 견본을 만들어 → 검사를 통과시키고 → review 로 올린다. 사람은 견본 영상만 보고 OK 한다. **OK 전에 approved 로 바꾸지 않는다.**
|
|
4
|
+
|
|
5
|
+
- 테마 폴더: `themes/{{id}}/` — 이 폴더 밖은 고치지 않는다. 커밋은 `git commit -m "<명사형 제목>" -- themes/{{id}}`(남의 스테이징을 쓸어 가지 않게 경로를 꼭 준다). 커밋 제목·주석에 개인 호칭·페르소나 표현 금지.
|
|
6
|
+
- 이름: {{name}} · 브리프: {{brief}} · 결이 비슷한 기존 테마: {{like}}
|
|
7
|
+
- 명령은 레포 뿌리에서 `npx kf …`. `kf render`·`kf check`·`kf sheet` 는 스스로 렌더 잠금(`.render-lock`)을 잡고 기다린다 — **밖에서 잠금을 따로 잡고 그 안에서 kf 를 부르지 않는다**(교착). 탭은 `--tabs 2` 까지.
|
|
8
|
+
{{kindNote}}
|
|
9
|
+
|
|
10
|
+
## 1. 읽기 (10분)
|
|
11
|
+
|
|
12
|
+
1. `SPEC.md` 의 「계약 9 테마 팩」과 `docs/AGENTS.md`(장면 파일 쓰는 법).
|
|
13
|
+
2. approved 테마 둘 이상을 통째로 — `themes/<id>/THEME.md`·`effects.ts`·`sample/scenes/*.ts`. `npx kf theme list` 로 목록을 본다. 비유·색이 이미 있는 테마와 겹치면 안 된다.
|
|
14
|
+
3. 브리프 `{{briefDoc}}` — 화면에 쓰는 사실·숫자는 여기 적힌 것만. 숫자를 지어내지 않는다. 사실 모음은 `sample/lib/facts.ts` 에 이미 옮겨 두었다.
|
|
15
|
+
|
|
16
|
+
## 2. 참고 자료 보기 → `refs/NOTES.md`
|
|
17
|
+
|
|
18
|
+
참고 자료: {{refs}}
|
|
19
|
+
|
|
20
|
+
- 그림은 Read 로 직접 본다. 영상은 `refs/frames/` 에 뽑아 둔 장면을 본다. 주소는 `kc navigate <url>` 뒤 `kc screenshot --path <절대경로>` 로 찍어 Read 하거나 WebFetch.
|
|
21
|
+
- `refs/NOTES.md` 에 적는다: 색(실제 값 몇 개) · 질감 · 형태 언어 · 움직임 성격 · 공간감(평면/깊이/등각) · 빛 · 이 자료에서 **가져올 것 셋**과 **안 가져올 것**.
|
|
22
|
+
|
|
23
|
+
## 3. 비유·스타일 — `THEME.md` 앞부분 · `style.json` · `theme.json`
|
|
24
|
+
|
|
25
|
+
- 비유 한 줄: 「무엇이 무엇처럼 되며 화면이 찍힌다/드러난다」. 내용(정보가 화면에 오르는 방식)에서 나온 개념이어야 한다 — 장식 이름이 아니라 동사가 있는 문장.
|
|
26
|
+
- `style.json`: 프리셋과 같은 KfStyle 꼴 통째, `name` = `{{id}}`. 잉크 2–3색 + 그 어두운 단(`colors`), 바탕 `bg`, 글 `ink`, 강조 `accent`. 글꼴 셋(`sans`·`display`·`mono`)은 **한글이 서는 글꼴로 끝나게**(Pretendard 를 마지막에), `faces` 는 **한 파일 주소**(jsdelivr `gh/google/fonts@main/ofl/<이름>/<파일>.ttf` 나 `npm/pretendard@1.3.9/.../PretendardVariable.woff2`). 구글 폰트 CSS(unicode-range 조각)는 글이 투명하게 찍히니 쓰지 않는다. `theme` 칸에 `inks`·`texture`·`movement` 를 글로.
|
|
27
|
+
- `theme.json`: `name`·`metaphor`·`purposes`·`aspect`. status 는 draft 그대로.
|
|
28
|
+
- 글자 대비는 찍힌 픽셀로 3:1 이상 — 옅은 잉크로 작은 글을 쓰지 않는다.
|
|
29
|
+
|
|
30
|
+
## 4. 효과 — `effects.ts` (5–10개)
|
|
31
|
+
|
|
32
|
+
- `value` = `(t, opts) => Style | number | string | 객체` · `layer` = `(el, opts) => (t) => void`(장면 `build` 처럼 DOM·캔버스를 한 번 짓고 t 마다 칠한다). **같은 t 면 같은 화면** — 앞 프레임 상태를 쌓지 않는다, `Math.random`·`Date.now` 금지(`rand(seed, i)`·`noise1`).
|
|
33
|
+
- 비유 전용이어야 한다: 등장·전환·드롭·늘 흐르는 바탕·숫자/글 찍기·끝 카드 쪽이 하나씩은 있으면 견본이 테마 효과만으로 선다.
|
|
34
|
+
- 흔들림·섬광·박 펄스·카메라는 `@kasaframe/motion` 의 `dropBurst`·`shake`·`beatPulse`·`camera` 를 거쳐 검사가 셀 수 있게. 드롭 연출은 `ctx.beats.drop(0)` 으로 잰 시각에만.
|
|
35
|
+
- 캔버스는 **그리는 자리만큼만** 잡고 `translate(-x, -y)` 로 화면 좌표를 그대로 쓴다(화면 전체 캔버스 수십 장이면 탭 셋이 GB 를 먹는다).
|
|
36
|
+
- `theme.json` 의 `effects` 를 `{ name, kind, does, use }` 로 채운다 — 이름이 `effects.ts` 의 함수 내보내기와 정확히 같아야 한다(시험이 본다). `use` 는 모델이 그대로 베낄 한 줄.
|
|
37
|
+
|
|
38
|
+
## 5. 견본 — `sample/` (브리프 그대로, 15초)
|
|
39
|
+
|
|
40
|
+
뼈대는 이미 있다: `kf.json`(장면 넷 — 경계가 마디·드롭에 붙어 있다)·`beats.json`·곡·`lib/facts.ts`·`assets/`. `scenes/*.ts` 넷을 다시 쓴다.
|
|
41
|
+
|
|
42
|
+
공통 규칙(검사가 오류로 잡는다):
|
|
43
|
+
|
|
44
|
+
- **0.1초도 서지 않는다** — 늘 흐르는 층 하나(바탕 흐름·눈금·드리프트·끓는 결)를 깔아 둔다. 깜빡이는 점 몇 개로는 모자란다(160×90 회색조 평균 차 0.35).
|
|
45
|
+
- **같은 구도 1.5초 안** — 마디(약 1.41초)마다 컷을 바꾼다. 컷은 `display: none` 으로 숨긴다 — `visibility: hidden` 은 안쪽 요소가 visible 을 주면 부모를 뚫고 보여서 지난 컷이 비치고 같은 t 의 그림이 달라진다(`frame.nondeterministic`).
|
|
46
|
+
- **박마다 눈에 보이는 큰 사건 하나** — 찍히고, 갈리고, 뛰고, 바뀐다. 미세한 떨림으로 때우지 않는다.
|
|
47
|
+
- **꽉 찬 화면** — 글·그림이 화면 가운데 작게 몰리지 않게. 안전 영역(가로 80px·세로 60px) 안에.
|
|
48
|
+
- **문구 금지** — 슬로건·감성 카피·말 거는 문장 없이 실제 주소·모델 ID·숫자·짧은 낱말·끝 카드만.
|
|
49
|
+
- 영상 생성 모델은 쓰지 않는다. 모자란 그림은 `npx kf gen img` 몇 장까지(돈 규칙은 `packages/gen/PROVIDERS.md`).
|
|
50
|
+
- 로고 SVG 는 `import svg from "../assets/og/logo.svg?raw"` 로 받아 `currentColor` 로 칠한다. 속성을 바꿀 때 `height="auto"` 는 SVG 오류다 — `width="100%"` 만 두고 높이는 viewBox 에 맡긴다.
|
|
51
|
+
|
|
52
|
+
## 6. 검사 고리
|
|
53
|
+
|
|
54
|
+
1. `npx kf theme check {{id}}` — 계약(파일·효과 이름·글꼴·남은 TODO) + `kf check sample`. 오류가 0 이 될 때까지.
|
|
55
|
+
2. `npx kf sheet themes/{{id}}/sample --count 16` 을 **Read 로 직접 보고** 고친다: 빈 화면·겹친 글·잘린 글·지난 컷 비침·읽히지 않는 대비. 숫자 검사만 보고 넘기지 않는다.
|
|
56
|
+
3. 렌더를 되풀이하기 전에 고칠 것을 모아서 한 번에(맥북 부하).
|
|
57
|
+
|
|
58
|
+
## 7. review
|
|
59
|
+
|
|
60
|
+
`npx kf theme review {{id}}` — 굽기 → mp4 검사 → 장면 모음·대표 장면 → `sample.mp4`·`still.png` 갱신 → 공유 폴더(`kasaframe-테마-{{id}}`)에 `{{id}}-{{share}}.mp4`·장면 모음·대표 장면·THEME.md → status review. 끝나면 커밋하고 맡긴 사람에게 공유 폴더 경로와 비유 한 줄·흐름·검사 결과를 알린다.
|
|
61
|
+
|
|
62
|
+
## 함정(앞 테마들이 밟은 것)
|
|
63
|
+
|
|
64
|
+
- 한글은 모노 글꼴 뒤 Pretendard 로 그려져 폭이 다르다 — 셀·고정 폭 배치면 한글 한 자를 두 칸으로.
|
|
65
|
+
- 캔버스에 글을 그리는 효과는 `document.fonts` 가 다 받은 뒤(장면 `build` 는 그 뒤에 불린다) 쓴다. 떨어져 있는 캔버스에 미리 그려 둔 글은 검사가 화면 글로 읽지 않는다.
|
|
66
|
+
- 장면 박자 `ctx.beats.beats` 는 곡 끝까지 들어 있다 — 「이 장면의 마지막 박」은 `ctx.dur` 로 거른다.
|
|
67
|
+
- 흔들림을 바탕째 걸면 가장자리에 페이지 검정이 비친다 — 내용 틀에만.
|
|
68
|
+
- 렌더가 무거우면(종이결·잡음) mp4 가 수십 MB — 레포의 `sample.mp4` 는 `kf theme review` 가 줄여 넣는다.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# {{name}} `{{id}}`
|
|
2
|
+
|
|
3
|
+
**비유: TODO 한 줄 — 내용에서 나온 개념(무엇이 무엇처럼 되며 화면이 찍힌다).** TODO 두세 줄로 풀어 쓴다.
|
|
4
|
+
|
|
5
|
+
## 맞는 내용·용도
|
|
6
|
+
|
|
7
|
+
- TODO 어떤 내용에 맞나
|
|
8
|
+
- 용도: TODO(promo·shorts·explainer·launch·demo·ad·square·mv 중)
|
|
9
|
+
- 화면 글: TODO
|
|
10
|
+
|
|
11
|
+
## 금지
|
|
12
|
+
|
|
13
|
+
- TODO 이 비유를 깨는 것(색·글꼴·움직임·질감)
|
|
14
|
+
- 슬로건·감성 문장.
|
|
15
|
+
|
|
16
|
+
## 움직임
|
|
17
|
+
|
|
18
|
+
- 쉬지 않는다: TODO(0.1초도 서지 않게 늘 흐르는 것)
|
|
19
|
+
- 구도는 마디마다 바꾼다: TODO
|
|
20
|
+
- 박마다 큰 사건 하나: TODO
|
|
21
|
+
|
|
22
|
+
## 효과
|
|
23
|
+
|
|
24
|
+
같은 레포 안에서는 `effects.ts` 를 바로, 프로젝트에서는 `fx("{{id}}")`. layer 는 `build` 에서 만들고 `(t) => …` 에서 부른다.
|
|
25
|
+
|
|
26
|
+
| 효과 | 꼴 | 하는 일 |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| TODO | | |
|
|
29
|
+
|
|
30
|
+
견본: `sample/` — {{brief}}.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "og-intro-15s",
|
|
3
|
+
"doc": "docs/briefs/og-intro-15s.md",
|
|
4
|
+
"label": "OpenGateway 소개 15초",
|
|
5
|
+
"share": "OG견본",
|
|
6
|
+
"music": "kawaii-friends.mp3",
|
|
7
|
+
"from": 4.0,
|
|
8
|
+
"to": 19.0,
|
|
9
|
+
"assets": { "og/logo.svg": "logo.svg" },
|
|
10
|
+
"scenes": [
|
|
11
|
+
{ "id": "gather", "role": "hook", "until": "bar:3.1", "idea": "여러 회사 모델이 흩어져 있다 → 회사별 모델 수" },
|
|
12
|
+
{ "id": "models", "role": "explain", "until": "drop:0", "idea": "한 주소(https://apis.opengateway.ai/v1) → 박마다 바뀌는 모델 ID 가 같은 주소로 → 드롭 앞 모아 올리기" },
|
|
13
|
+
{ "id": "price", "role": "drop", "until": "bar:11.5", "idea": "드롭에 가장 크게 102 · 한 주소 → 하루 시계에서 00–10시 창이 -90% → deepseek 가격" },
|
|
14
|
+
{ "id": "end", "role": "end", "until": "end", "idea": "첫 토큰 실측 셋 → 끝 카드(OG 로고 · opengateway.ai)" }
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// OpenGateway 사실 — docs/briefs/og-intro-15s.md 에 적힌 것만. 숫자를 여기서 새로 만들지 않는다
|
|
2
|
+
export const OG = {
|
|
3
|
+
url: "https://apis.opengateway.ai/v1",
|
|
4
|
+
host: "apis.opengateway.ai/v1",
|
|
5
|
+
site: "opengateway.ai",
|
|
6
|
+
models: 102,
|
|
7
|
+
endpoints: ["/chat/completions", "/responses", "/messages", "/images/generations"],
|
|
8
|
+
providers: [
|
|
9
|
+
["OpenAI", 41],
|
|
10
|
+
["Anthropic", 15],
|
|
11
|
+
["Google", 15],
|
|
12
|
+
["Z.ai", 7],
|
|
13
|
+
["xAI", 6],
|
|
14
|
+
["Qwen", 5],
|
|
15
|
+
["Moonshot", 4],
|
|
16
|
+
["DeepSeek", 4],
|
|
17
|
+
["MiniMax", 3],
|
|
18
|
+
] as [string, number][],
|
|
19
|
+
ids: ["openai/gpt-6.1-sol", "anthropic/claude-opus-5-5", "google/gemini-3.5-flash-lite", "deepseek/deepseek-v4.1-flash-ultrafast", "z-ai/glm-5.3-flash-ultrafast"],
|
|
20
|
+
night: { from: 0, to: 10, tz: "KST" },
|
|
21
|
+
deepseek: { id: "deepseek-v4.1-flash-ultrafast", input: ["$0.30", "$0.03"], output: ["$1.20", "$0.12"], off: "-90%" },
|
|
22
|
+
glm: { id: "glm-5.3-flash-ultrafast", off: "-70%" },
|
|
23
|
+
ttft: [
|
|
24
|
+
["gpt-5.4-nano", "612.5ms", 612.5],
|
|
25
|
+
["gemini-3.5-flash-lite", "693.0ms", 693.0],
|
|
26
|
+
["claude-haiku-5-5", "760.5ms", 760.5],
|
|
27
|
+
] as [string, string, number][],
|
|
28
|
+
calls: "18번 합 $0.0004",
|
|
29
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1140 650" width="1140" height="650" fill="none" role="img" aria-label="OpenGateway">
|
|
2
|
+
<title>OpenGateway</title>
|
|
3
|
+
<g id="logo" stroke="currentColor" fill="currentColor">
|
|
4
|
+
<rect id="node-in" x="36" y="36" width="420" height="578" rx="89" fill="none" stroke-width="72"/>
|
|
5
|
+
<rect id="bar-in" x="72" y="272" width="277" height="106" stroke="none"/>
|
|
6
|
+
<path id="node-out" d="M684 213 L684 125 A89 89 0 0 1 773 36 L1015 36 A89 89 0 0 1 1104 125 L1104 525 A89 89 0 0 1 1015 614 L773 614 A89 89 0 0 1 684 525 L684 436" fill="none" stroke-width="72" stroke-linecap="butt"/>
|
|
7
|
+
<g id="arrow">
|
|
8
|
+
<rect id="arrow-shaft" x="420" y="272" width="394" height="106" stroke="none"/>
|
|
9
|
+
<path id="arrow-head" d="M833 220 L970 325 L833 430 Z" stroke-width="38" stroke-linejoin="round"/>
|
|
10
|
+
</g>
|
|
11
|
+
</g>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// 테마 {{id}} 전용 효과 — THEME-MAKE.md 4단계. 5–10개, 이름 있는 내보내기 = theme.json effects[].name
|
|
2
|
+
// value: (t, opts) => Style·수·글 · layer: (el, opts) => (t) => void. 같은 t 면 같은 화면, Math.random 금지(rand(seed, i))
|
|
3
|
+
import type { SceneCtx } from "@kasaframe/core";
|
|
4
|
+
|
|
5
|
+
export type { SceneCtx };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { mountProject } from "@kasaframe/adapters";
|
|
2
|
+
import kf from "./kf.json";
|
|
3
|
+
import style from "./style.json";
|
|
4
|
+
|
|
5
|
+
// 장면 파일을 늘리거나 빼도 이 파일은 그대로 — 시간표는 kf.json 한 곳. 글꼴·색 변수는 mountProject 가 건다
|
|
6
|
+
const scenes = import.meta.glob("./scenes/*.ts", { eager: true });
|
|
7
|
+
const beats = Object.values(import.meta.glob("./beats.json", { eager: true, import: "default" }))[0] ?? null;
|
|
8
|
+
|
|
9
|
+
mountProject({ kf, scenes, beats, style, stage: document.getElementById("stage")! });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { SceneCtx } from "@kasaframe/core";
|
|
2
|
+
// THEME-MAKE.md 5단계에서 이 파일을 통째로 다시 쓴다 — 할 일: {{idea}}
|
|
3
|
+
import * as fx from "../../effects.ts";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
build(root: HTMLElement, ctx: SceneCtx) {
|
|
7
|
+
void fx;
|
|
8
|
+
const el = document.createElement("div");
|
|
9
|
+
el.style.cssText = `position:absolute;inset:0;display:grid;place-items:center;font:700 64px ${ctx.style.fonts.sans};color:${ctx.style.colors.dim};`;
|
|
10
|
+
root.append(el);
|
|
11
|
+
return (t: number) => {
|
|
12
|
+
el.textContent = `{{scene}} ${t.toFixed(2)}`;
|
|
13
|
+
};
|
|
14
|
+
},
|
|
15
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kasaframe/themes",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./src/index.ts",
|
|
8
|
+
"./fx": "./src/fx.ts",
|
|
9
|
+
"./factory": "./src/factory.ts",
|
|
10
|
+
"./stage3d": "./src/stage3d.ts",
|
|
11
|
+
"./slots": "./src/slots.ts",
|
|
12
|
+
"./slotkit": "./src/slotkit.ts"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@kasaframe/core": "0.0.0",
|
|
16
|
+
"three": "^0.186.1",
|
|
17
|
+
"@kasaframe/motion": "^0.0.0"
|
|
18
|
+
}
|
|
19
|
+
}
|