@origingame/engine 0.4.0 → 0.5.0

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.
Files changed (78) hide show
  1. package/dist/web/origin-engine.d.ts +8 -5
  2. package/dist/web/origin-engine.js +39 -19
  3. package/dist/web/origin-engine_bg.wasm +0 -0
  4. package/dist/web/origin-engine_bg.wasm.d.ts +6 -5
  5. package/dist/web-publish/origin-engine-lanes.js +49 -29
  6. package/dist/web-publish/origin-engine-lanes_bg.wasm +0 -0
  7. package/dist/web-publish/origin-engine.d.ts +8 -5
  8. package/dist/web-publish/origin-engine.js +39 -19
  9. package/dist/web-publish/origin-engine_bg.wasm +0 -0
  10. package/dist/web-publish/origin-engine_bg.wasm.d.ts +6 -5
  11. package/dist/web-publish-2d/origin-engine-lanes.js +49 -29
  12. package/dist/web-publish-2d/origin-engine-lanes_bg.wasm +0 -0
  13. package/dist/web-publish-2d/origin-engine.d.ts +8 -5
  14. package/dist/web-publish-2d/origin-engine.js +39 -19
  15. package/dist/web-publish-2d/origin-engine_bg.wasm +0 -0
  16. package/dist/web-publish-2d/origin-engine_bg.wasm.d.ts +6 -5
  17. package/knowledge/looks/catalogue.json +123 -2
  18. package/knowledge/package.json +1 -1
  19. package/knowledge/scaffold/origin-engine.json +2 -2
  20. package/knowledge/scaffold/template/package.json +1 -1
  21. package/knowledge/scaffold/template/project.ogt +1 -1
  22. package/knowledge/scripts/validate.ts +69 -6
  23. package/knowledge/skills/og-audio/SKILL.md +31 -5
  24. package/knowledge/skills/og-build/SKILL.md +44 -4
  25. package/knowledge/skills/og-core/SKILL.md +4 -3
  26. package/knowledge/skills/og-feel/SKILL.md +9 -1
  27. package/knowledge/skills/og-game/SKILL.md +199 -16
  28. package/knowledge/skills/og-platform-sdk/SKILL.md +6 -0
  29. package/knowledge/skills/og-taste/SKILL.md +7 -0
  30. package/knowledge/skills/og-ui/SKILL.md +24 -0
  31. package/knowledge/wiki/ai.md +20 -20
  32. package/knowledge/wiki/anim.md +526 -60
  33. package/knowledge/wiki/atmosphere.md +13 -13
  34. package/knowledge/wiki/audio.md +160 -20
  35. package/knowledge/wiki/camera.md +13 -13
  36. package/knowledge/wiki/commands.md +11 -11
  37. package/knowledge/wiki/debug.md +13 -13
  38. package/knowledge/wiki/game.md +8 -8
  39. package/knowledge/wiki/i18n.md +7 -7
  40. package/knowledge/wiki/index.md +25 -1
  41. package/knowledge/wiki/input.md +47 -47
  42. package/knowledge/wiki/load.md +76 -50
  43. package/knowledge/wiki/math.md +102 -102
  44. package/knowledge/wiki/nav.md +34 -34
  45. package/knowledge/wiki/net.md +10 -10
  46. package/knowledge/wiki/path.md +14 -14
  47. package/knowledge/wiki/physics.md +111 -100
  48. package/knowledge/wiki/platform.md +44 -44
  49. package/knowledge/wiki/probe.md +86 -86
  50. package/knowledge/wiki/reflect.md +17 -17
  51. package/knowledge/wiki/render.md +245 -176
  52. package/knowledge/wiki/rng.md +14 -14
  53. package/knowledge/wiki/shapes.md +26 -26
  54. package/knowledge/wiki/stream.md +15 -15
  55. package/knowledge/wiki/system.md +8 -8
  56. package/knowledge/wiki/systems.md +2 -2
  57. package/knowledge/wiki/terrain.md +19 -19
  58. package/knowledge/wiki/tilemap.md +13 -13
  59. package/knowledge/wiki/time.md +4 -4
  60. package/knowledge/wiki/timeline.md +14 -14
  61. package/knowledge/wiki/transform.md +8 -8
  62. package/knowledge/wiki/tween.md +17 -17
  63. package/knowledge/wiki/ui.md +243 -243
  64. package/knowledge/wiki/video.md +5 -5
  65. package/knowledge/wiki/world.md +36 -36
  66. package/package.json +4 -4
  67. package/schema/api.schema.json +639 -11
  68. package/shell/page.ts +4 -0
  69. package/src/generated/abi.ts +3 -0
  70. package/src/index.ts +11 -0
  71. package/src/node/device.ts +5 -2
  72. package/src/node/polish.ts +34 -15
  73. package/src/node/run.ts +23 -6
  74. package/src/runtime.ts +1 -0
  75. package/src/web/gl-state.ts +907 -0
  76. package/src/web/worker.ts +6 -0
  77. package/types/bindings.json +823 -349
  78. package/types/index.d.ts +650 -15
