@woosh/meep-engine 2.126.49 → 2.126.51

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/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "description": "Pure JavaScript game engine. Fully featured and production ready.",
6
6
  "type": "module",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.126.49",
8
+ "version": "2.126.51",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -1 +1 @@
1
- {"version":3,"file":"compute_tight_near_far_clipping_planes.d.ts","sourceRoot":"","sources":["../../../../../../src/core/bvh2/bvh3/query/compute_tight_near_far_clipping_planes.js"],"names":[],"mappings":"AAWA;;;;;;;;GAQG;AACH,+DAPW,MAAM,EAAE,iBACR,MAAM,cACN,MAAM,OACN,GAAG,WACH,MAAM,EAAE,GAAC,SAAS,CAAC,MAAM,CAAC,GAAC,YAAY,GACrC,OAAO,CAgMnB"}
1
+ {"version":3,"file":"compute_tight_near_far_clipping_planes.d.ts","sourceRoot":"","sources":["../../../../../../src/core/bvh2/bvh3/query/compute_tight_near_far_clipping_planes.js"],"names":[],"mappings":"AAWA;;;;;;;;GAQG;AACH,+DAPW,MAAM,EAAE,iBACR,MAAM,cACN,MAAM,OACN,GAAG,WACH,MAAM,EAAE,GAAC,SAAS,CAAC,MAAM,CAAC,GAAC,YAAY,GACrC,OAAO,CAkMnB"}
@@ -133,9 +133,11 @@ export function compute_tight_near_far_clipping_planes(
133
133
  }
134
134
 
135
135
 
136
+
136
137
  const node_is_leaf = bvh.node_is_leaf(node);
137
138
 
138
139
  if (!node_is_leaf) {
140
+ // TODO skip node if it is fully within unconstrained planes already
139
141
 
140
142
  // inside
141
143
  // read in-order
@@ -189,7 +191,7 @@ export function compute_tight_near_far_clipping_planes(
189
191
  }
190
192
 
191
193
  const distance_above_plane = v3_distance_above_plane(
192
- x1, y1, z1,
194
+ x0, y0, z0,
193
195
  plane_normal_x, plane_normal_y, plane_normal_z, 0
194
196
  );
195
197
 
@@ -81,14 +81,14 @@ export function frustum_slice(
81
81
  frustum_plane_pair_lerp(
82
82
  output, output_offset + 8,
83
83
  frustum,
84
- 0, 4, y0, y1,
84
+ 8, 12, y0, y1,
85
85
  );
86
86
 
87
87
  // Z planes
88
88
  frustum_plane_pair_lerp(
89
89
  output, output_offset + 16,
90
90
  frustum,
91
- 0, 4, z0, z1,
91
+ 16, 20, z0, z1,
92
92
  );
93
93
 
94
94
  }
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Interpolate between two planes in linear space.
3
- * Note: does not work for planes that are parallel with opposing normals.
3
+ *
4
+ * Note: It does not work for planes that are parallel with opposing normals. There is no valid solution, as the number of such planes would be infinite.
4
5
  * @param {number[]} destination
5
6
  * @param {number} destination_offset
6
7
  * @param {number} a_normal_x
@@ -1 +1 @@
1
- {"version":3,"file":"plane3_lerp.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/plane/plane3_lerp.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;GAcG;AACH,yCAZW,MAAM,EAAE,sBACR,MAAM,cACN,MAAM,cACN,MAAM,cACN,MAAM,cACN,MAAM,cACN,MAAM,cACN,MAAM,cACN,MAAM,cACN,MAAM,KACN,MAAM,QAkBhB"}
1
+ {"version":3,"file":"plane3_lerp.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/plane/plane3_lerp.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,yCAZW,MAAM,EAAE,sBACR,MAAM,cACN,MAAM,cACN,MAAM,cACN,MAAM,cACN,MAAM,cACN,MAAM,cACN,MAAM,cACN,MAAM,cACN,MAAM,KACN,MAAM,QAkBhB"}
@@ -1,13 +1,11 @@
1
1
  import { lerp } from "../../../math/lerp.js";
2
- import Vector3 from "../../Vector3.js";
3
2
  import { plane3_normalize } from "./plane3_normalize.js";
4
3
 
5
- const v0 = new Vector3();
6
- const v1 = new Vector3();
7
4
 
8
5
  /**
9
6
  * Interpolate between two planes in linear space.
10
- * Note: does not work for planes that are parallel with opposing normals.
7
+ *
8
+ * Note: It does not work for planes that are parallel with opposing normals. There is no valid solution, as the number of such planes would be infinite.
11
9
  * @param {number[]} destination
12
10
  * @param {number} destination_offset
13
11
  * @param {number} a_normal_x