Summary
用 Remotion 制作数学证明/几何动画视频:深底高饱和 + 精准 SVG 几何 + 公式逐步揭示 + 字幕驱动时间轴,3Blue1Brown/可汗风格。当用户要把数学证明文档(勾股定理、欧拉公式、积分…)、几何推导、代数恒等式、算法可视化做成精准几何风格的视频时,必须使用这个…
liangdabiao/video-skills-toolkit · Archived
用 Remotion 制作数学证明/几何动画视频:深底高饱和 + 精准 SVG 几何 + ?
npx skills add liangdabiao/video-skills-toolkit --skill geometry-math-proof-remotion
用 Remotion 制作数学证明/几何动画视频:深底高饱和 + 精准 SVG 几何 + 公式逐步揭示 + 字幕驱动时间轴,3Blue1Brown/可汗风格。当用户要把数学证明文档(勾股定理、欧拉公式、积分…)、几何推导、代数恒等式、算法可视化做成精准几何风格的视频时,必须使用这个…
This repository is archived — consider an actively maintained alternative.
用 Remotion 制作「纸片分层动画」视频:把背景、主角、?
4 installsConvert local audio/video files or public media URLs into subtitle files by uploading local fil…
3 installs用 Remotion 制作可复用的口播视频工程:支持口播音频/视频、右下角圆形 PIP、底部同步字幕、顶部章节…
3 installs用 Remotion 制作「小白学AI」系列的手绘?
3 installsRelated neighbors and high-traction skills in the same topics — useful to compare before installing.
Three.js geometry creation - built-in shapes, BufferGeometry, custom geometry, instancing. Use …
9.4K installsBuild React Three Fiber geometry, custom buffers, instanced meshes, points, and lines. Use for …
1.3K installsThree.js geometry creation - built-in shapes, BufferGeometry, custom geometry, instancing. Use …
7 installsUse this skill when using Phaser 4 math and geometry utilities. Covers vectors, rectangles, cir…
8 installs>- 把一道立体几何题解成一个自? 右侧 Three.js 可交互 3D 模型(分步高亮 + 镜头切换)。支持三种? …
9 installs>- 把一道解析几何题解成一个自? 可变参数滑块驱动实时重算的几何量 + 理论范围/定值指示),中栏 KaT…
7 installsOther skills from liangdabiao/video-skills-toolkit.
npx skills add liangdabiao/video-skills-toolkit
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
main
Parsed from SKILL.md frontmatter.
Files included with this skill beyond the listing page.
SKILL.md
8,183 B
README.md
4,211 B
SUMMARY.md
549 B
把数学证明文档(markdown)变成深底精准几何风格的 Remotion 视频。几何全部代码绘制(SVG + stroke-dash 描边),公式逐行揭示,字幕驱动时间轴。
规范样板:<VIDEO_WORKSPACE>/pythagorean-garfield-proof/ 是首集成品工程。遇到拿不准的版式/节奏/坐标问题,先看它的 src/GarfieldProof.tsx,不要凭空发挥。
- 钩子:抛出要证的命题,大字公式 + 悬念副标题 - 准备:介绍构造(三角形/线段/多边形),引入变量 a/b/c… - 推导 1~N:每章只证一件事(局部面积、整体面积、某次代数化简…) - 消项/合成:把局部结果拼成最终等式 - 收尾:boxed 结论 + 历史/人物/扩展署名
- 每个变量定义(a 是什么、b 是什么) - 每个几何构造(哪几个点拼成哪个三角形) - 每个面积/角度计算 - 关键代数步骤(展开、消项、平方) - 最终结论 + 历史署名 后续写 LINES 时用这张表防止把证明压成"口播三句话完事"。
scripts/generate_tts.py,把 LINES 替换成本证明的章节台词。每行 {"id", "chapter", "text"}。运行:``bash python scripts/generatetts.py ` 产出 public/assets/audio/voice.mp3、work/captions/captionsaligned.json、work/captions/captions.srt`。
captionsaligned.json 的 lines 拿每章末帧,写到 src/geometry.tsx 的 F 对象。同步把 Root.tsx 的 durationInFrames 改成 totalframes。不要停留在无配音估时版本。``bash mkdir "<VIDEOWORKSPACE>/<new-proof>" cp -R "./.claude/skills/geometry-math-proof-remotion/templates/remotion-project/" \ "<VIDEOWORKSPACE>/<new-proof>/" cd "<VIDEO_WORKSPACE>/<new-proof>" && npm install ` ⚠️ 用原生 npm install,不要 rtk npm install(rtk 会翻译成 npm run install` 报错)。
- 几何坐标:根据本证明的图形定义关键点 const A = pt(0,0), B = pt(3,0)… - CAPTIONS:从 captions_aligned.json 的每行 text 拆出关键词(标 tone: 'accent'),其他作为普通文字 - STEPS:FormulaStep 列表,from 帧对齐到对应章节的中段 - HookOverlay / EndingOverlay 的 title/result 用大字公式,attribution 写历史/人物 不要改 geometry.tsx/formula-panel.tsx/caption-strip.tsx/hooks-overlay.tsx(风格锁定文件)。如需新组件,在新文件里加,不要改通用文件。
- npx tsc --noEmit - 渲接近每章结尾的静帧逐一检查: ``bash npx remotion still src/index.ts Proof --frame=<章末帧-30> out/check-N.png ` 读图检查:文字溢出 SVG 框、几何元素重叠遮挡、字幕压住关键标签、公式行列错位 - 关键词同步抽查:每条 LINES 的关键词(accent 部分),渲染"出现前 0.5s"和"出现后 0.5s"两帧;前帧不能露出,后帧只能露出已说到的词 - npm run render:preview 出 renders/preview-low.mp4(scale=0.5),用户确认后再 npm run render 出 renders/final-1080p.mp4`
| 项 | 值 |
|---|---|
| 画布 | 1920×1080 @ 30fps,深底 #0d0d12 |
| 配色 | 红 #e74c3c、蓝 #3498db、绿 #2ecc71、黄 #f1c40f(黄=最终结论/钩子) |
| 字体 | 数学衬线 Cambria Math/STIX Two Math,中文 PingFang SC/Microsoft YaHei |
| 几何 | SVG viewBox 0 0 1100 860,坐标变换 pt(gx,gy),单位 SCALE=130px/单位 |
| 描边 | 一切线框都用 strokeDasharray+strokeDashoffset 做"被画出来"动画 |
| 动画 | fadeIn(淡入)、drawIn(描边渐进)、fadeOut(淡出),缓动统一 bezier(0.4,0,0.2,1);没有弹跳/旋转/滑入 |
| 字幕 | 底部 110px 字幕条,关键词 tone:'accent' 用黄色加粗高亮 |
| 公式 | 右侧 700×820 面板,逐步揭示;最终结论用黄框大字 (tone:'result') |
| 素材 | 全部代码绘制,不用任何位图/图标库/emoji |
| 配音 | MiniMax speech-2.8-hd,voiceid mossaudio_2ecaeaac-5e5a-11f1-99fb-96e792fde6a1,1.2x 语速 |
HookOverlay 组件,在第二章节开始前 18 帧淡出。tone:'result' 黄框大字。EndingOverlay 全屏遮罩,Q.E.D. 字样 + 黄框公式 + 历史/人物署名(年代、作者、出处)。默认单旁白。如需多音色(对话式证明),参考 sketch-story-remotion 的多音色流程,但保留本 skill 的视觉 DNA。voice_id 映射见 sketch-story。
² ₁₂₃ 触发 TS1351。Unicode No 类字符被 TS 解析为数字字面量后接标识符,在 JSX 文本位置报错。所有数学文本一律包字符串表达式:<span>{'a² + b²'}</span>,不要写裸文本 <span>a² + b²</span>。详见 references/jsx-unicode-pitfalls.md。² 的字符串。Edit 工具对 Unicode No 字符匹配不稳定。改用 Python 一次性 str.replace 或重写整个文件。remotion.config.ts 必须设 Config.setBrowserExecutable(系统 Chrome)。Edge 不行(旧 headless flag 已移除)。rtk npm install 失败。用原生 npm install。references/composition-patterns.md — SVG 描边、坐标变换、FormulaPanel 逐步揭示、CAPTIONS accent 拆词的详细模式references/jsx-unicode-pitfalls.md — ²/下标的 TS1351 坑、Edit 工具失败、Python 替代方案的完整说明<VIDEO_WORKSPACE>/pythagorean-garfield-proof/src/GarfieldProof.tsx — 631 行完整实战例子