@babylonjs/core 6.43.0 → 6.45.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 (214) hide show
  1. package/Animations/animatable.js +2 -2
  2. package/Animations/animatable.js.map +1 -1
  3. package/Animations/animationGroup.d.ts +4 -2
  4. package/Animations/animationGroup.js +22 -2
  5. package/Animations/animationGroup.js.map +1 -1
  6. package/Buffers/buffer.d.ts +22 -22
  7. package/Buffers/buffer.js +16 -15
  8. package/Buffers/buffer.js.map +1 -1
  9. package/Cameras/camera.d.ts +5 -5
  10. package/Cameras/camera.js +19 -19
  11. package/Cameras/camera.js.map +1 -1
  12. package/Culling/ray.d.ts +12 -1
  13. package/Culling/ray.js +20 -3
  14. package/Culling/ray.js.map +1 -1
  15. package/Debug/skeletonViewer.d.ts +2 -0
  16. package/Debug/skeletonViewer.js +111 -50
  17. package/Debug/skeletonViewer.js.map +1 -1
  18. package/Engines/ICanvas.d.ts +2 -1
  19. package/Engines/ICanvas.js.map +1 -1
  20. package/Engines/constants.d.ts +96 -0
  21. package/Engines/constants.js +96 -0
  22. package/Engines/constants.js.map +1 -1
  23. package/Engines/engine.d.ts +14 -3
  24. package/Engines/engine.js +11 -0
  25. package/Engines/engine.js.map +1 -1
  26. package/Engines/nullEngine.d.ts +2 -0
  27. package/Engines/nullEngine.js +3 -0
  28. package/Engines/nullEngine.js.map +1 -1
  29. package/Engines/thinEngine.d.ts +4 -1
  30. package/Engines/thinEngine.js +2 -2
  31. package/Engines/thinEngine.js.map +1 -1
  32. package/Gizmos/gizmo.d.ts +14 -0
  33. package/Gizmos/gizmo.js +16 -0
  34. package/Gizmos/gizmo.js.map +1 -1
  35. package/Gizmos/gizmoManager.d.ts +12 -0
  36. package/Gizmos/gizmoManager.js +26 -0
  37. package/Gizmos/gizmoManager.js.map +1 -1
  38. package/Gizmos/positionGizmo.d.ts +16 -2
  39. package/Gizmos/positionGizmo.js +12 -2
  40. package/Gizmos/positionGizmo.js.map +1 -1
  41. package/Gizmos/rotationGizmo.d.ts +8 -0
  42. package/Gizmos/rotationGizmo.js +9 -0
  43. package/Gizmos/rotationGizmo.js.map +1 -1
  44. package/Gizmos/scaleGizmo.d.ts +15 -1
  45. package/Gizmos/scaleGizmo.js +11 -1
  46. package/Gizmos/scaleGizmo.js.map +1 -1
  47. package/Inputs/scene.inputManager.js +2 -2
  48. package/Inputs/scene.inputManager.js.map +1 -1
  49. package/Layers/effectLayer.js +4 -4
  50. package/Layers/effectLayer.js.map +1 -1
  51. package/Lights/Shadows/shadowGenerator.js +5 -5
  52. package/Lights/Shadows/shadowGenerator.js.map +1 -1
  53. package/Materials/Background/backgroundMaterial.js +16 -16
  54. package/Materials/Background/backgroundMaterial.js.map +1 -1
  55. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +8 -8
  56. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
  57. package/Materials/Node/Blocks/Dual/fogBlock.js +2 -2
  58. package/Materials/Node/Blocks/Dual/fogBlock.js.map +1 -1
  59. package/Materials/Node/Blocks/Dual/lightBlock.js +6 -6
  60. package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
  61. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js +2 -2
  62. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js.map +1 -1
  63. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +7 -7
  64. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
  65. package/Materials/Node/Blocks/Vertex/bonesBlock.js +3 -3
  66. package/Materials/Node/Blocks/Vertex/bonesBlock.js.map +1 -1
  67. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js +3 -3
  68. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js.map +1 -1
  69. package/Materials/Node/nodeMaterial.d.ts +50 -0
  70. package/Materials/Node/nodeMaterial.js +53 -3
  71. package/Materials/Node/nodeMaterial.js.map +1 -1
  72. package/Materials/PBR/pbrAnisotropicConfiguration.js +3 -3
  73. package/Materials/PBR/pbrAnisotropicConfiguration.js.map +1 -1
  74. package/Materials/PBR/pbrBaseMaterial.js +41 -41
  75. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  76. package/Materials/PBR/pbrClearCoatConfiguration.js +10 -10
  77. package/Materials/PBR/pbrClearCoatConfiguration.js.map +1 -1
  78. package/Materials/PBR/pbrIridescenceConfiguration.js +6 -6
  79. package/Materials/PBR/pbrIridescenceConfiguration.js.map +1 -1
  80. package/Materials/PBR/pbrSheenConfiguration.js +6 -6
  81. package/Materials/PBR/pbrSheenConfiguration.js.map +1 -1
  82. package/Materials/PBR/pbrSubSurfaceConfiguration.js +7 -7
  83. package/Materials/PBR/pbrSubSurfaceConfiguration.js.map +1 -1
  84. package/Materials/Textures/Loaders/ktxTextureLoader.js +1 -1
  85. package/Materials/Textures/Loaders/ktxTextureLoader.js.map +1 -1
  86. package/Materials/Textures/dynamicTexture.js +1 -1
  87. package/Materials/Textures/dynamicTexture.js.map +1 -1
  88. package/Materials/Textures/texture.js +1 -1
  89. package/Materials/Textures/texture.js.map +1 -1
  90. package/Materials/index.d.ts +1 -0
  91. package/Materials/index.js +1 -0
  92. package/Materials/index.js.map +1 -1
  93. package/Materials/material.decalMapConfiguration.js +3 -3
  94. package/Materials/material.decalMapConfiguration.js.map +1 -1
  95. package/Materials/material.detailMapConfiguration.js +3 -3
  96. package/Materials/material.detailMapConfiguration.js.map +1 -1
  97. package/Materials/material.js +2 -2
  98. package/Materials/material.js.map +1 -1
  99. package/Materials/materialHelper.d.ts +1 -4
  100. package/Materials/materialHelper.functions.d.ts +275 -0
  101. package/Materials/materialHelper.functions.js +823 -0
  102. package/Materials/materialHelper.functions.js.map +1 -0
  103. package/Materials/materialHelper.js +64 -589
  104. package/Materials/materialHelper.js.map +1 -1
  105. package/Materials/materialPluginBase.d.ts +1 -1
  106. package/Materials/materialPluginBase.js +1 -1
  107. package/Materials/materialPluginBase.js.map +1 -1
  108. package/Materials/shaderMaterial.js +8 -8
  109. package/Materials/shaderMaterial.js.map +1 -1
  110. package/Materials/standardMaterial.js +33 -33
  111. package/Materials/standardMaterial.js.map +1 -1
  112. package/Meshes/Compression/dracoCompression.d.ts +23 -2
  113. package/Meshes/Compression/dracoCompression.js +76 -236
  114. package/Meshes/Compression/dracoCompression.js.map +1 -1
  115. package/Meshes/Compression/dracoCompressionWorker.d.ts +44 -0
  116. package/Meshes/Compression/dracoCompressionWorker.js +189 -0
  117. package/Meshes/Compression/dracoCompressionWorker.js.map +1 -0
  118. package/Meshes/GreasedLine/greasedLineBaseMesh.d.ts +3 -1
  119. package/Meshes/GreasedLine/greasedLineBaseMesh.js +4 -2
  120. package/Meshes/GreasedLine/greasedLineBaseMesh.js.map +1 -1
  121. package/Meshes/Node/Blocks/geometryDistanceBlock.d.ts +30 -0
  122. package/Meshes/Node/Blocks/geometryDistanceBlock.js +63 -0
  123. package/Meshes/Node/Blocks/geometryDistanceBlock.js.map +1 -0
  124. package/Meshes/Node/Blocks/geometryDotBlock.d.ts +30 -0
  125. package/Meshes/Node/Blocks/geometryDotBlock.js +63 -0
  126. package/Meshes/Node/Blocks/geometryDotBlock.js.map +1 -0
  127. package/Meshes/Node/Blocks/geometryLengthBlock.d.ts +26 -0
  128. package/Meshes/Node/Blocks/geometryLengthBlock.js +52 -0
  129. package/Meshes/Node/Blocks/geometryLengthBlock.js.map +1 -0
  130. package/Meshes/Node/Blocks/geometryPosterizeBlock.d.ts +31 -0
  131. package/Meshes/Node/Blocks/geometryPosterizeBlock.js +63 -0
  132. package/Meshes/Node/Blocks/geometryPosterizeBlock.js.map +1 -0
  133. package/Meshes/Node/Blocks/geometryReplaceColorBlock.d.ts +38 -0
  134. package/Meshes/Node/Blocks/geometryReplaceColorBlock.js +88 -0
  135. package/Meshes/Node/Blocks/geometryReplaceColorBlock.js.map +1 -0
  136. package/Meshes/Node/Blocks/geometryRotate2dBlock.d.ts +30 -0
  137. package/Meshes/Node/Blocks/geometryRotate2dBlock.js +59 -0
  138. package/Meshes/Node/Blocks/geometryRotate2dBlock.js.map +1 -0
  139. package/Meshes/Node/index.d.ts +6 -0
  140. package/Meshes/Node/index.js +6 -0
  141. package/Meshes/Node/index.js.map +1 -1
  142. package/Meshes/trailMesh.js +1 -1
  143. package/Meshes/trailMesh.js.map +1 -1
  144. package/Misc/basis.d.ts +6 -1
  145. package/Misc/basis.js +11 -231
  146. package/Misc/basis.js.map +1 -1
  147. package/Misc/basisWorker.d.ts +13 -0
  148. package/Misc/basisWorker.js +249 -0
  149. package/Misc/basisWorker.js.map +1 -0
  150. package/Misc/khronosTextureContainer2.d.ts +25 -3
  151. package/Misc/khronosTextureContainer2.js +35 -106
  152. package/Misc/khronosTextureContainer2.js.map +1 -1
  153. package/Misc/khronosTextureContainer2Worker.d.ts +12 -0
  154. package/Misc/khronosTextureContainer2Worker.js +136 -0
  155. package/Misc/khronosTextureContainer2Worker.js.map +1 -0
  156. package/Navigation/Plugins/recastJSPlugin.d.ts +1 -1
  157. package/Navigation/Plugins/recastJSPlugin.js.map +1 -1
  158. package/Particles/gpuParticleSystem.js +3 -3
  159. package/Particles/gpuParticleSystem.js.map +1 -1
  160. package/Particles/particleSystem.js +7 -3
  161. package/Particles/particleSystem.js.map +1 -1
  162. package/Physics/v2/IPhysicsEnginePlugin.d.ts +8 -0
  163. package/Physics/v2/IPhysicsEnginePlugin.js +9 -0
  164. package/Physics/v2/IPhysicsEnginePlugin.js.map +1 -1
  165. package/Physics/v2/Plugins/havokPlugin.d.ts +7 -1
  166. package/Physics/v2/Plugins/havokPlugin.js +19 -1
  167. package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
  168. package/PostProcesses/volumetricLightScatteringPostProcess.js +2 -2
  169. package/PostProcesses/volumetricLightScatteringPostProcess.js.map +1 -1
  170. package/Rendering/depthRenderer.js +4 -4
  171. package/Rendering/depthRenderer.js.map +1 -1
  172. package/Rendering/geometryBufferRenderer.js +5 -5
  173. package/Rendering/geometryBufferRenderer.js.map +1 -1
  174. package/Rendering/outlineRenderer.js +4 -4
  175. package/Rendering/outlineRenderer.js.map +1 -1
  176. package/XR/features/Layers/WebXRCompositionLayer.d.ts +48 -0
  177. package/XR/features/Layers/WebXRCompositionLayer.js +94 -0
  178. package/XR/features/Layers/WebXRCompositionLayer.js.map +1 -0
  179. package/XR/features/Layers/WebXRProjectionLayer.d.ts +10 -0
  180. package/XR/features/Layers/WebXRProjectionLayer.js +51 -0
  181. package/XR/features/Layers/WebXRProjectionLayer.js.map +1 -0
  182. package/XR/features/WebXRControllerPointerSelection.js +4 -1
  183. package/XR/features/WebXRControllerPointerSelection.js.map +1 -1
  184. package/XR/features/WebXRControllerTeleportation.js +11 -10
  185. package/XR/features/WebXRControllerTeleportation.js.map +1 -1
  186. package/XR/features/WebXRHandTracking.d.ts +7 -1
  187. package/XR/features/WebXRHandTracking.js +28 -26
  188. package/XR/features/WebXRHandTracking.js.map +1 -1
  189. package/XR/features/WebXRLayers.d.ts +44 -26
  190. package/XR/features/WebXRLayers.js +204 -153
  191. package/XR/features/WebXRLayers.js.map +1 -1
  192. package/XR/features/WebXRNearInteraction.js +16 -1
  193. package/XR/features/WebXRNearInteraction.js.map +1 -1
  194. package/XR/webXRCamera.js +10 -0
  195. package/XR/webXRCamera.js.map +1 -1
  196. package/XR/webXRDefaultExperience.d.ts +9 -0
  197. package/XR/webXRDefaultExperience.js +8 -0
  198. package/XR/webXRDefaultExperience.js.map +1 -1
  199. package/XR/webXRExperienceHelper.js +1 -1
  200. package/XR/webXRExperienceHelper.js.map +1 -1
  201. package/XR/webXRFeaturesManager.js +8 -2
  202. package/XR/webXRFeaturesManager.js.map +1 -1
  203. package/XR/webXRLayerWrapper.d.ts +12 -3
  204. package/XR/webXRLayerWrapper.js +18 -2
  205. package/XR/webXRLayerWrapper.js.map +1 -1
  206. package/XR/webXRRenderTargetTextureProvider.js +0 -5
  207. package/XR/webXRRenderTargetTextureProvider.js.map +1 -1
  208. package/XR/webXRSessionManager.d.ts +9 -1
  209. package/XR/webXRSessionManager.js +24 -5
  210. package/XR/webXRSessionManager.js.map +1 -1
  211. package/package.json +1 -1
  212. package/scene.d.ts +13 -5
  213. package/scene.js +4 -4
  214. package/scene.js.map +1 -1
