@woosh/meep-engine 2.117.37 → 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 CHANGED
@@ -67477,19 +67477,24 @@ SGMesh.typeName = "SGMesh";
67477
67477
  /**
67478
67478
  *
67479
67479
  * @param {number[]|Float32Array} aabb
67480
+ * @param {number} aabb_offset
67480
67481
  * @param {number[]|Float32Array} frustum
67481
67482
  * @returns {number}
67482
67483
  */
67483
- function aabb3_array_intersects_frustum_degree(aabb, frustum) {
67484
+ function aabb3_array_intersects_frustum_degree(aabb, aabb_offset, frustum) {
67484
67485
 
67485
- const x0 = aabb[0];
67486
- const y0 = aabb[1];
67487
- const z0 = aabb[2];
67488
- const x1 = aabb[3];
67489
- const y1 = aabb[4];
67490
- const z1 = aabb[5];
67486
+ const x0 = aabb[aabb_offset];
67487
+ const y0 = aabb[aabb_offset + 1];
67488
+ const z0 = aabb[aabb_offset + 2];
67489
+ const x1 = aabb[aabb_offset + 3];
67490
+ const y1 = aabb[aabb_offset + 4];
67491
+ const z1 = aabb[aabb_offset + 5];
67491
67492
 
67492
- return aabb3_intersects_frustum_degree(x0, y0, z0, x1, y1, z1, frustum);
67493
+ return aabb3_intersects_frustum_degree(
67494
+ x0, y0, z0,
67495
+ x1, y1, z1,
67496
+ frustum
67497
+ );
67493
67498
  }
67494
67499
 
67495
67500
  //
@@ -67603,7 +67608,7 @@ function bvh_query_user_data_overlaps_frustum(
67603
67608
 
67604
67609
  // test node against the ray
67605
67610
  bvh.node_get_aabb(node, scratch_aabb$1);
67606
- const intersection = aabb3_array_intersects_frustum_degree(scratch_aabb$1, frustum);
67611
+ const intersection = aabb3_array_intersects_frustum_degree(scratch_aabb$1,0, frustum);
67607
67612
 
67608
67613
  if (intersection === 0) {
67609
67614
  // fully outside
@@ -106777,7 +106782,11 @@ function read_cluster_frustum_corners(output, i_z_0, tr_xy_1, i_y_0, tr_x_1, i_x
106777
106782
  * @param {number} tr_z slices in Z axis
106778
106783
  * @param {number[]} output_frustum_corners
106779
106784
  */
106780
- function slice_frustum_linear_to_points(input_frustum_corners, tr_x, tr_y, tr_z, output_frustum_corners) {
106785
+ function slice_frustum_linear_to_points(
106786
+ input_frustum_corners,
106787
+ tr_x, tr_y, tr_z,
106788
+ output_frustum_corners
106789
+ ) {
106781
106790
  // read out view frustum scratch_corners
106782
106791
  const x_000 = input_frustum_corners[0];
106783
106792
  const y_000 = input_frustum_corners[1];