@babylonjs/core 5.35.1 → 5.37.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 (274) hide show
  1. package/Audio/sound.d.ts +5 -0
  2. package/Audio/sound.js +7 -0
  3. package/Audio/sound.js.map +1 -1
  4. package/Cameras/arcRotateCamera.d.ts +2 -2
  5. package/Cameras/arcRotateCamera.js.map +1 -1
  6. package/Debug/physicsViewer.d.ts +4 -3
  7. package/Debug/physicsViewer.js +2 -2
  8. package/Debug/physicsViewer.js.map +1 -1
  9. package/Engines/Extensions/engine.views.d.ts +4 -0
  10. package/Engines/Extensions/engine.views.js +61 -42
  11. package/Engines/Extensions/engine.views.js.map +1 -1
  12. package/Engines/thinEngine.js +2 -2
  13. package/Engines/thinEngine.js.map +1 -1
  14. package/Gizmos/planeRotationGizmo.js +3 -1
  15. package/Gizmos/planeRotationGizmo.js.map +1 -1
  16. package/Inputs/scene.inputManager.js +4 -4
  17. package/Inputs/scene.inputManager.js.map +1 -1
  18. package/Loading/Plugins/babylonFileLoader.js +3 -3
  19. package/Loading/Plugins/babylonFileLoader.js.map +1 -1
  20. package/Materials/Node/Blocks/Dual/currentScreenBlock.js +2 -3
  21. package/Materials/Node/Blocks/Dual/currentScreenBlock.js.map +1 -1
  22. package/Materials/Node/Blocks/Dual/fogBlock.js +4 -4
  23. package/Materials/Node/Blocks/Dual/fogBlock.js.map +1 -1
  24. package/Materials/Node/Blocks/Dual/reflectionTextureBlock.js +2 -2
  25. package/Materials/Node/Blocks/Dual/reflectionTextureBlock.js.map +1 -1
  26. package/Materials/Node/Blocks/Dual/sceneDepthBlock.js +2 -3
  27. package/Materials/Node/Blocks/Dual/sceneDepthBlock.js.map +1 -1
  28. package/Materials/Node/Blocks/Dual/textureBlock.js +4 -5
  29. package/Materials/Node/Blocks/Dual/textureBlock.js.map +1 -1
  30. package/Materials/Node/Blocks/Fragment/TBNBlock.js +2 -2
  31. package/Materials/Node/Blocks/Fragment/TBNBlock.js.map +1 -1
  32. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js +2 -2
  33. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js.map +1 -1
  34. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js +2 -2
  35. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js.map +1 -1
  36. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.d.ts +4 -0
  37. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.js +35 -19
  38. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.js.map +1 -1
  39. package/Materials/Node/Blocks/Fragment/screenSpaceBlock.js +2 -2
  40. package/Materials/Node/Blocks/Fragment/screenSpaceBlock.js.map +1 -1
  41. package/Materials/Node/Blocks/Fragment/shadowMapBlock.js +2 -2
  42. package/Materials/Node/Blocks/Fragment/shadowMapBlock.js.map +1 -1
  43. package/Materials/Node/Blocks/PBR/clearCoatBlock.js +2 -2
  44. package/Materials/Node/Blocks/PBR/clearCoatBlock.js.map +1 -1
  45. package/Materials/Node/Blocks/PBR/reflectionBlock.js +2 -2
  46. package/Materials/Node/Blocks/PBR/reflectionBlock.js.map +1 -1
  47. package/Materials/Node/Blocks/Particle/particleTextureBlock.js +2 -3
  48. package/Materials/Node/Blocks/Particle/particleTextureBlock.js.map +1 -1
  49. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js +2 -2
  50. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js.map +1 -1
  51. package/Materials/Node/Blocks/gradientBlock.js +7 -6
  52. package/Materials/Node/Blocks/gradientBlock.js.map +1 -1
  53. package/Materials/Node/Blocks/normalBlendBlock.js +10 -8
  54. package/Materials/Node/Blocks/normalBlendBlock.js.map +1 -1
  55. package/Materials/Node/Blocks/randomNumberBlock.js +6 -5
  56. package/Materials/Node/Blocks/randomNumberBlock.js.map +1 -1
  57. package/Materials/Node/Blocks/reflectBlock.js +10 -8
  58. package/Materials/Node/Blocks/reflectBlock.js.map +1 -1
  59. package/Materials/Node/Blocks/refractBlock.js +10 -8
  60. package/Materials/Node/Blocks/refractBlock.js.map +1 -1
  61. package/Materials/Node/Blocks/triPlanarBlock.js +4 -4
  62. package/Materials/Node/Blocks/triPlanarBlock.js.map +1 -1
  63. package/Materials/Node/Enums/nodeMaterialBlockConnectionPointTypes.d.ts +3 -1
  64. package/Materials/Node/Enums/nodeMaterialBlockConnectionPointTypes.js +2 -0
  65. package/Materials/Node/Enums/nodeMaterialBlockConnectionPointTypes.js.map +1 -1
  66. package/Materials/Node/nodeMaterial.d.ts +19 -1
  67. package/Materials/Node/nodeMaterial.js +30 -0
  68. package/Materials/Node/nodeMaterial.js.map +1 -1
  69. package/Materials/Node/nodeMaterialBlockConnectionPoint.d.ts +5 -0
  70. package/Materials/Node/nodeMaterialBlockConnectionPoint.js +13 -0
  71. package/Materials/Node/nodeMaterialBlockConnectionPoint.js.map +1 -1
  72. package/Materials/Node/nodeMaterialBuildStateSharedData.d.ts +2 -8
  73. package/Materials/Node/nodeMaterialBuildStateSharedData.js.map +1 -1
  74. package/Materials/Textures/baseTexture.d.ts +2 -1
  75. package/Materials/Textures/baseTexture.js +3 -2
  76. package/Materials/Textures/baseTexture.js.map +1 -1
  77. package/Materials/Textures/internalTexture.d.ts +2 -0
  78. package/Materials/Textures/internalTexture.js +4 -0
  79. package/Materials/Textures/internalTexture.js.map +1 -1
  80. package/Materials/Textures/mirrorTexture.js +0 -2
  81. package/Materials/Textures/mirrorTexture.js.map +1 -1
  82. package/Materials/Textures/texture.d.ts +2 -0
  83. package/Materials/Textures/texture.js +35 -7
  84. package/Materials/Textures/texture.js.map +1 -1
  85. package/Materials/Textures/videoTexture.d.ts +5 -0
  86. package/Materials/Textures/videoTexture.js +27 -23
  87. package/Materials/Textures/videoTexture.js.map +1 -1
  88. package/Materials/material.js +1 -1
  89. package/Materials/material.js.map +1 -1
  90. package/Materials/materialHelper.js +3 -0
  91. package/Materials/materialHelper.js.map +1 -1
  92. package/Meshes/abstractMesh.d.ts +4 -4
  93. package/Meshes/abstractMesh.js +4 -4
  94. package/Meshes/abstractMesh.js.map +1 -1
  95. package/Meshes/mesh.d.ts +2 -2
  96. package/Meshes/mesh.js +1 -1
  97. package/Meshes/mesh.js.map +1 -1
  98. package/Misc/copyTextureToTexture.d.ts +9 -2
  99. package/Misc/copyTextureToTexture.js +23 -1
  100. package/Misc/copyTextureToTexture.js.map +1 -1
  101. package/Misc/virtualJoystick.d.ts +1 -0
  102. package/Misc/virtualJoystick.js +6 -0
  103. package/Misc/virtualJoystick.js.map +1 -1
  104. package/Particles/IParticleSystem.d.ts +15 -1
  105. package/Particles/IParticleSystem.js.map +1 -1
  106. package/Particles/gpuParticleSystem.d.ts +24 -2
  107. package/Particles/gpuParticleSystem.js +98 -43
  108. package/Particles/gpuParticleSystem.js.map +1 -1
  109. package/Particles/particleSystem.d.ts +6 -1
  110. package/Particles/particleSystem.js +7 -2
  111. package/Particles/particleSystem.js.map +1 -1
  112. package/Physics/IPhysicsEngine.d.ts +8 -108
  113. package/Physics/IPhysicsEngine.js.map +1 -1
  114. package/Physics/Plugins/ammoJSPlugin.d.ts +1 -389
  115. package/Physics/Plugins/ammoJSPlugin.js +2 -1414
  116. package/Physics/Plugins/ammoJSPlugin.js.map +1 -1
  117. package/Physics/Plugins/cannonJSPlugin.d.ts +1 -75
  118. package/Physics/Plugins/cannonJSPlugin.js +2 -664
  119. package/Physics/Plugins/cannonJSPlugin.js.map +1 -1
  120. package/Physics/Plugins/oimoJSPlugin.d.ts +1 -59
  121. package/Physics/Plugins/oimoJSPlugin.js +2 -432
  122. package/Physics/Plugins/oimoJSPlugin.js.map +1 -1
  123. package/Physics/index.d.ts +3 -6
  124. package/Physics/index.js +3 -6
  125. package/Physics/index.js.map +1 -1
  126. package/Physics/physicsEngine.d.ts +1 -135
  127. package/Physics/physicsEngine.js +2 -221
  128. package/Physics/physicsEngine.js.map +1 -1
  129. package/Physics/physicsEngineComponent.d.ts +7 -42
  130. package/Physics/physicsEngineComponent.js +11 -71
  131. package/Physics/physicsEngineComponent.js.map +1 -1
  132. package/Physics/physicsHelper.d.ts +1 -411
  133. package/Physics/physicsHelper.js +2 -708
  134. package/Physics/physicsHelper.js.map +1 -1
  135. package/Physics/physicsImpostor.d.ts +1 -640
  136. package/Physics/physicsImpostor.js +2 -1004
  137. package/Physics/physicsImpostor.js.map +1 -1
  138. package/Physics/physicsJoint.d.ts +1 -275
  139. package/Physics/physicsJoint.js +2 -222
  140. package/Physics/physicsJoint.js.map +1 -1
  141. package/Physics/v1/IPhysicsEnginePlugin.d.ts +73 -0
  142. package/Physics/v1/IPhysicsEnginePlugin.js +2 -0
  143. package/Physics/v1/IPhysicsEnginePlugin.js.map +1 -0
  144. package/Physics/v1/Plugins/ammoJSPlugin.d.ts +401 -0
  145. package/Physics/v1/Plugins/ammoJSPlugin.js +1431 -0
  146. package/Physics/v1/Plugins/ammoJSPlugin.js.map +1 -0
  147. package/Physics/v1/Plugins/cannonJSPlugin.d.ts +87 -0
  148. package/Physics/v1/Plugins/cannonJSPlugin.js +683 -0
  149. package/Physics/v1/Plugins/cannonJSPlugin.js.map +1 -0
  150. package/Physics/{Plugins → v1/Plugins}/index.d.ts +0 -0
  151. package/Physics/{Plugins → v1/Plugins}/index.js +0 -0
  152. package/Physics/v1/Plugins/index.js.map +1 -0
  153. package/Physics/v1/Plugins/oimoJSPlugin.d.ts +71 -0
  154. package/Physics/v1/Plugins/oimoJSPlugin.js +450 -0
  155. package/Physics/v1/Plugins/oimoJSPlugin.js.map +1 -0
  156. package/Physics/v1/index.d.ts +7 -0
  157. package/Physics/v1/index.js +9 -0
  158. package/Physics/v1/index.js.map +1 -0
  159. package/Physics/v1/physicsEngine.d.ts +147 -0
  160. package/Physics/v1/physicsEngine.js +237 -0
  161. package/Physics/v1/physicsEngine.js.map +1 -0
  162. package/Physics/v1/physicsEngineComponent.d.ts +45 -0
  163. package/Physics/v1/physicsEngineComponent.js +70 -0
  164. package/Physics/v1/physicsEngineComponent.js.map +1 -0
  165. package/Physics/v1/physicsHelper.d.ts +411 -0
  166. package/Physics/v1/physicsHelper.js +709 -0
  167. package/Physics/v1/physicsHelper.js.map +1 -0
  168. package/Physics/v1/physicsImpostor.d.ts +636 -0
  169. package/Physics/v1/physicsImpostor.js +1001 -0
  170. package/Physics/v1/physicsImpostor.js.map +1 -0
  171. package/Physics/v1/physicsJoint.d.ts +275 -0
  172. package/Physics/v1/physicsJoint.js +223 -0
  173. package/Physics/v1/physicsJoint.js.map +1 -0
  174. package/Physics/v2/IPhysicsEnginePlugin.d.ts +170 -0
  175. package/Physics/v2/IPhysicsEnginePlugin.js +47 -0
  176. package/Physics/v2/IPhysicsEnginePlugin.js.map +1 -0
  177. package/Physics/v2/Plugins/index.d.ts +0 -0
  178. package/Physics/v2/Plugins/index.js +2 -0
  179. package/Physics/v2/Plugins/index.js.map +1 -0
  180. package/Physics/v2/index.d.ts +6 -0
  181. package/Physics/v2/index.js +8 -0
  182. package/Physics/v2/index.js.map +1 -0
  183. package/Physics/v2/physicsAggregate.d.ts +114 -0
  184. package/Physics/v2/physicsAggregate.js +46 -0
  185. package/Physics/v2/physicsAggregate.js.map +1 -0
  186. package/Physics/v2/physicsBody.d.ts +109 -0
  187. package/Physics/v2/physicsBody.js +158 -0
  188. package/Physics/v2/physicsBody.js.map +1 -0
  189. package/Physics/v2/physicsConstraint.d.ts +184 -0
  190. package/Physics/v2/physicsConstraint.js +257 -0
  191. package/Physics/v2/physicsConstraint.js.map +1 -0
  192. package/Physics/v2/physicsEngine.d.ts +103 -0
  193. package/Physics/v2/physicsEngine.js +146 -0
  194. package/Physics/v2/physicsEngine.js.map +1 -0
  195. package/Physics/v2/physicsEngineComponent.d.ts +31 -0
  196. package/Physics/v2/physicsEngineComponent.js +50 -0
  197. package/Physics/v2/physicsEngineComponent.js.map +1 -0
  198. package/Physics/v2/physicsMaterial.d.ts +45 -0
  199. package/Physics/v2/physicsMaterial.js +67 -0
  200. package/Physics/v2/physicsMaterial.js.map +1 -0
  201. package/Physics/v2/physicsShape.d.ts +182 -0
  202. package/Physics/v2/physicsShape.js +229 -0
  203. package/Physics/v2/physicsShape.js.map +1 -0
  204. package/PostProcesses/postProcess.d.ts +3 -1
  205. package/PostProcesses/postProcess.js +4 -1
  206. package/PostProcesses/postProcess.js.map +1 -1
  207. package/Rendering/fluidRenderer/fluidRenderer.d.ts +153 -0
  208. package/Rendering/fluidRenderer/fluidRenderer.js +410 -0
  209. package/Rendering/fluidRenderer/fluidRenderer.js.map +1 -0
  210. package/Rendering/fluidRenderer/fluidRenderingDepthTextureCopy.d.ts +13 -0
  211. package/Rendering/fluidRenderer/fluidRenderingDepthTextureCopy.js +31 -0
  212. package/Rendering/fluidRenderer/fluidRenderingDepthTextureCopy.js.map +1 -0
  213. package/Rendering/fluidRenderer/fluidRenderingObject.d.ts +81 -0
  214. package/Rendering/fluidRenderer/fluidRenderingObject.js +180 -0
  215. package/Rendering/fluidRenderer/fluidRenderingObject.js.map +1 -0
  216. package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.d.ts +63 -0
  217. package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.js +130 -0
  218. package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.js.map +1 -0
  219. package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.d.ts +64 -0
  220. package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js +104 -0
  221. package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js.map +1 -0
  222. package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.d.ts +234 -0
  223. package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js +690 -0
  224. package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js.map +1 -0
  225. package/Rendering/fluidRenderer/fluidRenderingTextures.d.ts +56 -0
  226. package/Rendering/fluidRenderer/fluidRenderingTextures.js +261 -0
  227. package/Rendering/fluidRenderer/fluidRenderingTextures.js.map +1 -0
  228. package/Rendering/fluidRenderer/index.d.ts +5 -0
  229. package/Rendering/fluidRenderer/index.js +6 -0
  230. package/Rendering/fluidRenderer/index.js.map +1 -0
  231. package/Rendering/index.d.ts +1 -0
  232. package/Rendering/index.js +2 -0
  233. package/Rendering/index.js.map +1 -1
  234. package/Shaders/copyTextureToTexture.fragment.js +4 -1
  235. package/Shaders/copyTextureToTexture.fragment.js.map +1 -1
  236. package/Shaders/fluidRenderingBilateralBlur.fragment.d.ts +5 -0
  237. package/Shaders/fluidRenderingBilateralBlur.fragment.js +9 -0
  238. package/Shaders/fluidRenderingBilateralBlur.fragment.js.map +1 -0
  239. package/Shaders/fluidRenderingParticleDepth.fragment.d.ts +5 -0
  240. package/Shaders/fluidRenderingParticleDepth.fragment.js +17 -0
  241. package/Shaders/fluidRenderingParticleDepth.fragment.js.map +1 -0
  242. package/Shaders/fluidRenderingParticleDepth.vertex.d.ts +5 -0
  243. package/Shaders/fluidRenderingParticleDepth.vertex.js +13 -0
  244. package/Shaders/fluidRenderingParticleDepth.vertex.js.map +1 -0
  245. package/Shaders/fluidRenderingParticleDiffuse.fragment.d.ts +5 -0
  246. package/Shaders/fluidRenderingParticleDiffuse.fragment.js +9 -0
  247. package/Shaders/fluidRenderingParticleDiffuse.fragment.js.map +1 -0
  248. package/Shaders/fluidRenderingParticleDiffuse.vertex.d.ts +5 -0
  249. package/Shaders/fluidRenderingParticleDiffuse.vertex.js +4 -0
  250. package/Shaders/fluidRenderingParticleDiffuse.vertex.js.map +1 -0
  251. package/Shaders/fluidRenderingParticleThickness.fragment.d.ts +5 -0
  252. package/Shaders/fluidRenderingParticleThickness.fragment.js +9 -0
  253. package/Shaders/fluidRenderingParticleThickness.fragment.js.map +1 -0
  254. package/Shaders/fluidRenderingParticleThickness.vertex.d.ts +5 -0
  255. package/Shaders/fluidRenderingParticleThickness.vertex.js +9 -0
  256. package/Shaders/fluidRenderingParticleThickness.vertex.js.map +1 -0
  257. package/Shaders/fluidRenderingRender.fragment.d.ts +5 -0
  258. package/Shaders/fluidRenderingRender.fragment.js +46 -0
  259. package/Shaders/fluidRenderingRender.fragment.js.map +1 -0
  260. package/Shaders/fluidRenderingStandardBlur.fragment.d.ts +5 -0
  261. package/Shaders/fluidRenderingStandardBlur.fragment.js +9 -0
  262. package/Shaders/fluidRenderingStandardBlur.fragment.js.map +1 -0
  263. package/XR/features/WebXRControllerPhysics.d.ts +1 -1
  264. package/XR/features/WebXRControllerPhysics.js +1 -1
  265. package/XR/features/WebXRControllerPhysics.js.map +1 -1
  266. package/XR/features/WebXRHandTracking.js +1 -1
  267. package/XR/features/WebXRHandTracking.js.map +1 -1
  268. package/package.json +1 -1
  269. package/scene.js +6 -1
  270. package/scene.js.map +1 -1
  271. package/sceneComponent.d.ts +3 -0
  272. package/sceneComponent.js +3 -0
  273. package/sceneComponent.js.map +1 -1
  274. package/Physics/Plugins/index.js.map +0 -1
