@onerjs/core 8.56.4 → 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 (722) hide show
  1. package/Animations/animatable.core.js +36 -0
  2. package/Animations/animatable.core.js.map +1 -1
  3. package/Animations/animationGroup.pure.d.ts +61 -1
  4. package/Animations/animationGroup.pure.js +191 -2
  5. package/Animations/animationGroup.pure.js.map +1 -1
  6. package/Animations/index.d.ts +1 -0
  7. package/Animations/index.js +1 -0
  8. package/Animations/index.js.map +1 -1
  9. package/Animations/pure.d.ts +1 -0
  10. package/Animations/pure.js +1 -0
  11. package/Animations/pure.js.map +1 -1
  12. package/Animations/rootMotion.d.ts +560 -0
  13. package/Animations/rootMotion.js +1709 -0
  14. package/Animations/rootMotion.js.map +1 -0
  15. package/Animations/runtimeAnimation.d.ts +57 -0
  16. package/Animations/runtimeAnimation.js +127 -3
  17. package/Animations/runtimeAnimation.js.map +1 -1
  18. package/Cameras/arcRotateCamera.pure.d.ts +2 -0
  19. package/Cameras/arcRotateCamera.pure.js +2 -0
  20. package/Cameras/arcRotateCamera.pure.js.map +1 -1
  21. package/Cameras/targetCamera.pure.d.ts +2 -0
  22. package/Cameras/targetCamera.pure.js +13 -2
  23. package/Cameras/targetCamera.pure.js.map +1 -1
  24. package/Collisions/gpuPicker.js +5 -5
  25. package/Collisions/gpuPicker.js.map +1 -1
  26. package/Engines/AbstractEngine/abstractEngine.query.pure.js +4 -2
  27. package/Engines/AbstractEngine/abstractEngine.query.pure.js.map +1 -1
  28. package/Engines/AbstractEngine/abstractEngine.query.types.d.ts +11 -2
  29. package/Engines/AbstractEngine/abstractEngine.query.types.js.map +1 -1
  30. package/Engines/AbstractEngine/abstractEngine.renderPass.pure.js +1 -0
  31. package/Engines/AbstractEngine/abstractEngine.renderPass.pure.js.map +1 -1
  32. package/Engines/Extensions/engine.multiRender.pure.js +63 -0
  33. package/Engines/Extensions/engine.multiRender.pure.js.map +1 -1
  34. package/Engines/Extensions/engine.multiRender.types.d.ts +13 -0
  35. package/Engines/Extensions/engine.multiRender.types.js.map +1 -1
  36. package/Engines/Extensions/engine.prefilteredCubeTexture.pure.js +2 -2
  37. package/Engines/Extensions/engine.prefilteredCubeTexture.pure.js.map +1 -1
  38. package/Engines/Extensions/engine.prefilteredCubeTexture.types.d.ts +2 -1
  39. package/Engines/Extensions/engine.prefilteredCubeTexture.types.js.map +1 -1
  40. package/Engines/Extensions/index.d.ts +1 -0
  41. package/Engines/Extensions/index.js +1 -0
  42. package/Engines/Extensions/index.js.map +1 -1
  43. package/Engines/Extensions/pure.d.ts +1 -1
  44. package/Engines/Extensions/pure.js +1 -1
  45. package/Engines/Extensions/pure.js.map +1 -1
  46. package/Engines/Native/Extensions/nativeEngine.cubeTexture.pure.js +88 -39
  47. package/Engines/Native/Extensions/nativeEngine.cubeTexture.pure.js.map +1 -1
  48. package/Engines/Native/Extensions/nativeEngine.cubeTexture.types.d.ts +20 -2
  49. package/Engines/Native/Extensions/nativeEngine.cubeTexture.types.js.map +1 -1
  50. package/Engines/Native/nativeHardwareTexture.d.ts +8 -1
  51. package/Engines/Native/nativeHardwareTexture.js +7 -0
  52. package/Engines/Native/nativeHardwareTexture.js.map +1 -1
  53. package/Engines/Native/nativeHelpers.js +56 -1
  54. package/Engines/Native/nativeHelpers.js.map +1 -1
  55. package/Engines/Native/nativeInterfaces.d.ts +37 -8
  56. package/Engines/Native/nativeInterfaces.js.map +1 -1
  57. package/Engines/Native/nativeRenderTargetWrapper.d.ts +40 -0
  58. package/Engines/Native/nativeRenderTargetWrapper.js +265 -5
  59. package/Engines/Native/nativeRenderTargetWrapper.js.map +1 -1
  60. package/Engines/Processors/shaderCodeCursor.d.ts +1 -0
  61. package/Engines/Processors/shaderCodeCursor.js +40 -3
  62. package/Engines/Processors/shaderCodeCursor.js.map +1 -1
  63. package/Engines/WebGPU/Extensions/engine.multiRender.pure.js +4 -0
  64. package/Engines/WebGPU/Extensions/engine.multiRender.pure.js.map +1 -1
  65. package/Engines/WebGPU/Extensions/engine.multiRender.types.d.ts +13 -0
  66. package/Engines/WebGPU/Extensions/engine.multiRender.types.js.map +1 -1
  67. package/Engines/WebGPU/Extensions/engine.query.pure.js +11 -3
  68. package/Engines/WebGPU/Extensions/engine.query.pure.js.map +1 -1
  69. package/Engines/WebGPU/Extensions/engine.renderTarget.pure.js +1 -0
  70. package/Engines/WebGPU/Extensions/engine.renderTarget.pure.js.map +1 -1
  71. package/Engines/WebGPU/Extensions/index.d.ts +1 -0
  72. package/Engines/WebGPU/Extensions/index.js +1 -0
  73. package/Engines/WebGPU/Extensions/index.js.map +1 -1
  74. package/Engines/WebGPU/Extensions/pure.d.ts +1 -1
  75. package/Engines/WebGPU/Extensions/pure.js +1 -1
  76. package/Engines/WebGPU/Extensions/pure.js.map +1 -1
  77. package/Engines/WebGPU/webgpuBundleList.d.ts +2 -0
  78. package/Engines/WebGPU/webgpuBundleList.js +4 -0
  79. package/Engines/WebGPU/webgpuBundleList.js.map +1 -1
  80. package/Engines/WebGPU/webgpuCacheRenderPipeline.js +5 -2
  81. package/Engines/WebGPU/webgpuCacheRenderPipeline.js.map +1 -1
  82. package/Engines/WebGPU/webgpuHardwareTexture.js +3 -1
  83. package/Engines/WebGPU/webgpuHardwareTexture.js.map +1 -1
  84. package/Engines/WebGPU/webgpuOcclusionQuery.js +1 -1
  85. package/Engines/WebGPU/webgpuOcclusionQuery.js.map +1 -1
  86. package/Engines/WebGPU/webgpuSnapshotRendering.d.ts +4 -0
  87. package/Engines/WebGPU/webgpuSnapshotRendering.js +40 -7
  88. package/Engines/WebGPU/webgpuSnapshotRendering.js.map +1 -1
  89. package/Engines/WebGPU/webgpuTextureHelper.d.ts +1 -1
  90. package/Engines/WebGPU/webgpuTextureHelper.js +2 -2
  91. package/Engines/WebGPU/webgpuTextureHelper.js.map +1 -1
  92. package/Engines/WebGPU/webgpuTextureManager.d.ts +2 -0
  93. package/Engines/WebGPU/webgpuTextureManager.js +286 -13
  94. package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
  95. package/Engines/abstractEngine.pure.d.ts +17 -1
  96. package/Engines/abstractEngine.pure.js +17 -5
  97. package/Engines/abstractEngine.pure.js.map +1 -1
  98. package/Engines/constants.d.ts +4 -0
  99. package/Engines/constants.js +4 -0
  100. package/Engines/constants.js.map +1 -1
  101. package/Engines/engine.pure.d.ts +0 -1
  102. package/Engines/engine.pure.js +0 -7
  103. package/Engines/engine.pure.js.map +1 -1
  104. package/Engines/nativeEngine.pure.js +1 -1
  105. package/Engines/nativeEngine.pure.js.map +1 -1
  106. package/Engines/thinEngine.pure.d.ts +15 -0
  107. package/Engines/thinEngine.pure.js +61 -14
  108. package/Engines/thinEngine.pure.js.map +1 -1
  109. package/Engines/thinNativeEngine.pure.d.ts +218 -17
  110. package/Engines/thinNativeEngine.pure.js +1438 -165
  111. package/Engines/thinNativeEngine.pure.js.map +1 -1
  112. package/Engines/thinWebGPUEngine.d.ts +4 -0
  113. package/Engines/thinWebGPUEngine.js +16 -2
  114. package/Engines/thinWebGPUEngine.js.map +1 -1
  115. package/Engines/webgpuEngine.pure.d.ts +17 -3
  116. package/Engines/webgpuEngine.pure.js +56 -13
  117. package/Engines/webgpuEngine.pure.js.map +1 -1
  118. package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.pure.js +2 -2
  119. package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.pure.js.map +1 -1
  120. package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.d.ts +10 -0
  121. package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.js +24 -12
  122. package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.js.map +1 -1
  123. package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.pure.d.ts +11 -2
  124. package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.pure.js +1 -1
  125. package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.pure.js.map +1 -1
  126. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.pure.d.ts +7 -0
  127. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.pure.js +43 -0
  128. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.pure.js.map +1 -1
  129. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.pure.d.ts +9 -1
  130. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.pure.js +6 -8
  131. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.pure.js.map +1 -1
  132. package/FlowGraph/Blocks/Event/flowGraphPointerOutEventBlock.pure.d.ts +2 -0
  133. package/FlowGraph/Blocks/Event/flowGraphPointerOutEventBlock.pure.js +5 -1
  134. package/FlowGraph/Blocks/Event/flowGraphPointerOutEventBlock.pure.js.map +1 -1
  135. package/FlowGraph/Blocks/Event/flowGraphPointerOverEventBlock.pure.d.ts +2 -0
  136. package/FlowGraph/Blocks/Event/flowGraphPointerOverEventBlock.pure.js +5 -1
  137. package/FlowGraph/Blocks/Event/flowGraphPointerOverEventBlock.pure.js.map +1 -1
  138. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.pure.d.ts +9 -0
  139. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.pure.js +34 -9
  140. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.pure.js.map +1 -1
  141. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.pure.d.ts +2 -0
  142. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.pure.js +4 -0
  143. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.pure.js.map +1 -1
  144. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.d.ts +18 -4
  145. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.js +24 -6
  146. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.js.map +1 -1
  147. package/FlowGraph/Blocks/Event/flowGraphSendCustomEventBlock.pure.js +19 -7
  148. package/FlowGraph/Blocks/Event/flowGraphSendCustomEventBlock.pure.js.map +1 -1
  149. package/FlowGraph/Blocks/Execution/Animation/flowGraphInterpolationBlock.pure.js +3 -3
  150. package/FlowGraph/Blocks/Execution/Animation/flowGraphInterpolationBlock.pure.js.map +1 -1
  151. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.d.ts +20 -2
  152. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.js +85 -25
  153. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.js.map +1 -1
  154. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.pure.d.ts +16 -1
  155. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.pure.js +64 -14
  156. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.pure.js.map +1 -1
  157. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.d.ts +12 -1
  158. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.js +8 -0
  159. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.js.map +1 -1
  160. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.pure.js +4 -1
  161. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.pure.js.map +1 -1
  162. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.pure.d.ts +12 -1
  163. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.pure.js +5 -1
  164. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.pure.js.map +1 -1
  165. package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.pure.js +64 -16
  166. package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.pure.js.map +1 -1
  167. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.pure.d.ts +2 -0
  168. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.pure.js +14 -2
  169. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.pure.js.map +1 -1
  170. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.pure.d.ts +5 -1
  171. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.pure.js +23 -8
  172. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.pure.js.map +1 -1
  173. package/FlowGraph/CustomTypes/flowGraphInteger.pure.d.ts +5 -0
  174. package/FlowGraph/CustomTypes/flowGraphInteger.pure.js +7 -0
  175. package/FlowGraph/CustomTypes/flowGraphInteger.pure.js.map +1 -1
  176. package/FlowGraph/CustomTypes/flowGraphMatrix.d.ts +10 -0
  177. package/FlowGraph/CustomTypes/flowGraphMatrix.js +14 -0
  178. package/FlowGraph/CustomTypes/flowGraphMatrix.js.map +1 -1
  179. package/FlowGraph/flowGraph.d.ts +6 -1
  180. package/FlowGraph/flowGraph.js +41 -9
  181. package/FlowGraph/flowGraph.js.map +1 -1
  182. package/FlowGraph/flowGraphAnimationHelpers.d.ts +24 -0
  183. package/FlowGraph/flowGraphAnimationHelpers.js +21 -0
  184. package/FlowGraph/flowGraphAnimationHelpers.js.map +1 -0
  185. package/FlowGraph/flowGraphBlock.js +3 -0
  186. package/FlowGraph/flowGraphBlock.js.map +1 -1
  187. package/FlowGraph/flowGraphConnection.d.ts +7 -0
  188. package/FlowGraph/flowGraphConnection.js +7 -0
  189. package/FlowGraph/flowGraphConnection.js.map +1 -1
  190. package/FlowGraph/flowGraphContext.d.ts +2 -1
  191. package/FlowGraph/flowGraphContext.js +5 -3
  192. package/FlowGraph/flowGraphContext.js.map +1 -1
  193. package/FlowGraph/flowGraphCoordinator.d.ts +15 -1
  194. package/FlowGraph/flowGraphCoordinator.js +47 -16
  195. package/FlowGraph/flowGraphCoordinator.js.map +1 -1
  196. package/FlowGraph/flowGraphEventBlock.d.ts +5 -0
  197. package/FlowGraph/flowGraphEventBlock.js +7 -0
  198. package/FlowGraph/flowGraphEventBlock.js.map +1 -1
  199. package/FlowGraph/flowGraphHostResolver.d.ts +2 -1
  200. package/FlowGraph/flowGraphHostResolver.js.map +1 -1
  201. package/FlowGraph/flowGraphParser.js +60 -2
  202. package/FlowGraph/flowGraphParser.js.map +1 -1
  203. package/FlowGraph/flowGraphValidator.js +0 -4
  204. package/FlowGraph/flowGraphValidator.js.map +1 -1
  205. package/FlowGraph/index.d.ts +2 -0
  206. package/FlowGraph/index.js +2 -0
  207. package/FlowGraph/index.js.map +1 -1
  208. package/FlowGraph/pure.d.ts +2 -0
  209. package/FlowGraph/pure.js +2 -0
  210. package/FlowGraph/pure.js.map +1 -1
  211. package/FlowGraph/serialization.d.ts +4 -2
  212. package/FlowGraph/serialization.js +12 -24
  213. package/FlowGraph/serialization.js.map +1 -1
  214. package/FlowGraph/typeDefinitions.d.ts +9 -1
  215. package/FlowGraph/typeDefinitions.js.map +1 -1
  216. package/FrameGraph/Node/Blocks/PostProcesses/meshBlendingPostProcessBlock.d.ts +5 -0
  217. package/FrameGraph/Node/Blocks/PostProcesses/meshBlendingPostProcessBlock.js +8 -0
  218. package/FrameGraph/Node/Blocks/PostProcesses/meshBlendingPostProcessBlock.js.map +1 -0
  219. package/FrameGraph/Node/Blocks/PostProcesses/meshBlendingPostProcessBlock.pure.d.ts +87 -0
  220. package/FrameGraph/Node/Blocks/PostProcesses/meshBlendingPostProcessBlock.pure.js +295 -0
  221. package/FrameGraph/Node/Blocks/PostProcesses/meshBlendingPostProcessBlock.pure.js.map +1 -0
  222. package/FrameGraph/Node/Blocks/PostProcesses/pure.d.ts +1 -0
  223. package/FrameGraph/Node/Blocks/PostProcesses/pure.js +1 -0
  224. package/FrameGraph/Node/Blocks/PostProcesses/pure.js.map +1 -1
  225. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js +4 -4
  226. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js.map +1 -1
  227. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.pure.d.ts +5 -1
  228. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.pure.js +13 -1
  229. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.pure.js.map +1 -1
  230. package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.d.ts +1 -0
  231. package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.js +4 -0
  232. package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.js.map +1 -0
  233. package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.pure.d.ts +54 -0
  234. package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.pure.js +155 -0
  235. package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.pure.js.map +1 -0
  236. package/FrameGraph/Node/Blocks/Textures/pure.d.ts +1 -0
  237. package/FrameGraph/Node/Blocks/Textures/pure.js +1 -0
  238. package/FrameGraph/Node/Blocks/Textures/pure.js.map +1 -1
  239. package/FrameGraph/Node/Blocks/allBlocks.pure.js +4 -0
  240. package/FrameGraph/Node/Blocks/allBlocks.pure.js.map +1 -1
  241. package/FrameGraph/Node/Blocks/index.d.ts +2 -0
  242. package/FrameGraph/Node/Blocks/index.js +2 -0
  243. package/FrameGraph/Node/Blocks/index.js.map +1 -1
  244. package/FrameGraph/Node/Blocks/inputBlock.pure.js +20 -1
  245. package/FrameGraph/Node/Blocks/inputBlock.pure.js.map +1 -1
  246. package/FrameGraph/Node/Blocks/pure.d.ts +2 -0
  247. package/FrameGraph/Node/Blocks/pure.js +2 -0
  248. package/FrameGraph/Node/Blocks/pure.js.map +1 -1
  249. package/FrameGraph/Node/Types/nodeRenderGraphTypes.d.ts +4 -2
  250. package/FrameGraph/Node/Types/nodeRenderGraphTypes.js +4 -2
  251. package/FrameGraph/Node/Types/nodeRenderGraphTypes.js.map +1 -1
  252. package/FrameGraph/Node/nodeRenderGraph.js +1 -1
  253. package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
  254. package/FrameGraph/Tasks/Layers/selectionOutlineTask.js +1 -0
  255. package/FrameGraph/Tasks/Layers/selectionOutlineTask.js.map +1 -1
  256. package/FrameGraph/Tasks/Misc/cullObjectsTask.js +5 -1
  257. package/FrameGraph/Tasks/Misc/cullObjectsTask.js.map +1 -1
  258. package/FrameGraph/Tasks/Misc/lightingVolumeTask.js +1 -0
  259. package/FrameGraph/Tasks/Misc/lightingVolumeTask.js.map +1 -1
  260. package/FrameGraph/Tasks/Misc/minMaxReducerTask.d.ts +62 -0
  261. package/FrameGraph/Tasks/Misc/minMaxReducerTask.js +159 -0
  262. package/FrameGraph/Tasks/Misc/minMaxReducerTask.js.map +1 -0
  263. package/FrameGraph/Tasks/PostProcesses/meshBlendingTask.d.ts +69 -0
  264. package/FrameGraph/Tasks/PostProcesses/meshBlendingTask.js +223 -0
  265. package/FrameGraph/Tasks/PostProcesses/meshBlendingTask.js.map +1 -0
  266. package/FrameGraph/Tasks/Rendering/geometryRendererTask.d.ts +25 -3
  267. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js +72 -34
  268. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js.map +1 -1
  269. package/FrameGraph/Tasks/Rendering/objectRendererTask.js +3 -1
  270. package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -1
  271. package/FrameGraph/frameGraph.d.ts +4 -0
  272. package/FrameGraph/frameGraph.js +14 -0
  273. package/FrameGraph/frameGraph.js.map +1 -1
  274. package/FrameGraph/frameGraphObjectList.d.ts +6 -1
  275. package/FrameGraph/frameGraphObjectList.js.map +1 -1
  276. package/FrameGraph/frameGraphRenderContext.d.ts +3 -1
  277. package/FrameGraph/frameGraphRenderContext.js +5 -5
  278. package/FrameGraph/frameGraphRenderContext.js.map +1 -1
  279. package/FrameGraph/index.d.ts +2 -0
  280. package/FrameGraph/index.js +2 -0
  281. package/FrameGraph/index.js.map +1 -1
  282. package/FrameGraph/pure.d.ts +2 -0
  283. package/FrameGraph/pure.js +2 -0
  284. package/FrameGraph/pure.js.map +1 -1
  285. package/Inputs/scene.inputManager.d.ts +4 -0
  286. package/Inputs/scene.inputManager.js +50 -8
  287. package/Inputs/scene.inputManager.js.map +1 -1
  288. package/Lights/Clustered/clusteredLightingSceneComponent.pure.d.ts +5 -0
  289. package/Lights/Clustered/clusteredLightingSceneComponent.pure.js +22 -1
  290. package/Lights/Clustered/clusteredLightingSceneComponent.pure.js.map +1 -1
  291. package/Lights/Shadows/cascadedShadowGenerator.pure.js +7 -3
  292. package/Lights/Shadows/cascadedShadowGenerator.pure.js.map +1 -1
  293. package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.d.ts +7 -0
  294. package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.js +8 -0
  295. package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.js.map +1 -0
  296. package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.pure.d.ts +54 -0
  297. package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.pure.js +81 -0
  298. package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.pure.js.map +1 -0
  299. package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.d.ts +7 -0
  300. package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.js +8 -0
  301. package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.js.map +1 -0
  302. package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.pure.d.ts +60 -0
  303. package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.pure.js +90 -0
  304. package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.pure.js.map +1 -0
  305. package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.d.ts +31 -0
  306. package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.js +103 -5
  307. package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.js.map +1 -1
  308. package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js +6 -6
  309. package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js.map +1 -1
  310. package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.d.ts +26 -1
  311. package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js +153 -49
  312. package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js.map +1 -1
  313. package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.d.ts +1 -0
  314. package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.js +4 -0
  315. package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.js.map +1 -0
  316. package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.pure.d.ts +83 -0
  317. package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.pure.js +191 -0
  318. package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.pure.js.map +1 -0
  319. package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.d.ts +1 -0
  320. package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.js +4 -0
  321. package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.js.map +1 -0
  322. package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.pure.d.ts +62 -0
  323. package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.pure.js +125 -0
  324. package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.pure.js.map +1 -0
  325. package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.js +5 -5
  326. package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.js.map +1 -1
  327. package/Materials/GaussianSplatting/pure.d.ts +4 -0
  328. package/Materials/GaussianSplatting/pure.js +4 -0
  329. package/Materials/GaussianSplatting/pure.js.map +1 -1
  330. package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.d.ts +1 -0
  331. package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.js +12 -0
  332. package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.js.map +1 -1
  333. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.pure.js +11 -1
  334. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.pure.js.map +1 -1
  335. package/Materials/Node/Blocks/Fragment/prePassOutputBlock.pure.js +17 -2
  336. package/Materials/Node/Blocks/Fragment/prePassOutputBlock.pure.js.map +1 -1
  337. package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.pure.js +2 -2
  338. package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.pure.js.map +1 -1
  339. package/Materials/Node/nodeMaterial.pure.d.ts +4 -0
  340. package/Materials/Node/nodeMaterial.pure.js +4 -0
  341. package/Materials/Node/nodeMaterial.pure.js.map +1 -1
  342. package/Materials/Node/nodeMaterialBuildState.d.ts +1 -1
  343. package/Materials/Node/nodeMaterialBuildState.js +25 -3
  344. package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
  345. package/Materials/PBR/openpbrMaterial.pure.d.ts +2 -0
  346. package/Materials/PBR/pbrBaseMaterial.pure.d.ts +2 -0
  347. package/Materials/Textures/Procedurals/proceduralTexture.pure.d.ts +14 -14
  348. package/Materials/Textures/Procedurals/proceduralTexture.pure.js +37 -13
  349. package/Materials/Textures/Procedurals/proceduralTexture.pure.js.map +1 -1
  350. package/Materials/Textures/baseTexture.pure.js +3 -0
  351. package/Materials/Textures/baseTexture.pure.js.map +1 -1
  352. package/Materials/Textures/cubeTexture.pure.js +1 -1
  353. package/Materials/Textures/cubeTexture.pure.js.map +1 -1
  354. package/Materials/Textures/internalTexture.d.ts +8 -1
  355. package/Materials/Textures/internalTexture.js +9 -2
  356. package/Materials/Textures/internalTexture.js.map +1 -1
  357. package/Materials/Textures/mirrorTexture.pure.js +3 -1
  358. package/Materials/Textures/mirrorTexture.pure.js.map +1 -1
  359. package/Materials/Textures/rawTexture2DArray.functions.d.ts +3 -3
  360. package/Materials/Textures/rawTexture2DArray.functions.js.map +1 -1
  361. package/Materials/Textures/rawTexture3D.d.ts +1 -1
  362. package/Materials/Textures/rawTexture3D.js +1 -1
  363. package/Materials/Textures/rawTexture3D.js.map +1 -1
  364. package/Materials/Textures/texture.pure.js +1 -1
  365. package/Materials/Textures/texture.pure.js.map +1 -1
  366. package/Materials/Textures/textureHelper.functions.d.ts +14 -0
  367. package/Materials/Textures/textureHelper.functions.js +24 -0
  368. package/Materials/Textures/textureHelper.functions.js.map +1 -1
  369. package/Materials/ditheredTileFadeMaterialPlugin.d.ts +210 -0
  370. package/Materials/ditheredTileFadeMaterialPlugin.js +509 -0
  371. package/Materials/ditheredTileFadeMaterialPlugin.js.map +1 -0
  372. package/Materials/effectRenderer.pure.d.ts +4 -0
  373. package/Materials/effectRenderer.pure.js +3 -2
  374. package/Materials/effectRenderer.pure.js.map +1 -1
  375. package/Materials/index.d.ts +5 -0
  376. package/Materials/index.js +5 -0
  377. package/Materials/index.js.map +1 -1
  378. package/Materials/material.pure.js +25 -12
  379. package/Materials/material.pure.js.map +1 -1
  380. package/Materials/materialHelper.geometryrendering.d.ts +46 -1
  381. package/Materials/materialHelper.geometryrendering.js +105 -8
  382. package/Materials/materialHelper.geometryrendering.js.map +1 -1
  383. package/Materials/prepass.defines.d.ts +2 -0
  384. package/Materials/prepass.defines.js +2 -0
  385. package/Materials/prepass.defines.js.map +1 -1
  386. package/Materials/pure.d.ts +5 -0
  387. package/Materials/pure.js +5 -0
  388. package/Materials/pure.js.map +1 -1
  389. package/Materials/standardMaterial.pure.d.ts +10 -0
  390. package/Materials/standardMaterial.pure.js +30 -5
  391. package/Materials/standardMaterial.pure.js.map +1 -1
  392. package/Meshes/Builders/polygonBuilder.pure.d.ts +4 -0
  393. package/Meshes/Builders/polygonBuilder.pure.js +3 -0
  394. package/Meshes/Builders/polygonBuilder.pure.js.map +1 -1
  395. package/Meshes/GaussianSplatting/gaussianPointSplattingController.d.ts +8 -0
  396. package/Meshes/GaussianSplatting/gaussianPointSplattingController.js +11 -0
  397. package/Meshes/GaussianSplatting/gaussianPointSplattingController.js.map +1 -0
  398. package/Meshes/GaussianSplatting/gaussianPointSplattingController.pure.d.ts +231 -0
  399. package/Meshes/GaussianSplatting/gaussianPointSplattingController.pure.js +1212 -0
  400. package/Meshes/GaussianSplatting/gaussianPointSplattingController.pure.js.map +1 -0
  401. package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.d.ts +14 -0
  402. package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.js +15 -0
  403. package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.js.map +1 -0
  404. package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.pure.d.ts +285 -0
  405. package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.pure.js +812 -0
  406. package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.pure.js.map +1 -0
  407. package/Meshes/GaussianSplatting/gaussianSplatting.functions.d.ts +19 -0
  408. package/Meshes/GaussianSplatting/gaussianSplatting.functions.js +23 -0
  409. package/Meshes/GaussianSplatting/gaussianSplatting.functions.js.map +1 -0
  410. package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +1 -0
  411. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +2 -0
  412. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
  413. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.d.ts +163 -14
  414. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +239 -24
  415. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
  416. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +34 -4
  417. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +125 -25
  418. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
  419. package/Meshes/GaussianSplatting/pure.d.ts +2 -0
  420. package/Meshes/GaussianSplatting/pure.js +2 -0
  421. package/Meshes/GaussianSplatting/pure.js.map +1 -1
  422. package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js +25 -11
  423. package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js.map +1 -1
  424. package/Meshes/abstractMesh.pure.d.ts +30 -0
  425. package/Meshes/abstractMesh.pure.js +54 -0
  426. package/Meshes/abstractMesh.pure.js.map +1 -1
  427. package/Meshes/index.d.ts +2 -0
  428. package/Meshes/index.js +2 -0
  429. package/Meshes/index.js.map +1 -1
  430. package/Meshes/instancedMesh.pure.d.ts +5 -0
  431. package/Meshes/instancedMesh.pure.js +12 -0
  432. package/Meshes/instancedMesh.pure.js.map +1 -1
  433. package/Meshes/mesh.pure.js +23 -8
  434. package/Meshes/mesh.pure.js.map +1 -1
  435. package/Meshes/meshBlendingTag.d.ts +47 -0
  436. package/Meshes/meshBlendingTag.js +64 -0
  437. package/Meshes/meshBlendingTag.js.map +1 -0
  438. package/Meshes/polygonMesh.js +2 -2
  439. package/Meshes/polygonMesh.js.map +1 -1
  440. package/Meshes/pure.d.ts +2 -0
  441. package/Meshes/pure.js +2 -0
  442. package/Meshes/pure.js.map +1 -1
  443. package/Meshes/subMesh.pure.d.ts +11 -2
  444. package/Meshes/subMesh.pure.js +20 -5
  445. package/Meshes/subMesh.pure.js.map +1 -1
  446. package/Meshes/thinInstanceMesh.pure.js +1 -0
  447. package/Meshes/thinInstanceMesh.pure.js.map +1 -1
  448. package/Misc/andOrNotEvaluator.js +4 -0
  449. package/Misc/andOrNotEvaluator.js.map +1 -1
  450. package/Misc/fileTools.pure.js +21 -0
  451. package/Misc/fileTools.pure.js.map +1 -1
  452. package/Misc/minMaxReducer.pure.d.ts +6 -0
  453. package/Misc/minMaxReducer.pure.js +10 -0
  454. package/Misc/minMaxReducer.pure.js.map +1 -1
  455. package/Misc/snapshotRenderingHelper.js +2 -2
  456. package/Misc/snapshotRenderingHelper.js.map +1 -1
  457. package/Misc/thinMinMaxReducer.d.ts +19 -2
  458. package/Misc/thinMinMaxReducer.js +74 -21
  459. package/Misc/thinMinMaxReducer.js.map +1 -1
  460. package/Misc/tools.pure.js +1 -1
  461. package/Misc/tools.pure.js.map +1 -1
  462. package/Particles/Node/Blocks/Update/updateNoiseBlock.pure.js +19 -7
  463. package/Particles/Node/Blocks/Update/updateNoiseBlock.pure.js.map +1 -1
  464. package/Particles/Node/Blocks/particleSourceTextureBlock.pure.js +3 -2
  465. package/Particles/Node/Blocks/particleSourceTextureBlock.pure.js.map +1 -1
  466. package/Particles/gpuParticleSystem.pure.d.ts +4 -0
  467. package/Particles/gpuParticleSystem.pure.js +101 -32
  468. package/Particles/gpuParticleSystem.pure.js.map +1 -1
  469. package/Particles/particle.js +3 -2
  470. package/Particles/particle.js.map +1 -1
  471. package/Particles/solidParticleSystem.js +7 -1
  472. package/Particles/solidParticleSystem.js.map +1 -1
  473. package/Particles/thinParticleSystem.function.d.ts +6 -0
  474. package/Particles/thinParticleSystem.function.js +144 -88
  475. package/Particles/thinParticleSystem.function.js.map +1 -1
  476. package/Particles/thinParticleSystem.pure.d.ts +8 -0
  477. package/Particles/thinParticleSystem.pure.js +154 -28
  478. package/Particles/thinParticleSystem.pure.js.map +1 -1
  479. package/Particles/webgl2ParticleSystem.pure.d.ts +1 -0
  480. package/Particles/webgl2ParticleSystem.pure.js +12 -4
  481. package/Particles/webgl2ParticleSystem.pure.js.map +1 -1
  482. package/Physics/v2/ragdoll.d.ts +2 -4
  483. package/Physics/v2/ragdoll.js +11 -4
  484. package/Physics/v2/ragdoll.js.map +1 -1
  485. package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.pure.js +7 -0
  486. package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.pure.js.map +1 -1
  487. package/PostProcesses/index.d.ts +2 -0
  488. package/PostProcesses/index.js +2 -0
  489. package/PostProcesses/index.js.map +1 -1
  490. package/PostProcesses/meshBlendingBlueNoise.d.ts +15 -0
  491. package/PostProcesses/meshBlendingBlueNoise.js +77 -0
  492. package/PostProcesses/meshBlendingBlueNoise.js.map +1 -0
  493. package/PostProcesses/meshBlendingPostProcess.d.ts +131 -0
  494. package/PostProcesses/meshBlendingPostProcess.js +315 -0
  495. package/PostProcesses/meshBlendingPostProcess.js.map +1 -0
  496. package/PostProcesses/pure.d.ts +2 -0
  497. package/PostProcesses/pure.js +2 -0
  498. package/PostProcesses/pure.js.map +1 -1
  499. package/PostProcesses/thinMeshBlendingPostProcess.d.ts +339 -0
  500. package/PostProcesses/thinMeshBlendingPostProcess.js +771 -0
  501. package/PostProcesses/thinMeshBlendingPostProcess.js.map +1 -0
  502. package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js +6 -6
  503. package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js.map +1 -1
  504. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.d.ts +12 -0
  505. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js +50 -25
  506. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js.map +1 -1
  507. package/Rendering/boundingBoxRenderer.pure.js +2 -1
  508. package/Rendering/boundingBoxRenderer.pure.js.map +1 -1
  509. package/Rendering/depthRenderer.pure.d.ts +9 -0
  510. package/Rendering/depthRenderer.pure.js +15 -4
  511. package/Rendering/depthRenderer.pure.js.map +1 -1
  512. package/Rendering/edgesRenderer.pure.d.ts +4 -2
  513. package/Rendering/edgesRenderer.pure.js +11 -2
  514. package/Rendering/edgesRenderer.pure.js.map +1 -1
  515. package/Rendering/fluidRenderer/fluidRenderingObject.d.ts +14 -0
  516. package/Rendering/fluidRenderer/fluidRenderingObject.js +26 -0
  517. package/Rendering/fluidRenderer/fluidRenderingObject.js.map +1 -1
  518. package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.d.ts +13 -3
  519. package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js +22 -9
  520. package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js.map +1 -1
  521. package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js +3 -0
  522. package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js.map +1 -1
  523. package/Rendering/geometryBufferRenderer.pure.d.ts +38 -4
  524. package/Rendering/geometryBufferRenderer.pure.js +130 -18
  525. package/Rendering/geometryBufferRenderer.pure.js.map +1 -1
  526. package/Rendering/objectRenderer.d.ts +7 -1
  527. package/Rendering/objectRenderer.js +45 -7
  528. package/Rendering/objectRenderer.js.map +1 -1
  529. package/Rendering/outlineRenderer.pure.js +6 -2
  530. package/Rendering/outlineRenderer.pure.js.map +1 -1
  531. package/Rendering/prePassRenderer.pure.js +3 -3
  532. package/Rendering/prePassRenderer.pure.js.map +1 -1
  533. package/Rendering/renderingManager.d.ts +1 -1
  534. package/Rendering/renderingManager.js +5 -4
  535. package/Rendering/renderingManager.js.map +1 -1
  536. package/Shaders/ShadersInclude/defaultFragmentAlpha.d.ts +5 -0
  537. package/Shaders/ShadersInclude/defaultFragmentAlpha.js +34 -0
  538. package/Shaders/ShadersInclude/defaultFragmentAlpha.js.map +1 -0
  539. package/Shaders/ShadersInclude/gaussianSplatting.js +3 -1
  540. package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
  541. package/Shaders/ShadersInclude/gaussianSplattingVertexDeclaration.js +5 -1
  542. package/Shaders/ShadersInclude/gaussianSplattingVertexDeclaration.js.map +1 -1
  543. package/Shaders/ShadersInclude/geometryRenderingFragment.d.ts +5 -0
  544. package/Shaders/ShadersInclude/geometryRenderingFragment.js +74 -0
  545. package/Shaders/ShadersInclude/geometryRenderingFragment.js.map +1 -0
  546. package/Shaders/ShadersInclude/lightsFragmentFunctions.js +27 -3
  547. package/Shaders/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
  548. package/Shaders/ShadersInclude/mrtFragmentDeclaration.js +89 -0
  549. package/Shaders/ShadersInclude/mrtFragmentDeclaration.js.map +1 -1
  550. package/Shaders/ShadersInclude/oitDeclaration.js +1 -1
  551. package/Shaders/ShadersInclude/oitDeclaration.js.map +1 -1
  552. package/Shaders/ShadersInclude/openpbrBlockPrePass.js +24 -17
  553. package/Shaders/ShadersInclude/openpbrBlockPrePass.js.map +1 -1
  554. package/Shaders/ShadersInclude/pbrBlockPrePass.js +27 -20
  555. package/Shaders/ShadersInclude/pbrBlockPrePass.js.map +1 -1
  556. package/Shaders/ShadersInclude/pbrDebug.js +6 -2
  557. package/Shaders/ShadersInclude/pbrDebug.js.map +1 -1
  558. package/Shaders/ShadersInclude/prePassDeclaration.js +95 -2
  559. package/Shaders/ShadersInclude/prePassDeclaration.js.map +1 -1
  560. package/Shaders/default.fragment.js +31 -40
  561. package/Shaders/default.fragment.js.map +1 -1
  562. package/Shaders/depthOfField.fragment.js +13 -9
  563. package/Shaders/depthOfField.fragment.js.map +1 -1
  564. package/Shaders/fluidRenderingParticleDepth.vertex.js +16 -1
  565. package/Shaders/fluidRenderingParticleDepth.vertex.js.map +1 -1
  566. package/Shaders/fluidRenderingParticleThickness.vertex.js +16 -1
  567. package/Shaders/fluidRenderingParticleThickness.vertex.js.map +1 -1
  568. package/Shaders/gaussianSplatting.fragment.js +63 -3
  569. package/Shaders/gaussianSplatting.fragment.js.map +1 -1
  570. package/Shaders/gaussianSplatting.vertex.js +80 -0
  571. package/Shaders/gaussianSplatting.vertex.js.map +1 -1
  572. package/Shaders/geometry.fragment.js +17 -11
  573. package/Shaders/geometry.fragment.js.map +1 -1
  574. package/Shaders/gpuRenderParticles.fragment.js +43 -1
  575. package/Shaders/gpuRenderParticles.fragment.js.map +1 -1
  576. package/Shaders/gpuRenderParticles.vertex.js +96 -16
  577. package/Shaders/gpuRenderParticles.vertex.js.map +1 -1
  578. package/Shaders/meshBlending.fragment.d.ts +5 -0
  579. package/Shaders/meshBlending.fragment.js +519 -0
  580. package/Shaders/meshBlending.fragment.js.map +1 -0
  581. package/Shaders/minmaxRedux.fragment.js +6 -1
  582. package/Shaders/minmaxRedux.fragment.js.map +1 -1
  583. package/Shaders/particles.fragment.js +43 -1
  584. package/Shaders/particles.fragment.js.map +1 -1
  585. package/Shaders/particles.vertex.js +84 -3
  586. package/Shaders/particles.vertex.js.map +1 -1
  587. package/Shaders/sprites.fragment.js +52 -2
  588. package/Shaders/sprites.fragment.js.map +1 -1
  589. package/Shaders/sprites.vertex.js +62 -1
  590. package/Shaders/sprites.vertex.js.map +1 -1
  591. package/ShadersWGSL/ShadersInclude/defaultFragmentAlpha.d.ts +5 -0
  592. package/ShadersWGSL/ShadersInclude/defaultFragmentAlpha.js +33 -0
  593. package/ShadersWGSL/ShadersInclude/defaultFragmentAlpha.js.map +1 -0
  594. package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.d.ts +5 -0
  595. package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.js +65 -0
  596. package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.js.map +1 -0
  597. package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.d.ts +5 -0
  598. package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.js +17 -0
  599. package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.js.map +1 -0
  600. package/ShadersWGSL/ShadersInclude/gaussianSplatting.d.ts +1 -0
  601. package/ShadersWGSL/ShadersInclude/gaussianSplatting.js +6 -78
  602. package/ShadersWGSL/ShadersInclude/gaussianSplatting.js.map +1 -1
  603. package/ShadersWGSL/ShadersInclude/gaussianSplattingFragmentDeclaration.js +2 -2
  604. package/ShadersWGSL/ShadersInclude/gaussianSplattingFragmentDeclaration.js.map +1 -1
  605. package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.d.ts +5 -0
  606. package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.js +79 -0
  607. package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.js.map +1 -0
  608. package/ShadersWGSL/ShadersInclude/geometryRenderingFragment.d.ts +6 -0
  609. package/ShadersWGSL/ShadersInclude/geometryRenderingFragment.js +76 -0
  610. package/ShadersWGSL/ShadersInclude/geometryRenderingFragment.js.map +1 -0
  611. package/ShadersWGSL/ShadersInclude/lightFragment.js +1 -1
  612. package/ShadersWGSL/ShadersInclude/lightFragment.js.map +1 -1
  613. package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js +27 -3
  614. package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
  615. package/ShadersWGSL/ShadersInclude/meshBlendTagFragmentOutput.d.ts +5 -0
  616. package/ShadersWGSL/ShadersInclude/meshBlendTagFragmentOutput.js +18 -0
  617. package/ShadersWGSL/ShadersInclude/meshBlendTagFragmentOutput.js.map +1 -0
  618. package/ShadersWGSL/ShadersInclude/openpbrBlockPrePass.d.ts +1 -0
  619. package/ShadersWGSL/ShadersInclude/openpbrBlockPrePass.js +11 -25
  620. package/ShadersWGSL/ShadersInclude/openpbrBlockPrePass.js.map +1 -1
  621. package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.d.ts +1 -0
  622. package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.js +11 -25
  623. package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.js.map +1 -1
  624. package/ShadersWGSL/ShadersInclude/pbrDebug.js +5 -1
  625. package/ShadersWGSL/ShadersInclude/pbrDebug.js.map +1 -1
  626. package/ShadersWGSL/ShadersInclude/prePassDeclaration.js +6 -1
  627. package/ShadersWGSL/ShadersInclude/prePassDeclaration.js.map +1 -1
  628. package/ShadersWGSL/default.fragment.js +17 -48
  629. package/ShadersWGSL/default.fragment.js.map +1 -1
  630. package/ShadersWGSL/fluidRenderingParticleDepth.vertex.js +15 -2
  631. package/ShadersWGSL/fluidRenderingParticleDepth.vertex.js.map +1 -1
  632. package/ShadersWGSL/fluidRenderingParticleThickness.vertex.js +15 -2
  633. package/ShadersWGSL/fluidRenderingParticleThickness.vertex.js.map +1 -1
  634. package/ShadersWGSL/gaussianPointSplattingBlit.fragment.d.ts +5 -0
  635. package/ShadersWGSL/gaussianPointSplattingBlit.fragment.js +22 -0
  636. package/ShadersWGSL/gaussianPointSplattingBlit.fragment.js.map +1 -0
  637. package/ShadersWGSL/gaussianPointSplattingBlit.vertex.d.ts +5 -0
  638. package/ShadersWGSL/gaussianPointSplattingBlit.vertex.js +19 -0
  639. package/ShadersWGSL/gaussianPointSplattingBlit.vertex.js.map +1 -0
  640. package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.d.ts +5 -0
  641. package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.js +21 -0
  642. package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.js.map +1 -0
  643. package/ShadersWGSL/gaussianSplatting.fragment.js +63 -2
  644. package/ShadersWGSL/gaussianSplatting.fragment.js.map +1 -1
  645. package/ShadersWGSL/gaussianSplatting.vertex.js +82 -1
  646. package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
  647. package/ShadersWGSL/gaussianSplattingDepth.vertex.js +2 -1
  648. package/ShadersWGSL/gaussianSplattingDepth.vertex.js.map +1 -1
  649. package/ShadersWGSL/gaussianSplattingVoxel.vertex.js +2 -1
  650. package/ShadersWGSL/gaussianSplattingVoxel.vertex.js.map +1 -1
  651. package/ShadersWGSL/geometry.fragment.js +37 -2
  652. package/ShadersWGSL/geometry.fragment.js.map +1 -1
  653. package/ShadersWGSL/gpsHiZBuild.compute.d.ts +5 -0
  654. package/ShadersWGSL/gpsHiZBuild.compute.js +16 -0
  655. package/ShadersWGSL/gpsHiZBuild.compute.js.map +1 -0
  656. package/ShadersWGSL/gpsPartition.compute.d.ts +5 -0
  657. package/ShadersWGSL/gpsPartition.compute.js +27 -0
  658. package/ShadersWGSL/gpsPartition.compute.js.map +1 -0
  659. package/ShadersWGSL/gpsPreprocess.compute.d.ts +5 -0
  660. package/ShadersWGSL/gpsPreprocess.compute.js +86 -0
  661. package/ShadersWGSL/gpsPreprocess.compute.js.map +1 -0
  662. package/ShadersWGSL/gpsResolve.compute.d.ts +5 -0
  663. package/ShadersWGSL/gpsResolve.compute.js +41 -0
  664. package/ShadersWGSL/gpsResolve.compute.js.map +1 -0
  665. package/ShadersWGSL/gpsScanAdd.compute.d.ts +5 -0
  666. package/ShadersWGSL/gpsScanAdd.compute.js +22 -0
  667. package/ShadersWGSL/gpsScanAdd.compute.js.map +1 -0
  668. package/ShadersWGSL/gpsScanBlocks.compute.d.ts +5 -0
  669. package/ShadersWGSL/gpsScanBlocks.compute.js +23 -0
  670. package/ShadersWGSL/gpsScanBlocks.compute.js.map +1 -0
  671. package/ShadersWGSL/gpsScanSums.compute.d.ts +5 -0
  672. package/ShadersWGSL/gpsScanSums.compute.js +30 -0
  673. package/ShadersWGSL/gpsScanSums.compute.js.map +1 -0
  674. package/ShadersWGSL/gpsSplat.compute.d.ts +5 -0
  675. package/ShadersWGSL/gpsSplat.compute.js +37 -0
  676. package/ShadersWGSL/gpsSplat.compute.js.map +1 -0
  677. package/ShadersWGSL/gpuRenderParticles.fragment.js +47 -2
  678. package/ShadersWGSL/gpuRenderParticles.fragment.js.map +1 -1
  679. package/ShadersWGSL/gpuRenderParticles.vertex.js +110 -7
  680. package/ShadersWGSL/gpuRenderParticles.vertex.js.map +1 -1
  681. package/ShadersWGSL/meshBlending.fragment.d.ts +5 -0
  682. package/ShadersWGSL/meshBlending.fragment.js +576 -0
  683. package/ShadersWGSL/meshBlending.fragment.js.map +1 -0
  684. package/ShadersWGSL/minmaxRedux.fragment.js +20 -3
  685. package/ShadersWGSL/minmaxRedux.fragment.js.map +1 -1
  686. package/ShadersWGSL/openpbr.fragment.js +2 -1
  687. package/ShadersWGSL/openpbr.fragment.js.map +1 -1
  688. package/ShadersWGSL/particles.fragment.js +45 -1
  689. package/ShadersWGSL/particles.fragment.js.map +1 -1
  690. package/ShadersWGSL/particles.vertex.js +86 -4
  691. package/ShadersWGSL/particles.vertex.js.map +1 -1
  692. package/ShadersWGSL/pbr.fragment.js +2 -1
  693. package/ShadersWGSL/pbr.fragment.js.map +1 -1
  694. package/ShadersWGSL/sprites.fragment.js +56 -2
  695. package/ShadersWGSL/sprites.fragment.js.map +1 -1
  696. package/ShadersWGSL/sprites.vertex.js +62 -1
  697. package/ShadersWGSL/sprites.vertex.js.map +1 -1
  698. package/Sprites/spriteManager.d.ts +13 -0
  699. package/Sprites/spriteManager.js +15 -0
  700. package/Sprites/spriteManager.js.map +1 -1
  701. package/Sprites/spriteRenderer.d.ts +24 -1
  702. package/Sprites/spriteRenderer.js +368 -50
  703. package/Sprites/spriteRenderer.js.map +1 -1
  704. package/Sprites/thinSprite.d.ts +4 -0
  705. package/Sprites/thinSprite.js +4 -0
  706. package/Sprites/thinSprite.js.map +1 -1
  707. package/States/alphaCullingState.d.ts +3 -1
  708. package/States/alphaCullingState.js +18 -3
  709. package/States/alphaCullingState.js.map +1 -1
  710. package/XR/features/WebXRSpaceWarp.pure.js +2 -1
  711. package/XR/features/WebXRSpaceWarp.pure.js.map +1 -1
  712. package/XR/webXRDefaultExperience.d.ts +5 -1
  713. package/XR/webXRDefaultExperience.js.map +1 -1
  714. package/XR/webXREnterExitUI.d.ts +2 -1
  715. package/XR/webXREnterExitUI.js.map +1 -1
  716. package/assetContainer.d.ts +1 -0
  717. package/assetContainer.js +5 -1
  718. package/assetContainer.js.map +1 -1
  719. package/package.json +1 -1
  720. package/scene.pure.d.ts +36 -2
  721. package/scene.pure.js +63 -4
  722. package/scene.pure.js.map +1 -1
