@babylonjs/core 5.57.0 → 6.0.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 (65) hide show
  1. package/Engines/WebGPU/Extensions/engine.multiRender.js +51 -8
  2. package/Engines/WebGPU/Extensions/engine.multiRender.js.map +1 -1
  3. package/Engines/WebGPU/webgpuHardwareTexture.d.ts +4 -3
  4. package/Engines/WebGPU/webgpuHardwareTexture.js +23 -10
  5. package/Engines/WebGPU/webgpuHardwareTexture.js.map +1 -1
  6. package/Engines/WebGPU/webgpuTextureHelper.d.ts +1 -1
  7. package/Engines/WebGPU/webgpuTextureHelper.js +6 -14
  8. package/Engines/WebGPU/webgpuTextureHelper.js.map +1 -1
  9. package/Engines/engine.d.ts +5 -6
  10. package/Engines/thinEngine.js +2 -2
  11. package/Engines/thinEngine.js.map +1 -1
  12. package/Engines/webgpuEngine.js +16 -8
  13. package/Engines/webgpuEngine.js.map +1 -1
  14. package/Lights/Shadows/shadowGenerator.d.ts +2 -0
  15. package/Lights/Shadows/shadowGenerator.js +11 -22
  16. package/Lights/Shadows/shadowGenerator.js.map +1 -1
  17. package/Maths/math.vector.js +4 -2
  18. package/Maths/math.vector.js.map +1 -1
  19. package/Meshes/abstractMesh.d.ts +13 -0
  20. package/Meshes/abstractMesh.js +20 -0
  21. package/Meshes/abstractMesh.js.map +1 -1
  22. package/Meshes/thinInstanceMesh.js +4 -1
  23. package/Meshes/thinInstanceMesh.js.map +1 -1
  24. package/Particles/solidParticleSystem.d.ts +1 -1
  25. package/Particles/solidParticleSystem.js +1 -1
  26. package/Particles/solidParticleSystem.js.map +1 -1
  27. package/Physics/physicsEngineComponent.d.ts +1 -0
  28. package/Physics/physicsEngineComponent.js +1 -0
  29. package/Physics/physicsEngineComponent.js.map +1 -1
  30. package/Physics/physicsHelper.d.ts +12 -5
  31. package/Physics/physicsHelper.js +160 -90
  32. package/Physics/physicsHelper.js.map +1 -1
  33. package/Physics/physicsRaycastResult.d.ts +9 -0
  34. package/Physics/physicsRaycastResult.js.map +1 -1
  35. package/Physics/v2/IPhysicsEnginePlugin.d.ts +120 -77
  36. package/Physics/v2/IPhysicsEnginePlugin.js +119 -48
  37. package/Physics/v2/IPhysicsEnginePlugin.js.map +1 -1
  38. package/Physics/v2/Plugins/havokPlugin.d.ts +687 -0
  39. package/Physics/v2/Plugins/havokPlugin.js +1592 -0
  40. package/Physics/v2/Plugins/havokPlugin.js.map +1 -0
  41. package/Physics/v2/Plugins/index.d.ts +1 -0
  42. package/Physics/v2/Plugins/index.js +1 -1
  43. package/Physics/v2/Plugins/index.js.map +1 -1
  44. package/Physics/v2/index.d.ts +1 -0
  45. package/Physics/v2/index.js +2 -0
  46. package/Physics/v2/index.js.map +1 -1
  47. package/Physics/v2/physicsAggregate.d.ts +9 -2
  48. package/Physics/v2/physicsAggregate.js +66 -31
  49. package/Physics/v2/physicsAggregate.js.map +1 -1
  50. package/Physics/v2/physicsBody.d.ts +51 -62
  51. package/Physics/v2/physicsBody.js +101 -128
  52. package/Physics/v2/physicsBody.js.map +1 -1
  53. package/Physics/v2/physicsConstraint.d.ts +57 -25
  54. package/Physics/v2/physicsConstraint.js +32 -15
  55. package/Physics/v2/physicsConstraint.js.map +1 -1
  56. package/Physics/v2/physicsEngine.d.ts +0 -1
  57. package/Physics/v2/physicsEngine.js +0 -1
  58. package/Physics/v2/physicsEngine.js.map +1 -1
  59. package/Physics/v2/physicsEngineComponent.d.ts +0 -10
  60. package/Physics/v2/physicsEngineComponent.js +0 -29
  61. package/Physics/v2/physicsEngineComponent.js.map +1 -1
  62. package/Physics/v2/physicsShape.d.ts +52 -11
  63. package/Physics/v2/physicsShape.js +80 -23
  64. package/Physics/v2/physicsShape.js.map +1 -1
  65. package/package.json +1 -1
