agentsclimarketplace

Vectojs video exporter

Skill vectojs/vectojs-skills/skills/vectojs-video-exporter

Agent skills for building, optimizing, embedding, and exporting VectoJS projects with Codex, Claude Code, Cursor, and GitHub Copilot.

Install
npx -y skills add vectojs/vectojs-skills --skill vectojs-video-exporter

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use when exporting VectoJS scenes to H.264 MP4 with @vectojs/video-exporter, CLI/API capture, fixed-step scene contracts, Chromium, FFmpeg, cancellation, cleanup, or deterministic animation rendering.

SKILL.md

2.8 KB, as published. Nobody here has run it

VectoJS Video Exporter

Use this skill to export VectoJS canvas scenes to deterministic MP4 files through Chromium and FFmpeg.

Export workflow

  1. Confirm ffmpeg with libx264 is on PATH.
  2. Confirm Chromium resolution: PUPPETEER_EXECUTABLE_PATH, system Chromium, or Puppeteer’s browser.
  3. Ensure the rendered page exposes window.vectoScene with callable stop() and step(dt).
  4. Keep animations deterministic: use Scene.step(dt), seeded randomness, and no wall-clock/network dependence.
  5. Choose local module or hosted URL input.
  6. Use cancellation with AbortController for API calls or signals for CLI jobs.
  7. Verify the output frame count and existing-file preservation on failure when release quality matters.

Read references/export-recipes.md for CLI/API snippets.

Current 0.2 contract

  • CLI binary: vecto-export.
  • API: exportVideo(options).
  • First page <canvas> is resized and captured.
  • Output is H.264 MP4 with yuv420p.
  • Frame count is Math.ceil(fps * duration).
  • Failed or aborted exports preserve an existing destination and remove incomplete staged files.
  • SIGINT/SIGTERM clean up Chromium, Vite, FFmpeg, progress output, and staged files.
  • Capture runs at deviceScaleFactor: 1 — output resolution equals width×height exactly, independent of the host machine's DPR.
  • The exporter calls scene.stop() itself, then drives step(dt) per frame; the page only needs to expose the scene, not manage the loop. step() uses the Scene's main renderer, so particle simulations advance deterministically.

Sandbox policy

Keep Chromium sandboxing enabled for normal users. It is disabled only when running as root or when VECTO_CHROMIUM_NO_SANDBOX=1 is explicitly set. Prefer a non-root export process.

Common mistakes

MistakeCorrection
Forgetting window.vectoSceneExpose the Scene after adding entities and before starting export.
Using wall-clock animationDrive state from step(dt) time or seeded simulation state.
Publishing helper HTML into source dirsUse local module input; exporter serves it through in-memory Vite HTML.
Killing the process without cleanupUse AbortController or process signals and wait for cleanup.
Assuming browser export works on CIInstall FFmpeg and Chromium; set PUPPETEER_EXECUTABLE_PATH when needed.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.