@threenative/core 0.3.4 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/capabilities.json +1505 -79
- package/dist/{audio-7i3Xl0l3.d.ts → audio-DIJE5HTr.d.ts} +43 -3
- package/dist/{canvas-layer-DDmC_VVF.d.ts → canvas-layer-C1-5CviZ.d.ts} +5 -1
- package/dist/{game-CljaDv4D.d.ts → game-Jz4Fdoeb.d.ts} +114 -11
- package/dist/hot.d.ts +4 -4
- package/dist/index.d.ts +712 -118
- package/dist/index.js +12437 -4955
- package/dist/{gpu-readback-CqJEfWNQ.d.ts → model-lod-BDAUYgsS.d.ts} +80 -5
- package/dist/playtest.d.ts +6 -10
- package/dist/playtest.js +57 -24
- package/dist/react-css.d.ts +62 -0
- package/dist/react-css.js +591 -0
- package/dist/react.d.ts +2 -2
- package/dist/{renderer-CfsS2hxi.d.ts → renderer-9yEo9hPa.d.ts} +489 -22
- package/dist/terrain-jobs-worker.d.ts +2 -0
- package/dist/terrain-jobs-worker.js +130 -0
- package/dist/ui-layer.js +59 -8
- package/dist/world.d.ts +766 -73
- package/dist/world.js +9307 -3543
- package/gpl/recipes/export_world.py +18 -1
- package/mcp/blender-server.mjs +7 -4
- package/mcp/blender.mjs +3 -4
- package/mcp/engine-server.mjs +2 -2
- package/mcp/servers.mjs +4 -4
- package/package.json +15 -9
- package/patches/three@0.185.1-prd269-upgrade.patch +22418 -0
- package/patches/three@0.185.1.patch +6594 -700
- package/scripts/apply-three-patch.mjs +62 -4
- package/src/animation-blend.ts +264 -0
- package/src/animation-composition.ts +362 -0
- package/src/animation-layers.ts +260 -0
- package/src/animation-root-motion.ts +283 -0
- package/src/animation.ts +896 -0
- package/src/assets.ts +1303 -0
- package/src/atmosphere/index.ts +335 -0
- package/src/atmosphere/luts.ts +298 -0
- package/src/atmosphere/params.ts +323 -0
- package/src/audio.ts +912 -0
- package/src/billboard.ts +124 -0
- package/src/bone-lengths.ts +157 -0
- package/src/camera-shake.ts +116 -0
- package/src/canvas-layer.ts +47 -0
- package/src/clip-audit.ts +401 -0
- package/src/clustered-batch.ts +492 -0
- package/src/clustered-mesh.ts +638 -0
- package/src/compute-driven.ts +176 -0
- package/src/compute-timing.ts +318 -0
- package/src/config.ts +593 -0
- package/src/debug.ts +82 -0
- package/src/engine-render-hook.ts +25 -0
- package/src/entities.ts +79 -0
- package/src/entity-snapshot.ts +53 -0
- package/src/flight.ts +683 -0
- package/src/fluid-field.ts +748 -0
- package/src/fluid-particles.ts +1253 -0
- package/src/frame-budget.ts +1368 -0
- package/src/game.ts +2408 -0
- package/src/geometry-capture.ts +1098 -0
- package/src/gpu-class.ts +160 -0
- package/src/gpu-frame-observation.ts +424 -0
- package/src/gpu-readback.ts +143 -0
- package/src/gpu-scene-bvh.ts +464 -0
- package/src/grounding.ts +100 -0
- package/src/hot.ts +161 -0
- package/src/import-meta.d.ts +13 -0
- package/src/index.ts +1536 -0
- package/src/input.ts +690 -0
- package/src/instanced-batch-lod.ts +283 -0
- package/src/instanced-batch.ts +274 -0
- package/src/interpolation.ts +129 -0
- package/src/launch-diagnostics.ts +161 -0
- package/src/loop.ts +574 -0
- package/src/matrix-world.ts +245 -0
- package/src/merge-parts.ts +812 -0
- package/src/model-lod.ts +1315 -0
- package/src/net-protocol.ts +333 -0
- package/src/net-session.ts +477 -0
- package/src/net.ts +80 -0
- package/src/ocean/fft.ts +72 -0
- package/src/ocean/spectral.ts +728 -0
- package/src/particle-significance.ts +102 -0
- package/src/particles.ts +648 -0
- package/src/path-follow.ts +175 -0
- package/src/picking.ts +250 -0
- package/src/pipeline-census.ts +1566 -0
- package/src/platform.ts +210 -0
- package/src/playtest.ts +850 -0
- package/src/pointer-events.ts +411 -0
- package/src/pose-measure.ts +435 -0
- package/src/profiling/FrameCounters.ts +231 -0
- package/src/profiling/Spans.ts +548 -0
- package/src/profiling/opacity-convention.ts +21 -0
- package/src/profiling/render-list-validate.ts +175 -0
- package/src/profiling/render-trap-audit.ts +84 -0
- package/src/profiling/scene-warning.ts +190 -0
- package/src/profiling/span-probes.ts +191 -0
- package/src/profiling/unlit-foliage-warning.ts +149 -0
- package/src/projection-apply.ts +1529 -0
- package/src/projection-marker.ts +142 -0
- package/src/projection-plan.ts +1258 -0
- package/src/projection-skinned.ts +419 -0
- package/src/projection-stability.ts +409 -0
- package/src/projection-uniform.ts +328 -0
- package/src/random.ts +41 -0
- package/src/react-css.ts +604 -0
- package/src/react-glyphs.ts +114 -0
- package/src/react-host.ts +576 -0
- package/src/react-layout.ts +265 -0
- package/src/react.ts +60 -0
- package/src/render/alpha-antialiasing.ts +159 -0
- package/src/render/batched-velocity.ts +126 -0
- package/src/render/chain.ts +1021 -0
- package/src/render/daylight.ts +189 -0
- package/src/render/depth-pyramid.ts +596 -0
- package/src/render/foliage-alpha.ts +166 -0
- package/src/render/material-key.ts +60 -0
- package/src/render/mesh-pool.ts +144 -0
- package/src/render/probe-volume.ts +1668 -0
- package/src/render/resolution-subrect.ts +253 -0
- package/src/render/velocity.ts +442 -0
- package/src/render/virtual-shadow-pages.ts +827 -0
- package/src/render/virtual-shadow-partial.ts +174 -0
- package/src/render/virtual-shadow.ts +3330 -0
- package/src/render/world-impostor-surface.ts +722 -0
- package/src/render/world-impostor.ts +558 -0
- package/src/render-camera-cull.ts +441 -0
- package/src/render-pass-budget.ts +501 -0
- package/src/renderProjection.ts +758 -0
- package/src/renderer-config.ts +127 -0
- package/src/renderer.ts +1847 -0
- package/src/replay-protocol.ts +85 -0
- package/src/replay.ts +205 -0
- package/src/resolution-scaler.ts +819 -0
- package/src/rig-preparation.ts +271 -0
- package/src/ripple-field.ts +432 -0
- package/src/scale.ts +109 -0
- package/src/scene.ts +239 -0
- package/src/schedule.ts +155 -0
- package/src/skeletal-mesh.ts +61 -0
- package/src/skeleton.ts +100 -0
- package/src/snow-field.ts +744 -0
- package/src/softbody-topology.ts +269 -0
- package/src/softbody.ts +516 -0
- package/src/sprite-animator.ts +222 -0
- package/src/startup-readiness.ts +386 -0
- package/src/state.ts +66 -0
- package/src/static-transform.ts +274 -0
- package/src/storage-buffer.ts +253 -0
- package/src/streaming.ts +308 -0
- package/src/target-fps.ts +92 -0
- package/src/terrain-jobs-worker.ts +17 -0
- package/src/terrain-jobs.ts +353 -0
- package/src/textures.ts +39 -0
- package/src/tracers.ts +237 -0
- package/src/ui-bridge.ts +368 -0
- package/src/ui-hit-regions.ts +380 -0
- package/src/ui-layer.ts +83 -0
- package/src/ui-state.ts +220 -0
- package/src/version.ts +2 -0
- package/src/viewport.ts +253 -0
- package/src/warmup.ts +1357 -0
- package/src/water-surface.ts +384 -0
- package/src/wave-field.ts +524 -0
- package/src/world-capabilities.ts +131 -0
- package/src/world-cell-proxy.ts +392 -0
- package/src/world-cells.ts +10564 -0
- package/src/world-gpu-scene.ts +3354 -0
- package/src/world-heightmap.ts +82 -0
- package/src/world-package.ts +469 -0
- package/src/world-passes.ts +582 -0
- package/src/world-region.ts +17 -0
- package/src/world-terrain-splat.ts +564 -0
- package/src/world-tiles.ts +3826 -0
- package/src/world-topology.ts +370 -0
- package/src/world-validate.ts +48 -0
- package/src/world.ts +805 -0
package/dist/world.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Object3D, Mesh, LOD, Vector3, Material, Group,
|
|
2
|
-
import { I as IComputeDriven, a as IGPUReadbackSample } from './
|
|
3
|
-
import { I as IRendererLike } from './renderer-
|
|
1
|
+
import { Object3D, Mesh, LOD, Vector3, Camera, Material, Group, BufferGeometry } from 'three';
|
|
2
|
+
import { I as IComputeDriven, a as ILodView, b as IModelLodPolicy, c as IGPUReadbackSample } from './model-lod-BDAUYgsS.js';
|
|
3
|
+
import { I as IRendererLike } from './renderer-9yEo9hPa.js';
|
|
4
4
|
import { I as IAssetLoader } from './assets-CqvE429w.js';
|
|
5
|
-
import 'three/webgpu';
|
|
5
|
+
import { Node } from 'three/webgpu';
|
|
6
6
|
|
|
7
7
|
interface IWorldErosionOptions {
|
|
8
8
|
readonly depositionRate: number;
|
|
@@ -59,6 +59,9 @@ interface IWorldTilesFollowPosition {
|
|
|
59
59
|
readonly x: number;
|
|
60
60
|
readonly z: number;
|
|
61
61
|
}
|
|
62
|
+
/** Actual render view and the resolved model LOD policy; distance floors still apply. */
|
|
63
|
+
interface IWorldTilesLodView extends Pick<ILodView, "camera" | "viewportHeight">, IModelLodPolicy {
|
|
64
|
+
}
|
|
62
65
|
interface IWorldTilesTopologyObservation {
|
|
63
66
|
readonly columns: number;
|
|
64
67
|
readonly depth: number;
|
|
@@ -96,7 +99,7 @@ interface IWorldTilesOptions {
|
|
|
96
99
|
readonly tileSize: number;
|
|
97
100
|
/** Vertex decimation factors. Defaults to 1, 2, and 4 over the same field. */
|
|
98
101
|
readonly lodFactors?: readonly number[];
|
|
99
|
-
/**
|
|
102
|
+
/** Nearest world-unit distances at which the next LOD may become active; screen error may delay it. */
|
|
100
103
|
readonly lodDistances?: readonly number[];
|
|
101
104
|
/**
|
|
102
105
|
* Re-derive the terrain every frame and assert it: a finiteness scan of every rendered vertex,
|
|
@@ -106,10 +109,14 @@ interface IWorldTilesOptions {
|
|
|
106
109
|
*/
|
|
107
110
|
readonly validate?: boolean;
|
|
108
111
|
/**
|
|
109
|
-
* Merge settled same-LOD terrain tiles into super-tiles: one mesh per K×K block,
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
112
|
+
* Merge settled same-LOD terrain tiles into super-tiles: one mesh per K×K block, one block rebuilt
|
|
113
|
+
* per frame. It changes how many draws the main pass submits, never how the ground looks — a merged
|
|
114
|
+
* vertex lands on the world position its tile's vertex did, on the same game-owned `surface`.
|
|
115
|
+
*
|
|
116
|
+
* On by default, like `validate`'s measurements are off by default only because they cost a
|
|
117
|
+
* measurement a frame. `mergeTiles: false`, `?tnTerrainMerge=0` or `TN_TERRAIN_MERGE=0` turns it
|
|
118
|
+
* off for a run. A block's bytes are reported as `terrainTiles.blockBytes` and are never charged to
|
|
119
|
+
* `residentByteBudget`, so the merge changes draws and no tile the budget would admit without it.
|
|
113
120
|
*/
|
|
114
121
|
readonly mergeTiles?: boolean;
|
|
115
122
|
/** Explicit game-owned measurement region used by the topology evaluator. */
|
|
@@ -127,7 +134,7 @@ interface IWorldTilesOptions {
|
|
|
127
134
|
* @constraint sampleHeight and surface are required game choices; no landform or surface preset is installed
|
|
128
135
|
* @constraint residentTileBudget and residentByteBudget are hard caps; a tile that cannot fit throws
|
|
129
136
|
* @constraint seam gap, LOD pop and the rendered-vertex finiteness scan are measurements that are off by default; TN_TERRAIN_VALIDATE=1, ?tnTerrainValidate=1 or validate: true runs them, and maxSeamGap, maxVisualSeamGap and maxLodPop report undefined while they are off
|
|
130
|
-
* @override tileSize, tileResolution, lodFactors, lodDistances, skirtDepth, streamRadius, colliderRadius, validate, and budgets
|
|
137
|
+
* @override tileSize, tileResolution, lodFactors, lodDistances, skirtDepth, streamRadius, colliderRadius, mergeTiles, validate, and budgets
|
|
131
138
|
* @example const tiles = new TerrainTiles({ sampleHeight, surface: gameSurface(), tileSize: 256, tileResolution: 129, residentTileBudget: 25, residentByteBudget: 32_000_000 });
|
|
132
139
|
*/
|
|
133
140
|
declare class TerrainTiles extends Object3D implements IComputeDriven {
|
|
@@ -139,8 +146,23 @@ declare class TerrainTiles extends Object3D implements IComputeDriven {
|
|
|
139
146
|
readonly tileSize: number;
|
|
140
147
|
readonly processCadence: "render";
|
|
141
148
|
constructor(options: IWorldTilesOptions);
|
|
149
|
+
/** Fresh residency and colliders; retain the visible tree until follow() regenerates it. */
|
|
150
|
+
clone(recursive?: boolean): this;
|
|
142
151
|
get released(): boolean;
|
|
143
152
|
get residentTileCount(): number;
|
|
153
|
+
/**
|
|
154
|
+
* Every retained terrain byte, against `residentByteBudget`: the resident tiles with their levels
|
|
155
|
+
* and edge samples, the stitch bridges, and the retained topology.
|
|
156
|
+
*
|
|
157
|
+
* A merged super-tile is deliberately absent. A block duplicates the level vertices of the tiles it
|
|
158
|
+
* covers, and those tiles stay resident because a tile that leaves the block draws its own mesh
|
|
159
|
+
* again — so charging the copy made a derived artefact evict real terrain detail out of the same
|
|
160
|
+
* budget the tiles were admitted against, and a budget sized for unmerged terrain held fewer tiles
|
|
161
|
+
* with the merge on. The copy is reported as `terrainTiles.blockBytes` instead. (PRD-475.)
|
|
162
|
+
*
|
|
163
|
+
* ponytail: terrain geometry costs up to ~2x while merged; free the per-tile GPU buffers behind a
|
|
164
|
+
* block (keep the height field for queries) if that memory ever matters.
|
|
165
|
+
*/
|
|
144
166
|
get residentBytes(): number;
|
|
145
167
|
get peakResidentTileCount(): number;
|
|
146
168
|
get peakResidentBytes(): number;
|
|
@@ -152,11 +174,17 @@ declare class TerrainTiles extends Object3D implements IComputeDriven {
|
|
|
152
174
|
* What the main pass submits for terrain levels right now: `tiles` surfaces, held as `blocks`
|
|
153
175
|
* merged super-tiles plus one mesh each for the tiles that are not merged (a lone block member or
|
|
154
176
|
* a tile mid LOD morph). `draws` is `blocks` plus those individual meshes, so with the merge off
|
|
155
|
-
* it is exactly the number of visible level meshes — the census the merge exists to cut. `
|
|
156
|
-
* counts the
|
|
177
|
+
* it is exactly the number of visible level meshes — the census the merge exists to cut. `blending`
|
|
178
|
+
* counts the resident tiles mid LOD morph, which are always among the individual meshes. A block
|
|
179
|
+
* whose tile just left stops being drawn until its rebuild lands, and those tiles are counted as the
|
|
180
|
+
* individual meshes they went back to — see `#releaseStaleBlock`.
|
|
181
|
+
* `rebuilds` counts the block geometries built over this residency owner's life. `blockBytes` is
|
|
182
|
+
* what the held blocks cost, reported and not charged to `residentByteBudget` — see `residentBytes`.
|
|
157
183
|
*/
|
|
158
184
|
get terrainTiles(): {
|
|
185
|
+
readonly blockBytes: number;
|
|
159
186
|
readonly blocks: number;
|
|
187
|
+
readonly blending: number;
|
|
160
188
|
readonly draws: number;
|
|
161
189
|
readonly rebuilds: number;
|
|
162
190
|
readonly tiles: number;
|
|
@@ -199,17 +227,22 @@ declare class TerrainTiles extends Object3D implements IComputeDriven {
|
|
|
199
227
|
/**
|
|
200
228
|
* Move residency to the followed point: admit, evict and re-level every tile.
|
|
201
229
|
*
|
|
202
|
-
* `budget` caps
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
230
|
+
* `budget` caps construction chunks as well as completed admissions. An unfinished tile stays
|
|
231
|
+
* outside residency and resumes on a later call while it remains wanted. Moving it outside the
|
|
232
|
+
* selected ring cancels and releases that work. Omitted, a call drains synchronously as before.
|
|
233
|
+
* `view` shares the resolved model pixel policy; omitted, selection remains distance-only.
|
|
206
234
|
*/
|
|
207
|
-
follow(position: IWorldTilesFollowPosition | Pick<Vector3, "x" | "z">, budget?: IAdmissionBudget): void;
|
|
235
|
+
follow(position: IWorldTilesFollowPosition | Pick<Vector3, "x" | "z">, budget?: IAdmissionBudget, view?: IWorldTilesLodView): void;
|
|
208
236
|
heightAt(x: number, z: number): number;
|
|
209
237
|
normalAt(x: number, z: number, target?: Vector3): Vector3;
|
|
210
238
|
sample(channel: string, x: number, z: number): number;
|
|
211
239
|
attachRenderer(renderer: IRendererLike): void;
|
|
212
|
-
process(renderer?: IRendererLike | undefined): void;
|
|
240
|
+
process(renderer?: IRendererLike | undefined, _camera?: Camera, _covered?: boolean, view?: IWorldTilesLodView | undefined): void;
|
|
241
|
+
/** Completed render tiles intersecting a square in world metres; pending builds do not count. */
|
|
242
|
+
readinessAt(position: IWorldTilesFollowPosition, radius?: number): {
|
|
243
|
+
required: number;
|
|
244
|
+
loaded: number;
|
|
245
|
+
};
|
|
213
246
|
debug(): Record<string, unknown>;
|
|
214
247
|
detach(): void;
|
|
215
248
|
dispose(): void;
|
|
@@ -341,11 +374,25 @@ interface IWorldRun {
|
|
|
341
374
|
readonly offset: number;
|
|
342
375
|
readonly count: number;
|
|
343
376
|
}
|
|
377
|
+
interface IWorldCellProxy {
|
|
378
|
+
readonly glb: string;
|
|
379
|
+
/** Conservative world-space simplification error bound, in metres. */
|
|
380
|
+
readonly error: number;
|
|
381
|
+
readonly triangles: number;
|
|
382
|
+
readonly materialGroups: number;
|
|
383
|
+
/** Older records without scope cover chunks only. */
|
|
384
|
+
readonly scope?: "cell" | "chunks";
|
|
385
|
+
readonly bounds?: IWorldAssetBounds;
|
|
386
|
+
readonly sourceTriangles?: number;
|
|
387
|
+
/** Cook census only: runtime compares the currently active shared batches. */
|
|
388
|
+
readonly sourcePrimitives?: number;
|
|
389
|
+
}
|
|
344
390
|
interface IWorldCell {
|
|
345
391
|
readonly x: number;
|
|
346
392
|
readonly z: number;
|
|
347
393
|
readonly runs: readonly IWorldRun[];
|
|
348
394
|
readonly chunks?: readonly string[];
|
|
395
|
+
readonly proxy?: IWorldCellProxy;
|
|
349
396
|
}
|
|
350
397
|
interface IWorldPackage {
|
|
351
398
|
readonly version: 1;
|
|
@@ -386,6 +433,204 @@ declare function validateWorldPackage(manifest: unknown, options: IWorldPackageV
|
|
|
386
433
|
*/
|
|
387
434
|
declare function cellPlacements(placements: ArrayBuffer, run: IWorldRun): Float32Array;
|
|
388
435
|
|
|
436
|
+
/**
|
|
437
|
+
* What one contact footprint wants at a local offset, sampled in the contact's own frame.
|
|
438
|
+
*
|
|
439
|
+
* A footprint describes a shape, never a load: the same sole sinks deeper under a heavier
|
|
440
|
+
* contact. Every field is 0..1 except `relief`, which is metres.
|
|
441
|
+
*/
|
|
442
|
+
interface ISnowFootprintSample {
|
|
443
|
+
/** 0..1 fraction of the footprint touching snow here; erases displaced bank and adds compaction. */
|
|
444
|
+
readonly coverage: number;
|
|
445
|
+
/** 0..1 relative depth at this offset, so a toe can press deeper than a heel. */
|
|
446
|
+
readonly shape: number;
|
|
447
|
+
/** Metres of tread relief subtracted from the impression at this offset. */
|
|
448
|
+
readonly relief: number;
|
|
449
|
+
/** 0..1 raised snow pushed out beside the contact at this offset. */
|
|
450
|
+
readonly bank: number;
|
|
451
|
+
/** 0..1 surface disturbance at this offset, for render shading and game queries. */
|
|
452
|
+
readonly disturbance: number;
|
|
453
|
+
}
|
|
454
|
+
/** A game-authored contact shape: a boot sole, a tyre, a hull, a sphere. */
|
|
455
|
+
interface ISnowFootprint {
|
|
456
|
+
/** Half-width of the square sampled around the contact centre, in metres. */
|
|
457
|
+
readonly extent: number;
|
|
458
|
+
/** Local contact-space sample; +z runs forward along the contact's orientation. */
|
|
459
|
+
readonly sample: (x: number, z: number) => ISnowFootprintSample;
|
|
460
|
+
}
|
|
461
|
+
/** One contact between a supported object and the snow surface. */
|
|
462
|
+
interface ISnowContact {
|
|
463
|
+
readonly x: number;
|
|
464
|
+
readonly z: number;
|
|
465
|
+
/** Game-authored imprint shape. */
|
|
466
|
+
readonly footprint: ISnowFootprint;
|
|
467
|
+
/** Supported contact area in square metres. Pressure is load over area, never a fixed constant. */
|
|
468
|
+
readonly area: number;
|
|
469
|
+
/** Normal load in newtons. */
|
|
470
|
+
readonly load: number;
|
|
471
|
+
/** Orientation about +y in radians. Default 0. */
|
|
472
|
+
readonly rotation?: number;
|
|
473
|
+
/** 0..1 snow hardness. Defaults to the field's hardness. */
|
|
474
|
+
readonly hardness?: number;
|
|
475
|
+
/** Seconds the contact is applied. Defaults to the field's response time. */
|
|
476
|
+
readonly duration?: number;
|
|
477
|
+
}
|
|
478
|
+
/** The four snow channels at one world position. */
|
|
479
|
+
interface ISnowFieldSample {
|
|
480
|
+
readonly indent: number;
|
|
481
|
+
readonly bank: number;
|
|
482
|
+
readonly compaction: number;
|
|
483
|
+
readonly disturbance: number;
|
|
484
|
+
}
|
|
485
|
+
interface ISnowFieldOptions {
|
|
486
|
+
/** The canonical terrain. Snow composes onto it; there is no second terrain representation. */
|
|
487
|
+
readonly field: Heightfield;
|
|
488
|
+
/** Snow depth in metres. Zero is bare ground. Default 0.28. */
|
|
489
|
+
readonly depth?: number;
|
|
490
|
+
/** 0..1 snow hardness used by contacts that do not override it. Default 0.3. */
|
|
491
|
+
readonly hardness?: number;
|
|
492
|
+
/** Fraction of its target impression a contact reaches in one response time. Default 0.9. */
|
|
493
|
+
readonly yieldFraction?: number;
|
|
494
|
+
/** Metres of raised bank allowed beside a contact. Default 0.085. */
|
|
495
|
+
readonly maxBank?: number;
|
|
496
|
+
/** Seconds a fully-loaded contact takes to reach its full impression. Default 0.1. */
|
|
497
|
+
readonly responseTime?: number;
|
|
498
|
+
}
|
|
499
|
+
interface ISnowDiscFootprintOptions {
|
|
500
|
+
/** 0..1 width of the falloff at the disc's edge, as a fraction of the radius. Default 0.25. */
|
|
501
|
+
readonly softness?: number;
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* A circular contact footprint, sized from a radius the caller measures.
|
|
505
|
+
*
|
|
506
|
+
* The shape a sphere, a ball, a wheel or a probe presses into snow, and the default the physics
|
|
507
|
+
* binding derives from a sphere's contact geometry. Flat inside the radius, eased over the
|
|
508
|
+
* softness band, with a raised rim just outside it.
|
|
509
|
+
* @situation press a ball, wheel or probe into snow
|
|
510
|
+
* @situation give a sphere a physically sized snow contact instead of a boot shape
|
|
511
|
+
* @constraint radius is metres; the footprint never grows with load, only deeper
|
|
512
|
+
* @override softness widens the eased edge without changing the contact radius
|
|
513
|
+
* @example const footprint = snowDiscFootprint(0.25);
|
|
514
|
+
*/
|
|
515
|
+
declare function snowDiscFootprint(radius: number, options?: ISnowDiscFootprintOptions): ISnowFootprint;
|
|
516
|
+
/**
|
|
517
|
+
* Persistent snow deformation over one canonical heightfield.
|
|
518
|
+
*
|
|
519
|
+
* Snow keeps four channels per cell — indentation, displaced bank, compaction and disturbance —
|
|
520
|
+
* and writes the combined surface (`terrain + depth + bank - indent`) back into the heightfield
|
|
521
|
+
* it was given. Queries, rendered geometry and collider export therefore all read one surface,
|
|
522
|
+
* and no second terrain representation exists.
|
|
523
|
+
*
|
|
524
|
+
* The field is numeric only: it never chooses a boot, a tread, a particle, a material or a
|
|
525
|
+
* camera. Games supply terrain heights, the snow depth, the contact profile and the response
|
|
526
|
+
* coefficients; this class owns the storage, the load-dependent penetration and the bounded
|
|
527
|
+
* recovery. It is a heightfield approximation — not granular snow, displaced-volume
|
|
528
|
+
* conservation, avalanches, melting or a calibrated material law.
|
|
529
|
+
* @situation leave footprints, tracks and tyre ruts in snow that persist and fill in over time
|
|
530
|
+
* @situation let a pushed sphere carve a connected track and a dropped one settle into a crater
|
|
531
|
+
* @situation store snow deformation that rendered geometry and collision both read
|
|
532
|
+
* @situation reset a snowfield between rounds or change its depth at runtime
|
|
533
|
+
* @situation show how packed the snow is where people have walked or objects have rested
|
|
534
|
+
* @constraint the field composes onto a Heightfield; construct the terrain first and let this own the surface
|
|
535
|
+
* @constraint zero depth is bare ground: contacts register no indentation at all
|
|
536
|
+
* @constraint out-of-region heightAt and normalAt follow Heightfield's error contract; sample returns zeros
|
|
537
|
+
* @override depth, hardness, yieldFraction, maxBank and responseTime name the response coefficients
|
|
538
|
+
* @requires @threenative/core/world Heightfield as the canonical terrain and surface
|
|
539
|
+
* @example import { Heightfield } from "@threenative/core/world";
|
|
540
|
+
* const terrain = Heightfield.fromSampler({ rows: 129, columns: 129, width: 64, depth: 64, origin: { x: 0, z: 0 }, sampleHeight: (x, z) => Math.sin(x * 0.1) * 0.5 });
|
|
541
|
+
* const snow = new SnowField({ field: terrain, depth: 0.28, hardness: 0.3 });
|
|
542
|
+
* snow.stamp({ x: 0, z: 0, area: 0.074, load: 784, duration: 0.1, footprint: snowDiscFootprint(0.12) });
|
|
543
|
+
* snow.recover(1 / 60, 0.0012, 0.4);
|
|
544
|
+
*/
|
|
545
|
+
declare class SnowField {
|
|
546
|
+
#private;
|
|
547
|
+
/** Canonical terrain and the surface snow composes onto. */
|
|
548
|
+
readonly field: Heightfield;
|
|
549
|
+
readonly columns: number;
|
|
550
|
+
readonly rows: number;
|
|
551
|
+
readonly cellWidth: number;
|
|
552
|
+
readonly cellDepth: number;
|
|
553
|
+
/** World x of column 0. */
|
|
554
|
+
readonly minimumX: number;
|
|
555
|
+
/** World z of row 0. */
|
|
556
|
+
readonly minimumZ: number;
|
|
557
|
+
/** 0..1 snow hardness used by contacts that do not override it. */
|
|
558
|
+
hardness: number;
|
|
559
|
+
/** Fraction of its target impression a contact reaches in one response time. */
|
|
560
|
+
readonly yieldFraction: number;
|
|
561
|
+
/** Metres of raised bank allowed beside a contact. */
|
|
562
|
+
readonly maxBank: number;
|
|
563
|
+
/** Seconds a fully-loaded contact takes to reach its full impression. */
|
|
564
|
+
readonly responseTime: number;
|
|
565
|
+
constructor(options: ISnowFieldOptions);
|
|
566
|
+
/** Snow depth in metres. Zero is bare ground. */
|
|
567
|
+
get depth(): number;
|
|
568
|
+
/** Contacts applied since construction or the last reset. */
|
|
569
|
+
get steps(): number;
|
|
570
|
+
/** Penetration the most recent contact reached, in metres. */
|
|
571
|
+
get lastSink(): number;
|
|
572
|
+
/** Cells still carrying deformation. Recovery drops a cell once it is fully buried. */
|
|
573
|
+
get activeCells(): number;
|
|
574
|
+
/** Monotonic version, incremented once per batch that changed the canonical surface. */
|
|
575
|
+
get version(): number;
|
|
576
|
+
/** Window of the canonical field the last change wrote, or undefined before the first change. */
|
|
577
|
+
get dirtyRegion(): IHeightfieldRegionBounds | undefined;
|
|
578
|
+
/**
|
|
579
|
+
* Union of every window written since the previous call, then forgotten.
|
|
580
|
+
*
|
|
581
|
+
* One fixed step can write several windows — each contact, then recovery — and `dirtyRegion`
|
|
582
|
+
* keeps only the last, so a renderer that refreshes geometry once per drawn frame takes this
|
|
583
|
+
* instead. It has one owner: two consumers taking it would each miss the other's windows.
|
|
584
|
+
*/
|
|
585
|
+
takeDirtyRegion(): IHeightfieldRegionBounds | undefined;
|
|
586
|
+
/** Bytes retained by the four snow channels and the base terrain copy. */
|
|
587
|
+
get memoryBytes(): number;
|
|
588
|
+
/**
|
|
589
|
+
* The four snow channels at a world position, bilinearly interpolated.
|
|
590
|
+
*
|
|
591
|
+
* Returns zeros outside the field rather than throwing, so a caller sweeping a broad area does
|
|
592
|
+
* not have to bounds-check first. `heightAt` keeps the strict contract.
|
|
593
|
+
*/
|
|
594
|
+
sample(x: number, z: number): ISnowFieldSample;
|
|
595
|
+
/**
|
|
596
|
+
* One channel over a window of cells, row-major, written into `target` (allocated when absent
|
|
597
|
+
* or too small) and returned. The bulk read a renderer uses to encode a refreshed window: a
|
|
598
|
+
* `sample` per vertex costs a bilinear lookup and an object each, and a refill window is
|
|
599
|
+
* thousands of vertices. A window outside the field throws.
|
|
600
|
+
*/
|
|
601
|
+
copyChannel(channel: keyof ISnowFieldSample, bounds: IHeightfieldRegionBounds, target?: Float32Array): Float32Array;
|
|
602
|
+
/** Snow surface height at a world position, from the same samples geometry and collision read. */
|
|
603
|
+
heightAt(x: number, z: number): number;
|
|
604
|
+
/** Surface normal at a world position. */
|
|
605
|
+
normalAt(x: number, z: number, target?: Vector3): Vector3;
|
|
606
|
+
/**
|
|
607
|
+
* Press one contact into the snow and return the penetration it reached, in metres.
|
|
608
|
+
*
|
|
609
|
+
* Pressure is `load / area`, so the same profile responds to how much weight it carries and how
|
|
610
|
+
* widely that weight is spread. `duration` scales how far the contact gets towards its target
|
|
611
|
+
* impression, which is what makes a run of shorter contacts agree with one long one. A contact
|
|
612
|
+
* entirely outside the field returns 0 and leaves the version unchanged.
|
|
613
|
+
*/
|
|
614
|
+
stamp(contact: ISnowContact): number;
|
|
615
|
+
/**
|
|
616
|
+
* Let snowfall fill depressions and wind soften banks over `seconds`.
|
|
617
|
+
*
|
|
618
|
+
* Deposition and wind are rates, so this is presentation-rate independent: a second of
|
|
619
|
+
* simulation recovers the same amount however many ticks it was split into. It accelerates
|
|
620
|
+
* deposition only — never gravity, movement, falling flakes or the physics timestep.
|
|
621
|
+
*/
|
|
622
|
+
recover(seconds: number, deposition: number, wind: number): void;
|
|
623
|
+
/**
|
|
624
|
+
* Change the snow depth in metres and push the new surface through the canonical field.
|
|
625
|
+
*
|
|
626
|
+
* Existing indentation is capped to the new depth rather than scaled, so deepening snow does
|
|
627
|
+
* not erase tracks and shallowing it buries them.
|
|
628
|
+
*/
|
|
629
|
+
setDepth(depth: number): void;
|
|
630
|
+
/** Clear every track, bank and compaction record and return the surface to bare snow. */
|
|
631
|
+
reset(): void;
|
|
632
|
+
}
|
|
633
|
+
|
|
389
634
|
/**
|
|
390
635
|
* Build a game-usable `sampleHeight` from a raw v1 heightmap.
|
|
391
636
|
*
|
|
@@ -409,15 +654,36 @@ declare function heightSamplerFromHeightmap(terrain: IWorldTerrain, extent: IWor
|
|
|
409
654
|
declare function loadWorldHeightmap(url: string): Promise<Uint16Array>;
|
|
410
655
|
|
|
411
656
|
type Channel = "r" | "g" | "b" | "a";
|
|
412
|
-
/** One texture set: albedo (and optionally a normal map) tiled in metres, tinted in linear. */
|
|
657
|
+
/** One texture set: albedo (and optionally a normal and ORM map) tiled in metres, tinted in linear. */
|
|
413
658
|
interface ITerrainSplatLayer {
|
|
414
659
|
readonly id: string;
|
|
415
660
|
readonly tile: number;
|
|
416
661
|
readonly tint: readonly [number, number, number];
|
|
417
662
|
readonly normal?: boolean;
|
|
663
|
+
/** `<id>_orm.jpg`: occlusion in r, roughness in g, metalness in b, read as linear data. */
|
|
664
|
+
readonly orm?: boolean;
|
|
665
|
+
/** Without an ORM map, how this layer answers light. Defaults to `DEFAULT_ROUGHNESS` and 0. */
|
|
666
|
+
readonly metalness?: number;
|
|
667
|
+
readonly roughness?: number;
|
|
418
668
|
readonly saturation?: number;
|
|
419
669
|
/** Box-projected, for cliffs a top-down projection smears. */
|
|
420
670
|
readonly triplanar?: boolean;
|
|
671
|
+
/**
|
|
672
|
+
* `<id>_h.jpg`: the layer's own height in r, read as linear data and handed to `layerWeight`.
|
|
673
|
+
* Read only on a masked layer; the base has no weight to bend.
|
|
674
|
+
*/
|
|
675
|
+
readonly height?: boolean;
|
|
676
|
+
/**
|
|
677
|
+
* The same map again at a larger `tile`, mixed in by up to `amount` as camera distance goes from
|
|
678
|
+
* `from` to `to` metres, so a repeated pattern stops reading as a grid at grazing angles.
|
|
679
|
+
* Top-down layers only; every value is the game's.
|
|
680
|
+
*/
|
|
681
|
+
readonly far?: {
|
|
682
|
+
readonly tile: number;
|
|
683
|
+
readonly from: number;
|
|
684
|
+
readonly to: number;
|
|
685
|
+
readonly amount: number;
|
|
686
|
+
};
|
|
421
687
|
}
|
|
422
688
|
/** A layer blended over what is below it by one mask channel, remapped from `lo..hi`. */
|
|
423
689
|
interface ITerrainSplatMaskedLayer extends ITerrainSplatLayer {
|
|
@@ -455,11 +721,30 @@ interface ITerrainSplatTable {
|
|
|
455
721
|
readonly planes: number;
|
|
456
722
|
readonly masks: Readonly<Record<string, readonly [number, Channel | "rgb"]>>;
|
|
457
723
|
};
|
|
458
|
-
/** Package-relative folder of `<id>_diff.jpg` and `<id>
|
|
724
|
+
/** Package-relative folder of `<id>_diff.jpg`, `<id>_nrm.jpg`, `<id>_orm.jpg` and `<id>_h.jpg`. */
|
|
459
725
|
readonly textures: string;
|
|
460
726
|
}
|
|
727
|
+
/** What `ILoadTerrainSplatOptions.layerWeight` is told about the layer whose weight it returns. */
|
|
728
|
+
interface ITerrainSplatWeightContext {
|
|
729
|
+
readonly layer: ITerrainSplatMaskedLayer;
|
|
730
|
+
/** The layer's height sample, projected as its albedo is; `undefined` when it ships no `height`. */
|
|
731
|
+
readonly height: Node<"float"> | undefined;
|
|
732
|
+
/** The layer's index in `table.layers`. */
|
|
733
|
+
readonly index: number;
|
|
734
|
+
}
|
|
461
735
|
interface ILoadTerrainSplatOptions {
|
|
462
736
|
readonly assets: IAssetLoader;
|
|
737
|
+
/**
|
|
738
|
+
* The live renderer. Uncompressed layers stack into one array texture per set through GPU copies,
|
|
739
|
+
* which need one; without it every layer keeps its own sampler and the marker says so.
|
|
740
|
+
*/
|
|
741
|
+
readonly renderer?: IRendererLike;
|
|
742
|
+
/**
|
|
743
|
+
* Replaces each layer's blend weight, given the mask's own (remapped, 0..1) and the layer's
|
|
744
|
+
* height sample. The game owns the curve, for example a height blend; the package mixes colour,
|
|
745
|
+
* normal and ORM by whatever this returns. Absent, the mask weight is used unchanged.
|
|
746
|
+
*/
|
|
747
|
+
readonly layerWeight?: (weight: Node<"float">, context: ITerrainSplatWeightContext) => Node<"float">;
|
|
463
748
|
/** The world package's `world.json`, as `WorldCells.load` takes it. */
|
|
464
749
|
readonly url: string;
|
|
465
750
|
}
|
|
@@ -470,24 +755,203 @@ interface ILoadTerrainSplatOptions {
|
|
|
470
755
|
* heightmap, so no cook moves a blend threshold), with noise-broken edges and macro brightness
|
|
471
756
|
* variation. Texture sets tile in world metres on the package's ground plane (x, -z: a Z-up
|
|
472
757
|
* authoring tool's x and y), cliffs can be triplanar, and the base plus any layer that asks carries
|
|
473
|
-
* a normal map.
|
|
474
|
-
*
|
|
758
|
+
* a normal map. Each layer answers light from its own ORM map where the table ships one and from
|
|
759
|
+
* the table's own roughness and metalness where it does not; a layer that states neither is matte
|
|
760
|
+
* and dielectric, and named in a warning. Nothing here is a look choice:
|
|
761
|
+
* textures, tiles, tints, thresholds, surface response and noise scales all come from the package's
|
|
762
|
+
* table, which the game authors once and its DCC shares.
|
|
475
763
|
*
|
|
476
764
|
* @situation terrain textured by splat masks exported from Blender with the world package
|
|
477
765
|
* @situation the game's terrain should match the DCC's terrain material without a second copy
|
|
478
|
-
* @constraint the package's world.json must carry `terrain.layers.table` and `terrain.layers.splat`, written by the `
|
|
479
|
-
* @constraint WebGPU allows 16 sampled textures per stage:
|
|
766
|
+
* @constraint the package's world.json must carry `terrain.layers.table` and `terrain.layers.splat`, written by `export_terrain_layers` in the `export_world.py` recipe
|
|
767
|
+
* @constraint WebGPU allows 16 sampled textures per stage: same-size layers stack into one array texture per set, and `TN_TERRAIN_SPLAT samplers=<n>` reports what is left
|
|
480
768
|
* @override every value comes from the package's table; the returned material is the game's to adjust
|
|
481
769
|
* @example
|
|
482
|
-
* const surface = await loadTerrainSplat({ assets: ctx.assets, url: "world/world.json" });
|
|
770
|
+
* const surface = await loadTerrainSplat({ assets: ctx.assets, renderer: ctx.renderer, url: "world/world.json" });
|
|
483
771
|
* const world = await WorldCells.load({ assets: ctx.assets, url: "world/world.json", surface, follow, ring: 2 });
|
|
484
772
|
*/
|
|
485
773
|
declare function loadTerrainSplat(options: ILoadTerrainSplatOptions): Promise<Material>;
|
|
486
774
|
|
|
775
|
+
/** What a launch asked the GPU-scene occlusion cull to do. `measure` counts; `off` runs no test. */
|
|
776
|
+
type OcclusionMode = "off" | "measure";
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* One shadow map's own three numbers, which is the whole of what a level render knows that the main
|
|
780
|
+
* camera does not.
|
|
781
|
+
*
|
|
782
|
+
* They are the level's, never the camera's: a map's frustum is the light's window, its gate is the
|
|
783
|
+
* texel size it can resolve, and its base is the chain level the cluster path hands it — `#probe`
|
|
784
|
+
* swaps a coarse level's geometry for the coarsest shape, so a coarse map draws that shape whatever a
|
|
785
|
+
* placement's own distance would have selected. The distance itself is the main pass's, from the
|
|
786
|
+
* eye: a placement's shape and its cast come from the key the main pass draws it in.
|
|
787
|
+
*/
|
|
788
|
+
interface IShadowLevel {
|
|
789
|
+
/** The six frustum planes of this map's own shadow camera. */
|
|
790
|
+
readonly planes: Float32Array;
|
|
791
|
+
/** This map's texel gate in world metres: a placement narrower than it casts nothing here. */
|
|
792
|
+
readonly gate: number;
|
|
793
|
+
/**
|
|
794
|
+
* The chain level this map draws at, floored over the placement's own. 0 is the placement's own
|
|
795
|
+
* LOD by distance — what the finest map draws — and the coarsest index is what every level past
|
|
796
|
+
* the first draws. A base whose keys are not minted draws nothing, which is why a caller settling
|
|
797
|
+
* the prewarm first is the contract rather than a fallback.
|
|
798
|
+
*
|
|
799
|
+
* {@link COARSEST_SHADOW_LEVEL} is past every chain, and means the coarsest shape an asset has: a
|
|
800
|
+
* map that coarsens its casters does not know how long each asset's chain is, and the floor is
|
|
801
|
+
* clamped per asset, so one number asks every chain for its own coarsest level.
|
|
802
|
+
*/
|
|
803
|
+
readonly base: number;
|
|
804
|
+
}
|
|
805
|
+
/** What one landed readback concluded, in the three words a log line can carry. */
|
|
806
|
+
type GpuSceneVerdict = "ok" | "mismatch" | "error";
|
|
807
|
+
/**
|
|
808
|
+
* The memory numbers a validation line can carry, all of them optional.
|
|
809
|
+
*
|
|
810
|
+
* The first seven are three's `info.memory` fields (`WebGPURenderer`, 0.185); a backend that tracks
|
|
811
|
+
* none of them reports none, which is why every field is optional and only finite numbers are
|
|
812
|
+
* printed — an absent reading is not a zero. `footprintBytes` is the sum of this scene's own storage
|
|
813
|
+
* buffer `footprint()` bytes, the one number here Three did not write.
|
|
814
|
+
*/
|
|
815
|
+
type GpuSceneMemoryField = "storageAttributes" | "storageAttributesSize" | "indirectStorageAttributes" | "indirectStorageAttributesSize" | "readbackBuffers" | "readbackBuffersSize" | "total" | "footprintBytes";
|
|
816
|
+
/** One validation's memory reading; a field is absent when the backend did not offer a finite one. */
|
|
817
|
+
type GpuSceneMemory = Partial<Record<GpuSceneMemoryField, number>>;
|
|
818
|
+
/**
|
|
819
|
+
* The one placement nearest the camera (in XZ) a zero/zero comparison was handed, as the dispatch's
|
|
820
|
+
* own snapshot held it. Every number is the snapshot's, never the live scene's: the camera's eye and
|
|
821
|
+
* this placement's sphere, root translation, slot, slot cull, horizontal distance and the margin to
|
|
822
|
+
* the nearest of the six frustum planes are what say whether the snapshot held no live source or
|
|
823
|
+
* held one the camera, sphere, range or frustum rejected. A field is omitted, not printed as a fake
|
|
824
|
+
* zero, when the snapshot has no finite number for it.
|
|
825
|
+
*/
|
|
826
|
+
interface IValidationNearest {
|
|
827
|
+
/** The bounding sphere: X, Y, Z and the radius. */
|
|
828
|
+
readonly centre: readonly [number, number, number];
|
|
829
|
+
readonly radius: number;
|
|
830
|
+
/** The placement matrix's translation, which is what a draw places. */
|
|
831
|
+
readonly root: readonly [number, number, number];
|
|
832
|
+
/** The asset slot the placement names. */
|
|
833
|
+
readonly slot: number;
|
|
834
|
+
/** The slot's authored cull distance, or absent when it has none. */
|
|
835
|
+
readonly cull?: number;
|
|
836
|
+
/** `hypot(cx - eye.x, cz - eye.z)`, the distance the level and cull gates read. */
|
|
837
|
+
readonly distance: number;
|
|
838
|
+
/** The least `plane·centre + plane.constant + radius` over the six planes: negative is rejected. */
|
|
839
|
+
readonly margin: number;
|
|
840
|
+
}
|
|
841
|
+
/**
|
|
842
|
+
* Why a comparison that landed both counts at zero was handed nothing: the snapshot's own camera eye,
|
|
843
|
+
* how many placements it held and how many of them were live, and the one live placement nearest the
|
|
844
|
+
* camera in XZ. Taken from the snapshot, so nothing that streams while the bytes are in flight can
|
|
845
|
+
* rewrite the answer. Attached only when `instancesGpu` and `instancesCpu` are both zero.
|
|
846
|
+
*/
|
|
847
|
+
interface IValidationProbe {
|
|
848
|
+
readonly eye: readonly [number, number, number];
|
|
849
|
+
/** Placements the snapshot held, live and released. */
|
|
850
|
+
readonly snapshot: number;
|
|
851
|
+
/** Placements whose slot was not `SLOT_NONE`, the only ones the kernel considers. */
|
|
852
|
+
readonly live: number;
|
|
853
|
+
/** Absent when the snapshot held no live placement to name. */
|
|
854
|
+
readonly nearest?: IValidationNearest;
|
|
855
|
+
}
|
|
856
|
+
/** What a landed readback is judged on, gathered from the scene before it is formatted. */
|
|
857
|
+
interface IGpuSceneComparison {
|
|
858
|
+
/** Keys whose GPU instance count was read back and held against the reference. */
|
|
859
|
+
readonly compared: number;
|
|
860
|
+
readonly instancesGpu: number;
|
|
861
|
+
readonly instancesCpu: number;
|
|
862
|
+
/** Up to {@link VALIDATE_REPORTED_KEYS} `name gpu=… cpu=…` lines; the count is the whole total. */
|
|
863
|
+
readonly mismatches: readonly string[];
|
|
864
|
+
readonly mismatched: number;
|
|
865
|
+
/**
|
|
866
|
+
* Keys whose drawn matrices, `firstInstance` or `indexCount` disagreed, and up to
|
|
867
|
+
* {@link MATRIX_REPORTED_KEYS} of them by name. The counts above are what the dispatch promised;
|
|
868
|
+
* these are what the draw reads, which is a different question and the one the picture answers.
|
|
869
|
+
*/
|
|
870
|
+
readonly matricesMismatched: number;
|
|
871
|
+
readonly matrixMismatches: readonly string[];
|
|
872
|
+
/**
|
|
873
|
+
* Dressed main meshes whose own record was read back and held against the CPU path's own records
|
|
874
|
+
* for that mesh's key, and up to {@link MESH_REPORTED_MESHES} of them by name. This is the check
|
|
875
|
+
* the reference above cannot make: a key/record/mesh mapping that is wrong is one both sides
|
|
876
|
+
* reproduce, and a mesh drawing another asset's placements out of its own record is the picture
|
|
877
|
+
* that proves it.
|
|
878
|
+
*/
|
|
879
|
+
readonly meshMismatched: number;
|
|
880
|
+
readonly meshMismatches: readonly string[];
|
|
881
|
+
/** Resident placements the scene held when the readback was issued. */
|
|
882
|
+
readonly placed: number;
|
|
883
|
+
/** The device's last uncaptured error, or `""` for none since the last check reported one. */
|
|
884
|
+
readonly deviceError: string;
|
|
885
|
+
/** What stopped the check — a rejected readback, say. Non-empty is an `error` on its own. */
|
|
886
|
+
readonly cause?: string;
|
|
887
|
+
/**
|
|
888
|
+
* What the device and this scene held when the check reported. Absent when neither offered a
|
|
889
|
+
* finite number, and a field is omitted rather than printed as zero when its backend has none.
|
|
890
|
+
*/
|
|
891
|
+
readonly memory?: GpuSceneMemory;
|
|
892
|
+
/** The snapshot's own camera and nearest live placement, when both instance totals landed zero. */
|
|
893
|
+
readonly probe?: IValidationProbe;
|
|
894
|
+
}
|
|
895
|
+
/** One completed manual frame check, identified by the caller's frame and this scene's dispatch. */
|
|
896
|
+
interface IWorldGpuFrameValidation extends IGpuSceneComparison {
|
|
897
|
+
/** The caller's rendered-frame identity, never inferred from readback timing. */
|
|
898
|
+
readonly frame: number;
|
|
899
|
+
/** The dispatch whose buffers and snapshot this readback completed against. */
|
|
900
|
+
readonly dispatch: number;
|
|
901
|
+
readonly verdict: GpuSceneVerdict;
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* What `TN_WORLD_GPU_SCENE` reports, and what `stats().gpuScene` carries.
|
|
905
|
+
*
|
|
906
|
+
* `dispatches`/`instances`/`keys` are the scene's own tables — the placements it holds and the keys
|
|
907
|
+
* it is ready to draw. The optional `gpu*` trio is different in kind: it is a sample of what the GPU
|
|
908
|
+
* actually selected in the **main** pass, read back from the same indirect args records the draw
|
|
909
|
+
* uses (sum of `instanceCount`, and sum of `instanceCount x indexCount / 3`). Shadow passes are not
|
|
910
|
+
* tallied, and a count three reports from `renderer.info.render.triangles` is an upper bound over a
|
|
911
|
+
* mesh's CPU capacity, not a GPU-selected count — see {@link IFrameBudgetWindow.mainGpuTriangles}.
|
|
912
|
+
*/
|
|
913
|
+
interface IWorldGpuSceneReport {
|
|
914
|
+
readonly dispatches: number;
|
|
915
|
+
readonly instances: number;
|
|
916
|
+
readonly keys: number;
|
|
917
|
+
readonly on: boolean;
|
|
918
|
+
readonly reason: string;
|
|
919
|
+
/** Instances the GPU selected in the main pass, from the last landed tally. */
|
|
920
|
+
readonly gpuInstances?: number;
|
|
921
|
+
/** Triangles the GPU selected in the main pass (`instanceCount x indexCount / 3`), from the tally. */
|
|
922
|
+
readonly gpuTriangles?: number;
|
|
923
|
+
/** Dispatches between the tally's bytes being issued and now; grows until the first lands. */
|
|
924
|
+
readonly gpuTallyAgeFrames?: number;
|
|
925
|
+
/**
|
|
926
|
+
* What the pyramid occlusion test would cull, when a launch asked it to measure. Absent unless
|
|
927
|
+
* `?tnOcclusion=measure` asked, `reason` names why it measured nothing (`no scene depth`), and the
|
|
928
|
+
* counts and `occlusion.gpuTriangles` come from one landed dispatch, even if a later tally
|
|
929
|
+
* was skipped for occlusion.
|
|
930
|
+
*/
|
|
931
|
+
readonly occlusion?: {
|
|
932
|
+
readonly mode: OcclusionMode;
|
|
933
|
+
readonly reason: string;
|
|
934
|
+
/** Pyramid levels and the dispatches that rebuild them each frame. */
|
|
935
|
+
readonly levels: number;
|
|
936
|
+
readonly buildDispatches: number;
|
|
937
|
+
/** The last landed sample, and the mean over every sample that landed. */
|
|
938
|
+
readonly instances: number;
|
|
939
|
+
readonly triangles: number;
|
|
940
|
+
readonly meanInstances: number;
|
|
941
|
+
readonly meanTriangles: number;
|
|
942
|
+
readonly samples: number;
|
|
943
|
+
/** `triangles / gpuTriangles` of the same sample, which is what the go/no-go multiplies. */
|
|
944
|
+
readonly share: number;
|
|
945
|
+
readonly gpuTriangles: number;
|
|
946
|
+
readonly ageFrames: number;
|
|
947
|
+
};
|
|
948
|
+
}
|
|
949
|
+
|
|
487
950
|
/** The point a streamed world follows; an `Object3D` satisfies this shape. */
|
|
488
951
|
interface IWorldCellsFollow {
|
|
489
952
|
readonly position: {
|
|
490
953
|
readonly x: number;
|
|
954
|
+
readonly y?: number;
|
|
491
955
|
readonly z: number;
|
|
492
956
|
};
|
|
493
957
|
}
|
|
@@ -548,7 +1012,30 @@ interface IWorldCellsLoadOptions {
|
|
|
548
1012
|
/** Chebyshev radius in cells to keep resident; a cell leaves only beyond `ring + 1`. */
|
|
549
1013
|
readonly ring: number;
|
|
550
1014
|
readonly budgets: IWorldCellsBudget;
|
|
551
|
-
|
|
1015
|
+
/** False streams props/chunks only; the caller owns terrain geometry and collision. */
|
|
1016
|
+
readonly terrain?: IWorldCellsTerrainOptions | false;
|
|
1017
|
+
/** Cooked cell proxies are considered by default; false retains source rendering. Static CPU
|
|
1018
|
+
* cells only, with strict measured triangle/draw savings and projected-error hysteresis.
|
|
1019
|
+
* Source collision and shadow representations stay resident; unsupported sources retain detail. */
|
|
1020
|
+
readonly hlod?: boolean;
|
|
1021
|
+
/** Optional immutable per-record 3D draw reach in metres, indexed like placements.
|
|
1022
|
+
* Nonnegative finite values or Infinity (no extra limit); combined with asset maxDistance.
|
|
1023
|
+
* Filtered by the existing admission/refilter budget, never by a separate culler.
|
|
1024
|
+
*/
|
|
1025
|
+
readonly placementReach?: Float32Array;
|
|
1026
|
+
/** Inward return margin for authored CPU LODs, in [0, 1). Requires gpuScene:false and impostors:false; omission keeps source levels.
|
|
1027
|
+
* Omitted, selection uses the existing direct gates. State survives cell eviction/revisit. */
|
|
1028
|
+
readonly lodHysteresis?: number;
|
|
1029
|
+
/** Preserve supplied part/material identity and exact authored LOD membership, including shadow batches. Requires impostors:false; omission keeps source levels.
|
|
1030
|
+
* Default content sharing and missing-alpha-part coverage remain enabled when omitted. */
|
|
1031
|
+
readonly preserveAuthoredParts?: boolean;
|
|
1032
|
+
/** Already decoded immutable world-v1 data; URL still supplies the base for model paths. */
|
|
1033
|
+
readonly data?: {
|
|
1034
|
+
readonly manifest: IWorldPackage;
|
|
1035
|
+
readonly placements: ArrayBuffer;
|
|
1036
|
+
/** Omitted values load the manifest heightmap unless terrain is false. */
|
|
1037
|
+
readonly heightmap?: Uint16Array;
|
|
1038
|
+
};
|
|
552
1039
|
/**
|
|
553
1040
|
* How a scattered part whose own material is `transparent` is drawn. `"cutout"` (the default)
|
|
554
1041
|
* gives the part a clone of that material with `transparent: false` and an `alphaTest`, so the
|
|
@@ -558,9 +1045,12 @@ interface IWorldCellsLoadOptions {
|
|
|
558
1045
|
readonly transparentScatter?: "cutout" | "blend";
|
|
559
1046
|
/**
|
|
560
1047
|
* Shadows for the streamed world, all off by default. `cast` makes scattered batches cast into
|
|
561
|
-
* the scene's shadow map
|
|
562
|
-
*
|
|
563
|
-
*
|
|
1048
|
+
* the scene's shadow map. Their `castLevels` finest distance levels (default 1: the near shape)
|
|
1049
|
+
* each cast their own shape; a placement drawn at a coarser level of a chain casts with the
|
|
1050
|
+
* coarsest of those, so it keeps its shadow without a caster mesh per level — every level casting
|
|
1051
|
+
* its own minted ~3x the casters and the churn showed as garbage collection on a walk (PRD-541).
|
|
1052
|
+
* Authored `lods` past `castLevels` cast nothing. `receive` lets scatter and terrain receive
|
|
1053
|
+
* shadows.
|
|
564
1054
|
*/
|
|
565
1055
|
readonly shadows?: {
|
|
566
1056
|
readonly cast?: boolean;
|
|
@@ -573,11 +1063,11 @@ interface IWorldCellsLoadOptions {
|
|
|
573
1063
|
*/
|
|
574
1064
|
readonly castDistance?: number;
|
|
575
1065
|
/**
|
|
576
|
-
* Called at most once a second after streamed records changed, so the shadow levels
|
|
577
|
-
* them redraw.
|
|
578
|
-
*
|
|
1066
|
+
* Called in a batch at most once a second after streamed records changed, so the shadow levels
|
|
1067
|
+
* that read them redraw. A call with no region asks `VirtualShadowNode.invalidateAll`;
|
|
1068
|
+
* nothing changed means no call.
|
|
579
1069
|
*
|
|
580
|
-
*
|
|
1070
|
+
* Admissions and evictions are separate calls, each with the union of the bounds of the records
|
|
581
1071
|
* that changed — the placement position widened by the asset's own bounds, unioned over the
|
|
582
1072
|
* records of this update and nothing else, so a hook that forwards it to
|
|
583
1073
|
* `VirtualShadowNode.invalidateRegion` redraws the levels whose window covers them and leaves
|
|
@@ -633,6 +1123,12 @@ interface IWorldCellsLoadOptions {
|
|
|
633
1123
|
* is spread over frames instead of stacked into one; recycled meshes are not counted.
|
|
634
1124
|
*/
|
|
635
1125
|
readonly freshMeshesPerUpdate?: number;
|
|
1126
|
+
/**
|
|
1127
|
+
* New batch meshes per update while the startup cover hides the world, default 8x
|
|
1128
|
+
* `freshMeshesPerUpdate`. The first-draw shader cost the default spreads is invisible behind an
|
|
1129
|
+
* opaque loading screen, and a canopy that needs fresh meshes otherwise trickles in two a frame.
|
|
1130
|
+
*/
|
|
1131
|
+
readonly coveredFreshMeshesPerUpdate?: number;
|
|
636
1132
|
/**
|
|
637
1133
|
* Side of the world-grid square one shared batch's records are clustered into, in world units.
|
|
638
1134
|
* Defaults to the package's own `cellSize`, which is the square the placements are already cut
|
|
@@ -653,6 +1149,12 @@ interface IWorldCellsLoadOptions {
|
|
|
653
1149
|
* costs nothing here.
|
|
654
1150
|
*/
|
|
655
1151
|
readonly admissionBudgetMs?: number;
|
|
1152
|
+
/**
|
|
1153
|
+
* The admission budget while the startup cover hides the world and readiness is pending. Defaults
|
|
1154
|
+
* to 8x `admissionBudgetMs` (16 ms for the 2 ms default), so the spawn a loading screen waits on
|
|
1155
|
+
* is admitted in fewer frames. Set it equal to `admissionBudgetMs` to keep one budget throughout.
|
|
1156
|
+
*/
|
|
1157
|
+
readonly coveredAdmissionBudgetMs?: number;
|
|
656
1158
|
/**
|
|
657
1159
|
* Milliseconds source for the admission budget, `performance.now` by default. Injectable so a
|
|
658
1160
|
* test can prove the ceiling instead of hoping a machine is slow enough to show it.
|
|
@@ -660,7 +1162,8 @@ interface IWorldCellsLoadOptions {
|
|
|
660
1162
|
readonly admissionNow?: () => number;
|
|
661
1163
|
/**
|
|
662
1164
|
* The screen-space projection the extra levels of a baked AutoLOD chain are switched at, for an
|
|
663
|
-
* asset whose `world.json` entry names no `lods` of its own.
|
|
1165
|
+
* asset whose `world.json` entry names no nonempty authored `lods` of its own. An explicit empty
|
|
1166
|
+
* list also uses the chain when prepared geometry and material still match its static contract.
|
|
664
1167
|
*
|
|
665
1168
|
* A chain measures its levels' geometric error in world units and the model runtime turns that
|
|
666
1169
|
* into pixels per frame; a batched draw cannot, so the same test is solved for distance once,
|
|
@@ -671,7 +1174,7 @@ interface IWorldCellsLoadOptions {
|
|
|
671
1174
|
* Defaults are 60° over 1080 raster rows: a desktop view, and what the switch distance is a
|
|
672
1175
|
* function of. A world whose camera this class cannot see should pass its own, or a world with a
|
|
673
1176
|
* narrow field of view (a telephoto gun sight) or a tall window will switch earlier than its
|
|
674
|
-
* pixels ask for. An asset with authored `lods` ignores all three numbers entirely: the package is
|
|
1177
|
+
* pixels ask for. An asset with nonempty authored `lods` ignores all three numbers entirely: the package is
|
|
675
1178
|
* the authority on its own shape.
|
|
676
1179
|
*
|
|
677
1180
|
* `maxPixelError` is the error budget, in pixels, every synthesized level is selected against, and
|
|
@@ -694,8 +1197,10 @@ interface IWorldCellsLoadOptions {
|
|
|
694
1197
|
/**
|
|
695
1198
|
* The GPU-driven main pass: one compute dispatch culls and LOD-selects every resident placement
|
|
696
1199
|
* into a shared matrix buffer, and each main key draws its own region of it through an indirect
|
|
697
|
-
* record. The CPU keeps only
|
|
698
|
-
*
|
|
1200
|
+
* record. The CPU keeps only coarse per-cell visibility and admits the complete resident
|
|
1201
|
+
* `maxDistance` source set; a walking camera therefore costs no instance repack or cull/LOD
|
|
1202
|
+
* replacement. An explicit `placementReach` remains an admission boundary because it has no GPU
|
|
1203
|
+
* slot equivalent.
|
|
699
1204
|
*
|
|
700
1205
|
* `true` by default where the backend can run it: it needs compute, storage buffers and
|
|
701
1206
|
* `drawIndexedIndirect`, and a backend without them falls back to exactly this class's CPU path —
|
|
@@ -711,6 +1216,9 @@ interface IWorldCellsLoadOptions {
|
|
|
711
1216
|
*
|
|
712
1217
|
* A readback is a queue submission and a mapped buffer, so this is a mode for answering "which key
|
|
713
1218
|
* draws fewer instances than the CPU path" and never a walk to be measured with.
|
|
1219
|
+
* For a fixed-step diagnostic walk, call {@link validateGpuFrame} after the render and await its
|
|
1220
|
+
* promise before advancing the next frame; that opt-in fence checks every dispatch and replaces
|
|
1221
|
+
* the periodic samples for that world.
|
|
714
1222
|
*/
|
|
715
1223
|
readonly gpuSceneValidate?: boolean;
|
|
716
1224
|
/**
|
|
@@ -722,17 +1230,44 @@ interface IWorldCellsLoadOptions {
|
|
|
722
1230
|
*/
|
|
723
1231
|
readonly gpuSceneTally?: boolean;
|
|
724
1232
|
/**
|
|
725
|
-
*
|
|
726
|
-
*
|
|
727
|
-
*
|
|
728
|
-
*
|
|
729
|
-
*
|
|
730
|
-
*
|
|
1233
|
+
* Run the hierarchical-depth occlusion test in the cull kernel and report what it would cull.
|
|
1234
|
+
*
|
|
1235
|
+
* `"measure"` (the default unless `?tnOcclusion=off`, `TN_OCCLUSION=off` or a caller's own value
|
|
1236
|
+
* says otherwise) builds a max-distance pyramid from the previous frame's scene-pass depth and
|
|
1237
|
+
* counts the placements the test hides **while drawing all of them**: a measured frame is the frame
|
|
1238
|
+
* an unmeasured run draws, so the only difference between the two runs is the count and the cost of
|
|
1239
|
+
* building the pyramid. `"off"` runs no test and allocates nothing. `stats().gpuScene.occlusion`
|
|
1240
|
+
* reports the counts, the pyramid's own cost, and `refused: no scene depth` when no render chain
|
|
1241
|
+
* installed a pass to take a depth from.
|
|
1242
|
+
*
|
|
1243
|
+
* See {@link occlusionMode} and `render/depth-pyramid.ts`.
|
|
1244
|
+
*/
|
|
1245
|
+
readonly occlusion?: OcclusionMode;
|
|
1246
|
+
/**
|
|
1247
|
+
* Record every GPU-dressed main batch mesh and every resident cell's hand-placed chunks into
|
|
1248
|
+
* `BundleGroup`s, and replay the records instead of re-walking three's per-object path for each
|
|
1249
|
+
* draw. On by default: PRD-494 AC-2 measured the walking `draw` span at a 5.0 ms lower p95 than
|
|
1250
|
+
* develop over 3 interleaved runs with bundles on and a picture a blind world gate called equal,
|
|
1251
|
+
* which is the measurement the old opt-in default was decided without — so `bundles: false`,
|
|
1252
|
+
* `?tnBundles=0` or `TN_BUNDLES=0` is the way back to the per-object path, and `stats().bundle`
|
|
1253
|
+
* and the `TN_WORLD_BUNDLE` line say which way a run took and what asked for it.
|
|
1254
|
+
*
|
|
1255
|
+
* A record is an encoder, not a render pass, so only a draw that needs no live pass is recorded:
|
|
1256
|
+
* a framebuffer reader, a transmissive impostor, a skinned or morphed mesh and a per-object hook
|
|
1257
|
+
* all stay on the path they were already on. See `bundleSafe`.
|
|
731
1258
|
*
|
|
732
1259
|
* The render list inside a bundle is fixed when it is recorded, so a bundled mesh is never hidden:
|
|
733
1260
|
* the dispatch draws zero instances for a key the camera cannot see, and an indirect draw of zero
|
|
734
1261
|
* instances costs the GPU nothing. Toggling `visible` would force a re-record instead, and the
|
|
735
1262
|
* shadow node's texel gate skips a bundled mesh for the same reason.
|
|
1263
|
+
*
|
|
1264
|
+
* A chunk has no dispatch behind it, so the two answers it needs are its own: its meshes are never
|
|
1265
|
+
* culled by the record, because a mesh a record dropped is missing geometry the moment the camera
|
|
1266
|
+
* turns towards it, and each cell records into its own group whose `visible` is the main cull's
|
|
1267
|
+
* answer for that cell — the same coarse answer the scatter batches take, one cell wide. What that
|
|
1268
|
+
* costs is the price of the option: a cell the cull cannot see is not drawn at all, which takes its
|
|
1269
|
+
* chunk casters out of the shadow levels with it, and a cell it can only partly see draws the part
|
|
1270
|
+
* facing away. Both rasterize nothing or nearly so; the missing shadow is the real difference.
|
|
736
1271
|
*/
|
|
737
1272
|
readonly bundles?: boolean;
|
|
738
1273
|
/**
|
|
@@ -762,11 +1297,12 @@ interface IWorldCellsLoadOptions {
|
|
|
762
1297
|
readonly mainGpuShare?: number;
|
|
763
1298
|
/**
|
|
764
1299
|
* Bake a whole-asset octahedral impostor for every alpha-cutout foliage asset and append it as the
|
|
765
|
-
* asset's terminal, two-triangle LOD
|
|
1300
|
+
* asset's terminal, two-triangle LOD. Default false: omission keeps the authored/generated source
|
|
1301
|
+
* levels, and `?tnImpostors=1` or `TN_IMPOSTORS=1` opts a launch in. It is opt-in until the judged
|
|
1302
|
+
* Machinefall capture passes (PRD-473 AC-3); `preserveAuthoredParts` and `lodHysteresis` still
|
|
1303
|
+
* require it to be off.
|
|
766
1304
|
*
|
|
767
|
-
*
|
|
768
|
-
* shadow levels draw, and its two-triangle card leaves the road and forest floor almost unshaded
|
|
769
|
-
* (PR #375 visual regression), so a default world keeps its source levels as shadow casters.
|
|
1305
|
+
* Set true to bake them, or leave it off to keep the source levels for a visual comparison.
|
|
770
1306
|
*
|
|
771
1307
|
* The bake runs inside the render cadence — one of its sixteen views per `process` — so it costs a
|
|
772
1308
|
* slice of a frame rather than a hitch, and it starts only after the asset's own model has been
|
|
@@ -792,7 +1328,13 @@ interface IWorldCellsGpuTally {
|
|
|
792
1328
|
}
|
|
793
1329
|
interface IWorldCellsStats {
|
|
794
1330
|
readonly residentCells: number;
|
|
1331
|
+
/** Resident cells whose initial placement runs and chunks have completed admission. */
|
|
1332
|
+
readonly loadedCells: number;
|
|
795
1333
|
readonly residentKeys: readonly string[];
|
|
1334
|
+
/** Terrain tiles drawn, out to `terrain.streamRadius`; independent of the props' `ring`. */
|
|
1335
|
+
readonly residentTiles: number;
|
|
1336
|
+
/** Tiles holding a `createCollider` body, inside `terrain.colliderRadius`; 0 with no factory. */
|
|
1337
|
+
readonly residentColliders: number;
|
|
796
1338
|
/** Placement instances the resident cells hold, before any `maxDistance` filter. */
|
|
797
1339
|
readonly instances: number;
|
|
798
1340
|
readonly loadsInFlight: number;
|
|
@@ -815,6 +1357,13 @@ interface IWorldCellsStats {
|
|
|
815
1357
|
* was worth anything. See `LEVEL_REFILTER_STEP_METRES`.
|
|
816
1358
|
*/
|
|
817
1359
|
readonly refilters: number;
|
|
1360
|
+
/**
|
|
1361
|
+
* Cumulative replacement builds that entered CPU placement-level selection. Initial admission is
|
|
1362
|
+
* excluded; GPU `maxDistance`/LOD movement is not a replacement because its complete resident
|
|
1363
|
+
* source set stays available to dispatch selection. Explicit `placementReach` replacements are
|
|
1364
|
+
* included because reach remains a CPU admission boundary.
|
|
1365
|
+
*/
|
|
1366
|
+
readonly levelRefilters: number;
|
|
818
1367
|
/**
|
|
819
1368
|
* Cumulative stale cell-assets the refilter passes found, across every update. The pass walks every
|
|
820
1369
|
* resident cell and gates it as a whole before it looks at one batch, so a follow point that has
|
|
@@ -847,10 +1396,13 @@ interface IWorldCellsStats {
|
|
|
847
1396
|
/**
|
|
848
1397
|
* What the GPU-driven main pass is doing, and why it is not: `on` is the answer, `reason` is the
|
|
849
1398
|
* one line `TN_WORLD_GPU_SCENE` printed, and `dispatches` is what the walk actually paid for its
|
|
850
|
-
* per-instance work. `mainCull.repacks`
|
|
851
|
-
*
|
|
852
|
-
*
|
|
853
|
-
*
|
|
1399
|
+
* per-instance work. `mainCull.repacks` stays at `0` while it is on, and `levelRefilters` reports
|
|
1400
|
+
* replacement builds that still execute CPU placement-level selection. GPU `maxDistance`/LOD
|
|
1401
|
+
* movement is not a replacement because the source set stays resident for dispatch selection.
|
|
1402
|
+
* The aggregate `refilters` counter can still rise for its retained scan, and explicit
|
|
1403
|
+
* `placementReach` replacements remain visible. `dressed` over `meshes` is the marker line's own
|
|
1404
|
+
* pair, and it is the one that says the scene has meshes to draw with: an `on` with `0` dressed is
|
|
1405
|
+
* a ring the CPU path is still drawing.
|
|
854
1406
|
*/
|
|
855
1407
|
readonly gpuScene: {
|
|
856
1408
|
readonly on: boolean;
|
|
@@ -869,20 +1421,42 @@ interface IWorldCellsStats {
|
|
|
869
1421
|
readonly gpuInstances?: number;
|
|
870
1422
|
readonly gpuTriangles?: number;
|
|
871
1423
|
readonly gpuTallyAgeFrames?: number;
|
|
1424
|
+
/**
|
|
1425
|
+
* What the pyramid occlusion test would cull, when a launch asked it to measure. `share` is the
|
|
1426
|
+
* would-cull share of the main pass's GPU-selected triangles from the same landed readback, which
|
|
1427
|
+
* is the number the go/no-go multiplies by `gpuMain`; `reason` names why nothing was measured.
|
|
1428
|
+
*/
|
|
1429
|
+
readonly occlusion?: NonNullable<IWorldGpuSceneReport["occlusion"]>;
|
|
872
1430
|
};
|
|
873
1431
|
/**
|
|
874
|
-
*
|
|
875
|
-
*
|
|
876
|
-
*
|
|
1432
|
+
* Main-pass bundle membership: `children` counts grouped roots — every recorded main mesh under one
|
|
1433
|
+
* of the main record's shards, plus every chunk of every resident cell under that cell's own group —
|
|
1434
|
+
* `cpuMeshes` and `gpuMeshes` count shared batch members, and `on` reports actual main/chunk
|
|
1435
|
+
* membership. These are membership counts, not observed backend draws. `records` counts
|
|
1436
|
+
* invalidations since load: membership, material or geometry changes and CPU window repacks
|
|
1437
|
+
* invalidate; GPU indirect count updates do not.
|
|
877
1438
|
*
|
|
878
|
-
*
|
|
879
|
-
*
|
|
880
|
-
*
|
|
881
|
-
*
|
|
1439
|
+
* `eligibility` counts CPU material checks, snapshot validations, fresh structural walks and
|
|
1440
|
+
* oversized or unsupported child output. Snapshots check own links and Three's child readers on
|
|
1441
|
+
* every check, detecting deep edits without requiring `needsUpdate`; child discovery still allocates.
|
|
1442
|
+
*
|
|
1443
|
+
* `reason` is who asked: `default` is a run that set nothing, `option` is a load that named
|
|
1444
|
+
* `bundles`, and `launch` is `?tnBundles` / `TN_BUNDLES` / `__tnBundles`. It is on the marker line
|
|
1445
|
+
* too, because a run that turns the default off is exactly the run a reader cannot tell from a
|
|
1446
|
+
* failing one without it.
|
|
882
1447
|
*/
|
|
883
1448
|
readonly bundle: {
|
|
884
1449
|
readonly on: boolean;
|
|
885
1450
|
readonly children: number;
|
|
1451
|
+
readonly cpuMeshes: number;
|
|
1452
|
+
readonly gpuMeshes: number;
|
|
1453
|
+
readonly eligibility: {
|
|
1454
|
+
readonly checks: number;
|
|
1455
|
+
readonly refreshes: number;
|
|
1456
|
+
readonly validations: number;
|
|
1457
|
+
readonly uncached: number;
|
|
1458
|
+
};
|
|
1459
|
+
readonly reason: string;
|
|
886
1460
|
readonly records: number;
|
|
887
1461
|
};
|
|
888
1462
|
/**
|
|
@@ -914,6 +1488,22 @@ interface IWorldCellsStats {
|
|
|
914
1488
|
};
|
|
915
1489
|
};
|
|
916
1490
|
/** Cumulative rejected requests: cells skipped, instances or bytes refused, terrain retries. */
|
|
1491
|
+
/** Compilation and zero-count main backend submission are separate observations. These counts
|
|
1492
|
+
* do not prove GPU execution, image quality, or reduced frame time. bytes includes pending
|
|
1493
|
+
* reservation and decoded copies/textures, never a claim about physical driver allocation. */
|
|
1494
|
+
readonly hlod: {
|
|
1495
|
+
readonly on: boolean;
|
|
1496
|
+
readonly loaded: number;
|
|
1497
|
+
readonly compiled: number;
|
|
1498
|
+
readonly observed: number;
|
|
1499
|
+
readonly active: number;
|
|
1500
|
+
readonly pending: number;
|
|
1501
|
+
readonly bytes: number;
|
|
1502
|
+
readonly refused: number;
|
|
1503
|
+
/** Why the latest proxy was refused, or empty when none was; a count alone names no cause. */
|
|
1504
|
+
readonly reason: string;
|
|
1505
|
+
readonly failures: number;
|
|
1506
|
+
};
|
|
917
1507
|
readonly pressure: {
|
|
918
1508
|
readonly cells: number;
|
|
919
1509
|
readonly instances: number;
|
|
@@ -930,16 +1520,28 @@ interface IWorldCellsStats {
|
|
|
930
1520
|
readonly spentMs: number;
|
|
931
1521
|
/** Cell-asset builds the last `update` had no budget for, still queued for a later one. */
|
|
932
1522
|
readonly deferred: number;
|
|
933
|
-
/**
|
|
1523
|
+
/** Placement slices and meshes left to publish, plus one unit while terrain admission is owed. */
|
|
934
1524
|
readonly backlog: number;
|
|
935
1525
|
};
|
|
936
1526
|
}
|
|
1527
|
+
/** Local render coverage, independent of shader prewarm and distant admission. */
|
|
1528
|
+
interface IWorldRegionReadiness {
|
|
1529
|
+
readonly requiredCells: number;
|
|
1530
|
+
readonly loadedCells: number;
|
|
1531
|
+
readonly requiredTerrainTiles: number;
|
|
1532
|
+
readonly loadedTerrainTiles: number;
|
|
1533
|
+
readonly failures: number;
|
|
1534
|
+
readonly cancelled: boolean;
|
|
1535
|
+
readonly ready: boolean;
|
|
1536
|
+
}
|
|
937
1537
|
/**
|
|
938
1538
|
* A plain `{ min, max }` region, the shape a shadow level's invalidation reads and the shape a game
|
|
939
1539
|
* can be handed without importing three. Plain numbers, so the object a caller records its bounds
|
|
940
1540
|
* in is the object that crosses the boundary.
|
|
941
1541
|
*/
|
|
942
1542
|
interface IShadowRegion {
|
|
1543
|
+
/** Only added casters; their redraw can retain the existing depth. */
|
|
1544
|
+
admission?: boolean;
|
|
943
1545
|
min: {
|
|
944
1546
|
x: number;
|
|
945
1547
|
y: number;
|
|
@@ -956,17 +1558,17 @@ interface IShadowRegion {
|
|
|
956
1558
|
*
|
|
957
1559
|
* The class composes `TerrainTiles` for the package's heightmap, builds one `InstancedBatch` per
|
|
958
1560
|
* resident cell asset run, distance level and mesh part, and loads hand-placed chunk GLBs through
|
|
959
|
-
* `loadAll` + `addInSlices`. Ring residency, per-asset `maxDistance` filtering,
|
|
960
|
-
* levels, hard budgets and generation-tokened cancellation all live
|
|
961
|
-
* and surface still comes from the package's GLBs and the game.
|
|
1561
|
+
* `loadAll` + `addInSlices`. Ring residency, CPU per-asset `maxDistance` filtering, GPU dispatch
|
|
1562
|
+
* culling, the per-asset `lods` levels, hard budgets and generation-tokened cancellation all live
|
|
1563
|
+
* here; every geometry, material and surface still comes from the package's GLBs and the game.
|
|
962
1564
|
*
|
|
963
1565
|
* An asset is drawn per part, not per model: a GLB with several primitives is one `InstancedBatch`
|
|
964
1566
|
* each, and a scattered part whose own material is transparent draws as an alpha cutout unless the
|
|
965
1567
|
* game asks for blending, because an `InstancedMesh` cannot sort its instances.
|
|
966
1568
|
*
|
|
967
|
-
* An asset
|
|
968
|
-
*
|
|
969
|
-
*
|
|
1569
|
+
* An asset with no nonempty authored `lods` can draw its own model's baked AutoLOD chain at distances
|
|
1570
|
+
* measured over the `autoLod` viewport. An explicit empty list enrolls only unchanged static parts;
|
|
1571
|
+
* section ranges, custom attributes, alpha foliage and vertex deformation retain source geometry.
|
|
970
1572
|
*
|
|
971
1573
|
* @situation stream a large Blender-authored world by cell instead of one huge GLB
|
|
972
1574
|
* @situation keep scattered props and hand-placed chunks resident around a moving player
|
|
@@ -977,8 +1579,9 @@ interface IShadowRegion {
|
|
|
977
1579
|
* @constraint refilters are bounded by `rebuildsPerUpdate` (default 16) per update, nearest cell first
|
|
978
1580
|
* @constraint admission is bounded by `admissionBudgetMs` (default 2) per update across every path, plus at most one unit each for terrain and props; while props are queued terrain takes at most half, so neither starves the other, and a deferred cell keeps drawing what it has
|
|
979
1581
|
* @constraint SkinnedMesh parts are skipped; an instanced copy would draw one rest pose
|
|
980
|
-
* @constraint a baked chain's switch distances are measured against `autoLod` (default 4 px of error over 60° and 1080 raster rows), because an instanced draw cannot select a level per instance; an asset with authored `lods` never consults it
|
|
981
|
-
* @
|
|
1582
|
+
* @constraint a baked chain's switch distances are measured against `autoLod` (default 4 px of error over 60° and 1080 raster rows), because an instanced draw cannot select a level per instance; an asset with nonempty authored `lods` never consults it; explicit empty lists enroll only unchanged static geometry/material parts
|
|
1583
|
+
* @constraint eligible static sources can use cooked HLOD (chunk-only alongside GPU scatter, whole-cell on CPU) after compilation and an observed main-context backend submission; projected-error hysteresis requires actual source triangle reduction and no extra material draws, unsupported or shared source stays resident, and collision/shadow paths retain source representations; stats().hlod counts lifecycle and charged resources, not GPU timing or physical allocation
|
|
1584
|
+
* @override `hlod: false` keeps source rendering; ring, budgets, terrain tile size/resolution, terrain stream and collider radius, `transparentScatter`, `clusterSize` and `shadows.invalidate`, load `concurrency`, `rebuildsPerUpdate`, `admissionBudgetMs` and the package's per-asset maxDistance
|
|
982
1585
|
* @constraint `prewarmed` resolves once every prewarmed shared batch has been drawn; a game with a loading screen waits on it, and `stats().pendingPrewarm` is the same gate as a number
|
|
983
1586
|
* @constraint every `asset:level:part` is one InstancedMesh for the main pass, plus one caster InstancedMesh per world-grid square of `clusterSize` on the shadow caster layer, so the main pass draws one mesh per key and a shadow level submits only the squares it covers
|
|
984
1587
|
* @constraint two definitions the asset loader resolves to one model — the same cooked `glb`, the same `lods` at the same distances, the same `maxDistance` and bounds — are one asset under the lexicographically smallest id: one model load, one set of `asset:level:part` keys, one prewarm and one refcount, released when the last cell holding any member of the group leaves the ring; `TN_WORLD_ASSET_ALIAS` reports how many of the package's assets are really distinct
|
|
@@ -993,8 +1596,23 @@ interface IShadowRegion {
|
|
|
993
1596
|
declare class WorldCells extends Group implements IComputeDriven {
|
|
994
1597
|
#private;
|
|
995
1598
|
readonly processCadence: "render";
|
|
1599
|
+
readonly processDuringStartup = true;
|
|
1600
|
+
/**
|
|
1601
|
+
* How the shadow cascade reaches this world's GPU keys: a level render hands its own four numbers
|
|
1602
|
+
* here and gets its set selected into the shadow twins, which the shadow key meshes on
|
|
1603
|
+
* `VIRTUAL_SHADOW_KEY_LAYER` then draw. Published on this object — the world's own root, which is
|
|
1604
|
+
* what `VirtualShadowNode` walks — and duck-typed there, because the world chunk and the shadow
|
|
1605
|
+
* node are separate and neither names the other's package types.
|
|
1606
|
+
*
|
|
1607
|
+
* Published only when `?tnShadowGpuKeys=1` asked for it, which is what makes the node's own
|
|
1608
|
+
* keyed path and this world's twin meshes one switch: with nothing published a level reads no
|
|
1609
|
+
* keys, mints no twin and submits nothing, and every picture is the one it drew before.
|
|
1610
|
+
*/
|
|
1611
|
+
readonly tnShadowGpuKeys: ((renderer: IRendererLike, level: IShadowLevel) => void) | undefined;
|
|
996
1612
|
private constructor();
|
|
997
1613
|
static load(options: IWorldCellsLoadOptions): Promise<WorldCells>;
|
|
1614
|
+
/** Fresh streaming state; the visible snapshot is replaced on the first update. Owned caches are independent. */
|
|
1615
|
+
clone(recursive?: boolean): this;
|
|
998
1616
|
get released(): boolean;
|
|
999
1617
|
get warmupNodes(): readonly unknown[];
|
|
1000
1618
|
/**
|
|
@@ -1007,6 +1625,11 @@ declare class WorldCells extends Group implements IComputeDriven {
|
|
|
1007
1625
|
* a game awaiting it forever.
|
|
1008
1626
|
*/
|
|
1009
1627
|
get prewarmed(): Promise<void>;
|
|
1628
|
+
/**
|
|
1629
|
+
* Fence one just-rendered GPU dispatch for a diagnostic walk, resolving after both readbacks land.
|
|
1630
|
+
* Call after {@link update} and the render, then await it before advancing the measured frame.
|
|
1631
|
+
*/
|
|
1632
|
+
validateGpuFrame(frame: number): Promise<IWorldGpuFrameValidation>;
|
|
1010
1633
|
/**
|
|
1011
1634
|
* Per-frame residency step; call it wherever `TerrainTiles.process` is called.
|
|
1012
1635
|
*
|
|
@@ -1029,11 +1652,7 @@ declare class WorldCells extends Group implements IComputeDriven {
|
|
|
1029
1652
|
* and a game that does not keeps every resident record drawn.
|
|
1030
1653
|
*/
|
|
1031
1654
|
update(renderer?: IRendererLike, camera?: Camera): void;
|
|
1032
|
-
|
|
1033
|
-
* The render-cadence dispatch. The engine hands the frame's render camera over, and this world's
|
|
1034
|
-
* main windows follow it; see {@link #cullMainPass} for why the decision is not the meshes' own.
|
|
1035
|
-
*/
|
|
1036
|
-
process(renderer?: IRendererLike, camera?: Camera): void;
|
|
1655
|
+
process(renderer?: IRendererLike, camera?: Camera, covered?: boolean): void;
|
|
1037
1656
|
attachRenderer(renderer: IRendererLike): void;
|
|
1038
1657
|
/** Current per-asset reference count; an asset absent from the map is `0`. */
|
|
1039
1658
|
assetRefCounts(): Readonly<Record<string, number>>;
|
|
@@ -1054,6 +1673,11 @@ declare class WorldCells extends Group implements IComputeDriven {
|
|
|
1054
1673
|
gpuSceneTally(): IWorldCellsGpuTally | undefined;
|
|
1055
1674
|
stats(): IWorldCellsStats;
|
|
1056
1675
|
detach(): void;
|
|
1676
|
+
/** Completed content intersecting a square around a fixed spawn, in world metres. */
|
|
1677
|
+
readinessAt(position: {
|
|
1678
|
+
readonly x: number;
|
|
1679
|
+
readonly z: number;
|
|
1680
|
+
}, radius?: number): IWorldRegionReadiness;
|
|
1057
1681
|
dispose(): void;
|
|
1058
1682
|
}
|
|
1059
1683
|
|
|
@@ -1070,6 +1694,29 @@ interface IHeightfieldOptions {
|
|
|
1070
1694
|
readonly width: number;
|
|
1071
1695
|
readonly worldPasses?: IHeightfieldWorldPassOptions;
|
|
1072
1696
|
}
|
|
1697
|
+
/** A rectangular window of a heightfield's canonical samples, in grid indices. */
|
|
1698
|
+
/** Hands out the union of every window `updateHeights` wrote since the last `take`. */
|
|
1699
|
+
interface IHeightfieldChangeTracker {
|
|
1700
|
+
/** The changed window since the previous take, or undefined when nothing changed. */
|
|
1701
|
+
take(): IHeightfieldRegionBounds | undefined;
|
|
1702
|
+
/** Stop tracking. Idempotent. */
|
|
1703
|
+
dispose(): void;
|
|
1704
|
+
}
|
|
1705
|
+
interface IHeightfieldRegionBounds {
|
|
1706
|
+
/** First column (x index), inclusive. */
|
|
1707
|
+
readonly column: number;
|
|
1708
|
+
/** Number of columns covered. */
|
|
1709
|
+
readonly columns: number;
|
|
1710
|
+
/** First row (z index), inclusive. */
|
|
1711
|
+
readonly row: number;
|
|
1712
|
+
/** Number of rows covered. */
|
|
1713
|
+
readonly rows: number;
|
|
1714
|
+
}
|
|
1715
|
+
/** A rectangular window plus the replacement samples written over it. */
|
|
1716
|
+
interface IHeightfieldRegion extends IHeightfieldRegionBounds {
|
|
1717
|
+
/** Row-major samples, `columns * rows` long and read with the region's own stride. */
|
|
1718
|
+
readonly heights: Float32Array;
|
|
1719
|
+
}
|
|
1073
1720
|
interface IHeightfieldWorldPassOptions {
|
|
1074
1721
|
/** Maximum TSL compute dispatches submitted by one rendered frame. */
|
|
1075
1722
|
readonly dispatchBudget: number;
|
|
@@ -1099,6 +1746,7 @@ interface IStoredHeightfieldChannels {
|
|
|
1099
1746
|
* @situation query the same ground height or normal that a player sees and collides with
|
|
1100
1747
|
* @situation ask how high the ground is here
|
|
1101
1748
|
* @situation build islands and coastlines from terrain
|
|
1749
|
+
* @situation keep a collider or other copy of a deforming terrain in step without rescanning the whole field (`trackChanges`)
|
|
1102
1750
|
* @constraint sampleHeight owns the terrain shape and stays in game source; the framework stores and interpolates its output
|
|
1103
1751
|
* @constraint rows and columns are vertex counts; geometry is row-major z-then-x and collider export transposes once into Rapier's column-major matrix order
|
|
1104
1752
|
* @override rows, columns, width, depth, origin, and sampleHeight are explicit on every field
|
|
@@ -1131,10 +1779,55 @@ declare class Heightfield extends Group implements IComputeDriven {
|
|
|
1131
1779
|
get memoryBytes(): number;
|
|
1132
1780
|
heightAt(x: number, z: number): number;
|
|
1133
1781
|
normalAt(x: number, z: number, target?: Vector3): Vector3;
|
|
1782
|
+
/**
|
|
1783
|
+
* Monotonic sample version, incremented by every `updateHeights` call.
|
|
1784
|
+
*
|
|
1785
|
+
* A renderer or collider that caches derived data compares this against its own last-seen value
|
|
1786
|
+
* instead of diffing the whole grid each frame.
|
|
1787
|
+
*/
|
|
1788
|
+
get version(): number;
|
|
1789
|
+
/**
|
|
1790
|
+
* Overwrite one rectangular window of the canonical samples.
|
|
1791
|
+
*
|
|
1792
|
+
* Height is the one buffer queries, rendered geometry and collider export share, so a second
|
|
1793
|
+
* terrain representation is never needed: a simulation writes its surface here and every
|
|
1794
|
+
* consumer already reads it. The whole window is validated before any sample changes, so a
|
|
1795
|
+
* malformed call leaves the field untouched rather than half-written.
|
|
1796
|
+
* @situation deform terrain, snow or water in place and have queries and collision follow
|
|
1797
|
+
* @constraint the region must lie inside the field; an out-of-bounds window throws and writes nothing
|
|
1798
|
+
* @constraint heights is `columns * rows` long, row-major, and every sample must be finite
|
|
1799
|
+
*/
|
|
1800
|
+
updateHeights(region: IHeightfieldRegion): void;
|
|
1801
|
+
/**
|
|
1802
|
+
* Follow which samples change, independently of every other follower.
|
|
1803
|
+
*
|
|
1804
|
+
* A consumer that mirrors the surface — a collider, a GPU copy, a cache — needs the window that
|
|
1805
|
+
* changed since *it* last looked; comparing the whole field instead costs every sample on every
|
|
1806
|
+
* change. Each tracker keeps its own union of the windows `updateHeights` wrote, so two
|
|
1807
|
+
* consumers never take each other's changes.
|
|
1808
|
+
*
|
|
1809
|
+
* ```ts
|
|
1810
|
+
* const changes = field.trackChanges();
|
|
1811
|
+
* const changed = changes.take(); // undefined when nothing was written
|
|
1812
|
+
* ```
|
|
1813
|
+
*/
|
|
1814
|
+
trackChanges(): IHeightfieldChangeTracker;
|
|
1815
|
+
/** The collider sample at `row`, `column`: what `toColliderHeights()` holds there, without a copy. */
|
|
1816
|
+
colliderHeight(row: number, column: number): number;
|
|
1817
|
+
/**
|
|
1818
|
+
* Rewrite an existing `toGeometry()` result from the current canonical samples.
|
|
1819
|
+
*
|
|
1820
|
+
* Positions carry over unchanged because only the surface moves; y and normals are refreshed
|
|
1821
|
+
* from the same sampler queries use, which is what keeps a rendered vertex and a height query
|
|
1822
|
+
* from disagreeing. Pass a region to touch only the window a simulation just changed.
|
|
1823
|
+
* @situation redraw a terrain, snow or water mesh after its samples changed
|
|
1824
|
+
* @constraint geometry must come from `toGeometry()` with the same rows and columns
|
|
1825
|
+
*/
|
|
1826
|
+
refreshGeometry(geometry: BufferGeometry, bounds?: IHeightfieldRegionBounds): void;
|
|
1134
1827
|
/** The same values transposed once into Rapier's column-major height-matrix order. */
|
|
1135
1828
|
toColliderHeights(): Float32Array;
|
|
1136
1829
|
/** Builds an ordinary Three.js geometry without choosing its surface. */
|
|
1137
1830
|
toGeometry(): BufferGeometry;
|
|
1138
1831
|
}
|
|
1139
1832
|
|
|
1140
|
-
export { Heightfield, type IAdmissionBudget, type IHeightfieldOptions, type IHeightfieldOrigin, type IHeightfieldSamplerOptions, type IHeightfieldWorldPassOptions, type ILoadTerrainSplatOptions, type IShadowRegion, type ITerrainSplatLayer, type ITerrainSplatMaskedLayer, type ITerrainSplatTable, type IWorldAsset, type IWorldAssetBounds, type IWorldAssetLod, type IWorldCapabilities, type IWorldCell, type IWorldCellsBudget, type IWorldCellsFollow, type IWorldCellsLoadOptions, type IWorldCellsStats, type IWorldCellsTerrainOptions, type IWorldExtent, type IWorldPackage, type IWorldPackageError, type IWorldPackageValidationOptions, type IWorldRun, type IWorldTerrain, type IWorldTileColliderInput, type IWorldTilesTopologyObservation, TERRAIN_VALIDATE_FLAG, TERRAIN_VALIDATE_MARKER, TerrainTiles, WorldCells, type WorldPackageErrorCode, cellPlacements, getWorldCapabilities, heightSamplerFromHeightmap, loadTerrainSplat, loadWorldHeightmap, terrainValidationRequested, validateWorldPackage };
|
|
1833
|
+
export { Heightfield, type IAdmissionBudget, type IHeightfieldChangeTracker, type IHeightfieldOptions, type IHeightfieldOrigin, type IHeightfieldRegion, type IHeightfieldRegionBounds, type IHeightfieldSamplerOptions, type IHeightfieldWorldPassOptions, type ILoadTerrainSplatOptions, type IShadowRegion, type ISnowContact, type ISnowFieldOptions, type ISnowFieldSample, type ISnowFootprint, type ISnowFootprintSample, type ITerrainSplatLayer, type ITerrainSplatMaskedLayer, type ITerrainSplatTable, type ITerrainSplatWeightContext, type IWorldAsset, type IWorldAssetBounds, type IWorldAssetLod, type IWorldCapabilities, type IWorldCell, type IWorldCellProxy, type IWorldCellsBudget, type IWorldCellsFollow, type IWorldCellsLoadOptions, type IWorldCellsStats, type IWorldCellsTerrainOptions, type IWorldExtent, type IWorldGpuFrameValidation, type IWorldPackage, type IWorldPackageError, type IWorldPackageValidationOptions, type IWorldRegionReadiness, type IWorldRun, type IWorldTerrain, type IWorldTileColliderInput, type IWorldTilesTopologyObservation, SnowField, TERRAIN_VALIDATE_FLAG, TERRAIN_VALIDATE_MARKER, TerrainTiles, WorldCells, type WorldPackageErrorCode, cellPlacements, getWorldCapabilities, heightSamplerFromHeightmap, loadTerrainSplat, loadWorldHeightmap, snowDiscFootprint, terrainValidationRequested, validateWorldPackage };
|