@woosh/meep-engine 2.48.16 → 2.48.17

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.
@@ -131,7 +131,7 @@ TransformContainer.prototype.link = function (editor, transform) {
131
131
 
132
132
  //set surrogate transform to match component
133
133
  surrogate.position.copy(transform.position);
134
- transform.rotation.__setThreeEuler(surrogate.rotation);
134
+ transform.rotation.__setFromEuler(surrogate.rotation.x, surrogate.rotation.y, surrogate.rotation.z, surrogate.rotation.order);
135
135
  surrogate.quaternion.copy(transform.rotation);
136
136
  surrogate.scale.copy(transform.scale);
137
137
 
@@ -159,7 +159,9 @@ TransformContainer.prototype.link = function (editor, transform) {
159
159
 
160
160
  if (allowWriteToSurrogate) {
161
161
  const rotation = transform.rotation;
162
- rotation.__setThreeEuler(surrogate.rotation);
162
+
163
+ rotation.__setFromEuler(surrogate.rotation.x, surrogate.rotation.y, surrogate.rotation.z, surrogate.rotation.order);
164
+
163
165
  surrogate.quaternion.set(rotation.x, rotation.y, rotation.z, rotation.w);
164
166
  }
165
167
 
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "description": "Fully featured ECS game engine written in JavaScript",
6
6
  "type": "module",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.48.16",
8
+ "version": "2.48.17",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -26,7 +26,7 @@ export default class Quaternion {
26
26
  copy(other: ThreeQuaternion): void
27
27
  copy(other: { x: number, y: number, z: number, w: number }): void
28
28
 
29
- clone():Quaternion
29
+ clone(): Quaternion
30
30
 
31
31
  equals(other: { x: number, y: number, z: number, w: number }): boolean
32
32
 
@@ -38,6 +38,8 @@ export default class Quaternion {
38
38
 
39
39
  setFromRotationMatrix(m: Matrix4): void
40
40
 
41
+ setRotationMatrix(matrix: ArrayLike<number>): void
42
+
41
43
  decodeFromUint32(uint: number): void
42
44
 
43
45
  _lookRotation(forward_x: number, forward_y: number, forward_z: number, up_x: number, up_y: number, up_z: number): void
@@ -665,14 +665,14 @@ class Quaternion {
665
665
  * @param {Matrix4} m
666
666
  */
667
667
  threeSetRotationMatrix(m) {
668
- this.__setFromRotationMatrix(m.elements);
668
+ throw new Error('Deprecated');
669
669
  }
670
670
 
671
671
  /**
672
- *
673
- * @param {Array.<Number>} elements
672
+ * Read out rotation into a matrix
673
+ * @param {Array<Number>} elements
674
674
  */
675
- __setRotationMatrix(elements) {
675
+ setRotationMatrix(elements) {
676
676
  const x = this.x;
677
677
  const y = this.y;
678
678
  const z = this.z;
@@ -1,11 +0,0 @@
1
- /**
2
- *
3
- * @param {Object3D|THREE.Object3D} m
4
- * @param {Quaternion} rotation
5
- */
6
- export function setThreeObjectRotation(m, rotation) {
7
-
8
- rotation.__setThreeEuler(m.rotation);
9
- m.quaternion.set(rotation.x, rotation.y, rotation.z, rotation.w);
10
-
11
- }