@onerjs/core 9.0.0 → 9.0.2

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 (353) 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 +8 -2
  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/objectRenderer.js.map +1 -1
  278. package/Rendering/prePassRenderer.pure.js +3 -3
  279. package/Rendering/prePassRenderer.pure.js.map +1 -1
  280. package/Shaders/ShadersInclude/gaussianSplatting.js +3 -1
  281. package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
  282. package/Shaders/ShadersInclude/lightsFragmentFunctions.js +27 -3
  283. package/Shaders/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
  284. package/Shaders/ShadersInclude/oitDeclaration.js +1 -1
  285. package/Shaders/ShadersInclude/oitDeclaration.js.map +1 -1
  286. package/Shaders/minmaxRedux.fragment.js +6 -1
  287. package/Shaders/minmaxRedux.fragment.js.map +1 -1
  288. package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.d.ts +5 -0
  289. package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.js +65 -0
  290. package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.js.map +1 -0
  291. package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.d.ts +5 -0
  292. package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.js +17 -0
  293. package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.js.map +1 -0
  294. package/ShadersWGSL/ShadersInclude/gaussianSplatting.d.ts +1 -0
  295. package/ShadersWGSL/ShadersInclude/gaussianSplatting.js +6 -78
  296. package/ShadersWGSL/ShadersInclude/gaussianSplatting.js.map +1 -1
  297. package/ShadersWGSL/ShadersInclude/gaussianSplattingFragmentDeclaration.js +2 -2
  298. package/ShadersWGSL/ShadersInclude/gaussianSplattingFragmentDeclaration.js.map +1 -1
  299. package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.d.ts +5 -0
  300. package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.js +79 -0
  301. package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.js.map +1 -0
  302. package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js +27 -3
  303. package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
  304. package/ShadersWGSL/gaussianPointSplattingBlit.fragment.d.ts +5 -0
  305. package/ShadersWGSL/gaussianPointSplattingBlit.fragment.js +22 -0
  306. package/ShadersWGSL/gaussianPointSplattingBlit.fragment.js.map +1 -0
  307. package/ShadersWGSL/gaussianPointSplattingBlit.vertex.d.ts +5 -0
  308. package/ShadersWGSL/gaussianPointSplattingBlit.vertex.js +19 -0
  309. package/ShadersWGSL/gaussianPointSplattingBlit.vertex.js.map +1 -0
  310. package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.d.ts +5 -0
  311. package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.js +21 -0
  312. package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.js.map +1 -0
  313. package/ShadersWGSL/gaussianSplatting.vertex.js +2 -1
  314. package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
  315. package/ShadersWGSL/gaussianSplattingDepth.vertex.js +2 -1
  316. package/ShadersWGSL/gaussianSplattingDepth.vertex.js.map +1 -1
  317. package/ShadersWGSL/gaussianSplattingVoxel.vertex.js +2 -1
  318. package/ShadersWGSL/gaussianSplattingVoxel.vertex.js.map +1 -1
  319. package/ShadersWGSL/gpsHiZBuild.compute.d.ts +5 -0
  320. package/ShadersWGSL/gpsHiZBuild.compute.js +16 -0
  321. package/ShadersWGSL/gpsHiZBuild.compute.js.map +1 -0
  322. package/ShadersWGSL/gpsPartition.compute.d.ts +5 -0
  323. package/ShadersWGSL/gpsPartition.compute.js +27 -0
  324. package/ShadersWGSL/gpsPartition.compute.js.map +1 -0
  325. package/ShadersWGSL/gpsPreprocess.compute.d.ts +5 -0
  326. package/ShadersWGSL/gpsPreprocess.compute.js +86 -0
  327. package/ShadersWGSL/gpsPreprocess.compute.js.map +1 -0
  328. package/ShadersWGSL/gpsResolve.compute.d.ts +5 -0
  329. package/ShadersWGSL/gpsResolve.compute.js +41 -0
  330. package/ShadersWGSL/gpsResolve.compute.js.map +1 -0
  331. package/ShadersWGSL/gpsScanAdd.compute.d.ts +5 -0
  332. package/ShadersWGSL/gpsScanAdd.compute.js +22 -0
  333. package/ShadersWGSL/gpsScanAdd.compute.js.map +1 -0
  334. package/ShadersWGSL/gpsScanBlocks.compute.d.ts +5 -0
  335. package/ShadersWGSL/gpsScanBlocks.compute.js +23 -0
  336. package/ShadersWGSL/gpsScanBlocks.compute.js.map +1 -0
  337. package/ShadersWGSL/gpsScanSums.compute.d.ts +5 -0
  338. package/ShadersWGSL/gpsScanSums.compute.js +30 -0
  339. package/ShadersWGSL/gpsScanSums.compute.js.map +1 -0
  340. package/ShadersWGSL/gpsSplat.compute.d.ts +5 -0
  341. package/ShadersWGSL/gpsSplat.compute.js +37 -0
  342. package/ShadersWGSL/gpsSplat.compute.js.map +1 -0
  343. package/ShadersWGSL/minmaxRedux.fragment.js +20 -3
  344. package/ShadersWGSL/minmaxRedux.fragment.js.map +1 -1
  345. package/XR/features/WebXRSpaceWarp.pure.js +2 -1
  346. package/XR/features/WebXRSpaceWarp.pure.js.map +1 -1
  347. package/assetContainer.d.ts +1 -0
  348. package/assetContainer.js +5 -1
  349. package/assetContainer.js.map +1 -1
  350. package/package.json +1 -1
  351. package/scene.pure.d.ts +13 -2
  352. package/scene.pure.js +28 -4
  353. package/scene.pure.js.map +1 -1
