@woosh/meep-engine 2.119.43 → 2.119.44

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.
Files changed (22) hide show
  1. package/package.json +1 -1
  2. package/src/core/geom/3d/eulerAnglesFromMatrix.js +4 -4
  3. package/src/core/geom/3d/normal/spherical/sphere_map_transform.js +2 -2
  4. package/src/core/geom/3d/tetrahedra/TetrahedralMesh.d.ts +1 -2
  5. package/src/core/geom/3d/tetrahedra/TetrahedralMesh.d.ts.map +1 -1
  6. package/src/core/geom/3d/tetrahedra/TetrahedralMesh.js +1 -2
  7. package/src/core/geom/Vector2.js +2 -2
  8. package/src/core/geom/vec2/v2_angle_between.js +2 -2
  9. package/src/core/geom/vec2/v2_distance.d.ts.map +1 -1
  10. package/src/core/geom/vec2/v2_distance.js +2 -3
  11. package/src/core/geom/vec3/serialization/v3_binary_equality_decode.d.ts.map +1 -0
  12. package/src/core/geom/vec3/serialization/v3_binary_equality_encode.d.ts.map +1 -0
  13. package/src/engine/ecs/transform/TransformSerializationAdapter.js +2 -2
  14. package/src/core/geom/vec2/v2_magnitude.d.ts +0 -6
  15. package/src/core/geom/vec2/v2_magnitude.d.ts.map +0 -1
  16. package/src/core/geom/vec2/v2_magnitude.js +0 -6
  17. package/src/core/geom/vec3/v3_binary_equality_decode.d.ts.map +0 -1
  18. package/src/core/geom/vec3/v3_binary_equality_encode.d.ts.map +0 -1
  19. /package/src/core/geom/vec3/{v3_binary_equality_decode.d.ts → serialization/v3_binary_equality_decode.d.ts} +0 -0
  20. /package/src/core/geom/vec3/{v3_binary_equality_decode.js → serialization/v3_binary_equality_decode.js} +0 -0
  21. /package/src/core/geom/vec3/{v3_binary_equality_encode.d.ts → serialization/v3_binary_equality_encode.d.ts} +0 -0
  22. /package/src/core/geom/vec3/{v3_binary_equality_encode.js → serialization/v3_binary_equality_encode.js} +0 -0
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.119.43",
8
+ "version": "2.119.44",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -1,4 +1,4 @@
1
- import { v2_magnitude } from "../vec2/v2_magnitude.js";
1
+ import { v2_length } from "../vec2/v2_length.js";
2
2
 
3
3
 
4
4
  /**
@@ -62,10 +62,10 @@ export function eulerAnglesFromMatrix(
62
62
  } else {
63
63
  res[0] += Math.PI;
64
64
  }
65
- const s2 = v2_magnitude(coeff(m4, j, i), coeff(m4, k, i));
65
+ const s2 = v2_length(coeff(m4, j, i), coeff(m4, k, i));
66
66
  res[1] = -atan2(s2, coeff(m4, i, i));
67
67
  } else {
68
- const s2 = v2_magnitude(coeff(m4, j, i), coeff(m4, k, i));
68
+ const s2 = v2_length(coeff(m4, j, i), coeff(m4, k, i));
69
69
  res[1] = atan2(s2, coeff(m4, i, i));
70
70
  }
71
71
 
@@ -88,7 +88,7 @@ export function eulerAnglesFromMatrix(
88
88
 
89
89
  res[0] = atan2(coeff(m4, j, k), coeff(m4, k, k));
90
90
 
91
- const c2 = v2_magnitude(coeff(m4, i, i), coeff(m4, i, j));
91
+ const c2 = v2_length(coeff(m4, i, i), coeff(m4, i, j));
92
92
 
93
93
  if ((odd && res[0] < 0) || ((~odd) && res[0] > 0)) {
94
94
  if (res[0] > 0) {
@@ -1,4 +1,4 @@
1
- import { v2_magnitude } from "../../../vec2/v2_magnitude.js";
1
+ import { v2_length } from "../../../vec2/v2_length.js";
2
2
  import { v3_dot } from "../../../vec3/v3_dot.js";
3
3
 
4
4
  /*
@@ -32,7 +32,7 @@ half3 decode (half4 enc, float3 view)
32
32
  * @param {number} z
33
33
  */
