@babylonjs/core 8.10.1 → 8.12.0

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 (394) 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.d.ts +13 -3
  65. package/Materials/Node/Blocks/Dual/smartFilterTextureBlock.js +64 -9
  66. package/Materials/Node/Blocks/Dual/smartFilterTextureBlock.js.map +1 -1
  67. package/Materials/Node/Blocks/Dual/textureBlock.d.ts +2 -3
  68. package/Materials/Node/Blocks/Dual/textureBlock.js +2 -2
  69. package/Materials/Node/Blocks/Dual/textureBlock.js.map +1 -1
  70. package/Materials/Node/Blocks/Fragment/TBNBlock.d.ts +1 -1
  71. package/Materials/Node/Blocks/Fragment/TBNBlock.js +4 -1
  72. package/Materials/Node/Blocks/Fragment/TBNBlock.js.map +1 -1
  73. package/Materials/Node/Blocks/Fragment/fragCoordBlock.js +2 -2
  74. package/Materials/Node/Blocks/Fragment/fragCoordBlock.js.map +1 -1
  75. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.d.ts +1 -2
  76. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js +1 -1
  77. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js.map +1 -1
  78. package/Materials/Node/Blocks/Fragment/frontFacingBlock.js +2 -2
  79. package/Materials/Node/Blocks/Fragment/frontFacingBlock.js.map +1 -1
  80. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js +1 -2
  81. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js.map +1 -1
  82. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.d.ts +1 -1
  83. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.js +1 -1
  84. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.js.map +1 -1
  85. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.d.ts +1 -2
  86. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js +1 -1
  87. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js.map +1 -1
  88. package/Materials/Node/Blocks/Fragment/screenSizeBlock.d.ts +4 -0
  89. package/Materials/Node/Blocks/Fragment/screenSizeBlock.js +8 -2
  90. package/Materials/Node/Blocks/Fragment/screenSizeBlock.js.map +1 -1
  91. package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.d.ts +3 -3
  92. package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.js +6 -3
  93. package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.js.map +1 -1
  94. package/Materials/Node/Blocks/PBR/anisotropyBlock.d.ts +1 -2
  95. package/Materials/Node/Blocks/PBR/anisotropyBlock.js +2 -4
  96. package/Materials/Node/Blocks/PBR/anisotropyBlock.js.map +1 -1
  97. package/Materials/Node/Blocks/PBR/clearCoatBlock.d.ts +1 -2
  98. package/Materials/Node/Blocks/PBR/clearCoatBlock.js +1 -2
  99. package/Materials/Node/Blocks/PBR/clearCoatBlock.js.map +1 -1
  100. package/Materials/Node/Blocks/PBR/iridescenceBlock.d.ts +2 -3
  101. package/Materials/Node/Blocks/PBR/iridescenceBlock.js +1 -2
  102. package/Materials/Node/Blocks/PBR/iridescenceBlock.js.map +1 -1
  103. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.d.ts +1 -1
  104. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +5 -2
  105. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
  106. package/Materials/Node/Blocks/PBR/reflectionBlock.d.ts +1 -2
  107. package/Materials/Node/Blocks/PBR/reflectionBlock.js +2 -2
  108. package/Materials/Node/Blocks/PBR/reflectionBlock.js.map +1 -1
  109. package/Materials/Node/Blocks/PBR/refractionBlock.d.ts +1 -2
  110. package/Materials/Node/Blocks/PBR/refractionBlock.js +1 -2
  111. package/Materials/Node/Blocks/PBR/refractionBlock.js.map +1 -1
  112. package/Materials/Node/Blocks/PBR/sheenBlock.d.ts +2 -3
  113. package/Materials/Node/Blocks/PBR/sheenBlock.js +1 -2
  114. package/Materials/Node/Blocks/PBR/sheenBlock.js.map +1 -1
  115. package/Materials/Node/Blocks/PBR/subSurfaceBlock.d.ts +2 -3
  116. package/Materials/Node/Blocks/PBR/subSurfaceBlock.js +1 -2
  117. package/Materials/Node/Blocks/PBR/subSurfaceBlock.js.map +1 -1
  118. package/Materials/Node/Blocks/Particle/particleTextureBlock.d.ts +1 -2
  119. package/Materials/Node/Blocks/Particle/particleTextureBlock.js +1 -1
  120. package/Materials/Node/Blocks/Particle/particleTextureBlock.js.map +1 -1
  121. package/Materials/Node/Blocks/Vertex/bonesBlock.d.ts +2 -2
  122. package/Materials/Node/Blocks/Vertex/bonesBlock.js +3 -3
  123. package/Materials/Node/Blocks/Vertex/bonesBlock.js.map +1 -1
  124. package/Materials/Node/Blocks/Vertex/instancesBlock.d.ts +1 -1
  125. package/Materials/Node/Blocks/Vertex/instancesBlock.js +1 -1
  126. package/Materials/Node/Blocks/Vertex/instancesBlock.js.map +1 -1
  127. package/Materials/Node/Blocks/Vertex/lightInformationBlock.d.ts +1 -2
  128. package/Materials/Node/Blocks/Vertex/lightInformationBlock.js +1 -1
  129. package/Materials/Node/Blocks/Vertex/lightInformationBlock.js.map +1 -1
  130. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.d.ts +2 -2
  131. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js +8 -2
  132. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js.map +1 -1
  133. package/Materials/Node/Blocks/transformBlock.d.ts +3 -3
  134. package/Materials/Node/Blocks/transformBlock.js +4 -5
  135. package/Materials/Node/Blocks/transformBlock.js.map +1 -1
  136. package/Materials/Node/Blocks/triPlanarBlock.d.ts +1 -3
  137. package/Materials/Node/Blocks/triPlanarBlock.js +1 -1
  138. package/Materials/Node/Blocks/triPlanarBlock.js.map +1 -1
  139. package/Materials/Node/nodeMaterial.d.ts +1 -1
  140. package/Materials/Node/nodeMaterial.js +28 -42
  141. package/Materials/Node/nodeMaterial.js.map +1 -1
  142. package/Materials/Node/nodeMaterialBlock.d.ts +8 -12
  143. package/Materials/Node/nodeMaterialBlock.js +10 -12
  144. package/Materials/Node/nodeMaterialBlock.js.map +1 -1
  145. package/Materials/Node/nodeMaterialBuildState.js +7 -2
  146. package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
  147. package/Materials/Node/nodeMaterialBuildStateSharedData.d.ts +14 -3
  148. package/Materials/Node/nodeMaterialBuildStateSharedData.js +24 -6
  149. package/Materials/Node/nodeMaterialBuildStateSharedData.js.map +1 -1
  150. package/Materials/PBR/pbrBaseMaterial.d.ts +2 -0
  151. package/Materials/PBR/pbrBaseMaterial.js +11 -0
  152. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  153. package/Materials/Textures/Loaders/exrTextureLoader.d.ts +10 -0
  154. package/Materials/Textures/Loaders/exrTextureLoader.js +28 -1
  155. package/Materials/Textures/Loaders/exrTextureLoader.js.map +1 -1
  156. package/Materials/materialHelper.functions.js +1 -1
  157. package/Materials/materialHelper.functions.js.map +1 -1
  158. package/Materials/materialHelper.geometryrendering.js +7 -0
  159. package/Materials/materialHelper.geometryrendering.js.map +1 -1
  160. package/Materials/standardMaterial.d.ts +2 -0
  161. package/Materials/standardMaterial.js +11 -0
  162. package/Materials/standardMaterial.js.map +1 -1
  163. package/Materials/uniformBuffer.js +2 -1
  164. package/Materials/uniformBuffer.js.map +1 -1
  165. package/Meshes/Node/Blocks/Textures/geometryTextureBlock.d.ts +7 -0
  166. package/Meshes/Node/Blocks/Textures/geometryTextureBlock.js +11 -5
  167. package/Meshes/Node/Blocks/Textures/geometryTextureBlock.js.map +1 -1
  168. package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.d.ts +6 -0
  169. package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.js +42 -4
  170. package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.js.map +1 -1
  171. package/Meshes/Node/Blocks/geometryOptimizeBlock.js +8 -0
  172. package/Meshes/Node/Blocks/geometryOptimizeBlock.js.map +1 -1
  173. package/Misc/environmentTextureTools.d.ts +4 -0
  174. package/Misc/environmentTextureTools.js +1 -0
  175. package/Misc/environmentTextureTools.js.map +1 -1
  176. package/Misc/minMaxReducer.d.ts +8 -6
  177. package/Misc/minMaxReducer.js +57 -90
  178. package/Misc/minMaxReducer.js.map +1 -1
  179. package/Misc/thinMinMaxReducer.d.ts +47 -0
  180. package/Misc/thinMinMaxReducer.js +148 -0
  181. package/Misc/thinMinMaxReducer.js.map +1 -0
  182. package/Particles/EmitterTypes/customParticleEmitter.d.ts +5 -0
  183. package/Particles/EmitterTypes/customParticleEmitter.js +9 -1
  184. package/Particles/EmitterTypes/customParticleEmitter.js.map +1 -1
  185. package/Particles/IParticleSystem.d.ts +4 -0
  186. package/Particles/IParticleSystem.js.map +1 -1
  187. package/Particles/Node/Blocks/Conditions/particleConditionBlock.d.ts +75 -0
  188. package/Particles/Node/Blocks/Conditions/particleConditionBlock.js +179 -0
  189. package/Particles/Node/Blocks/Conditions/particleConditionBlock.js.map +1 -0
  190. package/Particles/Node/Blocks/Emitters/boxShapeBlock.d.ts +47 -0
  191. package/Particles/Node/Blocks/Emitters/boxShapeBlock.js +107 -0
  192. package/Particles/Node/Blocks/Emitters/boxShapeBlock.js.map +1 -0
  193. package/Particles/Node/Blocks/Emitters/createParticleBlock.d.ts +46 -0
  194. package/Particles/Node/Blocks/Emitters/createParticleBlock.js +97 -0
  195. package/Particles/Node/Blocks/Emitters/createParticleBlock.js.map +1 -0
  196. package/Particles/Node/Blocks/Emitters/customShapeBlock.d.ts +39 -0
  197. package/Particles/Node/Blocks/Emitters/customShapeBlock.js +84 -0
  198. package/Particles/Node/Blocks/Emitters/customShapeBlock.js.map +1 -0
  199. package/Particles/Node/Blocks/Emitters/cylinderShapeBlock.d.ts +48 -0
  200. package/Particles/Node/Blocks/Emitters/cylinderShapeBlock.js +120 -0
  201. package/Particles/Node/Blocks/Emitters/cylinderShapeBlock.js.map +1 -0
  202. package/Particles/Node/Blocks/Emitters/index.d.ts +7 -0
  203. package/Particles/Node/Blocks/Emitters/index.js +8 -0
  204. package/Particles/Node/Blocks/Emitters/index.js.map +1 -0
  205. package/Particles/Node/Blocks/Emitters/pointShapeBlock.d.ts +39 -0
  206. package/Particles/Node/Blocks/Emitters/pointShapeBlock.js +86 -0
  207. package/Particles/Node/Blocks/Emitters/pointShapeBlock.js.map +1 -0
  208. package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.d.ts +53 -0
  209. package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.js +111 -0
  210. package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.js.map +1 -0
  211. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.d.ts +43 -0
  212. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.js +108 -0
  213. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.js.map +1 -0
  214. package/Particles/Node/Blocks/Teleport/particleTeleportInBlock.d.ts +48 -0
  215. package/Particles/Node/Blocks/Teleport/particleTeleportInBlock.js +100 -0
  216. package/Particles/Node/Blocks/Teleport/particleTeleportInBlock.js.map +1 -0
  217. package/Particles/Node/Blocks/Teleport/particleTeleportOutBlock.d.ts +47 -0
  218. package/Particles/Node/Blocks/Teleport/particleTeleportOutBlock.js +82 -0
  219. package/Particles/Node/Blocks/Teleport/particleTeleportOutBlock.js.map +1 -0
  220. package/Particles/Node/Blocks/Triggers/particleTriggerBlock.d.ts +48 -0
  221. package/Particles/Node/Blocks/Triggers/particleTriggerBlock.js +133 -0
  222. package/Particles/Node/Blocks/Triggers/particleTriggerBlock.js.map +1 -0
  223. package/Particles/Node/Blocks/Triggers/triggerTools.d.ts +9 -0
  224. package/Particles/Node/Blocks/Triggers/triggerTools.js +16 -0
  225. package/Particles/Node/Blocks/Triggers/triggerTools.js.map +1 -0
  226. package/Particles/Node/Blocks/Update/basicPositionUpdateBlock.d.ts +31 -0
  227. package/Particles/Node/Blocks/Update/basicPositionUpdateBlock.js +64 -0
  228. package/Particles/Node/Blocks/Update/basicPositionUpdateBlock.js.map +1 -0
  229. package/Particles/Node/Blocks/Update/basicSpriteUpdateBlock.d.ts +31 -0
  230. package/Particles/Node/Blocks/Update/basicSpriteUpdateBlock.js +63 -0
  231. package/Particles/Node/Blocks/Update/basicSpriteUpdateBlock.js.map +1 -0
  232. package/Particles/Node/Blocks/Update/updateAngleBlock.d.ts +35 -0
  233. package/Particles/Node/Blocks/Update/updateAngleBlock.js +73 -0
  234. package/Particles/Node/Blocks/Update/updateAngleBlock.js.map +1 -0
  235. package/Particles/Node/Blocks/Update/updateColorBlock.d.ts +35 -0
  236. package/Particles/Node/Blocks/Update/updateColorBlock.js +73 -0
  237. package/Particles/Node/Blocks/Update/updateColorBlock.js.map +1 -0
  238. package/Particles/Node/Blocks/Update/updateDirectionBlock.d.ts +35 -0
  239. package/Particles/Node/Blocks/Update/updateDirectionBlock.js +73 -0
  240. package/Particles/Node/Blocks/Update/updateDirectionBlock.js.map +1 -0
  241. package/Particles/Node/Blocks/Update/updateFlowMapBlock.d.ts +41 -0
  242. package/Particles/Node/Blocks/Update/updateFlowMapBlock.js +102 -0
  243. package/Particles/Node/Blocks/Update/updateFlowMapBlock.js.map +1 -0
  244. package/Particles/Node/Blocks/Update/updatePositionBlock.d.ts +35 -0
  245. package/Particles/Node/Blocks/Update/updatePositionBlock.js +73 -0
  246. package/Particles/Node/Blocks/Update/updatePositionBlock.js.map +1 -0
  247. package/Particles/Node/Blocks/Update/updateScaleBlock.d.ts +35 -0
  248. package/Particles/Node/Blocks/Update/updateScaleBlock.js +73 -0
  249. package/Particles/Node/Blocks/Update/updateScaleBlock.js.map +1 -0
  250. package/Particles/Node/Blocks/Update/updateSpriteCellIndexBlock.d.ts +35 -0
  251. package/Particles/Node/Blocks/Update/updateSpriteCellIndexBlock.js +74 -0
  252. package/Particles/Node/Blocks/Update/updateSpriteCellIndexBlock.js.map +1 -0
  253. package/Particles/Node/Blocks/index.d.ts +27 -0
  254. package/Particles/Node/Blocks/index.js +29 -0
  255. package/Particles/Node/Blocks/index.js.map +1 -0
  256. package/Particles/Node/Blocks/particleConverterBlock.d.ts +85 -0
  257. package/Particles/Node/Blocks/particleConverterBlock.js +267 -0
  258. package/Particles/Node/Blocks/particleConverterBlock.js.map +1 -0
  259. package/Particles/Node/Blocks/particleDebugBlock.d.ts +37 -0
  260. package/Particles/Node/Blocks/particleDebugBlock.js +109 -0
  261. package/Particles/Node/Blocks/particleDebugBlock.js.map +1 -0
  262. package/Particles/Node/Blocks/particleElbowBlock.d.ts +27 -0
  263. package/Particles/Node/Blocks/particleElbowBlock.js +47 -0
  264. package/Particles/Node/Blocks/particleElbowBlock.js.map +1 -0
  265. package/Particles/Node/Blocks/particleGradientBlock.d.ts +28 -0
  266. package/Particles/Node/Blocks/particleGradientBlock.js +118 -0
  267. package/Particles/Node/Blocks/particleGradientBlock.js.map +1 -0
  268. package/Particles/Node/Blocks/particleGradientValueBlock.d.ts +32 -0
  269. package/Particles/Node/Blocks/particleGradientValueBlock.js +79 -0
  270. package/Particles/Node/Blocks/particleGradientValueBlock.js.map +1 -0
  271. package/Particles/Node/Blocks/particleInputBlock.d.ts +87 -0
  272. package/Particles/Node/Blocks/particleInputBlock.js +279 -0
  273. package/Particles/Node/Blocks/particleInputBlock.js.map +1 -0
  274. package/Particles/Node/Blocks/particleLerpBlock.d.ts +34 -0
  275. package/Particles/Node/Blocks/particleLerpBlock.js +92 -0
  276. package/Particles/Node/Blocks/particleLerpBlock.js.map +1 -0
  277. package/Particles/Node/Blocks/particleMathBlock.d.ts +64 -0
  278. package/Particles/Node/Blocks/particleMathBlock.js +321 -0
  279. package/Particles/Node/Blocks/particleMathBlock.js.map +1 -0
  280. package/Particles/Node/Blocks/particleRandomBlock.d.ts +52 -0
  281. package/Particles/Node/Blocks/particleRandomBlock.js +161 -0
  282. package/Particles/Node/Blocks/particleRandomBlock.js.map +1 -0
  283. package/Particles/Node/Blocks/particleSourceTextureBlock.d.ts +65 -0
  284. package/Particles/Node/Blocks/particleSourceTextureBlock.js +173 -0
  285. package/Particles/Node/Blocks/particleSourceTextureBlock.js.map +1 -0
  286. package/Particles/Node/Blocks/particleTrigonometryBlock.d.ts +80 -0
  287. package/Particles/Node/Blocks/particleTrigonometryBlock.js +272 -0
  288. package/Particles/Node/Blocks/particleTrigonometryBlock.js.map +1 -0
  289. package/Particles/Node/Blocks/randomRangeBlock.d.ts +45 -0
  290. package/Particles/Node/Blocks/randomRangeBlock.js +151 -0
  291. package/Particles/Node/Blocks/randomRangeBlock.js.map +1 -0
  292. package/Particles/Node/Blocks/systemBlock.d.ts +71 -0
  293. package/Particles/Node/Blocks/systemBlock.js +193 -0
  294. package/Particles/Node/Blocks/systemBlock.js.map +1 -0
  295. package/Particles/Node/Enums/nodeParticleBlockConnectionPointTypes.d.ts +39 -0
  296. package/Particles/Node/Enums/nodeParticleBlockConnectionPointTypes.js +41 -0
  297. package/Particles/Node/Enums/nodeParticleBlockConnectionPointTypes.js.map +1 -0
  298. package/Particles/Node/Enums/nodeParticleContextualSources.d.ts +31 -0
  299. package/Particles/Node/Enums/nodeParticleContextualSources.js +34 -0
  300. package/Particles/Node/Enums/nodeParticleContextualSources.js.map +1 -0
  301. package/Particles/Node/Enums/nodeParticleSystemSources.d.ts +13 -0
  302. package/Particles/Node/Enums/nodeParticleSystemSources.js +15 -0
  303. package/Particles/Node/Enums/nodeParticleSystemSources.js.map +1 -0
  304. package/Particles/Node/index.d.ts +8 -0
  305. package/Particles/Node/index.js +10 -0
  306. package/Particles/Node/index.js.map +1 -0
  307. package/Particles/Node/nodeParticleBlock.d.ts +154 -0
  308. package/Particles/Node/nodeParticleBlock.js +355 -0
  309. package/Particles/Node/nodeParticleBlock.js.map +1 -0
  310. package/Particles/Node/nodeParticleBlockConnectionPoint.d.ts +188 -0
  311. package/Particles/Node/nodeParticleBlockConnectionPoint.js +337 -0
  312. package/Particles/Node/nodeParticleBlockConnectionPoint.js.map +1 -0
  313. package/Particles/Node/nodeParticleBuildState.d.ts +89 -0
  314. package/Particles/Node/nodeParticleBuildState.js +170 -0
  315. package/Particles/Node/nodeParticleBuildState.js.map +1 -0
  316. package/Particles/Node/nodeParticleSystemSet.d.ts +120 -0
  317. package/Particles/Node/nodeParticleSystemSet.js +382 -0
  318. package/Particles/Node/nodeParticleSystemSet.js.map +1 -0
  319. package/Particles/Queue/executionQueue.d.ts +2 -0
  320. package/Particles/Queue/executionQueue.js +10 -0
  321. package/Particles/Queue/executionQueue.js.map +1 -1
  322. package/Particles/baseParticleSystem.d.ts +2 -1
  323. package/Particles/baseParticleSystem.js +1 -0
  324. package/Particles/baseParticleSystem.js.map +1 -1
  325. package/Particles/flowMap.d.ts +7 -0
  326. package/Particles/flowMap.js +32 -0
  327. package/Particles/flowMap.js.map +1 -1
  328. package/Particles/gpuParticleSystem.d.ts +4 -0
  329. package/Particles/gpuParticleSystem.js +4 -0
  330. package/Particles/gpuParticleSystem.js.map +1 -1
  331. package/Particles/index.d.ts +1 -0
  332. package/Particles/index.js +1 -0
  333. package/Particles/index.js.map +1 -1
  334. package/Particles/particleSystem.d.ts +12 -0
  335. package/Particles/particleSystem.js +22 -1
  336. package/Particles/particleSystem.js.map +1 -1
  337. package/Particles/thinParticleSystem.d.ts +32 -11
  338. package/Particles/thinParticleSystem.js +62 -36
  339. package/Particles/thinParticleSystem.js.map +1 -1
  340. package/PostProcesses/postProcessManager.d.ts +2 -1
  341. package/PostProcesses/postProcessManager.js +3 -2
  342. package/PostProcesses/postProcessManager.js.map +1 -1
  343. package/Shaders/ShadersInclude/defaultUboDeclaration.js +1 -1
  344. package/Shaders/ShadersInclude/defaultUboDeclaration.js.map +1 -1
  345. package/Shaders/ShadersInclude/defaultVertexDeclaration.js +1 -0
  346. package/Shaders/ShadersInclude/defaultVertexDeclaration.js.map +1 -1
  347. package/Shaders/ShadersInclude/lightFragment.js +5 -2
  348. package/Shaders/ShadersInclude/lightFragment.js.map +1 -1
  349. package/Shaders/ShadersInclude/morphTargetsVertexDeclaration.js +3 -0
  350. package/Shaders/ShadersInclude/morphTargetsVertexDeclaration.js.map +1 -1
  351. package/Shaders/ShadersInclude/pbrBlockPrePass.js +3 -0
  352. package/Shaders/ShadersInclude/pbrBlockPrePass.js.map +1 -1
  353. package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js +1 -1
  354. package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
  355. package/Shaders/ShadersInclude/pbrUboDeclaration.js +1 -1
  356. package/Shaders/ShadersInclude/pbrUboDeclaration.js.map +1 -1
  357. package/Shaders/ShadersInclude/pbrVertexDeclaration.js +1 -0
  358. package/Shaders/ShadersInclude/pbrVertexDeclaration.js.map +1 -1
  359. package/Shaders/ShadersInclude/prePassDeclaration.js +3 -0
  360. package/Shaders/ShadersInclude/prePassDeclaration.js.map +1 -1
  361. package/Shaders/ShadersInclude/prePassVertex.js +3 -0
  362. package/Shaders/ShadersInclude/prePassVertex.js.map +1 -1
  363. package/Shaders/ShadersInclude/prePassVertexDeclaration.js +3 -0
  364. package/Shaders/ShadersInclude/prePassVertexDeclaration.js.map +1 -1
  365. package/Shaders/default.fragment.js +3 -0
  366. package/Shaders/default.fragment.js.map +1 -1
  367. package/Shaders/minmaxRedux.fragment.js +13 -5
  368. package/Shaders/minmaxRedux.fragment.js.map +1 -1
  369. package/ShadersWGSL/ShadersInclude/defaultUboDeclaration.js +1 -1
  370. package/ShadersWGSL/ShadersInclude/defaultUboDeclaration.js.map +1 -1
  371. package/ShadersWGSL/ShadersInclude/lightFragment.js +5 -2
  372. package/ShadersWGSL/ShadersInclude/lightFragment.js.map +1 -1
  373. package/ShadersWGSL/ShadersInclude/morphTargetsVertexDeclaration.js +3 -0
  374. package/ShadersWGSL/ShadersInclude/morphTargetsVertexDeclaration.js.map +1 -1
  375. package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.js +3 -0
  376. package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.js.map +1 -1
  377. package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js +1 -1
  378. package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
  379. package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js +1 -1
  380. package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js.map +1 -1
  381. package/ShadersWGSL/ShadersInclude/prePassDeclaration.js +3 -0
  382. package/ShadersWGSL/ShadersInclude/prePassDeclaration.js.map +1 -1
  383. package/ShadersWGSL/ShadersInclude/prePassVertex.js +3 -0
  384. package/ShadersWGSL/ShadersInclude/prePassVertex.js.map +1 -1
  385. package/ShadersWGSL/ShadersInclude/prePassVertexDeclaration.js +3 -0
  386. package/ShadersWGSL/ShadersInclude/prePassVertexDeclaration.js.map +1 -1
  387. package/ShadersWGSL/default.fragment.js +3 -0
  388. package/ShadersWGSL/default.fragment.js.map +1 -1
  389. package/ShadersWGSL/minmaxRedux.fragment.js +14 -6
  390. package/ShadersWGSL/minmaxRedux.fragment.js.map +1 -1
  391. package/package.json +1 -1
  392. package/scene.d.ts +5 -0
  393. package/scene.js +8 -0
  394. package/scene.js.map +1 -1
