@babylonjs/core 8.11.0 → 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 (389) 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/thinMinMaxReducer.d.ts +47 -0
  175. package/Misc/thinMinMaxReducer.js +148 -0
  176. package/Misc/thinMinMaxReducer.js.map +1 -0
  177. package/Particles/EmitterTypes/customParticleEmitter.d.ts +5 -0
  178. package/Particles/EmitterTypes/customParticleEmitter.js +9 -1
  179. package/Particles/EmitterTypes/customParticleEmitter.js.map +1 -1
  180. package/Particles/IParticleSystem.d.ts +4 -0
  181. package/Particles/IParticleSystem.js.map +1 -1
  182. package/Particles/Node/Blocks/Conditions/particleConditionBlock.d.ts +75 -0
  183. package/Particles/Node/Blocks/Conditions/particleConditionBlock.js +179 -0
  184. package/Particles/Node/Blocks/Conditions/particleConditionBlock.js.map +1 -0
  185. package/Particles/Node/Blocks/Emitters/boxShapeBlock.d.ts +47 -0
  186. package/Particles/Node/Blocks/Emitters/boxShapeBlock.js +107 -0
  187. package/Particles/Node/Blocks/Emitters/boxShapeBlock.js.map +1 -0
  188. package/Particles/Node/Blocks/Emitters/createParticleBlock.d.ts +46 -0
  189. package/Particles/Node/Blocks/Emitters/createParticleBlock.js +97 -0
  190. package/Particles/Node/Blocks/Emitters/createParticleBlock.js.map +1 -0
  191. package/Particles/Node/Blocks/Emitters/customShapeBlock.d.ts +39 -0
  192. package/Particles/Node/Blocks/Emitters/customShapeBlock.js +84 -0
  193. package/Particles/Node/Blocks/Emitters/customShapeBlock.js.map +1 -0
  194. package/Particles/Node/Blocks/Emitters/cylinderShapeBlock.d.ts +48 -0
  195. package/Particles/Node/Blocks/Emitters/cylinderShapeBlock.js +120 -0
  196. package/Particles/Node/Blocks/Emitters/cylinderShapeBlock.js.map +1 -0
  197. package/Particles/Node/Blocks/Emitters/index.d.ts +7 -0
  198. package/Particles/Node/Blocks/Emitters/index.js +8 -0
  199. package/Particles/Node/Blocks/Emitters/index.js.map +1 -0
  200. package/Particles/Node/Blocks/Emitters/pointShapeBlock.d.ts +39 -0
  201. package/Particles/Node/Blocks/Emitters/pointShapeBlock.js +86 -0
  202. package/Particles/Node/Blocks/Emitters/pointShapeBlock.js.map +1 -0
  203. package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.d.ts +53 -0
  204. package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.js +111 -0
  205. package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.js.map +1 -0
  206. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.d.ts +43 -0
  207. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.js +108 -0
  208. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.js.map +1 -0
  209. package/Particles/Node/Blocks/Teleport/particleTeleportInBlock.d.ts +48 -0
  210. package/Particles/Node/Blocks/Teleport/particleTeleportInBlock.js +100 -0
  211. package/Particles/Node/Blocks/Teleport/particleTeleportInBlock.js.map +1 -0
  212. package/Particles/Node/Blocks/Teleport/particleTeleportOutBlock.d.ts +47 -0
  213. package/Particles/Node/Blocks/Teleport/particleTeleportOutBlock.js +82 -0
  214. package/Particles/Node/Blocks/Teleport/particleTeleportOutBlock.js.map +1 -0
  215. package/Particles/Node/Blocks/Triggers/particleTriggerBlock.d.ts +48 -0
  216. package/Particles/Node/Blocks/Triggers/particleTriggerBlock.js +133 -0
  217. package/Particles/Node/Blocks/Triggers/particleTriggerBlock.js.map +1 -0
  218. package/Particles/Node/Blocks/Triggers/triggerTools.d.ts +9 -0
  219. package/Particles/Node/Blocks/Triggers/triggerTools.js +16 -0
  220. package/Particles/Node/Blocks/Triggers/triggerTools.js.map +1 -0
  221. package/Particles/Node/Blocks/Update/basicPositionUpdateBlock.d.ts +31 -0
  222. package/Particles/Node/Blocks/Update/basicPositionUpdateBlock.js +64 -0
  223. package/Particles/Node/Blocks/Update/basicPositionUpdateBlock.js.map +1 -0
  224. package/Particles/Node/Blocks/Update/basicSpriteUpdateBlock.d.ts +31 -0
  225. package/Particles/Node/Blocks/Update/basicSpriteUpdateBlock.js +63 -0
  226. package/Particles/Node/Blocks/Update/basicSpriteUpdateBlock.js.map +1 -0
  227. package/Particles/Node/Blocks/Update/updateAngleBlock.d.ts +35 -0
  228. package/Particles/Node/Blocks/Update/updateAngleBlock.js +73 -0
  229. package/Particles/Node/Blocks/Update/updateAngleBlock.js.map +1 -0
  230. package/Particles/Node/Blocks/Update/updateColorBlock.d.ts +35 -0
  231. package/Particles/Node/Blocks/Update/updateColorBlock.js +73 -0
  232. package/Particles/Node/Blocks/Update/updateColorBlock.js.map +1 -0
  233. package/Particles/Node/Blocks/Update/updateDirectionBlock.d.ts +35 -0
  234. package/Particles/Node/Blocks/Update/updateDirectionBlock.js +73 -0
  235. package/Particles/Node/Blocks/Update/updateDirectionBlock.js.map +1 -0
  236. package/Particles/Node/Blocks/Update/updateFlowMapBlock.d.ts +41 -0
  237. package/Particles/Node/Blocks/Update/updateFlowMapBlock.js +102 -0
  238. package/Particles/Node/Blocks/Update/updateFlowMapBlock.js.map +1 -0
  239. package/Particles/Node/Blocks/Update/updatePositionBlock.d.ts +35 -0
  240. package/Particles/Node/Blocks/Update/updatePositionBlock.js +73 -0
  241. package/Particles/Node/Blocks/Update/updatePositionBlock.js.map +1 -0
  242. package/Particles/Node/Blocks/Update/updateScaleBlock.d.ts +35 -0
  243. package/Particles/Node/Blocks/Update/updateScaleBlock.js +73 -0
  244. package/Particles/Node/Blocks/Update/updateScaleBlock.js.map +1 -0
  245. package/Particles/Node/Blocks/Update/updateSpriteCellIndexBlock.d.ts +35 -0
  246. package/Particles/Node/Blocks/Update/updateSpriteCellIndexBlock.js +74 -0
  247. package/Particles/Node/Blocks/Update/updateSpriteCellIndexBlock.js.map +1 -0
  248. package/Particles/Node/Blocks/index.d.ts +27 -0
  249. package/Particles/Node/Blocks/index.js +29 -0
  250. package/Particles/Node/Blocks/index.js.map +1 -0
  251. package/Particles/Node/Blocks/particleConverterBlock.d.ts +85 -0
  252. package/Particles/Node/Blocks/particleConverterBlock.js +267 -0
  253. package/Particles/Node/Blocks/particleConverterBlock.js.map +1 -0
  254. package/Particles/Node/Blocks/particleDebugBlock.d.ts +37 -0
  255. package/Particles/Node/Blocks/particleDebugBlock.js +109 -0
  256. package/Particles/Node/Blocks/particleDebugBlock.js.map +1 -0
  257. package/Particles/Node/Blocks/particleElbowBlock.d.ts +27 -0
  258. package/Particles/Node/Blocks/particleElbowBlock.js +47 -0
  259. package/Particles/Node/Blocks/particleElbowBlock.js.map +1 -0
  260. package/Particles/Node/Blocks/particleGradientBlock.d.ts +28 -0
  261. package/Particles/Node/Blocks/particleGradientBlock.js +118 -0
  262. package/Particles/Node/Blocks/particleGradientBlock.js.map +1 -0
  263. package/Particles/Node/Blocks/particleGradientValueBlock.d.ts +32 -0
  264. package/Particles/Node/Blocks/particleGradientValueBlock.js +79 -0
  265. package/Particles/Node/Blocks/particleGradientValueBlock.js.map +1 -0
  266. package/Particles/Node/Blocks/particleInputBlock.d.ts +87 -0
  267. package/Particles/Node/Blocks/particleInputBlock.js +279 -0
  268. package/Particles/Node/Blocks/particleInputBlock.js.map +1 -0
  269. package/Particles/Node/Blocks/particleLerpBlock.d.ts +34 -0
  270. package/Particles/Node/Blocks/particleLerpBlock.js +92 -0
  271. package/Particles/Node/Blocks/particleLerpBlock.js.map +1 -0
  272. package/Particles/Node/Blocks/particleMathBlock.d.ts +64 -0
  273. package/Particles/Node/Blocks/particleMathBlock.js +321 -0
  274. package/Particles/Node/Blocks/particleMathBlock.js.map +1 -0
  275. package/Particles/Node/Blocks/particleRandomBlock.d.ts +52 -0
  276. package/Particles/Node/Blocks/particleRandomBlock.js +161 -0
  277. package/Particles/Node/Blocks/particleRandomBlock.js.map +1 -0
  278. package/Particles/Node/Blocks/particleSourceTextureBlock.d.ts +65 -0
  279. package/Particles/Node/Blocks/particleSourceTextureBlock.js +173 -0
  280. package/Particles/Node/Blocks/particleSourceTextureBlock.js.map +1 -0
  281. package/Particles/Node/Blocks/particleTrigonometryBlock.d.ts +80 -0
  282. package/Particles/Node/Blocks/particleTrigonometryBlock.js +272 -0
  283. package/Particles/Node/Blocks/particleTrigonometryBlock.js.map +1 -0
  284. package/Particles/Node/Blocks/randomRangeBlock.d.ts +45 -0
  285. package/Particles/Node/Blocks/randomRangeBlock.js +151 -0
  286. package/Particles/Node/Blocks/randomRangeBlock.js.map +1 -0
  287. package/Particles/Node/Blocks/systemBlock.d.ts +71 -0
  288. package/Particles/Node/Blocks/systemBlock.js +193 -0
  289. package/Particles/Node/Blocks/systemBlock.js.map +1 -0
  290. package/Particles/Node/Enums/nodeParticleBlockConnectionPointTypes.d.ts +39 -0
  291. package/Particles/Node/Enums/nodeParticleBlockConnectionPointTypes.js +41 -0
  292. package/Particles/Node/Enums/nodeParticleBlockConnectionPointTypes.js.map +1 -0
  293. package/Particles/Node/Enums/nodeParticleContextualSources.d.ts +31 -0
  294. package/Particles/Node/Enums/nodeParticleContextualSources.js +34 -0
  295. package/Particles/Node/Enums/nodeParticleContextualSources.js.map +1 -0
  296. package/Particles/Node/Enums/nodeParticleSystemSources.d.ts +13 -0
  297. package/Particles/Node/Enums/nodeParticleSystemSources.js +15 -0
  298. package/Particles/Node/Enums/nodeParticleSystemSources.js.map +1 -0
  299. package/Particles/Node/index.d.ts +8 -0
  300. package/Particles/Node/index.js +10 -0
  301. package/Particles/Node/index.js.map +1 -0
  302. package/Particles/Node/nodeParticleBlock.d.ts +154 -0
  303. package/Particles/Node/nodeParticleBlock.js +355 -0
  304. package/Particles/Node/nodeParticleBlock.js.map +1 -0
  305. package/Particles/Node/nodeParticleBlockConnectionPoint.d.ts +188 -0
  306. package/Particles/Node/nodeParticleBlockConnectionPoint.js +337 -0
  307. package/Particles/Node/nodeParticleBlockConnectionPoint.js.map +1 -0
  308. package/Particles/Node/nodeParticleBuildState.d.ts +89 -0
  309. package/Particles/Node/nodeParticleBuildState.js +170 -0
  310. package/Particles/Node/nodeParticleBuildState.js.map +1 -0
  311. package/Particles/Node/nodeParticleSystemSet.d.ts +120 -0
  312. package/Particles/Node/nodeParticleSystemSet.js +382 -0
  313. package/Particles/Node/nodeParticleSystemSet.js.map +1 -0
  314. package/Particles/Queue/executionQueue.d.ts +2 -0
  315. package/Particles/Queue/executionQueue.js +10 -0
  316. package/Particles/Queue/executionQueue.js.map +1 -1
  317. package/Particles/baseParticleSystem.d.ts +2 -1
  318. package/Particles/baseParticleSystem.js +1 -0
  319. package/Particles/baseParticleSystem.js.map +1 -1
  320. package/Particles/flowMap.d.ts +7 -0
  321. package/Particles/flowMap.js +32 -0
  322. package/Particles/flowMap.js.map +1 -1
  323. package/Particles/gpuParticleSystem.d.ts +4 -0
  324. package/Particles/gpuParticleSystem.js +4 -0
  325. package/Particles/gpuParticleSystem.js.map +1 -1
  326. package/Particles/index.d.ts +1 -0
  327. package/Particles/index.js +1 -0
  328. package/Particles/index.js.map +1 -1
  329. package/Particles/particleSystem.d.ts +12 -0
  330. package/Particles/particleSystem.js +22 -1
  331. package/Particles/particleSystem.js.map +1 -1
  332. package/Particles/thinParticleSystem.d.ts +32 -11
  333. package/Particles/thinParticleSystem.js +62 -36
  334. package/Particles/thinParticleSystem.js.map +1 -1
  335. package/PostProcesses/postProcessManager.d.ts +2 -1
  336. package/PostProcesses/postProcessManager.js +3 -2
  337. package/PostProcesses/postProcessManager.js.map +1 -1
  338. package/Shaders/ShadersInclude/defaultUboDeclaration.js +1 -1
  339. package/Shaders/ShadersInclude/defaultUboDeclaration.js.map +1 -1
  340. package/Shaders/ShadersInclude/defaultVertexDeclaration.js +1 -0
  341. package/Shaders/ShadersInclude/defaultVertexDeclaration.js.map +1 -1
  342. package/Shaders/ShadersInclude/lightFragment.js +5 -2
  343. package/Shaders/ShadersInclude/lightFragment.js.map +1 -1
  344. package/Shaders/ShadersInclude/morphTargetsVertexDeclaration.js +3 -0
  345. package/Shaders/ShadersInclude/morphTargetsVertexDeclaration.js.map +1 -1
  346. package/Shaders/ShadersInclude/pbrBlockPrePass.js +3 -0
  347. package/Shaders/ShadersInclude/pbrBlockPrePass.js.map +1 -1
  348. package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js +1 -1
  349. package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
  350. package/Shaders/ShadersInclude/pbrUboDeclaration.js +1 -1
  351. package/Shaders/ShadersInclude/pbrUboDeclaration.js.map +1 -1
  352. package/Shaders/ShadersInclude/pbrVertexDeclaration.js +1 -0
  353. package/Shaders/ShadersInclude/pbrVertexDeclaration.js.map +1 -1
  354. package/Shaders/ShadersInclude/prePassDeclaration.js +3 -0
  355. package/Shaders/ShadersInclude/prePassDeclaration.js.map +1 -1
  356. package/Shaders/ShadersInclude/prePassVertex.js +3 -0
  357. package/Shaders/ShadersInclude/prePassVertex.js.map +1 -1
  358. package/Shaders/ShadersInclude/prePassVertexDeclaration.js +3 -0
  359. package/Shaders/ShadersInclude/prePassVertexDeclaration.js.map +1 -1
  360. package/Shaders/default.fragment.js +3 -0
  361. package/Shaders/default.fragment.js.map +1 -1
  362. package/Shaders/minmaxRedux.fragment.js +13 -5
  363. package/Shaders/minmaxRedux.fragment.js.map +1 -1
  364. package/ShadersWGSL/ShadersInclude/defaultUboDeclaration.js +1 -1
  365. package/ShadersWGSL/ShadersInclude/defaultUboDeclaration.js.map +1 -1
  366. package/ShadersWGSL/ShadersInclude/lightFragment.js +5 -2
  367. package/ShadersWGSL/ShadersInclude/lightFragment.js.map +1 -1
  368. package/ShadersWGSL/ShadersInclude/morphTargetsVertexDeclaration.js +3 -0
  369. package/ShadersWGSL/ShadersInclude/morphTargetsVertexDeclaration.js.map +1 -1
  370. package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.js +3 -0
  371. package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.js.map +1 -1
  372. package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js +1 -1
  373. package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
  374. package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js +1 -1
  375. package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js.map +1 -1
  376. package/ShadersWGSL/ShadersInclude/prePassDeclaration.js +3 -0
  377. package/ShadersWGSL/ShadersInclude/prePassDeclaration.js.map +1 -1
  378. package/ShadersWGSL/ShadersInclude/prePassVertex.js +3 -0
  379. package/ShadersWGSL/ShadersInclude/prePassVertex.js.map +1 -1
  380. package/ShadersWGSL/ShadersInclude/prePassVertexDeclaration.js +3 -0
  381. package/ShadersWGSL/ShadersInclude/prePassVertexDeclaration.js.map +1 -1
  382. package/ShadersWGSL/default.fragment.js +3 -0
  383. package/ShadersWGSL/default.fragment.js.map +1 -1
  384. package/ShadersWGSL/minmaxRedux.fragment.js +14 -6
  385. package/ShadersWGSL/minmaxRedux.fragment.js.map +1 -1
  386. package/package.json +1 -1
  387. package/scene.d.ts +5 -0
  388. package/scene.js +8 -0
  389. package/scene.js.map +1 -1
