@babylonjs/core 6.19.0 → 6.20.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 (253) hide show
  1. package/Actions/actionManager.js +2 -2
  2. package/Actions/actionManager.js.map +1 -1
  3. package/Animations/runtimeAnimation.js +2 -2
  4. package/Animations/runtimeAnimation.js.map +1 -1
  5. package/Cameras/Inputs/BaseCameraPointersInput.d.ts +4 -4
  6. package/Cameras/Inputs/BaseCameraPointersInput.js +4 -6
  7. package/Cameras/Inputs/BaseCameraPointersInput.js.map +1 -1
  8. package/Cameras/Inputs/arcRotateCameraPointersInput.d.ts +3 -2
  9. package/Cameras/Inputs/arcRotateCameraPointersInput.js +3 -2
  10. package/Cameras/Inputs/arcRotateCameraPointersInput.js.map +1 -1
  11. package/Cameras/Inputs/flyCameraMouseInput.js +2 -7
  12. package/Cameras/Inputs/flyCameraMouseInput.js.map +1 -1
  13. package/Cameras/Inputs/freeCameraKeyboardMoveInput.js +2 -7
  14. package/Cameras/Inputs/freeCameraKeyboardMoveInput.js.map +1 -1
  15. package/Cameras/Inputs/freeCameraMouseInput.js +4 -14
  16. package/Cameras/Inputs/freeCameraMouseInput.js.map +1 -1
  17. package/Cameras/Inputs/freeCameraTouchInput.js +2 -1
  18. package/Cameras/Inputs/freeCameraTouchInput.js.map +1 -1
  19. package/Cameras/arcRotateCamera.js +2 -7
  20. package/Cameras/arcRotateCamera.js.map +1 -1
  21. package/Cameras/camera.d.ts +2 -0
  22. package/Cameras/camera.js +8 -0
  23. package/Cameras/camera.js.map +1 -1
  24. package/Compute/computeShader.d.ts +15 -0
  25. package/Compute/computeShader.js +39 -0
  26. package/Compute/computeShader.js.map +1 -1
  27. package/Debug/physicsViewer.d.ts +33 -0
  28. package/Debug/physicsViewer.js +205 -0
  29. package/Debug/physicsViewer.js.map +1 -1
  30. package/Engines/Extensions/engine.computeShader.d.ts +2 -1
  31. package/Engines/Extensions/engine.computeShader.js +1 -0
  32. package/Engines/Extensions/engine.computeShader.js.map +1 -1
  33. package/Engines/WebGPU/webgpuComputeContext.js +15 -0
  34. package/Engines/WebGPU/webgpuComputeContext.js.map +1 -1
  35. package/Engines/thinEngine.js +2 -2
  36. package/Engines/thinEngine.js.map +1 -1
  37. package/FlowGraph/Blocks/Data/flowGraphAddBlock.d.ts +23 -0
  38. package/FlowGraph/Blocks/Data/flowGraphAddBlock.js +18 -0
  39. package/FlowGraph/Blocks/Data/flowGraphAddBlock.js.map +1 -0
  40. package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.d.ts +30 -0
  41. package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.js +22 -0
  42. package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.js.map +1 -0
  43. package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.d.ts +33 -0
  44. package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js +30 -0
  45. package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js.map +1 -0
  46. package/FlowGraph/Blocks/Data/index.d.ts +3 -1
  47. package/FlowGraph/Blocks/Data/index.js +3 -1
  48. package/FlowGraph/Blocks/Data/index.js.map +1 -1
  49. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.d.ts +12 -10
  50. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js +25 -29
  51. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js.map +1 -1
  52. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.d.ts +25 -0
  53. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js +31 -0
  54. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js.map +1 -0
  55. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.d.ts +3 -7
  56. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js +11 -11
  57. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js.map +1 -1
  58. package/FlowGraph/Blocks/Event/index.d.ts +1 -0
  59. package/FlowGraph/Blocks/Event/index.js +1 -0
  60. package/FlowGraph/Blocks/Event/index.js.map +1 -1
  61. package/FlowGraph/Blocks/Execution/flowGraphConditionalBlock.d.ts +24 -0
  62. package/FlowGraph/Blocks/Execution/flowGraphConditionalBlock.js +23 -0
  63. package/FlowGraph/Blocks/Execution/flowGraphConditionalBlock.js.map +1 -0
  64. package/FlowGraph/Blocks/Execution/flowGraphForLoopBlock.d.ts +10 -13
  65. package/FlowGraph/Blocks/Execution/flowGraphForLoopBlock.js +28 -22
  66. package/FlowGraph/Blocks/Execution/flowGraphForLoopBlock.js.map +1 -1
  67. package/FlowGraph/Blocks/Execution/flowGraphLogBlock.d.ts +5 -5
  68. package/FlowGraph/Blocks/Execution/flowGraphLogBlock.js +8 -6
  69. package/FlowGraph/Blocks/Execution/flowGraphLogBlock.js.map +1 -1
  70. package/FlowGraph/Blocks/Execution/flowGraphPlayAnimationBlock.d.ts +56 -0
  71. package/FlowGraph/Blocks/Execution/flowGraphPlayAnimationBlock.js +66 -0
  72. package/FlowGraph/Blocks/Execution/flowGraphPlayAnimationBlock.js.map +1 -0
  73. package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.d.ts +18 -0
  74. package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js +19 -0
  75. package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js.map +1 -0
  76. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.d.ts +26 -0
  77. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js +36 -0
  78. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js.map +1 -0
  79. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.d.ts +23 -0
  80. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js +25 -0
  81. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js.map +1 -0
  82. package/FlowGraph/Blocks/Execution/flowGraphStopAnimationBlock.d.ts +16 -0
  83. package/FlowGraph/Blocks/Execution/flowGraphStopAnimationBlock.js +18 -0
  84. package/FlowGraph/Blocks/Execution/flowGraphStopAnimationBlock.js.map +1 -0
  85. package/FlowGraph/Blocks/Execution/flowGraphTimerBlock.d.ts +32 -0
  86. package/FlowGraph/Blocks/Execution/flowGraphTimerBlock.js +62 -0
  87. package/FlowGraph/Blocks/Execution/flowGraphTimerBlock.js.map +1 -0
  88. package/FlowGraph/Blocks/Execution/index.d.ts +7 -0
  89. package/FlowGraph/Blocks/Execution/index.js +7 -0
  90. package/FlowGraph/Blocks/Execution/index.js.map +1 -1
  91. package/FlowGraph/flowGraph.d.ts +42 -12
  92. package/FlowGraph/flowGraph.js +37 -23
  93. package/FlowGraph/flowGraph.js.map +1 -1
  94. package/FlowGraph/flowGraphAsyncExecutionBlock.d.ts +29 -0
  95. package/FlowGraph/flowGraphAsyncExecutionBlock.js +21 -0
  96. package/FlowGraph/flowGraphAsyncExecutionBlock.js.map +1 -0
  97. package/FlowGraph/flowGraphBlock.d.ts +9 -11
  98. package/FlowGraph/flowGraphBlock.js +12 -8
  99. package/FlowGraph/flowGraphBlock.js.map +1 -1
  100. package/FlowGraph/flowGraphConnection.d.ts +17 -7
  101. package/FlowGraph/flowGraphConnection.js +26 -9
  102. package/FlowGraph/flowGraphConnection.js.map +1 -1
  103. package/FlowGraph/flowGraphContext.d.ts +102 -0
  104. package/FlowGraph/flowGraphContext.js +111 -0
  105. package/FlowGraph/flowGraphContext.js.map +1 -0
  106. package/FlowGraph/flowGraphCustomEvent.d.ts +5 -0
  107. package/FlowGraph/flowGraphCustomEvent.js +2 -0
  108. package/FlowGraph/flowGraphCustomEvent.js.map +1 -0
  109. package/FlowGraph/flowGraphDataConnection.d.ts +10 -2
  110. package/FlowGraph/flowGraphDataConnection.js +16 -8
  111. package/FlowGraph/flowGraphDataConnection.js.map +1 -1
  112. package/FlowGraph/flowGraphEventBlock.d.ts +5 -12
  113. package/FlowGraph/flowGraphEventBlock.js +5 -5
  114. package/FlowGraph/flowGraphEventBlock.js.map +1 -1
  115. package/FlowGraph/flowGraphEventCoordinator.d.ts +23 -0
  116. package/FlowGraph/flowGraphEventCoordinator.js +37 -0
  117. package/FlowGraph/flowGraphEventCoordinator.js.map +1 -0
  118. package/FlowGraph/flowGraphExecutionBlock.d.ts +5 -5
  119. package/FlowGraph/flowGraphExecutionBlock.js +3 -3
  120. package/FlowGraph/flowGraphExecutionBlock.js.map +1 -1
  121. package/FlowGraph/flowGraphRichTypes.d.ts +28 -0
  122. package/FlowGraph/flowGraphRichTypes.js +43 -0
  123. package/FlowGraph/flowGraphRichTypes.js.map +1 -0
  124. package/FlowGraph/flowGraphSignalConnection.d.ts +7 -1
  125. package/FlowGraph/flowGraphSignalConnection.js +11 -4
  126. package/FlowGraph/flowGraphSignalConnection.js.map +1 -1
  127. package/FlowGraph/flowGraphVariableDefinitions.d.ts +12 -0
  128. package/FlowGraph/flowGraphVariableDefinitions.js +22 -0
  129. package/FlowGraph/flowGraphVariableDefinitions.js.map +1 -0
  130. package/FlowGraph/flowGraphWithOnDoneExecutionBlock.d.ts +10 -2
  131. package/FlowGraph/flowGraphWithOnDoneExecutionBlock.js +8 -2
  132. package/FlowGraph/flowGraphWithOnDoneExecutionBlock.js.map +1 -1
  133. package/FlowGraph/index.d.ts +3 -0
  134. package/FlowGraph/index.js +3 -0
  135. package/FlowGraph/index.js.map +1 -1
  136. package/Materials/Node/nodeMaterial.d.ts +2 -1
  137. package/Materials/Node/nodeMaterial.js +26 -2
  138. package/Materials/Node/nodeMaterial.js.map +1 -1
  139. package/Materials/PBR/pbrBaseMaterial.d.ts +1 -0
  140. package/Materials/PBR/pbrBaseMaterial.js +1 -0
  141. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  142. package/Materials/Textures/videoTexture.d.ts +5 -0
  143. package/Materials/Textures/videoTexture.js +6 -0
  144. package/Materials/Textures/videoTexture.js.map +1 -1
  145. package/Materials/materialHelper.js +1 -0
  146. package/Materials/materialHelper.js.map +1 -1
  147. package/Materials/standardMaterial.d.ts +1 -0
  148. package/Materials/standardMaterial.js +1 -0
  149. package/Materials/standardMaterial.js.map +1 -1
  150. package/Materials/uniformBuffer.d.ts +7 -0
  151. package/Materials/uniformBuffer.js +8 -0
  152. package/Materials/uniformBuffer.js.map +1 -1
  153. package/Maths/math.vector.d.ts +5 -0
  154. package/Maths/math.vector.js +7 -0
  155. package/Maths/math.vector.js.map +1 -1
  156. package/Meshes/Node/Blocks/Instances/instantiateBlock.d.ts +11 -5
  157. package/Meshes/Node/Blocks/Instances/instantiateBlock.js +20 -10
  158. package/Meshes/Node/Blocks/Instances/instantiateBlock.js.map +1 -1
  159. package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.d.ts +15 -9
  160. package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.js +20 -11
  161. package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.js.map +1 -1
  162. package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.d.ts +15 -9
  163. package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.js +20 -11
  164. package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.js.map +1 -1
  165. package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.d.ts +15 -9
  166. package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.js +20 -11
  167. package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.js.map +1 -1
  168. package/Meshes/Node/Blocks/Set/setColorsBlock.d.ts +12 -0
  169. package/Meshes/Node/Blocks/Set/setColorsBlock.js +62 -27
  170. package/Meshes/Node/Blocks/Set/setColorsBlock.js.map +1 -1
  171. package/Meshes/Node/Blocks/Set/setMaterialIDBlock.d.ts +7 -0
  172. package/Meshes/Node/Blocks/Set/setMaterialIDBlock.js +19 -0
  173. package/Meshes/Node/Blocks/Set/setMaterialIDBlock.js.map +1 -1
  174. package/Meshes/Node/Blocks/Set/setNormalsBlock.d.ts +12 -0
  175. package/Meshes/Node/Blocks/Set/setNormalsBlock.js +62 -27
  176. package/Meshes/Node/Blocks/Set/setNormalsBlock.js.map +1 -1
  177. package/Meshes/Node/Blocks/Set/setPositionsBlock.d.ts +12 -0
  178. package/Meshes/Node/Blocks/Set/setPositionsBlock.js +54 -19
  179. package/Meshes/Node/Blocks/Set/setPositionsBlock.js.map +1 -1
  180. package/Meshes/Node/Blocks/Set/setTangentsBlock.d.ts +12 -0
  181. package/Meshes/Node/Blocks/Set/setTangentsBlock.js +62 -27
  182. package/Meshes/Node/Blocks/Set/setTangentsBlock.js.map +1 -1
  183. package/Meshes/Node/Blocks/Set/setUVsBlock.d.ts +5 -0
  184. package/Meshes/Node/Blocks/Set/setUVsBlock.js +65 -46
  185. package/Meshes/Node/Blocks/Set/setUVsBlock.js.map +1 -1
  186. package/Meshes/Node/Blocks/debugBlock.js +5 -1
  187. package/Meshes/Node/Blocks/debugBlock.js.map +1 -1
  188. package/Meshes/Node/Blocks/geometryInputBlock.js +1 -0
  189. package/Meshes/Node/Blocks/geometryInputBlock.js.map +1 -1
  190. package/Meshes/Node/Blocks/intFloatConverterBlock.js +2 -2
  191. package/Meshes/Node/Blocks/intFloatConverterBlock.js.map +1 -1
  192. package/Meshes/Node/Blocks/mapRangeBlock.js +8 -1
  193. package/Meshes/Node/Blocks/mapRangeBlock.js.map +1 -1
  194. package/Meshes/Node/Blocks/mathBlock.js +1 -0
  195. package/Meshes/Node/Blocks/mathBlock.js.map +1 -1
  196. package/Meshes/Node/Blocks/matrixComposeBlock.d.ts +30 -0
  197. package/Meshes/Node/Blocks/matrixComposeBlock.js +55 -0
  198. package/Meshes/Node/Blocks/matrixComposeBlock.js.map +1 -0
  199. package/Meshes/Node/Enums/nodeGeometryContextualSources.d.ts +3 -1
  200. package/Meshes/Node/Enums/nodeGeometryContextualSources.js +2 -0
  201. package/Meshes/Node/Enums/nodeGeometryContextualSources.js.map +1 -1
  202. package/Meshes/Node/Interfaces/nodeGeometryInstancingContext.d.ts +10 -0
  203. package/Meshes/Node/Interfaces/nodeGeometryInstancingContext.js +2 -0
  204. package/Meshes/Node/Interfaces/nodeGeometryInstancingContext.js.map +1 -0
  205. package/Meshes/Node/index.d.ts +1 -0
  206. package/Meshes/Node/index.js +1 -0
  207. package/Meshes/Node/index.js.map +1 -1
  208. package/Meshes/Node/nodeGeometry.js +2 -2
  209. package/Meshes/Node/nodeGeometry.js.map +1 -1
  210. package/Meshes/Node/nodeGeometryBuildState.d.ts +5 -0
  211. package/Meshes/Node/nodeGeometryBuildState.js +20 -0
  212. package/Meshes/Node/nodeGeometryBuildState.js.map +1 -1
  213. package/Meshes/abstractMesh.js +4 -1
  214. package/Meshes/abstractMesh.js.map +1 -1
  215. package/Meshes/geometry.js +10 -10
  216. package/Meshes/geometry.js.map +1 -1
  217. package/Meshes/mesh.js +7 -5
  218. package/Meshes/mesh.js.map +1 -1
  219. package/Misc/PerformanceViewer/performanceViewerCollectionStrategies.js +2 -1
  220. package/Misc/PerformanceViewer/performanceViewerCollectionStrategies.js.map +1 -1
  221. package/Misc/dumpTools.js +3 -2
  222. package/Misc/dumpTools.js.map +1 -1
  223. package/Misc/equirectangularCapture.d.ts +39 -0
  224. package/Misc/equirectangularCapture.js +56 -0
  225. package/Misc/equirectangularCapture.js.map +1 -0
  226. package/Misc/index.d.ts +1 -0
  227. package/Misc/index.js +1 -0
  228. package/Misc/index.js.map +1 -1
  229. package/Particles/solidParticleSystem.d.ts +4 -0
  230. package/Particles/solidParticleSystem.js +16 -1
  231. package/Particles/solidParticleSystem.js.map +1 -1
  232. package/Physics/v2/IPhysicsEnginePlugin.d.ts +10 -0
  233. package/Physics/v2/IPhysicsEnginePlugin.js.map +1 -1
  234. package/Physics/v2/Plugins/havokPlugin.d.ts +8 -1
  235. package/Physics/v2/Plugins/havokPlugin.js +34 -0
  236. package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
  237. package/Physics/v2/physicsConstraint.d.ts +11 -1
  238. package/Physics/v2/physicsConstraint.js +7 -0
  239. package/Physics/v2/physicsConstraint.js.map +1 -1
  240. package/Rendering/prePassRenderer.d.ts +6 -0
  241. package/Rendering/prePassRenderer.js +14 -0
  242. package/Rendering/prePassRenderer.js.map +1 -1
  243. package/Shaders/default.fragment.js +4 -0
  244. package/Shaders/default.fragment.js.map +1 -1
  245. package/Shaders/equirectangularPanorama.fragment.d.ts +5 -0
  246. package/Shaders/equirectangularPanorama.fragment.js +17 -0
  247. package/Shaders/equirectangularPanorama.fragment.js.map +1 -0
  248. package/Shaders/pbr.fragment.js +4 -0
  249. package/Shaders/pbr.fragment.js.map +1 -1
  250. package/package.json +1 -1
  251. package/FlowGraph/Blocks/Data/flowGraphBinaryOpBlocks.d.ts +0 -34
  252. package/FlowGraph/Blocks/Data/flowGraphBinaryOpBlocks.js +0 -29
  253. package/FlowGraph/Blocks/Data/flowGraphBinaryOpBlocks.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"flowGraphWithOnDoneExecutionBlock.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/flowGraphWithOnDoneExecutionBlock.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAGpE,MAAM,OAAgB,iCAAkC,SAAQ,uBAAuB;IAGnF,YAAsB,KAAgB;QAClC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IACvD,CAAC;CACJ","sourcesContent":["import type { FlowGraph } from \"./flowGraph\";\r\nimport { FlowGraphExecutionBlock } from \"./flowGraphExecutionBlock\";\r\nimport type { FlowGraphSignalConnection } from \"./flowGraphSignalConnection\";\r\n\r\nexport abstract class FlowGraphWithOnDoneExecutionBlock extends FlowGraphExecutionBlock {\r\n public readonly onDone: FlowGraphSignalConnection;\r\n\r\n protected constructor(graph: FlowGraph) {\r\n super(graph);\r\n this.onDone = this._registerSignalOutput(\"onDone\");\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"flowGraphWithOnDoneExecutionBlock.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/flowGraphWithOnDoneExecutionBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAGpE;;;;;GAKG;AACH,MAAM,OAAgB,iCAAkC,SAAQ,uBAAuB;IAMnF;QACI,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IACvD,CAAC;CACJ","sourcesContent":["import { FlowGraphExecutionBlock } from \"./flowGraphExecutionBlock\";\r\nimport type { FlowGraphSignalConnection } from \"./flowGraphSignalConnection\";\r\n\r\n/**\r\n * @experimental\r\n * An execution block that has an onDone signal. This signal is triggered when the execution of this block is done.\r\n * Most execution blocks will inherit from this, except for the ones that have multiple signals to be triggered.\r\n * (such as if blocks)\r\n */\r\nexport abstract class FlowGraphWithOnDoneExecutionBlock extends FlowGraphExecutionBlock {\r\n /**\r\n * Output connection: The signal that is triggered when the execution of this block is done.\r\n */\r\n public readonly onDone: FlowGraphSignalConnection;\r\n\r\n protected constructor() {\r\n super();\r\n this.onDone = this._registerSignalOutput(\"onDone\");\r\n }\r\n}\r\n"]}
