@onerjs/core 9.0.0 → 9.0.1

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 (352) hide show
  1. package/Animations/animationGroup.pure.js.map +1 -1
  2. package/Cameras/targetCamera.pure.js +6 -1
  3. package/Cameras/targetCamera.pure.js.map +1 -1
  4. package/Engines/Native/nativeHardwareTexture.d.ts +8 -1
  5. package/Engines/Native/nativeHardwareTexture.js +7 -0
  6. package/Engines/Native/nativeHardwareTexture.js.map +1 -1
  7. package/Engines/Native/nativeHelpers.js +56 -1
  8. package/Engines/Native/nativeHelpers.js.map +1 -1
  9. package/Engines/Native/nativeInterfaces.d.ts +37 -8
  10. package/Engines/Native/nativeInterfaces.js.map +1 -1
  11. package/Engines/Native/nativeRenderTargetWrapper.d.ts +40 -0
  12. package/Engines/Native/nativeRenderTargetWrapper.js +265 -5
  13. package/Engines/Native/nativeRenderTargetWrapper.js.map +1 -1
  14. package/Engines/Processors/shaderCodeCursor.d.ts +1 -0
  15. package/Engines/Processors/shaderCodeCursor.js +40 -3
  16. package/Engines/Processors/shaderCodeCursor.js.map +1 -1
  17. package/Engines/WebGPU/Extensions/engine.renderTarget.pure.js +1 -0
  18. package/Engines/WebGPU/Extensions/engine.renderTarget.pure.js.map +1 -1
  19. package/Engines/abstractEngine.pure.d.ts +15 -1
  20. package/Engines/abstractEngine.pure.js +12 -4
  21. package/Engines/abstractEngine.pure.js.map +1 -1
  22. package/Engines/engine.pure.d.ts +0 -1
  23. package/Engines/engine.pure.js +0 -7
  24. package/Engines/engine.pure.js.map +1 -1
  25. package/Engines/nativeEngine.pure.js +1 -1
  26. package/Engines/nativeEngine.pure.js.map +1 -1
  27. package/Engines/thinEngine.pure.d.ts +1 -0
  28. package/Engines/thinEngine.pure.js +13 -2
  29. package/Engines/thinEngine.pure.js.map +1 -1
  30. package/Engines/thinNativeEngine.pure.d.ts +217 -17
  31. package/Engines/thinNativeEngine.pure.js +1431 -164
  32. package/Engines/thinNativeEngine.pure.js.map +1 -1
  33. package/Engines/thinWebGPUEngine.js +6 -1
  34. package/Engines/thinWebGPUEngine.js.map +1 -1
  35. package/Engines/webgpuEngine.pure.d.ts +12 -1
  36. package/Engines/webgpuEngine.pure.js +8 -0
  37. package/Engines/webgpuEngine.pure.js.map +1 -1
  38. package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.d.ts +10 -0
  39. package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.js +24 -12
  40. package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.js.map +1 -1
  41. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.pure.d.ts +7 -0
  42. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.pure.js +43 -0
  43. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.pure.js.map +1 -1
  44. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.d.ts +16 -4
  45. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.js +20 -6
  46. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.js.map +1 -1
  47. package/FlowGraph/Blocks/Execution/Animation/flowGraphInterpolationBlock.pure.js +3 -3
  48. package/FlowGraph/Blocks/Execution/Animation/flowGraphInterpolationBlock.pure.js.map +1 -1
  49. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.d.ts +7 -7
  50. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.js +52 -35
  51. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.js.map +1 -1
  52. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.d.ts +12 -1
  53. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.js +8 -0
  54. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.js.map +1 -1
  55. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.pure.js +4 -1
  56. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.pure.js.map +1 -1
  57. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.pure.d.ts +12 -1
  58. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.pure.js +5 -1
  59. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.pure.js.map +1 -1
  60. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.pure.d.ts +2 -0
  61. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.pure.js +14 -2
  62. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.pure.js.map +1 -1
  63. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.pure.d.ts +5 -1
  64. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.pure.js +23 -8
  65. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.pure.js.map +1 -1
  66. package/FlowGraph/CustomTypes/flowGraphInteger.pure.d.ts +5 -0
  67. package/FlowGraph/CustomTypes/flowGraphInteger.pure.js +7 -0
  68. package/FlowGraph/CustomTypes/flowGraphInteger.pure.js.map +1 -1
  69. package/FlowGraph/CustomTypes/flowGraphMatrix.d.ts +10 -0
  70. package/FlowGraph/CustomTypes/flowGraphMatrix.js +14 -0
  71. package/FlowGraph/CustomTypes/flowGraphMatrix.js.map +1 -1
  72. package/FlowGraph/flowGraph.d.ts +2 -1
  73. package/FlowGraph/flowGraph.js +3 -2
  74. package/FlowGraph/flowGraph.js.map +1 -1
  75. package/FlowGraph/flowGraphAnimationHelpers.d.ts +24 -0
  76. package/FlowGraph/flowGraphAnimationHelpers.js +21 -0
  77. package/FlowGraph/flowGraphAnimationHelpers.js.map +1 -0
  78. package/FlowGraph/flowGraphContext.js +1 -0
  79. package/FlowGraph/flowGraphContext.js.map +1 -1
  80. package/FlowGraph/flowGraphValidator.js +0 -4
  81. package/FlowGraph/flowGraphValidator.js.map +1 -1
  82. package/FlowGraph/index.d.ts +2 -0
  83. package/FlowGraph/index.js +2 -0
  84. package/FlowGraph/index.js.map +1 -1
  85. package/FlowGraph/pure.d.ts +2 -0
  86. package/FlowGraph/pure.js +2 -0
  87. package/FlowGraph/pure.js.map +1 -1
  88. package/FlowGraph/serialization.d.ts +2 -2
  89. package/FlowGraph/serialization.js +2 -2
  90. package/FlowGraph/serialization.js.map +1 -1
  91. package/FlowGraph/typeDefinitions.d.ts +1 -1
  92. package/FlowGraph/typeDefinitions.js.map +1 -1
  93. package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.d.ts +1 -0
  94. package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.js +4 -0
  95. package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.js.map +1 -0
  96. package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.pure.d.ts +54 -0
  97. package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.pure.js +155 -0
  98. package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.pure.js.map +1 -0
  99. package/FrameGraph/Node/Blocks/Textures/pure.d.ts +1 -0
  100. package/FrameGraph/Node/Blocks/Textures/pure.js +1 -0
  101. package/FrameGraph/Node/Blocks/Textures/pure.js.map +1 -1
  102. package/FrameGraph/Node/Blocks/allBlocks.pure.js +2 -0
  103. package/FrameGraph/Node/Blocks/allBlocks.pure.js.map +1 -1
  104. package/FrameGraph/Node/Blocks/index.d.ts +1 -0
  105. package/FrameGraph/Node/Blocks/index.js +1 -0
  106. package/FrameGraph/Node/Blocks/index.js.map +1 -1
  107. package/FrameGraph/Node/Blocks/pure.d.ts +1 -0
  108. package/FrameGraph/Node/Blocks/pure.js +1 -0
  109. package/FrameGraph/Node/Blocks/pure.js.map +1 -1
  110. package/FrameGraph/Tasks/Misc/minMaxReducerTask.d.ts +62 -0
  111. package/FrameGraph/Tasks/Misc/minMaxReducerTask.js +159 -0
  112. package/FrameGraph/Tasks/Misc/minMaxReducerTask.js.map +1 -0
  113. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js +3 -1
  114. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js.map +1 -1
  115. package/FrameGraph/frameGraph.d.ts +4 -0
  116. package/FrameGraph/frameGraph.js +14 -0
  117. package/FrameGraph/frameGraph.js.map +1 -1
  118. package/FrameGraph/index.d.ts +1 -0
  119. package/FrameGraph/index.js +1 -0
  120. package/FrameGraph/index.js.map +1 -1
  121. package/FrameGraph/pure.d.ts +1 -0
  122. package/FrameGraph/pure.js +1 -0
  123. package/FrameGraph/pure.js.map +1 -1
  124. package/Inputs/scene.inputManager.js +1 -1
  125. package/Inputs/scene.inputManager.js.map +1 -1
  126. package/Lights/Clustered/clusteredLightingSceneComponent.pure.d.ts +5 -0
  127. package/Lights/Clustered/clusteredLightingSceneComponent.pure.js +22 -1
  128. package/Lights/Clustered/clusteredLightingSceneComponent.pure.js.map +1 -1
  129. package/Lights/Shadows/cascadedShadowGenerator.pure.js +7 -3
  130. package/Lights/Shadows/cascadedShadowGenerator.pure.js.map +1 -1
  131. package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.d.ts +7 -0
  132. package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.js +8 -0
  133. package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.js.map +1 -0
  134. package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.pure.d.ts +54 -0
  135. package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.pure.js +81 -0
  136. package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.pure.js.map +1 -0
  137. package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.d.ts +7 -0
  138. package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.js +8 -0
  139. package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.js.map +1 -0
  140. package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.pure.d.ts +60 -0
  141. package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.pure.js +90 -0
  142. package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.pure.js.map +1 -0
  143. package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.d.ts +31 -0
  144. package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.js +98 -0
  145. package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.js.map +1 -1
  146. package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js +1 -1
  147. package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js.map +1 -1
  148. package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js +2 -2
  149. package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js.map +1 -1
  150. package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.d.ts +1 -0
  151. package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.js +4 -0
  152. package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.js.map +1 -0
  153. package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.pure.d.ts +83 -0
  154. package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.pure.js +191 -0
  155. package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.pure.js.map +1 -0
  156. package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.d.ts +1 -0
  157. package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.js +4 -0
  158. package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.js.map +1 -0
  159. package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.pure.d.ts +62 -0
  160. package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.pure.js +125 -0
  161. package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.pure.js.map +1 -0
  162. package/Materials/GaussianSplatting/pure.d.ts +4 -0
  163. package/Materials/GaussianSplatting/pure.js +4 -0
  164. package/Materials/GaussianSplatting/pure.js.map +1 -1
  165. package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.d.ts +1 -0
  166. package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.js +12 -0
  167. package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.js.map +1 -1
  168. package/Materials/Textures/Procedurals/proceduralTexture.pure.d.ts +1 -0
  169. package/Materials/Textures/Procedurals/proceduralTexture.pure.js +31 -7
  170. package/Materials/Textures/Procedurals/proceduralTexture.pure.js.map +1 -1
  171. package/Materials/Textures/mirrorTexture.pure.js +3 -1
  172. package/Materials/Textures/mirrorTexture.pure.js.map +1 -1
  173. package/Materials/Textures/texture.pure.js +1 -1
  174. package/Materials/Textures/texture.pure.js.map +1 -1
  175. package/Materials/effectRenderer.pure.d.ts +4 -0
  176. package/Materials/effectRenderer.pure.js +3 -2
  177. package/Materials/effectRenderer.pure.js.map +1 -1
  178. package/Materials/index.d.ts +4 -0
  179. package/Materials/index.js +4 -0
  180. package/Materials/index.js.map +1 -1
  181. package/Materials/material.pure.js +25 -12
  182. package/Materials/material.pure.js.map +1 -1
  183. package/Materials/pure.d.ts +4 -0
  184. package/Materials/pure.js +4 -0
  185. package/Materials/pure.js.map +1 -1
  186. package/Materials/standardMaterial.pure.d.ts +8 -0
  187. package/Materials/standardMaterial.pure.js +24 -2
  188. package/Materials/standardMaterial.pure.js.map +1 -1
  189. package/Meshes/Builders/polygonBuilder.pure.js +1 -1
  190. package/Meshes/Builders/polygonBuilder.pure.js.map +1 -1
  191. package/Meshes/GaussianSplatting/gaussianPointSplattingController.d.ts +8 -0
  192. package/Meshes/GaussianSplatting/gaussianPointSplattingController.js +11 -0
  193. package/Meshes/GaussianSplatting/gaussianPointSplattingController.js.map +1 -0
  194. package/Meshes/GaussianSplatting/gaussianPointSplattingController.pure.d.ts +231 -0
  195. package/Meshes/GaussianSplatting/gaussianPointSplattingController.pure.js +1212 -0
  196. package/Meshes/GaussianSplatting/gaussianPointSplattingController.pure.js.map +1 -0
  197. package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.d.ts +14 -0
  198. package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.js +15 -0
  199. package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.js.map +1 -0
  200. package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.pure.d.ts +285 -0
  201. package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.pure.js +812 -0
  202. package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.pure.js.map +1 -0
  203. package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +1 -0
  204. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +2 -0
  205. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
  206. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.d.ts +160 -0
  207. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +219 -0
  208. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
  209. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +32 -4
  210. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +114 -21
  211. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
  212. package/Meshes/GaussianSplatting/pure.d.ts +2 -0
  213. package/Meshes/GaussianSplatting/pure.js +2 -0
  214. package/Meshes/GaussianSplatting/pure.js.map +1 -1
  215. package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js +25 -11
  216. package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js.map +1 -1
  217. package/Meshes/abstractMesh.pure.d.ts +12 -0
  218. package/Meshes/abstractMesh.pure.js +32 -0
  219. package/Meshes/abstractMesh.pure.js.map +1 -1
  220. package/Meshes/index.d.ts +1 -0
  221. package/Meshes/index.js +1 -0
  222. package/Meshes/index.js.map +1 -1
  223. package/Meshes/pure.d.ts +1 -0
  224. package/Meshes/pure.js +1 -0
  225. package/Meshes/pure.js.map +1 -1
  226. package/Meshes/subMesh.pure.d.ts +11 -2
  227. package/Meshes/subMesh.pure.js +20 -5
  228. package/Meshes/subMesh.pure.js.map +1 -1
  229. package/Meshes/thinInstanceMesh.pure.js +1 -0
  230. package/Meshes/thinInstanceMesh.pure.js.map +1 -1
  231. package/Misc/andOrNotEvaluator.js +4 -0
  232. package/Misc/andOrNotEvaluator.js.map +1 -1
  233. package/Misc/minMaxReducer.pure.d.ts +6 -0
  234. package/Misc/minMaxReducer.pure.js +10 -0
  235. package/Misc/minMaxReducer.pure.js.map +1 -1
  236. package/Misc/thinMinMaxReducer.d.ts +19 -2
  237. package/Misc/thinMinMaxReducer.js +74 -21
  238. package/Misc/thinMinMaxReducer.js.map +1 -1
  239. package/Misc/tools.pure.js +1 -1
  240. package/Misc/tools.pure.js.map +1 -1
  241. package/Particles/Node/Blocks/Update/updateNoiseBlock.pure.js +19 -7
  242. package/Particles/Node/Blocks/Update/updateNoiseBlock.pure.js.map +1 -1
  243. package/Particles/Node/Blocks/particleSourceTextureBlock.pure.js +3 -2
  244. package/Particles/Node/Blocks/particleSourceTextureBlock.pure.js.map +1 -1
  245. package/Particles/gpuParticleSystem.pure.d.ts +2 -0
  246. package/Particles/gpuParticleSystem.pure.js +12 -4
  247. package/Particles/gpuParticleSystem.pure.js.map +1 -1
  248. package/Particles/particle.js +3 -2
  249. package/Particles/particle.js.map +1 -1
  250. package/Particles/solidParticleSystem.js +7 -1
  251. package/Particles/solidParticleSystem.js.map +1 -1
  252. package/Particles/thinParticleSystem.function.d.ts +6 -0
  253. package/Particles/thinParticleSystem.function.js +144 -88
  254. package/Particles/thinParticleSystem.function.js.map +1 -1
  255. package/Particles/thinParticleSystem.pure.d.ts +6 -0
  256. package/Particles/thinParticleSystem.pure.js +70 -9
  257. package/Particles/thinParticleSystem.pure.js.map +1 -1
  258. package/Physics/v2/ragdoll.d.ts +2 -4
  259. package/Physics/v2/ragdoll.js +11 -4
  260. package/Physics/v2/ragdoll.js.map +1 -1
  261. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.d.ts +12 -0
  262. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js +43 -18
  263. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js.map +1 -1
  264. package/Rendering/depthRenderer.pure.d.ts +9 -0
  265. package/Rendering/depthRenderer.pure.js +12 -0
  266. package/Rendering/depthRenderer.pure.js.map +1 -1
  267. package/Rendering/fluidRenderer/fluidRenderingObject.d.ts +4 -0
  268. package/Rendering/fluidRenderer/fluidRenderingObject.js +6 -0
  269. package/Rendering/fluidRenderer/fluidRenderingObject.js.map +1 -1
  270. package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.d.ts +4 -0
  271. package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js +8 -0
  272. package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js.map +1 -1
  273. package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js +3 -0
  274. package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js.map +1 -1
  275. package/Rendering/geometryBufferRenderer.pure.js +4 -1
  276. package/Rendering/geometryBufferRenderer.pure.js.map +1 -1
  277. package/Rendering/prePassRenderer.pure.js +3 -3
  278. package/Rendering/prePassRenderer.pure.js.map +1 -1
  279. package/Shaders/ShadersInclude/gaussianSplatting.js +3 -1
  280. package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
  281. package/Shaders/ShadersInclude/lightsFragmentFunctions.js +27 -3
  282. package/Shaders/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
  283. package/Shaders/ShadersInclude/oitDeclaration.js +1 -1
  284. package/Shaders/ShadersInclude/oitDeclaration.js.map +1 -1
  285. package/Shaders/minmaxRedux.fragment.js +6 -1
  286. package/Shaders/minmaxRedux.fragment.js.map +1 -1
  287. package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.d.ts +5 -0
  288. package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.js +65 -0
  289. package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.js.map +1 -0
  290. package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.d.ts +5 -0
  291. package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.js +17 -0
  292. package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.js.map +1 -0
  293. package/ShadersWGSL/ShadersInclude/gaussianSplatting.d.ts +1 -0
  294. package/ShadersWGSL/ShadersInclude/gaussianSplatting.js +6 -78
  295. package/ShadersWGSL/ShadersInclude/gaussianSplatting.js.map +1 -1
  296. package/ShadersWGSL/ShadersInclude/gaussianSplattingFragmentDeclaration.js +2 -2
  297. package/ShadersWGSL/ShadersInclude/gaussianSplattingFragmentDeclaration.js.map +1 -1
  298. package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.d.ts +5 -0
  299. package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.js +79 -0
  300. package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.js.map +1 -0
  301. package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js +27 -3
  302. package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
  303. package/ShadersWGSL/gaussianPointSplattingBlit.fragment.d.ts +5 -0
  304. package/ShadersWGSL/gaussianPointSplattingBlit.fragment.js +22 -0
  305. package/ShadersWGSL/gaussianPointSplattingBlit.fragment.js.map +1 -0
  306. package/ShadersWGSL/gaussianPointSplattingBlit.vertex.d.ts +5 -0
  307. package/ShadersWGSL/gaussianPointSplattingBlit.vertex.js +19 -0
  308. package/ShadersWGSL/gaussianPointSplattingBlit.vertex.js.map +1 -0
  309. package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.d.ts +5 -0
  310. package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.js +21 -0
  311. package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.js.map +1 -0
  312. package/ShadersWGSL/gaussianSplatting.vertex.js +2 -1
  313. package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
  314. package/ShadersWGSL/gaussianSplattingDepth.vertex.js +2 -1
  315. package/ShadersWGSL/gaussianSplattingDepth.vertex.js.map +1 -1
  316. package/ShadersWGSL/gaussianSplattingVoxel.vertex.js +2 -1
  317. package/ShadersWGSL/gaussianSplattingVoxel.vertex.js.map +1 -1
  318. package/ShadersWGSL/gpsHiZBuild.compute.d.ts +5 -0
  319. package/ShadersWGSL/gpsHiZBuild.compute.js +16 -0
  320. package/ShadersWGSL/gpsHiZBuild.compute.js.map +1 -0
  321. package/ShadersWGSL/gpsPartition.compute.d.ts +5 -0
  322. package/ShadersWGSL/gpsPartition.compute.js +27 -0
  323. package/ShadersWGSL/gpsPartition.compute.js.map +1 -0
  324. package/ShadersWGSL/gpsPreprocess.compute.d.ts +5 -0
  325. package/ShadersWGSL/gpsPreprocess.compute.js +86 -0
  326. package/ShadersWGSL/gpsPreprocess.compute.js.map +1 -0
  327. package/ShadersWGSL/gpsResolve.compute.d.ts +5 -0
  328. package/ShadersWGSL/gpsResolve.compute.js +41 -0
  329. package/ShadersWGSL/gpsResolve.compute.js.map +1 -0
  330. package/ShadersWGSL/gpsScanAdd.compute.d.ts +5 -0
  331. package/ShadersWGSL/gpsScanAdd.compute.js +22 -0
  332. package/ShadersWGSL/gpsScanAdd.compute.js.map +1 -0
  333. package/ShadersWGSL/gpsScanBlocks.compute.d.ts +5 -0
  334. package/ShadersWGSL/gpsScanBlocks.compute.js +23 -0
  335. package/ShadersWGSL/gpsScanBlocks.compute.js.map +1 -0
  336. package/ShadersWGSL/gpsScanSums.compute.d.ts +5 -0
  337. package/ShadersWGSL/gpsScanSums.compute.js +30 -0
  338. package/ShadersWGSL/gpsScanSums.compute.js.map +1 -0
  339. package/ShadersWGSL/gpsSplat.compute.d.ts +5 -0
  340. package/ShadersWGSL/gpsSplat.compute.js +37 -0
  341. package/ShadersWGSL/gpsSplat.compute.js.map +1 -0
  342. package/ShadersWGSL/minmaxRedux.fragment.js +20 -3
  343. package/ShadersWGSL/minmaxRedux.fragment.js.map +1 -1
  344. package/XR/features/WebXRSpaceWarp.pure.js +2 -1
  345. package/XR/features/WebXRSpaceWarp.pure.js.map +1 -1
  346. package/assetContainer.d.ts +1 -0
  347. package/assetContainer.js +5 -1
  348. package/assetContainer.js.map +1 -1
  349. package/package.json +1 -1
  350. package/scene.pure.d.ts +13 -2
  351. package/scene.pure.js +28 -4
  352. package/scene.pure.js.map +1 -1
