@onerjs/core 8.54.4 → 8.54.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.
Files changed (234) hide show
  1. package/Engines/Native/nativeHelpers.js +5 -0
  2. package/Engines/Native/nativeHelpers.js.map +1 -1
  3. package/Engines/WebGPU/Extensions/engine.cubeTexture.pure.js +1 -1
  4. package/Engines/WebGPU/Extensions/engine.cubeTexture.pure.js.map +1 -1
  5. package/Engines/WebGPU/Extensions/engine.rawTexture.pure.js +2 -2
  6. package/Engines/WebGPU/Extensions/engine.rawTexture.pure.js.map +1 -1
  7. package/Engines/WebGPU/webgpuCacheRenderPipeline.d.ts +1 -0
  8. package/Engines/WebGPU/webgpuCacheRenderPipeline.js +18 -4
  9. package/Engines/WebGPU/webgpuCacheRenderPipeline.js.map +1 -1
  10. package/Engines/WebGPU/webgpuCacheTextureView.d.ts +13 -0
  11. package/Engines/WebGPU/webgpuCacheTextureView.js +32 -0
  12. package/Engines/WebGPU/webgpuCacheTextureView.js.map +1 -0
  13. package/Engines/WebGPU/webgpuRenderTargetWrapper.d.ts +10 -0
  14. package/Engines/WebGPU/webgpuRenderTargetWrapper.js +10 -0
  15. package/Engines/WebGPU/webgpuRenderTargetWrapper.js.map +1 -1
  16. package/Engines/WebGPU/webgpuShaderProcessorsWGSL.pure.js +57 -4
  17. package/Engines/WebGPU/webgpuShaderProcessorsWGSL.pure.js.map +1 -1
  18. package/Engines/WebGPU/webgpuTextureManager.d.ts +1 -1
  19. package/Engines/WebGPU/webgpuTextureManager.js +4 -2
  20. package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
  21. package/Engines/abstractEngine.pure.js +2 -2
  22. package/Engines/abstractEngine.pure.js.map +1 -1
  23. package/Engines/engineCapabilities.d.ts +5 -0
  24. package/Engines/engineCapabilities.js.map +1 -1
  25. package/Engines/thinNativeEngine.pure.d.ts +5 -0
  26. package/Engines/thinNativeEngine.pure.js +52 -10
  27. package/Engines/thinNativeEngine.pure.js.map +1 -1
  28. package/Engines/webgpuEngine.pure.d.ts +1 -0
  29. package/Engines/webgpuEngine.pure.js +22 -8
  30. package/Engines/webgpuEngine.pure.js.map +1 -1
  31. package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.pure.d.ts +95 -1
  32. package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.pure.js +169 -4
  33. package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.pure.js.map +1 -1
  34. package/FlowGraph/Blocks/Data/Math/flowGraphMathCombineExtractBlocks.pure.d.ts +21 -6
  35. package/FlowGraph/Blocks/Data/Math/flowGraphMathCombineExtractBlocks.pure.js +28 -26
  36. package/FlowGraph/Blocks/Data/Math/flowGraphMathCombineExtractBlocks.pure.js.map +1 -1
  37. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.pure.d.ts +30 -2
  38. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.pure.js +111 -29
  39. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.pure.js.map +1 -1
  40. package/FlowGraph/Blocks/Data/Math/flowGraphVectorMathBlocks.pure.d.ts +56 -2
  41. package/FlowGraph/Blocks/Data/Math/flowGraphVectorMathBlocks.pure.js +99 -14
  42. package/FlowGraph/Blocks/Data/Math/flowGraphVectorMathBlocks.pure.js.map +1 -1
  43. package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.js +10 -2
  44. package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.js.map +1 -1
  45. package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.pure.js +21 -1
  46. package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.pure.js.map +1 -1
  47. package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.d.ts +18 -0
  48. package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.js +29 -2
  49. package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.js.map +1 -1
  50. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.pure.d.ts +15 -0
  51. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.pure.js +44 -7
  52. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.pure.js.map +1 -1
  53. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.pure.d.ts +9 -0
  54. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.pure.js +9 -1
  55. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.pure.js.map +1 -1
  56. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.d.ts +7 -0
  57. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.js +8 -1
  58. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.js.map +1 -1
  59. package/FlowGraph/Blocks/Event/flowGraphStopEventPropagationBlock.d.ts +5 -0
  60. package/FlowGraph/Blocks/Event/flowGraphStopEventPropagationBlock.js +8 -0
  61. package/FlowGraph/Blocks/Event/flowGraphStopEventPropagationBlock.js.map +1 -0
  62. package/FlowGraph/Blocks/Event/flowGraphStopEventPropagationBlock.pure.d.ts +37 -0
  63. package/FlowGraph/Blocks/Event/flowGraphStopEventPropagationBlock.pure.js +44 -0
  64. package/FlowGraph/Blocks/Event/flowGraphStopEventPropagationBlock.pure.js.map +1 -0
  65. package/FlowGraph/Blocks/Event/index.d.ts +1 -0
  66. package/FlowGraph/Blocks/Event/index.js +1 -0
  67. package/FlowGraph/Blocks/Event/index.js.map +1 -1
  68. package/FlowGraph/Blocks/Event/pure.d.ts +1 -0
  69. package/FlowGraph/Blocks/Event/pure.js +1 -0
  70. package/FlowGraph/Blocks/Event/pure.js.map +1 -1
  71. package/FlowGraph/Blocks/Execution/Animation/flowGraphBezierCurveEasingBlock.pure.d.ts +4 -1
  72. package/FlowGraph/Blocks/Execution/Animation/flowGraphBezierCurveEasingBlock.pure.js +67 -2
  73. package/FlowGraph/Blocks/Execution/Animation/flowGraphBezierCurveEasingBlock.pure.js.map +1 -1
  74. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.d.ts +13 -0
  75. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.js +102 -7
  76. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.js.map +1 -1
  77. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.pure.js +5 -1
  78. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.pure.js.map +1 -1
  79. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.js +5 -1
  80. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.js.map +1 -1
  81. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.pure.d.ts +11 -2
  82. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.pure.js +21 -3
  83. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.pure.js.map +1 -1
  84. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSetDelayBlock.pure.js +25 -4
  85. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSetDelayBlock.pure.js.map +1 -1
  86. package/FlowGraph/Blocks/flowGraphBlockFactory.js +18 -0
  87. package/FlowGraph/Blocks/flowGraphBlockFactory.js.map +1 -1
  88. package/FlowGraph/Blocks/flowGraphBlockNames.d.ts +9 -0
  89. package/FlowGraph/Blocks/flowGraphBlockNames.js +9 -0
  90. package/FlowGraph/Blocks/flowGraphBlockNames.js.map +1 -1
  91. package/FlowGraph/CustomTypes/flowGraphMatrix.d.ts +17 -3
  92. package/FlowGraph/CustomTypes/flowGraphMatrix.js +27 -21
  93. package/FlowGraph/CustomTypes/flowGraphMatrix.js.map +1 -1
  94. package/FlowGraph/flowGraphContext.d.ts +23 -0
  95. package/FlowGraph/flowGraphContext.js +29 -0
  96. package/FlowGraph/flowGraphContext.js.map +1 -1
  97. package/FlowGraph/flowGraphCoordinator.d.ts +58 -1
  98. package/FlowGraph/flowGraphCoordinator.js +72 -0
  99. package/FlowGraph/flowGraphCoordinator.js.map +1 -1
  100. package/FlowGraph/flowGraphDelayRegistry.d.ts +31 -0
  101. package/FlowGraph/flowGraphDelayRegistry.js +50 -0
  102. package/FlowGraph/flowGraphDelayRegistry.js.map +1 -0
  103. package/FlowGraph/flowGraphHostResolver.d.ts +69 -0
  104. package/FlowGraph/flowGraphHostResolver.js +25 -0
  105. package/FlowGraph/flowGraphHostResolver.js.map +1 -0
  106. package/FlowGraph/flowGraphMath.d.ts +48 -1
  107. package/FlowGraph/flowGraphMath.js +169 -4
  108. package/FlowGraph/flowGraphMath.js.map +1 -1
  109. package/FlowGraph/flowGraphPathConverterComponent.d.ts +14 -3
  110. package/FlowGraph/flowGraphPathConverterComponent.js +110 -18
  111. package/FlowGraph/flowGraphPathConverterComponent.js.map +1 -1
  112. package/FlowGraph/flowGraphSignalConnection.pure.js +7 -1
  113. package/FlowGraph/flowGraphSignalConnection.pure.js.map +1 -1
  114. package/FlowGraph/index.d.ts +2 -0
  115. package/FlowGraph/index.js +2 -0
  116. package/FlowGraph/index.js.map +1 -1
  117. package/FlowGraph/pure.d.ts +2 -0
  118. package/FlowGraph/pure.js +2 -0
  119. package/FlowGraph/pure.js.map +1 -1
  120. package/Materials/Node/nodeMaterial.pure.d.ts +3 -1
  121. package/Materials/Node/nodeMaterial.pure.js +18 -1
  122. package/Materials/Node/nodeMaterial.pure.js.map +1 -1
  123. package/Materials/Textures/envCubeTexture.pure.js +7 -2
  124. package/Materials/Textures/envCubeTexture.pure.js.map +1 -1
  125. package/Materials/materialHelper.functions.d.ts +14 -0
  126. package/Materials/materialHelper.functions.js +67 -0
  127. package/Materials/materialHelper.functions.js.map +1 -1
  128. package/Maths/math.vector.pure.d.ts +11 -1
  129. package/Maths/math.vector.pure.js +13 -0
  130. package/Maths/math.vector.pure.js.map +1 -1
  131. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.d.ts +216 -1
  132. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +714 -67
  133. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
  134. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +81 -4
  135. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +466 -52
  136. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
  137. package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.d.ts +19 -0
  138. package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.js +24 -0
  139. package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.js.map +1 -1
  140. package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.js +31 -6
  141. package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.js.map +1 -1
  142. package/Meshes/GreasedLine/greasedLineRibbonMesh.pure.js +5 -1
  143. package/Meshes/GreasedLine/greasedLineRibbonMesh.pure.js.map +1 -1
  144. package/Meshes/abstractMesh.pure.js +1 -0
  145. package/Meshes/abstractMesh.pure.js.map +1 -1
  146. package/Meshes/mesh.pure.js +5 -0
  147. package/Meshes/mesh.pure.js.map +1 -1
  148. package/Meshes/transformNode.pure.js +1 -0
  149. package/Meshes/transformNode.pure.js.map +1 -1
  150. package/Misc/areaLightsTextureTools.js +1 -1
  151. package/Misc/areaLightsTextureTools.js.map +1 -1
  152. package/Misc/greasedLineTools.js +1 -1
  153. package/Misc/greasedLineTools.js.map +1 -1
  154. package/Misc/tools.pure.js +14 -2
  155. package/Misc/tools.pure.js.map +1 -1
  156. package/Particles/gpuParticleSystem.pure.d.ts +66 -1
  157. package/Particles/gpuParticleSystem.pure.js +189 -49
  158. package/Particles/gpuParticleSystem.pure.js.map +1 -1
  159. package/Physics/v2/characterController.js +69 -17
  160. package/Physics/v2/characterController.js.map +1 -1
  161. package/PostProcesses/RenderPipeline/Pipelines/fsr1RenderingPipeline.d.ts +79 -0
  162. package/PostProcesses/RenderPipeline/Pipelines/fsr1RenderingPipeline.js +171 -0
  163. package/PostProcesses/RenderPipeline/Pipelines/fsr1RenderingPipeline.js.map +1 -0
  164. package/PostProcesses/RenderPipeline/Pipelines/index.d.ts +5 -0
  165. package/PostProcesses/RenderPipeline/Pipelines/index.js +6 -0
  166. package/PostProcesses/RenderPipeline/Pipelines/index.js.map +1 -1
  167. package/PostProcesses/RenderPipeline/Pipelines/pure.d.ts +1 -0
  168. package/PostProcesses/RenderPipeline/Pipelines/pure.js +1 -0
  169. package/PostProcesses/RenderPipeline/Pipelines/pure.js.map +1 -1
  170. package/PostProcesses/thinFSR1SharpenPostProcess.d.ts +32 -0
  171. package/PostProcesses/thinFSR1SharpenPostProcess.js +58 -0
  172. package/PostProcesses/thinFSR1SharpenPostProcess.js.map +1 -0
  173. package/PostProcesses/thinFSR1UpscalePostProcess.d.ts +37 -0
  174. package/PostProcesses/thinFSR1UpscalePostProcess.js +68 -0
  175. package/PostProcesses/thinFSR1UpscalePostProcess.js.map +1 -0
  176. package/Shaders/ShadersInclude/ffxFunctions.d.ts +5 -0
  177. package/Shaders/ShadersInclude/ffxFunctions.js +18 -0
  178. package/Shaders/ShadersInclude/ffxFunctions.js.map +1 -0
  179. package/Shaders/ShadersInclude/hdrFilteringFunctions.js +2 -2
  180. package/Shaders/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
  181. package/Shaders/ShadersInclude/openpbrIblFunctions.js +1 -6
  182. package/Shaders/ShadersInclude/openpbrIblFunctions.js.map +1 -1
  183. package/Shaders/fsr1Sharpen.fragment.d.ts +5 -0
  184. package/Shaders/fsr1Sharpen.fragment.js +26 -0
  185. package/Shaders/fsr1Sharpen.fragment.js.map +1 -0
  186. package/Shaders/fsr1Upscale.fragment.d.ts +5 -0
  187. package/Shaders/fsr1Upscale.fragment.js +77 -0
  188. package/Shaders/fsr1Upscale.fragment.js.map +1 -0
  189. package/ShadersWGSL/ShadersInclude/ffxFunctions.d.ts +5 -0
  190. package/ShadersWGSL/ShadersInclude/ffxFunctions.js +18 -0
  191. package/ShadersWGSL/ShadersInclude/ffxFunctions.js.map +1 -0
  192. package/ShadersWGSL/fsr1Sharpen.fragment.d.ts +5 -0
  193. package/ShadersWGSL/fsr1Sharpen.fragment.js +34 -0
  194. package/ShadersWGSL/fsr1Sharpen.fragment.js.map +1 -0
  195. package/ShadersWGSL/fsr1Upscale.fragment.d.ts +5 -0
  196. package/ShadersWGSL/fsr1Upscale.fragment.js +68 -0
  197. package/ShadersWGSL/fsr1Upscale.fragment.js.map +1 -0
  198. package/XR/features/Layers/WebXRWebGPUCompositionLayer.d.ts +3 -9
  199. package/XR/features/Layers/WebXRWebGPUCompositionLayer.js +4 -11
  200. package/XR/features/Layers/WebXRWebGPUCompositionLayer.js.map +1 -1
  201. package/XR/features/WebXRAbstractFeature.d.ts +9 -0
  202. package/XR/features/WebXRAbstractFeature.js +16 -0
  203. package/XR/features/WebXRAbstractFeature.js.map +1 -1
  204. package/XR/features/WebXRDepthSensing.pure.d.ts +7 -0
  205. package/XR/features/WebXRDepthSensing.pure.js +350 -39
  206. package/XR/features/WebXRDepthSensing.pure.js.map +1 -1
  207. package/XR/features/WebXRImageTracking.pure.js.map +1 -1
  208. package/XR/features/WebXRLayers.pure.d.ts +6 -5
  209. package/XR/features/WebXRLayers.pure.js +65 -8
  210. package/XR/features/WebXRLayers.pure.js.map +1 -1
  211. package/XR/features/WebXRRawCameraAccess.pure.js +9 -2
  212. package/XR/features/WebXRRawCameraAccess.pure.js.map +1 -1
  213. package/XR/features/WebXRSpaceWarp.pure.d.ts +0 -1
  214. package/XR/features/WebXRSpaceWarp.pure.js +13 -4
  215. package/XR/features/WebXRSpaceWarp.pure.js.map +1 -1
  216. package/XR/features/WebXRWalkingLocomotion.pure.js.map +1 -1
  217. package/XR/webXRCamera.js +27 -0
  218. package/XR/webXRCamera.js.map +1 -1
  219. package/XR/webXRFeatureWarningRegistry.d.ts +14 -0
  220. package/XR/webXRFeatureWarningRegistry.js +19 -0
  221. package/XR/webXRFeatureWarningRegistry.js.map +1 -0
  222. package/XR/webXRFeaturesManager.d.ts +5 -0
  223. package/XR/webXRFeaturesManager.js +23 -4
  224. package/XR/webXRFeaturesManager.js.map +1 -1
  225. package/XR/webXRGraphicsBinding.d.ts +17 -10
  226. package/XR/webXRGraphicsBinding.js +8 -5
  227. package/XR/webXRGraphicsBinding.js.map +1 -1
  228. package/XR/webXRSessionManager.d.ts +3 -5
  229. package/XR/webXRSessionManager.js +1 -3
  230. package/XR/webXRSessionManager.js.map +1 -1
  231. package/XR/webXRWebGPURenderTargetTextureProvider.d.ts +21 -5
  232. package/XR/webXRWebGPURenderTargetTextureProvider.js +38 -10
  233. package/XR/webXRWebGPURenderTargetTextureProvider.js.map +1 -1
  234. package/package.json +1 -1
