@esengine/pathfinding 1.0.8 → 1.1.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.
@@ -1,572 +0,0 @@
1
- /**
2
- * @esengine/pathfinding v1.0.8
3
- * 高性能寻路算法库 - 支持A*、广度优先等算法,适用于Cocos Creator、Laya等游戏引擎
4
- *
5
- * @author yhh
6
- * @license MIT
7
- */
8
- (function (global, factory) {
9
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
10
- typeof define === 'function' && define.amd ? define(['exports'], factory) :
11
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Pathfinding = {}));
12
- })(this, (function (exports) { 'use strict';
13
-
14
- var Vector2Utils = (function () {
15
- function Vector2Utils() {
16
- }
17
- Vector2Utils.equals = function (a, b) {
18
- if (a.equals) {
19
- return a.equals(b);
20
- }
21
- return a.x === b.x && a.y === b.y;
22
- };
23
- Vector2Utils.create = function (x, y) {
24
- return { x: x, y: y };
25
- };
26
- Vector2Utils.clone = function (vector) {
27
- return { x: vector.x, y: vector.y };
28
- };
29
- Vector2Utils.add = function (a, b) {
30
- return { x: a.x + b.x, y: a.y + b.y };
31
- };
32
- Vector2Utils.manhattanDistance = function (a, b) {
33
- return Math.abs(a.x - b.x) + Math.abs(a.y - b.y);
34
- };
35
- Vector2Utils.distance = function (a, b) {
36
- var dx = a.x - b.x;
37
- var dy = a.y - b.y;
38
- return Math.sqrt(dx * dx + dy * dy);
39
- };
40
- Vector2Utils.toHash = function (vector) {
41
- var x = (vector.x + this.MAX_COORD) | 0;
42
- var y = (vector.y + this.MAX_COORD) | 0;
43
- return (x << 16) | y;
44
- };
45
- Vector2Utils.toKey = function (vector) {
46
- return "".concat(vector.x, ",").concat(vector.y);
47
- };
48
- Vector2Utils.fromHash = function (hash) {
49
- var x = (hash >> 16) - this.MAX_COORD;
50
- var y = (hash & 0xFFFF) - this.MAX_COORD;
51
- return { x: x, y: y };
52
- };
53
- Vector2Utils.HASH_MULTIPLIER = 73856093;
54
- Vector2Utils.MAX_COORD = 32767;
55
- return Vector2Utils;
56
- }());
57
-
58
- var PriorityQueue = (function () {
59
- function PriorityQueue() {
60
- this._heap = [];
61
- this._size = 0;
62
- }
63
- Object.defineProperty(PriorityQueue.prototype, "size", {
64
- get: function () {
65
- return this._size;
66
- },
67
- enumerable: false,
68
- configurable: true
69
- });
70
- Object.defineProperty(PriorityQueue.prototype, "isEmpty", {
71
- get: function () {
72
- return this._size === 0;
73
- },
74
- enumerable: false,
75
- configurable: true
76
- });
77
- PriorityQueue.prototype.clear = function () {
78
- this._heap.length = 0;
79
- this._size = 0;
80
- };
81
- PriorityQueue.prototype.enqueue = function (item) {
82
- this._heap[this._size] = item;
83
- this._bubbleUp(this._size);
84
- this._size++;
85
- };
86
- PriorityQueue.prototype.dequeue = function () {
87
- if (this._size === 0) {
88
- return undefined;
89
- }
90
- var result = this._heap[0];
91
- this._size--;
92
- if (this._size > 0) {
93
- this._heap[0] = this._heap[this._size];
94
- this._bubbleDown(0);
95
- }
96
- return result;
97
- };
98
- PriorityQueue.prototype.peek = function () {
99
- return this._size > 0 ? this._heap[0] : undefined;
100
- };
101
- PriorityQueue.prototype._bubbleUp = function (index) {
102
- while (index > 0) {
103
- var parentIndex = Math.floor((index - 1) / 2);
104
- if (this._heap[index].priority >= this._heap[parentIndex].priority) {
105
- break;
106
- }
107
- this._swap(index, parentIndex);
108
- index = parentIndex;
109
- }
110
- };
111
- PriorityQueue.prototype._bubbleDown = function (index) {
112
- while (true) {
113
- var minIndex = index;
114
- var leftChild = 2 * index + 1;
115
- var rightChild = 2 * index + 2;
116
- if (leftChild < this._size &&
117
- this._heap[leftChild].priority < this._heap[minIndex].priority) {
118
- minIndex = leftChild;
119
- }
120
- if (rightChild < this._size &&
121
- this._heap[rightChild].priority < this._heap[minIndex].priority) {
122
- minIndex = rightChild;
123
- }
124
- if (minIndex === index) {
125
- break;
126
- }
127
- this._swap(index, minIndex);
128
- index = minIndex;
129
- }
130
- };
131
- PriorityQueue.prototype._swap = function (i, j) {
132
- var temp = this._heap[i];
133
- this._heap[i] = this._heap[j];
134
- this._heap[j] = temp;
135
- };
136
- return PriorityQueue;
137
- }());
138
-
139
- var __spreadArray = (globalThis && globalThis.__spreadArray) || function (to, from, pack) {
140
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
141
- if (ar || !(i in from)) {
142
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
143
- ar[i] = from[i];
144
- }
145
- }
146
- return to.concat(ar || Array.prototype.slice.call(from));
147
- };
148
- var AStarNode = (function () {
149
- function AStarNode(node, gCost, hCost, parent) {
150
- if (gCost === void 0) { gCost = 0; }
151
- if (hCost === void 0) { hCost = 0; }
152
- if (parent === void 0) { parent = null; }
153
- this.priority = 0;
154
- this.gCost = 0;
155
- this.hCost = 0;
156
- this.parent = null;
157
- this.hash = 0;
158
- this.node = node;
159
- this.gCost = gCost;
160
- this.hCost = hCost;
161
- this.priority = gCost + hCost;
162
- this.parent = parent;
163
- this.hash = Vector2Utils.toHash(node);
164
- }
165
- AStarNode.prototype.updateCosts = function (gCost, hCost, parent) {
166
- if (parent === void 0) { parent = null; }
167
- this.gCost = gCost;
168
- this.hCost = hCost;
169
- this.priority = gCost + hCost;
170
- this.parent = parent;
171
- };
172
- AStarNode.prototype.updateNode = function (node, gCost, hCost, parent) {
173
- if (gCost === void 0) { gCost = 0; }
174
- if (hCost === void 0) { hCost = 0; }
175
- if (parent === void 0) { parent = null; }
176
- this.node = node;
177
- this.gCost = gCost;
178
- this.hCost = hCost;
179
- this.priority = gCost + hCost;
180
- this.parent = parent;
181
- this.hash = Vector2Utils.toHash(node);
182
- };
183
- AStarNode.prototype.reset = function () {
184
- this.node = null;
185
- this.priority = 0;
186
- this.gCost = 0;
187
- this.hCost = 0;
188
- this.parent = null;
189
- this.hash = 0;
190
- };
191
- return AStarNode;
192
- }());
193
- var AStarPathfinder = (function () {
194
- function AStarPathfinder() {
195
- }
196
- AStarPathfinder._getNode = function (node, gCost, hCost, parent) {
197
- if (gCost === void 0) { gCost = 0; }
198
- if (hCost === void 0) { hCost = 0; }
199
- if (parent === void 0) { parent = null; }
200
- var astarNode = this._nodePool.pop();
201
- if (!astarNode) {
202
- astarNode = new AStarNode(node, gCost, hCost, parent);
203
- }
204
- else {
205
- astarNode.updateNode(node, gCost, hCost, parent);
206
- }
207
- return astarNode;
208
- };
209
- AStarPathfinder._recycleNode = function (node) {
210
- if (this._nodePool.length < 1000) {
211
- node.reset();
212
- this._nodePool.push(node);
213
- }
214
- };
215
- AStarPathfinder.search = function (graph, start, goal) {
216
- var openSet = new PriorityQueue();
217
- var closedSet = new Set();
218
- var openSetMap = new Map();
219
- var startHash = Vector2Utils.toHash(start);
220
- var goalHash = Vector2Utils.toHash(goal);
221
- if (startHash === goalHash) {
222
- return { found: true, goalNode: this._getNode(start, 0, 0) };
223
- }
224
- if (!graph.isNodePassable(start)) {
225
- return { found: false, openSetNodes: [] };
226
- }
227
- var startNode = this._getNode(start, 0, graph.heuristic(start, goal));
228
- openSet.enqueue(startNode);
229
- openSetMap.set(startHash, startNode);
230
- var goalNode;
231
- var processedNodes = [];
232
- while (!openSet.isEmpty) {
233
- var current = openSet.dequeue();
234
- var currentHash = current.hash;
235
- openSetMap.delete(currentHash);
236
- if (currentHash === goalHash) {
237
- goalNode = current;
238
- break;
239
- }
240
- closedSet.add(currentHash);
241
- for (var _i = 0, _a = graph.getNeighbors(current.node); _i < _a.length; _i++) {
242
- var neighbor = _a[_i];
243
- var neighborHash = Vector2Utils.toHash(neighbor);
244
- if (closedSet.has(neighborHash)) {
245
- continue;
246
- }
247
- var tentativeGScore = current.gCost + graph.cost(current.node, neighbor);
248
- var existingNode = openSetMap.get(neighborHash);
249
- if (existingNode) {
250
- if (tentativeGScore < existingNode.gCost) {
251
- var hCost = existingNode.hCost;
252
- existingNode.updateCosts(tentativeGScore, hCost, current);
253
- }
254
- }
255
- else {
256
- var hCost = graph.heuristic(neighbor, goal);
257
- var neighborNode = this._getNode(neighbor, tentativeGScore, hCost, current);
258
- openSet.enqueue(neighborNode);
259
- openSetMap.set(neighborHash, neighborNode);
260
- }
261
- }
262
- processedNodes.push(current);
263
- }
264
- var remainingNodes = [];
265
- while (!openSet.isEmpty) {
266
- remainingNodes.push(openSet.dequeue());
267
- }
268
- var allNodesToRecycle = __spreadArray(__spreadArray([], processedNodes, true), remainingNodes, true);
269
- return { found: !!goalNode, goalNode: goalNode, openSetNodes: allNodesToRecycle };
270
- };
271
- AStarPathfinder.searchPath = function (graph, start, goal) {
272
- var result = this.search(graph, start, goal);
273
- if (!result.found || !result.goalNode) {
274
- if (result.openSetNodes) {
275
- for (var _i = 0, _a = result.openSetNodes; _i < _a.length; _i++) {
276
- var node = _a[_i];
277
- this._recycleNode(node);
278
- }
279
- }
280
- return [];
281
- }
282
- var path = this.reconstructPathFromNode(result.goalNode);
283
- if (result.openSetNodes) {
284
- for (var _b = 0, _c = result.openSetNodes; _b < _c.length; _b++) {
285
- var node = _c[_b];
286
- this._recycleNode(node);
287
- }
288
- }
289
- return path;
290
- };
291
- AStarPathfinder.reconstructPathFromNode = function (goalNode) {
292
- this._tempPath.length = 0;
293
- var current = goalNode;
294
- while (current) {
295
- this._tempPath.unshift(current.node);
296
- current = current.parent;
297
- }
298
- return __spreadArray([], this._tempPath, true);
299
- };
300
- AStarPathfinder.hasPath = function (graph, start, goal) {
301
- var result = this.search(graph, start, goal);
302
- if (result.goalNode) {
303
- this._recycleNode(result.goalNode);
304
- }
305
- if (result.openSetNodes) {
306
- for (var _i = 0, _a = result.openSetNodes; _i < _a.length; _i++) {
307
- var node = _a[_i];
308
- if (node !== result.goalNode) {
309
- this._recycleNode(node);
310
- }
311
- }
312
- }
313
- return result.found;
314
- };
315
- AStarPathfinder.clearPool = function () {
316
- this._nodePool.length = 0;
317
- this._tempPath.length = 0;
318
- };
319
- AStarPathfinder.getPoolStats = function () {
320
- return {
321
- poolSize: this._nodePool.length,
322
- maxPoolSize: 1000
323
- };
324
- };
325
- AStarPathfinder._nodePool = [];
326
- AStarPathfinder._tempPath = [];
327
- return AStarPathfinder;
328
- }());
329
-
330
- var AstarGridGraph = (function () {
331
- function AstarGridGraph(width, height) {
332
- this.dirs = [
333
- Vector2Utils.create(1, 0),
334
- Vector2Utils.create(0, -1),
335
- Vector2Utils.create(-1, 0),
336
- Vector2Utils.create(0, 1)
337
- ];
338
- this.walls = [];
339
- this.weightedNodes = [];
340
- this.defaultWeight = 1;
341
- this.weightedNodeWeight = 5;
342
- this._neighbors = new Array(4);
343
- this._wallsSet = new Set();
344
- this._weightedNodesSet = new Set();
345
- this._wallsDirty = true;
346
- this._weightedNodesDirty = true;
347
- this._width = width;
348
- this._height = height;
349
- }
350
- AstarGridGraph.prototype.addWall = function (wall) {
351
- this.walls.push(wall);
352
- this._wallsDirty = true;
353
- };
354
- AstarGridGraph.prototype.addWalls = function (walls) {
355
- var _a;
356
- (_a = this.walls).push.apply(_a, walls);
357
- this._wallsDirty = true;
358
- };
359
- AstarGridGraph.prototype.clearWalls = function () {
360
- this.walls.length = 0;
361
- this._wallsSet.clear();
362
- this._wallsDirty = false;
363
- };
364
- AstarGridGraph.prototype.addWeightedNode = function (node) {
365
- this.weightedNodes.push(node);
366
- this._weightedNodesDirty = true;
367
- };
368
- AstarGridGraph.prototype.addWeightedNodes = function (nodes) {
369
- var _a;
370
- (_a = this.weightedNodes).push.apply(_a, nodes);
371
- this._weightedNodesDirty = true;
372
- };
373
- AstarGridGraph.prototype.clearWeightedNodes = function () {
374
- this.weightedNodes.length = 0;
375
- this._weightedNodesSet.clear();
376
- this._weightedNodesDirty = false;
377
- };
378
- AstarGridGraph.prototype._updateHashSets = function () {
379
- if (this._wallsDirty) {
380
- this._wallsSet.clear();
381
- for (var _i = 0, _a = this.walls; _i < _a.length; _i++) {
382
- var wall = _a[_i];
383
- this._wallsSet.add(Vector2Utils.toHash(wall));
384
- }
385
- this._wallsDirty = false;
386
- }
387
- if (this._weightedNodesDirty) {
388
- this._weightedNodesSet.clear();
389
- for (var _b = 0, _c = this.weightedNodes; _b < _c.length; _b++) {
390
- var node = _c[_b];
391
- this._weightedNodesSet.add(Vector2Utils.toHash(node));
392
- }
393
- this._weightedNodesDirty = false;
394
- }
395
- };
396
- AstarGridGraph.prototype.isNodeInBounds = function (node) {
397
- return 0 <= node.x && node.x < this._width && 0 <= node.y && node.y < this._height;
398
- };
399
- AstarGridGraph.prototype.isNodePassable = function (node) {
400
- this._updateHashSets();
401
- return !this._wallsSet.has(Vector2Utils.toHash(node));
402
- };
403
- AstarGridGraph.prototype.search = function (start, goal) {
404
- return AStarPathfinder.hasPath(this, start, goal);
405
- };
406
- AstarGridGraph.prototype.searchPath = function (start, goal) {
407
- return AStarPathfinder.searchPath(this, start, goal);
408
- };
409
- AstarGridGraph.prototype.getNeighbors = function (node) {
410
- this._neighbors.length = 0;
411
- for (var _i = 0, _a = this.dirs; _i < _a.length; _i++) {
412
- var dir = _a[_i];
413
- var next = Vector2Utils.add(node, dir);
414
- if (this.isNodeInBounds(next) && this.isNodePassable(next)) {
415
- this._neighbors.push(next);
416
- }
417
- }
418
- return this._neighbors;
419
- };
420
- AstarGridGraph.prototype.cost = function (from, to) {
421
- this._updateHashSets();
422
- return this._weightedNodesSet.has(Vector2Utils.toHash(to)) ? this.weightedNodeWeight : this.defaultWeight;
423
- };
424
- AstarGridGraph.prototype.heuristic = function (node, goal) {
425
- return Vector2Utils.manhattanDistance(node, goal);
426
- };
427
- AstarGridGraph.prototype.getStats = function () {
428
- this._updateHashSets();
429
- return {
430
- walls: this.walls.length,
431
- weightedNodes: this.weightedNodes.length,
432
- gridSize: "".concat(this._width, "x").concat(this._height),
433
- wallsSetSize: this._wallsSet.size,
434
- weightedNodesSetSize: this._weightedNodesSet.size
435
- };
436
- };
437
- return AstarGridGraph;
438
- }());
439
-
440
- var BreadthFirstPathfinder = (function () {
441
- function BreadthFirstPathfinder() {
442
- }
443
- BreadthFirstPathfinder.search = function (graph, start, goal, cameFrom) {
444
- var frontier = [];
445
- var visited = new Set();
446
- var pathMap = cameFrom || new Map();
447
- var startHash = Vector2Utils.toHash(start);
448
- var goalHash = Vector2Utils.toHash(goal);
449
- if (startHash === goalHash) {
450
- return true;
451
- }
452
- frontier.push(start);
453
- visited.add(startHash);
454
- while (frontier.length > 0) {
455
- var current = frontier.shift();
456
- var currentHash = Vector2Utils.toHash(current);
457
- if (currentHash === goalHash) {
458
- return true;
459
- }
460
- for (var _i = 0, _a = graph.getNeighbors(current); _i < _a.length; _i++) {
461
- var neighbor = _a[_i];
462
- var neighborHash = Vector2Utils.toHash(neighbor);
463
- if (visited.has(neighborHash)) {
464
- continue;
465
- }
466
- visited.add(neighborHash);
467
- pathMap.set(neighborHash, current);
468
- frontier.push(neighbor);
469
- }
470
- }
471
- return false;
472
- };
473
- BreadthFirstPathfinder.searchPath = function (graph, start, goal) {
474
- var cameFrom = new Map();
475
- if (this.search(graph, start, goal, cameFrom)) {
476
- return this.reconstructPath(cameFrom, start, goal);
477
- }
478
- return [];
479
- };
480
- BreadthFirstPathfinder.reconstructPath = function (cameFrom, start, goal) {
481
- var path = [];
482
- var current = goal;
483
- var startHash = Vector2Utils.toHash(start);
484
- while (Vector2Utils.toHash(current) !== startHash) {
485
- path.unshift(current);
486
- var currentHash = Vector2Utils.toHash(current);
487
- var parent_1 = cameFrom.get(currentHash);
488
- if (!parent_1)
489
- break;
490
- current = parent_1;
491
- }
492
- path.unshift(start);
493
- return path;
494
- };
495
- return BreadthFirstPathfinder;
496
- }());
497
-
498
- var UnweightedGraph = (function () {
499
- function UnweightedGraph() {
500
- this.edges = new Map();
501
- }
502
- UnweightedGraph.prototype.addEdgesForNode = function (node, neighbors) {
503
- this.edges.set(node, neighbors);
504
- return this;
505
- };
506
- UnweightedGraph.prototype.getNeighbors = function (node) {
507
- return this.edges.get(node) || [];
508
- };
509
- return UnweightedGraph;
510
- }());
511
-
512
- var UnweightedGridGraph = (function () {
513
- function UnweightedGridGraph(width, height, allowDiagonalSearch) {
514
- if (allowDiagonalSearch === void 0) { allowDiagonalSearch = false; }
515
- this.walls = [];
516
- this._neighbors = [];
517
- this._width = width;
518
- this._height = height;
519
- this._dirs = allowDiagonalSearch ? UnweightedGridGraph.COMPASS_DIRS : UnweightedGridGraph.CARDINAL_DIRS;
520
- }
521
- UnweightedGridGraph.prototype.isNodeInBounds = function (node) {
522
- return 0 <= node.x && node.x < this._width && 0 <= node.y && node.y < this._height;
523
- };
524
- UnweightedGridGraph.prototype.isNodePassable = function (node) {
525
- return !this.walls.find(function (wall) { return Vector2Utils.equals(wall, node); });
526
- };
527
- UnweightedGridGraph.prototype.getNeighbors = function (node) {
528
- this._neighbors.length = 0;
529
- for (var _i = 0, _a = this._dirs; _i < _a.length; _i++) {
530
- var dir = _a[_i];
531
- var next = Vector2Utils.add(node, dir);
532
- if (this.isNodeInBounds(next) && this.isNodePassable(next)) {
533
- this._neighbors.push(next);
534
- }
535
- }
536
- return this._neighbors;
537
- };
538
- UnweightedGridGraph.prototype.searchPath = function (start, goal) {
539
- return BreadthFirstPathfinder.searchPath(this, start, goal);
540
- };
541
- UnweightedGridGraph.prototype.hasPath = function (start, goal) {
542
- return BreadthFirstPathfinder.search(this, start, goal);
543
- };
544
- UnweightedGridGraph.CARDINAL_DIRS = [
545
- Vector2Utils.create(1, 0),
546
- Vector2Utils.create(0, -1),
547
- Vector2Utils.create(-1, 0),
548
- Vector2Utils.create(0, 1)
549
- ];
550
- UnweightedGridGraph.COMPASS_DIRS = [
551
- Vector2Utils.create(1, 0),
552
- Vector2Utils.create(1, -1),
553
- Vector2Utils.create(0, -1),
554
- Vector2Utils.create(-1, -1),
555
- Vector2Utils.create(-1, 0),
556
- Vector2Utils.create(-1, 1),
557
- Vector2Utils.create(0, 1),
558
- Vector2Utils.create(1, 1),
559
- ];
560
- return UnweightedGridGraph;
561
- }());
562
-
563
- exports.AStarPathfinder = AStarPathfinder;
564
- exports.AstarGridGraph = AstarGridGraph;
565
- exports.BreadthFirstPathfinder = BreadthFirstPathfinder;
566
- exports.PriorityQueue = PriorityQueue;
567
- exports.UnweightedGraph = UnweightedGraph;
568
- exports.UnweightedGridGraph = UnweightedGridGraph;
569
- exports.Vector2Utils = Vector2Utils;
570
-
571
- }));
572
- //# sourceMappingURL=pathfinding.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pathfinding.js","sources":["../bin/Types/IVector2.js","../bin/Utils/PriorityQueue.js","../bin/AI/Pathfinding/AStar/AStarPathfinder.js","../bin/AI/Pathfinding/AStar/AstarGridGraph.js","../bin/AI/Pathfinding/BreadthFirst/BreadthFirstPathfinder.js","../bin/AI/Pathfinding/BreadthFirst/UnweightedGraph.js","../bin/AI/Pathfinding/BreadthFirst/UnweightedGridGraph.js"],"sourcesContent":["var Vector2Utils = (function () {\n function Vector2Utils() {\n }\n Vector2Utils.equals = function (a, b) {\n if (a.equals) {\n return a.equals(b);\n }\n return a.x === b.x && a.y === b.y;\n };\n Vector2Utils.create = function (x, y) {\n return { x: x, y: y };\n };\n Vector2Utils.clone = function (vector) {\n return { x: vector.x, y: vector.y };\n };\n Vector2Utils.add = function (a, b) {\n return { x: a.x + b.x, y: a.y + b.y };\n };\n Vector2Utils.manhattanDistance = function (a, b) {\n return Math.abs(a.x - b.x) + Math.abs(a.y - b.y);\n };\n Vector2Utils.distance = function (a, b) {\n var dx = a.x - b.x;\n var dy = a.y - b.y;\n return Math.sqrt(dx * dx + dy * dy);\n };\n Vector2Utils.toHash = function (vector) {\n var x = (vector.x + this.MAX_COORD) | 0;\n var y = (vector.y + this.MAX_COORD) | 0;\n return (x << 16) | y;\n };\n Vector2Utils.toKey = function (vector) {\n return \"\".concat(vector.x, \",\").concat(vector.y);\n };\n Vector2Utils.fromHash = function (hash) {\n var x = (hash >> 16) - this.MAX_COORD;\n var y = (hash & 0xFFFF) - this.MAX_COORD;\n return { x: x, y: y };\n };\n Vector2Utils.HASH_MULTIPLIER = 73856093;\n Vector2Utils.MAX_COORD = 32767;\n return Vector2Utils;\n}());\nexport { Vector2Utils };\n","var PriorityQueue = (function () {\n function PriorityQueue() {\n this._heap = [];\n this._size = 0;\n }\n Object.defineProperty(PriorityQueue.prototype, \"size\", {\n get: function () {\n return this._size;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(PriorityQueue.prototype, \"isEmpty\", {\n get: function () {\n return this._size === 0;\n },\n enumerable: false,\n configurable: true\n });\n PriorityQueue.prototype.clear = function () {\n this._heap.length = 0;\n this._size = 0;\n };\n PriorityQueue.prototype.enqueue = function (item) {\n this._heap[this._size] = item;\n this._bubbleUp(this._size);\n this._size++;\n };\n PriorityQueue.prototype.dequeue = function () {\n if (this._size === 0) {\n return undefined;\n }\n var result = this._heap[0];\n this._size--;\n if (this._size > 0) {\n this._heap[0] = this._heap[this._size];\n this._bubbleDown(0);\n }\n return result;\n };\n PriorityQueue.prototype.peek = function () {\n return this._size > 0 ? this._heap[0] : undefined;\n };\n PriorityQueue.prototype._bubbleUp = function (index) {\n while (index > 0) {\n var parentIndex = Math.floor((index - 1) / 2);\n if (this._heap[index].priority >= this._heap[parentIndex].priority) {\n break;\n }\n this._swap(index, parentIndex);\n index = parentIndex;\n }\n };\n PriorityQueue.prototype._bubbleDown = function (index) {\n while (true) {\n var minIndex = index;\n var leftChild = 2 * index + 1;\n var rightChild = 2 * index + 2;\n if (leftChild < this._size &&\n this._heap[leftChild].priority < this._heap[minIndex].priority) {\n minIndex = leftChild;\n }\n if (rightChild < this._size &&\n this._heap[rightChild].priority < this._heap[minIndex].priority) {\n minIndex = rightChild;\n }\n if (minIndex === index) {\n break;\n }\n this._swap(index, minIndex);\n index = minIndex;\n }\n };\n PriorityQueue.prototype._swap = function (i, j) {\n var temp = this._heap[i];\n this._heap[i] = this._heap[j];\n this._heap[j] = temp;\n };\n return PriorityQueue;\n}());\nexport { PriorityQueue };\n","var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { Vector2Utils } from '../../../Types/IVector2';\nimport { PriorityQueue } from '../../../Utils/PriorityQueue';\nvar AStarNode = (function () {\n function AStarNode(node, gCost, hCost, parent) {\n if (gCost === void 0) { gCost = 0; }\n if (hCost === void 0) { hCost = 0; }\n if (parent === void 0) { parent = null; }\n this.priority = 0;\n this.gCost = 0;\n this.hCost = 0;\n this.parent = null;\n this.hash = 0;\n this.node = node;\n this.gCost = gCost;\n this.hCost = hCost;\n this.priority = gCost + hCost;\n this.parent = parent;\n this.hash = Vector2Utils.toHash(node);\n }\n AStarNode.prototype.updateCosts = function (gCost, hCost, parent) {\n if (parent === void 0) { parent = null; }\n this.gCost = gCost;\n this.hCost = hCost;\n this.priority = gCost + hCost;\n this.parent = parent;\n };\n AStarNode.prototype.updateNode = function (node, gCost, hCost, parent) {\n if (gCost === void 0) { gCost = 0; }\n if (hCost === void 0) { hCost = 0; }\n if (parent === void 0) { parent = null; }\n this.node = node;\n this.gCost = gCost;\n this.hCost = hCost;\n this.priority = gCost + hCost;\n this.parent = parent;\n this.hash = Vector2Utils.toHash(node);\n };\n AStarNode.prototype.reset = function () {\n this.node = null;\n this.priority = 0;\n this.gCost = 0;\n this.hCost = 0;\n this.parent = null;\n this.hash = 0;\n };\n return AStarNode;\n}());\nvar AStarPathfinder = (function () {\n function AStarPathfinder() {\n }\n AStarPathfinder._getNode = function (node, gCost, hCost, parent) {\n if (gCost === void 0) { gCost = 0; }\n if (hCost === void 0) { hCost = 0; }\n if (parent === void 0) { parent = null; }\n var astarNode = this._nodePool.pop();\n if (!astarNode) {\n astarNode = new AStarNode(node, gCost, hCost, parent);\n }\n else {\n astarNode.updateNode(node, gCost, hCost, parent);\n }\n return astarNode;\n };\n AStarPathfinder._recycleNode = function (node) {\n if (this._nodePool.length < 1000) {\n node.reset();\n this._nodePool.push(node);\n }\n };\n AStarPathfinder.search = function (graph, start, goal) {\n var openSet = new PriorityQueue();\n var closedSet = new Set();\n var openSetMap = new Map();\n var startHash = Vector2Utils.toHash(start);\n var goalHash = Vector2Utils.toHash(goal);\n if (startHash === goalHash) {\n return { found: true, goalNode: this._getNode(start, 0, 0) };\n }\n if (!graph.isNodePassable(start)) {\n return { found: false, openSetNodes: [] };\n }\n var startNode = this._getNode(start, 0, graph.heuristic(start, goal));\n openSet.enqueue(startNode);\n openSetMap.set(startHash, startNode);\n var goalNode;\n var processedNodes = [];\n while (!openSet.isEmpty) {\n var current = openSet.dequeue();\n var currentHash = current.hash;\n openSetMap.delete(currentHash);\n if (currentHash === goalHash) {\n goalNode = current;\n break;\n }\n closedSet.add(currentHash);\n for (var _i = 0, _a = graph.getNeighbors(current.node); _i < _a.length; _i++) {\n var neighbor = _a[_i];\n var neighborHash = Vector2Utils.toHash(neighbor);\n if (closedSet.has(neighborHash)) {\n continue;\n }\n var tentativeGScore = current.gCost + graph.cost(current.node, neighbor);\n var existingNode = openSetMap.get(neighborHash);\n if (existingNode) {\n if (tentativeGScore < existingNode.gCost) {\n var hCost = existingNode.hCost;\n existingNode.updateCosts(tentativeGScore, hCost, current);\n }\n }\n else {\n var hCost = graph.heuristic(neighbor, goal);\n var neighborNode = this._getNode(neighbor, tentativeGScore, hCost, current);\n openSet.enqueue(neighborNode);\n openSetMap.set(neighborHash, neighborNode);\n }\n }\n processedNodes.push(current);\n }\n var remainingNodes = [];\n while (!openSet.isEmpty) {\n remainingNodes.push(openSet.dequeue());\n }\n var allNodesToRecycle = __spreadArray(__spreadArray([], processedNodes, true), remainingNodes, true);\n return { found: !!goalNode, goalNode: goalNode, openSetNodes: allNodesToRecycle };\n };\n AStarPathfinder.searchPath = function (graph, start, goal) {\n var result = this.search(graph, start, goal);\n if (!result.found || !result.goalNode) {\n if (result.openSetNodes) {\n for (var _i = 0, _a = result.openSetNodes; _i < _a.length; _i++) {\n var node = _a[_i];\n this._recycleNode(node);\n }\n }\n return [];\n }\n var path = this.reconstructPathFromNode(result.goalNode);\n if (result.openSetNodes) {\n for (var _b = 0, _c = result.openSetNodes; _b < _c.length; _b++) {\n var node = _c[_b];\n this._recycleNode(node);\n }\n }\n return path;\n };\n AStarPathfinder.reconstructPathFromNode = function (goalNode) {\n this._tempPath.length = 0;\n var current = goalNode;\n while (current) {\n this._tempPath.unshift(current.node);\n current = current.parent;\n }\n return __spreadArray([], this._tempPath, true);\n };\n AStarPathfinder.hasPath = function (graph, start, goal) {\n var result = this.search(graph, start, goal);\n if (result.goalNode) {\n this._recycleNode(result.goalNode);\n }\n if (result.openSetNodes) {\n for (var _i = 0, _a = result.openSetNodes; _i < _a.length; _i++) {\n var node = _a[_i];\n if (node !== result.goalNode) {\n this._recycleNode(node);\n }\n }\n }\n return result.found;\n };\n AStarPathfinder.clearPool = function () {\n this._nodePool.length = 0;\n this._tempPath.length = 0;\n };\n AStarPathfinder.getPoolStats = function () {\n return {\n poolSize: this._nodePool.length,\n maxPoolSize: 1000\n };\n };\n AStarPathfinder._nodePool = [];\n AStarPathfinder._tempPath = [];\n return AStarPathfinder;\n}());\nexport { AStarPathfinder };\n","import { Vector2Utils } from '../../../Types/IVector2';\nimport { AStarPathfinder } from './AStarPathfinder';\nvar AstarGridGraph = (function () {\n function AstarGridGraph(width, height) {\n this.dirs = [\n Vector2Utils.create(1, 0),\n Vector2Utils.create(0, -1),\n Vector2Utils.create(-1, 0),\n Vector2Utils.create(0, 1)\n ];\n this.walls = [];\n this.weightedNodes = [];\n this.defaultWeight = 1;\n this.weightedNodeWeight = 5;\n this._neighbors = new Array(4);\n this._wallsSet = new Set();\n this._weightedNodesSet = new Set();\n this._wallsDirty = true;\n this._weightedNodesDirty = true;\n this._width = width;\n this._height = height;\n }\n AstarGridGraph.prototype.addWall = function (wall) {\n this.walls.push(wall);\n this._wallsDirty = true;\n };\n AstarGridGraph.prototype.addWalls = function (walls) {\n var _a;\n (_a = this.walls).push.apply(_a, walls);\n this._wallsDirty = true;\n };\n AstarGridGraph.prototype.clearWalls = function () {\n this.walls.length = 0;\n this._wallsSet.clear();\n this._wallsDirty = false;\n };\n AstarGridGraph.prototype.addWeightedNode = function (node) {\n this.weightedNodes.push(node);\n this._weightedNodesDirty = true;\n };\n AstarGridGraph.prototype.addWeightedNodes = function (nodes) {\n var _a;\n (_a = this.weightedNodes).push.apply(_a, nodes);\n this._weightedNodesDirty = true;\n };\n AstarGridGraph.prototype.clearWeightedNodes = function () {\n this.weightedNodes.length = 0;\n this._weightedNodesSet.clear();\n this._weightedNodesDirty = false;\n };\n AstarGridGraph.prototype._updateHashSets = function () {\n if (this._wallsDirty) {\n this._wallsSet.clear();\n for (var _i = 0, _a = this.walls; _i < _a.length; _i++) {\n var wall = _a[_i];\n this._wallsSet.add(Vector2Utils.toHash(wall));\n }\n this._wallsDirty = false;\n }\n if (this._weightedNodesDirty) {\n this._weightedNodesSet.clear();\n for (var _b = 0, _c = this.weightedNodes; _b < _c.length; _b++) {\n var node = _c[_b];\n this._weightedNodesSet.add(Vector2Utils.toHash(node));\n }\n this._weightedNodesDirty = false;\n }\n };\n AstarGridGraph.prototype.isNodeInBounds = function (node) {\n return 0 <= node.x && node.x < this._width && 0 <= node.y && node.y < this._height;\n };\n AstarGridGraph.prototype.isNodePassable = function (node) {\n this._updateHashSets();\n return !this._wallsSet.has(Vector2Utils.toHash(node));\n };\n AstarGridGraph.prototype.search = function (start, goal) {\n return AStarPathfinder.hasPath(this, start, goal);\n };\n AstarGridGraph.prototype.searchPath = function (start, goal) {\n return AStarPathfinder.searchPath(this, start, goal);\n };\n AstarGridGraph.prototype.getNeighbors = function (node) {\n this._neighbors.length = 0;\n for (var _i = 0, _a = this.dirs; _i < _a.length; _i++) {\n var dir = _a[_i];\n var next = Vector2Utils.add(node, dir);\n if (this.isNodeInBounds(next) && this.isNodePassable(next)) {\n this._neighbors.push(next);\n }\n }\n return this._neighbors;\n };\n AstarGridGraph.prototype.cost = function (from, to) {\n this._updateHashSets();\n return this._weightedNodesSet.has(Vector2Utils.toHash(to)) ? this.weightedNodeWeight : this.defaultWeight;\n };\n AstarGridGraph.prototype.heuristic = function (node, goal) {\n return Vector2Utils.manhattanDistance(node, goal);\n };\n AstarGridGraph.prototype.getStats = function () {\n this._updateHashSets();\n return {\n walls: this.walls.length,\n weightedNodes: this.weightedNodes.length,\n gridSize: \"\".concat(this._width, \"x\").concat(this._height),\n wallsSetSize: this._wallsSet.size,\n weightedNodesSetSize: this._weightedNodesSet.size\n };\n };\n return AstarGridGraph;\n}());\nexport { AstarGridGraph };\n","import { Vector2Utils } from '../../../Types/IVector2';\nvar BreadthFirstPathfinder = (function () {\n function BreadthFirstPathfinder() {\n }\n BreadthFirstPathfinder.search = function (graph, start, goal, cameFrom) {\n var frontier = [];\n var visited = new Set();\n var pathMap = cameFrom || new Map();\n var startHash = Vector2Utils.toHash(start);\n var goalHash = Vector2Utils.toHash(goal);\n if (startHash === goalHash) {\n return true;\n }\n frontier.push(start);\n visited.add(startHash);\n while (frontier.length > 0) {\n var current = frontier.shift();\n var currentHash = Vector2Utils.toHash(current);\n if (currentHash === goalHash) {\n return true;\n }\n for (var _i = 0, _a = graph.getNeighbors(current); _i < _a.length; _i++) {\n var neighbor = _a[_i];\n var neighborHash = Vector2Utils.toHash(neighbor);\n if (visited.has(neighborHash)) {\n continue;\n }\n visited.add(neighborHash);\n pathMap.set(neighborHash, current);\n frontier.push(neighbor);\n }\n }\n return false;\n };\n BreadthFirstPathfinder.searchPath = function (graph, start, goal) {\n var cameFrom = new Map();\n if (this.search(graph, start, goal, cameFrom)) {\n return this.reconstructPath(cameFrom, start, goal);\n }\n return [];\n };\n BreadthFirstPathfinder.reconstructPath = function (cameFrom, start, goal) {\n var path = [];\n var current = goal;\n var startHash = Vector2Utils.toHash(start);\n while (Vector2Utils.toHash(current) !== startHash) {\n path.unshift(current);\n var currentHash = Vector2Utils.toHash(current);\n var parent_1 = cameFrom.get(currentHash);\n if (!parent_1)\n break;\n current = parent_1;\n }\n path.unshift(start);\n return path;\n };\n return BreadthFirstPathfinder;\n}());\nexport { BreadthFirstPathfinder };\n","var UnweightedGraph = (function () {\n function UnweightedGraph() {\n this.edges = new Map();\n }\n UnweightedGraph.prototype.addEdgesForNode = function (node, neighbors) {\n this.edges.set(node, neighbors);\n return this;\n };\n UnweightedGraph.prototype.getNeighbors = function (node) {\n return this.edges.get(node) || [];\n };\n return UnweightedGraph;\n}());\nexport { UnweightedGraph };\n","import { Vector2Utils } from '../../../Types/IVector2';\nimport { BreadthFirstPathfinder } from './BreadthFirstPathfinder';\nvar UnweightedGridGraph = (function () {\n function UnweightedGridGraph(width, height, allowDiagonalSearch) {\n if (allowDiagonalSearch === void 0) { allowDiagonalSearch = false; }\n this.walls = [];\n this._neighbors = [];\n this._width = width;\n this._height = height;\n this._dirs = allowDiagonalSearch ? UnweightedGridGraph.COMPASS_DIRS : UnweightedGridGraph.CARDINAL_DIRS;\n }\n UnweightedGridGraph.prototype.isNodeInBounds = function (node) {\n return 0 <= node.x && node.x < this._width && 0 <= node.y && node.y < this._height;\n };\n UnweightedGridGraph.prototype.isNodePassable = function (node) {\n return !this.walls.find(function (wall) { return Vector2Utils.equals(wall, node); });\n };\n UnweightedGridGraph.prototype.getNeighbors = function (node) {\n this._neighbors.length = 0;\n for (var _i = 0, _a = this._dirs; _i < _a.length; _i++) {\n var dir = _a[_i];\n var next = Vector2Utils.add(node, dir);\n if (this.isNodeInBounds(next) && this.isNodePassable(next)) {\n this._neighbors.push(next);\n }\n }\n return this._neighbors;\n };\n UnweightedGridGraph.prototype.searchPath = function (start, goal) {\n return BreadthFirstPathfinder.searchPath(this, start, goal);\n };\n UnweightedGridGraph.prototype.hasPath = function (start, goal) {\n return BreadthFirstPathfinder.search(this, start, goal);\n };\n UnweightedGridGraph.CARDINAL_DIRS = [\n Vector2Utils.create(1, 0),\n Vector2Utils.create(0, -1),\n Vector2Utils.create(-1, 0),\n Vector2Utils.create(0, 1)\n ];\n UnweightedGridGraph.COMPASS_DIRS = [\n Vector2Utils.create(1, 0),\n Vector2Utils.create(1, -1),\n Vector2Utils.create(0, -1),\n Vector2Utils.create(-1, -1),\n Vector2Utils.create(-1, 0),\n Vector2Utils.create(-1, 1),\n Vector2Utils.create(0, 1),\n Vector2Utils.create(1, 1),\n ];\n return UnweightedGridGraph;\n}());\nexport { UnweightedGridGraph };\n"],"names":["this"],"mappings":";;;;;;;;;;;;;AAAG,QAAC,YAAY,IAAI,YAAY;IAChC,IAAI,SAAS,YAAY,GAAG;IAC5B,IAAI;IACJ,IAAI,YAAY,CAAC,MAAM,GAAG,UAAU,CAAC,EAAE,CAAC,EAAE;IAC1C,QAAQ,IAAI,CAAC,CAAC,MAAM,EAAE;IACtB,YAAY,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9B,QAAQ;IACR,QAAQ,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IACzC,IAAI,CAAC;IACL,IAAI,YAAY,CAAC,MAAM,GAAG,UAAU,CAAC,EAAE,CAAC,EAAE;IAC1C,QAAQ,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;IAC7B,IAAI,CAAC;IACL,IAAI,YAAY,CAAC,KAAK,GAAG,UAAU,MAAM,EAAE;IAC3C,QAAQ,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE;IAC3C,IAAI,CAAC;IACL,IAAI,YAAY,CAAC,GAAG,GAAG,UAAU,CAAC,EAAE,CAAC,EAAE;IACvC,QAAQ,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;IAC7C,IAAI,CAAC;IACL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