Skip to content
auraoneaiPublic

About

TypeScript 3D engine for browser games and 3D apps: WebGPU renderer with WebGL2 fallback, typed GLB assets, AI 3D generation, game kit and deploy checks. A three.js alternative.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

8,384 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aura3D

npm version npm downloads license: MIT TypeScript

Aura3D is a TypeScript 3D engine for browser games and interactive 3D apps, with its own WebGPU renderer and WebGL2 fallback. It is a three.js alternative that ships the whole engine around the renderer: typed and licensed assets, AI-generated 3D models and motion, lighting looks, a game kit, physics, worker rendering and deploy checks, in one package with one typed API.

Built for agent-written browser 3D; people who write it by hand use the same API. It tracks three.js 0.187.0 (r187) with a public, row-by-row parity matrix: 798 capabilities, each marked equivalent, weaker, missing or not applicable. MIT licensed.

Apex Overdrive, a browser racing game built with Aura3D

Apex Overdrive, one of the 35 games built with Aura3D. Play it in your browser.

Website · Docs · Play the 35 games · Aura3D vs three.js · llms.txt · npm

A lit, shadowed, framed product with orbit controls, in 10 lines:

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")
});

looks.preset supplies image-based light, a shadow-casting key, fog, background and a post grade as one unit. model(assets.product) is a typed asset the CLI generated, never a raw URL. The same scene in three.js is 38 lines before orbit controls (tagline check).

Start in five commands

npx create-aura3d@latest my-scene --template mini-game       # also writes llms.txt and the Aura3D agent skills
cd my-scene && npm install
npm run dev                                                  # Vite on 127.0.0.1
npx @aura3d/cli@latest assets resolve "robot" --name robot   # or assets add ./robot.glb; then model(assets.robot)
npm run build && npx @aura3d/cli@latest check-deploy --dist dist

26 templates, including product-viewer (default), cinematic-scene, mini-game, racing-starter, falling-blocks-starter, fighting-game, character-controller and animation-studio (npx create-aura3d@latest --help).

Aura3D and three.js

three.js is a rendering library: you assemble loaders, controls, post-processing, physics, audio, a game loop and asset handling from separate packages and your own code. Aura3D ships those parts as one engine with one typed API.

You need three.js Aura3D
A good first frame Lights, environment map, tone mapping and shadow setup by hand looks.preset(...): image-based light, key shadow, fog, background and grade in one call
Models GLTFLoader and a URL string; a typo fails at runtime model(assets.robot): a typo is a compile error, and every model is hashed and licensed
WebGPU A separate renderer with its own node materials renderer: { backend: "auto" }: WebGPU with WebGL2 fallback, same scene code
Off-main-thread rendering Build it yourself with OffscreenCanvas worker: { createWorker }: game code keeps app.nodes, frame callbacks and picking
3D models and motion from a prompt Not included assets generate (rigged GLBs on fal.ai) and animation generate (text to motion)
Other file formats A loader per format assets convert: FBX, OBJ, DAE, USD, PLY, STL, 3MF, VOX and BVH to GLB
A game Your own loop, HUD, input, physics and audio createGame, fixed-step loop, touch controls, Rapier physics, audio cue banks, autoplay, hit feel and VFX kits
Shipping Your own checks check-deploy fails the build on missing hashed assets; --browser loads every route headless
An AI coding agent General web knowledge llms.txt, agent skills and recipes in every new project; aura3d info, validate and render
Existing three.js code aura3d migrate three writes a port worklist; aura3d import-three brings a scene across as an editable Aura3D scene
A capability checklist Read the docs and the examples A row-by-row matrix against three.js 0.187.0: 301 of 798 capabilities equivalent, 364 weaker, 86 missing, 47 not applicable

Measured, not claimed:

  • Less code. In the five-scene benchmark, Aura3D scene code is shorter in 4 of 5 scenes (PBR viewer 24 vs 49 lines, forest 49 vs 71, skinned character 45 vs 62, game loop 61 vs 82), with 1 import module instead of up to 8 (results).
  • Agents write it well. The same AI model built the same eight scenes three times with each engine (measured on Aura3D 5.5.1 against three.js 0.185.1). The Aura3D apps came out 17% shorter (median 270 lines against 326), passed the same functional checks, and a blind visual judge picked the Aura3D frame in 13 of 24 pairs (results).
  • Frame cost. A plain scene draws on a direct path: one cube went from 2 draws and 1 blit to 1 draw, and from 210 to 49 GL calls per frame (software WebGL2, SwiftShader; not measured on a real GPU). The tools/bench-vs-threejs harness is pinned to three 0.187.0, and its interim run put one cube at 3.4 ms per frame against 21.9 ms before, with the other five scenes unchanged (results).
  • Honest parity. Each row of the matrix became equivalent only with a source reference and a test; 364 rows are still weaker and 86 missing, and the matrix says which.
  • 35 playable games run on it; the original 31 run on WebGPU by default with WebGL2 fallback and worker rendering (showcase).

Full comparison with sources: docs/aura3d-vs-threejs.md. Porting a three.js project: docs/migration/from-threejs.md.

What's in the engine

