alpathfinder 0.2.3 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- export function canWalkPath(map_name: string, x1: number, y1: number, x2: number, y2: number): boolean;
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;
4
4
  export function prepare(g_js: any): void;
5
5
  export function isWalkable(map_name: string, x_i: number, y_i: number): boolean;
6
- 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;
6
+ export function canWalkPath(map_name: string, x1: number, y1: number, x2: number, y2: number): boolean;
@@ -186,18 +186,22 @@ function getArrayU8FromWasm0(ptr, len) {
186
186
  return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
187
187
  }
188
188
  /**
189
- * @param {string} map_name
190
- * @param {number} x1
191
- * @param {number} y1
192
- * @param {number} x2
193
- * @param {number} y2
194
- * @returns {boolean}
189
+ * @param {string} map_from_name
190
+ * @param {number} x_from
191
+ * @param {number} y_from
192
+ * @param {string} map_to_name
193
+ * @param {number} x_to
194
+ * @param {number} y_to
195
+ * @param {number | null} [speed]
196
+ * @returns {any}
195
197
  */
196
- export function canWalkPath(map_name, x1, y1, x2, y2) {
197
- const ptr0 = passStringToWasm0(map_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
198
+ export function getPath(map_from_name, x_from, y_from, map_to_name, x_to, y_to, speed) {
199
+ const ptr0 = passStringToWasm0(map_from_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
198
200
  const len0 = WASM_VECTOR_LEN;
199
- const ret = wasm.canWalkPath(ptr0, len0, x1, y1, x2, y2);
200
- return ret !== 0;
201
+ const ptr1 = passStringToWasm0(map_to_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
202
+ const len1 = WASM_VECTOR_LEN;
203
+ const ret = wasm.getPath(ptr0, len0, x_from, y_from, ptr1, len1, x_to, y_to, isLikeNone(speed) ? 0x100000001 : Math.fround(speed));
204
+ return ret;
201
205
  }
202
206
 
203
207
  /**
@@ -221,22 +225,18 @@ export function isWalkable(map_name, x_i, y_i) {
221
225
  }
222
226
 
223
227
  /**
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}
228
+ * @param {string} map_name
229
+ * @param {number} x1
230
+ * @param {number} y1
231
+ * @param {number} x2
232
+ * @param {number} y2
233
+ * @returns {boolean}
232
234
  */
233
- export function getPath(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
+ export function canWalkPath(map_name, x1, y1, x2, y2) {
236
+ const ptr0 = passStringToWasm0(map_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
235
237
  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.getPath(ptr0, len0, x_from, y_from, ptr1, len1, x_to, y_to, isLikeNone(speed) ? 0x100000001 : Math.fround(speed));
239
- return ret;
238
+ const ret = wasm.canWalkPath(ptr0, len0, x1, y1, x2, y2);
239
+ return ret !== 0;
240
240
  }
241
241
 
242
242
  export function __wbg_Error_e83987f665cf5504(arg0, arg1) {
@@ -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;
Binary file
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "collaborators": [
5
5
  "Kent Rasmussen <hyprkookeez@gmail.com>"
6
6
  ],
7
- "version": "0.2.3",
7
+ "version": "0.2.5",
8
8
  "files": [
9
9
  "alpathfinder_bg.wasm",
10
10
  "alpathfinder.js",