@@ -1,5 +1,11 @@
1
+ import { type IValueGradient } from "../Misc/gradients.js";
1
2
  import { type Particle } from "./particle.js";
2
3
  import { type ThinParticleSystem } from "./thinParticleSystem.js";
4
+ /**
5
+ * Callback-free equivalent of GradientHelper.GetCurrentGradient; stores the result in _GradCurrent/_GradNext/_GradScale.
6
+ * @internal
7
+ */
8
+ export declare function _GetCurrentGradientToRef(ratio: number, gradients: IValueGradient[]): void;
3
9
  /** Color */
4
10
  /** @internal */
5
11
  export declare function _CreateColorData(particle: Particle, system: ThinParticleSystem): void;
@@ -1,7 +1,39 @@
1
1
  import { Color4 } from "../Maths/math.color.pure.js";
2
- import { GradientHelper } from "../Misc/gradients.js";
3
2
  import { Clamp, Lerp, RandomRange } from "../Maths/math.scalar.functions.js";
4
3
  import { TmpVectors, Vector3, Vector4 } from "../Maths/math.vector.pure.js";
4
+ // Result of _GetCurrentGradientToRef, consumed synchronously by the caller below
5
+ // (avoids a callback closure per particle per frame).
6
+ let _GradCurrent = null;
7
+ let _GradNext = null;
8
+ let _GradScale = 0;
9
+ /**
10
+ * Callback-free equivalent of GradientHelper.GetCurrentGradient; stores the result in _GradCurrent/_GradNext/_GradScale.
11
+ * @internal
12
+ */
13
+ export function _GetCurrentGradientToRef(ratio, gradients) {
14
+ // Use last index if over
15
+ if (gradients[0].gradient > ratio) {
16
+ _GradCurrent = gradients[0];
17
+ _GradNext = gradients[0];
18
+ _GradScale = 1.0;
19
+ return;
20
+ }
21
+ for (let gradientIndex = 0; gradientIndex < gradients.length - 1; gradientIndex++) {
22
+ const currentGradient = gradients[gradientIndex];
23
+ const nextGradient = gradients[gradientIndex + 1];
24
+ if (ratio >= currentGradient.gradient && ratio <= nextGradient.gradient) {
25
+ _GradCurrent = currentGradient;
26
+ _GradNext = nextGradient;
27
+ _GradScale = (ratio - currentGradient.gradient) / (nextGradient.gradient - currentGradient.gradient);
28
+ return;
29
+ }
30
+ }
31
+ // Use last index if over
32
+ const lastIndex = gradients.length - 1;
33
+ _GradCurrent = gradients[lastIndex];
34
+ _GradNext = gradients[lastIndex];
35
+ _GradScale = 1.0;
36
+ }
5
37
  /** Color */