@@ -7,9 +7,20 @@ import { RawTexture } from "../../Materials/Textures/rawTexture.js";
7
7
 
8
8
  import { DecodeBase64ToBinary, EncodeArrayBufferToBase64 } from "../../Misc/stringTools.js";
9
9
  import { Mesh } from "../mesh.pure.js";
10
+ import { Logger } from "../../Misc/logger.js";
10
11
  import { GaussianSplattingPartProxyMesh } from "./gaussianSplattingPartProxyMesh.pure.js";
11
12
  import { BoundingInfo } from "../../Culling/boundingInfo.js";
12
13
  export { IsGaussianSplattingClassName } from "./gaussianSplatting.functions.js";
14
+ let _PointSplattingControllerFactory = null;
15
+ /**
16
+ * Installs the point-splatting controller factory. Called by the optional point-splatting module's
17
+ * registration; until then every point-splatting mode on {@link GaussianSplattingMesh} is a no-op.
18
+ * @param factory creates a controller for a given mesh
19
+ * @internal
20
+ */
21
+ export function _SetGaussianPointSplattingControllerFactory(factory) {
22
+ _PointSplattingControllerFactory = factory;
23
+ }
13
24
  const _GaussianSplattingBytesPerSplat = 32;
14
25
  const _GaussianSplattingBytesPerShTexel = 16;
15
26
  /**
@@ -63,6 +74,36 @@ function ParsePartIndices(compressed) {
63
74
  * addPart/addParts and removePart.
64
75
  */
