- JavaScript 99.7%
- HTML 0.3%
| src/doru | ||
| tools | ||
| .gitignore | ||
| doru-transparent.html | ||
| doru.html | ||
| export.mjs | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
irl animation exporter
Exports the Claude Design HTML animations (like doru.html) to video with a real
alpha channel: Apple ProRes 4444, QuickTime Animation or Hap Alpha. No chroma key needed.
Files
| Path | What it is |
|---|---|
doru.html |
Original animation, green screen (untouched) |
doru-transparent.html |
Same animation with a transparent background (open it in a browser too) |
src/doru/ |
Unpacked source of the animation (edit here, then repack) |
export.mjs |
The exporter |
tools/bundle.mjs |
Unpacks / repacks the single-file HTML bundles |
out/ |
Exported videos |
Setup (once)
npm install
On Linux, headless Chrome also needs a few system libraries (Debian 13):
sudo apt install libglib2.0-0t64 libatk1.0-0t64 libatk-bridge2.0-0t64 libxcomposite1 \
libxdamage1 libxfixes3 libxrandr2 libgbm1 libxkbcommon0 libasound2t64 \
libatspi2.0-0t64 libxrender1 libxi6 libatomic1 libdrm2
macOS needs nothing extra.
Export
node export.mjs doru-transparent.html # ProRes 4444, 30fps -> doru-transparent.prores.mov
node export.mjs doru-transparent.html -f qtrle -o out/a.mov # QuickTime Animation (lossless, bigger)
node export.mjs doru-transparent.html -f hap -o out/doru.hap.mov # Hap Alpha (TouchDesigner, Resolume)
node export.mjs doru-transparent.html -f png # PNG sequence with alpha
node export.mjs doru-transparent.html --fps 60 --scale 2 # 60fps, 3840x2160
node export.mjs doru-transparent.html --start 44.4 --end 83.4 # just the "crazy" half
node export.mjs doru-transparent.html --stills 6.5,20,50 # a few PNG stills to check
node export.mjs doru-transparent.html --key "#00B140" # the old green version
A whole folder
node export.mjs animations/ # every .html in the folder -> Hap Alpha
node export.mjs animations/ -f prores -o renders # other format / output root
Each run creates a new folder like out/2026-10-25_14-30-05/ with one
<name>.hap.mov per animation. Files that fail (e.g. an .html that isn't an
animation) are skipped and listed in the summary at the end. Only the top level
of the folder is scanned, and all the other options (--fps, --scale, ...)
apply to every file.
node export.mjs --help lists all options. A full 83.4s export at 30fps takes about
2 minutes on 16 cores.
How it works: the animation engine has a built-in "seek to time" hook for video export. The exporter opens the page in headless Chrome, seeks to each frame's exact time, screenshots it with a transparent background and hands the frames to ffmpeg. Frames never depend on playback speed, so none are dropped or doubled.
Hap needs an ffmpeg with the Hap encoder (the bundled one doesn't have it):
sudo apt install ffmpeg / brew install ffmpeg, or set FFMPEG=/path/to/ffmpeg.
The exporter picks it up automatically.
TouchDesigner
Use Hap Alpha (-f hap): TouchDesigner decodes it on the GPU with alpha. A PNG
sequence (-f png) also works in a Movie File In TOP. Transparent pixels are black with
alpha 0, so a viewer that ignores alpha shows black. To check, put the Movie File In TOP
into an Over TOP on top of a Constant TOP: the color should show through.
In After Effects, if edges look dark, set Interpret Footage → Alpha to Straight.
Where the green came from
All the green is one property, keyColor (default #00B140), painted in five places:
- the stage background,
- the background of the second ("crazy") half,
- the ticker text at the top in the first half, painted green on the white bar,
- the DORU/CLUB text in the pin's band in the first half, painted green on white,
- the same band text in the second half, whenever its color is the key color.
Items 3–5 were the hard part for chroma keying: the letters were "cut out" by painting them green on white or magenta, so the anti-aliased edges are green/white mixes.
doru-transparent.html defaults keyColor to transparent. In that mode the
backgrounds are transparent and the cut-out letters are real holes (SVG masks), since
painting them transparent would only show the white underneath. Every other color
setting still works as before (?key=#00B140 in the URL brings the green back).
Editing the animation
node tools/bundle.mjs unpack doru.html src/doru # already done
# edit src/doru/assets/d08e8bb2-...js (the scene) or src/doru/template.html
node tools/bundle.mjs pack src/doru doru.html doru-transparent.html