Performance
Bundle sizes, frame times, scene sizes in tokens, and an honest comparison with Three.js.
Motion SDK is built to beat Three.js where agents feel it most. That means fewer tokens per scene, no failed generations, and headless renders without a browser. This page shows what's measured today and what's still a plan.
Scene Size
An agent writes a Motion SDK scene as JSON, not as a program. The benchmark scenes rebuild viral Three.js animations made by Opus 5.6 and Claude 3.7.
| Scene | Lines | Tokens (cl100k) | Minified |
|---|---|---|---|
| City block | 146 | ~4.7k | ~3.5k |
| Desert gas station | 402 | ~5.8k | ~4.1k |
| Night airport | 177 | ~7.8k | ~5.9k |
| Snowplow | — | ~10.8k | ~5.8k |
| Abrams tank | — | ~15.3k | ~8.0k |
| Live city | — | ~31k, mostly four PNGs as data URIs | — |
The originals didn't publish their Three.js source, so there's no token count to put next to ours yet. A side-by-side on identical scenes is planned.
Small scenes come from presets, prefabs, repeat and expressions. A generated version of the city block with every node written out was 4,551 lines and ~30.6k tokens, more than six times bigger.
Side By Side
Left is the Opus 5.6 original. Right is Motion SDK.




Export Time
Full 1080p MP4 exports from the CLI, on a CPU-only machine with Mesa llvmpipe on 8 shared cores. These compare our scenes with each other. A real GPU is much faster.
| Scene | Size | ms/frame |
|---|---|---|
| City block | 1920x1080 | 79 |
| Night airport | 1920x1080 | 106 |
| Abrams tank | 1920x1080 | ~196 |
| Desert gas station | 1080x1920 | 217 |
| Snowplow | 1920x1080 | 220 |
| Live city | 1920x1080 | 365 |
Three.js has no headless export. You'd need a browser, a screen recorder or a frame-capture loop, and an encoder.
Frame Cost
From cargo bench -p motion-sdk-render at 1080x1080 on the same software rasterizer.
| Bench | Time |
|---|---|
| CPU frame, 19 instances and 2 text nodes | ~1.0 µs |
| CPU frame, 25 instances and 1,456 particles | ~166 µs |
| CPU frame, 10,840 instances in 2 draws | ~195 µs, ~18 ns per instance |
| Encode the frame's commands | 31-39 µs |
| Apply one patch, with full revalidation | ~124 µs |
| Patch, sync and next frame's CPU work | ~266 µs |
Each browser frame is one call into wasm. Instanced meshes, scatter, path crowds and particles draw in one call per material.
Bundle Size
What a page downloads, compressed with brotli. Motion SDK fetches one wasm bundle.
| Bundle | Brotli |
|---|---|
| Motion SDK, WebGPU player | 289 kB (budget 300 kB) |
| Motion SDK, WebGPU with authoring | budget 420 kB, loaded only when needed |
| Motion SDK, WebGL2 fallback | budget 450 kB, loaded only without WebGPU |
| Three.js r187, WebGL, whole module minified | 156 kB |
| Three.js r187, WebGPU build minified | 247 kB |
Motion SDK is bigger than core Three.js and close to its WebGPU build. That includes things Three.js leaves to add-ons or your own code: the scene validator, timeline, state machines, particles, text, post-processing and the patch engine. A tree-shaken Three.js app is smaller than its whole module, but it grows with every loader, control and pass you add. CI fails any Motion SDK bundle that goes over budget.
Compared With Three.js
| Motion SDK | Three.js | |
|---|---|---|
| What the agent writes | A JSON scene, validated against a schema | JavaScript |
| Building it up | Streamed JSON Patches, each applied atomically | Rewrite and re-run the program |
| Mistakes | Structured errors with a path and a fix | Runtime exceptions or a blank canvas |
| Same output every time | Yes. Time is an input and every random choice is seeded | Up to your code |
| Headless MP4 and GIF | Built in | Needs a browser and an encoder |
| Native apps | Yes, through wgpu | No |
| Ecosystem | New | Huge: loaders, examples, community |
| Custom shaders | Not yet | Yes |
Pick Three.js when you need its ecosystem or custom shaders today. Pick Motion SDK when an agent writes the scene, or you need deterministic renders and video.
What's Next
A browser benchmark is planned. Each scene will exist twice, in Motion SDK and as hand-optimized Three.js. Both will run in headless Chrome on pinned hardware, measuring frame time, draw calls, memory, startup and patch latency.