@origingame/engine 0.3.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 (92) hide show
  1. package/dist/web/origin-engine.d.ts +44 -5
  2. package/dist/web/origin-engine.js +279 -19
  3. package/dist/web/origin-engine_bg.wasm +0 -0
  4. package/dist/web/origin-engine_bg.wasm.d.ts +18 -5
  5. package/dist/web-publish/origin-engine-lanes.js +289 -48
  6. package/dist/web-publish/origin-engine-lanes_bg.wasm +0 -0
  7. package/dist/web-publish/origin-engine.d.ts +44 -5
  8. package/dist/web-publish/origin-engine.js +279 -38
  9. package/dist/web-publish/origin-engine_bg.wasm +0 -0
  10. package/dist/web-publish/origin-engine_bg.wasm.d.ts +18 -5
  11. package/dist/web-publish-2d/origin-engine-lanes.js +289 -48
  12. package/dist/web-publish-2d/origin-engine-lanes_bg.wasm +0 -0
  13. package/dist/web-publish-2d/origin-engine.d.ts +44 -5
  14. package/dist/web-publish-2d/origin-engine.js +279 -38
  15. package/dist/web-publish-2d/origin-engine_bg.wasm +0 -0
  16. package/dist/web-publish-2d/origin-engine_bg.wasm.d.ts +18 -5
  17. package/knowledge/README.md +2 -1
  18. package/knowledge/guides/three-to-og.md +393 -0
  19. package/knowledge/knowledge.json +2 -1
  20. package/knowledge/looks/catalogue.json +123 -2
  21. package/knowledge/package.json +3 -2
  22. package/knowledge/scaffold/origin-engine.json +2 -2
  23. package/knowledge/scaffold/template/package.json +1 -1
  24. package/knowledge/scaffold/template/project.ogt +1 -1
  25. package/knowledge/scripts/validate.ts +209 -27
  26. package/knowledge/skills/og-audio/SKILL.md +33 -7
  27. package/knowledge/skills/og-build/SKILL.md +66 -7
  28. package/knowledge/skills/og-core/SKILL.md +24 -8
  29. package/knowledge/skills/og-feel/SKILL.md +11 -3
  30. package/knowledge/skills/og-game/SKILL.md +680 -51
  31. package/knowledge/skills/og-i18n/SKILL.md +7 -7
  32. package/knowledge/skills/og-model/SKILL.md +374 -0
  33. package/knowledge/skills/og-platform-sdk/SKILL.md +7 -1
  34. package/knowledge/skills/og-taste/SKILL.md +7 -0
  35. package/knowledge/skills/og-ui/SKILL.md +39 -8
  36. package/knowledge/wiki/ai.md +20 -20
  37. package/knowledge/wiki/anim.md +537 -63
  38. package/knowledge/wiki/atmosphere.md +13 -13
  39. package/knowledge/wiki/audio.md +160 -20
  40. package/knowledge/wiki/camera.md +13 -13
  41. package/knowledge/wiki/commands.md +11 -11
  42. package/knowledge/wiki/debug.md +13 -13
  43. package/knowledge/wiki/game.md +8 -8
  44. package/knowledge/wiki/i18n.md +7 -7
  45. package/knowledge/wiki/index.md +81 -3
  46. package/knowledge/wiki/input.md +47 -47
  47. package/knowledge/wiki/load.md +83 -57
  48. package/knowledge/wiki/math.md +102 -102
  49. package/knowledge/wiki/nav.md +34 -34
  50. package/knowledge/wiki/net.md +10 -10
  51. package/knowledge/wiki/path.md +14 -14
  52. package/knowledge/wiki/physics.md +111 -100
  53. package/knowledge/wiki/platform.md +44 -44
  54. package/knowledge/wiki/probe.md +86 -86
  55. package/knowledge/wiki/reflect.md +30 -18
  56. package/knowledge/wiki/render.md +1243 -176
  57. package/knowledge/wiki/rng.md +14 -14
  58. package/knowledge/wiki/shapes.md +727 -0
  59. package/knowledge/wiki/stream.md +15 -15
  60. package/knowledge/wiki/system.md +8 -8
  61. package/knowledge/wiki/systems.md +2 -2
  62. package/knowledge/wiki/terrain.md +24 -20
  63. package/knowledge/wiki/tilemap.md +13 -13
  64. package/knowledge/wiki/time.md +4 -4
  65. package/knowledge/wiki/timeline.md +14 -14
  66. package/knowledge/wiki/transform.md +8 -8
  67. package/knowledge/wiki/tween.md +17 -17
  68. package/knowledge/wiki/ui.md +245 -269
  69. package/knowledge/wiki/video.md +5 -5
  70. package/knowledge/wiki/world.md +36 -36
  71. package/package.json +4 -4
  72. package/schema/api.schema.json +2238 -81
  73. package/shell/page.ts +4 -0
  74. package/shell/platform.ts +5 -0
  75. package/shell/player.ts +8 -2
  76. package/shell/transport.ts +6 -0
  77. package/src/generated/abi.ts +40 -1
  78. package/src/geom.ts +260 -0
  79. package/src/index.ts +19 -1
  80. package/src/node/device.ts +5 -2
  81. package/src/node/playtest-run.ts +1 -0
  82. package/src/node/polish.ts +34 -15
  83. package/src/node/run.ts +23 -6
  84. package/src/platform-local.ts +2 -0
  85. package/src/playtest.ts +8 -0
  86. package/src/runtime.ts +88 -6
  87. package/src/ui-kit/settings.ts +9 -0
  88. package/src/web/gl-state.ts +907 -0
  89. package/src/web/shell.ts +1 -1
  90. package/src/web/worker.ts +8 -2
  91. package/types/bindings.json +1222 -453
  92. package/types/index.d.ts +1868 -315
