@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.
@@ -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[0];
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(x0, y0, z0, x1, y1, z1, frustum);
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
@@ -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.117.38",
8
+ "version": "2.118.0",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -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":"AAGA;;;;;GAKG;AACH,4DAJW,MAAM,EAAE,GAAC,YAAY,WACrB,MAAM,EAAE,GAAC,YAAY,GACnB,MAAM,CAYlB"}
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
- const x0 = aabb[0];
13
- const y0 = aabb[1];
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
- return aabb3_intersects_frustum_degree(x0, y0, z0, x1, y1, z1, frustum);
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
  }