@woosh/meep-engine 2.117.37 → 2.117.38
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 +5 -1
- package/build/meep.module.js +5 -1
- package/package.json +1 -1
- package/src/core/geom/3d/frustum/frustum_matrix4_project.d.ts +10 -0
- package/src/core/geom/3d/frustum/frustum_matrix4_project.d.ts.map +1 -0
- package/src/core/geom/3d/frustum/frustum_matrix4_project.js +43 -0
- package/src/core/geom/3d/frustum/slice_frustum_linear_to_points.d.ts.map +1 -1
- package/src/core/geom/3d/frustum/slice_frustum_linear_to_points.js +5 -1
package/build/meep.cjs
CHANGED
|
@@ -106777,7 +106777,11 @@ function read_cluster_frustum_corners(output, i_z_0, tr_xy_1, i_y_0, tr_x_1, i_x
|
|
|
106777
106777
|
* @param {number} tr_z slices in Z axis
|
|
106778
106778
|
* @param {number[]} output_frustum_corners
|
|
106779
106779
|
*/
|
|
106780
|
-
function slice_frustum_linear_to_points(
|
|
106780
|
+
function slice_frustum_linear_to_points(
|
|
106781
|
+
input_frustum_corners,
|
|
106782
|
+
tr_x, tr_y, tr_z,
|
|
106783
|
+
output_frustum_corners
|
|
106784
|
+
) {
|
|
106781
106785
|
// read out view frustum scratch_corners
|
|
106782
106786
|
const x_000 = input_frustum_corners[0];
|
|
106783
106787
|
const y_000 = input_frustum_corners[1];
|
package/build/meep.module.js
CHANGED
|
@@ -106775,7 +106775,11 @@ function read_cluster_frustum_corners(output, i_z_0, tr_xy_1, i_y_0, tr_x_1, i_x
|
|
|
106775
106775
|
* @param {number} tr_z slices in Z axis
|
|
106776
106776
|
* @param {number[]} output_frustum_corners
|
|
106777
106777
|
*/
|
|
106778
|
-
function slice_frustum_linear_to_points(
|
|
106778
|
+
function slice_frustum_linear_to_points(
|
|
106779
|
+
input_frustum_corners,
|
|
106780
|
+
tr_x, tr_y, tr_z,
|
|
106781
|
+
output_frustum_corners
|
|
106782
|
+
) {
|
|
106779
106783
|
// read out view frustum scratch_corners
|
|
106780
106784
|
const x_000 = input_frustum_corners[0];
|
|
106781
106785
|
const y_000 = input_frustum_corners[1];
|
package/package.json
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Perform affine transform on a given frustum
|
|
3
|
+
* @param {number[]|Float32Array|Float64Array} output
|
|
4
|
+
* @param {number} output_offset
|
|
5
|
+
* @param {number[]|Float32Array|Float64Array} input
|
|
6
|
+
* @param {number} input_offset
|
|
7
|
+
* @param {number[]|Float32Array|Float64Array} matrix4
|
|
8
|
+
*/
|
|
9
|
+
export function frustum_matrix4_project(output: number[] | Float32Array | Float64Array, output_offset: number, input: number[] | Float32Array | Float64Array, input_offset: number, matrix4: number[] | Float32Array | Float64Array): void;
|
|
10
|
+
//# sourceMappingURL=frustum_matrix4_project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frustum_matrix4_project.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/frustum/frustum_matrix4_project.js"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,gDANW,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,iBAClC,MAAM,SACN,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,gBAClC,MAAM,WACN,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,QAiC5C"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { assert } from "../../../assert.js";
|
|
2
|
+
import { plane3_matrix4_project } from "../plane/plane3_matrix4_project.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Perform affine transform on a given frustum
|
|
6
|
+
* @param {number[]|Float32Array|Float64Array} output
|
|
7
|
+
* @param {number} output_offset
|
|
8
|
+
* @param {number[]|Float32Array|Float64Array} input
|
|
9
|
+
* @param {number} input_offset
|
|
10
|
+
* @param {number[]|Float32Array|Float64Array} matrix4
|
|
11
|
+
*/
|
|
12
|
+
export function frustum_matrix4_project(
|
|
13
|
+
output, output_offset,
|
|
14
|
+
input, input_offset,
|
|
15
|
+
matrix4
|
|
16
|
+
) {
|
|
17
|
+
assert.isArrayLike(output, 'output');
|
|
18
|
+
assert.isNonNegativeInteger(output_offset, "output_offset");
|
|
19
|
+
|
|
20
|
+
assert.isArrayLike(input, 'input');
|
|
21
|
+
assert.greaterThanOrEqual(input.length, input_offset + 24, 'input too small');
|
|
22
|
+
assert.isNonNegativeInteger(input_offset, "input_offset");
|
|
23
|
+
|
|
24
|
+
assert.isArrayLike(matrix4, 'matrix4');
|
|
25
|
+
|
|
26
|
+
for (let plane_index = 0; plane_index < 6; plane_index++) {
|
|
27
|
+
const frustum_offset = plane_index * 4;
|
|
28
|
+
|
|
29
|
+
const i = input_offset + frustum_offset;
|
|
30
|
+
const o = output_offset + frustum_offset;
|
|
31
|
+
|
|
32
|
+
plane3_matrix4_project(
|
|
33
|
+
output, o,
|
|
34
|
+
matrix4,
|
|
35
|
+
input[i],
|
|
36
|
+
input[i + 1],
|
|
37
|
+
input[i + 2],
|
|
38
|
+
input[i + 3],
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slice_frustum_linear_to_points.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/frustum/slice_frustum_linear_to_points.js"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,sEANW,MAAM,EAAE,QACR,MAAM,QACN,MAAM,QACN,MAAM,0BACN,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"slice_frustum_linear_to_points.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/frustum/slice_frustum_linear_to_points.js"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,sEANW,MAAM,EAAE,QACR,MAAM,QACN,MAAM,QACN,MAAM,0BACN,MAAM,EAAE,QAyFlB"}
|
|
@@ -6,7 +6,11 @@
|
|
|
6
6
|
* @param {number} tr_z slices in Z axis
|
|
7
7
|
* @param {number[]} output_frustum_corners
|
|
8
8
|
*/
|
|
9
|
-
export function slice_frustum_linear_to_points(
|
|
9
|
+
export function slice_frustum_linear_to_points(
|
|
10
|
+
input_frustum_corners,
|
|
11
|
+
tr_x, tr_y, tr_z,
|
|
12
|
+
output_frustum_corners
|
|
13
|
+
) {
|
|
10
14
|
// read out view frustum scratch_corners
|
|
11
15
|
const x_000 = input_frustum_corners[0];
|
|
12
16
|
const y_000 = input_frustum_corners[1];
|