@babylonjs/core 8.11.0 → 8.12.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 (391) hide show
  1. package/Cameras/arcRotateCamera.js +8 -0
  2. package/Cameras/arcRotateCamera.js.map +1 -1
  3. package/Cameras/targetCamera.js +2 -0
  4. package/Cameras/targetCamera.js.map +1 -1
  5. package/Collisions/gpuPicker.d.ts +4 -0
  6. package/Collisions/gpuPicker.js +6 -0
  7. package/Collisions/gpuPicker.js.map +1 -1
  8. package/Engines/abstractEngine.js +2 -2
  9. package/Engines/abstractEngine.js.map +1 -1
  10. package/Engines/constants.d.ts +4 -0
  11. package/Engines/constants.js +4 -0
  12. package/Engines/constants.js.map +1 -1
  13. package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.d.ts +1 -0
  14. package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.js +2 -0
  15. package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.js.map +1 -1
  16. package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.d.ts +6 -1
  17. package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.js +29 -0
  18. package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.js.map +1 -1
  19. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.d.ts +6 -0
  20. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js +36 -9
  21. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js.map +1 -1
  22. package/FrameGraph/Node/Blocks/Rendering/shadowGeneratorBlock.js +1 -0
  23. package/FrameGraph/Node/Blocks/Rendering/shadowGeneratorBlock.js.map +1 -1
  24. package/FrameGraph/Node/Blocks/inputBlock.js +1 -0
  25. package/FrameGraph/Node/Blocks/inputBlock.js.map +1 -1
  26. package/FrameGraph/Node/Types/nodeRenderGraphTypes.d.ts +2 -0
  27. package/FrameGraph/Node/Types/nodeRenderGraphTypes.js +2 -0
  28. package/FrameGraph/Node/Types/nodeRenderGraphTypes.js.map +1 -1
  29. package/FrameGraph/Tasks/Rendering/csmShadowGeneratorTask.d.ts +23 -0
  30. package/FrameGraph/Tasks/Rendering/csmShadowGeneratorTask.js +126 -21
  31. package/FrameGraph/Tasks/Rendering/csmShadowGeneratorTask.js.map +1 -1
  32. package/FrameGraph/Tasks/Rendering/geometryRendererTask.d.ts +5 -0
  33. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js +4 -0
  34. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js.map +1 -1
  35. package/FrameGraph/Tasks/Rendering/shadowGeneratorTask.d.ts +2 -4
  36. package/FrameGraph/Tasks/Rendering/shadowGeneratorTask.js +4 -17
  37. package/FrameGraph/Tasks/Rendering/shadowGeneratorTask.js.map +1 -1
  38. package/FrameGraph/frameGraph.js +1 -1
  39. package/FrameGraph/frameGraph.js.map +1 -1
  40. package/FrameGraph/frameGraphContext.d.ts +30 -0
  41. package/FrameGraph/frameGraphContext.js +47 -0
  42. package/FrameGraph/frameGraphContext.js.map +1 -1
  43. package/FrameGraph/frameGraphRenderContext.d.ts +1 -4
  44. package/FrameGraph/frameGraphRenderContext.js +2 -5
  45. package/FrameGraph/frameGraphRenderContext.js.map +1 -1
  46. package/Lights/Shadows/cascadedShadowGenerator.d.ts +0 -1
  47. package/Lights/Shadows/cascadedShadowGenerator.js +0 -12
  48. package/Lights/Shadows/cascadedShadowGenerator.js.map +1 -1
  49. package/Materials/Node/Blocks/Dual/clipPlanesBlock.d.ts +1 -1
  50. package/Materials/Node/Blocks/Dual/clipPlanesBlock.js +4 -1
  51. package/Materials/Node/Blocks/Dual/clipPlanesBlock.js.map +1 -1
  52. package/Materials/Node/Blocks/Dual/currentScreenBlock.d.ts +2 -3
  53. package/Materials/Node/Blocks/Dual/currentScreenBlock.js +1 -1
  54. package/Materials/Node/Blocks/Dual/currentScreenBlock.js.map +1 -1
  55. package/Materials/Node/Blocks/Dual/fogBlock.d.ts +1 -1
  56. package/Materials/Node/Blocks/Dual/fogBlock.js +4 -1
  57. package/Materials/Node/Blocks/Dual/fogBlock.js.map +1 -1
  58. package/Materials/Node/Blocks/Dual/lightBlock.d.ts +1 -1
  59. package/Materials/Node/Blocks/Dual/lightBlock.js +2 -2
  60. package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
  61. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.d.ts +1 -2
  62. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js +1 -1
  63. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js.map +1 -1
  64. package/Materials/Node/Blocks/Dual/smartFilterTextureBlock.js +3 -4
  65. package/Materials/Node/Blocks/Dual/smartFilterTextureBlock.js.map +1 -1
  66. package/Materials/Node/Blocks/Dual/textureBlock.d.ts +2 -3
  67. package/Materials/Node/Blocks/Dual/textureBlock.js +2 -2
  68. package/Materials/Node/Blocks/Dual/textureBlock.js.map +1 -1
  69. package/Materials/Node/Blocks/Fragment/TBNBlock.d.ts +1 -1
  70. package/Materials/Node/Blocks/Fragment/TBNBlock.js +4 -1
  71. package/Materials/Node/Blocks/Fragment/TBNBlock.js.map +1 -1
  72. package/Materials/Node/Blocks/Fragment/fragCoordBlock.js +2 -2
  73. package/Materials/Node/Blocks/Fragment/fragCoordBlock.js.map +1 -1
  74. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.d.ts +1 -2
  75. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js +1 -1
  76. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js.map +1 -1
  77. package/Materials/Node/Blocks/Fragment/frontFacingBlock.js +2 -2
  78. package/Materials/Node/Blocks/Fragment/frontFacingBlock.js.map +1 -1
  79. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js +1 -2
  80. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js.map +1 -1
  81. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.d.ts +1 -1
  82. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.js +1 -1
  83. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.js.map +1 -1
  84. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.d.ts +1 -2
  85. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js +1 -1
  86. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js.map +1 -1
  87. package/Materials/Node/Blocks/Fragment/screenSizeBlock.js +2 -2
  88. package/Materials/Node/Blocks/Fragment/screenSizeBlock.js.map +1 -1
  89. package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.d.ts +3 -3
  90. package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.js +6 -3
  91. package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.js.map +1 -1
  92. package/Materials/Node/Blocks/PBR/anisotropyBlock.d.ts +1 -2
  93. package/Materials/Node/Blocks/PBR/anisotropyBlock.js +2 -4
  94. package/Materials/Node/Blocks/PBR/anisotropyBlock.js.map +1 -1
  95. package/Materials/Node/Blocks/PBR/clearCoatBlock.d.ts +1 -2
  96. package/Materials/Node/Blocks/PBR/clearCoatBlock.js +1 -2
  97. package/Materials/Node/Blocks/PBR/clearCoatBlock.js.map +1 -1
  98. package/Materials/Node/Blocks/PBR/iridescenceBlock.d.ts +2 -3
  99. package/Materials/Node/Blocks/PBR/iridescenceBlock.js +1 -2
  100. package/Materials/Node/Blocks/PBR/iridescenceBlock.js.map +1 -1
  101. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.d.ts +1 -1
  102. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +5 -2
  103. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
  104. package/Materials/Node/Blocks/PBR/reflectionBlock.d.ts +1 -2
  105. package/Materials/Node/Blocks/PBR/reflectionBlock.js +2 -2
  106. package/Materials/Node/Blocks/PBR/reflectionBlock.js.map +1 -1
  107. package/Materials/Node/Blocks/PBR/refractionBlock.d.ts +1 -2
  108. package/Materials/Node/Blocks/PBR/refractionBlock.js +1 -2
  109. package/Materials/Node/Blocks/PBR/refractionBlock.js.map +1 -1
  110. package/Materials/Node/Blocks/PBR/sheenBlock.d.ts +2 -3
  111. package/Materials/Node/Blocks/PBR/sheenBlock.js +1 -2
  112. package/Materials/Node/Blocks/PBR/sheenBlock.js.map +1 -1
  113. package/Materials/Node/Blocks/PBR/subSurfaceBlock.d.ts +2 -3
  114. package/Materials/Node/Blocks/PBR/subSurfaceBlock.js +1 -2
  115. package/Materials/Node/Blocks/PBR/subSurfaceBlock.js.map +1 -1
  116. package/Materials/Node/Blocks/Particle/particleTextureBlock.d.ts +1 -2
  117. package/Materials/Node/Blocks/Particle/particleTextureBlock.js +1 -1
  118. package/Materials/Node/Blocks/Particle/particleTextureBlock.js.map +1 -1
  119. package/Materials/Node/Blocks/Vertex/bonesBlock.d.ts +2 -2
  120. package/Materials/Node/Blocks/Vertex/bonesBlock.js +3 -3
  121. package/Materials/Node/Blocks/Vertex/bonesBlock.js.map +1 -1
  122. package/Materials/Node/Blocks/Vertex/instancesBlock.d.ts +1 -1
  123. package/Materials/Node/Blocks/Vertex/instancesBlock.js +1 -1
  124. package/Materials/Node/Blocks/Vertex/instancesBlock.js.map +1 -1
  125. package/Materials/Node/Blocks/Vertex/lightInformationBlock.d.ts +1 -2
  126. package/Materials/Node/Blocks/Vertex/lightInformationBlock.js +1 -1
  127. package/Materials/Node/Blocks/Vertex/lightInformationBlock.js.map +1 -1
  128. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.d.ts +2 -2
  129. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js +8 -2
  130. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js.map +1 -1
  131. package/Materials/Node/Blocks/transformBlock.d.ts +3 -3
  132. package/Materials/Node/Blocks/transformBlock.js +4 -5
  133. package/Materials/Node/Blocks/transformBlock.js.map +1 -1
  134. package/Materials/Node/Blocks/triPlanarBlock.d.ts +1 -3
  135. package/Materials/Node/Blocks/triPlanarBlock.js +1 -1
  136. package/Materials/Node/Blocks/triPlanarBlock.js.map +1 -1
  137. package/Materials/Node/nodeMaterial.d.ts +1 -1
  138. package/Materials/Node/nodeMaterial.js +28 -42
  139. package/Materials/Node/nodeMaterial.js.map +1 -1
  140. package/Materials/Node/nodeMaterialBlock.d.ts +8 -12
  141. package/Materials/Node/nodeMaterialBlock.js +10 -12
  142. package/Materials/Node/nodeMaterialBlock.js.map +1 -1
  143. package/Materials/Node/nodeMaterialBuildState.js +3 -1
  144. package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
  145. package/Materials/Node/nodeMaterialBuildStateSharedData.d.ts +7 -3
  146. package/Materials/Node/nodeMaterialBuildStateSharedData.js +17 -6
  147. package/Materials/Node/nodeMaterialBuildStateSharedData.js.map +1 -1
  148. package/Materials/PBR/pbrBaseMaterial.d.ts +2 -0
  149. package/Materials/PBR/pbrBaseMaterial.js +11 -0
  150. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  151. package/Materials/Textures/Loaders/exrTextureLoader.d.ts +10 -0
  152. package/Materials/Textures/Loaders/exrTextureLoader.js +28 -1
  153. package/Materials/Textures/Loaders/exrTextureLoader.js.map +1 -1
  154. package/Materials/materialHelper.functions.js +1 -1
  155. package/Materials/materialHelper.functions.js.map +1 -1
  156. package/Materials/materialHelper.geometryrendering.js +7 -0
  157. package/Materials/materialHelper.geometryrendering.js.map +1 -1
  158. package/Materials/standardMaterial.d.ts +2 -0
  159. package/Materials/standardMaterial.js +11 -0
  160. package/Materials/standardMaterial.js.map +1 -1
  161. package/Meshes/Node/Blocks/Textures/geometryTextureBlock.d.ts +7 -0
  162. package/Meshes/Node/Blocks/Textures/geometryTextureBlock.js +11 -5
  163. package/Meshes/Node/Blocks/Textures/geometryTextureBlock.js.map +1 -1
  164. package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.d.ts +6 -0
  165. package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.js +42 -4
  166. package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.js.map +1 -1
  167. package/Meshes/Node/Blocks/geometryOptimizeBlock.js +8 -0
  168. package/Meshes/Node/Blocks/geometryOptimizeBlock.js.map +1 -1
  169. package/Misc/environmentTextureTools.js +1 -1
  170. package/Misc/environmentTextureTools.js.map +1 -1
  171. package/Misc/minMaxReducer.d.ts +8 -6
  172. package/Misc/minMaxReducer.js +57 -90
  173. package/Misc/minMaxReducer.js.map +1 -1
  174. package/Misc/observable.d.ts +1 -1
  175. package/Misc/observable.js.map +1 -1
  176. package/Misc/thinMinMaxReducer.d.ts +47 -0
  177. package/Misc/thinMinMaxReducer.js +148 -0
  178. package/Misc/thinMinMaxReducer.js.map +1 -0
  179. package/Particles/EmitterTypes/customParticleEmitter.d.ts +5 -0
  180. package/Particles/EmitterTypes/customParticleEmitter.js +9 -1
  181. package/Particles/EmitterTypes/customParticleEmitter.js.map +1 -1
  182. package/Particles/IParticleSystem.d.ts +8 -0
  183. package/Particles/IParticleSystem.js.map +1 -1
  184. package/Particles/Node/Blocks/Conditions/particleConditionBlock.d.ts +75 -0
  185. package/Particles/Node/Blocks/Conditions/particleConditionBlock.js +179 -0
  186. package/Particles/Node/Blocks/Conditions/particleConditionBlock.js.map +1 -0
  187. package/Particles/Node/Blocks/Emitters/boxShapeBlock.d.ts +47 -0
  188. package/Particles/Node/Blocks/Emitters/boxShapeBlock.js +107 -0
  189. package/Particles/Node/Blocks/Emitters/boxShapeBlock.js.map +1 -0
  190. package/Particles/Node/Blocks/Emitters/createParticleBlock.d.ts +46 -0
  191. package/Particles/Node/Blocks/Emitters/createParticleBlock.js +97 -0
  192. package/Particles/Node/Blocks/Emitters/createParticleBlock.js.map +1 -0
  193. package/Particles/Node/Blocks/Emitters/customShapeBlock.d.ts +39 -0
  194. package/Particles/Node/Blocks/Emitters/customShapeBlock.js +84 -0
  195. package/Particles/Node/Blocks/Emitters/customShapeBlock.js.map +1 -0
  196. package/Particles/Node/Blocks/Emitters/cylinderShapeBlock.d.ts +48 -0
  197. package/Particles/Node/Blocks/Emitters/cylinderShapeBlock.js +120 -0
  198. package/Particles/Node/Blocks/Emitters/cylinderShapeBlock.js.map +1 -0
  199. package/Particles/Node/Blocks/Emitters/index.d.ts +7 -0
  200. package/Particles/Node/Blocks/Emitters/index.js +8 -0
  201. package/Particles/Node/Blocks/Emitters/index.js.map +1 -0
  202. package/Particles/Node/Blocks/Emitters/pointShapeBlock.d.ts +39 -0
  203. package/Particles/Node/Blocks/Emitters/pointShapeBlock.js +86 -0
  204. package/Particles/Node/Blocks/Emitters/pointShapeBlock.js.map +1 -0
  205. package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.d.ts +53 -0
  206. package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.js +111 -0
  207. package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.js.map +1 -0
  208. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.d.ts +43 -0
  209. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.js +108 -0
  210. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.js.map +1 -0
  211. package/Particles/Node/Blocks/Teleport/particleTeleportInBlock.d.ts +48 -0
  212. package/Particles/Node/Blocks/Teleport/particleTeleportInBlock.js +100 -0
  213. package/Particles/Node/Blocks/Teleport/particleTeleportInBlock.js.map +1 -0
  214. package/Particles/Node/Blocks/Teleport/particleTeleportOutBlock.d.ts +47 -0
  215. package/Particles/Node/Blocks/Teleport/particleTeleportOutBlock.js +82 -0
  216. package/Particles/Node/Blocks/Teleport/particleTeleportOutBlock.js.map +1 -0
  217. package/Particles/Node/Blocks/Triggers/particleTriggerBlock.d.ts +48 -0
  218. package/Particles/Node/Blocks/Triggers/particleTriggerBlock.js +133 -0
  219. package/Particles/Node/Blocks/Triggers/particleTriggerBlock.js.map +1 -0
  220. package/Particles/Node/Blocks/Triggers/triggerTools.d.ts +9 -0
  221. package/Particles/Node/Blocks/Triggers/triggerTools.js +16 -0
  222. package/Particles/Node/Blocks/Triggers/triggerTools.js.map +1 -0
  223. package/Particles/Node/Blocks/Update/basicPositionUpdateBlock.d.ts +31 -0
  224. package/Particles/Node/Blocks/Update/basicPositionUpdateBlock.js +64 -0
  225. package/Particles/Node/Blocks/Update/basicPositionUpdateBlock.js.map +1 -0
  226. package/Particles/Node/Blocks/Update/basicSpriteUpdateBlock.d.ts +31 -0
  227. package/Particles/Node/Blocks/Update/basicSpriteUpdateBlock.js +63 -0
  228. package/Particles/Node/Blocks/Update/basicSpriteUpdateBlock.js.map +1 -0
  229. package/Particles/Node/Blocks/Update/updateAngleBlock.d.ts +35 -0
  230. package/Particles/Node/Blocks/Update/updateAngleBlock.js +73 -0
  231. package/Particles/Node/Blocks/Update/updateAngleBlock.js.map +1 -0
  232. package/Particles/Node/Blocks/Update/updateColorBlock.d.ts +35 -0
  233. package/Particles/Node/Blocks/Update/updateColorBlock.js +73 -0
  234. package/Particles/Node/Blocks/Update/updateColorBlock.js.map +1 -0
  235. package/Particles/Node/Blocks/Update/updateDirectionBlock.d.ts +35 -0
  236. package/Particles/Node/Blocks/Update/updateDirectionBlock.js +73 -0
  237. package/Particles/Node/Blocks/Update/updateDirectionBlock.js.map +1 -0
  238. package/Particles/Node/Blocks/Update/updateFlowMapBlock.d.ts +41 -0
  239. package/Particles/Node/Blocks/Update/updateFlowMapBlock.js +102 -0
  240. package/Particles/Node/Blocks/Update/updateFlowMapBlock.js.map +1 -0
  241. package/Particles/Node/Blocks/Update/updatePositionBlock.d.ts +35 -0
  242. package/Particles/Node/Blocks/Update/updatePositionBlock.js +73 -0
  243. package/Particles/Node/Blocks/Update/updatePositionBlock.js.map +1 -0
  244. package/Particles/Node/Blocks/Update/updateScaleBlock.d.ts +35 -0
  245. package/Particles/Node/Blocks/Update/updateScaleBlock.js +73 -0
  246. package/Particles/Node/Blocks/Update/updateScaleBlock.js.map +1 -0
  247. package/Particles/Node/Blocks/Update/updateSpriteCellIndexBlock.d.ts +35 -0
  248. package/Particles/Node/Blocks/Update/updateSpriteCellIndexBlock.js +74 -0
  249. package/Particles/Node/Blocks/Update/updateSpriteCellIndexBlock.js.map +1 -0
  250. package/Particles/Node/Blocks/index.d.ts +27 -0
  251. package/Particles/Node/Blocks/index.js +29 -0
  252. package/Particles/Node/Blocks/index.js.map +1 -0
  253. package/Particles/Node/Blocks/particleConverterBlock.d.ts +85 -0
  254. package/Particles/Node/Blocks/particleConverterBlock.js +267 -0
  255. package/Particles/Node/Blocks/particleConverterBlock.js.map +1 -0
  256. package/Particles/Node/Blocks/particleDebugBlock.d.ts +37 -0
  257. package/Particles/Node/Blocks/particleDebugBlock.js +109 -0
  258. package/Particles/Node/Blocks/particleDebugBlock.js.map +1 -0
  259. package/Particles/Node/Blocks/particleElbowBlock.d.ts +27 -0
  260. package/Particles/Node/Blocks/particleElbowBlock.js +47 -0
  261. package/Particles/Node/Blocks/particleElbowBlock.js.map +1 -0
  262. package/Particles/Node/Blocks/particleGradientBlock.d.ts +28 -0
  263. package/Particles/Node/Blocks/particleGradientBlock.js +118 -0
  264. package/Particles/Node/Blocks/particleGradientBlock.js.map +1 -0
  265. package/Particles/Node/Blocks/particleGradientValueBlock.d.ts +32 -0
  266. package/Particles/Node/Blocks/particleGradientValueBlock.js +79 -0
  267. package/Particles/Node/Blocks/particleGradientValueBlock.js.map +1 -0
  268. package/Particles/Node/Blocks/particleInputBlock.d.ts +87 -0
  269. package/Particles/Node/Blocks/particleInputBlock.js +279 -0
  270. package/Particles/Node/Blocks/particleInputBlock.js.map +1 -0
  271. package/Particles/Node/Blocks/particleLerpBlock.d.ts +34 -0
  272. package/Particles/Node/Blocks/particleLerpBlock.js +92 -0
  273. package/Particles/Node/Blocks/particleLerpBlock.js.map +1 -0
  274. package/Particles/Node/Blocks/particleMathBlock.d.ts +64 -0
  275. package/Particles/Node/Blocks/particleMathBlock.js +321 -0
  276. package/Particles/Node/Blocks/particleMathBlock.js.map +1 -0
  277. package/Particles/Node/Blocks/particleRandomBlock.d.ts +52 -0
  278. package/Particles/Node/Blocks/particleRandomBlock.js +161 -0
  279. package/Particles/Node/Blocks/particleRandomBlock.js.map +1 -0
  280. package/Particles/Node/Blocks/particleSourceTextureBlock.d.ts +65 -0
  281. package/Particles/Node/Blocks/particleSourceTextureBlock.js +173 -0
  282. package/Particles/Node/Blocks/particleSourceTextureBlock.js.map +1 -0
  283. package/Particles/Node/Blocks/particleTrigonometryBlock.d.ts +80 -0
  284. package/Particles/Node/Blocks/particleTrigonometryBlock.js +272 -0
  285. package/Particles/Node/Blocks/particleTrigonometryBlock.js.map +1 -0
  286. package/Particles/Node/Blocks/randomRangeBlock.d.ts +45 -0
  287. package/Particles/Node/Blocks/randomRangeBlock.js +151 -0
  288. package/Particles/Node/Blocks/randomRangeBlock.js.map +1 -0
  289. package/Particles/Node/Blocks/systemBlock.d.ts +71 -0
  290. package/Particles/Node/Blocks/systemBlock.js +193 -0
  291. package/Particles/Node/Blocks/systemBlock.js.map +1 -0
  292. package/Particles/Node/Enums/nodeParticleBlockConnectionPointTypes.d.ts +39 -0
  293. package/Particles/Node/Enums/nodeParticleBlockConnectionPointTypes.js +41 -0
  294. package/Particles/Node/Enums/nodeParticleBlockConnectionPointTypes.js.map +1 -0
  295. package/Particles/Node/Enums/nodeParticleContextualSources.d.ts +31 -0
  296. package/Particles/Node/Enums/nodeParticleContextualSources.js +34 -0
  297. package/Particles/Node/Enums/nodeParticleContextualSources.js.map +1 -0
  298. package/Particles/Node/Enums/nodeParticleSystemSources.d.ts +13 -0
  299. package/Particles/Node/Enums/nodeParticleSystemSources.js +15 -0
  300. package/Particles/Node/Enums/nodeParticleSystemSources.js.map +1 -0
  301. package/Particles/Node/index.d.ts +8 -0
  302. package/Particles/Node/index.js +10 -0
  303. package/Particles/Node/index.js.map +1 -0
  304. package/Particles/Node/nodeParticleBlock.d.ts +154 -0
  305. package/Particles/Node/nodeParticleBlock.js +355 -0
  306. package/Particles/Node/nodeParticleBlock.js.map +1 -0
  307. package/Particles/Node/nodeParticleBlockConnectionPoint.d.ts +188 -0
  308. package/Particles/Node/nodeParticleBlockConnectionPoint.js +337 -0
  309. package/Particles/Node/nodeParticleBlockConnectionPoint.js.map +1 -0
  310. package/Particles/Node/nodeParticleBuildState.d.ts +89 -0
  311. package/Particles/Node/nodeParticleBuildState.js +170 -0
  312. package/Particles/Node/nodeParticleBuildState.js.map +1 -0
  313. package/Particles/Node/nodeParticleSystemSet.d.ts +121 -0
  314. package/Particles/Node/nodeParticleSystemSet.js +383 -0
  315. package/Particles/Node/nodeParticleSystemSet.js.map +1 -0
  316. package/Particles/Queue/executionQueue.d.ts +2 -0
  317. package/Particles/Queue/executionQueue.js +10 -0
  318. package/Particles/Queue/executionQueue.js.map +1 -1
  319. package/Particles/baseParticleSystem.d.ts +6 -1
  320. package/Particles/baseParticleSystem.js +7 -0
  321. package/Particles/baseParticleSystem.js.map +1 -1
  322. package/Particles/flowMap.d.ts +7 -0
  323. package/Particles/flowMap.js +32 -0
  324. package/Particles/flowMap.js.map +1 -1
  325. package/Particles/gpuParticleSystem.d.ts +4 -0
  326. package/Particles/gpuParticleSystem.js +4 -0
  327. package/Particles/gpuParticleSystem.js.map +1 -1
  328. package/Particles/index.d.ts +1 -0
  329. package/Particles/index.js +1 -0
  330. package/Particles/index.js.map +1 -1
  331. package/Particles/particleSystem.d.ts +12 -0
  332. package/Particles/particleSystem.js +22 -1
  333. package/Particles/particleSystem.js.map +1 -1
  334. package/Particles/thinParticleSystem.d.ts +32 -11
  335. package/Particles/thinParticleSystem.js +62 -36
  336. package/Particles/thinParticleSystem.js.map +1 -1
  337. package/PostProcesses/postProcessManager.d.ts +2 -1
  338. package/PostProcesses/postProcessManager.js +3 -2
  339. package/PostProcesses/postProcessManager.js.map +1 -1
  340. package/Shaders/ShadersInclude/defaultUboDeclaration.js +1 -1
  341. package/Shaders/ShadersInclude/defaultUboDeclaration.js.map +1 -1
  342. package/Shaders/ShadersInclude/defaultVertexDeclaration.js +1 -0
  343. package/Shaders/ShadersInclude/defaultVertexDeclaration.js.map +1 -1
  344. package/Shaders/ShadersInclude/lightFragment.js +5 -2
  345. package/Shaders/ShadersInclude/lightFragment.js.map +1 -1
  346. package/Shaders/ShadersInclude/morphTargetsVertexDeclaration.js +3 -0
  347. package/Shaders/ShadersInclude/morphTargetsVertexDeclaration.js.map +1 -1
  348. package/Shaders/ShadersInclude/pbrBlockPrePass.js +3 -0
  349. package/Shaders/ShadersInclude/pbrBlockPrePass.js.map +1 -1
  350. package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js +1 -1
  351. package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
  352. package/Shaders/ShadersInclude/pbrUboDeclaration.js +1 -1
  353. package/Shaders/ShadersInclude/pbrUboDeclaration.js.map +1 -1
  354. package/Shaders/ShadersInclude/pbrVertexDeclaration.js +1 -0
  355. package/Shaders/ShadersInclude/pbrVertexDeclaration.js.map +1 -1
  356. package/Shaders/ShadersInclude/prePassDeclaration.js +3 -0
  357. package/Shaders/ShadersInclude/prePassDeclaration.js.map +1 -1
  358. package/Shaders/ShadersInclude/prePassVertex.js +3 -0
  359. package/Shaders/ShadersInclude/prePassVertex.js.map +1 -1
  360. package/Shaders/ShadersInclude/prePassVertexDeclaration.js +3 -0
  361. package/Shaders/ShadersInclude/prePassVertexDeclaration.js.map +1 -1
  362. package/Shaders/default.fragment.js +3 -0
  363. package/Shaders/default.fragment.js.map +1 -1
  364. package/Shaders/minmaxRedux.fragment.js +13 -5
  365. package/Shaders/minmaxRedux.fragment.js.map +1 -1
  366. package/ShadersWGSL/ShadersInclude/defaultUboDeclaration.js +1 -1
  367. package/ShadersWGSL/ShadersInclude/defaultUboDeclaration.js.map +1 -1
  368. package/ShadersWGSL/ShadersInclude/lightFragment.js +5 -2
  369. package/ShadersWGSL/ShadersInclude/lightFragment.js.map +1 -1
  370. package/ShadersWGSL/ShadersInclude/morphTargetsVertexDeclaration.js +3 -0
  371. package/ShadersWGSL/ShadersInclude/morphTargetsVertexDeclaration.js.map +1 -1
  372. package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.js +3 -0
  373. package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.js.map +1 -1
  374. package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js +1 -1
  375. package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
  376. package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js +1 -1
  377. package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js.map +1 -1
  378. package/ShadersWGSL/ShadersInclude/prePassDeclaration.js +3 -0
  379. package/ShadersWGSL/ShadersInclude/prePassDeclaration.js.map +1 -1
  380. package/ShadersWGSL/ShadersInclude/prePassVertex.js +3 -0
  381. package/ShadersWGSL/ShadersInclude/prePassVertex.js.map +1 -1
  382. package/ShadersWGSL/ShadersInclude/prePassVertexDeclaration.js +3 -0
  383. package/ShadersWGSL/ShadersInclude/prePassVertexDeclaration.js.map +1 -1
  384. package/ShadersWGSL/default.fragment.js +3 -0
  385. package/ShadersWGSL/default.fragment.js.map +1 -1
  386. package/ShadersWGSL/minmaxRedux.fragment.js +14 -6
  387. package/ShadersWGSL/minmaxRedux.fragment.js.map +1 -1
  388. package/package.json +1 -1
  389. package/scene.d.ts +5 -0
  390. package/scene.js +8 -0
  391. package/scene.js.map +1 -1
