Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
chanjing-ai avatar

Three

  • 75 installs
  • Updated July 24, 2026
  • chanjing-ai/framevideo

Render deterministic Three.js and WebGL scenes in FrameVideo compositions that respond to fv-seek events instead of wall-clock time.

About

Provides Three.js and WebGL adapter patterns for rendering deterministic 3D scenes in FrameVideo compositions. A developer uses it to add product spins, shader plates, or GLTF animation that render exactly at each seeked frame.

  • Render Three.js scenes from FrameVideo time via fv-seek events
  • Seek AnimationMixer and camera motion deterministically per frame

Three by the numbers

  • 75 all-time installs (skills.sh)
  • Ranked #835 of 1,335 Generative Media skills by installs in the Skillselion catalog
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/chanjing-ai/framevideo --skill three

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs75
Last updatedJuly 24, 2026
Repositorychanjing-ai/framevideo

What it does

Render deterministic Three.js and WebGL scenes in FrameVideo compositions that respond to fv-seek events instead of wall-clock time.

Files

SKILL.mdMarkdownGitHub ↗

Three.js for FrameVideo

FrameVideo supports Three.js through its three runtime adapter. The adapter does not own your scene. It publishes FrameVideo time and dispatches a seek event so your composition can render the exact frame.

Contract

  • Create the scene, camera, renderer, materials, and assets synchronously when possible.
  • Render from FrameVideo time, not wall-clock time.
  • Listen for the fv-seek event and render exactly that time.
  • Load models, textures, and HDRIs before render-critical seeking. Do not fetch them at seek time.
  • Avoid requestAnimationFrame or renderer.setAnimationLoop as the source of truth for render-critical motion.

The adapter sets window.__fvThreeTime and dispatches new CustomEvent("fv-seek", { detail: { time } }) on each seek.

Basic Pattern

<canvas id="three-layer"></canvas>
<script type="module">
  import * as THREE from "https://cdn.jsdelivr.net/npm/three@0.181.2/+esm";

  const canvas = document.getElementById("three-layer");
  const renderer = new THREE.WebGLRenderer({ canvas, alpha: true, antialias: true });
  // Match these to your composition's frame size.
  renderer.setSize(1920, 1080, false);
  renderer.setPixelRatio(1);

  const scene = new THREE.Scene();
  const camera = new THREE.PerspectiveCamera(35, 1920 / 1080, 0.1, 100);
  camera.position.set(0, 0, 6);

  const mesh = new THREE.Mesh(
    new THREE.IcosahedronGeometry(1.4, 4),
    new THREE.MeshStandardMaterial({ color: 0x64d2ff, roughness: 0.38 }),
  );
  scene.add(mesh);
  scene.add(new THREE.HemisphereLight(0xffffff, 0x223344, 2));

  function renderAt(time) {
    mesh.rotation.y = time * 0.7;
    mesh.rotation.x = Math.sin(time * 0.6) * 0.16;
    renderer.render(scene, camera);
  }

  window.addEventListener("fv-seek", (event) => {
    renderAt(event.detail.time);
  });

  renderAt(window.__fvThreeTime || 0);
</script>
#three-layer {
  width: 100%;
  height: 100%;
  display: block;
}

AnimationMixer Pattern

For GLTF or authored clip animation, seek the mixer directly:

function renderAt(time) {
  mixer.setTime(time);
  renderer.render(scene, camera);
}

If several mixers exist, seek all of them from the same time.

Good Uses

  • Deterministic 3D objects, product spins, particles with seeded data, and shader plates.
  • Camera moves derived from time.
  • GLTF animation clips when assets are local and loaded before validation completes.

Avoid

  • Using Date.now(), performance.now(), or clock deltas to update scene state.
  • Leaving render-critical work inside a free-running animation loop.
  • Loading remote models or textures at render time.
  • Device-pixel-ratio dependent output. Pin renderer size and pixel ratio for video renders.
  • Post-processing passes that depend on previous frame history unless you can reconstruct state from time.

Validation

After editing a Three.js composition:

npx framevideo lint
npx framevideo validate

Credits And References

  • FrameVideo adapter source: packages/core/src/runtime/adapters/three.ts.
  • Three.js WebGLRenderer docs: https://threejs.org/docs/pages/WebGLRenderer.html
  • Three.js AnimationMixer.setTime() docs: https://threejs.org/docs/pages/AnimationMixer.html

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.