@@ -4,7 +4,8 @@ import { type Scene } from "../../scene.pure.js";
4
4
  import { Matrix, Vector3 } from "../../Maths/math.vector.pure.js";
5
5
  import { type Vector2 } from "../../Maths/math.vector.js";
6
6
  import { type Effect } from "../../Materials/effect.pure.js";
7
- import { GaussianSplattingMeshBase } from "./gaussianSplattingMeshBase.pure.js";
7
+ import { GaussianSplattingMeshBase, type IGaussianSplattingSplatRange } from "./gaussianSplattingMeshBase.pure.js";
8
+ import { type MultiRenderTarget } from "../../Materials/Textures/multiRenderTarget.pure.js";
8
9
  import { GaussianSplattingPartProxyMesh } from "./gaussianSplattingPartProxyMesh.pure.js";
9
10
  import { BoundingInfo } from "../../Culling/boundingInfo.js";
10
11
  import { type BaseTexture } from "../../Materials/Textures/baseTexture.pure.js";
@@ -19,6 +20,105 @@ interface IGaussianSplattingPartSource {
19
20
  getWorldMatrix(): Matrix;
20
21
  getBoundingInfo(): BoundingInfo;
21
22
  dispose(): void;
23
+ /**
24
+ * When true this is a placeholder that reserves `_vertexCount` empty (invisible) splats in the
25
+ * atlas instead of copying real data. Used by {@link GaussianSplattingMesh.reserveStreamingPart}
26
+ * so a streaming engine can later GPU-decode into the reserved region. Sources flagged this way
27
+ * are allowed to have a null `_splatsData`; their atlas region is left zeroed (invisible padding).
28
+ */
29
+ _isReservedEmpty?: boolean;
30
+ }
31
+ /**
32
+ * Handle to a region of a compound Gaussian Splatting mesh reserved for dynamic (streamed) content by
33
+ * {@link GaussianSplattingMesh.reserveStreamingPart}. It lets a streaming engine populate the region's
34
+ * splats over time and drive which of them are sorted/rendered, while the compound keeps depth-sorting
35
+ * and drawing every part (static + streamed) together in one pass.
36
+ *
37
+ * Ranges/offsets passed to this handle are LOCAL to the part (0-based within `[0, capacity)`); the handle
38
+ * translates them to the compound's global atlas coordinates.
39
+ */
40
+ export interface IGaussianSplattingStreamingPart {
41
+ /** The proxy mesh controlling this part's world transform and visibility. */
42
+ readonly proxy: GaussianSplattingPartProxyMesh;
43
+ /** The part index assigned to this streaming region in the compound. */
44
+ readonly partIndex: number;
45
+ /** First atlas splat index of the reserved region. */
46
+ readonly base: number;
47
+ /** Number of splats reserved for the region. */
48
+ readonly capacity: number;
49
+ /** The compound's shared centers texture (the region occupies `[base, base+capacity)` within it). */
50
+ readonly centersTexture: Nullable<BaseTexture>;
51
+ /** The compound's shared covariance A texture. */
52
+ readonly covariancesATexture: Nullable<BaseTexture>;
53
+ /** The compound's shared covariance B texture. */
54
+ readonly covariancesBTexture: Nullable<BaseTexture>;
55
+ /** The compound's shared colors texture. */
56
+ readonly colorsTexture: Nullable<BaseTexture>;
57
+ /** The compound's shared CPU centers buffer consumed by the sort worker. */
58
+ readonly splatPositions: Nullable<Float32Array>;
59
+ /** The compound's shared render-target atlas a streaming engine decodes into, or null on a non-GPU backend. */
60
+ readonly mrtAtlas: Nullable<MultiRenderTarget>;
61
+ /**
62
+ * The compound's shared higher-order SH render-target atlas (one single-attachment integer MRT per packed-u32
63
+ * SH texture) a streaming engine bakes SH into, or null when SH decode was not requested for this part.
64
+ */
65
+ readonly shMrtAtlas: Nullable<MultiRenderTarget[]>;
66
+ /**
67
+ * The compound's shared rotation/scale render-target atlas (one 3-attachment half-float MRT) a streaming engine
68
+ * decodes rotation/scale into for voxel-IBL shadows, or null when rotation decode was not requested for this part.
69
+ */
70
+ readonly rotMrtAtlas: Nullable<MultiRenderTarget>;
71
+ /** Width (in texels) of the atlas, used to address decode/readback over the wide layout. */
72
+ readonly atlasWidth: number;
73
+ /** Whether the compound's shared depth sort is settled (a streaming engine polls this to detect readiness). */
74
+ readonly isDepthSortSettled: boolean;
75
+ /**
76
+ * Restricts which of this part's splats are sorted/rendered, in LOCAL coordinates. `null` renders the
77
+ * whole reserved region. The compound merges this with every other part's ranges into the single sort.
78
+ * @param localRanges active local ranges, or `null` for the full region
79
+ */
80
+ setActiveRanges(localRanges: Nullable<readonly IGaussianSplattingSplatRange[]>): void;
81
+ /**
82
+ * CPU-decodes raw `.splat` bytes into the region at `localOffset`, uploading only those texels and
83
+ * patching the sort worker. Grows the part's bounding info to include the written centers. This is the
84
+ * CPU population path (used to seed the region or as a fallback when GPU decode is unavailable).
85
+ * @param localOffset first local splat index to write
86
+ * @param count number of splats to write
87
+ * @param splatsData raw `.splat` bytes for `count` splats (stride 32)
88
+ */
89
+ writeSplats(localOffset: number, count: number, splatsData: ArrayBuffer | ArrayBufferView): void;
90
+ /**
91
+ * Patches only `[localOffset, localOffset+count)` of the worker's position buffer (for the GPU path,
92
+ * where texel data is written directly to the atlas and only the CPU centers are pushed to the worker).
93
+ * @param localOffset first local splat index
94
+ * @param count number of splats
95
+ */
96
+ postPositionsRange(localOffset: number, count: number): void;
97
+ /**
98
+ * Grows the part's (and compound's) bounding info to include the given local-space centers extent.
99
+ * @param min minimum corner
100
+ * @param max maximum corner
101
+ */
102
+ expandBounds(min: Vector3, max: Vector3): void;
103
+ /**
104
+ * Re-posts the full merged position + part-index set to the compound's sort worker. Only needed after a
105
+ * relayout moved the region's data wholesale; per-decode updates use {@link postPositionsRange} instead.
106
+ */
107
+ notifyDataChanged(): void;
108
+ /**
109
+ * Subscribes to the "about to recreate the shared atlas to grow it" event (e.g. another part is being added).
110
+ * The callback receives the OLD atlas and should back up this region's GPU-only data before it is disposed.
111
+ * @param callback invoked with the old atlas MRT
112
+ * @returns an unsubscribe function (call it on dispose)
113
+ */
114
+ onBeforeAtlasRebuild(callback: (oldAtlas: MultiRenderTarget) => void): () => void;
115
+ /**
116
+ * Subscribes to the "shared atlas has been recreated" event. The callback receives the NEW atlas and should
117
+ * rebind to it and restore this region's backed-up data.
118
+ * @param callback invoked with the new atlas MRT
119
+ * @returns an unsubscribe function (call it on dispose)
120
+ */
121
+ onAfterAtlasRebuild(callback: (newAtlas: MultiRenderTarget) => void): () => void;
22
122
  }