Rendering and look

  • Its own WebGPU and WebGL2 renderer: PBR materials (material.clearcoatPaint, glass, metal and more), classic material.basic, lambert and phong, image-based lighting, shadows, instancing with wind sway, and 28+ effects.* post and VFX builders.
  • Per-material render state (depthFunc, polygonOffset, colorWrite, stencil, blendEquation, side, flatShading) for decals, x-ray overlays, portals and masks.
  • Several shadow-casting point lights, each with its own shadow map, and contact-hardening sun shadows.
  • A composable post-processing pass chain with ready-made passes, multiple render targets, and custom GLSL passes that also run on WebGPU.
  • TSL node materials lowered to WGSL for WebGPU, and a PMREM generator for environments.
  • A direct render path for plain scenes, and disposeAsync() that waits for the GPU to release textures.
  • sky.gradient(...) paints a stylised game sky; sky, water and weather are scene nodes.
  • Key-light shadows with adjustable softness and a fixed shadow box (shadow: { softness, fit }) for arenas and tracks.
  • Transparent canvas output, so a scene can sit on top of a web page.
  • RuntimeQualityGovernor steps resolution, post, shadows and particles up and down at runtime, across desktop and mobile GPUs.

Assets

  • Models in glTF and in OBJ, FBX, USD, COLLADA, 3MF, PLY, STL, VOX and more than a dozen other formats load with no registry; HDR textures and environments, cube textures, Meshopt and glTF UV sets 2 and 3 are built in, and a scene can be exported.
  • assets search, resolve, add, convert, normalize, slim, optimize and validate, plus PNG thumbnails. In production a model needs a same-origin URL, a sha256 and provenance, or it draws nothing.
  • assets generate makes rigged or static GLBs on fal.ai, with a --dry-run cost check and a spend ledger; assets inspect --pbr reports metalness, roughness and normal-map statistics per material.

Animation and characters

  • Animation controller with clips, state machines, layers, root motion, retargeting, two-bone and CCD IK, action fades and cross-fades, additive blending, clip editing and morph target influences.
  • Camera controls on a shared Controls base (orbit, first-person, fly, pointer lock), plus stereo, array, cube and portal cameras.
  • animation generate turns text into a motion clip; animation import retargets BVH, FBX, glTF or HY-Motion clips onto your rig and checks them for limb flips and frozen T-poses.
  • createHumanoidAnimator plays those clips with cross-fades, and its distance-driven timing keeps planted feet from sliding.

Game kit (@aura3d/engine/game)

  • createGame (lifecycle, pause, results, DOM HUD, touch), createFixedStepLoop, seeded replay and QA hooks, Rapier physics, audio cue banks.
  • Kits taken from the 35 live games: ?autoplay=1 (the computer plays to the results screen, then loops), render interpolation between fixed steps, hit-stop and camera shake, procedural sound effects, and flipbook VFX sheets with no image files.

Tooling

  • aura3d help --json lists every command and flag; doctor, validate, render, look capture and look lint for checking a scene; check-deploy before you ship.
  • installSafetyNet from @aura3d/debug: a ?diag=1 panel, quality switches and black-frame self-heal.

Kit docs: game kit, QA kit, safety net, audio synth, model loader, CLI asset tools, sculpt, quality governor.

If you are an AI agent

Read llms.txt first (one screen, the fast path), then docs/agents/agent-quickstart.md and docs/agents/claims-and-boundaries.md. The index of every agent doc is docs/agents/README.md; skills live in packages/aura3d-cli/skills/. npx create-aura3d@latest and npx @aura3d/cli@latest init --agent all write the instruction files into your project.

One trap to know: never await app.ready() at module top level. It deadlocks a Vite production build and leaves a black page with no error. Wait inside a function or chain on it:

import { createAuraApp, scene } from "@aura3d/engine";

const app = createAuraApp("#app", { scene: scene(), autoStart: false });
void app.ready().then(() => {
  app.step(1 / 60);
});

aura3d validate reports it as LINT_TOP_LEVEL_AWAIT_READY (details).

Packages

All public packages share one version. @aura3d/engine is the root of this repository.

Package Purpose
@aura3d/engine Public runtime: createAuraApp, scene nodes, looks, effects, game kits, subpaths such as /game, /animation and /audio
@aura3d/cli Typed assets, asset search, fal.ai generation, format conversion, motion import, look-dev, check-deploy, init, migrate three
create-aura3d Vite project scaffolder with 26 templates, agent skills and llms.txt
@aura3d/core, @aura3d/math, @aura3d/scene Lifecycle and deterministic stepping, math, scene graph
@aura3d/rendering Render device, WebGPU and WebGL2 backends, RuntimeQualityGovernor, materials, passes
@aura3d/assets, @aura3d/asset-index Asset loading and caching; asset search across public sources
@aura3d/animation, @aura3d/audio, @aura3d/input, @aura3d/controls Clips, state machines and humanoid retargeting, audio buses, input, camera controls
@aura3d/physics, @aura3d/physics-rapier, @aura3d/navigation-recast Physics, with optional Rapier and navigation adapters
@aura3d/ecs, @aura3d/scripting ECS and behaviour graphs
@aura3d/debug Diagnostics and the runtime safety net
@aura3d/product-studio, @aura3d/apps, @aura3d/workflows, @aura3d/react, @aura3d/editor-runtime Product viewers, app presets, workflows, React host, editor runtime

Documentation

Contributing

Open issues with the prompt, package version, asset source and a screenshot or route-health output. Licensed under MIT.

About

TypeScript 3D engine for browser games and 3D apps: WebGPU renderer with WebGL2 fallback, typed GLB assets, AI 3D generation, game kit and deploy checks. A three.js alternative.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages