@woosh/meep-engine 2.109.25 → 2.109.26

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.
Files changed (70) hide show
  1. package/build/meep.cjs +58 -54
  2. package/build/meep.min.js +1 -1
  3. package/build/meep.module.js +58 -54
  4. package/package.json +1 -1
  5. package/src/core/collection/heap/{FastBinaryHeap.d.ts → BinaryHeap.d.ts} +4 -4
  6. package/src/core/collection/heap/BinaryHeap.d.ts.map +1 -0
  7. package/src/core/collection/heap/{FastBinaryHeap.js → BinaryHeap.js} +3 -3
  8. package/src/core/collection/heap/BinaryHeap.spec.d.ts +2 -0
  9. package/src/core/collection/heap/BinaryHeap.spec.d.ts.map +1 -0
  10. package/src/core/collection/heap/{FastBinaryHeap.spec.js → BinaryHeap.spec.js} +10 -10
  11. package/src/core/collection/heap/Uint32Heap.spec.d.ts +2 -0
  12. package/src/core/collection/heap/Uint32Heap.spec.d.ts.map +1 -0
  13. package/src/core/geom/3d/topology/simplify/simplifyTopoMesh.d.ts +1 -0
  14. package/src/core/geom/3d/topology/simplify/simplifyTopoMesh.d.ts.map +1 -1
  15. package/src/core/geom/3d/topology/simplify/simplifyTopoMesh.js +5 -5
  16. package/src/core/geom/3d/triangle/computeTriangleRayIntersectionBarycentricEdge.d.ts.map +1 -1
  17. package/src/core/geom/3d/triangle/computeTriangleRayIntersectionBarycentricEdge.js +14 -8
  18. package/src/core/geom/packing/max-rect/MaxRectanglesPacker.js +2 -2
  19. package/src/core/graph/Edge.d.ts +1 -0
  20. package/src/core/graph/Edge.d.ts.map +1 -1
  21. package/src/core/graph/Edge.js +5 -0
  22. package/src/core/graph/graph_compute_distance_matrix.js +2 -2
  23. package/src/core/graph/metis/cluster_mesh_metis.d.ts +9 -0
  24. package/src/core/graph/metis/cluster_mesh_metis.d.ts.map +1 -0
  25. package/src/core/graph/metis/cluster_mesh_metis.js +31 -0
  26. package/src/core/graph/metis/mesh_to_metis_graph.d.ts +10 -0
  27. package/src/core/graph/metis/mesh_to_metis_graph.d.ts.map +1 -0
  28. package/src/core/graph/metis/mesh_to_metis_graph.js +64 -0
  29. package/src/core/graph/metis/metis_cluster_bs.d.ts +12 -0
  30. package/src/core/graph/metis/metis_cluster_bs.d.ts.map +1 -0
  31. package/src/core/graph/{cluster_mesh_metis.js → metis/metis_cluster_bs.js} +12 -98
  32. package/src/core/graph/mn_graph_coarsen.d.ts.map +1 -1
  33. package/src/core/graph/mn_graph_coarsen.js +7 -3
  34. package/src/core/graph/mn_graph_coarsen.spec.js +2 -0
  35. package/src/engine/asset/AssetManager.js +3 -3
  36. package/src/engine/graphics/sh3/gi/material/common.glsl +45 -54
  37. package/src/engine/graphics/sh3/gi/material/makeOctahedralDepthAtlas.d.ts.map +1 -1
  38. package/src/engine/graphics/sh3/gi/material/makeOctahedralDepthAtlas.js +5 -3
  39. package/src/engine/graphics/sh3/lpv/LightProbeVolume.js +2 -2
  40. package/src/engine/graphics/sh3/lpv/LightProbeVolumeBaker.js +1 -1
  41. package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.d.ts.map +1 -1
  42. package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.js +3 -2
  43. package/src/engine/graphics/sh3/lpv/depth/octahedral/bake_octahedral_depth_map.d.ts.map +1 -1
  44. package/src/engine/graphics/sh3/lpv/depth/octahedral/bake_octahedral_depth_map.js +14 -7
  45. package/src/engine/graphics/sh3/lpv/depth/octahedral/v2/visualise.frag.glsl +17 -15
  46. package/src/engine/graphics/sh3/lpv/probe_volume_to_textures.d.ts.map +1 -1
  47. package/src/engine/graphics/sh3/lpv/probe_volume_to_textures.js +6 -2
  48. package/src/engine/graphics/sh3/lpv/serialization/LightProbeVolumeSerializationAdapter.js +2 -2
  49. package/src/engine/graphics/sh3/path_tracer/PathTracedScene.d.ts.map +1 -1
  50. package/src/engine/graphics/sh3/path_tracer/PathTracedScene.js +10 -0
  51. package/src/engine/graphics/sh3/prototypeSH3Probe.js +3 -3
  52. package/src/engine/input/devices/PointerDevice.js +1 -1
  53. package/src/engine/input/devices/events/eventToSourceIdentifier.d.ts.map +1 -0
  54. package/src/engine/network/PriorityFetch.d.ts.map +1 -1
  55. package/src/engine/network/PriorityFetch.js +2 -2
  56. package/src/generation/grid/generation/discrete/GridTaskConnectRooms.js +3 -3
  57. package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.js +2 -2
  58. package/src/generation/grid/generation/discrete/layer/GridTaskDistanceToMarkers.js +2 -2
  59. package/src/generation/grid/generation/road/GridTaskGenerateRoads.js +2 -2
  60. package/src/core/collection/heap/FastBinaryHeap.d.ts.map +0 -1
  61. package/src/core/collection/heap/FastBinaryHeap.spec.d.ts +0 -2
  62. package/src/core/collection/heap/FastBinaryHeap.spec.d.ts.map +0 -1
  63. package/src/core/collection/heap/Uin32Heap.spec.d.ts +0 -2
  64. package/src/core/collection/heap/Uin32Heap.spec.d.ts.map +0 -1
  65. package/src/core/graph/cluster_mesh_metis.d.ts +0 -28
  66. package/src/core/graph/cluster_mesh_metis.d.ts.map +0 -1
  67. package/src/engine/input/devices/eventToSourceIdentifier.d.ts.map +0 -1
  68. /package/src/core/collection/heap/{Uin32Heap.spec.js → Uint32Heap.spec.js} +0 -0
  69. /package/src/engine/input/devices/{eventToSourceIdentifier.d.ts → events/eventToSourceIdentifier.d.ts} +0 -0
  70. /package/src/engine/input/devices/{eventToSourceIdentifier.js → events/eventToSourceIdentifier.js} +0 -0