@@ -14,7 +14,7 @@ module render {
14
14
  # declarations follow, each quoted below
15
15
  ```
16
16
 
17
- <sub>`api.ogt` line 2237</sub>
17
+ <sub>`api.ogt` line 2244</sub>
18
18
 
19
19
  ## Contents
20
20
 
@@ -39,7 +39,10 @@ module render {
39
39
  | [`og.SpotLight`](#record-SpotLight) | component | A cone of light along the entity's local -Z, as three.js SpotLight. |
40
40
  | [`ToneMapping`](#type-ToneMapping) | enum | The curve from the lit HDR image to the display, as three.js toneMapping. RenderSettings.toneMapped false clamps instead, whichever is chosen. |
41
41
  | [`ToneMapping()`](#column-ToneMapping) | column kind | A ToneMapping field: the variant's index. |
42
- | [`og.RenderSettings`](#record-RenderSettings) | resource | The frame's look after lighting: environment light, sky, bloom, exposure metering and tone mapping. Read after each tick; it never feeds back into the simulation. Camera.exposure is the manual exposure. |
42
+ | [`GraphicsQuality`](#type-GraphicsQuality) | enum | A graphics preset: a row of RenderSettings' quality fields that og.render.applyQuality writes (its doc has the table). The settings screen (og.ui.settingsScreen) offers the three. |
43
+ | [`QualityPreset`](#type-QualityPreset) | enum | The preset RenderSettings' quality fields were last written with (RenderSettings.quality). |
44
+ | [`QualityPreset()`](#column-QualityPreset) | column kind | A QualityPreset field: the variant's index. |
45
+ | [`og.RenderSettings`](#record-RenderSettings) | resource | The frame's look after lighting: environment light, sky, bloom, exposure metering and tone mapping, and what the frame may cost: the quality fields (rectShadows to msaaSamples) that og.render.applyQuality sets from a graphics preset. Read after each tick; it never feeds back into the simulation. Camera.exposure is the manual exposure. |
43
46
  | [`Lut`](#type-Lut) | handle | A colour lookup table for PostEffects.lut, from og.load.lut (a `.cube` file). |
44
47
  | [`EnvironmentMap`](#type-EnvironmentMap) | handle | A prefiltered HDR environment map for Environment.map, from og.load.environment (an `.ogt` of `type environment` naming an equirectangular `.hdr` or `.exr`, a KTX2 cube map, or six face images). |
45
48
  | [`ParticleEmitter`](#type-ParticleEmitter) | handle | A particle emitter asset for ParticleSystem.emitter, from og.load.emitter (an `.ogt` of `type particles`). |
@@ -54,12 +57,15 @@ module render {
54
57
  | [`DofQuality()`](#column-DofQuality) | column kind | A DofQuality field: the variant's index. |
55
58
  | [`SpriteBlend`](#type-SpriteBlend) | enum | How a sprite is blended over what is below it. |
56
59
  | [`SpriteBlend()`](#column-SpriteBlend) | column kind | A SpriteBlend field: the variant's index. |
60
+ | [`SpriteFacing`](#type-SpriteFacing) | enum | 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. |
61
+ | [`SpriteFacing()`](#column-SpriteFacing) | column kind | A SpriteFacing field: the variant's index. |
57
62
  | [`StripBlend`](#type-StripBlend) | enum | How a trail, ribbon or beam is blended. |
58
63
  | [`StripBlend()`](#column-StripBlend) | column kind | A StripBlend field: the variant's index. |
59
64
  | [`og.PostEffects`](#record-PostEffects) | resource | The post stack beyond RenderSettings' bloom, exposure and tone mapping, and camera shake. Every effect is off by default (its switch false or its amount 0) and then costs nothing: no pass is recorded. Read after each tick; it never feeds back into the simulation. |
60
65
  | [`Palette`](#type-Palette) | handle | A colour palette for Stylise.palette, from og.load.palette (a `.hex` or GIMP `.gpl` file of up to 256 colours). |
61
66
  | [`Look`](#type-Look) | handle | A look from og.load.look (an `.ogt` of `type look`): the frame's whole art direction as data, applied with og.render.applyLook. |
62
67
  | [`Palette()`](#column-Palette) | column kind | A Palette handle field (0 is none). |
68
+ | [`Look()`](#column-Look) | column kind | A Look handle field (0 is none): a look og.load.look answered, kept for og.render.applyLook. |
63
69
  | [`DitherPattern`](#type-DitherPattern) | enum | The threshold pattern Stylise.dither spreads the steps of posterize and palette with. |
64
70
  | [`DitherPattern()`](#column-DitherPattern) | column kind | A DitherPattern field: the variant's index. |
65
71
  | [`StyliseSpace`](#type-StyliseSpace) | enum | Where Stylise lays a pattern (the paint canvas, the hatching, the halftone). |
@@ -81,9 +87,9 @@ module render {
81
87
  | [`TextDesc`](#type-TextDesc) | desc struct | A line or block of MSDF text in the world's xy plane facing +z, drawn this frame only (immediate mode: submit it every tick it should show). |
82
88
  | [`TextMeasureDesc`](#type-TextMeasureDesc) | desc struct | Text to measure with og.render.measureText, laid out as og.render.text lays it out. |
83
89
  | [`TextMetrics`](#type-TextMetrics) | struct | The extent of a laid-out text, in world units. |
84
- | [`SpriteDesc`](#type-SpriteDesc) | desc struct | 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. |
90
+ | [`SpriteDesc`](#type-SpriteDesc) | desc struct | 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. |
85
91
  | [`og.render.sprite`](#fn-sprite) | function | Draw a sprite this frame. Systems and commands may call it; the list is cleared at every tick, so submit it every tick the sprite should show. |
86
- | [`og.Sprite`](#record-Sprite) | component | 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. |
92
+ | [`og.Sprite`](#record-Sprite) | component | 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. |
87
93
  | [`og.Afterimage`](#record-Afterimage) | component | 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). |
88
94
  | [`FloatingTextDesc`](#type-FloatingTextDesc) | desc struct | A damage number or pickup text that pops at a point, rises, spreads and fades by itself (no per-tick submission). Deterministic: its drift comes from the tick and its order, and it is world state (the og.sprite state block). |
89
95
  | [`og.render.floatingText`](#fn-floatingText) | function | Spawn a floating text (damage numbers, +coins, `blocked`). It lives `lifetime` seconds of scaled time on its own; systems and commands may call it. |
@@ -105,10 +111,12 @@ module render {
105
111
  | [`og.render.standardMaterial`](#fn-standardMaterial) | function | Create a standard material. |
106
112
  | [`og.render.updateMaterial`](#fn-updateMaterial) | function | Change some parameters of a standard material. |
107
113
  | [`Shader`](#type-Shader) | handle | A material shader from og.load.shader (an `.ogt` of `type shader`): WGSL hooks of the lit shader, or with `mode full` its own vertex and fragment entries, and the parameters they read. |
114
+ | [`Shader()`](#column-Shader) | column kind | A Shader handle field (0 is none): a material shader og.load.shader answered, kept for og.render.shaderMaterial. |
108
115
  | [`og.render.shaderMaterial`](#fn-shaderMaterial) | function | Create a standard material that draws with a material shader's hooks (vertex_offset, surface_color, surface_normal, surface_emissive; the og-game skill's Material shaders section has their WGSL contract), its parameters at their defaults. The hooks apply to skinned meshes too, and shadows and the depth prepass (ambient occlusion, outlines, depth of field) see the mesh where vertex_offset moved it and cut where surface_color's alpha falls below alphaTest. |
109
116
  | [`og.render.setMaterialShader`](#fn-setMaterialShader) | function | Give an existing material a material shader, or take it away with null: a loaded model's material (GltfInfo.materials) draws its skinned or static meshes through the hooks, with the shader's parameters at their defaults. Every mesh drawn with that material changes. |
110
117
  | [`og.render.setShaderParam`](#fn-setShaderParam) | function | Set a parameter of a shader material, by the name its shader declares: a number for float, two to four for vec2, vec3, vec4 and color. |
111
118
  | [`og.render.applyLook`](#fn-applyLook) | function | Apply a look, in GameDesc.start (or name it in GameDesc.look) or at any tick for a level's mood, a flashback or a photo mode: every resource the look names is replaced whole (the fields it sets take its values, the rest their defaults; PostEffects.flash and PostEffects.shakeTrauma, which game code animates, keep theirs), and the UI is configured with its style, keeping the rest of the last UiDesc. Resources it does not name are left as they are. Inside a system, the system must declare those resources among its writes. A look that switches the stylisation (a Stylise pass on or off, the pixel grid, retro 3D, the material style) starts TAA's history over, as a camera cut does, so its first frame holds no ghost of the old look. |
119
+ | [`og.render.applyQuality`](#fn-applyQuality) | function | Apply a graphics preset: write its row of RenderSettings' quality fields (the rest of RenderSettings keeps its values) and record it in RenderSettings.quality. The renderer reads those fields and nothing else, so what the probe and dump_world show of RenderSettings is what the next frame draws. The settings screen calls it when the player picks a preset (SettingsDesc.world); a game applies a saved preset itself at start. Inside a system, the system must declare RenderSettings among its writes. The rows: |
112
120
  | [`og.render.look`](#fn-look) | function | The look last applied (by og.render.applyLook or GameDesc.look), as og.load.lookInfo describes it; null before any. |
113
121
  | [`og.render.capabilities`](#fn-capabilities) | function | The renderer's tier and limits on this device. |
114
122
  | [`og.render.text`](#fn-text) | function | Draw text this frame. Systems and commands may call it; the list is cleared at every tick, so submit it every tick the text should show. Multi-page fonts are drawn page by page with one layout. |
@@ -131,6 +139,30 @@ module render {
131
139
  | [`og.render.ringGeometry`](#fn-ringGeometry) | function | Make a ring geometry for og.Mesh (one-sided: give it a double-sided material to see it from behind). |
132
140
  | [`og.render.circleGeometry`](#fn-circleGeometry) | function | Make a circle geometry for og.Mesh (one-sided, as ringGeometry). |
133
141
  | [`og.render.tubeGeometry`](#fn-tubeGeometry) | function | Make a tube along a curve through points for og.Mesh: pipes, cables, rails, a path shown as a ribbon of geometry. Physics can use it as a triangle-mesh Collider.mesh. |
142
+ | [`ShapePoints`](#type-ShapePoints) | struct | A shape as points, what og.Shape.extractPoints returns and what shapeGeometry, extrudeGeometry and sweepGeometry read: the outline, then each hole. A repeated closing point is dropped, as three.js drops it. |
143
+ | [`ShapeGeometryDesc`](#type-ShapeGeometryDesc) | desc struct | A flat shape with holes in the xy plane facing +Z, as three.js ShapeGeometry(shapes, curveSegments): triangulated by earcut (three.js's own port), the outline made clockwise and the holes counter-clockwise first, so its vertices and triangles are three.js's for the same shape. uvs are world x and y (v flipped to run down the image). |
144
+ | [`ExtrudeGeometryDesc`](#type-ExtrudeGeometryDesc) | desc struct | Shapes pushed along +Z, or along a path, as three.js ExtrudeGeometry(shapes, options) with its option names and defaults: a closed solid, its lids from earcut and its walls ring by ring, rounded by a bevel of bevelSegments rings at each face. Unindexed as three.js's (every triangle its own vertices, flat normals), three.js's vertex order and counts; uvs from three.js's WorldUVGenerator (v flipped to run down the image). |
145
+ | [`LatheGeometryDesc`](#type-LatheGeometryDesc) | desc struct | A profile turned round +Y, as three.js LatheGeometry(points, segments, phiStart, phiLength): vases, bottles, columns, wheels. three.js's vertices, indices and smooth normals; u round the axis, v along the profile (flipped to run down the image). A whole turn's seam meets exactly. |
146
+ | [`PolyhedronGeometryDesc`](#type-PolyhedronGeometryDesc) | desc struct | A polyhedron from vertices and faces, every face subdivided `detail` times and every vertex pushed onto the sphere of `radius`, as three.js PolyhedronGeometry(vertices, indices, radius, detail): unindexed, flat normals at detail 0 and the sphere's above, three.js's spherical uvs. |
147
+ | [`SolidGeometryDesc`](#type-SolidGeometryDesc) | desc struct | A regular solid, as three.js IcosahedronGeometry, DodecahedronGeometry, OctahedronGeometry and TetrahedronGeometry(radius, detail): PolyhedronGeometryDesc with the solid's own vertices and faces. An icosahedron at detail 2 or more is a sphere with even triangles. |
148
+ | [`SweepKey`](#type-SweepKey) | struct | A value at a fraction of a sweep's path: linear between keys, held before the first and past the last. |
149
+ | [`SweepGeometryDesc`](#type-SweepGeometryDesc) | desc struct | A section swept along a path, scaled and twisted over it: horns, tusks, handles, blades, tapered pipes, twisted columns (img2threejs's tapered sweep; three.js has no class for it). The section's x lies along the path's normal and y along its binormal (three.js's Frenet frames), rings evenly spaced along the path's length; u runs along the path, v round the section (flipped to run down the image), the sides smooth. An open path's ends are capped. |
150
+ | [`MirrorAxis`](#type-MirrorAxis) | enum | The world axis a part is mirrored along, after its placement. |
151
+ | [`GeometryPart`](#type-GeometryPart) | desc struct | A geometry placed as an Object3D is (scale, then rotate, then move), then mirrored: one part of og.render.mergeGeometries or an operand of og.render.csgGeometry. |
152
+ | [`CsgOp`](#type-CsgOp) | enum | A boolean operation on two solids. |
153
+ | [`CsgGeometryDesc`](#type-CsgGeometryDesc) | desc struct | Two closed geometries combined by a boolean operation, each placed first: a box with a hole bored through it, a dice, a window cut in a wall. The result is closed when both are (every edge shared by two triangles, wound opposite), every piece keeps its source's normals, uvs and colours (b's turned inside out where it is subtracted). Where a plane side or an edge crossing is decided, the decision is exact (Shewchuk's predicates), so every host makes the same cuts; faces that coincide keep one copy or none, as the operation says. |
154
+ | [`MergeGeometriesDesc`](#type-MergeGeometriesDesc) | desc struct | Geometries placed and merged into one, as three.js BufferGeometryUtils.mergeGeometries after applying each part's matrix: a prop of parts drawn in one draw, a mirrored half, an array (the same part at several placements). Normals follow each placement; a mirrored part turns its triangles so they still face out. Vertex colours are kept when any part has them. |
155
+ | [`og.render.shapeGeometry`](#fn-shapeGeometry) | function | Make a flat shape for og.Mesh (one-sided, as circleGeometry): an og.Shape with holes, or a points array. Physics can use it as a triangle-mesh Collider.mesh. |
156
+ | [`og.render.extrudeGeometry`](#fn-extrudeGeometry) | function | Make an extruded solid for og.Mesh: a three.js extrusion is a paste (`og.render.extrudeGeometry(world, { shapes: shape, depth: 0.2, bevelEnabled: true })`). Gears, signs, keys, logos, cookie cutters; along a path, a rail or a moulding. |
157
+ | [`og.render.latheGeometry`](#fn-latheGeometry) | function | Make a solid of revolution for og.Mesh: a profile turned round +Y. |
158
+ | [`og.render.polyhedronGeometry`](#fn-polyhedronGeometry) | function | Make a polyhedron from vertices and faces for og.Mesh, subdivided onto a sphere. |
159
+ | [`og.render.icosahedronGeometry`](#fn-icosahedronGeometry) | function | Make an icosahedron (twenty faces) for og.Mesh; with detail, a geodesic sphere. |
160
+ | [`og.render.dodecahedronGeometry`](#fn-dodecahedronGeometry) | function | Make a dodecahedron (twelve pentagons, thirty-six triangles) for og.Mesh. |
161
+ | [`og.render.octahedronGeometry`](#fn-octahedronGeometry) | function | Make an octahedron (eight faces) for og.Mesh. |
162
+ | [`og.render.tetrahedronGeometry`](#fn-tetrahedronGeometry) | function | Make a tetrahedron (four faces) for og.Mesh. |
163
+ | [`og.render.sweepGeometry`](#fn-sweepGeometry) | function | Make a section swept along a path for og.Mesh, tapered and twisted by keys. |
164
+ | [`og.render.csgGeometry`](#fn-csgGeometry) | function | Make the union, difference or intersection of two placed geometries for og.Mesh. Chain calls for more operands (a cube minus six spheres is six calls); each result is a geometry like any other. |
165
+ | [`og.render.mergeGeometries`](#fn-mergeGeometries) | function | Make one geometry of several placed ones for og.Mesh: one draw instead of many, mirrored halves, arrays. |
134
166
  | [`LineMode`](#type-LineMode) | enum | How a line set's points join, as three.js's three line objects. |
135
167
  | [`LineMode()`](#column-LineMode) | column kind | A LineMode field: the variant's index. |
136
168
  | [`LinesDesc`](#type-LinesDesc) | desc struct | Lines through points, drawn this frame only (immediate mode, as og.render.sprite): submit them every tick they should show. three.js Line, LineSegments and LineLoop with a LineBasicMaterial or LineDashedMaterial, but any width on every tier (each segment is a quad in screen space with a feathered edge, so WebGL2's one-pixel lines do not apply). |
@@ -155,7 +187,7 @@ module render {
155
187
  | [`Post()`](#column-Post) | column kind | A Post handle field (0 is none). |
156
188
  | [`og.render.setPostParam`](#fn-setPostParam) | function | Set a parameter of a custom post pass, by the name its asset declares: a number for float, two to four for vec2, vec3, vec4 and color. Every frame it runs in reads it. |
157
189
  | [`PostError`](#type-PostError) | struct | A custom post pass the device failed to compile. |
158
- | [`og.render.postErrors`](#fn-postErrors) | function | The custom post passes PostEffects.custom1 to custom8 name that failed to compile on this device, each skipped (the frame draws as without it). The cook validates every pass for each back end, so this is a device's own refusal. |
190
+ | [`og.render.postErrors`](#fn-postErrors) | function | The custom post passes PostEffects.custom names that failed to compile on this device, each skipped (the frame draws as without it). The cook validates every pass for each back end, so this is a device's own refusal. |
159
191
  | [`VolumetricFog`](#type-VolumetricFog) | enum | How the device draws Fog.volumetric (RenderCapabilities.volumetricFog). |
160
192
  | [`og.RectLight`](#record-RectLight) | component | A rectangle of light, as three.js RectAreaLight: width by height metres centred on the entity in its local xy plane, facing along its local -Z (aim it with transform.lookAt, as a spot), emitting color * intensity from its front, or from both faces with twoSided. Shaded with linearly transformed cosines (Heitz et al. 2016, three.js's tables), so its highlight on a glossy floor is the rectangle's shape and its light on a matte wall falls off as a real panel's does. With castShadow it casts a soft shadow in the frame; og bake lightmaps traces its exact soft shadows into the bounce light either way. |
161
193
  | [`og.LightVolume`](#record-LightVolume) | component | A box of baked light probes (an irradiance volume): og bake lightmaps traces the light arriving from the scene (bounced off its static models, from the sky, from emissive surfaces) at a grid of points spacing metres apart inside it, as first-order spherical harmonics. Every mesh, model, skinned character and particle-lit surface drawn inside it that has no lightmap of its own takes its ambient light from the probes instead of the sky's, blended at the box's edge over one spacing: a ball rolling past a red wall turns red on that side. |
@@ -192,7 +224,7 @@ fn ribbon {
192
224
  }
193
225
  ```
194
226
 
195
- <sub>`api.ogt` line 3532</sub>
227
+ <sub>`api.ogt` line 3606</sub>
196
228
 
197
229
  <a id="fn-sprite"></a>
198
230
 
@@ -222,7 +254,7 @@ fn sprite {
222
254
  }
223
255
  ```
224
256
 
225
- <sub>`api.ogt` line 3660</sub>
257
+ <sub>`api.ogt` line 3735</sub>
226
258
 
227
259
  <a id="fn-floatingText"></a>
228
260
 
@@ -252,7 +284,7 @@ fn floatingText {
252
284
  }
253
285
  ```
254
286
 
255
- <sub>`api.ogt` line 3840</sub>
287
+ <sub>`api.ogt` line 3916</sub>
256
288
 
257
289
  <a id="fn-measureText"></a>
258
290
 
@@ -282,7 +314,7 @@ fn measureText {
282
314
  }
283
315
  ```
284
316
 
285
- <sub>`api.ogt` line 3847</sub>
317
+ <sub>`api.ogt` line 3923</sub>
286
318
 
287
319
  <a id="fn-boxGeometry"></a>
288
320
 
@@ -312,7 +344,7 @@ fn boxGeometry {
312
344
  }
313
345
  ```
314
346
 
315
- <sub>`api.ogt` line 3916</sub>
347
+ <sub>`api.ogt` line 3992</sub>
316
348
 
317
349
  <a id="fn-planeGeometry"></a>
318
350
 
@@ -342,7 +374,7 @@ fn planeGeometry {
342
374
  }
343
375
  ```
344
376
 
345
- <sub>`api.ogt` line 3923</sub>
377
+ <sub>`api.ogt` line 3999</sub>
346
378
 
347
379
  <a id="fn-sphereGeometry"></a>
348
380
 
@@ -372,7 +404,7 @@ fn sphereGeometry {
372
404
  }
373
405
  ```
374
406
 
375
- <sub>`api.ogt` line 3930</sub>
407
+ <sub>`api.ogt` line 4006</sub>
376
408
 
377
409
  <a id="fn-standardMaterial"></a>
378
410
 
@@ -402,7 +434,7 @@ fn standardMaterial {
402
434
  }
403
435
  ```
404
436
 
405
- <sub>`api.ogt` line 4010</sub>
437
+ <sub>`api.ogt` line 4088</sub>
406
438
 
407
439
  <a id="fn-updateMaterial"></a>
408
440
 
@@ -434,7 +466,7 @@ fn updateMaterial {
434
466
  }
435
467
  ```
436
468
 
437
- <sub>`api.ogt` line 4017</sub>
469
+ <sub>`api.ogt` line 4095</sub>
438
470
 
439
471
  <a id="fn-shaderMaterial"></a>
440
472
 
@@ -466,7 +498,7 @@ fn shaderMaterial {
466
498
  }
467
499
  ```
468
500
 
469
- <sub>`api.ogt` line 4027</sub>
501
+ <sub>`api.ogt` line 4112</sub>
470
502
 
471
503
  <a id="fn-setMaterialShader"></a>
472
504
 
@@ -498,7 +530,7 @@ fn setMaterialShader {
498
530
  }
499
531
  ```
500
532
 
501
- <sub>`api.ogt` line 4035</sub>
533
+ <sub>`api.ogt` line 4120</sub>
502
534
 
503
535
  <a id="fn-setShaderParam"></a>
504
536
 
@@ -532,7 +564,7 @@ fn setShaderParam {
532
564
  }
533
565
  ```
534
566
 
535
- <sub>`api.ogt` line 4043</sub>
567
+ <sub>`api.ogt` line 4128</sub>
536
568
 
537
569
  <a id="fn-applyLook"></a>
538
570
 
@@ -562,7 +594,61 @@ fn applyLook {
562
594
  }
563
595
  ```
564
596
 
565
- <sub>`api.ogt` line 4052</sub>
597
+ <sub>`api.ogt` line 4137</sub>
598
+
599
+ <a id="fn-applyQuality"></a>
600
+
601
+ ### `og.render.applyQuality`
602
+
603
+ Apply a graphics preset: write its row of RenderSettings' quality fields (the rest of RenderSettings keeps its values) and record it in RenderSettings.quality. The renderer reads those fields and nothing else, so what the probe and dump_world show of RenderSettings is what the next frame draws. The settings screen calls it when the player picks a preset (SettingsDesc.world); a game applies a saved preset itself at start. Inside a system, the system must declare RenderSettings among its writes. The rows:
604
+
605
+ | Field | low | medium | high |
606
+ |---|---|---|---|
607
+ | rectShadows | false | true | true |
608
+ | shadowedLights | 2 | 8 | 8 |
609
+ | shadowMapScale | 0.5 | 1 | 2 |
610
+ | volumetricFog | false | true | true |
611
+ | softParticles | false | true | true |
612
+ | screenSpaceReflections | false | true | true |
613
+ | ambientOcclusion | false | true | true |
614
+ | msaaSamples | 1 | 4 | 4 |
615
+
616
+ Medium is every field's default, the frame drawn before any preset.
617
+
618
+ ```ts
619
+ og.render.applyQuality(world: World, preset: GraphicsQuality): Result<void>
620
+ ```
621
+
622
+ | Parameter | Type | Optional | Doc |
623
+ |---|---|---|---|
624
+ | `world` | `World` | no | The world whose RenderSettings change. |
625
+ | `preset` | `GraphicsQuality` | no | The preset. |
626
+
627
+ **Returns** `Result<void>`: Refused for a world that is not alive, or inside a system that did not declare RenderSettings among its writes.
628
+
629
+ Binding symbol `og_render_apply_quality` · publish builds: kept
630
+
631
+ ```ogt
632
+ fn applyQuality {
633
+ doc "Apply a graphics preset: write its row of RenderSettings' quality fields (the rest of RenderSettings keeps its values) and record it in RenderSettings.quality. The renderer reads those fields and nothing else, so what the probe and dump_world show of RenderSettings is what the next frame draws. The settings screen calls it when the player picks a preset (SettingsDesc.world); a game applies a saved preset itself at start. Inside a system, the system must declare RenderSettings among its writes. The rows:"
634
+ doc "| Field | low | medium | high |"
635
+ doc "|---|---|---|---|"
636
+ doc "| rectShadows | false | true | true |"
637
+ doc "| shadowedLights | 2 | 8 | 8 |"
638
+ doc "| shadowMapScale | 0.5 | 1 | 2 |"
639
+ doc "| volumetricFog | false | true | true |"
640
+ doc "| softParticles | false | true | true |"
641
+ doc "| screenSpaceReflections | false | true | true |"
642
+ doc "| ambientOcclusion | false | true | true |"
643
+ doc "| msaaSamples | 1 | 4 | 4 |"
644
+ doc "Medium is every field's default, the frame drawn before any preset."
645
+ param world World "The world whose RenderSettings change."
646
+ param preset GraphicsQuality "The preset."
647
+ returns Result.Void "Refused for a world that is not alive, or inside a system that did not declare RenderSettings among its writes."
648
+ }
649
+ ```
650
+
651
+ <sub>`api.ogt` line 4144</sub>
566
652
 
567
653
  <a id="fn-look"></a>
568
654
 
@@ -590,7 +676,7 @@ fn look {
590
676
  }
591
677
  ```
592
678
 
593
- <sub>`api.ogt` line 4059</sub>
679
+ <sub>`api.ogt` line 4162</sub>
594
680
 
595
681
  <a id="fn-capabilities"></a>
596
682
 
@@ -618,7 +704,7 @@ fn capabilities {
618
704
  }
619
705
  ```
620
706
 
621
- <sub>`api.ogt` line 4065</sub>
707
+ <sub>`api.ogt` line 4168</sub>
622
708
 
623
709
  <a id="fn-text"></a>
624
710
 
@@ -648,7 +734,7 @@ fn text {
648
734
  }
649
735
  ```
650
736
 
651
- <sub>`api.ogt` line 4071</sub>
737
+ <sub>`api.ogt` line 4174</sub>
652
738
 
653
739
  <a id="fn-bufferGeometry"></a>
654
740
 
@@ -678,7 +764,7 @@ fn bufferGeometry {
678
764
  }
679
765
  ```
680
766
 
681
- <sub>`api.ogt` line 4109</sub>
767
+ <sub>`api.ogt` line 4212</sub>
682
768
 
683
769
  <a id="fn-updateGeometry"></a>
684
770
 
@@ -710,7 +796,7 @@ fn updateGeometry {
710
796
  }
711
797
  ```
712
798
 
713
- <sub>`api.ogt` line 4116</sub>
799
+ <sub>`api.ogt` line 4219</sub>
714
800
 
715
801
  <a id="fn-geometryInfo"></a>
716
802
 
@@ -740,7 +826,7 @@ fn geometryInfo {
740
826
  }
741
827
  ```
742
828
 
743
- <sub>`api.ogt` line 4124</sub>
829
+ <sub>`api.ogt` line 4227</sub>
744
830
 
745
831
  <a id="fn-cylinderGeometry"></a>
746
832
 
@@ -770,7 +856,7 @@ fn cylinderGeometry {
770
856
  }
771
857
  ```
772
858
 
773
- <sub>`api.ogt` line 4319</sub>
859
+ <sub>`api.ogt` line 4422</sub>
774
860
 
775
861
  <a id="fn-coneGeometry"></a>
776
862
 
@@ -800,7 +886,7 @@ fn coneGeometry {
800
886
  }
801
887
  ```
802
888
 
803
- <sub>`api.ogt` line 4326</sub>
889
+ <sub>`api.ogt` line 4429</sub>
804
890
 
805
891
  <a id="fn-capsuleGeometry"></a>
806
892
 
@@ -830,7 +916,7 @@ fn capsuleGeometry {
830
916
  }
831
917
  ```
832
918
 
833
- <sub>`api.ogt` line 4333</sub>
919
+ <sub>`api.ogt` line 4436</sub>
834
920
 
835
921
  <a id="fn-torusGeometry"></a>
836
922
 
@@ -860,7 +946,7 @@ fn torusGeometry {
860
946
  }
861
947
  ```
862
948
 
863
- <sub>`api.ogt` line 4340</sub>
949
+ <sub>`api.ogt` line 4443</sub>
864
950
 
865
951
  <a id="fn-ringGeometry"></a>
866
952
 
@@ -890,7 +976,7 @@ fn ringGeometry {
890
976
  }
891
977
  ```
892
978
 
893
- <sub>`api.ogt` line 4347</sub>
979
+ <sub>`api.ogt` line 4450</sub>
894
980
 
895
981
  <a id="fn-circleGeometry"></a>
896
982
 
@@ -920,7 +1006,7 @@ fn circleGeometry {
920
1006
  }
921
1007
  ```
922
1008
 
923
- <sub>`api.ogt` line 4354</sub>
1009
+ <sub>`api.ogt` line 4457</sub>
924
1010
 
925
1011
  <a id="fn-tubeGeometry"></a>
926
1012
 
@@ -950,7 +1036,337 @@ fn tubeGeometry {
950
1036
  }
951
1037
  ```
952
1038
 
953
- <sub>`api.ogt` line 4361</sub>
1039
+ <sub>`api.ogt` line 4464</sub>
1040
+
1041
+ <a id="fn-shapeGeometry"></a>
1042
+
1043
+ ### `og.render.shapeGeometry`
1044
+
1045
+ Make a flat shape for og.Mesh (one-sided, as circleGeometry): an og.Shape with holes, or a points array. Physics can use it as a triangle-mesh Collider.mesh.
1046
+
1047
+ ```ts
1048
+ og.render.shapeGeometry(world: World, desc?: ShapeGeometryDesc): Result<Geometry>
1049
+ ```
1050
+
1051
+ | Parameter | Type | Optional | Doc |
1052
+ |---|---|---|---|
1053
+ | `world` | `World` | no | The world whose renderer owns the geometry. |
1054
+ | `desc` | `ShapeGeometryDesc` | yes | The shapes and their tessellation. |
1055
+
1056
+ **Returns** `Result<Geometry>`: Refused for a shape whose points are not finite or that triangulates to nothing.
1057
+
1058
+ Binding symbol `og_render_shape_geometry` · publish builds: kept
1059
+
1060
+ ```ogt
1061
+ fn shapeGeometry {
1062
+ doc "Make a flat shape for og.Mesh (one-sided, as circleGeometry): an og.Shape with holes, or a points array. Physics can use it as a triangle-mesh Collider.mesh."
1063
+ param world World "The world whose renderer owns the geometry."
1064
+ param desc ShapeGeometryDesc "The shapes and their tessellation."
1065
+ returns Result.Geometry "Refused for a shape whose points are not finite or that triangulates to nothing."
1066
+ }
1067
+ ```
1068
+
1069
+ <sub>`api.ogt` line 4701</sub>
1070
+
1071
+ <a id="fn-extrudeGeometry"></a>
1072
+
1073
+ ### `og.render.extrudeGeometry`
1074
+
1075
+ Make an extruded solid for og.Mesh: a three.js extrusion is a paste (`og.render.extrudeGeometry(world, { shapes: shape, depth: 0.2, bevelEnabled: true })`). Gears, signs, keys, logos, cookie cutters; along a path, a rail or a moulding.
1076
+
1077
+ ```ts
1078
+ og.render.extrudeGeometry(world: World, desc?: ExtrudeGeometryDesc): Result<Geometry>
1079
+ ```
1080
+
1081
+ | Parameter | Type | Optional | Doc |
1082
+ |---|---|---|---|
1083
+ | `world` | `World` | no | The world whose renderer owns the geometry. |
1084
+ | `desc` | `ExtrudeGeometryDesc` | yes | The shapes, depth, bevel and path. |
1085
+
1086
+ **Returns** `Result<Geometry>`: Refused for a shape whose points are not finite or that triangulates to nothing, or an extrudePath that is not alive.
1087
+
1088
+ Binding symbol `og_render_extrude_geometry` · publish builds: kept
1089
+
1090
+ ```ogt
1091
+ fn extrudeGeometry {
1092
+ doc "Make an extruded solid for og.Mesh: a three.js extrusion is a paste (`og.render.extrudeGeometry(world, { shapes: shape, depth: 0.2, bevelEnabled: true })`). Gears, signs, keys, logos, cookie cutters; along a path, a rail or a moulding."
1093
+ param world World "The world whose renderer owns the geometry."
1094
+ param desc ExtrudeGeometryDesc "The shapes, depth, bevel and path."
1095
+ returns Result.Geometry "Refused for a shape whose points are not finite or that triangulates to nothing, or an extrudePath that is not alive."
1096
+ }
1097
+ ```
1098
+
1099
+ <sub>`api.ogt` line 4708</sub>
1100
+
1101
+ <a id="fn-latheGeometry"></a>
1102
+
1103
+ ### `og.render.latheGeometry`
1104
+
1105
+ Make a solid of revolution for og.Mesh: a profile turned round +Y.
1106
+
1107
+ ```ts
1108
+ og.render.latheGeometry(world: World, desc?: LatheGeometryDesc): Result<Geometry>
1109
+ ```
1110
+
1111
+ | Parameter | Type | Optional | Doc |
1112
+ |---|---|---|---|
1113
+ | `world` | `World` | no | The world whose renderer owns the geometry. |
1114
+ | `desc` | `LatheGeometryDesc` | yes | The profile and the turn. |
1115
+
1116
+ **Returns** `Result<Geometry>`: Refused for fewer than two points or one that is not finite.
1117
+
1118
+ Binding symbol `og_render_lathe_geometry` · publish builds: kept
1119
+
1120
+ ```ogt
1121
+ fn latheGeometry {
1122
+ doc "Make a solid of revolution for og.Mesh: a profile turned round +Y."
1123
+ param world World "The world whose renderer owns the geometry."
1124
+ param desc LatheGeometryDesc "The profile and the turn."
1125
+ returns Result.Geometry "Refused for fewer than two points or one that is not finite."
1126
+ }
1127
+ ```
1128
+
1129
+ <sub>`api.ogt` line 4715</sub>
1130
+
1131
+ <a id="fn-polyhedronGeometry"></a>
1132
+
1133
+ ### `og.render.polyhedronGeometry`
1134
+
1135
+ Make a polyhedron from vertices and faces for og.Mesh, subdivided onto a sphere.
1136
+
1137
+ ```ts
1138
+ og.render.polyhedronGeometry(world: World, desc?: PolyhedronGeometryDesc): Result<Geometry>
1139
+ ```
1140
+
1141
+ | Parameter | Type | Optional | Doc |
1142
+ |---|---|---|---|
1143
+ | `world` | `World` | no | The world whose renderer owns the geometry. |
1144
+ | `desc` | `PolyhedronGeometryDesc` | yes | The vertices, faces, radius and detail. |
1145
+
1146
+ **Returns** `Result<Geometry>`: Refused for no faces, an index past the vertices, or a count that is not a multiple of three.
1147
+
1148
+ Binding symbol `og_render_polyhedron_geometry` · publish builds: kept
1149
+
1150
+ ```ogt
1151
+ fn polyhedronGeometry {
1152
+ doc "Make a polyhedron from vertices and faces for og.Mesh, subdivided onto a sphere."
1153
+ param world World "The world whose renderer owns the geometry."
1154
+ param desc PolyhedronGeometryDesc "The vertices, faces, radius and detail."
1155
+ returns Result.Geometry "Refused for no faces, an index past the vertices, or a count that is not a multiple of three."
1156
+ }
1157
+ ```
1158
+
1159
+ <sub>`api.ogt` line 4722</sub>
1160
+
1161
+ <a id="fn-icosahedronGeometry"></a>
1162
+
1163
+ ### `og.render.icosahedronGeometry`
1164
+
1165
+ Make an icosahedron (twenty faces) for og.Mesh; with detail, a geodesic sphere.
1166
+
1167
+ ```ts
1168
+ og.render.icosahedronGeometry(world: World, desc?: SolidGeometryDesc): Result<Geometry>
1169
+ ```
1170
+
1171
+ | Parameter | Type | Optional | Doc |
1172
+ |---|---|---|---|
1173
+ | `world` | `World` | no | The world whose renderer owns the geometry. |
1174
+ | `desc` | `SolidGeometryDesc` | yes | Its radius and detail. |
1175
+
1176
+ **Returns** `Result<Geometry>`.
1177
+
1178
+ Binding symbol `og_render_icosahedron_geometry` · publish builds: kept
1179
+
1180
+ ```ogt
1181
+ fn icosahedronGeometry {
1182
+ doc "Make an icosahedron (twenty faces) for og.Mesh; with detail, a geodesic sphere."
1183
+ param world World "The world whose renderer owns the geometry."
1184
+ param desc SolidGeometryDesc "Its radius and detail."
1185
+ returns Result.Geometry
1186
+ }
1187
+ ```
1188
+
1189
+ <sub>`api.ogt` line 4729</sub>
1190
+
1191
+ <a id="fn-dodecahedronGeometry"></a>
1192
+
1193
+ ### `og.render.dodecahedronGeometry`
1194
+
1195
+ Make a dodecahedron (twelve pentagons, thirty-six triangles) for og.Mesh.
1196
+
1197
+ ```ts
1198
+ og.render.dodecahedronGeometry(world: World, desc?: SolidGeometryDesc): Result<Geometry>
1199
+ ```
1200
+
1201
+ | Parameter | Type | Optional | Doc |
1202
+ |---|---|---|---|
1203
+ | `world` | `World` | no | The world whose renderer owns the geometry. |
1204
+ | `desc` | `SolidGeometryDesc` | yes | Its radius and detail. |
1205
+
1206
+ **Returns** `Result<Geometry>`.
1207
+
1208
+ Binding symbol `og_render_dodecahedron_geometry` · publish builds: kept
1209
+
1210
+ ```ogt
1211
+ fn dodecahedronGeometry {
1212
+ doc "Make a dodecahedron (twelve pentagons, thirty-six triangles) for og.Mesh."
1213
+ param world World "The world whose renderer owns the geometry."
1214
+ param desc SolidGeometryDesc "Its radius and detail."
1215
+ returns Result.Geometry
1216
+ }
1217
+ ```
1218
+
1219
+ <sub>`api.ogt` line 4736</sub>
1220
+
1221
+ <a id="fn-octahedronGeometry"></a>
1222
+
1223
+ ### `og.render.octahedronGeometry`
1224
+
1225
+ Make an octahedron (eight faces) for og.Mesh.
1226
+
1227
+ ```ts
1228
+ og.render.octahedronGeometry(world: World, desc?: SolidGeometryDesc): Result<Geometry>
1229
+ ```
1230
+
1231
+ | Parameter | Type | Optional | Doc |
1232
+ |---|---|---|---|
1233
+ | `world` | `World` | no | The world whose renderer owns the geometry. |
1234
+ | `desc` | `SolidGeometryDesc` | yes | Its radius and detail. |
1235
+
1236
+ **Returns** `Result<Geometry>`.
1237
+
1238
+ Binding symbol `og_render_octahedron_geometry` · publish builds: kept
1239
+
1240
+ ```ogt
1241
+ fn octahedronGeometry {
1242
+ doc "Make an octahedron (eight faces) for og.Mesh."
1243
+ param world World "The world whose renderer owns the geometry."
1244
+ param desc SolidGeometryDesc "Its radius and detail."
1245
+ returns Result.Geometry
1246
+ }
1247
+ ```
1248
+
1249
+ <sub>`api.ogt` line 4743</sub>
1250
+
1251
+ <a id="fn-tetrahedronGeometry"></a>
1252
+
1253
+ ### `og.render.tetrahedronGeometry`
1254
+
1255
+ Make a tetrahedron (four faces) for og.Mesh.
1256
+
1257
+ ```ts
1258
+ og.render.tetrahedronGeometry(world: World, desc?: SolidGeometryDesc): Result<Geometry>
1259
+ ```
1260
+
1261
+ | Parameter | Type | Optional | Doc |
1262
+ |---|---|---|---|
1263
+ | `world` | `World` | no | The world whose renderer owns the geometry. |
1264
+ | `desc` | `SolidGeometryDesc` | yes | Its radius and detail. |
1265
+
1266
+ **Returns** `Result<Geometry>`.
1267
+
1268
+ Binding symbol `og_render_tetrahedron_geometry` · publish builds: kept
1269
+
1270
+ ```ogt
1271
+ fn tetrahedronGeometry {
1272
+ doc "Make a tetrahedron (four faces) for og.Mesh."
1273
+ param world World "The world whose renderer owns the geometry."
1274
+ param desc SolidGeometryDesc "Its radius and detail."
1275
+ returns Result.Geometry
1276
+ }
1277
+ ```
1278
+
1279
+ <sub>`api.ogt` line 4750</sub>
1280
+
1281
+ <a id="fn-sweepGeometry"></a>
1282
+
1283
+ ### `og.render.sweepGeometry`
1284
+
1285
+ Make a section swept along a path for og.Mesh, tapered and twisted by keys.
1286
+
1287
+ ```ts
1288
+ og.render.sweepGeometry(world: World, desc?: SweepGeometryDesc): Result<Geometry>
1289
+ ```
1290
+
1291
+ | Parameter | Type | Optional | Doc |
1292
+ |---|---|---|---|
1293
+ | `world` | `World` | no | The world whose renderer owns the geometry. |
1294
+ | `desc` | `SweepGeometryDesc` | yes | The section, path, keys and caps. |
1295
+
1296
+ **Returns** `Result<Geometry>`: Refused for a path that is not alive, a section of fewer than three points or of no area, or a value that is not finite.
1297
+
1298
+ Binding symbol `og_render_sweep_geometry` · publish builds: kept
1299
+
1300
+ ```ogt
1301
+ fn sweepGeometry {
1302
+ doc "Make a section swept along a path for og.Mesh, tapered and twisted by keys."
1303
+ param world World "The world whose renderer owns the geometry."
1304
+ param desc SweepGeometryDesc "The section, path, keys and caps."
1305
+ returns Result.Geometry "Refused for a path that is not alive, a section of fewer than three points or of no area, or a value that is not finite."
1306
+ }
1307
+ ```
1308
+
1309
+ <sub>`api.ogt` line 4757</sub>
1310
+
1311
+ <a id="fn-csgGeometry"></a>
1312
+
1313
+ ### `og.render.csgGeometry`
1314
+
1315
+ Make the union, difference or intersection of two placed geometries for og.Mesh. Chain calls for more operands (a cube minus six spheres is six calls); each result is a geometry like any other.
1316
+
1317
+ ```ts
1318
+ og.render.csgGeometry(world: World, desc?: CsgGeometryDesc): Result<Geometry>
1319
+ ```
1320
+
1321
+ | Parameter | Type | Optional | Doc |
1322
+ |---|---|---|---|
1323
+ | `world` | `World` | no | The world whose renderer owns the geometry. |
1324
+ | `desc` | `CsgGeometryDesc` | yes | The operation and its operands. |
1325
+
1326
+ **Returns** `Result<Geometry>`: Refused for a dead geometry, a placement with a zero scale, or a position that is not finite.
1327
+
1328
+ Binding symbol `og_render_csg_geometry` · publish builds: kept
1329
+
1330
+ ```ogt
1331
+ fn csgGeometry {
1332
+ doc "Make the union, difference or intersection of two placed geometries for og.Mesh. Chain calls for more operands (a cube minus six spheres is six calls); each result is a geometry like any other."
1333
+ param world World "The world whose renderer owns the geometry."
1334
+ param desc CsgGeometryDesc "The operation and its operands."
1335
+ returns Result.Geometry "Refused for a dead geometry, a placement with a zero scale, or a position that is not finite."
1336
+ }
1337
+ ```
1338
+
1339
+ <sub>`api.ogt` line 4764</sub>
1340
+
1341
+ <a id="fn-mergeGeometries"></a>
1342
+
1343
+ ### `og.render.mergeGeometries`
1344
+
1345
+ Make one geometry of several placed ones for og.Mesh: one draw instead of many, mirrored halves, arrays.
1346
+
1347
+ ```ts
1348
+ og.render.mergeGeometries(world: World, desc?: MergeGeometriesDesc): Result<Geometry>
1349
+ ```
1350
+
1351
+ | Parameter | Type | Optional | Doc |
1352
+ |---|---|---|---|
1353
+ | `world` | `World` | no | The world whose renderer owns the geometry. |
1354
+ | `desc` | `MergeGeometriesDesc` | yes | The parts and their placements. |
1355
+
1356
+ **Returns** `Result<Geometry>`: Refused for no parts, a dead geometry, or a placement with a zero scale.
1357
+
1358
+ Binding symbol `og_render_merge_geometries` · publish builds: kept
1359
+
1360
+ ```ogt
1361
+ fn mergeGeometries {
1362
+ doc "Make one geometry of several placed ones for og.Mesh: one draw instead of many, mirrored halves, arrays."
1363
+ param world World "The world whose renderer owns the geometry."
1364
+ param desc MergeGeometriesDesc "The parts and their placements."
1365
+ returns Result.Geometry "Refused for no parts, a dead geometry, or a placement with a zero scale."
1366
+ }
1367
+ ```
1368
+
1369
+ <sub>`api.ogt` line 4771</sub>
954
1370
 
955
1371
  <a id="fn-lines"></a>
956
1372
 
@@ -980,7 +1396,7 @@ fn lines {
980
1396
  }
981
1397
  ```
982
1398
 
983
- <sub>`api.ogt` line 4419</sub>
1399
+ <sub>`api.ogt` line 4829</sub>
984
1400
 
985
1401
  <a id="fn-points"></a>
986
1402
 
@@ -1010,7 +1426,7 @@ fn points {
1010
1426
  }
1011
1427
  ```
1012
1428
 
1013
- <sub>`api.ogt` line 4454</sub>
1429
+ <sub>`api.ogt` line 4864</sub>
1014
1430
 
1015
1431
  <a id="fn-raycast"></a>
1016
1432
 
@@ -1042,7 +1458,7 @@ fn raycast {
1042
1458
  }
1043
1459
  ```
1044
1460
 
1045
- <sub>`api.ogt` line 4558</sub>
1461
+ <sub>`api.ogt` line 4968</sub>
1046
1462
 
1047
1463
  <a id="fn-renderTarget"></a>
1048
1464
 
@@ -1072,7 +1488,7 @@ fn renderTarget {
1072
1488
  }
1073
1489
  ```
1074
1490
 
1075
- <sub>`api.ogt` line 4614</sub>
1491
+ <sub>`api.ogt` line 5024</sub>
1076
1492
 
1077
1493
  <a id="fn-setPostParam"></a>
1078
1494
 
@@ -1106,13 +1522,13 @@ fn setPostParam {
1106
1522
  }
1107
1523
  ```
1108
1524
 
1109
- <sub>`api.ogt` line 4726</sub>
1525
+ <sub>`api.ogt` line 5136</sub>
1110
1526
 
1111
1527
  <a id="fn-postErrors"></a>
1112
1528
 
1113
1529
  ### `og.render.postErrors`
1114
1530
 
1115
- The custom post passes PostEffects.custom1 to custom8 name that failed to compile on this device, each skipped (the frame draws as without it). The cook validates every pass for each back end, so this is a device's own refusal.
1531
+ The custom post passes PostEffects.custom names that failed to compile on this device, each skipped (the frame draws as without it). The cook validates every pass for each back end, so this is a device's own refusal.
1116
1532
 
1117
1533
  ```ts
1118
1534
  og.render.postErrors(world: World): readonly PostError[]
@@ -1128,13 +1544,13 @@ Binding symbol `og_render_post_errors` · publish builds: kept
1128
1544
 
1129
1545
  ```ogt
1130
1546
  fn postErrors {
1131
- doc "The custom post passes PostEffects.custom1 to custom8 name that failed to compile on this device, each skipped (the frame draws as without it). The cook validates every pass for each back end, so this is a device's own refusal."
1547
+ doc "The custom post passes PostEffects.custom names that failed to compile on this device, each skipped (the frame draws as without it). The cook validates every pass for each back end, so this is a device's own refusal."
1132
1548
  param world World "The world asked."
1133
1549
  returns List.PostError
1134
1550
  }
1135
1551
  ```
1136
1552
 
1137
- <sub>`api.ogt` line 4741</sub>
1553
+ <sub>`api.ogt` line 5151</sub>
1138
1554
 
1139
1555
  <a id="fn-bakedLighting"></a>
1140
1556
 
@@ -1162,7 +1578,7 @@ fn bakedLighting {
1162
1578
  }
1163
1579
  ```
1164
1580
 
1165
- <sub>`api.ogt` line 4809</sub>
1581
+ <sub>`api.ogt` line 5219</sub>
1166
1582
 
1167
1583
  ## Components, resources and events
1168
1584
 
@@ -1220,7 +1636,7 @@ component Mesh {
1220
1636
  }
1221
1637
  ```
1222
1638
 
1223
- <sub>`api.ogt` line 2505</sub>
1639
+ <sub>`api.ogt` line 2512</sub>
1224
1640
 
1225
1641
  <a id="record-DirectionalLight"></a>
1226
1642
 
@@ -1275,7 +1691,7 @@ component DirectionalLight {
1275
1691
  }
1276
1692
  ```
1277
1693
 
1278
- <sub>`api.ogt` line 2535</sub>
1694
+ <sub>`api.ogt` line 2542</sub>
1279
1695
 
1280
1696
  <a id="record-PointLight"></a>
1281
1697
 
@@ -1318,7 +1734,7 @@ component PointLight {
1318
1734
  }
1319
1735
  ```
1320
1736
 
1321
- <sub>`api.ogt` line 2567</sub>
1737
+ <sub>`api.ogt` line 2574</sub>
1322
1738
 
1323
1739
  <a id="record-SpotLight"></a>
1324
1740
 
@@ -1372,13 +1788,13 @@ component SpotLight {
1372
1788
  }
1373
1789
  ```
1374
1790
 
1375
- <sub>`api.ogt` line 2588</sub>
1791
+ <sub>`api.ogt` line 2595</sub>
1376
1792
 
1377
1793
  <a id="record-RenderSettings"></a>
1378
1794
 
1379
1795
  ### `og.RenderSettings` (resource)
1380
1796
 
1381
- The frame's look after lighting: environment light, sky, bloom, exposure metering and tone mapping. Read after each tick; it never feeds back into the simulation. Camera.exposure is the manual exposure.
1797
+ The frame's look after lighting: environment light, sky, bloom, exposure metering and tone mapping, and what the frame may cost: the quality fields (rectShadows to msaaSamples) that og.render.applyQuality sets from a graphics preset. Read after each tick; it never feeds back into the simulation. Camera.exposure is the manual exposure.
1382
1798
 
1383
1799
  Token `og.RenderSettings`, registered under the schema name `og.RenderSettings`; its value type is `RenderSettings`.
1384
1800
 
@@ -1397,12 +1813,21 @@ Token `og.RenderSettings`, registered under the schema name `og.RenderSettings`;
1397
1813
  | `toneMapping` | `ToneMapping` | `"aces"` | — | — | — | Which curve tone maps the frame while toneMapped is true: aces (the default), agx or none. |
1398
1814
  | `exposure` | `number` | `1` | 0 … 16 | — | tunable | A multiplier on every camera's Camera.exposure, as three.js renderer.toneMappingExposure is one for the whole frame: a look's brightness without touching the cameras; 1 leaves them as they are. |
1399
1815
  | `decalAtlas` | `Texture` | `0` | — | — | — | The texture Decal components take their uvMin to uvMax region from; 0 draws decals as solid colour. |
1400
- | `lodBias` | `number` | `1` | 0 … 16 | — | tunable | A multiplier on every model's projected size when its level of detail is picked (og.Model.lodBias multiplies it again): 1 is the engine's choice, 2 keeps full meshes twice as far, 0.5 simplifies sooner; 0 draws every model at its full mesh. |
1816
+ | `lodBias` | `number` | `1` | 0 … 16 | — | tunable | A multiplier on every model's projected level-of-detail error when its level is picked (og.Model.lodBias multiplies it again): a level is drawn while its error, measured by the cook against the full mesh, covers less than a pixel on the screen. 1 is the engine's choice, 2 keeps full meshes twice as far, 0.5 simplifies sooner; 0 draws every model at its full mesh. |
1401
1817
  | `bakedLighting` | `boolean` | `true` | — | — | — | Draw the baked lighting of the scenes that have it (og bake lightmaps): static models with their lightmaps, everything else inside a LightVolume with its probes. False draws every scene as if unbaked, its ambient light from the sky or the environment map: to compare, or to see the realtime lights alone. |
1818
+ | `quality` | `QualityPreset` | `"none"` | — | — | — | The graphics preset og.render.applyQuality last wrote into the quality fields below (rectShadows to msaaSamples), or none. A record for the settings screen and the probe: the renderer reads the fields, never this, so a field the game sets after the preset is drawn as set. |
1819
+ | `rectShadows` | `boolean` | `true` | — | — | — | Rect lights whose castShadow is on cast their soft shadows; false draws every rect light unshadowed, each keeping its castShadow for when this is on again. The low preset turns it off: a rect light's shadow is the costliest light in the frame. |
1820
+ | `shadowedLights` | `number` | `8` | 0 … 8 | — | — | At most this many point, spot and rect lights cast shadows in a frame, the brightest at the camera kept (RenderCapabilities.shadowedLights caps it); 0 casts none. The directional light's cascades are not counted. |
1821
+ | `shadowMapScale` | `number` | `1` | 0.125 … 4 | — | — | The shadow maps at this fraction of their full side: the directional light's cascades (2048 texels by default) and the local lights' layers (512), each kept within 64 texels and the device's limit (4096 for the cascades). Changing it makes the maps again at the next frame; RenderCapabilities.shadowMapSize is the cascades' side drawn. |
1822
+ | `volumetricFog` | `boolean` | `true` | — | — | — | An og.VolumetricFog is drawn lit, with its light shafts; false draws the same medium as plain distance and height fog. |
1823
+ | `softParticles` | `boolean` | `true` | — | — | — | Particles with a softDistance fade against the scene behind them; false draws them hard-edged and asks no depth prepass for them. |
1824
+ | `screenSpaceReflections` | `boolean` | `true` | — | — | — | PostEffects.ssr draws (on the full tier); false leaves smooth surfaces the reflection probes' and the environment's reflection. PostEffects keeps its settings either way. |
1825
+ | `ambientOcclusion` | `boolean` | `true` | — | — | — | PostEffects.ao darkens creases; false draws none. PostEffects keeps its settings either way. |
1826
+ | `msaaSamples` | `number` | `4` | 1 … 4 | — | — | Samples per pixel where the antialiasing multisamples (msaa, the WebGL2 tier's choice; RenderCapabilities.antialias): 4, or 1, which draws FXAA instead. TAA, FXAA and no antialiasing take one sample whatever it says. Changing it makes the multisampled targets and pipelines again at the next frame. |
1402
1827
 
1403
1828
  ```ogt
1404
1829
  resource RenderSettings {
1405
- doc "The frame's look after lighting: environment light, sky, bloom, exposure metering and tone mapping. Read after each tick; it never feeds back into the simulation. Camera.exposure is the manual exposure."
1830
+ doc "The frame's look after lighting: environment light, sky, bloom, exposure metering and tone mapping, and what the frame may cost: the quality fields (rectShadows to msaaSamples) that og.render.applyQuality sets from a graphics preset. Read after each tick; it never feeds back into the simulation. Camera.exposure is the manual exposure."
1406
1831
  field environmentIntensity f32 "The strength of the image-based ambient light from the sky; og.Environment.intensity takes its place while an environment map is set." {
1407
1832
  default 0.55
1408
1833
  min 0
@@ -1448,7 +1873,7 @@ resource RenderSettings {
1448
1873
  tunable true
1449
1874
  }
1450
1875
  field decalAtlas Texture "The texture Decal components take their uvMin to uvMax region from; 0 draws decals as solid colour."
1451
- field lodBias f32 "A multiplier on every model's projected size when its level of detail is picked (og.Model.lodBias multiplies it again): 1 is the engine's choice, 2 keeps full meshes twice as far, 0.5 simplifies sooner; 0 draws every model at its full mesh." {
1876
+ field lodBias f32 "A multiplier on every model's projected level-of-detail error when its level is picked (og.Model.lodBias multiplies it again): a level is drawn while its error, measured by the cook against the full mesh, covers less than a pixel on the screen. 1 is the engine's choice, 2 keeps full meshes twice as far, 0.5 simplifies sooner; 0 draws every model at its full mesh." {
1452
1877
  default 1
1453
1878
  min 0
1454
1879
  max 16
@@ -1457,10 +1882,41 @@ resource RenderSettings {
1457
1882
  field bakedLighting bool "Draw the baked lighting of the scenes that have it (og bake lightmaps): static models with their lightmaps, everything else inside a LightVolume with its probes. False draws every scene as if unbaked, its ambient light from the sky or the environment map: to compare, or to see the realtime lights alone." {
1458
1883
  default true
1459
1884
  }
1885
+ field quality QualityPreset "The graphics preset og.render.applyQuality last wrote into the quality fields below (rectShadows to msaaSamples), or none. A record for the settings screen and the probe: the renderer reads the fields, never this, so a field the game sets after the preset is drawn as set."
1886
+ field rectShadows bool "Rect lights whose castShadow is on cast their soft shadows; false draws every rect light unshadowed, each keeping its castShadow for when this is on again. The low preset turns it off: a rect light's shadow is the costliest light in the frame." {
1887
+ default true
1888
+ }
1889
+ field shadowedLights u32 "At most this many point, spot and rect lights cast shadows in a frame, the brightest at the camera kept (RenderCapabilities.shadowedLights caps it); 0 casts none. The directional light's cascades are not counted." {
1890
+ default 8
1891
+ min 0
1892
+ max 8
1893
+ }
1894
+ field shadowMapScale f32 "The shadow maps at this fraction of their full side: the directional light's cascades (2048 texels by default) and the local lights' layers (512), each kept within 64 texels and the device's limit (4096 for the cascades). Changing it makes the maps again at the next frame; RenderCapabilities.shadowMapSize is the cascades' side drawn." {
1895
+ default 1
1896
+ min 0.125
1897
+ max 4
1898
+ }
1899
+ field volumetricFog bool "An og.VolumetricFog is drawn lit, with its light shafts; false draws the same medium as plain distance and height fog." {
1900
+ default true
1901
+ }
1902
+ field softParticles bool "Particles with a softDistance fade against the scene behind them; false draws them hard-edged and asks no depth prepass for them." {
1903
+ default true
1904
+ }
1905
+ field screenSpaceReflections bool "PostEffects.ssr draws (on the full tier); false leaves smooth surfaces the reflection probes' and the environment's reflection. PostEffects keeps its settings either way." {
1906
+ default true
1907
+ }
1908
+ field ambientOcclusion bool "PostEffects.ao darkens creases; false draws none. PostEffects keeps its settings either way." {
1909
+ default true
1910
+ }
1911
+ field msaaSamples u32 "Samples per pixel where the antialiasing multisamples (msaa, the WebGL2 tier's choice; RenderCapabilities.antialias): 4, or 1, which draws FXAA instead. TAA, FXAA and no antialiasing take one sample whatever it says. Changing it makes the multisampled targets and pipelines again at the next frame." {
1912
+ default 4
1913
+ min 1
1914
+ max 4
1915
+ }
1460
1916
  }
1461
1917
  ```
1462
1918
 
1463
- <sub>`api.ogt` line 2634</sub>
1919
+ <sub>`api.ogt` line 2663</sub>
1464
1920
 
1465
1921
  <a id="record-Environment"></a>
1466
1922
 
@@ -1500,7 +1956,7 @@ resource Environment {
1500
1956
  }
1501
1957
  ```
1502
1958
 
1503
- <sub>`api.ogt` line 2719</sub>
1959
+ <sub>`api.ogt` line 2779</sub>
1504
1960
 
1505
1961
  <a id="record-PostEffects"></a>
1506
1962
 
@@ -1565,14 +2021,7 @@ Token `og.PostEffects`, registered under the schema name `og.PostEffects`; its v
1565
2021
  | `ssrSteps` | `number` | `32` | 4 … 128 | — | — | Steps along each ray (a binary refinement follows the hit). |
1566
2022
  | `ssrFade` | `number` | `0.15` | 0 … 1 | `ratio` | — | The fraction of the screen's edge, and of the march's end, over which a reflection fades into the probes'. |
1567
2023
  | `ssrIntensity` | `number` | `1` | 0 … 1 | — | tunable | How much of the reflection is laid over the frame; 1 is physically weighted by the surface's Fresnel. |
1568
- | `custom1` | `Post` | `0` | — | — | — | The first custom post pass (og.load.post, a `type post` asset; 0 is none). PostEffects.custom1 to custom8 are an ordered list, as many as og-render runs (RenderCapabilities.maxCustomPosts): each runs over the one before it (the lit image for the first), after depth of field and motion blur and before exposure, bloom and the tone curve, and reads the lit image, depth and normals too (it turns the prepass on). Its parameters are set with og.render.setPostParam. A pass the device fails to compile is reported (og.render.postErrors) and skipped. |
1569
- | `custom2` | `Post` | `0` | — | — | — | The second custom post pass, over the first's output (0 skips the slot). |
1570
- | `custom3` | `Post` | `0` | — | — | — | The third custom post pass. |
1571
- | `custom4` | `Post` | `0` | — | — | — | The fourth custom post pass. |
1572
- | `custom5` | `Post` | `0` | — | — | — | The fifth custom post pass. |
1573
- | `custom6` | `Post` | `0` | — | — | — | The sixth custom post pass. |
1574
- | `custom7` | `Post` | `0` | — | — | — | The seventh custom post pass. |
1575
- | `custom8` | `Post` | `0` | — | — | — | The eighth and last custom post pass, over every one before it. |
2024
+ | `custom` | `readonly Post[]` | `[]` | — | — | a list of at most 8 `Post` (`List.Post.8`): reads a frozen copy, writes a whole array | The custom post passes, in order (og.load.post, `type post` assets): at most RenderCapabilities.maxCustomPosts (8, og-render's MAX_CUSTOM_POSTS). Each runs over the one before it (the lit image for the first), after depth of field and motion blur and before exposure, bloom and the tone curve, and reads the lit image, depth and normals too (any pass turns the prepass on). Write the whole list: `post.custom = [grade, crt]`, `post.custom = []`; a look gives it on one line (`custom "post/tint.ogt" "post/crt.ogt"`). A 0 in it is skipped. Its parameters are set with og.render.setPostParam. A pass the device fails to compile is reported (og.render.postErrors) and skipped. |
1576
2025
 
1577
2026
  ```ogt
1578
2027
  resource PostEffects {
@@ -1778,18 +2227,11 @@ resource PostEffects {
1778
2227
  max 1
1779
2228
  tunable true
1780
2229
  }
1781
- field custom1 Post "The first custom post pass (og.load.post, a `type post` asset; 0 is none). PostEffects.custom1 to custom8 are an ordered list, as many as og-render runs (RenderCapabilities.maxCustomPosts): each runs over the one before it (the lit image for the first), after depth of field and motion blur and before exposure, bloom and the tone curve, and reads the lit image, depth and normals too (it turns the prepass on). Its parameters are set with og.render.setPostParam. A pass the device fails to compile is reported (og.render.postErrors) and skipped."
1782
- field custom2 Post "The second custom post pass, over the first's output (0 skips the slot)."
1783
- field custom3 Post "The third custom post pass."
1784
- field custom4 Post "The fourth custom post pass."
1785
- field custom5 Post "The fifth custom post pass."
1786
- field custom6 Post "The sixth custom post pass."
1787
- field custom7 Post "The seventh custom post pass."
1788
- field custom8 Post "The eighth and last custom post pass, over every one before it."
2230
+ field custom List.Post.8 "The custom post passes, in order (og.load.post, `type post` assets): at most RenderCapabilities.maxCustomPosts (8, og-render's MAX_CUSTOM_POSTS). Each runs over the one before it (the lit image for the first), after depth of field and motion blur and before exposure, bloom and the tone curve, and reads the lit image, depth and normals too (any pass turns the prepass on). Write the whole list: `post.custom = [grade, crt]`, `post.custom = []`; a look gives it on one line (`custom \"post/tint.ogt\" \"post/crt.ogt\"`). A 0 in it is skipped. Its parameters are set with og.render.setPostParam. A pass the device fails to compile is reported (og.render.postErrors) and skipped."
1789
2231
  }
1790
2232
  ```
1791
2233
 
1792
- <sub>`api.ogt` line 2799</sub>
2234
+ <sub>`api.ogt` line 2873</sub>
1793
2235
 
1794
2236
  <a id="record-Stylise"></a>
1795
2237
 
@@ -2044,7 +2486,7 @@ resource Stylise {
2044
2486
  }
2045
2487
  ```
2046
2488
 
2047
- <sub>`api.ogt` line 3055</sub>
2489
+ <sub>`api.ogt` line 3129</sub>
2048
2490
 
2049
2491
  <a id="record-MaterialStyle"></a>
2050
2492
 
@@ -2109,7 +2551,7 @@ resource MaterialStyle {
2109
2551
  }
2110
2552
  ```
2111
2553
 
2112
- <sub>`api.ogt` line 3248</sub>
2554
+ <sub>`api.ogt` line 3322</sub>
2113
2555
 
2114
2556
  <a id="record-Lighting2D"></a>
2115
2557
 
@@ -2148,7 +2590,7 @@ resource Lighting2D {
2148
2590
  }
2149
2591
  ```
2150
2592
 
2151
- <sub>`api.ogt` line 3298</sub>
2593
+ <sub>`api.ogt` line 3372</sub>
2152
2594
 
2153
2595
  <a id="record-Light2D"></a>
2154
2596
 
@@ -2199,7 +2641,7 @@ component Light2D {
2199
2641
  }
2200
2642
  ```
2201
2643
 
2202
- <sub>`api.ogt` line 3317</sub>
2644
+ <sub>`api.ogt` line 3391</sub>
2203
2645
 
2204
2646
  <a id="record-Occluder2D"></a>
2205
2647
 
@@ -2230,7 +2672,7 @@ component Occluder2D {
2230
2672
  }
2231
2673
  ```
2232
2674
 
2233
- <sub>`api.ogt` line 3347</sub>
2675
+ <sub>`api.ogt` line 3421</sub>
2234
2676
 
2235
2677
  <a id="record-Decal"></a>
2236
2678
 
@@ -2285,7 +2727,7 @@ component Decal {
2285
2727
  }
2286
2728
  ```
2287
2729
 
2288
- <sub>`api.ogt` line 3361</sub>
2730
+ <sub>`api.ogt` line 3435</sub>
2289
2731
 
2290
2732
  <a id="record-ParticleSystem"></a>
2291
2733
 
@@ -2322,7 +2764,7 @@ component ParticleSystem {
2322
2764
  }
2323
2765
  ```
2324
2766
 
2325
- <sub>`api.ogt` line 3395</sub>
2767
+ <sub>`api.ogt` line 3469</sub>
2326
2768
 
2327
2769
  <a id="record-Trail"></a>
2328
2770
 
@@ -2398,7 +2840,7 @@ component Trail {
2398
2840
  }
2399
2841
  ```
2400
2842
 
2401
- <sub>`api.ogt` line 3411</sub>
2843
+ <sub>`api.ogt` line 3485</sub>
2402
2844
 
2403
2845
  <a id="record-Beam"></a>
2404
2846
 
@@ -2464,13 +2906,13 @@ component Beam {
2464
2906
  }
2465
2907
  ```
2466
2908
 
2467
- <sub>`api.ogt` line 3459</sub>
2909
+ <sub>`api.ogt` line 3533</sub>
2468
2910
 
2469
2911
  <a id="record-Sprite"></a>
2470
2912
 
2471
2913
  ### `og.Sprite` (component)
2472
2914
 
2473
- 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.
2915
+ 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.
2474
2916
 
2475
2917
  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.
2476
2918
 
@@ -2490,6 +2932,7 @@ Token `og.Sprite`, registered under the schema name `og.Sprite`; its value type
2490
2932
  | `uvMax` | `Vector2` | `{ x: 1, y: 1 }` | — | — | — | The texture region's bottom-right corner, v down. |
2491
2933
  | `layer` | `number` | `0` | — | — | — | Draw order among sprites, tiles and text; higher draws on top. |
2492
2934
  | `sortY` | `boolean` | `false` | — | — | — | Within its layer, lower y draws in front: top-down characters, props and trees overlap by their feet. |
2935
+ | `facing` | `SpriteFacing` | `"none"` | — | — | — | 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. |
2493
2936
  | `flipX` | `boolean` | `false` | — | — | — | Mirror left to right (a character facing left). |
2494
2937
  | `flipY` | `boolean` | `false` | — | — | — | Mirror top to bottom. |
2495
2938
  | `flash` | `number` | `0` | 0 … 1 | — | tunable | A hit flash: the colour mixed towards flashColor by this much (og.tween.flash fades it out). |
@@ -2511,7 +2954,7 @@ Token `og.Sprite`, registered under the schema name `og.Sprite`; its value type
2511
2954
 
2512
2955
  ```ogt
2513
2956
  component Sprite {
2514
- doc "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."
2957
+ doc "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."
2515
2958
  doc "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."
2516
2959
  field texture Texture "The texture (og.load.texture); 0 draws a solid quad of the colour."
2517
2960
  field array TextureArray "Draw from a layer of this texture array (og.load.textureArray) instead of `texture`; 0 uses `texture`. Every sprite of one array is one draw whichever layer each shows. While the array's streaming group is not resident the sprite draws nothing."
@@ -2546,6 +2989,7 @@ component Sprite {
2546
2989
  }
2547
2990
  field layer i32 "Draw order among sprites, tiles and text; higher draws on top."
2548
2991
  field sortY bool "Within its layer, lower y draws in front: top-down characters, props and trees overlap by their feet."
2992
+ field facing SpriteFacing "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."
2549
2993
  field flipX bool "Mirror left to right (a character facing left)."
2550
2994
  field flipY bool "Mirror top to bottom."
2551
2995
  field flash f32 "A hit flash: the colour mixed towards flashColor by this much (og.tween.flash fades it out)." {
@@ -2599,7 +3043,7 @@ component Sprite {
2599
3043
  }
2600
3044
  ```
2601
3045
 
2602
- <sub>`api.ogt` line 3667</sub>
3046
+ <sub>`api.ogt` line 3742</sub>
2603
3047
 
2604
3048
  <a id="record-Afterimage"></a>
2605
3049
 
@@ -2647,7 +3091,7 @@ component Afterimage {
2647
3091
  }
2648
3092
  ```
2649
3093
 
2650
- <sub>`api.ogt` line 3755</sub>
3094
+ <sub>`api.ogt` line 3831</sub>
2651
3095
 
2652
3096
  <a id="record-ReflectionProbe"></a>
2653
3097
 
@@ -2700,7 +3144,7 @@ component ReflectionProbe {
2700
3144
  }
2701
3145
  ```
2702
3146
 
2703
- <sub>`api.ogt` line 3978</sub>
3147
+ <sub>`api.ogt` line 4056</sub>
2704
3148
 
2705
3149
  <a id="record-Lines"></a>
2706
3150
 
@@ -2763,7 +3207,7 @@ component Lines {
2763
3207
  }
2764
3208
  ```
2765
3209
 
2766
- <sub>`api.ogt` line 4461</sub>
3210
+ <sub>`api.ogt` line 4871</sub>
2767
3211
 
2768
3212
  <a id="record-Points"></a>
2769
3213
 
@@ -2817,7 +3261,7 @@ component Points {
2817
3261
  }
2818
3262
  ```
2819
3263
 
2820
- <sub>`api.ogt` line 4498</sub>
3264
+ <sub>`api.ogt` line 4908</sub>
2821
3265
 
2822
3266
  <a id="record-CameraView"></a>
2823
3267
 
@@ -2924,7 +3368,7 @@ component CameraView {
2924
3368
  }
2925
3369
  ```
2926
3370
 
2927
- <sub>`api.ogt` line 4621</sub>
3371
+ <sub>`api.ogt` line 5031</sub>
2928
3372
 
2929
3373
  <a id="record-Mirror"></a>
2930
3374
 
@@ -2969,7 +3413,7 @@ component Mirror {
2969
3413
  }
2970
3414
  ```
2971
3415
 
2972
- <sub>`api.ogt` line 4693</sub>
3416
+ <sub>`api.ogt` line 5103</sub>
2973
3417
 
2974
3418
  <a id="record-RectLight"></a>
2975
3419
 
@@ -3019,7 +3463,7 @@ component RectLight {
3019
3463
  }
3020
3464
  ```
3021
3465
 
3022
- <sub>`api.ogt` line 4755</sub>
3466
+ <sub>`api.ogt` line 5165</sub>
3023
3467
 
3024
3468
  <a id="record-LightVolume"></a>
3025
3469
 
@@ -3053,7 +3497,7 @@ component LightVolume {
3053
3497
  }
3054
3498
  ```
3055
3499
 
3056
- <sub>`api.ogt` line 4782</sub>
3500
+ <sub>`api.ogt` line 5192</sub>
3057
3501
 
3058
3502
  ## Types
3059
3503
 
@@ -3069,7 +3513,7 @@ A generational handle: a number the engine hands out. A dead handle is an error
3069
3513
  handle Geometry "Vertex and index data, as three.js BufferGeometry. Comes from a loaded glTF."
3070
3514
  ```
3071
3515
 
3072
- <sub>`api.ogt` line 2241</sub>
3516
+ <sub>`api.ogt` line 2248</sub>
3073
3517
 
3074
3518
  <a id="type-Material"></a>
3075
3519
 
@@ -3083,7 +3527,7 @@ A generational handle: a number the engine hands out. A dead handle is an error
3083
3527
  handle Material "A material instance."
3084
3528
  ```
3085
3529
 
3086
- <sub>`api.ogt` line 2242</sub>
3530
+ <sub>`api.ogt` line 2249</sub>
3087
3531
 
3088
3532
  <a id="type-Texture"></a>
3089
3533
 
@@ -3097,7 +3541,7 @@ A generational handle: a number the engine hands out. A dead handle is an error
3097
3541
  handle Texture "A cooked texture."
3098
3542
  ```
3099
3543
 
3100
- <sub>`api.ogt` line 2243</sub>
3544
+ <sub>`api.ogt` line 2250</sub>
3101
3545
 
3102
3546
  <a id="type-Side"></a>
3103
3547
 
@@ -3122,7 +3566,7 @@ enum Side {
3122
3566
  }
3123
3567
  ```
3124
3568
 
3125
- <sub>`api.ogt` line 2259</sub>
3569
+ <sub>`api.ogt` line 2266</sub>
3126
3570
 
3127
3571
  <a id="type-RenderTier"></a>
3128
3572
 
@@ -3153,7 +3597,7 @@ enum RenderTier {
3153
3597
  }
3154
3598
  ```
3155
3599
 
3156
- <sub>`api.ogt` line 2266</sub>
3600
+ <sub>`api.ogt` line 2273</sub>
3157
3601
 
3158
3602
  <a id="type-Antialias"></a>
3159
3603
 
@@ -3182,7 +3626,7 @@ enum Antialias {
3182
3626
  }
3183
3627
  ```
3184
3628
 
3185
- <sub>`api.ogt` line 2276</sub>
3629
+ <sub>`api.ogt` line 2283</sub>
3186
3630
 
3187
3631
  <a id="type-PointShadows"></a>
3188
3632
 
@@ -3207,7 +3651,7 @@ enum PointShadows {
3207
3651
  }
3208
3652
  ```
3209
3653
 
3210
- <sub>`api.ogt` line 2285</sub>
3654
+ <sub>`api.ogt` line 2292</sub>
3211
3655
 
3212
3656
  <a id="type-TaaHistory"></a>
3213
3657
 
@@ -3230,7 +3674,7 @@ enum TaaHistory {
3230
3674
  }
3231
3675
  ```
3232
3676
 
3233
- <sub>`api.ogt` line 2292</sub>
3677
+ <sub>`api.ogt` line 2299</sub>
3234
3678
 
3235
3679
  <a id="type-DebugView"></a>
3236
3680
 
@@ -3259,7 +3703,7 @@ enum DebugView {
3259
3703
  }
3260
3704
  ```
3261
3705
 
3262
- <sub>`api.ogt` line 2298</sub>
3706
+ <sub>`api.ogt` line 2305</sub>
3263
3707
 
3264
3708
  <a id="type-RenderOptions"></a>
3265
3709
 
@@ -3299,7 +3743,7 @@ struct RenderOptions {
3299
3743
  }
3300
3744
  ```
3301
3745
 
3302
- <sub>`api.ogt` line 2307</sub>
3746
+ <sub>`api.ogt` line 2314</sub>
3303
3747
 
3304
3748
  <a id="type-StandardMaterialDesc"></a>
3305
3749
 
@@ -3569,7 +4013,7 @@ struct StandardMaterialDesc {
3569
4013
  }
3570
4014
  ```
3571
4015
 
3572
- <sub>`api.ogt` line 2326</sub>
4016
+ <sub>`api.ogt` line 2333</sub>
3573
4017
 
3574
4018
  <a id="type-ToneMapping"></a>
3575
4019
 
@@ -3594,7 +4038,59 @@ enum ToneMapping {
3594
4038
  }
3595
4039
  ```
3596
4040
 
3597
- <sub>`api.ogt` line 2620</sub>
4041
+ <sub>`api.ogt` line 2627</sub>
4042
+
4043
+ <a id="type-GraphicsQuality"></a>
4044
+
4045
+ ### `GraphicsQuality` (enum)
4046
+
4047
+ A graphics preset: a row of RenderSettings' quality fields that og.render.applyQuality writes (its doc has the table). The settings screen (og.ui.settingsScreen) offers the three.
4048
+
4049
+ A string: one of the variants below. The zero value is `"medium"`.
4050
+
4051
+ | Variant | Doc |
4052
+ |---|---|
4053
+ | `"medium"` | The full frame: every quality field at its default. |
4054
+ | `"low"` | The cheapest frame: no rect-light shadows, two shadowed lights, half-size shadow maps, plain fog, hard particles, no screen-space reflections or ambient occlusion, FXAA for MSAA. |
4055
+ | `"high"` | The full frame with the shadow maps at twice their side. |
4056
+
4057
+ ```ogt
4058
+ enum GraphicsQuality {
4059
+ doc "A graphics preset: a row of RenderSettings' quality fields that og.render.applyQuality writes (its doc has the table). The settings screen (og.ui.settingsScreen) offers the three."
4060
+ variant medium "The full frame: every quality field at its default."
4061
+ variant low "The cheapest frame: no rect-light shadows, two shadowed lights, half-size shadow maps, plain fog, hard particles, no screen-space reflections or ambient occlusion, FXAA for MSAA."
4062
+ variant high "The full frame with the shadow maps at twice their side."
4063
+ }
4064
+ ```
4065
+
4066
+ <sub>`api.ogt` line 2641</sub>
4067
+
4068
+ <a id="type-QualityPreset"></a>
4069
+
4070
+ ### `QualityPreset` (enum)
4071
+
4072
+ The preset RenderSettings' quality fields were last written with (RenderSettings.quality).
4073
+
4074
+ A string: one of the variants below. The zero value is `"none"`.
4075
+
4076
+ | Variant | Doc |
4077
+ |---|---|
4078
+ | `"none"` | No preset applied: the fields are their defaults or the game's own. |
4079
+ | `"low"` | og.render.applyQuality(world, "low"). |
4080
+ | `"medium"` | og.render.applyQuality(world, "medium"). |
4081
+ | `"high"` | og.render.applyQuality(world, "high"). |
4082
+
4083
+ ```ogt
4084
+ enum QualityPreset {
4085
+ doc "The preset RenderSettings' quality fields were last written with (RenderSettings.quality)."
4086
+ variant none "No preset applied: the fields are their defaults or the game's own."
4087
+ variant low "og.render.applyQuality(world, \"low\")."
4088
+ variant medium "og.render.applyQuality(world, \"medium\")."
4089
+ variant high "og.render.applyQuality(world, \"high\")."
4090
+ }
4091
+ ```
4092
+
4093
+ <sub>`api.ogt` line 2648</sub>
3598
4094
 
3599
4095
  <a id="type-Lut"></a>
3600
4096
 
@@ -3608,7 +4104,7 @@ A generational handle: a number the engine hands out. A dead handle is an error
3608
4104
  handle Lut "A colour lookup table for PostEffects.lut, from og.load.lut (a `.cube` file)."
3609
4105
  ```
3610
4106
 
3611
- <sub>`api.ogt` line 2694</sub>
4107
+ <sub>`api.ogt` line 2754</sub>
3612
4108
 
3613
4109
  <a id="type-EnvironmentMap"></a>
3614
4110
 
@@ -3622,7 +4118,7 @@ A generational handle: a number the engine hands out. A dead handle is an error
3622
4118
  handle EnvironmentMap "A prefiltered HDR environment map for Environment.map, from og.load.environment (an `.ogt` of `type environment` naming an equirectangular `.hdr` or `.exr`, a KTX2 cube map, or six face images)."
3623
4119
  ```
3624
4120
 
3625
- <sub>`api.ogt` line 2695</sub>
4121
+ <sub>`api.ogt` line 2755</sub>
3626
4122
 
3627
4123
  <a id="type-ParticleEmitter"></a>
3628
4124
 
@@ -3636,7 +4132,7 @@ A generational handle: a number the engine hands out. A dead handle is an error
3636
4132
  handle ParticleEmitter "A particle emitter asset for ParticleSystem.emitter, from og.load.emitter (an `.ogt` of `type particles`)."
3637
4133
  ```
3638
4134
 
3639
- <sub>`api.ogt` line 2696</sub>
4135
+ <sub>`api.ogt` line 2756</sub>
3640
4136
 
3641
4137
  <a id="type-AoMethod"></a>
3642
4138
 
@@ -3661,7 +4157,7 @@ enum AoMethod {
3661
4157
  }
3662
4158
  ```
3663
4159
 
3664
- <sub>`api.ogt` line 2746</sub>
4160
+ <sub>`api.ogt` line 2806</sub>
3665
4161
 
3666
4162
  <a id="type-DofQuality"></a>
3667
4163
 
@@ -3684,7 +4180,7 @@ enum DofQuality {
3684
4180
  }
3685
4181
  ```
3686
4182
 
3687
- <sub>`api.ogt` line 2760</sub>
4183
+ <sub>`api.ogt` line 2820</sub>
3688
4184
 
3689
4185
  <a id="type-SpriteBlend"></a>
3690
4186
 
@@ -3707,7 +4203,32 @@ enum SpriteBlend {
3707
4203
  }
3708
4204
  ```
3709
4205
 
3710
- <sub>`api.ogt` line 2773</sub>
4206
+ <sub>`api.ogt` line 2833</sub>
4207
+
4208
+ <a id="type-SpriteFacing"></a>
4209
+
4210
+ ### `SpriteFacing` (enum)
4211
+
4212
+ 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.
4213
+
4214
+ A string: one of the variants below. The zero value is `"none"`.
4215
+
4216
+ | Variant | Doc |
4217
+ |---|---|
4218
+ | `"none"` | In the world's xy plane facing +z, as every sprite before billboards. |
4219
+ | `"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). |
4220
+ | `"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. |
4221
+
4222
+ ```ogt
4223
+ enum SpriteFacing {
4224
+ doc "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."
4225
+ variant none "In the world's xy plane facing +z, as every sprite before billboards."
4226
+ variant 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)."
4227
+ variant 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."
4228
+ }
4229
+ ```
4230
+
4231
+ <sub>`api.ogt` line 2846</sub>
3711
4232
 
3712
4233
  <a id="type-StripBlend"></a>
3713
4234
 
@@ -3730,7 +4251,7 @@ enum StripBlend {
3730
4251
  }
3731
4252
  ```
3732
4253
 
3733
- <sub>`api.ogt` line 2786</sub>
4254
+ <sub>`api.ogt` line 2860</sub>
3734
4255
 
3735
4256
  <a id="type-Palette"></a>
3736
4257
 
@@ -3744,7 +4265,7 @@ A generational handle: a number the engine hands out. A dead handle is an error
3744
4265
  handle Palette "A colour palette for Stylise.palette, from og.load.palette (a `.hex` or GIMP `.gpl` file of up to 256 colours)."
3745
4266
  ```
3746
4267
 
3747
- <sub>`api.ogt` line 3014</sub>
4268
+ <sub>`api.ogt` line 3081</sub>
3748
4269
 
3749
4270
  <a id="type-Look"></a>
3750
4271
 
@@ -3758,7 +4279,7 @@ A generational handle: a number the engine hands out. A dead handle is an error
3758
4279
  handle Look "A look from og.load.look (an `.ogt` of `type look`): the frame's whole art direction as data, applied with og.render.applyLook."
3759
4280
  ```
3760
4281
 
3761
- <sub>`api.ogt` line 3015</sub>
4282
+ <sub>`api.ogt` line 3082</sub>
3762
4283
 
3763
4284
  <a id="type-DitherPattern"></a>
3764
4285
 
@@ -3789,7 +4310,7 @@ enum DitherPattern {
3789
4310
  }
3790
4311
  ```
3791
4312
 
3792
- <sub>`api.ogt` line 3024</sub>
4313
+ <sub>`api.ogt` line 3098</sub>
3793
4314
 
3794
4315
  <a id="type-StyliseSpace"></a>
3795
4316
 
@@ -3814,7 +4335,7 @@ enum StyliseSpace {
3814
4335
  }
3815
4336
  ```
3816
4337
 
3817
- <sub>`api.ogt` line 3041</sub>
4338
+ <sub>`api.ogt` line 3115</sub>
3818
4339
 
3819
4340
  <a id="type-LookInfo"></a>
3820
4341
 
@@ -3845,7 +4366,7 @@ struct LookInfo {
3845
4366
  }
3846
4367
  ```
3847
4368
 
3848
- <sub>`api.ogt` line 3287</sub>
4369
+ <sub>`api.ogt` line 3361</sub>
3849
4370
 
3850
4371
  <a id="type-RibbonPoint"></a>
3851
4372
 
@@ -3885,7 +4406,7 @@ struct RibbonPoint {
3885
4406
  }
3886
4407
  ```
3887
4408
 
3888
- <sub>`api.ogt` line 3499</sub>
4409
+ <sub>`api.ogt` line 3573</sub>
3889
4410
 
3890
4411
  <a id="type-RibbonDesc"></a>
3891
4412
 
@@ -3916,7 +4437,7 @@ struct RibbonDesc {
3916
4437
  }
3917
4438
  ```
3918
4439
 
3919
- <sub>`api.ogt` line 3520</sub>
4440
+ <sub>`api.ogt` line 3594</sub>
3920
4441
 
3921
4442
  <a id="type-TextDesc"></a>
3922
4443
 
@@ -3978,7 +4499,7 @@ struct TextDesc {
3978
4499
  }
3979
4500
  ```
3980
4501
 
3981
- <sub>`api.ogt` line 3539</sub>
4502
+ <sub>`api.ogt` line 3613</sub>
3982
4503
 
3983
4504
  <a id="type-TextMeasureDesc"></a>
3984
4505
 
@@ -4007,7 +4528,7 @@ struct TextMeasureDesc {
4007
4528
  }
4008
4529
  ```
4009
4530
 
4010
- <sub>`api.ogt` line 3573</sub>
4531
+ <sub>`api.ogt` line 3647</sub>
4011
4532
 
4012
4533
  <a id="type-TextMetrics"></a>
4013
4534
 
@@ -4030,13 +4551,13 @@ struct TextMetrics {
4030
4551
  }
4031
4552
  ```
4032
4553
 
4033
- <sub>`api.ogt` line 3584</sub>
4554
+ <sub>`api.ogt` line 3658</sub>
4034
4555
 
4035
4556
  <a id="type-SpriteDesc"></a>
4036
4557
 
4037
4558
  ### `SpriteDesc` (desc struct)
4038
4559
 
4039
- 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.
4560
+ 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.
4040
4561
 
4041
4562
  A desc: every field may be omitted and takes its default; `{}` is valid.
4042
4563
 
@@ -4062,6 +4583,7 @@ A desc: every field may be omitted and takes its default; `{}` is valid.
4062
4583
  | `dropShadow` | `number` | `0` | 0 … 1 | — | — | A drop shadow this dark (0 none, 0.5 typical): the sprite's shape in black, flattened along the sun (the first og.DirectionalLight) onto the ground under it (dropShadowHeight, or the og.Terrain there), drawn before every sprite of its layer: pixel sprites standing in a 3D set cast shadows that agree with it. Where the ground already lies in the sun's cascaded shadow the drop shadow fades, so a shadow inside a shadow is no darker. None with the sun below the horizon; at most five times the sprite's height long under a low one. World sprites with a perspective camera over the xz ground; a 2D camera sees the ground edge on. |
4063
4584
  | `dropShadowHeight` | `number` | `0` | — | `m` | — | The height of the level ground the drop shadow lies on (a floor, a deck, a step). Where an og.Terrain under the sprite's anchor is higher, the shadow lies on the terrain instead, on the plane fitted to its slope under the shadow, or bent over a hollow or a ridge narrower than the shadow (the terrain's heights under a 4 x 2 grid of the shadow's cells). 0 with no terrain is the ground plane y = 0. |
4064
4585
  | `toneMapped` | `boolean` | `true` | — | — | — | As three.js Material.toneMapped: true draws the sprite into the lit scene, carried by exposure (auto exposure included), bloom and the tone curve like any surface. false keeps its colours as given: still placed in the world, depth tested and sorted with the other sprites, but shown unexposed and uncurved (clamped to 0 to 1), outside bloom and fog; the grade, vignette, grain and screen flash still apply. For world UI that must read the same at noon and at dusk: speech bubbles, name tags, markers. Alpha blending only: an additive sprite adds light and is always tone mapped. |
4586
+ | `facing` | `SpriteFacing` | `"none"` | — | — | — | 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. |
4065
4587
  | `flipX` | `boolean` | `false` | — | — | — | Mirror the region left to right. |
4066
4588
  | `flipY` | `boolean` | `false` | — | — | — | Mirror the region top to bottom. |
4067
4589
  | `sortY` | `boolean` | `false` | — | — | — | Within its layer, draw by y: lower on the screen draws in front (top-down games). |
@@ -4072,7 +4594,7 @@ A desc: every field may be omitted and takes its default; `{}` is valid.
4072
4594
 
4073
4595
  ```ogt
4074
4596
  struct SpriteDesc {
4075
- doc "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."
4597
+ doc "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."
4076
4598
  desc true
4077
4599
  field texture Option.Texture "The texture from og.load.texture; null draws a solid quad of the colour."
4078
4600
  field array Option.TextureArray "Draw from a layer of this texture array (og.load.textureArray) instead of `texture`: every sprite of one array is one draw whichever layer each shows, so a flipbook's frames packed as layers batch across frames. World and screen sprites alike, with flash, glow, blend and 2D lighting as a textured sprite. null uses `texture`."
@@ -4128,6 +4650,7 @@ struct SpriteDesc {
4128
4650
  field toneMapped bool "As three.js Material.toneMapped: true draws the sprite into the lit scene, carried by exposure (auto exposure included), bloom and the tone curve like any surface. false keeps its colours as given: still placed in the world, depth tested and sorted with the other sprites, but shown unexposed and uncurved (clamped to 0 to 1), outside bloom and fog; the grade, vignette, grain and screen flash still apply. For world UI that must read the same at noon and at dusk: speech bubbles, name tags, markers. Alpha blending only: an additive sprite adds light and is always tone mapped." {
4129
4651
  default true
4130
4652
  }
4653
+ field facing SpriteFacing "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."
4131
4654
  field flipX bool "Mirror the region left to right."
4132
4655
  field flipY bool "Mirror the region top to bottom."
4133
4656
  field sortY bool "Within its layer, draw by y: lower on the screen draws in front (top-down games)."
@@ -4141,7 +4664,7 @@ struct SpriteDesc {
4141
4664
  }
4142
4665
  ```
4143
4666
 
4144
- <sub>`api.ogt` line 3591</sub>
4667
+ <sub>`api.ogt` line 3665</sub>
4145
4668
 
4146
4669
  <a id="type-FloatingTextDesc"></a>
4147
4670
 
@@ -4229,7 +4752,7 @@ struct FloatingTextDesc {
4229
4752
  }
4230
4753
  ```
4231
4754
 
4232
- <sub>`api.ogt` line 3782</sub>
4755
+ <sub>`api.ogt` line 3858</sub>
4233
4756
 
4234
4757
  <a id="type-BoxGeometryDesc"></a>
4235
4758
 
@@ -4271,7 +4794,7 @@ struct BoxGeometryDesc {
4271
4794
  }
4272
4795
  ```
4273
4796
 
4274
- <sub>`api.ogt` line 3854</sub>
4797
+ <sub>`api.ogt` line 3930</sub>
4275
4798
 
4276
4799
  <a id="type-PlaneGeometryDesc"></a>
4277
4800
 
@@ -4307,7 +4830,7 @@ struct PlaneGeometryDesc {
4307
4830
  }
4308
4831
  ```
4309
4832
 
4310
- <sub>`api.ogt` line 3877</sub>
4833
+ <sub>`api.ogt` line 3953</sub>
4311
4834
 
4312
4835
  <a id="type-SphereGeometryDesc"></a>
4313
4836
 
@@ -4347,7 +4870,7 @@ struct SphereGeometryDesc {
4347
4870
  }
4348
4871
  ```
4349
4872
 
4350
- <sub>`api.ogt` line 3895</sub>
4873
+ <sub>`api.ogt` line 3971</sub>
4351
4874
 
4352
4875
  <a id="type-RenderCapabilities"></a>
4353
4876
 
@@ -4370,11 +4893,13 @@ What the renderer can do on this device. Backend limits are reported here, never
4370
4893
  | `reflectionProbes` | `number` | `0` | — | — | — | How many og.ReflectionProbe components one frame samples (MAX_REFLECTION_PROBES on every tier). |
4371
4894
  | `renderTargetDepth` | `boolean` | `false` | — | — | — | Whether a render target made with `depth` gets its view's depth drawn: true on every tier with a renderer (WebGPU, Vulkan, Metal and WebGL2 alike), false without one. The depth comes from the view's own depth prepass of its opaque meshes into a linear-depth colour target, never from its depth buffer, which WebGL2 cannot read in a shader. |
4372
4895
  | `maxRenderTargetSize` | `number` | `0` | — | — | — | The largest side of a render target (the device's largest 2D texture). |
4373
- | `maxCustomPosts` | `number` | `0` | — | — | — | The most custom post passes a frame runs: 8 on every tier, PostEffects.custom1 to custom8 (numbered fields, as a reflected record has no list field). |
4896
+ | `maxCustomPosts` | `number` | `0` | — | — | — | The most custom post passes a frame runs: 8 on every tier, PostEffects.custom's capacity. |
4374
4897
  | `volumetricFog` | `VolumetricFog` | `"froxel"` | — | — | — | How Fog.volumetric is drawn on this device: a froxel grid (the full tier) or a raymarch along each pixel's view ray (WebGL2), each lit by the sun through its shadows and by the point, spot and rect lights around each sample (up to volumetricLights of them) through their shadows and cookies. |
4375
4898
  | `volumetricLights` | `number` | `0` | — | — | — | The most point, spot and rect lights that light one sample of Fog.volumetric: those of its screen cluster, MAX_CLUSTER_LIGHTS (64) in the froxel grid, 8 in WebGL2's raymarch, the brightest at the camera first. |
4376
4899
  | `maxLightCookies` | `number` | `0` | — | — | — | The most light cookie layers one frame draws (24 on every tier): a SpotLight.cookie takes one, a PointLight.cookie six (its cube's faces), and a texture several lights of one kind share takes its layers once. Cookies past it, in the order of their lights' entities, are not drawn: those lights shine without them, and the log names them in a warning. |
4377
- | `gpuTimestamps` | `boolean` | `false` | — | — | — | Whether the device times each render pass on the GPU (timestamp queries: Vulkan, Metal and D3D12 adapters that have them, WebGPU with `timestamp-query`; never WebGL2): ProbeTimings.gpuPasses and the trace's gpu thread are filled only where it is true. |
4900
+ | `gpuTimestamps` | `boolean` | `false` | — | — | — | Whether the device times each render pass on the GPU (timestamp queries: Vulkan, Metal and D3D12 adapters that have them, WebGPU with `timestamp-query`; never WebGL2, and never in a publish build, which leaves the queries out): ProbeTimings.gpuPasses and the trace's gpu thread are filled only where it is true. |
4901
+ | `spriteAnisotropy` | `number` | `0` | — | — | — | The anisotropic filtering of sprites and og.ui's images (text is not filtered anisotropically: its distance field would lose its edge): 16 where the device filters anisotropically (WebGPU, Vulkan, Metal, WebGL2 with EXT_texture_filter_anisotropic), 1 where it has none and on a software rasterizer (the vulkan-cpu tier: lavapipe's anisotropic filter softens even an image drawn 1:1), 0 without a renderer. Above 1, an image squeezed along one axis keeps the other axis's detail: a style's nine-slice middle squeezed into a short button keeps its outline as crisp as the corners. At 1 the squeezed piece reads a smaller mip level and blurs; og.ui bounds a middle's squeeze at twice its art, so the outline there is one mip level softer than the corners. |
4902
+ | `world3d` | `boolean` | `false` | — | — | — | Whether the renderer draws the 3D world subsystems: terrain, planar water (og.Water), the 3D fluids, scattered copies and volumetric fog. False in the 2D profile's publish and lanes modules, which leave them out (a scene's are not drawn, og.terrain's calls and a SHAPE_HEIGHTFIELD collider answer a refusal naming this field, and `og build --publish` refuses a 2D project whose scenes hold og.Terrain, og.TerrainScatter, og.Water, og.WaterSurface or og.Fluid3D, by scene file and line); true in the 3D modules, the dev module and the native host. |
4378
4903
 
4379
4904
  ```ogt
4380
4905
  struct RenderCapabilities {
@@ -4392,15 +4917,17 @@ struct RenderCapabilities {
4392
4917
  field reflectionProbes u32 "How many og.ReflectionProbe components one frame samples (MAX_REFLECTION_PROBES on every tier)."
4393
4918
  field renderTargetDepth bool "Whether a render target made with `depth` gets its view's depth drawn: true on every tier with a renderer (WebGPU, Vulkan, Metal and WebGL2 alike), false without one. The depth comes from the view's own depth prepass of its opaque meshes into a linear-depth colour target, never from its depth buffer, which WebGL2 cannot read in a shader."
4394
4919
  field maxRenderTargetSize u32 "The largest side of a render target (the device's largest 2D texture)."
4395
- field maxCustomPosts u32 "The most custom post passes a frame runs: 8 on every tier, PostEffects.custom1 to custom8 (numbered fields, as a reflected record has no list field)."
4920
+ field maxCustomPosts u32 "The most custom post passes a frame runs: 8 on every tier, PostEffects.custom's capacity."
4396
4921
  field volumetricFog VolumetricFog "How Fog.volumetric is drawn on this device: a froxel grid (the full tier) or a raymarch along each pixel's view ray (WebGL2), each lit by the sun through its shadows and by the point, spot and rect lights around each sample (up to volumetricLights of them) through their shadows and cookies."
4397
4922
  field volumetricLights u32 "The most point, spot and rect lights that light one sample of Fog.volumetric: those of its screen cluster, MAX_CLUSTER_LIGHTS (64) in the froxel grid, 8 in WebGL2's raymarch, the brightest at the camera first."
4398
4923
  field maxLightCookies u32 "The most light cookie layers one frame draws (24 on every tier): a SpotLight.cookie takes one, a PointLight.cookie six (its cube's faces), and a texture several lights of one kind share takes its layers once. Cookies past it, in the order of their lights' entities, are not drawn: those lights shine without them, and the log names them in a warning."
4399
- field gpuTimestamps bool "Whether the device times each render pass on the GPU (timestamp queries: Vulkan, Metal and D3D12 adapters that have them, WebGPU with `timestamp-query`; never WebGL2): ProbeTimings.gpuPasses and the trace's gpu thread are filled only where it is true."
4924
+ field gpuTimestamps bool "Whether the device times each render pass on the GPU (timestamp queries: Vulkan, Metal and D3D12 adapters that have them, WebGPU with `timestamp-query`; never WebGL2, and never in a publish build, which leaves the queries out): ProbeTimings.gpuPasses and the trace's gpu thread are filled only where it is true."
4925
+ field spriteAnisotropy u32 "The anisotropic filtering of sprites and og.ui's images (text is not filtered anisotropically: its distance field would lose its edge): 16 where the device filters anisotropically (WebGPU, Vulkan, Metal, WebGL2 with EXT_texture_filter_anisotropic), 1 where it has none and on a software rasterizer (the vulkan-cpu tier: lavapipe's anisotropic filter softens even an image drawn 1:1), 0 without a renderer. Above 1, an image squeezed along one axis keeps the other axis's detail: a style's nine-slice middle squeezed into a short button keeps its outline as crisp as the corners. At 1 the squeezed piece reads a smaller mip level and blurs; og.ui bounds a middle's squeeze at twice its art, so the outline there is one mip level softer than the corners."
4926
+ field world3d bool "Whether the renderer draws the 3D world subsystems: terrain, planar water (og.Water), the 3D fluids, scattered copies and volumetric fog. False in the 2D profile's publish and lanes modules, which leave them out (a scene's are not drawn, og.terrain's calls and a SHAPE_HEIGHTFIELD collider answer a refusal naming this field, and `og build --publish` refuses a 2D project whose scenes hold og.Terrain, og.TerrainScatter, og.Water, og.WaterSurface or og.Fluid3D, by scene file and line); true in the 3D modules, the dev module and the native host."
4400
4927
  }
4401
4928
  ```
4402
4929
 
4403
- <sub>`api.ogt` line 3941</sub>
4930
+ <sub>`api.ogt` line 4017</sub>
4404
4931
 
4405
4932
  <a id="type-ReflectionProbeMode"></a>
4406
4933
 
@@ -4423,7 +4950,7 @@ enum ReflectionProbeMode {
4423
4950
  }
4424
4951
  ```
4425
4952
 
4426
- <sub>`api.ogt` line 3965</sub>
4953
+ <sub>`api.ogt` line 4043</sub>
4427
4954
 
4428
4955
  <a id="type-Shader"></a>
4429
4956
 
@@ -4437,7 +4964,7 @@ A generational handle: a number the engine hands out. A dead handle is an error
4437
4964
  handle Shader "A material shader from og.load.shader (an `.ogt` of `type shader`): WGSL hooks of the lit shader, or with `mode full` its own vertex and fragment entries, and the parameters they read."
4438
4965
  ```
4439
4966
 
4440
- <sub>`api.ogt` line 4025</sub>
4967
+ <sub>`api.ogt` line 4103</sub>
4441
4968
 
4442
4969
  <a id="type-BufferGeometryDesc"></a>
4443
4970
 
@@ -4478,7 +5005,7 @@ struct BufferGeometryDesc {
4478
5005
  }
4479
5006
  ```
4480
5007
 
4481
- <sub>`api.ogt` line 4080</sub>
5008
+ <sub>`api.ogt` line 4183</sub>
4482
5009
 
4483
5010
  <a id="type-GeometryInfo"></a>
4484
5011
 
@@ -4509,7 +5036,7 @@ struct GeometryInfo {
4509
5036
  }
4510
5037
  ```
4511
5038
 
4512
- <sub>`api.ogt` line 4096</sub>
5039
+ <sub>`api.ogt` line 4199</sub>
4513
5040
 
4514
5041
  <a id="type-CylinderGeometryDesc"></a>
4515
5042
 
@@ -4568,7 +5095,7 @@ struct CylinderGeometryDesc {
4568
5095
  }
4569
5096
  ```
4570
5097
 
4571
- <sub>`api.ogt` line 4131</sub>
5098
+ <sub>`api.ogt` line 4234</sub>
4572
5099
 
4573
5100
  <a id="type-ConeGeometryDesc"></a>
4574
5101
 
@@ -4612,7 +5139,7 @@ struct ConeGeometryDesc {
4612
5139
  }
4613
5140
  ```
4614
5141
 
4615
- <sub>`api.ogt` line 4167</sub>
5142
+ <sub>`api.ogt` line 4270</sub>
4616
5143
 
4617
5144
  <a id="type-CapsuleGeometryDesc"></a>
4618
5145
 
@@ -4659,7 +5186,7 @@ struct CapsuleGeometryDesc {
4659
5186
  }
4660
5187
  ```
4661
5188
 
4662
- <sub>`api.ogt` line 4191</sub>
5189
+ <sub>`api.ogt` line 4294</sub>
4663
5190
 
4664
5191
  <a id="type-TorusGeometryDesc"></a>
4665
5192
 
@@ -4706,7 +5233,7 @@ struct TorusGeometryDesc {
4706
5233
  }
4707
5234
  ```
4708
5235
 
4709
- <sub>`api.ogt` line 4218</sub>
5236
+ <sub>`api.ogt` line 4321</sub>
4710
5237
 
4711
5238
  <a id="type-RingGeometryDesc"></a>
4712
5239
 
@@ -4757,7 +5284,7 @@ struct RingGeometryDesc {
4757
5284
  }
4758
5285
  ```
4759
5286
 
4760
- <sub>`api.ogt` line 4245</sub>
5287
+ <sub>`api.ogt` line 4348</sub>
4761
5288
 
4762
5289
  <a id="type-CircleGeometryDesc"></a>
4763
5290
 
@@ -4797,7 +5324,7 @@ struct CircleGeometryDesc {
4797
5324
  }
4798
5325
  ```
4799
5326
 
4800
- <sub>`api.ogt` line 4275</sub>
5327
+ <sub>`api.ogt` line 4378</sub>
4801
5328
 
4802
5329
  <a id="type-TubeGeometryDesc"></a>
4803
5330
 
@@ -4841,7 +5368,499 @@ struct TubeGeometryDesc {
4841
5368
  }
4842
5369
  ```
4843
5370
 
4844
- <sub>`api.ogt` line 4296</sub>
5371
+ <sub>`api.ogt` line 4399</sub>
5372
+
5373
+ <a id="type-ShapePoints"></a>
5374
+
5375
+ ### `ShapePoints` (struct)
5376
+
5377
+ A shape as points, what og.Shape.extractPoints returns and what shapeGeometry, extrudeGeometry and sweepGeometry read: the outline, then each hole. A repeated closing point is dropped, as three.js drops it.
5378
+
5379
+ | Field | Type | Default | Range | Unit | Notes | Doc |
5380
+ |---|---|---|---|---|---|---|
5381
+ | `shape` | `readonly Vector2[]` | `[]` | — | — | — | The outline's points, in order. |
5382
+ | `holes` | `readonly (readonly Vector2[])[]` | `[]` | — | — | — | Each hole's points, in order. |
5383
+
5384
+ ```ogt
5385
+ struct ShapePoints {
5386
+ doc "A shape as points, what og.Shape.extractPoints returns and what shapeGeometry, extrudeGeometry and sweepGeometry read: the outline, then each hole. A repeated closing point is dropped, as three.js drops it."
5387
+ field shape List.Vector2 "The outline's points, in order."
5388
+ field holes List.List.Vector2 "Each hole's points, in order."
5389
+ }
5390
+ ```
5391
+
5392
+ <sub>`api.ogt` line 4473</sub>
5393
+
5394
+ <a id="type-ShapeGeometryDesc"></a>
5395
+
5396
+ ### `ShapeGeometryDesc` (desc struct)
5397
+
5398
+ A flat shape with holes in the xy plane facing +Z, as three.js ShapeGeometry(shapes, curveSegments): triangulated by earcut (three.js's own port), the outline made clockwise and the holes counter-clockwise first, so its vertices and triangles are three.js's for the same shape. uvs are world x and y (v flipped to run down the image).
5399
+
5400
+ A desc: every field may be omitted and takes its default; `{}` is valid.
5401
+
5402
+ | Field | Type | Default | Range | Unit | Notes | Doc |
5403
+ |---|---|---|---|---|---|---|
5404
+ | `shapes` | `Path2 \| readonly Path2[] \| readonly Vector2[] \| null` | `null` | — | — | — | One og.Shape (an og.Path2 is a shape without holes), a list of them, or the outline's points. Without it, three.js's default triangle (0, 0.5), (-0.5, -0.5), (0.5, -0.5). |
5405
+ | `curveSegments` | `number` | `12` | ≥ 1 | — | — | Points per curve when an og.Shape's curves are flattened (three.js extractPoints(curveSegments); an ellipse takes twice as many, a spline as many per point). |
5406
+ | `uvRepeat` | `Vector2` | `{ x: 1, y: 1 }` | — | — | — | How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping). |
5407
+ | `physics` | `boolean` | `true` | — | — | — | Register it as a physics mesh too (BufferGeometryDesc.physics). |
5408
+ | `dynamic` | `boolean` | `false` | — | — | — | Whether og.render.updateGeometry may rewrite it later (BufferGeometryDesc.dynamic). |
5409
+
5410
+ ```ogt
5411
+ struct ShapeGeometryDesc {
5412
+ doc "A flat shape with holes in the xy plane facing +Z, as three.js ShapeGeometry(shapes, curveSegments): triangulated by earcut (three.js's own port), the outline made clockwise and the holes counter-clockwise first, so its vertices and triangles are three.js's for the same shape. uvs are world x and y (v flipped to run down the image)."
5413
+ desc true
5414
+ field shapes Option.OneOf.Path2.OneOf.List.Path2.List.Vector2 "One og.Shape (an og.Path2 is a shape without holes), a list of them, or the outline's points. Without it, three.js's default triangle (0, 0.5), (-0.5, -0.5), (0.5, -0.5)."
5415
+ field curveSegments u32 "Points per curve when an og.Shape's curves are flattened (three.js extractPoints(curveSegments); an ellipse takes twice as many, a spline as many per point)." {
5416
+ default 12
5417
+ min 1
5418
+ }
5419
+ field uvRepeat Vector2 "How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping)." {
5420
+ default 1 1
5421
+ }
5422
+ field physics bool "Register it as a physics mesh too (BufferGeometryDesc.physics)." {
5423
+ default true
5424
+ }
5425
+ field dynamic bool "Whether og.render.updateGeometry may rewrite it later (BufferGeometryDesc.dynamic)."
5426
+ }
5427
+ ```
5428
+
5429
+ <sub>`api.ogt` line 4479</sub>
5430
+
5431
+ <a id="type-ExtrudeGeometryDesc"></a>
5432
+
5433
+ ### `ExtrudeGeometryDesc` (desc struct)
5434
+
5435
+ Shapes pushed along +Z, or along a path, as three.js ExtrudeGeometry(shapes, options) with its option names and defaults: a closed solid, its lids from earcut and its walls ring by ring, rounded by a bevel of bevelSegments rings at each face. Unindexed as three.js's (every triangle its own vertices, flat normals), three.js's vertex order and counts; uvs from three.js's WorldUVGenerator (v flipped to run down the image).
5436
+
5437
+ A desc: every field may be omitted and takes its default; `{}` is valid.
5438
+
5439
+ | Field | Type | Default | Range | Unit | Notes | Doc |
5440
+ |---|---|---|---|---|---|---|
5441
+ | `shapes` | `Path2 \| readonly Path2[] \| readonly Vector2[] \| null` | `null` | — | — | — | One og.Shape, a list of them, or the outline's points. Without it, three.js's default square of side 1. |
5442
+ | `depth` | `number` | `1` | ≥ 0 | `m` | — | How far the shape is pushed along +Z (without extrudePath). |
5443
+ | `steps` | `number` | `1` | ≥ 1 | — | — | Rings along the depth or the path. |
5444
+ | `bevelEnabled` | `boolean` | `true` | — | — | — | Round the edges of both faces. |
5445
+ | `bevelThickness` | `number` | `0.2` | ≥ 0 | `m` | — | How far the bevel reaches beyond each face, along z. |
5446
+ | `bevelSize` | `number \| null` | `null` | — | `m` | — | How far the bevel reaches out from the outline. Null or unset, bevelThickness - 0.1, as three.js derives it (0.1 at the default thickness, 0 at a thickness of 0.1). |
5447
+ | `bevelOffset` | `number` | `0` | — | `m` | — | How far the bevel starts out from the outline. |
5448
+ | `bevelSegments` | `number` | `3` | ≥ 1 | — | — | Rings in each bevel. |
5449
+ | `curveSegments` | `number` | `12` | ≥ 1 | — | — | Points per curve when an og.Shape's curves are flattened. |
5450
+ | `extrudePath` | `Path` | `0` | — | — | — | A path (og.path.create or og.path.find) to extrude along instead of +Z: the shape's x along the path's normal and y along its binormal (three.js's Frenet frames), steps rings evenly spaced along it. A path turns the bevel off, as three.js. 0 extrudes along +Z. |
5451
+ | `uvRepeat` | `Vector2` | `{ x: 1, y: 1 }` | — | — | — | How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping). |
5452
+ | `physics` | `boolean` | `true` | — | — | — | Register it as a physics mesh too. |
5453
+ | `dynamic` | `boolean` | `false` | — | — | — | Whether og.render.updateGeometry may rewrite it later. |
5454
+
5455
+ ```ogt
5456
+ struct ExtrudeGeometryDesc {
5457
+ doc "Shapes pushed along +Z, or along a path, as three.js ExtrudeGeometry(shapes, options) with its option names and defaults: a closed solid, its lids from earcut and its walls ring by ring, rounded by a bevel of bevelSegments rings at each face. Unindexed as three.js's (every triangle its own vertices, flat normals), three.js's vertex order and counts; uvs from three.js's WorldUVGenerator (v flipped to run down the image)."
5458
+ desc true
5459
+ field shapes Option.OneOf.Path2.OneOf.List.Path2.List.Vector2 "One og.Shape, a list of them, or the outline's points. Without it, three.js's default square of side 1."
5460
+ field depth f32 "How far the shape is pushed along +Z (without extrudePath)." {
5461
+ default 1
5462
+ min 0
5463
+ unit m
5464
+ }
5465
+ field steps u32 "Rings along the depth or the path." {
5466
+ default 1
5467
+ min 1
5468
+ }
5469
+ field bevelEnabled bool "Round the edges of both faces." {
5470
+ default true
5471
+ }
5472
+ field bevelThickness f32 "How far the bevel reaches beyond each face, along z." {
5473
+ default 0.2
5474
+ min 0
5475
+ unit m
5476
+ }
5477
+ field bevelSize Option.f32 "How far the bevel reaches out from the outline. Null or unset, bevelThickness - 0.1, as three.js derives it (0.1 at the default thickness, 0 at a thickness of 0.1)." {
5478
+ unit m
5479
+ }
5480
+ field bevelOffset f32 "How far the bevel starts out from the outline." {
5481
+ unit m
5482
+ }
5483
+ field bevelSegments u32 "Rings in each bevel." {
5484
+ default 3
5485
+ min 1
5486
+ }
5487
+ field curveSegments u32 "Points per curve when an og.Shape's curves are flattened." {
5488
+ default 12
5489
+ min 1
5490
+ }
5491
+ field extrudePath Path "A path (og.path.create or og.path.find) to extrude along instead of +Z: the shape's x along the path's normal and y along its binormal (three.js's Frenet frames), steps rings evenly spaced along it. A path turns the bevel off, as three.js. 0 extrudes along +Z."
5492
+ field uvRepeat Vector2 "How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping)." {
5493
+ default 1 1
5494
+ }
5495
+ field physics bool "Register it as a physics mesh too." {
5496
+ default true
5497
+ }
5498
+ field dynamic bool "Whether og.render.updateGeometry may rewrite it later."
5499
+ }
5500
+ ```
5501
+
5502
+ <sub>`api.ogt` line 4496</sub>
5503
+
5504
+ <a id="type-LatheGeometryDesc"></a>
5505
+
5506
+ ### `LatheGeometryDesc` (desc struct)
5507
+
5508
+ A profile turned round +Y, as three.js LatheGeometry(points, segments, phiStart, phiLength): vases, bottles, columns, wheels. three.js's vertices, indices and smooth normals; u round the axis, v along the profile (flipped to run down the image). A whole turn's seam meets exactly.
5509
+
5510
+ A desc: every field may be omitted and takes its default; `{}` is valid.
5511
+
5512
+ | Field | Type | Default | Range | Unit | Notes | Doc |
5513
+ |---|---|---|---|---|---|---|
5514
+ | `points` | `readonly Vector2[]` | `[]` | — | `m` | — | The profile, x the distance from the axis and y the height, in order (at least two). Without it, three.js's default (0, -0.5), (0.5, 0), (0, 0.5). |
5515
+ | `segments` | `number` | `12` | ≥ 1 | — | — | Segments round the axis. |
5516
+ | `phiStart` | `number` | `0` | — | `rad` | — | Where the turn starts, from +Z towards +X. |
5517
+ | `phiLength` | `number` | `6.283185307179586` | — | `rad` | — | How far it turns; 2 pi is whole (clamped to it). |
5518
+ | `uvRepeat` | `Vector2` | `{ x: 1, y: 1 }` | — | — | — | How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping). |
5519
+ | `physics` | `boolean` | `true` | — | — | — | Register it as a physics mesh too. |
5520
+ | `dynamic` | `boolean` | `false` | — | — | — | Whether og.render.updateGeometry may rewrite it later. |
5521
+
5522
+ ```ogt
5523
+ struct LatheGeometryDesc {
5524
+ doc "A profile turned round +Y, as three.js LatheGeometry(points, segments, phiStart, phiLength): vases, bottles, columns, wheels. three.js's vertices, indices and smooth normals; u round the axis, v along the profile (flipped to run down the image). A whole turn's seam meets exactly."
5525
+ desc true
5526
+ field points List.Vector2 "The profile, x the distance from the axis and y the height, in order (at least two). Without it, three.js's default (0, -0.5), (0.5, 0), (0, 0.5)." {
5527
+ unit m
5528
+ }
5529
+ field segments u32 "Segments round the axis." {
5530
+ default 12
5531
+ min 1
5532
+ }
5533
+ field phiStart f32 "Where the turn starts, from +Z towards +X." {
5534
+ unit rad
5535
+ }
5536
+ field phiLength f32 "How far it turns; 2 pi is whole (clamped to it)." {
5537
+ default 6.283185307179586
5538
+ unit rad
5539
+ }
5540
+ field uvRepeat Vector2 "How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping)." {
5541
+ default 1 1
5542
+ }
5543
+ field physics bool "Register it as a physics mesh too." {
5544
+ default true
5545
+ }
5546
+ field dynamic bool "Whether og.render.updateGeometry may rewrite it later."
5547
+ }
5548
+ ```
5549
+
5550
+ <sub>`api.ogt` line 4541</sub>
5551
+
5552
+ <a id="type-PolyhedronGeometryDesc"></a>
5553
+
5554
+ ### `PolyhedronGeometryDesc` (desc struct)
5555
+
5556
+ A polyhedron from vertices and faces, every face subdivided `detail` times and every vertex pushed onto the sphere of `radius`, as three.js PolyhedronGeometry(vertices, indices, radius, detail): unindexed, flat normals at detail 0 and the sphere's above, three.js's spherical uvs.
5557
+
5558
+ A desc: every field may be omitted and takes its default; `{}` is valid.
5559
+
5560
+ | Field | Type | Default | Range | Unit | Notes | Doc |
5561
+ |---|---|---|---|---|---|---|
5562
+ | `vertices` | `readonly number[]` | `[]` | — | — | — | The corners, x y z each (three.js's flat array). |
5563
+ | `indices` | `readonly number[]` | `[]` | — | — | — | The faces, three corner indices each, counter-clockwise seen from outside. |
5564
+ | `radius` | `number` | `1` | ≥ 0 | `m` | — | The sphere the vertices are pushed onto. |
5565
+ | `detail` | `number` | `0` | ≤ 64 | — | — | Subdivisions of each face: (detail + 1)² triangles a face. |
5566
+ | `uvRepeat` | `Vector2` | `{ x: 1, y: 1 }` | — | — | — | How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping). |
5567
+ | `physics` | `boolean` | `true` | — | — | — | Register it as a physics mesh too. |
5568
+ | `dynamic` | `boolean` | `false` | — | — | — | Whether og.render.updateGeometry may rewrite it later. |
5569
+
5570
+ ```ogt
5571
+ struct PolyhedronGeometryDesc {
5572
+ doc "A polyhedron from vertices and faces, every face subdivided `detail` times and every vertex pushed onto the sphere of `radius`, as three.js PolyhedronGeometry(vertices, indices, radius, detail): unindexed, flat normals at detail 0 and the sphere's above, three.js's spherical uvs."
5573
+ desc true
5574
+ field vertices List.f32 "The corners, x y z each (three.js's flat array)."
5575
+ field indices List.u32 "The faces, three corner indices each, counter-clockwise seen from outside."
5576
+ field radius f32 "The sphere the vertices are pushed onto." {
5577
+ default 1
5578
+ min 0
5579
+ unit m
5580
+ }
5581
+ field detail u32 "Subdivisions of each face: (detail + 1)² triangles a face." {
5582
+ max 64
5583
+ }
5584
+ field uvRepeat Vector2 "How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping)." {
5585
+ default 1 1
5586
+ }
5587
+ field physics bool "Register it as a physics mesh too." {
5588
+ default true
5589
+ }
5590
+ field dynamic bool "Whether og.render.updateGeometry may rewrite it later."
5591
+ }
5592
+ ```
5593
+
5594
+ <sub>`api.ogt` line 4567</sub>
5595
+
5596
+ <a id="type-SolidGeometryDesc"></a>
5597
+
5598
+ ### `SolidGeometryDesc` (desc struct)
5599
+
5600
+ A regular solid, as three.js IcosahedronGeometry, DodecahedronGeometry, OctahedronGeometry and TetrahedronGeometry(radius, detail): PolyhedronGeometryDesc with the solid's own vertices and faces. An icosahedron at detail 2 or more is a sphere with even triangles.
5601
+
5602
+ A desc: every field may be omitted and takes its default; `{}` is valid.
5603
+
5604
+ | Field | Type | Default | Range | Unit | Notes | Doc |
5605
+ |---|---|---|---|---|---|---|
5606
+ | `radius` | `number` | `1` | ≥ 0 | `m` | — | The radius. |
5607
+ | `detail` | `number` | `0` | ≤ 64 | — | — | Subdivisions of each face. |
5608
+ | `uvRepeat` | `Vector2` | `{ x: 1, y: 1 }` | — | — | — | How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping). |
5609
+ | `physics` | `boolean` | `true` | — | — | — | Register it as a physics mesh too. |
5610
+ | `dynamic` | `boolean` | `false` | — | — | — | Whether og.render.updateGeometry may rewrite it later. |
5611
+
5612
+ ```ogt
5613
+ struct SolidGeometryDesc {
5614
+ doc "A regular solid, as three.js IcosahedronGeometry, DodecahedronGeometry, OctahedronGeometry and TetrahedronGeometry(radius, detail): PolyhedronGeometryDesc with the solid's own vertices and faces. An icosahedron at detail 2 or more is a sphere with even triangles."
5615
+ desc true
5616
+ field radius f32 "The radius." {
5617
+ default 1
5618
+ min 0
5619
+ unit m
5620
+ }
5621
+ field detail u32 "Subdivisions of each face." {
5622
+ max 64
5623
+ }
5624
+ field uvRepeat Vector2 "How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping)." {
5625
+ default 1 1
5626
+ }
5627
+ field physics bool "Register it as a physics mesh too." {
5628
+ default true
5629
+ }
5630
+ field dynamic bool "Whether og.render.updateGeometry may rewrite it later."
5631
+ }
5632
+ ```
5633
+
5634
+ <sub>`api.ogt` line 4589</sub>
5635
+
5636
+ <a id="type-SweepKey"></a>
5637
+
5638
+ ### `SweepKey` (struct)
5639
+
5640
+ A value at a fraction of a sweep's path: linear between keys, held before the first and past the last.
5641
+
5642
+ | Field | Type | Default | Range | Unit | Notes | Doc |
5643
+ |---|---|---|---|---|---|---|
5644
+ | `t` | `number` | `0` | — | `ratio` | — | The fraction of the path's length, 0 to 1. |
5645
+ | `value` | `number` | `0` | — | — | — | The value there. |
5646
+
5647
+ ```ogt
5648
+ struct SweepKey {
5649
+ doc "A value at a fraction of a sweep's path: linear between keys, held before the first and past the last."
5650
+ field t f32 "The fraction of the path's length, 0 to 1." {
5651
+ unit ratio
5652
+ }
5653
+ field value f32 "The value there."
5654
+ }
5655
+ ```
5656
+
5657
+ <sub>`api.ogt` line 4609</sub>
5658
+
5659
+ <a id="type-SweepGeometryDesc"></a>
5660
+
5661
+ ### `SweepGeometryDesc` (desc struct)
5662
+
5663
+ A section swept along a path, scaled and twisted over it: horns, tusks, handles, blades, tapered pipes, twisted columns (img2threejs's tapered sweep; three.js has no class for it). The section's x lies along the path's normal and y along its binormal (three.js's Frenet frames), rings evenly spaced along the path's length; u runs along the path, v round the section (flipped to run down the image), the sides smooth. An open path's ends are capped.
5664
+
5665
+ A desc: every field may be omitted and takes its default; `{}` is valid.
5666
+
5667
+ | Field | Type | Default | Range | Unit | Notes | Doc |
5668
+ |---|---|---|---|---|---|---|
5669
+ | `section` | `Path2 \| readonly Vector2[] \| null` | `null` | — | — | — | The section's outline: an og.Shape or og.Path2 (flattened by curveSegments; holes are not swept) or its points, at least three, either winding. |
5670
+ | `path` | `Path` | `0` | — | — | — | The path (og.path.create or og.path.find). |
5671
+ | `steps` | `number` | `64` | ≥ 1 | — | — | Rings along the path, less one. |
5672
+ | `scale` | `readonly SweepKey[]` | `[]` | — | — | — | The section's scale over the path (none: 1 throughout). A horn: [{ t: 0, value: 1 }, { t: 1, value: 0.05 }]. |
5673
+ | `twist` | `readonly SweepKey[]` | `[]` | — | — | — | The section's turn round the path over its length, in radians (none: 0). |
5674
+ | `caps` | `boolean` | `true` | — | — | — | Close the ends of an open path. |
5675
+ | `curveSegments` | `number` | `12` | ≥ 1 | — | — | Points per curve when an og.Shape section is flattened. |
5676
+ | `uvRepeat` | `Vector2` | `{ x: 1, y: 1 }` | — | — | — | How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping). |
5677
+ | `physics` | `boolean` | `true` | — | — | — | Register it as a physics mesh too. |
5678
+ | `dynamic` | `boolean` | `false` | — | — | — | Whether og.render.updateGeometry may rewrite it later. |
5679
+
5680
+ ```ogt
5681
+ struct SweepGeometryDesc {
5682
+ doc "A section swept along a path, scaled and twisted over it: horns, tusks, handles, blades, tapered pipes, twisted columns (img2threejs's tapered sweep; three.js has no class for it). The section's x lies along the path's normal and y along its binormal (three.js's Frenet frames), rings evenly spaced along the path's length; u runs along the path, v round the section (flipped to run down the image), the sides smooth. An open path's ends are capped."
5683
+ desc true
5684
+ field section Option.OneOf.Path2.List.Vector2 "The section's outline: an og.Shape or og.Path2 (flattened by curveSegments; holes are not swept) or its points, at least three, either winding."
5685
+ field path Path "The path (og.path.create or og.path.find)."
5686
+ field steps u32 "Rings along the path, less one." {
5687
+ default 64
5688
+ min 1
5689
+ }
5690
+ field scale List.SweepKey "The section's scale over the path (none: 1 throughout). A horn: [{ t: 0, value: 1 }, { t: 1, value: 0.05 }]."
5691
+ field twist List.SweepKey "The section's turn round the path over its length, in radians (none: 0)."
5692
+ field caps bool "Close the ends of an open path." {
5693
+ default true
5694
+ }
5695
+ field curveSegments u32 "Points per curve when an og.Shape section is flattened." {
5696
+ default 12
5697
+ min 1
5698
+ }
5699
+ field uvRepeat Vector2 "How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping)." {
5700
+ default 1 1
5701
+ }
5702
+ field physics bool "Register it as a physics mesh too." {
5703
+ default true
5704
+ }
5705
+ field dynamic bool "Whether og.render.updateGeometry may rewrite it later."
5706
+ }
5707
+ ```
5708
+
5709
+ <sub>`api.ogt` line 4617</sub>
5710
+
5711
+ <a id="type-MirrorAxis"></a>
5712
+
5713
+ ### `MirrorAxis` (enum)
5714
+
5715
+ The world axis a part is mirrored along, after its placement.
5716
+
5717
+ A string: one of the variants below. The zero value is `"none"`.
5718
+
5719
+ | Variant | Doc |
5720
+ |---|---|
5721
+ | `"none"` | Not mirrored. |
5722
+ | `"x"` | x negated: the mirror image across the yz plane. |
5723
+ | `"y"` | y negated: across the xz plane. |
5724
+ | `"z"` | z negated: across the xy plane. |
5725
+
5726
+ ```ogt
5727
+ enum MirrorAxis {
5728
+ doc "The world axis a part is mirrored along, after its placement."
5729
+ variant none "Not mirrored."
5730
+ variant x "x negated: the mirror image across the yz plane."
5731
+ variant y "y negated: across the xz plane."
5732
+ variant z "z negated: across the xy plane."
5733
+ }
5734
+ ```
5735
+
5736
+ <sub>`api.ogt` line 4644</sub>
5737
+
5738
+ <a id="type-GeometryPart"></a>
5739
+
5740
+ ### `GeometryPart` (desc struct)
5741
+
5742
+ A geometry placed as an Object3D is (scale, then rotate, then move), then mirrored: one part of og.render.mergeGeometries or an operand of og.render.csgGeometry.
5743
+
5744
+ A desc: every field may be omitted and takes its default; `{}` is valid.
5745
+
5746
+ | Field | Type | Default | Range | Unit | Notes | Doc |
5747
+ |---|---|---|---|---|---|---|
5748
+ | `geometry` | `Geometry` | `0` | — | — | — | Any geometry: made, a primitive or a loaded glTF's. |
5749
+ | `position` | `Vector3` | `{ x: 0, y: 0, z: 0 }` | — | `m` | — | Where it goes. |
5750
+ | `quaternion` | `Quaternion` | `{ x: 0, y: 0, z: 0, w: 1 }` | — | — | — | How it turns. |
5751
+ | `scale` | `Vector3` | `{ x: 1, y: 1, z: 1 }` | — | — | — | Its scale (a negative component mirrors it as `mirror` does). |
5752
+ | `mirror` | `MirrorAxis` | `"none"` | — | — | — | Mirror it along a world axis after placing it: a symmetric prop is one half twice, the second mirrored. |
5753
+
5754
+ ```ogt
5755
+ struct GeometryPart {
5756
+ doc "A geometry placed as an Object3D is (scale, then rotate, then move), then mirrored: one part of og.render.mergeGeometries or an operand of og.render.csgGeometry."
5757
+ desc true
5758
+ field geometry Geometry "Any geometry: made, a primitive or a loaded glTF's."
5759
+ field position Vector3 "Where it goes." {
5760
+ unit m
5761
+ }
5762
+ field quaternion Quaternion "How it turns."
5763
+ field scale Vector3 "Its scale (a negative component mirrors it as `mirror` does)." {
5764
+ default 1 1 1
5765
+ }
5766
+ field mirror MirrorAxis "Mirror it along a world axis after placing it: a symmetric prop is one half twice, the second mirrored."
5767
+ }
5768
+ ```
5769
+
5770
+ <sub>`api.ogt` line 4652</sub>
5771
+
5772
+ <a id="type-CsgOp"></a>
5773
+
5774
+ ### `CsgOp` (enum)
5775
+
5776
+ A boolean operation on two solids.
5777
+
5778
+ A string: one of the variants below. The zero value is `"union"`.
5779
+
5780
+ | Variant | Doc |
5781
+ |---|---|
5782
+ | `"union"` | Everything in either: a + b. |
5783
+ | `"subtract"` | What of a is not in b: a - b (holes, notches, a dice's pips). |
5784
+ | `"intersect"` | What is in both. |
5785
+
5786
+ ```ogt
5787
+ enum CsgOp {
5788
+ doc "A boolean operation on two solids."
5789
+ variant union "Everything in either: a + b."
5790
+ variant subtract "What of a is not in b: a - b (holes, notches, a dice's pips)."
5791
+ variant intersect "What is in both."
5792
+ }
5793
+ ```
5794
+
5795
+ <sub>`api.ogt` line 4666</sub>
5796
+
5797
+ <a id="type-CsgGeometryDesc"></a>
5798
+
5799
+ ### `CsgGeometryDesc` (desc struct)
5800
+
5801
+ Two closed geometries combined by a boolean operation, each placed first: a box with a hole bored through it, a dice, a window cut in a wall. The result is closed when both are (every edge shared by two triangles, wound opposite), every piece keeps its source's normals, uvs and colours (b's turned inside out where it is subtracted). Where a plane side or an edge crossing is decided, the decision is exact (Shewchuk's predicates), so every host makes the same cuts; faces that coincide keep one copy or none, as the operation says.
5802
+
5803
+ A desc: every field may be omitted and takes its default; `{}` is valid.
5804
+
5805
+ | Field | Type | Default | Range | Unit | Notes | Doc |
5806
+ |---|---|---|---|---|---|---|
5807
+ | `op` | `CsgOp` | `"union"` | — | — | — | The operation. |
5808
+ | `a` | `GeometryPart` | `{}` | — | — | — | The first operand. |
5809
+ | `b` | `GeometryPart` | `{}` | — | — | — | The second operand. |
5810
+ | `uvRepeat` | `Vector2` | `{ x: 1, y: 1 }` | — | — | — | How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping). |
5811
+ | `physics` | `boolean` | `true` | — | — | — | Register it as a physics mesh too. |
5812
+ | `dynamic` | `boolean` | `false` | — | — | — | Whether og.render.updateGeometry may rewrite it later. |
5813
+
5814
+ ```ogt
5815
+ struct CsgGeometryDesc {
5816
+ doc "Two closed geometries combined by a boolean operation, each placed first: a box with a hole bored through it, a dice, a window cut in a wall. The result is closed when both are (every edge shared by two triangles, wound opposite), every piece keeps its source's normals, uvs and colours (b's turned inside out where it is subtracted). Where a plane side or an edge crossing is decided, the decision is exact (Shewchuk's predicates), so every host makes the same cuts; faces that coincide keep one copy or none, as the operation says."
5817
+ desc true
5818
+ field op CsgOp "The operation."
5819
+ field a GeometryPart "The first operand."
5820
+ field b GeometryPart "The second operand."
5821
+ field uvRepeat Vector2 "How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping)." {
5822
+ default 1 1
5823
+ }
5824
+ field physics bool "Register it as a physics mesh too." {
5825
+ default true
5826
+ }
5827
+ field dynamic bool "Whether og.render.updateGeometry may rewrite it later."
5828
+ }
5829
+ ```
5830
+
5831
+ <sub>`api.ogt` line 4673</sub>
5832
+
5833
+ <a id="type-MergeGeometriesDesc"></a>
5834
+
5835
+ ### `MergeGeometriesDesc` (desc struct)
5836
+
5837
+ Geometries placed and merged into one, as three.js BufferGeometryUtils.mergeGeometries after applying each part's matrix: a prop of parts drawn in one draw, a mirrored half, an array (the same part at several placements). Normals follow each placement; a mirrored part turns its triangles so they still face out. Vertex colours are kept when any part has them.
5838
+
5839
+ A desc: every field may be omitted and takes its default; `{}` is valid.
5840
+
5841
+ | Field | Type | Default | Range | Unit | Notes | Doc |
5842
+ |---|---|---|---|---|---|---|
5843
+ | `parts` | `readonly GeometryPart[]` | `[]` | — | — | — | The parts, in order (at least one). |
5844
+ | `uvRepeat` | `Vector2` | `{ x: 1, y: 1 }` | — | — | — | How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping). |
5845
+ | `physics` | `boolean` | `true` | — | — | — | Register it as a physics mesh too. |
5846
+ | `dynamic` | `boolean` | `false` | — | — | — | Whether og.render.updateGeometry may rewrite it later. |
5847
+
5848
+ ```ogt
5849
+ struct MergeGeometriesDesc {
5850
+ doc "Geometries placed and merged into one, as three.js BufferGeometryUtils.mergeGeometries after applying each part's matrix: a prop of parts drawn in one draw, a mirrored half, an array (the same part at several placements). Normals follow each placement; a mirrored part turns its triangles so they still face out. Vertex colours are kept when any part has them."
5851
+ desc true
5852
+ field parts List.GeometryPart "The parts, in order (at least one)."
5853
+ field uvRepeat Vector2 "How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping)." {
5854
+ default 1 1
5855
+ }
5856
+ field physics bool "Register it as a physics mesh too." {
5857
+ default true
5858
+ }
5859
+ field dynamic bool "Whether og.render.updateGeometry may rewrite it later."
5860
+ }
5861
+ ```
5862
+
5863
+ <sub>`api.ogt` line 4688</sub>
4845
5864
 
4846
5865
  <a id="type-LineMode"></a>
4847
5866
 
@@ -4866,7 +5885,7 @@ enum LineMode {
4866
5885
  }
4867
5886
  ```
4868
5887
 
4869
- <sub>`api.ogt` line 4368</sub>
5888
+ <sub>`api.ogt` line 4778</sub>
4870
5889
 
4871
5890
  <a id="type-LinesDesc"></a>
4872
5891
 
@@ -4932,7 +5951,7 @@ struct LinesDesc {
4932
5951
  }
4933
5952
  ```
4934
5953
 
4935
- <sub>`api.ogt` line 4382</sub>
5954
+ <sub>`api.ogt` line 4792</sub>
4936
5955
 
4937
5956
  <a id="type-PointsDesc"></a>
4938
5957
 
@@ -4983,7 +6002,7 @@ struct PointsDesc {
4983
6002
  }
4984
6003
  ```
4985
6004
 
4986
- <sub>`api.ogt` line 4426</sub>
6005
+ <sub>`api.ogt` line 4836</sub>
4987
6006
 
4988
6007
  <a id="type-RaycastGeometryDesc"></a>
4989
6008
 
@@ -5016,7 +6035,7 @@ struct RaycastGeometryDesc {
5016
6035
  }
5017
6036
  ```
5018
6037
 
5019
- <sub>`api.ogt` line 4529</sub>
6038
+ <sub>`api.ogt` line 4939</sub>
5020
6039
 
5021
6040
  <a id="type-GeometryHit"></a>
5022
6041
 
@@ -5051,7 +6070,7 @@ struct GeometryHit {
5051
6070
  }
5052
6071
  ```
5053
6072
 
5054
- <sub>`api.ogt` line 4543</sub>
6073
+ <sub>`api.ogt` line 4953</sub>
5055
6074
 
5056
6075
  <a id="type-RenderTargetFormat"></a>
5057
6076
 
@@ -5074,7 +6093,7 @@ enum RenderTargetFormat {
5074
6093
  }
5075
6094
  ```
5076
6095
 
5077
- <sub>`api.ogt` line 4568</sub>
6096
+ <sub>`api.ogt` line 4978</sub>
5078
6097
 
5079
6098
  <a id="type-RenderTarget"></a>
5080
6099
 
@@ -5088,7 +6107,7 @@ A generational handle: a number the engine hands out. A dead handle is an error
5088
6107
  handle RenderTarget "A texture a camera draws into (og.render.renderTarget), as three.js WebGLRenderTarget."
5089
6108
  ```
5090
6109
 
5091
- <sub>`api.ogt` line 4581</sub>
6110
+ <sub>`api.ogt` line 4991</sub>
5092
6111
 
5093
6112
  <a id="type-RenderTargetDesc"></a>
5094
6113
 
@@ -5122,7 +6141,7 @@ struct RenderTargetDesc {
5122
6141
  }
5123
6142
  ```
5124
6143
 
5125
- <sub>`api.ogt` line 4590</sub>
6144
+ <sub>`api.ogt` line 5000</sub>
5126
6145
 
5127
6146
  <a id="type-RenderTargetInfo"></a>
5128
6147
 
@@ -5149,7 +6168,7 @@ struct RenderTargetInfo {
5149
6168
  }
5150
6169
  ```
5151
6170
 
5152
- <sub>`api.ogt` line 4605</sub>
6171
+ <sub>`api.ogt` line 5015</sub>
5153
6172
 
5154
6173
  <a id="type-Post"></a>
5155
6174
 
@@ -5163,7 +6182,7 @@ A generational handle: a number the engine hands out. A dead handle is an error
5163
6182
  handle Post "A custom post pass from og.load.post (an `.ogt` of `type post`): a WGSL `post` function over the lit image and the parameters it reads."
5164
6183
  ```
5165
6184
 
5166
- <sub>`api.ogt` line 4717</sub>
6185
+ <sub>`api.ogt` line 5127</sub>
5167
6186
 
5168
6187
  <a id="type-PostError"></a>
5169
6188
 
@@ -5184,7 +6203,7 @@ struct PostError {
5184
6203
  }
5185
6204
  ```
5186
6205
 
5187
- <sub>`api.ogt` line 4735</sub>
6206
+ <sub>`api.ogt` line 5145</sub>
5188
6207
 
5189
6208
  <a id="type-VolumetricFog"></a>
5190
6209
 
@@ -5207,7 +6226,7 @@ enum VolumetricFog {
5207
6226
  }
5208
6227
  ```
5209
6228
 
5210
- <sub>`api.ogt` line 4749</sub>
6229
+ <sub>`api.ogt` line 5159</sub>
5211
6230
 
5212
6231
  <a id="type-BakedScene"></a>
5213
6232
 
@@ -5240,7 +6259,7 @@ struct BakedScene {
5240
6259
  }
5241
6260
  ```
5242
6261
 
5243
- <sub>`api.ogt` line 4797</sub>
6262
+ <sub>`api.ogt` line 5207</sub>
5244
6263
 
5245
6264
  ## Column kinds
5246
6265
 
@@ -5251,6 +6270,7 @@ Each is a factory, `Geometry(value?, options?)`, that makes one field of a compo
5251
6270
  | <a id="column-Geometry"></a>`Geometry` | `Geometry` | `Uint32Array` | 2 | A Geometry handle field. |
5252
6271
  | <a id="column-Material"></a>`Material` | `Material` | `Uint32Array` | 2 | A Material handle field. |
5253
6272
  | <a id="column-ToneMapping"></a>`ToneMapping` | `ToneMapping` | `Uint32Array` | 1 | A ToneMapping field: the variant's index. |
6273
+ | <a id="column-QualityPreset"></a>`QualityPreset` | `QualityPreset` | `Uint32Array` | 1 | A QualityPreset field: the variant's index. |
5254
6274
  | <a id="column-Texture"></a>`Texture` | `Texture` | `Uint32Array` | 2 | A Texture handle field (0 is none). |
5255
6275
  | <a id="column-Lut"></a>`Lut` | `Lut` | `Uint32Array` | 2 | A Lut handle field (0 is none). |
5256
6276
  | <a id="column-EnvironmentMap"></a>`EnvironmentMap` | `EnvironmentMap` | `Uint32Array` | 2 | An EnvironmentMap handle field (0 is none). |
@@ -5258,11 +6278,14 @@ Each is a factory, `Geometry(value?, options?)`, that makes one field of a compo
5258
6278
  | <a id="column-AoMethod"></a>`AoMethod` | `AoMethod` | `Uint32Array` | 1 | An AoMethod field: the variant's index. |
5259
6279
  | <a id="column-DofQuality"></a>`DofQuality` | `DofQuality` | `Uint32Array` | 1 | A DofQuality field: the variant's index. |
5260
6280
  | <a id="column-SpriteBlend"></a>`SpriteBlend` | `SpriteBlend` | `Uint32Array` | 1 | A SpriteBlend field: the variant's index. |
6281
+ | <a id="column-SpriteFacing"></a>`SpriteFacing` | `SpriteFacing` | `Uint32Array` | 1 | A SpriteFacing field: the variant's index. |
5261
6282
  | <a id="column-StripBlend"></a>`StripBlend` | `StripBlend` | `Uint32Array` | 1 | A StripBlend field: the variant's index. |
5262
6283
  | <a id="column-Palette"></a>`Palette` | `Palette` | `Uint32Array` | 2 | A Palette handle field (0 is none). |
6284
+ | <a id="column-Look"></a>`Look` | `Look` | `Uint32Array` | 2 | A Look handle field (0 is none): a look og.load.look answered, kept for og.render.applyLook. |
5263
6285
  | <a id="column-DitherPattern"></a>`DitherPattern` | `DitherPattern` | `Uint32Array` | 1 | A DitherPattern field: the variant's index. |
5264
6286
  | <a id="column-StyliseSpace"></a>`StyliseSpace` | `StyliseSpace` | `Uint32Array` | 1 | A StyliseSpace field: the variant's index. |
5265
6287
  | <a id="column-ReflectionProbeMode"></a>`ReflectionProbeMode` | `ReflectionProbeMode` | `Uint32Array` | 1 | A ReflectionProbeMode field: the variant's index. |
6288
+ | <a id="column-Shader"></a>`Shader` | `Shader` | `Uint32Array` | 2 | A Shader handle field (0 is none): a material shader og.load.shader answered, kept for og.render.shaderMaterial. |
5266
6289
  | <a id="column-LineMode"></a>`LineMode` | `LineMode` | `Uint32Array` | 1 | A LineMode field: the variant's index. |
5267
6290
  | <a id="column-RenderTargetFormat"></a>`RenderTargetFormat` | `RenderTargetFormat` | `Uint32Array` | 1 | A RenderTargetFormat field: the variant's index. |
5268
6291
  | <a id="column-RenderTarget"></a>`RenderTarget` | `RenderTarget` | `Uint32Array` | 2 | A RenderTarget handle field (0 is none). |
@@ -5277,7 +6300,7 @@ column Geometry {
5277
6300
  }
5278
6301
  ```
5279
6302
 
5280
- <sub>`api.ogt` line 2245</sub>
6303
+ <sub>`api.ogt` line 2252</sub>
5281
6304
 
5282
6305
  ```ogt
5283
6306
  column Material {
@@ -5288,7 +6311,7 @@ column Material {
5288
6311
  }
5289
6312
  ```
5290
6313
 
5291
- <sub>`api.ogt` line 2252</sub>
6314
+ <sub>`api.ogt` line 2259</sub>
5292
6315
 
5293
6316
  ```ogt
5294
6317
  column ToneMapping {
@@ -5299,7 +6322,18 @@ column ToneMapping {
5299
6322
  }
5300
6323
  ```
5301
6324
 
5302
- <sub>`api.ogt` line 2627</sub>
6325
+ <sub>`api.ogt` line 2634</sub>
6326
+
6327
+ ```ogt
6328
+ column QualityPreset {
6329
+ doc "A QualityPreset field: the variant's index."
6330
+ array Uint32Array
6331
+ stride 1
6332
+ value QualityPreset
6333
+ }
6334
+ ```
6335
+
6336
+ <sub>`api.ogt` line 2656</sub>
5303
6337
 
5304
6338
  ```ogt
5305
6339
  column Texture {
@@ -5310,7 +6344,7 @@ column Texture {
5310
6344
  }
5311
6345
  ```
5312
6346
 
5313
- <sub>`api.ogt` line 2698</sub>
6347
+ <sub>`api.ogt` line 2758</sub>
5314
6348
 
5315
6349
  ```ogt
5316
6350
  column Lut {
@@ -5321,7 +6355,7 @@ column Lut {
5321
6355
  }
5322
6356
  ```
5323
6357
 
5324
- <sub>`api.ogt` line 2705</sub>
6358
+ <sub>`api.ogt` line 2765</sub>
5325
6359
 
5326
6360
  ```ogt
5327
6361
  column EnvironmentMap {
@@ -5332,7 +6366,7 @@ column EnvironmentMap {
5332
6366
  }
5333
6367
  ```
5334
6368
 
5335
- <sub>`api.ogt` line 2712</sub>
6369
+ <sub>`api.ogt` line 2772</sub>
5336
6370
 
5337
6371
  ```ogt
5338
6372
  column ParticleEmitter {
@@ -5343,7 +6377,7 @@ column ParticleEmitter {
5343
6377
  }
5344
6378
  ```
5345
6379
 
5346
- <sub>`api.ogt` line 2739</sub>
6380
+ <sub>`api.ogt` line 2799</sub>
5347
6381
 
5348
6382
  ```ogt
5349
6383
  column AoMethod {
@@ -5354,7 +6388,7 @@ column AoMethod {
5354
6388
  }
5355
6389
  ```
5356
6390
 
5357
- <sub>`api.ogt` line 2753</sub>
6391
+ <sub>`api.ogt` line 2813</sub>
5358
6392
 
5359
6393
  ```ogt
5360
6394
  column DofQuality {
@@ -5365,7 +6399,7 @@ column DofQuality {
5365
6399
  }
5366
6400
  ```
5367
6401
 
5368
- <sub>`api.ogt` line 2766</sub>
6402
+ <sub>`api.ogt` line 2826</sub>
5369
6403
 
5370
6404
  ```ogt
5371
6405
  column SpriteBlend {
@@ -5376,7 +6410,18 @@ column SpriteBlend {
5376
6410
  }
5377
6411
  ```
5378
6412
 
5379
- <sub>`api.ogt` line 2779</sub>
6413
+ <sub>`api.ogt` line 2839</sub>
6414
+
6415
+ ```ogt
6416
+ column SpriteFacing {
6417
+ doc "A SpriteFacing field: the variant's index."
6418
+ array Uint32Array
6419
+ stride 1
6420
+ value SpriteFacing
6421
+ }
6422
+ ```
6423
+
6424
+ <sub>`api.ogt` line 2853</sub>
5380
6425
 
5381
6426
  ```ogt
5382
6427
  column StripBlend {
@@ -5387,7 +6432,7 @@ column StripBlend {
5387
6432
  }
5388
6433
  ```
5389
6434
 
5390
- <sub>`api.ogt` line 2792</sub>
6435
+ <sub>`api.ogt` line 2866</sub>
5391
6436
 
5392
6437
  ```ogt
5393
6438
  column Palette {
@@ -5398,7 +6443,18 @@ column Palette {
5398
6443
  }
5399
6444
  ```
5400
6445
 
5401
- <sub>`api.ogt` line 3017</sub>
6446
+ <sub>`api.ogt` line 3084</sub>
6447
+
6448
+ ```ogt
6449
+ column Look {
6450
+ doc "A Look handle field (0 is none): a look og.load.look answered, kept for og.render.applyLook."
6451
+ array Uint32Array
6452
+ stride 2
6453
+ value Look
6454
+ }
6455
+ ```
6456
+
6457
+ <sub>`api.ogt` line 3091</sub>
5402
6458
 
5403
6459
  ```ogt
5404
6460
  column DitherPattern {
@@ -5409,7 +6465,7 @@ column DitherPattern {
5409
6465
  }
5410
6466
  ```
5411
6467
 
5412
- <sub>`api.ogt` line 3034</sub>
6468
+ <sub>`api.ogt` line 3108</sub>
5413
6469
 
5414
6470
  ```ogt
5415
6471
  column StyliseSpace {
@@ -5420,7 +6476,7 @@ column StyliseSpace {
5420
6476
  }
5421
6477
  ```
5422
6478
 
5423
- <sub>`api.ogt` line 3048</sub>
6479
+ <sub>`api.ogt` line 3122</sub>
5424
6480
 
5425
6481
  ```ogt
5426
6482
  column ReflectionProbeMode {
@@ -5431,7 +6487,18 @@ column ReflectionProbeMode {
5431
6487
  }
5432
6488
  ```
5433
6489
 
5434
- <sub>`api.ogt` line 3971</sub>
6490
+ <sub>`api.ogt` line 4049</sub>
6491
+
6492
+ ```ogt
6493
+ column Shader {
6494
+ doc "A Shader handle field (0 is none): a material shader og.load.shader answered, kept for og.render.shaderMaterial."
6495
+ array Uint32Array
6496
+ stride 2
6497
+ value Shader
6498
+ }
6499
+ ```
6500
+
6501
+ <sub>`api.ogt` line 4105</sub>
5435
6502
 
5436
6503
  ```ogt
5437
6504
  column LineMode {
@@ -5442,7 +6509,7 @@ column LineMode {
5442
6509
  }
5443
6510
  ```
5444
6511
 
5445
- <sub>`api.ogt` line 4375</sub>
6512
+ <sub>`api.ogt` line 4785</sub>
5446
6513
 
5447
6514
  ```ogt
5448
6515
  column RenderTargetFormat {
@@ -5453,7 +6520,7 @@ column RenderTargetFormat {
5453
6520
  }
5454
6521
  ```
5455
6522
 
5456
- <sub>`api.ogt` line 4574</sub>
6523
+ <sub>`api.ogt` line 4984</sub>
5457
6524
 
5458
6525
  ```ogt
5459
6526
  column RenderTarget {
@@ -5464,7 +6531,7 @@ column RenderTarget {
5464
6531
  }
5465
6532
  ```
5466
6533
 
5467
- <sub>`api.ogt` line 4583</sub>
6534
+ <sub>`api.ogt` line 4993</sub>
5468
6535
 
5469
6536
  ```ogt
5470
6537
  column Post {
@@ -5475,7 +6542,7 @@ column Post {
5475
6542
  }
5476
6543
  ```
5477
6544
 
5478
- <sub>`api.ogt` line 4719</sub>
6545
+ <sub>`api.ogt` line 5129</sub>
5479
6546
 
5480
6547
  ## Constants
5481
6548
 
@@ -5491,28 +6558,28 @@ column Post {
5491
6558
  const PARTICLES_ARMED u32 4294967295 "ParticleSystem.startTick's default: never written. A looping emitter emits as if started at tick 0; a one-shot (`looping false`) emits nothing until its startTick is written, so a burst spawned in `start` waits for its first use. Write it back to re-arm a one-shot without firing it."
5492
6559
  ```
5493
6560
 
5494
- <sub>`api.ogt` line 3393</sub>
6561
+ <sub>`api.ogt` line 3467</sub>
5495
6562
 
5496
6563
  ```ogt
5497
6564
  const MAX_LIGHTS u32 256 "The most point and spot lights one frame draws, among those in view; past it the ones brightest at the camera are kept."
5498
6565
  ```
5499
6566
 
5500
- <sub>`api.ogt` line 3937</sub>
6567
+ <sub>`api.ogt` line 4013</sub>
5501
6568
 
5502
6569
  ```ogt
5503
6570
  const MAX_CLUSTER_LIGHTS u32 64 "The most point and spot lights that shade one screen cluster (a 1/16 by 1/9 tile of the view and one of 24 depth slices); past it the ones brightest at the camera are kept there."
5504
6571
  ```
5505
6572
 
5506
- <sub>`api.ogt` line 3938</sub>
6573
+ <sub>`api.ogt` line 4014</sub>
5507
6574
 
5508
6575
  ```ogt
5509
6576
  const UI_LAYER i32 1000 "The UI's layer among screen sprites and screen text (SpriteDesc and TextDesc with screen): those at or below it draw under every og.ui element, those above it over every one, modals, toasts and the screen transition included (a HUD element made of sprites sitting on a UI panel: draw it only while its screen shows), in their layers' order either way."
5510
6577
  ```
5511
6578
 
5512
- <sub>`api.ogt` line 3939</sub>
6579
+ <sub>`api.ogt` line 4015</sub>
5513
6580
 
5514
6581
  ```ogt
5515
6582
  const MAX_REFLECTION_PROBES u32 8 "The most og.ReflectionProbe components one frame samples, nearest the camera first; the rest are skipped."
5516
6583
  ```
5517
6584
 
5518
- <sub>`api.ogt` line 3963</sub>
6585
+ <sub>`api.ogt` line 4041</sub>