Threejs Earth Render

vibe-motion/skills/threejs-earth-render

作者 vibe-motion4c86c0d016a3ba22ee673428a494f3c44f84111f無授權條款收錄於 2026年10月9日更新於 2026年10月9日

Clone or update https://github.com/vibe-motion/threejs-earth and render the Three.js Earth route animation with Puppeteer frame capture. Use when users ask for 三维地球航线动画, Three.js Earth, 地球飞线, globe route animation, or exporting an Earth GIF/MP4/PNG sequence.

包含腳本Design & Creative
AI 產生的概覽

透過 Puppeteer 擷取瀏覽器畫面並編碼為 GIF 或 MP4,算繪 Three.js 地球航線動畫。

功能
複製或更新固定的 Three.js Earth 儲存庫,透過本機 HTTP 伺服器提供應用程式,並透過場景匯出鉤子逐格定位來擷取可重現的 PNG 畫格序列。接著使用 ffmpeg 將畫格編碼為 GIF 或 MP4,並印出最終輸出的絕對路徑。預設輸出為 448 像素寬、30 fps 的 GIF,並支援指定工作區、輸出路徑、算繪比例以及跳過儲存庫更新。
適用情境
當使用者需要 Three.js 地球航線動畫,例如三維地球航線動畫或地球飛線,或希望將地球動畫匯出為 GIF、MP4 或 PNG 序列時使用。也適用於在算繪前自訂預設杭州至巴黎航線的情況。
執行需求
需要 git、node、npm、ffmpeg,以及用於複製或更新儲存庫、CDN 匯入和安裝 Puppeteer 的網路存取。此技能附帶可執行指令碼(一個 Python 算繪指令碼和一個 Node 擷取指令碼),並預期使用 /usr/local/bin/python3 下的 Python 3。

Three.js Earth Render

Workflow

  1. Use scripts/render_threejs_earth.py from this skill.
  2. Pass --workspace when the user specifies where the source checkout should live; otherwise use the current directory.
  3. Pass --output when the user specifies a GIF/MP4 path; otherwise use out/threejs-earth.gif.
  4. For customized routes, edit threejs-earth/src/routeConfig.js first and render with --skip-update so local edits are preserved.
  5. Run the script and wait for completion.
  6. Return the final absolute output path printed by the script.

Command

bash
/usr/local/bin/python3 scripts/render_threejs_earth.py \  --workspace "$(pwd)" \  --output "$(pwd)/out/threejs-earth.gif"

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/threejs-earth-render" ]; then    skill_dir="$base/skills/threejs-earth-render"    break  fidone[ -n "$skill_dir" ] || { echo "threejs-earth-render skill not found under ~/.agents, ~/.claude, or ~/.codex"; exit 1; }
/usr/local/bin/python3 "$skill_dir/scripts/render_threejs_earth.py" \  --workspace "$(pwd)" \  --output "$(pwd)/out/threejs-earth.gif"

Behavior

  • Repository source is fixed to https://github.com/vibe-motion/threejs-earth.git by default.
  • Reuse workspace/threejs-earth if it exists; otherwise clone it.
  • If the repo already exists, fetch and fast-forward the target branch unless --skip-update is passed.
  • Serve the Three.js app through a local HTTP server; do not open it with file://.
  • Use Puppeteer, not Remotion, because this is a browser-based 3D scene.
  • Seek each frame through window.__SCENE_3D_EXPORT__.setFrame(frame) so frames are independently reproducible.
  • Capture a PNG frame sequence, then encode .gif or .mp4 with ffmpeg.
  • Default render is a 30 fps GIF at 448 px wide. Use --output-width 0 to keep the native 2048 x 1152 capture.

Project Notes

  • Default route is Hangzhou to Paris in src/routeConfig.js.
  • The app exports a 16:9 scene at 2048 x 1152 for --render-scale 1 and 4096 x 2304 for --render-scale 2.
  • The scene uses CDN imports for Three.js and local high-resolution Earth texture assets, so network access is required on first load.

Requirements

  • git
  • node
  • npm
  • ffmpeg
  • network access for clone/update, CDN imports, and Puppeteer installation

來源與署名

來源:vibe-motion/skills位於threejs-earth-render提交4c86c0d

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架