Communitygithub.com

物理动画解释器 (remotion-physics-explainer)

为物理概念(力学、电磁学、热力学、光学/波动、量子力学、相对论)创建同步、沉浸式的单画面Remotion解释视频,采用纯Log2Base2单阶段格式,带有聚焦的单行定律高亮、全屏动画受力/场/波模拟以及实时遥测,毫秒级精确的字幕和快速的1080p MP4渲染。

物理动画解释器 (remotion-physics-explainer) 是什么?

这项技能可以将任何物理概念、定律或问题转化为一个沉浸式的、帧同步的1920×1080 30fps MP4 Remotion解释视频,采用单面板Log2Base2工作室格式。它特别适用于需要清晰、视觉化解释物理系统或定律的场景,例如力学、电磁学、热力学和量子力学。该技能支持在单个画布上同时显示核心方程、全屏SVG物理模拟(如钟摆、弹道轨迹、磁场中的带电粒子)以及实时遥测数据,并附带毫秒级精确的字幕。它依赖于`remotion-best-practices`和`uv`工具,并提供了一个CLI工具来脚手架项目、合成语音并渲染最终视频。使用此技能时,用户只需提出一个物理问题或以`/remotion`开头,系统即可自动生成完整的解释视频。

兼容平台✓Claude Code~Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/uzowurumauritius-rgb/remotion-stage/tree/main/skills/remotion-physics-explainer

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Remotion 物理动画解释器 (remotion-physics-explainer)

概述

将任何物理概念、定律或问题转化为一个沉浸式的、帧同步的 1920×1080 30fps MP4 Remotion 解释视频,采用 单面板 Log2Base2 工作室格式。

绝不将屏幕分割成竞争性的并排面板或堆叠的文本卡片墙。每个视频都使用 一个统一的视觉舞台 (<SinglePaneStage>):

  1. 最小化顶部栏 (44px,内置于 SinglePaneStage):
    • 左侧显示主题标题 + 活动部分标签;右侧显示微妙的步骤计数器 + 细进度条。
  2. 一个统一的 Log2Base2 舞台 (SinglePaneStage — 100% 宽度):
    • 聚焦的单行聚光灯标题:高亮当前口语化的物理符号 (F, m, a, E, B, λ, Ψ, ΔS) 在活动方程行中,使用 borderBottom: "2px solid #FACC15" (绝不 添加水平内边距) 外加 一个 紧凑的活动调用标签 (symbol → 物理含义 + SI 单位),出现在 triggerFrame。
    • 全宽沉浸式 SVG 画布 (viewBox="0 0 1600 680"): 宽敞的实时物理模拟——钟摆、抛射体轨迹、在 $\vec{B}$-场中弯曲的带电粒子、干涉波前、能量棒传递和实时矢量覆盖——直接在同一开放画布上动画。
  3. 最小化底部字幕栏 (VoiceoverCaptionBar — 68px):
    • 由精确的 TTS WordBoundary 时间戳驱动的居中逐词高亮卡拉 OK 字幕。

依赖项

  • remotion-best-practices (~/.gemini/skills/remotion/SKILL.md):必须遵循所有 Remotion 动画规则 (useCurrentFrame(), interpolate(), spring(), <Sequence premountFor>, <Audio>, @remotion/google-fonts 和零 CSS 过渡)。
  • uv (~/.gemini/config/plugins/science/skills/uv/SKILL.md):运行 uv run --with edge-tts 所需。

快速开始

# 1. 搭设 Remotion 物理解释器项目脚手架
uv run python3 \
  ~/.gemini/config/skills/remotion-physics-explainer/scripts/explainer_cli.py \
  scaffold \
  --project-dir "/path/to/project" \
  --output "/path/to/project/scaffold-status.json"

# 2. 合成自然神经语音 + 精确的 WordBoundary 时间戳
uv run --with edge-tts python3 \
  ~/.gemini/config/skills/remotion-physics-explainer/scripts/explainer_cli.py \
  synthesize-voiceover \
  --project-dir "/path/to/project" \
  --beats-json "/path/to/project/beats.json" \
  --voice "en-US-AndrewNeural" \
  --rate "+2%" \
  --pause-sec 0.40 \
  --output "/path/to/project/public/voiceover/manifest.json"

# 3. 渲染最终 1080p 30fps MP4 视频
uv run python3 \
  ~/.gemini/config/skills/remotion-physics-explainer/scripts/explainer_cli.py \
  render-mp4 \
  --project-dir "/path/to/project" \
  --composition-id "PhysicsExplainer" \
  --out-name "PhysicsExplainer.mp4" \
  --concurrency 8 \
  --output "/path/to/project/render-report.json"

沉浸式叙事与工作流程

  1. 保持 snippet 集中(2–4 行),以便 <SinglePaneStage> 一次只高亮 一个 活动方程和 一个 活动符号调用标签。
  2. 对有连续物理运动(钟摆、波动、场、粒子)的节拍设置 "motionStepFrames": 2。
  3. 展示,而非讲述:在同一全宽 1600×680 SVG 画布内(使用 <clipPath> 处理移动的图/波)一起动画化力、场、能量交换和实时运动图,绝不放在分离的分屏框中。
  4. 始终运行 npm run lint,使用 read_file 检查代表性静态帧 (npx remotion still),并将最终的 .mp4 保存到 out/、项目根目录和工作空间根目录。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

remotion-code-explainer

Creates synchronized, immersive single-pane Remotion visual explainer videos for source code (Mobile/Web UI, Backend, AI/ML, Algorithms) in a pure Log2Base2 single-stage format—with a focused single-line code spotlight, full-screen animated memory boxes, pointer arrows, data packets, and live execution state on one canvas, WordBoundary karaoke captions, and fast 1080p MP4 rendering. Use whenever the user asks to explain code with /remotion, build a code walkthrough video, or turn a voiceover script into an MP4 explainer.

remotion-electronic-explainer

Creates synchronized, immersive single-pane Remotion visual explainer videos for Electronic Engineering (Semiconductors, PN Junctions, Diodes, BJTs, MOSFETs, CMOS Logic, Op-Amp IC Stages, ADC/DAC, PCB Signal Integrity) in a pure Log2Base2 single-stage format—with a focused single-line device equation spotlight, full-screen animated carrier/channel diagrams and live I-V curves on one canvas, WordBoundary karaoke captions, and fast 1080p MP4 rendering. Use whenever the user asks to explain electronic engineering, semiconductors, transistors, or analog/digital ICs with /remotion.

remotion-math-explainer

Creates synchronized, immersive single-pane Remotion visual explainer videos for Mathematics (Calculus, Linear Algebra, Differential Equations, Probability, Proofs) in a pure Log2Base2 single-stage format—with a focused single-line equation spotlight, full-screen 3Blue1Brown x Log2Base2 animated geometric/data motion graphics, WordBoundary karaoke captions, and fast 1080p MP4 rendering. Use whenever the user asks to explain math with /remotion, animate a derivation or theorem, or turn a math script into an MP4 explainer.

remotion-software-explainer

Creates synchronized, immersive single-pane Remotion visual explainer videos for Software Engineering (System Design, Distributed Systems, Microservices, Kubernetes/Docker, Design Patterns, Database Internals, CI/CD, Networking) in a pure Log2Base2 single-stage format—with a focused single-line contract/YAML spotlight, full-screen animated architecture flows with traveling request packets and live trace timelines on one canvas, WordBoundary karaoke captions, and fast 1080p MP4 rendering. Use whenever the user asks to explain software engineering, system design, or architecture with /remotion.

相关技能