@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.
- package/build/meep.cjs +58 -54
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +58 -54
- package/package.json +1 -1
- package/src/core/collection/heap/{FastBinaryHeap.d.ts → BinaryHeap.d.ts} +4 -4
- package/src/core/collection/heap/BinaryHeap.d.ts.map +1 -0
- package/src/core/collection/heap/{FastBinaryHeap.js → BinaryHeap.js} +3 -3
- package/src/core/collection/heap/BinaryHeap.spec.d.ts +2 -0
- package/src/core/collection/heap/BinaryHeap.spec.d.ts.map +1 -0
- package/src/core/collection/heap/{FastBinaryHeap.spec.js → BinaryHeap.spec.js} +10 -10
- package/src/core/collection/heap/Uint32Heap.spec.d.ts +2 -0
- package/src/core/collection/heap/Uint32Heap.spec.d.ts.map +1 -0
- package/src/core/geom/3d/topology/simplify/simplifyTopoMesh.d.ts +1 -0
- package/src/core/geom/3d/topology/simplify/simplifyTopoMesh.d.ts.map +1 -1
- package/src/core/geom/3d/topology/simplify/simplifyTopoMesh.js +5 -5
- package/src/core/geom/3d/triangle/computeTriangleRayIntersectionBarycentricEdge.d.ts.map +1 -1
- package/src/core/geom/3d/triangle/computeTriangleRayIntersectionBarycentricEdge.js +14 -8
- package/src/core/geom/packing/max-rect/MaxRectanglesPacker.js +2 -2
- package/src/core/graph/Edge.d.ts +1 -0
- package/src/core/graph/Edge.d.ts.map +1 -1
- package/src/core/graph/Edge.js +5 -0
- package/src/core/graph/graph_compute_distance_matrix.js +2 -2
- package/src/core/graph/metis/cluster_mesh_metis.d.ts +9 -0
- package/src/core/graph/metis/cluster_mesh_metis.d.ts.map +1 -0
- package/src/core/graph/metis/cluster_mesh_metis.js +31 -0
- package/src/core/graph/metis/mesh_to_metis_graph.d.ts +10 -0
- package/src/core/graph/metis/mesh_to_metis_graph.d.ts.map +1 -0
- package/src/core/graph/metis/mesh_to_metis_graph.js +64 -0
- package/src/core/graph/metis/metis_cluster_bs.d.ts +12 -0
- package/src/core/graph/metis/metis_cluster_bs.d.ts.map +1 -0
- package/src/core/graph/{cluster_mesh_metis.js → metis/metis_cluster_bs.js} +12 -98
- package/src/core/graph/mn_graph_coarsen.d.ts.map +1 -1
- package/src/core/graph/mn_graph_coarsen.js +7 -3
- package/src/core/graph/mn_graph_coarsen.spec.js +2 -0
- package/src/engine/asset/AssetManager.js +3 -3
- package/src/engine/graphics/sh3/gi/material/common.glsl +45 -54
- package/src/engine/graphics/sh3/gi/material/makeOctahedralDepthAtlas.d.ts.map +1 -1
- package/src/engine/graphics/sh3/gi/material/makeOctahedralDepthAtlas.js +5 -3
- package/src/engine/graphics/sh3/lpv/LightProbeVolume.js +2 -2
- package/src/engine/graphics/sh3/lpv/LightProbeVolumeBaker.js +1 -1
- package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.d.ts.map +1 -1
- package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.js +3 -2
- package/src/engine/graphics/sh3/lpv/depth/octahedral/bake_octahedral_depth_map.d.ts.map +1 -1
- package/src/engine/graphics/sh3/lpv/depth/octahedral/bake_octahedral_depth_map.js +14 -7
- package/src/engine/graphics/sh3/lpv/depth/octahedral/v2/visualise.frag.glsl +17 -15
- package/src/engine/graphics/sh3/lpv/probe_volume_to_textures.d.ts.map +1 -1
- package/src/engine/graphics/sh3/lpv/probe_volume_to_textures.js +6 -2
- package/src/engine/graphics/sh3/lpv/serialization/LightProbeVolumeSerializationAdapter.js +2 -2
- package/src/engine/graphics/sh3/path_tracer/PathTracedScene.d.ts.map +1 -1
- package/src/engine/graphics/sh3/path_tracer/PathTracedScene.js +10 -0
- package/src/engine/graphics/sh3/prototypeSH3Probe.js +3 -3
- package/src/engine/input/devices/PointerDevice.js +1 -1
- package/src/engine/input/devices/events/eventToSourceIdentifier.d.ts.map +1 -0
- package/src/engine/network/PriorityFetch.d.ts.map +1 -1
- package/src/engine/network/PriorityFetch.js +2 -2
- package/src/generation/grid/generation/discrete/GridTaskConnectRooms.js +3 -3
- package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.js +2 -2
- package/src/generation/grid/generation/discrete/layer/GridTaskDistanceToMarkers.js +2 -2
- package/src/generation/grid/generation/road/GridTaskGenerateRoads.js +2 -2
- package/src/core/collection/heap/FastBinaryHeap.d.ts.map +0 -1
- package/src/core/collection/heap/FastBinaryHeap.spec.d.ts +0 -2
- package/src/core/collection/heap/FastBinaryHeap.spec.d.ts.map +0 -1
- package/src/core/collection/heap/Uin32Heap.spec.d.ts +0 -2
- package/src/core/collection/heap/Uin32Heap.spec.d.ts.map +0 -1
- package/src/core/graph/cluster_mesh_metis.d.ts +0 -28
- package/src/core/graph/cluster_mesh_metis.d.ts.map +0 -1
- package/src/engine/input/devices/eventToSourceIdentifier.d.ts.map +0 -1
- /package/src/core/collection/heap/{Uin32Heap.spec.js → Uint32Heap.spec.js} +0 -0
- /package/src/engine/input/devices/{eventToSourceIdentifier.d.ts → events/eventToSourceIdentifier.d.ts} +0 -0
- /package/src/engine/input/devices/{eventToSourceIdentifier.js → events/eventToSourceIdentifier.js} +0 -0
package/build/meep.cjs
CHANGED
|
@@ -71549,6 +71549,23 @@ class EntityObserver {
|
|
|
71549
71549
|
}
|
|
71550
71550
|
}
|
|
71551
71551
|
|
|
71552
|
+
/**
|
|
71553
|
+
* Given an object and a value, find the first property with matching value and returns name of that property
|
|
71554
|
+
* Useful for working with ENUM-like objects
|
|
71555
|
+
* @param {Object<T>} object
|
|
71556
|
+
* @param {T} value
|
|
71557
|
+
* @returns {string|undefined} name of the property, or undefined if property not found
|
|
71558
|
+
*/
|
|
71559
|
+
function objectKeyByValue(object, value) {
|
|
71560
|
+
for (let i in object) {
|
|
71561
|
+
if (object[i] === value) {
|
|
71562
|
+
return i;
|
|
71563
|
+
}
|
|
71564
|
+
}
|
|
71565
|
+
|
|
71566
|
+
return undefined;
|
|
71567
|
+
}
|
|
71568
|
+
|
|
71552
71569
|
/**
|
|
71553
71570
|
*
|
|
71554
71571
|
* @enum {number}
|
|
@@ -71665,6 +71682,10 @@ class Edge {
|
|
|
71665
71682
|
return [this.first, this.second];
|
|
71666
71683
|
}
|
|
71667
71684
|
|
|
71685
|
+
toString() {
|
|
71686
|
+
return `Edge:{ first=${this.first}, second=${this.second}, direction=${objectKeyByValue(EdgeDirectionType, this.direction)} }`
|
|
71687
|
+
}
|
|
71688
|
+
|
|
71668
71689
|
}
|
|
71669
71690
|
|
|
71670
71691
|
/**
|
|
@@ -78582,23 +78603,6 @@ class ShadedGeometrySystem extends System {
|
|
|
78582
78603
|
}
|
|
78583
78604
|
}
|
|
78584
78605
|
|
|
78585
|
-
/**
|
|
78586
|
-
* Given an object and a value, find the first property with matching value and returns name of that property
|
|
78587
|
-
* Useful for working with ENUM-like objects
|
|
78588
|
-
* @param {Object<T>} object
|
|
78589
|
-
* @param {T} value
|
|
78590
|
-
* @returns {string|undefined} name of the property, or undefined if property not found
|
|
78591
|
-
*/
|
|
78592
|
-
function objectKeyByValue(object, value) {
|
|
78593
|
-
for (let i in object) {
|
|
78594
|
-
if (object[i] === value) {
|
|
78595
|
-
return i;
|
|
78596
|
-
}
|
|
78597
|
-
}
|
|
78598
|
-
|
|
78599
|
-
return undefined;
|
|
78600
|
-
}
|
|
78601
|
-
|
|
78602
78606
|
/**
|
|
78603
78607
|
*
|
|
78604
78608
|
* @enum {string}
|
|
@@ -84594,7 +84598,7 @@ class ViewStack extends View {
|
|
|
84594
84598
|
* The data structure is a binary heap where elements are removed in order defined by scoring function
|
|
84595
84599
|
* @template T
|
|
84596
84600
|
*/
|
|
84597
|
-
class
|
|
84601
|
+
class BinaryHeap {
|
|
84598
84602
|
/**
|
|
84599
84603
|
* @private
|
|
84600
84604
|
* @type {T[]}
|
|
@@ -84865,7 +84869,7 @@ class FastBinaryHeap {
|
|
|
84865
84869
|
* @readonly
|
|
84866
84870
|
* @type {boolean}
|
|
84867
84871
|
*/
|
|
84868
|
-
|
|
84872
|
+
BinaryHeap.prototype.isBinaryHeap = true;
|
|
84869
84873
|
|
|
84870
84874
|
/**
|
|
84871
84875
|
* Decorator that wraps another map and lets you observe mutations
|
|
@@ -86055,7 +86059,7 @@ let Response$1 = class Response {
|
|
|
86055
86059
|
};
|
|
86056
86060
|
|
|
86057
86061
|
/**
|
|
86058
|
-
* Used by the priority queue, so the priority is inverted as the
|
|
86062
|
+
* Used by the priority queue, so the priority is inverted as the BinaryHeap returns elements in ascending score order (from lowest)
|
|
86059
86063
|
* @param {PendingAsset} pending_asset
|
|
86060
86064
|
* @returns {number}
|
|
86061
86065
|
*/
|
|
@@ -86090,7 +86094,7 @@ class AssetManager {
|
|
|
86090
86094
|
* @type {BinaryHeap<PendingAsset>}
|
|
86091
86095
|
* @private
|
|
86092
86096
|
*/
|
|
86093
|
-
#pending_asset_wait_queue = new
|
|
86097
|
+
#pending_asset_wait_queue = new BinaryHeap(get_pending_asset_priority_score);
|
|
86094
86098
|
/**
|
|
86095
86099
|
* Assets currently being processed by #loaders
|
|
86096
86100
|
* @type {Set<PendingAsset>}
|
|
@@ -91422,38 +91426,6 @@ class KeyboardDevice {
|
|
|
91422
91426
|
}
|
|
91423
91427
|
}
|
|
91424
91428
|
|
|
91425
|
-
/**
|
|
91426
|
-
* Event names for DOM {@link EventTarget} related to mouse.
|
|
91427
|
-
* useful for .addEventListener and .removeEventListener
|
|
91428
|
-
* @readonly
|
|
91429
|
-
* @enum {string}
|
|
91430
|
-
*/
|
|
91431
|
-
const MouseEvents = {
|
|
91432
|
-
Down: "mousedown",
|
|
91433
|
-
Up: "mouseup",
|
|
91434
|
-
Move: "mousemove",
|
|
91435
|
-
Enter: "mouseenter",
|
|
91436
|
-
Leave: "mouseleave",
|
|
91437
|
-
Out: "mouseout",
|
|
91438
|
-
Over: "mouseover",
|
|
91439
|
-
Wheel: "wheel",
|
|
91440
|
-
Click: "click",
|
|
91441
|
-
DoubleClick: "dblclick"
|
|
91442
|
-
};
|
|
91443
|
-
|
|
91444
|
-
/**
|
|
91445
|
-
* Event names for DOM {@link EventTarget} related to touch.
|
|
91446
|
-
* useful for .addEventListener and .removeEventListener
|
|
91447
|
-
* @readonly
|
|
91448
|
-
* @enum {string}
|
|
91449
|
-
*/
|
|
91450
|
-
const TouchEvents = {
|
|
91451
|
-
Start: "touchstart",
|
|
91452
|
-
End: "touchend",
|
|
91453
|
-
Move: "touchmove",
|
|
91454
|
-
Cancel: "touchcancel",
|
|
91455
|
-
};
|
|
91456
|
-
|
|
91457
91429
|
/**
|
|
91458
91430
|
*
|
|
91459
91431
|
* @param {TouchEvent|MouseEvent} event
|
|
@@ -91491,6 +91463,38 @@ function eventToSourceIdentifier(event) {
|
|
|
91491
91463
|
;
|
|
91492
91464
|
}
|
|
91493
91465
|
|
|
91466
|
+
/**
|
|
91467
|
+
* Event names for DOM {@link EventTarget} related to mouse.
|
|
91468
|
+
* useful for .addEventListener and .removeEventListener
|
|
91469
|
+
* @readonly
|
|
91470
|
+
* @enum {string}
|
|
91471
|
+
*/
|
|
91472
|
+
const MouseEvents = {
|
|
91473
|
+
Down: "mousedown",
|
|
91474
|
+
Up: "mouseup",
|
|
91475
|
+
Move: "mousemove",
|
|
91476
|
+
Enter: "mouseenter",
|
|
91477
|
+
Leave: "mouseleave",
|
|
91478
|
+
Out: "mouseout",
|
|
91479
|
+
Over: "mouseover",
|
|
91480
|
+
Wheel: "wheel",
|
|
91481
|
+
Click: "click",
|
|
91482
|
+
DoubleClick: "dblclick"
|
|
91483
|
+
};
|
|
91484
|
+
|
|
91485
|
+
/**
|
|
91486
|
+
* Event names for DOM {@link EventTarget} related to touch.
|
|
91487
|
+
* useful for .addEventListener and .removeEventListener
|
|
91488
|
+
* @readonly
|
|
91489
|
+
* @enum {string}
|
|
91490
|
+
*/
|
|
91491
|
+
const TouchEvents = {
|
|
91492
|
+
Start: "touchstart",
|
|
91493
|
+
End: "touchend",
|
|
91494
|
+
Move: "touchmove",
|
|
91495
|
+
Cancel: "touchcancel",
|
|
91496
|
+
};
|
|
91497
|
+
|
|
91494
91498
|
class LocationalInteractionMetadata {
|
|
91495
91499
|
timestamp = performance.now()
|
|
91496
91500
|
position = new Vector2()
|
|
@@ -108164,7 +108168,7 @@ class MaxRectanglesPacker {
|
|
|
108164
108168
|
return -Math.min(box.getWidth(), box.getHeight());
|
|
108165
108169
|
}
|
|
108166
108170
|
|
|
108167
|
-
const heap = new
|
|
108171
|
+
const heap = new BinaryHeap(scoreBoxByMinSide);
|
|
108168
108172
|
|
|
108169
108173
|
for (let i = 0; i < numBoxes; i++) {
|
|
108170
108174
|
heap.push(i);
|