6
38
  /** @internal */
7
39
  export function _CreateColorData(particle, system) {
@@ -27,18 +59,19 @@ export function _CreateColorGradientsData(particle, system) {
27
59
  }
28
60
  /** @internal */
29
61
  export function _ProcessColorGradients(particle, system) {
30
- const colorGradients = system._colorGradients;
31
- GradientHelper.GetCurrentGradient(system._ratio, colorGradients, (currentGradient, nextGradient, scale) => {
32
- if (currentGradient !== particle._properties.currentColorGradient) {
33
- particle._properties.currentColor1.copyFrom(particle._properties.currentColor2);
34
- nextGradient.getColorToRef(particle._properties.currentColor2);
35
- particle._properties.currentColorGradient = currentGradient;
36
- }
37
- Color4.LerpToRef(particle._properties.currentColor1, particle._properties.currentColor2, scale, particle.color);
38
- if (particle.color.a < 0) {
39
- particle.color.a = 0;
40
- }
41
- });
62
+ _GetCurrentGradientToRef(system._ratio, system._colorGradients);
63
+ const currentGradient = _GradCurrent;
64
+ const nextGradient = _GradNext;
65
+ const scale = _GradScale;
66
+ if (currentGradient !== particle._properties.currentColorGradient) {
67
+ particle._properties.currentColor1.copyFrom(particle._properties.currentColor2);
68
+ nextGradient.getColorToRef(particle._properties.currentColor2);
69
+ particle._properties.currentColorGradient = currentGradient;
70
+ }
71
+ Color4.LerpToRef(particle._properties.currentColor1, particle._properties.currentColor2, scale, particle.color);
72
+ if (particle.color.a < 0) {
73
+ particle.color.a = 0;
74
+ }
42
75
  }
43
76
  /** @internal */
44
77
  export function _ProcessColor(particle, system) {
@@ -51,14 +84,16 @@ export function _ProcessColor(particle, system) {
51
84
  /** Angular speed */
52
85
  /** @internal */
53
86
  export function _ProcessAngularSpeedGradients(particle, system) {
54
- GradientHelper.GetCurrentGradient(system._ratio, system._angularSpeedGradients, (currentGradient, nextGradient, scale) => {
55
- if (currentGradient !== particle._properties.currentAngularSpeedGradient) {
56
- particle._properties.currentAngularSpeed1 = particle._properties.currentAngularSpeed2;
57
- particle._properties.currentAngularSpeed2 = nextGradient.getFactor();
58
- particle._properties.currentAngularSpeedGradient = currentGradient;
59
- }
60
- particle.angularSpeed = Lerp(particle._properties.currentAngularSpeed1, particle._properties.currentAngularSpeed2, scale);
61
- });
87
+ _GetCurrentGradientToRef(system._ratio, system._angularSpeedGradients);
88
+ const currentGradient = _GradCurrent;
89
+ const nextGradient = _GradNext;
90
+ const scale = _GradScale;
91
+ if (currentGradient !== particle._properties.currentAngularSpeedGradient) {
92
+ particle._properties.currentAngularSpeed1 = particle._properties.currentAngularSpeed2;
93
+ particle._properties.currentAngularSpeed2 = nextGradient.getFactor();
94
+ particle._properties.currentAngularSpeedGradient = currentGradient;
95
+ }
96
+ particle.angularSpeed = Lerp(particle._properties.currentAngularSpeed1, particle._properties.currentAngularSpeed2, scale);
62
97
  }
63
98
  /** @internal */
64
99
  export function _ProcessAngularSpeed(particle, system) {
@@ -97,29 +132,33 @@ export function _CreateLimitVelocityGradients(particle, system) {
97
132
  }
98
133
  /** @internal */
99
134
  export function _ProcessVelocityGradients(particle, system) {
100
- GradientHelper.GetCurrentGradient(system._ratio, system._velocityGradients, (currentGradient, nextGradient, scale) => {
101
- if (currentGradient !== particle._properties.currentVelocityGradient) {
102
- particle._properties.currentVelocity1 = particle._properties.currentVelocity2;
103
- particle._properties.currentVelocity2 = nextGradient.getFactor();
104
- particle._properties.currentVelocityGradient = currentGradient;
105
- }
106
- particle._properties.directionScale *= Lerp(particle._properties.currentVelocity1, particle._properties.currentVelocity2, scale);
107
- });
135
+ _GetCurrentGradientToRef(system._ratio, system._velocityGradients);
136
+ const currentGradient = _GradCurrent;
137
+ const nextGradient = _GradNext;
138
+ const scale = _GradScale;
139
+ if (currentGradient !== particle._properties.currentVelocityGradient) {
140
+ particle._properties.currentVelocity1 = particle._properties.currentVelocity2;
141
+ particle._properties.currentVelocity2 = nextGradient.getFactor();
142
+ particle._properties.currentVelocityGradient = currentGradient;
143
+ }
144
+ particle._properties.directionScale *= Lerp(particle._properties.currentVelocity1, particle._properties.currentVelocity2, scale);
108
145
  }
109
146
  /** @internal */
110
147
  export function _ProcessLimitVelocityGradients(particle, system) {
111
- GradientHelper.GetCurrentGradient(system._ratio, system._limitVelocityGradients, (currentGradient, nextGradient, scale) => {
112
- if (currentGradient !== particle._properties.currentLimitVelocityGradient) {
113
- particle._properties.currentLimitVelocity1 = particle._properties.currentLimitVelocity2;
114
- particle._properties.currentLimitVelocity2 = nextGradient.getFactor();
115
- particle._properties.currentLimitVelocityGradient = currentGradient;
116
- }
117
- const limitVelocity = Lerp(particle._properties.currentLimitVelocity1, particle._properties.currentLimitVelocity2, scale);
118
- const currentVelocity = particle.direction.length();
119
- if (currentVelocity > limitVelocity) {
120
- particle.direction.scaleInPlace(system.limitVelocityDamping);
121
- }
122
- });
148
+ _GetCurrentGradientToRef(system._ratio, system._limitVelocityGradients);
149
+ const currentGradient = _GradCurrent;
150
+ const nextGradient = _GradNext;
151
+ const scale = _GradScale;
152
+ if (currentGradient !== particle._properties.currentLimitVelocityGradient) {
153
+ particle._properties.currentLimitVelocity1 = particle._properties.currentLimitVelocity2;
154
+ particle._properties.currentLimitVelocity2 = nextGradient.getFactor();
155
+ particle._properties.currentLimitVelocityGradient = currentGradient;
156
+ }
157
+ const limitVelocity = Lerp(particle._properties.currentLimitVelocity1, particle._properties.currentLimitVelocity2, scale);
158
+ const currentVelocity = particle.direction.length();
159
+ if (currentVelocity > limitVelocity) {
160
+ particle.direction.scaleInPlace(system.limitVelocityDamping);
161
+ }
123
162
  }
124
163
  /** @internal */
125
164
  export function _ProcessDirection(particle) {
@@ -168,15 +207,17 @@ export function _CreateDragData(particle, system) {
168
207
  }
169
208
  /** @internal */
170
209
  export function _ProcessDragGradients(particle, system) {
171
- GradientHelper.GetCurrentGradient(system._ratio, system._dragGradients, (currentGradient, nextGradient, scale) => {
172
- if (currentGradient !== particle._properties.currentDragGradient) {
173
- particle._properties.currentDrag1 = particle._properties.currentDrag2;
174
- particle._properties.currentDrag2 = nextGradient.getFactor();
175
- particle._properties.currentDragGradient = currentGradient;
176
- }
177
- const drag = Lerp(particle._properties.currentDrag1, particle._properties.currentDrag2, scale);
178
- particle._properties.scaledDirection.scaleInPlace(1.0 - drag);
179
- });
210
+ _GetCurrentGradientToRef(system._ratio, system._dragGradients);
211
+ const currentGradient = _GradCurrent;
212
+ const nextGradient = _GradNext;
213
+ const scale = _GradScale;
214
+ if (currentGradient !== particle._properties.currentDragGradient) {
215
+ particle._properties.currentDrag1 = particle._properties.currentDrag2;
216
+ particle._properties.currentDrag2 = nextGradient.getFactor();
217
+ particle._properties.currentDragGradient = currentGradient;
218
+ }
219
+ const drag = Lerp(particle._properties.currentDrag1, particle._properties.currentDrag2, scale);
220
+ particle._properties.scaledDirection.scaleInPlace(1.0 - drag);
180
221
  }
181
222
  /** Noise */
182
223
  /** @internal */
@@ -233,64 +274,79 @@ export function _CreateSizeGradientsData(particle, system) {
233
274
  /** @internal */
234
275
  export function _CreateStartSizeGradientsData(particle, system) {
235
276
  const ratio = system._actualFrame / system.targetStopDuration;
236
- GradientHelper.GetCurrentGradient(ratio, system._startSizeGradients, (currentGradient, nextGradient, scale) => {
237
- if (currentGradient !== system._currentStartSizeGradient) {
238
- system._currentStartSize1 = system._currentStartSize2;
239
- system._currentStartSize2 = nextGradient.getFactor();
240
- system._currentStartSizeGradient = currentGradient;
241
- }
242
- const value = Lerp(system._currentStartSize1, system._currentStartSize2, scale);
243
- particle.scale.scaleInPlace(value);
244
- });
277
+ _GetCurrentGradientToRef(ratio, system._startSizeGradients);
278
+ const currentGradient = _GradCurrent;
279
+ const nextGradient = _GradNext;
280
+ const scale = _GradScale;
281
+ if (currentGradient !== system._currentStartSizeGradient) {
282
+ system._currentStartSize1 = system._currentStartSize2;
283
+ system._currentStartSize2 = nextGradient.getFactor();
284
+ system._currentStartSizeGradient = currentGradient;
285
+ }
286
+ const value = Lerp(system._currentStartSize1, system._currentStartSize2, scale);
287
+ particle.scale.scaleInPlace(value);
245
288
  }
246
289
  /** @internal */
247
290
  export function _ProcessSizeGradients(particle, system) {
248
- GradientHelper.GetCurrentGradient(system._ratio, system._sizeGradients, (currentGradient, nextGradient, scale) => {
249
- if (currentGradient !== particle._properties.currentSizeGradient) {
250
- particle._properties.currentSize1 = particle._properties.currentSize2;
251
- particle._properties.currentSize2 = nextGradient.getFactor();
252
- particle._properties.currentSizeGradient = currentGradient;
253
- }
254
- particle.size = Lerp(particle._properties.currentSize1, particle._properties.currentSize2, scale);
255
- });
291
+ _GetCurrentGradientToRef(system._ratio, system._sizeGradients);
292
+ const currentGradient = _GradCurrent;
293
+ const nextGradient = _GradNext;
294
+ const scale = _GradScale;
295
+ if (currentGradient !== particle._properties.currentSizeGradient) {
296
+ particle._properties.currentSize1 = particle._properties.currentSize2;
297
+ particle._properties.currentSize2 = nextGradient.getFactor();
298
+ particle._properties.currentSizeGradient = currentGradient;
299
+ }
300
+ particle.size = Lerp(particle._properties.currentSize1, particle._properties.currentSize2, scale);
256
301
  }
257
302
  /** Ramp */
258
303
  /** @internal */
259
304
  export function _CreateRampData(particle, _system) {
260
- particle.remapData = new Vector4(0, 1, 0, 1);
305
+ if (particle.remapData) {
306
+ // Reuse remap data of recycled particles instead of allocating a Vector4 per call
307
+ particle.remapData.copyFromFloats(0, 1, 0, 1);
308
+ }
309
+ else {
310
+ particle.remapData = new Vector4(0, 1, 0, 1);
311
+ }
261
312
  }
262
313
  /** Remap */
263
314
  /** @internal */
264
315
  export function _ProcessRemapGradients(particle, system) {
265
316
  if (system._colorRemapGradients && system._colorRemapGradients.length > 0) {
266
- GradientHelper.GetCurrentGradient(system._ratio, system._colorRemapGradients, (currentGradient, nextGradient, scale) => {
267
- const min = Lerp(currentGradient.factor1, nextGradient.factor1, scale);
268
- const max = Lerp(currentGradient.factor2, nextGradient.factor2, scale);
269
- particle.remapData.x = min;
270
- particle.remapData.y = max - min;
271
- });
317
+ _GetCurrentGradientToRef(system._ratio, system._colorRemapGradients);
318
+ const currentGradient = _GradCurrent;
319
+ const nextGradient = _GradNext;
320
+ const scale = _GradScale;
321
+ const min = Lerp(currentGradient.factor1, nextGradient.factor1, scale);
322
+ const max = Lerp(currentGradient.factor2, nextGradient.factor2, scale);
323
+ particle.remapData.x = min;
324
+ particle.remapData.y = max - min;
272
325
  }
273
326
  if (system._alphaRemapGradients && system._alphaRemapGradients.length > 0) {
274
- GradientHelper.GetCurrentGradient(system._ratio, system._alphaRemapGradients, (currentGradient, nextGradient, scale) => {
275
- const min = Lerp(currentGradient.factor1, nextGradient.factor1, scale);
276
- const max = Lerp(currentGradient.factor2, nextGradient.factor2, scale);
277
- particle.remapData.z = min;
278
- particle.remapData.w = max - min;
279
- });
327
+ _GetCurrentGradientToRef(system._ratio, system._alphaRemapGradients);
328
+ const currentGradient = _GradCurrent;
329
+ const nextGradient = _GradNext;
330
+ const scale = _GradScale;
331
+ const min = Lerp(currentGradient.factor1, nextGradient.factor1, scale);
332
+ const max = Lerp(currentGradient.factor2, nextGradient.factor2, scale);
333
+ particle.remapData.z = min;
334
+ particle.remapData.w = max - min;
280
335
  }
281
336
  }
282
337
  /** Life */
283
338
  /** @internal */
284
339
  export function _CreateLifeGradientsData(particle, system) {
285
340
  const ratio = Clamp(system._actualFrame / system.targetStopDuration);
286
- GradientHelper.GetCurrentGradient(ratio, system._lifeTimeGradients, (currentGradient, nextGradient) => {
287
- const factorGradient1 = currentGradient;
288
- const factorGradient2 = nextGradient;
289
- const lifeTime1 = factorGradient1.getFactor();
290
- const lifeTime2 = factorGradient2.getFactor();
291
- const gradient = (ratio - factorGradient1.gradient) / (factorGradient2.gradient - factorGradient1.gradient);
292
- particle.lifeTime = Lerp(lifeTime1, lifeTime2, gradient);
293
- });
341
+ _GetCurrentGradientToRef(ratio, system._lifeTimeGradients);
342
+ const currentGradient = _GradCurrent;
343
+ const nextGradient = _GradNext;
344
+ const factorGradient1 = currentGradient;
345
+ const factorGradient2 = nextGradient;
346
+ const lifeTime1 = factorGradient1.getFactor();
347
+ const lifeTime2 = factorGradient2.getFactor();
348
+ const gradient = (ratio - factorGradient1.gradient) / (factorGradient2.gradient - factorGradient1.gradient);
349
+ particle.lifeTime = Lerp(lifeTime1, lifeTime2, gradient);
294
350
  system._emitPower = RandomRange(system.minEmitPower, system.maxEmitPower);
295
351
  }
296
352
  /** @internal */
@@ -1 +1 @@
1
- {"version":3,"file":"thinParticleSystem.function.js","sourceRoot":"","sources":["../../../../dev/core/src/Particles/thinParticleSystem.function.ts"],"names":[],"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,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,CAAC,CAAC;AACvF,CAAC;AAED,gBAAgB;AAChB,MAAM,UAAU,yBAAyB,CAAC,QAAkB,EAAE,MAA0B;IACpF,QAAQ,CAAC,WAAW,CAAC,2BAA2B,GAAG,MAAM,CAAC,sBAAuB,CAAC,CAAC,CAAC,CAAC;IACrF,QAAQ,CAAC,YAAY,GAAG,QAAQ,CAAC,WAAW,CAAC,2BAA2B,CAAC,SAAS,EAAE,CAAC;IACrF,QAAQ,CAAC,WAAW,CAAC,oBAAoB,GAAG,QAAQ,CAAC,YAAY,CAAC;IAElE,IAAI,MAAM,CAAC,sBAAuB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5C,QAAQ,CAAC,WAAW,CAAC,oBAAoB,GAAG,MAAM,CAAC,sBAAuB,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IAC9F,CAAC;SAAM,CAAC;QACJ,QAAQ,CAAC,WAAW,CAAC,oBAAoB,GAAG,QAAQ,CAAC,WAAW,CAAC,oBAAoB,CAAC;IAC1F,CAAC;IACD,QAAQ,CAAC,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,CAAC,CAAC;AACvF,CAAC;AAED,YAAY;AAEZ,gBAAgB;AAChB,MAAM,UAAU,gBAAgB,CAAC,QAAkB,EAAE,MAA0B;IAC3E,QAAQ,CAAC,WAAW,CAAC,wBAAwB,GAAG,MAAM,CAAC,iBAAiB,CAAC;IACzE,QAAQ,CAAC,WAAW,CAAC,sBAAsB,GAAG,MAAM,CAAC,eAAe,CAAC;IACrE,QAAQ,CAAC,WAAW,CAAC,qBAAqB,GAAG,MAAM,CAAC,cAAc,CAAC;AACvE,CAAC","sourcesContent":["import { Color4 } from \"core/Maths/math.color.pure\";\r\nimport { type ColorGradient, type FactorGradient, GradientHelper } from \"core/Misc/gradients\";\r\nimport { type Particle } from \"./particle\";\r\nimport { type ThinParticleSystem } from \"./thinParticleSystem\";\r\nimport { Clamp, Lerp, RandomRange } from \"core/Maths/math.scalar.functions\";\r\nimport { TmpVectors, Vector3, Vector4 } from \"core/Maths/math.vector.pure\";\r\n\r\n/** Color */\r\n\r\n/** @internal */\r\nexport function _CreateColorData(particle: Particle, system: ThinParticleSystem) {\r\n const step = RandomRange(0, 1.0);\r\n\r\n Color4.LerpToRef(system.color1, system.color2, step, particle.color);\r\n}\r\n\r\n/** @internal */\r\nexport function _CreateColorDeadData(particle: Particle, system: ThinParticleSystem) {\r\n system.colorDead.subtractToRef(particle.color, system._colorDiff);\r\n system._colorDiff.scaleToRef(1.0 / particle.lifeTime, particle.colorStep);\r\n}\r\n\r\n/** @internal */\r\nexport function _CreateColorGradientsData(particle: Particle, system: ThinParticleSystem) {\r\n particle._properties.currentColorGradient = system._colorGradients![0];\r\n particle._properties.currentColorGradient.getColorToRef(particle.color);\r\n particle._properties.currentColor1.copyFrom(particle.color);\r\n\r\n if (system._colorGradients!.length > 1) {\r\n system._colorGradients![1].getColorToRef(particle._properties.currentColor2);\r\n } else {\r\n particle._properties.currentColor2.copyFrom(particle.color);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport function _ProcessColorGradients(particle: Particle, system: ThinParticleSystem) {\r\n const colorGradients = system._colorGradients;\r\n GradientHelper.GetCurrentGradient(system._ratio, colorGradients!, (currentGradient, nextGradient, scale) => {\r\n if (currentGradient !== particle._properties.currentColorGradient) {\r\n particle._properties.currentColor1.copyFrom(particle._properties.currentColor2);\r\n (<ColorGradient>nextGradient).getColorToRef(particle._properties.currentColor2);\r\n particle._properties.currentColorGradient = <ColorGradient>currentGradient;\r\n }\r\n Color4.LerpToRef(particle._properties.currentColor1, particle._properties.currentColor2, scale, particle.color);\r\n\r\n if (particle.color.a < 0) {\r\n particle.color.a = 0;\r\n }\r\n });\r\n}\r\n\r\n/** @internal */\r\nexport function _ProcessColor(particle: Particle, system: ThinParticleSystem) {\r\n particle.colorStep.scaleToRef(system._scaledUpdateSpeed, system._scaledColorStep);\r\n particle.color.addInPlace(system._scaledColorStep);\r\n\r\n if (particle.color.a < 0) {\r\n particle.color.a = 0;\r\n }\r\n}\r\n\r\n/** Angular speed */\r\n\r\n/** @internal */\r\nexport function _ProcessAngularSpeedGradients(particle: Particle, system: ThinParticleSystem) {\r\n GradientHelper.GetCurrentGradient(system._ratio, system._angularSpeedGradients!, (currentGradient, nextGradient, scale) => {\r\n if (currentGradient !== particle._properties.currentAngularSpeedGradient) {\r\n particle._properties.currentAngularSpeed1 = particle._properties.currentAngularSpeed2;\r\n particle._properties.currentAngularSpeed2 = (<FactorGradient>nextGradient).getFactor();\r\n particle._properties.currentAngularSpeedGradient = <FactorGradient>currentGradient;\r\n }\r\n particle.angularSpeed = Lerp(particle._properties.currentAngularSpeed1, particle._properties.currentAngularSpeed2, scale);\r\n });\r\n}\r\n\r\n/** @internal */\r\nexport function _ProcessAngularSpeed(particle: Particle, system: ThinParticleSystem) {\r\n particle.angle += particle.angularSpeed * system._scaledUpdateSpeed;\r\n}\r\n\r\n/** Velocity & direction */\r\n\r\n/** @internal */\r\nexport function _CreateDirectionData(particle: Particle, system: ThinParticleSystem) {\r\n system.particleEmitterType.startDirectionFunction(system._emitterWorldMatrix, particle.direction, particle, system.isLocal, system._emitterInverseWorldMatrix);\r\n}\r\n\r\n/** @internal */\r\nexport function _CreateCustomDirectionData(particle: Particle, system: ThinParticleSystem) {\r\n system.startDirectionFunction!(system._emitterWorldMatrix, particle.direction, particle, system.isLocal);\r\n}\r\n\r\n/** @internal */\r\nexport function _CreateVelocityGradients(particle: Particle, system: ThinParticleSystem) {\r\n particle._properties.currentVelocityGradient = system._velocityGradients![0];\r\n particle._properties.currentVelocity1 = particle._properties.currentVelocityGradient.getFactor();\r\n\r\n if (system._velocityGradients!.length > 1) {\r\n particle._properties.currentVelocity2 = system._velocityGradients![1].getFactor();\r\n } else {\r\n particle._properties.currentVelocity2 = particle._properties.currentVelocity1;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport function _CreateLimitVelocityGradients(particle: Particle, system: ThinParticleSystem) {\r\n particle._properties.currentLimitVelocityGradient = system._limitVelocityGradients![0];\r\n particle._properties.currentLimitVelocity1 = particle._properties.currentLimitVelocityGradient.getFactor();\r\n\r\n if (system._limitVelocityGradients!.length > 1) {\r\n particle._properties.currentLimitVelocity2 = system._limitVelocityGradients![1].getFactor();\r\n } else {\r\n particle._properties.currentLimitVelocity2 = particle._properties.currentLimitVelocity1;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport function _ProcessVelocityGradients(particle: Particle, system: ThinParticleSystem) {\r\n GradientHelper.GetCurrentGradient(system._ratio, system._velocityGradients!, (currentGradient, nextGradient, scale) => {\r\n if (currentGradient !== particle._properties.currentVelocityGradient) {\r\n particle._properties.currentVelocity1 = particle._properties.currentVelocity2;\r\n particle._properties.currentVelocity2 = (<FactorGradient>nextGradient).getFactor();\r\n particle._properties.currentVelocityGradient = <FactorGradient>currentGradient;\r\n }\r\n particle._properties.directionScale *= Lerp(particle._properties.currentVelocity1, particle._properties.currentVelocity2, scale);\r\n });\r\n}\r\n\r\n/** @internal */\r\nexport function _ProcessLimitVelocityGradients(particle: Particle, system: ThinParticleSystem) {\r\n GradientHelper.GetCurrentGradient(system._ratio, system._limitVelocityGradients!, (currentGradient, nextGradient, scale) => {\r\n if (currentGradient !== particle._properties.currentLimitVelocityGradient) {\r\n particle._properties.currentLimitVelocity1 = particle._properties.currentLimitVelocity2;\r\n particle._properties.currentLimitVelocity2 = (<FactorGradient>nextGradient).getFactor();\r\n particle._properties.currentLimitVelocityGradient = <FactorGradient>currentGradient;\r\n }\r\n\r\n const limitVelocity = Lerp(particle._properties.currentLimitVelocity1, particle._properties.currentLimitVelocity2, scale);\r\n const currentVelocity = particle.direction.length();\r\n\r\n if (currentVelocity > limitVelocity) {\r\n particle.direction.scaleInPlace(system.limitVelocityDamping);\r\n }\r\n });\r\n}\r\n\r\n/** @internal */\r\nexport function _ProcessDirection(particle: Particle) {\r\n particle.direction.scaleToRef(particle._properties.directionScale, particle._properties.scaledDirection);\r\n}\r\n\r\n/** Position */\r\n\r\n/** @internal */\r\nexport function _CreatePositionData(particle: Particle, system: ThinParticleSystem) {\r\n system.particleEmitterType.startPositionFunction(system._emitterWorldMatrix, particle.position, particle, system.isLocal);\r\n}\r\n\r\n/** @internal */\r\nexport function _CreateCustomPositionData(particle: Particle, system: ThinParticleSystem) {\r\n system.startPositionFunction!(system._emitterWorldMatrix, particle.position, particle, system.isLocal);\r\n}\r\n\r\n/** @internal */\r\nexport function _CreateIsLocalData(particle: Particle, system: ThinParticleSystem) {\r\n if (!particle._properties.localPosition) {\r\n particle._properties.localPosition = particle.position.clone();\r\n } else {\r\n particle._properties.localPosition.copyFrom(particle.position);\r\n }\r\n Vector3.TransformCoordinatesToRef(particle._properties.localPosition, system._emitterWorldMatrix, particle.position);\r\n}\r\n\r\n/** @internal */\r\nexport function _ProcessPosition(particle: Particle, system: ThinParticleSystem) {\r\n if (system.isLocal && particle._properties.localPosition) {\r\n particle._properties.localPosition!.addInPlace(particle._properties.scaledDirection);\r\n Vector3.TransformCoordinatesToRef(particle._properties.localPosition!, system._emitterWorldMatrix, particle.position);\r\n } else {\r\n particle.position.addInPlace(particle._properties.scaledDirection);\r\n }\r\n}\r\n\r\n/** Drag */\r\n\r\n/** @internal */\r\nexport function _CreateDragData(particle: Particle, system: ThinParticleSystem) {\r\n particle._properties.currentDragGradient = system._dragGradients![0];\r\n particle._properties.currentDrag1 = particle._properties.currentDragGradient.getFactor();\r\n\r\n if (system._dragGradients!.length > 1) {\r\n particle._properties.currentDrag2 = system._dragGradients![1].getFactor();\r\n } else {\r\n particle._properties.currentDrag2 = particle._properties.currentDrag1;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport function _ProcessDragGradients(particle: Particle, system: ThinParticleSystem) {\r\n GradientHelper.GetCurrentGradient(system._ratio, system._dragGradients!, (currentGradient, nextGradient, scale) => {\r\n if (currentGradient !== particle._properties.currentDragGradient) {\r\n particle._properties.currentDrag1 = particle._properties.currentDrag2;\r\n particle._properties.currentDrag2 = (<FactorGradient>nextGradient).getFactor();\r\n particle._properties.currentDragGradient = <FactorGradient>currentGradient;\r\n }\r\n\r\n const drag = Lerp(particle._properties.currentDrag1, particle._properties.currentDrag2, scale);\r\n\r\n particle._properties.scaledDirection.scaleInPlace(1.0 - drag);\r\n });\r\n}\r\n\r\n/** Noise */\r\n\r\n/** @internal */\r\nexport function _CreateNoiseData(particle: Particle, _system: ThinParticleSystem) {\r\n if (particle._properties.randomNoiseCoordinates1 && particle._properties.randomNoiseCoordinates2) {\r\n particle._properties.randomNoiseCoordinates1.copyFromFloats(Math.random(), Math.random(), Math.random());\r\n particle._properties.randomNoiseCoordinates2.copyFromFloats(Math.random(), Math.random(), Math.random());\r\n } else {\r\n particle._properties.randomNoiseCoordinates1 = new Vector3(Math.random(), Math.random(), Math.random());\r\n particle._properties.randomNoiseCoordinates2 = new Vector3(Math.random(), Math.random(), Math.random());\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport function _ProcessNoise(particle: Particle, system: ThinParticleSystem) {\r\n const noiseTextureData = system._noiseTextureData;\r\n const noiseTextureSize = system._noiseTextureSize;\r\n\r\n if (noiseTextureData && noiseTextureSize && particle._properties.randomNoiseCoordinates1 && particle._properties.randomNoiseCoordinates2) {\r\n const fetchedColorR = system._fetchR(\r\n particle._properties.randomNoiseCoordinates1.x,\r\n particle._properties.randomNoiseCoordinates1.y,\r\n noiseTextureSize.width,\r\n noiseTextureSize.height,\r\n noiseTextureData\r\n );\r\n const fetchedColorG = system._fetchR(\r\n particle._properties.randomNoiseCoordinates1.z,\r\n particle._properties.randomNoiseCoordinates2.x,\r\n noiseTextureSize.width,\r\n noiseTextureSize.height,\r\n noiseTextureData\r\n );\r\n const fetchedColorB = system._fetchR(\r\n particle._properties.randomNoiseCoordinates2.y,\r\n particle._properties.randomNoiseCoordinates2.z,\r\n noiseTextureSize.width,\r\n noiseTextureSize.height,\r\n noiseTextureData\r\n );\r\n\r\n const force = TmpVectors.Vector3[0];\r\n const scaledForce = TmpVectors.Vector3[1];\r\n\r\n force.copyFromFloats((2 * fetchedColorR - 1) * system.noiseStrength.x, (2 * fetchedColorG - 1) * system.noiseStrength.y, (2 * fetchedColorB - 1) * system.noiseStrength.z);\r\n\r\n force.scaleToRef(system._tempScaledUpdateSpeed, scaledForce);\r\n particle.direction.addInPlace(scaledForce);\r\n }\r\n}\r\n\r\n/** Gravity */\r\n\r\n/** @internal */\r\nexport function _ProcessGravity(particle: Particle, system: ThinParticleSystem) {\r\n system.gravity.scaleToRef(system._tempScaledUpdateSpeed, system._scaledGravity);\r\n particle.direction.addInPlace(system._scaledGravity);\r\n}\r\n\r\n/** Size */\r\n\r\n/** @internal */\r\nexport function _CreateSizeData(particle: Particle, system: ThinParticleSystem) {\r\n particle.size = RandomRange(system.minSize, system.maxSize);\r\n particle.scale.copyFromFloats(RandomRange(system.minScaleX, system.maxScaleX), RandomRange(system.minScaleY, system.maxScaleY));\r\n}\r\n\r\n/** @internal */\r\nexport function _CreateSizeGradientsData(particle: Particle, system: ThinParticleSystem) {\r\n particle._properties.currentSizeGradient = system._sizeGradients![0];\r\n particle._properties.currentSize1 = particle._properties.currentSizeGradient.getFactor();\r\n particle.size = particle._properties.currentSize1;\r\n\r\n if (system._sizeGradients!.length > 1) {\r\n particle._properties.currentSize2 = system._sizeGradients![1].getFactor();\r\n } else {\r\n particle._properties.currentSize2 = particle._properties.currentSize1;\r\n }\r\n\r\n particle.scale.copyFromFloats(RandomRange(system.minScaleX, system.maxScaleX), RandomRange(system.minScaleY, system.maxScaleY));\r\n}\r\n\r\n/** @internal */\r\nexport function _CreateStartSizeGradientsData(particle: Particle, system: ThinParticleSystem) {\r\n const ratio = system._actualFrame / system.targetStopDuration;\r\n GradientHelper.GetCurrentGradient(ratio, system._startSizeGradients!, (currentGradient, nextGradient, scale) => {\r\n if (currentGradient !== system._currentStartSizeGradient) {\r\n system._currentStartSize1 = system._currentStartSize2;\r\n system._currentStartSize2 = (<FactorGradient>nextGradient).getFactor();\r\n system._currentStartSizeGradient = <FactorGradient>currentGradient;\r\n }\r\n\r\n const value = Lerp(system._currentStartSize1, system._currentStartSize2, scale);\r\n particle.scale.scaleInPlace(value);\r\n });\r\n}\r\n\r\n/** @internal */\r\nexport function _ProcessSizeGradients(particle: Particle, system: ThinParticleSystem) {\r\n GradientHelper.GetCurrentGradient(system._ratio, system._sizeGradients!, (currentGradient, nextGradient, scale) => {\r\n if (currentGradient !== particle._properties.currentSizeGradient) {\r\n particle._properties.currentSize1 = particle._properties.currentSize2;\r\n particle._properties.currentSize2 = (<FactorGradient>nextGradient).getFactor();\r\n particle._properties.currentSizeGradient = <FactorGradient>currentGradient;\r\n }\r\n particle.size = Lerp(particle._properties.currentSize1, particle._properties.currentSize2, scale);\r\n });\r\n}\r\n\r\n/** Ramp */\r\n\r\n/** @internal */\r\nexport function _CreateRampData(particle: Particle, _system: ThinParticleSystem) {\r\n particle.remapData = new Vector4(0, 1, 0, 1);\r\n}\r\n\r\n/** Remap */\r\n\r\n/** @internal */\r\nexport function _ProcessRemapGradients(particle: Particle, system: ThinParticleSystem) {\r\n if (system._colorRemapGradients && system._colorRemapGradients.length > 0) {\r\n GradientHelper.GetCurrentGradient(system._ratio, system._colorRemapGradients, (currentGradient, nextGradient, scale) => {\r\n const min = Lerp((<FactorGradient>currentGradient).factor1, (<FactorGradient>nextGradient).factor1, scale);\r\n const max = Lerp((<FactorGradient>currentGradient).factor2!, (<FactorGradient>nextGradient).factor2!, scale);\r\n\r\n particle.remapData.x = min;\r\n particle.remapData.y = max - min;\r\n });\r\n }\r\n\r\n if (system._alphaRemapGradients && system._alphaRemapGradients.length > 0) {\r\n GradientHelper.GetCurrentGradient(system._ratio, system._alphaRemapGradients, (currentGradient, nextGradient, scale) => {\r\n const min = Lerp((<FactorGradient>currentGradient).factor1, (<FactorGradient>nextGradient).factor1, scale);\r\n const max = Lerp((<FactorGradient>currentGradient).factor2!, (<FactorGradient>nextGradient).factor2!, scale);\r\n\r\n particle.remapData.z = min;\r\n particle.remapData.w = max - min;\r\n });\r\n }\r\n}\r\n\r\n/** Life */\r\n\r\n/** @internal */\r\nexport function _CreateLifeGradientsData(particle: Particle, system: ThinParticleSystem) {\r\n const ratio = Clamp(system._actualFrame / system.targetStopDuration);\r\n GradientHelper.GetCurrentGradient(ratio, system._lifeTimeGradients!, (currentGradient, nextGradient) => {\r\n const factorGradient1 = <FactorGradient>currentGradient;\r\n const factorGradient2 = <FactorGradient>nextGradient;\r\n const lifeTime1 = factorGradient1.getFactor();\r\n const lifeTime2 = factorGradient2.getFactor();\r\n const gradient = (ratio - factorGradient1.gradient) / (factorGradient2.gradient - factorGradient1.gradient);\r\n particle.lifeTime = Lerp(lifeTime1, lifeTime2, gradient);\r\n });\r\n system._emitPower = RandomRange(system.minEmitPower, system.maxEmitPower);\r\n}\r\n\r\n/** @internal */\r\nexport function _CreateLifetimeData(particle: Particle, system: ThinParticleSystem) {\r\n particle.lifeTime = RandomRange(system.minLifeTime, system.maxLifeTime);\r\n system._emitPower = RandomRange(system.minEmitPower, system.maxEmitPower);\r\n}\r\n\r\n/** Emit power */\r\n\r\n/** @internal */\r\nexport function _CreateEmitPowerData(particle: Particle, system: ThinParticleSystem) {\r\n if (system._emitPower === 0) {\r\n if (!particle._properties.initialDirection) {\r\n particle._properties.initialDirection = particle.direction.clone();\r\n } else {\r\n particle._properties.initialDirection.copyFrom(particle.direction);\r\n }\r\n particle.direction.set(0, 0, 0);\r\n } else {\r\n particle._properties.initialDirection = null;\r\n particle.direction.scaleInPlace(system._emitPower);\r\n }\r\n\r\n // Inherited Velocity\r\n particle.direction.addInPlace(system._inheritedVelocityOffset);\r\n}\r\n\r\n/** Angle */\r\n\r\n/** @internal */\r\nexport function _CreateAngleData(particle: Particle, system: ThinParticleSystem) {\r\n particle.angularSpeed = RandomRange(system.minAngularSpeed, system.maxAngularSpeed);\r\n particle.angle = RandomRange(system.minInitialRotation, system.maxInitialRotation);\r\n}\r\n\r\n/** @internal */\r\nexport function _CreateAngleGradientsData(particle: Particle, system: ThinParticleSystem) {\r\n particle._properties.currentAngularSpeedGradient = system._angularSpeedGradients![0];\r\n particle.angularSpeed = particle._properties.currentAngularSpeedGradient.getFactor();\r\n particle._properties.currentAngularSpeed1 = particle.angularSpeed;\r\n\r\n if (system._angularSpeedGradients!.length > 1) {\r\n particle._properties.currentAngularSpeed2 = system._angularSpeedGradients![1].getFactor();\r\n } else {\r\n particle._properties.currentAngularSpeed2 = particle._properties.currentAngularSpeed1;\r\n }\r\n particle.angle = RandomRange(system.minInitialRotation, system.maxInitialRotation);\r\n}\r\n\r\n/** Sheet */\r\n\r\n/** @internal */\r\nexport function _CreateSheetData(particle: Particle, system: ThinParticleSystem) {\r\n particle._properties.initialStartSpriteCellId = system.startSpriteCellID;\r\n particle._properties.initialEndSpriteCellId = system.endSpriteCellID;\r\n particle._properties.initialSpriteCellLoop = system.spriteCellLoop;\r\n}\r\n"]}
1
+ {"version":3,"file":"thinParticleSystem.function.js","sourceRoot":"","sources":["../../../../dev/core/src/Particles/thinParticleSystem.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAIpD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAE3E,iFAAiF;AACjF,sDAAsD;AACtD,IAAI,YAAY,GAAmB,IAAK,CAAC;AACzC,IAAI,SAAS,GAAmB,IAAK,CAAC;AACtC,IAAI,UAAU,GAAG,CAAC,CAAC;AAEnB;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAa,EAAE,SAA2B;IAC/E,yBAAyB;IACzB,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,KAAK,EAAE,CAAC;QA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MAA0B;IACpF,QAAQ,CAAC,WAAW,CAAC,2BAA2B,GAAG,MAAM,CAAC,sBAAuB,CAAC,CAAC,CAAC,CAAC;IACrF,QAAQ,CAAC,YAAY,GAAG,QAAQ,CAAC,WAAW,CAAC,2BAA2B,CAAC,SAAS,EAAE,CAAC;IACrF,QAAQ,CAAC,WAAW,CAAC,oBAAoB,GAAG,QAAQ,CAAC,YAAY,CAAC;IAElE,IAAI,MAAM,CAAC,sBAAuB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5C,QAAQ,CAAC,WAAW,CAAC,oBAAoB,GAAG,MAAM,CAAC,sBAAuB,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IAC9F,CAAC;SAAM,CAAC;QACJ,QAAQ,CAAC,WAAW,CAAC,oBAAoB,GAAG,QAAQ,CAAC,WAAW,CAAC,oBAAoB,CAAC;IAC1F,CAAC;IACD,QAAQ,CAAC,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,CAAC,CAAC;AACvF,CAAC;AAED,YAAY;AAEZ,gBAAgB;AAChB,MAAM,UAAU,gBAAgB,CAAC,QAAkB,EAAE,MAA0B;IAC3E,QAAQ,CAAC,WAAW,CAAC,wBAAwB,GAAG,MAAM,CAAC,iBAAiB,CAAC;IACzE,QAAQ,CAAC,WAAW,CAAC,sBAAsB,GAAG,MAAM,CAAC,eAAe,CAAC;IACrE,QAAQ,CAAC,WAAW,CAAC,qBAAqB,GAAG,MAAM,CAAC,cAAc,CAAC;AACvE,CAAC","sourcesContent":["import { Color4 } from \"core/Maths/math.color.pure\";\r\nimport { type ColorGradient, type FactorGradient, type IValueGradient } from \"core/Misc/gradients\";\r\nimport { type Particle } from \"./particle\";\r\nimport { type ThinParticleSystem } from \"./thinParticleSystem\";\r\nimport { Clamp, Lerp, RandomRange } from \"core/Maths/math.scalar.functions\";\r\nimport { TmpVectors, Vector3, Vector4 } from \"core/Maths/math.vector.pure\";\r\n\r\n// Result of _GetCurrentGradientToRef, consumed synchronously by the caller below\r\n// (avoids a callback closure per particle per frame).\r\nlet _GradCurrent: IValueGradient = null!;\r\nlet _GradNext: IValueGradient = null!;\r\nlet _GradScale = 0;\r\n\r\n/**\r\n * Callback-free equivalent of GradientHelper.GetCurrentGradient; stores the result in _GradCurrent/_GradNext/_GradScale.\r\n * @internal\r\n */\r\nexport function _GetCurrentGradientToRef(ratio: number, gradients: IValueGradient[]): void {\r\n // Use last index if over\r\n if (gradients[0].gradient > ratio) {\r\n _GradCurrent = gradients[0];\r\n _GradNext = gradients[0];\r\n _GradScale = 1.0;\r\n return;\r\n }\r\n\r\n for (let gradientIndex = 0; gradientIndex < gradients.length - 1; gradientIndex++) {\r\n const currentGradient = gradients[gradientIndex];\r\n const nextGradient = gradients[gradientIndex + 1];\r\n\r\n if (ratio >= currentGradient.gradient && ratio <= nextGradient.gradient) {\r\n _GradCurrent = currentGradient;\r\n _GradNext = nextGradient;\r\n _GradScale = (ratio - currentGradient.gradient) / (nextGradient.gradient - currentGradient.gradient);\r\n return;\r\n }\r\n }\r\n\r\n // Use last index if over\r\n const lastIndex = gradients.length - 1;\r\n _GradCurrent = gradients[lastIndex];\r\n _GradNext = gradients[lastIndex];\r\n _GradScale = 1.0;\r\n}\r\n\r\n/** Color */\r\n\r\n/** @internal */\r\nexport function _CreateColorData(particle: Particle, system: ThinParticleSystem) {\r\n const step = RandomRange(0, 1.0);\r\n\r\n Color4.LerpToRef(system.color1, system.color2, step, particle.color);\r\n}\r\n\r\n/** @internal */\r\nexport function _CreateColorDeadData(particle: Particle, system: ThinParticleSystem) {\r\n system.colorDead.subtractToRef(particle.color, system._colorDiff);\r\n system._colorDiff.scaleToRef(1.0 / particle.lifeTime, particle.colorStep);\r\n}\r\n\r\n/** @internal */\r\nexport function _CreateColorGradientsData(particle: Particle, system: ThinParticleSystem) {\r\n particle._properties.currentColorGradient = system._colorGradients![0];\r\n particle._properties.currentColorGradient.getColorToRef(particle.color);\r\n particle._properties.currentColor1.copyFrom(particle.color);\r\n\r\n if (system._colorGradients!.length > 1) {\r\n system._colorGradients![1].getColorToRef(particle._properties.currentColor2);\r\n } else {\r\n particle._properties.currentColor2.copyFrom(particle.color);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport function _ProcessColorGradients(particle: Particle, system: ThinParticleSystem) {\r\n _GetCurrentGradientToRef(system._ratio, system._colorGradients!);\r\n const currentGradient = _GradCurrent;\r\n const nextGradient = _GradNext;\r\n const scale = _GradScale;\r\n if (currentGradient !== particle._properties.currentColorGradient) {\r\n particle._properties.currentColor1.copyFrom(particle._properties.currentColor2);\r\n (<ColorGradient>nextGradient).getColorToRef(particle._properties.currentColor2);\r\n particle._properties.currentColorGradient = <ColorGradient>currentGradient;\r\n }\r\n Color4.LerpToRef(particle._properties.currentColor1, particle._properties.currentColor2, scale, particle.color);\r\n\r\n if (particle.color.a < 0) {\r\n particle.color.a = 0;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport function _ProcessColor(particle: Particle, system: ThinParticleSystem) {\r\n particle.colorStep.scaleToRef(system._scaledUpdateSpeed, system._scaledColorStep);\r\n particle.color.addInPlace(system._scaledColorStep);\r\n\r\n if (particle.color.a < 0) {\r\n particle.color.a = 0;\r\n }\r\n}\r\n\r\n/** Angular speed */\r\n\r\n/** @internal */\r\nexport function _ProcessAngularSpeedGradients(particle: Particle, system: ThinParticleSystem) {\r\n _GetCurrentGradientToRef(system._ratio, system._angularSpeedGradients!);\r\n const currentGradient = _GradCurrent;\r\n const nextGradient = _GradNext;\r\n const scale = _GradScale;\r\n if (currentGradient !== particle._properties.currentAngularSpeedGradient) {\r\n particle._properties.currentAngularSpeed1 = particle._properties.currentAngularSpeed2;\r\n particle._properties.currentAngularSpeed2 = (<FactorGradient>nextGradient).getFactor();\r\n particle._properties.currentAngularSpeedGradient = <FactorGradient>currentGradient;\r\n }\r\n particle.angularSpeed = Lerp(particle._properties.currentAngularSpeed1, particle._properties.currentAngularSpeed2, scale);\r\n}\r\n\r\n/** @internal */\r\nexport function _ProcessAngularSpeed(particle: Particle, system: ThinParticleSystem) {\r\n particle.angle += particle.angularSpeed * system._scaledUpdateSpeed;\r\n}\r\n\r\n/** Velocity & direction */\r\n\r\n/** @internal */\r\nexport function _CreateDirectionData(particle: Particle, system: ThinParticleSystem) {\r\n system.particleEmitterType.startDirectionFunction(system._emitterWorldMatrix, particle.direction, particle, system.isLocal, system._emitterInverseWorldMatrix);\r\n}\r\n\r\n/** @internal */\r\nexport function _CreateCustomDirectionData(particle: Particle, system: ThinParticleSystem) {\r\n system.startDirectionFunction!(system._emitterWorldMatrix, particle.direction, particle, system.isLocal);\r\n}\r\n\r\n/** @internal */\r\nexport function _CreateVelocityGradients(particle: Particle, system: ThinParticleSystem) {\r\n particle._properties.currentVelocityGradient = system._velocityGradients![0];\r\n particle._properties.currentVelocity1 = particle._properties.currentVelocityGradient.getFactor();\r\n\r\n if (system._velocityGradients!.length > 1) {\r\n particle._properties.currentVelocity2 = system._velocityGradients![1].getFactor();\r\n } else {\r\n particle._properties.currentVelocity2 = particle._properties.currentVelocity1;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport function _CreateLimitVelocityGradients(particle: Particle, system: ThinParticleSystem) {\r\n particle._properties.currentLimitVelocityGradient = system._limitVelocityGradients![0];\r\n particle._properties.currentLimitVelocity1 = particle._properties.currentLimitVelocityGradient.getFactor();\r\n\r\n if (system._limitVelocityGradients!.length > 1) {\r\n particle._properties.currentLimitVelocity2 = system._limitVelocityGradients![1].getFactor();\r\n } else {\r\n particle._properties.currentLimitVelocity2 = particle._properties.currentLimitVelocity1;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport function _ProcessVelocityGradients(particle: Particle, system: ThinParticleSystem) {\r\n _GetCurrentGradientToRef(system._ratio, system._velocityGradients!);\r\n const currentGradient = _GradCurrent;\r\n const nextGradient = _GradNext;\r\n const scale = _GradScale;\r\n if (currentGradient !== particle._properties.currentVelocityGradient) {\r\n particle._properties.currentVelocity1 = particle._properties.currentVelocity2;\r\n particle._properties.currentVelocity2 = (<FactorGradient>nextGradient).getFactor();\r\n particle._properties.currentVelocityGradient = <FactorGradient>currentGradient;\r\n }\r\n particle._properties.directionScale *= Lerp(particle._properties.currentVelocity1, particle._properties.currentVelocity2, scale);\r\n}\r\n\r\n/** @internal */\r\nexport function _ProcessLimitVelocityGradients(particle: Particle, system: ThinParticleSystem) {\r\n _GetCurrentGradientToRef(system._ratio, system._limitVelocityGradients!);\r\n const currentGradient = _GradCurrent;\r\n const nextGradient = _GradNext;\r\n const scale = _GradScale;\r\n if (currentGradient !== particle._properties.currentLimitVelocityGradient) {\r\n particle._properties.currentLimitVelocity1 = particle._properties.currentLimitVelocity2;\r\n particle._properties.currentLimitVelocity2 = (<FactorGradient>nextGradient).getFactor();\r\n particle._properties.currentLimitVelocityGradient = <FactorGradient>currentGradient;\r\n }\r\n\r\n const limitVelocity = Lerp(particle._properties.currentLimitVelocity1, particle._properties.currentLimitVelocity2, scale);\r\n const currentVelocity = particle.direction.length();\r\n\r\n if (currentVelocity > limitVelocity) {\r\n particle.direction.scaleInPlace(system.limitVelocityDamping);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport function _ProcessDirection(particle: Particle) {\r\n particle.direction.scaleToRef(particle._properties.directionScale, particle._properties.scaledDirection);\r\n}\r\n\r\n/** Position */\r\n\r\n/** @internal */\r\nexport function _CreatePositionData(particle: Particle, system: ThinParticleSystem) {\r\n system.particleEmitterType.startPositionFunction(system._emitterWorldMatrix, particle.position, particle, system.isLocal);\r\n}\r\n\r\n/** @internal */\r\nexport function _CreateCustomPositionData(particle: Particle, system: ThinParticleSystem) {\r\n system.startPositionFunction!(system._emitterWorldMatrix, particle.position, particle, system.isLocal);\r\n}\r\n\r\n/** @internal */\r\nexport function _CreateIsLocalData(particle: Particle, system: ThinParticleSystem) {\r\n if (!particle._properties.localPosition) {\r\n particle._properties.localPosition = particle.position.clone();\r\n } else {\r\n particle._properties.localPosition.copyFrom(particle.position);\r\n }\r\n Vector3.TransformCoordinatesToRef(particle._properties.localPosition, system._emitterWorldMatrix, particle.position);\r\n}\r\n\r\n/** @internal */\r\nexport function _ProcessPosition(particle: Particle, system: ThinParticleSystem) {\r\n if (system.isLocal && particle._properties.localPosition) {\r\n particle._properties.localPosition!.addInPlace(particle._properties.scaledDirection);\r\n Vector3.TransformCoordinatesToRef(particle._properties.localPosition!, system._emitterWorldMatrix, particle.position);\r\n } else {\r\n particle.position.addInPlace(particle._properties.scaledDirection);\r\n }\r\n}\r\n\r\n/** Drag */\r\n\r\n/** @internal */\r\nexport function _CreateDragData(particle: Particle, system: ThinParticleSystem) {\r\n particle._properties.currentDragGradient = system._dragGradients![0];\r\n particle._properties.currentDrag1 = particle._properties.currentDragGradient.getFactor();\r\n\r\n if (system._dragGradients!.length > 1) {\r\n particle._properties.currentDrag2 = system._dragGradients![1].getFactor();\r\n } else {\r\n particle._properties.currentDrag2 = particle._properties.currentDrag1;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport function _ProcessDragGradients(particle: Particle, system: ThinParticleSystem) {\r\n _GetCurrentGradientToRef(system._ratio, system._dragGradients!);\r\n const currentGradient = _GradCurrent;\r\n const nextGradient = _GradNext;\r\n const scale = _GradScale;\r\n if (currentGradient !== particle._properties.currentDragGradient) {\r\n particle._properties.currentDrag1 = particle._properties.currentDrag2;\r\n particle._properties.currentDrag2 = (<FactorGradient>nextGradient).getFactor();\r\n particle._properties.currentDragGradient = <FactorGradient>currentGradient;\r\n }\r\n\r\n const drag = Lerp(particle._properties.currentDrag1, particle._properties.currentDrag2, scale);\r\n\r\n particle._properties.scaledDirection.scaleInPlace(1.0 - drag);\r\n}\r\n\r\n/** Noise */\r\n\r\n/** @internal */\r\nexport function _CreateNoiseData(particle: Particle, _system: ThinParticleSystem) {\r\n if (particle._properties.randomNoiseCoordinates1 && particle._properties.randomNoiseCoordinates2) {\r\n particle._properties.randomNoiseCoordinates1.copyFromFloats(Math.random(), Math.random(), Math.random());\r\n particle._properties.randomNoiseCoordinates2.copyFromFloats(Math.random(), Math.random(), Math.random());\r\n } else {\r\n particle._properties.randomNoiseCoordinates1 = new Vector3(Math.random(), Math.random(), Math.random());\r\n particle._properties.randomNoiseCoordinates2 = new Vector3(Math.random(), Math.random(), Math.random());\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport function _ProcessNoise(particle: Particle, system: ThinParticleSystem) {\r\n const noiseTextureData = system._noiseTextureData;\r\n const noiseTextureSize = system._noiseTextureSize;\r\n\r\n if (noiseTextureData && noiseTextureSize && particle._properties.randomNoiseCoordinates1 && particle._properties.randomNoiseCoordinates2) {\r\n const fetchedColorR = system._fetchR(\r\n particle._properties.randomNoiseCoordinates1.x,\r\n particle._properties.randomNoiseCoordinates1.y,\r\n noiseTextureSize.width,\r\n noiseTextureSize.height,\r\n noiseTextureData\r\n );\r\n const fetchedColorG = system._fetchR(\r\n particle._properties.randomNoiseCoordinates1.z,\r\n particle._properties.randomNoiseCoordinates2.x,\r\n noiseTextureSize.width,\r\n noiseTextureSize.height,\r\n noiseTextureData\r\n );\r\n const fetchedColorB = system._fetchR(\r\n particle._properties.randomNoiseCoordinates2.y,\r\n particle._properties.randomNoiseCoordinates2.z,\r\n noiseTextureSize.width,\r\n noiseTextureSize.height,\r\n noiseTextureData\r\n );\r\n\r\n const force = TmpVectors.Vector3[0];\r\n const scaledForce = TmpVectors.Vector3[1];\r\n\r\n force.copyFromFloats((2 * fetchedColorR - 1) * system.noiseStrength.x, (2 * fetchedColorG - 1) * system.noiseStrength.y, (2 * fetchedColorB - 1) * system.noiseStrength.z);\r\n\r\n force.scaleToRef(system._tempScaledUpdateSpeed, scaledForce);\r\n particle.direction.addInPlace(scaledForce);\r\n }\r\n}\r\n\r\n/** Gravity */\r\n\r\n/** @internal */\r\nexport function _ProcessGravity(particle: Particle, system: ThinParticleSystem) {\r\n system.gravity.scaleToRef(system._tempScaledUpdateSpeed, system._scaledGravity);\r\n particle.direction.addInPlace(system._scaledGravity);\r\n}\r\n\r\n/** Size */\r\n\r\n/** @internal */\r\nexport function _CreateSizeData(particle: Particle, system: ThinParticleSystem) {\r\n particle.size = RandomRange(system.minSize, system.maxSize);\r\n particle.scale.copyFromFloats(RandomRange(system.minScaleX, system.maxScaleX), RandomRange(system.minScaleY, system.maxScaleY));\r\n}\r\n\r\n/** @internal */\r\nexport function _CreateSizeGradientsData(particle: Particle, system: ThinParticleSystem) {\r\n particle._properties.currentSizeGradient = system._sizeGradients![0];\r\n particle._properties.currentSize1 = particle._properties.currentSizeGradient.getFactor();\r\n particle.size = particle._properties.currentSize1;\r\n\r\n if (system._sizeGradients!.length > 1) {\r\n particle._properties.currentSize2 = system._sizeGradients![1].getFactor();\r\n } else {\r\n particle._properties.currentSize2 = particle._properties.currentSize1;\r\n }\r\n\r\n particle.scale.copyFromFloats(RandomRange(system.minScaleX, system.maxScaleX), RandomRange(system.minScaleY, system.maxScaleY));\r\n}\r\n\r\n/** @internal */\r\nexport function _CreateStartSizeGradientsData(particle: Particle, system: ThinParticleSystem) {\r\n const ratio = system._actualFrame / system.targetStopDuration;\r\n _GetCurrentGradientToRef(ratio, system._startSizeGradients!);\r\n const currentGradient = _GradCurrent;\r\n const nextGradient = _GradNext;\r\n const scale = _GradScale;\r\n if (currentGradient !== system._currentStartSizeGradient) {\r\n system._currentStartSize1 = system._currentStartSize2;\r\n system._currentStartSize2 = (<FactorGradient>nextGradient).getFactor();\r\n system._currentStartSizeGradient = <FactorGradient>currentGradient;\r\n }\r\n\r\n const value = Lerp(system._currentStartSize1, system._currentStartSize2, scale);\r\n particle.scale.scaleInPlace(value);\r\n}\r\n\r\n/** @internal */\r\nexport function _ProcessSizeGradients(particle: Particle, system: ThinParticleSystem) {\r\n _GetCurrentGradientToRef(system._ratio, system._sizeGradients!);\r\n const currentGradient = _GradCurrent;\r\n const nextGradient = _GradNext;\r\n const scale = _GradScale;\r\n if (currentGradient !== particle._properties.currentSizeGradient) {\r\n particle._properties.currentSize1 = particle._properties.currentSize2;\r\n particle._properties.currentSize2 = (<FactorGradient>nextGradient).getFactor();\r\n particle._properties.currentSizeGradient = <FactorGradient>currentGradient;\r\n }\r\n particle.size = Lerp(particle._properties.currentSize1, particle._properties.currentSize2, scale);\r\n}\r\n\r\n/** Ramp */\r\n\r\n/** @internal */\r\nexport function _CreateRampData(particle: Particle, _system: ThinParticleSystem) {\r\n if (particle.remapData) {\r\n // Reuse remap data of recycled particles instead of allocating a Vector4 per call\r\n particle.remapData.copyFromFloats(0, 1, 0, 1);\r\n } else {\r\n particle.remapData = new Vector4(0, 1, 0, 1);\r\n }\r\n}\r\n\r\n/** Remap */\r\n\r\n/** @internal */\r\nexport function _ProcessRemapGradients(particle: Particle, system: ThinParticleSystem) {\r\n if (system._colorRemapGradients && system._colorRemapGradients.length > 0) {\r\n _GetCurrentGradientToRef(system._ratio, system._colorRemapGradients);\r\n const currentGradient = _GradCurrent;\r\n const nextGradient = _GradNext;\r\n const scale = _GradScale;\r\n const min = Lerp((<FactorGradient>currentGradient).factor1, (<FactorGradient>nextGradient).factor1, scale);\r\n const max = Lerp((<FactorGradient>currentGradient).factor2!, (<FactorGradient>nextGradient).factor2!, scale);\r\n\r\n particle.remapData.x = min;\r\n particle.remapData.y = max - min;\r\n }\r\n\r\n if (system._alphaRemapGradients && system._alphaRemapGradients.length > 0) {\r\n _GetCurrentGradientToRef(system._ratio, system._alphaRemapGradients);\r\n const currentGradient = _GradCurrent;\r\n const nextGradient = _GradNext;\r\n const scale = _GradScale;\r\n const min = Lerp((<FactorGradient>currentGradient).factor1, (<FactorGradient>nextGradient).factor1, scale);\r\n const max = Lerp((<FactorGradient>currentGradient).factor2!, (<FactorGradient>nextGradient).factor2!, scale);\r\n\r\n particle.remapData.z = min;\r\n particle.remapData.w = max - min;\r\n }\r\n}\r\n\r\n/** Life */\r\n\r\n/** @internal */\r\nexport function _CreateLifeGradientsData(particle: Particle, system: ThinParticleSystem) {\r\n const ratio = Clamp(system._actualFrame / system.targetStopDuration);\r\n _GetCurrentGradientToRef(ratio, system._lifeTimeGradients!);\r\n const currentGradient = _GradCurrent;\r\n const nextGradient = _GradNext;\r\n const factorGradient1 = <FactorGradient>currentGradient;\r\n const factorGradient2 = <FactorGradient>nextGradient;\r\n const lifeTime1 = factorGradient1.getFactor();\r\n const lifeTime2 = factorGradient2.getFactor();\r\n const gradient = (ratio - factorGradient1.gradient) / (factorGradient2.gradient - factorGradient1.gradient);\r\n particle.lifeTime = Lerp(lifeTime1, lifeTime2, gradient);\r\n system._emitPower = RandomRange(system.minEmitPower, system.maxEmitPower);\r\n}\r\n\r\n/** @internal */\r\nexport function _CreateLifetimeData(particle: Particle, system: ThinParticleSystem) {\r\n particle.lifeTime = RandomRange(system.minLifeTime, system.maxLifeTime);\r\n system._emitPower = RandomRange(system.minEmitPower, system.maxEmitPower);\r\n}\r\n\r\n/** Emit power */\r\n\r\n/** @internal */\r\nexport function _CreateEmitPowerData(particle: Particle, system: ThinParticleSystem) {\r\n if (system._emitPower === 0) {\r\n if (!particle._properties.initialDirection) {\r\n particle._properties.initialDirection = particle.direction.clone();\r\n } else {\r\n particle._properties.initialDirection.copyFrom(particle.direction);\r\n }\r\n particle.direction.set(0, 0, 0);\r\n } else {\r\n particle._properties.initialDirection = null;\r\n particle.direction.scaleInPlace(system._emitPower);\r\n }\r\n\r\n // Inherited Velocity\r\n particle.direction.addInPlace(system._inheritedVelocityOffset);\r\n}\r\n\r\n/** Angle */\r\n\r\n/** @internal */\r\nexport function _CreateAngleData(particle: Particle, system: ThinParticleSystem) {\r\n particle.angularSpeed = RandomRange(system.minAngularSpeed, system.maxAngularSpeed);\r\n particle.angle = RandomRange(system.minInitialRotation, system.maxInitialRotation);\r\n}\r\n\r\n/** @internal */\r\nexport function _CreateAngleGradientsData(particle: Particle, system: ThinParticleSystem) {\r\n particle._properties.currentAngularSpeedGradient = system._angularSpeedGradients![0];\r\n particle.angularSpeed = particle._properties.currentAngularSpeedGradient.getFactor();\r\n particle._properties.currentAngularSpeed1 = particle.angularSpeed;\r\n\r\n if (system._angularSpeedGradients!.length > 1) {\r\n particle._properties.currentAngularSpeed2 = system._angularSpeedGradients![1].getFactor();\r\n } else {\r\n particle._properties.currentAngularSpeed2 = particle._properties.currentAngularSpeed1;\r\n }\r\n particle.angle = RandomRange(system.minInitialRotation, system.maxInitialRotation);\r\n}\r\n\r\n/** Sheet */\r\n\r\n/** @internal */\r\nexport function _CreateSheetData(particle: Particle, system: ThinParticleSystem) {\r\n particle._properties.initialStartSpriteCellId = system.startSpriteCellID;\r\n particle._properties.initialEndSpriteCellId = system.endSpriteCellID;\r\n particle._properties.initialSpriteCellLoop = system.spriteCellLoop;\r\n}\r\n"]}
@@ -47,6 +47,8 @@ export declare class ThinParticleSystem extends BaseParticleSystem implements ID
47
47
  updateFunction: (particles: Particle[]) => void;
48
48
  /** @internal */
49
49
  _emitterWorldMatrix: Matrix;
50
+ /** Owned translation matrix for the vector-emitter path, so a live mesh world matrix is never overwritten in place */
51
+ private _emitterTranslationMatrix;
50
52
  /** @internal */
51
53
  _emitterInverseWorldMatrix: Matrix;
52
54
  private _startDirectionFunction;
@@ -88,6 +90,10 @@ export declare class ThinParticleSystem extends BaseParticleSystem implements ID
88
90
  _noiseTextureSize: Nullable<ISize>;
89
91
  /** @internal */
90
92
  _noiseTextureData: Nullable<Uint8Array>;
93
+ private _noiseTextureFetchInFlight;
94
+ private _noiseTextureFetchInternalTexture;
95
+ private _noiseTextureFetchToken;
96
+ private _noiseTextureReadbackFailureLogged;
91
97
  private _particles;
92
98
  private _epsilon;
93
99
  private _capacity;
@@ -101,6 +107,7 @@ export declare class ThinParticleSystem extends BaseParticleSystem implements ID
101
107
  private _linesIndexBuffer;
102
108
  private _linesIndexBufferUseInstancing;
103
109
  private _drawWrappers;
110
+ private _renderPassObserver;
104
111
  /** @internal */
105
112
  _customWrappers: {
106
113
  [blendMode: number]: Nullable<DrawWrapper>;
@@ -574,6 +581,7 @@ export declare class ThinParticleSystem extends BaseParticleSystem implements ID
574
581
  * @internal
575
582
  */
576
583
  private _getWrapper;
584
+ private _bindGeometryRendering;
577
585
  /**
578
586
  * Gets or sets a boolean indicating that the particle system is paused (no animation will be done).
579
587
  */