@woosh/meep-engine 2.43.25 → 2.43.27

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.
@@ -18,6 +18,8 @@ export default class Quaternion {
18
18
 
19
19
  equals(other: { x: number, y: number, z: number, w: number }): boolean
20
20
 
21
+ slerp(other:Quaternion,t:number):void
22
+
21
23
  normalize(): void
22
24
 
23
25
  __setThreeEuler(threeEuler: any): void
@@ -44,4 +46,6 @@ export default class Quaternion {
44
46
  toJSON(): any
45
47
 
46
48
  fromJSON(j: any): void
49
+
50
+ asArray(): number[]
47
51
  }
@@ -1609,6 +1609,10 @@ class Quaternion {
1609
1609
  return result;
1610
1610
  }
1611
1611
 
1612
+ asArray() {
1613
+ return [this.x, this.y, this.z, this.w];
1614
+ }
1615
+
1612
1616
  /**
1613
1617
  *
1614
1618
  * @param {Quaternion} other
@@ -12,4 +12,6 @@ export default class Vector1 {
12
12
  isZero(): boolean
13
13
 
14
14
  process(callback: (x) => any): void
15
+
16
+ asArray(): number[]
15
17
  }
@@ -236,6 +236,10 @@ class Vector1 extends Number {
236
236
  array[offset] = this.x;
237
237
  }
238
238
 
239
+ asArray(){
240
+ return [this.x];
241
+ }
242
+
239
243
  /**
240
244
  *
241
245
  * @param {BinaryBuffer} buffer
@@ -35,4 +35,6 @@ export default class Vector2 {
35
35
  distanceTo(other: Vector2): number
36
36
 
37
37
  isZero(): boolean
38
+
39
+ asArray():number[]
38
40
  }
@@ -63,6 +63,14 @@ class Vector2 {
63
63
  array[offset + 1] = this.y;
64
64
  }
65
65
 
66
+ asArray(){
67
+ const r = [];
68
+
69
+ this.writeToArray(r,0);
70
+
71
+ return r;
72
+ }
73
+
66
74
  /**
67
75
  *
68
76
  * @param {number} x
@@ -91,6 +91,8 @@ export default class Vector3 implements Vector3Like {
91
91
 
92
92
  writeToArray(array: number[] | ArrayLike<number>, offset: number): void
93
93
 
94
+ asArray():number[]
95
+
94
96
  static distance(a: Vector3Like, b: Vector3Like): number
95
97
 
96
98
  static dot(a: Vector3Like, b: Vector3Like): number
@@ -57,6 +57,14 @@ class Vector3 {
57
57
  array[offset + 2] = this.z;
58
58
  }
59
59
 
60
+ asArray(){
61
+ const r = [];
62
+
63
+ this.writeToArray(r,0);
64
+
65
+ return r;
66
+ }
67
+
60
68
  /**
61
69
  *
62
70
  * @param {Number} x
@@ -29,5 +29,7 @@ export default class Vector4 {
29
29
 
30
30
  writeToArray(array:ArrayLike<number>, offset:number):void
31
31
 
32
+ asArray(): number[]
33
+
32
34
  threeApplyMatrix4(matrix: Matrix4): void
33
35
  }
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.25",
8
+ "version": "2.43.27",
9
9
  "dependencies": {
10
10
  "gl-matrix": "3.4.3",
11
11
  "fast-levenshtein": "2.0.6",