@woosh/meep-engine 2.43.31 → 2.43.32
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/core/geom/Quaternion.d.ts +3 -1
- package/core/geom/Quaternion.js +14 -4
- package/package.json +1 -1
|
@@ -37,7 +37,7 @@ export default class Quaternion {
|
|
|
37
37
|
|
|
38
38
|
decodeFromUint32(uint: number): void
|
|
39
39
|
|
|
40
|
-
_lookRotation(forward_x: number, forward_y: number, forward_z: number, up_x: number, up_y: number, up_z: number): void
|
|
40
|
+
_lookRotation(forward_x: number, forward_y: number, forward_z: number, up_x: number, up_y: number, up_z: number): void
|
|
41
41
|
|
|
42
42
|
lookRotation(v3: Vector3Like, up?: Vector3Like): void
|
|
43
43
|
|
|
@@ -53,6 +53,8 @@ export default class Quaternion {
|
|
|
53
53
|
|
|
54
54
|
multiplyQuaternions(a: Quaternion, b: Quaternion): void
|
|
55
55
|
|
|
56
|
+
angleTo(other: Quaternion): number
|
|
57
|
+
|
|
56
58
|
toJSON(): any
|
|
57
59
|
|
|
58
60
|
fromJSON(j: any): void
|
package/core/geom/Quaternion.js
CHANGED
|
@@ -282,9 +282,9 @@ class Quaternion {
|
|
|
282
282
|
}
|
|
283
283
|
|
|
284
284
|
/**
|
|
285
|
-
*
|
|
285
|
+
* Returns angle between this orientation and another
|
|
286
286
|
* @param {Quaternion} other
|
|
287
|
-
* @return {number}
|
|
287
|
+
* @return {number} angle in radians
|
|
288
288
|
*/
|
|
289
289
|
angleTo(other) {
|
|
290
290
|
//compute inverse
|
|
@@ -451,12 +451,22 @@ class Quaternion {
|
|
|
451
451
|
this.set(0, 0, 0, 1);
|
|
452
452
|
} else {
|
|
453
453
|
const m = 1 / l;
|
|
454
|
-
this.multiplyScalar(m
|
|
454
|
+
this.multiplyScalar(m);
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
457
|
|
|
458
|
+
/**
|
|
459
|
+
*
|
|
460
|
+
* @param {number} val
|
|
461
|
+
* @return {Quaternion}
|
|
462
|
+
*/
|
|
458
463
|
multiplyScalar(val) {
|
|
459
|
-
return this.set(
|
|
464
|
+
return this.set(
|
|
465
|
+
this.x * val,
|
|
466
|
+
this.y * val,
|
|
467
|
+
this.z * val,
|
|
468
|
+
this.w * val
|
|
469
|
+
);
|
|
460
470
|
}
|
|
461
471
|
|
|
462
472
|
/**
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"productName": "Meep",
|
|
6
6
|
"description": "production-ready JavaScript game engine based on Entity Component System Architecture",
|
|
7
7
|
"author": "Alexander Goldring",
|
|
8
|
-
"version": "2.43.
|
|
8
|
+
"version": "2.43.32",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"gl-matrix": "3.4.3",
|
|
11
11
|
"fast-levenshtein": "2.0.6",
|