alpathfinder 0.2.4 → 0.2.5
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/alpathfinder.d.ts +2 -2
- package/alpathfinder_bg.js +21 -17
- package/alpathfinder_bg.wasm +0 -0
- package/package.json +1 -1
package/alpathfinder.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export function prepare(g_js: any): void;
|
|
4
3
|
export function getPath(map_from_name: string, x_from: number, y_from: number, map_to_name: string, x_to: number, y_to: number, speed?: number | null): any;
|
|
5
|
-
export function
|
|
4
|
+
export function prepare(g_js: any): void;
|
|
6
5
|
export function isWalkable(map_name: string, x_i: number, y_i: number): boolean;
|
|
6
|
+
export function canWalkPath(map_name: string, x1: number, y1: number, x2: number, y2: number): boolean;
|
package/alpathfinder_bg.js
CHANGED
|
@@ -185,13 +185,6 @@ function getArrayU8FromWasm0(ptr, len) {
|
|
|
185
185
|
ptr = ptr >>> 0;
|
|
186
186
|
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
187
187
|
}
|
|
188
|
-
/**
|
|
189
|
-
* @param {any} g_js
|
|
190
|
-
*/
|
|
191
|
-
export function prepare(g_js) {
|
|
192
|
-
wasm.prepare(g_js);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
188
|
/**
|
|
196
189
|
* @param {string} map_from_name
|
|
197
190
|
* @param {number} x_from
|
|
@@ -211,31 +204,38 @@ export function getPath(map_from_name, x_from, y_from, map_to_name, x_to, y_to,
|
|
|
211
204
|
return ret;
|
|
212
205
|
}
|
|
213
206
|
|
|
207
|
+
/**
|
|
208
|
+
* @param {any} g_js
|
|
209
|
+
*/
|
|
210
|
+
export function prepare(g_js) {
|
|
211
|
+
wasm.prepare(g_js);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
214
|
/**
|
|
215
215
|
* @param {string} map_name
|
|
216
|
-
* @param {number}
|
|
217
|
-
* @param {number}
|
|
218
|
-
* @param {number} x2
|
|
219
|
-
* @param {number} y2
|
|
216
|
+
* @param {number} x_i
|
|
217
|
+
* @param {number} y_i
|
|
220
218
|
* @returns {boolean}
|
|
221
219
|
*/
|
|
222
|
-
export function
|
|
220
|
+
export function isWalkable(map_name, x_i, y_i) {
|
|
223
221
|
const ptr0 = passStringToWasm0(map_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
224
222
|
const len0 = WASM_VECTOR_LEN;
|
|
225
|
-
const ret = wasm.
|
|
223
|
+
const ret = wasm.isWalkable(ptr0, len0, x_i, y_i);
|
|
226
224
|
return ret !== 0;
|
|
227
225
|
}
|
|
228
226
|
|
|
229
227
|
/**
|
|
230
228
|
* @param {string} map_name
|
|
231
|
-
* @param {number}
|
|
232
|
-
* @param {number}
|
|
229
|
+
* @param {number} x1
|
|
230
|
+
* @param {number} y1
|
|
231
|
+
* @param {number} x2
|
|
232
|
+
* @param {number} y2
|
|
233
233
|
* @returns {boolean}
|
|
234
234
|
*/
|
|
235
|
-
export function
|
|
235
|
+
export function canWalkPath(map_name, x1, y1, x2, y2) {
|
|
236
236
|
const ptr0 = passStringToWasm0(map_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
237
237
|
const len0 = WASM_VECTOR_LEN;
|
|
238
|
-
const ret = wasm.
|
|
238
|
+
const ret = wasm.canWalkPath(ptr0, len0, x1, y1, x2, y2);
|
|
239
239
|
return ret !== 0;
|
|
240
240
|
}
|
|
241
241
|
|
|
@@ -414,6 +414,10 @@ export function __wbg_length_cdd215e10d9dd507(arg0) {
|
|
|
414
414
|
return ret;
|
|
415
415
|
};
|
|
416
416
|
|
|
417
|
+
export function __wbg_log_334eac40d047e8ec(arg0, arg1) {
|
|
418
|
+
console.log(getStringFromWasm0(arg0, arg1));
|
|
419
|
+
};
|
|
420
|
+
|
|
417
421
|
export function __wbg_new_1acc0b6eea89d040() {
|
|
418
422
|
const ret = new Object();
|
|
419
423
|
return ret;
|
package/alpathfinder_bg.wasm
CHANGED
|
Binary file
|