@babylonjs/core 6.13.0 → 6.14.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 (70) hide show
  1. package/Animations/animationGroup.d.ts +10 -0
  2. package/Animations/animationGroup.js +19 -0
  3. package/Animations/animationGroup.js.map +1 -1
  4. package/Animations/runtimeAnimation.d.ts +10 -10
  5. package/Animations/runtimeAnimation.js +31 -30
  6. package/Animations/runtimeAnimation.js.map +1 -1
  7. package/Debug/physicsViewer.js +4 -0
  8. package/Debug/physicsViewer.js.map +1 -1
  9. package/DeviceInput/webDeviceInputSystem.js +3 -3
  10. package/DeviceInput/webDeviceInputSystem.js.map +1 -1
  11. package/Engines/nativeEngine.js +15 -13
  12. package/Engines/nativeEngine.js.map +1 -1
  13. package/Engines/thinEngine.js +2 -2
  14. package/Engines/thinEngine.js.map +1 -1
  15. package/Lights/spotLight.js +2 -2
  16. package/Lights/spotLight.js.map +1 -1
  17. package/Materials/Node/nodeMaterial.js +1 -0
  18. package/Materials/Node/nodeMaterial.js.map +1 -1
  19. package/Materials/PBR/pbrBaseMaterial.d.ts +3 -3
  20. package/Materials/PBR/pbrBaseMaterial.js +3 -3
  21. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  22. package/Materials/PBR/pbrMaterial.d.ts +3 -3
  23. package/Materials/PBR/pbrMaterial.js +3 -3
  24. package/Materials/PBR/pbrMaterial.js.map +1 -1
  25. package/Materials/Textures/rawTexture2DArray.d.ts +4 -2
  26. package/Materials/Textures/rawTexture2DArray.js +3 -2
  27. package/Materials/Textures/rawTexture2DArray.js.map +1 -1
  28. package/Materials/Textures/rawTexture3D.d.ts +4 -2
  29. package/Materials/Textures/rawTexture3D.js +3 -2
  30. package/Materials/Textures/rawTexture3D.js.map +1 -1
  31. package/Materials/effectRenderer.d.ts +2 -0
  32. package/Materials/effectRenderer.js +4 -2
  33. package/Materials/effectRenderer.js.map +1 -1
  34. package/Materials/meshDebugPluginMaterial.js +6 -6
  35. package/Materials/meshDebugPluginMaterial.js.map +1 -1
  36. package/Maths/math.color.d.ts +3 -3
  37. package/Maths/math.color.js +3 -3
  38. package/Maths/math.color.js.map +1 -1
  39. package/Maths/math.vector.js +11 -7
  40. package/Maths/math.vector.js.map +1 -1
  41. package/Misc/precisionDate.js +2 -2
  42. package/Misc/precisionDate.js.map +1 -1
  43. package/NOTICE.md +2 -0
  44. package/Physics/v1/Plugins/ammoJSPlugin.d.ts +1 -1
  45. package/Physics/v1/Plugins/ammoJSPlugin.js.map +1 -1
  46. package/Physics/v1/Plugins/cannonJSPlugin.d.ts +1 -1
  47. package/Physics/v1/Plugins/cannonJSPlugin.js +1 -1
  48. package/Physics/v1/Plugins/cannonJSPlugin.js.map +1 -1
  49. package/Physics/v1/Plugins/oimoJSPlugin.js.map +1 -1
  50. package/Physics/v2/Plugins/havokPlugin.js +6 -0
  51. package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
  52. package/Physics/v2/physicsConstraint.d.ts +28 -2
  53. package/Physics/v2/physicsConstraint.js +21 -1
  54. package/Physics/v2/physicsConstraint.js.map +1 -1
  55. package/Physics/v2/physicsShape.d.ts +22 -19
  56. package/Physics/v2/physicsShape.js +22 -19
  57. package/Physics/v2/physicsShape.js.map +1 -1
  58. package/Shaders/ShadersInclude/pbrBlockAmbientOcclusion.js +1 -1
  59. package/Shaders/ShadersInclude/pbrBlockAmbientOcclusion.js.map +1 -1
  60. package/Shaders/ShadersInclude/pbrBlockAnisotropic.js +1 -1
  61. package/Shaders/ShadersInclude/pbrBlockAnisotropic.js.map +1 -1
  62. package/Shaders/ShadersInclude/pbrBlockClearcoat.js +9 -1
  63. package/Shaders/ShadersInclude/pbrBlockClearcoat.js.map +1 -1
  64. package/Shaders/ShadersInclude/pbrBlockReflectivity.js +10 -1
  65. package/Shaders/ShadersInclude/pbrBlockReflectivity.js.map +1 -1
  66. package/Shaders/ShadersInclude/pbrBlockSheen.js +5 -1
  67. package/Shaders/ShadersInclude/pbrBlockSheen.js.map +1 -1
  68. package/Shaders/ShadersInclude/pbrBlockSubSurface.js +5 -1
  69. package/Shaders/ShadersInclude/pbrBlockSubSurface.js.map +1 -1
  70. package/package.json +3 -2
@@ -1072,13 +1072,17 @@ export class Vector3 {
1072
1072
  * @returns the result
1073
1073
  */
1074
1074
  applyRotationQuaternionToRef(q, result) {
1075
- const ix = q._w * this._x + q._y * this._z - q._z * this._y;
1076
- const iy = q._w * this._y + q._z * this._x - q._x * this._z;
1077
- const iz = q._w * this._z + q._x * this._y - q._y * this._x;
1078
- const iw = -q._x * this._x - q._y * this._y - q._z * this._z;
1079
- result._x = ix * q._w + iw * -q._x + iy * -q._z - iz * -q._y;
1080
- result._y = iy * q._w + iw * -q._y + iz * -q._x - ix * -q._z;
1081
- result._z = iz * q._w + iw * -q._z + ix * -q._y - iy * -q._x;
1075
+ // Derived from https://raw.org/proof/vector-rotation-using-quaternions/
1076
+ const vx = this._x, vy = this._y, vz = this._z;
1077
+ const qx = q._x, qy = q._y, qz = q._z, qw = q._w;
1078
+ // t = 2q x v
1079
+ const tx = 2 * (qy * vz - qz * vy);
1080
+ const ty = 2 * (qz * vx - qx * vz);
1081
+ const tz = 2 * (qx * vy - qy * vx);
1082
+ // v + w t + q x t
1083
+ result._x = vx + qw * tx + qy * tz - qz * ty;
1084
+ result._y = vy + qw * ty + qz * tx - qx * tz;
1085
+ result._z = vz + qw * tz + qx * ty - qy * tx;
1082
1086
  result._isDirty = true;
1083
1087
  return result;
1084
1088
  }