screeps-clockwork 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +59 -4
- package/dist/index.js +257 -90
- package/dist/index.js.map +1 -1
- package/dist/screeps_clockwork.wasm +0 -0
- package/dist/src/index.d.ts +10 -0
- package/dist/src/wrappers/bfsDistanceMap.d.ts +15 -0
- package/dist/src/wrappers/bfsFlowField.d.ts +30 -0
- package/dist/src/wrappers/dijkstraDistanceMap.d.ts +15 -0
- package/dist/src/wrappers/dijkstraFlowField.d.ts +29 -0
- package/dist/src/wrappers/getRange.d.ts +9 -0
- package/package.json +62 -60
package/README.md
CHANGED
@@ -1,7 +1,62 @@
|
|
1
1
|
# Screeps Clockwork
|
2
2
|
|
3
|
-
|
3
|
+
<div style="text-align: center;"><a href="https://glitchassassin.github.io/screeps-clockwork/">Understand the Theory</a> | <a href="https://glitchassassin.github.io/screeps-clockwork/api/">API Docs</a></div>
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
## Usage
|
6
|
+
|
7
|
+
(TODO)
|
8
|
+
|
9
|
+
## Dev Setup
|
10
|
+
|
11
|
+
Dependencies to build and run the project:
|
12
|
+
|
13
|
+
```bash
|
14
|
+
# Install Rust + Cargo via rustup
|
15
|
+
curl https://sh.rustup.rs -sSf | sh
|
16
|
+
|
17
|
+
# Install wasm-pack
|
18
|
+
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
19
|
+
|
20
|
+
# Add rust-src component
|
21
|
+
rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
|
22
|
+
|
23
|
+
# Install nvm
|
24
|
+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
|
25
|
+
|
26
|
+
# Install node
|
27
|
+
nvm install --lts
|
28
|
+
nvm use --lts
|
29
|
+
nvm alias default --lts # optional
|
30
|
+
```
|
31
|
+
|
32
|
+
To build the project:
|
33
|
+
|
34
|
+
```bash
|
35
|
+
npm run build
|
36
|
+
```
|
37
|
+
|
38
|
+
To set up the local Screeps server, you'll need to have docker installed:
|
39
|
+
|
40
|
+
```bash
|
41
|
+
cp .env.sample .env # fill this out with the path to your Screeps .nw package and Steam key
|
42
|
+
./reset-docker.sh
|
43
|
+
```
|
44
|
+
|
45
|
+
Once running, you can log in and spawn into the server with the [local screeps-steamless-client](http://localhost:8080/).
|
46
|
+
|
47
|
+
- **Username:** clockwork
|
48
|
+
- **Password:** passw0rd
|
49
|
+
|
50
|
+
To deploy the test codebase, once the server is running:
|
51
|
+
|
52
|
+
```bash
|
53
|
+
npm run watch
|
54
|
+
```
|
55
|
+
|
56
|
+
Set up commitizen and pre-commit for conventional commits:
|
57
|
+
|
58
|
+
```bash
|
59
|
+
# requires Python 3.8+
|
60
|
+
pip install --user -U commitizen pre-commit
|
61
|
+
pre-commit install
|
62
|
+
```
|
package/dist/index.js
CHANGED
@@ -4,13 +4,25 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
6
6
|
|
7
|
+
var EncoderDecoderTogether_min = {};
|
8
|
+
|
9
|
+
var hasRequiredEncoderDecoderTogether_min;
|
10
|
+
|
11
|
+
function requireEncoderDecoderTogether_min () {
|
12
|
+
if (hasRequiredEncoderDecoderTogether_min) return EncoderDecoderTogether_min;
|
13
|
+
hasRequiredEncoderDecoderTogether_min = 1;
|
7
14
|
(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?
|
15
|
+
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;
|
16
|
+
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||
|
17
|
+
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],
|
18
|
+
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=
|
19
|
+
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,
|
20
|
+
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?EncoderDecoderTogether_min:self:commonjsGlobal);//AnonyCo
|
21
|
+
|
22
|
+
return EncoderDecoderTogether_min;
|
23
|
+
}
|
24
|
+
|
25
|
+
requireEncoderDecoderTogether_min();
|
14
26
|
|
15
27
|
let wasm;
|
16
28
|
|
@@ -72,6 +84,36 @@ function getStringFromWasm0(ptr, len) {
|
|
72
84
|
ptr = ptr >>> 0;
|
73
85
|
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
74
86
|
}
|
87
|
+
/**
|
88
|
+
* @returns {string}
|
89
|
+
*/
|
90
|
+
function version() {
|
91
|
+
let deferred1_0;
|
92
|
+
let deferred1_1;
|
93
|
+
try {
|
94
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
95
|
+
wasm.version(retptr);
|
96
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
97
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
98
|
+
deferred1_0 = r0;
|
99
|
+
deferred1_1 = r1;
|
100
|
+
return getStringFromWasm0(r0, r1);
|
101
|
+
} finally {
|
102
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
103
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
107
|
+
/**
|
108
|
+
* Exports the global range calculation between two positions.
|
109
|
+
* @param {number} packed_pos_1
|
110
|
+
* @param {number} packed_pos_2
|
111
|
+
* @returns {number}
|
112
|
+
*/
|
113
|
+
function get_range(packed_pos_1, packed_pos_2) {
|
114
|
+
const ret = wasm.get_range(packed_pos_1, packed_pos_2);
|
115
|
+
return ret >>> 0;
|
116
|
+
}
|
75
117
|
|
76
118
|
let cachedUint32ArrayMemory0 = null;
|
77
119
|
|
@@ -98,25 +140,7 @@ function _assertClass(instance, klass) {
|
|
98
140
|
return instance.ptr;
|
99
141
|
}
|
100
142
|
/**
|
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
|
-
*
|
143
|
+
* WASM wrapper for the BFS flow field function.
|
120
144
|
* @param {Uint32Array} start_packed
|
121
145
|
* @param {ClockworkCostMatrix} cost_matrix
|
122
146
|
* @returns {FlowField}
|
@@ -130,55 +154,50 @@ function js_bfs_flow_field(start_packed, cost_matrix) {
|
|
130
154
|
}
|
131
155
|
|
132
156
|
/**
|
133
|
-
*
|
134
|
-
* * WASM wrapper for the BFS mono flow field function.
|
135
|
-
*
|
157
|
+
* WASM wrapper for the Dijkstra mono flow field function.
|
136
158
|
* @param {Uint32Array} start_packed
|
137
159
|
* @param {ClockworkCostMatrix} cost_matrix
|
138
160
|
* @returns {MonoFlowField}
|
139
161
|
*/
|
140
|
-
function
|
162
|
+
function js_dijkstra_mono_flow_field(start_packed, cost_matrix) {
|
141
163
|
const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);
|
142
164
|
const len0 = WASM_VECTOR_LEN;
|
143
165
|
_assertClass(cost_matrix, ClockworkCostMatrix);
|
144
|
-
const ret = wasm.
|
166
|
+
const ret = wasm.js_dijkstra_mono_flow_field(ptr0, len0, cost_matrix.__wbg_ptr);
|
145
167
|
return MonoFlowField.__wrap(ret);
|
146
168
|
}
|
147
169
|
|
148
170
|
/**
|
149
|
-
*
|
150
|
-
|
151
|
-
|
152
|
-
|
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}
|
171
|
+
* WASM wrapper for the Dijkstra flow field function.
|
172
|
+
* @param {Uint32Array} start_packed
|
173
|
+
* @param {ClockworkCostMatrix} cost_matrix
|
174
|
+
* @returns {FlowField}
|
172
175
|
*/
|
173
|
-
function
|
174
|
-
const
|
175
|
-
|
176
|
+
function js_dijkstra_flow_field(start_packed, cost_matrix) {
|
177
|
+
const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);
|
178
|
+
const len0 = WASM_VECTOR_LEN;
|
179
|
+
_assertClass(cost_matrix, ClockworkCostMatrix);
|
180
|
+
const ret = wasm.js_dijkstra_flow_field(ptr0, len0, cost_matrix.__wbg_ptr);
|
181
|
+
return FlowField.__wrap(ret);
|
176
182
|
}
|
177
183
|
|
178
184
|
function getArrayU32FromWasm0(ptr, len) {
|
179
185
|
ptr = ptr >>> 0;
|
180
186
|
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
181
187
|
}
|
188
|
+
/**
|
189
|
+
* WASM wrapper for the Dijkstra distance map function.
|
190
|
+
* @param {Uint32Array} start_packed
|
191
|
+
* @param {ClockworkCostMatrix} cost_matrix
|
192
|
+
* @returns {DistanceMap}
|
193
|
+
*/
|
194
|
+
function js_dijkstra_distance_map(start_packed, cost_matrix) {
|
195
|
+
const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);
|
196
|
+
const len0 = WASM_VECTOR_LEN;
|
197
|
+
_assertClass(cost_matrix, ClockworkCostMatrix);
|
198
|
+
const ret = wasm.js_dijkstra_distance_map(ptr0, len0, cost_matrix.__wbg_ptr);
|
199
|
+
return DistanceMap.__wrap(ret);
|
200
|
+
}
|
182
201
|
|
183
202
|
function getArrayJsValueFromWasm0(ptr, len) {
|
184
203
|
ptr = ptr >>> 0;
|
@@ -199,6 +218,34 @@ function passArrayJsValueToWasm0(array, malloc) {
|
|
199
218
|
WASM_VECTOR_LEN = array.length;
|
200
219
|
return ptr;
|
201
220
|
}
|
221
|
+
/**
|
222
|
+
* WASM wrapper for the BFS distance map function.
|
223
|
+
* @param {Uint32Array} start_packed
|
224
|
+
* @param {ClockworkCostMatrix} cost_matrix
|
225
|
+
* @returns {DistanceMap}
|
226
|
+
*/
|
227
|
+
function js_bfs_distance_map(start_packed, cost_matrix) {
|
228
|
+
const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);
|
229
|
+
const len0 = WASM_VECTOR_LEN;
|
230
|
+
_assertClass(cost_matrix, ClockworkCostMatrix);
|
231
|
+
const ret = wasm.js_bfs_distance_map(ptr0, len0, cost_matrix.__wbg_ptr);
|
232
|
+
return DistanceMap.__wrap(ret);
|
233
|
+
}
|
234
|
+
|
235
|
+
/**
|
236
|
+
* WASM wrapper for the BFS mono flow field function.
|
237
|
+
* @param {Uint32Array} start_packed
|
238
|
+
* @param {ClockworkCostMatrix} cost_matrix
|
239
|
+
* @returns {MonoFlowField}
|
240
|
+
*/
|
241
|
+
function js_bfs_mono_flow_field(start_packed, cost_matrix) {
|
242
|
+
const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);
|
243
|
+
const len0 = WASM_VECTOR_LEN;
|
244
|
+
_assertClass(cost_matrix, ClockworkCostMatrix);
|
245
|
+
const ret = wasm.js_bfs_mono_flow_field(ptr0, len0, cost_matrix.__wbg_ptr);
|
246
|
+
return MonoFlowField.__wrap(ret);
|
247
|
+
}
|
248
|
+
|
202
249
|
/**
|
203
250
|
* Translates `COLOR_*` and `COLORS_ALL` constants.
|
204
251
|
*/
|
@@ -256,7 +303,11 @@ Object.freeze({ Plain:0,"0":"Plain",Wall:1,"1":"Wall",Swamp:2,"2":"Swamp", });
|
|
256
303
|
const ClockworkCostMatrixFinalization = (typeof FinalizationRegistry === 'undefined')
|
257
304
|
? { register: () => {}, unregister: () => {} }
|
258
305
|
: new FinalizationRegistry(ptr => wasm.__wbg_clockworkcostmatrix_free(ptr >>> 0, 1));
|
259
|
-
|
306
|
+
/**
|
307
|
+
* A wrapper around the `LocalCostMatrix` type from the Screeps API.
|
308
|
+
* Instances can be passed between WASM and JS as a pointer, using the
|
309
|
+
* methods to get and set values, rather than copying the entire matrix.
|
310
|
+
*/
|
260
311
|
class ClockworkCostMatrix {
|
261
312
|
|
262
313
|
__destroy_into_raw() {
|
@@ -270,13 +321,19 @@ class ClockworkCostMatrix {
|
|
270
321
|
const ptr = this.__destroy_into_raw();
|
271
322
|
wasm.__wbg_clockworkcostmatrix_free(ptr, 0);
|
272
323
|
}
|
273
|
-
|
274
|
-
|
324
|
+
/**
|
325
|
+
* Creates a new cost matrix within the WASM module. Optionally, a default value
|
326
|
+
* can be provided to initialize all cells in the matrix to that value.
|
327
|
+
* @param {number | undefined} [_default]
|
328
|
+
*/
|
329
|
+
constructor(_default) {
|
330
|
+
const ret = wasm.clockworkcostmatrix_new(isLikeNone(_default) ? 0xFFFFFF : _default);
|
275
331
|
this.__wbg_ptr = ret >>> 0;
|
276
332
|
ClockworkCostMatrixFinalization.register(this, this.__wbg_ptr, this);
|
277
333
|
return this;
|
278
334
|
}
|
279
335
|
/**
|
336
|
+
* Gets the cost of a given position in the cost matrix.
|
280
337
|
* @param {number} x
|
281
338
|
* @param {number} y
|
282
339
|
* @returns {number}
|
@@ -286,6 +343,7 @@ class ClockworkCostMatrix {
|
|
286
343
|
return ret;
|
287
344
|
}
|
288
345
|
/**
|
346
|
+
* Sets the cost of a given position in the cost matrix.
|
289
347
|
* @param {number} x
|
290
348
|
* @param {number} y
|
291
349
|
* @param {number} value
|
@@ -299,7 +357,7 @@ const DistanceMapFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
299
357
|
? { register: () => {}, unregister: () => {} }
|
300
358
|
: new FinalizationRegistry(ptr => wasm.__wbg_distancemap_free(ptr >>> 0, 1));
|
301
359
|
/**
|
302
|
-
* Maps
|
360
|
+
* Maps a distance value onto individual room tile positions.
|
303
361
|
*/
|
304
362
|
class DistanceMap {
|
305
363
|
|
@@ -323,6 +381,7 @@ class DistanceMap {
|
|
323
381
|
wasm.__wbg_distancemap_free(ptr, 0);
|
324
382
|
}
|
325
383
|
/**
|
384
|
+
* Converts the distance map into a flat array of distances.
|
326
385
|
* @returns {Uint32Array}
|
327
386
|
*/
|
328
387
|
toArray() {
|
@@ -339,6 +398,7 @@ class DistanceMap {
|
|
339
398
|
}
|
340
399
|
}
|
341
400
|
/**
|
401
|
+
* Gets the distance value at a given position.
|
342
402
|
* @param {number} x
|
343
403
|
* @param {number} y
|
344
404
|
* @returns {number}
|
@@ -348,6 +408,7 @@ class DistanceMap {
|
|
348
408
|
return ret >>> 0;
|
349
409
|
}
|
350
410
|
/**
|
411
|
+
* Sets the distance value at a given position.
|
351
412
|
* @param {number} x
|
352
413
|
* @param {number} y
|
353
414
|
* @param {number} value
|
@@ -361,12 +422,10 @@ const FlowFieldFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
361
422
|
? { register: () => {}, unregister: () => {} }
|
362
423
|
: new FinalizationRegistry(ptr => wasm.__wbg_flowfield_free(ptr >>> 0, 1));
|
363
424
|
/**
|
364
|
-
*
|
365
|
-
*
|
366
|
-
*
|
367
|
-
*
|
368
|
-
* * 8-bit unsigned integer represents a direction that is either viable or not).
|
369
|
-
*
|
425
|
+
* A flow field is a 50x50 grid (representing a room), representing viable directions
|
426
|
+
* to travel to reach a particular target (or targets). A given tile may have multiple
|
427
|
+
* equally valid directions, so we represent this as a bitfield (where each bit in an
|
428
|
+
* 8-bit unsigned integer represents a direction that is either viable or not).
|
370
429
|
*/
|
371
430
|
class FlowField {
|
372
431
|
|
@@ -390,9 +449,7 @@ class FlowField {
|
|
390
449
|
wasm.__wbg_flowfield_free(ptr, 0);
|
391
450
|
}
|
392
451
|
/**
|
393
|
-
*
|
394
|
-
* * Get the internal value for a given coordinate.
|
395
|
-
*
|
452
|
+
* Get the internal value for a given coordinate.
|
396
453
|
* @param {number} x
|
397
454
|
* @param {number} y
|
398
455
|
* @returns {number}
|
@@ -402,9 +459,7 @@ class FlowField {
|
|
402
459
|
return ret;
|
403
460
|
}
|
404
461
|
/**
|
405
|
-
*
|
406
|
-
* * Set the internal value for a given coordinate.
|
407
|
-
*
|
462
|
+
* Set the internal value for a given coordinate.
|
408
463
|
* @param {number} x
|
409
464
|
* @param {number} y
|
410
465
|
* @param {number} value
|
@@ -413,9 +468,7 @@ class FlowField {
|
|
413
468
|
wasm.flowfield_set(this.__wbg_ptr, x, y, value);
|
414
469
|
}
|
415
470
|
/**
|
416
|
-
*
|
417
|
-
* * Get the list of valid directions for a given coordinate.
|
418
|
-
*
|
471
|
+
* Get the list of valid directions for a given coordinate.
|
419
472
|
* @param {number} x
|
420
473
|
* @param {number} y
|
421
474
|
* @returns {any[]}
|
@@ -434,9 +487,7 @@ class FlowField {
|
|
434
487
|
}
|
435
488
|
}
|
436
489
|
/**
|
437
|
-
*
|
438
|
-
* * Set the list of valid directions for a given coordinate.
|
439
|
-
*
|
490
|
+
* Set the list of valid directions for a given coordinate.
|
440
491
|
* @param {number} x
|
441
492
|
* @param {number} y
|
442
493
|
* @param {any[]} directions
|
@@ -447,6 +498,7 @@ class FlowField {
|
|
447
498
|
wasm.flowfield_setDirections(this.__wbg_ptr, x, y, ptr0, len0);
|
448
499
|
}
|
449
500
|
/**
|
501
|
+
* Add a direction to the list of valid directions for a given coordinate.
|
450
502
|
* @param {number} x
|
451
503
|
* @param {number} y
|
452
504
|
* @param {Direction} direction
|
@@ -460,12 +512,10 @@ const MonoFlowFieldFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
460
512
|
? { register: () => {}, unregister: () => {} }
|
461
513
|
: new FinalizationRegistry(ptr => wasm.__wbg_monoflowfield_free(ptr >>> 0, 1));
|
462
514
|
/**
|
463
|
-
*
|
464
|
-
*
|
465
|
-
*
|
466
|
-
*
|
467
|
-
* * integer (0 for no direction, 1 for TOP, etc.).
|
468
|
-
*
|
515
|
+
* A flow field is a 50x50 grid (representing a room), representing viable directions
|
516
|
+
* to travel to reach a particular target (or targets). A mono flow field only stores
|
517
|
+
* a single direction for each tile, so we represent this as 4 bits of an unsigned
|
518
|
+
* integer (0 for no direction, 1 for TOP, etc.).
|
469
519
|
*/
|
470
520
|
class MonoFlowField {
|
471
521
|
|
@@ -489,9 +539,7 @@ class MonoFlowField {
|
|
489
539
|
wasm.__wbg_monoflowfield_free(ptr, 0);
|
490
540
|
}
|
491
541
|
/**
|
492
|
-
*
|
493
|
-
* * Get the direction for a given coordinate.
|
494
|
-
*
|
542
|
+
* Get the direction for a given coordinate.
|
495
543
|
* @param {number} x
|
496
544
|
* @param {number} y
|
497
545
|
* @returns {Direction | undefined}
|
@@ -501,9 +549,7 @@ class MonoFlowField {
|
|
501
549
|
return ret === 0 ? undefined : ret;
|
502
550
|
}
|
503
551
|
/**
|
504
|
-
*
|
505
|
-
* * Set the direction for a given coordinate.
|
506
|
-
*
|
552
|
+
* Set the direction for a given coordinate.
|
507
553
|
* @param {number} x
|
508
554
|
* @param {number} y
|
509
555
|
* @param {Direction | undefined} [value]
|
@@ -591,23 +637,133 @@ function initSync(module) {
|
|
591
637
|
return __wbg_finalize_init(instance);
|
592
638
|
}
|
593
639
|
|
640
|
+
/**
|
641
|
+
* Generate a [distance map](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions
|
642
|
+
* using a breadth-first search algorithm.
|
643
|
+
*
|
644
|
+
* The BFS algorithm doesn't include variable costs, and only considers
|
645
|
+
* values of 255 (impassible) in the provided cost matrix. Any other
|
646
|
+
* values are ignored.
|
647
|
+
*
|
648
|
+
* This might be useful for creeps with only MOVE parts and/or empty
|
649
|
+
* CARRY parts, which don't generate fatigue.
|
650
|
+
*
|
651
|
+
* @param start - The starting positions.
|
652
|
+
* @param costMatrix - The cost matrix to use for the flow field.
|
653
|
+
* @returns The flow field.
|
654
|
+
*/
|
594
655
|
function bfsDistanceMap(start, costMatrix) {
|
595
656
|
const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));
|
596
657
|
const result = js_bfs_distance_map(startPacked, costMatrix);
|
597
658
|
return result;
|
598
659
|
}
|
599
660
|
|
661
|
+
/**
|
662
|
+
* Generate a [flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions
|
663
|
+
* using a breadth-first search algorithm.
|
664
|
+
*
|
665
|
+
* The BFS algorithm doesn't include variable costs, and only considers
|
666
|
+
* values of 255 (impassible) in the provided cost matrix. Any other
|
667
|
+
* values are ignored.
|
668
|
+
*
|
669
|
+
* This might be useful for creeps with only MOVE parts and/or empty
|
670
|
+
* CARRY parts, which don't generate fatigue.
|
671
|
+
*
|
672
|
+
* @param start - The starting positions.
|
673
|
+
* @param costMatrix - The cost matrix to use for the flow field.
|
674
|
+
* @returns The flow field.
|
675
|
+
*/
|
600
676
|
function bfsFlowField(start, costMatrix) {
|
601
677
|
const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));
|
602
678
|
const result = js_bfs_flow_field(startPacked, costMatrix);
|
603
679
|
return result;
|
604
680
|
}
|
681
|
+
/**
|
682
|
+
* Generate a [mono-directional flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html)
|
683
|
+
* for a set of positions using a breadth-first search algorithm.
|
684
|
+
*
|
685
|
+
* The BFS algorithm doesn't include variable costs, and only considers
|
686
|
+
* values of 255 (impassible) in the provided cost matrix. Any other
|
687
|
+
* values are ignored.
|
688
|
+
*
|
689
|
+
* This might be useful for creeps with only MOVE parts and/or empty
|
690
|
+
* CARRY parts, which don't generate fatigue.
|
691
|
+
*
|
692
|
+
* @param start - The starting positions.
|
693
|
+
* @param costMatrix - The cost matrix to use for the flow field.
|
694
|
+
* @returns The flow field.
|
695
|
+
*/
|
605
696
|
function bfsMonoFlowField(start, costMatrix) {
|
606
697
|
const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));
|
607
698
|
const result = js_bfs_mono_flow_field(startPacked, costMatrix);
|
608
699
|
return result;
|
609
700
|
}
|
610
701
|
|
702
|
+
/**
|
703
|
+
* Generate a [distance map](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions
|
704
|
+
* using Dijkstra's algorithm.
|
705
|
+
*
|
706
|
+
* Dijkstra's algorithm includes variable costs to account for terrain or other cost functions.
|
707
|
+
*
|
708
|
+
* Note that values of 0 in the cost matrix may have unexpected behavior. You probably want
|
709
|
+
* a cost matrix with a default value of at least 1.
|
710
|
+
*
|
711
|
+
* @param start - The starting positions.
|
712
|
+
* @param costMatrix - The cost matrix to use for the flow field.
|
713
|
+
* @returns The flow field.
|
714
|
+
*/
|
715
|
+
function dijkstraDistanceMap(start, costMatrix) {
|
716
|
+
const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));
|
717
|
+
const result = js_dijkstra_distance_map(startPacked, costMatrix);
|
718
|
+
return result;
|
719
|
+
}
|
720
|
+
|
721
|
+
/**
|
722
|
+
* Generate a [flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions
|
723
|
+
* using Dijkstra's algorithm.
|
724
|
+
*
|
725
|
+
* Dijkstra's algorithm includes variable costs to account for terrain or other cost functions.
|
726
|
+
*
|
727
|
+
* Note that values of 0 in the cost matrix may have unexpected behavior. You probably want
|
728
|
+
* a cost matrix with a default value of at least 1.
|
729
|
+
*
|
730
|
+
* @param start - The starting positions.
|
731
|
+
* @param costMatrix - The cost matrix to use for the flow field.
|
732
|
+
* @returns The flow field.
|
733
|
+
*/
|
734
|
+
function dijkstraFlowField(start, costMatrix) {
|
735
|
+
const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));
|
736
|
+
const result = js_dijkstra_flow_field(startPacked, costMatrix);
|
737
|
+
return result;
|
738
|
+
}
|
739
|
+
/**
|
740
|
+
* Generate a [mono-directional flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html)
|
741
|
+
* for a set of positions using Dijkstra's algorithm.
|
742
|
+
*
|
743
|
+
* Dijkstra's algorithm includes variable costs to account for terrain or other cost functions.
|
744
|
+
*
|
745
|
+
* Note that values of 0 in the cost matrix may have unexpected behavior. You probably want
|
746
|
+
* a cost matrix with a default value of at least 1.
|
747
|
+
*
|
748
|
+
* @param start - The starting positions.
|
749
|
+
* @param costMatrix - The cost matrix to use for the flow field.
|
750
|
+
* @returns The flow field.
|
751
|
+
*/
|
752
|
+
function dijkstraMonoFlowField(start, costMatrix) {
|
753
|
+
const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));
|
754
|
+
const result = js_dijkstra_mono_flow_field(startPacked, costMatrix);
|
755
|
+
return result;
|
756
|
+
}
|
757
|
+
|
758
|
+
/**
|
759
|
+
* Get the global range between two positions. This is different
|
760
|
+
* from the `getRange` method on `RoomPosition`, which gets the
|
761
|
+
* range only within the same room.
|
762
|
+
*
|
763
|
+
* @param pos1 - The first position.
|
764
|
+
* @param pos2 - The second position.
|
765
|
+
* @returns The range between the two positions.
|
766
|
+
*/
|
611
767
|
function getRange(pos1, pos2) {
|
612
768
|
return get_range(pos1.__packedPos, pos2.__packedPos);
|
613
769
|
}
|
@@ -616,6 +772,14 @@ let wasm_bytes;
|
|
616
772
|
let wasm_module;
|
617
773
|
let wasm_instance;
|
618
774
|
let initialized = false;
|
775
|
+
/**
|
776
|
+
* The `initialize` function should be called in your main loop before
|
777
|
+
* using any other screeps-clockwork functions. Depending on available
|
778
|
+
* CPU, it may not load the WASM module completely in the first tick,
|
779
|
+
* but it will pick back up where it left off if the script times out.
|
780
|
+
*
|
781
|
+
* @param verbose - If true, will log the state of the WASM module as it loads.
|
782
|
+
*/
|
619
783
|
function initialize(verbose = false) {
|
620
784
|
if (!wasm_bytes)
|
621
785
|
wasm_bytes = require('screeps_clockwork.wasm');
|
@@ -641,6 +805,9 @@ exports.MonoFlowField = MonoFlowField;
|
|
641
805
|
exports.bfsDistanceMap = bfsDistanceMap;
|
642
806
|
exports.bfsFlowField = bfsFlowField;
|
643
807
|
exports.bfsMonoFlowField = bfsMonoFlowField;
|
808
|
+
exports.dijkstraDistanceMap = dijkstraDistanceMap;
|
809
|
+
exports.dijkstraFlowField = dijkstraFlowField;
|
810
|
+
exports.dijkstraMonoFlowField = dijkstraMonoFlowField;
|
644
811
|
exports.getRange = getRange;
|
645
812
|
exports.initialize = initialize;
|
646
813
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
@@ -1 +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,C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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;;;;;;;;;;;;"}
|
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/dijkstraDistanceMap.ts","../../src/wrappers/dijkstraFlowField.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/**\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 * Exports the global range calculation between two positions.\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\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 * WASM wrapper for the BFS flow field function.\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 * WASM wrapper for the Dijkstra mono flow field function.\n * @param {Uint32Array} start_packed\n * @param {ClockworkCostMatrix} cost_matrix\n * @returns {MonoFlowField}\n */\nexport function js_dijkstra_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_dijkstra_mono_flow_field(ptr0, len0, cost_matrix.__wbg_ptr);\n return MonoFlowField.__wrap(ret);\n}\n\n/**\n * WASM wrapper for the Dijkstra flow field function.\n * @param {Uint32Array} start_packed\n * @param {ClockworkCostMatrix} cost_matrix\n * @returns {FlowField}\n */\nexport function js_dijkstra_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_dijkstra_flow_field(ptr0, len0, cost_matrix.__wbg_ptr);\n return FlowField.__wrap(ret);\n}\n\nfunction getArrayU32FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);\n}\n/**\n * WASM wrapper for the Dijkstra distance map function.\n * @param {Uint32Array} start_packed\n * @param {ClockworkCostMatrix} cost_matrix\n * @returns {DistanceMap}\n */\nexport function js_dijkstra_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_dijkstra_distance_map(ptr0, len0, cost_matrix.__wbg_ptr);\n return DistanceMap.__wrap(ret);\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 * WASM wrapper for the BFS distance map function.\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 * WASM wrapper for the BFS mono flow field function.\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 * 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/**\n * A wrapper around the `LocalCostMatrix` type from the Screeps API.\n * Instances can be passed between WASM and JS as a pointer, using the\n * methods to get and set values, rather than copying the entire matrix.\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 /**\n * Creates a new cost matrix within the WASM module. Optionally, a default value\n * can be provided to initialize all cells in the matrix to that value.\n * @param {number | undefined} [_default]\n */\n constructor(_default) {\n const ret = wasm.clockworkcostmatrix_new(isLikeNone(_default) ? 0xFFFFFF : _default);\n this.__wbg_ptr = ret >>> 0;\n ClockworkCostMatrixFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * Gets the cost of a given position in the cost matrix.\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 * Sets the cost of a given position in the cost matrix.\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 a distance value 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 * Converts the distance map into a flat array of distances.\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 * Gets the distance value at a given position.\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 * Sets the distance value at a given position.\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 * 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 */\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 * Get the internal value for a given coordinate.\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 * Set the internal value for a given coordinate.\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 * Get the list of valid directions for a given coordinate.\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 * Set the list of valid directions for a given coordinate.\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 * Add a direction to the list of valid directions for a given coordinate.\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 * 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 */\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 * Get the direction for a given coordinate.\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 * Set the direction for a given coordinate.\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\n/**\n * Generate a [distance map](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions\n * using a breadth-first search algorithm.\n *\n * The BFS algorithm doesn't include variable costs, and only considers\n * values of 255 (impassible) in the provided cost matrix. Any other\n * values are ignored.\n *\n * This might be useful for creeps with only MOVE parts and/or empty\n * CARRY parts, which don't generate fatigue.\n *\n * @param start - The starting positions.\n * @param costMatrix - The cost matrix to use for the flow field.\n * @returns The flow field.\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\n/**\n * Generate a [flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions\n * using a breadth-first search algorithm.\n *\n * The BFS algorithm doesn't include variable costs, and only considers\n * values of 255 (impassible) in the provided cost matrix. Any other\n * values are ignored.\n *\n * This might be useful for creeps with only MOVE parts and/or empty\n * CARRY parts, which don't generate fatigue.\n *\n * @param start - The starting positions.\n * @param costMatrix - The cost matrix to use for the flow field.\n * @returns The flow field.\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\n/**\n * Generate a [mono-directional flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html)\n * for a set of positions using a breadth-first search algorithm.\n *\n * The BFS algorithm doesn't include variable costs, and only considers\n * values of 255 (impassible) in the provided cost matrix. Any other\n * values are ignored.\n *\n * This might be useful for creeps with only MOVE parts and/or empty\n * CARRY parts, which don't generate fatigue.\n *\n * @param start - The starting positions.\n * @param costMatrix - The cost matrix to use for the flow field.\n * @returns The flow field.\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 { ClockworkCostMatrix, js_dijkstra_distance_map } from '../../wasm/screeps_clockwork';\n\n/**\n * Generate a [distance map](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions\n * using Dijkstra's algorithm.\n *\n * Dijkstra's algorithm includes variable costs to account for terrain or other cost functions.\n *\n * Note that values of 0 in the cost matrix may have unexpected behavior. You probably want\n * a cost matrix with a default value of at least 1.\n *\n * @param start - The starting positions.\n * @param costMatrix - The cost matrix to use for the flow field.\n * @returns The flow field.\n */\nexport function dijkstraDistanceMap(start: RoomPosition[], costMatrix: ClockworkCostMatrix) {\n const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));\n const result = js_dijkstra_distance_map(startPacked, costMatrix);\n return result;\n}\n","import { ClockworkCostMatrix, js_dijkstra_flow_field, js_dijkstra_mono_flow_field } from '../../wasm/screeps_clockwork';\n\n/**\n * Generate a [flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions\n * using Dijkstra's algorithm.\n *\n * Dijkstra's algorithm includes variable costs to account for terrain or other cost functions.\n *\n * Note that values of 0 in the cost matrix may have unexpected behavior. You probably want\n * a cost matrix with a default value of at least 1.\n *\n * @param start - The starting positions.\n * @param costMatrix - The cost matrix to use for the flow field.\n * @returns The flow field.\n */\nexport function dijkstraFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix) {\n const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));\n const result = js_dijkstra_flow_field(startPacked, costMatrix);\n return result;\n}\n\n/**\n * Generate a [mono-directional flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html)\n * for a set of positions using Dijkstra's algorithm.\n *\n * Dijkstra's algorithm includes variable costs to account for terrain or other cost functions.\n *\n * Note that values of 0 in the cost matrix may have unexpected behavior. You probably want\n * a cost matrix with a default value of at least 1.\n *\n * @param start - The starting positions.\n * @param costMatrix - The cost matrix to use for the flow field.\n * @returns The flow field.\n */\nexport function dijkstraMonoFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix) {\n const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));\n const result = js_dijkstra_mono_flow_field(startPacked, costMatrix);\n return result;\n}\n","import { get_range } from '../../wasm';\n\n/**\n * Get the global range between two positions. This is different\n * from the `getRange` method on `RoomPosition`, which gets the\n * range only within the same room.\n *\n * @param pos1 - The first position.\n * @param pos2 - The second position.\n * @returns The range between the two positions.\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/dijkstraDistanceMap';\nexport * from './wrappers/dijkstraFlowField';\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;\n/**\n * The `initialize` function should be called in your main loop before\n * using any other screeps-clockwork functions. Depending on available\n * CPU, it may not load the WASM module completely in the first tick,\n * but it will pick back up where it left off if the script times out.\n *\n * @param verbose - If true, will log the state of the WASM module as it loads.\n */\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,CAAC,KAAK,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,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OG;AACa,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;KAC7D;IACD,WAAW,GAAG,IAAI,CAAC;AACrB;;;;;;;;;;;;;;;"}
|
Binary file
|
package/dist/src/index.d.ts
CHANGED
@@ -3,5 +3,15 @@ import { ClockworkCostMatrix, DistanceMap, FlowField, MonoFlowField } from '../w
|
|
3
3
|
export { ClockworkCostMatrix, DistanceMap, FlowField, MonoFlowField };
|
4
4
|
export * from './wrappers/bfsDistanceMap';
|
5
5
|
export * from './wrappers/bfsFlowField';
|
6
|
+
export * from './wrappers/dijkstraDistanceMap';
|
7
|
+
export * from './wrappers/dijkstraFlowField';
|
6
8
|
export * from './wrappers/getRange';
|
9
|
+
/**
|
10
|
+
* The `initialize` function should be called in your main loop before
|
11
|
+
* using any other screeps-clockwork functions. Depending on available
|
12
|
+
* CPU, it may not load the WASM module completely in the first tick,
|
13
|
+
* but it will pick back up where it left off if the script times out.
|
14
|
+
*
|
15
|
+
* @param verbose - If true, will log the state of the WASM module as it loads.
|
16
|
+
*/
|
7
17
|
export declare function initialize(verbose?: boolean): void;
|
@@ -1,2 +1,17 @@
|
|
1
1
|
import { ClockworkCostMatrix } from '../../wasm';
|
2
|
+
/**
|
3
|
+
* Generate a [distance map](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions
|
4
|
+
* using a breadth-first search algorithm.
|
5
|
+
*
|
6
|
+
* The BFS algorithm doesn't include variable costs, and only considers
|
7
|
+
* values of 255 (impassible) in the provided cost matrix. Any other
|
8
|
+
* values are ignored.
|
9
|
+
*
|
10
|
+
* This might be useful for creeps with only MOVE parts and/or empty
|
11
|
+
* CARRY parts, which don't generate fatigue.
|
12
|
+
*
|
13
|
+
* @param start - The starting positions.
|
14
|
+
* @param costMatrix - The cost matrix to use for the flow field.
|
15
|
+
* @returns The flow field.
|
16
|
+
*/
|
2
17
|
export declare function bfsDistanceMap(start: RoomPosition[], costMatrix: ClockworkCostMatrix): import("../../wasm").DistanceMap;
|
@@ -1,3 +1,33 @@
|
|
1
1
|
import { ClockworkCostMatrix } from '../../wasm';
|
2
|
+
/**
|
3
|
+
* Generate a [flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions
|
4
|
+
* using a breadth-first search algorithm.
|
5
|
+
*
|
6
|
+
* The BFS algorithm doesn't include variable costs, and only considers
|
7
|
+
* values of 255 (impassible) in the provided cost matrix. Any other
|
8
|
+
* values are ignored.
|
9
|
+
*
|
10
|
+
* This might be useful for creeps with only MOVE parts and/or empty
|
11
|
+
* CARRY parts, which don't generate fatigue.
|
12
|
+
*
|
13
|
+
* @param start - The starting positions.
|
14
|
+
* @param costMatrix - The cost matrix to use for the flow field.
|
15
|
+
* @returns The flow field.
|
16
|
+
*/
|
2
17
|
export declare function bfsFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix): import("../../wasm").FlowField;
|
18
|
+
/**
|
19
|
+
* Generate a [mono-directional flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html)
|
20
|
+
* for a set of positions using a breadth-first search algorithm.
|
21
|
+
*
|
22
|
+
* The BFS algorithm doesn't include variable costs, and only considers
|
23
|
+
* values of 255 (impassible) in the provided cost matrix. Any other
|
24
|
+
* values are ignored.
|
25
|
+
*
|
26
|
+
* This might be useful for creeps with only MOVE parts and/or empty
|
27
|
+
* CARRY parts, which don't generate fatigue.
|
28
|
+
*
|
29
|
+
* @param start - The starting positions.
|
30
|
+
* @param costMatrix - The cost matrix to use for the flow field.
|
31
|
+
* @returns The flow field.
|
32
|
+
*/
|
3
33
|
export declare function bfsMonoFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix): import("../../wasm").MonoFlowField;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { ClockworkCostMatrix } from '../../wasm/screeps_clockwork';
|
2
|
+
/**
|
3
|
+
* Generate a [distance map](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions
|
4
|
+
* using Dijkstra's algorithm.
|
5
|
+
*
|
6
|
+
* Dijkstra's algorithm includes variable costs to account for terrain or other cost functions.
|
7
|
+
*
|
8
|
+
* Note that values of 0 in the cost matrix may have unexpected behavior. You probably want
|
9
|
+
* a cost matrix with a default value of at least 1.
|
10
|
+
*
|
11
|
+
* @param start - The starting positions.
|
12
|
+
* @param costMatrix - The cost matrix to use for the flow field.
|
13
|
+
* @returns The flow field.
|
14
|
+
*/
|
15
|
+
export declare function dijkstraDistanceMap(start: RoomPosition[], costMatrix: ClockworkCostMatrix): import("../../wasm/screeps_clockwork").DistanceMap;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { ClockworkCostMatrix } from '../../wasm/screeps_clockwork';
|
2
|
+
/**
|
3
|
+
* Generate a [flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions
|
4
|
+
* using Dijkstra's algorithm.
|
5
|
+
*
|
6
|
+
* Dijkstra's algorithm includes variable costs to account for terrain or other cost functions.
|
7
|
+
*
|
8
|
+
* Note that values of 0 in the cost matrix may have unexpected behavior. You probably want
|
9
|
+
* a cost matrix with a default value of at least 1.
|
10
|
+
*
|
11
|
+
* @param start - The starting positions.
|
12
|
+
* @param costMatrix - The cost matrix to use for the flow field.
|
13
|
+
* @returns The flow field.
|
14
|
+
*/
|
15
|
+
export declare function dijkstraFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix): import("../../wasm/screeps_clockwork").FlowField;
|
16
|
+
/**
|
17
|
+
* Generate a [mono-directional flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html)
|
18
|
+
* for a set of positions using Dijkstra's algorithm.
|
19
|
+
*
|
20
|
+
* Dijkstra's algorithm includes variable costs to account for terrain or other cost functions.
|
21
|
+
*
|
22
|
+
* Note that values of 0 in the cost matrix may have unexpected behavior. You probably want
|
23
|
+
* a cost matrix with a default value of at least 1.
|
24
|
+
*
|
25
|
+
* @param start - The starting positions.
|
26
|
+
* @param costMatrix - The cost matrix to use for the flow field.
|
27
|
+
* @returns The flow field.
|
28
|
+
*/
|
29
|
+
export declare function dijkstraMonoFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix): import("../../wasm/screeps_clockwork").MonoFlowField;
|
@@ -1 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* Get the global range between two positions. This is different
|
3
|
+
* from the `getRange` method on `RoomPosition`, which gets the
|
4
|
+
* range only within the same room.
|
5
|
+
*
|
6
|
+
* @param pos1 - The first position.
|
7
|
+
* @param pos2 - The second position.
|
8
|
+
* @returns The range between the two positions.
|
9
|
+
*/
|
1
10
|
export declare function getRange(pos1: RoomPosition, pos2: RoomPosition): number;
|
package/package.json
CHANGED
@@ -1,62 +1,64 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
"
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
"
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
"
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
"
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
"
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
"
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
"
|
60
|
-
|
61
|
-
|
2
|
+
"name": "screeps-clockwork",
|
3
|
+
"version": "0.2.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
|
+
"build:docs": "typedoc",
|
12
|
+
"watch": "run-s build watch:both",
|
13
|
+
"watch:lib": "cargo-watch -w lib -s \"npm run build:lib\"",
|
14
|
+
"watch:src": "wait-on wasm/screeps_clockwork_bg.wasm && rollup -cw",
|
15
|
+
"watch:pserver": "rollup -cw --environment DEST:pserver",
|
16
|
+
"watch:both": "run-p watch:lib watch:pserver"
|
17
|
+
},
|
18
|
+
"repository": {
|
19
|
+
"type": "git",
|
20
|
+
"url": "git+https://github.com/glitchassassin/screeps-clockwork.git"
|
21
|
+
},
|
22
|
+
"keywords": [
|
23
|
+
"typescript",
|
24
|
+
"screeps",
|
25
|
+
"wasm",
|
26
|
+
"pathfinding"
|
27
|
+
],
|
28
|
+
"author": "Jon Winsley <jon.winsley@gmail.com>",
|
29
|
+
"license": "SEE LICENSE IN LICENSE",
|
30
|
+
"bugs": {
|
31
|
+
"url": "https://github.com/glitchassassin/screeps-clockwork/issues"
|
32
|
+
},
|
33
|
+
"homepage": "https://github.com/glitchassassin/screeps-clockwork#readme",
|
34
|
+
"devDependencies": {
|
35
|
+
"@rollup/plugin-commonjs": "^28.0.1",
|
36
|
+
"@rollup/plugin-node-resolve": "^15.1.0",
|
37
|
+
"@rollup/plugin-typescript": "^12.1.1",
|
38
|
+
"@rollup/plugin-wasm": "^6.2.2",
|
39
|
+
"@types/node": "^22.9.3",
|
40
|
+
"@types/screeps": "^3.3.0",
|
41
|
+
"@typescript-eslint/eslint-plugin": "^8.15.0",
|
42
|
+
"@typescript-eslint/parser": "^8.15.0",
|
43
|
+
"eslint": "^9.15.0",
|
44
|
+
"npm-run-all": "^4.1.5",
|
45
|
+
"prettier": "^3.3.3",
|
46
|
+
"rollup": "2.79.2",
|
47
|
+
"rollup-plugin-clear": "^2.0.7",
|
48
|
+
"rollup-plugin-copy": "^3.5.0",
|
49
|
+
"rollup-plugin-screeps": "^1.0.1",
|
50
|
+
"source-map": "0.6.1",
|
51
|
+
"typedoc": "^0.27.0-beta.2",
|
52
|
+
"typescript": "^5.7.2"
|
53
|
+
},
|
54
|
+
"dependencies": {
|
55
|
+
"fastestsmallesttextencoderdecoder-encodeinto": "^1.0.22"
|
56
|
+
},
|
57
|
+
"type": "module",
|
58
|
+
"files": [
|
59
|
+
"dist/**/*"
|
60
|
+
],
|
61
|
+
"publishConfig": {
|
62
|
+
"access": "public"
|
63
|
+
}
|
62
64
|
}
|