Aura Slam 3D
Tennis with six stadiums and two-bone IK athletes.
Technical proof Multi-material procedural courts and two-bone IK athletes in Quick Match and Smash Lab (tournament and online modes are not in this version).
Aura3D is the TypeScript engine for agent-written browser 3D that ships the whole stack: lighting looks, typed and licensed assets, Rapier physics, Recast navigation, a game kit and deploy checks. The three.js version of the same scene is 38 lines before orbit controls.
No renderer setup, loader wiring or dispose loops.
import { camera, createAuraApp, interactions, looks, model, scene } from "@aura3d/engine";
import { assets } from "./aura-assets";
createAuraApp("#app", {
scene: scene()
.add(looks.preset("product-studio"))
.add(model(assets.product, { name: "product", targetHeight: 1.6, castShadow: true }))
.add(interactions.orbit({ target: "product" }))
.camera(camera.frameAsset(assets.product, { targetHeight: 1.6 })),
...looks.appOptions("product-studio")
});
Line counts include imports and skip blank and comment lines. The three.js version is in tools/bench-vs-threejs/tagline/ in the Aura3D repo.
Both scenes load the same GLB with HDR studio lighting, a shadow-casting key light, tone mapping and a framed camera. Aura3D adds orbit controls in the same 10 lines.
import * as THREE from "three";
import { GLTFLoader } from "three/addons/loaders/GLTFLoader.js";
import { HDRLoader } from "three/addons/loaders/HDRLoader.js";
const renderer = new THREE.WebGLRenderer({ antialias: true });
renderer.setPixelRatio(Math.min(devicePixelRatio, 2));
renderer.setSize(innerWidth, innerHeight);
renderer.toneMapping = THREE.NeutralToneMapping;
renderer.shadowMap.enabled = true;
document.querySelector("#app")!.appendChild(renderer.domElement);
const scene = new THREE.Scene();
scene.background = new THREE.Color("#2b2f36");
const camera = new THREE.PerspectiveCamera(35, innerWidth / innerHeight, 0.1, 100);
const pmrem = new THREE.PMREMGenerator(renderer);
new HDRLoader().load("/hdri/studio_small_08_1k.hdr", (hdr) => {
scene.environment = pmrem.fromEquirectangular(hdr).texture;
scene.environmentIntensity = 1.1;
hdr.dispose();
});
const key = new THREE.DirectionalLight("#ffffff", 2.4);
key.position.set(6.52, 18.39, 13.98);
key.castShadow = true;
key.shadow.mapSize.set(2048, 2048);
scene.add(key);
new GLTFLoader().load("/aura-assets/product-fixture.glb", (gltf) => {
gltf.scene.traverse((o) => { if ((o as THREE.Mesh).isMesh) o.castShadow = o.receiveShadow = true; });
scene.add(gltf.scene);
const box = new THREE.Box3().setFromObject(gltf.scene);
const center = box.getCenter(new THREE.Vector3());
const dist = box.getSize(new THREE.Vector3()).length() / (2 * Math.tan((camera.fov * Math.PI) / 360));
camera.position.copy(center).add(new THREE.Vector3(0.5, 0.35, 1).normalize().multiplyScalar(dist));
camera.lookAt(center);
});
addEventListener("resize", () => {
camera.aspect = innerWidth / innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(innerWidth, innerHeight);
});
renderer.setAnimationLoop(() => renderer.render(scene, camera));
import { camera, createAuraApp, interactions, looks, model, scene } from "@aura3d/engine";
import { assets } from "./aura-assets";
createAuraApp("#app", {
scene: scene()
.add(looks.preset("product-studio"))
.add(model(assets.product, { name: "product", targetHeight: 1.6, castShadow: true }))
.add(interactions.orbit({ target: "product" }))
.camera(camera.frameAsset(assets.product, { targetHeight: 1.6 })),
...looks.appOptions("product-studio")
});
Also in our benchmark: a PBR viewer with HDR lighting, shadow, bloom and orbit controls in 24 lines instead of 49, with 1 import instead of 8. In the Aura3D benchmark (five small scenes, one author, counted in lines of scene code), four of them need up to 51% less scene code.
In the five-scene benchmark, a one-cube scene reaches its first frame in about 420 ms and draws in 1 call, and a PBR viewer scene with a shadow and bloom draws in 25 with zero console warnings or errors.
See the benchmarkthree.js gives you a renderer. Aura3D gives you the renderer (WebGPU with a WebGL2 fallback), the lighting, the asset pipeline, the game kit and the deploy checks, typed end to end and built for AI coding agents.
| Need | With Aura3D | With three.js |
|---|---|---|
| A good first frame | Authored colours kept, built-in reflection room, key-light shadow and camera.auto framing with no setup. |
Black background, no environment, camera placed by hand. |
| Studio lighting and shadows | One looks.preset() call: HDRI, key light, shadows, grade. |
PMREM, lights, shadow flags and tone mapping by hand. |
| WebGPU | renderer: { backend: "auto" }: WebGPU with a WebGL2 fallback, same scene code. Default in all 30 games. |
A separate WebGPURenderer you choose and wire. |
| Rendering off the main thread | worker: { createWorker }, opt-in; game code keeps app.nodes and picking. |
OffscreenCanvas and your own message protocol. |
| Bloom, AO, custom post pass | effects.bloom(), effects.shaderPass(). |
EffectComposer plus 3 to 4 addon passes. |
| Loading a model | model(assets.robot): typed key, compile-time check. |
GLTFLoader and a string path. |
| Asset licensing | Source, licence, author and sha256 recorded per model. | Not tracked. |
| Production safety | Unverified models don't draw. | Any URL loads. |
| Deploy checks | check-deploy fails the build on missing hashed assets and stray files. |
Not included. |
| Game shell | HUD, touch, juice, session, audio cue bank. | Not included. |
| Replay and QA | Fixed-step loop, seeded RNG, QA hooks. | Write your own. |
| 120 and 144 Hz displays | Render interpolation built in. | Write your own. |
| Blank-screen recovery | Safety net with black-frame self-heal. | Not included. |
| AI coding agents | llms.txt, 14 skills, recipes in every new project; aura3d validate and render; guessed three.js names resolve. |
No official agent docs. |
| Existing three.js work | aura3d import-three turns a scene factory into a typed asset and editable scene; migrate three writes a port worklist. |
Not applicable. |
Agent-authoring benchmark: the same AI model built the same eight scenes three times with each engine. The Aura3D apps were 17% shorter (median 270 lines against 326), passed the same functional checks, and a blind judge picked the Aura3D frame in 13 of 24 pairs. Aura3D 5.5.1 vs three.js 0.185.1, one model, 72 runs, real GPU; method and numbers.
Every one is a live Aura3D 5.5.6 route built 100% with native @aura3d/engine multi-material procedural art—zero external or AI-generated GLBs—running WebGPU-first with automatic WebGL2 fallback across desktop and Safari/iOS, RuntimeQualityGovernor, mobile touch controls and gesture audio unlock. Nothing loads until you press Play.
Tennis with six stadiums and two-bone IK athletes.
Technical proof Multi-material procedural courts and two-bone IK athletes in Quick Match and Smash Lab (tournament and online modes are not in this version).
Thread an interceptor through sunset gridlock.
Technical proof Native multi-material procedural interceptor and traffic fleet with cold-gas thrusters, barrel rolls and carrier ramps.
Race armed ramjet drones through a rain-soaked megacity.
Technical proof 7 selectable multi-material procedural drones with twin laser cannons, homing missiles and three circuits.
Drive a city grid as a robotaxi or a sports car.
Technical proof Multi-material procedural urban fleet with a live vector minimap, five driver-assist levels and AI rival cars across the city grid.
Also playable: Iron Crown, Pip's Big Leap, Aura Hoops 3D, Aura Diamond 3D, Aura FC 3D, Aura Links 3D, Bunker Zero, Slingshot Siege, Glint Courier, Cross Hop, Craterline GP, Splat, Serpentine Sky Run, Gridlock Courier, Ion Circuit, Shadowstep Gauntlet, Lamplight Line, Saltwind Highway, The Bellkeeper's Walk, Duneglide, Cumulus Dash, Shape Shift Sprint, Number Surge, Splat Turf, Polarity Orbs, and Beat Hopper.
See all 30 gamesAdd a GLB or pull a CC0 model by name. The CLI records its source, licence, author and sha256, then generates a typed key, so a missing asset is a compile error instead of a blank screen. In production, a model without a valid hash doesn't draw.
aura3d assets search "robot"@aura3d/engine when no clean asset fits.# Hash, copy, inspect, and type a local GLB.
npx @aura3d/[email protected] assets add \
./model.glb \
--name robot \
--public-path /aura-assets/
# Writes:
./aura.assets.json
./src/aura-assets.ts
import { createAuraApp, looks, model, scene } from "@aura3d/engine";
import { assets } from "./aura-assets";
createAuraApp("#app", {
scene: scene().add(looks.preset("product-studio")).add(model(assets.robot)),
...looks.appOptions("product-studio")
});
HUD, mobile touch controls, first-gesture audio unlock, juice and session flow. RuntimeQualityGovernor adaptive frame pacing, an audio cue bank and step sequencer, a fixed-step loop, seeded replay and QA hooks, with smooth interpolation on 120 and 144 Hz displays.
Every new project ships llms.txt, 14 Aura3D skills and compiled recipes for Claude, Cursor and Codex. aura3d validate and aura3d render let an agent check and screenshot its own scene; typed APIs and loud errors keep agent-written code on the rails.
Describe a scene, get a deterministic animated short. Your coding agent directs it through a validated CLI; no bundled model or API key.
26 templates, from product viewers and cinematic scenes to mini-games, racing, fighting and character control. Each one is a normal Vite app you own, with tests.
Search docs for install, asset add, templates, deployment, and troubleshooting.
No docs match that search. Try templates, assets, or deploy.
Paste one into your coding agent.
Build a product viewer for a supplied GLB with studio lighting and orbit controls.
Create a dusk scene with volumetric fog, bloom, and a slow camera push.
Make a falling-blocks game with scoring, pause, and keyboard and touch controls.
Add a physics playground with ramps, crates, contact shadows, and a reset button.
Generate a night city block with lit windows, traffic lights, and a day/night toggle.
Write agent rules that use typed Aura3D assets and public SDK imports only.
Aura3D ships 25 public packages; the eight below cover the engine and the tools around it.
aura3d check-deploy fails the build when a hashed asset is missing, a stray file sneaks into dist, or a model fails validation. Add --browser to load every route in headless Chromium and fail on failed requests and console errors, or --release for licence and quality gates.
dist fail the check.check-deploy --browser flags failed requests when a route boots.check-deploy --browser reports console errors on the routes you ship.--release adds licence and quality gates.| Browser | WebGL2 | WebGPU | Notes |
|---|---|---|---|
| Chrome | Verified | Default in the games | Primary verified target |
| Edge | Chromium | Chromium | Follows the Chrome channel |
| Safari (macOS & iOS) | Fallback | Supported (auto) | WebGPU where available, WebGL2 fallback |
| Firefox | Fallback | Auto fallback | WebGPU where enabled, WebGL2 fallback |
Chrome is the primary verified target behind the route evidence. One option, renderer: { backend: "auto" }, selects WebGPU across desktop and Safari/iOS where available and falls back automatically to WebGL2 on the same canvas; all 30 games use it, and ?backend=webgl2 opts out. Without it the engine uses WebGL2. See the route evidence.
The agent writes code. You bring the assets. Aura3D is not a hidden runtime generator: scaffold a template, add a typed asset and ship a route you can check.
MIT (declared in package.json)