package/types/index.d.ts CHANGED
@@ -153,16 +153,26 @@ export interface ColumnKinds {
153
153
  DofQuality: { readonly array: Uint32Array; readonly stride: 1; readonly value: DofQuality };
154
154
  /** A SpriteBlend field: the variant's index. */
155
155
  SpriteBlend: { readonly array: Uint32Array; readonly stride: 1; readonly value: SpriteBlend };
156
+ /** A SpriteFacing field: the variant's index. */
157
+ SpriteFacing: { readonly array: Uint32Array; readonly stride: 1; readonly value: SpriteFacing };
156
158
  /** A StripBlend field: the variant's index. */
157
159
  StripBlend: { readonly array: Uint32Array; readonly stride: 1; readonly value: StripBlend };
158
160
  /** A Palette handle field (0 is none). */
159
161
  Palette: { readonly array: Uint32Array; readonly stride: 2; readonly value: Palette };
162
+ /**
163
+ * A Look handle field (0 is none): a look og.load.look answered, kept for og.render.applyLook.
164
+ */
165
+ Look: { readonly array: Uint32Array; readonly stride: 2; readonly value: Look };
160
166
  /** A DitherPattern field: the variant's index. */
161
167
  DitherPattern: { readonly array: Uint32Array; readonly stride: 1; readonly value: DitherPattern };
162
168
  /** A StyliseSpace field: the variant's index. */
163
169
  StyliseSpace: { readonly array: Uint32Array; readonly stride: 1; readonly value: StyliseSpace };
164
170
  /** A ReflectionProbeMode field: the variant's index. */
165
171
  ReflectionProbeMode: { readonly array: Uint32Array; readonly stride: 1; readonly value: ReflectionProbeMode };
172
+ /**
173
+ * A Shader handle field (0 is none): a material shader og.load.shader answered, kept for og.render.shaderMaterial.
174
+ */
175
+ Shader: { readonly array: Uint32Array; readonly stride: 2; readonly value: Shader };
166
176
  /** A LineMode field: the variant's index. */
167
177
  LineMode: { readonly array: Uint32Array; readonly stride: 1; readonly value: LineMode };
168
178
  /** A RenderTargetFormat field: the variant's index. */
@@ -177,6 +187,14 @@ export interface ColumnKinds {
177
187
  Asset: { readonly array: Uint32Array; readonly stride: 2; readonly value: Asset };
178
188
  /** A Sound handle field. */
179
189
  Sound: { readonly array: Uint32Array; readonly stride: 2; readonly value: Sound };
190
+ /**
191
+ * A Font handle field (0 is none): a font og.load.font answered, kept for og.render.text or og.ui.configure.
192
+ */
193
+ Font: { readonly array: Uint32Array; readonly stride: 2; readonly value: Font };
194
+ /**
195
+ * A Style handle field (0 is none): a UI style og.load.style answered, kept for og.ui.configure.
196
+ */
197
+ Style: { readonly array: Uint32Array; readonly stride: 2; readonly value: Style };
180
198
  /** A SkeletonAsset handle field. */
181
199
  SkeletonAsset: { readonly array: Uint32Array; readonly stride: 2; readonly value: SkeletonAsset };
182
200
  /** A ClipAsset handle field. */
@@ -191,6 +209,12 @@ export interface ColumnKinds {
191
209
  IkSolver: { readonly array: Uint32Array; readonly stride: 1; readonly value: IkSolver };
192
210
  /** An IkSpace field: the variant's index. */
193
211
  IkSpace: { readonly array: Uint32Array; readonly stride: 1; readonly value: IkSpace };
212
+ /** A SpringSpace field: the variant's index. */
213
+ SpringSpace: { readonly array: Uint32Array; readonly stride: 1; readonly value: SpringSpace };
214
+ /** A SpringColliderShape field: the variant's index. */
215
+ SpringColliderShape: { readonly array: Uint32Array; readonly stride: 1; readonly value: SpringColliderShape };
216
+ /** A Rig handle field (0 is none): a humanoid map og.load.rig answered. */
217
+ Rig: { readonly array: Uint32Array; readonly stride: 2; readonly value: Rig };
194
218
  /** A FlipbookSheet handle field. */
195
219
  FlipbookSheet: { readonly array: Uint32Array; readonly stride: 2; readonly value: FlipbookSheet };
196
220
  /** A Rig2D handle field. */
@@ -201,6 +225,10 @@ export interface ColumnKinds {
201
225
  TilemapAsset: { readonly array: Uint32Array; readonly stride: 2; readonly value: TilemapAsset };
202
226
  /** An AudioBus field: the variant's index. */
203
227
  AudioBus: { readonly array: Uint32Array; readonly stride: 1; readonly value: AudioBus };
228
+ /** An AudioResampler field: the variant's index. */
229
+ AudioResampler: { readonly array: Uint32Array; readonly stride: 1; readonly value: AudioResampler };
230
+ /** A PanningModel field: the variant's index. */
231
+ PanningModel: { readonly array: Uint32Array; readonly stride: 1; readonly value: PanningModel };
204
232
  /** A Navigation handle field. */
205
233
  Navigation: { readonly array: Uint32Array; readonly stride: 2; readonly value: Navigation };
206
234
  /** A Behaviour handle field. */
@@ -924,7 +952,7 @@ export declare const color: ColorMath;
924
952
  // Reflection: components and resources are declared once with their field layout and metadata, and registered by name.
925
953
  // The inspector, Tune, the probe, scene text and the wiki read this one schema. Each column factory below makes one field.
926
954
  // A field holds one value, or a list of at most a fixed number of one number type or handle: `list(u32(), 8)`, `list(Asset(), 4)` (the list factory below). A list is read as a frozen copy (`push` throws) and written whole (`chain.passes = [...chain.passes, h]`); one over its capacity is refused, never truncated. A few vectors are numbered fields (`p0` to `p7`, as og.CameraRail does); a list of things with fields of their own is an entity each, with its own component, looped over by a query (a ring of skid marks, the laps of a race); a long record (a lap's taped inputs) is text in `str` fields of at most 4,096 bytes each, chunked over entities. Keep none of it in module variables: they are not world state, so a snapshot, a replay and a hot reload lose them.
927
- // A handle (an og.load answer, a texture, a sound, a geometry, a material, an entity) is a 64-bit number: keep it in a field of its own kind (`Asset()`, `Texture()`, `Sound()`, `Geometry()`, `Material()`, `Entity()`, the factories of the API's handle types), in a component or a resource. A `u32` field refuses one (handles pass 2^32: `4294967298 is not a u32`); an `f64` holds the number but loses its type.
955
+ // A handle (an og.load answer, a texture, a sound, a geometry, a material, an entity) is a 64-bit number: keep it in a field of its own kind (`Asset()`, `Texture()`, `Sound()`, `Font()`, `Style()`, `Geometry()`, `Material()`, `Entity()`: every handle type of the API has its factory, named as the type), never cast to another kind, in a component or a resource. A `u32` field refuses one (handles pass 2^32: `4294967298 is not a u32`); an `f64` holds the number but loses its type.
928
956
 
929
957
  /**
930
958
  * Metadata of one field. Ranges and units are what Tune and the probe's bounds show. Nothing clamps writes: game code's writes (world.set, a resource field, a column) are stored as given, and writes from outside the game (the probe's `set`, `patch` and sweeps, Tune, a look's fields at cook) are refused outside min..max with the range named.
@@ -4387,6 +4415,23 @@ export type SpriteBlend = "alpha" | "additive";
4387
4415
  */
4388
4416
  export declare function SpriteBlend(value?: SpriteBlend, options?: FieldOptions): FieldSpec<"SpriteBlend">;
4389
4417
 
4418
+ /**
4419
+ * How a world sprite turns towards the camera that draws it: a billboard (three.js Sprite). Decided as a mode of og.Sprite and SpriteDesc rather than a component of its own: a billboard is the same quad, texture, region, flash, glow, blend, layer, drop shadow and texture array layer as any sprite, drawn by the same sprite batch and shader, which only stands its corners differently. The turn is computed on the GPU from each camera's own axes (the main camera, every og.CameraView and og.Mirror, every face of a reflection probe), so it never feeds back into the simulation and a snapshot holds only the mode. The sprite turns about its anchor (a nine-slice turns as one panel), `rotation` still turns it within its own plane, and its drop shadow is cast by the quad stood upright facing the sun, so it shows the whole shape from every camera. Within its layer a faced sprite without sortY draws back to front from the camera's eye (by view depth; a probe's six faces by distance from the probe), after the layer's drop shadows and before its unfaced sprites; and it is culled by its bounds (a sphere round the anchor through the farthest corner) against the camera's view. Sprites draw over the 3D scene after its transparent meshes and particles, depth tested and not depth writing, so a billboard behind a transparent mesh still draws over it.
4420
+ * - `"none"`: In the world's xy plane facing +z, as every sprite before billboards.
4421
+ * - `"camera"`: In the camera's view plane: its x along the camera's right, its y along its up, as particle billboards (smoke, glints, impostors seen from any side).
4422
+ * - `"cameraY"`: Upright, turned about the world's y axis towards the camera: its y stays +y, its x the camera's right laid level. Trees, characters and props that must stand while the camera looks down on them.
4423
+ */
4424
+ export type SpriteFacing = "none" | "camera" | "cameraY";
4425
+
4426
+ /**
4427
+ * A SpriteFacing field: the variant's index.
4428
+ *
4429
+ * A `SpriteFacing` field: stored in a `Uint32Array` with stride 1.
4430
+ * @param value The field's default; omitted, the column's zero value.
4431
+ * @param options Range, unit, label, docs and the tunable flag.
4432
+ */
4433
+ export declare function SpriteFacing(value?: SpriteFacing, options?: FieldOptions): FieldSpec<"SpriteFacing">;
4434
+
4390
4435
  /**
4391
4436
  * How a trail, ribbon or beam is blended.
4392
4437
  * - `"additive"`: Added: glowing streaks, lasers, magic.
@@ -4761,6 +4806,15 @@ export type Look = number & { readonly [handleType]: "Look" };
4761
4806
  */
4762
4807
  export declare function Palette(value?: Palette, options?: FieldOptions): FieldSpec<"Palette">;
4763
4808
 
4809
+ /**
4810
+ * A Look handle field (0 is none): a look og.load.look answered, kept for og.render.applyLook.
4811
+ *
4812
+ * A `Look` field: stored in a `Uint32Array` with stride 2.
4813
+ * @param value The field's default; omitted, the column's zero value.
4814
+ * @param options Range, unit, label, docs and the tunable flag.
4815
+ */
4816
+ export declare function Look(value?: Look, options?: FieldOptions): FieldSpec<"Look">;
4817
+
4764
4818
  /**
4765
4819
  * The threshold pattern Stylise.dither spreads the steps of posterize and palette with.
4766
4820
  * - `"none"`: No dither: every pixel rounds to its nearest step or colour, in flat bands.
@@ -5758,7 +5812,7 @@ export interface TextMetrics {
5758
5812
  }
5759
5813
 
5760
5814
  /**
5761
- * A textured or solid quad in the world's xy plane facing +z, drawn this frame only (immediate mode, as og.render.text): submit it every tick it should show. Sprites and text are sorted by layer and drawn over the 3D scene.
5815
+ * A textured or solid quad in the world's xy plane facing +z (or turned to the camera, `facing`), drawn this frame only (immediate mode, as og.render.text): submit it every tick it should show. Sprites and text are sorted by layer and drawn over the 3D scene.
5762
5816
  *
5763
5817
  * A desc: every field may be omitted and then takes its documented default; `{}` is valid.
5764
5818
  */
@@ -5894,6 +5948,12 @@ export interface SpriteDesc {
5894
5948
  * @default true
5895
5949
  */
5896
5950
  readonly toneMapped?: boolean;
5951
+ /**
5952
+ * A billboard: none keeps the quad in the world's xy plane; camera turns it into the view plane of each camera that draws it; cameraY stands it upright turned about y towards the camera (trees, characters). World sprites only (a screen sprite ignores it); see SpriteFacing for sorting, culling and its drop shadow.
5953
+ *
5954
+ * @default "none"
5955
+ */
5956
+ readonly facing?: SpriteFacing;
5897
5957
  /**
5898
5958
  * Mirror the region left to right.
5899
5959
  *
@@ -5941,7 +6001,7 @@ export interface SpriteDesc {
5941
6001
 
5942
6002
 
5943
6003
  /**
5944
- * A sprite drawn every frame at the entity's MatrixWorld (its xy and z, its rotation about z; its scale multiplies width and height, so squash and stretch is a tween of og.Transform.scale). With an og.Flipbook on the entity, the texture (or an `array true` sheet's texture array layer), region and anchor come from the flipbook's current frame.
6004
+ * A sprite drawn every frame at the entity's MatrixWorld (its xy and z, its rotation about z, in the xy plane or turned to the camera by `facing`; its scale multiplies width and height, so squash and stretch is a tween of og.Transform.scale). With an og.Flipbook on the entity, the texture (or an `array true` sheet's texture array layer), region and anchor come from the flipbook's current frame.
5945
6005
  * Sorted with the immediate sprites and text by layer, then (sortY) by y, then texture: one draw per run of one texture. Tile layers draw before the sprites of their layer.
5946
6006
  *
5947
6007
  * The value of the `Sprite` component (token `og.Sprite`).
@@ -6009,6 +6069,10 @@ export interface Sprite {
6009
6069
  * Within its layer, lower y draws in front: top-down characters, props and trees overlap by their feet.
6010
6070
  */
6011
6071
  sortY: boolean;
6072
+ /**
6073
+ * A billboard (SpriteDesc.facing): none keeps the quad in the world's xy plane; camera turns it into each camera's view plane; cameraY stands it upright turned about y towards the camera, for trees and characters in a 3D set. Its afterimages face as it does; its blob shadow stays flat.
6074
+ */
6075
+ facing: SpriteFacing;
6012
6076
  /** Mirror left to right (a character facing left). */
6013
6077
  flipX: boolean;
6014
6078
  /** Mirror top to bottom. */
@@ -6539,6 +6603,15 @@ export interface ReflectionProbe {
6539
6603
  */
6540
6604
  export type Shader = number & { readonly [handleType]: "Shader" };
6541
6605
 
6606
+ /**
6607
+ * A Shader handle field (0 is none): a material shader og.load.shader answered, kept for og.render.shaderMaterial.
6608
+ *
6609
+ * A `Shader` field: stored in a `Uint32Array` with stride 2.
6610
+ * @param value The field's default; omitted, the column's zero value.
6611
+ * @param options Range, unit, label, docs and the tunable flag.
6612
+ */
6613
+ export declare function Shader(value?: Shader, options?: FieldOptions): FieldSpec<"Shader">;
6614
+
6542
6615
 
6543
6616
 
6544
6617
 
@@ -8434,6 +8507,24 @@ export declare function Asset(value?: Asset, options?: FieldOptions): FieldSpec<
8434
8507
  */
8435
8508
  export declare function Sound(value?: Sound, options?: FieldOptions): FieldSpec<"Sound">;
8436
8509
 
8510
+ /**
8511
+ * A Font handle field (0 is none): a font og.load.font answered, kept for og.render.text or og.ui.configure.
8512
+ *
8513
+ * A `Font` field: stored in a `Uint32Array` with stride 2.
8514
+ * @param value The field's default; omitted, the column's zero value.
8515
+ * @param options Range, unit, label, docs and the tunable flag.
8516
+ */
8517
+ export declare function Font(value?: Font, options?: FieldOptions): FieldSpec<"Font">;
8518
+
8519
+ /**
8520
+ * A Style handle field (0 is none): a UI style og.load.style answered, kept for og.ui.configure.
8521
+ *
8522
+ * A `Style` field: stored in a `Uint32Array` with stride 2.
8523
+ * @param value The field's default; omitted, the column's zero value.
8524
+ * @param options Range, unit, label, docs and the tunable flag.
8525
+ */
8526
+ export declare function Style(value?: Style, options?: FieldOptions): FieldSpec<"Style">;
8527
+
8437
8528
  /**
8438
8529
  * Where a load is.
8439
8530
  * - `"pending"`: Still loading.
@@ -8987,7 +9078,7 @@ export interface Physics {
8987
9078
  }
8988
9079
 
8989
9080
  /**
8990
- * Two solid colliders started touching during the tick.
9081
+ * Two solid colliders started touching during the tick. Read in the tick after, when og.Velocity already holds the solver's answer (the bodies parting): how hard they met is `impulse` and `relativeVelocity`, taken in the step itself.
8991
9082
  *
8992
9083
  * The payload of the `CollisionStarted` event (token `og.CollisionStarted`).
8993
9084
  */
@@ -8996,10 +9087,27 @@ export interface CollisionStarted {
8996
9087
  readonly a: Entity;
8997
9088
  /** The entity with the higher id. */
8998
9089
  readonly b: Entity;
8999
- /** The deepest contact point in world space (z is 0 in 2D). */
9090
+ /**
9091
+ * The deepest contact point in world space (z is 0 in 2D).
9092
+ *
9093
+ * @unit m (metres)
9094
+ */
9000
9095
  readonly point: Vector3;
9001
9096
  /** The contact normal, from a towards b. */
9002
9097
  readonly normal: Vector3;
9098
+ /**
9099
+ * The normal impulse the solver gave the pair in the step that made the contact (every substep, every contact point), in newton-seconds: b took `impulse` along `normal`, a the same against it. Its momentum answer to the hit, at least 0; heavier and faster hits give more.
9100
+ *
9101
+ * @range 0..
9102
+ * @unit newtonSecond (newton-seconds: an impulse, the momentum that changes a kilogram's velocity by one metre per second)
9103
+ */
9104
+ readonly impulse: number;
9105
+ /**
9106
+ * a's velocity relative to b at `point` as that step began, before the solver answered: each body's linear velocity plus its angular velocity crossed with the point's offset from its centre of mass (a static collider is still; z is 0 in 2D). Along `normal` it is the closing speed, positive while they approach: max(0, relativeVelocity · normal) is how hard they hit, in m/s.
9107
+ *
9108
+ * @unit mps (metres per second)
9109
+ */
9110
+ readonly relativeVelocity: Vector3;
9003
9111
  }
9004
9112
 
9005
9113
  /**
@@ -12158,6 +12266,364 @@ export interface IkChain {
12158
12266
  readonly error: number;
12159
12267
  }
12160
12268
 
12269
+ /**
12270
+ * An aim constraint on a skeleton, applied after its clips, graph and IK chains: `joint` turns so its `axis` points at `target` and its `upAxis` leans towards `up` (three.js Object3D.lookAt: +Z at the target, +Y up). The direction is held within maxYaw and maxPitch of the animated forward; with `bones` above 1 the joint's parents share the turn. Put it on its own entity (a head, the eyes, a turret's barrel); constraints apply in query order, and og.JointLimit clamps the joints it turns.
12271
+ *
12272
+ * The value of the `LookAt` component (token `og.LookAt`).
12273
+ */
12274
+ export interface LookAt {
12275
+ /** The entity with the og.Skeleton this constraint turns. */
12276
+ skeleton: Entity;
12277
+ /**
12278
+ * The joint that aims (an index into the skin's joints): the head, an eye.
12279
+ *
12280
+ * @range 0..
12281
+ */
12282
+ joint: number;
12283
+ /**
12284
+ * How many joints share the turn: `joint` and its parents (3 spreads a look over neck, chest and spine), each parent taking an even share and `joint` the rest.
12285
+ *
12286
+ * @default 1
12287
+ * @range 1..8
12288
+ */
12289
+ bones: number;
12290
+ /**
12291
+ * The point to look at, in `space`.
12292
+ *
12293
+ * @unit m (metres)
12294
+ */
12295
+ target: Vector3;
12296
+ /**
12297
+ * What `target` and `up` are relative to: world (the frame the skeleton entity's og.Transform is in) or model.
12298
+ */
12299
+ space: IkSpace;
12300
+ /**
12301
+ * The joint's forward, in its own frame: the axis turned onto the target.
12302
+ *
12303
+ * @default { x: 0, y: 0, z: 1 }
12304
+ */
12305
+ axis: Vector3;
12306
+ /**
12307
+ * The joint's up, in its own frame: yaw turns about it, pitch towards it, and it rolls towards `up`.
12308
+ *
12309
+ * @default { x: 0, y: 1, z: 0 }
12310
+ */
12311
+ upAxis: Vector3;
12312
+ /**
12313
+ * The up hint, a direction in `space` the joint's `upAxis` leans to (three.js Object3D.up); the zero vector keeps the animated roll.
12314
+ *
12315
+ * @default { x: 0, y: 1, z: 0 }
12316
+ */
12317
+ up: Vector3;
12318
+ /**
12319
+ * The largest turn about `upAxis`, left or right of the animated forward.
12320
+ *
12321
+ * @default 3.1416
12322
+ * @range 0..3.1416
12323
+ * @unit rad (radians)
12324
+ * @tunable
12325
+ */
12326
+ maxYaw: number;
12327
+ /**
12328
+ * The largest turn towards or away from `upAxis`, from the animated forward.
12329
+ *
12330
+ * @default 1.5708
12331
+ * @range 0..1.5708
12332
+ * @unit rad (radians)
12333
+ * @tunable
12334
+ */
12335
+ maxPitch: number;
12336
+ /**
12337
+ * How much of the turn is applied (0 = the animated pose, 1 = aimed).
12338
+ *
12339
+ * @default 1
12340
+ * @range 0..1
12341
+ * @tunable
12342
+ */
12343
+ weight: number;
12344
+ /**
12345
+ * Written: the target lay outside maxYaw or maxPitch, so the joint aims at the nearest direction inside them.
12346
+ *
12347
+ * @readonly written by the engine
12348
+ */
12349
+ readonly clamped: boolean;
12350
+ }
12351
+
12352
+ /**
12353
+ * How far a joint may turn from its rest rotation when og.anim's solvers (og.IkChain, og.LookAt, og.FootLock) turn it: a swing of `axis` within a cone and a twist about it within a range. A hinge (a knee, an elbow) is `axis` along the hinge, `swing` 0 (or a little play) and the bend range as twistMin...twistMax. Put it on its own entity, one per joint; the animated pose itself is never clamped.
12354
+ *
12355
+ * The value of the `JointLimit` component (token `og.JointLimit`).
12356
+ */
12357
+ export interface JointLimit {
12358
+ /** The entity with the og.Skeleton whose joint this limits. */
12359
+ skeleton: Entity;
12360
+ /**
12361
+ * The limited joint (an index into the skin's joints).
12362
+ *
12363
+ * @range 0..
12364
+ */
12365
+ joint: number;
12366
+ /**
12367
+ * The twist axis in the joint's rest frame: along the bone for a ball joint, along the hinge for a hinge.
12368
+ *
12369
+ * @default { x: 0, y: 1, z: 0 }
12370
+ */
12371
+ axis: Vector3;
12372
+ /**
12373
+ * The cone half-angle the axis may swing away from its rest direction (0 locks it: a hinge; pi is free).
12374
+ *
12375
+ * @default 3.1416
12376
+ * @range 0..3.1416
12377
+ * @unit rad (radians)
12378
+ * @tunable
12379
+ */
12380
+ swing: number;
12381
+ /**
12382
+ * The least twist about `axis` from rest (a hinge's bend one way).
12383
+ *
12384
+ * @default -3.1416
12385
+ * @range -3.1416..3.1416
12386
+ * @unit rad (radians)
12387
+ * @tunable
12388
+ */
12389
+ twistMin: number;
12390
+ /**
12391
+ * The most twist about `axis` from rest (a hinge's bend the other way).
12392
+ *
12393
+ * @default 3.1416
12394
+ * @range -3.1416..3.1416
12395
+ * @unit rad (radians)
12396
+ * @tunable
12397
+ */
12398
+ twistMax: number;
12399
+ }
12400
+
12401
+ /**
12402
+ * Foot locking: while the playing clips plant `foot` (within 5 mm of its lowest in each clip, the notion retargeting uses, weighed across blends and cross-fades: planted when the planting clips hold at least half the pose), the foot stays where it touched the ground, through clip blends and root motion, its leg bent by two-bone IK and the foot keeping its animated orientation; when the clips lift it, the foot rejoins its animation over `release`. Put it on its own entity, one per foot; locks apply after root motion and before og.IkChain, in query order, and og.JointLimit clamps the leg. The lock is world state (the `og.anim` state block).
12403
+ *
12404
+ * The value of the `FootLock` component (token `og.FootLock`).
12405
+ */
12406
+ export interface FootLock {
12407
+ /** The entity with the og.Skeleton whose foot this holds. */
12408
+ skeleton: Entity;
12409
+ /**
12410
+ * The foot joint (an index into the skin's joints); the two bones above it are the leg that bends.
12411
+ *
12412
+ * @range 0..
12413
+ */
12414
+ foot: number;
12415
+ /**
12416
+ * How much of the lock is applied (0 = the animated foot, 1 = held).
12417
+ *
12418
+ * @default 1
12419
+ * @range 0..1
12420
+ * @tunable
12421
+ */
12422
+ weight: number;
12423
+ /**
12424
+ * Seconds the foot takes to rejoin its animation once lifted (0: at once).
12425
+ *
12426
+ * @default 0.15
12427
+ * @range 0..2
12428
+ * @unit s (seconds of simulation time)
12429
+ * @tunable
12430
+ */
12431
+ release: number;
12432
+ /**
12433
+ * Farther than this from where the animation puts the foot, the lock lets go (a leg cannot stretch).
12434
+ *
12435
+ * @default 0.5
12436
+ * @range 0..
12437
+ * @unit m (metres)
12438
+ * @tunable
12439
+ */
12440
+ maxDistance: number;
12441
+ /**
12442
+ * Written: the playing clips plant the foot this tick.
12443
+ *
12444
+ * @readonly written by the engine
12445
+ */
12446
+ readonly planted: boolean;
12447
+ /**
12448
+ * Written: the foot is held at its lock this tick.
12449
+ *
12450
+ * @readonly written by the engine
12451
+ */
12452
+ readonly locked: boolean;
12453
+ }
12454
+
12455
+ /**
12456
+ * Where a spring bone's tails move.
12457
+ * - `"world"`: The frame the skeleton entity's og.Transform is written in: the chain lags behind the entity's motion (walking, root motion, a jump).
12458
+ * - `"model"`: The skeleton's model space: only the animation moves the chain (a teleport or a vehicle carrying the entity does not).
12459
+ */
12460
+ export type SpringSpace = "world" | "model";
12461
+
12462
+ /**
12463
+ * A SpringSpace field: the variant's index.
12464
+ *
12465
+ * A `SpringSpace` field: stored in a `Uint32Array` with stride 1.
12466
+ * @param value The field's default; omitted, the column's zero value.
12467
+ * @param options Range, unit, label, docs and the tunable flag.
12468
+ */
12469
+ export declare function SpringSpace(value?: SpringSpace, options?: FieldOptions): FieldSpec<"SpringSpace">;
12470
+
12471
+ /**
12472
+ * A spring (jiggle) bone chain, three-vrm's VRMSpringBone: `joint` and its `bones` - 1 parents swing after their parents' motion. Each joint's tail (the next joint of the chain; for the last joint its first child, or its parent bone continued at the same length) is a point pulled towards where the animated pose puts it by a damped spring (`frequency`, `damping`), under `gravity`, held at the bone's length, and the joint turns to point at it. Applied after og.IkChain and og.LookAt, top joint first; put it on its own entity (a tail, an ear, a strand of hair, a single jiggling node), one per chain. Deterministic under the fixed tick; the tails' positions and velocities are world state (the `og.anim` state block), so a restore continues a swing exactly. A changed chain (another skeleton, length or space) restarts at the animated pose.
12473
+ *
12474
+ * The value of the `SpringBone` component (token `og.SpringBone`).
12475
+ */
12476
+ export interface SpringBone {
12477
+ /** The entity with the og.Skeleton whose joints this swings. */
12478
+ skeleton: Entity;
12479
+ /**
12480
+ * The chain's last joint (an index into the skin's joints): the tip of a tail, an ear.
12481
+ *
12482
+ * @range 0..
12483
+ */
12484
+ joint: number;
12485
+ /**
12486
+ * How many joints swing: `joint` and its parents (1 is the joint alone).
12487
+ *
12488
+ * @default 1
12489
+ * @range 1..16
12490
+ */
12491
+ bones: number;
12492
+ /**
12493
+ * How fast a tail springs back to its animated place: the spring's natural frequency (0: no spring, it only hangs and swings).
12494
+ *
12495
+ * @default 3
12496
+ * @range 0..30
12497
+ * @unit hz (ticks or cycles per second)
12498
+ * @tunable
12499
+ */
12500
+ frequency: number;
12501
+ /**
12502
+ * The damping ratio: 0 swings on, 1 settles without overshooting (critical damping).
12503
+ *
12504
+ * @default 0.3
12505
+ * @range 0..2
12506
+ * @tunable
12507
+ */
12508
+ damping: number;
12509
+ /**
12510
+ * The last joint's frequency as a multiple of `frequency`, the joints between in proportion along the chain (1: every joint alike; 0.25: the tip springs back four times slower than the top, a soft strand on a stiff root).
12511
+ *
12512
+ * @default 1
12513
+ * @range 0..4
12514
+ * @tunable
12515
+ */
12516
+ tipFrequency: number;
12517
+ /**
12518
+ * The last joint's damping ratio as a multiple of `damping`, the joints between in proportion along the chain (1: every joint alike).
12519
+ *
12520
+ * @default 1
12521
+ * @range 0..4
12522
+ * @tunable
12523
+ */
12524
+ tipDamping: number;
12525
+ /**
12526
+ * An acceleration on every tail, in `space` (three-vrm's gravityDir times gravityPower): (0, -9.8, 0) makes a chain droop.
12527
+ *
12528
+ * @unit mps2 (metres per second squared)
12529
+ */
12530
+ gravity: Vector3;
12531
+ /**
12532
+ * Where the tails move: world (the frame the skeleton entity's og.Transform is in, so the chain lags behind the entity's motion) or model (only the animation moves it).
12533
+ */
12534
+ space: SpringSpace;
12535
+ /**
12536
+ * How much of the swing is applied (0 = the animated pose, 1 = the spring's).
12537
+ *
12538
+ * @default 1
12539
+ * @range 0..1
12540
+ * @tunable
12541
+ */
12542
+ weight: number;
12543
+ /**
12544
+ * The tails' radius against og.SpringCollider (three-vrm's hitRadius): a tail stays this far outside every collider it meets (0: a point).
12545
+ *
12546
+ * @range 0..
12547
+ * @unit m (metres)
12548
+ * @tunable
12549
+ */
12550
+ radius: number;
12551
+ /**
12552
+ * The og.SpringCollider layers the tails are pushed out of, as bits: a collider on the same skeleton counts when its `layers` meet these.
12553
+ *
12554
+ * @default 4294967295
12555
+ */
12556
+ colliders: number;
12557
+ /**
12558
+ * Written: the farthest a tail is from its animated place this tick.
12559
+ *
12560
+ * @unit m (metres)
12561
+ * @readonly written by the engine
12562
+ */
12563
+ readonly lag: number;
12564
+ }
12565
+
12566
+ /**
12567
+ * The shape of a spring collider.
12568
+ * - `"sphere"`: A ball of `radius` about `offset`.
12569
+ * - `"capsule"`: A capsule of `radius` about the segment from `offset` to `tail`.
12570
+ */
12571
+ export type SpringColliderShape = "sphere" | "capsule";
12572
+
12573
+ /**
12574
+ * A SpringColliderShape field: the variant's index.
12575
+ *
12576
+ * A `SpringColliderShape` field: stored in a `Uint32Array` with stride 1.
12577
+ * @param value The field's default; omitted, the column's zero value.
12578
+ * @param options Range, unit, label, docs and the tunable flag.
12579
+ */
12580
+ export declare function SpringColliderShape(value?: SpringColliderShape, options?: FieldOptions): FieldSpec<"SpringColliderShape">;
12581
+
12582
+ /**
12583
+ * A collider spring bones are kept out of, three-vrm's VRMSpringBoneCollider: a sphere or a capsule riding on a joint of a skeleton (a head, a chest, an upper arm), so hair, ears and tails do not swing through the body. Each tick, after a tail of an og.SpringBone of the same skeleton has stepped and before its joint turns, the tail is pushed out of every collider whose `layers` meet the spring's `colliders` (in query order) to `radius` plus the spring's `radius`, keeping its bone's length. Put it on its own entity, one per shape; colliders follow the pose as it is when a chain is swung, so one on a joint an earlier chain swung follows that swing.
12584
+ *
12585
+ * The value of the `SpringCollider` component (token `og.SpringCollider`).
12586
+ */
12587
+ export interface SpringCollider {
12588
+ /** The entity with the og.Skeleton whose spring bones this keeps out. */
12589
+ skeleton: Entity;
12590
+ /**
12591
+ * The joint the collider rides on (an index into the skin's joints).
12592
+ *
12593
+ * @range 0..
12594
+ */
12595
+ joint: number;
12596
+ /** A sphere about `offset`, or a capsule from `offset` to `tail`. */
12597
+ shape: SpringColliderShape;
12598
+ /**
12599
+ * The sphere's centre, or the capsule's first end, in the joint's frame.
12600
+ *
12601
+ * @unit m (metres)
12602
+ */
12603
+ offset: Vector3;
12604
+ /**
12605
+ * The capsule's other end, in the joint's frame (a sphere ignores it).
12606
+ *
12607
+ * @unit m (metres)
12608
+ */
12609
+ tail: Vector3;
12610
+ /**
12611
+ * The radius, in metres of the skeleton's model space (the joint's own scale does not apply).
12612
+ *
12613
+ * @default 0.1
12614
+ * @range 0..
12615
+ * @unit m (metres)
12616
+ * @tunable
12617
+ */
12618
+ radius: number;
12619
+ /**
12620
+ * The layers this collider is on, as bits (a spring bone's `colliders` picks them).
12621
+ *
12622
+ * @default 1
12623
+ */
12624
+ layers: number;
12625
+ }
12626
+
12161
12627
  /**
12162
12628
  * A named marker of a clip that playback passed in the last tick (read in the tick after it fired, like every event). Cross-fades and blends fire every contributing clip's markers.
12163
12629
  *
@@ -12232,16 +12698,25 @@ export interface GraphDesc {
12232
12698
 
12233
12699
 
12234
12700
  /**
12235
- * A humanoid map from og.load.rig (a cooked `.ogt` of `type rig`): the naming scheme a skeleton's node names follow and the standard bones it names outright.
12701
+ * A humanoid map from og.load.rig (a cooked `.ogt` of `type rig`): the naming scheme a skeleton's node names follow, the standard bones it names outright and, with `footHeight`, how high its ankles stand above the ground.
12236
12702
  *
12237
12703
  * A generational handle: a number the engine hands out. A dead handle is an error value, never a crash.
12238
12704
  */
12239
12705
  export type Rig = number & { readonly [handleType]: "Rig" };
12240
12706
 
12707
+ /**
12708
+ * A Rig handle field (0 is none): a humanoid map og.load.rig answered.
12709
+ *
12710
+ * A `Rig` field: stored in a `Uint32Array` with stride 2.
12711
+ * @param value The field's default; omitted, the column's zero value.
12712
+ * @param options Range, unit, label, docs and the tunable flag.
12713
+ */
12714
+ export declare function Rig(value?: Rig, options?: FieldOptions): FieldSpec<"Rig">;
12715
+
12241
12716
  /** One standard humanoid bone of a skeleton. */
12242
12717
  export interface HumanBone {
12243
12718
  /**
12244
- * The standard bone: hips, spine, chest, upperChest, neck, head, then leftShoulder, leftUpperArm, leftLowerArm, leftHand, the right arm, leftUpperLeg, leftLowerLeg, leftFoot, leftToes and the right leg.
12719
+ * The standard bone: hips, spine, chest, upperChest, neck, head, then leftShoulder, leftUpperArm, leftLowerArm, leftHand, the right arm, leftUpperLeg, leftLowerLeg, leftFoot, leftToes and the right leg, then each hand's fingers (VRM 1.0 names): leftThumbMetacarpal, leftThumbProximal, leftThumbDistal, leftIndexProximal, leftIndexIntermediate, leftIndexDistal, the same for Middle, Ring and Little, and the right hand's.
12245
12720
  */
12246
12721
  readonly bone: string;
12247
12722
  /** The skeleton node that is that bone. */
@@ -12324,6 +12799,27 @@ export interface RetargetDesc {
12324
12799
  }
12325
12800
 
12326
12801
 
12802
+ /**
12803
+ * A clip to play on the other side of the skeleton it was made for.
12804
+ *
12805
+ * A desc: every field may be omitted and then takes its documented default; `{}` is valid.
12806
+ */
12807
+ export interface MirrorDesc {
12808
+ /**
12809
+ * The clip, made for `skeleton`.
12810
+ *
12811
+ * @default 0
12812
+ */
12813
+ readonly clip?: ClipAsset;
12814
+ /**
12815
+ * The skeleton the clip was made for (og.load.animation's `skeleton`); its left and right nodes are paired by name, the side tokens every rig naming scheme writes swapped (LeftArm and RightArm, thigh.L and thigh.R, J_Bip_L_ and J_Bip_R_, calf_l and calf_r).
12816
+ *
12817
+ * @default 0
12818
+ */
12819
+ readonly skeleton?: SkeletonAsset;
12820
+ }
12821
+
12822
+
12327
12823
  /**
12328
12824
  * A sprite sheet's frames and clips (a cooked `.ogt` of `type flipbook`), from og.load.flipbook.
12329
12825
  *
@@ -13162,6 +13658,7 @@ export interface TileCell {
13162
13658
  // Sound: inside the tick, the engine's og.audio system (after the game's systems and physics) turns AudioSource changes into a deterministic, time-stamped command stream; outside the tick the host's mixer renders it (an AudioWorklet on the web, the output device, a capture or a null sink natively).
13163
13659
  // The stream, not the PCM, is world state: snapshots, restore and the world hash cover it, and nothing a sink does reaches the world. Load sounds with og.load.sound; inserting a source plays it, setting `playing` false stops it, and a one-shot sets `playing` back to false when it ends.
13164
13660
  // Spatial gain and pan are computed in the tick from the source's world transform relative to the first AudioListener's (three.js convention: the listener looks down -Z, +X is right; with none, the origin looking down -Z). A source, listener or zone on a child entity is placed at its og.Transform composed down og.Parent, as og.MatrixWorld is: a sound on a child is heard where its parent carries it, a listener under a camera rig hears from the rig.
13661
+ // Propagation, all in the tick and so in the stream: a spatial source or listener that moves shifts the pitch (Doppler, from their tick velocities: AudioSource.dopplerFactor, AudioListener.dopplerFactor, Audio.speedOfSound), a source with a cone is turned down away from its +Z (coneInnerAngle, coneOuterAngle, coneOuterGain, as three.js's setDirectionalCone), and a listener whose panningModel is hrtf places sources for headphones (interaural delay and head shadow) instead of the stereo panner.
13165
13662
 
13166
13663
  /** SoundEnded.reason: a one-shot played to its end. */
13167
13664
  export declare const SOUND_FINISHED: 0;
@@ -13180,6 +13677,11 @@ export declare const SOUND_REPLACED: 3;
13180
13677
  */
13181
13678
  export declare const SOUND_CULLED: 4;
13182
13679
 
13680
+ /**
13681
+ * SoundEnded.reason: AudioSource.retrigger started the sound again from the top; a new voice plays it.
13682
+ */
13683
+ export declare const SOUND_RETRIGGERED: 5;
13684
+
13183
13685
  /**
13184
13686
  * The bus a source plays on; every bus passes through master.
13185
13687
  * - `"master"`: The master bus: what every bus passes through.
@@ -13198,6 +13700,38 @@ export type AudioBus = "master" | "music" | "sfx" | "ui";
13198
13700
  */
13199
13701
  export declare function AudioBus(value?: AudioBus, options?: FieldOptions): FieldSpec<"AudioBus">;
13200
13702
 
13703
+ /**
13704
+ * How an AudioListener places spatial sources between the ears, as Web Audio's PannerNode.panningModel.
13705
+ * - `"equalpower"`: The stereo panner (Web Audio's equal-power law): for speakers.
13706
+ * - `"hrtf"`: For headphones: a spherical-head model (Brown and Duda, 1998) that delays the far ear by the interaural time difference (up to 0.66 ms) and shadows its highs (up to -20 dB), so a source moves between the ears; front and back, up and down are not told apart (no pinna).
13707
+ */
13708
+ export type PanningModel = "equalpower" | "hrtf";
13709
+
13710
+ /**
13711
+ * How the mixer resamples a voice whose pitch or sound rate differs from the output's.
13712
+ * - `"linear"`: Linear interpolation: the engine's mix before round 4, cheaper, with duller highs (-3.4 dB at 15 kHz from 44.1 kHz) and images (-11.5 dB there).
13713
+ * - `"sinc"`: A Kaiser-windowed sinc (beta 7, 16 taps, 2048 phases; widened up to 64 taps for a voice pitched up to 4x): flat to the highs, images below -70 dB.
13714
+ */
13715
+ export type AudioResampler = "linear" | "sinc";
13716
+
13717
+ /**
13718
+ * An AudioResampler field: the variant's index.
13719
+ *
13720
+ * A `AudioResampler` field: stored in a `Uint32Array` with stride 1.
13721
+ * @param value The field's default; omitted, the column's zero value.
13722
+ * @param options Range, unit, label, docs and the tunable flag.
13723
+ */
13724
+ export declare function AudioResampler(value?: AudioResampler, options?: FieldOptions): FieldSpec<"AudioResampler">;
13725
+
13726
+ /**
13727
+ * A PanningModel field: the variant's index.
13728
+ *
13729
+ * A `PanningModel` field: stored in a `Uint32Array` with stride 1.
13730
+ * @param value The field's default; omitted, the column's zero value.
13731
+ * @param options Range, unit, label, docs and the tunable flag.
13732
+ */
13733
+ export declare function PanningModel(value?: PanningModel, options?: FieldOptions): FieldSpec<"PanningModel">;
13734
+
13201
13735
  /**
13202
13736
  * A sound an entity plays. Level-triggered: while `playing` is true it plays (inserting a source plays it), setting it false stops it, and a one-shot that reaches its end sets it back to false and sends og.SoundEnded.
13203
13737
  * A one-shot of F frames at rate R and pitch p started in tick S ends in tick S + ceil(F * tickRate / (R * p)) - 1. A despawned entity's voice is silenced without an event.
@@ -13339,6 +13873,47 @@ export interface AudioSource {
13339
13873
  * @tunable
13340
13874
  */
13341
13875
  fade: number;
13876
+ /**
13877
+ * Doppler: how much a spatial source's and the listener's motion along the line between them shifts its pitch, from their tick velocities (world positions down og.Parent): pitch times (c - DF * vListener) / (c - DF * vSource), c being Audio.speedOfSound and DF this times AudioListener.dopplerFactor (OpenAL's model). 1 is physical, 0 is off. A jump at or past the speed of sound in a tick is a teleport and shifts nothing; DF * v is held within c/2, so the shift stays within a factor of 3.
13878
+ *
13879
+ * @default 1
13880
+ * @range 0..10
13881
+ * @tunable
13882
+ */
13883
+ dopplerFactor: number;
13884
+ /**
13885
+ * Directivity, as three.js PositionalAudio.setDirectionalCone and Web Audio's PannerNode: a spatial source plays at full volume while the listener is within this full angle about the source's +Z (its world transform's, three.js's PositionalAudio orientation); 360 with coneOuterAngle 360 is omnidirectional.
13886
+ *
13887
+ * @default 360
13888
+ * @range 0..360
13889
+ * @unit deg (degrees)
13890
+ * @tunable
13891
+ */
13892
+ coneInnerAngle: number;
13893
+ /**
13894
+ * Past this full angle about the source's +Z it plays at coneOuterGain; between coneInnerAngle and this the gain falls linearly with the angle.
13895
+ *
13896
+ * @default 360
13897
+ * @range 0..360
13898
+ * @unit deg (degrees)
13899
+ * @tunable
13900
+ */
13901
+ coneOuterAngle: number;
13902
+ /**
13903
+ * The gain outside coneOuterAngle.
13904
+ *
13905
+ * @range 0..1
13906
+ * @tunable
13907
+ */
13908
+ coneOuterGain: number;
13909
+ /**
13910
+ * Past Audio.maxVoices it goes virtual instead of being culled: silent, its playhead running on (a one-shot still ends on its tick), and heard again from where it would be, fading in, once it stands within the cap. Without it the source is culled (SOUND_CULLED, playing false).
13911
+ */
13912
+ virtualize: boolean;
13913
+ /**
13914
+ * Set true to start the sound again from the top (its startOffset, its startAt) this tick, playing or not, without a level change on `playing`: the voice playing ends (SOUND_RETRIGGERED) and a new one starts in the same tick. The engine sets it back to false and `playing` true.
13915
+ */
13916
+ retrigger: boolean;
13342
13917
  }
13343
13918
 
13344
13919
  /**
@@ -13355,6 +13930,20 @@ export interface AudioListener {
13355
13930
  * @tunable
13356
13931
  */
13357
13932
  volume: number;
13933
+ /**
13934
+ * Scales every spatial source's Doppler shift (AudioSource.dopplerFactor); 0 turns Doppler off for this listener.
13935
+ *
13936
+ * @default 1
13937
+ * @range 0..10
13938
+ * @tunable
13939
+ */
13940
+ dopplerFactor: number;
13941
+ /**
13942
+ * How spatial sources are placed between the ears: equalpower (speakers) or hrtf (headphones). Non-spatial sources keep their pan either way; the stereo path is unchanged while it is equalpower.
13943
+ *
13944
+ * @default "equalpower"
13945
+ */
13946
+ panningModel: PanningModel;
13358
13947
  }
13359
13948
 
13360
13949
  /**
@@ -13443,6 +14032,21 @@ export interface Audio {
13443
14032
  * @readonly written by the engine
13444
14033
  */
13445
14034
  readonly outputLatency: number;
14035
+ /**
14036
+ * The speed of sound Doppler shifts are computed against (AudioSource.dopplerFactor).
14037
+ *
14038
+ * @default 343.3
14039
+ * @range 1..10000
14040
+ * @unit mps (metres per second)
14041
+ * @tunable
14042
+ */
14043
+ speedOfSound: number;
14044
+ /**
14045
+ * How voices are resampled: sinc (the default) or linear, the mix before round 4, for a game that relies on its exact output. A sound at the output's rate played at pitch 1 is its own samples either way.
14046
+ *
14047
+ * @default "sinc"
14048
+ */
14049
+ resampler: AudioResampler;
13446
14050
  }
13447
14051
 
13448
14052
  /**
@@ -13739,7 +14343,7 @@ export interface SoundEnded {
13739
14343
  /** The voice id in the command stream. */
13740
14344
  readonly voice: number;
13741
14345
  /**
13742
- * Why: SOUND_FINISHED (0), SOUND_STOPPED (1), SOUND_REMOVED (2), SOUND_REPLACED (3) or SOUND_CULLED (4).
14346
+ * Why: SOUND_FINISHED (0), SOUND_STOPPED (1), SOUND_REMOVED (2), SOUND_REPLACED (3), SOUND_CULLED (4) or SOUND_RETRIGGERED (5).
13743
14347
  */
13744
14348
  readonly reason: number;
13745
14349
  }
@@ -22270,10 +22874,10 @@ export declare namespace og {
22270
22874
  */
22271
22875
  const Beam: ComponentType<{ readonly end: FieldSpec<"Vector3">; readonly width: FieldSpec<"f32">; readonly color: FieldSpec<"Color">; readonly opacity: FieldSpec<"f32">; readonly texture: FieldSpec<"Texture">; readonly tile: FieldSpec<"f32">; readonly scroll: FieldSpec<"f32">; readonly segments: FieldSpec<"u32">; readonly jitter: FieldSpec<"f32">; readonly seed: FieldSpec<"u32">; readonly blend: FieldSpec<"StripBlend"> }, Beam>;
22272
22876
  /**
22273
- * A sprite drawn every frame at the entity's MatrixWorld (its xy and z, its rotation about z; its scale multiplies width and height, so squash and stretch is a tween of og.Transform.scale). With an og.Flipbook on the entity, the texture (or an `array true` sheet's texture array layer), region and anchor come from the flipbook's current frame.
22877
+ * A sprite drawn every frame at the entity's MatrixWorld (its xy and z, its rotation about z, in the xy plane or turned to the camera by `facing`; its scale multiplies width and height, so squash and stretch is a tween of og.Transform.scale). With an og.Flipbook on the entity, the texture (or an `array true` sheet's texture array layer), region and anchor come from the flipbook's current frame.
22274
22878
  * Sorted with the immediate sprites and text by layer, then (sortY) by y, then texture: one draw per run of one texture. Tile layers draw before the sprites of their layer.
22275
22879
  */
22276
- const Sprite: ComponentType<{ readonly texture: FieldSpec<"Texture">; readonly array: FieldSpec<"TextureArray">; readonly arrayLayer: FieldSpec<"u32">; readonly width: FieldSpec<"f32">; readonly height: FieldSpec<"f32">; readonly anchor: FieldSpec<"Vector2">; readonly color: FieldSpec<"Color">; readonly opacity: FieldSpec<"f32">; readonly uvMin: FieldSpec<"Vector2">; readonly uvMax: FieldSpec<"Vector2">; readonly layer: FieldSpec<"i32">; readonly sortY: FieldSpec<"bool">; readonly flipX: FieldSpec<"bool">; readonly flipY: FieldSpec<"bool">; readonly flash: FieldSpec<"f32">; readonly flashColor: FieldSpec<"Color">; readonly glow: FieldSpec<"f32">; readonly blend: FieldSpec<"SpriteBlend">; readonly castShadow: FieldSpec<"bool">; readonly sliceX: FieldSpec<"Vector2">; readonly sliceY: FieldSpec<"Vector2">; readonly sliceScale: FieldSpec<"f32">; readonly shadow: FieldSpec<"f32">; readonly shadowSize: FieldSpec<"Vector2">; readonly shadowOffset: FieldSpec<"Vector2">; readonly dropShadow: FieldSpec<"f32">; readonly dropShadowHeight: FieldSpec<"f32">; readonly toneMapped: FieldSpec<"bool">; readonly visible: FieldSpec<"bool">; readonly layers: FieldSpec<"u32"> }, Sprite>;
22880
+ const Sprite: ComponentType<{ readonly texture: FieldSpec<"Texture">; readonly array: FieldSpec<"TextureArray">; readonly arrayLayer: FieldSpec<"u32">; readonly width: FieldSpec<"f32">; readonly height: FieldSpec<"f32">; readonly anchor: FieldSpec<"Vector2">; readonly color: FieldSpec<"Color">; readonly opacity: FieldSpec<"f32">; readonly uvMin: FieldSpec<"Vector2">; readonly uvMax: FieldSpec<"Vector2">; readonly layer: FieldSpec<"i32">; readonly sortY: FieldSpec<"bool">; readonly facing: FieldSpec<"SpriteFacing">; readonly flipX: FieldSpec<"bool">; readonly flipY: FieldSpec<"bool">; readonly flash: FieldSpec<"f32">; readonly flashColor: FieldSpec<"Color">; readonly glow: FieldSpec<"f32">; readonly blend: FieldSpec<"SpriteBlend">; readonly castShadow: FieldSpec<"bool">; readonly sliceX: FieldSpec<"Vector2">; readonly sliceY: FieldSpec<"Vector2">; readonly sliceScale: FieldSpec<"f32">; readonly shadow: FieldSpec<"f32">; readonly shadowSize: FieldSpec<"Vector2">; readonly shadowOffset: FieldSpec<"Vector2">; readonly dropShadow: FieldSpec<"f32">; readonly dropShadowHeight: FieldSpec<"f32">; readonly toneMapped: FieldSpec<"bool">; readonly visible: FieldSpec<"bool">; readonly layers: FieldSpec<"u32"> }, Sprite>;
22277
22881
  /**
22278
22882
  * Ghosts of the entity's og.Sprite: every `interval` ticks its pose (position, rotation, scale, frame, flips) is kept, and the last `count` are drawn behind it, fading from `opacity` to 0, tinted by color. A dash, a speed-up, a teleport. The history is world state (the og.sprite state block).
22279
22883
  */
@@ -22961,7 +23565,9 @@ export declare namespace og {
22961
23565
  * The physics settings of the world. The profile is the project's; the same components serve both profiles.
22962
23566
  */
22963
23567
  const Physics: ResourceType<{ readonly profile: FieldSpec<"u32">; readonly gravity: FieldSpec<"Vector3">; readonly substeps: FieldSpec<"u32">; readonly solverIterations: FieldSpec<"u32">; readonly restSpeed: FieldSpec<"f32"> }, Physics>;
22964
- /** Two solid colliders started touching during the tick. */
23568
+ /**
23569
+ * Two solid colliders started touching during the tick. Read in the tick after, when og.Velocity already holds the solver's answer (the bodies parting): how hard they met is `impulse` and `relativeVelocity`, taken in the step itself.
23570
+ */
22965
23571
  const CollisionStarted: EventType<CollisionStarted>;
22966
23572
  /** Two solid colliders stopped touching, or one of them went away. */
22967
23573
  const CollisionEnded: EventType<CollisionEnded>;
@@ -23242,6 +23848,26 @@ export declare namespace og {
23242
23848
  * An inverse-kinematics constraint on a skeleton, applied after its clips and graph: the chain of `bones` bones ending at joint `tip` turns so the tip reaches `target`. Put it on its own entity (a skeleton can have many chains); chains apply in query order.
23243
23849
  */
23244
23850
  const IkChain: ComponentType<{ readonly skeleton: FieldSpec<"Entity">; readonly tip: FieldSpec<"u32">; readonly bones: FieldSpec<"u32">; readonly solver: FieldSpec<"IkSolver">; readonly target: FieldSpec<"Vector3">; readonly pole: FieldSpec<"Vector3">; readonly space: FieldSpec<"IkSpace">; readonly weight: FieldSpec<"f32">; readonly iterations: FieldSpec<"u32">; readonly tolerance: FieldSpec<"f32">; readonly reached: FieldSpec<"bool">; readonly error: FieldSpec<"f32"> }, IkChain>;
23851
+ /**
23852
+ * An aim constraint on a skeleton, applied after its clips, graph and IK chains: `joint` turns so its `axis` points at `target` and its `upAxis` leans towards `up` (three.js Object3D.lookAt: +Z at the target, +Y up). The direction is held within maxYaw and maxPitch of the animated forward; with `bones` above 1 the joint's parents share the turn. Put it on its own entity (a head, the eyes, a turret's barrel); constraints apply in query order, and og.JointLimit clamps the joints it turns.
23853
+ */
23854
+ const LookAt: ComponentType<{ readonly skeleton: FieldSpec<"Entity">; readonly joint: FieldSpec<"u32">; readonly bones: FieldSpec<"u32">; readonly target: FieldSpec<"Vector3">; readonly space: FieldSpec<"IkSpace">; readonly axis: FieldSpec<"Vector3">; readonly upAxis: FieldSpec<"Vector3">; readonly up: FieldSpec<"Vector3">; readonly maxYaw: FieldSpec<"f32">; readonly maxPitch: FieldSpec<"f32">; readonly weight: FieldSpec<"f32">; readonly clamped: FieldSpec<"bool"> }, LookAt>;
23855
+ /**
23856
+ * How far a joint may turn from its rest rotation when og.anim's solvers (og.IkChain, og.LookAt, og.FootLock) turn it: a swing of `axis` within a cone and a twist about it within a range. A hinge (a knee, an elbow) is `axis` along the hinge, `swing` 0 (or a little play) and the bend range as twistMin...twistMax. Put it on its own entity, one per joint; the animated pose itself is never clamped.
23857
+ */
23858
+ const JointLimit: ComponentType<{ readonly skeleton: FieldSpec<"Entity">; readonly joint: FieldSpec<"u32">; readonly axis: FieldSpec<"Vector3">; readonly swing: FieldSpec<"f32">; readonly twistMin: FieldSpec<"f32">; readonly twistMax: FieldSpec<"f32"> }, JointLimit>;
23859
+ /**
23860
+ * Foot locking: while the playing clips plant `foot` (within 5 mm of its lowest in each clip, the notion retargeting uses, weighed across blends and cross-fades: planted when the planting clips hold at least half the pose), the foot stays where it touched the ground, through clip blends and root motion, its leg bent by two-bone IK and the foot keeping its animated orientation; when the clips lift it, the foot rejoins its animation over `release`. Put it on its own entity, one per foot; locks apply after root motion and before og.IkChain, in query order, and og.JointLimit clamps the leg. The lock is world state (the `og.anim` state block).
23861
+ */
23862
+ const FootLock: ComponentType<{ readonly skeleton: FieldSpec<"Entity">; readonly foot: FieldSpec<"u32">; readonly weight: FieldSpec<"f32">; readonly release: FieldSpec<"f32">; readonly maxDistance: FieldSpec<"f32">; readonly planted: FieldSpec<"bool">; readonly locked: FieldSpec<"bool"> }, FootLock>;
23863
+ /**
23864
+ * A spring (jiggle) bone chain, three-vrm's VRMSpringBone: `joint` and its `bones` - 1 parents swing after their parents' motion. Each joint's tail (the next joint of the chain; for the last joint its first child, or its parent bone continued at the same length) is a point pulled towards where the animated pose puts it by a damped spring (`frequency`, `damping`), under `gravity`, held at the bone's length, and the joint turns to point at it. Applied after og.IkChain and og.LookAt, top joint first; put it on its own entity (a tail, an ear, a strand of hair, a single jiggling node), one per chain. Deterministic under the fixed tick; the tails' positions and velocities are world state (the `og.anim` state block), so a restore continues a swing exactly. A changed chain (another skeleton, length or space) restarts at the animated pose.
23865
+ */
23866
+ const SpringBone: ComponentType<{ readonly skeleton: FieldSpec<"Entity">; readonly joint: FieldSpec<"u32">; readonly bones: FieldSpec<"u32">; readonly frequency: FieldSpec<"f32">; readonly damping: FieldSpec<"f32">; readonly tipFrequency: FieldSpec<"f32">; readonly tipDamping: FieldSpec<"f32">; readonly gravity: FieldSpec<"Vector3">; readonly space: FieldSpec<"SpringSpace">; readonly weight: FieldSpec<"f32">; readonly radius: FieldSpec<"f32">; readonly colliders: FieldSpec<"u32">; readonly lag: FieldSpec<"f32"> }, SpringBone>;
23867
+ /**
23868
+ * A collider spring bones are kept out of, three-vrm's VRMSpringBoneCollider: a sphere or a capsule riding on a joint of a skeleton (a head, a chest, an upper arm), so hair, ears and tails do not swing through the body. Each tick, after a tail of an og.SpringBone of the same skeleton has stepped and before its joint turns, the tail is pushed out of every collider whose `layers` meet the spring's `colliders` (in query order) to `radius` plus the spring's `radius`, keeping its bone's length. Put it on its own entity, one per shape; colliders follow the pose as it is when a chain is swung, so one on a joint an earlier chain swung follows that swing.
23869
+ */
23870
+ const SpringCollider: ComponentType<{ readonly skeleton: FieldSpec<"Entity">; readonly joint: FieldSpec<"u32">; readonly shape: FieldSpec<"SpringColliderShape">; readonly offset: FieldSpec<"Vector3">; readonly tail: FieldSpec<"Vector3">; readonly radius: FieldSpec<"f32">; readonly layers: FieldSpec<"u32"> }, SpringCollider>;
23245
23871
  /**
23246
23872
  * A named marker of a clip that playback passed in the last tick (read in the tick after it fired, like every event). Cross-fades and blends fire every contributing clip's markers.
23247
23873
  */
@@ -23291,13 +23917,21 @@ export declare namespace og {
23291
23917
  */
23292
23918
  function humanoid(world: World, desc?: HumanoidDesc): Result<Humanoid>;
23293
23919
  /**
23294
- * A new clip for `target` from a clip of `source`: each animated humanoid bone turns as the source's does from its rest pose (after a rest correction, so a T-pose drives an A-pose and other bone frames agree), the target keeps its bone lengths, the hips travel the source's distance scaled by the leg ratio (root motion kept, hip height scaled), and with footIk the feet land where the source's do, scaled. Same name, duration and markers. The cook does the same for a model's `animation { library }` import setting; this is for clips chosen at run time.
23920
+ * A new clip for `target` from a clip of `source`: each animated humanoid bone turns as the source's does from its rest pose (after a rest correction, so a T-pose drives an A-pose and other bone frames agree; fingers turn from their hand, so a hand pose holds whatever the arm does), the target keeps its bone lengths, the hips travel the source's distance scaled by the leg ratio (root motion kept, hip height scaled), and with footIk the feet land where the source's do, scaled, on the ground each rig's `footHeight` names (else its rest pose's foot heights). The target's twist bones (unmapped nodes named `twist`, or Rigify's `DEF-….001`, on an upper or lower arm or leg) take a share of their segment's twist by how far along it they sit. Same name, duration and markers. The cook does the same for a model's `animation { library }` import setting; this is for clips chosen at run time.
23295
23921
  *
23296
23922
  * @param world The world whose animation owns the skeletons and the clip.
23297
23923
  * @param desc The clip, the two skeletons and their rigs.
23298
23924
  * @returns The new clip (what AnimationPlayer.clip takes). Refused for an unregistered clip, skeleton or rig, a skeleton without recognisable hips (name them in a `type rig` file), or a rig naming a missing node.
23299
23925
  */
23300
23926
  function retarget(world: World, desc?: RetargetDesc): Result<ClipInfo>;
23927
+ /**
23928
+ * A new clip that plays `clip` on the other side: every frame reflected in the skeleton's x = 0 plane, each node taking its counterpart's motion (a left swing becomes the right's), rotations moved in model space so left and right bone frames need not mirror each other, root motion's sideways travel and turns flipped. Assumes a symmetric rest pose; a sided node without a counterpart keeps its rest pose. Same name, duration and markers (markers keep their names). Mirroring twice gives the clip back. A clip known ahead needs no call: a graph's `clip` line with `mirror true` plays it mirrored, and the cook's `animation { mirror "<clip>" }` writes the mirrored clip into the model.
23929
+ *
23930
+ * @param world The world whose animation owns the skeleton and the clip.
23931
+ * @param desc The clip and its skeleton.
23932
+ * @returns The new clip (what AnimationPlayer.clip takes). Refused for an unregistered clip or skeleton.
23933
+ */
23934
+ function mirror(world: World, desc?: MirrorDesc): Result<ClipInfo>;
23301
23935
  /**
23302
23936
  * The index of a flipbook clip by name, for Flipbook.clip: `og.anim.clip(hero, "walk_down")`. -1 when the sheet has no such clip.
23303
23937
  *
@@ -23459,13 +24093,13 @@ export declare namespace og {
23459
24093
  * A sound an entity plays. Level-triggered: while `playing` is true it plays (inserting a source plays it), setting it false stops it, and a one-shot that reaches its end sets it back to false and sends og.SoundEnded.
23460
24094
  * A one-shot of F frames at rate R and pitch p started in tick S ends in tick S + ceil(F * tickRate / (R * p)) - 1. A despawned entity's voice is silenced without an event.
23461
24095
  */
23462
- const AudioSource: ComponentType<{ readonly sound: FieldSpec<"Sound">; readonly bus: FieldSpec<"AudioBus">; readonly volume: FieldSpec<"f32">; readonly pitch: FieldSpec<"f32">; readonly pan: FieldSpec<"f32">; readonly loop: FieldSpec<"bool">; readonly loopStart: FieldSpec<"f32">; readonly loopEnd: FieldSpec<"f32">; readonly spatial: FieldSpec<"bool">; readonly refDistance: FieldSpec<"f32">; readonly maxDistance: FieldSpec<"f32">; readonly rolloffFactor: FieldSpec<"f32">; readonly playing: FieldSpec<"bool">; readonly priority: FieldSpec<"u32">; readonly lowpass: FieldSpec<"f32">; readonly occlude: FieldSpec<"bool">; readonly distanceCutoff: FieldSpec<"f32">; readonly startAt: FieldSpec<"f64">; readonly startOffset: FieldSpec<"f64">; readonly fade: FieldSpec<"f32"> }, AudioSource>;
24096
+ const AudioSource: ComponentType<{ readonly sound: FieldSpec<"Sound">; readonly bus: FieldSpec<"AudioBus">; readonly volume: FieldSpec<"f32">; readonly pitch: FieldSpec<"f32">; readonly pan: FieldSpec<"f32">; readonly loop: FieldSpec<"bool">; readonly loopStart: FieldSpec<"f32">; readonly loopEnd: FieldSpec<"f32">; readonly spatial: FieldSpec<"bool">; readonly refDistance: FieldSpec<"f32">; readonly maxDistance: FieldSpec<"f32">; readonly rolloffFactor: FieldSpec<"f32">; readonly playing: FieldSpec<"bool">; readonly priority: FieldSpec<"u32">; readonly lowpass: FieldSpec<"f32">; readonly occlude: FieldSpec<"bool">; readonly distanceCutoff: FieldSpec<"f32">; readonly startAt: FieldSpec<"f64">; readonly startOffset: FieldSpec<"f64">; readonly fade: FieldSpec<"f32">; readonly dopplerFactor: FieldSpec<"f32">; readonly coneInnerAngle: FieldSpec<"f32">; readonly coneOuterAngle: FieldSpec<"f32">; readonly coneOuterGain: FieldSpec<"f32">; readonly virtualize: FieldSpec<"bool">; readonly retrigger: FieldSpec<"bool"> }, AudioSource>;
23463
24097
  /**
23464
24098
  * Where spatial sources are heard from: the entity's world transform (its og.Transform down og.Parent, so a listener under a camera rig hears from the rig), looking down its -Z with +X to the right. The first listener in query order is used.
23465
24099
  */
23466
- const AudioListener: ComponentType<{ readonly volume: FieldSpec<"f32"> }, AudioListener>;
24100
+ const AudioListener: ComponentType<{ readonly volume: FieldSpec<"f32">; readonly dopplerFactor: FieldSpec<"f32">; readonly panningModel: FieldSpec<"PanningModel"> }, AudioListener>;
23467
24101
  /** Bus volumes; master scales every bus. A change ramps over 256 frames in the mixer. */
23468
- const Audio: ResourceType<{ readonly master: FieldSpec<"f32">; readonly music: FieldSpec<"f32">; readonly sfx: FieldSpec<"f32">; readonly ui: FieldSpec<"f32">; readonly maxVoices: FieldSpec<"u32">; readonly occlusionGain: FieldSpec<"f32">; readonly occlusionCutoff: FieldSpec<"f32">; readonly reverbRoom: FieldSpec<"f32">; readonly reverbDamping: FieldSpec<"f32">; readonly outputLatency: FieldSpec<"f64"> }, Audio>;
24102
+ const Audio: ResourceType<{ readonly master: FieldSpec<"f32">; readonly music: FieldSpec<"f32">; readonly sfx: FieldSpec<"f32">; readonly ui: FieldSpec<"f32">; readonly maxVoices: FieldSpec<"u32">; readonly occlusionGain: FieldSpec<"f32">; readonly occlusionCutoff: FieldSpec<"f32">; readonly reverbRoom: FieldSpec<"f32">; readonly reverbDamping: FieldSpec<"f32">; readonly outputLatency: FieldSpec<"f64">; readonly speedOfSound: FieldSpec<"f32">; readonly resampler: FieldSpec<"AudioResampler"> }, Audio>;
23469
24103
  /**
23470
24104
  * A bus's insert effects: a high- and low-pass (12 dB/octave), a compressor, side-chain ducking by another bus, and a send to the shared reverb, whose return joins master. One entity per bus (the first in query order counts); without one a bus passes straight through.
23471
24105
  * Changes reach the mixer through the command stream, so they are deterministic and in the world hash; the PCM is the mixer's.
@@ -23492,6 +24126,7 @@ export declare namespace og {
23492
24126
  * Sound: inside the tick, the engine's og.audio system (after the game's systems and physics) turns AudioSource changes into a deterministic, time-stamped command stream; outside the tick the host's mixer renders it (an AudioWorklet on the web, the output device, a capture or a null sink natively).
23493
24127
  * The stream, not the PCM, is world state: snapshots, restore and the world hash cover it, and nothing a sink does reaches the world. Load sounds with og.load.sound; inserting a source plays it, setting `playing` false stops it, and a one-shot sets `playing` back to false when it ends.
23494
24128
  * Spatial gain and pan are computed in the tick from the source's world transform relative to the first AudioListener's (three.js convention: the listener looks down -Z, +X is right; with none, the origin looking down -Z). A source, listener or zone on a child entity is placed at its og.Transform composed down og.Parent, as og.MatrixWorld is: a sound on a child is heard where its parent carries it, a listener under a camera rig hears from the rig.
24129
+ * Propagation, all in the tick and so in the stream: a spatial source or listener that moves shifts the pitch (Doppler, from their tick velocities: AudioSource.dopplerFactor, AudioListener.dopplerFactor, Audio.speedOfSound), a source with a cone is turned down away from its +Z (coneInnerAngle, coneOuterAngle, coneOuterGain, as three.js's setDirectionalCone), and a listener whose panningModel is hrtf places sources for headphones (interaural delay and head shadow) instead of the stereo panner.
23495
24130
  */
23496
24131
  namespace audio {
23497
24132
  /**