23
123
  /**
24
124
  * Class used to render a Gaussian Splatting mesh. Supports both single-cloud and compound
@@ -44,6 +144,31 @@ export declare class GaussianSplattingMesh extends GaussianSplattingMeshBase {
44
144
  * Visibility values for each part (0.0 to 1.0), indexed by part index.
45
145
  */
46
146
  protected _partVisibility: number[];
147
+ /**
148
+ * Per-part active source-splat range overrides, indexed by part index, in GLOBAL source-splat
149
+ * coordinates (offsets into the merged atlas). A part with no entry (undefined) renders its full
150
+ * range; a part with an entry renders only those ranges. Used by streaming parts to render just
151
+ * their currently-active LOD splats while static parts render fully. No overrides at all means no
152
+ * filter (the base renders every splat, preserving the non-streaming fast path).
153
+ */
154
+ private _partSplatRanges;
155
+ /**
156
+ * True once a streaming part has been reserved. A streamed region's data lives only on the GPU (no retained CPU
157
+ * source), so atlas rebuilds and part add/remove take the streaming-aware paths that back up and restore each
158
+ * region rather than regenerating it from a CPU source.
159
+ * @internal
160
+ */
161
+ protected _hasStreamingPart: boolean;
162
+ /** Mutable bookkeeping for each reserved streaming region, so {@link compactAtlas} can relocate them. */
163
+ private _streamingStates;
164
+ /**
165
+ * Max SH degree contributed by the live (non-tombstoned) streaming parts. Recomputed by
166
+ * {@link _refreshStreamingShState} whenever parts change, so removing the last SH stream turns the shared SH
167
+ * atlas off instead of leaving SH_DEGREE high over texels nothing refills.
168
+ */
169
+ private _streamingShDegree;
170
+ /** Part indices tombstoned by {@link removePart} while streaming — excluded from render, reclaimed by {@link compactAtlas}. */
171
+ private _tombstonedPartIndices;
47
172
  private _partIndicesTexture;