@@ -0,0 +1,193 @@
1
+ import { __decorate } from "../../../tslib.es6.js";
2
+ import { RegisterClass } from "../../../Misc/typeStore.js";
3
+ import { NodeParticleBlockConnectionPointTypes } from "../Enums/nodeParticleBlockConnectionPointTypes.js";
4
+ import { NodeParticleBlock } from "../nodeParticleBlock.js";
5
+ import { editableInPropertyPage } from "../../../Decorators/nodeDecorator.js";
6
+ import { BaseParticleSystem } from "../../baseParticleSystem.js";
7
+ import { _TriggerSubEmitter } from "./Triggers/triggerTools.js";
8
+ /**
9
+ * Block used to get a system of particles
10
+ */
11
+ export class SystemBlock extends NodeParticleBlock {
12
+ /**
13
+ * Create a new SystemBlock
14
+ * @param name defines the block name
15
+ */
16
+ constructor(name) {
17
+ super(name);
18
+ /**
19
+ * Gets or sets the blend mode for the particle system
20
+ */
21
+ this.blendMode = BaseParticleSystem.BLENDMODE_ONEONE;
22
+ /**
23
+ * Gets or sets the epsilon value used for comparison
24
+ */
25
+ this.capacity = 1000;
26
+ /**
27
+ * Gets or sets the emit rate
28
+ */
29
+ this.emitRate = 10;
30
+ /**
31
+ * Gets or sets the target stop duration for the particle system
32
+ */
33
+ this.targetStopDuration = 0;
34
+ /**
35
+ * Gets or sets the target stop duration for the particle system
36
+ */
37
+ this.startDelay = 0;
38
+ /**
39
+ * Gets or sets a boolean indicating if the system should not start automatically
40
+ */
41
+ this.doNoStart = false;
42
+ this._isSystem = true;
43
+ this.registerInput("particle", NodeParticleBlockConnectionPointTypes.Particle);
44
+ this.registerInput("texture", NodeParticleBlockConnectionPointTypes.Texture);
45
+ this.registerInput("onStart", NodeParticleBlockConnectionPointTypes.System, true);
46
+ this.registerInput("onEnd", NodeParticleBlockConnectionPointTypes.System, true);
47
+ this.registerOutput("system", NodeParticleBlockConnectionPointTypes.System);
48
+ }
49
+ /**
50
+ * Gets the current class name
51
+ * @returns the class name
52
+ */
53
+ getClassName() {
54
+ return "SystemBlock";
55
+ }
56
+ /**
57
+ * Gets the particle input component
58
+ */
59
+ get particle() {
60
+ return this._inputs[0];
61
+ }
62
+ /**
63
+ * Gets the texture input component
64
+ */
65
+ get texture() {
66
+ return this._inputs[1];
67
+ }
68
+ /**
69
+ * Gets the onStart input component
70
+ */
71
+ get onStart() {
72
+ return this._inputs[2];
73
+ }
74
+ /**
75
+ * Gets the onEnd input component
76
+ */
77
+ get onEnd() {
78
+ return this._inputs[3];
79
+ }
80
+ /**
81
+ * Gets the system output component
82
+ */
83
+ get system() {
84
+ return this._outputs[0];
85
+ }
86
+ /**
87
+ * Builds the block and return a functional particle system
88
+ * @param state defines the building state
89
+ * @returns the built particle system
90
+ */
91
+ createSystem(state) {
92
+ state.capacity = this.capacity;
93
+ state.buildId = this._buildId++;
94
+ this.build(state);
95
+ const particleSystem = this.particle.getConnectedValue(state);
96
+ particleSystem.particleTexture = this.texture.getConnectedValue(state);
97
+ particleSystem.emitRate = this.emitRate;
98
+ particleSystem.blendMode = this.blendMode;
99
+ particleSystem.name = this.name;
100
+ particleSystem._nodeGenerated = true;
101
+ particleSystem._targetStopDuration = this.targetStopDuration;
102
+ particleSystem.startDelay = this.startDelay;
103
+ this.system._storedValue = this;
104
+ particleSystem.canStart = () => {
105
+ return !this.doNoStart;
106
+ };
107
+ particleSystem.onStartedObservable.add((system) => {
108
+ // Triggers
109
+ const onStartSystem = this.onStart.getConnectedValue(state);
110
+ if (onStartSystem) {
111
+ system.onStartedObservable.addOnce(() => {
112
+ state.systemContext = particleSystem;
113
+ const clone = _TriggerSubEmitter(onStartSystem, state.scene, state.emitterPosition);
114
+ this.onDisposeObservable.addOnce(() => {
115
+ // Clean up the cloned system when the original system is disposed
116
+ clone.dispose();
117
+ });
118
+ });
119
+ }
120
+ const onEndSystem = this.onEnd.getConnectedValue(state);
121
+ if (onEndSystem) {
122
+ system.onStoppedObservable.addOnce(() => {
123
+ state.systemContext = particleSystem;
124
+ const clone = _TriggerSubEmitter(onEndSystem, state.scene, state.emitterPosition);
125
+ this.onDisposeObservable.addOnce(() => {
126
+ // Clean up the cloned system when the original system is disposed
127
+ clone.dispose();
128
+ });
129
+ });
130
+ }
131
+ });
132
+ this.onDisposeObservable.addOnce(() => {
133
+ particleSystem.dispose();
134
+ });
135
+ // Return
136
+ return particleSystem;
137
+ }
138
+ serialize() {
139
+ const serializationObject = super.serialize();
140
+ serializationObject.capacity = this.capacity;
141
+ serializationObject.emitRate = this.emitRate;
142
+ serializationObject.blendMode = this.blendMode;
143
+ serializationObject.doNoStart = this.doNoStart;
144
+ serializationObject.targetStopDuration = this.targetStopDuration;
145
+ serializationObject.startDelay = this.startDelay;
146
+ return serializationObject;
147
+ }
148
+ _deserialize(serializationObject) {
149
+ super._deserialize(serializationObject);
150
+ this.capacity = serializationObject.capacity;
151
+ this.emitRate = serializationObject.emitRate;
152
+ this.doNoStart = !!serializationObject.doNoStart;
153
+ if (serializationObject.blendMode !== undefined) {
154
+ this.blendMode = serializationObject.blendMode;
155
+ }
156
+ if (serializationObject.targetStopDuration !== undefined) {
157
+ this.targetStopDuration = serializationObject.targetStopDuration;
158
+ }
159
+ if (serializationObject.startDelay !== undefined) {
160
+ this.startDelay = serializationObject.startDelay;
161
+ }
162
+ }
163
+ }
164
+ __decorate([
165
+ editableInPropertyPage("Blend mode", 4 /* PropertyTypeForEdition.List */, "ADVANCED", {
166
+ notifiers: { rebuild: true },
167
+ embedded: true,
168
+ options: [
169
+ { label: "OneOne", value: BaseParticleSystem.BLENDMODE_ONEONE },
170
+ { label: "Standard", value: BaseParticleSystem.BLENDMODE_STANDARD },
171
+ { label: "Add", value: BaseParticleSystem.BLENDMODE_ADD },
172
+ { label: "Multiply", value: BaseParticleSystem.BLENDMODE_MULTIPLY },
173
+ { label: "MultiplyAdd", value: BaseParticleSystem.BLENDMODE_MULTIPLYADD },
174
+ ],
175
+ })
176
+ ], SystemBlock.prototype, "blendMode", void 0);
177
+ __decorate([
178
+ editableInPropertyPage("Capacity", 2 /* PropertyTypeForEdition.Int */, "ADVANCED", { embedded: true, notifiers: { rebuild: true }, min: 0, max: 10000 })
179
+ ], SystemBlock.prototype, "capacity", void 0);
180
+ __decorate([
181
+ editableInPropertyPage("Emit rate", 2 /* PropertyTypeForEdition.Int */, "ADVANCED", { embedded: true, notifiers: { rebuild: true }, min: 0 })
182
+ ], SystemBlock.prototype, "emitRate", void 0);
183
+ __decorate([
184
+ editableInPropertyPage("Target duration", 1 /* PropertyTypeForEdition.Float */, "ADVANCED", { embedded: true, notifiers: { rebuild: true }, min: 0 })
185
+ ], SystemBlock.prototype, "targetStopDuration", void 0);
186
+ __decorate([
187
+ editableInPropertyPage("Delay start(ms)", 1 /* PropertyTypeForEdition.Float */, "ADVANCED", { embedded: true, notifiers: { rebuild: true }, min: 0 })
188
+ ], SystemBlock.prototype, "startDelay", void 0);
189
+ __decorate([
190
+ editableInPropertyPage("Do no start", 0 /* PropertyTypeForEdition.Boolean */, "ADVANCED", { embedded: true, notifiers: { rebuild: true } })
191
+ ], SystemBlock.prototype, "doNoStart", void 0);
192
+ RegisterClass("BABYLON.SystemBlock", SystemBlock);
193
+ //# sourceMappingURL=systemBlock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"systemBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Particles/Node/Blocks/systemBlock.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,gDAAgD,CAAC;AACvG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD,OAAO,EAAE,sBAAsB,EAA0B,6CAAsC;AAC/F,OAAO,EAAE,kBAAkB,EAAE,oCAA0C;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,iBAAiB;IA+C9C;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAnDhB;;WAEG;QAYI,cAAS,GAAG,kBAAkB,CAAC,gBAAgB,CAAC;QAEvD;;WAEG;QAEI,aAAQ,GAAG,IAAI,CAAC;QAEvB;;WAEG;QAEI,aAAQ,GAAG,EAAE,CAAC;QAErB;;WAEG;QAEI,uBAAkB,GAAG,CAAC,CAAC;QAE9B;;WAEG;QAEI,eAAU,GAAG,CAAC,CAAC;QAEtB;;WAEG;QAEI,cAAS,GAAG,KAAK,CAAC;QASrB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QAEtB,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,qCAAqC,CAAC,QAAQ,CAAC,CAAC;QAC/E,IAAI,CAAC,aAAa,CAAC,S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,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;6CACjH;AAMd;IADN,sBAAsB,CAAC,iBAAiB,wCAAgC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;uDAChH;AAMvB;IADN,sBAAsB,CAAC,iBAAiB,wCAAgC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;+CACxH;AAMf;IADN,sBAAsB,CAAC,aAAa,0CAAkC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC;8CAC3G;AA8J7B,aAAa,CAAC,qBAAqB,EAAE,WAAW,CAAC,CAAC","sourcesContent":["import type { ParticleSystem } from \"core/Particles/particleSystem\";\r\nimport { 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 { editableInPropertyPage, PropertyTypeForEdition } from \"core/Decorators/nodeDecorator\";\r\nimport { BaseParticleSystem } from \"core/Particles/baseParticleSystem\";\r\nimport { _TriggerSubEmitter } from \"./Triggers/triggerTools\";\r\n\r\n/**\r\n * Block used to get a system of particles\r\n */\r\nexport class SystemBlock extends NodeParticleBlock {\r\n /**\r\n * Gets or sets the blend mode for the particle system\r\n */\r\n @editableInPropertyPage(\"Blend mode\", PropertyTypeForEdition.List, \"ADVANCED\", {\r\n notifiers: { rebuild: true },\r\n embedded: true,\r\n options: [\r\n { label: \"OneOne\", value: BaseParticleSystem.BLENDMODE_ONEONE },\r\n { label: \"Standard\", value: BaseParticleSystem.BLENDMODE_STANDARD },\r\n { label: \"Add\", value: BaseParticleSystem.BLENDMODE_ADD },\r\n { label: \"Multiply\", value: BaseParticleSystem.BLENDMODE_MULTIPLY },\r\n { label: \"MultiplyAdd\", value: BaseParticleSystem.BLENDMODE_MULTIPLYADD },\r\n ],\r\n })\r\n public blendMode = BaseParticleSystem.BLENDMODE_ONEONE;\r\n\r\n /**\r\n * Gets or sets the epsilon value used for comparison\r\n */\r\n @editableInPropertyPage(\"Capacity\", PropertyTypeForEdition.Int, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true }, min: 0, max: 10000 })\r\n public capacity = 1000;\r\n\r\n /**\r\n * Gets or sets the emit rate\r\n */\r\n @editableInPropertyPage(\"Emit rate\", PropertyTypeForEdition.Int, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true }, min: 0 })\r\n public emitRate = 10;\r\n\r\n /**\r\n * Gets or sets the target stop duration for the particle system\r\n */\r\n @editableInPropertyPage(\"Target duration\", PropertyTypeForEdition.Float, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true }, min: 0 })\r\n public targetStopDuration = 0;\r\n\r\n /**\r\n * Gets or sets the target stop duration for the particle system\r\n */\r\n @editableInPropertyPage(\"Delay start(ms)\", PropertyTypeForEdition.Float, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true }, min: 0 })\r\n public startDelay = 0;\r\n\r\n /**\r\n * Gets or sets a boolean indicating if the system should not start automatically\r\n */\r\n @editableInPropertyPage(\"Do no start\", PropertyTypeForEdition.Boolean, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true } })\r\n public doNoStart = false;\r\n\r\n /**\r\n * Create a new SystemBlock\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._isSystem = true;\r\n\r\n this.registerInput(\"particle\", NodeParticleBlockConnectionPointTypes.Particle);\r\n this.registerInput(\"texture\", NodeParticleBlockConnectionPointTypes.Texture);\r\n this.registerInput(\"onStart\", NodeParticleBlockConnectionPointTypes.System, true);\r\n this.registerInput(\"onEnd\", NodeParticleBlockConnectionPointTypes.System, true);\r\n this.registerOutput(\"system\", NodeParticleBlockConnectionPointTypes.System);\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 \"SystemBlock\";\r\n }\r\n\r\n /**\r\n * Gets the particle input 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 texture input component\r\n */\r\n public get texture(): NodeParticleConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the onStart input component\r\n */\r\n public get onStart(): NodeParticleConnectionPoint {\r\n return this._inputs[2];\r\n }\r\n\r\n /**\r\n * Gets the onEnd input component\r\n */\r\n public get onEnd(): NodeParticleConnectionPoint {\r\n return this._inputs[3];\r\n }\r\n\r\n /**\r\n * Gets the system output component\r\n */\r\n public get system(): NodeParticleConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Builds the block and return a functional particle system\r\n * @param state defines the building state\r\n * @returns the built particle system\r\n */\r\n public createSystem(state: NodeParticleBuildState): ParticleSystem {\r\n state.capacity = this.capacity;\r\n state.buildId = this._buildId++;\r\n\r\n this.build(state);\r\n\r\n const particleSystem = this.particle.getConnectedValue(state) as ParticleSystem;\r\n particleSystem.particleTexture = this.texture.getConnectedValue(state);\r\n particleSystem.emitRate = this.emitRate;\r\n particleSystem.blendMode = this.blendMode;\r\n particleSystem.name = this.name;\r\n particleSystem._nodeGenerated = true;\r\n particleSystem._targetStopDuration = this.targetStopDuration;\r\n particleSystem.startDelay = this.startDelay;\r\n\r\n this.system._storedValue = this;\r\n\r\n particleSystem.canStart = () => {\r\n return !this.doNoStart;\r\n };\r\n\r\n particleSystem.onStartedObservable.add((system) => {\r\n // Triggers\r\n const onStartSystem = this.onStart.getConnectedValue(state);\r\n if (onStartSystem) {\r\n system.onStartedObservable.addOnce(() => {\r\n state.systemContext = particleSystem;\r\n const clone = _TriggerSubEmitter(onStartSystem, state.scene, state.emitterPosition!);\r\n\r\n this.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 const onEndSystem = this.onEnd.getConnectedValue(state);\r\n if (onEndSystem) {\r\n system.onStoppedObservable.addOnce(() => {\r\n state.systemContext = particleSystem;\r\n const clone = _TriggerSubEmitter(onEndSystem, state.scene, state.emitterPosition!);\r\n\r\n this.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 this.onDisposeObservable.addOnce(() => {\r\n particleSystem.dispose();\r\n });\r\n\r\n // Return\r\n return particleSystem;\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.capacity = this.capacity;\r\n serializationObject.emitRate = this.emitRate;\r\n serializationObject.blendMode = this.blendMode;\r\n serializationObject.doNoStart = this.doNoStart;\r\n serializationObject.targetStopDuration = this.targetStopDuration;\r\n serializationObject.startDelay = this.startDelay;\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.capacity = serializationObject.capacity;\r\n this.emitRate = serializationObject.emitRate;\r\n this.doNoStart = !!serializationObject.doNoStart;\r\n\r\n if (serializationObject.blendMode !== undefined) {\r\n this.blendMode = serializationObject.blendMode;\r\n }\r\n\r\n if (serializationObject.targetStopDuration !== undefined) {\r\n this.targetStopDuration = serializationObject.targetStopDuration;\r\n }\r\n\r\n if (serializationObject.startDelay !== undefined) {\r\n this.startDelay = serializationObject.startDelay;\r\n }\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.SystemBlock\", SystemBlock);\r\n"]}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Defines the kind of connection point for node geometry
3
+ */
4
+ export declare enum NodeParticleBlockConnectionPointTypes {
5
+ /** Int */
6
+ Int = 1,
7
+ /** Float */
8
+ Float = 2,
9
+ /** Vector2 */
10
+ Vector2 = 4,
11
+ /** Vector3 */
12
+ Vector3 = 8,
13
+ /** Matrix */
14
+ Matrix = 16,
15
+ /** Particle */
16
+ Particle = 32,
17
+ /** Texture */
18
+ Texture = 64,
19
+ /** Color4 */
20
+ Color4 = 128,
21
+ /** FloatGradient */
22
+ FloatGradient = 256,
23
+ /** Vector2Gradient */
24
+ Vector2Gradient = 512,
25
+ /** Vector3Gradient */
26
+ Vector3Gradient = 1024,
27
+ /** Color4Gradient */
28
+ Color4Gradient = 2048,
29
+ /** System */
30
+ System = 4096,
31
+ /** Detect type based on connection */
32
+ AutoDetect = 8192,
33
+ /** Output type that will be defined by input type */
34
+ BasedOnInput = 16384,
35
+ /** Undefined */
36
+ Undefined = 32768,
37
+ /** Bitmask of all types */
38
+ All = 65535
39
+ }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Defines the kind of connection point for node geometry
3
+ */
4
+ export var NodeParticleBlockConnectionPointTypes;
5
+ (function (NodeParticleBlockConnectionPointTypes) {
6
+ /** Int */
7
+ NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Int"] = 1] = "Int";
8
+ /** Float */
9
+ NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Float"] = 2] = "Float";
10
+ /** Vector2 */
11
+ NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Vector2"] = 4] = "Vector2";
12
+ /** Vector3 */
13
+ NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Vector3"] = 8] = "Vector3";
14
+ /** Matrix */
15
+ NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Matrix"] = 16] = "Matrix";
16
+ /** Particle */
17
+ NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Particle"] = 32] = "Particle";
18
+ /** Texture */
19
+ NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Texture"] = 64] = "Texture";
20
+ /** Color4 */
21
+ NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Color4"] = 128] = "Color4";
22
+ /** FloatGradient */
23
+ NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["FloatGradient"] = 256] = "FloatGradient";
24
+ /** Vector2Gradient */
25
+ NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Vector2Gradient"] = 512] = "Vector2Gradient";
26
+ /** Vector3Gradient */
27
+ NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Vector3Gradient"] = 1024] = "Vector3Gradient";
28
+ /** Color4Gradient */
29
+ NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Color4Gradient"] = 2048] = "Color4Gradient";
30
+ /** System */
31
+ NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["System"] = 4096] = "System";
32
+ /** Detect type based on connection */
33
+ NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["AutoDetect"] = 8192] = "AutoDetect";
34
+ /** Output type that will be defined by input type */
35
+ NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["BasedOnInput"] = 16384] = "BasedOnInput";
36
+ /** Undefined */
37
+ NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Undefined"] = 32768] = "Undefined";
38
+ /** Bitmask of all types */
39
+ NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["All"] = 65535] = "All";
40
+ })(NodeParticleBlockConnectionPointTypes || (NodeParticleBlockConnectionPointTypes = {}));
41
+ //# sourceMappingURL=nodeParticleBlockConnectionPointTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nodeParticleBlockConnectionPointTypes.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Particles/Node/Enums/nodeParticleBlockConnectionPointTypes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,qCAmCX;AAnCD,WAAY,qCAAqC;IAC7C,UAAU;IACV,+FAAY,CAAA;IACZ,YAAY;IACZ,mGAAc,CAAA;IACd,cAAc;IACd,uGAAgB,CAAA;IAChB,cAAc;IACd,uGAAgB,CAAA;IAChB,aAAa;IACb,sGAAe,CAAA;IACf,eAAe;IACf,0GAAiB,CAAA;IACjB,cAAc;IACd,wGAAgB,CAAA;IAChB,aAAa;IACb,uGAAe,CAAA;IACf,oBAAoB;IACpB,qHAAsB,CAAA;IACtB,sBAAsB;IACtB,yHAAwB,CAAA;IACxB,sBAAsB;IACtB,0HAAwB,CAAA;IACxB,qBAAqB;IACrB,wHAAuB,CAAA;IACvB,aAAa;IACb,wGAAe,CAAA;IACf,sCAAsC;IACtC,gHAAmB,CAAA;IACnB,qDAAqD;IACrD,qHAAqB,CAAA;IACrB,gBAAgB;IAChB,+GAAkB,CAAA;IAClB,2BAA2B;IAC3B,mGAAY,CAAA;AAChB,CAAC,EAnCW,qCAAqC,KAArC,qCAAqC,QAmChD","sourcesContent":["/**\r\n * Defines the kind of connection point for node geometry\r\n */\r\nexport enum NodeParticleBlockConnectionPointTypes {\r\n /** Int */\r\n Int = 0x0001,\r\n /** Float */\r\n Float = 0x0002,\r\n /** Vector2 */\r\n Vector2 = 0x0004,\r\n /** Vector3 */\r\n Vector3 = 0x0008,\r\n /** Matrix */\r\n Matrix = 0x0010,\r\n /** Particle */\r\n Particle = 0x0020,\r\n /** Texture */\r\n Texture = 0x0040,\r\n /** Color4 */\r\n Color4 = 0x0080,\r\n /** FloatGradient */\r\n FloatGradient = 0x0100,\r\n /** Vector2Gradient */\r\n Vector2Gradient = 0x0200,\r\n /** Vector3Gradient */\r\n Vector3Gradient = 0x0400,\r\n /** Color4Gradient */\r\n Color4Gradient = 0x0800,\r\n /** System */\r\n System = 0x1000,\r\n /** Detect type based on connection */\r\n AutoDetect = 0x2000,\r\n /** Output type that will be defined by input type */\r\n BasedOnInput = 0x4000,\r\n /** Undefined */\r\n Undefined = 0x8000,\r\n /** Bitmask of all types */\r\n All = 0xffff,\r\n}\r\n"]}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Defines the kind of contextual sources for node particles
3
+ */
4
+ export declare enum NodeParticleContextualSources {
5
+ /** None */
6
+ None = 0,
7
+ /** Position */
8
+ Position = 1,
9
+ /** Direction */
10
+ Direction = 2,
11
+ /** Age */
12
+ Age = 3,
13
+ /** Lifetime */
14
+ Lifetime = 4,
15
+ /** Color */
16
+ Color = 5,
17
+ /** ScaledDirection */
18
+ ScaledDirection = 6,
19
+ /** Scale */
20
+ Scale = 7,
21
+ /** AgeGradient */
22
+ AgeGradient = 8,
23
+ /** Angle */
24
+ Angle = 9,
25
+ /** SpriteCellIndex */
26
+ SpriteCellIndex = 16,
27
+ /** SpriteCellStart */
28
+ SpriteCellStart = 17,
29
+ /** SpriteCellEnd */
30
+ SpriteCellEnd = 18
31
+ }
@@ -0,0 +1,34 @@
1
+ /* eslint-disable @typescript-eslint/naming-convention */
2
+ /**
3
+ * Defines the kind of contextual sources for node particles
4
+ */
5
+ export var NodeParticleContextualSources;
6
+ (function (NodeParticleContextualSources) {
7
+ /** None */
8
+ NodeParticleContextualSources[NodeParticleContextualSources["None"] = 0] = "None";
9
+ /** Position */
10
+ NodeParticleContextualSources[NodeParticleContextualSources["Position"] = 1] = "Position";
11
+ /** Direction */
12
+ NodeParticleContextualSources[NodeParticleContextualSources["Direction"] = 2] = "Direction";
13
+ /** Age */
14
+ NodeParticleContextualSources[NodeParticleContextualSources["Age"] = 3] = "Age";
15
+ /** Lifetime */
16
+ NodeParticleContextualSources[NodeParticleContextualSources["Lifetime"] = 4] = "Lifetime";
17
+ /** Color */
18
+ NodeParticleContextualSources[NodeParticleContextualSources["Color"] = 5] = "Color";
19
+ /** ScaledDirection */
20
+ NodeParticleContextualSources[NodeParticleContextualSources["ScaledDirection"] = 6] = "ScaledDirection";
21
+ /** Scale */
22
+ NodeParticleContextualSources[NodeParticleContextualSources["Scale"] = 7] = "Scale";
23
+ /** AgeGradient */
24
+ NodeParticleContextualSources[NodeParticleContextualSources["AgeGradient"] = 8] = "AgeGradient";
25
+ /** Angle */
26
+ NodeParticleContextualSources[NodeParticleContextualSources["Angle"] = 9] = "Angle";
27
+ /** SpriteCellIndex */
28
+ NodeParticleContextualSources[NodeParticleContextualSources["SpriteCellIndex"] = 16] = "SpriteCellIndex";
29
+ /** SpriteCellStart */
30
+ NodeParticleContextualSources[NodeParticleContextualSources["SpriteCellStart"] = 17] = "SpriteCellStart";
31
+ /** SpriteCellEnd */
32
+ NodeParticleContextualSources[NodeParticleContextualSources["SpriteCellEnd"] = 18] = "SpriteCellEnd";
33
+ })(NodeParticleContextualSources || (NodeParticleContextualSources = {}));
34
+ //# sourceMappingURL=nodeParticleContextualSources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nodeParticleContextualSources.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Particles/Node/Enums/nodeParticleContextualSources.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD;;GAEG;AACH,MAAM,CAAN,IAAY,6BA2BX;AA3BD,WAAY,6BAA6B;IACrC,WAAW;IACX,iFAAa,CAAA;IACb,eAAe;IACf,yFAAiB,CAAA;IACjB,gBAAgB;IAChB,2FAAkB,CAAA;IAClB,UAAU;IACV,+EAAY,CAAA;IACZ,eAAe;IACf,yFAAiB,CAAA;IACjB,YAAY;IACZ,mFAAc,CAAA;IACd,sBAAsB;IACtB,uGAAwB,CAAA;IACxB,YAAY;IACZ,mFAAc,CAAA;IACd,kBAAkB;IAClB,+FAAoB,CAAA;IACpB,YAAY;IACZ,mFAAc,CAAA;IACd,sBAAsB;IACtB,wGAAwB,CAAA;IACxB,sBAAsB;IACtB,wGAAwB,CAAA;IACxB,oBAAoB;IACpB,oGAAsB,CAAA;AAC1B,CAAC,EA3BW,6BAA6B,KAA7B,6BAA6B,QA2BxC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\n/**\r\n * Defines the kind of contextual sources for node particles\r\n */\r\nexport enum NodeParticleContextualSources {\r\n /** None */\r\n None = 0x0000,\r\n /** Position */\r\n Position = 0x0001,\r\n /** Direction */\r\n Direction = 0x0002,\r\n /** Age */\r\n Age = 0x0003,\r\n /** Lifetime */\r\n Lifetime = 0x0004,\r\n /** Color */\r\n Color = 0x0005,\r\n /** ScaledDirection */\r\n ScaledDirection = 0x0006,\r\n /** Scale */\r\n Scale = 0x0007,\r\n /** AgeGradient */\r\n AgeGradient = 0x0008,\r\n /** Angle */\r\n Angle = 0x0009,\r\n /** SpriteCellIndex */\r\n SpriteCellIndex = 0x0010,\r\n /** SpriteCellStart */\r\n SpriteCellStart = 0x0011,\r\n /** SpriteCellEnd */\r\n SpriteCellEnd = 0x0012,\r\n}\r\n"]}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Enum used to define system values e.g. values automatically provided by the system
3
+ */
4
+ export declare enum NodeParticleSystemSources {
5
+ /** None */
6
+ None = 0,
7
+ /** Time */
8
+ Time = 1,
9
+ /** Delta time */
10
+ Delta = 2,
11
+ /** Emitter */
12
+ Emitter = 3
13
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Enum used to define system values e.g. values automatically provided by the system
3
+ */
4
+ export var NodeParticleSystemSources;
5
+ (function (NodeParticleSystemSources) {
6
+ /** None */
7
+ NodeParticleSystemSources[NodeParticleSystemSources["None"] = 0] = "None";
8
+ /** Time */
9
+ NodeParticleSystemSources[NodeParticleSystemSources["Time"] = 1] = "Time";
10
+ /** Delta time */
11
+ NodeParticleSystemSources[NodeParticleSystemSources["Delta"] = 2] = "Delta";
12
+ /** Emitter */
13
+ NodeParticleSystemSources[NodeParticleSystemSources["Emitter"] = 3] = "Emitter";
14
+ })(NodeParticleSystemSources || (NodeParticleSystemSources = {}));
15
+ //# sourceMappingURL=nodeParticleSystemSources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nodeParticleSystemSources.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Particles/Node/Enums/nodeParticleSystemSources.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,yBASX;AATD,WAAY,yBAAyB;IACjC,WAAW;IACX,yEAAQ,CAAA;IACR,WAAW;IACX,yEAAQ,CAAA;IACR,iBAAiB;IACjB,2EAAS,CAAA;IACT,cAAc;IACd,+EAAW,CAAA;AACf,CAAC,EATW,yBAAyB,KAAzB,yBAAyB,QASpC","sourcesContent":["/**\r\n * Enum used to define system values e.g. values automatically provided by the system\r\n */\r\nexport enum NodeParticleSystemSources {\r\n /** None */\r\n None = 0,\r\n /** Time */\r\n Time = 1,\r\n /** Delta time */\r\n Delta = 2,\r\n /** Emitter */\r\n Emitter = 3,\r\n}\r\n"]}
@@ -0,0 +1,8 @@
1
+ export * from "./nodeParticleBlock.js";
2
+ export * from "./nodeParticleSystemSet.js";
3
+ export * from "./nodeParticleBlockConnectionPoint.js";
4
+ export * from "./nodeParticleBuildState.js";
5
+ export * from "./Enums/nodeParticleBlockConnectionPointTypes.js";
6
+ export * from "./Enums/nodeParticleContextualSources.js";
7
+ export * from "./Enums/nodeParticleSystemSources.js";
8
+ export * from "./Blocks/index.js";
@@ -0,0 +1,10 @@
1
+ /* eslint-disable import/no-internal-modules */
2
+ export * from "./nodeParticleBlock.js";
3
+ export * from "./nodeParticleSystemSet.js";
4
+ export * from "./nodeParticleBlockConnectionPoint.js";
5
+ export * from "./nodeParticleBuildState.js";
6
+ export * from "./Enums/nodeParticleBlockConnectionPointTypes.js";
7
+ export * from "./Enums/nodeParticleContextualSources.js";
8
+ export * from "./Enums/nodeParticleSystemSources.js";
9
+ export * from "./Blocks/index.js";
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../dev/core/src/Particles/Node/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,gBAAgB,CAAC","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nexport * from \"./nodeParticleBlock\";\r\nexport * from \"./nodeParticleSystemSet\";\r\nexport * from \"./nodeParticleBlockConnectionPoint\";\r\nexport * from \"./nodeParticleBuildState\";\r\nexport * from \"./Enums/nodeParticleBlockConnectionPointTypes\";\r\nexport * from \"./Enums/nodeParticleContextualSources\";\r\nexport * from \"./Enums/nodeParticleSystemSources\";\r\nexport * from \"./Blocks/index\";\r\n"]}
@@ -0,0 +1,154 @@
1
+ import { NodeParticleConnectionPoint } from "./nodeParticleBlockConnectionPoint.js";
2
+ import type { NodeParticleBlockConnectionPointTypes } from "./Enums/nodeParticleBlockConnectionPointTypes.js";
3
+ import type { NodeParticleBuildState } from "./nodeParticleBuildState.js";
4
+ import { Observable } from "../../Misc/observable.js";
5
+ /**
6
+ * Defines a block that can be used inside a node based particle system
7
+ */
8
+ export declare class NodeParticleBlock {
9
+ private _name;
10
+ protected _buildId: number;
11
+ protected _isInput: boolean;
12
+ protected _isSystem: boolean;
13
+ protected _isDebug: boolean;
14
+ protected _isTeleportOut: boolean;
15
+ protected _isTeleportIn: boolean;
16
+ /**
17
+ * Gets or sets the unique id of the node
18
+ */
19
+ uniqueId: number;
20
+ /** @internal */
21
+ _inputs: NodeParticleConnectionPoint[];
22
+ /** @internal */
23
+ _outputs: NodeParticleConnectionPoint[];
24
+ /**
25
+ * Gets an observable raised when the block is built
26
+ */
27
+ onBuildObservable: Observable<NodeParticleBlock>;
28
+ /**
29
+ * Gets an observable raised when the block is disposed
30
+ */
31
+ onDisposeObservable: Observable<NodeParticleBlock>;
32
+ /**
33
+ * Gets an observable raised when the inputs of the block change
34
+ */
35
+ onInputChangedObservable: Observable<NodeParticleConnectionPoint>;
36
+ /**
37
+ * Gets a boolean indicating if this block is a teleport out
38
+ */
39
+ get isTeleportOut(): boolean;
40
+ /**
41
+ * Gets a boolean indicating if this block is a teleport in
42
+ */
43
+ get isTeleportIn(): boolean;
44
+ /**
45
+ * Gets a boolean indicating that this block is a system block
46
+ */
47
+ get isSystem(): boolean;
48
+ /**
49
+ * Gets a boolean indicating that this block is an input block
50
+ */
51
+ get isInput(): boolean;
52
+ /**
53
+ * Gets a boolean indicating if this block is a debug block
54
+ */
55
+ get isDebug(): boolean;
56
+ /**
57
+ * A free comment about the block
58
+ */
59
+ comments: string;
60
+ /** Gets or sets a boolean indicating that this input can be edited from a collapsed frame */
61
+ visibleOnFrame: boolean;
62
+ /**
63
+ * Gets or set the name of the block
64
+ */
65
+ get name(): string;
66
+ set name(value: string);
67
+ /**
68
+ * Gets the current class name e.g. "NodeParticleBlock"
69
+ * @returns the class name
70
+ */
71
+ getClassName(): string;
72
+ /**
73
+ * Gets the list of input points
74
+ */
75
+ get inputs(): NodeParticleConnectionPoint[];
76
+ /** Gets the list of output points */
77
+ get outputs(): NodeParticleConnectionPoint[];
78
+ /**
79
+ * Creates a new NodeParticleBlock
80
+ * @param name defines the block name
81
+ */
82
+ constructor(name: string);
83
+ protected _inputRename(name: string): string;
84
+ protected _outputRename(name: string): string;
85
+ /**
86
+ * Checks if the current block is an ancestor of a given block
87
+ * @param block defines the potential descendant block to check
88
+ * @returns true if block is a descendant
89
+ */
90
+ isAnAncestorOf(block: NodeParticleBlock): boolean;
91
+ /**
92
+ * Checks if the current block is an ancestor of a given type
93
+ * @param type defines the potential type to check
94
+ * @returns true if block is a descendant
95
+ */
96
+ isAnAncestorOfType(type: string): boolean;
97
+ /**
98
+ * Find an input by its name
99
+ * @param name defines the name of the input to look for
100
+ * @returns the input or null if not found
101
+ */
102
+ getInputByName(name: string): NodeParticleConnectionPoint | null;
103
+ protected _linkConnectionTypes(inputIndex0: number, inputIndex1: number, looseCoupling?: boolean): void;
104
+ /**
105
+ * Register a new input. Must be called inside a block constructor
106
+ * @param name defines the connection point name
107
+ * @param type defines the connection point type
108
+ * @param isOptional defines a boolean indicating that this input can be omitted
109
+ * @param value value to return if there is no connection
110
+ * @param valueMin min value accepted for value
111
+ * @param valueMax max value accepted for value
112
+ * @returns the current block
113
+ */
114
+ registerInput(name: string, type: NodeParticleBlockConnectionPointTypes, isOptional?: boolean, value?: any, valueMin?: any, valueMax?: any): this;
115
+ /**
116
+ * Register a new output. Must be called inside a block constructor
117
+ * @param name defines the connection point name
118
+ * @param type defines the connection point type
119
+ * @param point an already created connection point. If not provided, create a new one
120
+ * @returns the current block
121
+ */
122
+ registerOutput(name: string, type: NodeParticleBlockConnectionPointTypes, point?: NodeParticleConnectionPoint): this;
123
+ /**
124
+ * Builds the block. Must be implemented by derived classes.
125
+ * @param _state defines the current build state
126
+ */
127
+ _build(_state: NodeParticleBuildState): void;
128
+ protected _customBuildStep(_state: NodeParticleBuildState): void;
129
+ /**
130
+ * Builds the block
131
+ * @param state defines the current build state
132
+ * @returns the built block
133
+ */
134
+ build(state: NodeParticleBuildState): boolean;
135
+ /**
136
+ * Serializes this block in a JSON representation
137
+ * @returns the serialized block object
138
+ */
139
+ serialize(): any;
140
+ /**
141
+ * @internal
142
+ */
143
+ _deserialize(serializationObject: any): void;
144
+ private _deserializePortDisplayNamesAndExposedOnFrame;
145
+ /**
146
+ * Clone the current block to a new identical block
147
+ * @returns a copy of the current block
148
+ */
149
+ clone(): NodeParticleBlock | null;
150
+ /**
151
+ * Release resources
152
+ */
153
+ dispose(): void;
154
+ }