@woosh/meep-engine 2.131.42 → 2.131.43

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.131.42",
8
+ "version": "2.131.43",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Constructs an orthographic frustum from an Axis-Aligned Bounding Box.
3
+ * The planes are stored as 4-tuples (nx, ny, nz, d).
4
+ * @param {Float32Array|number[]} output
5
+ * @param {number} output_offset
6
+ * @param {number} x0 - Minimum X
7
+ * @param {number} y0 - Minimum Y
8
+ * @param {number} z0 - Minimum Z
9
+ * @param {number} x1 - Maximum X
10
+ * @param {number} y1 - Maximum Y
11
+ * @param {number} z1 - Maximum Z
12
+ */
13
+ export function frustum_from_aabb(output: Float32Array | number[], output_offset: number, x0: number, y0: number, z0: number, x1: number, y1: number, z1: number): void;
14
+ //# sourceMappingURL=frustum_from_aabb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frustum_from_aabb.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/frustum/frustum_from_aabb.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,0CATW,YAAY,GAAC,MAAM,EAAE,iBACrB,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QA4ChB"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Constructs an orthographic frustum from an Axis-Aligned Bounding Box.
3
+ * The planes are stored as 4-tuples (nx, ny, nz, d).
4
+ * @param {Float32Array|number[]} output
5
+ * @param {number} output_offset
6
+ * @param {number} x0 - Minimum X
7
+ * @param {number} y0 - Minimum Y
8
+ * @param {number} z0 - Minimum Z
9
+ * @param {number} x1 - Maximum X
10
+ * @param {number} y1 - Maximum Y
11
+ * @param {number} z1 - Maximum Z
12
+ */
13
+ export function frustum_from_aabb(
14
+ output,
15
+ output_offset,
16
+ x0, y0, z0,
17
+ x1, y1, z1
18
+ ){
19
+
20
+ // Left plane (x = x0): Normal points +X
21
+ output[output_offset + 0] = 1;
22
+ output[output_offset + 1] = 0;
23
+ output[output_offset + 2] = 0;
24
+ output[output_offset + 3] = -x0;
25
+
26
+ // Right plane (x = x1): Normal points -X
27
+ output[output_offset + 4] = -1;
28
+ output[output_offset + 5] = 0;
29
+ output[output_offset + 6] = 0;
30
+ output[output_offset + 7] = x1;
31
+
32
+ // Bottom plane (y = y0): Normal points +Y
33
+ output[output_offset + 8] = 0;
34
+ output[output_offset + 9] = 1;
35
+ output[output_offset + 10] = 0;
36
+ output[output_offset + 11] = -y0;
37
+
38
+ // Top plane (y = y1): Normal points -Y
39
+ output[output_offset + 12] = 0;
40
+ output[output_offset + 13] = -1;
41
+ output[output_offset + 14] = 0;
42
+ output[output_offset + 15] = y1;
43
+
44
+ // Near plane (z = z0): Normal points +Z
45
+ output[output_offset + 16] = 0;
46
+ output[output_offset + 17] = 0;
47
+ output[output_offset + 18] = 1;
48
+ output[output_offset + 19] = -z0;
49
+
50
+ // Far plane (z = z1): Normal points -Z
51
+ output[output_offset + 20] = 0;
52
+ output[output_offset + 21] = 0;
53
+ output[output_offset + 22] = -1;
54
+ output[output_offset + 23] = z1;
55
+ }