One style $9 · any 5 for $29 · all 140 styles $79 · Team $199One style $9 · any 5 $29 · all $79 →

← Blog

HyperFrames with three.js and GSAP: render to MP4

ReelStyles ·

HyperFrames renders GSAP timelines and three.js scenes to MP4 by stepping through them frame by frame. The one rule that matters is that the animation must be seekable: you create the GSAP timeline paused, register it on window.__timelines, and draw three.js from a progress value instead of a free-running loop. This page shows both in code, then how to ask Claude Code to build them. ReelStyles kits use the same pattern, and the free parts here work without them.

What you need

HyperFrames says it seeks GSAP, CSS, Anime.js, Lottie, three.js, Web Animations and TypeGPU through its browser runtime. You don't write an adapter yourself.

Step 1: a GSAP timeline that renders

This is a minimal structure, a five-second film with a canvas and one GSAP timeline.

<script src="https://cdn.jsdelivr.net/npm/gsap@3.12.5/dist/gsap.min.js"></script>
<script>window.__timelines = window.__timelines || {};</script>

<div id="root" data-composition-id="main" data-start="0"
     data-duration="5" data-width="1280" data-height="720">
  <canvas id="c" width="1280" height="720"></canvas>
</div>

<script>
  const st = { t: 0 };
  const tl = gsap.timeline({ paused: true });
  tl.to(st, { t: 5, duration: 5, ease: 'none', onUpdate: () => frame(st.t) });
  frame(0);
  window.__timelines.main = tl;
</script>

Here frame(t) draws everything for time t. Three things matter:

  1. { paused: true }. HyperFrames controls the playhead.
  2. The key main in window.__timelines matches data-composition-id="main". HyperFrames says the two must match.
  3. Every frame is a pure function of t. Don't use Math.random() or Date inside frame, because the same frame must look the same every time.

HyperFrames also advises explicit positions for important tweens, fromTo() when both ends matter, and animating transforms and opacity for movement. Don't call video.play() yourself, and don't add a child timeline to a parent by hand.

Check and render:

npx hyperframes lint .
npx hyperframes snapshot . --at 0.5,2.5,4.5
npx hyperframes render

lint catches broken scenes and snapshot writes PNG stills. After render you get an MP4 in the project. If lint reports a problem, fix it before you render, because a bad scene costs a whole render.

Step 2: a three.js scene driven by progress

Don't run a requestAnimationFrame loop. Keep one progress value, let the paused GSAP timeline change it, and redraw on every update. This is the pattern in HyperFrames' own catalog component "Three Orbiting Cards", which you can install:

npx hyperframes add three-orbiting-cards

It writes compositions/components/three-orbiting-cards.html, and you copy it into your composition. The component takes its size and duration from the composition you put it in. Its core looks like this:

const state = { progress: 0 };
function render() {
  const t = state.progress;
  group.rotation.y = t * Math.PI * 2;
  camera.position.z = 6.4 - Math.sin(t * Math.PI) * 0.55;
  renderer.render(scene, camera);
}
render();

tl.to(state, { progress: 1, duration: 4, ease: 'none', onUpdate: render }, 0);

The scene is posed from progress and nothing else, so any frame can be rendered alone, in any order. The catalog component loads three.js from a CDN and says to dispose renderer resources when the composition is removed.

Step 3: ask Claude Code to build it

With the skills installed you can describe the result. Here is a prompt I would use:

Using /hyperframes, make a 12-second 1920x1080 film. A three.js scene of five
colored cubes on a floor, camera orbiting slowly. Drive the scene from a
progress value and a paused GSAP timeline. Show me stills at 2, 6 and 10
seconds before you render.

Look at the stills first. Ask for one change at a time, such as "slow the orbit" or "lower the camera 10 percent". Then render.

A frame from the three.js procedural example film

Common errors

Where a style kit fits

Code like this is the engine. A ReelStyles kit adds the look: palette, cast, scene templates and a checklist. The three.js procedural style and the 3D brand world use this exact pattern. Read HyperFrames and Remotion styles for how kits sit on an engine, and the pricing page for the licence.

Questions

Is GSAP free for commercial videos?

GSAP's Standard "No Charge" licence covers commercial use, including the plugins that used to be members only. Read the licence for its limits on competing no-code tools.

Can HyperFrames render three.js on a computer without a GPU?

HyperFrames lists Node.js and FFmpeg as its requirements. I did not find a GPU requirement in its docs.

Do I have to write a frame adapter?

No. HyperFrames says it already seeks GSAP, three.js and the others you would use. You only need an adapter when you build a custom host around your own seekable animation.

Sources

Checked 2 December 2026: heygen-com/hyperframes (requirements, licence, skills), HyperFrames GSAP guide, HyperFrames frame adapters, Three Orbiting Cards component, HyperFrames CLI, GSAP Standard License.

See all 140 styles and the price