@woosh/meep-engine 2.117.38 → 2.118.0
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 +14 -9
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +14 -9
- package/package.json +1 -1
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_overlaps_frustum.js +1 -1
- package/src/core/bvh2/bvh3/query/compute_tight_near_far_clipping_planes.js +1 -1
- package/src/core/geom/3d/aabb/aabb3_array_intersects_frustum_degree.d.ts +2 -1
- package/src/core/geom/3d/aabb/aabb3_array_intersects_frustum_degree.d.ts.map +1 -1
- package/src/core/geom/3d/aabb/aabb3_array_intersects_frustum_degree.js +17 -8
package/build/meep.module.js
CHANGED
|
@@ -67475,19 +67475,24 @@ SGMesh.typeName = "SGMesh";
|
|
|
67475
67475
|
/**
|
|
67476
67476
|
*
|
|
67477
67477
|
* @param {number[]|Float32Array} aabb
|
|
67478
|
+
* @param {number} aabb_offset
|
|
67478
67479
|
* @param {number[]|Float32Array} frustum
|
|
67479
67480
|
* @returns {number}
|
|
67480
67481
|
*/
|
|
67481
|
-
function aabb3_array_intersects_frustum_degree(aabb, frustum) {
|
|
67482
|
+
function aabb3_array_intersects_frustum_degree(aabb, aabb_offset, frustum) {
|
|
67482
67483
|
|
|
67483
|
-
const x0 = aabb[
|
|
67484
|
-
const y0 = aabb[1];
|
|
67485
|
-
const z0 = aabb[2];
|
|
67486
|
-
const x1 = aabb[3];
|
|
67487
|
-
const y1 = aabb[4];
|
|
67488
|
-
const z1 = aabb[5];
|
|
67484
|
+
const x0 = aabb[aabb_offset];
|
|
67485
|
+
const y0 = aabb[aabb_offset + 1];
|
|
67486
|
+
const z0 = aabb[aabb_offset + 2];
|
|
67487
|
+
const x1 = aabb[aabb_offset + 3];
|
|
67488
|
+
const y1 = aabb[aabb_offset + 4];
|
|
67489
|
+
const z1 = aabb[aabb_offset + 5];
|
|
67489
67490
|
|
|
67490
|
-
return aabb3_intersects_frustum_degree(
|
|
67491
|
+
return aabb3_intersects_frustum_degree(
|
|
67492
|
+
x0, y0, z0,
|
|
67493
|
+
x1, y1, z1,
|
|
67494
|
+
frustum
|
|
67495
|
+
);
|
|
67491
67496
|
}
|
|
67492
67497
|
|
|
67493
67498
|
//
|
|
@@ -67601,7 +67606,7 @@ function bvh_query_user_data_overlaps_frustum(
|
|
|
67601
67606
|
|
|
67602
67607
|
// test node against the ray
|
|
67603
67608
|
bvh.node_get_aabb(node, scratch_aabb$1);
|
|
67604
|
-
const intersection = aabb3_array_intersects_frustum_degree(scratch_aabb$1, frustum);
|
|
67609
|
+
const intersection = aabb3_array_intersects_frustum_degree(scratch_aabb$1,0, frustum);
|
|
67605
67610
|
|
|
67606
67611
|
if (intersection === 0) {
|
|
67607
67612
|
// fully outside
|
package/package.json
CHANGED
|
@@ -48,7 +48,7 @@ export function bvh_query_user_data_overlaps_frustum(
|
|
|
48
48
|
|
|
49
49
|
// test node against the ray
|
|
50
50
|
bvh.node_get_aabb(node, scratch_aabb);
|
|
51
|
-
const intersection = aabb3_array_intersects_frustum_degree(scratch_aabb, frustum);
|
|
51
|
+
const intersection = aabb3_array_intersects_frustum_degree(scratch_aabb,0, frustum);
|
|
52
52
|
|
|
53
53
|
if (intersection === 0) {
|
|
54
54
|
// fully outside
|
|
@@ -121,7 +121,7 @@ export function compute_tight_near_far_clipping_planes(result, result_offset, co
|
|
|
121
121
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
const intersection = aabb3_array_intersects_frustum_degree(scratch_aabb, frustum);
|
|
124
|
+
const intersection = aabb3_array_intersects_frustum_degree(scratch_aabb, 0, frustum);
|
|
125
125
|
|
|
126
126
|
if (intersection === 0) {
|
|
127
127
|
// fully outside
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
3
|
* @param {number[]|Float32Array} aabb
|
|
4
|
+
* @param {number} aabb_offset
|
|
4
5
|
* @param {number[]|Float32Array} frustum
|
|
5
6
|
* @returns {number}
|
|
6
7
|
*/
|
|
7
|
-
export function aabb3_array_intersects_frustum_degree(aabb: number[] | Float32Array, frustum: number[] | Float32Array): number;
|
|
8
|
+
export function aabb3_array_intersects_frustum_degree(aabb: number[] | Float32Array, aabb_offset: number, frustum: number[] | Float32Array): number;
|
|
8
9
|
//# sourceMappingURL=aabb3_array_intersects_frustum_degree.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aabb3_array_intersects_frustum_degree.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/aabb/aabb3_array_intersects_frustum_degree.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"aabb3_array_intersects_frustum_degree.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/aabb/aabb3_array_intersects_frustum_degree.js"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,4DALW,MAAM,EAAE,GAAC,YAAY,eACrB,MAAM,WACN,MAAM,EAAE,GAAC,YAAY,GACnB,MAAM,CAmBlB"}
|
|
@@ -1,20 +1,29 @@
|
|
|
1
|
+
import { assert } from "../../../assert.js";
|
|
1
2
|
import { aabb3_intersects_frustum_degree } from "./aabb3_intersects_frustum_degree.js";
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
*
|
|
6
7
|
* @param {number[]|Float32Array} aabb
|
|
8
|
+
* @param {number} aabb_offset
|
|
7
9
|
* @param {number[]|Float32Array} frustum
|
|
8
10
|
* @returns {number}
|
|
9
11
|
*/
|
|
10
|
-
export function aabb3_array_intersects_frustum_degree(aabb, frustum) {
|
|
12
|
+
export function aabb3_array_intersects_frustum_degree(aabb, aabb_offset, frustum) {
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const z0 = aabb[2];
|
|
15
|
-
const x1 = aabb[3];
|
|
16
|
-
const y1 = aabb[4];
|
|
17
|
-
const z1 = aabb[5];
|
|
14
|
+
assert.defined(frustum, 'frustum');
|
|
15
|
+
assert.isNonNegativeInteger(aabb_offset, 'aabb_offset');
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
const x0 = aabb[aabb_offset];
|
|
18
|
+
const y0 = aabb[aabb_offset + 1];
|
|
19
|
+
const z0 = aabb[aabb_offset + 2];
|
|
20
|
+
const x1 = aabb[aabb_offset + 3];
|
|
21
|
+
const y1 = aabb[aabb_offset + 4];
|
|
22
|
+
const z1 = aabb[aabb_offset + 5];
|
|
23
|
+
|
|
24
|
+
return aabb3_intersects_frustum_degree(
|
|
25
|
+
x0, y0, z0,
|
|
26
|
+
x1, y1, z1,
|
|
27
|
+
frustum
|
|
28
|
+
);
|
|
20
29
|
}
|