@babylonjs/core 8.51.0 → 8.51.1

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 (52) hide show
  1. package/Animations/animation.d.ts +6 -2
  2. package/Animations/animation.js +28 -4
  3. package/Animations/animation.js.map +1 -1
  4. package/Animations/animationGroup.d.ts +2 -1
  5. package/Animations/animationGroup.js +3 -2
  6. package/Animations/animationGroup.js.map +1 -1
  7. package/Animations/animatorAvatar.d.ts +161 -0
  8. package/Animations/animatorAvatar.js +573 -0
  9. package/Animations/animatorAvatar.js.map +1 -0
  10. package/Animations/index.d.ts +1 -0
  11. package/Animations/index.js +1 -0
  12. package/Animations/index.js.map +1 -1
  13. package/Bones/index.d.ts +1 -0
  14. package/Bones/index.js +1 -0
  15. package/Bones/index.js.map +1 -1
  16. package/Bones/skeleton.d.ts +13 -0
  17. package/Bones/skeleton.functions.d.ts +26 -0
  18. package/Bones/skeleton.functions.js +91 -0
  19. package/Bones/skeleton.functions.js.map +1 -0
  20. package/Bones/skeleton.js +26 -0
  21. package/Bones/skeleton.js.map +1 -1
  22. package/Collisions/gpuPicker.d.ts +11 -0
  23. package/Collisions/gpuPicker.js +148 -19
  24. package/Collisions/gpuPicker.js.map +1 -1
  25. package/Debug/skeletonViewer.d.ts +4 -8
  26. package/Debug/skeletonViewer.js +13 -22
  27. package/Debug/skeletonViewer.js.map +1 -1
  28. package/Engines/abstractEngine.js +2 -2
  29. package/Engines/abstractEngine.js.map +1 -1
  30. package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.d.ts +109 -0
  31. package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.js +210 -0
  32. package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.js.map +1 -0
  33. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +4 -3
  34. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
  35. package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.d.ts +1 -1
  36. package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.js +4 -3
  37. package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.js.map +1 -1
  38. package/Materials/index.d.ts +1 -0
  39. package/Materials/index.js +1 -0
  40. package/Materials/index.js.map +1 -1
  41. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +13 -0
  42. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
  43. package/Morph/morphTarget.d.ts +9 -5
  44. package/Morph/morphTarget.js +15 -7
  45. package/Morph/morphTarget.js.map +1 -1
  46. package/Morph/morphTargetManager.d.ts +3 -1
  47. package/Morph/morphTargetManager.js +5 -2
  48. package/Morph/morphTargetManager.js.map +1 -1
  49. package/Physics/v2/Plugins/havokPlugin.d.ts +14 -1
  50. package/Physics/v2/Plugins/havokPlugin.js +154 -10
  51. package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
  52. package/package.json +1 -1
@@ -452,15 +452,19 @@ export declare class Animation {
452
452
  matrixInterpolateFunction(startValue: Matrix, endValue: Matrix, gradient: number, result?: Matrix): Matrix;
453
453
  /**
454
454
  * Makes a copy of the animation
455
+ * @param cloneKeys Whether to clone the keys or not (default is false, so the keys are not cloned). Note that the key array itself is always cloned (that is, a new array is created),
456
+ * but the individual keys inside the array are only cloned if this parameter is true.
455
457
  * @returns Cloned animation
456
458
  */
457
- clone(): Animation;
459
+ clone(cloneKeys?: boolean): Animation;
458
460
  /**
459
461
  * Sets the key frames of the animation
460
462
  * @param values The animation key frames to set
461
463
  * @param dontClone Whether to clone the keys or not (default is false, so the array of keys is cloned)
464
+ * @param cloneKeys Whether to clone the individual keys inside the array or not (default is false). If true, each key object inside the array will be cloned, and the fields
465
+ * that have a clone() method will be cloned by calling that method.
462
466
  */
463
- setKeys(values: Array<IAnimationKey>, dontClone?: boolean): void;
467
+ setKeys(values: Array<IAnimationKey>, dontClone?: boolean, cloneKeys?: boolean): void;
464
468
  /**
465
469
  * Creates a key for the frame passed as a parameter and adds it to the animation IF a key doesn't already exist for that frame
466
470
  * @param frame Frame number
@@ -255,6 +255,7 @@ export class Animation {
255
255
  outTangent: key.outTangent,
256
256
  interpolation: key.interpolation,
257
257
  lockedTangent: key.lockedTangent,
258
+ easingFunction: key.easingFunction,
258
259
  };
259
260
  if (clippedKeys) {
260
261
  if (startFrame === Number.MAX_VALUE) {
@@ -908,14 +909,16 @@ export class Animation {
908
909
  }
909
910
  /**
910
911
  * Makes a copy of the animation
912
+ * @param cloneKeys Whether to clone the keys or not (default is false, so the keys are not cloned). Note that the key array itself is always cloned (that is, a new array is created),
913
+ * but the individual keys inside the array are only cloned if this parameter is true.
911
914
  * @returns Cloned animation
912
915
  */
913
- clone() {
916
+ clone(cloneKeys = false) {
914
917
  const clone = new Animation(this.name, this.targetPropertyPath.join("."), this.framePerSecond, this.dataType, this.loopMode);
915
918
  clone.enableBlending = this.enableBlending;
916
919
  clone.blendingSpeed = this.blendingSpeed;
917
920
  if (this._keys) {
918
- clone.setKeys(this._keys);
921
+ clone.setKeys(this._keys, false, cloneKeys);
919
922
  }
920
923
  if (this._ranges) {
921
924
  clone._ranges = {};
@@ -933,9 +936,30 @@ export class Animation {
933
936
  * Sets the key frames of the animation
934
937
  * @param values The animation key frames to set
935
938
  * @param dontClone Whether to clone the keys or not (default is false, so the array of keys is cloned)
939
+ * @param cloneKeys Whether to clone the individual keys inside the array or not (default is false). If true, each key object inside the array will be cloned, and the fields
940
+ * that have a clone() method will be cloned by calling that method.
936
941
  */
937
- setKeys(values, dontClone = false) {
938
- this._keys = !dontClone ? values.slice(0) : values;
942
+ setKeys(values, dontClone = false, cloneKeys = false) {
943
+ if (!dontClone) {
944
+ this._keys = values.slice(0);
945
+ if (cloneKeys) {
946
+ for (let i = 0; i < this._keys.length; i++) {
947
+ const key = this._keys[i];
948
+ this._keys[i] = {
949
+ frame: key.frame,
950
+ value: key.value.clone ? key.value.clone() : key.value,
951
+ inTangent: key.inTangent && key.inTangent.clone ? key.inTangent.clone() : key.inTangent,
952
+ outTangent: key.outTangent && key.outTangent.clone ? key.outTangent.clone() : key.outTangent,
953
+ interpolation: key.interpolation,
954
+ lockedTangent: key.lockedTangent,
955
+ easingFunction: key.easingFunction,
956
+ };
957
+ }
958
+ }
959
+ }
960
+ else {
961
+ this._keys = values;
962
+ }
939
963
  }
940
964
  /**
941
965
  * Creates a key for the frame passed as a parameter and adds it to the animation IF a key doesn't already exist for that frame