@@ -0,0 +1,382 @@
1
+ import { __decorate } from "../../tslib.es6.js";
2
+ import { serialize } from "../../Misc/decorators.js";
3
+ import { ParticleSystemSet } from "../particleSystemSet.js";
4
+ import { SystemBlock } from "./Blocks/systemBlock.js";
5
+ import { NodeParticleBuildState } from "./nodeParticleBuildState.js";
6
+ import { SerializationHelper } from "../../Misc/decorators.serialization.js";
7
+ import { Observable } from "../../Misc/observable.js";
8
+ import { GetClass } from "../../Misc/typeStore.js";
9
+ import { WebRequest } from "../../Misc/webRequest.js";
10
+
11
+ import { Tools } from "../../Misc/tools.js";
12
+ import { AbstractEngine } from "../../Engines/abstractEngine.js";
13
+ import { ParticleInputBlock } from "./Blocks/particleInputBlock.js";
14
+ import { ParticleTextureSourceBlock } from "./Blocks/particleSourceTextureBlock.js";
15
+ import { NodeParticleContextualSources } from "./Enums/nodeParticleContextualSources.js";
16
+ import { UpdatePositionBlock } from "./Blocks/Update/updatePositionBlock.js";
17
+ import { ParticleMathBlock, ParticleMathBlockOperations } from "./Blocks/particleMathBlock.js";
18
+ import { BoxShapeBlock } from "./Blocks/Emitters/boxShapeBlock.js";
19
+ import { CreateParticleBlock } from "./Blocks/Emitters/createParticleBlock.js";
20
+ /**
21
+ * Defines a set of particle systems defined as a node graph.
22
+ * @experimental This API is experimental and may change in future releases.
23
+ * #K6F1ZB
24
+ */
25
+ export class NodeParticleSystemSet {
26
+ /**
27
+ * Gets the system blocks
28
+ */
29
+ get systemBlocks() {
30
+ return this._systemBlocks;
31
+ }
32
+ /**
33
+ * Gets the list of input blocks attached to this material
34
+ * @returns an array of InputBlocks
35
+ */
36
+ get inputBlocks() {
37
+ const blocks = [];
38
+ for (const block of this.attachedBlocks) {
39
+ if (block.isInput) {
40
+ blocks.push(block);
41
+ }
42
+ }
43
+ return blocks;
44
+ }
45
+ /**
46
+ * Creates a new set
47
+ * @param name defines the name of the set
48
+ */
49
+ constructor(name) {
50
+ this._systemBlocks = [];
51
+ this._buildId = 0;
52
+ /**
53
+ * Gets an array of blocks that needs to be serialized even if they are not yet connected
54
+ */
55
+ this.attachedBlocks = [];
56
+ /**
57
+ * Gets or sets data used by visual editor
58
+ * @see https://npe.babylonjs.com
59
+ */
60
+ this.editorData = null;
61
+ /**
62
+ * Observable raised when the particle set is built
63
+ */
64
+ this.onBuildObservable = new Observable();
65
+ this.name = name;
66
+ }
67
+ /**
68
+ * Gets the current class name of the geometry e.g. "NodeParticleSystemSet"
69
+ * @returns the class name
70
+ */
71
+ getClassName() {
72
+ return "NodeParticleSystemSet";
73
+ }
74
+ _initializeBlock(node, autoConfigure = true) {
75
+ if (this.attachedBlocks.indexOf(node) === -1) {
76
+ this.attachedBlocks.push(node);
77
+ }
78
+ for (const input of node.inputs) {
79
+ const connectedPoint = input.connectedPoint;
80
+ if (connectedPoint) {
81
+ const block = connectedPoint.ownerBlock;
82
+ if (block !== node) {
83
+ this._initializeBlock(block, autoConfigure);
84
+ }
85
+ }
86
+ }
87
+ }
88
+ /**
89
+ * Builds the particle system set from the defined blocks.
90
+ * @param scene defines the hosting scene
91
+ * @param verbose defines whether to log detailed information during the build process (false by default)
92
+ * @returns a promise that resolves to the built particle system set
93
+ */
94
+ async buildAsync(scene, verbose = false) {
95
+ return await new Promise((resolve) => {
96
+ const output = new ParticleSystemSet();
97
+ // Initialize all blocks
98
+ for (const block of this._systemBlocks) {
99
+ this._initializeBlock(block);
100
+ }
101
+ // Build the blocks
102
+ for (const block of this.systemBlocks) {
103
+ const state = new NodeParticleBuildState();
104
+ state.buildId = this._buildId++;
105
+ state.scene = scene;
106
+ state.verbose = verbose;
107
+ const system = block.createSystem(state);
108
+ // Errors
109
+ state.emitErrors();
110
+ output.systems.push(system);
111
+ }
112
+ this.onBuildObservable.notifyObservers(this);
113
+ resolve(output);
114
+ });
115
+ }
116
+ /**
117
+ * Clear the current geometry
118
+ */
119
+ clear() {
120
+ this.attachedBlocks.length = 0;
121
+ this._systemBlocks.length = 0;
122
+ }
123
+ /**
124
+ * Clear the current set and restore it to a default state
125
+ */
126
+ setToDefault() {
127
+ this.clear();
128
+ this.editorData = null;
129
+ // Main system
130
+ const system = new SystemBlock("Particle system");
131
+ // Update position
132
+ const updatePositionBlock = new UpdatePositionBlock("Update position");
133
+ updatePositionBlock.output.connectTo(system.particle);
134
+ // Contextual inputs
135
+ const positionBlock = new ParticleInputBlock("Position");
136
+ positionBlock.contextualValue = NodeParticleContextualSources.Position;
137
+ const directionBlock = new ParticleInputBlock("Scaled direction");
138
+ directionBlock.contextualValue = NodeParticleContextualSources.ScaledDirection;
139
+ // Add
140
+ const addBlock = new ParticleMathBlock("Add");
141
+ addBlock.operation = ParticleMathBlockOperations.Add;
142
+ positionBlock.output.connectTo(addBlock.left);
143
+ directionBlock.output.connectTo(addBlock.right);
144
+ addBlock.output.connectTo(updatePositionBlock.position);
145
+ // Create particle
146
+ const createParticleBlock = new CreateParticleBlock("Create particle");
147
+ // Shape
148
+ const emitterShape = new BoxShapeBlock("Box shape");
149
+ createParticleBlock.particle.connectTo(emitterShape.particle);
150
+ emitterShape.output.connectTo(updatePositionBlock.particle);
151
+ // Texture
152
+ const textureBlock = new ParticleTextureSourceBlock("Texture");
153
+ textureBlock.texture.connectTo(system.texture);
154
+ textureBlock.url = "https://assets.babylonjs.com/textures/flare.png";
155
+ this._systemBlocks.push(system);
156
+ }
157
+ /**
158
+ * Remove a block from the current system set
159
+ * @param block defines the block to remove
160
+ */
161
+ removeBlock(block) {
162
+ const attachedBlockIndex = this.attachedBlocks.indexOf(block);
163
+ if (attachedBlockIndex > -1) {
164
+ this.attachedBlocks.splice(attachedBlockIndex, 1);
165
+ }
166
+ if (block.isSystem) {
167
+ const index = this._systemBlocks.indexOf(block);
168
+ if (index > -1) {
169
+ this._systemBlocks.splice(index, 1);
170
+ }
171
+ }
172
+ }
173
+ /**
174
+ * Clear the current graph and load a new one from a serialization object
175
+ * @param source defines the JSON representation of the particle set
176
+ * @param merge defines whether or not the source must be merged or replace the current content
177
+ */
178
+ parseSerializedObject(source, merge = false) {
179
+ if (!merge) {
180
+ this.clear();
181
+ }
182
+ const map = {};
183
+ // Create blocks
184
+ for (const parsedBlock of source.blocks) {
185
+ const blockType = GetClass(parsedBlock.customType);
186
+ if (blockType) {
187
+ const block = new blockType();
188
+ block._deserialize(parsedBlock);
189
+ map[parsedBlock.id] = block;
190
+ this.attachedBlocks.push(block);
191
+ if (block.isSystem) {
192
+ this._systemBlocks.push(block);
193
+ }
194
+ }
195
+ }
196
+ // Reconnect teleportation
197
+ for (const block of this.attachedBlocks) {
198
+ if (block.isTeleportOut) {
199
+ const teleportOut = block;
200
+ const id = teleportOut._tempEntryPointUniqueId;
201
+ if (id) {
202
+ const source = map[id];
203
+ if (source) {
204
+ source.attachToEndpoint(teleportOut);
205
+ }
206
+ }
207
+ }
208
+ }
209
+ // Connections - Starts with input blocks only (except if in "merge" mode where we scan all blocks)
210
+ for (let blockIndex = 0; blockIndex < source.blocks.length; blockIndex++) {
211
+ const parsedBlock = source.blocks[blockIndex];
212
+ const block = map[parsedBlock.id];
213
+ if (!block) {
214
+ continue;
215
+ }
216
+ if (block.inputs.length && parsedBlock.inputs.some((i) => i.targetConnectionName) && !merge) {
217
+ continue;
218
+ }
219
+ this._restoreConnections(block, source, map);
220
+ }
221
+ // UI related info
222
+ if (source.locations || (source.editorData && source.editorData.locations)) {
223
+ const locations = source.locations || source.editorData.locations;
224
+ for (const location of locations) {
225
+ if (map[location.blockId]) {
226
+ location.blockId = map[location.blockId].uniqueId;
227
+ }
228
+ }
229
+ if (merge && this.editorData && this.editorData.locations) {
230
+ locations.concat(this.editorData.locations);
231
+ }
232
+ if (source.locations) {
233
+ this.editorData = {
234
+ locations: locations,
235
+ };
236
+ }
237
+ else {
238
+ this.editorData = source.editorData;
239
+ this.editorData.locations = locations;
240
+ }
241
+ const blockMap = [];
242
+ for (const key in map) {
243
+ blockMap[key] = map[key].uniqueId;
244
+ }
245
+ this.editorData.map = blockMap;
246
+ }
247
+ this.comment = source.comment;
248
+ }
249
+ _restoreConnections(block, source, map) {
250
+ for (const outputPoint of block.outputs) {
251
+ for (const candidate of source.blocks) {
252
+ const target = map[candidate.id];
253
+ if (!target) {
254
+ continue;
255
+ }
256
+ for (const input of candidate.inputs) {
257
+ if (map[input.targetBlockId] === block && input.targetConnectionName === outputPoint.name) {
258
+ const inputPoint = target.getInputByName(input.inputName);
259
+ if (!inputPoint || inputPoint.isConnected) {
260
+ continue;
261
+ }
262
+ outputPoint.connectTo(inputPoint, true);
263
+ this._restoreConnections(target, source, map);
264
+ continue;
265
+ }
266
+ }
267
+ }
268
+ }
269
+ }
270
+ /**
271
+ * Serializes this geometry in a JSON representation
272
+ * @param selectedBlocks defines the list of blocks to save (if null the whole geometry will be saved)
273
+ * @returns the serialized geometry object
274
+ */
275
+ serialize(selectedBlocks) {
276
+ const serializationObject = selectedBlocks ? {} : SerializationHelper.Serialize(this);
277
+ serializationObject.editorData = JSON.parse(JSON.stringify(this.editorData)); // Copy
278
+ let blocks = [];
279
+ if (selectedBlocks) {
280
+ blocks = selectedBlocks;
281
+ }
282
+ else {
283
+ serializationObject.customType = "BABYLON.NodeParticleSystemSet";
284
+ }
285
+ // Blocks
286
+ serializationObject.blocks = [];
287
+ for (const block of blocks) {
288
+ serializationObject.blocks.push(block.serialize());
289
+ }
290
+ if (!selectedBlocks) {
291
+ for (const block of this.attachedBlocks) {
292
+ if (blocks.indexOf(block) !== -1) {
293
+ continue;
294
+ }
295
+ serializationObject.blocks.push(block.serialize());
296
+ }
297
+ }
298
+ return serializationObject;
299
+ }
300
+ /**
301
+ * Disposes the resources
302
+ */
303
+ dispose() {
304
+ for (const block of this.attachedBlocks) {
305
+ block.dispose();
306
+ }
307
+ this.attachedBlocks.length = 0;
308
+ this.onBuildObservable.clear();
309
+ }
310
+ /**
311
+ * Creates a new node particle set set to default basic configuration
312
+ * @param name defines the name of the particle set
313
+ * @returns a new NodeParticleSystemSet
314
+ */
315
+ static CreateDefault(name) {
316
+ const nodeParticleSet = new NodeParticleSystemSet(name);
317
+ nodeParticleSet.setToDefault();
318
+ return nodeParticleSet;
319
+ }
320
+ /**
321
+ * Creates a node particle set from parsed data
322
+ * @param source defines the JSON representation of the particle set
323
+ * @returns a new node particle set
324
+ */
325
+ static Parse(source) {
326
+ const nodeParticleSet = SerializationHelper.Parse(() => new NodeParticleSystemSet(source.name), source, null);
327
+ nodeParticleSet.parseSerializedObject(source);
328
+ return nodeParticleSet;
329
+ }
330
+ /**
331
+ * Creates a node particle set from a snippet saved by the node geometry editor
332
+ * @param snippetId defines the snippet to load
333
+ * @param nodeParticleSet defines a node particle set to update (instead of creating a new one)
334
+ * @returns a promise that will resolve to the new node geometry
335
+ */
336
+ // eslint-disable-next-line @typescript-eslint/promise-function-async, no-restricted-syntax
337
+ static ParseFromSnippetAsync(snippetId, nodeParticleSet) {
338
+ if (snippetId === "_BLANK") {
339
+ return Promise.resolve(NodeParticleSystemSet.CreateDefault("blank"));
340
+ }
341
+ return new Promise((resolve, reject) => {
342
+ const request = new WebRequest();
343
+ request.addEventListener("readystatechange", () => {
344
+ if (request.readyState == 4) {
345
+ if (request.status == 200) {
346
+ const snippet = JSON.parse(JSON.parse(request.responseText).jsonPayload);
347
+ const serializationObject = JSON.parse(snippet.nodeParticle);
348
+ if (!nodeParticleSet) {
349
+ nodeParticleSet = SerializationHelper.Parse(() => new NodeParticleSystemSet(snippetId), serializationObject, null);
350
+ }
351
+ nodeParticleSet.parseSerializedObject(serializationObject);
352
+ nodeParticleSet.snippetId = snippetId;
353
+ try {
354
+ resolve(nodeParticleSet);
355
+ }
356
+ catch (err) {
357
+ // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
358
+ reject(err);
359
+ }
360
+ }
361
+ else {
362
+ // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
363
+ reject("Unable to load the snippet " + snippetId);
364
+ }
365
+ }
366
+ });
367
+ request.open("GET", this.SnippetUrl + "/" + snippetId.replace(/#/g, "/"));
368
+ request.send();
369
+ });
370
+ }
371
+ }
372
+ /** Define the Url to load node editor script */
373
+ NodeParticleSystemSet.EditorURL = `${Tools._DefaultCdnUrl}/v${AbstractEngine.Version}/nodeParticleEditor/babylon.nodeParticleEditor.js`;
374
+ /** Define the Url to load snippets */
375
+ NodeParticleSystemSet.SnippetUrl = `https://snippet.babylonjs.com`;
376
+ __decorate([
377
+ serialize()
378
+ ], NodeParticleSystemSet.prototype, "name", void 0);
379
+ __decorate([
380
+ serialize("comment")
381
+ ], NodeParticleSystemSet.prototype, "comment", void 0);
382
+ //# sourceMappingURL=nodeParticleSystemSet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nodeParticleSystemSet.js","sourceRoot":"","sources":["../../../../../dev/core/src/Particles/Node/nodeParticleSystemSet.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,iCAA6B;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,mBAAmB,EAAE,+CAA2C;AACzE,OAAO,EAAE,UAAU,EAAE,iCAA6B;AAClD,OAAO,EAAE,QAAQ,EAAE,gCAA4B;AAC/C,OAAO,EAAE,UAAU,EAAE,iCAA6B;AAClD,OAAO,EAAE,SAAS,EAAE,mCAA+B;AACnD,OAAO,EAAE,KAAK,EAAE,4BAAwB;AACxC,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAG5F,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAE5E;;;;GAIG;AACH,MAAM,OAAO,qBAAqB;IA2C9B;;OAEG;IACH,IAAW,YAAY;QACnB,OAAO,IAAI,CAAC,aAAa,CAAC;I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6BAA6B,GAAG,SAAS,CAAC,CAAC;oBACtD,CAAC;gBACL,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,GAAG,GAAG,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;YAC1E,OAAO,CAAC,IAAI,EAAE,CAAC;QACnB,CAAC,CAAC,CAAC;IACP,CAAC;;AAtbD,gDAAgD;AAClC,+BAAS,GAAG,GAAG,KAAK,CAAC,cAAc,KAAK,cAAc,CAAC,OAAO,mDAAmD,AAAxG,CAAyG;AAEhI,sCAAsC;AACxB,gCAAU,GAAG,SAAS,CAAC,UAAU,AAAvB,CAAwB;AA2BzC;IADN,SAAS,EAAE;mDACQ;AAMb;IADN,SAAS,CAAC,SAAS,CAAC;sDACE","sourcesContent":["import { serialize } from \"core/Misc/decorators\";\r\nimport { ParticleSystemSet } from \"../particleSystemSet\";\r\nimport { SystemBlock } from \"./Blocks/systemBlock\";\r\nimport type { Scene } from \"core/scene\";\r\nimport { NodeParticleBuildState } from \"./nodeParticleBuildState\";\r\nimport type { NodeParticleBlock } from \"./nodeParticleBlock\";\r\nimport { SerializationHelper } from \"core/Misc/decorators.serialization\";\r\nimport { Observable } from \"core/Misc/observable\";\r\nimport { GetClass } from \"core/Misc/typeStore\";\r\nimport { WebRequest } from \"core/Misc/webRequest\";\r\nimport { Constants } from \"core/Engines/constants\";\r\nimport { Tools } from \"core/Misc/tools\";\r\nimport { AbstractEngine } from \"core/Engines/abstractEngine\";\r\nimport { ParticleInputBlock } from \"./Blocks/particleInputBlock\";\r\nimport { ParticleTextureSourceBlock } from \"./Blocks/particleSourceTextureBlock\";\r\nimport { NodeParticleContextualSources } from \"./Enums/nodeParticleContextualSources\";\r\nimport { UpdatePositionBlock } from \"./Blocks/Update/updatePositionBlock\";\r\nimport { ParticleMathBlock, ParticleMathBlockOperations } from \"./Blocks/particleMathBlock\";\r\nimport type { ParticleTeleportOutBlock } from \"./Blocks/Teleport/particleTeleportOutBlock\";\r\nimport type { ParticleTeleportInBlock } from \"./Blocks/Teleport/particleTeleportInBlock\";\r\nimport { BoxShapeBlock } from \"./Blocks/Emitters/boxShapeBlock\";\r\nimport { CreateParticleBlock } from \"./Blocks/Emitters/createParticleBlock\";\r\n\r\n/**\r\n * Defines a set of particle systems defined as a node graph.\r\n * @experimental This API is experimental and may change in future releases.\r\n * #K6F1ZB\r\n */\r\nexport class NodeParticleSystemSet {\r\n private _systemBlocks: SystemBlock[] = [];\r\n private _buildId: number = 0;\r\n\r\n /** Define the Url to load node editor script */\r\n public static EditorURL = `${Tools._DefaultCdnUrl}/v${AbstractEngine.Version}/nodeParticleEditor/babylon.nodeParticleEditor.js`;\r\n\r\n /** Define the Url to load snippets */\r\n public static SnippetUrl = Constants.SnippetUrl;\r\n\r\n /**\r\n * Snippet ID if the material was created from the snippet server\r\n */\r\n public snippetId: string;\r\n\r\n /**\r\n * Gets an array of blocks that needs to be serialized even if they are not yet connected\r\n */\r\n public attachedBlocks: NodeParticleBlock[] = [];\r\n\r\n /**\r\n * Gets or sets data used by visual editor\r\n * @see https://npe.babylonjs.com\r\n */\r\n public editorData: any = null;\r\n\r\n /**\r\n * Observable raised when the particle set is built\r\n */\r\n public onBuildObservable = new Observable<NodeParticleSystemSet>();\r\n\r\n /**\r\n * The name of the set\r\n */\r\n @serialize()\r\n public name: string;\r\n\r\n /**\r\n * A free comment about the set\r\n */\r\n @serialize(\"comment\")\r\n public comment: string;\r\n\r\n /**\r\n * Gets the system blocks\r\n */\r\n public get systemBlocks(): SystemBlock[] {\r\n return this._systemBlocks;\r\n }\r\n\r\n /**\r\n * Gets the list of input blocks attached to this material\r\n * @returns an array of InputBlocks\r\n */\r\n public get inputBlocks() {\r\n const blocks: ParticleInputBlock[] = [];\r\n for (const block of this.attachedBlocks) {\r\n if (block.isInput) {\r\n blocks.push(block as ParticleInputBlock);\r\n }\r\n }\r\n\r\n return blocks;\r\n }\r\n\r\n /**\r\n * Creates a new set\r\n * @param name defines the name of the set\r\n */\r\n public constructor(name: string) {\r\n this.name = name;\r\n }\r\n\r\n /**\r\n * Gets the current class name of the geometry e.g. \"NodeParticleSystemSet\"\r\n * @returns the class name\r\n */\r\n public getClassName(): string {\r\n return \"NodeParticleSystemSet\";\r\n }\r\n\r\n private _initializeBlock(node: NodeParticleBlock, autoConfigure = true) {\r\n if (this.attachedBlocks.indexOf(node) === -1) {\r\n this.attachedBlocks.push(node);\r\n }\r\n\r\n for (const input of node.inputs) {\r\n const connectedPoint = input.connectedPoint;\r\n if (connectedPoint) {\r\n const block = connectedPoint.ownerBlock;\r\n if (block !== node) {\r\n this._initializeBlock(block, autoConfigure);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Builds the particle system set from the defined blocks.\r\n * @param scene defines the hosting scene\r\n * @param verbose defines whether to log detailed information during the build process (false by default)\r\n * @returns a promise that resolves to the built particle system set\r\n */\r\n public async buildAsync(scene: Scene, verbose = false): Promise<ParticleSystemSet> {\r\n return await new Promise<ParticleSystemSet>((resolve) => {\r\n const output = new ParticleSystemSet();\r\n\r\n // Initialize all blocks\r\n for (const block of this._systemBlocks) {\r\n this._initializeBlock(block);\r\n }\r\n\r\n // Build the blocks\r\n for (const block of this.systemBlocks) {\r\n const state = new NodeParticleBuildState();\r\n state.buildId = this._buildId++;\r\n state.scene = scene;\r\n state.verbose = verbose;\r\n\r\n const system = block.createSystem(state);\r\n\r\n // Errors\r\n state.emitErrors();\r\n\r\n output.systems.push(system);\r\n }\r\n\r\n this.onBuildObservable.notifyObservers(this);\r\n\r\n resolve(output);\r\n });\r\n }\r\n\r\n /**\r\n * Clear the current geometry\r\n */\r\n public clear() {\r\n this.attachedBlocks.length = 0;\r\n this._systemBlocks.length = 0;\r\n }\r\n\r\n /**\r\n * Clear the current set and restore it to a default state\r\n */\r\n public setToDefault() {\r\n this.clear();\r\n\r\n this.editorData = null;\r\n\r\n // Main system\r\n const system = new SystemBlock(\"Particle system\");\r\n\r\n // Update position\r\n const updatePositionBlock = new UpdatePositionBlock(\"Update position\");\r\n updatePositionBlock.output.connectTo(system.particle);\r\n\r\n // Contextual inputs\r\n const positionBlock = new ParticleInputBlock(\"Position\");\r\n positionBlock.contextualValue = NodeParticleContextualSources.Position;\r\n const directionBlock = new ParticleInputBlock(\"Scaled direction\");\r\n directionBlock.contextualValue = NodeParticleContextualSources.ScaledDirection;\r\n\r\n // Add\r\n const addBlock = new ParticleMathBlock(\"Add\");\r\n addBlock.operation = ParticleMathBlockOperations.Add;\r\n positionBlock.output.connectTo(addBlock.left);\r\n directionBlock.output.connectTo(addBlock.right);\r\n addBlock.output.connectTo(updatePositionBlock.position);\r\n\r\n // Create particle\r\n const createParticleBlock = new CreateParticleBlock(\"Create particle\");\r\n\r\n // Shape\r\n const emitterShape = new BoxShapeBlock(\"Box shape\");\r\n createParticleBlock.particle.connectTo(emitterShape.particle);\r\n emitterShape.output.connectTo(updatePositionBlock.particle);\r\n\r\n // Texture\r\n const textureBlock = new ParticleTextureSourceBlock(\"Texture\");\r\n textureBlock.texture.connectTo(system.texture);\r\n textureBlock.url = \"https://assets.babylonjs.com/textures/flare.png\";\r\n\r\n this._systemBlocks.push(system);\r\n }\r\n\r\n /**\r\n * Remove a block from the current system set\r\n * @param block defines the block to remove\r\n */\r\n public removeBlock(block: NodeParticleBlock) {\r\n const attachedBlockIndex = this.attachedBlocks.indexOf(block);\r\n if (attachedBlockIndex > -1) {\r\n this.attachedBlocks.splice(attachedBlockIndex, 1);\r\n }\r\n\r\n if (block.isSystem) {\r\n const index = this._systemBlocks.indexOf(block as SystemBlock);\r\n if (index > -1) {\r\n this._systemBlocks.splice(index, 1);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Clear the current graph and load a new one from a serialization object\r\n * @param source defines the JSON representation of the particle set\r\n * @param merge defines whether or not the source must be merged or replace the current content\r\n */\r\n public parseSerializedObject(source: any, merge = false) {\r\n if (!merge) {\r\n this.clear();\r\n }\r\n\r\n const map: { [key: number]: NodeParticleBlock } = {};\r\n\r\n // Create blocks\r\n for (const parsedBlock of source.blocks) {\r\n const blockType = GetClass(parsedBlock.customType);\r\n if (blockType) {\r\n const block: NodeParticleBlock = new blockType();\r\n block._deserialize(parsedBlock);\r\n map[parsedBlock.id] = block;\r\n\r\n this.attachedBlocks.push(block);\r\n\r\n if (block.isSystem) {\r\n this._systemBlocks.push(block as SystemBlock);\r\n }\r\n }\r\n }\r\n\r\n // Reconnect teleportation\r\n for (const block of this.attachedBlocks) {\r\n if (block.isTeleportOut) {\r\n const teleportOut = block as ParticleTeleportOutBlock;\r\n const id = teleportOut._tempEntryPointUniqueId;\r\n if (id) {\r\n const source = map[id] as ParticleTeleportInBlock;\r\n if (source) {\r\n source.attachToEndpoint(teleportOut);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Connections - Starts with input blocks only (except if in \"merge\" mode where we scan all blocks)\r\n for (let blockIndex = 0; blockIndex < source.blocks.length; blockIndex++) {\r\n const parsedBlock = source.blocks[blockIndex];\r\n const block = map[parsedBlock.id];\r\n\r\n if (!block) {\r\n continue;\r\n }\r\n\r\n if (block.inputs.length && parsedBlock.inputs.some((i: any) => i.targetConnectionName) && !merge) {\r\n continue;\r\n }\r\n this._restoreConnections(block, source, map);\r\n }\r\n\r\n // UI related info\r\n if (source.locations || (source.editorData && source.editorData.locations)) {\r\n const locations: {\r\n blockId: number;\r\n x: number;\r\n y: number;\r\n isCollapsed: boolean;\r\n }[] = source.locations || source.editorData.locations;\r\n\r\n for (const location of locations) {\r\n if (map[location.blockId]) {\r\n location.blockId = map[location.blockId].uniqueId;\r\n }\r\n }\r\n\r\n if (merge && this.editorData && this.editorData.locations) {\r\n locations.concat(this.editorData.locations);\r\n }\r\n\r\n if (source.locations) {\r\n this.editorData = {\r\n locations: locations,\r\n };\r\n } else {\r\n this.editorData = source.editorData;\r\n this.editorData.locations = locations;\r\n }\r\n\r\n const blockMap: number[] = [];\r\n\r\n for (const key in map) {\r\n blockMap[key] = map[key].uniqueId;\r\n }\r\n\r\n this.editorData.map = blockMap;\r\n }\r\n\r\n this.comment = source.comment;\r\n }\r\n\r\n private _restoreConnections(block: NodeParticleBlock, source: any, map: { [key: number]: NodeParticleBlock }) {\r\n for (const outputPoint of block.outputs) {\r\n for (const candidate of source.blocks) {\r\n const target = map[candidate.id];\r\n\r\n if (!target) {\r\n continue;\r\n }\r\n\r\n for (const input of candidate.inputs) {\r\n if (map[input.targetBlockId] === block && input.targetConnectionName === outputPoint.name) {\r\n const inputPoint = target.getInputByName(input.inputName);\r\n if (!inputPoint || inputPoint.isConnected) {\r\n continue;\r\n }\r\n\r\n outputPoint.connectTo(inputPoint, true);\r\n this._restoreConnections(target, source, map);\r\n continue;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Serializes this geometry in a JSON representation\r\n * @param selectedBlocks defines the list of blocks to save (if null the whole geometry will be saved)\r\n * @returns the serialized geometry object\r\n */\r\n public serialize(selectedBlocks?: NodeParticleBlock[]): any {\r\n const serializationObject = selectedBlocks ? {} : SerializationHelper.Serialize(this);\r\n serializationObject.editorData = JSON.parse(JSON.stringify(this.editorData)); // Copy\r\n\r\n let blocks: NodeParticleBlock[] = [];\r\n\r\n if (selectedBlocks) {\r\n blocks = selectedBlocks;\r\n } else {\r\n serializationObject.customType = \"BABYLON.NodeParticleSystemSet\";\r\n }\r\n\r\n // Blocks\r\n serializationObject.blocks = [];\r\n\r\n for (const block of blocks) {\r\n serializationObject.blocks.push(block.serialize());\r\n }\r\n\r\n if (!selectedBlocks) {\r\n for (const block of this.attachedBlocks) {\r\n if (blocks.indexOf(block) !== -1) {\r\n continue;\r\n }\r\n serializationObject.blocks.push(block.serialize());\r\n }\r\n }\r\n\r\n return serializationObject;\r\n }\r\n\r\n /**\r\n * Disposes the resources\r\n */\r\n public dispose(): void {\r\n for (const block of this.attachedBlocks) {\r\n block.dispose();\r\n }\r\n\r\n this.attachedBlocks.length = 0;\r\n this.onBuildObservable.clear();\r\n }\r\n\r\n /**\r\n * Creates a new node particle set set to default basic configuration\r\n * @param name defines the name of the particle set\r\n * @returns a new NodeParticleSystemSet\r\n */\r\n public static CreateDefault(name: string) {\r\n const nodeParticleSet = new NodeParticleSystemSet(name);\r\n\r\n nodeParticleSet.setToDefault();\r\n\r\n return nodeParticleSet;\r\n }\r\n\r\n /**\r\n * Creates a node particle set from parsed data\r\n * @param source defines the JSON representation of the particle set\r\n * @returns a new node particle set\r\n */\r\n public static Parse(source: any): NodeParticleSystemSet {\r\n const nodeParticleSet = SerializationHelper.Parse(() => new NodeParticleSystemSet(source.name), source, null);\r\n\r\n nodeParticleSet.parseSerializedObject(source);\r\n\r\n return nodeParticleSet;\r\n }\r\n\r\n /**\r\n * Creates a node particle set from a snippet saved by the node geometry editor\r\n * @param snippetId defines the snippet to load\r\n * @param nodeParticleSet defines a node particle set to update (instead of creating a new one)\r\n * @returns a promise that will resolve to the new node geometry\r\n */\r\n // eslint-disable-next-line @typescript-eslint/promise-function-async, no-restricted-syntax\r\n public static ParseFromSnippetAsync(snippetId: string, nodeParticleSet?: NodeParticleSystemSet): Promise<NodeParticleSystemSet> {\r\n if (snippetId === \"_BLANK\") {\r\n return Promise.resolve(NodeParticleSystemSet.CreateDefault(\"blank\"));\r\n }\r\n\r\n return new Promise((resolve, reject) => {\r\n const request = new WebRequest();\r\n request.addEventListener(\"readystatechange\", () => {\r\n if (request.readyState == 4) {\r\n if (request.status == 200) {\r\n const snippet = JSON.parse(JSON.parse(request.responseText).jsonPayload);\r\n const serializationObject = JSON.parse(snippet.nodeParticle);\r\n\r\n if (!nodeParticleSet) {\r\n nodeParticleSet = SerializationHelper.Parse(() => new NodeParticleSystemSet(snippetId), serializationObject, null);\r\n }\r\n\r\n nodeParticleSet.parseSerializedObject(serializationObject);\r\n nodeParticleSet.snippetId = snippetId;\r\n\r\n try {\r\n resolve(nodeParticleSet);\r\n } catch (err) {\r\n // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors\r\n reject(err);\r\n }\r\n } else {\r\n // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors\r\n reject(\"Unable to load the snippet \" + snippetId);\r\n }\r\n }\r\n });\r\n\r\n request.open(\"GET\", this.SnippetUrl + \"/\" + snippetId.replace(/#/g, \"/\"));\r\n request.send();\r\n });\r\n }\r\n}\r\n"]}
@@ -15,4 +15,6 @@ export declare function _ConnectBefore(newOne: _IExecutionQueueItem, activeOne:
15
15
  /** @internal */
16
16
  export declare function _ConnectAfter(newOne: _IExecutionQueueItem, activeOne: _IExecutionQueueItem): void;
17
17
  /** @internal */
18
+ export declare function _ConnectAtTheEnd(newOne: _IExecutionQueueItem, root: _IExecutionQueueItem): void;
19
+ /** @internal */
18
20
  export declare function _RemoveFromQueue(item: _IExecutionQueueItem): void;
@@ -17,6 +17,16 @@ export function _ConnectAfter(newOne, activeOne) {
17
17
  activeOne.nextItem = newOne;
18
18
  }
19
19
  /** @internal */
20
+ export function _ConnectAtTheEnd(newOne, root) {
21
+ let activeOne = root;
22
+ while (activeOne.nextItem) {
23
+ activeOne = activeOne.nextItem;
24
+ }
25
+ newOne.previousItem = activeOne;
26
+ newOne.nextItem = activeOne.nextItem;
27
+ activeOne.nextItem = newOne;
28
+ }
29
+ /** @internal */
20
30
  export function _RemoveFromQueue(item) {
21
31
  if (item.previousItem) {
22
32
  item.previousItem.nextItem = item.nextItem;
@@ -1 +1 @@
1
- {"version":3,"file":"executionQueue.js","sourceRoot":"","sources":["../../../../../dev/core/src/Particles/Queue/executionQueue.ts"],"names":[],"mappings":"AAcA,gBAAgB;AAChB,MAAM,UAAU,cAAc,CAAC,MAA4B,EAAE,SAA+B;IACxF,MAAM,CAAC,YAAY,GAAG,SAAS,CAAC,YAAY,CAAC;IAC7C,MAAM,CAAC,QAAQ,GAAG,SAAS,CAAC;IAC5B,IAAI,SAAS,CAAC,YAAY,EAAE,CAAC;QACzB,SAAS,CAAC,YAAY,CAAC,QAAQ,GAAG,MAAM,CAAC;IAC7C,CAAC;IACD,SAAS,CAAC,YAAY,GAAG,MAAM,CAAC;AACpC,CAAC;AAED,gBAAgB;AAChB,MAAM,UAAU,aAAa,CAAC,MAA4B,EAAE,SAA+B;IACvF,MAAM,CAAC,YAAY,GAAG,SAAS,CAAC;IAChC,MAAM,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;IACrC,IAAI,SAAS,CAAC,QAAQ,EAAE,CAAC;QACrB,SAAS,CAAC,QAAQ,CAAC,YAAY,GAAG,MAAM,CAAC;IAC7C,CAAC;IACD,SAAS,CAAC,QAAQ,GAAG,MAAM,CAAC;AAChC,CAAC;AAED,gBAAgB;AAChB,MAAM,UAAU,gBAAgB,CAAC,IAA0B;IACvD,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,YAAY,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC/C,CAAC;IACD,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChB,IAAI,CAAC,QAAQ,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;IACnD,CAAC;AACL,CAAC","sourcesContent":["import type { Nullable } from \"core/types\";\r\nimport type { Particle } from \"../particle\";\r\nimport type { ThinParticleSystem } from \"../thinParticleSystem\";\r\n\r\n/** @internal */\r\nexport interface _IExecutionQueueItem {\r\n /** @internal */\r\n process: (particle: Particle, system: ThinParticleSystem) => void;\r\n /** @internal */\r\n previousItem: Nullable<_IExecutionQueueItem>;\r\n /** @internal */\r\n nextItem: Nullable<_IExecutionQueueItem>;\r\n}\r\n\r\n/** @internal */\r\nexport function _ConnectBefore(newOne: _IExecutionQueueItem, activeOne: _IExecutionQueueItem) {\r\n newOne.previousItem = activeOne.previousItem;\r\n newOne.nextItem = activeOne;\r\n if (activeOne.previousItem) {\r\n activeOne.previousItem.nextItem = newOne;\r\n }\r\n activeOne.previousItem = newOne;\r\n}\r\n\r\n/** @internal */\r\nexport function _ConnectAfter(newOne: _IExecutionQueueItem, activeOne: _IExecutionQueueItem) {\r\n newOne.previousItem = activeOne;\r\n newOne.nextItem = activeOne.nextItem;\r\n if (activeOne.nextItem) {\r\n activeOne.nextItem.previousItem = newOne;\r\n }\r\n activeOne.nextItem = newOne;\r\n}\r\n\r\n/** @internal */\r\nexport function _RemoveFromQueue(item: _IExecutionQueueItem) {\r\n if (item.previousItem) {\r\n item.previousItem.nextItem = item.nextItem;\r\n }\r\n if (item.nextItem) {\r\n item.nextItem.previousItem = item.previousItem;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"executionQueue.js","sourceRoot":"","sources":["../../../../../dev/core/src/Particles/Queue/executionQueue.ts"],"names":[],"mappings":"AAcA,gBAAgB;AAChB,MAAM,UAAU,cAAc,CAAC,MAA4B,EAAE,SAA+B;IACxF,MAAM,CAAC,YAAY,GAAG,SAAS,CAAC,YAAY,CAAC;IAC7C,MAAM,CAAC,QAAQ,GAAG,SAAS,CAAC;IAC5B,IAAI,SAAS,CAAC,YAAY,EAAE,CAAC;QACzB,SAAS,CAAC,YAAY,CAAC,QAAQ,GAAG,MAAM,CAAC;IAC7C,CAAC;IACD,SAAS,CAAC,YAAY,GAAG,MAAM,CAAC;AACpC,CAAC;AAED,gBAAgB;AAChB,MAAM,UAAU,aAAa,CAAC,MAA4B,EAAE,SAA+B;IACvF,MAAM,CAAC,YAAY,GAAG,SAAS,CAAC;IAChC,MAAM,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;IACrC,IAAI,SAAS,CAAC,QAAQ,EAAE,CAAC;QACrB,SAAS,CAAC,QAAQ,CAAC,YAAY,GAAG,MAAM,CAAC;IAC7C,CAAC;IACD,SAAS,CAAC,QAAQ,GAAG,MAAM,CAAC;AAChC,CAAC;AAED,gBAAgB;AAChB,MAAM,UAAU,gBAAgB,CAAC,MAA4B,EAAE,IAA0B;IACrF,IAAI,SAAS,GAAG,IAAI,CAAC;IACrB,OAAO,SAAS,CAAC,QAAQ,EAAE,CAAC;QACxB,SAAS,GAAG,SAAS,CAAC,QAAQ,CAAC;IACnC,CAAC;IACD,MAAM,CAAC,YAAY,GAAG,SAAS,CAAC;IAChC,MAAM,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;IACrC,SAAS,CAAC,QAAQ,GAAG,MAAM,CAAC;AAChC,CAAC;AAED,gBAAgB;AAChB,MAAM,UAAU,gBAAgB,CAAC,IAA0B;IACvD,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,YAAY,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC/C,CAAC;IACD,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChB,IAAI,CAAC,QAAQ,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;IACnD,CAAC;AACL,CAAC","sourcesContent":["import type { Nullable } from \"core/types\";\r\nimport type { Particle } from \"../particle\";\r\nimport type { ThinParticleSystem } from \"../thinParticleSystem\";\r\n\r\n/** @internal */\r\nexport interface _IExecutionQueueItem {\r\n /** @internal */\r\n process: (particle: Particle, system: ThinParticleSystem) => void;\r\n /** @internal */\r\n previousItem: Nullable<_IExecutionQueueItem>;\r\n /** @internal */\r\n nextItem: Nullable<_IExecutionQueueItem>;\r\n}\r\n\r\n/** @internal */\r\nexport function _ConnectBefore(newOne: _IExecutionQueueItem, activeOne: _IExecutionQueueItem) {\r\n newOne.previousItem = activeOne.previousItem;\r\n newOne.nextItem = activeOne;\r\n if (activeOne.previousItem) {\r\n activeOne.previousItem.nextItem = newOne;\r\n }\r\n activeOne.previousItem = newOne;\r\n}\r\n\r\n/** @internal */\r\nexport function _ConnectAfter(newOne: _IExecutionQueueItem, activeOne: _IExecutionQueueItem) {\r\n newOne.previousItem = activeOne;\r\n newOne.nextItem = activeOne.nextItem;\r\n if (activeOne.nextItem) {\r\n activeOne.nextItem.previousItem = newOne;\r\n }\r\n activeOne.nextItem = newOne;\r\n}\r\n\r\n/** @internal */\r\nexport function _ConnectAtTheEnd(newOne: _IExecutionQueueItem, root: _IExecutionQueueItem) {\r\n let activeOne = root;\r\n while (activeOne.nextItem) {\r\n activeOne = activeOne.nextItem;\r\n }\r\n newOne.previousItem = activeOne;\r\n newOne.nextItem = activeOne.nextItem;\r\n activeOne.nextItem = newOne;\r\n}\r\n\r\n/** @internal */\r\nexport function _RemoveFromQueue(item: _IExecutionQueueItem) {\r\n if (item.previousItem) {\r\n item.previousItem.nextItem = item.nextItem;\r\n }\r\n if (item.nextItem) {\r\n item.nextItem.previousItem = item.previousItem;\r\n }\r\n}\r\n"]}
@@ -93,7 +93,8 @@ export declare class BaseParticleSystem implements IClipPlanesHolder {
93
93
  * The overall motion speed (0.01 is default update speed, faster updates = faster animation)
94
94
  */
95
95
  updateSpeed: number;
96
- protected _targetStopDuration: number;
96
+ /** @internal */
97
+ _targetStopDuration: number;
97
98
  /**
98
99
  * The amount of time the particle system is running (depends of the overall update speed).
99
100
  */
@@ -364,6 +364,7 @@ export class BaseParticleSystem {
364
364
  * The overall motion speed (0.01 is default update speed, faster updates = faster animation)
365
365
  */
366
366
  this.updateSpeed = 0.01;
367
+ /** @internal */
367
368
  this._targetStopDuration = 0;
368
369
  /**
369
370
  * Specifies whether the particle system will be disposed once it reaches the end of the animation.