65
76
  export class GaussianSplattingMesh extends GaussianSplattingMeshBase {
77
+ /**
78
+ * Internal render-resolution scale for point splatting (1 = full). Lower values emit ~scale^2 fewer
79
+ * points; full resolution is reconstructed over frames. `"auto"` (default) targets a device-tiered point
80
+ * budget, with the upscale factor capped at 8. Setting it restarts accumulation.
81
+ */
82
+ get pointSplattingRenderScale() {
83
+ return this._pointRenderScale;
84
+ }
85
+ set pointSplattingRenderScale(value) {
86
+ if (value === this._pointRenderScale) {
87
+ return;
88
+ }
89
+ this._pointRenderScale = value;
90
+ if (this._pointController) {
91
+ this._pointController.renderScale = value;
92
+ }
93
+ }
94
+ /** Enables previous-frame Hi-Z culling in point mode. Off by default because translucent splats can be biased. */
95
+ get pointSplattingOcclusionCulling() {
96
+ return this._pointOcclusionCulling;
97
+ }
98
+ set pointSplattingOcclusionCulling(value) {
99
+ if (value === this._pointOcclusionCulling) {
100
+ return;
101
+ }
102
+ this._pointOcclusionCulling = value;
103
+ if (this._pointController) {
104
+ this._pointController.occlusionCulling = value;
105
+ }
106
+ }
66
107
  /** Gets the part indices texture used for compound rendering */
67
108
  get partIndicesTexture() {
68
109
  return this._partIndicesTexture;
@@ -94,6 +135,11 @@ export class GaussianSplattingMesh extends GaussianSplattingMeshBase {
94
135
  * Visibility values for each part (0.0 to 1.0), indexed by part index.
95
136
  */
96
137
  this._partVisibility = [];
138
+ // Point-splatting settings, kept here so they can be set before the controller exists.
139
+ this._pointScale = 1;
140
+ this._pointRenderScale = "auto";
141
+ this._pointOcclusionCulling = false;
142
+ this._pointController = null;
97
143
  /**
98
144
  * Per-part active source-splat range overrides, indexed by part index, in GLOBAL source-splat
99
145
  * coordinates (offsets into the merged atlas). A part with no entry (undefined) renders its full
@@ -288,6 +334,8 @@ export class GaussianSplattingMesh extends GaussianSplattingMeshBase {
288
334
  this._partIndicesTexture = null;
289
335
  this._part0LocalMin = null;
290
336
  this._part0LocalMax = null;
337
+ this._pointController?.dispose();
338
+ this._pointController = null;
291
339
  super.dispose(doNotRecurse);
292
340
  }
293
341
  // ---------------------------------------------------------------------------
@@ -313,6 +361,144 @@ export class GaussianSplattingMesh extends GaussianSplattingMeshBase {
313
361
  this._partIndices = new Uint8Array(textureLength);
314
362
  this._partIndices.set(partIndices);
315
363
  }
364
+ // Point-splatting properties are no-ops until the controller module is registered.
365
+ /**
366
+ * Lazily creates this mesh's point-splatting controller, or null when the optional module is absent.
367
+ * @returns the controller, or null when point splatting has not been registered
368
+ */
369
+ _ensurePointController() {
370
+ if (!this._pointController) {
371
+ if (!_PointSplattingControllerFactory) {
372
+ Logger.Warn('GaussianSplattingMesh: point splatting is not registered; import "@babylonjs/core/Meshes/GaussianSplatting/gaussianPointSplattingController" to enable it.');
373
+ return null;
374
+ }
375
+ this._pointController = _PointSplattingControllerFactory(this);
376
+ this._pointController.pointScale = this._pointScale;
377
+ this._pointController.renderScale = this._pointRenderScale;
378
+ this._pointController.occlusionCulling = this._pointOcclusionCulling;
379
+ }
380
+ return this._pointController;
381
+ }
382
+ /**
383
+ * Whether the main color pass is rendered with the WebGPU compute point-splatting path instead of the
384
+ * classic sorted quads. Off by default; other passes (shadows, picking, prepass) are unaffected. Falls
385
+ * back to the classic path for multiple or rig cameras, floating-origin scenes, clip planes, and streamed parts.
386
+ * Color rendering also falls back when the camera viewport does not cover the full target or projected-size visualization is enabled.
387
+ * Wireframe, point-cloud, and other non-triangle fill modes use classic color, including scene-wide and mesh overrides.
388
+ * Clipping and depth quantization use the supplied projection's planes, including frozen projections.
389
+ * Tilted and custom projections are supported by the point path. Compute runs immediately
390
+ * before compositing with the pass's actual view and target dimensions; matching color and depth passes share one result.
391
+ * While point shaders compile, the pass waits without drawing classic splats. The color pass uses the classic path
392
+ * while the GaussianSplattingSolidColorMaterialPlugin override is enabled or the source material's
393
+ * alpha mode is not ALPHA_COMBINE. Point color supports only the built-in GaussianSplattingMaterial;
394
+ * NodeMaterials, subclasses, and other source materials use classic color to preserve their shader behavior.
395
+ * Custom material plugins and built-in visualization or picking plugins use classic color unless their
396
+ * behavior is explicitly reproduced or they are known neutral while disabled. The built-in debug plugin is supported.
397
+ * The source must require alpha blending without alpha testing; opaque and alpha-test transparency modes use classic color.
398
+ * Material compatibility is reevaluated each draw, including after material replacement or plugin attachment. WebGPU only.
399
+ *
400
+ * Limitation: each pixel's accumulated color is depth-tested as a whole against its latest sample's depth. Where
401
+ * other geometry intersects the splats, occluded splats can bleed through or visible ones drop out, and the
402
+ * result can flicker as the latest sample changes. Non-intersecting geometry composites correctly, and mostly
403
+ * opaque splats show no visible artifacts.
404
+ *
405
+ * Requires `@babylonjs/core/Meshes/GaussianSplatting/gaussianPointSplattingController` (included in
406
+ * `@babylonjs/core`); without it, enabling this logs a warning and does nothing.
407
+ * @see https://playground.babylonjs.com/#F39YWU#1
408
+ */
409
+ get pointSplattingRenderMode() {
410
+ return this._pointController?.colorRenderMode ?? false;
411
+ }
412
+ set pointSplattingRenderMode(value) {
413
+ if (value === this.pointSplattingRenderMode) {
414
+ return;
415
+ }
416
+ const controller = value ? this._ensurePointController() : this._pointController;
417
+ if (controller) {
418
+ controller.colorRenderMode = value;
419
+ }
420
+ }
421
+ /**
422
+ * Whether the active camera's DepthRenderer depth for this mesh comes from the point-splatting compute
423
+ * (an opaque nearest-surface depth) instead of the classic path. Off by default and independent of
424
+ * {@link pointSplattingRenderMode}, with the same camera, floating-origin, clip-plane, data fallbacks and module requirement.
425
+ * Color-only material fallbacks do not disable point depth. Scene-wide wireframe or point-cloud overrides
426
+ * use classic depth. For partial camera viewports, point depth
427
+ * requires a depth map with ignoreCameraViewport enabled. When point color is supported, depth maps
428
+ * with different pixel dimensions use classic depth to preserve color accumulation.
429
+ * Depth passes whose view, material parameters, or part inputs differ from retained point-color history
430
+ * also use classic depth rather than resetting that history. WebGPU only.
431
+ */
432
+ get pointSplattingDepthRenderMode() {
433
+ return this._pointController?.depthRenderMode ?? false;
434
+ }
435
+ set pointSplattingDepthRenderMode(value) {
436
+ if (value === this.pointSplattingDepthRenderMode) {
437
+ return;
438
+ }
439
+ const controller = value ? this._ensurePointController() : this._pointController;
440
+ if (controller) {
441
+ controller.depthRenderMode = value;
442
+ }
443
+ }
444
+ /**
445
+ * Counters of the most recent point-splatting compute frame, or null when compute has no available result.
446
+ * Individual render passes may still use the classic path for unsupported configurations.
447
+ *
448
+ * Snapshot `renderedFrameCount` whenever `accumulationVersion` changes: after the first frame of a
449
+ * generation, each further `pixelCycleLength` frames add one sample to every output pixel.
450
+ * @returns the latest compute counters, or null when point splatting is not producing frames
451
+ */
452
+ get pointSplattingProgress() {
453
+ return this._pointController?.progress ?? null;
454
+ }
455
+ /** Density multiplier for point splatting (higher = denser and slower). */
456
+ get pointSplattingScale() {
457
+ return this._pointScale;
458
+ }
459
+ set pointSplattingScale(value) {
460
+ this._pointScale = value;
461
+ if (this._pointController) {
462
+ this._pointController.pointScale = value;
463
+ }
464
+ }
465
+ /**
466
+ * True when this mesh hosts a streamed (GPU-decoded) region, which is absent from the CPU `_splatsData`
467
+ * that point splatting decodes.
468
+ * @internal
469
+ */
470
+ get _pointStreamingUnsupported() {
471
+ return this._hasStreamingPart;
472
+ }
473
+ /**
474
+ * Force-computes every part proxy's world matrix (a non-forced call skips nodes already computed this frame).
475
+ * @internal
476
+ */
477
+ _syncPartProxyWorldMatrices() {
478
+ for (const proxy of this._partProxies) {
479
+ proxy?.computeWorldMatrix(true);
480
+ }
481
+ }
482
+ /**
483
+ * Protected state the point-splatting controller needs to decode {@link _splatsData}.
484
+ * @returns the decoded atlas positions, fallback flip-Y convention, part indices, and active splat-range pairs
485
+ * @internal
486
+ */
487
+ _getPointDecodeInputs() {
488
+ return { positions: this._splatPositions, flipY: this._flipY, partIndices: this._partIndices, activeRanges: this._activeSplatRanges };
489
+ }
490
+ _drawColorPass(mesh, subMesh, enableAlphaMode, effectiveMeshReplacement) {
491
+ if (this._pointController?.drawColorPass(enableAlphaMode)) {
492
+ return mesh;
493
+ }
494
+ return super._drawColorPass(mesh, subMesh, enableAlphaMode, effectiveMeshReplacement);
495
+ }
496
+ _isSortRequired() {
497
+ return !this._pointController?.handlesCurrentPass;
498
+ }
499
+ _drawPointPass(enableAlphaMode) {
500
+ return this._pointController?.drawColorPass(enableAlphaMode) ?? false;
501
+ }
316
502
  /**
317
503
  * Returns `true` when at least one part has been added to this compound mesh.
318
504
  * Returns `false` before any parts are added, so the mesh renders in normal
@@ -622,6 +808,17 @@ export class GaussianSplattingMesh extends GaussianSplattingMeshBase {
622
808
  this._partSplatRanges[partIndex] = ranges ? ranges.map((r) => ({ offset: r.offset, count: r.count })) : null;
623
809
  this._refreshPartRangeUnion();
624
810
  }
811
+ /**
812
+ * Sets the active splat ranges and invalidates decoded point-splatting data when they change.
813
+ * @param ranges global source-splat ranges to render, or null to render all splats
814
+ */
815
+ setSplatIndexRanges(ranges) {
816
+ const previous = this._activeSplatRanges;
817
+ super.setSplatIndexRanges(ranges);
818
+ if (previous !== this._activeSplatRanges) {
819
+ this._pointController?.invalidateDecodedSplats();
820
+ }
821
+ }
625
822
  /**
626
823
  * Recomputes the global active-range union across all parts and pushes it to the shared sort/draw
627
824
  * via the base {@link setSplatIndexRanges}. When no part carries an override the filter is cleared
@@ -1920,6 +2117,11 @@ export class GaussianSplattingMesh extends GaussianSplattingMeshBase {
1920
2117
  serializationObject.disableDepthSort = this._disableDepthSort;
1921
2118
  serializationObject.viewUpdateThreshold = this.viewUpdateThreshold;
1922
2119
  serializationObject._flipY = this._flipY;
2120
+ serializationObject.pointSplattingScale = this._pointScale;
2121
+ serializationObject.pointSplattingRenderScale = this._pointRenderScale;
2122
+ serializationObject.pointSplattingOcclusionCulling = this._pointOcclusionCulling;
2123
+ serializationObject.pointSplattingRenderMode = this.pointSplattingRenderMode;
2124
+ serializationObject.pointSplattingDepthRenderMode = this.pointSplattingDepthRenderMode;
1923
2125
  if (this._splatsData) {
1924
2126
  serializationObject.splatsData = encoding === "base64" ? EncodeArrayBufferToBase64(this._splatsData) : this._splatsData;
1925
2127
  }
@@ -1979,6 +2181,23 @@ export class GaussianSplattingMesh extends GaussianSplattingMeshBase {
1979
2181
  const flipY = parsedMesh._flipY ?? false;
1980
2182
  mesh.updateData(splatsData, parsedShData, { flipY }, parsedPartIndices, parsedMesh.shDegree);
1981
2183
  }
2184
+ // After updateData, which rebuilds the point-splatting state from the restored splats.
2185
+ if (parsedMesh.pointSplattingScale !== undefined) {
2186
+ mesh.pointSplattingScale = parsedMesh.pointSplattingScale;
2187
+ }
2188
+ if (parsedMesh.pointSplattingRenderScale !== undefined) {
2189
+ mesh.pointSplattingRenderScale = parsedMesh.pointSplattingRenderScale;
2190
+ }
2191
+ if (parsedMesh.pointSplattingOcclusionCulling !== undefined) {
2192
+ mesh.pointSplattingOcclusionCulling = parsedMesh.pointSplattingOcclusionCulling;
2193
+ }
2194
+ // Only assign when enabled: the setters warn when the optional point-splatting module is absent.
2195
+ if (parsedMesh.pointSplattingRenderMode) {
2196
+ mesh.pointSplattingRenderMode = true;
2197
+ }
2198
+ if (parsedMesh.pointSplattingDepthRenderMode) {
2199
+ mesh.pointSplattingDepthRenderMode = true;
2200
+ }
1982
2201
  if (parsedMesh.partProxies) {
1983
2202
  for (const serializedPart of parsedMesh.partProxies) {
1984
2203
  const part = Object.assign({}, serializedPart);