@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
@@ -1,5 +1,6 @@
1
1
  /** This file must only contain pure code and pure imports */
2
2
  import { ColorGradient, Color3Gradient, GradientHelper } from "../Misc/gradients.js";
3
+ import { Logger } from "../Misc/logger.js";
3
4
  import { Observable } from "../Misc/observable.pure.js";
4
5
  import { Vector3, Matrix, TmpVectors } from "../Maths/math.vector.pure.js";
5
6
  import { VertexBuffer, Buffer } from "../Buffers/buffer.pure.js";
@@ -270,6 +271,13 @@ export class ThinParticleSystem extends BaseParticleSystem {
270
271
  return;
271
272
  }
272
273
  this._noiseTexture = value ?? null;
274
+ // Invalidate the cached readback: a buffer and its dimensions must always come from the same texture.
275
+ this._noiseTextureSize = null;
276
+ this._noiseTextureData = null;
277
+ // A pending readback belongs to the previous assignment: discard its completion and free the gate.
278
+ this._noiseTextureFetchToken++;
279
+ this._noiseTextureFetchInFlight = null;
280
+ this._noiseTextureFetchInternalTexture = null;
273
281
  if (!value) {
274
282
  if (this._noiseCreation) {
275
283
  _RemoveFromQueue(this._noiseCreation);
@@ -339,6 +347,10 @@ export class ThinParticleSystem extends BaseParticleSystem {
339
347
  this._noiseTextureSize = null;
340
348
  /** @internal */
341
349
  this._noiseTextureData = null;
350
+ this._noiseTextureFetchInFlight = null;
351
+ this._noiseTextureFetchInternalTexture = null;
352
+ this._noiseTextureFetchToken = 0;
353
+ this._noiseTextureReadbackFailureLogged = false;
342
354
  this._particles = new Array();
343
355
  this._stockParticles = new Array();
344
356
  this._newPartsExcess = 0;
@@ -532,13 +544,55 @@ export class ThinParticleSystem extends BaseParticleSystem {
532
544
  this.particleEmitterType = new BoxParticleEmitter();
533
545
  // Update
534
546
  this.updateFunction = (particles) => {
535
- if (this.noiseTexture) {
536
- // We need to get texture data back to CPU
537
- this._noiseTextureSize = this.noiseTexture.getSize();
538
- // eslint-disable-next-line @typescript-eslint/no-floating-promises, github/no-then
539
- this.noiseTexture.getContent()?.then((data) => {
540
- this._noiseTextureData = data;
541
- });
547
+ const noiseTexture = this.noiseTexture;
548
+ const noiseInternalTexture = noiseTexture?.getInternalTexture() ?? null;
549
+ if (noiseTexture && (this._noiseTextureFetchInFlight !== noiseTexture || this._noiseTextureFetchInternalTexture !== noiseInternalTexture)) {
550
+ // One readback per render target in flight to avoid piling up a promise per frame.
551
+ const noiseContent = noiseTexture.getContent();
552
+ if (noiseContent) {
553
+ const textureSize = noiseTexture.getSize();
554
+ // getSize() returns a shared object: snapshot it so a later resize cannot mutate the published pair.
555
+ const noiseSize = { width: textureSize.width, height: textureSize.height };
556
+ // Gate completions on a per-request token: texture identity cannot tell two readbacks apart.
557
+ const fetchToken = ++this._noiseTextureFetchToken;
558
+ this._noiseTextureFetchInFlight = noiseTexture;
559
+ this._noiseTextureFetchInternalTexture = noiseInternalTexture;
560
+ // eslint-disable-next-line github/no-then
561
+ noiseContent.then((data) => {
562
+ if (this._noiseTextureFetchToken !== fetchToken) {
563
+ // Superseded by a newer readback.
564
+ return;
565
+ }
566
+ this._noiseTextureFetchInFlight = null;
567
+ this._noiseTextureFetchInternalTexture = null;
568
+ if (this.noiseTexture !== noiseTexture || noiseTexture.getInternalTexture() !== noiseInternalTexture) {
569
+ // Reassigned or resized while pending: discard the stale buffer.
570
+ return;
571
+ }
572
+ this._noiseTextureReadbackFailureLogged = false;
573
+ const buffer = data;
574
+ if (buffer.length !== noiseSize.width * noiseSize.height * 4) {
575
+ // Buffer for another size (texture resized while pending): retry on the next update.
576
+ return;
577
+ }
578
+ this._noiseTextureSize = noiseSize;
579
+ this._noiseTextureData = buffer;
580
+ }, () => {
581
+ if (this._noiseTextureFetchToken !== fetchToken) {
582
+ return;
583
+ }
584
+ this._noiseTextureFetchInFlight = null;
585
+ this._noiseTextureFetchInternalTexture = null;
586
+ if (this.noiseTexture !== noiseTexture || noiseTexture.getInternalTexture() !== noiseInternalTexture) {
587
+ return;
588
+ }
589
+ // Retry on the next update, reporting the failure once per streak.
590
+ if (!this._noiseTextureReadbackFailureLogged) {
591
+ this._noiseTextureReadbackFailureLogged = true;
592
+ Logger.Warn(`Noise texture readback failed for "${noiseTexture.name}"; it will be retried on the next update`);
593
+ }
594
+ });
595
+ }
542
596
  }
543
597
  const sameParticleArray = particles === this._particles;
544
598
  for (let index = 0; index < particles.length; index++) {
@@ -570,7 +624,9 @@ export class ThinParticleSystem extends BaseParticleSystem {
570
624
  // Recycle by swapping with last particle
571
625
  this._emitFromParticle(particle);
572
626
  if (particle._properties.attachedSubEmitters) {
573
- for (const subEmitter of particle._properties.attachedSubEmitters) {
627
+ const attachedSubEmitters = particle._properties.attachedSubEmitters;
628
+ for (let subEmitterIndex = 0; subEmitterIndex < attachedSubEmitters.length; subEmitterIndex++) {
629
+ const subEmitter = attachedSubEmitters[subEmitterIndex];
574
630
  subEmitter.particleSystem.disposeOnStop = true;
575
631
  subEmitter.particleSystem.stop();
576
632
  }
@@ -1427,7 +1483,12 @@ export class ThinParticleSystem extends BaseParticleSystem {
1427
1483
  }
1428
1484
  else {
1429
1485
  const emitterPosition = this.emitter;
1430
- this._emitterWorldMatrix = Matrix.Translation(emitterPosition.x, emitterPosition.y, emitterPosition.z);
1486
+ // Owned matrix: _emitterWorldMatrix may alias a live mesh world matrix after an emitter switch.
1487
+ if (!this._emitterTranslationMatrix) {
1488
+ this._emitterTranslationMatrix = new Matrix();
1489
+ }
1490
+ Matrix.TranslationToRef(emitterPosition.x, emitterPosition.y, emitterPosition.z, this._emitterTranslationMatrix);
1491
+ this._emitterWorldMatrix = this._emitterTranslationMatrix;
1431
1492
  }
1432
1493
  this._emitterWorldMatrix.invertToRef(this._emitterInverseWorldMatrix);
1433
1494
  this.updateFunction(this._particles);