@woosh/meep-engine 2.113.8 → 2.113.10
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/build/meep.cjs +18 -18
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +18 -18
- package/package.json +1 -1
- package/src/core/collection/KeyValuePair.d.ts +3 -4
- package/src/core/collection/KeyValuePair.d.ts.map +1 -1
- package/src/core/collection/KeyValuePair.js +0 -1
- package/src/core/geom/3d/plane/plane3_compute_line_segment_intersection.d.ts +12 -12
- package/src/core/geom/3d/plane/plane3_compute_line_segment_intersection.d.ts.map +1 -1
- package/src/core/geom/3d/plane/plane3_compute_line_segment_intersection.js +14 -14
- package/src/core/geom/3d/tetrahedra/tetrahedron_compute_signed_volume.d.ts.map +1 -1
- package/src/core/geom/3d/tetrahedra/tetrahedron_compute_signed_volume.js +1 -32
- package/src/core/geom/3d/triangle/triangle_compute_signed_volume.d.ts +17 -0
- package/src/core/geom/3d/triangle/triangle_compute_signed_volume.d.ts.map +1 -0
- package/src/core/geom/3d/triangle/triangle_compute_signed_volume.js +33 -0
- package/src/core/model/object/ImmutableObjectPool.d.ts.map +1 -1
- package/src/core/model/object/ImmutableObjectPool.js +18 -17
package/build/meep.module.js
CHANGED
|
@@ -82495,7 +82495,6 @@ function readStyleToken(text, cursor, length) {
|
|
|
82495
82495
|
*/
|
|
82496
82496
|
class KeyValuePair {
|
|
82497
82497
|
/**
|
|
82498
|
-
* @template Key, Value
|
|
82499
82498
|
* @param {Key} key
|
|
82500
82499
|
* @param {Value} value
|
|
82501
82500
|
*/
|
|
@@ -97998,26 +97997,27 @@ class ImmutableObjectPool {
|
|
|
97998
97997
|
* @type {Signal<Key,Value>}
|
|
97999
97998
|
*/
|
|
98000
97999
|
onRemoved = new Signal()
|
|
98000
|
+
/**
|
|
98001
|
+
*
|
|
98002
|
+
* @type {HashMap<Key, CacheElement<Key,Value>[]>}
|
|
98003
|
+
*/
|
|
98004
|
+
data = new HashMap();
|
|
98005
|
+
|
|
98006
|
+
/**
|
|
98007
|
+
*
|
|
98008
|
+
* @type {CacheElement<Key,Value>|null}
|
|
98009
|
+
* @private
|
|
98010
|
+
*/
|
|
98011
|
+
__first = null;
|
|
98012
|
+
/**
|
|
98013
|
+
*
|
|
98014
|
+
* @type {CacheElement<Key,Value>|null}
|
|
98015
|
+
* @private
|
|
98016
|
+
*/
|
|
98017
|
+
__last = null;
|
|
98001
98018
|
|
|
98002
98019
|
constructor({ capacity = 100, perKeyCapacity = 10 } = {}) {
|
|
98003
|
-
/**
|
|
98004
|
-
*
|
|
98005
|
-
* @type {HashMap<Key, CacheElement<Key,Value>[]>}
|
|
98006
|
-
*/
|
|
98007
|
-
this.data = new HashMap();
|
|
98008
98020
|
|
|
98009
|
-
/**
|
|
98010
|
-
*
|
|
98011
|
-
* @type {CacheElement<Key,Value>|null}
|
|
98012
|
-
* @private
|
|
98013
|
-
*/
|
|
98014
|
-
this.__first = null;
|
|
98015
|
-
/**
|
|
98016
|
-
*
|
|
98017
|
-
* @type {CacheElement<Key,Value>|null}
|
|
98018
|
-
* @private
|
|
98019
|
-
*/
|
|
98020
|
-
this.__last = null;
|
|
98021
98021
|
|
|
98022
98022
|
/**
|
|
98023
98023
|
* How many items in total the pool can hold
|
package/package.json
CHANGED
|
@@ -3,21 +3,20 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export class KeyValuePair<Key, Value> {
|
|
5
5
|
/**
|
|
6
|
-
* @template Key, Value
|
|
7
6
|
* @param {Key} key
|
|
8
7
|
* @param {Value} value
|
|
9
8
|
*/
|
|
10
|
-
constructor(key:
|
|
9
|
+
constructor(key: Key, value: Value);
|
|
11
10
|
/**
|
|
12
11
|
*
|
|
13
12
|
* @type {Key}
|
|
14
13
|
*/
|
|
15
|
-
key:
|
|
14
|
+
key: Key;
|
|
16
15
|
/**
|
|
17
16
|
*
|
|
18
17
|
* @type {Value}
|
|
19
18
|
*/
|
|
20
|
-
value:
|
|
19
|
+
value: Value;
|
|
21
20
|
/**
|
|
22
21
|
*
|
|
23
22
|
* @param {KeyValuePair} other
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyValuePair.d.ts","sourceRoot":"","sources":["../../../../src/core/collection/KeyValuePair.js"],"names":[],"mappings":"AAAA;;GAEG;AACH;IACI
|
|
1
|
+
{"version":3,"file":"KeyValuePair.d.ts","sourceRoot":"","sources":["../../../../src/core/collection/KeyValuePair.js"],"names":[],"mappings":"AAAA;;GAEG;AACH;IACI;;;OAGG;IACH,iBAHW,GAAG,SACH,KAAK,EAaf;IAVG;;;OAGG;IACH,KAFU,GAAG,CAEC;IACd;;;OAGG;IACH,OAFU,KAAK,CAEG;IAGtB;;;;OAIG;IACH,uCAFY,OAAO,CAKlB;CACJ"}
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
*
|
|
3
3
|
* @param {Float32Array|number[]|vec3} result
|
|
4
4
|
* @param {number} result_offset
|
|
5
|
-
* @param {number} x0
|
|
6
|
-
* @param {number} y0
|
|
7
|
-
* @param {number} z0
|
|
8
|
-
* @param {number} x1
|
|
9
|
-
* @param {number} y1
|
|
10
|
-
* @param {number} z1
|
|
11
|
-
* @param {number}
|
|
12
|
-
* @param {number}
|
|
13
|
-
* @param {number}
|
|
14
|
-
* @param {number}
|
|
15
|
-
* @returns {boolean}
|
|
5
|
+
* @param {number} x0 first point defining line
|
|
6
|
+
* @param {number} y0 first point defining line
|
|
7
|
+
* @param {number} z0 first point defining line
|
|
8
|
+
* @param {number} x1 second point defining line
|
|
9
|
+
* @param {number} y1 second point defining line
|
|
10
|
+
* @param {number} z1 second point defining line
|
|
11
|
+
* @param {number} plane_normal_x
|
|
12
|
+
* @param {number} plane_normal_y
|
|
13
|
+
* @param {number} plane_normal_z
|
|
14
|
+
* @param {number} plane_offset
|
|
15
|
+
* @returns {boolean} if intersection exists, false if line is parallel to the plane
|
|
16
16
|
*/
|
|
17
|
-
export function plane3_compute_line_segment_intersection(result: Float32Array | number[] | vec3, result_offset: number, x0: number, y0: number, z0: number, x1: number, y1: number, z1: number,
|
|
17
|
+
export function plane3_compute_line_segment_intersection(result: Float32Array | number[] | vec3, result_offset: number, x0: number, y0: number, z0: number, x1: number, y1: number, z1: number, plane_normal_x: number, plane_normal_y: number, plane_normal_z: number, plane_offset: number): boolean;
|
|
18
18
|
//# sourceMappingURL=plane3_compute_line_segment_intersection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plane3_compute_line_segment_intersection.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/plane/plane3_compute_line_segment_intersection.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH,iEAdW,YAAY,GAAC,MAAM,EAAE,OAAK,iBAC1B,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,
|
|
1
|
+
{"version":3,"file":"plane3_compute_line_segment_intersection.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/plane/plane3_compute_line_segment_intersection.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH,iEAdW,YAAY,GAAC,MAAM,EAAE,OAAK,iBAC1B,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,kBACN,MAAM,kBACN,MAAM,kBACN,MAAM,gBACN,MAAM,GACJ,OAAO,CAiCnB"}
|
|
@@ -4,36 +4,36 @@ import { v3_dot } from "../../vec3/v3_dot.js";
|
|
|
4
4
|
*
|
|
5
5
|
* @param {Float32Array|number[]|vec3} result
|
|
6
6
|
* @param {number} result_offset
|
|
7
|
-
* @param {number} x0
|
|
8
|
-
* @param {number} y0
|
|
9
|
-
* @param {number} z0
|
|
10
|
-
* @param {number} x1
|
|
11
|
-
* @param {number} y1
|
|
12
|
-
* @param {number} z1
|
|
13
|
-
* @param {number}
|
|
14
|
-
* @param {number}
|
|
15
|
-
* @param {number}
|
|
16
|
-
* @param {number}
|
|
17
|
-
* @returns {boolean}
|
|
7
|
+
* @param {number} x0 first point defining line
|
|
8
|
+
* @param {number} y0 first point defining line
|
|
9
|
+
* @param {number} z0 first point defining line
|
|
10
|
+
* @param {number} x1 second point defining line
|
|
11
|
+
* @param {number} y1 second point defining line
|
|
12
|
+
* @param {number} z1 second point defining line
|
|
13
|
+
* @param {number} plane_normal_x
|
|
14
|
+
* @param {number} plane_normal_y
|
|
15
|
+
* @param {number} plane_normal_z
|
|
16
|
+
* @param {number} plane_offset
|
|
17
|
+
* @returns {boolean} if intersection exists, false if line is parallel to the plane
|
|
18
18
|
*/
|
|
19
19
|
export function plane3_compute_line_segment_intersection(
|
|
20
20
|
result, result_offset,
|
|
21
21
|
x0, y0, z0,
|
|
22
22
|
x1, y1, z1,
|
|
23
|
-
|
|
23
|
+
plane_normal_x, plane_normal_y, plane_normal_z, plane_offset
|
|
24
24
|
) {
|
|
25
25
|
|
|
26
26
|
const directionX = x1 - x0;
|
|
27
27
|
const directionY = y1 - y0;
|
|
28
28
|
const directionZ = z1 - z0;
|
|
29
29
|
|
|
30
|
-
const denom = v3_dot(directionX, directionY, directionZ,
|
|
30
|
+
const denom = v3_dot(directionX, directionY, directionZ, plane_normal_x, plane_normal_y, plane_normal_z);
|
|
31
31
|
|
|
32
32
|
if (denom === 0) {
|
|
33
33
|
return false;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
const p = v3_dot(
|
|
36
|
+
const p = v3_dot(plane_normal_x, plane_normal_y, plane_normal_z, x0, y0, z0) + plane_offset;
|
|
37
37
|
|
|
38
38
|
const t = -p / denom;
|
|
39
39
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tetrahedron_compute_signed_volume.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/tetrahedra/tetrahedron_compute_signed_volume.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tetrahedron_compute_signed_volume.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/tetrahedra/tetrahedron_compute_signed_volume.js"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,0DAPW,UAAU,MAAM,CAAC,GAAC,MAAM,EAAE,GAAC,YAAY,KACvC,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,GACJ,MAAM,CA0ClB"}
|
|
@@ -1,35 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Compute signed volume of a tetrahedron with the last point at the origin
|
|
5
|
-
* @see "EFFICIENT FEATURE EXTRACTION FOR 2D/3D OBJECTS IN MESH REPRESENTATION" by Cha Zhang and Tsuhan Chen
|
|
6
|
-
* @param {number} ax
|
|
7
|
-
* @param {number} ay
|
|
8
|
-
* @param {number} az
|
|
9
|
-
* @param {number} bx
|
|
10
|
-
* @param {number} by
|
|
11
|
-
* @param {number} bz
|
|
12
|
-
* @param {number} cx
|
|
13
|
-
* @param {number} cy
|
|
14
|
-
* @param {number} cz
|
|
15
|
-
* @return {number}
|
|
16
|
-
*/
|
|
17
|
-
function triangle_compute_signed_volume(
|
|
18
|
-
ax, ay, az,
|
|
19
|
-
bx, by, bz,
|
|
20
|
-
cx, cy, cz
|
|
21
|
-
) {
|
|
22
|
-
|
|
23
|
-
const v321 = cx * by * az;
|
|
24
|
-
const v231 = bx * cy * az;
|
|
25
|
-
const v312 = cx * ay * bz;
|
|
26
|
-
const v132 = ax * cy * bz;
|
|
27
|
-
const v213 = bx * ay * cz;
|
|
28
|
-
const v123 = ax * by * cz;
|
|
29
|
-
|
|
30
|
-
return ONE_OVER_SIX * (-v321 + v231 + v312 - v132 - v213 + v123);
|
|
31
|
-
|
|
32
|
-
}
|
|
1
|
+
import { triangle_compute_signed_volume } from "../triangle/triangle_compute_signed_volume.js";
|
|
33
2
|
|
|
34
3
|
|
|
35
4
|
/**
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compute signed volume of a tetrahedron with the last point at the origin
|
|
3
|
+
* Triangle is defined by points A,B,C
|
|
4
|
+
* @see "EFFICIENT FEATURE EXTRACTION FOR 2D/3D OBJECTS IN MESH REPRESENTATION" by Cha Zhang and Tsuhan Chen
|
|
5
|
+
* @param {number} ax
|
|
6
|
+
* @param {number} ay
|
|
7
|
+
* @param {number} az
|
|
8
|
+
* @param {number} bx
|
|
9
|
+
* @param {number} by
|
|
10
|
+
* @param {number} bz
|
|
11
|
+
* @param {number} cx
|
|
12
|
+
* @param {number} cy
|
|
13
|
+
* @param {number} cz
|
|
14
|
+
* @return {number}
|
|
15
|
+
*/
|
|
16
|
+
export function triangle_compute_signed_volume(ax: number, ay: number, az: number, bx: number, by: number, bz: number, cx: number, cy: number, cz: number): number;
|
|
17
|
+
//# sourceMappingURL=triangle_compute_signed_volume.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triangle_compute_signed_volume.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/triangle/triangle_compute_signed_volume.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,mDAXW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,GACL,MAAM,CAiBjB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const ONE_OVER_SIX = 1.0 / 6.0;
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Compute signed volume of a tetrahedron with the last point at the origin
|
|
5
|
+
* Triangle is defined by points A,B,C
|
|
6
|
+
* @see "EFFICIENT FEATURE EXTRACTION FOR 2D/3D OBJECTS IN MESH REPRESENTATION" by Cha Zhang and Tsuhan Chen
|
|
7
|
+
* @param {number} ax
|
|
8
|
+
* @param {number} ay
|
|
9
|
+
* @param {number} az
|
|
10
|
+
* @param {number} bx
|
|
11
|
+
* @param {number} by
|
|
12
|
+
* @param {number} bz
|
|
13
|
+
* @param {number} cx
|
|
14
|
+
* @param {number} cy
|
|
15
|
+
* @param {number} cz
|
|
16
|
+
* @return {number}
|
|
17
|
+
*/
|
|
18
|
+
export function triangle_compute_signed_volume(
|
|
19
|
+
ax, ay, az,
|
|
20
|
+
bx, by, bz,
|
|
21
|
+
cx, cy, cz
|
|
22
|
+
) {
|
|
23
|
+
|
|
24
|
+
const v321 = cx * by * az;
|
|
25
|
+
const v231 = bx * cy * az;
|
|
26
|
+
const v312 = cx * ay * bz;
|
|
27
|
+
const v132 = ax * cy * bz;
|
|
28
|
+
const v213 = bx * ay * cz;
|
|
29
|
+
const v123 = ax * by * cz;
|
|
30
|
+
|
|
31
|
+
return ONE_OVER_SIX * (-v321 + v231 + v312 - v132 - v213 + v123);
|
|
32
|
+
|
|
33
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImmutableObjectPool.d.ts","sourceRoot":"","sources":["../../../../../src/core/model/object/ImmutableObjectPool.js"],"names":[],"mappings":"AAIA;;GAEG;AACH;
|
|
1
|
+
{"version":3,"file":"ImmutableObjectPool.d.ts","sourceRoot":"","sources":["../../../../../src/core/model/object/ImmutableObjectPool.js"],"names":[],"mappings":"AAIA;;GAEG;AACH;IAyBI;;;OAoBC;IA5CD;;;OAGG;IACH,oBAFU,OAAO,GAAG,EAAC,KAAK,CAAC,CAEH;IACxB;;;OAGG;IACH,MAFU,QAAQ,GAAG,EAAE,aAAa,GAAG,EAAC,KAAK,CAAC,EAAE,CAAC,CAE5B;IAErB;;;;OAIG;IACH,gBAAe;IACf;;;;OAIG;IACH,eAAc;IAKV;;;OAGG;IACH,UAFU,MAAM,CAEQ;IAExB;;;OAGG;IACH,gBAFU,MAAM,CAEoB;IAEpC;;;OAGG;IACH,MAFU,MAAM,CAEH;IAGjB,uBAuBC;IAED;;;OAGG;IACH,cAIC;IAED;;;;OAIG;IACH,wBA0BC;IAED,mCA2CC;CACJ;mBApKkB,+BAA+B;wBAD1B,iCAAiC;6BAD5B,6BAA6B"}
|
|
@@ -11,26 +11,27 @@ export class ImmutableObjectPool {
|
|
|
11
11
|
* @type {Signal<Key,Value>}
|
|
12
12
|
*/
|
|
13
13
|
onRemoved = new Signal()
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @type {HashMap<Key, CacheElement<Key,Value>[]>}
|
|
17
|
+
*/
|
|
18
|
+
data = new HashMap();
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {CacheElement<Key,Value>|null}
|
|
23
|
+
* @private
|
|
24
|
+
*/
|
|
25
|
+
__first = null;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {CacheElement<Key,Value>|null}
|
|
29
|
+
* @private
|
|
30
|
+
*/
|
|
31
|
+
__last = null;
|
|
14
32
|
|
|
15
33
|
constructor({ capacity = 100, perKeyCapacity = 10 } = {}) {
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @type {HashMap<Key, CacheElement<Key,Value>[]>}
|
|
19
|
-
*/
|
|
20
|
-
this.data = new HashMap();
|
|
21
34
|
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @type {CacheElement<Key,Value>|null}
|
|
25
|
-
* @private
|
|
26
|
-
*/
|
|
27
|
-
this.__first = null;
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @type {CacheElement<Key,Value>|null}
|
|
31
|
-
* @private
|
|
32
|
-
*/
|
|
33
|
-
this.__last = null;
|
|
34
35
|
|
|
35
36
|
/**
|
|
36
37
|
* How many items in total the pool can hold
|