@recast-navigation/core 0.15.0 → 0.16.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.
@@ -1,6 +1,16 @@
1
1
  import { NavMesh } from './nav-mesh';
2
2
  import type R from './raw-module';
3
3
  import { Vector3 } from './utils';
4
+ export declare class QueryFilter {
5
+ raw: R.dtQueryFilter;
6
+ get includeFlags(): number;
7
+ set includeFlags(flags: number);
8
+ get excludeFlags(): number;
9
+ set excludeFlags(flags: number);
10
+ constructor(raw?: R.dtQueryFilter);
11
+ getAreaCost(i: number): number;
12
+ setAreaCost(i: number, cost: number): void;
13
+ }
4
14
  export type NavMeshQueryParams = {
5
15
  navMesh: NavMesh;
6
16
  /**
@@ -10,7 +20,7 @@ export type NavMeshQueryParams = {
10
20
  };
11
21
  export declare class NavMeshQuery {
12
22
  raw: R.NavMeshQuery;
13
- defaultFilter: R.dtQueryFilter;
23
+ defaultFilter: QueryFilter;
14
24
  defaultQueryHalfExtents: {
15
25
  x: number;
16
26
  y: number;
@@ -21,7 +31,7 @@ export declare class NavMeshQuery {
21
31
  * Finds the polygon nearest to the given position.
22
32
  */
23
33
  findNearestPoly(position: Vector3, options?: {
24
- filter?: R.dtQueryFilter;
34
+ filter?: QueryFilter;
25
35
  halfExtents?: Vector3;
26
36
  }): {
27
37
  success: boolean;
@@ -51,21 +61,21 @@ export declare class NavMeshQuery {
51
61
  * Returns the closest point on the NavMesh to the given position.
52
62
  */
53
63
  getClosestPoint(position: Vector3, options?: {
54
- filter?: R.dtQueryFilter;
64
+ filter?: QueryFilter;
55
65
  halfExtents?: Vector3;
56
66
  }): Vector3;
57
67
  /**
58
68
  * Returns a random point on the NavMesh within the given radius of the given position.
59
69
  */
60
70
  getRandomPointAround(position: Vector3, radius: number, options?: {
61
- filter?: R.dtQueryFilter;
71
+ filter?: QueryFilter;
62
72
  halfExtents?: Vector3;
63
73
  }): Vector3;
64
74
  /**
65
75
  * Moves from the start to the end position constrained to the navigation mesh.
66
76
  */
67
77
  moveAlongSurface(startRef: number, startPosition: Vector3, endPosition: Vector3, options?: {
68
- filter?: R.dtQueryFilter;
78
+ filter?: QueryFilter;
69
79
  maxVisitedSize?: number;
70
80
  }): {
71
81
  success: boolean;
@@ -91,7 +101,7 @@ export declare class NavMeshQuery {
91
101
  * @returns an array of Vector3 positions that make up the path, or an empty array if no path was found.
92
102
  */
93
103
  computePath(start: Vector3, end: Vector3, options?: {
94
- filter?: R.dtQueryFilter;
104
+ filter?: QueryFilter;
95
105
  maxPolyPathLength?: number;
96
106
  }): Vector3[];
97
107
  /**
package/dist/recast.d.ts CHANGED
@@ -11,11 +11,6 @@ export type RecastConfig = {
11
11
  /**
12
12
  * The width/height size of tile's on the xz-plane.
13
13
  * [Limit: >= 0] [Units: vx]
14
- *
15
- * If tileSize is provided, a tiled navmesh will be created.
16
- * If tileSize is not provided, or is set to zero, a solo navmesh will be created.
17
- *
18
- * To use obstacles, a tiled navmesh must be generated.
19
14
  * @default 0
20
15
  */
21
16
  tileSize: 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.15.0",
9
+ "version": "0.16.0",
10
10
  "license": "MIT",
11
11
  "homepage": "https://github.com/isaac-mason/recast-navigation-js",
12
12
  "bugs": {
@@ -24,7 +24,7 @@
24
24
  "build": "rollup --config rollup.config.js --bundleConfigAsCjs"
25
25
  },
26
26
  "dependencies": {
27
- "@recast-navigation/wasm": "0.15.0"
27
+ "@recast-navigation/wasm": "0.16.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@babel/core": "^7.22.11",