dsh-motion 0.3.0 → 0.4.1
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/README.md +29 -1
- package/docs/ai-native-motion.md +58 -15
- package/docs/performance-budget.md +73 -0
- package/lib/approvals.js +60 -0
- package/lib/index.js +5 -1
- package/lib/ops.js +44 -2
- package/package.json +5 -2
- package/scripts/approvals.mjs +136 -0
- package/scripts/build-style-index.mjs +110 -0
- package/scripts/check-meta.mjs +25 -0
- package/scripts/dev.mjs +68 -0
- package/scripts/plan-questions.mjs +277 -0
- package/scripts/route-style.mjs +112 -0
- package/scripts/smoke.mjs +83 -0
- package/scripts/test-approvals.mjs +64 -0
- package/scripts/test-ops.mjs +269 -0
- package/scripts/test-plan.mjs +94 -0
- package/scripts/test-route.mjs +63 -0
- package/skills/animation-router/SKILL.md +70 -15
- package/skills/animation-router/references/confirmation.md +82 -0
- package/skills/design-spec/SKILL.md +7 -1
- package/skills/qa-rubric/SKILL.md +13 -0
- package/styles/3b1b/preview.jpg +0 -0
- package/styles/3b1b/theme.py +3 -0
- package/styles/README.md +2 -0
- package/styles/blueprint/theme.py +3 -0
- package/styles/dataviz/style.json +1 -0
- package/styles/dataviz/theme.py +3 -0
- package/styles/registry.json +1 -0
- package/styles/swiss-motion/theme.py +3 -0
- package/styles/whiteboard/theme.py +3 -0
|
@@ -21,7 +21,13 @@ HyperFrames 的 look 文档原话:**不给外部输入,相同的 brief 每
|
|
|
21
21
|
|
|
22
22
|
## 先路由
|
|
23
23
|
|
|
24
|
-
写 spec
|
|
24
|
+
写 spec 之前先过需求卡点:`node scripts/plan-questions.mjs "<brief>" --json`。它会推断画幅、交付、风格的候选项(选项来自 `styles/registry.json`,不是固定清单),能推断的不问。
|
|
25
|
+
|
|
26
|
+
风格:点名优先;没有点名就按 `styles/registry.json` 打分;`high` 才直接写,`medium`/`low` 先给用户 top 2–3 确认。
|
|
27
|
+
|
|
28
|
+
## 确认门
|
|
29
|
+
|
|
30
|
+
`DESIGN.md` 和 3 张风格帧属于确认门的“视觉”阶段:先有确认过的脚本与分镜,再做视觉。按 `gateMode` 分档(`light` 合并脚本+分镜,`standard` 分开,`full` 加 animatic)。用户明确说“可以开始”之前,不要写完整场景、不要渲染成片。流程与账本见 [animation-router](../animation-router/SKILL.md) 的 §4。
|
|
25
31
|
|
|
26
32
|
## 最小形态
|
|
27
33
|
|
|
@@ -5,6 +5,15 @@ description: 代码动画的自检清单:环境、公式、画面、音频、
|
|
|
5
5
|
|
|
6
6
|
# 交付前自检
|
|
7
7
|
|
|
8
|
+
## 0. 迭代预算
|
|
9
|
+
|
|
10
|
+
- 首帧 ≤60 s;总时长 ≤400 s(30 s 片);
|
|
11
|
+
- 输出 tokens ≤30k,上下文 ≤100k;
|
|
12
|
+
- 每次迭代 1 张 contact sheet,读图 ≤10 次;
|
|
13
|
+
- 全文件重写 0 次;`motion_probe` 1 次、`motion_render` 2 次。
|
|
14
|
+
|
|
15
|
+
详见 [performance-budget.md](../../docs/performance-budget.md)。
|
|
16
|
+
|
|
8
17
|
## 1. 环境
|
|
9
18
|
|
|
10
19
|
先跑 `motion_doctor`,`ready.math` 与 `ready.delivery` 都为 true 再继续。
|
|
@@ -34,6 +43,8 @@ npx hyperframes check
|
|
|
34
43
|
```
|
|
35
44
|
|
|
36
45
|
- 返回的 storyboard PNG 逐张看过:无叠字、无出画、字号可读;
|
|
46
|
+
- sheet 每格顶部是 caption 条,不是画面;不要把 caption 当成"上沿被裁";
|
|
47
|
+
- 中文文本没有用字符级 `Transform` / `ReplacementTransform`;换词用 FadeOut + FadeIn;
|
|
37
48
|
- `layoutProblems` 每一条都要处理或明确接受;
|
|
38
49
|
- 已经生成了 mp4 时,才用 `motion_probe` 抽 contact sheet + 查 `blankFrames`;
|
|
39
50
|
- 用了 HyperFrames 的项目,用 `npx hyperframes snapshot <project> --at 2.9,10.4` 抽帧,不要先 render 再截图。
|
|
@@ -53,3 +64,5 @@ npx hyperframes check
|
|
|
53
64
|
## 7. 交付
|
|
54
65
|
|
|
55
66
|
mp4 + `.srt` + 场景源码 + `DESIGN.md` + 分镜表。
|
|
67
|
+
|
|
68
|
+
开工前跑过 `node scripts/approvals.mjs check <project>`;确保 `APPROVALS.json` 里 `start` 是用户明确授权,而不是 agent 自己填的。
|
package/styles/3b1b/preview.jpg
CHANGED
|
Binary file
|
package/styles/3b1b/theme.py
CHANGED
|
@@ -13,6 +13,9 @@ import manimgx as m
|
|
|
13
13
|
|
|
14
14
|
TOKENS = json.loads(Path(__file__).with_name("tokens.json").read_text(encoding="utf-8"))
|
|
15
15
|
|
|
16
|
+
# inspect 在 import 时读 config.frame_rate;必须放在模块层,不能只在 construct 里。
|
|
17
|
+
m.config.frame_rate = int(TOKENS["motion"]["fps"])
|
|
18
|
+
|
|
16
19
|
BG = TOKENS["colors"]["bg"]
|
|
17
20
|
TEXT = TOKENS["colors"]["text"]
|
|
18
21
|
LABEL = TOKENS["colors"]["label"]
|
package/styles/README.md
CHANGED
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
- 每个风格目录:`style.json`(元数据)+ `STYLE.md`(不变量)+ `tokens.json` + `theme.py` + `preview.jpg`;
|
|
18
18
|
- `STYLE.md` 是**改编**,必须在上游基础上写清楚差异;不复制 demo 代码;
|
|
19
19
|
- 颜色、字体、时间表、音频以 `tokens.json` 为准;版面坐标与组件配方写在 `STYLE.md`;
|
|
20
|
+
- 中文文本不做字符级 `ReplacementTransform` / `Transform`(会出字形碎片);用 Fade/Write/Indicate,换词用 FadeOut+FadeIn;
|
|
21
|
+
- `theme.py` 必须在**模块 import 时**设置 `m.config.frame_rate`(不能只在 `construct` 里),否则 `manimgx inspect` 会按默认 60fps 取帧,30fps 场景的后半段会报 no frame;
|
|
20
22
|
- 路由:`styles/registry.json` 是元数据,`node scripts/route-style.mjs "<题材>"` 打分;点名优先,低置信度/并列先问用户;
|
|
21
23
|
- 新片在自己的项目目录写 `DESIGN.md`,头部 `style: <slug>` + `style_version: 1.0.0`;
|
|
22
24
|
- 参考与示例统一用 HyperFrames 的 [examples](https://hyperframes.heygen.com/examples) / [catalog](https://hyperframes.heygen.com/catalog),不在仓库里放样片(`showcase/` 只放可复现的演示)。
|
|
@@ -15,6 +15,9 @@ import manimgx as m
|
|
|
15
15
|
|
|
16
16
|
TOKENS = json.loads(Path(__file__).with_name("tokens.json").read_text(encoding="utf-8"))
|
|
17
17
|
|
|
18
|
+
# inspect 在 import 时读 config.frame_rate;必须放在模块层,不能只在 construct 里。
|
|
19
|
+
m.config.frame_rate = int(TOKENS["motion"]["fps"])
|
|
20
|
+
|
|
18
21
|
TABLE = TOKENS["colors"]["table"]
|
|
19
22
|
PAPER = TOKENS["colors"]["paper"]
|
|
20
23
|
PAPER_LIGHT = TOKENS["colors"]["paper_light"]
|
package/styles/dataviz/theme.py
CHANGED
|
@@ -13,6 +13,9 @@ import manimgx as m
|
|
|
13
13
|
|
|
14
14
|
TOKENS = json.loads(Path(__file__).with_name("tokens.json").read_text(encoding="utf-8"))
|
|
15
15
|
|
|
16
|
+
# inspect 在 import 时读 config.frame_rate;必须放在模块层,不能只在 construct 里。
|
|
17
|
+
m.config.frame_rate = int(TOKENS["motion"]["fps"])
|
|
18
|
+
|
|
16
19
|
PAPER = TOKENS["colors"]["paper"]
|
|
17
20
|
PAPER_SHADOW = TOKENS["colors"]["paper_shadow"]
|
|
18
21
|
INK = TOKENS["colors"]["ink"]
|
package/styles/registry.json
CHANGED
|
@@ -13,6 +13,9 @@ import manimgx as m
|
|
|
13
13
|
|
|
14
14
|
TOKENS = json.loads(Path(__file__).with_name("tokens.json").read_text(encoding="utf-8"))
|
|
15
15
|
|
|
16
|
+
# inspect 在 import 时读 config.frame_rate;必须放在模块层,不能只在 construct 里。
|
|
17
|
+
m.config.frame_rate = int(TOKENS["motion"]["fps"])
|
|
18
|
+
|
|
16
19
|
GROUND = TOKENS["colors"]["ground"]
|
|
17
20
|
PAPER = TOKENS["colors"]["paper"]
|
|
18
21
|
INK = TOKENS["colors"]["ink"]
|
|
@@ -15,6 +15,9 @@ import manimgx as m
|
|
|
15
15
|
|
|
16
16
|
TOKENS = json.loads(Path(__file__).with_name("tokens.json").read_text(encoding="utf-8"))
|
|
17
17
|
|
|
18
|
+
# inspect 在 import 时读 config.frame_rate;必须放在模块层,不能只在 construct 里。
|
|
19
|
+
m.config.frame_rate = int(TOKENS["motion"]["fps"])
|
|
20
|
+
|
|
18
21
|
BOARD = TOKENS["colors"]["board"]
|
|
19
22
|
BOARD_EDGE = TOKENS["colors"]["board_edge"]
|
|
20
23
|
INK = TOKENS["colors"]["ink"]
|