@@ -339,7 +339,8 @@ export declare class GaussianSplattingMeshBase extends Mesh {
339
339
  private _splatSizeMin;
340
340
  private _splatSizeMax;
341
341
  private _sortIsDirty;
342
- private _activeSplatRanges;
342
+ private _forcedSortPending;
343
+ protected _activeSplatRanges: Nullable<Uint32Array>;
343
344
  private _activeSplatRangeKey;
344
345
  private _activeSplatRenderCount;
345
346
  protected _cachedBoundingMin: Nullable<Vector3>;
@@ -350,6 +351,10 @@ export declare class GaussianSplattingMeshBase extends Mesh {
350
351
  private static _PlyConversionBatchSize;
351
352
  /** @internal */
352
353
  _shDegree: number;
354
+ /** Incremented whenever `_updateData` replaces the splat data, even when it reuses the same buffer. @internal */
355
+ _splatDataRevision: number;
356
+ /** True while `_updateData` is filling the atlas, so consumers keep the last complete data. @internal */
357
+ _splatDataPending: boolean;
353
358
  protected _maxShDegree: number;
354
359
  private static readonly _BatchSize;
355
360
  private _cameraViewInfos;
@@ -394,6 +399,7 @@ export declare class GaussianSplattingMeshBase extends Mesh {
394
399
  protected _disableDepthSort: boolean;
395
400
  /**
396
401
  * If true, disables depth sorting of the splats (default: false)
402
+ * Disabling sorting also discards deferred forced-sort requests.
397
403
  */
398
404
  get disableDepthSort(): boolean;
399
405
  set disableDepthSort(value: boolean);
@@ -430,7 +436,8 @@ export declare class GaussianSplattingMeshBase extends Mesh {
430
436
  private _setSplatIndexRanges;
431
437
  /**
432
438
  * Whether the depth sort is settled: a sort computed for the current active ranges and camera has been
433
- * applied to the rendered index buffer, and no further sort is pending or in flight. For a static camera
439
+ * applied to the rendered index buffer, and no further sort is pending or in flight (including a forced sort
440
+ * deferred until a classic pass needs it). For a static camera
434
441
  * and a fixed active set this becomes true once the final sort completes. Used by streaming subclasses to
435
442
  * detect when rendering is fully up to date (e.g. for deterministic screenshots) and by IBL shadows to
436
443
  * avoid voxelizing against an index buffer the worker has not finished (re)building yet.
@@ -560,9 +567,9 @@ export declare class GaussianSplattingMeshBase extends Mesh {
560
567
  set minPixelSize(value: number);
561
568
  private _loadingPromise;
562
569
  /**
563
- * set rendering material
570
+ * Sets the rendering material and updates camera views. Notifies material-change observers when the material changes.
564
571
  */
565
- set material(value: Material);
572
+ set material(value: Nullable<Material>);
566
573
  /**
567
574
  * get rendering material
568
575
  */
@@ -611,6 +618,26 @@ export declare class GaussianSplattingMeshBase extends Mesh {
611
618
  * @returns the current mesh
612
619
  */
613
620
  render(subMesh: SubMesh, enableAlphaMode: boolean, effectiveMeshReplacement?: AbstractMesh): Mesh;
621
+ /**
622
+ * Draws the inner per-camera mesh for one render pass. Subclasses may replace selected passes.
623
+ * @param mesh inner per-camera mesh carrying the sorted splat geometry
624
+ * @param subMesh the submesh to draw
625
+ * @param enableAlphaMode whether alpha mode can be changed
626
+ * @param effectiveMeshReplacement optional mesh providing render info
627
+ * @returns the drawn mesh
628
+ */
629
+ protected _drawColorPass(mesh: Mesh, subMesh: SubMesh, enableAlphaMode: boolean, effectiveMeshReplacement?: AbstractMesh): Mesh;
630
+ /**
631
+ * Whether the current pass needs classic sorted splat geometry.
632
+ * @returns whether classic sorting is required
633
+ */
634
+ protected _isSortRequired(): boolean;
635
+ /**
636
+ * Handles a compute-owned pass before allocating or waiting for sorted geometry.
637
+ * @param _enableAlphaMode whether alpha mode can be changed
638
+ * @returns whether the pass was handled
639
+ */
640
+ protected _drawPointPass(_enableAlphaMode: boolean): boolean;
614
641
  private static _TypeNameToEnum;
615
642
  private static _ValueNameToEnum;
616
643
  /**
@@ -729,6 +756,7 @@ export declare class GaussianSplattingMeshBase extends Mesh {
729
756
  */
730
757
  get isCompound(): boolean;
731
758
  protected _setDelayedTextureUpdate(covA: Uint16Array, covB: Uint16Array, colorArray: Uint8Array, sh?: Uint8Array[]): void;
759
+ private _commitDelayedTextureUpdate;
732
760
  /**
733
761
  * Creates (or recreates) the MRT-backed data atlas at the given size and points the four core data
734
762
  * textures at its attachments. The attachments use the same decoded GS layout as {@link GaussianSplattingWorkBuffer}
@@ -300,6 +300,7 @@ export class GaussianSplattingMeshBase extends Mesh {
300
300
  }
301
301
  /**
302
302
  * If true, disables depth sorting of the splats (default: false)
303
+ * Disabling sorting also discards deferred forced-sort requests.
303
304
  */
304
305
  get disableDepthSort() {
305
306
  return this._disableDepthSort;
@@ -309,6 +310,7 @@ export class GaussianSplattingMeshBase extends Mesh {
309
310
  this._worker?.terminate();
310
311
  this._worker = null;
311
312
  this._disableDepthSort = true;
313
+ this._forcedSortPending = false;
312
314
  }
313
315
  else if (this._disableDepthSort && !value) {
314
316
  this._disableDepthSort = false;
@@ -396,14 +398,15 @@ export class GaussianSplattingMeshBase extends Mesh {
396
398
  }
397
399
  /**
398
400
  * Whether the depth sort is settled: a sort computed for the current active ranges and camera has been
399
- * applied to the rendered index buffer, and no further sort is pending or in flight. For a static camera
401
+ * applied to the rendered index buffer, and no further sort is pending or in flight (including a forced sort
402
+ * deferred until a classic pass needs it). For a static camera
400
403
  * and a fixed active set this becomes true once the final sort completes. Used by streaming subclasses to
401
404
  * detect when rendering is fully up to date (e.g. for deterministic screenshots) and by IBL shadows to
402
405
  * avoid voxelizing against an index buffer the worker has not finished (re)building yet.
403
406
  * @internal
404
407
  */
405
408
  get _isDepthSortSettled() {
406
- return this._readyToDisplay && !this._sortIsDirty && this._canPostToWorker;
409
+ return this._readyToDisplay && !this._sortIsDirty && !this._forcedSortPending && this._canPostToWorker;
407
410
  }
408
411
  // (Re)allocates the worker depth buffer to the given padded size. A fresh array is allocated when the
409
412
  // size differs or the current buffer is detached (in-flight in the worker), so a queued sort can be
@@ -688,16 +691,22 @@ export class GaussianSplattingMeshBase extends Mesh {
688
691
  }
689
692
  }
690
693
  /**
691
- * set rendering material
694
+ * Sets the rendering material and updates camera views. Notifies material-change observers when the material changes.
692
695
  */
693
696
  set material(value) {
697
+ const previous = this._material;
694
698
  this._material = value;
695
- this._material.backFaceCulling = false;
696
- this._material.cullBackFaces = false;
697
- value.resetDrawCache();
699
+ if (value) {
700
+ value.backFaceCulling = false;
701
+ value.cullBackFaces = false;
702
+ value.resetDrawCache();
703
+ }
698
704
  this._cameraViewInfos?.forEach((cameraViewInfo) => {
699
705
  cameraViewInfo.mesh.material = value;
700
706
  });
707
+ if (previous !== value && this.onMaterialChangedObservable.hasObservers()) {
708
+ this.onMaterialChangedObservable.notifyObservers(this);
709
+ }
701
710
  }
702
711
  /**
703
712
  * get rendering material
@@ -803,6 +812,8 @@ export class GaussianSplattingMeshBase extends Mesh {
803
812
  this._splatSizeMin = Infinity;
804
813
  this._splatSizeMax = -Infinity;
805
814
  this._sortIsDirty = false;
815
+ // A forced sort requested while no classic pass needed sorting; runs on the next classic pass.
816
+ this._forcedSortPending = false;
806
817
  this._activeSplatRanges = null;
807
818
  this._activeSplatRangeKey = "";
808
819
  this._activeSplatRenderCount = 0;
@@ -811,6 +822,10 @@ export class GaussianSplattingMeshBase extends Mesh {
811
822
  this._cachedBoundingMax = null;
812
823
  /** @internal */
813
824
  this._shDegree = 0;
825
+ /** Incremented whenever `_updateData` replaces the splat data, even when it reuses the same buffer. @internal */
826
+ this._splatDataRevision = 0;
827
+ /** True while `_updateData` is filling the atlas, so consumers keep the last complete data. @internal */
828
+ this._splatDataPending = false;
814
829
  this._maxShDegree = 0;
815
830
  this._cameraViewInfos = new Map();
816
831
  /** Fired after parts are added or the mesh is rebuilt following a removal. Payload is the new part count. */
@@ -839,7 +854,13 @@ export class GaussianSplattingMeshBase extends Mesh {
839
854
  this._loadingPromise = null;
840
855
  this._updateTextureFromData = (texture, data, width, lineStart, lineCount) => {
841
856
  const engine = this._getTextureDataUpdateEngine();
842
- engine.updateTextureData(texture.getInternalTexture(), data, 0, lineStart, width, lineCount, 0, 0, false);
857
+ const internalTexture = texture.getInternalTexture();
858
+ // NativeEngine and NullEngine support complete raw uploads, but not sub-texture uploads.
859
+ if (!engine._gl && !engine.isWebGPU && lineStart === 0 && lineCount === internalTexture.height) {
860
+ engine.updateRawTexture(internalTexture, data, internalTexture.format, internalTexture.invertY, null, internalTexture.type, internalTexture._useSRGBBuffer);
861
+ return;
862
+ }
863
+ engine.updateTextureData(internalTexture, data, 0, lineStart, width, lineCount, 0, 0, false);
843
864
  };
844
865
  this._updateTextureFromDataRect = (texture, data, xOffset, yOffset, width, height) => {
845
866
  const engine = this._getTextureDataUpdateEngine();
@@ -908,10 +929,14 @@ export class GaussianSplattingMeshBase extends Mesh {
908
929
  * @returns true when ready
909
930
  */
910
931
  isReady(completeCheck = false) {
911
- if (!super.isReady(completeCheck, true)) {
932
+ const sortRequired = this._isSortRequired();
933
+ if (!super.isReady(sortRequired && completeCheck, true)) {
912
934
  return false;
913
935
  }
914
- if (!this._readyToDisplay) {
936
+ if (!sortRequired && !this._geometry) {
937
+ this._postToWorker();
938
+ }
939
+ if (sortRequired && !this._readyToDisplay) {
915
940
  // mesh is ready when worker has done at least 1 sorting
916
941
  this._postToWorker(true);
917
942
  return false;
@@ -919,7 +944,7 @@ export class GaussianSplattingMeshBase extends Mesh {
919
944
  // Before the first successful render, require an applied index buffer. A pending refresh can
920
945
  // use the latest completed buffer, otherwise a transform changed every frame would starve the
921
946
  // first render. Once rendered, the render loop continuously re-sorts as the camera/world changes.
922
- if (!this._hasRenderedOnce && !this._disableDepthSort) {
947
+ if (sortRequired && !this._hasRenderedOnce && !this._disableDepthSort) {
923
948
  const cameras = this._scene.activeCameras?.length ? this._scene.activeCameras : [this._scene.activeCamera];
924
949
  const canRenderWithPendingRefresh = this._scene._isInRenderingMeshEvaluation() && cameras.filter((camera) => camera !== null).length === 1;
925
950
  const worldMatrix = this.computeWorldMatrix(true);
@@ -1120,7 +1145,16 @@ export class GaussianSplattingMeshBase extends Mesh {
1120
1145
  // null before any splat data has been committed) or the native binding throws on the conversion.
1121
1146
  const hasNativeSort = !!Native?.sortSplats && !!this._splatPositions && !!this._splatIndex;
1122
1147
  // When depth sort is disabled, no sort function must run: fall through to the no-sort path below.
1123
- const hasSortFunction = !this._disableDepthSort && (this._worker || hasNativeSort);
1148
+ const sortRequired = this._isSortRequired();
1149
+ const hasSortFunction = sortRequired && !this._disableDepthSort && (this._worker || hasNativeSort);
1150
+ // A forced sort (new data or parts) requested while no classic pass needs sorting (e.g. point
1151
+ // splatting) is deferred to the next classic pass; the camera and world may be unchanged by then.
1152
+ if (forced && !sortRequired && !this._disableDepthSort) {
1153
+ this._forcedSortPending = true;
1154
+ }
1155
+ else if (hasSortFunction && this._forcedSortPending) {
1156
+ forced = true;
1157
+ }
1124
1158
  if ((forced || outdated) && hasSortFunction && (this._scene.activeCameras?.length || this._scene.activeCamera) && this._canPostToWorker) {
1125
1159
  const worldMatrix = this.computeWorldMatrix(true);
1126
1160
  // view infos sorted by least recent updated frame id
@@ -1136,6 +1170,7 @@ export class GaussianSplattingMeshBase extends Mesh {
1136
1170
  cameraViewInfos.sortRequestId = ++this._sortRequestId;
1137
1171
  cameraViewInfos.frameIdLastUpdate = frameId;
1138
1172
  this._canPostToWorker = false;
1173
+ this._forcedSortPending = false;
1139
1174
  if (this._worker) {
1140
1175
  this._worker.postMessage({
1141
1176
  command: GaussianSplattingSortWorkerCommand.SORT,
@@ -1173,7 +1208,17 @@ export class GaussianSplattingMeshBase extends Mesh {
1173
1208
  }
1174
1209
  });
1175
1210
  }
1176
- else if (this._disableDepthSort) {
1211
+ else if (this._disableDepthSort || !sortRequired) {
1212
+ // ShadowGenerator bypasses render()/isReady(), so its atlas cannot wait for a deferred camera sort.
1213
+ if (this._delayedTextureUpdate) {
1214
+ this._updateSplatIndexBuffer(this._vertexCount);
1215
+ this._cameraViewInfos.forEach((info) => {
1216
+ if (info.splatIndexBufferSet) {
1217
+ info.mesh.thinInstanceBufferUpdated("splatIndex");
1218
+ }
1219
+ });
1220
+ this._commitDelayedTextureUpdate();
1221
+ }
1177
1222
  if (this._splatIndex) {
1178
1223
  activeViewInfos.forEach((cameraViewInfos) => {
1179
1224
  if (!cameraViewInfos.splatIndexBufferSet) {
@@ -1183,7 +1228,10 @@ export class GaussianSplattingMeshBase extends Mesh {
1183
1228
  });
1184
1229
  this._readyToDisplay = true;
1185
1230
  }
1186
- this._canPostToWorker = true;
1231
+ // With a worker, the gate is owned by in-flight sorts and rebuilds; their completion unlocks it.
1232
+ if (this._disableDepthSort || !this._worker) {
1233
+ this._canPostToWorker = true;
1234
+ }
1187
1235
  }
1188
1236
  }
1189
1237
  /**
@@ -1194,6 +1242,15 @@ export class GaussianSplattingMeshBase extends Mesh {
1194
1242
  * @returns the current mesh
1195
1243
  */
1196
1244
  render(subMesh, enableAlphaMode, effectiveMeshReplacement) {
1245
+ let beforeNotified = false;
1246
+ if (!this._isSortRequired()) {
1247
+ this.onBeforeRenderObservable.notifyObservers(this);
1248
+ beforeNotified = true;
1249
+ if (this._drawPointPass(enableAlphaMode)) {
1250
+ this.onAfterRenderObservable.notifyObservers(this);
1251
+ return this;
1252
+ }
1253
+ }
1197
1254
  this._postToWorker();
1198
1255
  // geometry used for shadows, bind the first found in the camera view infos
1199
1256
  if (!this._geometry && this._cameraViewInfos.size) {
@@ -1202,9 +1259,12 @@ export class GaussianSplattingMeshBase extends Mesh {
1202
1259
  const cameraId = this._scene.activeCamera.uniqueId;
1203
1260
  const cameraViewInfos = this._cameraViewInfos.get(cameraId);
1204
1261
  if (!cameraViewInfos || !cameraViewInfos.splatIndexBufferSet) {
1262
+ if (beforeNotified) {
1263
+ this.onAfterRenderObservable.notifyObservers(this);
1264
+ }
1205
1265
  return this;
1206
1266
  }
1207
- if (this.onBeforeRenderObservable) {
1267
+ if (!beforeNotified && this.onBeforeRenderObservable) {
1208
1268
  this.onBeforeRenderObservable.notifyObservers(this);
1209
1269
  }
1210
1270
  const mesh = cameraViewInfos.mesh;
@@ -1218,7 +1278,7 @@ export class GaussianSplattingMeshBase extends Mesh {
1218
1278
  if (renderPassMaterial) {
1219
1279
  mesh.setMaterialForRenderPass(renderPassId, renderPassMaterial);
1220
1280
  }
1221
- const ret = mesh.render(subMesh, enableAlphaMode, effectiveMeshReplacement);
1281
+ const ret = this._drawColorPass(mesh, subMesh, enableAlphaMode, effectiveMeshReplacement);
1222
1282
  this._hasRenderedOnce = true;
1223
1283
  // Clean up the temporary override to avoid affecting other render passes
1224
1284
  if (renderPassMaterial) {
@@ -1229,6 +1289,32 @@ export class GaussianSplattingMeshBase extends Mesh {
1229
1289
  }
1230
1290
  return ret;
1231
1291
  }
1292
+ /**
1293
+ * Draws the inner per-camera mesh for one render pass. Subclasses may replace selected passes.
1294
+ * @param mesh inner per-camera mesh carrying the sorted splat geometry
1295
+ * @param subMesh the submesh to draw
1296
+ * @param enableAlphaMode whether alpha mode can be changed
1297
+ * @param effectiveMeshReplacement optional mesh providing render info
1298
+ * @returns the drawn mesh
1299
+ */
1300
+ _drawColorPass(mesh, subMesh, enableAlphaMode, effectiveMeshReplacement) {
1301
+ return mesh.render(subMesh, enableAlphaMode, effectiveMeshReplacement);
1302
+ }
1303
+ /**
1304
+ * Whether the current pass needs classic sorted splat geometry.
1305
+ * @returns whether classic sorting is required
1306
+ */
1307
+ _isSortRequired() {
1308
+ return true;
1309
+ }
1310
+ /**
1311
+ * Handles a compute-owned pass before allocating or waiting for sorted geometry.
1312
+ * @param _enableAlphaMode whether alpha mode can be changed
1313
+ * @returns whether the pass was handled
1314
+ */
1315
+ _drawPointPass(_enableAlphaMode) {
1316
+ return false;
1317
+ }
1232
1318
  static _TypeNameToEnum(name) {
1233
1319
  switch (name) {
1234
1320
  case "float":
@@ -2221,6 +2307,15 @@ export class GaussianSplattingMeshBase extends Mesh {
2221
2307
  _setDelayedTextureUpdate(covA, covB, colorArray, sh) {
2222
2308
  this._delayedTextureUpdate = { covA, covB, colors: colorArray, centers: this._splatPositions, sh };
2223
2309
  }
2310
+ _commitDelayedTextureUpdate() {
2311
+ const update = this._delayedTextureUpdate;
2312
+ if (!update) {
2313
+ return;
2314
+ }
2315
+ const textureSize = this._getTextureSize(this._vertexCount);
2316
+ this._updateSubTextures(update.centers, update.covA, update.covB, update.colors, 0, textureSize.y, update.sh);
2317
+ this._delayedTextureUpdate = null;
2318
+ }
2224
2319
  /**
2225
2320
  * Creates (or recreates) the MRT-backed data atlas at the given size and points the four core data
2226
2321
  * textures at its attachments. The attachments use the same decoded GS layout as {@link GaussianSplattingWorkBuffer}
@@ -2730,6 +2825,8 @@ export class GaussianSplattingMeshBase extends Mesh {
2730
2825
  this._readyToDisplay = false;
2731
2826
  }
2732
2827
  this._flipY = flipY;
2828
+ this._splatDataRevision++;
2829
+ this._splatDataPending = true;
2733
2830
  const uBuffer = new Uint8Array(data);
2734
2831
  const fBuffer = new Float32Array(uBuffer.buffer);
2735
2832
  // Optionally store the raw splat buffer as an ArrayBuffer. This is the source reference
@@ -2857,6 +2954,7 @@ export class GaussianSplattingMeshBase extends Mesh {
2857
2954
  // Cache bounding box for the next incremental addPart call
2858
2955
  this._cachedBoundingMin = minimum.clone();
2859
2956
  this._cachedBoundingMax = maximum.clone();
2957
+ this._splatDataPending = false;
2860
2958
  this._postToWorker(true);
2861
2959
  }
2862
2960
  /**
@@ -3078,12 +3176,7 @@ export class GaussianSplattingMeshBase extends Mesh {
3078
3176
  }
3079
3177
  }
3080
3178
  this.forcedInstanceCount = Math.max(renderedPadded >> 4, 1);
3081
- if (this._delayedTextureUpdate) {
3082
- const vertexCountPadded = (this._vertexCount + 15) & ~0xf;
3083
- const textureSize = this._getTextureSize(vertexCountPadded);
3084
- this._updateSubTextures(this._delayedTextureUpdate.centers, this._delayedTextureUpdate.covA, this._delayedTextureUpdate.covB, this._delayedTextureUpdate.colors, 0, textureSize.y, this._delayedTextureUpdate.sh);
3085
- this._delayedTextureUpdate = null;
3086
- }
3179
+ this._commitDelayedTextureUpdate();
3087
3180
  // get mesh for camera and update its instance buffer
3088
3181
  const cameraViewInfos = this._cameraViewInfos.get(cameraId);
3089
3182
  if (cameraViewInfos) {