48
173
  private _partIndices;
49
174
  /** Gets the part indices texture used for compound rendering */
@@ -189,6 +314,34 @@ export declare class GaussianSplattingMesh extends GaussianSplattingMeshBase {
189
314
  * @param value the visibility value (0.0 to 1.0) to set
190
315
  */
191
316
  setPartVisibility(partIndex: number, value: number): void;
317
+ /**
318
+ * Restricts which source splats of a single part are sorted and rendered, in GLOBAL source-splat
319
+ * coordinates (offsets into the merged atlas). Static parts render fully by default; a streaming
320
+ * part uses this to render only its currently-active LOD splats. The compound recomputes the union
321
+ * of every part's active ranges and drives the single shared depth sort / draw with it, so all
322
+ * parts still sort together in one pass.
323
+ *
324
+ * Passing `null` clears the override for that part (it reverts to rendering its full range). When no
325
+ * part has an override, the compound clears the range filter entirely (renders every splat), which
326
+ * preserves the non-streaming fast path.
327
+ * @param partIndex index of the part to constrain
328
+ * @param ranges active global source-splat ranges for the part, or `null` to render the whole part
329
+ */
330
+ setPartSplatRanges(partIndex: number, ranges: Nullable<readonly IGaussianSplattingSplatRange[]>): void;
331
+ /**
332
+ * Recomputes the global active-range union across all parts and pushes it to the shared sort/draw
333
+ * via the base {@link setSplatIndexRanges}. When no part carries an override the filter is cleared
334
+ * (render everything). A part without an override contributes its full `[offset, count)` derived
335
+ * from its proxy; a part with an override contributes exactly those ranges.
336
+ */
337
+ private _refreshPartRangeUnion;
338
+ /**
339
+ * Sorts and merges adjacent/overlapping source-splat ranges so the interval list handed to the sort
340
+ * worker stays compact (parts occupy disjoint regions, so this mainly coalesces contiguous parts).
341
+ * @param ranges raw ranges
342
+ * @returns coalesced ranges sorted by offset
343
+ */
344
+ private static _CoalesceSplatRanges;
192
345
  protected _copyTextures(source: GaussianSplattingMeshBase): void;
193
346
  protected _onUpdateTextures(textureSize: Vector2): void;
194
347
  protected _updateSubTextures(splatPositions: Float32Array, covA: Uint16Array, covB: Uint16Array, colorArray: Uint8Array, lineStart: number, lineCount: number, sh?: Uint8Array[], partIndices?: Uint8Array): void;
@@ -224,15 +377,77 @@ export declare class GaussianSplattingMesh extends GaussianSplattingMeshBase {
224
377
  * @deprecated Use {@link GaussianSplattingCompoundMesh.addPart} instead.
225
378
  */
226
379
  addPart(other: GaussianSplattingMesh, disposeOther?: boolean): GaussianSplattingPartProxyMesh;
380
+ /**
381
+ * Recomputes the shared SH-atlas state ({@link _useShMrtAtlas}, {@link _shMrtAtlasTextureCount},
382
+ * {@link _streamingShDegree}) from the currently-live (non-tombstoned) streaming parts. Call before an atlas
383
+ * rebuild that follows a removal so a stale SH degree/count from a removed part can't keep the SH atlas active
384
+ * (and SH_DEGREE high) with nothing refilling the SH texels.
385
+ */
386
+ private _refreshStreamingShState;
387
+ /**
388
+ * Tombstones a part of a streaming compound: excludes it from the render union permanently and hides its
389
+ * proxy, leaving its atlas rows idle. Used instead of the compacting {@link removePart} rebuild whenever a
390
+ * streaming part is reserved — a streamed region has no retained CPU source and decodes at a FIXED base
391
+ * offset, so the rebuild can neither reconstruct it nor shift any part without desynchronizing the streaming
392
+ * engine. Every other part keeps its exact offset (no shift), so resident streams keep decoding at their base.
393
+ * The empty `[]` override survives future add-driven rebuilds, so the region stays invisible even though its
394
+ * texels get rebuilt; memory is only reclaimed by disposing/recreating the whole compound.
395
+ * @param index the part index to tombstone
396
+ */
397
+ private _tombstonePart;
398
+ /**
399
+ * Tears the compound down to an empty state so a subsequent {@link _addPartsInternal} recreates fresh GPU
400
+ * textures. Shared by {@link removePart} (compacting rebuild) and {@link compactAtlas}. Does NOT dispose the
401
+ * part proxies — callers dispose only the proxies being removed and reuse the survivors' proxy objects.
402
+ * @internal
403
+ */
404
+ protected _resetForRebuild(): void;
405
+ /**
406
+ * Reclaims the atlas rows of parts removed (tombstoned) while a streaming part was resident. `removePart`
407
+ * on a streaming compound only tombstones — it excludes the part from the render union and hides its proxy,
408
+ * but leaves its rows allocated, since compacting them would relocate the still-resident streaming regions.
409
+ * This method performs that compaction: it rebuilds the shared atlas from the LIVE parts at new, contiguous
410
+ * (row-aligned for streaming) offsets, physically relocating each surviving streaming region's GPU texels,
411
+ * CPU sort positions, and decode/render base offset, and drops the tombstoned rows — shrinking the atlas.
412
+ *
413
+ * Call it after removing one or more models to actually free the GPU/CPU memory (e.g. on idle, or once a
414
+ * batch of removals settles). No-op when nothing is tombstoned. Safe while streams are actively decoding:
415
+ * each surviving region is backed up before the old atlas is disposed and restored at its new base after.
416
+ */
417
+ compactAtlas(): void;
227
418
  /**
228
419
  * Remove a part from this compound mesh.
229
420
  * The remaining parts are rebuilt directly from the compound mesh's retained source buffers.
230
421
  * The current mesh is reset to a plain (single-part) state and then each remaining source is
231
422
  * re-added via addParts.
423
+ * When a streaming part is reserved the part is tombstoned instead of compacted (see {@link _tombstonePart}).
232
424
  * @param index - The index of the part to remove
233
425
  * @deprecated Use {@link GaussianSplattingCompoundMesh.removePart} instead.
234
426
  */
235
427
  removePart(index: number): void;
428
+ /**
429
+ * Reserves a contiguous region of `capacity` splats in the compound as a new part for dynamic (streamed)
430
+ * content. Unlike {@link addPart}, no source data is copied: the region is created as invisible padding
431
+ * (zeroed) for a streaming engine to populate over time via the returned handle. The reserved part
432
+ * participates in the compound's single shared depth sort and draw exactly like a static part — it has a
433
+ * `partIndex`, a per-part world matrix (via its proxy), and a per-part visibility — so streamed splats are
434
+ * sorted and rendered together in one pass with the static parts.
435
+ *
436
+ * Add the streaming part LAST (after all static parts). The returned handle drives which of the region's
437
+ * splats render (LOD) and writes their data.
438
+ * @param capacity number of splats to reserve
439
+ * @param worldMatrix initial world matrix for the region's proxy (e.g. carrying a source's up-axis
440
+ * convention); defaults to identity
441
+ * @param name name for the region's proxy mesh
442
+ * @param shTextureCount number of packed-u32 higher-order SH textures to allocate as a shared render-target SH
443
+ * atlas the streaming engine bakes into (`ceil(coeffs*3/16)` for the stream's max SH degree); 0 = no SH
444
+ * @param shDegree SH degree of the streamed content (drives the compound's `SH_DEGREE`); ignored when
445
+ * `shTextureCount` is 0. The compound keeps the MAX SH degree across its parts.
446
+ * @param needsRotationScale when true, converts the compound's rotation/scale textures to a shared render-target
447
+ * half-float atlas the streaming engine decodes into, so the streamed splats participate in voxel-IBL shadows.
448
+ * @returns a handle used to populate and control the reserved region
449
+ */
450
+ reserveStreamingPart(capacity: number, worldMatrix?: Matrix, name?: string, shTextureCount?: number, shDegree?: number, needsRotationScale?: boolean): IGaussianSplattingStreamingPart;
236
451
  /**
237
452
  * Serialize current GaussianSplattingMesh
238
453
  * @param serializationObject defines the object which will receive the serialization data