@vertexvis/geometry 0.12.0-canary.6 → 0.12.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.
- package/README.md +1 -1
- package/dist/bundle.cjs.js +8 -7
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.esm.js +8 -7
- package/dist/bundle.esm.js.map +1 -1
- package/dist/cdn/bundle.esm.js +8 -7
- package/dist/cdn/bundle.esm.js.map +1 -1
- package/dist/cdn/bundle.esm.min.js +1 -1
- package/dist/cdn/bundle.esm.min.js.map +1 -1
- package/dist/cdn/matrix4.d.ts +5 -4
- package/dist/cdn/quaternion.d.ts +1 -1
- package/dist/matrix4.d.ts +5 -4
- package/dist/quaternion.d.ts +1 -1
- package/package.json +8 -8
package/dist/cdn/bundle.esm.js
CHANGED
|
@@ -280,13 +280,14 @@ function makeTranslation(translation) {
|
|
|
280
280
|
* Creates a rotation matrix.
|
|
281
281
|
*
|
|
282
282
|
* ```
|
|
283
|
-
* 1-2y²-2z², 2xy
|
|
284
|
-
* 2xy
|
|
285
|
-
* 2xz
|
|
283
|
+
* 1-2y²-2z², 2xy-2zw, 2xz+2yw, 0,
|
|
284
|
+
* 2xy+2zw, 1-2x²-2z², 2yz-2xw, 0,
|
|
285
|
+
* 2xz-2yw, 2yz+2xw, 1-2x²-2y², 0,
|
|
286
286
|
* 0, 0, 0, 1,
|
|
287
287
|
* ```
|
|
288
288
|
*
|
|
289
289
|
* @param rotation A quaternion representing the rotation.
|
|
290
|
+
* @see https://en.wikipedia.org/wiki/Rotation_matrix#Quaternion
|
|
290
291
|
* @returns A rotation matrix.
|
|
291
292
|
*/
|
|
292
293
|
function makeRotation(rotation) {
|
|
@@ -297,9 +298,9 @@ function makeRotation(rotation) {
|
|
|
297
298
|
var wx = w * x2, wy = w * y2, wz = w * z2;
|
|
298
299
|
/* eslint-disable prettier/prettier */
|
|
299
300
|
return [
|
|
300
|
-
1 - (yy + zz), xy
|
|
301
|
-
xy
|
|
302
|
-
xz
|
|
301
|
+
1 - (yy + zz), xy + wz, xz - wy, 0,
|
|
302
|
+
xy - wz, 1 - (xx + zz), yz + wx, 0,
|
|
303
|
+
xz + wy, yz - wx, 1 - (xx + yy), 0,
|
|
303
304
|
0, 0, 0, 1
|
|
304
305
|
];
|
|
305
306
|
/* eslint-enable prettier/prettier */
|
|
@@ -1916,7 +1917,7 @@ function intersectLine(plane, line) {
|
|
|
1916
1917
|
return undefined;
|
|
1917
1918
|
}
|
|
1918
1919
|
else {
|
|
1919
|
-
return add(
|
|
1920
|
+
return add(scale$2(t, direction$1), line.start);
|
|
1920
1921
|
}
|
|
1921
1922
|
}
|
|
1922
1923
|
/**
|