@@ -3,4 +3,7 @@ export * from "./flowGraphBlock";
3
3
  export * from "./flowGraphSignalConnection";
4
4
  export * from "./flowGraphExecutionBlock";
5
5
  export * from "./flowGraphEventBlock";
6
+ export * from "./flowGraphEventCoordinator";
7
+ export * from "./flowGraphRichTypes";
8
+ export * from "./flowGraphContext";
6
9
  export * from "./Blocks/index";
@@ -3,6 +3,9 @@ export * from "./flowGraphBlock.js";
3
3
  export * from "./flowGraphSignalConnection.js";
4
4
  export * from "./flowGraphExecutionBlock.js";
5
5
  export * from "./flowGraphEventBlock.js";
6
+ export * from "./flowGraphEventCoordinator.js";
7
+ export * from "./flowGraphRichTypes.js";
8
+ export * from "./flowGraphContext.js";
6
9
  // eslint-disable-next-line import/no-internal-modules
7
10
  export * from "./Blocks/index.js";
8
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,sDAAsD;AACtD,cAAc,gBAAgB,CAAC","sourcesContent":["export * from \"./flowGraph\";\r\nexport * from \"./flowGraphBlock\";\r\nexport * from \"./flowGraphSignalConnection\";\r\nexport * from \"./flowGraphExecutionBlock\";\r\nexport * from \"./flowGraphEventBlock\";\r\n// eslint-disable-next-line import/no-internal-modules\r\nexport * from \"./Blocks/index\";\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,sDAAsD;AACtD,cAAc,gBAAgB,CAAC","sourcesContent":["export * from \"./flowGraph\";\r\nexport * from \"./flowGraphBlock\";\r\nexport * from \"./flowGraphSignalConnection\";\r\nexport * from \"./flowGraphExecutionBlock\";\r\nexport * from \"./flowGraphEventBlock\";\r\nexport * from \"./flowGraphEventCoordinator\";\r\nexport * from \"./flowGraphRichTypes\";\r\nexport * from \"./flowGraphContext\";\r\n// eslint-disable-next-line import/no-internal-modules\r\nexport * from \"./Blocks/index\";\r\n"]}
@@ -524,9 +524,10 @@ export declare class NodeMaterial extends PushMaterial {
524
524
  * @param rootUrl defines the root URL to use to load textures and relative dependencies
525
525
  * @param nodeMaterial defines a node material to update (instead of creating a new one)
526
526
  * @param skipBuild defines whether to build the node material
527
+ * @param waitForTextureReadyness defines whether to wait for texture readiness resolving the promise (default: false)
527
528
  * @returns a promise that will resolve to the new node material
528
529
  */
529
- static ParseFromSnippetAsync(snippetId: string, scene?: Scene, rootUrl?: string, nodeMaterial?: NodeMaterial, skipBuild?: boolean): Promise<NodeMaterial>;
530
+ static ParseFromSnippetAsync(snippetId: string, scene?: Scene, rootUrl?: string, nodeMaterial?: NodeMaterial, skipBuild?: boolean, waitForTextureReadyness?: boolean): Promise<NodeMaterial>;
530
531
  /**
531
532
  * Creates a new node material set to default basic configuration
532
533
  * @param name defines the name of the material
@@ -1700,9 +1700,10 @@ export class NodeMaterial extends PushMaterial {
1700
1700
  * @param rootUrl defines the root URL to use to load textures and relative dependencies
1701
1701
  * @param nodeMaterial defines a node material to update (instead of creating a new one)
1702
1702
  * @param skipBuild defines whether to build the node material
1703
+ * @param waitForTextureReadyness defines whether to wait for texture readiness resolving the promise (default: false)
1703
1704
  * @returns a promise that will resolve to the new node material
1704
1705
  */
1705
- static ParseFromSnippetAsync(snippetId, scene = EngineStore.LastCreatedScene, rootUrl = "", nodeMaterial, skipBuild = false) {
1706
+ static ParseFromSnippetAsync(snippetId, scene = EngineStore.LastCreatedScene, rootUrl = "", nodeMaterial, skipBuild = false, waitForTextureReadyness = false) {
1706
1707
  if (snippetId === "_BLANK") {
1707
1708
  return Promise.resolve(NodeMaterial.CreateDefault("blank", scene));
1708
1709
  }
@@ -1723,11 +1724,34 @@ export class NodeMaterial extends PushMaterial {
1723
1724
  if (!skipBuild) {
1724
1725
  nodeMaterial.build();
1725
1726
  }
1726
- resolve(nodeMaterial);
1727
1727
  }
1728
1728
  catch (err) {
1729
1729
  reject(err);
1730
1730
  }
1731
+ // Ensures all textures are ready to render.
1732
+ const textureReadyPromises = [];
1733
+ if (waitForTextureReadyness) {
1734
+ nodeMaterial.getActiveTextures().forEach((texture) => {
1735
+ const internalTexture = texture.getInternalTexture();
1736
+ if (internalTexture && !internalTexture.isReady) {
1737
+ textureReadyPromises.push(new Promise((textureResolve, textureReject) => {
1738
+ internalTexture.onLoadedObservable.addOnce(() => {
1739
+ textureResolve();
1740
+ });
1741
+ internalTexture.onErrorObservable.addOnce((e) => {
1742
+ textureReject(e);
1743
+ });
1744
+ }));
1745
+ }
1746
+ });
1747
+ }
1748
+ Promise.all(textureReadyPromises)
1749
+ .then(() => {
1750
+ resolve(nodeMaterial);
1751
+ })
1752
+ .catch((err) => {
1753
+ reject(err);
1754
+ });
1731
1755
  }
1732
1756
  else {
1733
1757
  reject("Unable to load the snippet " + snippetId);