alpathfinder 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/alpathfinder.d.ts +6 -0
- package/alpathfinder.js +5 -0
- package/alpathfinder_bg.js +493 -0
- package/alpathfinder_bg.wasm +0 -0
- package/package.json +20 -0
package/README.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# ALPathfinder
|
|
2
|
+
|
|
3
|
+
A Rust/WASM Pathfinder for Adventure.Land.
|
|
4
|
+
|
|
5
|
+
This project is a work in progress. It currently doesn't work.
|
|
6
|
+
|
|
7
|
+
## Build
|
|
8
|
+
|
|
9
|
+
1. Run `wasm-pack build` to build.
|
|
10
|
+
2. Add the following lines to `package.json`:
|
|
11
|
+
|
|
12
|
+
```js
|
|
13
|
+
"main": "alpathfinder.js",
|
|
14
|
+
"type": "module",
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Use Locally
|
|
18
|
+
|
|
19
|
+
1. In the node project you want to use the pathfinder, run `npm install alpathfinder@file:../path/to/alpathfinder`.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export function prepare(g_js: any): void;
|
|
4
|
+
export function is_walkable(map_name: string, x_i: number, y_i: number): boolean;
|
|
5
|
+
export function can_walk_path(map_name: string, x1: number, y1: number, x2: number, y2: number): boolean;
|
|
6
|
+
export function get_path(map_from_name: string, x_from: number, y_from: number, map_to_name: string, x_to: number, y_to: number, speed?: number | null): any;
|
package/alpathfinder.js
ADDED
|
@@ -0,0 +1,493 @@
|
|
|
1
|
+
let wasm;
|
|
2
|
+
export function __wbg_set_wasm(val) {
|
|
3
|
+
wasm = val;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
let cachedUint8ArrayMemory0 = null;
|
|
8
|
+
|
|
9
|
+
function getUint8ArrayMemory0() {
|
|
10
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
11
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
12
|
+
}
|
|
13
|
+
return cachedUint8ArrayMemory0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
17
|
+
|
|
18
|
+
cachedTextDecoder.decode();
|
|
19
|
+
|
|
20
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
21
|
+
let numBytesDecoded = 0;
|
|
22
|
+
function decodeText(ptr, len) {
|
|
23
|
+
numBytesDecoded += len;
|
|
24
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
25
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
26
|
+
cachedTextDecoder.decode();
|
|
27
|
+
numBytesDecoded = len;
|
|
28
|
+
}
|
|
29
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function getStringFromWasm0(ptr, len) {
|
|
33
|
+
ptr = ptr >>> 0;
|
|
34
|
+
return decodeText(ptr, len);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function isLikeNone(x) {
|
|
38
|
+
return x === undefined || x === null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
let cachedDataViewMemory0 = null;
|
|
42
|
+
|
|
43
|
+
function getDataViewMemory0() {
|
|
44
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
45
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
46
|
+
}
|
|
47
|
+
return cachedDataViewMemory0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function debugString(val) {
|
|
51
|
+
// primitive types
|
|
52
|
+
const type = typeof val;
|
|
53
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
54
|
+
return `${val}`;
|
|
55
|
+
}
|
|
56
|
+
if (type == 'string') {
|
|
57
|
+
return `"${val}"`;
|
|
58
|
+
}
|
|
59
|
+
if (type == 'symbol') {
|
|
60
|
+
const description = val.description;
|
|
61
|
+
if (description == null) {
|
|
62
|
+
return 'Symbol';
|
|
63
|
+
} else {
|
|
64
|
+
return `Symbol(${description})`;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (type == 'function') {
|
|
68
|
+
const name = val.name;
|
|
69
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
70
|
+
return `Function(${name})`;
|
|
71
|
+
} else {
|
|
72
|
+
return 'Function';
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
// objects
|
|
76
|
+
if (Array.isArray(val)) {
|
|
77
|
+
const length = val.length;
|
|
78
|
+
let debug = '[';
|
|
79
|
+
if (length > 0) {
|
|
80
|
+
debug += debugString(val[0]);
|
|
81
|
+
}
|
|
82
|
+
for(let i = 1; i < length; i++) {
|
|
83
|
+
debug += ', ' + debugString(val[i]);
|
|
84
|
+
}
|
|
85
|
+
debug += ']';
|
|
86
|
+
return debug;
|
|
87
|
+
}
|
|
88
|
+
// Test for built-in
|
|
89
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
90
|
+
let className;
|
|
91
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
92
|
+
className = builtInMatches[1];
|
|
93
|
+
} else {
|
|
94
|
+
// Failed to match the standard '[object ClassName]'
|
|
95
|
+
return toString.call(val);
|
|
96
|
+
}
|
|
97
|
+
if (className == 'Object') {
|
|
98
|
+
// we're a user defined class or Object
|
|
99
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
100
|
+
// easier than looping through ownProperties of `val`.
|
|
101
|
+
try {
|
|
102
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
103
|
+
} catch (_) {
|
|
104
|
+
return 'Object';
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
// errors
|
|
108
|
+
if (val instanceof Error) {
|
|
109
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
110
|
+
}
|
|
111
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
112
|
+
return className;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
let WASM_VECTOR_LEN = 0;
|
|
116
|
+
|
|
117
|
+
const cachedTextEncoder = new TextEncoder();
|
|
118
|
+
|
|
119
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
120
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
121
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
122
|
+
view.set(buf);
|
|
123
|
+
return {
|
|
124
|
+
read: arg.length,
|
|
125
|
+
written: buf.length
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
131
|
+
|
|
132
|
+
if (realloc === undefined) {
|
|
133
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
134
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
135
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
136
|
+
WASM_VECTOR_LEN = buf.length;
|
|
137
|
+
return ptr;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
let len = arg.length;
|
|
141
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
142
|
+
|
|
143
|
+
const mem = getUint8ArrayMemory0();
|
|
144
|
+
|
|
145
|
+
let offset = 0;
|
|
146
|
+
|
|
147
|
+
for (; offset < len; offset++) {
|
|
148
|
+
const code = arg.charCodeAt(offset);
|
|
149
|
+
if (code > 0x7F) break;
|
|
150
|
+
mem[ptr + offset] = code;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (offset !== len) {
|
|
154
|
+
if (offset !== 0) {
|
|
155
|
+
arg = arg.slice(offset);
|
|
156
|
+
}
|
|
157
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
158
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
159
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
160
|
+
|
|
161
|
+
offset += ret.written;
|
|
162
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
WASM_VECTOR_LEN = offset;
|
|
166
|
+
return ptr;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
function addToExternrefTable0(obj) {
|
|
170
|
+
const idx = wasm.__externref_table_alloc();
|
|
171
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
172
|
+
return idx;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function handleError(f, args) {
|
|
176
|
+
try {
|
|
177
|
+
return f.apply(this, args);
|
|
178
|
+
} catch (e) {
|
|
179
|
+
const idx = addToExternrefTable0(e);
|
|
180
|
+
wasm.__wbindgen_exn_store(idx);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
185
|
+
ptr = ptr >>> 0;
|
|
186
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* @param {any} g_js
|
|
190
|
+
*/
|
|
191
|
+
export function prepare(g_js) {
|
|
192
|
+
wasm.prepare(g_js);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* @param {string} map_name
|
|
197
|
+
* @param {number} x_i
|
|
198
|
+
* @param {number} y_i
|
|
199
|
+
* @returns {boolean}
|
|
200
|
+
*/
|
|
201
|
+
export function is_walkable(map_name, x_i, y_i) {
|
|
202
|
+
const ptr0 = passStringToWasm0(map_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
203
|
+
const len0 = WASM_VECTOR_LEN;
|
|
204
|
+
const ret = wasm.is_walkable(ptr0, len0, x_i, y_i);
|
|
205
|
+
return ret !== 0;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* @param {string} map_name
|
|
210
|
+
* @param {number} x1
|
|
211
|
+
* @param {number} y1
|
|
212
|
+
* @param {number} x2
|
|
213
|
+
* @param {number} y2
|
|
214
|
+
* @returns {boolean}
|
|
215
|
+
*/
|
|
216
|
+
export function can_walk_path(map_name, x1, y1, x2, y2) {
|
|
217
|
+
const ptr0 = passStringToWasm0(map_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
218
|
+
const len0 = WASM_VECTOR_LEN;
|
|
219
|
+
const ret = wasm.can_walk_path(ptr0, len0, x1, y1, x2, y2);
|
|
220
|
+
return ret !== 0;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* @param {string} map_from_name
|
|
225
|
+
* @param {number} x_from
|
|
226
|
+
* @param {number} y_from
|
|
227
|
+
* @param {string} map_to_name
|
|
228
|
+
* @param {number} x_to
|
|
229
|
+
* @param {number} y_to
|
|
230
|
+
* @param {number | null} [speed]
|
|
231
|
+
* @returns {any}
|
|
232
|
+
*/
|
|
233
|
+
export function get_path(map_from_name, x_from, y_from, map_to_name, x_to, y_to, speed) {
|
|
234
|
+
const ptr0 = passStringToWasm0(map_from_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
235
|
+
const len0 = WASM_VECTOR_LEN;
|
|
236
|
+
const ptr1 = passStringToWasm0(map_to_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
237
|
+
const len1 = WASM_VECTOR_LEN;
|
|
238
|
+
const ret = wasm.get_path(ptr0, len0, x_from, y_from, ptr1, len1, x_to, y_to, isLikeNone(speed) ? 0x100000001 : Math.fround(speed));
|
|
239
|
+
return ret;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export function __wbg_Error_e83987f665cf5504(arg0, arg1) {
|
|
243
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
244
|
+
return ret;
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
export function __wbg_Number_bb48ca12f395cd08(arg0) {
|
|
248
|
+
const ret = Number(arg0);
|
|
249
|
+
return ret;
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
export function __wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd(arg0, arg1) {
|
|
253
|
+
const v = arg1;
|
|
254
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
255
|
+
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
256
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
export function __wbg___wbindgen_boolean_get_6d5a1ee65bab5f68(arg0) {
|
|
260
|
+
const v = arg0;
|
|
261
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
262
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
export function __wbg___wbindgen_debug_string_df47ffb5e35e6763(arg0, arg1) {
|
|
266
|
+
const ret = debugString(arg1);
|
|
267
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
268
|
+
const len1 = WASM_VECTOR_LEN;
|
|
269
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
270
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
export function __wbg___wbindgen_in_bb933bd9e1b3bc0f(arg0, arg1) {
|
|
274
|
+
const ret = arg0 in arg1;
|
|
275
|
+
return ret;
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
export function __wbg___wbindgen_is_bigint_cb320707dcd35f0b(arg0) {
|
|
279
|
+
const ret = typeof(arg0) === 'bigint';
|
|
280
|
+
return ret;
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
export function __wbg___wbindgen_is_function_ee8a6c5833c90377(arg0) {
|
|
284
|
+
const ret = typeof(arg0) === 'function';
|
|
285
|
+
return ret;
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
export function __wbg___wbindgen_is_object_c818261d21f283a4(arg0) {
|
|
289
|
+
const val = arg0;
|
|
290
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
291
|
+
return ret;
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
export function __wbg___wbindgen_is_undefined_2d472862bd29a478(arg0) {
|
|
295
|
+
const ret = arg0 === undefined;
|
|
296
|
+
return ret;
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
export function __wbg___wbindgen_jsval_eq_6b13ab83478b1c50(arg0, arg1) {
|
|
300
|
+
const ret = arg0 === arg1;
|
|
301
|
+
return ret;
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
export function __wbg___wbindgen_jsval_loose_eq_b664b38a2f582147(arg0, arg1) {
|
|
305
|
+
const ret = arg0 == arg1;
|
|
306
|
+
return ret;
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
export function __wbg___wbindgen_number_get_a20bf9b85341449d(arg0, arg1) {
|
|
310
|
+
const obj = arg1;
|
|
311
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
312
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
313
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
export function __wbg___wbindgen_string_get_e4f06c90489ad01b(arg0, arg1) {
|
|
317
|
+
const obj = arg1;
|
|
318
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
319
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
320
|
+
var len1 = WASM_VECTOR_LEN;
|
|
321
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
322
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
export function __wbg___wbindgen_throw_b855445ff6a94295(arg0, arg1) {
|
|
326
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
export function __wbg_call_e762c39fa8ea36bf() { return handleError(function (arg0, arg1) {
|
|
330
|
+
const ret = arg0.call(arg1);
|
|
331
|
+
return ret;
|
|
332
|
+
}, arguments) };
|
|
333
|
+
|
|
334
|
+
export function __wbg_done_2042aa2670fb1db1(arg0) {
|
|
335
|
+
const ret = arg0.done;
|
|
336
|
+
return ret;
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
export function __wbg_entries_e171b586f8f6bdbf(arg0) {
|
|
340
|
+
const ret = Object.entries(arg0);
|
|
341
|
+
return ret;
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
export function __wbg_get_7bed016f185add81(arg0, arg1) {
|
|
345
|
+
const ret = arg0[arg1 >>> 0];
|
|
346
|
+
return ret;
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
export function __wbg_get_efcb449f58ec27c2() { return handleError(function (arg0, arg1) {
|
|
350
|
+
const ret = Reflect.get(arg0, arg1);
|
|
351
|
+
return ret;
|
|
352
|
+
}, arguments) };
|
|
353
|
+
|
|
354
|
+
export function __wbg_get_with_ref_key_1dc361bd10053bfe(arg0, arg1) {
|
|
355
|
+
const ret = arg0[arg1];
|
|
356
|
+
return ret;
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
export function __wbg_instanceof_ArrayBuffer_70beb1189ca63b38(arg0) {
|
|
360
|
+
let result;
|
|
361
|
+
try {
|
|
362
|
+
result = arg0 instanceof ArrayBuffer;
|
|
363
|
+
} catch (_) {
|
|
364
|
+
result = false;
|
|
365
|
+
}
|
|
366
|
+
const ret = result;
|
|
367
|
+
return ret;
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
export function __wbg_instanceof_Map_8579b5e2ab5437c7(arg0) {
|
|
371
|
+
let result;
|
|
372
|
+
try {
|
|
373
|
+
result = arg0 instanceof Map;
|
|
374
|
+
} catch (_) {
|
|
375
|
+
result = false;
|
|
376
|
+
}
|
|
377
|
+
const ret = result;
|
|
378
|
+
return ret;
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
export function __wbg_instanceof_Uint8Array_20c8e73002f7af98(arg0) {
|
|
382
|
+
let result;
|
|
383
|
+
try {
|
|
384
|
+
result = arg0 instanceof Uint8Array;
|
|
385
|
+
} catch (_) {
|
|
386
|
+
result = false;
|
|
387
|
+
}
|
|
388
|
+
const ret = result;
|
|
389
|
+
return ret;
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
export function __wbg_isArray_96e0af9891d0945d(arg0) {
|
|
393
|
+
const ret = Array.isArray(arg0);
|
|
394
|
+
return ret;
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
export function __wbg_isSafeInteger_d216eda7911dde36(arg0) {
|
|
398
|
+
const ret = Number.isSafeInteger(arg0);
|
|
399
|
+
return ret;
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
export function __wbg_iterator_e5822695327a3c39() {
|
|
403
|
+
const ret = Symbol.iterator;
|
|
404
|
+
return ret;
|
|
405
|
+
};
|
|
406
|
+
|
|
407
|
+
export function __wbg_length_69bca3cb64fc8748(arg0) {
|
|
408
|
+
const ret = arg0.length;
|
|
409
|
+
return ret;
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
export function __wbg_length_cdd215e10d9dd507(arg0) {
|
|
413
|
+
const ret = arg0.length;
|
|
414
|
+
return ret;
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
export function __wbg_new_1acc0b6eea89d040() {
|
|
418
|
+
const ret = new Object();
|
|
419
|
+
return ret;
|
|
420
|
+
};
|
|
421
|
+
|
|
422
|
+
export function __wbg_new_5a79be3ab53b8aa5(arg0) {
|
|
423
|
+
const ret = new Uint8Array(arg0);
|
|
424
|
+
return ret;
|
|
425
|
+
};
|
|
426
|
+
|
|
427
|
+
export function __wbg_new_e17d9f43105b08be() {
|
|
428
|
+
const ret = new Array();
|
|
429
|
+
return ret;
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
export function __wbg_next_020810e0ae8ebcb0() { return handleError(function (arg0) {
|
|
433
|
+
const ret = arg0.next();
|
|
434
|
+
return ret;
|
|
435
|
+
}, arguments) };
|
|
436
|
+
|
|
437
|
+
export function __wbg_next_2c826fe5dfec6b6a(arg0) {
|
|
438
|
+
const ret = arg0.next;
|
|
439
|
+
return ret;
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
export function __wbg_prototypesetcall_2a6620b6922694b2(arg0, arg1, arg2) {
|
|
443
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
447
|
+
arg0[arg1] = arg2;
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
export function __wbg_set_c213c871859d6500(arg0, arg1, arg2) {
|
|
451
|
+
arg0[arg1 >>> 0] = arg2;
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
export function __wbg_value_692627309814bb8c(arg0) {
|
|
455
|
+
const ret = arg0.value;
|
|
456
|
+
return ret;
|
|
457
|
+
};
|
|
458
|
+
|
|
459
|
+
export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
|
|
460
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
461
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
462
|
+
return ret;
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
export function __wbindgen_cast_4625c577ab2ec9ee(arg0) {
|
|
466
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
467
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
468
|
+
return ret;
|
|
469
|
+
};
|
|
470
|
+
|
|
471
|
+
export function __wbindgen_cast_9ae0607507abb057(arg0) {
|
|
472
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
473
|
+
const ret = arg0;
|
|
474
|
+
return ret;
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
|
|
478
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
479
|
+
const ret = arg0;
|
|
480
|
+
return ret;
|
|
481
|
+
};
|
|
482
|
+
|
|
483
|
+
export function __wbindgen_init_externref_table() {
|
|
484
|
+
const table = wasm.__wbindgen_externrefs;
|
|
485
|
+
const offset = table.grow(4);
|
|
486
|
+
table.set(0, undefined);
|
|
487
|
+
table.set(offset + 0, undefined);
|
|
488
|
+
table.set(offset + 1, null);
|
|
489
|
+
table.set(offset + 2, true);
|
|
490
|
+
table.set(offset + 3, false);
|
|
491
|
+
;
|
|
492
|
+
};
|
|
493
|
+
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "alpathfinder",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"collaborators": [
|
|
5
|
+
"Kent Rasmussen <hyprkookeez@gmail.com>"
|
|
6
|
+
],
|
|
7
|
+
"version": "0.2.0",
|
|
8
|
+
"files": [
|
|
9
|
+
"alpathfinder_bg.wasm",
|
|
10
|
+
"alpathfinder.js",
|
|
11
|
+
"alpathfinder_bg.js",
|
|
12
|
+
"alpathfinder.d.ts"
|
|
13
|
+
],
|
|
14
|
+
"main": "alpathfinder.js",
|
|
15
|
+
"types": "alpathfinder.d.ts",
|
|
16
|
+
"sideEffects": [
|
|
17
|
+
"./alpathfinder.js",
|
|
18
|
+
"./snippets/*"
|
|
19
|
+
]
|
|
20
|
+
}
|