alpathfinder 0.2.9 → 0.3.1
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 +1 -1
- package/alpathfinder_bg.js +18 -18
- package/alpathfinder_bg.wasm +0 -0
- package/package.json +1 -1
package/alpathfinder.d.ts
CHANGED
package/alpathfinder_bg.js
CHANGED
|
@@ -185,26 +185,16 @@ 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
|
-
* @param {any | null} [exclude_maps]
|
|
191
|
-
*/
|
|
192
|
-
export function prepare(g_js, exclude_maps) {
|
|
193
|
-
wasm.prepare(g_js, isLikeNone(exclude_maps) ? 0 : addToExternrefTable0(exclude_maps));
|
|
194
|
-
}
|
|
195
|
-
|
|
196
188
|
/**
|
|
197
189
|
* @param {string} map_name
|
|
198
|
-
* @param {number}
|
|
199
|
-
* @param {number}
|
|
200
|
-
* @param {number} x2
|
|
201
|
-
* @param {number} y2
|
|
190
|
+
* @param {number} x_i
|
|
191
|
+
* @param {number} y_i
|
|
202
192
|
* @returns {boolean}
|
|
203
193
|
*/
|
|
204
|
-
export function
|
|
194
|
+
export function isWalkable(map_name, x_i, y_i) {
|
|
205
195
|
const ptr0 = passStringToWasm0(map_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
206
196
|
const len0 = WASM_VECTOR_LEN;
|
|
207
|
-
const ret = wasm.
|
|
197
|
+
const ret = wasm.isWalkable(ptr0, len0, x_i, y_i);
|
|
208
198
|
return ret !== 0;
|
|
209
199
|
}
|
|
210
200
|
|
|
@@ -227,16 +217,26 @@ export function getPath(map_from_name, x_from, y_from, map_to_name, x_to, y_to,
|
|
|
227
217
|
return ret;
|
|
228
218
|
}
|
|
229
219
|
|
|
220
|
+
/**
|
|
221
|
+
* @param {any} g_js
|
|
222
|
+
* @param {any | null} [exclude_maps]
|
|
223
|
+
*/
|
|
224
|
+
export function prepare(g_js, exclude_maps) {
|
|
225
|
+
wasm.prepare(g_js, isLikeNone(exclude_maps) ? 0 : addToExternrefTable0(exclude_maps));
|
|
226
|
+
}
|
|
227
|
+
|
|
230
228
|
/**
|
|
231
229
|
* @param {string} map_name
|
|
232
|
-
* @param {number}
|
|
233
|
-
* @param {number}
|
|
230
|
+
* @param {number} x1
|
|
231
|
+
* @param {number} y1
|
|
232
|
+
* @param {number} x2
|
|
233
|
+
* @param {number} y2
|
|
234
234
|
* @returns {boolean}
|
|
235
235
|
*/
|
|
236
|
-
export function
|
|
236
|
+
export function canWalkPath(map_name, x1, y1, x2, y2) {
|
|
237
237
|
const ptr0 = passStringToWasm0(map_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
238
238
|
const len0 = WASM_VECTOR_LEN;
|
|
239
|
-
const ret = wasm.
|
|
239
|
+
const ret = wasm.canWalkPath(ptr0, len0, x1, y1, x2, y2);
|
|
240
240
|
return ret !== 0;
|
|
241
241
|
}
|
|
242
242
|
|
package/alpathfinder_bg.wasm
CHANGED
|
Binary file
|