Taos API Reference
    Preparing search index...

    Module core

    Core engine: the math primitives, the GameObject / Component / Scene model and per-frame driver, the WebGPU renderer (materials, lights, render features, presets, passes, and the render graph), and asset loading. This is everything in import … from 'taos/index.js'; the standalone subsystems (audio, particles, splats, text, xr, block, sdf, terrain, geo, physics) have their own modules.

    Enumerations - Core

    MaterialPassType

    Identifies which renderer pass is asking the material for a shader. A single Material may support multiple pass types and is expected to return WGSL appropriate for each.

    Enumerations - Passes

    SSRDebugMode

    Reflection compositing / debug mode.

    Classes - Core

    Component

    Abstract base class for all behaviors attached to a GameObject.

    Engine

    Top-level orchestration object: owns the RenderContext, Scene, the active Camera, the PhysicalResourceCache, the registered RenderFeatures, and the per-frame loop.

    GameObject

    Container for transform, children, and components.

    Scene

    Top-level container for the GameObject hierarchy.

    Skeleton

    GLTF-style joint hierarchy with rest pose and inverse-bind matrices.

    Time

    Per-frame simulation clock, owned by a Scene and advanced once per frame by the Engine before the scene's update traversal runs.

    Transform

    Local TRS plus a cached world transform for a GameObject.

    Frustum

    View frustum as 6 planes extracted from a view-projection matrix (Gribb–Hartmann), normalized so a plane evaluation yields a true signed distance. Reused in place via setFromViewProj to keep per-frame culling allocation-free.

    Mat4

    Column-major 4x4 matrix compatible with WebGPU/WGSL.

    Quaternion

    Unit quaternion representing a 3D rotation, stored as (x, y, z, w) with w as the scalar part.

    Random

    Seeded pseudo-random number generator using the Xorwow variant of Marsaglia's xorshift family.

    Vec2

    2D vector with mutable x/y components and immutable arithmetic methods.

    Vec3

    3D vector with mutable x/y/z components and immutable arithmetic methods.

    Vec4

    4D vector with mutable x/y/z/w components and immutable arithmetic methods.

    RenderContext

    Owns the WebGPU device, queue and canvas configuration for the renderer.

    Classes - Materials

    OpenPbrMaterial
    PbrMaterial

    Classes - Lights

    DirectionalLight

    Directional light component representing the sun.

    PointLight

    Omnidirectional point light component.

    SpotLight

    Cone-restricted spot light component.

    RenderSpotLight

    Spot light parameters uploaded as one element of the spot-light storage buffer.

    Classes - Render Features

    AOFeature

    Screen-space ambient occlusion. Switchable between SSAO, GTAO, and HBAO+ at runtime — all three pass instances are persistent and only the active one is wired into the graph (so toggling invalidates the cached graph).

    AtmosphereFeature

    Procedural atmospheric scattering. Writes (or initializes) frame.hdr. Reads camera pos + inverse VP + sun direction from the frame's camera + the scene's first DirectionalLightComponent.

    AtmosphereLutsFeature

    Bakes the atmosphere transmittance + multi-scattering LUTs at startup and publishes the resulting texture handles into Frame.extras each frame. Other features consume the LUTs by reading those keys:

    AutoExposureFeature

    Histogram-based auto-exposure. Samples frame.hdr (read-only) and writes a persistent exposure buffer that downstream features (e.g. CompositeFeature) sample. Exposes the buffer handle on frame.exposureBuffer.

    BloomFeature

    HDR bloom post. Reads frame.hdr, writes the result back into frame.hdr.

    CloudFeature

    Cartesian-grid volumetric clouds. Reads + writes frame.hdr and consumes frame.depth. Mutate settings in place to drive sliders / animation — the underlying CloudPass uploads them via update each frame.

    CompositeFeature

    Final HDR → SDR composite that also draws stars and depth/height fog, sampling the auto-exposure storage buffer for tonemapping. Replaces TonemapFeature in pipelines that have an AutoExposureFeature (the composite reads the exposure buffer; tonemap does not).

    ConstantColorSkyFeature

    Initializes frame.hdr to a flat color. The simplest of the three sky options — no panorama lookup, no scattering integration, just a clear that gives downstream lit passes (deferred lighting, forward, forward+) something to load from. Pick this when the scene has its own opaque background or you only need a solid fill.

    DeferredLightingFeature

    Deferred lighting. Reads frame.gbuffer, frame.shadowMap, frame.ao, frame.hdr (clear/load behavior matches the legacy DeferredLightingPass deps), and writes the final HDR result into frame.hdr. Exposes the persistent camera/light uniform handles on frame.lightingCameraBuffer / frame.lightingLightBuffer for downstream features (composite, godrays).

    DofFeature

    Depth-of-field post-process. Reads frame.hdr + frame.gbuffer.depth, writes the result back into frame.hdr.

    ForwardLitFeature

    Forward-lit PBR pass. Loads frame.hdr if a previous feature wrote it (e.g. a sky), otherwise creates fresh HDR + depth attachments. Reads frame.opaque (and frame.transparent if the pass supports it) for draws.

    ForwardOverlayFeature

    Hybrid forward overlay used by deferred pipelines to draw transparent meshes on top of the lit deferred result. Loads frame.hdr and the frame.gbuffer.depth (so transparents depth-test against opaque) and writes back into frame.hdr. Reads frame.transparent.

    ForwardPlusFeature

    Tiled forward+ pass — wraps ForwardPlusPass. Reads frame.opaque + frame.transparent for draws (transparents shade after opaques, depth-tested but not depth-written), optional frame.shadowMap + cascades for the directional sun, and the caller-supplied many-light list. Loads frame.hdr if set, otherwise clears.

    GeometryFeature

    Deferred geometry pass for material-bearing meshes. Reads frame.opaque and writes the GBuffer into frame.gbuffer. When frame.gbuffer is already set (e.g. by a preceding voxel or marching-cubes feature) this feature loads it and overdraws — letting a deferred scene mix voxel terrain with regular mesh objects.

    GodrayFeature

    Sun-shaft godrays. Reads frame.hdr + frame.gbuffer.depth + frame.shadowMap + the lighting feature's persistent camera/light uniform handles, writes the lit-with-shafts HDR back into frame.hdr. Register AFTER DeferredLightingFeature.

    HQCloudFeature

    High-quality volumetric clouds — half-res raymarch + multi-scatter octaves

    • cone light march + temporal reprojection upsample. Reads + writes frame.hdr and reads frame.depth. The cloud volume composites over the supplied HDR (premultiplied alpha) so foreground geometry occludes clouds via the scene-depth gate inside the raymarch.
    LensFlareFeature

    Screen-space lens flare from a distant sun, wrapping LensFlarePass. Each frame it projects the sun to screen space (using the render camera), zeroes the flare when the sun is behind the camera, and lets the pass occlude it against scene depth. Reads frame.hdr + frame.depth, writes frame.hdr. Register AFTER the sky/lighting features and BEFORE tonemap.

    MotionBlurFeature

    Motion-blur post-process. Reads frame.hdr + frame.depth, writes the blurred HDR back into frame.hdr.

    OceanFeature
    ParticleFeature

    Wraps ParticlePass as a RenderFeature. Reads frame.depth (set by whichever geometry/forward feature ran before), loads frame.hdr, and writes the blended HDR back into frame.hdr.

    PointSpotLightFeature

    Point + spot light shadows (cube VSM + 2D VSM + projection-texture array) plus the deferred-style additive lighting pass that consumes them. Reads frame.gbuffer, accumulates onto frame.hdr and writes back.

    ProjectorFeature

    Composites unlit projection textures onto frame.hdr after lighting. Reconstructs world position from frame.depth, so it needs a geometry/lighting feature to have produced a depth buffer and an HDR target.

    ProjectorDecalFeature

    Projects lit ("painted-on") textures into the G-buffer albedo before deferred lighting, so the projected image then receives scene light and shadow like a surface decal. Must run after the geometry feature (depth + albedo present) and before the deferred lighting feature.

    ReflectionProbeFeature

    Discovers ReflectionProbe components in the scene each frame, allocates them slots in a shared cube-array, and inserts a ReflectionProbeCapturePass + ReflectionProbeIblPass chain to keep their captured environment + IBL convolutions up to date according to each probe's ReflectionProbe.updateMode.

    SdsmFeature

    Sample-Distribution Shadow Maps (SDSM) depth feedback, as a RenderFeature.

    ShadowFeature

    Cascaded directional shadow map. Writes frame.shadowMap and stashes the frame's cascades + caster list on frame.extras for downstream consumers (e.g. a BlockShadowFeature chain).

    SkinnedGeometryFeature

    Skinned/animated mesh deferred geometry. Composes on top of an existing GBuffer (set loadOp: 'load') so the regular GeometryFeature's output is preserved.

    SkyTextureFeature

    Renders the sky as a fullscreen background by sampling an equirectangular HDR texture, clearing the HDR target. Writes frame.hdr.

    SMAAFeature

    SMAA 1x anti-aliasing — a spatial, single-frame alternative to TAAFeature. No camera jitter, no history, no temporal ghosting; it cleans up edges within the current frame using SMAAPass's three sub-passes. Register it where post-processing belongs (after lighting / overlays, before bloom / tonemap).

    SsgiFeature

    Screen-space global illumination feature.

    SSRFeature

    Screen-space reflections. Marches frame.hdr rays against frame.gbuffer.depth, picks reflections from the lit HDR, and composites them back into frame.hdr. Register between deferred lighting and post-processing.

    StarsFeature

    Procedural starfield as a render feature wrapping StarsPass. Reads frame.hdr + frame.depth, adds stars on sky pixels (depth == 1), and writes the result back into frame.hdr. Register AFTER the sky / lighting features (so the HDR + depth exist) and BEFORE bloom + tonemap (so bright stars bloom and get tonemapped with the rest of the scene).

    TAAFeature

    Temporal anti-aliasing. Camera sub-pixel jitter is applied in earlyUpdate so every feature's regular update (and thus every geometry-fill pass's updateCamera) sees the jittered VP via camera.jitteredViewProjectionMatrix(). The TAA resolve pass itself runs at post-process time — register this feature wherever post-processing belongs in the pipeline (after lighting, before bloom/tonemap).

    TonemapFeature

    Final HDR → SDR tonemap. Reads frame.hdr and writes the backbuffer. Mutate exposure / tonemapper (or the legacy aces) directly on this feature at runtime; the next frame's update re-uploads the params buffer.

    TransmissionFeature

    Forward refractive transmission overlay (KHR_materials_transmission + KHR_materials_volume). Slots in after deferred lighting (and any forward overlay): it snapshots frame.hdr, draws the glass meshes refracting that snapshot, and writes the composite back to frame.hdr, depth-testing against the opaque scene depth (frame.gbuffer.depth in deferred, frame.depth in forward).

    VelocityFeature

    Generates the shared screen-space velocity buffer once per frame and exposes it on Frame.velocity. Re-rasterizes the frame's mesh + skinned-mesh draws with the current and previous view-projection + model/joint matrices into an rg16float UV-delta target (camera and per-object motion).

    VolumetricFogFeature

    Froxel volumetric fog. Reads frame.hdr + frame.gbuffer.depth + frame.shadowMap + the lighting feature's persistent camera/light uniform handles, writes the fogged HDR back into frame.hdr. Register AFTER DeferredLightingFeature (and after godrays/clouds if both are used).

    ProjectorAtlas

    Packs many static projector images into one texture_2d_array, so a scene with dozens of projectors costs a single texture instead of one GPUTexture each. Each image is shelf-packed into a layer and addressed by an AtlasSlot (layer + normalized uvRect); the projector pass samples a per-layer '2d' view and composes the packing rect with the projector's own crop.

    Classes - Passes

    AtmosphereLutsPass

    Bakes the atmosphere transmittance + multi-scattering LUTs. Both are persistent textures stored in the graph's cache; this pass only adds actual bake sub-passes the first time it sees the graph (and again any time markDirty is called — e.g., when atmosphere parameters change). On idle frames the LUTs are merely imported as handles.

    AtmospherePass

    Renders an atmospheric sky dome into the supplied HDR target (render-graph version).

    AutoExposurePass

    Auto-exposure compute pass (render-graph version).

    BlockGeometryPass

    G-Buffer fill pass for voxel world chunks (render-graph version).

    BlockHighlightPass
    BlockShadowPass

    Voxel-world chunk shadow pass (render-graph version).

    BloomPass

    HDR bloom (render-graph version). Prefilter -> 2× H/V blur ping-pong -> composite, all on transient half-res textures except the final full-res result.

    CloudPass

    Volumetric cloud + procedural sky pass (render-graph version).

    CompositePass

    Final fullscreen pass that composes the post-processed HDR scene with fog, stars, the underwater effect and tonemapping into the backbuffer (render-graph version). Replaces the legacy fog + underwater + tonemap pass chain by combining all three operations in a single fragment shader, eliminating two intermediate HDR textures and two render-pass boundaries.

    DebugAOPass

    Visualizes the SSAO/GTAO/HBAO+ output as a grayscale image on the backbuffer. Mirrors the debug-AO short-circuit inside CompositePass but ships as a standalone pass so non-composite pipelines can use it.

    DebugLightPass
    DeferredLightingPass

    Deferred lighting pass (render-graph version).

    DepthReductionPass

    Reduces a depth texture to the min/max view-linear depth of its non-sky texels, into an 8-byte buffer ([minBits, maxBits], IEEE-ordered u32). The SDSM feature copies that out to the CPU (one frame later) and fits the shadow cascades to exactly the visible depth slab. See [SdsmFeature].

    DirectionalShadowPass
    DirectionalVsmPass

    Converts the directional cascaded depth shadow map into a pre-filtered EVSM2 moment map for variance-based shadow sampling.

    DofPass

    Two-stage depth-of-field post-process (render-graph version).

    FogPass

    Standalone fog post-process: blends the input HDR toward an atmosphere-scattered fog color using configurable depth + height curves. Mirrors the fog block inside CompositePass but ships as a discrete pass so pipelines that don't use the merged composite can still get fog.

    ForwardPass
    ForwardPlusPass

    Forward+ (tiled forward) render pass.

    GeometryPass

    Deferred geometry pass for material-bearing meshes (render-graph version).

    GodrayPass
    GpuCullPass
    GTAOPass

    Ground Truth Ambient Occlusion (Jiménez et al., GDC 2016).

    HBAOPlusPass

    HBAO+ (NVIDIA Horizon-Based AO, plus variant).

    HiZPass

    Builds a Hi-Z (hierarchical depth) pyramid from the scene depth buffer for GPU occlusion culling. Run it after the geometry you want to treat as occluders (e.g. terrain) has written depth, then feed the pyramid to GpuCullPass to skip geometry hidden behind it.

    HQCloudPass

    High-quality volumetric cloud pass. Half-resolution Beer-Lambert ray-march with multi-scatter octaves and cone-sampled light marching, then a full-res temporal-reprojection upsample that uses each pixel's weighted cloud-hit depth (not the scene depth) to look up history. Outputs are composited over the supplied HDR target with premultiplied alpha.

    OceanPass
    WaveInputRippleSource
    ParticlePass

    GPU particle system pass (render-graph version).

    PlanetCloudPass

    Volumetric cloud pass for spherical planets.

    PointShadowPass
    PointSpotLightPass

    Deferred point + spot lighting (render-graph version). Reads the GBuffer + VSM/projection textures and additively blends point/spot light contribution into the existing HDR target.

    PointSpotShadowPass

    Builds variance shadow maps for shadow-casting point and spot lights (render-graph version). Uses a 'transfer' graph node and runs many internal render sub-passes (one per cube face / spot slot) inside a single setExecute.

    ReflectionProbeCapturePass

    Renders reflection-probe environment cubes. For each pending bake the pass runs 6 internal render sub-passes (one per cube face), drawing the sky into each face and, in 'scene' mode, the supplied meshes on top with simple forward shading.

    ReflectionProbeIblPass

    Convolves each freshly-captured reflection probe cube into its irradiance

    • prefiltered IBL pair, stored as cube-array slices indexed by the probe's slot. Identical split-sum math to IblBaker but the source is one slice of a cube-array (see reflection_probe_ibl.wgsl).
    ShadowPass

    Cascaded shadow map (CSM) pass for the scene's directional sun light (render-graph version).

    SkinnedGeometryPass

    Geometry pass for skinned (animated) meshes (render-graph version).

    SkyTexturePass

    Renders the sky as a fullscreen background by sampling an equirectangular HDR texture (render-graph version).

    SpotShadowPass
    SSAOPass

    Screen-space ambient occlusion pass (render-graph version).

    SSGIPass

    Screen-space global illumination (render-graph version).

    SSRPass

    Screen-space reflections (render-graph version).

    StarsPass

    Standalone procedural starfield pass. Adds stars only on sky pixels and fades them with the sun's altitude (night-only). Add this before any final tonemap so stars are reshaped along with the rest of the scene.

    TAAPass

    Temporal anti-aliasing pass (render-graph version).

    TerrainGeometryPass
    TerrainLodPass
    TerrainPointSpotShadowPass
    TerrainShadowPass
    TonemapPass

    Final HDR-to-SDR tone-mapping pass (render-graph version).

    TransmissionPass

    Forward refractive pass for KHR_materials_transmission + KHR_materials_volume. Snapshots the lit HDR, then draws each transmissive mesh sampling that snapshot with a screen-space IOR refraction + Beer-Lambert volume absorption, plus a Fresnel environment reflection. Composites back onto the HDR with depth test.

    UnderwaterPass

    Standalone underwater post-process: sinusoidal UV ripple on the HDR sample, a blue cast and a soft radial vignette. Math is shared with the merged CompositePass via the postfx_underwater.wgsl shader module.

    VolumetricFogPass

    Froxel volumetric fog (render-graph version). A view-aligned 3D grid is filled with participating-media density (global height fog + local box volumes) and sun in-scattering (HG phase × cascade shadow + ambient), integrated front-to- back into per-froxel scattering + transmittance, then composited over the HDR scene. Reuses the deferred lighting pass's persistent camera/light uniforms so the sun shafts line up with the lit scene. Register AFTER DeferredLightingFeature.

    WaterPass

    Classes - Render Graph

    Pass

    Abstract base class for a render graph pass.

    PhysicalResourceCache

    Pool of GPU textures and buffers keyed by descriptor. Survives graph compile/execute cycles so transient virtual resources can be backed by the same physical objects across frames without recreation, and so that persistent resources (shadow maps, TAA history, IBL data) live across graph rebuilds.

    RenderGraph

    RenderGraph: declares passes, compiles a dependency graph from their read/write declarations, and executes them in topological order against pooled physical resources.

    Classes - Assets

    AssetManager

    Named cache and lifetime owner for shared meshes, textures, and shaders.

    BlockTexture

    A set of three aligned block atlases (color, normal, MER) for voxel-style rendering.

    GltfLoader

    Loader for binary glTF 2.0 (.glb) assets.

    Mesh

    Static (non-skinned) GPU mesh: an interleaved vertex buffer plus a 32-bit index buffer.

    Shader

    Wraps a compiled WGSL shader module with its label.

    SkinnedMesh

    GPU mesh with skinning attributes (joint indices and weights) per vertex.

    Texture

    Owns a GPUTexture and a default GPUTextureView of the matching dimension.

    Classes - Components

    AnimatedModel

    Component that plays GLTF skeletal animation clips on a skinned model.

    AnimatedNodes

    Plays the scene-node side of glTF animation: rigid TRS on ordinary (non-joint) nodes and per-mesh morph-target weights.

    AnimatedProperties

    Plays KHR_animation_pointer channels — animation that drives non-transform properties via JSON pointers. Currently applies the material subset (emissive / base color / metallic / roughness / alpha-cutoff / transmission / ior / clearcoat); light / camera / node pointers are parsed-but-skipped.

    AudioListener

    Drives the AudioEngine's 3D listener from its GameObject's world transform — attach it to the camera. Each frame it derives the listener position, forward (-Z of the object), and up (+Y) from the world matrix and forwards them to AudioEngine.updateListener.

    AudioSource

    Plays a sound that tracks its GameObject's world position. A thin component wrapper over AudioEngine.playAt: each frame it pushes the object's world translation into the live SoundHandle's panner, so the sound moves with the object.

    Camera

    Camera component. Drives view/projection matrices used by every render pass that needs the main view (geometry, shadows, post).

    Clouds

    Scene authoring handle for the volumetric cloud layer. Mirrors the renderer's CloudSettings as friendly, editable fields; a host (the editor, or any app) reads these and pushes them into the registered CloudFeature.settings. Adding this component to a scene is the signal that clouds should render — the editor enables the feature while a Clouds component is present.

    HQClouds

    Scene authoring handle for the high-quality volumetric cloud layer (HQCloudPass / HQCloudFeature) — the photoreal multi-scatter clouds, as opposed to the cheaper flat-slab Clouds. A host (the editor, or any app) reads these fields and pushes them into the registered HQCloudFeature.settings. Adding this component to a scene is the signal that HQ clouds should render; a scene should use either Clouds or HQClouds, not both.

    MeshRenderer

    Component that draws a Mesh with a Material.

    Projector

    Projects a texture (or video) onto scene surfaces from this GameObject's transform — the unlit, shape-controlled counterpart to a textured spotlight.

    ReflectionProbe

    Reflection probe component. Renders the environment around the probe's world position into a cubemap, then convolves that cube into an irradiance

    • GGX-prefiltered IBL pair that the deferred lighting pass can sample as local image-based lighting.
    Render

    Scene authoring handle for the render pipeline's post-processing stack. Holds an ordered list of enabled effects and their settings; a host (the editor) maps each entry onto the pre-registered render features, enabling and configuring them every frame. Effects absent from the list stay disabled.

    Sky

    Scene authoring handle for the procedural atmosphere. Carries a friendly, curated subset of the atmosphere LUT parameters; the editor (or any host) reads these and pushes them into the registered atmosphere render features via engine.getFeature(AtmosphereFeature) / AtmosphereLutsFeature.

    Classes - Input

    CameraController

    Dual free-fly + orbit camera controller, in the spirit of PlayCanvas's CameraControls.

    GamepadController

    Polled Gamepad-API input source. Construct directly for a long-lived pad, or use setupGamepadControlsLazy to defer until the first connect.

    KeyboardInput

    Robust held-key tracker for keyboard-driven controllers.

    TouchControls

    Mobile/touch input overlay. Owns the joystick, look-drag region, and any caller-registered buttons. The host game wires behavior through callbacks; the class itself never touches game state directly.

    Classes - Renderer

    SdsmReducer

    Reusable SDSM depth feedback: owns a DepthReductionPass and an async readback ring, and exposes the visible scene's view-linear depth bounds.

    Classes - Other

    PackAssets
    PackCatalog

    Read-only queries over a CatalogDoc: pack lookup, asset→pack mapping, label expansion, dependency ordering, and variant selection.

    PackManager
    PackReader
    BufferSource

    The whole archive already resident in memory (e.g. a pack built at runtime, or one fully downloaded).

    HttpRangeSource

    Streams entries out of a remote archive with HTTP Range requests, so a single asset can be pulled from a large pack without downloading the whole thing.

    AudioAnalyser

    Wraps an AnalyserNode for visualization and level metering. Acts as a pass-through node — connect a source to input and (optionally) output onward — so it can tap any point of the graph without changing the signal. Reuse the out typed arrays across frames to avoid per-frame allocation.

    AudioBus

    A named mixing group. Sources connect to input; the signal passes through a volume GainNode, then an ordered effect chain, then on to a parent node (another bus or the context destination). Volume and effects cascade: routing sfxmaster → destination means the effective gain is the product of every bus gain along the way.

    AudioClip

    A decoded sound, ready for playback. Thin wrapper over a Web Audio AudioBuffer that carries the source URL/name and some convenience accessors. Produced by AudioLoader / AudioEngine.load.

    AudioEngine

    The central audio API: a thin, game-oriented layer over the Web Audio API. Owns one AudioContext, a tree of AudioBuses (master plus sfx / music / ui / voice), an AudioLoader, and the pool of live SoundHandle voices.

    AudioLoader

    Loads and decodes audio files into AudioClips, caching results so the same URL is fetched and decoded only once. In-flight loads are deduped: two concurrent load(url) calls share a single fetch+decode.

    Microphone

    Live microphone input. Wraps getUserMedia + a MediaStreamAudioSourceNode and exposes an output node plus a built-in analyser for level metering / visualization. The raw input is not routed to the speakers by default (to avoid feedback); call connect to route it somewhere — a bus input, an effect, or another analyser.

    SoundHandle

    A single playing voice: BufferSource → Gain → [Panner] → destination. Returned by AudioEngine.play / AudioEngine.playAt so callers can control or stop the sound. Disposes itself when playback ends; the owning engine prunes finished handles and advances any follow target.

    PackAssetResolver

    Caller-supplied asset resolution for component construction. Every method is optional; a factory that needs one the resolver doesn't provide should degrade gracefully (e.g. leave a placeholder). All are async — factories build the component synchronously and fill the asset in when the promise resolves, exactly as the editor's load path does.

    Interfaces - Core

    EngineOptions
    GBufferHandles

    G-Buffer handle set produced by deferred geometry features and consumed by AO, deferred lighting, and post-processing. Matches the per-pass shape used by GeometryPass / BlockGeometryPass / SkinnedGeometryPass.

    Frame

    Per-frame context handed to every RenderFeature. Engine populates the pre-bucketed draw lists, camera, timing, and the active RenderGraph before invoking update and addPasses on the registered features.

    RenderFeature

    A unit of rendering work — one or more passes plus the per-frame update and graph-wiring logic that owns them. Features are registered with the Engine at startup (typically via a preset) and drive everything the engine does each frame.

    Material

    Abstract base for shader+data bundles consumed by the geometry, forward, and skinned-geometry passes.

    RenderContextOptions

    Options accepted by RenderContext.create.

    Interfaces - Materials

    OpenPbrMaterialOptions

    OpenPBR Surface inputs (v1 subset). Defaults follow the OpenPBR spec's default surface where practical. Colors are linear RGB.

    PerTextureUvTransform

    One texture's UV transform (glTF KHR_texture_transform). Matches the shared PbrMaterialOptions.uvOffset/PbrMaterialOptions.uvScale/ PbrMaterialOptions.uvRotation semantics, applied per texture.

    PbrMaterialOptions

    Interfaces - Lights

    CascadeData

    Per-cascade data produced by DirectionalLight.computeCascadeMatrices and consumed by the cascade shadow map render passes.

    DirectionalLightOptions

    Construction options for DirectionalLight. Every field is optional and maps to the like-named property; omitted fields keep the property default. There is deliberately no direction — a directional light aims via its GameObject's transform (local -Z); see DirectionalLight.worldDirection.

    PointLightOptions

    Construction options for PointLight. Every field is optional and maps to the like-named property; omitted fields keep the property default. There is no position — a point light is placed by its GameObject's transform; see PointLight.worldPosition.

    SpotLightOptions

    Construction options for SpotLight. Every field is optional and maps to the like-named property; omitted fields keep the property default. There is no position/direction — a spot light is placed and aimed by its GameObject's transform; see SpotLight.worldPosition / SpotLight.worldDirection.

    Interfaces - Render Features

    ColorGradeSettings

    Color-grading stack. Every field is optional and defaults to a neutral (identity) value, so a bare {} grades nothing. Mutate any field on a live TonemapFeature.grade object and the next frame re-uploads it.

    AOFeatureOptions
    AtmosphereFeatureOptions
    AtmosphereLutsFeatureOptions
    PhysicalCameraSettings

    Photographic camera settings driving a fixed, physically-based exposure.

    AutoExposureFeatureOptions
    BloomFeatureOptions
    CloudFeatureOptions
    CompositeFeatureOptions
    ConstantColorSkyFeatureOptions
    DeferredLightingFeatureOptions
    DofFeatureOptions
    ForwardLitFeatureOptions
    ForwardOverlayFeatureOptions
    ForwardPlusFeatureOptions
    GeometryFeatureOptions
    GodrayFeatureOptions
    HQCloudFeatureOptions
    LensFlareFeatureOptions
    MotionBlurFeatureOptions
    OceanFeatureOptions
    ParticleFeatureOptions
    PointSpotLightFeatureOptions
    ProjectorFeatureOptions
    ReflectionProbeBindings

    Snapshot of the cube-array textures + per-probe UBO used by the deferred lighting pass to sample probes. Stashed on Frame.extras under REFLECTION_PROBE_BINDINGS_KEY.

    ReflectionProbeFeatureOptions
    ShadowFeatureOptions
    SkinnedGeometryFeatureOptions
    SkyTextureFeatureOptions
    SsgiFeatureOptions
    StarsFeatureOptions
    TonemapFeatureOptions
    TransmissionFeatureOptions
    VelocityFeatureOptions
    VolumetricFogFeatureOptions
    CameraExposureSettings

    Photographic camera exposure settings.

    ChromaticAberrationSettings

    Chromatic-aberration (lens fringing) settings.

    VignetteSettings

    Radial corner-darkening vignette.

    LensDistortionSettings

    Radial lens distortion (Brown–Conrady polynomial).

    PaniniSettings

    Panini projection (wide-FOV horizontal de-stretch).

    FilmGrainSettings

    Animated film-grain noise.

    PostFxSettings

    Lens & film post-FX stack. Every field is optional; a sub-effect runs only when its object is present and not { enabled: false }. Mutate any field on a live TonemapFeature.postFx object and the next frame re-uploads it.

    ProjectorAtlasOptions
    ProjectorAtlasLike

    Minimal view of a ProjectorAtlas an AtlasSlot needs — a source-side interface so this module doesn't depend on the atlas class.

    AtlasSlot

    A static image packed into a layer of the shared projector atlas array.

    StandaloneTexture

    A standalone 2D texture owned by the caller (large static image, or one the app re-uploads itself).

    VideoSource

    A playing video. Content changes per frame, so it can't be atlased.

    Interfaces - Render Presets

    DeferredPresetOptions
    ForwardPlusPresetOptions
    ForwardPresetOptions

    Interfaces - Passes

    AtmosphereLutParams

    The same AtmosphereParams the standalone atmosphere pass uses. Required for the LUT bakes — the LUTs only depend on these (not on sun direction or camera position), so they can be baked once and reused across frames.

    AtmosphereParamOverrides

    Per-field atmosphere overrides exposed by AtmospherePass.setPlanet.

    PlanetAtmosphere

    Top-level planet configuration accepted by AtmospherePass.setPlanet.

    AutoExposureSettings
    CloudSettings
    AerialAtmosphereParams

    The subset of AtmosphereParams the aerial-perspective fog needs, plus the analytic height-fog layer parameters.

    ContactShadowParams

    Screen-space contact-shadow tuning for the sun (see DeferredLightingPass.setContactShadows).

    CookieParams

    Directional light cookie (gobo) — a texture projected along the sun. See DeferredLightingPass.setCookie.

    ProbeLightingBindings

    GPU resources the lighting pass needs to bind for reflection-probe sampling. ReflectionProbeFeature builds this and routes it through the DeferredLightingFeature into DeferredLightingDeps.probes.

    DepthReductionDeps
    DirectionalShadowDrawItem
    DirectionalVsmDeps
    DirectionalVsmOutputs
    ForwardDrawItem
    DrawItem

    One mesh instance to be drawn into the G-Buffer this frame. normalMatrix is the inverse-transpose of the upper 3×3 of modelMatrix, stored as a Mat4 for uniform alignment.

    GeometryCullConfig

    Per-frame config for opt-in GPU occlusion culling on a GeometryPass. Supply the Hi-Z pyramid produced by HiZPass (built from depth that already holds your occluders) and the camera VP that rendered it. When set, the pass draws via drawIndexedIndirect and a compute pass zeroes the instanceCount of instances outside the frustum or hidden behind the Hi-Z surface.

    GpuCullDeps
    GpuCullOutputs

    GPU instance culling: one compute thread per instance tests its bounding sphere against the camera frustum and (optionally) a Hi-Z pyramid, zeroing the instanceCount of culled instances in their indirect draw args.

    HiZDeps
    HiZOutputs
    HQCloudAtmosphere

    Earth-scale atmosphere parameters (mirrors EARTH_PARAMS in atmosphere_pass.ts and EARTH_ATMOSPHERE in atmosphere_model.wgsl). Static — the cloud pass writes these into the atmosphere uniform once at creation; the sun direction (which is what actually moves the sky) comes from the per-frame light buffer. Match these to the params passed to AtmosphereFeature if a scene uses a custom planet, or pass an override via HQCloudPass.create's atmosphere opt.

    HQCloudSettings
    OceanDynamicSource
    OceanDynamicSimOptions
    OceanFftSimOptions
    OceanWaveSpec
    OceanLookSettings
    OceanPassOptions
    OceanSurfaceSample
    WaveInput

    A contributor to the ocean's raw per-LOD displacement texture. Lifecycle:

    WaveInputRippleSpec
    ParticlePassOptions

    Construction-time options for ParticlePass.create.

    PlanetCloudSettings
    PointShadowDrawItem
    ProbeCaptureMesh

    Per-mesh draw item for the scene capture mode. The probe feature builds these from the scene's MeshRenderers, filtered by the probe's capture extent.

    ProbeBakeRequest

    One probe's bake request for a single frame. The manager fills these, one per probe that needs an update this frame, and passes them to the capture pass via ReflectionProbeCapturePass.setBakeRequests.

    ProbeLightingParams

    Per-frame lighting parameters shared by every probe baked this frame. Set once by the feature before ReflectionProbeCapturePass.addToGraph.

    ShadowMeshDraw
    ShadowSkinnedDraw

    A skinned shadow caster. Rasterized into every cascade with GPU vertex skinning, so an animated mesh casts its live pose rather than a static bind-pose proxy. jointMatrices is the same skinning palette the lit draw uses (16 floats per joint).

    SkinnedDrawItem
    SMAAOptions
    SpotShadowDrawItem
    SSGISettings
    SSRSettings
    TransmissionDrawItem

    One refractive (glass / amber) mesh to draw in the transmission pass.

    TransmissionDeps
    TransmissionOutputs
    FogVolume

    An axis-aligned box of denser, optionally tinted fog.

    VolumetricFogDeps
    VolumetricFogOutputs

    Interfaces - Render Graph

    BoundingSphereSource

    Anything carrying a local-space bounding sphere (e.g. Mesh).

    PassNode

    Internal: declared (uncompiled) pass. Captures the user's reads/writes, the new resources it created, and the execute callback. The compiler turns this into a CompiledPass.

    PassContext

    Context handed to the pass's execute callback.

    ResolvedResources

    Resolved access to physical GPU resources, scoped to a single pass execution.

    PassBuilder

    Builder handed to the pass's setup function. Declares how the pass uses resources and registers its execute callback. Each call to write returns a fresh handle whose version is incremented; the compiler uses these versions to wire dependencies precisely.

    CompiledPass

    A PassNode after culling/sort, ready to execute.

    CompiledGraph

    The output of RenderGraph.compile: an ordered list of passes plus the bindings from virtual resource id to the physical GPU object that will back it during execute.

    ResourceHandle

    Opaque, versioned reference to a virtual resource (texture or buffer). Each PassBuilder.write call returns a new handle whose version is incremented; this lets the compiler distinguish "the texture before this write" from "the texture after this write" and detect stale reads.

    TextureDesc

    Describes a virtual texture's allocation parameters.

    BufferDesc

    Describes a virtual buffer's allocation parameters.

    AttachmentOptions

    Per-attachment metadata supplied alongside an 'attachment' / 'depth-attachment' write. The graph consumes this to build the GPURenderPassDescriptor; the pass execute callback never builds the descriptor itself.

    RenderGraphVizCallbacks
    RenderGraphAttachOptions
    RenderGraphViz

    Interfaces - Assets

    CloudNoiseTextures

    Pair of tileable 3D noise textures used for volumetric cloud rendering.

    CubeLut
    ExrData

    Decoded OpenEXR image as linear floating-point RGBA.

    GltfMeshData

    One renderable primitive parsed from a glTF mesh.

    GltfNodeInfo

    One scene node from the glTF node graph, with defaults filled in. parent is the parent node index (-1 for roots); mesh/skin are -1 when absent.

    GltfLight

    One KHR_lights_punctual light, with spec defaults filled in. The light's placement comes from the node it is attached to (see GltfNodeInfo.light): point lights use the node's world position; directional and spot lights shine down the node's local −Z axis. Intensity is in the glTF's physical units — candela (lm/sr) for point/spot, lux (lm/m²) for directional.

    GltfModel
    GltfStaticMeshData

    One renderable primitive parsed from a glTF mesh as a static (non-skinned) mesh.

    GltfStaticModel

    Result of GltfLoader.loadStatic: plain Mesh primitives plus the resolved node graph, so callers can place each primitive by its owning node's world transform exactly as the skinned loader does.

    StaticPrimitiveGeometry

    Device-free packed geometry for one static primitive, in glb mesh→primitive flat order (the same order GltfLoader.loadStaticFromArrayBuffer walks).

    HdrData

    Decoded Radiance HDR (.hdr) image in raw RGBE form.

    IesProfile

    A parsed LM-63 photometric distribution. Candela is indexed [h][v].

    LoadUsdzOptions

    Interfaces - Components

    AnimatedModelOptions

    Construction options for AnimatedModel. Every field is optional and maps to the like-named property; omitted fields keep the property default. The required GltfModel stays a positional constructor arg.

    AnimatedNodesOptions

    Construction options for AnimatedNodes. Every field is optional and maps to the like-named property; omitted fields keep the property default. The required GltfModel stays a positional constructor arg.

    AnimatedPropertiesOptions

    Construction options for AnimatedProperties. Every field is optional and maps to the like-named property; omitted fields keep the property default. The required GltfModel stays a positional constructor arg.

    AudioSourceOptions

    Configuration for an AudioSource.

    CameraOptions

    Construction options for Camera. Every field is optional and maps to the like-named property; omitted fields keep the property default. fov is in radians (the raw property) — for degrees use Camera.createPerspective.

    CloudsOptions

    Construction options for Clouds. Every field is optional and maps to the like-named property; omitted fields keep the property default.

    HQCloudsOptions

    Construction options for HQClouds. Every field is optional and maps to the like-named property; omitted fields keep the property default.

    MeshRendererOptions

    Construction options for MeshRenderer. Every field is optional and maps to the like-named property; omitted fields keep the property default. The required Mesh and Material stay positional constructor args.

    ProjectorOptions

    Construction options for Projector. Every field is optional and maps to the like-named property; omitted fields keep the property default. Vec/object fields are adopted by reference.

    ReflectionProbeOptions

    Construction options for ReflectionProbe. Every field is optional and maps to the like-named property; omitted fields keep the property default.

    RenderEffectConfig

    One configured effect: its type plus a free-form settings bag (keys defined by the authoring layer's metadata table).

    RenderOptions

    Construction options for Render. Every field is optional and maps to the like-named property; omitted fields keep the property default.

    SkyOptions

    Construction options for Sky. Every field is optional and maps to the like-named property; omitted fields keep the property default.

    Interfaces - Input

    CameraControllerOptions
    GamepadStickOptions
    GamepadLookStickOptions
    GamepadTriggerOptions
    GamepadButtonSpec
    HapticEffect
    GamepadControllerOptions
    JoystickOptions
    CameraRegionOptions
    ButtonStyle
    ButtonSpec
    TouchStyleOverrides
    TouchControlsOptions
    CameraTouchOptions

    Interfaces - Animation

    AnimationChannel

    A single animation track: keyframes for one property of one node.

    AnimationClip

    A named skeletal animation made up of per-joint TRS channels.

    MaterialPointerTarget

    Resolved KHR_animation_pointer target (only material targets are supported).

    Interfaces - Renderer

    DepthBounds

    View-space linear depth bounds of the visible scene.

    Interfaces - Other

    BuildEntryInput

    One asset to place into a pack.

    BuildPackResult

    Result of buildPack: the finished archive and its final TOC entries (with resolved offsets/sizes), handy for emitting a catalog.

    BuildPackOptions

    Options for buildPack.

    PackVariantDoc

    A platform-specific alternative build of a pack (e.g. mobile-sized textures).

    PackDoc

    One pack in the catalog.

    CatalogAssetDoc

    Per-asset entry: which pack owns the key, plus its labels.

    CatalogDoc

    The serialized catalog.json.

    PackEntry

    One asset stored in a pack. offset/storedLen locate the (possibly compressed) blob; rawLen is its decompressed size.

    PackToc

    The table of contents: every entry in the archive.

    PackFooter

    Decoded footer fields.

    PackHandle

    A loaded pack: its id and a reader for its entries.

    PackProgress

    Load progress over the manager's lifetime (cumulative pack counts).

    PackManagerOptions

    Construction options for a PackManager.

    TextureFormatSupport

    Texture-compression formats a device can sample.

    RuntimeProfile

    Capabilities used to select pack variants.

    PackGroupVariant

    A platform variant of a group. v1 only supports 'explicit' (the variant is authored from separately-listed sources); auto downscale/transcode is a follow-up.

    PackGroupInclude

    Selection rules for which project assets land in a group.

    PackGroupDoc

    One authored group → one .pack.

    PackGroupsDoc

    The serialized packs.json.

    ResolvedAsset

    One resolved asset destined for a pack, with its bytes already read.

    PublishedPack

    A finished archive ready to write to disk.

    PublishResult

    Output of publishPacks: archives to write + the catalog.

    PackSource

    A random-access view over an archive's bytes.

    AudioAnalyserOptions

    Options for AudioAnalyser.

    AudioEffect

    An insertable audio effect: a self-contained sub-graph with a single input and output. Connect a source into input and route output onward. AudioBus chains these between its gain and its parent.

    ReverbOptions
    FilterOptions
    DelayOptions
    DistortionOptions
    CompressorOptions
    MusicOptions

    Options for AudioEngine.playMusic.

    MicrophoneOptions
    Vec3Like

    Minimal structural 3D point — Vec3 satisfies this.

    PositionProvider

    Anything with a world position — a GameObject satisfies this.

    SpatialOptions

    Per-source spatialization parameters (maps onto PannerNode).

    VoiceOptions

    Options for a single played voice (AudioEngine.play / playAt).

    CircuitComponentDoc

    How a Circuit attaches to a GameObject. Like ScriptComponentDoc in scene_format.ts, circuit is the stable guid of the .circuit asset; the host resolves it, ensures the generated TS is compiled, and applies values (per-instance overrides of exposed variables).

    SerializedComponent

    A component in an assembly/serialized node: its stable id plus serialized payload.

    SerializedNode

    A GameObject in id-preserving on-disk form — the persisted twin of the editor's in-memory ObjectNode. Transform/flag fields are omittable (default = identity / true / origin) to keep files small, mirroring GameObjectDoc.

    AssemblyDoc

    A scene (or assembly) node that is an instance of an assembly: a link to the source asset plus the sparse AssemblyOverride delta applied on top of it. The instance's own placement (the host node's transform) is authored scene state, not an override.

    TransformOverride

    A subset of TRS channels changed by a transform override.

    AssetResolver

    Caller-supplied asset resolution for component construction. Every method is optional; a factory that needs one the resolver doesn't provide should degrade gracefully (e.g. leave a placeholder). All are async — factories build the component synchronously and fill the asset in when the promise resolves, exactly as the editor's load path does.

    InstantiateContext

    Threaded through every component factory: the live engine + optional asset resolver.

    InstantiateOptions

    Placement + identity options for instantiateAssembly.

    SceneDoc
    GameObjectDoc
    ScriptComponentDoc

    A custom component authored as a TypeScript script under Content/. script is the stable guid of the .ts asset (location-independent, like the asset refs on GltfModelDoc/ParticleSystemDoc). The editor resolves the guid, transpiles the file, and instantiates its default-exported Component subclass at load time.

    CameraDoc
    CameraControllerDoc

    A CameraController: dual free-fly / orbit camera input driver. Added to the camera's GameObject; only active while the scene is playing (it binds DOM listeners to the engine canvas and drives the owner's transform each frame). minDistance/maxDistance aren't serialized here — their Infinity default doesn't survive JSON round-tripping — so they keep their engine defaults.

    AudioSourceDoc

    An AudioSource: plays a clip that tracks the GameObject's world position. clip is the stable guid of an imported audio asset (wav/mp3/ogg/…), resolved + decoded through the AssetResolver at load (like mesh/material refs). bus names a mixer bus; the built-ins are master/sfx/music/ui/voice.

    AudioListenerDoc

    An AudioListener: drives the 3D "ears" from the GameObject's world transform each frame. Attach one (typically to the camera). No settable fields.

    RigidBodyDoc

    A RigidBody physics component (see taos/physics). shape + its dimensions pick the collider; motion is static / dynamic / kinematic. layer/mask are CollisionLayer bit flags. Requires the host to have imported taos/physics.

    CharacterControllerDoc

    A kinematic capsule CharacterBody (see taos/physics).

    TriggerVolumeDoc

    A box sensor TriggerVolume (see taos/physics).

    GeoWorldDoc

    A GeoWorld geospatial component (see taos/geo): streamed terrain + imagery (+ optional vector buildings) anchored at a longitude/latitude floating origin. Requires the host to have imported taos/geo.

    GeoJsonDoc

    A GeoJson vector overlay (see taos/geo), aligned to the active GeoWorld frame.

    DirectionalLightDoc
    PointLightDoc
    SpotLightDoc
    MaterialRef

    Reference to a standalone .material asset by stable guid.

    MeshRendererDoc
    GltfModelDoc

    A glTF/GLB skinned-model renderer. asset is the project-root-relative POSIX path of the .glb (omitted when no model is assigned yet — the "Create > Model" menu spawns an empty one to attach a mesh to). The model is rendered through the skinned geometry pass in bind pose.

    ParticleSystemDoc

    A particle system renderer. asset is the project-root-relative POSIX path of a .particlegraph (omitted when none is assigned yet — "Create > Particle" spawns an empty one to attach a graph to via the Inspector). The graph is compiled and rendered live at the GameObject's transform.

    SkyDoc
    RenderEffectDoc
    RenderDoc
    CloudsDoc
    HQCloudsDoc

    High-quality (photoreal multi-scatter) volumetric clouds; see CloudsDoc for the cheaper variant.

    ReflectionProbeDoc
    ProjectDoc

    Type Aliases - Core

    GraphBuilderCallback

    Optional callback fired while a fresh render graph is being built. Use this as the escape hatch for one-off inline passes (e.g. a brush gizmo): inspect frame.hdr, declare a pass via frame.graph.addPass(...), and write the new handle back into frame.hdr so downstream features pick it up.

    RenderPreset

    Function that wires a bundle of RenderFeatures onto an Engine. The engine awaits the preset, so it may be async (e.g. to load assets a default sky feature needs).

    ShColor

    RGB triple.

    Type Aliases - Render Features

    ColorGradeRgb
    AOMethod
    TonemapOperator

    Tonemap curve options:

    • 'none' — clamp only (linear), no filmic roll-off.
    • 'aces' — Narkowicz single-curve ACES fit (cheap, punchy).
    • 'aces-fitted' — Hill RRT/ODT fit with the ACEScg color matrices; closer to reference ACES (better hue retention + highlight roll-off).
    • 'pbr-neutral' — Khronos PBR Neutral (glTF Sample Viewer): preserves hue and saturation, rolling only the brightest values off to white. Good for material/product viewing where albedo should read true (no ACES-style film look).
    ProjectorImage

    Source image accepted by ProjectorAtlas.add.

    UvRect

    A sub-rectangle of a source image, as [offsetX, offsetY, scaleX, scaleY] in normalized [0,1] coordinates. [0, 0, 1, 1] is the whole image.

    VideoBackend

    Backend used to feed a VideoSource to the GPU each frame.

    ProjectorSource

    Type Aliases - Render Presets

    SkyOption

    Tagged union shared by all three presets. Pick exactly one sky source per pipeline; the preset wires the matching feature in as the first writer of frame.hdr so downstream lit/composite passes load it.

    Type Aliases - Passes

    ForwardTargetSpec

    How a ForwardPass attachment slot is sourced.

    ForwardPlusCullMode

    Light-culling strategy for the Forward+ pass.

    AOBlurQuality
    PointSpotShadowDrawItem
    ProbeFaceView

    A single (probe, face) capture target — the cube-array slice the face writes into.

    SkyTargetSpec

    How a SkyTexturePass output is sourced.

    SsaoBlurQuality
    TAATargetSpec

    How TAAPass sources its resolve target.

    Type Aliases - Render Graph

    ExecuteFn
    ResourceUsage

    How a pass uses a resource. Drives the GPU usage flags applied to the physical resource and the kind of pass encoder the graph creates.

    PassType

    Pass type: drives which encoder the graph hands to the execute callback.

    Type Aliases - Assets

    BlockID

    Zero-based tile index into a horizontal block texture atlas (tile 0 = leftmost).

    GltfLightType

    A KHR_lights_punctual light type.

    TextureType

    Texture view dimensionality supported by the engine.

    Type Aliases - Components

    AudioListenerOptions

    Construction options for AudioListener. The required AudioEngine stays a positional constructor arg; the listener has no settable configuration fields of its own, so this interface is currently empty and reserved for forward compatibility.

    ProjectorShape

    Frustum shape of a projector.

    ProjectorBlend

    How a projector's color combines with what's already on the target.

    ReflectionProbeContent

    What environment a ReflectionProbe captures into its cubemap.

    ReflectionProbeUpdateMode

    When a ReflectionProbe re-bakes its cubemap.

    RenderEffectType

    Identifiers for the post-processing / lighting render effects a Render component can toggle and configure. Each maps to a render feature the host pre-registers (disabled) in its pipeline; the host reads this component each frame and flips feature.enabled + pushes settings. Stringly-typed so the authoring layer (editor) owns the field metadata without the engine needing to know every knob.

    Type Aliases - Input

    GamepadButtonName

    Standard-mapping button aliases. See https://w3c.github.io/gamepad/#remapping.

    GamepadButtonMode
    ButtonMode

    Type Aliases - Animation

    Interpolation

    Keyframe interpolation mode. Mirrors the GLTF animation sampler modes — LINEAR/SLERP between values, STEP holds previous keyframe, CUBICSPLINE uses Hermite tangents stored alongside each value.

    MaterialPointerProp

    A material factor a pointer channel can drive (mapped to a PbrMaterial field).

    Type Aliases - Other

    Compression

    How an individual pack entry (or the TOC) is stored on disk.

    SourceFactory

    Turns a (resolved, absolute) pack URL into a PackSource.

    AssetProvider

    Resolves the concrete assets a group includes (reads bytes off disk/OPFS).

    FetchLike

    Minimal injectable fetch shape, so tests can supply a mock.

    BusName

    Built-in bus names always present on a fresh AudioEngine.

    AssemblyOverride

    One change applied to an assembly instance, addressed by a path of template ids from the assembly root down to the target (a chain so nested instances disambiguate; length 1 — just the root — targets the instance root itself).

    OverrideValue

    Flat scalar/vector value carried by a property override (mirrors the editor's PropValue).

    ComponentFactory

    Build a live component from its doc. Returns null when the type can't be built (no registered factory, or a deliberately deferred type like Script); the instantiator skips nulls, matching the editor's load behavior.

    ComponentDoc
    CameraClearMode
    MeshRef
    MaterialDoc

    Variables - Core

    SH_COEFF_COUNT

    Number of order-3 SH coefficients (bands l = 0,1,2).

    SH_BAND_OF_COEFF

    SH band l (0, 1, or 2) of each of the 9 coefficients, in storage order.

    SH_GPU_BYTE_SIZE

    Bytes of the std140 GPU layout: 9 × vec4 (vec3 padded to 16).

    Variables - Render Features

    ATMOSPHERE_TRANSMITTANCE_LUT_KEY

    Keys other features (AtmosphereFeature, sample-local cloud passes) read from Frame.extras to find the LUT handles.

    ATMOSPHERE_MULTISCATTER_LUT_KEY
    REFLECTION_PROBE_BINDINGS_KEY

    Frame.extras key the DeferredLightingFeature reads to wire probes in.

    ILLUMINANCE_LUX

    Reference illuminance values (lux) for directional lighting.

    BULB_LUMENS

    Reference luminous flux (lumens) for common incandescent-equivalent bulbs.

    SUNNY_16

    "Sunny 16" reference: f/16, shutter ≈ 1/ISO, ISO 100 → EV100 ≈ 15, the canonical correct exposure for a subject in direct midday sun. Handy demo/default preset.

    UV_RECT_FULL

    The full image, uncropped.

    Variables - Passes

    EARTH_AERIAL

    Earth defaults — match the old hard-coded constants in deferred_lighting.wgsl (and EARTH_ATMOSPHERE in atmosphere_model.wgsl), so the look is unchanged until a caller supplies custom-planet params.

    SHADOW_VSM_KEY

    Persistent key for the directional EVSM2 moment map (2D array, one layer per cascade). Survives graph rebuilds like the depth shadow map it derives from.

    INDIRECT_ARG_BYTES

    Bytes per drawIndexedIndirect argument set (5 × u32).

    CULL_BOUNDS_BYTES

    Bytes per instance bounding sphere (vec4: center.xyz, radius).

    DEFAULT_HQ_CLOUD_SETTINGS
    OCEAN_DEFAULT_LOOK
    FROXEL_X
    FROXEL_Y
    FROXEL_Z
    MAX_FOG_VOLUMES

    Per-frame local fog volume capacity. Must match the buffer sizing below.

    Variables - Assets

    VERTEX_STRIDE

    Byte stride of a Mesh vertex: 48 bytes = position(12) + normal(12) + uv(8) + tangent(16).

    VERTEX_ATTRIBUTES

    WebGPU vertex attribute layout matching VERTEX_STRIDE: position, normal, uv, tangent.

    VERTEX_COLOR_STRIDE

    Byte stride of an optional per-vertex color: one vec4<f32> (RGBA, linear, normalized to [0,1]). Lives in a separate vertex buffer bound at slot 1 so the shared interleaved layout above (and the dozens of mesh generators that hardcode it) stays untouched — only glTF meshes with a COLOR_0 attribute allocate one. Multiplies the base color in the geometry/forward/transmission shaders, gated by the HAS_VERTEX_COLOR shader define.

    VERTEX_COLOR_ATTRIBUTES

    Slot-1 vertex buffer layout for the optional per-vertex color (see VERTEX_COLOR_STRIDE).

    SKINNED_VERTEX_STRIDE

    Byte stride of a SkinnedMesh vertex: 112 bytes = position(12) + normal(12) + uv(8) + tangent(16) + joints0(16, uvec4) + weights0(16) + joints1(16, uvec4) + weights1(16). The second joint/weight set carries glTF JOINTS_1/WEIGHTS_1 (up to 8 bone influences); meshes with ≤4 influences leave weights1 = 0, making the extra four a no-op.

    SKINNED_VERTEX_ATTRIBUTES

    WebGPU vertex attribute layout matching SKINNED_VERTEX_STRIDE: position, normal, uv, tangent, joints0 (uvec4), weights0, joints1 (uvec4), weights1.

    Variables - Input

    STANDARD_GAMEPAD_BUTTONS

    Variables - Other

    CATALOG_SCHEMA

    Current catalog schema version.

    PACK_MAGIC

    ASCII magic at the start of the 32-byte footer.

    PACK_VERSION

    Current archive format version.

    Fixed footer size in bytes.

    FLAG_TOC_GZIP

    Footer flag: the TOC blob is gzip-compressed.

    DESKTOP_PROFILE

    Reasonable desktop default (BC, large textures).

    MOBILE_PROFILE

    Reasonable mobile default (ASTC/ETC2, smaller textures).

    PACK_GROUPS_SCHEMA

    Current packs.json schema version.

    ASSEMBLY_SCHEMA_VERSION
    INSTANCE_ID_SEP

    Separator between an instance root id and a template id in a remapped live id. Object ids are opaque cookies (o<counter>-<rand>) and never contain /, so / is unambiguous as a structural separator.

    SCENE_SCHEMA_VERSION
    PROJECT_SCHEMA_VERSION

    On-disk format for project.taos.

    FP16_MAX

    Largest finite value representable in IEEE-754 half precision (fp16).

    EVSM_EXPONENT_FP32

    EVSM warp exponent for fp32 moment storage. Large enough to make the Chebyshev bound tight (little light bleeding) while staying well within fp32 range — exp(2·40) is ~1.4e34, far below the fp32 max ~3.4e38.

    EVSM_EXPONENT_FP16

    EVSM warp exponent for fp16 moment storage. Capped so the warped second moment exp(2c) stays inside FP16_MAX: exp(2·5.5) ≈ 59874 < 65504. This is a weak warp — fp16 EVSM is markedly less effective than fp32 — so prefer plain VSM + bleed reduction when only fp16 is available.

    Functions - Core

    perlinNoise3

    Samples 3D classic Perlin gradient noise (stb_perlin port).

    perlinNoise3Seed

    Same as perlinNoise3 but with an explicit seed (low 8 bits used) to decorrelate octaves or produce independent noise fields.

    perlinRidgeNoise3

    Ridged multifractal noise: (offset - |perlin|)^2 summed over octaves with multiplicative carry-over from the previous octave. Useful for sharp mountain ridges.

    perlinFbmNoise3

    Fractional Brownian motion: sums signed Perlin noise across multiple octaves.

    perlinTurbulenceNoise3

    Turbulence noise: like fBM but sums the absolute value of each octave, producing the classic billowy "clouds" look.

    perlinNoise3WrapNonpow2

    Perlin noise variant that supports arbitrary (non-power-of-two) tiling periods up to 256.

    halton

    Halton low-discrepancy sequence. Returns the index-th element of the sequence in base base, in the half-open interval [0, 1).

    shBandWindow

    Hann (raised-cosine) windowing factor for SH band l, parameterized by a window width w (Sloan, "Stupid Spherical Harmonics Tricks"). Multiplying each stored coefficient by shBandWindow(band, w) at bake time attenuates the higher bands, suppressing the low-order "negative-lobe" ringing (dark halos) a single very bright texel (the sun) produces in order-3 reconstruction.

    shBasis

    Evaluates the 9 real SH basis functions Y_i(n) for a unit direction. Returns K_i · poly_i(n) per coefficient (same ordering as K).

    projectSphericalHarmonics

    Projects an environment onto order-3 SH on the CPU using a deterministic Fibonacci-sphere sample set (uniform over the sphere, solid-angle weight 4π/N per sample). This is the reference/offline projector; the engine bakes the same integral on the GPU.

    evalShIrradiance

    Reconstructs cosine-convolved diffuse irradiance E(n)/π for a unit direction from the 9 projected coefficients. Drop-in for an irradiance-cube sample (both store E/π).

    packShForGpu

    Packs the 27-float (9 × RGB) coefficients into the std140 layout the SH shader buffer expects: 9 × vec4, with the 4th lane zero-padded. Returns 36 floats (144 bytes), matching SH_GPU_BYTE_SIZE.

    Functions - Materials

    pbrMaterialToOpenPbr

    Build an OpenPbrMaterial that reproduces pbr's shading as closely as the OpenPBR Surface model allows.

    Functions - Render Features

    whiteBalanceCoeffs

    Convert a temperature/tint pair (each ~-100..100) into a per-channel LMS scaling vector that the shader multiplies the scene's LMS by. Returns [1,1,1] at the neutral (0,0) point.

    lumensToCandela

    Isotropic point light: candela from total luminous flux. cd = lm / 4π.

    lumensToCandelaSpot

    Spotlight: candela from luminous flux spread over the cone. cd = lm / (2π · (1 − cos θ)), θ = the outer-cone half-angle in radians. A narrower cone concentrates the same flux into more candela.

    computeEv100

    Exposure value at ISO 100 from camera settings: EV100 = log2( N² / t · 100 / ISO ) where N is the aperture f-number, t the shutter time in seconds. A higher EV100 means a brighter scene (which needs a smaller exposure multiplier).

    ev100ToExposure

    Linear exposure multiplier that maps scene luminance into the display range: exposure = 1 / (1.2 · 2^(EV100 − compensation)) The 1.2 is the standard middle-gray / saturation-based reflected-light calibration. compensation is in EV stops: +1 doubles the exposure (brighter).

    exposureFromCamera

    Exposure multiplier directly from photographic settings (convenience).

    Functions - Render Presets

    deferredPreset

    Standard deferred pipeline: shadow → geometry → AO → sky → deferred lighting → (point/spot) → (transparent overlay, forward or forward+) → TAA → (DoF) → (bloom) → tonemap.

    forwardPlusPreset

    Tiled forward+ preset: optional sky → optional shadow → forward+ → (TAA) → (DoF) → (bloom) → tonemap.

    forwardPreset

    Minimal preset for forward-lit PBR rendering: optional sky → optional shadow → forward-lit → (TAA) → (DoF) → (bloom) → tonemap.

    registerSkyFeature

    Registers the feature implied by sky (or nothing for 'none' / undefined). Centralized so the three presets stay in sync.

    Functions - Passes

    defaultOceanWaves

    Dense ocean spectrum à la Crest's ShapeGerstnerBatched — instead of one sinusoid per octave, generate componentsPerOctave (~8) components per octave with stratified-random wavelengths, Pierson–Moskowitz amplitudes, directions spread around the wind, and random phases. The many components interfere into irregular, detailed chop rather than smooth rolling swell. Components are summed across the LOD cascade (each routed to its band).

    sampleGerstnerSurface

    Evaluate the Gerstner-spectrum surface height + normal at world (x, z) at time t. Mirrors the per-wave evalGerstner from the WGSL helpers, summed across the spectrum.

    packFogVolumes

    Pack fog volumes into the std430 layout the inject shader reads. Writes at most MAX_FOG_VOLUMES; returns the count written. Pure — exported for tests.

    Functions - Render Graph

    packWorldSphere

    Transforms a local bounding sphere by m and writes the world sphere (center.xyz, radius) into out[off..off+3]. The radius is scaled by the largest of the matrix's basis-column lengths — the same conservative estimate as Engine._sphereInCameraFrustum, so GPU and CPU culling agree.

    packIndirectArgs

    Fills one drawIndexedIndirect argument set into out[off..off+4] (u32 units): [indexCount, instanceCount, firstIndex, baseVertex, firstInstance]. The cull compute pass later zeroes instanceCount for culled instances.

    createRenderGraphViz

    Functions - Assets

    createCloudNoiseTextures

    Generates and uploads the cloud base and detail 3D noise textures.

    parseCubeLut

    Parse .cube text into a CubeLut. Supports comments (#), TITLE, LUT_3D_SIZE, DOMAIN_MIN/DOMAIN_MAX, and the N³ float triplets. Throws on 1D LUTs (unsupported) or a body whose row count doesn't match the declared size.

    uploadCubeLut

    Upload a parsed LUT as a filterable rgba8unorm 3D texture (one texel per cube entry, red = X fastest, which matches the .cube row order). Values are clamped to [0,1]. Caller owns the texture and must destroy() it.

    createIdentityLut

    A 2×2×2 identity LUT (output = input). Bound by default so the tonemap pass always has a valid 3D texture even when no user LUT is set; the grade shader gates actual sampling behind the LUT-enable flag.

    loadCubeLut

    Fetch a .cube file by URL and parse it.

    loadHdrTexture

    Fetches and decodes a Radiance .hdr URL into an rgba16float Texture.

    loadEnvironmentTexture

    Loads an HDR environment from a URL, dispatching on file extension: .exr uses the OpenEXR loader, anything else (.hdr) the Radiance loader. Both produce an identical rgba16float 2D Texture with a full mip pyramid, so the result drops straight into IBL prefilter / sky panorama paths.

    parseExr

    Parses an OpenEXR (.exr) file into linear floating-point RGBA pixels.

    createExrTexture

    Uploads parsed EXR pixels as an rgba16float 2D texture with a full mip pyramid — the same texture shape createHdrTexture produces, so EXR and Radiance HDR environments are interchangeable downstream (IBL prefilter, sky panorama, etc.).

    loadExrTexture

    Convenience: fetch and decode an .exr URL into an rgba16float Texture.

    parseHdr

    Parses a Radiance HDR (.hdr) file into raw RGBE pixel data.

    createHdrTexture

    Uploads raw RGBE pixels and decodes them to an rgba16float 2D texture.

    parseIes

    Parse IESNA LM-63 text into an IesProfile. Pure — no I/O. Tolerant of the values being wrapped across lines (the spec allows it): after the TILT=NONE line the rest of the file is treated as one whitespace-separated number stream and consumed positionally.

    bakeIesLutRow

    Bake an axially-symmetric LUT row from a profile: width samples of the normalized intensity over the vertical angle 0..180°. Horizontal angles are collapsed by averaging (exact for symmetric profiles, numH === 1). Vertical angles outside the profile's measured range read 0 (the luminaire emits nothing there — e.g. a downlight above 90°). The peak is normalized to 1.0; absolute brightness stays the light's own intensity. Pure — exported for tests.

    getTinyUsd

    Resolves the initialized TinyUSDZ WASM module, fetching and compiling it on first call and memoizing thereafter. The Emscripten glue (tinyusdz.js) is a real ES module exporting a MODULARIZE factory; we import it via its Vite URL (keeps it out of the main bundle) and hand it the .wasm bytes explicitly as wasmBinary so the module never has to locate/fetch the binary itself.

    loadUsdz

    Loads a .usdz / .usda / .usdc asset from url into a static model shaped like GltfStaticModel. Fetches the bytes, parses them through the TinyUSDZ WASM runtime (lazily initialized on first call), and maps the flattened render scene onto engine meshes / materials / nodes.

    Functions - Components

    cubeCaptureViewProjs

    Builds the six view-projection matrices used to render a cube capture centered at position. Mirrors PointLight.cubeFaceViewProjs but with a longer default far plane (probes view the full scene).

    Functions - Input

    setupGamepadControlsLazy

    Defer creating a GamepadController until a gamepad actually connects (the first 'gamepadconnected' event, which the browser only fires once the user has pressed a button on the pad). Returns a handle whose controller field is filled once init runs (or stays null on a session that never sees a pad). cancel() aborts a still-pending init.

    setupTouchControlsLazy

    Defer creating a TouchControls until the device actually produces a touch event. The first touchstart anywhere on the page bootstraps the overlay; subsequent touches drive it. Returns a handle whose controls field is filled once init runs (or stays null on a desktop session that never sees a touch). cancel() aborts a still-pending init.

    setupCameraTouchControls

    Convenience wrapper that wires a TouchControls to a free-fly CameraController: bottom-left joystick → forward/strafe, canvas drag (right half) → look, optional UP/DOWN buttons → vertical input.

    Functions - Animation

    parseAnimationPointer

    Parses a KHR_animation_pointer JSON pointer into a structured target.

    Functions - Other

    compressBytes

    Compress data with method. 'none' returns the input unchanged.

    decompressBytes

    Decompress data previously stored with method. 'none' is a passthrough.

    buildPack

    Build a .pack archive from inputs.

    encodeFooter

    Serialize the 32-byte footer that terminates every pack.

    decodeFooter

    Parse and validate the 32-byte footer. bytes must be exactly the trailing PACK_FOOTER_SIZE bytes of the archive.

    detectProfile

    Build a profile from a live GPUDevice. A device that exposes ASTC/ETC2 but not BC is treated as 'mobile'; otherwise 'desktop'. Callers can always override with PackManager.setProfile (e.g. to force the mobile build on a development desktop).

    publishPacks

    Build every group into a .pack and assemble the catalog (dependency graph, asset→pack map, label index).

    generateImpulseResponse

    Generates a synthetic impulse response: exponentially-decaying white noise. Pure (aside from the ctx.createBuffer allocation) so it can be unit-tested with a minimal mock context. random defaults to Math.random and can be injected for deterministic tests.

    createReverb

    Convolution reverb with a generated impulse response and a wet/dry mix. input fans out to a dry path and a convolver (wet) path that sum at output.

    createFilter

    A BiquadFilterNode (lowpass, highpass, bandpass, …) as an effect.

    createDelay

    A feedback delay line (echo) with a wet/dry mix.

    makeDistortionCurve

    Builds a waveshaper transfer curve. amount 0 → near-linear, higher → harder clipping. Pure and allocation-only — unit-testable. The curve is an odd function (f(-x) = -f(x)) and monotonically increasing.

    createDistortion

    A WaveShaperNode distortion/overdrive.

    createCompressor

    A DynamicsCompressorNode. Defaults give gentle glue compression; a high ratio with a low threshold acts as a master limiter to tame peaks.

    generateObjectId

    Generate a fresh, process-unique object id. Used as the default identity for any GameObject / Component created without an explicit id.

    liveIdForTemplate

    The live id for a template node inside an assembly instance. The assembly root maps to the instance's own id (instanceRootId); every other template id is namespaced under it. Deterministic — derivable at load from the persisted instance id + the persisted template ids, with nothing extra stored.

    applyOverrides

    Deep-clone a template and apply overrides, returning a patched template (ids unchanged).

    remapTree

    Remap a (patched) template tree to an instance: the root takes instanceRootId, every other object/component id is namespaced under it via liveIdForTemplate. Nested assembly-link nodes keep their link (their inner subtree is materialized separately by the instantiator).

    materializeInstance

    Convenience: applyOverrides then remapTree.

    registerComponentFactory

    Register (or override) the factory for a component doc type. Last wins.

    getComponentFactory

    The factory for a doc type, or null if none is registered.

    buildComponent

    Build a component from its doc via the registry, or null if unbuildable.

    instantiateAssembly

    Materialize a loaded assembly into a live GameObject: apply the instance's override delta and placement options, remap ids to a fresh instance, and build. Assembly-link nodes are not resolved — use instantiateAssemblyAsync for assemblies that reference other assemblies.

    instantiateScene

    Build every root object of a scene doc. Caller adds them to a Scene.

    instantiateAssemblyAsync

    Like instantiateAssembly, but resolves nested assembly links recursively.

    instantiateSceneAsync

    Like instantiateScene, but resolves scene-node and nested assembly links.

    buildMeshRenderer

    Build a live MeshRenderer from its doc (registered as the MeshRenderer factory).

    buildPrimitiveMesh

    Build a built-in primitive mesh from a non-glTF MeshRef.

    buildInlinePbr

    Build an inline PBR material. (Material-asset references go through the resolver.)

    cylinderGeometry

    Pure geometry for a Y-up cylinder centered at the origin: caps at y = ±height/2, smooth side (per-segment normals) and flat caps. Interleaved 12-float vertex stride (position3 + normal3 + uv2 + tangent4) matching Taos's vertex layout. Mesh has no createCylinder, so the engine provides this for assembly/scene primitives; factored out (device-free) so it's unit-testable.

    evsmExponentForFormat

    Picks a warp exponent whose second moment exp(2c) fits the given moment texture format. Returns the fp32 exponent for 32-bit-float formats and the fp16-safe exponent otherwise.

    evsmFitsFp16

    True when both warped moments at depth 1.0 fit a fp16 moment texture.

    vsmReduceBleed

    VSM light-bleed reduction: remap the Chebyshev probability so everything below amount clamps to fully shadowed. The over-estimate that washes out the overlap band between separated occluders lives in the low tail of [0,1], so cutting it removes the bleed at a small cost in penumbra darkness. amount of 0 disables it.

    vsmChebyshev

    One-tailed Chebyshev upper bound on the lit fraction. m0/m1 are E[x] and E[x²] in the map's space (linear depth for VSM, warped depth for EVSM); compare is the receiver in the same space. minVariance floors the variance to suppress acne; bleed drives vsmReduceBleed.

    evsmWarp

    EVSM positive exponential warp exp(c·depth).

    evsm2Shadow

    EVSM2 (positive-only) shadow test. m0/m1 must have been baked as (E[w], E[w²]) with w = evsmWarp(d, c) for the SAME c. minVariance is in linear-depth units and scaled into warp space via the warp derivative d/dd exp(c·d) = c·w so the floor behaves consistently across the range.