@woosh/meep-engine 2.117.30 → 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 CHANGED
@@ -5,7 +5,7 @@
5
5
  "description": "Fully featured ECS game engine written in JavaScript",
6
6
  "type": "module",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.117.30",
8
+ "version": "2.117.31",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -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,gCAER,MAAM,iBACN,MAAM,iBACN,MAAM,GACJ,MAAM,CAgNlB"}
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, points,
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;