34
34
  export function encode_unit_to_spheremap(output, output_offset, x, y, z) {
35
- const length_xy = v2_magnitude(x, y);
35
+ const length_xy = v2_length(x, y);
36
36
 
37
37
  const norm_xy_x = x / length_xy;
38
38
  const norm_xy_y = y / length_xy;
@@ -199,14 +199,13 @@ export class TetrahedralMesh {
199
199
  allocate(): number;
200
200
  /**
201
201
  *
202
- * @param {number[]|Float32Array} points
203
202
  * @param {number} a
204
203
  * @param {number} b
205
204
  * @param {number} c
206
205
  * @param {number} d
207
206
  * @returns {number} index of the new tetrahedron
208
207
  */
209
- append(points: number[] | Float32Array, a: number, b: number, c: number, d: number): number;
208
+ append(a: number, b: number, c: number, d: number): number;
210
209
  /**
211
210
  * Sets back-links on neighbours to this tet to INVALID_NEIGHBOUR basically making them into mesh surface
212
211
  * This is a useful method for when you want to completely remove a given tet from the mesh to make sure that no dangling references will remain
@@ -1 +1 @@
1
- {"version":3,"file":"TetrahedralMesh.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/tetrahedra/TetrahedralMesh.js"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH,qCAFU,MAAM,CAEkD;AAElE;;;GAGG;AACH,gCAFU,MAAM,CAE4B;AAE5C;;;GAGG;AACH,4BAFU,MAAM,CAEwB;AAoBxC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH;IACI;;;OAGG;IACH,2BAFW,MAAM,EAqDhB;IAhDG;;;;OAIG;IACH,iBAAsE;IAEtE;;;;OAIG;IACH,sBAAmD;IAEnD;;;;OAIG;IACH,eAAyC;IAEzC;;;;OAIG;IACH,mBAA8B;IAE9B;;;;OAIG;IACH,mBAAmB;IAEnB;;;;OAIG;IACH,eAAgB;IAEhB;;;;OAIG;IACH,uBAAuB;IAI3B;;;;;OAKG;IACH,+BAEC;IAED;;;;;OAKG;IACH,2BAEC;IAED;;;;OAIG;IACH,2CAUC;IAED;;;;OAIG;IACH,WAFY,MAAM,EAAE,CAYnB;IAED;;;OAGG;IACH,cAWC;IAED;;;OAGG;IACH,sBAFW,MAAM,QA8BhB;IAED;;;OAGG;IACH,eAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,QAFY,MAAM,CAMjB;IAED;;;;OAIG;IACH,oBAEC;IAGD;;;;OAIG;IACH,qBAYC;IAED;;;OAGG;IACH,yBAFW,MAAM,QAWhB;IAED;;;;OAIG;IACH,YAHW,MAAM,GACL,OAAO,CAiBlB;IAED;;;;;OAKG;IACH,0BAJW,MAAM,mBACN,MAAM,GACJ,MAAM,CAYlB;IAED;;;;;OAKG;IACH,0BAJW,MAAM,mBACN,MAAM,aACN,MAAM,QAchB;IAGD;;;;;OAKG;IACH,0BAJW,MAAM,eACN,MAAM,GACJ,MAAM,CAYlB;IAED;;;;;OAKG;IACH,0BAJW,MAAM,eACN,MAAM,UACN,MAAM,QAiBhB;IAED;;;;;OAKG;IACH,uBAJW,MAAM,UACN,MAAM,GACL,OAAO,CAUlB;IAGD;;;;OAIG;IACH,YAFY,MAAM,CA4BjB;IAED;;;;;;;;OAQG;IACH,eAPW,MAAM,EAAE,GAAC,YAAY,KACrB,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,GACJ,MAAM,CAqBlB;IAED;;;;OAIG;IACH,wBAFW,MAAM,QAmBhB;IAED;;;;OAIG;IACH,oBAFW,MAAM,QAmBhB;IAED;;;;;OAKG;IACH,2CAHW,MAAM,aACN,MAAM,QAwBhB;IAED;;;;;;;;OAQG;IACH,8BAPW,MAAM,KACN,MAAM,KACN,MAAM,UACN,MAAM,EAAE,sBACR,MAAM,GACJ,MAAM,CA8DlB;IAGD;;;;;OAKG;IACH,uBAHW,MAAM,qBACN,MAAM,QA0ChB;IAED;;;;OAIG;IACH,WAFa,MAAM,CA2ClB;IAED;;;OAGG;IACH,kBAFW,YAAY,QAUtB;IAED;;;OAGG;IACH,oBAFW,YAAY,QAiBtB;IAED;;;OAGG;IACH,oBAFY,MAAM,CAYjB;IAED;;;OAGG;IACH,wBAFW,MAAM,QAUhB;IAGL;;;OAGG;IACH,4BAFU,OAAO,CAE0B;CAN1C;6BA1xB4B,iCAAiC"}
1
+ {"version":3,"file":"TetrahedralMesh.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/tetrahedra/Tetr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IACH,UANW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,GACJ,MAAM,CAqBlB;IAED;;;;OAIG;IACH,wBAFW,MAAM,QAmBhB;IAED;;;;OAIG;IACH,oBAFW,MAAM,QAmBhB;IAED;;;;;OAKG;IACH,2CAHW,MAAM,aACN,MAAM,QAwBhB;IAED;;;;;;;;OAQG;IACH,8BAPW,MAAM,KACN,MAAM,KACN,MAAM,UACN,MAAM,EAAE,sBACR,MAAM,GACJ,MAAM,CA8DlB;IAGD;;;;;OAKG;IACH,uBAHW,MAAM,qBACN,MAAM,QA0ChB;IAED;;;;OAIG;IACH,WAFa,MAAM,CA2ClB;IAED;;;OAGG;IACH,kBAFW,YAAY,QAUtB;IAED;;;OAGG;IACH,oBAFW,YAAY,QAiBtB;IAED;;;OAGG;IACH,oBAFY,MAAM,CAYjB;IAED;;;OAGG;IACH,wBAFW,MAAM,QAUhB;IAGL;;;OAGG;IACH,4BAFU,OAAO,CAE0B;CAN1C;6BAzxB4B,iCAAiC"}
@@ -457,14 +457,13 @@ export class TetrahedralMesh {
457
457
 
458
458
  /**
459
459
  *
460
- * @param {number[]|Float32Array} points
461
460
  * @param {number} a
462
461
  * @param {number} b
463
462
  * @param {number} c
464
463
  * @param {number} d
465
464
  * @returns {number} index of the new tetrahedron
466
465
  */
467
- append(points, a, b, c, d) {
466
+ append( a, b, c, d) {
468
467
  const tetra_index = this.allocate();
469
468
 
470
469
  const address = tetra_index * LAYOUT_TETRA_BYTE_SIZE;
@@ -14,8 +14,8 @@ import { min2 } from "../math/min2.js";
14
14
  import { computeHashFloat } from "../primitives/numbers/computeHashFloat.js";
15
15
  import { v2_distance } from "./vec2/v2_distance.js";
16
16
  import { v2_dot } from "./vec2/v2_dot.js";
17
+ import { v2_length } from "./vec2/v2_length.js";
17
18
  import { v2_length_sqr } from "./vec2/v2_length_sqr.js";
18
- import { v2_magnitude } from "./vec2/v2_magnitude.js";
19
19
 
20
20
  class Vector2 {
21
21
  /**
@@ -525,7 +525,7 @@ class Vector2 {
525
525
  * @returns {number}
526
526
  */
527
527
  length() {
528
- return v2_magnitude(this.x, this.y);
528
+ return v2_length(this.x, this.y);
529
529
  }
530
530
 
531
531
  /**
@@ -1,6 +1,6 @@
1
1
  import { clamp } from "../../math/clamp.js";
2
2
  import { v2_dot } from "./v2_dot.js";
3
- import { v2_magnitude } from "./v2_magnitude.js";
3
+ import { v2_length } from "./v2_length.js";
4
4
 
5
5
  /**
6
6
  *
@@ -12,7 +12,7 @@ import { v2_magnitude } from "./v2_magnitude.js";
12
12
  */
13
13
  export function v2_angle_between(x0, y0, x1, y1) {
14
14
  const d = v2_dot(x0, y0, x1, y1);
15
- const l = v2_magnitude(x0, y0) * v2_magnitude(x1, y1);
15
+ const l = v2_length(x0, y0) * v2_length(x1, y1);
16
16
 
17
17
  const theta = clamp(d / l, -1, 1);
18
18
 
@@ -1 +1 @@
1
- {"version":3,"file":"v2_distance.d.ts","sourceRoot":"","sources":["../../../../../src/core/geom/vec2/v2_distance.js"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,gCANW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,GACJ,MAAM,CAUlB"}
1
+ {"version":3,"file":"v2_distance.d.ts","sourceRoot":"","sources":["../../../../../src/core/geom/vec2/v2_distance.js"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,gCANW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,GACJ,MAAM,CAUlB"}
@@ -1,6 +1,5 @@
1
1
  import { assert } from "../../assert.js";
2
-
3
- import { v2_magnitude } from "./v2_magnitude.js";
2
+ import { v2_length } from "./v2_length.js";
4
3
 
5
4
  /**
6
5
  *
@@ -17,5 +16,5 @@ export function v2_distance(x0, y0, x1, y1) {
17
16
  assert.isNumber(x1, 'x0');
18
17
  assert.isNumber(y1, 'x0');
19
18
 
20
- return v2_magnitude(x1 - x0, y1 - y0);
19
+ return v2_length(x1 - x0, y1 - y0);
21
20
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v3_binary_equality_decode.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/vec3/serialization/v3_binary_equality_decode.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wEAHW,MAAM,EAAE,iBACR,MAAM,QAuChB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v3_binary_equality_encode.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/vec3/serialization/v3_binary_equality_encode.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,mEAJW,MAAM,KACN,MAAM,KACN,MAAM,QAyChB"}
@@ -1,7 +1,7 @@
1
1
  import { quat_decode_from_uint32 } from "../../../core/geom/3d/quaternion/quat_decode_from_uint32.js";
2
2
  import { quat_encode_to_uint32 } from "../../../core/geom/3d/quaternion/quat_encode_to_uint32.js";
3
- import { v3_binary_equality_decode } from "../../../core/geom/vec3/v3_binary_equality_decode.js";
4
- import { v3_binary_equality_encode } from "../../../core/geom/vec3/v3_binary_equality_encode.js";
3
+ import { v3_binary_equality_decode } from "../../../core/geom/vec3/serialization/v3_binary_equality_decode.js";
4
+ import { v3_binary_equality_encode } from "../../../core/geom/vec3/serialization/v3_binary_equality_encode.js";
5
5
  import { BinaryClassSerializationAdapter } from "../storage/binary/BinaryClassSerializationAdapter.js";
6
6
  import { Transform } from "./Transform.js";
7
7
 
@@ -1,6 +0,0 @@
1
- /**
2
- * @deprecated
3
- */
4
- export const v2_magnitude: typeof v2_length;
5
- import { v2_length } from "./v2_length.js";
6
- //# sourceMappingURL=v2_magnitude.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"v2_magnitude.d.ts","sourceRoot":"","sources":["../../../../../src/core/geom/vec2/v2_magnitude.js"],"names":[],"mappings":"AAEA;;GAEG;AACH,4CAAsC;0BALZ,gBAAgB"}
@@ -1,6 +0,0 @@
1
- import { v2_length } from "./v2_length.js";
2
-
3
- /**
4
- * @deprecated
5
- */
6
- export const v2_magnitude = v2_length;
@@ -1 +0,0 @@
1
- {"version":3,"file":"v3_binary_equality_decode.d.ts","sourceRoot":"","sources":["../../../../../src/core/geom/vec3/v3_binary_equality_decode.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wEAHW,MAAM,EAAE,iBACR,MAAM,QAuChB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"v3_binary_equality_encode.d.ts","sourceRoot":"","sources":["../../../../../src/core/geom/vec3/v3_binary_equality_encode.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,mEAJW,MAAM,KACN,MAAM,KACN,MAAM,QAyChB"}