Taos Engine · API Documentation

Overview

Taos Engine — API Documentation

Reference for using the Taos Engine: the calls you make to wire up a renderer, drive a scene, and reach into the engine's specialized subsystems.

Start here#

Features Overview#

A visual, categorized tour of everything the engine can do — in the spirit of a product features page. Every feature card links to a runnable in-browser demo. Open docs/features.html directly in a browser (or via the docs site).

Quick-Start Guide#

The core guide. It walks the three API layers (engine + preset, engine + features, manual render graph), a complete runnable "Hello, Cube" project, the GameObject / Component / Scene / Camera / Mesh / Material model, the render presets, the per-frame hooks, and cleanup. Read it before the module guides — they all build on it.

API Reference#

Full symbol-level API reference for the Taos Engine.

Editor Tutorials#

No-code, step-by-step walkthroughs of the Taos Editor. Starts with the Geo Quickstart — a playable real-world San Francisco (Cesium World Terrain under a physical sky) built entirely with the Create menus and the Inspector.

Geo Tutorials#

A guided, step-by-step series for the geospatial globe module — from a "Hello, Geo" streaming app through anchors, layered imagery, atmosphere & clouds, Gaussian splats, clipping, vector data, terrain physics, and other planets. The tutorial path that complements the Geo module guide reference.

Agent Tutorials#

A guided series for the GPU agent-based-modeling module — NetLogo / AgentScript- style turtles + patches + links. From a "Hello, Agents" wander through stigmergy, flocking, breeds, births/deaths, links, measurement, custom models, the visual node editor, and agents on the globe. Written for people who know AgentScript; complements the Agents module guide.

Companion Book#

Taos Engine: Building a Modern WebGPU Game Engine

Module guides#

Each guide below documents one subsystem: its public API surface, the typical setup sequence, real code pulled from the samples, and the gotchas worth knowing before you start. They are independent — read whichever you need.

GuideModuleWhat it covers
Coresrc/index.tsThe top-level taos barrel: math primitives (Vec/Mat/Quaternion, noise, random), assets (Mesh, Texture, GltfLoader), input controllers (mouse/touch/gamepad), glTF animation, the full render-feature catalog, and the renderer core (RenderContext, PbrMaterial). The reference map for everything in import … from 'taos/index.js'.
Audiosrc/audio/Mixing buses, one-shot and spatial SFX, looping music with crossfade, an insertable effects rack (reverb/filter/delay/distortion/compressor), microphone capture, and FFT/level analysis. Plus the AudioSource / AudioListener scene components.
SDFsrc/sdf/Baking a signed distance field from a mesh into a 3D texture (SdfVolume), the CPU math helpers, and binding an SDF to a particle system for surface spawning, attraction, collision, and sticking.
Terrainsrc/terrain/The TerrainSystem CDLOD heightmap renderer: procedural or image-driven heights, virtual-texture page streaming, PBR layer splatting, quality presets, and the render-graph feature wiring.
Geosrc/geo/Floating-origin (f64) geospatial rendering: GeoFrame / GeoScene / GeoFeature, Cesium ion + Google + MapTiler data sources, 3D Tiles and quantized-mesh terrain streaming, anchors, water, and attribution.
Physicssrc/physics/The Jolt WASM rigid-body backend: PhysicsWorld body factories (box/sphere/mesh/heightfield/convex-hull), constraints, raycasts, the PhysicsScene GameObject coupling layer, and the per-frame step/sync loop.
Agentssrc/agents/GPU agent-based modeling (NetLogo/AgentScript "turtles + patches + links") built on the particle system: the declarative AgentModelConfig, turtle-verb sugar, patch grids, spatial-hash neighbors, links, and GPU births/deaths. Includes an intro tutorial.

Import conventions#

Taos Engine publishes its source directly; the package.json "exports" map ("./*": "./src/*") means you import from taos/<subdir>/index.js, not taos/src/...:

TypeScript
import { Engine, GameObject } from 'taos/engine/index.js';
import { AudioEngine } from 'taos/audio/index.js';
import { GeoScene, GeoFrame } from 'taos/geo/index.js';
import { PhysicsWorld } from 'taos/physics/index.js';

Inside this repo (samples, crafty), the same modules are imported by relative path, e.g. import { GeoScene } from '../src/geo/index.js'. The code snippets in these guides use the taos/<subdir>/index.js form an external consumer would write; adjust to relative paths when working inside the repo.

.js extensions are required. Taos Engine's TypeScript sources import with .js extensions (import { Foo } from './foo.js' resolves ./foo.ts). Your tsconfig.json needs "moduleResolution": "bundler". See the Quick-Start Guide for a complete consumer tsconfig.

See also#