@recast-navigation/core 0.13.2 → 0.14.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/dist/crowd.d.ts CHANGED
@@ -2,22 +2,6 @@ import type { NavMesh } from './nav-mesh';
2
2
  import { NavMeshQuery } from './nav-mesh-query';
3
3
  import type R from './raw-module';
4
4
  import { Vector3 } from './utils';
5
- export type CrowdParams = {
6
- /**
7
- * The maximum number of agents that can be managed by the crowd.
8
- * [Limit: >= 1]
9
- */
10
- maxAgents: number;
11
- /**
12
- * The maximum radius of any agent that will be added to the crowd.
13
- * [Limit: > 0]
14
- */
15
- maxAgentRadius: number;
16
- /**
17
- * The navigation mesh to use for planning.
18
- */
19
- navMesh: NavMesh;
20
- };
21
5
  export type CrowdAgentParams = {
22
6
  /**
23
7
  * The radius of the agent.
@@ -80,10 +64,32 @@ export type CrowdAgentParams = {
80
64
  userData: unknown;
81
65
  };
82
66
  export declare const crowdAgentParamsDefaults: CrowdAgentParams;
83
- export declare class CrowdAgent {
67
+ export declare class CrowdAgent implements CrowdAgentParams {
84
68
  crowd: Crowd;
85
69
  agentIndex: number;
86
70
  raw: R.dtCrowdAgent;
71
+ get radius(): number;
72
+ set radius(value: number);
73
+ get height(): number;
74
+ set height(value: number);
75
+ get maxAcceleration(): number;
76
+ set maxAcceleration(value: number);
77
+ get maxSpeed(): number;
78
+ set maxSpeed(value: number);
79
+ get collisionQueryRange(): number;
80
+ set collisionQueryRange(value: number);
81
+ get pathOptimizationRange(): number;
82
+ set pathOptimizationRange(value: number);
83
+ get separationWeight(): number;
84
+ set separationWeight(value: number);
85
+ get updateFlags(): number;
86
+ set updateFlags(value: number);
87
+ get obstacleAvoidanceType(): number;
88
+ set obstacleAvoidanceType(value: number);
89
+ get queryFilterType(): number;
90
+ set queryFilterType(value: number);
91
+ get userData(): unknown;
92
+ set userData(value: unknown);
87
93
  constructor(crowd: Crowd, agentIndex: number);
88
94
  /**
89
95
  * Updates the agent's target.
@@ -146,6 +152,33 @@ export declare class CrowdAgent {
146
152
  */
147
153
  setParameters(crowdAgentParams: CrowdAgentParams): void;
148
154
  }
155
+ export declare class QueryFilter {
156
+ raw: R.dtQueryFilter;
157
+ index: number;
158
+ get includeFlags(): number;
159
+ set includeFlags(flags: number);
160
+ get excludeFlags(): number;
161
+ set excludeFlags(flags: number);
162
+ constructor(raw: R.dtQueryFilter, index: number);
163
+ getAreaCost(i: number): number;
164
+ setAreaCost(i: number, cost: number): void;
165
+ }
166
+ export type CrowdParams = {
167
+ /**
168
+ * The maximum number of agents that can be managed by the crowd.
169
+ * [Limit: >= 1]
170
+ */
171
+ maxAgents: number;
172
+ /**
173
+ * The maximum radius of any agent that will be added to the crowd.
174
+ * [Limit: > 0]
175
+ */
176
+ maxAgentRadius: number;
177
+ /**
178
+ * The navigation mesh to use for planning.
179
+ */
180
+ navMesh: NavMesh;
181
+ };
149
182
  export declare class Crowd {
150
183
  raw: R.dtCrowd;
151
184
  /**
@@ -186,7 +219,7 @@ export declare class Crowd {
186
219
  */
187
220
  addAgent(position: Vector3, crowdAgentParams: Partial<CrowdAgentParams>): CrowdAgent;
188
221
  /**
189
- * Gets the agent with the specified index, or null if no agent has the given index.
222
+ * Gets the agent for the specified index, or null if no agent has the given index.
190
223
  * @param agentIndex
191
224
  * @returns
192
225
  */
@@ -207,5 +240,14 @@ export declare class Crowd {
207
240
  * Returns all the agents managed by the crowd.
208
241
  */
209
242
  getAgents(): CrowdAgent[];
243
+ /**
244
+ * Gets the query filter for the specified index.
245
+ * @param filterIndex the index of the query filter to retrieve, (min 0, max 15)
246
+ * @returns the query filter
247
+ */
248
+ getFilter(filterIndex: number): QueryFilter;
249
+ /**
250
+ * Destroys the crowd.
251
+ */
210
252
  destroy(): void;
211
253
  }