@@ -0,0 +1,82 @@
1
+ import { RegisterClass } from "../../../../Misc/typeStore.js";
2
+ import { NodeParticleBlock } from "../../nodeParticleBlock.js";
3
+ import { NodeParticleBlockConnectionPointTypes } from "../../Enums/nodeParticleBlockConnectionPointTypes.js";
4
+ /**
5
+ * Defines a block used to receive a value from a teleport entry point
6
+ */
7
+ export class ParticleTeleportOutBlock extends NodeParticleBlock {
8
+ /**
9
+ * Create a new ParticleTeleportOutBlock
10
+ * @param name defines the block name
11
+ */
12
+ constructor(name) {
13
+ super(name);
14
+ /** @internal */
15
+ this._entryPoint = null;
16
+ /** @internal */
17
+ this._tempEntryPointUniqueId = null;
18
+ this._isTeleportOut = true;
19
+ this.registerOutput("output", NodeParticleBlockConnectionPointTypes.BasedOnInput);
20
+ }
21
+ /**
22
+ * Gets the entry point
23
+ */
24
+ get entryPoint() {
25
+ return this._entryPoint;
26
+ }
27
+ /**
28
+ * Gets the current class name
29
+ * @returns the class name
30
+ */
31
+ getClassName() {
32
+ return "ParticleTeleportOutBlock";
33
+ }
34
+ /**
35
+ * Gets the output component
36
+ */
37
+ get output() {
38
+ return this._outputs[0];
39
+ }
40
+ /** Detach from entry point */
41
+ detach() {
42
+ if (!this._entryPoint) {
43
+ return;
44
+ }
45
+ this._entryPoint.detachFromEndpoint(this);
46
+ }
47
+ _build() {
48
+ // Do nothing
49
+ // All work done by the emitter
50
+ }
51
+ _customBuildStep(state) {
52
+ if (this.entryPoint) {
53
+ this.entryPoint.build(state);
54
+ }
55
+ }
56
+ /**
57
+ * Clone the current block to a new identical block
58
+ * @returns a copy of the current block
59
+ */
60
+ clone() {
61
+ const clone = super.clone();
62
+ if (this.entryPoint) {
63
+ this.entryPoint.attachToEndpoint(clone);
64
+ }
65
+ return clone;
66
+ }
67
+ /**
68
+ * Serializes this block in a JSON representation
69
+ * @returns the serialized block object
70
+ */
71
+ serialize() {
72
+ const serializationObject = super.serialize();
73
+ serializationObject.entryPoint = this.entryPoint?.uniqueId ?? "";
74
+ return serializationObject;
75
+ }
76
+ _deserialize(serializationObject) {
77
+ super._deserialize(serializationObject);
78
+ this._tempEntryPointUniqueId = serializationObject.entryPoint;
79
+ }
80
+ }
81
+ RegisterClass("BABYLON.ParticleTeleportOutBlock", ParticleTeleportOutBlock);
82
+ //# sourceMappingURL=particleTeleportOutBlock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"particleTeleportOutBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/Particles/Node/Blocks/Teleport/particleTeleportOutBlock.ts"],"names":[],"mappings":"AACA,OAAO,EAAE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,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAiC,CAAC,CAAC;QACxE,CAAC;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;IAED;;;OAGG;IACa,SAAS;QACrB,MAAM,mBAAmB,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;QAE9C,mBAAmB,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,QAAQ,IAAI,EAAE,CAAC;QAEjE,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAEe,YAAY,CAAC,mBAAwB;QACjD,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QAExC,IAAI,CAAC,uBAAuB,GAAG,mBAAmB,CAAC,UAAU,CAAC;IAClE,CAAC;CACJ;AAED,aAAa,CAAC,kCAAkC,EAAE,wBAAwB,CAAC,CAAC","sourcesContent":["import type { Nullable } from \"../../../../types\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport { NodeParticleBlock } from \"../../nodeParticleBlock\";\r\nimport { NodeParticleBlockConnectionPointTypes } from \"../../Enums/nodeParticleBlockConnectionPointTypes\";\r\nimport type { NodeParticleConnectionPoint } from \"../../nodeParticleBlockConnectionPoint\";\r\nimport type { ParticleTeleportInBlock } from \"./particleTeleportInBlock\";\r\nimport type { NodeParticleBuildState } from \"../../nodeParticleBuildState\";\r\n\r\n/**\r\n * Defines a block used to receive a value from a teleport entry point\r\n */\r\nexport class ParticleTeleportOutBlock extends NodeParticleBlock {\r\n /** @internal */\r\n public _entryPoint: Nullable<ParticleTeleportInBlock> = null;\r\n /** @internal */\r\n public _tempEntryPointUniqueId: Nullable<number> = null;\r\n\r\n /**\r\n * Create a new ParticleTeleportOutBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this._isTeleportOut = true;\r\n\r\n this.registerOutput(\"output\", NodeParticleBlockConnectionPointTypes.BasedOnInput);\r\n }\r\n\r\n /**\r\n * Gets the entry point\r\n */\r\n public get entryPoint() {\r\n return this._entryPoint;\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"ParticleTeleportOutBlock\";\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeParticleConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /** Detach from entry point */\r\n public detach() {\r\n if (!this._entryPoint) {\r\n return;\r\n }\r\n this._entryPoint.detachFromEndpoint(this);\r\n }\r\n\r\n public override _build() {\r\n // Do nothing\r\n // All work done by the emitter\r\n }\r\n\r\n protected override _customBuildStep(state: NodeParticleBuildState): void {\r\n if (this.entryPoint) {\r\n this.entryPoint.build(state);\r\n }\r\n }\r\n\r\n /**\r\n * Clone the current block to a new identical block\r\n * @returns a copy of the current block\r\n */\r\n public override clone() {\r\n const clone = super.clone();\r\n\r\n if (this.entryPoint) {\r\n this.entryPoint.attachToEndpoint(clone as ParticleTeleportOutBlock);\r\n }\r\n\r\n return clone;\r\n }\r\n\r\n /**\r\n * Serializes this block in a JSON representation\r\n * @returns the serialized block object\r\n */\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.entryPoint = this.entryPoint?.uniqueId ?? \"\";\r\n\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this._tempEntryPointUniqueId = serializationObject.entryPoint;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.ParticleTeleportOutBlock\", ParticleTeleportOutBlock);\r\n"]}
@@ -0,0 +1,48 @@
1
+ import { NodeParticleBlock } from "../../nodeParticleBlock.js";
2
+ import type { NodeParticleConnectionPoint } from "../../nodeParticleBlockConnectionPoint.js";
3
+ import type { NodeParticleBuildState } from "../../nodeParticleBuildState.js";
4
+ /**
5
+ * Block used to trigger a particle system based on a condition.
6
+ */
7
+ export declare class ParticleTriggerBlock extends NodeParticleBlock {
8
+ private _triggerCount;
9
+ /**
10
+ * Gets or sets the emit rate
11
+ */
12
+ limit: number;
13
+ /**
14
+ * Gets or sets the emit rate
15
+ */
16
+ delay: number;
17
+ /**
18
+ * Create a new ParticleTriggerBlock
19
+ * @param name defines the block name
20
+ */
21
+ constructor(name: string);
22
+ /**
23
+ * Gets the current class name
24
+ * @returns the class name
25
+ */
26
+ getClassName(): string;
27
+ /**
28
+ * Gets the input component
29
+ */
30
+ get input(): NodeParticleConnectionPoint;
31
+ /**
32
+ * Gets the condition input component
33
+ */
34
+ get condition(): NodeParticleConnectionPoint;
35
+ /**
36
+ * Gets the target system input component
37
+ */
38
+ get system(): NodeParticleConnectionPoint;
39
+ /**
40
+ * Gets the output component
41
+ */
42
+ get output(): NodeParticleConnectionPoint;
43
+ private _previousOne;
44
+ _build(state: NodeParticleBuildState): void;
45
+ serialize(): any;
46
+ _deserialize(serializationObject: any): void;
47
+ dispose(): void;
48
+ }
@@ -0,0 +1,133 @@
1
+ import { __decorate } from "../../../../tslib.es6.js";
2
+ import { RegisterClass } from "../../../../Misc/typeStore.js";
3
+ import { NodeParticleBlock } from "../../nodeParticleBlock.js";
4
+ import { NodeParticleBlockConnectionPointTypes } from "../../Enums/nodeParticleBlockConnectionPointTypes.js";
5
+ import { _ConnectAtTheEnd } from "../../../Queue/executionQueue.js";
6
+ import { editableInPropertyPage } from "../../../../Decorators/nodeDecorator.js";
7
+ import { _TriggerSubEmitter } from "./triggerTools.js";
8
+ /**
9
+ * Block used to trigger a particle system based on a condition.
10
+ */
11
+ export class ParticleTriggerBlock extends NodeParticleBlock {
12
+ /**
13
+ * Create a new ParticleTriggerBlock
14
+ * @param name defines the block name
15
+ */
16
+ constructor(name) {
17
+ super(name);
18
+ this._triggerCount = 0;
19
+ /**
20
+ * Gets or sets the emit rate
21
+ */
22
+ this.limit = 5;
23
+ /**
24
+ * Gets or sets the emit rate
25
+ */
26
+ this.delay = 250;
27
+ this._previousOne = null;
28
+ this.registerInput("input", NodeParticleBlockConnectionPointTypes.Particle);
29
+ this.registerInput("condition", NodeParticleBlockConnectionPointTypes.Float, true, 0);
30
+ this.registerInput("system", NodeParticleBlockConnectionPointTypes.System);
31
+ this.registerOutput("output", NodeParticleBlockConnectionPointTypes.Particle);
32
+ }
33
+ /**
34
+ * Gets the current class name
35
+ * @returns the class name
36
+ */
37
+ getClassName() {
38
+ return "ParticleTriggerBlock";
39
+ }
40
+ /**
41
+ * Gets the input component
42
+ */
43
+ get input() {
44
+ return this._inputs[0];
45
+ }
46
+ /**
47
+ * Gets the condition input component
48
+ */
49
+ get condition() {
50
+ return this._inputs[1];
51
+ }
52
+ /**
53
+ * Gets the target system input component
54
+ */
55
+ get system() {
56
+ return this._inputs[2];
57
+ }
58
+ /**
59
+ * Gets the output component
60
+ */
61
+ get output() {
62
+ return this._outputs[0];
63
+ }
64
+ _build(state) {
65
+ this._triggerCount = 0;
66
+ const system = this.input.getConnectedValue(state);
67
+ const processCondition = (particle) => {
68
+ state.particleContext = particle;
69
+ state.systemContext = system;
70
+ if (this.condition.getConnectedValue(state) !== 0) {
71
+ if (this.limit === 0 || this._triggerCount < this.limit) {
72
+ const now = new Date().getTime();
73
+ if (this._previousOne && now - this._previousOne < this.delay) {
74
+ return; // Skip if the delay has not passed
75
+ }
76
+ this._triggerCount++;
77
+ this._previousOne = now;
78
+ // Trigger the target particle system
79
+ const targetSystem = this.system.getConnectedValue(state);
80
+ if (targetSystem) {
81
+ const clone = _TriggerSubEmitter(targetSystem, state.scene, particle.position);
82
+ clone.onDisposeObservable.addOnce(() => {
83
+ this._triggerCount--;
84
+ });
85
+ system.onDisposeObservable.addOnce(() => {
86
+ // Clean up the cloned system when the original system is disposed
87
+ clone.dispose();
88
+ });
89
+ }
90
+ }
91
+ }
92
+ };
93
+ const conditionProcessing = {
94
+ process: processCondition,
95
+ previousItem: null,
96
+ nextItem: null,
97
+ };
98
+ if (system._updateQueueStart) {
99
+ _ConnectAtTheEnd(conditionProcessing, system._updateQueueStart);
100
+ }
101
+ else {
102
+ system._updateQueueStart = conditionProcessing;
103
+ }
104
+ this.output._storedValue = system;
105
+ }
106
+ serialize() {
107
+ const serializationObject = super.serialize();
108
+ serializationObject.limit = this.limit;
109
+ serializationObject.delay = this.delay;
110
+ return serializationObject;
111
+ }
112
+ _deserialize(serializationObject) {
113
+ super._deserialize(serializationObject);
114
+ if (serializationObject.limit !== undefined) {
115
+ this.limit = serializationObject.limit;
116
+ }
117
+ if (serializationObject.delay !== undefined) {
118
+ this.delay = serializationObject.delay;
119
+ }
120
+ }
121
+ dispose() {
122
+ super.dispose();
123
+ this._triggerCount = 0;
124
+ }
125
+ }
126
+ __decorate([
127
+ editableInPropertyPage("Max simultaneous", 2 /* PropertyTypeForEdition.Int */, "ADVANCED", { embedded: true, notifiers: { rebuild: true }, min: 0 })
128
+ ], ParticleTriggerBlock.prototype, "limit", void 0);
129
+ __decorate([
130
+ editableInPropertyPage("Delay between calls (ms)", 2 /* PropertyTypeForEdition.Int */, "ADVANCED", { embedded: true, notifiers: { rebuild: true }, min: 0 })
131
+ ], ParticleTriggerBlock.prototype, "delay", void 0);
132
+ RegisterClass("BABYLON.ParticleTriggerBlock", ParticleTriggerBlock);
133
+ //# sourceMappingURL=particleTriggerBlock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"particleTriggerBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/Particles/Node/Blocks/Triggers/particleTriggerBlock.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,sCAA4B;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,qCAAqC,EAAE,MAAM,mDAAmD,CAAC;AAK1G,OAAO,EAAE,gBAAgB,EAAE,yCAA4C;AAEvE,OAAO,EAAE,sBAAsB,EAA0B,gDAAsC;AAC/F,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAGpD;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,iBAAiB;IAevD;;;OAG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C,EAAE,CAAC;mDAClI;AAkIvB,aAAa,CAAC,8BAA8B,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"core/Misc/typeStore\";\r\nimport { NodeParticleBlock } from \"../../nodeParticleBlock\";\r\nimport { NodeParticleBlockConnectionPointTypes } from \"../../Enums/nodeParticleBlockConnectionPointTypes\";\r\nimport type { NodeParticleConnectionPoint } from \"../../nodeParticleBlockConnectionPoint\";\r\nimport type { NodeParticleBuildState } from \"../../nodeParticleBuildState\";\r\nimport type { ThinParticleSystem } from \"core/Particles/thinParticleSystem\";\r\nimport type { Particle } from \"core/Particles/particle\";\r\nimport { _ConnectAtTheEnd } from \"core/Particles/Queue/executionQueue\";\r\nimport type { SystemBlock } from \"../systemBlock\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"core/Decorators/nodeDecorator\";\r\nimport { _TriggerSubEmitter } from \"./triggerTools\";\r\nimport type { Nullable } from \"core/types\";\r\n\r\n/**\r\n * Block used to trigger a particle system based on a condition.\r\n */\r\nexport class ParticleTriggerBlock extends NodeParticleBlock {\r\n private _triggerCount = 0;\r\n\r\n /**\r\n * Gets or sets the emit rate\r\n */\r\n @editableInPropertyPage(\"Max simultaneous\", PropertyTypeForEdition.Int, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true }, min: 0 })\r\n public limit = 5;\r\n\r\n /**\r\n * Gets or sets the emit rate\r\n */\r\n @editableInPropertyPage(\"Delay between calls (ms)\", PropertyTypeForEdition.Int, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true }, min: 0 })\r\n public delay = 250;\r\n\r\n /**\r\n * Create a new ParticleTriggerBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"input\", NodeParticleBlockConnectionPointTypes.Particle);\r\n this.registerInput(\"condition\", NodeParticleBlockConnectionPointTypes.Float, true, 0);\r\n this.registerInput(\"system\", NodeParticleBlockConnectionPointTypes.System);\r\n\r\n this.registerOutput(\"output\", NodeParticleBlockConnectionPointTypes.Particle);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"ParticleTriggerBlock\";\r\n }\r\n\r\n /**\r\n * Gets the input component\r\n */\r\n public get input(): NodeParticleConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the condition input component\r\n */\r\n public get condition(): NodeParticleConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the target system input component\r\n */\r\n public get system(): NodeParticleConnectionPoint {\r\n return this._inputs[2];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeParticleConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n private _previousOne: Nullable<number> = null;\r\n\r\n public override _build(state: NodeParticleBuildState) {\r\n this._triggerCount = 0;\r\n const system = this.input.getConnectedValue(state) as ThinParticleSystem;\r\n\r\n const processCondition = (particle: Particle) => {\r\n state.particleContext = particle;\r\n state.systemContext = system;\r\n\r\n if (this.condition.getConnectedValue(state) !== 0) {\r\n if (this.limit === 0 || this._triggerCount < this.limit) {\r\n const now = new Date().getTime();\r\n if (this._previousOne && now - this._previousOne < this.delay) {\r\n return; // Skip if the delay has not passed\r\n }\r\n\r\n this._triggerCount++;\r\n this._previousOne = now;\r\n // Trigger the target particle system\r\n const targetSystem = this.system.getConnectedValue(state) as SystemBlock;\r\n if (targetSystem) {\r\n const clone = _TriggerSubEmitter(targetSystem, state.scene, particle.position);\r\n clone.onDisposeObservable.addOnce(() => {\r\n this._triggerCount--;\r\n });\r\n\r\n system.onDisposeObservable.addOnce(() => {\r\n // Clean up the cloned system when the original system is disposed\r\n clone.dispose();\r\n });\r\n }\r\n }\r\n }\r\n };\r\n\r\n const conditionProcessing = {\r\n process: processCondition,\r\n previousItem: null,\r\n nextItem: null,\r\n };\r\n\r\n if (system._updateQueueStart) {\r\n _ConnectAtTheEnd(conditionProcessing, system._updateQueueStart);\r\n } else {\r\n system._updateQueueStart = conditionProcessing;\r\n }\r\n\r\n this.output._storedValue = system;\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.limit = this.limit;\r\n serializationObject.delay = this.delay;\r\n\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n if (serializationObject.limit !== undefined) {\r\n this.limit = serializationObject.limit;\r\n }\r\n\r\n if (serializationObject.delay !== undefined) {\r\n this.delay = serializationObject.delay;\r\n }\r\n }\r\n\r\n public override dispose(): void {\r\n super.dispose();\r\n this._triggerCount = 0;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.ParticleTriggerBlock\", ParticleTriggerBlock);\r\n"]}
@@ -0,0 +1,9 @@
1
+ import type { Scene } from "../../../../scene.js";
2
+ import type { Vector3 } from "../../../../Maths/math.vector.js";
3
+ import type { SystemBlock } from "../systemBlock.js";
4
+ import type { ParticleSystem } from "../../../particleSystem.js";
5
+ /**
6
+ * @internal
7
+ * Tools for managing particle triggers and sub-emitter systems.
8
+ */
9
+ export declare function _TriggerSubEmitter(template: SystemBlock, scene: Scene, location: Vector3): ParticleSystem;
@@ -0,0 +1,16 @@
1
+ import { NodeParticleBuildState } from "../../nodeParticleBuildState.js";
2
+ /**
3
+ * @internal
4
+ * Tools for managing particle triggers and sub-emitter systems.
5
+ */
6
+ export function _TriggerSubEmitter(template, scene, location) {
7
+ const newState = new NodeParticleBuildState();
8
+ newState.scene = scene;
9
+ const clone = template.createSystem(newState);
10
+ clone.canStart = () => true; // Allow the cloned system to start
11
+ clone.emitter = location.clone(); // Set the emitter to the particle's position
12
+ clone.disposeOnStop = true; // Clean up the system when it stops
13
+ clone.start();
14
+ return clone;
15
+ }
16
+ //# sourceMappingURL=triggerTools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"triggerTools.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/Particles/Node/Blocks/Triggers/triggerTools.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAGtE;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,QAAqB,EAAE,KAAY,EAAE,QAAiB;IACrF,MAAM,QAAQ,GAAG,IAAI,sBAAsB,EAAE,CAAC;IAC9C,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,MAAM,KAAK,GAAG,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC9C,KAAK,CAAC,QAAQ,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,mCAAmC;IAChE,KAAK,CAAC,OAAO,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,6CAA6C;IAC/E,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC,oCAAoC;IAChE,KAAK,CAAC,KAAK,EAAE,CAAC;IAEd,OAAO,KAAK,CAAC;AACjB,CAAC","sourcesContent":["import type { Scene } from \"core/scene\";\r\nimport type { Vector3 } from \"core/Maths/math.vector\";\r\nimport type { SystemBlock } from \"../systemBlock\";\r\nimport { NodeParticleBuildState } from \"../../nodeParticleBuildState\";\r\nimport type { ParticleSystem } from \"core/Particles/particleSystem\";\r\n\r\n/**\r\n * @internal\r\n * Tools for managing particle triggers and sub-emitter systems.\r\n */\r\nexport function _TriggerSubEmitter(template: SystemBlock, scene: Scene, location: Vector3): ParticleSystem {\r\n const newState = new NodeParticleBuildState();\r\n newState.scene = scene;\r\n const clone = template.createSystem(newState);\r\n clone.canStart = () => true; // Allow the cloned system to start\r\n clone.emitter = location.clone(); // Set the emitter to the particle's position\r\n clone.disposeOnStop = true; // Clean up the system when it stops\r\n clone.start();\r\n\r\n return clone;\r\n}\r\n"]}
@@ -0,0 +1,31 @@
1
+ import { NodeParticleBlock } from "../../nodeParticleBlock.js";
2
+ import type { NodeParticleConnectionPoint } from "../../nodeParticleBlockConnectionPoint.js";
3
+ import type { NodeParticleBuildState } from "../../nodeParticleBuildState.js";
4
+ /**
5
+ * Block used to provide the basic update functionality for particles.
6
+ */
7
+ export declare class BasicPositionUpdateBlock extends NodeParticleBlock {
8
+ /**
9
+ * Create a new UpdateScaleBlock
10
+ * @param name defines the block name
11
+ */
12
+ constructor(name: string);
13
+ /**
14
+ * Gets the particle component
15
+ */
16
+ get particle(): NodeParticleConnectionPoint;
17
+ /**
18
+ * Gets the output component
19
+ */
20
+ get output(): NodeParticleConnectionPoint;
21
+ /**
22
+ * Gets the current class name
23
+ * @returns the class name
24
+ */
25
+ getClassName(): string;
26
+ /**
27
+ * Builds the block
28
+ * @param state defines the current build state
29
+ */
30
+ _build(state: NodeParticleBuildState): void;
31
+ }
@@ -0,0 +1,64 @@
1
+ import { RegisterClass } from "../../../../Misc/typeStore.js";
2
+ import { NodeParticleBlockConnectionPointTypes } from "../../Enums/nodeParticleBlockConnectionPointTypes.js";
3
+ import { NodeParticleBlock } from "../../nodeParticleBlock.js";
4
+ import { _ConnectAtTheEnd } from "../../../Queue/executionQueue.js";
5
+ /**
6
+ * Block used to provide the basic update functionality for particles.
7
+ */
8
+ export class BasicPositionUpdateBlock extends NodeParticleBlock {
9
+ /**
10
+ * Create a new UpdateScaleBlock
11
+ * @param name defines the block name
12
+ */
13
+ constructor(name) {
14
+ super(name);
15
+ this.registerInput("particle", NodeParticleBlockConnectionPointTypes.Particle);
16
+ this.registerOutput("output", NodeParticleBlockConnectionPointTypes.Particle);
17
+ }
18
+ /**
19
+ * Gets the particle component
20
+ */
21
+ get particle() {
22
+ return this._inputs[0];
23
+ }
24
+ /**
25
+ * Gets the output component
26
+ */
27
+ get output() {
28
+ return this._outputs[0];
29
+ }
30
+ /**
31
+ * Gets the current class name
32
+ * @returns the class name
33
+ */
34
+ getClassName() {
35
+ return "BasicPositionUpdateBlock";
36
+ }
37
+ /**
38
+ * Builds the block
39
+ * @param state defines the current build state
40
+ */
41
+ _build(state) {
42
+ const system = this.particle.getConnectedValue(state);
43
+ const processPosition = (particle) => {
44
+ state.particleContext = particle;
45
+ state.systemContext = system;
46
+ particle.direction.scaleToRef(system._directionScale, system._scaledDirection);
47
+ particle.position.addInPlace(system._scaledDirection);
48
+ };
49
+ const positionProcessing = {
50
+ process: processPosition,
51
+ previousItem: null,
52
+ nextItem: null,
53
+ };
54
+ if (system._updateQueueStart) {
55
+ _ConnectAtTheEnd(positionProcessing, system._updateQueueStart);
56
+ }
57
+ else {
58
+ system._updateQueueStart = positionProcessing;
59
+ }
60
+ this.output._storedValue = system;
61
+ }
62
+ }
63
+ RegisterClass("BABYLON.BasicPositionUpdateBlock", BasicPositionUpdateBlock);
64
+ //# sourceMappingURL=basicPositionUpdateBlock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"basicPositionUpdateBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/Particles/Node/Blocks/Update/basicPositionUpdateBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,qCAAqC,EAAE,MAAM,mDAAmD,CAAC;AAC1G,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAK5D,OAAO,EAAE,gBAAgB,EAAE,yCAA4C;AAEvE;;GAEG;AACH,MAAM,OAAO,wBAAyB,SAAQ,iBAAiB;IAC3D;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,qCAAqC,CAAC,QAAQ,CAAC,CAAC;QAC/E,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,qCAAqC,CAAC,QAAQ,CAAC,CAAC;IAClF,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACa,YAAY;QACxB,OAAO,0BAA0B,CAAC;IACtC,CAAC;IAED;;;OAGG;IACa,MAAM,CAAC,KAA6B;QAChD,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,KAAK,CAAuB,CAAC;QAE5E,MAAM,eAAe,GAAG,CAAC,QAAkB,EAAE,EAAE;YAC3C,KAAK,CAAC,eAAe,GAAG,QAAQ,CAAC;YACjC,KAAK,CAAC,aAAa,GAAG,MAAM,CAAC;YAC7B,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,gBAAgB,CAAC,CAAC;YAC/E,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;QAC1D,CAAC,CAAC;QAEF,MAAM,kBAAkB,GAAG;YACvB,OAAO,EAAE,eAAe;YACxB,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,IAAI;SACjB,CAAC;QAEF,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;YAC3B,gBAAgB,CAAC,kBAAkB,EAAE,MAAM,CAAC,iBAAiB,CAAC,CAAC;QACnE,CAAC;aAAM,CAAC;YACJ,MAAM,CAAC,iBAAiB,GAAG,kBAAkB,CAAC;QAClD,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,MAAM,CAAC;IACtC,CAAC;CACJ;AAED,aAAa,CAAC,kCAAkC,EAAE,wBAAwB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport { NodeParticleBlockConnectionPointTypes } from \"../../Enums/nodeParticleBlockConnectionPointTypes\";\r\nimport { NodeParticleBlock } from \"../../nodeParticleBlock\";\r\nimport type { NodeParticleConnectionPoint } from \"../../nodeParticleBlockConnectionPoint\";\r\nimport type { NodeParticleBuildState } from \"../../nodeParticleBuildState\";\r\nimport type { ThinParticleSystem } from \"core/Particles/thinParticleSystem\";\r\nimport type { Particle } from \"core/Particles/particle\";\r\nimport { _ConnectAtTheEnd } from \"core/Particles/Queue/executionQueue\";\r\n\r\n/**\r\n * Block used to provide the basic update functionality for particles.\r\n */\r\nexport class BasicPositionUpdateBlock extends NodeParticleBlock {\r\n /**\r\n * Create a new UpdateScaleBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"particle\", NodeParticleBlockConnectionPointTypes.Particle);\r\n this.registerOutput(\"output\", NodeParticleBlockConnectionPointTypes.Particle);\r\n }\r\n\r\n /**\r\n * Gets the particle component\r\n */\r\n public get particle(): NodeParticleConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeParticleConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"BasicPositionUpdateBlock\";\r\n }\r\n\r\n /**\r\n * Builds the block\r\n * @param state defines the current build state\r\n */\r\n public override _build(state: NodeParticleBuildState) {\r\n const system = this.particle.getConnectedValue(state) as ThinParticleSystem;\r\n\r\n const processPosition = (particle: Particle) => {\r\n state.particleContext = particle;\r\n state.systemContext = system;\r\n particle.direction.scaleToRef(system._directionScale, system._scaledDirection);\r\n particle.position.addInPlace(system._scaledDirection);\r\n };\r\n\r\n const positionProcessing = {\r\n process: processPosition,\r\n previousItem: null,\r\n nextItem: null,\r\n };\r\n\r\n if (system._updateQueueStart) {\r\n _ConnectAtTheEnd(positionProcessing, system._updateQueueStart);\r\n } else {\r\n system._updateQueueStart = positionProcessing;\r\n }\r\n\r\n this.output._storedValue = system;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.BasicPositionUpdateBlock\", BasicPositionUpdateBlock);\r\n"]}
@@ -0,0 +1,31 @@
1
+ import { NodeParticleBlock } from "../../nodeParticleBlock.js";
2
+ import type { NodeParticleConnectionPoint } from "../../nodeParticleBlockConnectionPoint.js";
3
+ import type { NodeParticleBuildState } from "../../nodeParticleBuildState.js";
4
+ /**
5
+ * Block used to provide the basic update functionality for particle sprite index.
6
+ */
7
+ export declare class BasicSpriteUpdateBlock extends NodeParticleBlock {
8
+ /**
9
+ * Create a new BasicSpriteUpdateBlock
10
+ * @param name defines the block name
11
+ */
12
+ constructor(name: string);
13
+ /**
14
+ * Gets the particle component
15
+ */
16
+ get particle(): NodeParticleConnectionPoint;
17
+ /**
18
+ * Gets the output component
19
+ */
20
+ get output(): NodeParticleConnectionPoint;
21
+ /**
22
+ * Gets the current class name
23
+ * @returns the class name
24
+ */
25
+ getClassName(): string;
26
+ /**
27
+ * Builds the block
28
+ * @param state defines the current build state
29
+ */
30
+ _build(state: NodeParticleBuildState): void;
31
+ }
@@ -0,0 +1,63 @@
1
+ import { RegisterClass } from "../../../../Misc/typeStore.js";
2
+ import { NodeParticleBlockConnectionPointTypes } from "../../Enums/nodeParticleBlockConnectionPointTypes.js";
3
+ import { NodeParticleBlock } from "../../nodeParticleBlock.js";
4
+ import { _ConnectAtTheEnd } from "../../../Queue/executionQueue.js";
5
+ /**
6
+ * Block used to provide the basic update functionality for particle sprite index.
7
+ */
8
+ export class BasicSpriteUpdateBlock extends NodeParticleBlock {
9
+ /**
10
+ * Create a new BasicSpriteUpdateBlock
11
+ * @param name defines the block name
12
+ */
13
+ constructor(name) {
14
+ super(name);
15
+ this.registerInput("particle", NodeParticleBlockConnectionPointTypes.Particle);
16
+ this.registerOutput("output", NodeParticleBlockConnectionPointTypes.Particle);
17
+ }
18
+ /**
19
+ * Gets the particle component
20
+ */
21
+ get particle() {
22
+ return this._inputs[0];
23
+ }
24
+ /**
25
+ * Gets the output component
26
+ */
27
+ get output() {
28
+ return this._outputs[0];
29
+ }
30
+ /**
31
+ * Gets the current class name
32
+ * @returns the class name
33
+ */
34
+ getClassName() {
35
+ return "BasicSpriteUpdateBlock";
36
+ }
37
+ /**
38
+ * Builds the block
39
+ * @param state defines the current build state
40
+ */
41
+ _build(state) {
42
+ const system = this.particle.getConnectedValue(state);
43
+ const processSprite = (particle) => {
44
+ state.particleContext = particle;
45
+ state.systemContext = system;
46
+ particle.updateCellIndex();
47
+ };
48
+ const spriteProcessing = {
49
+ process: processSprite,
50
+ previousItem: null,
51
+ nextItem: null,
52
+ };
53
+ if (system._updateQueueStart) {
54
+ _ConnectAtTheEnd(spriteProcessing, system._updateQueueStart);
55
+ }
56
+ else {
57
+ system._updateQueueStart = spriteProcessing;
58
+ }
59
+ this.output._storedValue = system;
60
+ }
61
+ }
62
+ RegisterClass("BABYLON.BasicSpriteUpdateBlock", BasicSpriteUpdateBlock);
63
+ //# sourceMappingURL=basicSpriteUpdateBlock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"basicSpriteUpdateBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/Particles/Node/Blocks/Update/basicSpriteUpdateBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,qCAAqC,EAAE,MAAM,mDAAmD,CAAC;AAC1G,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAK5D,OAAO,EAAE,gBAAgB,EAAE,yCAA4C;AAEvE;;GAEG;AACH,MAAM,OAAO,sBAAuB,SAAQ,iBAAiB;IACzD;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,qCAAqC,CAAC,QAAQ,CAAC,CAAC;QAC/E,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,qCAAqC,CAAC,QAAQ,CAAC,CAAC;IAClF,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACa,YAAY;QACxB,OAAO,wBAAwB,CAAC;IACpC,CAAC;IAED;;;OAGG;IACa,MAAM,CAAC,KAA6B;QAChD,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,KAAK,CAAuB,CAAC;QAE5E,MAAM,aAAa,GAAG,CAAC,QAAkB,EAAE,EAAE;YACzC,KAAK,CAAC,eAAe,GAAG,QAAQ,CAAC;YACjC,KAAK,CAAC,aAAa,GAAG,MAAM,CAAC;YAC7B,QAAQ,CAAC,eAAe,EAAE,CAAC;QAC/B,CAAC,CAAC;QAEF,MAAM,gBAAgB,GAAG;YACrB,OAAO,EAAE,aAAa;YACtB,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,IAAI;SACjB,CAAC;QAEF,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;YAC3B,gBAAgB,CAAC,gBAAgB,EAAE,MAAM,CAAC,iBAAiB,CAAC,CAAC;QACjE,CAAC;aAAM,CAAC;YACJ,MAAM,CAAC,iBAAiB,GAAG,gBAAgB,CAAC;QAChD,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,MAAM,CAAC;IACtC,CAAC;CACJ;AAED,aAAa,CAAC,gCAAgC,EAAE,sBAAsB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport { NodeParticleBlockConnectionPointTypes } from \"../../Enums/nodeParticleBlockConnectionPointTypes\";\r\nimport { NodeParticleBlock } from \"../../nodeParticleBlock\";\r\nimport type { NodeParticleConnectionPoint } from \"../../nodeParticleBlockConnectionPoint\";\r\nimport type { NodeParticleBuildState } from \"../../nodeParticleBuildState\";\r\nimport type { ThinParticleSystem } from \"core/Particles/thinParticleSystem\";\r\nimport type { Particle } from \"core/Particles/particle\";\r\nimport { _ConnectAtTheEnd } from \"core/Particles/Queue/executionQueue\";\r\n\r\n/**\r\n * Block used to provide the basic update functionality for particle sprite index.\r\n */\r\nexport class BasicSpriteUpdateBlock extends NodeParticleBlock {\r\n /**\r\n * Create a new BasicSpriteUpdateBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"particle\", NodeParticleBlockConnectionPointTypes.Particle);\r\n this.registerOutput(\"output\", NodeParticleBlockConnectionPointTypes.Particle);\r\n }\r\n\r\n /**\r\n * Gets the particle component\r\n */\r\n public get particle(): NodeParticleConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeParticleConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"BasicSpriteUpdateBlock\";\r\n }\r\n\r\n /**\r\n * Builds the block\r\n * @param state defines the current build state\r\n */\r\n public override _build(state: NodeParticleBuildState) {\r\n const system = this.particle.getConnectedValue(state) as ThinParticleSystem;\r\n\r\n const processSprite = (particle: Particle) => {\r\n state.particleContext = particle;\r\n state.systemContext = system;\r\n particle.updateCellIndex();\r\n };\r\n\r\n const spriteProcessing = {\r\n process: processSprite,\r\n previousItem: null,\r\n nextItem: null,\r\n };\r\n\r\n if (system._updateQueueStart) {\r\n _ConnectAtTheEnd(spriteProcessing, system._updateQueueStart);\r\n } else {\r\n system._updateQueueStart = spriteProcessing;\r\n }\r\n\r\n this.output._storedValue = system;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.BasicSpriteUpdateBlock\", BasicSpriteUpdateBlock);\r\n"]}
@@ -0,0 +1,35 @@
1
+ import { NodeParticleBlock } from "../../nodeParticleBlock.js";
2
+ import type { NodeParticleConnectionPoint } from "../../nodeParticleBlockConnectionPoint.js";
3
+ import type { NodeParticleBuildState } from "../../nodeParticleBuildState.js";
4
+ /**
5
+ * Block used to update the angle of a particle
6
+ */
7
+ export declare class UpdateAngleBlock extends NodeParticleBlock {
8
+ /**
9
+ * Create a new UpdateAngleBlock
10
+ * @param name defines the block name
11
+ */
12
+ constructor(name: string);
13
+ /**
14
+ * Gets the particle component
15
+ */
16
+ get particle(): NodeParticleConnectionPoint;
17
+ /**
18
+ * Gets the angle input component
19
+ */
20
+ get angle(): NodeParticleConnectionPoint;
21
+ /**
22
+ * Gets the output component
23
+ */
24
+ get output(): NodeParticleConnectionPoint;
25
+ /**
26
+ * Gets the current class name
27
+ * @returns the class name
28
+ */
29
+ getClassName(): string;
30
+ /**
31
+ * Builds the block
32
+ * @param state defines the current build state
33
+ */
34
+ _build(state: NodeParticleBuildState): void;
35
+ }
@@ -0,0 +1,73 @@
1
+ import { RegisterClass } from "../../../../Misc/typeStore.js";
2
+ import { NodeParticleBlockConnectionPointTypes } from "../../Enums/nodeParticleBlockConnectionPointTypes.js";
3
+ import { NodeParticleBlock } from "../../nodeParticleBlock.js";
4
+ import { _ConnectAtTheEnd } from "../../../Queue/executionQueue.js";
5
+ /**
6
+ * Block used to update the angle of a particle
7
+ */
8
+ export class UpdateAngleBlock extends NodeParticleBlock {
9
+ /**
10
+ * Create a new UpdateAngleBlock
11
+ * @param name defines the block name
12
+ */
13
+ constructor(name) {
14
+ super(name);
15
+ this.registerInput("particle", NodeParticleBlockConnectionPointTypes.Particle);
16
+ this.registerInput("angle", NodeParticleBlockConnectionPointTypes.Float);
17
+ this.registerOutput("output", NodeParticleBlockConnectionPointTypes.Particle);
18
+ }
19
+ /**
20
+ * Gets the particle component
21
+ */
22
+ get particle() {
23
+ return this._inputs[0];
24
+ }
25
+ /**
26
+ * Gets the angle input component
27
+ */
28
+ get angle() {
29
+ return this._inputs[1];
30
+ }
31
+ /**
32
+ * Gets the output component
33
+ */
34
+ get output() {
35
+ return this._outputs[0];
36
+ }
37
+ /**
38
+ * Gets the current class name
39
+ * @returns the class name
40
+ */
41
+ getClassName() {
42
+ return "UpdateAngleBlock";
43
+ }
44
+ /**
45
+ * Builds the block
46
+ * @param state defines the current build state
47
+ */
48
+ _build(state) {
49
+ const system = this.particle.getConnectedValue(state);
50
+ this.output._storedValue = system;
51
+ if (!this.angle.isConnected) {
52
+ return;
53
+ }
54
+ const processAngle = (particle) => {
55
+ state.particleContext = particle;
56
+ state.systemContext = system;
57
+ particle.angle = this.angle.getConnectedValue(state);
58
+ };
59
+ const angleProcessing = {
60
+ process: processAngle,
61
+ previousItem: null,
62
+ nextItem: null,
63
+ };
64
+ if (system._updateQueueStart) {
65
+ _ConnectAtTheEnd(angleProcessing, system._updateQueueStart);
66
+ }
67
+ else {
68
+ system._updateQueueStart = angleProcessing;
69
+ }
70
+ }
71
+ }
72
+ RegisterClass("BABYLON.UpdateAngleBlock", UpdateAngleBlock);
73
+ //# sourceMappingURL=updateAngleBlock.js.map