@aura3d/cli 5.0.1 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -6
- package/skills/agent-docs/api-signatures.md +411 -0
- package/skills/agent-docs/recipes.md +735 -0
- package/skills/agent-docs/threejs-to-aura3d.md +30 -0
- package/skills/aura3d-art-direction/SKILL.md +4 -0
- package/skills/aura3d-core/SKILL.md +23 -30
- package/skills/aura3d-materials-environments/SKILL.md +2 -2
- package/skills/aura3d-scene-authoring/SKILL.md +7 -0
- package/skills/aura3d-threejs-migration/SKILL.md +5 -0
- package/skills/llms.txt +25 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aura3d/cli",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"aura3d": "dist/cli.js",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"main": "./dist/index.js",
|
|
28
28
|
"types": "./dist/index.d.ts",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@aura3d/asset-index": "5.0.
|
|
31
|
-
"@aura3d/assets": "5.0.
|
|
32
|
-
"@aura3d/audio": "5.0.
|
|
33
|
-
"@aura3d/rendering": "5.0.
|
|
34
|
-
"create-aura3d": "5.0.
|
|
30
|
+
"@aura3d/asset-index": "5.0.2",
|
|
31
|
+
"@aura3d/assets": "5.0.2",
|
|
32
|
+
"@aura3d/audio": "5.0.2",
|
|
33
|
+
"@aura3d/rendering": "5.0.2",
|
|
34
|
+
"create-aura3d": "5.0.2",
|
|
35
35
|
"typescript": "^5.8.3"
|
|
36
36
|
},
|
|
37
37
|
"description": "Bring real GLB/glTF assets into Aura3D browser apps with typed references, provenance, catalog search, validation, screenshots, and deploy checks.",
|
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
# API signatures (answer-first)
|
|
2
|
+
|
|
3
|
+
Generated by `node tools/docs/gen-api-signatures.mjs --write` from the real `@aura3d/engine` root types (`packages/engine/src/public/index.ts`). Do not edit by hand: without `--write` the same command fails when this file is stale. Read this instead of opening `node_modules/@aura3d/engine` type files; every example line is type-checked in [`recipes-src/signature-examples.check.ts`](recipes-src/signature-examples.check.ts). The complete export list is [`docs/api/root-exports.md`](../api/root-exports.md); this page covers the roots agents look up most.
|
|
4
|
+
|
|
5
|
+
Columns: Call (parameters, `?` = optional), Returns, Options (the keys of the first options object, `?` = optional). Colours are CSS strings, vectors are `[x, y, z]` tuples, angles are radians unless the name says `Deg`.
|
|
6
|
+
|
|
7
|
+
Defaults the types do not carry (read from `agent-api/nodes/lights.ts`):
|
|
8
|
+
|
|
9
|
+
| Call | Defaults |
|
|
10
|
+
|---|---|
|
|
11
|
+
| `lights.ambient` | intensity 0.28, color #ffffff |
|
|
12
|
+
| `lights.hemisphere` | skyColor #bcd7ff, intensity 1, position [0, 1, 0] |
|
|
13
|
+
| `lights.directional` | position [3, 4, 3], intensity 1.5, color #ffffff |
|
|
14
|
+
| `lights.point` | position [2, 2.5, 1.5], intensity 8, color #ffffff |
|
|
15
|
+
| `lights.spot` | position [0, 4, 0], angle pi/6, penumbra 0.4, distance 12, intensity 30 |
|
|
16
|
+
|
|
17
|
+
## `createAuraApp`
|
|
18
|
+
|
|
19
|
+
Mounts the scene, owns renderer, resize, loop and disposal. `await app.ready()` before the first frame is judged.
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
const app = createAuraApp("#app", { scene: scene({ background: "#101418" }) });
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
| Call | Returns | Options |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| `createAuraApp(target: AuraAppTarget, options: AuraCreateAppOptions)` | `AuraApp` | options: frameMode?: "sync" \| "async" \| undefi…; scene: AuraSceneBuilder \| AuraSc…; worker?: { readonly createWorker: …; physics?: { readonly layers?: AuraC…; diagnostics?: boolean \| AuraDiagnostics…; renderer?: AuraCreateAppRendererOpti…; performanceQuality?: AuraPerformanceQuality \| …; quality?: AuraQualityMode \| undefin…; preserveDrawingBuffer?: boolean \| undefined; autoStart?: boolean \| undefined; resize?: boolean \| undefined; pixelRatio?: number \| { readonly max?:…; qualityRebuild?: { readonly flags?: import…; lightin… |
|
|
28
|
+
| `app.onFrame(callback: AuraFrameCallback)` | `() => void` | |
|
|
29
|
+
| `app.ready()` | `Promise<void>` | |
|
|
30
|
+
| `app.nodes` | `AuraRuntimeNodeRegistry` | |
|
|
31
|
+
| `app.setScene(scene: AuraSceneBuilder \| AuraSceneSnapshot)` | `void` | |
|
|
32
|
+
| `app.pause()` | `void` | |
|
|
33
|
+
| `app.resume()` | `void` | |
|
|
34
|
+
| `app.screenshot()` | `AuraScreenshot` | |
|
|
35
|
+
| `app.atmosphere` | `AuraAppAtmosphere \| undefined` | |
|
|
36
|
+
| `app.effects` | `AuraAppEffects \| undefined` | |
|
|
37
|
+
| `app.camera` | `AuraCameraController \| undefined` | |
|
|
38
|
+
| `app.input(options: GameInputOptions)` | `GameInputController & { recordedDeviceState(): GameInputDeviceRecordi…` | options: actions: Record<string, readonly s…; axes?: Record<string, GameInputA…; axisDefaults?: GameInputAxisSettings \| u…; bufferMs?: number \| Readonly<Record<…; target?: EventTarget \| undefined; autoListen?: boolean \| undefined; pointer?: boolean \| undefined; touch?: boolean \| undefined; gamepad?: boolean \| { readonly inde…; recordDeviceState?: "aura-game-input-device-s… |
|
|
39
|
+
| `app.diagnostics()` | `AuraDiagnostics` | |
|
|
40
|
+
| `app.dispose()` | `void` | |
|
|
41
|
+
|
|
42
|
+
## `scene`
|
|
43
|
+
|
|
44
|
+
Builder: `.add(node)` one node or builder at a time, `.camera(spec)`, `.background(color)`.
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
const stage = scene({ background: "#101418" }).add(primitives.box({ name: "crate" })).camera(camera.perspective({ position: [3, 2, 5], target: [0, 0.5, 0], fov: 45 }));
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
| Call | Returns | Options |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| `scene(init: AuraSceneInit \| undefined)` | `AuraSceneBuilder` | init: children?: readonly (AuraSceneNode \|…; background?: string \| AuraSceneBackgro…; camera?: AuraCameraSpec \| undefined; timeline?: AuraTimelineSpec \| undefi…; diagnostics?: boolean \| undefined; clipping?: AuraClipGroup \| AuraClipG… |
|
|
53
|
+
| `scene().add(node: AuraSceneNode \| AuraNodeBuilder<AuraSceneNode>)` | `AuraSceneBuilder` | |
|
|
54
|
+
| `scene().addMany(nodes: readonly (AuraSceneNode \| AuraNodeBuilder<AuraSceneNode>)[])` | `AuraSceneBuilder` | |
|
|
55
|
+
| `scene().camera(next: AuraCameraSpec)` | `AuraSceneBuilder` | next: mode: AuraCameraMode; position?: AuraVec3 \| undefined; target?: AuraVec3 \| undefined; up?: AuraVec3 \| undefined; roll?: number \| undefined; offset?: AuraVec3 \| undefined; targetOffset?: AuraVec3 \| undefined; offsetMode?: "scene" \| "target-yaw" \| …; fov?: number \| undefined; focalLength?: number \| undefined; filmGauge?: number \| undefined; filmOffset?: number \| undefined; viewOffset?: { readonly fullWidth: num…; depth?: { readonly mode?: "standa…; near?: number \| undefined; far?: number \| undefined; layers?: number… |
|
|
56
|
+
| `scene().background(color: string \| AuraSceneBackgroundImage, options?: {…})` | `AuraSceneBuilder` | options: toneMapped?: boolean \| undefined |
|
|
57
|
+
| `scene().timeline(next: AuraTimelineSpec)` | `AuraSceneBuilder` | next: mode: "loop" \| "once"; seconds?: number \| undefined; startTime?: number \| undefined; duration?: number \| undefined; loop?: boolean \| undefined; easing?: "linear" \| "easeInOut" \| …; captureTime?: number \| undefined |
|
|
58
|
+
| `scene().physics(next: AuraPhysicsWorldController)` | `AuraSceneBuilder` | |
|
|
59
|
+
| `scene().diagnostics(enabled?: boolean)` | `AuraSceneBuilder` | |
|
|
60
|
+
|
|
61
|
+
## `looks`
|
|
62
|
+
|
|
63
|
+
Genre look presets: environment, key light, fog and grade in one unit. Spread `looks.appOptions(id)` into `createAuraApp` options.
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
void looks.preset("product-studio");
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
| Call | Returns | Options |
|
|
70
|
+
|---|---|---|
|
|
71
|
+
| `looks.preset(id: AuraLookId, overrides: AuraLookOverrides \| undefined)` (+1 overloads) | `AuraNodeBuilder<AuraGroupNode>` | overrides: sun?: { readonly azimuthDeg?: n…; exposureEv?: number \| undefined; fogDensityScale?: number \| undefined; accent?: string \| undefined; background?: string \| undefined; hdri?: AuraHdriId \| AuraAssetRef…; environmentIntensity?: number \| undefined; environmentRotationDeg?: number \| undefined; key?: { readonly color?: AuraCo…; rim?: false \| { readonly color?…; fog?: { readonly color?: AuraCo…; grade?: { readonly contrast?: num…; post?: AuraPostPresetId \| { read… |
|
|
72
|
+
| `looks.nodes(id: AuraLookId, overrides: AuraLookOverrides \| undefined)` | `readonly AuraNodeBuilder<AuraSceneNode>[]` | same as `looks.preset` |
|
|
73
|
+
| `looks.appOptions(id: AuraLookId, options: AuraLookBuildOptions \| undefined)` | `Pick<AuraCreateAppOptions, "pixelRatio" \| "renderer">` | options: expansion?: "auto" \| "v0" \| "v1" \| un…; flags?: QrFlags \| undefined |
|
|
74
|
+
| `looks.list()` | `readonly AuraLookId[]` | |
|
|
75
|
+
| `looks.describe(id: AuraLookId)` | `AuraLookPreset` | |
|
|
76
|
+
| `looks.resolveDefault(snapshot: AuraSceneSnapshot)` | `{ readonly id: AuraLookId \| "engine-default"; readonly source: "autho…` | snapshot: schema: "aura3d-scene-snapshot/1.…; clipping?: AuraClipGroupSnapshot \| u…; background: string; backgroundImage?: AuraSceneBackgroundImage …; backgroundToneMapped?: false \| undefined; overrideMaterial?: AuraMaterialSpec \| undefi…; camera: AuraCameraSpec; timeline?: AuraTimelineSpec \| undefi…; physics?: AuraPhysicsSceneSummary \|…; nodes: readonly AuraSceneNode[]; diagnostics: { readonly enabled: boole… |
|
|
77
|
+
|
|
78
|
+
## `material`
|
|
79
|
+
|
|
80
|
+
Colours are CSS strings. Metals need an environment.
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
void material.pbr({ color: "#c8ccd4", metallic: 0.9, roughness: 0.38 });
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
| Call | Returns | Options |
|
|
87
|
+
|---|---|---|
|
|
88
|
+
| `material.custom(spec: AuraCustomMaterialSpec)` | `AuraMaterialSpec` | spec: glsl: { readonly vertex?: strin…; wgsl?: { readonly vertex?: strin…; uniforms?: Readonly<Record<string, A…; uniformAliases?: Readonly<Record<string, s…; defines?: Readonly<Record<string, s…; transparent?: boolean \| undefined; depthWrite?: boolean \| undefined; depthTest?: boolean \| undefined; side?: "front" \| "back" \| "doubl…; blending?: "custom" \| "normal" \| "ad…; fog?: boolean \| undefined; patch?: Readonly<Record<string, s…; receiveShadow?: boolean \| undefined; castShadow?: boolean \| undefined |
|
|
89
|
+
| `material.toon(options?: AuraToonMaterialOptions)` | `AuraMaterialSpec` | options: color?: string \| undefined; steps?: number \| undefined; ramp?: AuraAssetRef<"texture", s…; shadowColor?: string \| undefined; rim?: AuraMaterialRimSpec \| und… |
|
|
90
|
+
| `material.matcap(options: AuraMatcapMaterialOptions)` | `AuraMaterialSpec` | options: map: AuraAssetRef<"texture"> \|…; color?: string \| undefined; opacity?: number \| undefined; transparent?: boolean \| undefined; side?: "front" \| "back" \| "doubl… |
|
|
91
|
+
| `material.depth(options?: AuraDepthPreviewMaterialOptions)` | `AuraMaterialSpec` | options: near?: number \| undefined; far?: number \| undefined; side?: "front" \| "back" \| "doubl… |
|
|
92
|
+
| `material.normal(options?: AuraNormalMaterialOptions)` | `AuraMaterialSpec` | options: side?: "front" \| "back" \| "doubl… |
|
|
93
|
+
| `material.distance(options?: AuraDistanceMaterialOptions)` | `AuraMaterialSpec` | options: referencePosition?: AuraVec3 \| undefined; near?: number \| undefined; far?: number \| undefined; side?: "front" \| "back" \| "doubl… |
|
|
94
|
+
| `material.shadow(options?: AuraShadowMaterialOptions)` | `AuraMaterialSpec` | options: color?: string \| undefined; opacity?: number \| undefined; side?: "front" \| "back" \| "doubl…; light?: "directional" \| "point" \|… |
|
|
95
|
+
| `material.node(options: TslMaterialNodeOptions \| ShaderGraphMaterialOptions)` | `AuraMaterialSpec` | |
|
|
96
|
+
| `material.pbr(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
97
|
+
| `material.physical(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
98
|
+
| `material.emissive(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
99
|
+
| `material.metal(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
100
|
+
| `material.rubber(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
101
|
+
| `material.glass(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
102
|
+
| `material.clearcoat(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
103
|
+
| `material.neon(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
104
|
+
| `material.reflectiveFloor(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
105
|
+
| `material.solarSun(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
106
|
+
| `material.solarCorona(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
107
|
+
| `material.fabric(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
108
|
+
| `material.chrome(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
109
|
+
| `material.brushedMetal(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
110
|
+
| `material.frostedGlass(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
111
|
+
| `material.clearGlass(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
112
|
+
| `material.blackRubber(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
113
|
+
| `material.matteClay(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
114
|
+
| `material.ceramic(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
115
|
+
| `material.glowingEmissive(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
116
|
+
| `material.clearcoatPaint(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
117
|
+
| `material.sneakerMesh(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
118
|
+
| `material.sneakerRubber(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
119
|
+
| `material.felt(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
120
|
+
| `material.lacquer(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
121
|
+
| `material.carPaint(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
122
|
+
| `material.planet(preset?: AuraSolarPlanetMaterialPreset, options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
123
|
+
| `material.atmosphere(options?: AuraMaterialSpec)` | `AuraMaterialSpec` | |
|
|
124
|
+
| `material.proceduralTexture(texture: AuraProceduralTextureKind, options?: Partial<Omit<AuraProceduralTextureSpec, "texture" \| "kind">>)` | `AuraProceduralTextureSpec` | options: scale?: number \| undefined; strength?: number \| undefined; contrast?: number \| undefined; direction?: AuraVec3 \| undefined; colorA?: string \| undefined; colorB?: string \| undefined |
|
|
125
|
+
| `material.proceduralTextures` | `value` | |
|
|
126
|
+
| `material.parameters(name: string, spec: AuraMaterialSpec)` | `AuraEditableMaterialParameters` | |
|
|
127
|
+
| `material.fromParameters(parameters: AuraEditableMaterialParameters)` | `AuraMaterialSpec` | parameters: kind: "aura-material-parameters"; name: string; material: AuraMaterialSpec; roughness: number; metallic: number; metalness: number; transmission: number; clearcoat: number; clearcoatRoughness: number; thickness: number; ior: number; sheen: number; iridescence: number; anisotropy: number; envMapIntensity: number; emissiveIntensity: number |
|
|
128
|
+
| `material.labParameters()` | `readonly AuraEditableMaterialParameters[]` | |
|
|
129
|
+
| `material.presets()` | `Readonly<Record<string, AuraMaterialSpec>>` | |
|
|
130
|
+
| `material.inspector(name: string, spec: AuraMaterialSpec)` | `AuraMaterialInspectorPanel` | |
|
|
131
|
+
| `material.visualQA(nodes: readonly AuraSceneNode[])` | `AuraMaterialVisualQAResult` | |
|
|
132
|
+
| `material.capabilityDiagnostics(input: AuraMaterialCapabilityInput)` | `AuraMaterialCapabilityDiagnostics` | |
|
|
133
|
+
|
|
134
|
+
## `lights`
|
|
135
|
+
|
|
136
|
+
Intensities are not three.js-calibrated; judge a capture.
|
|
137
|
+
|
|
138
|
+
```ts
|
|
139
|
+
void lights.directional({ position: [4, 6, 3], target: [0, 0, 0], intensity: 3, shadow: true });
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
| Call | Returns | Options |
|
|
143
|
+
|---|---|---|
|
|
144
|
+
| `lights.lensFlare(options?: AuraLensFlareOptions)` | `AuraNodeBuilder<AuraSceneNode>` | options: name?: string \| undefined; position?: AuraVec3 \| undefined; light?: string \| undefined; elements?: readonly AuraLensFlareEle…; occlusion?: AuraLensFlareOcclusion \| …; edgeFade?: number \| undefined; intensity?: number \| undefined; runtime?: AuraRuntimeNodeSpec \| und… |
|
|
145
|
+
| `lights.ambient(options?: {…})` | `AuraNodeBuilder<AuraLightNode>` | options: name?: string \| undefined; intensity?: number \| undefined; color?: string \| undefined |
|
|
146
|
+
| `lights.hemisphere(options?: {…})` | `AuraNodeBuilder<AuraLightNode>` | options: name?: string \| undefined; skyColor?: string \| undefined; groundColor?: string \| undefined; intensity?: number \| undefined; position?: AuraVec3 \| undefined |
|
|
147
|
+
| `lights.lightProbe(options?: {…})` | `AuraNodeBuilder<AuraLightNode>` | options: name?: string \| undefined; sh?: readonly number[] \| undef…; skyColor?: string \| undefined; groundColor?: string \| undefined; intensity?: number \| undefined; position?: AuraVec3 \| undefined |
|
|
148
|
+
| `lights.directional(options?: {…})` | `AuraNodeBuilder<AuraLightNode>` | options: name?: string \| undefined; position?: AuraVec3 \| undefined; target?: AuraVec3 \| undefined; intensity?: number \| undefined; color?: string \| undefined; shadow?: boolean \| AuraDirectional… |
|
|
149
|
+
| `lights.point(options?: {…})` | `AuraNodeBuilder<AuraLightNode>` | options: name?: string \| undefined; position?: AuraVec3 \| undefined; target?: AuraVec3 \| undefined; intensity?: number \| undefined; power?: number \| undefined; distance?: number \| undefined; decay?: number \| undefined; color?: string \| undefined; shadow?: boolean \| AuraLocalShadow…; photometricProfile?: AuraPhotometricProfile \| … |
|
|
150
|
+
| `lights.spot(options?: {…})` | `AuraNodeBuilder<AuraLightNode>` | options: name?: string \| undefined; position?: AuraVec3 \| undefined; target?: AuraVec3 \| undefined; angle?: number \| undefined; penumbra?: number \| undefined; distance?: number \| undefined; decay?: number \| undefined; intensity?: number \| undefined; power?: number \| undefined; color?: string \| undefined; shadow?: boolean \| AuraLocalShadow…; photometricProfile?: AuraPhotometricProfile \| …; projectedImage?: AuraProjectedLightImage \|… |
|
|
151
|
+
| `lights.studio(options?: {…})` | `AuraNodeBuilder<AuraLightNode>` | options: intensity?: number \| undefined |
|
|
152
|
+
| `lights.rect(options?: {…})` | `AuraNodeBuilder<AuraLightNode>` | options: name?: string \| undefined; position?: AuraVec3 \| undefined; target?: AuraVec3 \| undefined; intensity?: number \| undefined; color?: string \| undefined; width?: number \| undefined; height?: number \| undefined; twoSided?: boolean \| undefined |
|
|
153
|
+
| `lights.rectArea(options?: {…})` | `AuraNodeBuilder<AuraLightNode>` | same as `lights.rect` |
|
|
154
|
+
| `lights.softbox(options?: {…})` | `AuraNodeBuilder<AuraLightNode>` | same as `lights.rect` |
|
|
155
|
+
| `lights.productStudio(options?: {…})` | `AuraNodeBuilder<AuraLightNode>` | same as `lights.studio` |
|
|
156
|
+
| `lights.materialLab(options?: {…})` | `AuraNodeBuilder<AuraLightNode>` | same as `lights.studio` |
|
|
157
|
+
|
|
158
|
+
## `environments`
|
|
159
|
+
|
|
160
|
+
Image-based light. Without one, authored lights render flat and metals render dark.
|
|
161
|
+
|
|
162
|
+
```ts
|
|
163
|
+
void environments.neutral({ intensity: 0.8, background: false });
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
| Call | Returns | Options |
|
|
167
|
+
|---|---|---|
|
|
168
|
+
| `environments.outdoor(options?: {…})` | `WorldEnvBuilderOut` | options: texture?: AuraAssetRef<"texture", s…; name?: string \| undefined; intensity?: number \| undefined; color?: string \| undefined; reflectionTexture?: AuraAssetRef<"texture", s…; rotation?: number \| undefined; biome?: OutdoorBiome \| undefined |
|
|
169
|
+
| `environments.room(options?: {…})` | `WorldEnvBuilderOut` | options: texture?: AuraAssetRef<"texture", s…; name?: string \| undefined; intensity?: number \| undefined; color?: string \| undefined; reflectionTexture?: AuraAssetRef<"texture", s…; rotation?: number \| undefined; colorTemperatureK?: number \| undefined |
|
|
170
|
+
| `environments.space(options?: Partial<Omit<AuraEnvironmentNode, "environment" \| "kind">>)` | `WorldEnvBuilderOut` | options: texture?: AuraAssetRef<"texture", s…; name?: string \| undefined; intensity?: number \| undefined; color?: string \| undefined; reflectionTexture?: AuraAssetRef<"texture", s…; rotation?: number \| undefined |
|
|
171
|
+
| `environments.underwater(options?: Partial<Omit<AuraEnvironmentNode, "environment" \| "kind">>)` | `WorldEnvBuilderOut` | same as `environments.space` |
|
|
172
|
+
| `environments.preset(name: AuraEnvironmentPresetName, options?: AuraEnvironmentOptionsV2)` | `AuraNodeBuilder<AuraEnvironmentNode>` | options: name?: string \| undefined; intensity?: number \| undefined; diffuseIntensity?: number \| undefined; specularIntensity?: number \| undefined; rotation?: number \| undefined; background?: boolean \| AuraEnvironment…; color?: string \| undefined |
|
|
173
|
+
| `environments.neutral(options?: AuraEnvironmentOptionsV2)` | `AuraNodeBuilder<AuraEnvironmentNode>` | same as `environments.preset` |
|
|
174
|
+
| `environments.none(options?: {…})` | `AuraNodeBuilder<AuraEnvironmentNode>` | options: name?: string \| undefined |
|
|
175
|
+
| `environments.capture(options?: {…})` | `AuraNodeBuilder<AuraEnvironmentNode>` | options: name?: string \| undefined; intensity?: number \| undefined; diffuseIntensity?: number \| undefined; specularIntensity?: number \| undefined; rotation?: number \| undefined; background?: boolean \| AuraEnvironment…; color?: string \| undefined; position?: AuraVec3 \| undefined; resolution?: 64 \| 128 \| 256 \| undefined; update?: "once" \| "on-demand" \| { …; include?: "all" \| "sky-only" \| unde… |
|
|
176
|
+
| `environments.hdri(options: {…})` | `AuraNodeBuilder<AuraEnvironmentNode>` | options: name?: string \| undefined; intensity?: number \| undefined; diffuseIntensity?: number \| undefined; specularIntensity?: number \| undefined; rotation?: number \| undefined; background?: boolean \| AuraEnvironment…; color?: string \| undefined; texture: AuraAssetRef<"texture">; reflectionTexture?: AuraAssetRef<"texture"> \|… |
|
|
177
|
+
| `environments.studio(options?: AuraEnvironmentOptionsV2)` | `AuraNodeBuilder<AuraEnvironmentNode>` | same as `environments.preset` |
|
|
178
|
+
| `environments.materialLab(options?: AuraEnvironmentOptionsV2)` | `AuraNodeBuilder<AuraEnvironmentNode>` | same as `environments.preset` |
|
|
179
|
+
| `environments.productHero(options?: AuraEnvironmentOptionsV2)` | `AuraNodeBuilder<AuraEnvironmentNode>` | same as `environments.preset` |
|
|
180
|
+
| `environments.nightCinematic(options?: AuraEnvironmentOptionsV2)` | `AuraNodeBuilder<AuraEnvironmentNode>` | same as `environments.preset` |
|
|
181
|
+
| `environments.metalStudio(options?: AuraEnvironmentOptionsV2)` | `AuraNodeBuilder<AuraEnvironmentNode>` | same as `environments.preset` |
|
|
182
|
+
| `environments.glassStudio(options?: AuraEnvironmentOptionsV2)` | `AuraNodeBuilder<AuraEnvironmentNode>` | same as `environments.preset` |
|
|
183
|
+
| `environments.presets()` | `readonly AuraEnvironmentMapPreset[]` | |
|
|
184
|
+
| `environments.forMaterial(materialClass: "metal" \| "glass" \| "studio" \| "product")` | `AuraNodeBuilder<AuraEnvironmentNode>` | |
|
|
185
|
+
|
|
186
|
+
## `sky`
|
|
187
|
+
|
|
188
|
+
Procedural sky; `app.atmosphere?.setSky({ sun })` moves the sun live.
|
|
189
|
+
|
|
190
|
+
```ts
|
|
191
|
+
void sky.preetham({ sun: { elevationDeg: 35, azimuthDeg: 120 } });
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
| Call | Returns | Options |
|
|
195
|
+
|---|---|---|
|
|
196
|
+
| `sky.preetham(options: AuraSkyPreethamOptions)` | `AuraNodeBuilder<AuraSceneNode>` | options: moon?: unknown; groundColor?: string \| undefined; sun: AuraSkySunSpec; turbidity?: number \| undefined; rayleigh?: number \| undefined; mieCoefficient?: number \| undefined; mieDirectionalG?: number \| undefined; exposure?: number \| undefined; stars?: AuraSkyStarsOptions \| und…; clouds?: AuraSkyCloudsOptions \| un…; name?: string \| undefined; captureEnvironment?: boolean \| undefined; affectsFog?: boolean \| undefined |
|
|
197
|
+
| `sky.gradient(options: AuraSkyGradientOptions)` | `AuraNodeBuilder<AuraSceneNode>` | options: moon?: unknown; intensity?: number \| undefined; clouds?: AuraSkyCloudsOptions \| un…; sun?: AuraSkySunSpec \| undefined; zenith: string; horizon: string; ground?: string \| undefined; exponent?: number \| undefined; horizonGlow?: number \| undefined; bands?: readonly AuraSkyBand[] \| …; stars?: AuraSkyStarsOptions \| und…; name?: string \| undefined; captureEnvironment?: boolean \| undefined; affectsFog?: boolean \| undefined |
|
|
198
|
+
| `sky.hdri(options: {…})` | `AuraNodeBuilder<AuraSceneNode>` | options: texture: AuraAssetRef<"texture">; intensity?: number \| undefined; rotation?: number \| undefined; blurriness?: number \| undefined; name?: string \| undefined; captureEnvironment?: boolean \| undefined; affectsFog?: boolean \| undefined |
|
|
199
|
+
| `sky.dayNight(options?: {…})` | `{ readonly nodes: readonly AuraSceneNode[]; readonly background: stri…` | options: hour?: number \| undefined; seed?: number \| undefined; starCount?: number \| undefined; cloudCellCount?: number \| undefined; starLimit?: number \| undefined; cloudLimit?: number \| undefined; model?: "preetham" \| "gradient" \|… |
|
|
200
|
+
|
|
201
|
+
## `primitives`
|
|
202
|
+
|
|
203
|
+
Unit shapes scaled by `size` (sphere = diameter, plane = `[w, 1, d]`).
|
|
204
|
+
|
|
205
|
+
```ts
|
|
206
|
+
void primitives.cylinder({ name: "plinth", size: [2, 0.9, 2], material: material.pbr({ color: "#f7f8fa" }) });
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
| Call | Returns | Options |
|
|
210
|
+
|---|---|---|
|
|
211
|
+
| `primitives.box(options: AuraPrimitiveOptions \| undefined)` | `AuraNodeBuilder<AuraPrimitiveNode>` | options: name?: string \| undefined; material?: AuraMaterialSpec \| undefi…; size?: number \| AuraVec3 \| undef…; castShadow?: boolean \| undefined; receiveShadow?: boolean \| undefined; physics?: AuraNodePhysicsSpec \| und…; instances?: readonly AuraTransformSpe…; instanceColors?: readonly string[] \| undef…; geometry?: AuraCustomGeometrySpec \| …; text3D?: Omit<AuraText3DGeometry, …; lod?: AuraRootLodSpec \| undefin…; params?: AuraPrimitiveParams \| und…; position?: AuraVec3 \| undefined; pivot?: AuraVec3 \| undefined; rotation?: Aur… |
|
|
212
|
+
| `primitives.sphere(options: AuraPrimitiveOptions \| undefined)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `primitives.box` |
|
|
213
|
+
| `primitives.plane(options: AuraPrimitiveOptions \| undefined)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `primitives.box` |
|
|
214
|
+
| `primitives.cylinder(options: AuraPrimitiveOptions \| undefined)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `primitives.box` |
|
|
215
|
+
| `primitives.capsule(options: AuraPrimitiveOptions \| undefined)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `primitives.box` |
|
|
216
|
+
| `primitives.torus(options: AuraPrimitiveOptions \| undefined)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `primitives.box` |
|
|
217
|
+
| `primitives.cone(options: AuraPrimitiveOptions \| undefined)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `primitives.box` |
|
|
218
|
+
| `primitives.circle(options: AuraPrimitiveOptions \| undefined)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `primitives.box` |
|
|
219
|
+
| `primitives.ring(options: AuraPrimitiveOptions \| undefined)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `primitives.box` |
|
|
220
|
+
| `primitives.tube(options: AuraPrimitiveOptions \| undefined)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `primitives.box` |
|
|
221
|
+
| `primitives.lathe(options: AuraPrimitiveOptions \| undefined)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `primitives.box` |
|
|
222
|
+
| `primitives.extrude(options: AuraPrimitiveOptions \| undefined)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `primitives.box` |
|
|
223
|
+
| `primitives.shape(options: AuraPrimitiveOptions \| undefined)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `primitives.box` |
|
|
224
|
+
| `primitives.torusKnot(options: AuraPrimitiveOptions \| undefined)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `primitives.box` |
|
|
225
|
+
| `primitives.polyhedron(options: AuraPrimitiveOptions \| undefined)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `primitives.box` |
|
|
226
|
+
| `primitives.roundedBox(options: AuraPrimitiveOptions \| undefined)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `primitives.box` |
|
|
227
|
+
|
|
228
|
+
## `effects`
|
|
229
|
+
|
|
230
|
+
Post effects, fog and particle emitters as scene nodes.
|
|
231
|
+
|
|
232
|
+
```ts
|
|
233
|
+
void effects.bloom({ intensity: 0.7, threshold: 0.75, radius: 0.55 });
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
| Call | Returns | Options |
|
|
237
|
+
|---|---|---|
|
|
238
|
+
| `effects.contactShadows(options?: AuraContactShadowOptions)` | `AuraNodeBuilder<AuraEffectNode>` | options: length?: number \| undefined; thickness?: number \| undefined; steps?: 8 \| 12 \| 16 \| undefined; intensity?: number \| undefined; lights?: "sun" \| "shadowed" \| unde… |
|
|
239
|
+
| `effects.toon(options?: AuraToonOptions)` | `AuraCustomPostPass` | options: name?: string \| undefined; bands?: number \| undefined; bandMix?: number \| undefined; outline?: number \| undefined; ink?: readonly [number, number,…; edgeStart?: number \| undefined; edgeEnd?: number \| undefined; size?: readonly [number, number]…; order?: AuraPostPassOrder \| undef…; inkSource?: AuraToonInkSource \| undef…; fadeDistance?: number \| undefined; inkColor?: string \| undefined |
|
|
240
|
+
| `effects.pixelation(options?: AuraPixelationOptions)` | `AuraNodeBuilder<AuraEffectNode>` | options: size?: number \| undefined; name?: string \| undefined |
|
|
241
|
+
| `effects.halftone(options?: AuraScreenPatternOptions)` | `AuraNodeBuilder<AuraEffectNode>` | options: angle?: number \| undefined; strength?: number \| undefined; size?: number \| undefined; name?: string \| undefined |
|
|
242
|
+
| `effects.dotScreen(options?: AuraScreenPatternOptions)` | `AuraNodeBuilder<AuraEffectNode>` | same as `effects.halftone` |
|
|
243
|
+
| `effects.glitch(options?: AuraGlitchOptions)` | `AuraNodeBuilder<AuraEffectNode>` | options: intensity?: number \| undefined; seed?: number \| undefined; name?: string \| undefined |
|
|
244
|
+
| `effects.transition(options: AuraTransitionOptions)` | `AuraNodeBuilder<AuraEffectNode>` | options: texture: AuraTextureRef; progress?: number \| undefined; name?: string \| undefined |
|
|
245
|
+
| `effects.lensDirt(options: AuraLensDirtOptions)` | `AuraNodeBuilder<AuraEffectNode>` | options: texture: AuraTextureRef; intensity?: number \| undefined; name?: string \| undefined |
|
|
246
|
+
| `effects.mask(options: AuraPostMaskOptions)` | `AuraNodeBuilder<AuraEffectNode>` | options: texture: AuraTextureRef; invert?: boolean \| undefined; opacity?: number \| undefined; name?: string \| undefined |
|
|
247
|
+
| `effects.clearMask(options?: AuraNativePostBaseOptions)` | `AuraNodeBuilder<AuraEffectNode>` | options: name?: string \| undefined |
|
|
248
|
+
| `effects.afterimage(options?: AuraAfterimageOptions)` | `AuraNodeBuilder<AuraEffectNode>` | options: decay?: number \| undefined; name?: string \| undefined |
|
|
249
|
+
| `effects.bloom(options?: BloomBuilderOptions)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
250
|
+
| `effects.neonBloom(options?: Omit<AuraEffectNode, "kind" \| "effect">)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
251
|
+
| `effects.ambientOcclusion(options?: Omit<AuraEffectNode, "kind" \| "effect">)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
252
|
+
| `effects.contactOcclusion(options?: Omit<AuraEffectNode, "kind" \| "effect">)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
253
|
+
| `effects.colorGrade(options?: AuraColorGradeOptions)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
254
|
+
| `effects.antiAlias(options?: Omit<AuraEffectNode, "kind" \| "effect">)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
255
|
+
| `effects.vignette(options?: PostV3EffectOptions)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
256
|
+
| `effects.filmGrain(options?: PostV3EffectOptions)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
257
|
+
| `effects.chromaticAberration(options?: PostV3EffectOptions)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
258
|
+
| `effects.shaderPass(options: AuraShaderPassOptions)` | `AuraCustomPostPass` | options: name?: string \| undefined; glsl?: string \| undefined; wgsl?: string \| undefined; fragment?: { readonly glsl?: string;…; uniforms?: Readonly<Record<string, n…; inputs?: readonly ("normal" \| "col…; insertAt?: PostInsertAt \| undefined; order?: AuraPostPassOrder \| undef…; enabled?: boolean \| undefined |
|
|
259
|
+
| `effects.fog(options?: FogNodeOptions)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
260
|
+
| `effects.cinematicBloom(options?: Omit<AuraEffectNode, "kind" \| "effect">)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
261
|
+
| `effects.volumetricFog(options?: AuraVolumetricFogOptions)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
262
|
+
| `effects.depthFog(options?: Omit<AuraEffectNode, "kind" \| "effect">)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
263
|
+
| `effects.outline(options?: AuraOutlineOptions)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
264
|
+
| `effects.screenSpaceReflections(options?: AuraScreenSpaceReflectionsOptions)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
265
|
+
| `effects.depthOfField(options?: AuraDepthOfFieldOptions)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
266
|
+
| `effects.motionBlur(options?: Omit<AuraEffectNode, "kind" \| "effect">)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
267
|
+
| `effects.rain(options?: AuraWeatherEffectOptions)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
268
|
+
| `effects.snow(options?: AuraWeatherEffectOptions)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
269
|
+
| `effects.flipbook(options?: {…})` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
270
|
+
| `effects.beam(options?: Omit<AuraEffectNode, "kind" \| "effect">)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
271
|
+
| `effects.particles(options?: {…})` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
272
|
+
| `effects.trail(options?: VfxNodeOptions)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
273
|
+
| `effects.lightCone(options?: VfxNodeOptions)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
274
|
+
| `effects.auroraRibbon(options?: VfxNodeOptions)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
275
|
+
| `effects.meshParticles(options?: VfxNodeOptions)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
276
|
+
| `effects.fogVolume(options?: AuraFogVolumeOptions)` | `AuraNodeBuilder<AuraEffectNode>` | |
|
|
277
|
+
|
|
278
|
+
## `instances`
|
|
279
|
+
|
|
280
|
+
One draw call per node. Instance colour multiplies the material colour.
|
|
281
|
+
|
|
282
|
+
```ts
|
|
283
|
+
void instances.cone({ name: "pines", transforms: [{ position: [0, 1, 0], scale: [2, 3, 2] }], colors: ["#2f6b34"], material: material.pbr({ color: "#ffffff" }) });
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
| Call | Returns | Options |
|
|
287
|
+
|---|---|---|
|
|
288
|
+
| `instances.box(options: AuraInstancedPrimitiveOptions)` | `AuraNodeBuilder<AuraPrimitiveNode>` | options: name?: string \| undefined; material?: AuraMaterialSpec \| undefi…; size?: number \| AuraVec3 \| undef…; castShadow?: boolean \| undefined; receiveShadow?: boolean \| undefined; physics?: AuraNodePhysicsSpec \| und…; instances?: readonly AuraTransformSpe…; instanceColors?: readonly string[] \| undef…; geometry?: AuraCustomGeometrySpec \| …; text3D?: Omit<AuraText3DGeometry, …; lod?: AuraRootLodSpec \| undefin…; params?: AuraPrimitiveParams \| und…; position?: AuraVec3 \| undefined; pivot?: AuraVec3 \| undefined; rotation?: Aur… |
|
|
289
|
+
| `instances.sphere(options: AuraInstancedPrimitiveOptions)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `instances.box` |
|
|
290
|
+
| `instances.plane(options: AuraInstancedPrimitiveOptions)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `instances.box` |
|
|
291
|
+
| `instances.cylinder(options: AuraInstancedPrimitiveOptions)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `instances.box` |
|
|
292
|
+
| `instances.capsule(options: AuraInstancedPrimitiveOptions)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `instances.box` |
|
|
293
|
+
| `instances.torus(options: AuraInstancedPrimitiveOptions)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `instances.box` |
|
|
294
|
+
| `instances.cone(options: AuraInstancedPrimitiveOptions)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `instances.box` |
|
|
295
|
+
| `instances.circle(options: AuraInstancedPrimitiveOptions)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `instances.box` |
|
|
296
|
+
| `instances.ring(options: AuraInstancedPrimitiveOptions)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `instances.box` |
|
|
297
|
+
| `instances.tube(options: AuraInstancedPrimitiveOptions)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `instances.box` |
|
|
298
|
+
| `instances.lathe(options: AuraInstancedPrimitiveOptions)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `instances.box` |
|
|
299
|
+
| `instances.extrude(options: AuraInstancedPrimitiveOptions)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `instances.box` |
|
|
300
|
+
| `instances.shape(options: AuraInstancedPrimitiveOptions)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `instances.box` |
|
|
301
|
+
| `instances.torusKnot(options: AuraInstancedPrimitiveOptions)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `instances.box` |
|
|
302
|
+
| `instances.polyhedron(options: AuraInstancedPrimitiveOptions)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `instances.box` |
|
|
303
|
+
| `instances.roundedBox(options: AuraInstancedPrimitiveOptions)` | `AuraNodeBuilder<AuraPrimitiveNode>` | same as `instances.box` |
|
|
304
|
+
| `instances.mesh(geometry: AuraBatchedGeometryInput, material: AuraMaterialSpec \| undefined, count: number)` | `AuraInstancedMeshHandle` | |
|
|
305
|
+
| `instances.custom(spec: AuraCustomGeometrySpec, options: Omit<AuraInstancedPrimitiveOptions, "geometry">)` | `AuraNodeBuilder<AuraPrimitiveNode>` | spec: kind: "aura-custom-geometry"; positions: AuraVec3Attribute; normals?: AuraVec3Attribute \| undef…; uvs?: AuraVec2Attribute \| undef…; uv1s?: AuraVec2Attribute \| undef…; colors?: readonly string[] \| reado…; indices: AuraIndexAttribute; attributes?: Readonly<Record<string, A…; bounds?: { readonly min: AuraRootV…; groups?: readonly AuraGeometryGrou…; drawRange?: AuraGeometryDrawRangeSpec…; morphTargets?: readonly AuraGeometryMorp…; topology?: "triangles" \| "lines" \| "…; dynamic?: boolean \| undefined |
|
|
306
|
+
| `instances.model(asset: TAsset, options: {…})` (+1 overloads) | `AuraNodeBuilder<AuraGroupNode>` | options: name?: string \| undefined; material?: AuraMaterialSpec \| undefi…; castShadow?: boolean \| undefined; receiveShadow?: boolean \| undefined; visible?: boolean \| undefined; role?: AuraModelRole \| undefined; scaleMode?: AuraModelScaleMode \| unde…; targetHeight?: number \| undefined; targetMaxDimension?: number \| undefined; targetLength?: number \| undefined; physics?: AuraNodePhysicsSpec \| und…; hiddenNodeNames?: readonly string[] \| undef…; materialOverrides?: readonly AuraModelMateria…; variant?: string \| undefined; lod?… |
|
|
307
|
+
|
|
308
|
+
## `geometry`
|
|
309
|
+
|
|
310
|
+
`define` builds the spec; mount it with `geometry.custom(spec, { material })`.
|
|
311
|
+
|
|
312
|
+
```ts
|
|
313
|
+
void geometry.define({ positions: new Float32Array(9), indices: [0, 1, 2], bounds: { min: [0, 0, 0], max: [1, 1, 1] } });
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
| Call | Returns | Options |
|
|
317
|
+
|---|---|---|
|
|
318
|
+
| `geometry.define(spec: Omit<AuraCustomGeometrySpec, "kind">)` | `AuraCustomGeometrySpec` | spec: colors?: readonly string[] \| reado…; positions: AuraVec3Attribute; normals?: AuraVec3Attribute \| undef…; uvs?: AuraVec2Attribute \| undef…; uv1s?: AuraVec2Attribute \| undef…; indices: AuraIndexAttribute; attributes?: Readonly<Record<string, A…; bounds?: { readonly min: AuraRootV…; groups?: readonly AuraGeometryGrou…; drawRange?: AuraGeometryDrawRangeSpec…; morphTargets?: readonly AuraGeometryMorp…; topology?: "triangles" \| "lines" \| "…; dynamic?: boolean \| undefined |
|
|
319
|
+
| `geometry.custom(spec: AuraCustomGeometrySpec, options?: Omit<AuraPrimitiveOptions, "geometry">)` | `AuraNodeBuilder<AuraPrimitiveNode>` | spec: kind: "aura-custom-geometry"; positions: AuraVec3Attribute; normals?: AuraVec3Attribute \| undef…; uvs?: AuraVec2Attribute \| undef…; uv1s?: AuraVec2Attribute \| undef…; colors?: readonly string[] \| reado…; indices: AuraIndexAttribute; attributes?: Readonly<Record<string, A…; bounds?: { readonly min: AuraRootV…; groups?: readonly AuraGeometryGrou…; drawRange?: AuraGeometryDrawRangeSpec…; morphTargets?: readonly AuraGeometryMorp…; topology?: "triangles" \| "lines" \| "…; dynamic?: boolean \| undefined |
|
|
320
|
+
| `geometry.dynamic(spec: {…})` | `AuraCustomGeometrySpec` | spec: positions: AuraVec3Attribute; normals?: AuraVec3Attribute \| undef…; uvs?: AuraVec2Attribute \| undef…; uv1s?: AuraVec2Attribute \| undef…; colors?: readonly string[] \| reado…; indices?: AuraIndexAttribute \| unde…; attributes?: Readonly<Record<string, A…; topology?: "triangles" \| "points" \| …; groups?: readonly AuraGeometryGrou…; drawRange?: AuraGeometryDrawRangeSpec…; morphTargets?: readonly AuraGeometryMorp…; bounds?: { readonly min: AuraRootV… |
|
|
321
|
+
| `geometry.computeBounds(spec: {…})` | `{ readonly min: AuraRootVec3; readonly max: AuraRootVec3; }` | spec: positions: AuraVec3Attribute |
|
|
322
|
+
| `geometry.computeNormals(spec: {…})` | `Float32Array<ArrayBufferLike>` | spec: positions: AuraVec3Attribute; indices?: AuraIndexAttribute \| unde…; topology?: "triangles" \| "lines" \| "… |
|
|
323
|
+
| `geometry.applyMatrix4(spec: AuraCustomGeometrySpec, matrix: readonly number[])` | `AuraCustomGeometrySpec` | same as `geometry.custom` |
|
|
324
|
+
| `geometry.buildUVAtlas(input: UVAtlasGeometry, options: UVAtlasOptions)` | `UVAtlasResult` | input: kind: "aura-custom-geometry"; positions: AuraVec3Attribute; normals?: AuraVec3Attribute \| undef…; uvs?: AuraVec2Attribute \| undef…; uv1s?: AuraVec2Attribute \| undef…; colors?: readonly string[] \| reado…; indices: AuraIndexAttribute; attributes?: Readonly<Record<string, A…; bounds?: { readonly min: AuraRootV…; groups?: readonly AuraGeometryGrou…; drawRange?: AuraGeometryDrawRangeSpec…; morphTargets?: readonly AuraGeometryMorp…; topology?: "triangles" \| "lines" \| "…; dynamic?: boolean \| undefined |
|
|
325
|
+
| `geometry.edges(source: AuraCustomGeometrySpec, thresholdAngle?: number)` | `AuraCustomGeometrySpec` | source: kind: "aura-custom-geometry"; positions: AuraVec3Attribute; normals?: AuraVec3Attribute \| undef…; uvs?: AuraVec2Attribute \| undef…; uv1s?: AuraVec2Attribute \| undef…; colors?: readonly string[] \| reado…; indices: AuraIndexAttribute; attributes?: Readonly<Record<string, A…; bounds?: { readonly min: AuraRootV…; groups?: readonly AuraGeometryGrou…; drawRange?: AuraGeometryDrawRangeSpec…; morphTargets?: readonly AuraGeometryMorp…; topology?: "triangles" \| "lines" \| "…; dynamic?: boolean \| undefined |
|
|
326
|
+
| `geometry.wireframe(source: AuraCustomGeometrySpec)` | `AuraCustomGeometrySpec` | same as `geometry.edges` |
|
|
327
|
+
| `geometry.convex(points: readonly ConvexPointInput[])` | `AuraCustomGeometrySpec` | |
|
|
328
|
+
| `geometry.toNonIndexed(source: AuraCustomGeometrySpec)` | `AuraCustomGeometrySpec` | same as `geometry.edges` |
|
|
329
|
+
| `geometry.merge(specs: readonly AuraCustomGeometrySpec[])` | `AuraCustomGeometrySpec` | |
|
|
330
|
+
| `geometry.splitGroups(source: AuraCustomGeometrySpec)` | `readonly { readonly materialIndex: number; readonly geometry: AuraCus…` | same as `geometry.edges` |
|
|
331
|
+
| `geometry.multiMaterial(source: AuraCustomGeometrySpec, materials: readonly AuraMaterialSpec[], options?: {…})` | `AuraNodeBuilder<AuraGroupNode>` | same as `geometry.edges` |
|
|
332
|
+
|
|
333
|
+
## `interactions`
|
|
334
|
+
|
|
335
|
+
`target` is a node name.
|
|
336
|
+
|
|
337
|
+
```ts
|
|
338
|
+
void interactions.orbit({ target: "crate" });
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
| Call | Returns | Options |
|
|
342
|
+
|---|---|---|
|
|
343
|
+
| `interactions.orbit(options: AuraOrbitOptions \| undefined)` (+1 overloads) | `InteractionBuilder` | options: target?: AuraOrbitTarget \| undefin…; position?: AuraVec3 \| undefined; autoRotate?: number \| boolean \| undefi… |
|
|
344
|
+
| `interactions.pointer(options?: {…})` | `InteractionBuilder` | options: target?: string \| undefined |
|
|
345
|
+
| `interactions.keyboard(options?: {…})` | `InteractionBuilder` | same as `interactions.pointer` |
|
|
346
|
+
| `interactions.hover(options?: {…})` | `InteractionBuilder` | options: target?: string \| undefined; selected?: string \| undefined |
|
|
347
|
+
| `interactions.raycastHover(options?: {…})` | `InteractionBuilder` | same as `interactions.hover` |
|
|
348
|
+
| `interactions.highlight(options?: {…})` | `InteractionBuilder` | same as `interactions.hover` |
|
|
349
|
+
| `interactions.dragVector(options?: {…})` | `InteractionBuilder` | options: target?: string \| undefined; vector?: AuraVec3 \| undefined |
|
|
350
|
+
| `interactions.clickImpulse(options?: {…})` | `InteractionBuilder` | options: target?: string \| undefined; impulse?: number \| undefined; vector?: AuraVec3 \| undefined |
|
|
351
|
+
|
|
352
|
+
## `physics`
|
|
353
|
+
|
|
354
|
+
Rapier-backed worlds, bodies and colliders; see `docs/api/` physics pages before use.
|
|
355
|
+
|
|
356
|
+
```ts
|
|
357
|
+
void physics.box;
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
| Call | Returns | Options |
|
|
361
|
+
|---|---|---|
|
|
362
|
+
| `physics.world(descriptor?: PhysicsWorldDescriptor)` | `AuraPhysicsWorldController` | descriptor: backend?: PhysicsBackendPreference …; gravity?: Vec3 \| undefined; fixedDelta?: number \| undefined; solverIterations?: number \| undefined; enableSleeping?: boolean \| undefined; seed?: number \| undefined; sleepVelocityThreshold?: number \| undefined; sleepDelay?: number \| undefined; continuousCollision?: PhysicsContinuousCollisio… |
|
|
363
|
+
| `physics.worldFromScene(sceneValue: AuraSceneBuilder \| AuraSceneSnapshot, descriptor?: PhysicsWorldDescriptor)` | `AuraPhysicsWorldController` | same as `physics.world` |
|
|
364
|
+
| `physics.body(options?: AuraPhysicsBodyOptions)` | `AuraPhysicsBodyOptions` | options: type?: RigidBodyType \| undefined; position?: Vec3 \| undefined; rotation?: Quat \| undefined; velocity?: Vec3 \| undefined; angularVelocity?: Vec3 \| undefined; mass?: number \| undefined; inertia?: Vec3 \| undefined; linearDamping?: number \| undefined; angularDamping?: number \| undefined; restitution?: number \| undefined; friction?: number \| undefined; sleeping?: boolean \| undefined; shape?: PhysicsShape \| undefined; sensor?: boolean \| undefined; material?: Partial<ColliderMaterial>…; filter?: Partial<CollisionFilter> … |
|
|
365
|
+
| `physics.collider(descriptor: ColliderDescriptor)` | `ColliderDescriptor` | descriptor: shape: PhysicsShape; sensor?: boolean \| undefined; filter?: Partial<CollisionFilter> …; material?: Partial<ColliderMaterial>… |
|
|
366
|
+
| `physics.box(x?: number, y?: number, z?: number)` | `PhysicsShape` | |
|
|
367
|
+
| `physics.sphere(radius?: number)` | `PhysicsShape` | |
|
|
368
|
+
| `physics.capsule(radius?: number, halfHeight?: number)` | `PhysicsShape` | |
|
|
369
|
+
| `physics.plane(normal?: AuraVec3, constant?: number)` | `PhysicsShape` | |
|
|
370
|
+
| `physics.constraint(descriptor: ConstraintDescriptor)` | `ConstraintDescriptor` | descriptor: type: ConstraintType; bodyA: RigidBody; bodyB: RigidBody; localAnchorA?: Vec3 \| undefined; localAnchorB?: Vec3 \| undefined; restLength?: number \| undefined; stiffness?: number \| undefined; axis?: Vec3 \| undefined; damping?: number \| undefined; motorSpeed?: number \| undefined; maxMotorTorque?: number \| undefined; limits?: readonly [number, number]… |
|
|
371
|
+
| `physics.step(world: AuraPhysicsWorldController, options: number \| AuraPhysicsStepOptions \| undefined)` | `readonly CollisionEvent[]` | |
|
|
372
|
+
| `physics.raycast(world: AuraPhysicsWorldController, origin: AuraVec3, direction: AuraVec3, options: RaycastOptions \| undefined)` | `RaycastHit \| undefined` | options: maxDistance?: number \| undefined; mask?: number \| undefined; includeSensors?: boolean \| undefined; includeBackfaces?: boolean \| undefined; ignoreColliders?: readonly number[] \| undef…; ignoreBodies?: readonly number[] \| undef… |
|
|
373
|
+
|
|
374
|
+
## `AnimationController`
|
|
375
|
+
|
|
376
|
+
Clip playback and crossfades for rigged GLBs. Procedural joints are runtime handles instead (recipe 8).
|
|
377
|
+
|
|
378
|
+
```ts
|
|
379
|
+
void AnimationController;
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
| Call | Returns | Options |
|
|
383
|
+
|---|---|---|
|
|
384
|
+
| `AnimationController#on(type: K, listener: Listener<AuraAnimationControllerEventMap<TClipId, TEvent>[K]>)` | `AnimationClipEventUnsubscribe` | |
|
|
385
|
+
| `AnimationController#once(type: K, listener: Listener<AuraAnimationControllerEventMap<TClipId, TEvent>[K]>)` | `AnimationClipEventUnsubscribe` | |
|
|
386
|
+
| `AnimationController#registerClip(definition: AuraNamedAnimationClipDefinition<TClipId, TEvent>)` | `AuraRegisteredAnimationClip<TClipId, TEvent>` | definition: layer?: string \| undefined; tracks?: readonly AnimationClipTra…; layerMetadata?: AuraAnimationLayerMetadat…; requiredBones?: readonly string[] \| undef…; bones?: readonly string[] \| undef…; rootMotion?: AuraAnimationRootMotionMe…; suppressRootMotion?: boolean \| undefined; restartFromFrameZero?: boolean \| undefined; attack?: boolean \| undefined; eventSource?: string \| undefined; retarget?: AuraAnimationRetargetBind…; externalHumanoidLibrary?: AuraExternalHumanoidAnima…; pose?: AnimationPose \| undefined; fallbackPose… |
|
|
387
|
+
| `AnimationController#play(clipId: TClipId, options?: AuraAnimationPlayOptions<TClipId>)` | `AuraAnimationClipPlaybackState<TClipId>` | options: id?: string \| undefined; restart?: boolean \| undefined; exclusive?: boolean \| undefined; loop?: boolean \| AnimationLoopMo…; speed?: number \| undefined; weight?: number \| undefined; layer?: string \| undefined; startTime?: number \| undefined; fadeIn?: number \| undefined; paused?: boolean \| undefined; direction?: AnimationPlaybackDirectio…; metadata?: Record<string, unknown> \|…; fallbackClipId?: TClipId \| undefined; suppressRootMotion?: boolean \| undefined; restartFromFrameZero?: boolean \| undefined; attack?: boolean… |
|
|
388
|
+
| `AnimationController#pause(clipId: TClipId \| undefined)` | `void` | |
|
|
389
|
+
| `AnimationController#resume(clipId: TClipId \| undefined)` | `void` | |
|
|
390
|
+
| `AnimationController#restart(clipId: TClipId \| undefined, options?: AuraAnimationPlayOptions<TClipId>)` | `AuraAnimationClipPlaybackState<TClipId>` | same as `AnimationController#play` |
|
|
391
|
+
| `AnimationController#stop(clipId: TClipId \| undefined, options?: AuraAnimationStopOptions)` | `void` | options: fadeOut?: number \| undefined |
|
|
392
|
+
| `AnimationController#crossFade(toClipId: TClipId, duration: number, options?: AuraAnimationCrossFadeOptions<TClipId>)` | `AuraAnimationClipPlaybackState<TClipId>` | options: fromClipId?: TClipId \| undefined; fromLayer?: string \| undefined; id?: string \| undefined; restart?: boolean \| undefined; exclusive?: boolean \| undefined; loop?: boolean \| AnimationLoopMo…; speed?: number \| undefined; weight?: number \| undefined; layer?: string \| undefined; startTime?: number \| undefined; fadeIn?: number \| undefined; paused?: boolean \| undefined; direction?: AnimationPlaybackDirectio…; metadata?: Record<string, unknown> \|…; fallbackClipId?: TClipId \| undefined; suppressRootMotion?: boolean \| undef… |
|
|
393
|
+
| `AnimationController#setLayerWeight(layer: string, weight: number)` | `AnimationController<TClipId, TEvent>` | |
|
|
394
|
+
| `AnimationController#update(dt: number)` | `AuraAnimationControllerSnapshot<TClipId>` | |
|
|
395
|
+
| `AnimationController#scrub(time: number, options: AuraAnimationScrubOptions<TClipId> \| undefined)` (+1 overloads) | `AuraAnimationPoseSnapshot<TClipId>` | options: clipId?: TClipId \| undefined; emitEvents?: boolean \| undefined; play?: boolean \| undefined; createIfMissing?: boolean \| undefined; layer?: string \| undefined; suppressRootMotion?: boolean \| undefined |
|
|
396
|
+
| `AnimationController#state(clipId: TClipId \| undefined)` | `AuraAnimationClipPlaybackState<TClipId> \| undefined` | |
|
|
397
|
+
| `AnimationController#listClips()` | `readonly AuraRegisteredAnimationClip<TClipId, TEvent>[]` | |
|
|
398
|
+
| `AnimationController#dispose()` | `void` | |
|
|
399
|
+
|
|
400
|
+
## `createFixedStepLoop`
|
|
401
|
+
|
|
402
|
+
Deterministic simulation loop for games.
|
|
403
|
+
|
|
404
|
+
```ts
|
|
405
|
+
void createFixedStepLoop({ stepSeconds: 1 / 60, step: () => undefined, render: () => undefined });
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
| Call | Returns | Options |
|
|
409
|
+
|---|---|---|
|
|
410
|
+
| `createFixedStepLoop(options: FixedStepLoopOptions)` | `FixedStepLoop` | options: step: (stepSeconds: number, ste…; render?: ((frameSeconds: number) =…; stepSeconds?: number \| undefined; maxCatchUpSteps?: number \| undefined; maxFrameSeconds?: number \| undefined; minFrameSeconds?: number \| undefined; manual?: boolean \| undefined; isActive?: (() => boolean) \| undefin…; now?: (() => number) \| undefined; schedule?: ((callback: (nowMs: numbe…; cancel?: ((handle: unknown) => voi… |
|
|
411
|
+
|