@@ -96,6 +96,10 @@ declare class _InternalAbstractMeshDataInfo {
96
96
  _pointerOverDisableMeshTesting: boolean;
97
97
  _meshCollisionData: _MeshCollisionData;
98
98
  _enableDistantPicking: boolean;
99
+ /** @internal
100
+ * Bounding info that is unnafected by the addition of thin instances
101
+ */
102
+ _rawBoundingInfo: Nullable<BoundingInfo>;
99
103
  }
100
104
  /**
101
105
  * Class used to store all common mesh properties
@@ -234,6 +238,9 @@ export declare class AbstractMesh extends TransformNode implements IDisposable,
234
238
  * @internal
235
239
  */
236
240
  _updateNonUniformScalingState(value: boolean): boolean;
241
+ /** @internal */
242
+ get rawBoundingInfo(): Nullable<BoundingInfo>;
243
+ set rawBoundingInfo(boundingInfo: Nullable<BoundingInfo>);
237
244
  /**
238
245
  * An event triggered when this mesh collides with another one
239
246
  */
@@ -648,10 +655,16 @@ export declare class AbstractMesh extends TransformNode implements IDisposable,
648
655
  /**
649
656
  * Returns the mesh BoundingInfo object or creates a new one and returns if it was undefined.
650
657
  * Note that it returns a shallow bounding of the mesh (i.e. it does not include children).
658
+ * However, if the mesh contains thin instances, it will be expanded to include them. If you want the "raw" bounding data instead, then use `getRawBoundingInfo()`.
651
659
  * To get the full bounding of all children, call `getHierarchyBoundingVectors` instead.
652
660
  * @returns a BoundingInfo
653
661
  */
654
662
  getBoundingInfo(): BoundingInfo;
663
+ /**
664
+ * Returns the bounding info unnafected by instance data.
665
+ * @returns the bounding info of the mesh unaffected by instance data.
666
+ */
667
+ getRawBoundingInfo(): BoundingInfo;
655
668
  /**
656
669
  * Overwrite the current bounding info
657
670
  * @param boundingInfo defines the new bounding info
@@ -73,6 +73,10 @@ class _InternalAbstractMeshDataInfo {
73
73
  // Collisions
74
74
  this._meshCollisionData = new _MeshCollisionData();
75
75
  this._enableDistantPicking = false;
76
+ /** @internal
77
+ * Bounding info that is unnafected by the addition of thin instances
78
+ */
79
+ this._rawBoundingInfo = null;
76
80
  }
77
81
  }
78
82
  /**
@@ -211,6 +215,13 @@ export class AbstractMesh extends TransformNode {
211
215
  this._markSubMeshesAsMiscDirty();
212
216
  return true;
213
217
  }
218
+ /** @internal */
219
+ get rawBoundingInfo() {
220
+ return this._internalAbstractMeshDataInfo._rawBoundingInfo;
221
+ }
222
+ set rawBoundingInfo(boundingInfo) {
223
+ this._internalAbstractMeshDataInfo._rawBoundingInfo = boundingInfo;
224
+ }
214
225
  /** Set a function to call when this mesh collides with another one */
215
226
  set onCollide(callback) {
216
227
  if (this._internalAbstractMeshDataInfo._meshCollisionData._onCollideObserver) {
@@ -974,6 +985,7 @@ export class AbstractMesh extends TransformNode {
974
985
  /**
975
986
  * Returns the mesh BoundingInfo object or creates a new one and returns if it was undefined.
976
987
  * Note that it returns a shallow bounding of the mesh (i.e. it does not include children).
988
+ * However, if the mesh contains thin instances, it will be expanded to include them. If you want the "raw" bounding data instead, then use `getRawBoundingInfo()`.
977
989
  * To get the full bounding of all children, call `getHierarchyBoundingVectors` instead.
978
990
  * @returns a BoundingInfo
979
991
  */
@@ -989,6 +1001,14 @@ export class AbstractMesh extends TransformNode {
989
1001
  // cannot be null.
990
1002
  return this._boundingInfo;
991
1003
  }
1004
+ /**
1005
+ * Returns the bounding info unnafected by instance data.
1006
+ * @returns the bounding info of the mesh unaffected by instance data.
1007
+ */
1008
+ getRawBoundingInfo() {
1009
+ var _a;
1010
+ return (_a = this.rawBoundingInfo) !== null && _a !== void 0 ? _a : this.getBoundingInfo();
1011
+ }
992
1012
  /**
993
1013
  * Overwrite the current bounding info
994
1014
  * @param boundingInfo defines the new bounding info