@woosh/meep-engine 2.117.29 → 2.117.31
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 +1 -1
- package/src/core/color/Color.d.ts +18 -6
- package/src/core/geom/3d/tetrahedra/delaunay/grid/tetrahedral_mesh_build_from_grid.d.ts +2 -2
- package/src/core/geom/3d/tetrahedra/delaunay/grid/tetrahedral_mesh_build_from_grid.d.ts.map +1 -1
- package/src/core/geom/3d/tetrahedra/delaunay/grid/tetrahedral_mesh_build_from_grid.js +13 -2
package/package.json
CHANGED
|
@@ -15,12 +15,6 @@ export class Color {
|
|
|
15
15
|
|
|
16
16
|
readonly onChanged: Signal<number, number, number, number, number, number>
|
|
17
17
|
|
|
18
|
-
static parse(value: string): Color
|
|
19
|
-
|
|
20
|
-
static fromHSV(h: number, s: number, v: number): Color
|
|
21
|
-
|
|
22
|
-
static fromRGB(r: number, g: number, b: number): Color
|
|
23
|
-
|
|
24
18
|
parse(text: string): void
|
|
25
19
|
|
|
26
20
|
set(r: number, g: number, b: number, a: number): void;
|
|
@@ -60,4 +54,22 @@ export class Color {
|
|
|
60
54
|
fromArray(source: ArrayLike<number>, destination_offset?: number): void
|
|
61
55
|
|
|
62
56
|
toArray<T extends ArrayLike<number>>(destination?: T, destination_offset?: number): T
|
|
57
|
+
|
|
58
|
+
//
|
|
59
|
+
|
|
60
|
+
static parse(value: string): Color
|
|
61
|
+
|
|
62
|
+
static fromHSV(h: number, s: number, v: number): Color
|
|
63
|
+
|
|
64
|
+
static fromRGB(r: number, g: number, b: number): Color
|
|
65
|
+
|
|
66
|
+
static readonly red: Color
|
|
67
|
+
static readonly green: Color
|
|
68
|
+
static readonly blue: Color
|
|
69
|
+
static readonly yellow: Color
|
|
70
|
+
static readonly cyan: Color
|
|
71
|
+
static readonly magenta: Color
|
|
72
|
+
static readonly white: Color
|
|
73
|
+
static readonly black: Color
|
|
74
|
+
static readonly transparent: Color
|
|
63
75
|
}
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* This is a special case of tetrahedral tessellation, we can handle it much easier due to regular nature of the point distribution
|
|
4
4
|
* Note that if resolution in every dimension should be >= 2
|
|
5
5
|
* @param {TetrahedralMesh} mesh
|
|
6
|
-
* @param {number[]} points point data is written here
|
|
6
|
+
* @param {number[]|Float32Array|Float64Array} points point data is written here
|
|
7
7
|
* @param {AABB3} bounds
|
|
8
8
|
* @param {number} resolution_x how many points to generate on the grid in X axis
|
|
9
9
|
* @param {number} resolution_y how many points to generate on the grid in Y axis
|
|
10
10
|
* @param {number} resolution_z how many points to generate on the grid in Y axis
|
|
11
11
|
* @returns {number} number of added points
|
|
12
12
|
*/
|
|
13
|
-
export function tetrahedral_mesh_build_from_grid(mesh: TetrahedralMesh, points: number[], bounds: AABB3, resolution_x?: number, resolution_y?: number, resolution_z?: number): number;
|
|
13
|
+
export function tetrahedral_mesh_build_from_grid(mesh: TetrahedralMesh, points: number[] | Float32Array | Float64Array, bounds: AABB3, resolution_x?: number, resolution_y?: number, resolution_z?: number): number;
|
|
14
14
|
//# sourceMappingURL=tetrahedral_mesh_build_from_grid.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tetrahedral_mesh_build_from_grid.d.ts","sourceRoot":"","sources":["../../../../../../../../src/core/geom/3d/tetrahedra/delaunay/grid/tetrahedral_mesh_build_from_grid.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,gFAPW,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"tetrahedral_mesh_build_from_grid.d.ts","sourceRoot":"","sources":["../../../../../../../../src/core/geom/3d/tetrahedra/delaunay/grid/tetrahedral_mesh_build_from_grid.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,gFAPW,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,gCAElC,MAAM,iBACN,MAAM,iBACN,MAAM,GACJ,MAAM,CA2NlB"}
|
|
@@ -6,7 +6,7 @@ import { assert } from "../../../../../assert.js";
|
|
|
6
6
|
* This is a special case of tetrahedral tessellation, we can handle it much easier due to regular nature of the point distribution
|
|
7
7
|
* Note that if resolution in every dimension should be >= 2
|
|
8
8
|
* @param {TetrahedralMesh} mesh
|
|
9
|
-
* @param {number[]} points point data is written here
|
|
9
|
+
* @param {number[]|Float32Array|Float64Array} points point data is written here
|
|
10
10
|
* @param {AABB3} bounds
|
|
11
11
|
* @param {number} resolution_x how many points to generate on the grid in X axis
|
|
12
12
|
* @param {number} resolution_y how many points to generate on the grid in Y axis
|
|
@@ -14,7 +14,8 @@ import { assert } from "../../../../../assert.js";
|
|
|
14
14
|
* @returns {number} number of added points
|
|
15
15
|
*/
|
|
16
16
|
export function tetrahedral_mesh_build_from_grid(
|
|
17
|
-
mesh,
|
|
17
|
+
mesh,
|
|
18
|
+
points,
|
|
18
19
|
bounds,
|
|
19
20
|
resolution_x = 2, resolution_y = 2, resolution_z = 2,
|
|
20
21
|
) {
|
|
@@ -23,6 +24,16 @@ export function tetrahedral_mesh_build_from_grid(
|
|
|
23
24
|
assert.isNonNegativeInteger(resolution_y, 'resolution_y');
|
|
24
25
|
assert.isNonNegativeInteger(resolution_z, 'resolution_z');
|
|
25
26
|
|
|
27
|
+
assert.defined(mesh, 'mesh');
|
|
28
|
+
|
|
29
|
+
assert.defined(bounds, 'bounds');
|
|
30
|
+
assert.notNull(bounds, 'bounds');
|
|
31
|
+
assert.equal(bounds.isAABB3, true, 'bounds.isAABB3 !== true');
|
|
32
|
+
|
|
33
|
+
assert.defined(points, 'points');
|
|
34
|
+
assert.notNull(points, 'points');
|
|
35
|
+
assert.isArrayLike(points, 'points');
|
|
36
|
+
|
|
26
37
|
mesh.clear();
|
|
27
38
|
|
|
28
39
|
const TETRAHEDRONS_PER_VOXEL = 6;
|