Threejs Earth Render

vibe-motion/skills/threejs-earth-render

by vibe-motion4c86c0d016a3ba22ee673428a494f3c44f84111fNo licenseListed Oct 9, 2026Updated Oct 9, 2026

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.

Includes scriptsDesign & Creative
AI-generated overview

Renders the Three.js Earth route animation by capturing browser frames with Puppeteer and encoding a GIF or MP4.

What it does
Clones or updates a fixed Three.js Earth repository, serves the app over a local HTTP server, and captures a reproducible PNG frame sequence by seeking each frame through the scene export hook. It then encodes the frames into a GIF or MP4 with ffmpeg and prints the final absolute output path. Default output is a 30 fps GIF at 448 px wide, with options for workspace, output path, render scale, and skipping repository updates.
When to use it
Use it when a user asks for a Three.js Earth globe route animation, such as a 三维地球航线动画 or 地球飞线, or wants an Earth animation exported as GIF, MP4, or a PNG sequence. It also fits cases where the default Hangzhou-to-Paris route is customized before rendering.
Requirements
Requires git, node, npm, ffmpeg, and network access for cloning or updating the repository, CDN imports, and Puppeteer installation. It ships executable scripts (a Python renderer and a Node capture script) and expects Python 3 at /usr/local/bin/python3.

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

Source and attribution

Source:vibe-motion/skillsinthreejs-earth-renderat commit4c86c0d

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal