@threenative/core 0.3.13 → 0.3.15

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 (50) hide show
  1. package/capabilities.json +299 -10
  2. package/dist/{chunk-4SRAQFTU.js → chunk-2GPHICV6.js} +1 -1
  3. package/dist/{chunk-DIPIJICH.js → chunk-GEMQJBY4.js} +70 -18
  4. package/dist/{chunk-EFWZWLPY.js → chunk-QAMSM3Z5.js} +354 -12
  5. package/dist/{chunk-SV4QVUTQ.js → chunk-QAQHYOWY.js} +1 -1
  6. package/dist/{chunk-EEABDLUC.js → chunk-VBBYWGAT.js} +2 -2
  7. package/dist/{chunk-GYUZJQ7U.js → chunk-VQRPEOKY.js} +4 -1
  8. package/dist/index.d.ts +605 -7
  9. package/dist/index.js +1973 -609
  10. package/dist/playtest.js +3 -3
  11. package/dist/{quality-BYqKGAwo.d.ts → quality-BADStsTn.d.ts} +2 -2
  12. package/dist/render-environment.d.ts +1 -1
  13. package/dist/ui-layer.js +2 -2
  14. package/dist/worker.js +2 -2
  15. package/dist/world.d.ts +13 -3
  16. package/dist/world.js +179 -36
  17. package/mcp/animation-server.mjs +1 -1
  18. package/mcp/engine-server.mjs +32 -6
  19. package/mcp/servers.mjs +3 -3
  20. package/package.json +5 -5
  21. package/scripts/ensure-mcp.mjs +6 -1
  22. package/src/clustered-batch.ts +146 -3
  23. package/src/clustered-mesh.ts +548 -20
  24. package/src/debug.ts +16 -0
  25. package/src/displaced-surface.ts +428 -0
  26. package/src/frame-budget.ts +16 -0
  27. package/src/generated/console-markers.ts +1 -0
  28. package/src/grass-field.ts +628 -0
  29. package/src/index.ts +112 -0
  30. package/src/render/material-key.ts +21 -1
  31. package/src/render/screen-probe-gather.ts +303 -0
  32. package/src/render/short-range-ao.ts +274 -0
  33. package/src/render/world-impostor-surface.ts +98 -3
  34. package/src/render-camera-cull.ts +9 -3
  35. package/src/renderer.ts +26 -4
  36. package/src/scatter-field.ts +496 -0
  37. package/src/startup-offscreen-bytes.ts +11 -5
  38. package/src/state.ts +16 -3
  39. package/src/static-transform.ts +75 -6
  40. package/src/tile-ring.ts +294 -0
  41. package/src/version.ts +1 -1
  42. package/src/warmup.ts +15 -2
  43. package/src/world-cell-batches.ts +4 -0
  44. package/src/world-cell-data.ts +7 -0
  45. package/src/world-cell-models.ts +36 -8
  46. package/src/world-cell-render-gpu-dress.ts +4 -2
  47. package/src/world-cell-render-util.ts +2 -2
  48. package/src/world-cells.ts +1 -1
  49. package/src/world-river-ribbon.ts +13 -22
  50. package/src/world-water-bodies.ts +113 -3
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as three from 'three';
2
- import { Object3D, AnimationClip, AnimationMixer, Vector3, Camera, Group, Scene, Texture, Matrix4, Mesh, BufferGeometry, Material, Color, InstancedMesh, ColorRepresentation, Box3, DirectionalLight, DepthTexture, LightShadow, HemisphereLight, ToneMapping, FogExp2, Sprite, DataTexture, CatmullRomCurve3 } from 'three';
2
+ import { Object3D, AnimationClip, AnimationMixer, Vector3, Camera, Group, Scene, Texture, Matrix4, Mesh, BufferGeometry, Material, Color, InstancedMesh, ColorRepresentation, Box3, DirectionalLight, DepthTexture, LightShadow, HemisphereLight, ToneMapping, FogExp2, Vector4, Sprite, DataTexture, CatmullRomCurve3 } from 'three';
3
3
  export { a as CameraShake, C as CameraShakeCurve, I as ICameraShakeOffset, b as ICameraShakeOptions } from './camera-shake-CZKOfGn4.js';
4
4
  export { A as ASSET_LATE_MARKER, b as AssetPriority, c as IAssetCacheReport, d as IAssetCacheState, I as IAssetLoader, a as IAssetLoaderOptions, e as IAssetPrefetchProgress, f as IAssetRequestOptions, g as ITextureOptions, h as createAssetLoader, i as fetchAsset, r as reconcileMirroredClips } from './assets-CfMKnOsK.js';
5
5
  export { A as AudioBus, I as IAudioBusOptions, b as IAudioCompressorOptions, c as IAudioPlayOptions, r as resetAudioCueLedger } from './audio-DIJE5HTr.js';
@@ -12,8 +12,8 @@ import { I as IRendererLike, h as IStageGpuReading, F as FramePassKind, a as IFr
12
12
  export { D as DEFAULT_PIPELINE_CENSUS_LIMIT, i as DEFAULT_TARGET_FPS, j as FRAME_BUDGET_MARKER, k as FRAME_BUDGET_PHASES, l as FRAME_HITCH_MARKER, m as FrameBudget, n as FrameBudgetPhase, o as FrameCounters, p as ICounterDevice, g as IFrameBudgetOptions, q as IFrameBudgetPassSummary, b as IFrameBudgetSimulation, r as IFrameBudgetSummary, s as IFrameCounters, d as IFramePhaseSample, f as IPipelineCensus, t as IPipelineCensusCounts, u as IPipelineCensusEvent, v as IPipelineCensusOptions, w as IPipelineProvenance, x as IPipelineShaderObservation, y as IPlatformInfo, z as IRenderChainApplied, A as IRenderChainBudgetWindow, B as IRenderChainDroppedStage, C as IRenderChainOptions, E as IRenderChainRenderer, G as IRenderChainRequest, H as IRenderChainStage, J as IRenderChainStageContext, K as IRenderChainVelocityMeasurement, L as IRenderChainVelocityReport, M as IRenderChainVelocityRequest, N as IRenderChainVelocityResult, c as IRenderPassSample, O as ITargetFps, P as IVelocityRenderPass, Q as MAX_TARGET_FPS, R as MainDrawSource, S as PIPELINE_CENSUS_CAPABILITY, T as PIPELINE_CENSUS_VERSION, U as PipelineCensus, V as PipelineCensusMode, W as PipelineCensusStatus, X as PlatformFormFactor, Y as PlatformOS, Z as PlatformRuntime, _ as RENDER_CHAIN_MARKER, $ as RENDER_CHAIN_STAGE_ORDER, a0 as RENDER_CHAIN_TIERS, a1 as RenderChain, a2 as RenderChainSource, a3 as RenderChainStageId, a4 as RenderChainStageName, a5 as RenderChainTier, a6 as RenderChainTierRequest, a7 as RenderChainVelocitySource, a8 as TargetFpsSource, a9 as VELOCITY_OUTPUT_NAME, aa as VELOCITY_PREVIOUS_BONE_MATRICES, ab as VELOCITY_PREVIOUS_INSTANCE_MATRICES, ac as VELOCITY_PREVIOUS_WORLD_MATRIX, ad as VelocityTracker, ae as counterDeviceOf, af as createPipelineCensus, ag as ensureVelocityOutput, ah as getPlatform, ai as isConsole, aj as isMobile, ak as isNative, al as isPs4, am as isTouchscreenAvailable, an as isWeb, ao as prewarm, ap as readRenderChainObservation, aq as readRenderChainReport, ar as readVelocityPreviousBoneMatrices, as as readVelocityPreviousMatrices, at as readVelocityPreviousWorldMatrix, au as resolveTargetFps, av as snapRefreshRate, aw as stageGpuReading, ax as velocityTexture, ay as withVelocityContext } from './renderer-BtOSseYf.js';
13
13
  import { I as IComputeDriven$1, a as IGPUReadbackSample, d as IBudgetCandidate } from './model-lod-DPTzeCcD.js';
14
14
  export { C as ComputeDrivenRegistry, D as DISCRETE_LOD_DEFAULT_ERROR_PIXELS, e as DISCRETE_LOD_DEFAULT_HYSTERESIS, G as GPUReadback, f as IGPUReadbackOptions, g as baseGeometryOf, i as isStreamedGeometry, l as lodChainOf, h as lodPixelScale, u as updateModelLods } from './model-lod-DPTzeCcD.js';
15
- import { G as GIVisualizeMode } from './quality-BYqKGAwo.js';
16
- export { A as AutoExposureNode, C as ChainStage, E as EPIC_SSGI, F as FinalGatherMethod, a as GIVisualize, b as GI_VISUALIZE_MODES, I as IExposureSettings, c as IGIVisualizeOptions, d as IGiTier, e as IReflectionRoute, f as IShadowFilter, g as IShadowTier, h as ITracedHit, i as ITracedRay, j as ITracedReflectionsOptions, k as IWorldEnvironmentOptions, l as IWorldEnvironmentStageContext, m as IWorldEnvironmentTarget, O as OutputRenderer, Q as QualityTier, S as ScreenSpaceAA, n as SsgiQuality, T as TonemapMode, o as TracedReflections, W as WorldEnvironment, p as exposureSettings, q as installFilmicToneMapping, r as qualityPreset, s as qualityTiers } from './quality-BYqKGAwo.js';
15
+ import { T as TracedReflections, G as GIVisualizeMode } from './quality-BADStsTn.js';
16
+ export { A as AutoExposureNode, C as ChainStage, E as EPIC_SSGI, F as FinalGatherMethod, a as GIVisualize, b as GI_VISUALIZE_MODES, I as IExposureSettings, c as IGIVisualizeOptions, d as IGiTier, e as IReflectionRoute, f as IShadowFilter, g as IShadowTier, h as ITracedHit, i as ITracedRay, j as ITracedReflectionsOptions, k as IWorldEnvironmentOptions, l as IWorldEnvironmentStageContext, m as IWorldEnvironmentTarget, O as OutputRenderer, Q as QualityTier, S as ScreenSpaceAA, n as SsgiQuality, o as TonemapMode, W as WorldEnvironment, p as exposureSettings, q as installFilmicToneMapping, r as qualityPreset, s as qualityTiers } from './quality-BADStsTn.js';
17
17
  import { SkyMesh } from 'three/addons/objects/SkyMesh.js';
18
18
  export { R as RendererToneMapping } from './default-tone-mapping-GgKPTiBP.js';
19
19
  import { Node as Node$1, UniformNode as UniformNode$1 } from 'three/src/nodes/Nodes.js';
@@ -1069,6 +1069,176 @@ declare class GPUSceneBVH extends Group implements IComputeDriven$1 {
1069
1069
  detach(): void;
1070
1070
  }
1071
1071
 
1072
+ /** The gather's pass groups, in the order they draw (the engine's own, `three-native/src/addons/screen-space.ts`). */
1073
+ declare const SCREEN_PROBE_PASSES: readonly ["trace", "filter", "gather"];
1074
+ type ScreenProbePass = (typeof SCREEN_PROBE_PASSES)[number];
1075
+ /** The camera the scene pass draws with: a projection to map the screen, and a world matrix to leave it. */
1076
+ interface IScreenProbeCamera {
1077
+ readonly near: number;
1078
+ readonly projectionMatrix: {
1079
+ readonly elements: readonly number[];
1080
+ };
1081
+ readonly matrixWorld: {
1082
+ readonly elements: readonly number[];
1083
+ };
1084
+ }
1085
+ interface IScreenProbeGatherOptions {
1086
+ /** The camera the scene pass draws with. */
1087
+ readonly camera: IScreenProbeCamera;
1088
+ /** The drawing buffer, in pixels. It fixes the probe grid; a resize needs a new gather. */
1089
+ readonly viewport: {
1090
+ readonly width: number;
1091
+ readonly height: number;
1092
+ };
1093
+ /** Pixels between probes: Unreal's `DownsampleFactor`, 16 at Epic and 32 at High. */
1094
+ readonly downsampleFactor?: number;
1095
+ /** Rays on a side of each probe's octahedron: Unreal's `TracingOctahedronResolution`, 8 at Epic. */
1096
+ readonly tracingOctahedronResolution?: number;
1097
+ /**
1098
+ * The tier below the screen along a ray that hits, in view space, exactly as the engine asks it: the light the radiance
1099
+ * cache would have returned along that ray, which the gather subtracts so the two tiers never add the same light twice.
1100
+ * A game with its own tier passes it here; without either tier a hit keeps the frame's own light, as three's SSGINode.
1101
+ */
1102
+ readonly fallback?: (position: Node<"vec3">, direction: Node<"vec3">, normal: Node<"vec3">) => Node<"vec3">;
1103
+ /**
1104
+ * The radiance cache in world space, in the frame's units: the light arriving along a direction at a point. It answers
1105
+ * the tier past the screen, where a ray that leaves it reads the cache. With no `fallback`, it also answers the tier
1106
+ * below along each ray. Unreal reads its cache per ray direction the same way (UE 5.8.3:
1107
+ * Engine/Shaders/Private/Lumen/LumenScreenProbeTracing.usf, SampleRadianceCacheAndApply).
1108
+ */
1109
+ readonly radiance?: (position: Node<"vec3">, direction: Node<"vec3">) => Node<"vec3">;
1110
+ /**
1111
+ * The packed scene a ray that leaves the screen walks before it reads `radiance`: Unreal continues the ray in the
1112
+ * distance field up to the cache's coverage and reads the cache where it ended, so a miss is a direction's radiance
1113
+ * and not the pixel's mean over the hemisphere. Without it there is no walk and no miss tier.
1114
+ */
1115
+ readonly trace?: Pick<TracedReflections, "trace">;
1116
+ /** Metres a ray that left the screen walks the packed scene before it reads `radiance`. 1: the cache's cell. */
1117
+ readonly cacheCellSize?: number;
1118
+ /**
1119
+ * Diagnosis: label only this pass group as the `SSGI` GPU stage, so `info.engine.gpuStages.SSGI` times it alone.
1120
+ * Omit to label every pass; `null` labels none (another stage is being timed).
1121
+ */
1122
+ readonly timedPass?: ScreenProbePass | null;
1123
+ /** False silences the `TN_SCREEN_PROBE_GATHER` line, not the report. */
1124
+ readonly marker?: boolean;
1125
+ }
1126
+ /** What the gather placed, printed once and readable by a tool: Unreal's grid, in pixels and probes. */
1127
+ interface IScreenProbeGatherReport {
1128
+ readonly downsampleFactor: number;
1129
+ readonly tracingOctahedronResolution: number;
1130
+ readonly viewportWidth: number;
1131
+ readonly viewportHeight: number;
1132
+ /** Probes over the whole grid: one per tile, the last row and column rounded up. */
1133
+ readonly probes: number;
1134
+ readonly raysPerProbe: number;
1135
+ /** Whether a ray that leaves the screen walks the scene, or reads the cache at its cell with none. */
1136
+ readonly worldTrace: boolean;
1137
+ }
1138
+ /**
1139
+ * Lumen's Screen Probe Gather (PRD-640): one probe per `downsampleFactor` pixel tile traces an octahedron of rays
1140
+ * instead of every pixel tracing its own, the probes' radiance is filtered into an irradiance octahedron each, and a
1141
+ * pixel blends the four nearest probes it can see. The engine owns the three passes
1142
+ * (`three-native/src/addons/screen-space.ts`); this composes the tier below them, which every game repeats:
1143
+ *
1144
+ * a ray that hits on screen returns the lit frame minus the cache along it (`fallback`), so the two never add the
1145
+ * same light twice;
1146
+ * a ray that leaves the screen continues through the packed scene (`trace`) up to `cacheCellSize` and reads the
1147
+ * radiance cache where it ended (`miss`), so the light it brings is that direction's, not the pixel's mean.
1148
+ *
1149
+ * The result is the incident radiance the traces add to what the game's composite already holds, E / pi units: multiply
1150
+ * it by the receiver's albedo (`mrt({ diffuseColor })`) and add it after the scene pass.
1151
+ *
1152
+ * The owned engine only: on `engine: "threejs"` the upstream node takes the camera as its fourth argument and has no
1153
+ * probes, which `gather()` refuses rather than drawing a frame with no bounce light.
1154
+ */
1155
+ declare class ScreenProbeGather {
1156
+ #private;
1157
+ readonly report: IScreenProbeGatherReport;
1158
+ readonly downsampleFactor: number;
1159
+ readonly tracingOctahedronResolution: number;
1160
+ readonly cacheCellSize: number;
1161
+ constructor(options: IScreenProbeGatherOptions);
1162
+ /**
1163
+ * The gather itself: `ssgi(base, depth, normal, { camera, probes, fallback, miss })`, with `base` the lit frame the
1164
+ * traces read and the depth and normal of the scene pass. `getGINode()` and `getAONode()` read what it built.
1165
+ */
1166
+ gather(colorNode: Node, depthNode: Node, normalNode: Node): Node<"vec4">;
1167
+ /** The gather's radiance, E / pi: multiply by the receiver's albedo and add it after the scene pass. */
1168
+ getGINode(): Node<"vec4">;
1169
+ /** The share of the gather's rays that found nothing, as the occlusion the caller applies to the lit frame. */
1170
+ getAONode(): Node<"vec4">;
1171
+ }
1172
+
1173
+ /** The scene camera the pass reads: a projection to map the screen and a depth to come back to view space. */
1174
+ interface IShortRangeAOCamera {
1175
+ readonly projectionMatrix: {
1176
+ readonly elements: readonly number[];
1177
+ };
1178
+ }
1179
+ interface IShortRangeAOOptions {
1180
+ /** The camera the scene pass drew with: a post quad's own camera nodes are the quad's, not the scene's. */
1181
+ readonly camera: IShortRangeAOCamera;
1182
+ /** The drawing buffer, in pixels. The search's reach is a distance on the screen, so it needs the size. */
1183
+ readonly viewport: {
1184
+ readonly width: number;
1185
+ readonly height: number;
1186
+ };
1187
+ /** Sweeps around the view normal (`horizonSearchSliceCount`): 2, Unreal's Epic setting. */
1188
+ readonly horizonSearchSliceCount?: number;
1189
+ /** Samples per sweep (`horizonSearchStepCount`): 3, Unreal's Epic setting. */
1190
+ readonly horizonSearchStepCount?: number;
1191
+ /** The reach in pixels of the drawing buffer: 32, twice Unreal's 16 px screen probe downsample. */
1192
+ readonly reachPx?: number;
1193
+ /**
1194
+ * Whether the pass also answers the bent normal (`.rgb`), Unreal's Epic-only setting. The occlusion alone is
1195
+ * `.a`, so a composite that does not read a bent normal pays one channel, not a second pass.
1196
+ */
1197
+ readonly bentNormal?: boolean;
1198
+ /** How strongly the occlusion applies: 1 keeps the horizon's own answer. */
1199
+ readonly intensity?: number;
1200
+ /** False silences the `TN_SHORT_RANGE_AO` line, not the report. */
1201
+ readonly marker?: boolean;
1202
+ }
1203
+ /** What the pass swept, printed once and readable by a tool. */
1204
+ interface IShortRangeAOReport {
1205
+ readonly horizonSearchSliceCount: number;
1206
+ readonly horizonSearchStepCount: number;
1207
+ readonly reachPx: number;
1208
+ /** Samples each pixel's normal hemisphere took: slices x steps. */
1209
+ readonly samplesPerPixel: number;
1210
+ readonly bentNormal: boolean;
1211
+ }
1212
+ /**
1213
+ * Unreal's Short Range AO (PRD-640 Phase 3): a horizon search of `horizonSearchSliceCount` sweeps around the view
1214
+ * normal, `horizonSearchStepCount` samples each at the squared fraction of a screen-space reach, at full resolution,
1215
+ * with a bent normal at Epic. It is the AO that runs *with* dynamic GI: the contact detail Lumen keeps after the screen
1216
+ * probe gather has already answered the wide occlusion, so the frame is not darkened twice by two wide treatments
1217
+ * (UE 5.8.3: Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenSpaceBentNormal.cpp and
1218
+ * Engine/Shaders/Private/Lumen/LumenScreenSpaceBentNormal.usf). GTAO through `ambientOcclusion` stays the AO of the
1219
+ * tiers without dynamic GI.
1220
+ *
1221
+ * The result is one texture: `rgb` the bent normal in view space (the space the normal target and the GI gather work
1222
+ * in), `a` the share of the hemisphere left open, which multiplies *indirect* light only — direct light and emission
1223
+ * keep their own occlusion, as Unreal's `DiffuseIndirectComposite` applies it. Multi-bounce and the albedo cap belong
1224
+ * to the game's composite, because they decide how a surface looks.
1225
+ */
1226
+ declare class ShortRangeAO {
1227
+ #private;
1228
+ readonly report: IShortRangeAOReport;
1229
+ readonly horizonSearchSliceCount: number;
1230
+ readonly horizonSearchStepCount: number;
1231
+ readonly reachPx: number;
1232
+ readonly bentNormal: boolean;
1233
+ readonly intensity: number;
1234
+ constructor(options: IShortRangeAOOptions);
1235
+ /**
1236
+ * The occlusion of one frame: `rgb` the bent normal in view space, `a` the share of the hemisphere left open. `depth`
1237
+ * is the scene pass's depth target and `normal` its view-space normal target.
1238
+ */
1239
+ occlusion(depthNode: TextureNode, normalNode: TextureNode): Node<"vec4">;
1240
+ }
1241
+
1072
1242
  interface IInstancedLodOptions {
1073
1243
  /** Baked-chain selection is automatic. `false` leaves detail to the caller. */
1074
1244
  readonly autoLod?: false | {
@@ -1299,6 +1469,19 @@ declare function mergeByMaterial(root: Object3D, options: IMergeByMaterialOption
1299
1469
  * "off" rather than quietly turning it back on.
1300
1470
  */
1301
1471
  declare function debugFlag(name: string): boolean;
1472
+ /**
1473
+ * The text this launch gave a debug switch, or `undefined` when no seam named it.
1474
+ *
1475
+ * `debugFlag`'s non-boolean sibling: the same naming rule — `?name` on the web, `TN_DEBUG_NAME` on
1476
+ * a native launch — for a switch whose value is a word rather than a yes or no, such as a quality
1477
+ * tier or a mode. An empty string means a seam named the switch and gave no value.
1478
+ *
1479
+ * @situation read a debug override whose value is not a boolean
1480
+ * @situation override a quality tier or a mode for one run without changing the code
1481
+ * @constraint a name in camelCase becomes UPPER_SNAKE: `debugValue("quality")` reads `?quality=` or `TN_DEBUG_QUALITY`
1482
+ * @example const tier = debugValue("quality");
1483
+ */
1484
+ declare function debugValue(name: string): string | undefined;
1302
1485
  /**
1303
1486
  * Publish one game object for a capture script or the console, in development builds only.
1304
1487
  *
@@ -1361,12 +1544,26 @@ declare function publishDevGlobal(name: string, value: unknown, scope: unknown):
1361
1544
  */
1362
1545
  /** The baked payload, exactly as `TN_virtual_geometry` stores it. */
1363
1546
  interface IClusterTable {
1364
- /** Per cluster, `[centreX, centreY, centreZ, radius]`. Culling reads it; PRD-283 will. */
1547
+ /**
1548
+ * Per cluster, `[centreX, centreY, centreZ, radius]`, in the mesh's own space.
1549
+ *
1550
+ * "The mesh's own space" is the one its `POSITION` attribute is in, which is why the asset pass
1551
+ * never quantizes a primitive that carries this table: quantization keeps the drawn positions but
1552
+ * moves the space out from under them, and every sphere below is tested against a transform.
1553
+ */
1365
1554
  readonly bounds: Float32Array;
1366
- /** Per cluster, `[axisX, axisY, axisZ, cutoff]`. */
1555
+ /** Per cluster, `[axisX, axisY, axisZ, cutoff]`. Read into a field nothing uses yet. */
1367
1556
  readonly cones: Float32Array;
1368
1557
  /** Per cluster, `[ownError, parentError]`, in the mesh's own units. */
1369
1558
  readonly errors: Float32Array;
1559
+ /**
1560
+ * Per cluster, `[group, sourceGroup]`, or absent on a table built by hand.
1561
+ *
1562
+ * `group` is the group that folded this cluster one level up (`NO_GROUP` when nothing above
1563
+ * replaces it), and `sourceGroup` is the group whose simplification produced it. Inverting `group`
1564
+ * gives the children of every group, which is the descent a view-pruned cut walks.
1565
+ */
1566
+ readonly groups?: Uint32Array;
1370
1567
  /** Cluster-ordered triangles for every level, indexing the geometry's vertex buffer. */
1371
1568
  readonly indices: Uint32Array;
1372
1569
  /** Per cluster, the sphere `parentError` is projected through. */
@@ -1394,6 +1591,24 @@ interface IClusteredMeshOptions {
1394
1591
  * radius.
1395
1592
  */
1396
1593
  readonly recutDistance?: number;
1594
+ /**
1595
+ * Whether clusters the camera cannot see are skipped.
1596
+ *
1597
+ * On by default, because a cluster behind the camera is a cluster nobody can resolve. A mesh that
1598
+ * casts shadows keeps the unpruned cut until shadows have a cut of their own, and a game that
1599
+ * renders the mesh through a second camera (a mirror, a portal) can turn it off; either way the
1600
+ * mesh reports what it did through {@link ClusteredMesh.viewCullReport}.
1601
+ */
1602
+ readonly viewCull?: boolean;
1603
+ /**
1604
+ * How far the camera may turn, in radians, before the cut is taken again.
1605
+ *
1606
+ * A cut pruned by the view is only valid for the view it was taken with, so the frustum it was
1607
+ * pruned by is widened by this angle and the cut is kept until the camera turns past it. It is the
1608
+ * one constant this technique needs: too small re-cuts on every nudge, too large draws a sliver of
1609
+ * clusters that turning would reveal. Default {@link DEFAULT_VIEW_MARGIN}.
1610
+ */
1611
+ readonly viewMargin?: number;
1397
1612
  }
1398
1613
  declare class ClusteredMesh extends Mesh {
1399
1614
  #private;
@@ -1403,6 +1618,13 @@ declare class ClusteredMesh extends Mesh {
1403
1618
  errorPixels: number;
1404
1619
  /** Camera movement, in the mesh's own units, below which the previous cut is kept. */
1405
1620
  recutDistance: number;
1621
+ /**
1622
+ * Whether the cut skips clusters the camera cannot see. Writable — a mesh drawn through a second
1623
+ * camera can turn it off, and {@link ClusteredMesh.viewCullReport} says what happened either way.
1624
+ */
1625
+ viewCull: boolean;
1626
+ /** Camera turn, in radians, the kept cut stays valid for. Writable. */
1627
+ viewMargin: number;
1406
1628
  constructor(geometry: BufferGeometry, surface: Material | Material[], table: IClusterTable, options?: IClusteredMeshOptions);
1407
1629
  /**
1408
1630
  * A second mesh over the same body, cut for its own place in the scene.
@@ -1427,6 +1649,39 @@ declare class ClusteredMesh extends Mesh {
1427
1649
  get drawnClusters(): number;
1428
1650
  /** Triangles the current cut submits. */
1429
1651
  get drawnTriangles(): number;
1652
+ /**
1653
+ * Triangles in the current cut whose cluster bounds lie wholly outside the view volume.
1654
+ *
1655
+ * A measurement, not a cull: PRD-600 records this number before and after the walk learns to skip
1656
+ * what the view does not hold. It is taken when the cut is taken, so a still camera reads the
1657
+ * number its standing cut was made with.
1658
+ */
1659
+ get drawnTrianglesOutsideView(): number;
1660
+ /** Clusters in the current cut whose bounds lie wholly outside the view volume. */
1661
+ get drawnClustersOutsideView(): number;
1662
+ /**
1663
+ * Milliseconds the last re-cut took, from choosing the cut to the index buffer being marked for
1664
+ * upload.
1665
+ *
1666
+ * The whole re-cut, because that is the cost a game pays for turning the camera and the number
1667
+ * `viewMargin` is chosen against. The bytes below are only the compact's copy, so the throughput
1668
+ * this divides out is the pessimistic one.
1669
+ */
1670
+ get recutMs(): number;
1671
+ /** Index bytes the last re-cut copied and uploaded. */
1672
+ get recutBytes(): number;
1673
+ /** Throughput of the last re-cut's copy of the cut, in megabytes per second. */
1674
+ get recutMegabytesPerSecond(): number;
1675
+ /** How many re-cuts this mesh has taken, so a reader can tell a fresh one from a stale reading. */
1676
+ get recutCount(): number;
1677
+ /**
1678
+ * What this mesh does about clusters outside the view, and why.
1679
+ *
1680
+ * `"on"` when the cut is pruned, and a reason when it is not — a mesh that silently kept drawing
1681
+ * what nobody can see would be a performance bug with no symptom, and one that silently dropped
1682
+ * what a second camera can see would be a hole with no cause.
1683
+ */
1684
+ get viewCullReport(): string;
1430
1685
  /**
1431
1686
  * Chooses this frame's cut and compacts it into one index range.
1432
1687
  *
@@ -1496,6 +1751,16 @@ interface IClusteredBatchOptions {
1496
1751
  readonly distanceRatio?: number;
1497
1752
  /** Screen-space error budget in pixels, as {@link ClusteredMesh}. Default 1. */
1498
1753
  readonly errorPixels?: number;
1754
+ /**
1755
+ * Whether copies the camera cannot see are skipped.
1756
+ *
1757
+ * On by default. A batch that casts shadows keeps every copy regardless — a copy out of the main
1758
+ * view can still cast into it — until shadows have a cut of their own. The batch reports what it
1759
+ * did through {@link ClusteredBatch.viewCullReport}.
1760
+ */
1761
+ readonly viewCull?: boolean;
1762
+ /** How far the camera may turn, in radians, before the bands are taken again. Default two degrees. */
1763
+ readonly viewMargin?: number;
1499
1764
  /** The shape every copy draws, carrying the baked cluster table. */
1500
1765
  readonly geometry: BufferGeometry;
1501
1766
  /** The surface every copy draws with, supplied by the game and used by reference. */
@@ -1511,6 +1776,13 @@ interface IClusteredBatchBuildOptions {
1511
1776
  }
1512
1777
  declare class ClusteredBatch {
1513
1778
  #private;
1779
+ /** Radians the camera may turn before the bands are taken again. */
1780
+ readonly viewMargin: number;
1781
+ /**
1782
+ * Whether copies the camera cannot see are skipped. Writable; the batch reports what it did
1783
+ * through {@link ClusteredBatch.viewCullReport}.
1784
+ */
1785
+ viewCull: boolean;
1514
1786
  constructor(options: IClusteredBatchOptions);
1515
1787
  /** How many copies are placed. */
1516
1788
  get count(): number;
@@ -1518,6 +1790,22 @@ declare class ClusteredBatch {
1518
1790
  get drawCalls(): number;
1519
1791
  /** Triangles the current cut submits, over every copy. */
1520
1792
  get drawnTriangles(): number;
1793
+ /**
1794
+ * Copies the current cut submits whose own bounding sphere lies wholly outside the view volume.
1795
+ *
1796
+ * A measurement, not a cull: see {@link ClusteredMesh.drawnTrianglesOutsideView}.
1797
+ */
1798
+ get drawnCopiesOutsideView(): number;
1799
+ /** Triangles those copies submit: their own band's cut, times how many copies are outside. */
1800
+ get drawnTrianglesOutsideView(): number;
1801
+ /**
1802
+ * What this batch does about copies outside the view, and why.
1803
+ *
1804
+ * `"on"` when copies the camera cannot see are skipped, and a reason when they are not — a batch
1805
+ * that silently kept drawing a whole copy behind the camera would be a cost with no symptom, and
1806
+ * one that silently dropped what a shadow camera can see would be a missing shadow with no cause.
1807
+ */
1808
+ get viewCullReport(): string;
1521
1809
  /** Adds one copy. Returns its index, so the game can move it later. */
1522
1810
  place(placement: IClusteredPlacement): number;
1523
1811
  /** Attaches the batch to the scene. Nothing draws until {@link ClusteredBatch.update} runs. */
@@ -3884,6 +4172,316 @@ declare class SpectralOcean extends Object3D implements IComputeDriven$1 {
3884
4172
  detach(): void;
3885
4173
  }
3886
4174
 
4175
+ /** The instance attributes every chunk carries; the game's material reads them by these names. */
4176
+ declare const GRASS_FIELD_ATTRIBUTES: {
4177
+ /** vec3: the blade's root, chunk-local (the chunk mesh sits at its corner). */
4178
+ readonly root: "grassRoot";
4179
+ /** vec4: facing 0..1, height 0..1, thinning priority 0..1, coverage scale 0..1. */
4180
+ readonly rand: "grassRand";
4181
+ /** vec4: angle away from the tuft centre, tuft random 0..1, ground normal x, ground normal z. */
4182
+ readonly clump: "grassClump";
4183
+ };
4184
+ interface IGrassFieldBounds {
4185
+ readonly minX: number;
4186
+ readonly minZ: number;
4187
+ readonly maxX: number;
4188
+ readonly maxZ: number;
4189
+ }
4190
+ /** The blade shape the game built: every LOD level packed in one geometry, each a draw range. */
4191
+ interface IGrassFieldBlade {
4192
+ readonly geometry: BufferGeometry;
4193
+ /** Index ranges near to far; `lodDistances` picks between them. */
4194
+ readonly lods: readonly {
4195
+ readonly start: number;
4196
+ readonly count: number;
4197
+ }[];
4198
+ /** The tallest a blade can stand, metres: pads each chunk's bounds so culling never clips a tip. */
4199
+ readonly reach: number;
4200
+ }
4201
+ /** TSL uniforms the field keeps current; the game's material reads them so its thinning matches the CPU trim. */
4202
+ interface IGrassFieldNodes {
4203
+ readonly thinStart: UniformNode<"float", number>;
4204
+ readonly thinEnd: UniformNode<"float", number>;
4205
+ readonly farDensity: UniformNode<"float", number>;
4206
+ readonly fadeStart: UniformNode<"float", number>;
4207
+ readonly drawDistance: UniformNode<"float", number>;
4208
+ readonly pushers: readonly UniformNode<"vec4", Vector4>[];
4209
+ /**
4210
+ * The pushers' pull on a root, as vec3(push x, push z, press): push is the summed unit direction
4211
+ * away from each pusher times its falloff, press the strongest falloff 0..1. `pressAt` mirrors it.
4212
+ */
4213
+ push(rootWorld: Node<"vec3">): Node<"vec3">;
4214
+ }
4215
+ interface IGrassField3DOptions {
4216
+ readonly blade: IGrassFieldBlade;
4217
+ /** Builds the game's blade material from the field's uniforms. Called once. */
4218
+ readonly material: (nodes: IGrassFieldNodes) => Material;
4219
+ /** Ground height at (x, z), field-local metres. */
4220
+ readonly getHeight: (x: number, z: number) => number;
4221
+ /** Coverage 0..1 at (x, z, height, normal y): paths, clearings, biome masks. */
4222
+ readonly getDensity?: (x: number, z: number, height: number, normalY: number) => number;
4223
+ readonly bounds?: IGrassFieldBounds | null;
4224
+ /** Blades per square metre at full coverage. */
4225
+ readonly density?: number;
4226
+ readonly chunkSize?: number;
4227
+ readonly seed?: number;
4228
+ readonly heightSampleSpacing?: number;
4229
+ /** Degrees: no grass steeper than `maxSlope`, thinning over `slopeFade` degrees before it. */
4230
+ readonly maxSlope?: number;
4231
+ readonly slopeFade?: number;
4232
+ readonly minAltitude?: number;
4233
+ readonly maxAltitude?: number;
4234
+ /** Tuft size, metres: blades in one tuft share a centre to lean from. */
4235
+ readonly clumpSize?: number;
4236
+ readonly drawDistance?: number;
4237
+ /** Share of `drawDistance` over which blades sink away at the far edge. */
4238
+ readonly fadeRange?: number;
4239
+ /** Distances at which the next blade LOD takes over: `blade.lods.length - 1` of them. */
4240
+ readonly lodDistances?: readonly number[];
4241
+ readonly thinStart?: number;
4242
+ readonly thinEnd?: number;
4243
+ /** The share of blades left past `thinEnd`. */
4244
+ readonly farDensity?: number;
4245
+ /** Milliseconds per frame allowed for building chunks; one chunk always builds. */
4246
+ readonly buildBudgetMs?: number;
4247
+ readonly receiveShadow?: boolean;
4248
+ /** Scales every density at once, as Unreal's `grass.densityScale`. */
4249
+ readonly densityScale?: number;
4250
+ /** Scales every distance at once, as Unreal's `grass.CullDistanceScale`. */
4251
+ readonly cullDistanceScale?: number;
4252
+ }
4253
+ interface IGrassFieldStats {
4254
+ chunks: number;
4255
+ visibleChunks: number;
4256
+ blades: number;
4257
+ triangles: number;
4258
+ pending: number;
4259
+ /** Chunks built since the field was made. */
4260
+ built: number;
4261
+ }
4262
+ /**
4263
+ * Streamed, seeded, instanced grass around the camera; the game owns the blade and the material.
4264
+ *
4265
+ * Square chunks around the camera, each one instanced draw, built nearest first inside
4266
+ * `buildBudgetMs` per frame. A chunk is built inside 1.3 × the draw distance and discarded past
4267
+ * 1.4 ×, Unreal Landscape grass's guard band (UE 5.8.3:
4268
+ * Engine/Source/Runtime/Landscape/Private/LandscapeGrass.cpp:88, :94), so the edge never thrashes.
4269
+ * Each blade carries a priority; the material shrinks low-priority blades away with distance through
4270
+ * `thinStart`/`thinEnd`/`farDensity`, and the CPU only trims the instances the shader already hid.
4271
+ * Blade LOD is a draw-range switch on `blade.lods`. Up to four pushers flatten grass around them.
4272
+ *
4273
+ * The node creates no colour, shading or blade shape: `blade` and `material` come from the game's
4274
+ * `src/render/grass.ts`, which reads `GRASS_FIELD_ATTRIBUTES` and the `nodes` uniforms.
4275
+ *
4276
+ * @situation Grass that sways and parts around the player across a large terrain.
4277
+ * @situation Stream instanced ground cover in chunks around the camera under a frame budget.
4278
+ * @situation Meadow, lawn or field grass with distance thinning and LOD that does not pop.
4279
+ * @constraint Call `update(camera)` once per rendered frame, from `ctx.beforeRender`.
4280
+ * @constraint Rotating or scaling the field is not supported; translating it is.
4281
+ * @example
4282
+ * import { GrassField3D } from "@threenative/core";
4283
+ * // grassBlade and grassMaterial come from the game's own src/render/grass.ts.
4284
+ * const grass = new GrassField3D({ blade: grassBlade(), material: grassMaterial, getHeight: height });
4285
+ * ctx.add(grass);
4286
+ * ctx.beforeRender(() => { grass.pushers[0]?.set(hero.x, hero.y, hero.z, 1.2); grass.update(camera); });
4287
+ */
4288
+ declare class GrassField3D extends Group {
4289
+ #private;
4290
+ readonly blade: IGrassFieldBlade;
4291
+ readonly material: Material;
4292
+ readonly nodes: IGrassFieldNodes;
4293
+ /** x, y, z world position and w radius (0 = off) of what flattens the grass. */
4294
+ readonly pushers: readonly Vector4[];
4295
+ /** Chunks and budget from the shared ring; blades and triangles from this frame's LOD pass. */
4296
+ get stats(): IGrassFieldStats;
4297
+ getHeight: (x: number, z: number) => number;
4298
+ getDensity: ((x: number, z: number, height: number, normalY: number) => number) | null;
4299
+ bounds: IGrassFieldBounds | null;
4300
+ density: number;
4301
+ chunkSize: number;
4302
+ seed: number;
4303
+ heightSampleSpacing: number;
4304
+ maxSlope: number;
4305
+ slopeFade: number;
4306
+ minAltitude: number;
4307
+ maxAltitude: number;
4308
+ clumpSize: number;
4309
+ drawDistance: number;
4310
+ fadeRange: number;
4311
+ lodDistances: readonly number[];
4312
+ thinStart: number;
4313
+ thinEnd: number;
4314
+ farDensity: number;
4315
+ buildBudgetMs: number;
4316
+ receiveShadow: boolean;
4317
+ densityScale: number;
4318
+ cullDistanceScale: number;
4319
+ constructor(options: IGrassField3DOptions);
4320
+ /** The pushers' press 0..1 at a world point: the CPU mirror of `nodes.push`'s z. */
4321
+ pressAt(x: number, y: number, z: number): number;
4322
+ /** Builds every chunk in range on the next `update` regardless of budget: on load or after a teleport. */
4323
+ prewarm(): void;
4324
+ /** Re-scatter after the ground or the density changed: all chunks, or those touching a rectangle. */
4325
+ refresh(rect?: IGrassFieldBounds): void;
4326
+ /** Streams, thins and LODs the chunks around `camera`. Call once per rendered frame. */
4327
+ update(camera: Camera): void;
4328
+ dispose(): void;
4329
+ }
4330
+
4331
+ interface ITileBounds {
4332
+ readonly minX: number;
4333
+ readonly minZ: number;
4334
+ readonly maxX: number;
4335
+ readonly maxZ: number;
4336
+ }
4337
+
4338
+ /** One part of the scattered mesh — a glTF primitive — and the baked levels to draw it at. */
4339
+ interface IScatterPart {
4340
+ /** Near to far: `lods[0]` is the full mesh, the last is the farthest level. */
4341
+ readonly lods: readonly BufferGeometry[];
4342
+ /** The game's material for this part. The field chooses neither geometry nor look. */
4343
+ readonly material: Material;
4344
+ }
4345
+ /** The ground under a candidate, in field-local metres, with its unit normal. */
4346
+ interface IScatterPoint {
4347
+ readonly x: number;
4348
+ readonly y: number;
4349
+ readonly z: number;
4350
+ readonly nx: number;
4351
+ readonly ny: number;
4352
+ readonly nz: number;
4353
+ }
4354
+ /** Where a candidate goes. The game writes the transform; the field owns `priority`. */
4355
+ interface IScatterPlacement {
4356
+ x: number;
4357
+ y: number;
4358
+ z: number;
4359
+ /** Radians about the ground normal, so a prop's own facing is the game's choice. */
4360
+ yaw: number;
4361
+ /** Uniform scale on the baked metres. */
4362
+ scale: number;
4363
+ /** 0..1: the candidate's order in the seeded shuffle. Lower instances thin away first. */
4364
+ readonly priority: number;
4365
+ }
4366
+ type IScatterFieldBounds = ITileBounds;
4367
+ interface IScatterField3DOptions {
4368
+ /** One entry per part of the baked mesh; a log's bark and its foliage are two. */
4369
+ readonly parts: readonly IScatterPart[];
4370
+ /**
4371
+ * Decides one candidate: write `out` and return true to place it, or return false to leave the
4372
+ * spot empty (a path, a rock, a stump's own footprint). Called once per candidate per tile build.
4373
+ */
4374
+ readonly place: (point: IScatterPoint, out: IScatterPlacement) => boolean;
4375
+ /** Ground height at (x, z), field-local metres. */
4376
+ readonly getHeight: (x: number, z: number) => number;
4377
+ /** Coverage 0..1 at (x, z, height, normal y): paths, clearings, biome masks. */
4378
+ readonly getDensity?: (x: number, z: number, height: number, normalY: number) => number;
4379
+ readonly bounds?: IScatterFieldBounds | null;
4380
+ /** Candidates per square metre at full coverage. */
4381
+ readonly density?: number;
4382
+ readonly chunkSize?: number;
4383
+ readonly seed?: number;
4384
+ readonly heightSampleSpacing?: number;
4385
+ /** Degrees: nothing is placed on ground steeper than `maxSlope`, thinning over `slopeFade`. */
4386
+ readonly maxSlope?: number;
4387
+ readonly slopeFade?: number;
4388
+ readonly minAltitude?: number;
4389
+ readonly maxAltitude?: number;
4390
+ readonly drawDistance?: number;
4391
+ /** Distances at which the next level takes over, one per step down a part's `lods`. */
4392
+ readonly lodDistances?: readonly number[];
4393
+ readonly thinStart?: number;
4394
+ readonly thinEnd?: number;
4395
+ /** The share of instances left past `thinEnd`. */
4396
+ readonly farDensity?: number;
4397
+ /** Milliseconds per frame allowed for building tiles; one tile always builds. */
4398
+ readonly buildBudgetMs?: number;
4399
+ /** Tilt each instance onto the ground normal. Off keeps every instance upright. */
4400
+ readonly alignToGround?: boolean;
4401
+ readonly receiveShadow?: boolean;
4402
+ readonly castShadow?: boolean;
4403
+ /** Scales every density at once, as Unreal's `grass.densityScale`. */
4404
+ readonly densityScale?: number;
4405
+ /** Scales every distance at once, as Unreal's `grass.CullDistanceScale`. */
4406
+ readonly cullDistanceScale?: number;
4407
+ }
4408
+ interface IScatterFieldStats {
4409
+ tiles: number;
4410
+ visibleTiles: number;
4411
+ instances: number;
4412
+ pending: number;
4413
+ /** Tiles built since the field was made. */
4414
+ built: number;
4415
+ }
4416
+ /**
4417
+ * Streamed, seeded, instanced scatter of any baked mesh around a follow point; the game owns the
4418
+ * mesh, the material and where each instance lands.
4419
+ *
4420
+ * Square tiles round the follow point, built nearest first inside `buildBudgetMs` through the same
4421
+ * ring `GrassField3D` uses (`TileRing`): a tile is built inside 1.3 × the draw distance and freed
4422
+ * past 1.4 ×, Unreal Landscape grass's guard band (UE 5.8.3:
4423
+ * Engine/Source/Runtime/Landscape/Private/LandscapeGrass.cpp:88, :94). Each part draws one
4424
+ * `InstancedMesh` per level, so swapping detail is a visibility toggle on a baked level the game
4425
+ * loaded. Thinning is a plain instance count: the ring's tiles hold instances in the seeded shuffle
4426
+ * order, so any prefix covers the tile evenly and the far edge keeps a share of them.
4427
+ *
4428
+ * The field creates no colour, shading or shape: `parts` and `place` come from the game, and so does
4429
+ * every appearance constant.
4430
+ *
4431
+ * @situation scatter fallen logs, twigs, leaf litter, stones and ferns over a forest floor
4432
+ * @situation stream instanced props of any baked mesh round the player without one draw per prop
4433
+ * @situation place rocks, debris or plants on a heightfield with distance thinning and level of detail
4434
+ * @constraint call `update(follow)` once per rendered frame
4435
+ * @constraint `place` runs once per candidate per tile build: return false for paths and clearings
4436
+ * @constraint rotating or scaling the field is not supported; translating it is
4437
+ * @example
4438
+ * import { ScatterField3D } from "@threenative/core";
4439
+ * const floor = new ScatterField3D({
4440
+ * parts: [{ lods: [logLod0, logLod1], material }],
4441
+ * getHeight: (x, z) => height(x, z),
4442
+ * density: 0.05,
4443
+ * place: (point, out) => { out.x = point.x; out.y = point.y; out.z = point.z; out.yaw = point.x * 0.7; out.scale = 1; return !onPath(point.x, point.z); },
4444
+ * });
4445
+ * ctx.add(floor);
4446
+ * ctx.beforeRender(() => floor.update(hero.position));
4447
+ */
4448
+ declare class ScatterField3D extends Group {
4449
+ #private;
4450
+ readonly parts: readonly IScatterPart[];
4451
+ place: (point: IScatterPoint, out: IScatterPlacement) => boolean;
4452
+ getHeight: (x: number, z: number) => number;
4453
+ getDensity: ((x: number, z: number, height: number, normalY: number) => number) | null;
4454
+ bounds: IScatterFieldBounds | null;
4455
+ density: number;
4456
+ chunkSize: number;
4457
+ seed: number;
4458
+ heightSampleSpacing: number;
4459
+ maxSlope: number;
4460
+ slopeFade: number;
4461
+ minAltitude: number;
4462
+ maxAltitude: number;
4463
+ drawDistance: number;
4464
+ lodDistances: readonly number[];
4465
+ thinStart: number;
4466
+ thinEnd: number;
4467
+ farDensity: number;
4468
+ buildBudgetMs: number;
4469
+ alignToGround: boolean;
4470
+ receiveShadow: boolean;
4471
+ castShadow: boolean;
4472
+ densityScale: number;
4473
+ cullDistanceScale: number;
4474
+ constructor(options: IScatterField3DOptions);
4475
+ get stats(): IScatterFieldStats;
4476
+ /** Builds every tile in range on the next `update` regardless of budget: on load or after a teleport. */
4477
+ prewarm(): void;
4478
+ /** Re-scatter after the ground or the coverage changed: all tiles, or those touching a rectangle. */
4479
+ refresh(rect?: IScatterFieldBounds): void;
4480
+ /** Streams, thins and LODs the tiles round `follow`. Call once per rendered frame. */
4481
+ update(follow: Vector3): void;
4482
+ dispose(): void;
4483
+ }
4484
+
3887
4485
  interface IGPUParticles3DBuffers {
3888
4486
  readonly positions: StorageBufferNode<"vec3">;
3889
4487
  readonly velocities: StorageBufferNode<"vec3">;
@@ -5231,6 +5829,6 @@ declare function boneLengths(root: Object3D): IBoneLengthSnapshot;
5231
5829
  */
5232
5830
  declare function boneLengthDeviations(root: Object3D, bind: IBoneLengthSnapshot, options?: IBoneLengthDeviationsOptions): IBoneLengthDeviationReport;
5233
5831
 
5234
- declare const version = "0.3.13";
5832
+ declare const version = "0.3.15";
5235
5833
 
5236
- export { ATLAS_PADDING, ATMOSPHERE_LUT_RESOLUTIONS, AnimationComposer, AnimationPlayer, Atmosphere, type AtmosphereDirection, AtmosphereLuts, type AtmosphereRgb, Billboard3D, type BillboardLockAxis, BlendSpace1D, BlendSpace2D, BudgetLadder, type BudgetVerdict, ClusteredBatch, ClusteredMesh, DEV_GLOBAL_KEY, Daylight, type DevGlobal, ENVIRONMENT_TOO_SMALL_MARKER, FlightModel, FluidField2D, FluidParticles3D, FramePassKind, GIBudget, type GIMethod, GIVisualizeMode, GI_METHODS, GPUParticles3D, GPUSceneBVH, type GPUSceneBVHTraceFunction, GroundSnap, type IAddInSlicesOptions, type IAddInSlicesProgress, type IAddInSlicesReport, type IAircraftAirframe, type IAnimationComposerOptions, type IAnimationLayer, type IAnimationMask, type IAnimationMotionDelta, type IAnimationPlayOptions, type IAnimationPlayerOptions, type IAnimationRootMotionOptions, type IAnimationUpdateRateReport, type IAtmosphereLutResolution, type IAtmosphereLutResolutions, type IAtmosphereOptions, type IAtmosphereParameterPatch, type IAtmosphereParameters, type IAtmosphereScenePass, type IBillboard3DOptions, type IBoneContactReport, type IBoneLengthDeviation, type IBoneLengthDeviationReport, type IBoneLengthDeviationsOptions, type IBoneLengthSnapshot, type IBonePoseError, type IBudgetLadderOptions, type IBudgetWindow, type IClipBindingReport, type IClipCoverageReport, type IClipPoseErrorOptions, type IClipPoseErrorReport, type IClipPoseSubject, type IClipTrackBinding, type IClusterTable, type IClusteredBatchBuildOptions, type IClusteredBatchOptions, type IClusteredMeshOptions, type IClusteredPlacement, IComputeDriven$1 as IComputeDriven, type IDaylightOptions, type IDevTools, type IEmitParticleRequest, type IFlightAxes, type IFlightControls, type IFlightDeck, type IFlightEnvironment, type IFlightForces, type IFlightModelOptions, type IFlightModifiers, type IFlightQuaternion, type IFlightState, type IFlightVector3, type IFluidBounds, type IFluidCollider, type IFluidFieldOptions, type IFluidFieldSampler, type IFluidFieldVector2, type IFluidParticlesOptions, type IFluidParticlesStats, IFrameBudgetWindow, type IGIBudgetOptions, type IGIBudgetReport, type IGPUParticles3DOptions, type IGPUParticles3DRuntime, type IGPUParticles3DSpawnBuffers, type IGPUParticles3DSpawnRequest, type IGPUParticles3DStats, IGPUReadbackSample, type IGPUSceneBVHMaterialGroup, type IGPUSceneBVHOptions, IGamePluginHooks, IGamePluginRuntime, IGeometryCaptureReport, IGeometryCaptureRequest, type IGroundSnapOptions, type IInstancedBatchBuildOptions, type IInstancedBatchOptions, type IInstancedPlacement, type ILampShadowStats, type ILaunchFailure, type ILoadAllOptions, type ILoadAllProgress, type IMatrixWorldReport, type IMeasureThreePoseOptions, type IMergeByMaterialOptions, type IMergePart, type IMergePartsOptions, type INormaliseToMetresOptions, type IPathFollow3DOptions, type IPathFollow3DProjection, type IPathFollow3DSample, type IProbeVolumeBakeProgress, type IProbeVolumeCoefficient, type IProbeVolumeObservation, type IProbeVolumeOptions, type IRadianceCacheOptions, type IReplayOptions, type IReplayRecording, type IReplayRecordingSample, type IResolvedAtmosphereParameters, type IRippleFieldFlow, type IRippleFieldOptions, type ISceneShape, type ISceneWarning, type IShadowFilterBudgetOptions, type IShadowFilterReport, type ISkeletalMesh3DOptions, type ISkyCaptureOptions, type ISoftBody3DOptions, type ISoftBodyCollision, type ISolarPosition, type ISolarPositionInput, type ISourceAngleShadowInputs, type ISourceAngleShadowOptions, type ISpanProbeTarget, type ISpanSummary, type ISpanWindow, type ISpectralOceanCascade, type ISpectralOceanHeight, type ISpectralOceanOptions, type ISpriteAnimator3DOptions, type ISpriteFrame3D, IStageGpuReading, type IStaticTransformCensus, type IStrideReport, type ISurfaceCacheMaterial, type ISurfaceCacheOptions, type ISurfaceCacheReport, type ISurfaceCacheTexture, type ISurfaceLight, type ISurfaceLightsOptions, type IThreePoseBounds, type IThreePoseMeasurement, type ITracerPool3DOptions, type ITracerSpawnOptions, type IUnlitFoliageWarning, type IValidationReport, type IVirtualShadowOptions, type IVirtualShadowStats, type IWaterReflectionOptions, type IWaterSurfaceOptions, type IWaveFieldDomainWarp, type IWaveFieldGraphOptions, type IWaveFieldOptions, type IWaveFieldSample, type IWaveFieldWave, InstancedBatch, LAMP_SHADOW_MARKER, LUT_RESOLUTIONS, type LaunchFailureKind, type MatrixWorldMode, MatrixWorldPass, NEUTRAL_FLIGHT_MODIFIERS, type NormaliseAxis, OPACITY_IGNORED_MARKER, PROBE_VOLUME_MARKER, PathFollow3D, ProbeVolume, type ProbeVolumeDensity, RENDERLIST_VALIDATE_FLAG, RENDERLIST_VALIDATE_MARKER, RadianceCache, type Recording, RenderListValidator, type ReplayPointer, RippleField, SCENE_WARNING_MARKER, SHADOW_FILTER_TIERS, SHADOW_STAGES, SPANS, SPANS_FLAG, SPANS_MARKER, SPAN_COUNT, SPAN_NAMES, STATIC_TRANSFORM_MARKER, ShadowFilterBudget, type ShadowFilterTier, SkeletalMesh3D, SkyCapture, SkyCaptureSchedule, SoftBody3D, type SpanId, SpanRecorder, SpectralOcean, SpriteAnimator3D, type SpritePlaybackMode, SurfaceCache, SurfaceLights, type ThreePoseQuaternion, type ThreePoseVector, TracerPool3D, UNLIT_FOLIAGE_FIX, UNLIT_FOLIAGE_MARKER, VIRTUAL_SHADOW_CASTER_LAYER, VIRTUAL_SHADOW_MARKER, VIRTUAL_SHADOW_MOVER_LAYER, VIRTUAL_SHADOW_WIDE_CASTER_LAYER, VirtualShadowNode, WaterSurface3D, type WaveDirection, WaveField, addFoliageBackLight, addInSlices, addSpan, aerodynamicCoefficients, airDensity, aircraftMass, alwaysRender, attachToBone, attitudeAxes, beginSpan, boneContact, boneLengthDeviations, boneLengths, bvhIntersectFirstHit, clipBoneCoverage, clipPoseError, clipTrackBindings, createReplayDriver, debugFlag, describeSceneShape, describeSceneWarning, devGlobal, directionFromSolarPosition, directionalTransmittance, displayPeriodMs, endSpan, ev100FromCamera, ev100FromExposure, ev100FromLuminance, exposeDebug, exposureFromEv100, formatSceneWarning, formatSpansWindow, formatUnlitFoliageWarning, formatValidationReport, gearClearance, installSpanProbes, invalidateStatic, isStatic, lampPenumbraTangent, lampShadowMarker, loadAll, lookDiagnostics, markStatic, measureThreePose, mergeByMaterial, mergeParts, normaliseToMetres, onLaunchFailure, parseReplayRecording, penumbraUv, posedBounds, publishDevGlobal, rayStruct, readGIMarker, readLampShadowMarker, readProbeVolumeObservation, readShadowTierMarker, readVirtualShadowMarker, refreshStaticTransforms, renderListValidationRequested, renderTrapAudit, replay, resetStaticTransforms, resolveAtmosphereLutResolutions, resolveAtmosphereParameters, sceneWarning, setAttitude, setSpanRecorder, skeletonBones, softCircleDataTexture, solarPosition, solarPositionAt, sourceAngleShadowFilter, sourceRadiusShadowFilter, spanNow, spanRecorder, spansRequested, staticTransformCensus, thinCards, unlitFoliageWarning, unmarkStatic, updateAtmosphereParameters, updateClusteredMeshes, useRoughDiffuse, validateWorldMatrices, version, zenithTransmittance };
5834
+ export { ATLAS_PADDING, ATMOSPHERE_LUT_RESOLUTIONS, AnimationComposer, AnimationPlayer, Atmosphere, type AtmosphereDirection, AtmosphereLuts, type AtmosphereRgb, Billboard3D, type BillboardLockAxis, BlendSpace1D, BlendSpace2D, BudgetLadder, type BudgetVerdict, ClusteredBatch, ClusteredMesh, DEV_GLOBAL_KEY, Daylight, type DevGlobal, ENVIRONMENT_TOO_SMALL_MARKER, FlightModel, FluidField2D, FluidParticles3D, FramePassKind, GIBudget, type GIMethod, GIVisualizeMode, GI_METHODS, GPUParticles3D, GPUSceneBVH, type GPUSceneBVHTraceFunction, GRASS_FIELD_ATTRIBUTES, GrassField3D, GroundSnap, type IAddInSlicesOptions, type IAddInSlicesProgress, type IAddInSlicesReport, type IAircraftAirframe, type IAnimationComposerOptions, type IAnimationLayer, type IAnimationMask, type IAnimationMotionDelta, type IAnimationPlayOptions, type IAnimationPlayerOptions, type IAnimationRootMotionOptions, type IAnimationUpdateRateReport, type IAtmosphereLutResolution, type IAtmosphereLutResolutions, type IAtmosphereOptions, type IAtmosphereParameterPatch, type IAtmosphereParameters, type IAtmosphereScenePass, type IBillboard3DOptions, type IBoneContactReport, type IBoneLengthDeviation, type IBoneLengthDeviationReport, type IBoneLengthDeviationsOptions, type IBoneLengthSnapshot, type IBonePoseError, type IBudgetLadderOptions, type IBudgetWindow, type IClipBindingReport, type IClipCoverageReport, type IClipPoseErrorOptions, type IClipPoseErrorReport, type IClipPoseSubject, type IClipTrackBinding, type IClusterTable, type IClusteredBatchBuildOptions, type IClusteredBatchOptions, type IClusteredMeshOptions, type IClusteredPlacement, IComputeDriven$1 as IComputeDriven, type IDaylightOptions, type IDevTools, type IEmitParticleRequest, type IFlightAxes, type IFlightControls, type IFlightDeck, type IFlightEnvironment, type IFlightForces, type IFlightModelOptions, type IFlightModifiers, type IFlightQuaternion, type IFlightState, type IFlightVector3, type IFluidBounds, type IFluidCollider, type IFluidFieldOptions, type IFluidFieldSampler, type IFluidFieldVector2, type IFluidParticlesOptions, type IFluidParticlesStats, IFrameBudgetWindow, type IGIBudgetOptions, type IGIBudgetReport, type IGPUParticles3DOptions, type IGPUParticles3DRuntime, type IGPUParticles3DSpawnBuffers, type IGPUParticles3DSpawnRequest, type IGPUParticles3DStats, IGPUReadbackSample, type IGPUSceneBVHMaterialGroup, type IGPUSceneBVHOptions, IGamePluginHooks, IGamePluginRuntime, IGeometryCaptureReport, IGeometryCaptureRequest, type IGrassField3DOptions, type IGrassFieldBlade, type IGrassFieldBounds, type IGrassFieldNodes, type IGrassFieldStats, type IGroundSnapOptions, type IInstancedBatchBuildOptions, type IInstancedBatchOptions, type IInstancedPlacement, type ILampShadowStats, type ILaunchFailure, type ILoadAllOptions, type ILoadAllProgress, type IMatrixWorldReport, type IMeasureThreePoseOptions, type IMergeByMaterialOptions, type IMergePart, type IMergePartsOptions, type INormaliseToMetresOptions, type IPathFollow3DOptions, type IPathFollow3DProjection, type IPathFollow3DSample, type IProbeVolumeBakeProgress, type IProbeVolumeCoefficient, type IProbeVolumeObservation, type IProbeVolumeOptions, type IRadianceCacheOptions, type IReplayOptions, type IReplayRecording, type IReplayRecordingSample, type IResolvedAtmosphereParameters, type IRippleFieldFlow, type IRippleFieldOptions, type IScatterField3DOptions, type IScatterFieldBounds, type IScatterFieldStats, type IScatterPart, type IScatterPlacement, type IScatterPoint, type ISceneShape, type ISceneWarning, type IScreenProbeCamera, type IScreenProbeGatherOptions, type IScreenProbeGatherReport, type IShadowFilterBudgetOptions, type IShadowFilterReport, type IShortRangeAOCamera, type IShortRangeAOOptions, type IShortRangeAOReport, type ISkeletalMesh3DOptions, type ISkyCaptureOptions, type ISoftBody3DOptions, type ISoftBodyCollision, type ISolarPosition, type ISolarPositionInput, type ISourceAngleShadowInputs, type ISourceAngleShadowOptions, type ISpanProbeTarget, type ISpanSummary, type ISpanWindow, type ISpectralOceanCascade, type ISpectralOceanHeight, type ISpectralOceanOptions, type ISpriteAnimator3DOptions, type ISpriteFrame3D, IStageGpuReading, type IStaticTransformCensus, type IStrideReport, type ISurfaceCacheMaterial, type ISurfaceCacheOptions, type ISurfaceCacheReport, type ISurfaceCacheTexture, type ISurfaceLight, type ISurfaceLightsOptions, type IThreePoseBounds, type IThreePoseMeasurement, type ITracerPool3DOptions, type ITracerSpawnOptions, type IUnlitFoliageWarning, type IValidationReport, type IVirtualShadowOptions, type IVirtualShadowStats, type IWaterReflectionOptions, type IWaterSurfaceOptions, type IWaveFieldDomainWarp, type IWaveFieldGraphOptions, type IWaveFieldOptions, type IWaveFieldSample, type IWaveFieldWave, InstancedBatch, LAMP_SHADOW_MARKER, LUT_RESOLUTIONS, type LaunchFailureKind, type MatrixWorldMode, MatrixWorldPass, NEUTRAL_FLIGHT_MODIFIERS, type NormaliseAxis, OPACITY_IGNORED_MARKER, PROBE_VOLUME_MARKER, PathFollow3D, ProbeVolume, type ProbeVolumeDensity, RENDERLIST_VALIDATE_FLAG, RENDERLIST_VALIDATE_MARKER, RadianceCache, type Recording, RenderListValidator, type ReplayPointer, RippleField, SCENE_WARNING_MARKER, SHADOW_FILTER_TIERS, SHADOW_STAGES, SPANS, SPANS_FLAG, SPANS_MARKER, SPAN_COUNT, SPAN_NAMES, STATIC_TRANSFORM_MARKER, ScatterField3D, ScreenProbeGather, type ScreenProbePass, ShadowFilterBudget, type ShadowFilterTier, ShortRangeAO, SkeletalMesh3D, SkyCapture, SkyCaptureSchedule, SoftBody3D, type SpanId, SpanRecorder, SpectralOcean, SpriteAnimator3D, type SpritePlaybackMode, SurfaceCache, SurfaceLights, type ThreePoseQuaternion, type ThreePoseVector, TracedReflections, TracerPool3D, UNLIT_FOLIAGE_FIX, UNLIT_FOLIAGE_MARKER, VIRTUAL_SHADOW_CASTER_LAYER, VIRTUAL_SHADOW_MARKER, VIRTUAL_SHADOW_MOVER_LAYER, VIRTUAL_SHADOW_WIDE_CASTER_LAYER, VirtualShadowNode, WaterSurface3D, type WaveDirection, WaveField, addFoliageBackLight, addInSlices, addSpan, aerodynamicCoefficients, airDensity, aircraftMass, alwaysRender, attachToBone, attitudeAxes, beginSpan, boneContact, boneLengthDeviations, boneLengths, bvhIntersectFirstHit, clipBoneCoverage, clipPoseError, clipTrackBindings, createReplayDriver, debugFlag, debugValue, describeSceneShape, describeSceneWarning, devGlobal, directionFromSolarPosition, directionalTransmittance, displayPeriodMs, endSpan, ev100FromCamera, ev100FromExposure, ev100FromLuminance, exposeDebug, exposureFromEv100, formatSceneWarning, formatSpansWindow, formatUnlitFoliageWarning, formatValidationReport, gearClearance, installSpanProbes, invalidateStatic, isStatic, lampPenumbraTangent, lampShadowMarker, loadAll, lookDiagnostics, markStatic, measureThreePose, mergeByMaterial, mergeParts, normaliseToMetres, onLaunchFailure, parseReplayRecording, penumbraUv, posedBounds, publishDevGlobal, rayStruct, readGIMarker, readLampShadowMarker, readProbeVolumeObservation, readShadowTierMarker, readVirtualShadowMarker, refreshStaticTransforms, renderListValidationRequested, renderTrapAudit, replay, resetStaticTransforms, resolveAtmosphereLutResolutions, resolveAtmosphereParameters, sceneWarning, setAttitude, setSpanRecorder, skeletonBones, softCircleDataTexture, solarPosition, solarPositionAt, sourceAngleShadowFilter, sourceRadiusShadowFilter, spanNow, spanRecorder, spansRequested, staticTransformCensus, thinCards, unlitFoliageWarning, unmarkStatic, updateAtmosphereParameters, updateClusteredMeshes, useRoughDiffuse, validateWorldMatrices, version, zenithTransmittance };