@@ -74,6 +74,8 @@ export class ParticleSystem extends BaseParticleSystem {
74
74
  this._currentStartSize1 = 0;
75
75
  /** @internal */
76
76
  this._currentStartSize2 = 0;
77
+ /** Indicates that the update of particles is done in the animate function */
78
+ this.updateInAnimate = true;
77
79
  this._rawTextureWidth = 256;
78
80
  this._useRampGradients = false;
79
81
  /**
@@ -85,6 +87,8 @@ export class ParticleSystem extends BaseParticleSystem {
85
87
  * Specifies if the particles are updated in emitter local space or world space
86
88
  */
87
89
  this.isLocal = false;
90
+ /** Indicates that the particle system is CPU based */
91
+ this.isGPU = false;
88
92
  /** @internal */
89
93
  this._onBeforeDrawParticlesObservable = null;
90
94
  // start of sub system methods
@@ -1782,9 +1786,10 @@ export class ParticleSystem extends BaseParticleSystem {
1782
1786
  * Clones the particle system.
1783
1787
  * @param name The name of the cloned object
1784
1788
  * @param newEmitter The new emitter to use
1789
+ * @param cloneTexture Also clone the textures if true
1785
1790
  * @returns the cloned particle system
1786
1791
  */
1787
- clone(name, newEmitter) {
1792
+ clone(name, newEmitter, cloneTexture = false) {
1788
1793
  const custom = { ...this._customWrappers };
1789
1794
  let program = null;
1790
1795
  const engine = this._engine;
@@ -1801,7 +1806,7 @@ export class ParticleSystem extends BaseParticleSystem {
1801
1806
  }
1802
1807
  }
1803
1808
  }
1804
- const serialization = this.serialize();
1809
+ const serialization = this.serialize(cloneTexture);
1805
1810
  const result = ParticleSystem.Parse(serialization, this._scene || this._engine, this._rootUrl);
1806
1811
  result.name = name;
1807
1812
  result.customShader = program;