@@ -246,7 +246,7 @@ async function getVolume({
246
246
  engine,
247
247
  ecd,
248
248
  bounds: mesh_bounds,
249
- density: 500
249
+ density: 5000
250
250
  });
251
251
 
252
252
  const buffer = new BinaryBuffer();
@@ -382,14 +382,14 @@ async function main(engine) {
382
382
  // const path = 'data/models/LowPolyTownshipSet/Small_house/Small_house.gltf';
383
383
  // const path = 'data/models/samples/cyberpunk_bike/scene.gltf';
384
384
  // const path = 'data/models/LowPolyTownshipSet/Town_Hall/model.gltf';
385
- // const path = 'data/models/sibenik/3-window-less/model.gltf';
385
+ const path = 'data/models/sibenik/3-window-less/model.gltf';
386
386
  // const path = 'data/models/sponza-pbr/gltf/sponza.glb';
387
387
  // const path = 'data/models/samples/susanne.glb';
388
388
  // const path = 'data/models/samples/teapot.gltf';
389
389
  // const path = 'data/models/samples/salle_de_bain/model.glb';
390
390
  // const path = 'data/models/samples/conference/model-no-curtains.glb';
391
391
  // const path = 'data/models/pica_pica/pica_pica.gltf';
392
- const path = 'data/models/samples/gi_box_01/model.glb';
392
+ // const path = 'data/models/samples/gi_box_01/model.glb';
393
393
  // const path = 'data/models/samples/low_poly_classroom/no-glass/model.gltf';
394
394
 
395
395
  const mesh_asset = await engine.assetManager.promise(path, 'model/gltf+json');
@@ -3,9 +3,9 @@ import Signal from "../../../core/events/signal/Signal.js";
3
3
  import Vector2 from "../../../core/geom/Vector2.js";
4
4
  import Vector3 from "../../../core/geom/Vector3.js";
5
5
  import { sign } from "../../../core/math/sign.js";
6
+ import { eventToSourceIdentifier } from "./events/eventToSourceIdentifier.js";
6
7
  import { MouseEvents } from "./events/MouseEvents.js";
7
8
  import { TouchEvents } from "./events/TouchEvents.js";
8
- import { eventToSourceIdentifier } from "./eventToSourceIdentifier.js";
9
9
  import { InputDeviceSwitch } from "./InputDeviceSwitch.js";
10
10
  import { LocationalInteractionMetadata } from "./LocationalInteractionMetadata.js";
11
11
 
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eventToSourceIdentifier.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/input/devices/events/eventToSourceIdentifier.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,+CAHW,UAAU,GAAC,UAAU,GACnB,MAAM,CAgClB"}
@@ -1 +1 @@
1
- {"version":3,"file":"PriorityFetch.d.ts","sourceRoot":"","sources":["../../../../src/engine/network/PriorityFetch.js"],"names":[],"mappings":"AAiFA;;;GAGG;AACH;IACI;;;OA+BC;IA3BG;;;;OAIG;IACH,sBAAgC;IAEhC;;;;OAIG;IACH,gBAAqD;IAErD;;;;OAIG;IACH,sBAA8B;IAE9B;;;;OAIG;IACH,kBAAwB;IAG5B;;;OAGG;IACH,2BAEC;IAED;;;OAGG;IACH,6BAMC;IAED;;;OAGG;IACH,0BAEC;IAED;;;;OAIG;IACH,mBAkBC;IAED,eAMC;IAED,iDAUC;CACJ;qBA7LoB,6BAA6B"}
1
+ {"version":3,"file":"PriorityFetch.d.ts","sourceRoot":"","sources":["../../../../src/engine/network/PriorityFetch.js"],"names":[],"mappings":"AAiFA;;;GAGG;AACH;IACI;;;OA+BC;IA3BG;;;;OAIG;IACH,sBAAgC;IAEhC;;;;OAIG;IACH,gBAAiD;IAEjD;;;;OAIG;IACH,sBAA8B;IAE9B;;;;OAIG;IACH,kBAAwB;IAG5B;;;OAGG;IACH,2BAEC;IAED;;;OAGG;IACH,6BAMC;IAED;;;OAGG;IACH,0BAEC;IAED;;;;OAIG;IACH,mBAkBC;IAED,eAMC;IAED,iDAUC;CACJ;qBA7LoB,6BAA6B"}
@@ -1,5 +1,5 @@
1
1
  import { assert } from "../../core/assert.js";
2
- import FastBinaryHeap from "../../core/collection/heap/FastBinaryHeap.js";
2
+ import BinaryHeap from "../../core/collection/heap/BinaryHeap.js";
3
3
  import { noop } from "../../core/function/noop.js";
4
4
 
5
5
  /**
@@ -100,7 +100,7 @@ export class PriorityFetch {
100
100
  * @type {BinaryHeap<FetchRequest>}
101
101
  * @private
102
102
  */
103
- this.__queue = new FastBinaryHeap(get_priority_score);
103
+ this.__queue = new BinaryHeap(get_priority_score);
104
104
 
105
105
  /**
106
106
  *
@@ -1,7 +1,7 @@
1
1
  import { matcher_tag_unoccupied } from "../../../../../samples/generation/rules/matcher_tag_unoccupied.js";
2
2
  import { assert } from "../../../../core/assert.js";
3
3
  import { BitSet } from "../../../../core/binary/BitSet.js";
4
- import FastBinaryHeap from "../../../../core/collection/heap/FastBinaryHeap.js";
4
+ import BinaryHeap from "../../../../core/collection/heap/BinaryHeap.js";
5
5
  import { Uint32Heap } from "../../../../core/collection/heap/Uint32Heap.js";
6
6
  import { passThrough } from "../../../../core/function/passThrough.js";
7
7
  import Vector2 from "../../../../core/geom/Vector2.js";
@@ -158,7 +158,7 @@ export class GridTaskConnectRooms extends GridTaskGenerator {
158
158
  * @param {BitSet} connected
159
159
  */
160
160
  fillConnectedArea(x, y, grid, connected) {
161
- const open = new FastBinaryHeap(passThrough);
161
+ const open = new BinaryHeap(passThrough);
162
162
 
163
163
  const width = grid.width;
164
164
  const initialIndex = x + y * width;
@@ -238,7 +238,7 @@ export class GridTaskConnectRooms extends GridTaskGenerator {
238
238
 
239
239
  distances.fill(65535);
240
240
 
241
- // const open = new FastBinaryHeap(i => distances[i]);
241
+ // const open = new BinaryHeap(i => distances[i]);
242
242
 
243
243
  const open = new Uint32Heap();
244
244
 
@@ -1,6 +1,6 @@
1
1
  import { assert } from "../../../../../core/assert.js";
2
2
  import { BitSet } from "../../../../../core/binary/BitSet.js";
3
- import FastBinaryHeap from "../../../../../core/collection/heap/FastBinaryHeap.js";
3
+ import BinaryHeap from "../../../../../core/collection/heap/BinaryHeap.js";
4
4
  import Task from "../../../../../core/process/task/Task.js";
5
5
  import TaskGroup from "../../../../../core/process/task/TaskGroup.js";
6
6
  import { TaskSignal } from "../../../../../core/process/task/TaskSignal.js";
@@ -93,7 +93,7 @@ export class GridTaskBuildSourceDistanceMap extends GridTaskGenerator {
93
93
 
94
94
  const target = layer.sampler.data;
95
95
 
96
- const open = new FastBinaryHeap(function (i) {
96
+ const open = new BinaryHeap(function (i) {
97
97
  return target[i];
98
98
  });
99
99
 
@@ -1,4 +1,4 @@
1
- import FastBinaryHeap from "../../../../../core/collection/heap/FastBinaryHeap.js";
1
+ import BinaryHeap from "../../../../../core/collection/heap/BinaryHeap.js";
2
2
  import { actionTask } from "../../../../../core/process/task/util/actionTask.js";
3
3
  import { GridTaskGenerator } from "../../../GridTaskGenerator.js";
4
4
 
@@ -27,7 +27,7 @@ export class GridTaskDistanceToMarkers extends GridTaskGenerator {
27
27
 
28
28
  buildChunks() {
29
29
 
30
- const open = new FastBinaryHeap(function (i) {
30
+ const open = new BinaryHeap(function (i) {
31
31
  return target[i];
32
32
  });
33
33
  }
@@ -4,7 +4,7 @@ import { matcher_tag_traversable } from "../../../../../samples/generation/rules
4
4
  import { BitSet } from "../../../../core/binary/BitSet.js";
5
5
  import { groupArrayBy } from "../../../../core/collection/array/groupArrayBy.js";
6
6
  import { collectIteratorValueToArray } from "../../../../core/collection/collectIteratorValueToArray.js";
7
- import FastBinaryHeap from "../../../../core/collection/heap/FastBinaryHeap.js";
7
+ import BinaryHeap from "../../../../core/collection/heap/BinaryHeap.js";
8
8
  import { QuadTreeNode } from "../../../../core/geom/2d/quad-tree/QuadTreeNode.js";
9
9
  import { Graph } from "../../../../core/graph/v2/Graph.js";
10
10
  import { seededRandom } from "../../../../core/math/random/seededRandom.js";
@@ -124,7 +124,7 @@ function buildPaths(
124
124
 
125
125
  const neighbourhoodMaskSize = neighbourhoodMask.length;
126
126
 
127
- const open = new FastBinaryHeap(i => distances[i]);
127
+ const open = new BinaryHeap(i => distances[i]);
128
128
 
129
129
  const closed = new BitSet();
130
130
 
@@ -1 +0,0 @@
1
- {"version":3,"file":"FastBinaryHeap.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/heap/FastBinaryHeap.js"],"names":[],"mappings":";AAEA;;;;GAIG;AACH;IAaI;;;;OAIG;IACH,gCAQC;IAzBD;;;OAGG;IACH,aAAU;IAEV;;;OAGG;IACH,eAAW;IASP;;;OAGG;IACH,8BAFuB,MAAM,CAEK;IAItC;;;OAGG;IACH,iBA8BC;IAED;;;OAGG;IACH,mBAmEC;IAED;;;OAGG;IACH,OAFY,CAAC,CA0BZ;IAED;;;OAGG;IACH,QAFa,CAAC,GAAC,SAAS,CAIvB;IAED;;;;OAIG;IACH,aAHW,CAAC,GACC,OAAO,CAYnB;IAED;;;OAGG;IACH,iBAFW,MAAM,QAOhB;IAED;;OAEG;IACH,cAGC;IAED;;;;OAIG;IACH,eAHW,CAAC,GACC,OAAO,CAKnB;IAED;;;OAGG;IACH,WAFa,OAAO,CAInB;IAED;;;OAGG;IACH,QAFa,MAAM,CAIlB;IAED;;;;OAIG;IACH,yBAHW,CAAC,GACC,OAAO,CAWnB;IAED;;;OAGG;IACH,SAFW,CAAC,QAUX;IAGL;;;;OAIG;IACH,2BAFU,OAAO,CAEwB;CAPxC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=FastBinaryHeap.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FastBinaryHeap.spec.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/heap/FastBinaryHeap.spec.js"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Uin32Heap.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Uin32Heap.spec.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/heap/Uin32Heap.spec.js"],"names":[],"mappings":""}
@@ -1,28 +0,0 @@
1
- /**
2
- *
3
- * @param {Uint32Array} result
4
- * @param {number} node_count
5
- * @param {Uint32Array} edge_addresses
6
- * @param {Uint32Array} adjacency_uint32
7
- * @param {Uint32Array} edge_weights_uint32
8
- * @param {number} patch_size
9
- * @returns {Promise<number>}
10
- */
11
- export function metis_cluster_bs(result: Uint32Array, node_count: number, edge_addresses: Uint32Array, adjacency_uint32: Uint32Array, edge_weights_uint32: Uint32Array, patch_size: number): Promise<number>;
12
- /**
13
- * @param {TopoTriangle[]} face_array
14
- */
15
- export function mesh_to_metis_graph(face_array: TopoTriangle[]): {
16
- edge_addresses: Uint32Array;
17
- adjacency: Uint32Array;
18
- edge_weights: Uint32Array;
19
- };
20
- /**
21
- *
22
- * @param {Uint32Array} result
23
- * @param {TopoMesh} mesh
24
- * @param {number} patch_size
25
- * @returns {number}
26
- */
27
- export function cluster_mesh_metis(result: Uint32Array, mesh: TopoMesh, patch_size: number): number;
28
- //# sourceMappingURL=cluster_mesh_metis.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cluster_mesh_metis.d.ts","sourceRoot":"","sources":["../../../../src/core/graph/cluster_mesh_metis.js"],"names":[],"mappings":"AASA;;;;;;;;;GASG;AACH,yCARW,WAAW,cACX,MAAM,kBACN,WAAW,oBACX,WAAW,uBACX,WAAW,cACX,MAAM,GACJ,QAAQ,MAAM,CAAC,CAyG3B;AAED;;GAEG;AACH,gDAFW,cAAc;;;;EA0DxB;AAED;;;;;;GAMG;AACH,2CALW,WAAW,8BAEX,MAAM,GACJ,MAAM,CAqBlB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"eventToSourceIdentifier.d.ts","sourceRoot":"","sources":["../../../../../src/engine/input/devices/eventToSourceIdentifier.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,+CAHW,UAAU,GAAC,UAAU,GACnB,MAAM,CAgClB"}