alpathfinder 0.2.9 → 0.3.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/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
|
|
|
@@ -229,17 +219,27 @@ export function getPath(map_from_name, x_from, y_from, map_to_name, x_to, y_to,
|
|
|
229
219
|
|
|
230
220
|
/**
|
|
231
221
|
* @param {string} map_name
|
|
232
|
-
* @param {number}
|
|
233
|
-
* @param {number}
|
|
222
|
+
* @param {number} x1
|
|
223
|
+
* @param {number} y1
|
|
224
|
+
* @param {number} x2
|
|
225
|
+
* @param {number} y2
|
|
234
226
|
* @returns {boolean}
|
|
235
227
|
*/
|
|
236
|
-
export function
|
|
228
|
+
export function canWalkPath(map_name, x1, y1, x2, y2) {
|
|
237
229
|
const ptr0 = passStringToWasm0(map_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
238
230
|
const len0 = WASM_VECTOR_LEN;
|
|
239
|
-
const ret = wasm.
|
|
231
|
+
const ret = wasm.canWalkPath(ptr0, len0, x1, y1, x2, y2);
|
|
240
232
|
return ret !== 0;
|
|
241
233
|
}
|
|
242
234
|
|
|
235
|
+
/**
|
|
236
|
+
* @param {any} g_js
|
|
237
|
+
* @param {any | null} [exclude_maps]
|
|
238
|
+
*/
|
|
239
|
+
export function prepare(g_js, exclude_maps) {
|
|
240
|
+
wasm.prepare(g_js, isLikeNone(exclude_maps) ? 0 : addToExternrefTable0(exclude_maps));
|
|
241
|
+
}
|
|
242
|
+
|
|
243
243
|
export function __wbg_Error_e83987f665cf5504(arg0, arg1) {
|
|
244
244
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
245
245
|
return ret;
|
package/alpathfinder_bg.wasm
CHANGED
|
Binary file
|