wechat-2d-render
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWeChat 2D Render
微信2D渲染
Workflow
工作流程
- Use from this skill.
scripts/render_wechat_2d.sh - Pass as the first argument when the user specifies a folder; otherwise use the current directory.
workspace_dir - Pass as the second argument when the user specifies output; otherwise use
output_path.out/wechat-2d-transparent.mov - Pass a props JSON path as the third argument when the user provides custom Remotion props; otherwise use .
shared/project/render-presets/default.json - Run the script and wait for completion.
- Return the final absolute output path printed by the script.
- 使用本技能中的脚本。
scripts/render_wechat_2d.sh - 如果用户指定了文件夹,将作为第一个参数传入;否则使用当前目录。
workspace_dir - 如果用户指定了输出路径,将作为第二个参数传入;否则使用
output_path。out/wechat-2d-transparent.mov - 如果用户提供了自定义Remotion参数,将props JSON路径作为第三个参数传入;否则使用。
shared/project/render-presets/default.json - 运行脚本并等待完成。
- 返回脚本输出的最终绝对输出路径。
Command
命令
bash
bash scripts/render_wechat_2d.sh [workspace_dir] [output_path] [props_file]bash
bash scripts/render_wechat_2d.sh [workspace_dir] [output_path] [props_file]Installed Skill Resolution
已安装技能解析
Use the installed skill copy, not the source repo checkout:
bash
skill_dir=""
for base in "${AGENTS_HOME:-$HOME/.agents}" "${CLAUDE_HOME:-$HOME/.claude}" "${CODEX_HOME:-$HOME/.codex}"; do
if [ -d "$base/skills/wechat-2d-render" ]; then
skill_dir="$base/skills/wechat-2d-render"
break
fi
done
[ -n "$skill_dir" ] || { echo "wechat-2d-render skill not found under ~/.agents, ~/.claude, or ~/.codex"; exit 1; }
bash "$skill_dir/scripts/render_wechat_2d.sh" "$(pwd)" "$(pwd)/out/wechat-2d-transparent.mov"使用已安装的技能副本,而非源码仓库检出版本:
bash
skill_dir=""
for base in "${AGENTS_HOME:-$HOME/.agents}" "${CLAUDE_HOME:-$HOME/.claude}" "${CODEX_HOME:-$HOME/.codex}"; do
if [ -d "$base/skills/wechat-2d-render" ]; then
skill_dir="$base/skills/wechat-2d-render"
break
fi
done
[ -n "$skill_dir" ] || { echo "wechat-2d-render skill not found under ~/.agents, ~/.claude, or ~/.codex"; exit 1; }
bash "$skill_dir/scripts/render_wechat_2d.sh" "$(pwd)" "$(pwd)/out/wechat-2d-transparent.mov"Behavior
行为
- Reuse local repo if exists; otherwise clone from GitHub.
workspace_dir/wechat-2d - Track remote default branch () when updating an existing repo.
origin/HEAD - Install dependencies with ; if
pnpm installis missing, enable it throughpnpm.corepack - Run the project Remotion scripts:
pnpm run remotion:ensure-browserREMOTION_OUTPUT=... REMOTION_PROPS_FILE=... pnpm run remotion:render
- Default render target is the active composition from , currently the
shared/project/projectConfig.jsplugin viawechat-chat-motion.ScaffoldDemo30fps - Default output is ProRes 4444 with pixel format and PNG image format, suitable for transparent-background workflows.
yuva444p10le
- 如果已存在,则复用本地仓库;否则从GitHub克隆。
workspace_dir/wechat-2d - 更新现有仓库时,跟踪远程默认分支()。
origin/HEAD - 使用安装依赖;如果未安装
pnpm install,通过pnpm启用它。corepack - 运行项目的Remotion脚本:
pnpm run remotion:ensure-browserREMOTION_OUTPUT=... REMOTION_PROPS_FILE=... pnpm run remotion:render
- 默认渲染目标是中的活动合成,当前是通过
shared/project/projectConfig.js的ScaffoldDemo30fps插件。wechat-chat-motion - 默认输出为ProRes 4444格式,采用像素格式和PNG图像格式,适用于透明背景工作流。
yuva444p10le
Project Notes
项目说明
- The project uses a scaffold/plugin split:
- for local UI controls and browser preview.
preview/* - for Remotion entry wrappers.
remotion/* - for common runtime.
shared/scaffold/* - for plugin and composition registry.
shared/project/* - for the WeChat chat scene.
shared/features/demoMotion/*
- Animation state must be deterministic per frame. Remotion renders frames in parallel and out of order, so do not rely on timers, mutable cursors, previous renders, or render order.
- Frame-specific data should be built from in
{frame, fps, loop, sceneContext, pluginParams}.buildSceneProps - Keep and
videoWidthas layout props; use a props JSON file for custom sizes.videoHeight
- 项目采用脚手架/插件分离架构:
- 用于本地UI控制和浏览器预览。
preview/* - 用于Remotion入口包装器。
remotion/* - 用于通用运行时。
shared/scaffold/* - 用于插件和合成注册。
shared/project/* - 用于微信聊天场景。
shared/features/demoMotion/*
- 动画状态必须逐帧确定。Remotion会并行且乱序渲染帧,因此请勿依赖计时器、可变游标、之前的渲染或渲染顺序。
- 特定帧的数据应从中的
buildSceneProps构建。{frame, fps, loop, sceneContext, pluginParams} - 将和
videoWidth作为布局参数保留;使用props JSON文件自定义尺寸。videoHeight
Requirements
要求
gitnode- or
corepackpnpm - network access for clone/update and dependency install
gitnode- 或
corepackpnpm - 克隆/更新仓库及安装依赖需要网络访问