@woosh/meep-engine 2.109.25 → 2.110.0
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 +229 -461
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +229 -461
- package/editor/tools/GridPaintTool.js +12 -11
- package/editor/tools/engine/ToolEngine.js +2 -1
- 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/core/math/interval/NumericInterval.d.ts +13 -7
- package/src/core/math/interval/NumericInterval.d.ts.map +1 -1
- package/src/core/math/interval/NumericInterval.js +35 -15
- package/src/engine/asset/AssetManager.js +3 -3
- package/src/engine/graphics/camera/makeOrbitalCameraController.d.ts.map +1 -1
- package/src/engine/graphics/camera/makeOrbitalCameraController.js +4 -4
- package/src/engine/graphics/geometry/VertexDataSpec.d.ts.map +1 -1
- package/src/engine/graphics/geometry/VertexDataSpec.js +4 -7
- 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/LocationalInteractionMetadata.d.ts +4 -0
- package/src/engine/input/devices/LocationalInteractionMetadata.d.ts.map +1 -1
- package/src/engine/input/devices/LocationalInteractionMetadata.js +6 -1
- package/src/engine/input/devices/PointerDevice.d.ts +0 -3
- package/src/engine/input/devices/PointerDevice.d.ts.map +1 -1
- package/src/engine/input/devices/PointerDevice.js +49 -306
- package/src/engine/input/devices/events/PointerEvents.d.ts +14 -0
- package/src/engine/input/devices/events/PointerEvents.d.ts.map +1 -0
- package/src/engine/input/devices/events/PointerEvents.js +16 -0
- package/src/engine/input/devices/events/eventToSourceIdentifier.d.ts.map +1 -0
- package/src/engine/input/devices/mouse/decodeMouseEventButtons.d.ts +10 -0
- package/src/engine/input/devices/mouse/decodeMouseEventButtons.d.ts.map +1 -0
- package/src/engine/input/devices/mouse/decodeMouseEventButtons.js +19 -0
- package/src/engine/input/devices/mouse/suppressContextMenu.d.ts +7 -0
- package/src/engine/input/devices/mouse/suppressContextMenu.d.ts.map +1 -0
- package/src/engine/input/devices/mouse/suppressContextMenu.js +11 -0
- package/src/engine/input/devices/touch/TouchDevice.d.ts +20 -0
- package/src/engine/input/devices/touch/TouchDevice.d.ts.map +1 -0
- package/src/engine/input/devices/touch/TouchDevice.js +95 -0
- package/src/engine/input/devices/touch/getTouchCenter.d.ts +7 -0
- package/src/engine/input/devices/touch/getTouchCenter.d.ts.map +1 -0
- package/src/engine/input/devices/touch/getTouchCenter.js +32 -0
- package/src/engine/input/devices/touch/observePinch.d.ts +12 -0
- package/src/engine/input/devices/touch/observePinch.d.ts.map +1 -0
- package/src/engine/input/devices/touch/observePinch.js +128 -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
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons
|
|
3
|
+
* @see https://w3c.github.io/uievents/#widl-MouseEvent-buttons
|
|
4
|
+
*
|
|
5
|
+
* @param {Number} value
|
|
6
|
+
* @param {boolean[]} [result]
|
|
7
|
+
* @return {boolean[]} array of booleans, boolean is true if mouse button is pressed, false otherwise
|
|
8
|
+
*/
|
|
9
|
+
export function decodeMouseEventButtons(value: number, result?: boolean[]): boolean[];
|
|
10
|
+
//# sourceMappingURL=decodeMouseEventButtons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decodeMouseEventButtons.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/input/devices/mouse/decodeMouseEventButtons.js"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,gEAHW,OAAO,EAAE,GACR,OAAO,EAAE,CAYpB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons
|
|
3
|
+
* @see https://w3c.github.io/uievents/#widl-MouseEvent-buttons
|
|
4
|
+
*
|
|
5
|
+
* @param {Number} value
|
|
6
|
+
* @param {boolean[]} [result]
|
|
7
|
+
* @return {boolean[]} array of booleans, boolean is true if mouse button is pressed, false otherwise
|
|
8
|
+
*/
|
|
9
|
+
export function decodeMouseEventButtons(value, result = []) {
|
|
10
|
+
|
|
11
|
+
for (let i = 0; i < 32; i++) {
|
|
12
|
+
|
|
13
|
+
const shiftedValue = value >> i;
|
|
14
|
+
|
|
15
|
+
result[i] = (shiftedValue & 1) !== 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return result;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suppressContextMenu.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/input/devices/mouse/suppressContextMenu.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,2CAHW,KAAK,GACH,OAAO,CAOnB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export class TouchDevice {
|
|
2
|
+
/**
|
|
3
|
+
* Current live position of the pointer
|
|
4
|
+
* @readonly
|
|
5
|
+
* @type {Vector2}
|
|
6
|
+
*/
|
|
7
|
+
readonly position: Vector2;
|
|
8
|
+
/**
|
|
9
|
+
* @readonly
|
|
10
|
+
*/
|
|
11
|
+
readonly on: {
|
|
12
|
+
pinch: Signal<any, any, any, any, any, any, any, any>;
|
|
13
|
+
pinchStart: Signal<any, any, any, any, any, any, any, any>;
|
|
14
|
+
pinchEnd: Signal<any, any, any, any, any, any, any, any>;
|
|
15
|
+
};
|
|
16
|
+
#private;
|
|
17
|
+
}
|
|
18
|
+
import Vector2 from "../../../../core/geom/Vector2.js";
|
|
19
|
+
import Signal from "../../../../core/events/signal/Signal.js";
|
|
20
|
+
//# sourceMappingURL=TouchDevice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TouchDevice.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/input/devices/touch/TouchDevice.js"],"names":[],"mappings":"AAKA;IAEI;;;;OAIG;IACH,mBAFU,OAAO,CAEQ;IAezB;;OAEG;IACH;;;;MAIE;;CA4DL;oBA7FmB,kCAAkC;mBADnC,0CAA0C"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import Signal from "../../../../core/events/signal/Signal.js";
|
|
2
|
+
import Vector2 from "../../../../core/geom/Vector2.js";
|
|
3
|
+
import { getTouchCenter } from "./getTouchCenter.js";
|
|
4
|
+
import { observePinch } from "./observePinch.js";
|
|
5
|
+
|
|
6
|
+
export class TouchDevice{
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Current live position of the pointer
|
|
10
|
+
* @readonly
|
|
11
|
+
* @type {Vector2}
|
|
12
|
+
*/
|
|
13
|
+
position = new Vector2();
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @readonly
|
|
17
|
+
* @type {Vector2}
|
|
18
|
+
*/
|
|
19
|
+
#anchor_touch_last = new Vector2();
|
|
20
|
+
|
|
21
|
+
#globalUp = new Signal();
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
#touchStart = new Signal();
|
|
25
|
+
#touchEnd = new Signal();
|
|
26
|
+
#touchMove = new Signal();
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @readonly
|
|
30
|
+
*/
|
|
31
|
+
on = {
|
|
32
|
+
pinch: new Signal(),
|
|
33
|
+
pinchStart: new Signal(),
|
|
34
|
+
pinchEnd: new Signal(),
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
constructor() {
|
|
38
|
+
observePinch({
|
|
39
|
+
touchStart: this.#touchStart,
|
|
40
|
+
touchEnd: this.#touchEnd,
|
|
41
|
+
touchMove: this.#touchMove,
|
|
42
|
+
pinch: this.on.pinch,
|
|
43
|
+
pinchStart: this.on.pinchStart,
|
|
44
|
+
pinchEnd: this.on.pinchEnd,
|
|
45
|
+
device: this
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @param {TouchEvent} event
|
|
52
|
+
*/
|
|
53
|
+
#eventHandlerGlobalTouchEnd = (event) => {
|
|
54
|
+
getTouchCenter(event.touches, this.position);
|
|
55
|
+
this.#globalUp.send2(this.position, event);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @param {TouchEvent} event
|
|
61
|
+
*/
|
|
62
|
+
#eventHandlerTouchEnd = (event) => {
|
|
63
|
+
getTouchCenter(event.touches, this.position);
|
|
64
|
+
this.#touchEnd.send2(this.position, event);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @param {TouchEvent} event
|
|
70
|
+
*/
|
|
71
|
+
#eventHandlerTouchMove = (event) => {
|
|
72
|
+
event.preventDefault();
|
|
73
|
+
|
|
74
|
+
getTouchCenter(event.touches, this.position);
|
|
75
|
+
|
|
76
|
+
const delta = new Vector2();
|
|
77
|
+
|
|
78
|
+
delta.subVectors(this.position, this.#anchor_touch_last);
|
|
79
|
+
|
|
80
|
+
this.#touchMove.send3(this.position, event, delta);
|
|
81
|
+
|
|
82
|
+
this.#anchor_touch_last.copy(this.position);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @param {TouchEvent} event
|
|
88
|
+
*/
|
|
89
|
+
#eventHandlerTouchStart = (event) => {
|
|
90
|
+
getTouchCenter(event.touches, this.position);
|
|
91
|
+
this.#touchStart.send2(this.position, event);
|
|
92
|
+
|
|
93
|
+
this.#anchor_touch_last.copy(this.position);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTouchCenter.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/input/devices/touch/getTouchCenter.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,0CAHW,SAAS,yBA6BnB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {TouchList} touchList
|
|
4
|
+
* @param {Vector2} result
|
|
5
|
+
*/
|
|
6
|
+
export function getTouchCenter(touchList, result) {
|
|
7
|
+
const length = touchList.length;
|
|
8
|
+
|
|
9
|
+
let x = 0, y = 0;
|
|
10
|
+
|
|
11
|
+
if (length > 0) {
|
|
12
|
+
|
|
13
|
+
for (let i = 0; i < length; i++) {
|
|
14
|
+
const touch = touchList.item(i);
|
|
15
|
+
|
|
16
|
+
if (touch === null) {
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
x += touch.clientX;
|
|
21
|
+
y += touch.clientY;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// average to get center
|
|
25
|
+
x /= length;
|
|
26
|
+
y /= length;
|
|
27
|
+
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
result.set(x, y);
|
|
31
|
+
|
|
32
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {Signal} touchStart
|
|
4
|
+
* @param {Signal} touchEnd
|
|
5
|
+
* @param {Signal} touchMove
|
|
6
|
+
* @param {Signal} pinch
|
|
7
|
+
* @param {Signal} pinchStart
|
|
8
|
+
* @param {Signal} pinchEnd
|
|
9
|
+
* @param {PointerDevice} device
|
|
10
|
+
*/
|
|
11
|
+
export function observePinch({ touchStart, touchEnd, touchMove, pinch, pinchStart, pinchEnd, device }: Signal): void;
|
|
12
|
+
//# sourceMappingURL=observePinch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observePinch.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/input/devices/touch/observePinch.js"],"names":[],"mappings":"AAgBA;;;;;;;;;GASG;AACH,qHAqGC"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import Vector2 from "../../../../core/geom/Vector2.js";
|
|
2
|
+
import { getTouchCenter } from "./getTouchCenter.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @param {TouchList} touchList
|
|
7
|
+
* @param {function(Touch,number)} callback
|
|
8
|
+
*/
|
|
9
|
+
function forEachTouch(touchList, callback) {
|
|
10
|
+
const length = touchList.length;
|
|
11
|
+
for (let i = 0; i < length; i++) {
|
|
12
|
+
const touch = touchList.item(i);
|
|
13
|
+
callback(touch, i);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @param {Signal} touchStart
|
|
20
|
+
* @param {Signal} touchEnd
|
|
21
|
+
* @param {Signal} touchMove
|
|
22
|
+
* @param {Signal} pinch
|
|
23
|
+
* @param {Signal} pinchStart
|
|
24
|
+
* @param {Signal} pinchEnd
|
|
25
|
+
* @param {PointerDevice} device
|
|
26
|
+
*/
|
|
27
|
+
export function observePinch({
|
|
28
|
+
touchStart,
|
|
29
|
+
touchEnd,
|
|
30
|
+
touchMove,
|
|
31
|
+
pinch,
|
|
32
|
+
pinchStart,
|
|
33
|
+
pinchEnd,
|
|
34
|
+
device
|
|
35
|
+
}) {
|
|
36
|
+
const center = new Vector2();
|
|
37
|
+
|
|
38
|
+
const v2 = new Vector2();
|
|
39
|
+
|
|
40
|
+
const pinchBox0 = new Vector2();
|
|
41
|
+
const pinchBox1 = new Vector2();
|
|
42
|
+
|
|
43
|
+
let pinchActive = false;
|
|
44
|
+
let touchCount = 0;
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @param {TouchList} touchList
|
|
50
|
+
* @param {Vector2} pinchDimensions
|
|
51
|
+
*/
|
|
52
|
+
function computeTouchRadius(touchList, pinchDimensions) {
|
|
53
|
+
getTouchCenter(touchList, center);
|
|
54
|
+
|
|
55
|
+
const length = touchList.length;
|
|
56
|
+
|
|
57
|
+
pinchDimensions.set(0, 0);
|
|
58
|
+
|
|
59
|
+
for (let i = 0; i < length; i++) {
|
|
60
|
+
const touch = touchList.item(i);
|
|
61
|
+
|
|
62
|
+
device.readPointerPositionFromEvent(v2, touch);
|
|
63
|
+
|
|
64
|
+
v2.sub(center);
|
|
65
|
+
v2.abs();
|
|
66
|
+
|
|
67
|
+
pinchDimensions.add(v2);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return pinchDimensions.multiplyScalar(1 / length);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function touchRemoved(touch, event) {
|
|
74
|
+
touchCount--;
|
|
75
|
+
if (touchCount < 2 && pinchActive) {
|
|
76
|
+
handlePinchEnd(event);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function touchAdded(touch, event) {
|
|
81
|
+
touchCount++;
|
|
82
|
+
if (touchCount > 1 && !pinchActive) {
|
|
83
|
+
handlePinchStart(event);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function handlePinchStart(event) {
|
|
88
|
+
pinchActive = true;
|
|
89
|
+
|
|
90
|
+
computeTouchRadius(event.touches, pinchBox0);
|
|
91
|
+
|
|
92
|
+
touchMove.add(handleMove);
|
|
93
|
+
|
|
94
|
+
pinchStart.send1(pinchBox0);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
*
|
|
99
|
+
* @param {TouchEvent} event
|
|
100
|
+
*/
|
|
101
|
+
function handlePinchEnd(event) {
|
|
102
|
+
pinchActive = false;
|
|
103
|
+
|
|
104
|
+
touchMove.remove(handleMove);
|
|
105
|
+
|
|
106
|
+
pinchEnd.send0();
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function handleDown(position, event) {
|
|
110
|
+
forEachTouch(event.changedTouches, function (touch) {
|
|
111
|
+
touchAdded(touch, event);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function handleUp(position, event) {
|
|
116
|
+
forEachTouch(event.changedTouches, function (touch) {
|
|
117
|
+
touchRemoved(touch, event);
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function handleMove(position, event) {
|
|
122
|
+
computeTouchRadius(event.touches, pinchBox1);
|
|
123
|
+
pinch.send2(pinchBox1, pinchBox0);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
touchEnd.add(handleUp);
|
|
127
|
+
touchStart.add(handleDown);
|
|
128
|
+
}
|
|
@@ -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,
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
96
|
+
const open = new BinaryHeap(function (i) {
|
|
97
97
|
return target[i];
|
|
98
98
|
});
|
|
99
99
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
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
|
|
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
|
|
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
|
|
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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FastBinaryHeap.spec.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/heap/FastBinaryHeap.spec.js"],"names":[],"mappings":""}
|
|
@@ -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"}
|
|
File without changes
|
|
File without changes
|
/package/src/engine/input/devices/{eventToSourceIdentifier.js → events/eventToSourceIdentifier.js}
RENAMED
|
File without changes
|