@@ -19,9 +19,9 @@ import "../Shaders/particles.fragment.js";
19
19
  import "../Shaders/particles.vertex.js";
20
20
  import { Color4, Color3, TmpColors } from "../Maths/math.color.js";
21
21
  import { ThinEngine } from "../Engines/thinEngine.js";
22
- import { MaterialHelper } from "../Materials/materialHelper.js";
23
22
  import "../Engines/Extensions/engine.alpha.js";
24
23
  import { addClipPlaneUniforms, prepareStringDefinesForClipPlanes, bindClipPlane } from "../Materials/clipPlaneMaterialHelper.js";
24
+ import { BindFogParameters, BindLogDepth } from "../Materials/materialHelper.functions.js";
25
25
  /**
26
26
  * This represents a particle system in Babylon.
27
27
  * Particles are often small sprites used to simulate hard-to-reproduce phenomena like fire, smoke, water, or abstract visual effects like magic glitter and faery dust.
@@ -1646,7 +1646,7 @@ export class ParticleSystem extends BaseParticleSystem {
1646
1646
  if (this._scene) {
1647
1647
  bindClipPlane(effect, this, this._scene);
1648
1648
  if (this.applyFog) {
1649
- MaterialHelper.BindFogParameters(this._scene, undefined, effect);
1649
+ BindFogParameters(this._scene, undefined, effect);
1650
1650
  }
1651
1651
  }
1652
1652
  if (defines.indexOf("#define BILLBOARDMODE_ALL") >= 0) {
@@ -1675,7 +1675,7 @@ export class ParticleSystem extends BaseParticleSystem {
1675
1675
  }
1676
1676
  // Log. depth
1677
1677
  if (this.useLogarithmicDepth && this._scene) {
1678
- MaterialHelper.BindLogDepth(defines, effect, this._scene);
1678
+ BindLogDepth(defines, effect, this._scene);
1679
1679
  }
1680
1680
  // image processing
1681
1681
  if (this._imageProcessingConfiguration && !this._imageProcessingConfiguration.applyByPostProcess) {
@@ -1872,6 +1872,7 @@ export class ParticleSystem extends BaseParticleSystem {
1872
1872
  serializationObject.textureMask = this.textureMask.asArray();
1873
1873
  serializationObject.customShader = this.customShader;
1874
1874
  serializationObject.preventAutoStart = this.preventAutoStart;
1875
+ serializationObject.worldOffset = this.worldOffset.asArray();
1875
1876
  // SubEmitters
1876
1877
  if (this.subEmitters) {
1877
1878
  serializationObject.subEmitters = [];
@@ -2437,6 +2438,9 @@ export class ParticleSystem extends BaseParticleSystem {
2437
2438
  if (parsedParticleSystem.textureMask) {
2438
2439
  particleSystem.textureMask = Color4.FromArray(parsedParticleSystem.textureMask);
2439
2440
  }
2441
+ if (parsedParticleSystem.worldOffset) {
2442
+ particleSystem.worldOffset = Vector3.FromArray(parsedParticleSystem.worldOffset);
2443
+ }
2440
2444
  // Auto start
2441
2445
  if (parsedParticleSystem.preventAutoStart) {
2442
2446
  particleSystem.preventAutoStart = parsedParticleSystem.preventAutoStart;