Motion SDK

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.

SceneLinesTokens (cl100k)Minified
City block146~4.7k~3.5k
Desert gas station402~5.8k~4.1k
Night airport177~7.8k~5.9k
Snowplow—~10.8k~5.8k
Abrams tank—~15.3k~8.0k
Live city—~31k, mostly four PNGs as data URIs—
Note:

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.

Night airport, original and Motion SDK

Snowplow, original and Motion SDK

Abrams tank, original and Motion SDK

Live city, original and 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.

SceneSizems/frame
City block1920x108079
Night airport1920x1080106
Abrams tank1920x1080~196
Desert gas station1080x1920217
Snowplow1920x1080220
Live city1920x1080365

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.

BenchTime
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 commands31-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.

BundleBrotli
Motion SDK, WebGPU player289 kB (budget 300 kB)
Motion SDK, WebGPU with authoringbudget 420 kB, loaded only when needed
Motion SDK, WebGL2 fallbackbudget 450 kB, loaded only without WebGPU
Three.js r187, WebGL, whole module minified156 kB
Three.js r187, WebGPU build minified247 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 SDKThree.js
What the agent writesA JSON scene, validated against a schemaJavaScript
Building it upStreamed JSON Patches, each applied atomicallyRewrite and re-run the program
MistakesStructured errors with a path and a fixRuntime exceptions or a blank canvas
Same output every timeYes. Time is an input and every random choice is seededUp to your code
Headless MP4 and GIFBuilt inNeeds a browser and an encoder
Native appsYes, through wgpuNo
EcosystemNewHuge: loaders, examples, community
Custom shadersNot yetYes

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.