screeps-clockwork 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
package/LICENSE ADDED
@@ -0,0 +1,13 @@
1
+ Common Grace License 1.0
2
+
3
+ Copyright 2024 Jon Winsley
4
+
5
+ This license hereby grants any person obtaining a copy of this software and associated documentation (the "Software") permission to publish, distribute, copy, modify and incorporate into other works, as they see fit, and to use in other unanticipated ways, without limitation with the following conditions:
6
+
7
+ This license shall be included with all uses of the Software, whole or in-part.
8
+
9
+ It is recognized that the copyright holder stated above gives the Software freely, out of gratitude to God for the skills and abilities used in creating it and gratitude for any benefit derived from it.
10
+
11
+ It is recognized that contributors or recipients making use of the Software, other than the copyright holder stated above, may not share in gratitude to God or in any belief of God.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ANY KIND OF WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE THE AUTHOR OR CONTRIBUTORS OF THE SOFTWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM ANY USE OF THE SOFTWARE OR IN CONNECTION WITH THE SOFTWARE OR IN ANY OTHER DEALINGS WITH THE SOFTWARE.
package/dist/index.js ADDED
@@ -0,0 +1,646 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
6
+
7
+ (function(q){function y(){}function C(b){var c=b.charCodeAt(0)|0;if(55296<=c)if(56319>=c)if(b=b.charCodeAt(1)|0,56320<=b&&57343>=b){if(c=(c<<10)+b-56613888|0,65535<c)return v(240|c>>18,128|c>>12&63,128|c>>6&63,128|c&63)}else c=65533;else 57343>=c&&(c=65533);return 2047>=c?v(192|c>>6,128|c&63):v(224|c>>12,128|c>>6&63,128|c&63)}function z(){}function A(b,c){var g=void 0===b?"":(""+b).replace(D,C),d=g.length|0,a=0,k=0,f=c.length|0,h=b.length|0;f<d&&(d=f);a:for(;a<d;a=a+1|0){b=g.charCodeAt(a)|
8
+ 0;switch(b>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:k=k+1|0;case 8:case 9:case 10:case 11:break;case 12:case 13:if((a+1|0)<f){k=k+1|0;break}case 14:if((a+2|0)<f){k=k+1|0;break}case 15:if((a+3|0)<f){k=k+1|0;break}default:break a}c[a]=b;}return {written:a,read:h<k?h:k}}var v=String.fromCharCode,x={}.toString,E=x.call(q.SharedArrayBuffer),F=x(),t=q.Uint8Array,w=t||Array,u=t?ArrayBuffer:w,G=u.isView||function(b){return b&&"length"in b},H=x.call(u.prototype),B=z.prototype;u=q.TextEncoder;
9
+ var D=/[\x80-\uD7ff\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g,e=new (t?Uint16Array:w)(32);y.prototype.decode=function(b){if(!G(b)){var c=x.call(b);if(c!==H&&c!==E&&c!==F)throw TypeError("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");b=t?new w(b):b||[];}for(var g=c="",d=0,a=b.length|0,k=a-32|0,f,h,l=0,r=0,n,m=0,p=-1;d<a;){for(f=d<=k?32:a-d|0;m<f;d=d+1|0,m=m+1|0){h=b[d]&255;switch(h>>4){case 15:n=b[d=d+1|0]&255;if(2!==n>>6||
10
+ 247<h){d=d-1|0;break}l=(h&7)<<6|n&63;r=5;h=256;case 14:n=b[d=d+1|0]&255,l<<=6,l|=(h&15)<<6|n&63,r=2===n>>6?r+4|0:24,h=h+256&768;case 13:case 12:n=b[d=d+1|0]&255,l<<=6,l|=(h&31)<<6|n&63,r=r+7|0,d<a&&2===n>>6&&l>>r&&1114112>l?(h=l,l=l-65536|0,0<=l&&(p=(l>>10)+55296|0,h=(l&1023)+56320|0,31>m?(e[m]=p,m=m+1|0,p=-1):(n=p,p=h,h=n))):(h>>=8,d=d-h-1|0,h=65533),l=r=0,f=d<=k?32:a-d|0;default:e[m]=h;continue;case 11:case 10:case 9:case 8:}e[m]=65533;}g+=v(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],
11
+ e[11],e[12],e[13],e[14],e[15],e[16],e[17],e[18],e[19],e[20],e[21],e[22],e[23],e[24],e[25],e[26],e[27],e[28],e[29],e[30],e[31]);32>m&&(g=g.slice(0,m-32|0));if(d<a){if(e[0]=p,m=~p>>>31,p=-1,g.length<c.length)continue}else -1!==p&&(g+=v(p));c+=g;g="";}return c};B.encode=function(b){b=void 0===b?"":""+b;var c=b.length|0,g=new w((c<<1)+8|0),d,a=0,k=!t;for(d=0;d<c;d=d+1|0,a=a+1|0){var f=b.charCodeAt(d)|0;if(127>=f)g[a]=f;else {if(2047>=f)g[a]=192|f>>6;else {a:{if(55296<=f)if(56319>=f){var h=b.charCodeAt(d=
12
+ d+1|0)|0;if(56320<=h&&57343>=h){f=(f<<10)+h-56613888|0;if(65535<f){g[a]=240|f>>18;g[a=a+1|0]=128|f>>12&63;g[a=a+1|0]=128|f>>6&63;g[a=a+1|0]=128|f&63;continue}break a}f=65533;}else 57343>=f&&(f=65533);!k&&d<<1<a&&d<<1<(a-7|0)&&(k=!0,h=new w(3*c),h.set(g),g=h);}g[a]=224|f>>12;g[a=a+1|0]=128|f>>6&63;}g[a=a+1|0]=128|f&63;}}return t?g.subarray(0,a):g.slice(0,a)};B.encodeInto=A;if(!u)q.TextDecoder=y,q.TextEncoder=z;else if(!(q=u.prototype).encodeInto){var I=new u;q.encodeInto=function(b,c){var g=b.length|0,
13
+ d=c.length|0;if(g<d>>1){var a=I.encode(b);if((a.length|0)<d)return c.set(a),{read:g,written:a.length|0}}return A(b,c)};}})("undefined"==typeof commonjsGlobal?"undefined"==typeof self?commonjsGlobal:self:commonjsGlobal);//AnonyCo
14
+
15
+ let wasm;
16
+
17
+ const heap = new Array(128).fill(undefined);
18
+
19
+ heap.push(undefined, null, true, false);
20
+
21
+ function getObject(idx) { return heap[idx]; }
22
+
23
+ let heap_next = heap.length;
24
+
25
+ function dropObject(idx) {
26
+ if (idx < 132) return;
27
+ heap[idx] = heap_next;
28
+ heap_next = idx;
29
+ }
30
+
31
+ function takeObject(idx) {
32
+ const ret = getObject(idx);
33
+ dropObject(idx);
34
+ return ret;
35
+ }
36
+
37
+ function addHeapObject(obj) {
38
+ if (heap_next === heap.length) heap.push(heap.length + 1);
39
+ const idx = heap_next;
40
+ heap_next = heap[idx];
41
+
42
+ heap[idx] = obj;
43
+ return idx;
44
+ }
45
+
46
+ function isLikeNone(x) {
47
+ return x === undefined || x === null;
48
+ }
49
+
50
+ let cachedDataViewMemory0 = null;
51
+
52
+ function getDataViewMemory0() {
53
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
54
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
55
+ }
56
+ return cachedDataViewMemory0;
57
+ }
58
+
59
+ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
60
+
61
+ if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }
62
+ let cachedUint8ArrayMemory0 = null;
63
+
64
+ function getUint8ArrayMemory0() {
65
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
66
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
67
+ }
68
+ return cachedUint8ArrayMemory0;
69
+ }
70
+
71
+ function getStringFromWasm0(ptr, len) {
72
+ ptr = ptr >>> 0;
73
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
74
+ }
75
+
76
+ let cachedUint32ArrayMemory0 = null;
77
+
78
+ function getUint32ArrayMemory0() {
79
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
80
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
81
+ }
82
+ return cachedUint32ArrayMemory0;
83
+ }
84
+
85
+ let WASM_VECTOR_LEN = 0;
86
+
87
+ function passArray32ToWasm0(arg, malloc) {
88
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
89
+ getUint32ArrayMemory0().set(arg, ptr / 4);
90
+ WASM_VECTOR_LEN = arg.length;
91
+ return ptr;
92
+ }
93
+
94
+ function _assertClass(instance, klass) {
95
+ if (!(instance instanceof klass)) {
96
+ throw new Error(`expected instance of ${klass.name}`);
97
+ }
98
+ return instance.ptr;
99
+ }
100
+ /**
101
+ *
102
+ * * WASM wrapper for the BFS distance map function.
103
+ *
104
+ * @param {Uint32Array} start_packed
105
+ * @param {ClockworkCostMatrix} cost_matrix
106
+ * @returns {DistanceMap}
107
+ */
108
+ function js_bfs_distance_map(start_packed, cost_matrix) {
109
+ const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);
110
+ const len0 = WASM_VECTOR_LEN;
111
+ _assertClass(cost_matrix, ClockworkCostMatrix);
112
+ const ret = wasm.js_bfs_distance_map(ptr0, len0, cost_matrix.__wbg_ptr);
113
+ return DistanceMap.__wrap(ret);
114
+ }
115
+
116
+ /**
117
+ *
118
+ * * WASM wrapper for the BFS flow field function.
119
+ *
120
+ * @param {Uint32Array} start_packed
121
+ * @param {ClockworkCostMatrix} cost_matrix
122
+ * @returns {FlowField}
123
+ */
124
+ function js_bfs_flow_field(start_packed, cost_matrix) {
125
+ const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);
126
+ const len0 = WASM_VECTOR_LEN;
127
+ _assertClass(cost_matrix, ClockworkCostMatrix);
128
+ const ret = wasm.js_bfs_flow_field(ptr0, len0, cost_matrix.__wbg_ptr);
129
+ return FlowField.__wrap(ret);
130
+ }
131
+
132
+ /**
133
+ *
134
+ * * WASM wrapper for the BFS mono flow field function.
135
+ *
136
+ * @param {Uint32Array} start_packed
137
+ * @param {ClockworkCostMatrix} cost_matrix
138
+ * @returns {MonoFlowField}
139
+ */
140
+ function js_bfs_mono_flow_field(start_packed, cost_matrix) {
141
+ const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);
142
+ const len0 = WASM_VECTOR_LEN;
143
+ _assertClass(cost_matrix, ClockworkCostMatrix);
144
+ const ret = wasm.js_bfs_mono_flow_field(ptr0, len0, cost_matrix.__wbg_ptr);
145
+ return MonoFlowField.__wrap(ret);
146
+ }
147
+
148
+ /**
149
+ * @returns {string}
150
+ */
151
+ function version() {
152
+ let deferred1_0;
153
+ let deferred1_1;
154
+ try {
155
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
156
+ wasm.version(retptr);
157
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
158
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
159
+ deferred1_0 = r0;
160
+ deferred1_1 = r1;
161
+ return getStringFromWasm0(r0, r1);
162
+ } finally {
163
+ wasm.__wbindgen_add_to_stack_pointer(16);
164
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
165
+ }
166
+ }
167
+
168
+ /**
169
+ * @param {number} packed_pos_1
170
+ * @param {number} packed_pos_2
171
+ * @returns {number}
172
+ */
173
+ function get_range(packed_pos_1, packed_pos_2) {
174
+ const ret = wasm.get_range(packed_pos_1, packed_pos_2);
175
+ return ret >>> 0;
176
+ }
177
+
178
+ function getArrayU32FromWasm0(ptr, len) {
179
+ ptr = ptr >>> 0;
180
+ return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
181
+ }
182
+
183
+ function getArrayJsValueFromWasm0(ptr, len) {
184
+ ptr = ptr >>> 0;
185
+ const mem = getDataViewMemory0();
186
+ const result = [];
187
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
188
+ result.push(takeObject(mem.getUint32(i, true)));
189
+ }
190
+ return result;
191
+ }
192
+
193
+ function passArrayJsValueToWasm0(array, malloc) {
194
+ const ptr = malloc(array.length * 4, 4) >>> 0;
195
+ const mem = getDataViewMemory0();
196
+ for (let i = 0; i < array.length; i++) {
197
+ mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
198
+ }
199
+ WASM_VECTOR_LEN = array.length;
200
+ return ptr;
201
+ }
202
+ /**
203
+ * Translates `COLOR_*` and `COLORS_ALL` constants.
204
+ */
205
+ Object.freeze({ Red:1,"1":"Red",Purple:2,"2":"Purple",Blue:3,"3":"Blue",Cyan:4,"4":"Cyan",Green:5,"5":"Green",Yellow:6,"6":"Yellow",Orange:7,"7":"Orange",Brown:8,"8":"Brown",Grey:9,"9":"Grey",White:10,"10":"White", });
206
+ /**
207
+ * Translates the `DENSITY_*` constants.
208
+ */
209
+ Object.freeze({ Low:1,"1":"Low",Moderate:2,"2":"Moderate",High:3,"3":"High",Ultra:4,"4":"Ultra", });
210
+ /**
211
+ * Translates direction constants.
212
+ */
213
+ Object.freeze({ Top:1,"1":"Top",TopRight:2,"2":"TopRight",Right:3,"3":"Right",BottomRight:4,"4":"BottomRight",Bottom:5,"5":"Bottom",BottomLeft:6,"6":"BottomLeft",Left:7,"7":"Left",TopLeft:8,"8":"TopLeft", });
214
+ /**
215
+ * Type used for when the game returns a direction to an exit.
216
+ *
217
+ * Restricted more than `Direction` in that it can't be diagonal. Used as the
218
+ * result of [`Room::find_exit_to`].
219
+ *
220
+ * Can be converted to [`Find`] for immediate use of [`Room::find`]
221
+ * and [`Direction`].
222
+ *
223
+ * [`Room::find`]: crate::objects::Room::find
224
+ * [`Room::find_exit_to`]: crate::objects::Room::find_exit_to
225
+ */
226
+ Object.freeze({ Top:1,"1":"Top",Right:3,"3":"Right",Bottom:5,"5":"Bottom",Left:7,"7":"Left", });
227
+ /**
228
+ * Translates `FIND_*` constants for interal API calls
229
+ *
230
+ * Unless you're storing the type of find constant to be used for a call, you
231
+ * likely want the constants which implement the `FindConstant` trait to make
232
+ * calls to find methods.
233
+ *
234
+ * This is hidden from the documentation to avoid confusion due to its narrow
235
+ * use case, but wasm_bindgen requires it remain public.
236
+ */
237
+ Object.freeze({
238
+ /**
239
+ * Find all exit positions at the top of the room
240
+ */
241
+ ExitTop:1,"1":"ExitTop",ExitRight:3,"3":"ExitRight",ExitBottom:5,"5":"ExitBottom",ExitLeft:7,"7":"ExitLeft",Exit:10,"10":"Exit",Creeps:101,"101":"Creeps",MyCreeps:102,"102":"MyCreeps",HostileCreeps:103,"103":"HostileCreeps",SourcesActive:104,"104":"SourcesActive",Sources:105,"105":"Sources",DroppedResources:106,"106":"DroppedResources",Structures:107,"107":"Structures",MyStructures:108,"108":"MyStructures",HostileStructures:109,"109":"HostileStructures",Flags:110,"110":"Flags",ConstructionSites:111,"111":"ConstructionSites",MySpawns:112,"112":"MySpawns",HostileSpawns:113,"113":"HostileSpawns",MyConstructionSites:114,"114":"MyConstructionSites",HostileConstructionSites:115,"115":"HostileConstructionSites",Minerals:116,"116":"Minerals",Nukes:117,"117":"Nukes",Tombstones:118,"118":"Tombstones",PowerCreeps:119,"119":"PowerCreeps",MyPowerCreeps:120,"120":"MyPowerCreeps",HostilePowerCreeps:121,"121":"HostilePowerCreeps",Deposits:122,"122":"Deposits",Ruins:123,"123":"Ruins",ScoreContainers:10011,"10011":"ScoreContainers",ScoreCollectors:10012,"10012":"ScoreCollectors",SymbolContainers:10021,"10021":"SymbolContainers",SymbolDecoders:10022,"10022":"SymbolDecoders",Reactors:10051,"10051":"Reactors", });
242
+ /**
243
+ * Translates the `EFFECT_*` constants, which are natural effect types
244
+ */
245
+ Object.freeze({ Invulnerability:1001,"1001":"Invulnerability",CollapseTimer:1002,"1002":"CollapseTimer", });
246
+ /**
247
+ * Translates the `PWR_*` constants, which are types of powers used by power
248
+ * creeps
249
+ */
250
+ Object.freeze({ GenerateOps:1,"1":"GenerateOps",OperateSpawn:2,"2":"OperateSpawn",OperateTower:3,"3":"OperateTower",OperateStorage:4,"4":"OperateStorage",OperateLab:5,"5":"OperateLab",OperateExtension:6,"6":"OperateExtension",OperateObserver:7,"7":"OperateObserver",OperateTerminal:8,"8":"OperateTerminal",DisruptSpawn:9,"9":"DisruptSpawn",DisruptTower:10,"10":"DisruptTower",Shield:12,"12":"Shield",RegenSource:13,"13":"RegenSource",RegenMineral:14,"14":"RegenMineral",DisruptTerminal:15,"15":"DisruptTerminal",OperatePower:16,"16":"OperatePower",Fortify:17,"17":"Fortify",OperateController:18,"18":"OperateController",OperateFactory:19,"19":"OperateFactory", });
251
+ /**
252
+ * Translates `TERRAIN_*` constants.
253
+ */
254
+ Object.freeze({ Plain:0,"0":"Plain",Wall:1,"1":"Wall",Swamp:2,"2":"Swamp", });
255
+
256
+ const ClockworkCostMatrixFinalization = (typeof FinalizationRegistry === 'undefined')
257
+ ? { register: () => {}, unregister: () => {} }
258
+ : new FinalizationRegistry(ptr => wasm.__wbg_clockworkcostmatrix_free(ptr >>> 0, 1));
259
+
260
+ class ClockworkCostMatrix {
261
+
262
+ __destroy_into_raw() {
263
+ const ptr = this.__wbg_ptr;
264
+ this.__wbg_ptr = 0;
265
+ ClockworkCostMatrixFinalization.unregister(this);
266
+ return ptr;
267
+ }
268
+
269
+ free() {
270
+ const ptr = this.__destroy_into_raw();
271
+ wasm.__wbg_clockworkcostmatrix_free(ptr, 0);
272
+ }
273
+ constructor() {
274
+ const ret = wasm.clockworkcostmatrix_new();
275
+ this.__wbg_ptr = ret >>> 0;
276
+ ClockworkCostMatrixFinalization.register(this, this.__wbg_ptr, this);
277
+ return this;
278
+ }
279
+ /**
280
+ * @param {number} x
281
+ * @param {number} y
282
+ * @returns {number}
283
+ */
284
+ get(x, y) {
285
+ const ret = wasm.clockworkcostmatrix_get(this.__wbg_ptr, x, y);
286
+ return ret;
287
+ }
288
+ /**
289
+ * @param {number} x
290
+ * @param {number} y
291
+ * @param {number} value
292
+ */
293
+ set(x, y, value) {
294
+ wasm.clockworkcostmatrix_set(this.__wbg_ptr, x, y, value);
295
+ }
296
+ }
297
+
298
+ const DistanceMapFinalization = (typeof FinalizationRegistry === 'undefined')
299
+ ? { register: () => {}, unregister: () => {} }
300
+ : new FinalizationRegistry(ptr => wasm.__wbg_distancemap_free(ptr >>> 0, 1));
301
+ /**
302
+ * Maps arbitrary data onto individual room tile positions.
303
+ */
304
+ class DistanceMap {
305
+
306
+ static __wrap(ptr) {
307
+ ptr = ptr >>> 0;
308
+ const obj = Object.create(DistanceMap.prototype);
309
+ obj.__wbg_ptr = ptr;
310
+ DistanceMapFinalization.register(obj, obj.__wbg_ptr, obj);
311
+ return obj;
312
+ }
313
+
314
+ __destroy_into_raw() {
315
+ const ptr = this.__wbg_ptr;
316
+ this.__wbg_ptr = 0;
317
+ DistanceMapFinalization.unregister(this);
318
+ return ptr;
319
+ }
320
+
321
+ free() {
322
+ const ptr = this.__destroy_into_raw();
323
+ wasm.__wbg_distancemap_free(ptr, 0);
324
+ }
325
+ /**
326
+ * @returns {Uint32Array}
327
+ */
328
+ toArray() {
329
+ try {
330
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
331
+ wasm.distancemap_toArray(retptr, this.__wbg_ptr);
332
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
333
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
334
+ var v1 = getArrayU32FromWasm0(r0, r1).slice();
335
+ wasm.__wbindgen_free(r0, r1 * 4, 4);
336
+ return v1;
337
+ } finally {
338
+ wasm.__wbindgen_add_to_stack_pointer(16);
339
+ }
340
+ }
341
+ /**
342
+ * @param {number} x
343
+ * @param {number} y
344
+ * @returns {number}
345
+ */
346
+ get(x, y) {
347
+ const ret = wasm.distancemap_get(this.__wbg_ptr, x, y);
348
+ return ret >>> 0;
349
+ }
350
+ /**
351
+ * @param {number} x
352
+ * @param {number} y
353
+ * @param {number} value
354
+ */
355
+ set(x, y, value) {
356
+ wasm.distancemap_set(this.__wbg_ptr, x, y, value);
357
+ }
358
+ }
359
+
360
+ const FlowFieldFinalization = (typeof FinalizationRegistry === 'undefined')
361
+ ? { register: () => {}, unregister: () => {} }
362
+ : new FinalizationRegistry(ptr => wasm.__wbg_flowfield_free(ptr >>> 0, 1));
363
+ /**
364
+ *
365
+ * * A flow field is a 50x50 grid (representing a room), representing viable directions
366
+ * * to travel to reach a particular target (or targets). A given tile may have multiple
367
+ * * equally valid directions, so we represent this as a bitfield (where each bit in an
368
+ * * 8-bit unsigned integer represents a direction that is either viable or not).
369
+ *
370
+ */
371
+ class FlowField {
372
+
373
+ static __wrap(ptr) {
374
+ ptr = ptr >>> 0;
375
+ const obj = Object.create(FlowField.prototype);
376
+ obj.__wbg_ptr = ptr;
377
+ FlowFieldFinalization.register(obj, obj.__wbg_ptr, obj);
378
+ return obj;
379
+ }
380
+
381
+ __destroy_into_raw() {
382
+ const ptr = this.__wbg_ptr;
383
+ this.__wbg_ptr = 0;
384
+ FlowFieldFinalization.unregister(this);
385
+ return ptr;
386
+ }
387
+
388
+ free() {
389
+ const ptr = this.__destroy_into_raw();
390
+ wasm.__wbg_flowfield_free(ptr, 0);
391
+ }
392
+ /**
393
+ *
394
+ * * Get the internal value for a given coordinate.
395
+ *
396
+ * @param {number} x
397
+ * @param {number} y
398
+ * @returns {number}
399
+ */
400
+ get(x, y) {
401
+ const ret = wasm.flowfield_get(this.__wbg_ptr, x, y);
402
+ return ret;
403
+ }
404
+ /**
405
+ *
406
+ * * Set the internal value for a given coordinate.
407
+ *
408
+ * @param {number} x
409
+ * @param {number} y
410
+ * @param {number} value
411
+ */
412
+ set(x, y, value) {
413
+ wasm.flowfield_set(this.__wbg_ptr, x, y, value);
414
+ }
415
+ /**
416
+ *
417
+ * * Get the list of valid directions for a given coordinate.
418
+ *
419
+ * @param {number} x
420
+ * @param {number} y
421
+ * @returns {any[]}
422
+ */
423
+ getDirections(x, y) {
424
+ try {
425
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
426
+ wasm.flowfield_getDirections(retptr, this.__wbg_ptr, x, y);
427
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
428
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
429
+ var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
430
+ wasm.__wbindgen_free(r0, r1 * 4, 4);
431
+ return v1;
432
+ } finally {
433
+ wasm.__wbindgen_add_to_stack_pointer(16);
434
+ }
435
+ }
436
+ /**
437
+ *
438
+ * * Set the list of valid directions for a given coordinate.
439
+ *
440
+ * @param {number} x
441
+ * @param {number} y
442
+ * @param {any[]} directions
443
+ */
444
+ setDirections(x, y, directions) {
445
+ const ptr0 = passArrayJsValueToWasm0(directions, wasm.__wbindgen_malloc);
446
+ const len0 = WASM_VECTOR_LEN;
447
+ wasm.flowfield_setDirections(this.__wbg_ptr, x, y, ptr0, len0);
448
+ }
449
+ /**
450
+ * @param {number} x
451
+ * @param {number} y
452
+ * @param {Direction} direction
453
+ */
454
+ addDirection(x, y, direction) {
455
+ wasm.flowfield_addDirection(this.__wbg_ptr, x, y, direction);
456
+ }
457
+ }
458
+
459
+ const MonoFlowFieldFinalization = (typeof FinalizationRegistry === 'undefined')
460
+ ? { register: () => {}, unregister: () => {} }
461
+ : new FinalizationRegistry(ptr => wasm.__wbg_monoflowfield_free(ptr >>> 0, 1));
462
+ /**
463
+ *
464
+ * * A flow field is a 50x50 grid (representing a room), representing viable directions
465
+ * * to travel to reach a particular target (or targets). A mono flow field only stores
466
+ * * a single direction for each tile, so we represent this as 4 bits of an unsigned
467
+ * * integer (0 for no direction, 1 for TOP, etc.).
468
+ *
469
+ */
470
+ class MonoFlowField {
471
+
472
+ static __wrap(ptr) {
473
+ ptr = ptr >>> 0;
474
+ const obj = Object.create(MonoFlowField.prototype);
475
+ obj.__wbg_ptr = ptr;
476
+ MonoFlowFieldFinalization.register(obj, obj.__wbg_ptr, obj);
477
+ return obj;
478
+ }
479
+
480
+ __destroy_into_raw() {
481
+ const ptr = this.__wbg_ptr;
482
+ this.__wbg_ptr = 0;
483
+ MonoFlowFieldFinalization.unregister(this);
484
+ return ptr;
485
+ }
486
+
487
+ free() {
488
+ const ptr = this.__destroy_into_raw();
489
+ wasm.__wbg_monoflowfield_free(ptr, 0);
490
+ }
491
+ /**
492
+ *
493
+ * * Get the direction for a given coordinate.
494
+ *
495
+ * @param {number} x
496
+ * @param {number} y
497
+ * @returns {Direction | undefined}
498
+ */
499
+ get(x, y) {
500
+ const ret = wasm.monoflowfield_get(this.__wbg_ptr, x, y);
501
+ return ret === 0 ? undefined : ret;
502
+ }
503
+ /**
504
+ *
505
+ * * Set the direction for a given coordinate.
506
+ *
507
+ * @param {number} x
508
+ * @param {number} y
509
+ * @param {Direction | undefined} [value]
510
+ */
511
+ set(x, y, value) {
512
+ wasm.monoflowfield_set(this.__wbg_ptr, x, y, isLikeNone(value) ? 0 : value);
513
+ }
514
+ }
515
+
516
+ (typeof FinalizationRegistry === 'undefined')
517
+ ? { register: () => {}, unregister: () => {} }
518
+ : new FinalizationRegistry(ptr => wasm.__wbg_searchgoal_free(ptr >>> 0, 1));
519
+
520
+ function __wbg_get_imports() {
521
+ const imports = {};
522
+ imports.wbg = {};
523
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
524
+ takeObject(arg0);
525
+ };
526
+ imports.wbg.__wbindgen_number_new = function(arg0) {
527
+ const ret = arg0;
528
+ return addHeapObject(ret);
529
+ };
530
+ imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
531
+ const obj = getObject(arg1);
532
+ const ret = typeof(obj) === 'number' ? obj : undefined;
533
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
534
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
535
+ };
536
+ imports.wbg.__wbindgen_try_into_number = function(arg0) {
537
+ let result;
538
+ try { result = +getObject(arg0); } catch (e) { result = e; }
539
+ const ret = result;
540
+ return addHeapObject(ret);
541
+ };
542
+ imports.wbg.__wbg_static_accessor_ROOM_POSITION_PROTOTYPE_359d8a1531b99b4c = function() {
543
+ const ret = RoomPosition.prototype;
544
+ return addHeapObject(ret);
545
+ };
546
+ imports.wbg.__wbg_setpacked_e36387710a3ff5bb = function(arg0, arg1) {
547
+ getObject(arg0).__packedPos = arg1 >>> 0;
548
+ };
549
+ imports.wbg.__wbg_create_70ef5302cb22a5c4 = function(arg0) {
550
+ const ret = Object.create(getObject(arg0));
551
+ return addHeapObject(ret);
552
+ };
553
+ imports.wbg.__wbindgen_throw = function(arg0, arg1) {
554
+ throw new Error(getStringFromWasm0(arg0, arg1));
555
+ };
556
+
557
+ return imports;
558
+ }
559
+
560
+ function __wbg_finalize_init(instance, module) {
561
+ wasm = instance.exports;
562
+ cachedDataViewMemory0 = null;
563
+ cachedUint32ArrayMemory0 = null;
564
+ cachedUint8ArrayMemory0 = null;
565
+
566
+
567
+
568
+ return wasm;
569
+ }
570
+
571
+ function initSync(module) {
572
+ if (wasm !== undefined) return wasm;
573
+
574
+
575
+ if (typeof module !== 'undefined') {
576
+ if (Object.getPrototypeOf(module) === Object.prototype) {
577
+ ({module} = module);
578
+ } else {
579
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead');
580
+ }
581
+ }
582
+
583
+ const imports = __wbg_get_imports();
584
+
585
+ if (!(module instanceof WebAssembly.Module)) {
586
+ module = new WebAssembly.Module(module);
587
+ }
588
+
589
+ const instance = new WebAssembly.Instance(module, imports);
590
+
591
+ return __wbg_finalize_init(instance);
592
+ }
593
+
594
+ function bfsDistanceMap(start, costMatrix) {
595
+ const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));
596
+ const result = js_bfs_distance_map(startPacked, costMatrix);
597
+ return result;
598
+ }
599
+
600
+ function bfsFlowField(start, costMatrix) {
601
+ const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));
602
+ const result = js_bfs_flow_field(startPacked, costMatrix);
603
+ return result;
604
+ }
605
+ function bfsMonoFlowField(start, costMatrix) {
606
+ const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));
607
+ const result = js_bfs_mono_flow_field(startPacked, costMatrix);
608
+ return result;
609
+ }
610
+
611
+ function getRange(pos1, pos2) {
612
+ return get_range(pos1.__packedPos, pos2.__packedPos);
613
+ }
614
+
615
+ let wasm_bytes;
616
+ let wasm_module;
617
+ let wasm_instance;
618
+ let initialized = false;
619
+ function initialize(verbose = false) {
620
+ if (!wasm_bytes)
621
+ wasm_bytes = require('screeps_clockwork.wasm');
622
+ if (verbose && !initialized)
623
+ console.log('[clockwork] wasm_bytes loaded');
624
+ if (!wasm_module)
625
+ wasm_module = new WebAssembly.Module(wasm_bytes);
626
+ if (verbose && !initialized)
627
+ console.log('[clockwork] wasm_module loaded');
628
+ if (!wasm_instance)
629
+ wasm_instance = initSync({ module: wasm_module });
630
+ if (verbose && !initialized) {
631
+ console.log('[clockwork] wasm_instance loaded');
632
+ console.log(`[clockwork] version ${version()} initialized`);
633
+ }
634
+ initialized = true;
635
+ }
636
+
637
+ exports.ClockworkCostMatrix = ClockworkCostMatrix;
638
+ exports.DistanceMap = DistanceMap;
639
+ exports.FlowField = FlowField;
640
+ exports.MonoFlowField = MonoFlowField;
641
+ exports.bfsDistanceMap = bfsDistanceMap;
642
+ exports.bfsFlowField = bfsFlowField;
643
+ exports.bfsMonoFlowField = bfsMonoFlowField;
644
+ exports.getRange = getRange;
645
+ exports.initialize = initialize;
646
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../node_modules/fastestsmallesttextencoderdecoder-encodeinto/EncoderDecoderTogether.min.js","../wasm/screeps_clockwork.js","../../src/wrappers/bfsDistanceMap.ts","../../src/wrappers/bfsFlowField.ts","../../src/wrappers/getRange.ts","../../src/index.ts"],"sourcesContent":["'use strict';(function(q){function y(){}function C(b){var c=b.charCodeAt(0)|0;if(55296<=c)if(56319>=c)if(b=b.charCodeAt(1)|0,56320<=b&&57343>=b){if(c=(c<<10)+b-56613888|0,65535<c)return v(240|c>>18,128|c>>12&63,128|c>>6&63,128|c&63)}else c=65533;else 57343>=c&&(c=65533);return 2047>=c?v(192|c>>6,128|c&63):v(224|c>>12,128|c>>6&63,128|c&63)}function z(){}function A(b,c){var g=void 0===b?\"\":(\"\"+b).replace(D,C),d=g.length|0,a=0,k=0,f=c.length|0,h=b.length|0;f<d&&(d=f);a:for(;a<d;a=a+1|0){b=g.charCodeAt(a)|\n0;switch(b>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:k=k+1|0;case 8:case 9:case 10:case 11:break;case 12:case 13:if((a+1|0)<f){k=k+1|0;break}case 14:if((a+2|0)<f){k=k+1|0;break}case 15:if((a+3|0)<f){k=k+1|0;break}default:break a}c[a]=b}return{written:a,read:h<k?h:k}}var v=String.fromCharCode,x={}.toString,E=x.call(q.SharedArrayBuffer),F=x(),t=q.Uint8Array,w=t||Array,u=t?ArrayBuffer:w,G=u.isView||function(b){return b&&\"length\"in b},H=x.call(u.prototype),B=z.prototype;u=q.TextEncoder;\nvar D=/[\\x80-\\uD7ff\\uDC00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]?/g,e=new (t?Uint16Array:w)(32);y.prototype.decode=function(b){if(!G(b)){var c=x.call(b);if(c!==H&&c!==E&&c!==F)throw TypeError(\"Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'\");b=t?new w(b):b||[]}for(var g=c=\"\",d=0,a=b.length|0,k=a-32|0,f,h,l=0,r=0,n,m=0,p=-1;d<a;){for(f=d<=k?32:a-d|0;m<f;d=d+1|0,m=m+1|0){h=b[d]&255;switch(h>>4){case 15:n=b[d=d+1|0]&255;if(2!==n>>6||\n247<h){d=d-1|0;break}l=(h&7)<<6|n&63;r=5;h=256;case 14:n=b[d=d+1|0]&255,l<<=6,l|=(h&15)<<6|n&63,r=2===n>>6?r+4|0:24,h=h+256&768;case 13:case 12:n=b[d=d+1|0]&255,l<<=6,l|=(h&31)<<6|n&63,r=r+7|0,d<a&&2===n>>6&&l>>r&&1114112>l?(h=l,l=l-65536|0,0<=l&&(p=(l>>10)+55296|0,h=(l&1023)+56320|0,31>m?(e[m]=p,m=m+1|0,p=-1):(n=p,p=h,h=n))):(h>>=8,d=d-h-1|0,h=65533),l=r=0,f=d<=k?32:a-d|0;default:e[m]=h;continue;case 11:case 10:case 9:case 8:}e[m]=65533}g+=v(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],\ne[11],e[12],e[13],e[14],e[15],e[16],e[17],e[18],e[19],e[20],e[21],e[22],e[23],e[24],e[25],e[26],e[27],e[28],e[29],e[30],e[31]);32>m&&(g=g.slice(0,m-32|0));if(d<a){if(e[0]=p,m=~p>>>31,p=-1,g.length<c.length)continue}else-1!==p&&(g+=v(p));c+=g;g=\"\"}return c};B.encode=function(b){b=void 0===b?\"\":\"\"+b;var c=b.length|0,g=new w((c<<1)+8|0),d,a=0,k=!t;for(d=0;d<c;d=d+1|0,a=a+1|0){var f=b.charCodeAt(d)|0;if(127>=f)g[a]=f;else{if(2047>=f)g[a]=192|f>>6;else{a:{if(55296<=f)if(56319>=f){var h=b.charCodeAt(d=\nd+1|0)|0;if(56320<=h&&57343>=h){f=(f<<10)+h-56613888|0;if(65535<f){g[a]=240|f>>18;g[a=a+1|0]=128|f>>12&63;g[a=a+1|0]=128|f>>6&63;g[a=a+1|0]=128|f&63;continue}break a}f=65533}else 57343>=f&&(f=65533);!k&&d<<1<a&&d<<1<(a-7|0)&&(k=!0,h=new w(3*c),h.set(g),g=h)}g[a]=224|f>>12;g[a=a+1|0]=128|f>>6&63}g[a=a+1|0]=128|f&63}}return t?g.subarray(0,a):g.slice(0,a)};B.encodeInto=A;if(!u)q.TextDecoder=y,q.TextEncoder=z;else if(!(q=u.prototype).encodeInto){var I=new u;q.encodeInto=function(b,c){var g=b.length|0,\nd=c.length|0;if(g<d>>1){var a=I.encode(b);if((a.length|0)<d)return c.set(a),{read:g,written:a.length|0}}return A(b,c)}}})(\"undefined\"==typeof global?\"undefined\"==typeof self?this:self:global);//AnonyCo\n//# sourceMappingURL=https://cdn.jsdelivr.net/gh/AnonyCo/FastestSmallestTextEncoderDecoder/encodeInto/EncoderDecoderTogether.min.js.map\n","let wasm;\n\nconst heap = new Array(128).fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nfunction getObject(idx) { return heap[idx]; }\n\nlet heap_next = heap.length;\n\nfunction dropObject(idx) {\n if (idx < 132) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nlet cachedDataViewMemory0 = null;\n\nfunction getDataViewMemory0() {\n if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {\n cachedDataViewMemory0 = new DataView(wasm.memory.buffer);\n }\n return cachedDataViewMemory0;\n}\n\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };\n\nlet cachedUint8ArrayMemory0 = null;\n\nfunction getUint8ArrayMemory0() {\n if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\n cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8ArrayMemory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));\n}\n\nlet cachedUint32ArrayMemory0 = null;\n\nfunction getUint32ArrayMemory0() {\n if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {\n cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);\n }\n return cachedUint32ArrayMemory0;\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nfunction passArray32ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 4, 4) >>> 0;\n getUint32ArrayMemory0().set(arg, ptr / 4);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n return instance.ptr;\n}\n/**\n *\n * * WASM wrapper for the BFS distance map function.\n *\n * @param {Uint32Array} start_packed\n * @param {ClockworkCostMatrix} cost_matrix\n * @returns {DistanceMap}\n */\nexport function js_bfs_distance_map(start_packed, cost_matrix) {\n const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(cost_matrix, ClockworkCostMatrix);\n const ret = wasm.js_bfs_distance_map(ptr0, len0, cost_matrix.__wbg_ptr);\n return DistanceMap.__wrap(ret);\n}\n\n/**\n *\n * * WASM wrapper for the BFS flow field function.\n *\n * @param {Uint32Array} start_packed\n * @param {ClockworkCostMatrix} cost_matrix\n * @returns {FlowField}\n */\nexport function js_bfs_flow_field(start_packed, cost_matrix) {\n const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(cost_matrix, ClockworkCostMatrix);\n const ret = wasm.js_bfs_flow_field(ptr0, len0, cost_matrix.__wbg_ptr);\n return FlowField.__wrap(ret);\n}\n\n/**\n *\n * * WASM wrapper for the BFS mono flow field function.\n *\n * @param {Uint32Array} start_packed\n * @param {ClockworkCostMatrix} cost_matrix\n * @returns {MonoFlowField}\n */\nexport function js_bfs_mono_flow_field(start_packed, cost_matrix) {\n const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(cost_matrix, ClockworkCostMatrix);\n const ret = wasm.js_bfs_mono_flow_field(ptr0, len0, cost_matrix.__wbg_ptr);\n return MonoFlowField.__wrap(ret);\n}\n\n/**\n * @returns {string}\n */\nexport function version() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.version(retptr);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n}\n\n/**\n * @param {number} packed_pos_1\n * @param {number} packed_pos_2\n * @returns {number}\n */\nexport function get_range(packed_pos_1, packed_pos_2) {\n const ret = wasm.get_range(packed_pos_1, packed_pos_2);\n return ret >>> 0;\n}\n\nfunction getArrayU32FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);\n}\n\nfunction getArrayJsValueFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n const mem = getDataViewMemory0();\n const result = [];\n for (let i = ptr; i < ptr + 4 * len; i += 4) {\n result.push(takeObject(mem.getUint32(i, true)));\n }\n return result;\n}\n\nfunction passArrayJsValueToWasm0(array, malloc) {\n const ptr = malloc(array.length * 4, 4) >>> 0;\n const mem = getDataViewMemory0();\n for (let i = 0; i < array.length; i++) {\n mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);\n }\n WASM_VECTOR_LEN = array.length;\n return ptr;\n}\n/**\n * Translates `COLOR_*` and `COLORS_ALL` constants.\n */\nexport const Color = Object.freeze({ Red:1,\"1\":\"Red\",Purple:2,\"2\":\"Purple\",Blue:3,\"3\":\"Blue\",Cyan:4,\"4\":\"Cyan\",Green:5,\"5\":\"Green\",Yellow:6,\"6\":\"Yellow\",Orange:7,\"7\":\"Orange\",Brown:8,\"8\":\"Brown\",Grey:9,\"9\":\"Grey\",White:10,\"10\":\"White\", });\n/**\n * Translates the `DENSITY_*` constants.\n */\nexport const Density = Object.freeze({ Low:1,\"1\":\"Low\",Moderate:2,\"2\":\"Moderate\",High:3,\"3\":\"High\",Ultra:4,\"4\":\"Ultra\", });\n/**\n * Translates direction constants.\n */\nexport const Direction = Object.freeze({ Top:1,\"1\":\"Top\",TopRight:2,\"2\":\"TopRight\",Right:3,\"3\":\"Right\",BottomRight:4,\"4\":\"BottomRight\",Bottom:5,\"5\":\"Bottom\",BottomLeft:6,\"6\":\"BottomLeft\",Left:7,\"7\":\"Left\",TopLeft:8,\"8\":\"TopLeft\", });\n/**\n * Type used for when the game returns a direction to an exit.\n *\n * Restricted more than `Direction` in that it can't be diagonal. Used as the\n * result of [`Room::find_exit_to`].\n *\n * Can be converted to [`Find`] for immediate use of [`Room::find`]\n * and [`Direction`].\n *\n * [`Room::find`]: crate::objects::Room::find\n * [`Room::find_exit_to`]: crate::objects::Room::find_exit_to\n */\nexport const ExitDirection = Object.freeze({ Top:1,\"1\":\"Top\",Right:3,\"3\":\"Right\",Bottom:5,\"5\":\"Bottom\",Left:7,\"7\":\"Left\", });\n/**\n * Translates `FIND_*` constants for interal API calls\n *\n * Unless you're storing the type of find constant to be used for a call, you\n * likely want the constants which implement the `FindConstant` trait to make\n * calls to find methods.\n *\n * This is hidden from the documentation to avoid confusion due to its narrow\n * use case, but wasm_bindgen requires it remain public.\n */\nexport const Find = Object.freeze({\n/**\n * Find all exit positions at the top of the room\n */\nExitTop:1,\"1\":\"ExitTop\",ExitRight:3,\"3\":\"ExitRight\",ExitBottom:5,\"5\":\"ExitBottom\",ExitLeft:7,\"7\":\"ExitLeft\",Exit:10,\"10\":\"Exit\",Creeps:101,\"101\":\"Creeps\",MyCreeps:102,\"102\":\"MyCreeps\",HostileCreeps:103,\"103\":\"HostileCreeps\",SourcesActive:104,\"104\":\"SourcesActive\",Sources:105,\"105\":\"Sources\",DroppedResources:106,\"106\":\"DroppedResources\",Structures:107,\"107\":\"Structures\",MyStructures:108,\"108\":\"MyStructures\",HostileStructures:109,\"109\":\"HostileStructures\",Flags:110,\"110\":\"Flags\",ConstructionSites:111,\"111\":\"ConstructionSites\",MySpawns:112,\"112\":\"MySpawns\",HostileSpawns:113,\"113\":\"HostileSpawns\",MyConstructionSites:114,\"114\":\"MyConstructionSites\",HostileConstructionSites:115,\"115\":\"HostileConstructionSites\",Minerals:116,\"116\":\"Minerals\",Nukes:117,\"117\":\"Nukes\",Tombstones:118,\"118\":\"Tombstones\",PowerCreeps:119,\"119\":\"PowerCreeps\",MyPowerCreeps:120,\"120\":\"MyPowerCreeps\",HostilePowerCreeps:121,\"121\":\"HostilePowerCreeps\",Deposits:122,\"122\":\"Deposits\",Ruins:123,\"123\":\"Ruins\",ScoreContainers:10011,\"10011\":\"ScoreContainers\",ScoreCollectors:10012,\"10012\":\"ScoreCollectors\",SymbolContainers:10021,\"10021\":\"SymbolContainers\",SymbolDecoders:10022,\"10022\":\"SymbolDecoders\",Reactors:10051,\"10051\":\"Reactors\", });\n/**\n * Translates the `EFFECT_*` constants, which are natural effect types\n */\nexport const NaturalEffectType = Object.freeze({ Invulnerability:1001,\"1001\":\"Invulnerability\",CollapseTimer:1002,\"1002\":\"CollapseTimer\", });\n/**\n * Translates the `PWR_*` constants, which are types of powers used by power\n * creeps\n */\nexport const PowerType = Object.freeze({ GenerateOps:1,\"1\":\"GenerateOps\",OperateSpawn:2,\"2\":\"OperateSpawn\",OperateTower:3,\"3\":\"OperateTower\",OperateStorage:4,\"4\":\"OperateStorage\",OperateLab:5,\"5\":\"OperateLab\",OperateExtension:6,\"6\":\"OperateExtension\",OperateObserver:7,\"7\":\"OperateObserver\",OperateTerminal:8,\"8\":\"OperateTerminal\",DisruptSpawn:9,\"9\":\"DisruptSpawn\",DisruptTower:10,\"10\":\"DisruptTower\",Shield:12,\"12\":\"Shield\",RegenSource:13,\"13\":\"RegenSource\",RegenMineral:14,\"14\":\"RegenMineral\",DisruptTerminal:15,\"15\":\"DisruptTerminal\",OperatePower:16,\"16\":\"OperatePower\",Fortify:17,\"17\":\"Fortify\",OperateController:18,\"18\":\"OperateController\",OperateFactory:19,\"19\":\"OperateFactory\", });\n/**\n * Translates `TERRAIN_*` constants.\n */\nexport const Terrain = Object.freeze({ Plain:0,\"0\":\"Plain\",Wall:1,\"1\":\"Wall\",Swamp:2,\"2\":\"Swamp\", });\n\nconst __wbindgen_enum_IntershardResourceType = [\"cpuUnlock\", \"pixel\", \"accessKey\"];\n\nconst __wbindgen_enum_Look = [\"creep\", \"energy\", \"resource\", \"source\", \"mineral\", \"structure\", \"flag\", \"constructionSite\", \"nuke\", \"terrain\", \"tombstone\", \"powerCreep\", \"deposit\", \"ruin\", \"scoreContainer\", \"scoreCollector\", \"symbolContainer\", \"symbolDecoder\", \"reactor\"];\n\nconst __wbindgen_enum_OrderType = [\"sell\", \"buy\"];\n\nconst __wbindgen_enum_Part = [\"move\", \"work\", \"carry\", \"attack\", \"ranged_attack\", \"tough\", \"heal\", \"claim\"];\n\nconst __wbindgen_enum_PowerCreepClass = [\"operator\"];\n\nconst __wbindgen_enum_ResourceType = [\"energy\", \"power\", \"H\", \"O\", \"U\", \"L\", \"K\", \"Z\", \"X\", \"G\", \"silicon\", \"metal\", \"biomass\", \"mist\", \"OH\", \"ZK\", \"UL\", \"UH\", \"UO\", \"KH\", \"KO\", \"LH\", \"LO\", \"ZH\", \"ZO\", \"GH\", \"GO\", \"UH2O\", \"UHO2\", \"KH2O\", \"KHO2\", \"LH2O\", \"LHO2\", \"ZH2O\", \"ZHO2\", \"GH2O\", \"GHO2\", \"XUH2O\", \"XUHO2\", \"XKH2O\", \"XKHO2\", \"XLH2O\", \"XLHO2\", \"XZH2O\", \"XZHO2\", \"XGH2O\", \"XGHO2\", \"ops\", \"utrium_bar\", \"lemergium_bar\", \"zynthium_bar\", \"keanium_bar\", \"ghodium_melt\", \"oxidant\", \"reductant\", \"purifier\", \"battery\", \"composite\", \"crystal\", \"liquid\", \"wire\", \"switch\", \"transistor\", \"microchip\", \"circuit\", \"device\", \"cell\", \"phlegm\", \"tissue\", \"muscle\", \"organoid\", \"organism\", \"alloy\", \"tube\", \"fixtures\", \"frame\", \"hydraulics\", \"machine\", \"condensate\", \"concentrate\", \"extract\", \"spirit\", \"emanation\", \"essence\", \"score\", \"symbol_aleph\", \"symbol_beth\", \"symbol_gimmel\", \"symbol_daleth\", \"symbol_he\", \"symbol_waw\", \"symbol_zayin\", \"symbol_heth\", \"symbol_teth\", \"symbol_yodh\", \"symbol_kaph\", \"symbol_lamedh\", \"symbol_mem\", \"symbol_nun\", \"symbol_samekh\", \"symbol_ayin\", \"symbol_pe\", \"symbol_tsade\", \"symbol_qoph\", \"symbol_res\", \"symbol_sim\", \"symbol_taw\", \"T\"];\n\nconst __wbindgen_enum_RoomStatus = [\"normal\", \"closed\", \"novice\", \"respawn\"];\n\nconst __wbindgen_enum_StructureType = [\"spawn\", \"extension\", \"road\", \"constructedWall\", \"rampart\", \"keeperLair\", \"portal\", \"controller\", \"link\", \"storage\", \"tower\", \"observer\", \"powerBank\", \"powerSpawn\", \"extractor\", \"lab\", \"terminal\", \"container\", \"nuker\", \"factory\", \"invaderCore\"];\n\nconst ClockworkCostMatrixFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_clockworkcostmatrix_free(ptr >>> 0, 1));\n\nexport class ClockworkCostMatrix {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ClockworkCostMatrixFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_clockworkcostmatrix_free(ptr, 0);\n }\n constructor() {\n const ret = wasm.clockworkcostmatrix_new();\n this.__wbg_ptr = ret >>> 0;\n ClockworkCostMatrixFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * @param {number} x\n * @param {number} y\n * @returns {number}\n */\n get(x, y) {\n const ret = wasm.clockworkcostmatrix_get(this.__wbg_ptr, x, y);\n return ret;\n }\n /**\n * @param {number} x\n * @param {number} y\n * @param {number} value\n */\n set(x, y, value) {\n wasm.clockworkcostmatrix_set(this.__wbg_ptr, x, y, value);\n }\n}\n\nconst DistanceMapFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_distancemap_free(ptr >>> 0, 1));\n/**\n * Maps arbitrary data onto individual room tile positions.\n */\nexport class DistanceMap {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(DistanceMap.prototype);\n obj.__wbg_ptr = ptr;\n DistanceMapFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n DistanceMapFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_distancemap_free(ptr, 0);\n }\n /**\n * @returns {Uint32Array}\n */\n toArray() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.distancemap_toArray(retptr, this.__wbg_ptr);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n var v1 = getArrayU32FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 4, 4);\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * @param {number} x\n * @param {number} y\n * @returns {number}\n */\n get(x, y) {\n const ret = wasm.distancemap_get(this.__wbg_ptr, x, y);\n return ret >>> 0;\n }\n /**\n * @param {number} x\n * @param {number} y\n * @param {number} value\n */\n set(x, y, value) {\n wasm.distancemap_set(this.__wbg_ptr, x, y, value);\n }\n}\n\nconst FlowFieldFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_flowfield_free(ptr >>> 0, 1));\n/**\n *\n * * A flow field is a 50x50 grid (representing a room), representing viable directions\n * * to travel to reach a particular target (or targets). A given tile may have multiple\n * * equally valid directions, so we represent this as a bitfield (where each bit in an\n * * 8-bit unsigned integer represents a direction that is either viable or not).\n *\n */\nexport class FlowField {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(FlowField.prototype);\n obj.__wbg_ptr = ptr;\n FlowFieldFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n FlowFieldFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_flowfield_free(ptr, 0);\n }\n /**\n *\n * * Get the internal value for a given coordinate.\n *\n * @param {number} x\n * @param {number} y\n * @returns {number}\n */\n get(x, y) {\n const ret = wasm.flowfield_get(this.__wbg_ptr, x, y);\n return ret;\n }\n /**\n *\n * * Set the internal value for a given coordinate.\n *\n * @param {number} x\n * @param {number} y\n * @param {number} value\n */\n set(x, y, value) {\n wasm.flowfield_set(this.__wbg_ptr, x, y, value);\n }\n /**\n *\n * * Get the list of valid directions for a given coordinate.\n *\n * @param {number} x\n * @param {number} y\n * @returns {any[]}\n */\n getDirections(x, y) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.flowfield_getDirections(retptr, this.__wbg_ptr, x, y);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n var v1 = getArrayJsValueFromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 4, 4);\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n *\n * * Set the list of valid directions for a given coordinate.\n *\n * @param {number} x\n * @param {number} y\n * @param {any[]} directions\n */\n setDirections(x, y, directions) {\n const ptr0 = passArrayJsValueToWasm0(directions, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.flowfield_setDirections(this.__wbg_ptr, x, y, ptr0, len0);\n }\n /**\n * @param {number} x\n * @param {number} y\n * @param {Direction} direction\n */\n addDirection(x, y, direction) {\n wasm.flowfield_addDirection(this.__wbg_ptr, x, y, direction);\n }\n}\n\nconst MonoFlowFieldFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_monoflowfield_free(ptr >>> 0, 1));\n/**\n *\n * * A flow field is a 50x50 grid (representing a room), representing viable directions\n * * to travel to reach a particular target (or targets). A mono flow field only stores\n * * a single direction for each tile, so we represent this as 4 bits of an unsigned\n * * integer (0 for no direction, 1 for TOP, etc.).\n *\n */\nexport class MonoFlowField {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(MonoFlowField.prototype);\n obj.__wbg_ptr = ptr;\n MonoFlowFieldFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n MonoFlowFieldFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_monoflowfield_free(ptr, 0);\n }\n /**\n *\n * * Get the direction for a given coordinate.\n *\n * @param {number} x\n * @param {number} y\n * @returns {Direction | undefined}\n */\n get(x, y) {\n const ret = wasm.monoflowfield_get(this.__wbg_ptr, x, y);\n return ret === 0 ? undefined : ret;\n }\n /**\n *\n * * Set the direction for a given coordinate.\n *\n * @param {number} x\n * @param {number} y\n * @param {Direction | undefined} [value]\n */\n set(x, y, value) {\n wasm.monoflowfield_set(this.__wbg_ptr, x, y, isLikeNone(value) ? 0 : value);\n }\n}\n\nconst SearchGoalFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_searchgoal_free(ptr >>> 0, 1));\n\nexport class SearchGoal {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n SearchGoalFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_searchgoal_free(ptr, 0);\n }\n /**\n * @returns {any}\n */\n get pos() {\n const ret = wasm.searchgoal_pos(this.__wbg_ptr);\n return takeObject(ret);\n }\n /**\n * @returns {number}\n */\n get range() {\n const ret = wasm.searchgoal_range(this.__wbg_ptr);\n return ret >>> 0;\n }\n}\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n\n } catch (e) {\n if (module.headers.get('Content-Type') != 'application/wasm') {\n console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\n } else {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbindgen_object_drop_ref = function(arg0) {\n takeObject(arg0);\n };\n imports.wbg.__wbindgen_number_new = function(arg0) {\n const ret = arg0;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_number_get = function(arg0, arg1) {\n const obj = getObject(arg1);\n const ret = typeof(obj) === 'number' ? obj : undefined;\n getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);\n };\n imports.wbg.__wbindgen_try_into_number = function(arg0) {\n let result;\n try { result = +getObject(arg0) } catch (e) { result = e }\n const ret = result;\n return addHeapObject(ret);\n};\nimports.wbg.__wbg_static_accessor_ROOM_POSITION_PROTOTYPE_359d8a1531b99b4c = function() {\n const ret = RoomPosition.prototype;\n return addHeapObject(ret);\n};\nimports.wbg.__wbg_setpacked_e36387710a3ff5bb = function(arg0, arg1) {\n getObject(arg0).__packedPos = arg1 >>> 0;\n};\nimports.wbg.__wbg_create_70ef5302cb22a5c4 = function(arg0) {\n const ret = Object.create(getObject(arg0));\n return addHeapObject(ret);\n};\nimports.wbg.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n};\n\nreturn imports;\n}\n\nfunction __wbg_init_memory(imports, memory) {\n\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedDataViewMemory0 = null;\n cachedUint32ArrayMemory0 = null;\n cachedUint8ArrayMemory0 = null;\n\n\n\n return wasm;\n}\n\nfunction initSync(module) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module !== 'undefined') {\n if (Object.getPrototypeOf(module) === Object.prototype) {\n ({module} = module)\n } else {\n console.warn('using deprecated parameters for `initSync()`; pass a single object instead')\n }\n }\n\n const imports = __wbg_get_imports();\n\n __wbg_init_memory(imports);\n\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n\n const instance = new WebAssembly.Instance(module, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(module_or_path) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module_or_path !== 'undefined') {\n if (Object.getPrototypeOf(module_or_path) === Object.prototype) {\n ({module_or_path} = module_or_path)\n } else {\n console.warn('using deprecated parameters for the initialization function; pass a single object instead')\n }\n }\n\n if (typeof module_or_path === 'undefined') {\n module_or_path = new URL('screeps_clockwork_bg.wasm', import.meta.url);\n }\n const imports = __wbg_get_imports();\n\n if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {\n module_or_path = fetch(module_or_path);\n }\n\n __wbg_init_memory(imports);\n\n const { instance, module } = await __wbg_load(await module_or_path, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nexport { initSync };\nexport default __wbg_init;\n","import { ClockworkCostMatrix, js_bfs_distance_map } from '../../wasm';\n\nexport function bfsDistanceMap(start: RoomPosition[], costMatrix: ClockworkCostMatrix) {\n const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));\n const result = js_bfs_distance_map(startPacked, costMatrix);\n return result;\n}\n","import { ClockworkCostMatrix, js_bfs_flow_field, js_bfs_mono_flow_field } from '../../wasm';\n\nexport function bfsFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix) {\n const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));\n const result = js_bfs_flow_field(startPacked, costMatrix);\n return result;\n}\n\nexport function bfsMonoFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix) {\n const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));\n const result = js_bfs_mono_flow_field(startPacked, costMatrix);\n return result;\n}\n","import { get_range } from '../../wasm';\n\nexport function getRange(pos1: RoomPosition, pos2: RoomPosition) {\n return get_range(pos1.__packedPos, pos2.__packedPos);\n}\n","import 'fastestsmallesttextencoderdecoder-encodeinto/EncoderDecoderTogether.min.js';\n\nimport {\n type InitOutput,\n ClockworkCostMatrix,\n DistanceMap,\n FlowField,\n MonoFlowField,\n initSync,\n version\n} from '../wasm';\nexport { ClockworkCostMatrix, DistanceMap, FlowField, MonoFlowField };\n\nexport * from './wrappers/bfsDistanceMap';\nexport * from './wrappers/bfsFlowField';\nexport * from './wrappers/getRange';\n\ndeclare namespace WebAssembly {\n class Module {\n constructor(bytes: Uint8Array);\n }\n}\n\nlet wasm_bytes: Uint8Array;\nlet wasm_module: WebAssembly.Module;\nlet wasm_instance: InitOutput;\nlet initialized = false;\nexport function initialize(verbose = false) {\n if (!wasm_bytes) wasm_bytes = require('screeps_clockwork.wasm');\n if (verbose && !initialized) console.log('[clockwork] wasm_bytes loaded');\n if (!wasm_module) wasm_module = new WebAssembly.Module(wasm_bytes);\n if (verbose && !initialized) console.log('[clockwork] wasm_module loaded');\n if (!wasm_instance) wasm_instance = initSync({ module: wasm_module });\n if (verbose && !initialized) {\n console.log('[clockwork] wasm_instance loaded');\n console.log(`[clockwork] version ${version()} initialized`);\n }\n initialized = true;\n}\n"],"names":["global","this"],"mappings":";;;;;;AAAa,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,KAAK,EAAE,CAAC,GAAG,CAAC,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M,CAAC;AAChB;;ACVgB,SAAA,QAAQ,CAAC,IAAkB,EAAE,IAAkB,EAAA;IAC7D,OAAO,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;AACvD;;ACmBA,IAAI,UAAsB,CAAC;AAC3B,IAAI,WAA+B,CAAC;AACpC,IAAI,aAAyB,CAAC;AAC9B,IAAI,WAAW,GAAG,KAAK,CAAC;AACR,SAAA,UAAU,CAAC,OAAO,GAAG,KAAK,EAAA;AACxC,IAAA,IAAI,CAAC,UAAU;AAAE,QAAA,UAAU,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAChE,IAAI,OAAO,IAAI,CAAC,WAAW;AAAE,QAAA,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;AAC1E,IAAA,IAAI,CAAC,WAAW;QAAE,WAAW,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACnE,IAAI,OAAO,IAAI,CAAC,WAAW;AAAE,QAAA,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;AAC3E,IAAA,IAAI,CAAC,aAAa;QAAE,aAAa,GAAG,QAAQ,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;AACtE,IAAA,IAAI,OAAO,IAAI,CAAC,WAAW,EAAE;AAC3B,QAAA,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;QAChD,OAAO,CAAC,GAAG,CAAC,CAAA,oBAAA,EAAuB,OAAO,EAAE,CAAA,YAAA,CAAc,CAAC,CAAC;AAC7D,KAAA;IACD,WAAW,GAAG,IAAI,CAAC;AACrB;;;;;;;;;;;;"}
Binary file
@@ -0,0 +1,7 @@
1
+ import 'fastestsmallesttextencoderdecoder-encodeinto/EncoderDecoderTogether.min.js';
2
+ import { ClockworkCostMatrix, DistanceMap, FlowField, MonoFlowField } from '../wasm';
3
+ export { ClockworkCostMatrix, DistanceMap, FlowField, MonoFlowField };
4
+ export * from './wrappers/bfsDistanceMap';
5
+ export * from './wrappers/bfsFlowField';
6
+ export * from './wrappers/getRange';
7
+ export declare function initialize(verbose?: boolean): void;
@@ -0,0 +1,2 @@
1
+ import { ClockworkCostMatrix } from '../../wasm';
2
+ export declare function bfsDistanceMap(start: RoomPosition[], costMatrix: ClockworkCostMatrix): import("../../wasm").DistanceMap;
@@ -0,0 +1,3 @@
1
+ import { ClockworkCostMatrix } from '../../wasm';
2
+ export declare function bfsFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix): import("../../wasm").FlowField;
3
+ export declare function bfsMonoFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix): import("../../wasm").MonoFlowField;
@@ -0,0 +1 @@
1
+ export declare function getRange(pos1: RoomPosition, pos2: RoomPosition): number;
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "screeps-clockwork",
3
+ "version": "0.1.0",
4
+ "description": "A WASM movement library for Screeps",
5
+ "main": "dist/index.js",
6
+ "types": "dist/src/index.d.ts",
7
+ "scripts": {
8
+ "build": "run-s build:lib build:src",
9
+ "build:lib": "wasm-pack build --target web --out-dir wasm --config build.rustflags=[\\'-Ctarget-feature=-reference-types\\',\\'-Ctarget-feature=-multivalue\\',\\'-Ctarget-feature=-sign-ext\\'] -Z build-std=std,panic_abort",
10
+ "build:src": "rollup -c",
11
+ "watch": "run-p watch:lib watch:pserver",
12
+ "watch:lib": "cargo-watch -w lib -s \"npm run build:lib\"",
13
+ "watch:src": "rollup -cw",
14
+ "watch:pserver": "rollup -cw --environment DEST:pserver"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/glitchassassin/screeps-clockwork.git"
19
+ },
20
+ "keywords": [
21
+ "typescript",
22
+ "screeps",
23
+ "wasm",
24
+ "pathfinding"
25
+ ],
26
+ "author": "Jon Winsley <jon.winsley@gmail.com>",
27
+ "license": "SEE LICENSE IN LICENSE",
28
+ "bugs": {
29
+ "url": "https://github.com/glitchassassin/screeps-clockwork/issues"
30
+ },
31
+ "homepage": "https://github.com/glitchassassin/screeps-clockwork#readme",
32
+ "devDependencies": {
33
+ "@knodes/typedoc-plugin-pages": "^0.23.1",
34
+ "@rollup/plugin-commonjs": "^25.0.3",
35
+ "@rollup/plugin-node-resolve": "^15.1.0",
36
+ "@rollup/plugin-typescript": "^8.3.4",
37
+ "@rollup/plugin-wasm": "^6.2.2",
38
+ "@types/node": "^22.7.8",
39
+ "@types/screeps": "^3.3.0",
40
+ "@typescript-eslint/eslint-plugin": "^5.0.0",
41
+ "@typescript-eslint/parser": "^5.0.0",
42
+ "eslint": "^8.0.0",
43
+ "prettier": "^2.0.0",
44
+ "rollup": "^2.78.0",
45
+ "rollup-plugin-clear": "^2.0.7",
46
+ "rollup-plugin-copy": "^3.5.0",
47
+ "rollup-plugin-screeps": "^1.0.1",
48
+ "source-map": "^0.6.1",
49
+ "typescript": "^4.7.4"
50
+ },
51
+ "dependencies": {
52
+ "fastestsmallesttextencoderdecoder-encodeinto": "^1.0.22",
53
+ "npm-run-all": "^4.1.5"
54
+ },
55
+ "type": "module",
56
+ "files": [
57
+ "dist/**/*"
58
+ ],
59
+ "publishConfig": {
60
+ "access": "public"
61
+ }
62
+ }