@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.
- package/Animations/animationGroup.d.ts +10 -0
- package/Animations/animationGroup.js +19 -0
- package/Animations/animationGroup.js.map +1 -1
- package/Animations/runtimeAnimation.d.ts +10 -10
- package/Animations/runtimeAnimation.js +31 -30
- package/Animations/runtimeAnimation.js.map +1 -1
- package/Debug/physicsViewer.js +4 -0
- package/Debug/physicsViewer.js.map +1 -1
- package/DeviceInput/webDeviceInputSystem.js +3 -3
- package/DeviceInput/webDeviceInputSystem.js.map +1 -1
- package/Engines/nativeEngine.js +15 -13
- package/Engines/nativeEngine.js.map +1 -1
- package/Engines/thinEngine.js +2 -2
- package/Engines/thinEngine.js.map +1 -1
- package/Lights/spotLight.js +2 -2
- package/Lights/spotLight.js.map +1 -1
- package/Materials/Node/nodeMaterial.js +1 -0
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.d.ts +3 -3
- package/Materials/PBR/pbrBaseMaterial.js +3 -3
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/PBR/pbrMaterial.d.ts +3 -3
- package/Materials/PBR/pbrMaterial.js +3 -3
- package/Materials/PBR/pbrMaterial.js.map +1 -1
- package/Materials/Textures/rawTexture2DArray.d.ts +4 -2
- package/Materials/Textures/rawTexture2DArray.js +3 -2
- package/Materials/Textures/rawTexture2DArray.js.map +1 -1
- package/Materials/Textures/rawTexture3D.d.ts +4 -2
- package/Materials/Textures/rawTexture3D.js +3 -2
- package/Materials/Textures/rawTexture3D.js.map +1 -1
- package/Materials/effectRenderer.d.ts +2 -0
- package/Materials/effectRenderer.js +4 -2
- package/Materials/effectRenderer.js.map +1 -1
- package/Materials/meshDebugPluginMaterial.js +6 -6
- package/Materials/meshDebugPluginMaterial.js.map +1 -1
- package/Maths/math.color.d.ts +3 -3
- package/Maths/math.color.js +3 -3
- package/Maths/math.color.js.map +1 -1
- package/Maths/math.vector.js +11 -7
- package/Maths/math.vector.js.map +1 -1
- package/Misc/precisionDate.js +2 -2
- package/Misc/precisionDate.js.map +1 -1
- package/NOTICE.md +2 -0
- package/Physics/v1/Plugins/ammoJSPlugin.d.ts +1 -1
- package/Physics/v1/Plugins/ammoJSPlugin.js.map +1 -1
- package/Physics/v1/Plugins/cannonJSPlugin.d.ts +1 -1
- package/Physics/v1/Plugins/cannonJSPlugin.js +1 -1
- package/Physics/v1/Plugins/cannonJSPlugin.js.map +1 -1
- package/Physics/v1/Plugins/oimoJSPlugin.js.map +1 -1
- package/Physics/v2/Plugins/havokPlugin.js +6 -0
- package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
- package/Physics/v2/physicsConstraint.d.ts +28 -2
- package/Physics/v2/physicsConstraint.js +21 -1
- package/Physics/v2/physicsConstraint.js.map +1 -1
- package/Physics/v2/physicsShape.d.ts +22 -19
- package/Physics/v2/physicsShape.js +22 -19
- package/Physics/v2/physicsShape.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBlockAmbientOcclusion.js +1 -1
- package/Shaders/ShadersInclude/pbrBlockAmbientOcclusion.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBlockAnisotropic.js +1 -1
- package/Shaders/ShadersInclude/pbrBlockAnisotropic.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBlockClearcoat.js +9 -1
- package/Shaders/ShadersInclude/pbrBlockClearcoat.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBlockReflectivity.js +10 -1
- package/Shaders/ShadersInclude/pbrBlockReflectivity.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBlockSheen.js +5 -1
- package/Shaders/ShadersInclude/pbrBlockSheen.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBlockSubSurface.js +5 -1
- package/Shaders/ShadersInclude/pbrBlockSubSurface.js.map +1 -1
- package/package.json +3 -2
package/Maths/math.vector.js
CHANGED
|
@@ -1072,13 +1072,17 @@ export class Vector3 {
|
|
|
1072
1072
|
* @returns the result
|
|
1073
1073
|
*/
|
|
1074
1074
|
applyRotationQuaternionToRef(q, result) {
|
|
1075
|
-
|
|
1076
|
-
const
|
|
1077
|
-
const
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
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
|
}
|