@recast-navigation/core 0.17.0 → 0.18.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.
@@ -44,6 +44,35 @@ export declare class NavMeshQuery {
44
44
  };
45
45
  isOverPoly: boolean;
46
46
  };
47
+ /**
48
+ * Finds the polygons along the navigation graph that touch the specified circle.
49
+ * @param startRef Reference of polygon to start search from
50
+ * @param centerPos Center of circle
51
+ * @param radius Radius of circle
52
+ * @param filter The polygon filter to apply to the query
53
+ * @param maxResult The maximum number of polygons the result arrays can hold
54
+ */
55
+ findPolysAroundCircle(startRef: number, centerPos: Vector3, radius: number, filter?: QueryFilter, maxResult?: number): {
56
+ success: boolean;
57
+ status: number;
58
+ resultRefs: number[];
59
+ resultParents: number[];
60
+ resultCost: number;
61
+ resultCount: number;
62
+ };
63
+ /**
64
+ * Finds polygons that overlap the search box.
65
+ * @param center The center of the search box
66
+ * @param halfExtents The search distance along each axis
67
+ * @param filter The polygon filter to apply to the query
68
+ * @param maxPolys The maximum number of polygons the search result can hold
69
+ */
70
+ queryPolygons(center: Vector3, halfExtents: Vector3, filter?: QueryFilter, maxPolys?: number): {
71
+ success: boolean;
72
+ status: number;
73
+ polyRefs: number[];
74
+ polyCount: number;
75
+ };
47
76
  /**
48
77
  * Returns the closest point on the given polygon to the given position.
49
78
  */
package/dist/utils.d.ts CHANGED
@@ -25,3 +25,8 @@ export declare const vec3: {
25
25
  toArray: ({ x, y, z }: Vector3) => Vector3Tuple;
26
26
  };
27
27
  export declare const array: <T>(getter: (index: number) => T, count: number) => T[];
28
+ /**
29
+ * @param n A non-negative integer
30
+ * @returns Array `[0, ..., n-1]`
31
+ */
32
+ export declare const range: (n: number) => number[];
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "email": "isaac@isaacmason.com",
7
7
  "url": "https://isaacmason.com/"
8
8
  },
9
- "version": "0.17.0",
9
+ "version": "0.18.1",
10
10
  "license": "MIT",
11
11
  "homepage": "https://github.com/isaac-mason/recast-navigation-js",
12
12
  "bugs": {
@@ -26,11 +26,11 @@
26
26
  "lint": "eslint --ext .ts src"
27
27
  },
28
28
  "dependencies": {
29
- "@recast-navigation/wasm": "0.17.0"
29
+ "@recast-navigation/wasm": "0.18.1"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@babel/core": "^7.23.9",
33
- "@isaac-mason/eslint-config-typescript": "^0.0.3",
33
+ "@isaac-mason/eslint-config-typescript": "^0.0.5",
34
34
  "@rollup/plugin-commonjs": "^25.0.7",
35
35
  "@rollup/plugin-node-resolve": "^15.0.1",
36
36
  "@rollup/plugin-terser": "^0.4.3",
@@ -42,7 +42,7 @@
42
42
  "rollup": "^4.9.2",
43
43
  "rollup-plugin-copy": "^3.4.0",
44
44
  "rollup-plugin-filesize": "^10.0.0",
45
- "typescript": "^5.3.2"
45
+ "typescript": "^5.4.3"
46
46
  },
47
47
  "packageManager": "yarn@3.2.1"
48
48
  }