@recast-navigation/core 0.0.0-canary-20261030-064e4acc

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright © 2025 Isaac Mason
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @recast-navigation/core
2
+
3
+ This package contains the the core functionality for `recast-navigation`. Please refer to the [main package's README](https://github.com/isaac-mason/recast-navigation-js/tree/main/packages/recast-navigation/README.md) for usage information.
@@ -0,0 +1,86 @@
1
+ import { type RawModule } from './raw';
2
+ declare abstract class BaseArray<RawType extends RawModule.IntArray | RawModule.UnsignedIntArray | RawModule.UnsignedCharArray | RawModule.UnsignedShortArray | RawModule.FloatArray, TypedArrayType extends Int32Array | Uint32Array | Uint8Array | Uint16Array | Float32Array> {
3
+ raw: RawType;
4
+ get size(): number;
5
+ protected abstract ArrayConstructor: new (buffer: ArrayBufferLike, byteOffset: number, length: number) => TypedArrayType;
6
+ constructor(raw: RawType);
7
+ get(i: number): number;
8
+ set(i: number, value: number): void;
9
+ resize(size: number): void;
10
+ copy(data: TypedArrayType | number[]): void;
11
+ destroy(): void;
12
+ getHeapView(): TypedArrayType;
13
+ toTypedArray(): TypedArrayType;
14
+ protected abstract getHeap(): TypedArrayType;
15
+ }
16
+ export declare class IntArray extends BaseArray<RawModule.IntArray, Int32Array> {
17
+ protected ArrayConstructor: Int32ArrayConstructor;
18
+ /**
19
+ * Creates a new IntArray.
20
+ */
21
+ constructor();
22
+ /**
23
+ * Creates a wrapper around an existing raw IntArray object.
24
+ */
25
+ constructor(raw: RawModule.IntArray);
26
+ protected getHeap(): Int32Array;
27
+ static fromRaw(raw: RawModule.IntArray): IntArray;
28
+ }
29
+ export declare class UnsignedIntArray extends BaseArray<RawModule.UnsignedIntArray, Uint32Array> {
30
+ protected ArrayConstructor: Uint32ArrayConstructor;
31
+ /**
32
+ * Creates a new UnsignedIntArray.
33
+ */
34
+ constructor();
35
+ /**
36
+ * Creates a wrapper around an existing raw UnsignedIntArray object.
37
+ */
38
+ constructor(raw: RawModule.UnsignedIntArray);
39
+ protected getHeap(): Uint32Array;
40
+ static fromRaw(raw: RawModule.UnsignedIntArray): UnsignedIntArray;
41
+ }
42
+ export declare class UnsignedCharArray extends BaseArray<RawModule.UnsignedCharArray, Uint8Array> {
43
+ protected ArrayConstructor: Uint8ArrayConstructor;
44
+ /**
45
+ * Creates a new UnsignedCharArray.
46
+ */
47
+ constructor();
48
+ /**
49
+ * Creates a wrapper around an existing raw UnsignedCharArray object.
50
+ */
51
+ constructor(raw: RawModule.UnsignedCharArray);
52
+ protected getHeap(): Uint8Array;
53
+ static fromRaw(raw: RawModule.UnsignedCharArray): UnsignedCharArray;
54
+ }
55
+ export declare class UnsignedShortArray extends BaseArray<RawModule.UnsignedShortArray, Uint16Array> {
56
+ protected ArrayConstructor: Uint16ArrayConstructor;
57
+ /**
58
+ * Creates a new UnsignedShortArray.
59
+ */
60
+ constructor();
61
+ /**
62
+ * Creates a wrapper around an existing raw UnsignedShortArray object.
63
+ */
64
+ constructor(raw: RawModule.UnsignedShortArray);
65
+ protected getHeap(): Uint16Array;
66
+ static fromRaw(raw: RawModule.UnsignedShortArray): UnsignedShortArray;
67
+ }
68
+ export declare class FloatArray extends BaseArray<RawModule.FloatArray, Float32Array> {
69
+ protected ArrayConstructor: Float32ArrayConstructor;
70
+ /**
71
+ * Creates a new FloatArray.
72
+ */
73
+ constructor();
74
+ /**
75
+ * Creates a wrapper around an existing raw FloatArray object.
76
+ */
77
+ constructor(raw: RawModule.FloatArray);
78
+ protected getHeap(): Float32Array;
79
+ static fromRaw(raw: RawModule.FloatArray): FloatArray;
80
+ }
81
+ export declare const VerticesArray: typeof FloatArray;
82
+ export declare const TrianglesArray: typeof IntArray;
83
+ export declare const TriangleAreasArray: typeof UnsignedCharArray;
84
+ export declare const ChunkIdsArray: typeof IntArray;
85
+ export declare const TileCacheData: typeof UnsignedCharArray;
86
+ export {};
@@ -0,0 +1,297 @@
1
+ import type { NavMesh } from './nav-mesh';
2
+ import { NavMeshQuery, QueryFilter } from './nav-mesh-query';
3
+ import { type RawModule } from './raw';
4
+ import { type Vector3 } from './utils';
5
+ export type CrowdAgentParams = {
6
+ /**
7
+ * The radius of the agent.
8
+ * @default 0.5
9
+ */
10
+ radius: number;
11
+ /**
12
+ * The height of the agent.
13
+ * @default 1
14
+ */
15
+ height: number;
16
+ /**
17
+ * The maximum allowed acceleration for the agent.
18
+ * @default 20
19
+ */
20
+ maxAcceleration: number;
21
+ /**
22
+ * The maximum allowed speed for the agent.
23
+ * @default 6
24
+ */
25
+ maxSpeed: number;
26
+ /**
27
+ * Defines how close a collision element must be before it is considered for steering behaviors.
28
+ * [Limits: > 0]
29
+ * @default 2.5
30
+ */
31
+ collisionQueryRange: number;
32
+ /**
33
+ * The path visibility optimization range.
34
+ * [Limit: > 0]
35
+ * @default 0
36
+ */
37
+ pathOptimizationRange: number;
38
+ /**
39
+ * How aggresive the agent manager should be at avoiding collisions with this agent.
40
+ * [Limit: >= 0]
41
+ * @default 0
42
+ */
43
+ separationWeight: number;
44
+ /**
45
+ * Flags that impact steering behavior.
46
+ * @default 7
47
+ */
48
+ updateFlags: number;
49
+ /**
50
+ * The index of the avoidance configuration to use for the agent.
51
+ * [Limits: 0 <= value <= #DT_CROWD_MAX_OBSTAVOIDANCE_PARAMS]
52
+ * @default 0
53
+ */
54
+ obstacleAvoidanceType: number;
55
+ /**
56
+ * The index of the query filter used by this agent.
57
+ * @default 0
58
+ */
59
+ queryFilterType: number;
60
+ /**
61
+ * User defined data attached to the agent.
62
+ * @default 0
63
+ */
64
+ userData: unknown;
65
+ };
66
+ export declare const crowdAgentParamsDefaults: CrowdAgentParams;
67
+ export declare class CrowdAgent implements CrowdAgentParams {
68
+ crowd: Crowd;
69
+ agentIndex: number;
70
+ raw: RawModule.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);
93
+ /**
94
+ * The interpolated position of the agent.
95
+ *
96
+ * Use this if stepping the crowd with interpolation.
97
+ * This will not be updated if stepping the crowd without interpolation.
98
+ */
99
+ interpolatedPosition: Vector3;
100
+ constructor(crowd: Crowd, agentIndex: number);
101
+ /**
102
+ * Updates the agent's target.
103
+ * @param position The new target position.
104
+ * @returns True if the request was successful.
105
+ */
106
+ requestMoveTarget(position: Vector3): boolean;
107
+ /**
108
+ * Submits a new move request for the specified agent.
109
+ * @param velocity The desired velocity of the agent.
110
+ * @returns True if the request was successful.
111
+ */
112
+ requestMoveVelocity(velocity: Vector3): boolean;
113
+ /**
114
+ * Resets the current move request for the specified agent.
115
+ */
116
+ resetMoveTarget(): void;
117
+ /**
118
+ * Teleports the agent to the specified position.
119
+ * @param position
120
+ */
121
+ teleport(position: Vector3): void;
122
+ /**
123
+ * The position of the agent.
124
+ * @returns
125
+ */
126
+ position(): Vector3;
127
+ /**
128
+ * The actual velocity of the agent. The change from velocityDesiredObstacleAdjusted -> velocity is constrained by max acceleration.
129
+ */
130
+ velocity(): Vector3;
131
+ /**
132
+ * The desired velocity of the agent. Based on the current path, calculated from scratch each frame.
133
+ */
134
+ desiredVelocity(): Vector3;
135
+ /**
136
+ * The desired velocity adjusted by obstacle avoidance, calculated from scratch each frame.
137
+ */
138
+ desiredVelocityObstacleAdjusted(): Vector3;
139
+ /**
140
+ * Returns the state of the agent.
141
+ *
142
+ * 0 = DT_CROWDAGENT_STATE_INVALID
143
+ * 1 = DT_CROWDAGENT_STATE_WALKING
144
+ * 2 = DT_CROWDAGENT_STATE_OFFMESH
145
+ */
146
+ state(): number;
147
+ /**
148
+ * Returns the next target position on the path to the target
149
+ * @returns
150
+ */
151
+ target(): Vector3;
152
+ /**
153
+ * Returns the next target position on the path to the target
154
+ * @returns
155
+ */
156
+ nextTargetInPath(): Vector3;
157
+ /**
158
+ * Returns the local path corridor corners for the agent
159
+ * @returns
160
+ */
161
+ corners(): Vector3[];
162
+ /**
163
+ * Returns the agents parameters.
164
+ * @returns
165
+ */
166
+ parameters(): CrowdAgentParams;
167
+ /**
168
+ * Updates the agent's parameters.
169
+ * Any parameters not specified in the crowdAgentParams object will be unchanged.
170
+ * @param crowdAgentParams agent parameters to update.
171
+ */
172
+ updateParameters(crowdAgentParams: Partial<CrowdAgentParams>): void;
173
+ /**
174
+ * Sets the agent's parameters.
175
+ * Any parameters not specified in the crowdAgentParams object will be set to their default values.
176
+ * @param crowdAgentParams agent parameters
177
+ */
178
+ setParameters(crowdAgentParams: Partial<CrowdAgentParams>): void;
179
+ /**
180
+ * Returns whether the agent is over an off-mesh connection.
181
+ * @returns
182
+ */
183
+ overOffMeshConnection(): boolean;
184
+ }
185
+ export type CrowdParams = {
186
+ /**
187
+ * The maximum number of agents that can be managed by the crowd.
188
+ * [Limit: >= 1]
189
+ */
190
+ maxAgents: number;
191
+ /**
192
+ * The maximum radius of any agent that will be added to the crowd.
193
+ * [Limit: > 0]
194
+ */
195
+ maxAgentRadius: number;
196
+ };
197
+ export declare class Crowd {
198
+ raw: RawModule.dtCrowd;
199
+ /**
200
+ * The agents in the crowd.
201
+ */
202
+ agents: {
203
+ [idx: string]: CrowdAgent;
204
+ };
205
+ /**
206
+ * The NavMesh the crowd is interacting with.
207
+ */
208
+ navMesh: NavMesh;
209
+ /**
210
+ * The NavMeshQuery used to find nearest polys for commands
211
+ */
212
+ navMeshQuery: NavMeshQuery;
213
+ /**
214
+ * Accumulator for fixed updates with interpolation
215
+ */
216
+ private accumulator;
217
+ /**
218
+ *
219
+ * @param navMesh the navmesh the crowd will use for planning
220
+ * @param param1 the crowd parameters
221
+ *
222
+ * @example
223
+ * ```ts
224
+ * const crowd = new Crowd(navMesh, {
225
+ * maxAgents: 100,
226
+ * maxAgentRadius: 1,
227
+ * });
228
+ * ```
229
+ */
230
+ constructor(navMesh: NavMesh, { maxAgents, maxAgentRadius }: CrowdParams);
231
+ /**
232
+ * Steps the crowd forward in time with a fixed time step.
233
+ *
234
+ * There are two modes. The simple mode is fixed timestepping without interpolation. In this case you only use the first argument. The second case uses interpolation. In that you also provide the time since the function was last used, as well as the maximum fixed timesteps to take.
235
+ *
236
+ * @param dt The fixed time step size to use.
237
+ * @param timeSinceLastCalled The time elapsed since the function was last called.
238
+ * @param maxSubSteps Maximum number of fixed steps to take per function call.
239
+ *
240
+ * @example fixed time stepping
241
+ * ```ts
242
+ * const deltaTime = 1 / 60;
243
+ * crowd.update(deltaTime);
244
+ * ```
245
+ *
246
+ * @example variable time stepping
247
+ * ```ts
248
+ * crowd.update(timeSinceLastUpdate);
249
+ * ```
250
+ *
251
+ * @example fixed time stepping with interpolation
252
+ * ```ts
253
+ * const deltaTime = 1 / 60;
254
+ * const maxSubSteps = 10;
255
+ * crowd.update(deltaTime, timeSinceLastUpdate, maxSubSteps);
256
+ *
257
+ * console.log(agent.interpolatedPosition);
258
+ * ```
259
+ */
260
+ update(dt: number, timeSinceLastCalled?: number, maxSubSteps?: number): void;
261
+ /**
262
+ * Adds a new agent to the crowd.
263
+ */
264
+ addAgent(position: Vector3, crowdAgentParams: Partial<CrowdAgentParams>): CrowdAgent;
265
+ /**
266
+ * Gets the agent for the specified index, or null if no agent has the given index.
267
+ * @param agentIndex
268
+ * @returns
269
+ */
270
+ getAgent(agentIndex: number): CrowdAgent | null;
271
+ /**
272
+ * Removes the agent from the crowd.
273
+ */
274
+ removeAgent(agent: number | CrowdAgent): void;
275
+ /**
276
+ * Returns the maximum number of agents that can be managed by the crowd.
277
+ */
278
+ getAgentCount(): number;
279
+ /**
280
+ * Returns the number of active agents in the crowd.
281
+ */
282
+ getActiveAgentCount(): number;
283
+ /**
284
+ * Returns all the agents managed by the crowd.
285
+ */
286
+ getAgents(): CrowdAgent[];
287
+ /**
288
+ * Gets the query filter for the specified index.
289
+ * @param filterIndex the index of the query filter to retrieve, (min 0, max 15)
290
+ * @returns the query filter
291
+ */
292
+ getFilter(filterIndex: number): QueryFilter;
293
+ /**
294
+ * Destroys the crowd.
295
+ */
296
+ destroy(): void;
297
+ }
@@ -0,0 +1,55 @@
1
+ import type { NavMesh } from './nav-mesh';
2
+ import type { NavMeshQuery } from './nav-mesh-query';
3
+ import type { RecastCompactHeightfield, RecastContourSet, RecastHeightfield, RecastHeightfieldLayer, RecastHeightfieldLayerSet, RecastPolyMesh, RecastPolyMeshDetail } from './recast';
4
+ export type DebugDrawerPrimitiveType = 'lines' | 'tris' | 'quads' | 'points';
5
+ export type DebugDrawerPrimitive = {
6
+ type: DebugDrawerPrimitiveType;
7
+ vertices: [
8
+ x: number,
9
+ y: number,
10
+ z: number,
11
+ r: number,
12
+ g: number,
13
+ b: number,
14
+ a: number
15
+ ][];
16
+ };
17
+ /**
18
+ * Represents a helper class to visualize navigation cur and related data in PlayCanvas.
19
+ */
20
+ export declare class DebugDrawerUtils {
21
+ private debugDrawImpl;
22
+ private currentPrimitiveType;
23
+ private currentVertices;
24
+ private primitives;
25
+ constructor();
26
+ private flush;
27
+ drawHeightfieldSolid(hf: RecastHeightfield): DebugDrawerPrimitive[];
28
+ drawHeightfieldWalkable(hf: RecastHeightfield): DebugDrawerPrimitive[];
29
+ drawCompactHeightfieldSolid(chf: RecastCompactHeightfield): DebugDrawerPrimitive[];
30
+ drawCompactHeightfieldRegions(chf: RecastCompactHeightfield): DebugDrawerPrimitive[];
31
+ drawCompactHeightfieldDistance(chf: RecastCompactHeightfield): DebugDrawerPrimitive[];
32
+ drawHeightfieldLayer(layer: RecastHeightfieldLayer, idx: number): DebugDrawerPrimitive[];
33
+ drawHeightfieldLayers(lset: RecastHeightfieldLayerSet): DebugDrawerPrimitive[];
34
+ drawRegionConnections(cset: RecastContourSet, alpha?: number): DebugDrawerPrimitive[];
35
+ drawRawContours(cset: RecastContourSet, alpha?: number): DebugDrawerPrimitive[];
36
+ drawContours(cset: RecastContourSet, alpha?: number): DebugDrawerPrimitive[];
37
+ drawPolyMesh(mesh: RecastPolyMesh): DebugDrawerPrimitive[];
38
+ drawPolyMeshDetail(dmesh: RecastPolyMeshDetail): DebugDrawerPrimitive[];
39
+ drawNavMesh(mesh: NavMesh, flags?: number): DebugDrawerPrimitive[];
40
+ drawNavMeshWithClosedList(mesh: NavMesh, query: NavMeshQuery, flags?: number): DebugDrawerPrimitive[];
41
+ drawNavMeshNodes(query: NavMeshQuery): DebugDrawerPrimitive[];
42
+ drawNavMeshBVTree(mesh: NavMesh): DebugDrawerPrimitive[];
43
+ drawNavMeshPortals(mesh: NavMesh): DebugDrawerPrimitive[];
44
+ drawNavMeshPolysWithFlags(mesh: NavMesh, flags: number, col: number): DebugDrawerPrimitive[];
45
+ drawNavMeshPoly(mesh: NavMesh, ref: number, col: number): DebugDrawerPrimitive[];
46
+ /**
47
+ * Disposes of the debug drawer and releases resources.
48
+ */
49
+ dispose(): void;
50
+ private vertex;
51
+ }
52
+ /**
53
+ * Converts a color in 0xRRGGBBAA format to a duRGBA format.
54
+ */
55
+ export declare const rgbToDuRgba: (hexColor: number) => number;
@@ -0,0 +1,183 @@
1
+ import { UnsignedCharArray } from './arrays';
2
+ import { type RawModule } from './raw';
3
+ import type { RecastPolyMesh, RecastPolyMeshDetail } from './recast';
4
+ import { type Vector3, type Vector3Tuple } from './utils';
5
+ export declare const statusSucceed: (status: number) => boolean;
6
+ export declare const statusFailed: (status: number) => boolean;
7
+ export declare const statusInProgress: (status: number) => boolean;
8
+ export declare const statusDetail: (status: number, detail: number) => boolean;
9
+ export declare const statusToReadableString: (status: number) => string;
10
+ export declare class DetourPolyDetail {
11
+ raw: RawModule.dtPolyDetail;
12
+ constructor(raw: RawModule.dtPolyDetail);
13
+ vertBase(): number;
14
+ triBase(): number;
15
+ vertCount(): number;
16
+ triCount(): number;
17
+ }
18
+ export declare class DetourLink {
19
+ raw: RawModule.dtLink;
20
+ constructor(raw: RawModule.dtLink);
21
+ ref(): number;
22
+ next(): number;
23
+ edge(): number;
24
+ side(): number;
25
+ bmin(): number;
26
+ bmax(): number;
27
+ }
28
+ export declare class DetourBVNode {
29
+ raw: RawModule.dtBVNode;
30
+ constructor(raw: RawModule.dtBVNode);
31
+ bmin(): Vector3;
32
+ bmax(): Vector3;
33
+ i(): number;
34
+ }
35
+ export declare class DetourOffMeshConnection {
36
+ raw: RawModule.dtOffMeshConnection;
37
+ constructor(raw: RawModule.dtOffMeshConnection);
38
+ pos(index: number): number;
39
+ rad(): number;
40
+ poly(): number;
41
+ flags(): number;
42
+ side(): number;
43
+ userId(): number;
44
+ }
45
+ export declare class DetourMeshHeader {
46
+ raw: RawModule.dtMeshHeader;
47
+ constructor(raw: RawModule.dtMeshHeader);
48
+ magic(): number;
49
+ version(): number;
50
+ x(): number;
51
+ y(): number;
52
+ layer(): number;
53
+ userId(): number;
54
+ polyCount(): number;
55
+ vertCount(): number;
56
+ maxLinkCount(): number;
57
+ detailMeshCount(): number;
58
+ detailVertCount(): number;
59
+ detailTriCount(): number;
60
+ bvNodeCount(): number;
61
+ offMeshConCount(): number;
62
+ offMeshBase(): number;
63
+ walkableHeight(): number;
64
+ walkableRadius(): number;
65
+ walkableClimb(): number;
66
+ bmin(index: number): number;
67
+ bmax(index: number): number;
68
+ bvQuantFactor(): number;
69
+ }
70
+ export declare class DetourPoly {
71
+ raw: RawModule.dtPoly;
72
+ constructor(raw: RawModule.dtPoly);
73
+ firstLink(): number;
74
+ verts(index: number): number;
75
+ neis(index: number): number;
76
+ flags(): number;
77
+ vertCount(): number;
78
+ areaAndType(): number;
79
+ getType(): number;
80
+ }
81
+ export declare class DetourMeshTile {
82
+ raw: RawModule.dtMeshTile;
83
+ constructor(raw: RawModule.dtMeshTile);
84
+ salt(): number;
85
+ linksFreeList(): number;
86
+ header(): DetourMeshHeader | null;
87
+ polys(index: number): DetourPoly;
88
+ verts(index: number): number;
89
+ links(index: number): DetourLink;
90
+ detailMeshes(index: number): DetourPolyDetail;
91
+ detailVerts(index: number): number;
92
+ detailTris(index: number): number;
93
+ bvTree(index: number): DetourBVNode;
94
+ offMeshCons(index: number): DetourOffMeshConnection;
95
+ data(index: number): number;
96
+ dataSize(): number;
97
+ flags(): number;
98
+ next(): DetourMeshTile;
99
+ }
100
+ export declare const createNavMeshData: (navMeshCreateParams: NavMeshCreateParams) => {
101
+ success: boolean;
102
+ navMeshData: UnsignedCharArray;
103
+ };
104
+ export type OffMeshConnectionParams = {
105
+ startPosition: Vector3;
106
+ endPosition: Vector3;
107
+ radius: number;
108
+ bidirectional: boolean;
109
+ /**
110
+ * @default 0
111
+ */
112
+ area?: number;
113
+ /**
114
+ * @default 1
115
+ */
116
+ flags?: number;
117
+ userId?: number;
118
+ };
119
+ export declare class NavMeshCreateParams {
120
+ raw: RawModule.dtNavMeshCreateParams;
121
+ /**
122
+ * Creates a new NavMeshCreateParams object.
123
+ */
124
+ constructor();
125
+ /**
126
+ * Creates a wrapper around an existing raw NavMeshCreateParams object.
127
+ */
128
+ constructor(raw: RawModule.dtNavMeshCreateParams);
129
+ setPolyMeshCreateParams(polyMesh: RecastPolyMesh): void;
130
+ setPolyMeshDetailCreateParams(polyMeshDetail: RecastPolyMeshDetail): void;
131
+ setOffMeshConnections(offMeshConnections: OffMeshConnectionParams[]): void;
132
+ verts(index: number): number;
133
+ setVerts(index: number, value: number): void;
134
+ vertCount(): number;
135
+ polys(index: number): number;
136
+ setPolys(index: number, value: number): void;
137
+ polyAreas(index: number): number;
138
+ setPolyAreas(index: number, value: number): void;
139
+ polyFlags(index: number): number;
140
+ setPolyFlags(index: number, value: number): void;
141
+ polyCount(): number;
142
+ nvp(): number;
143
+ setNvp(value: number): void;
144
+ detailMeshes(index: number): number;
145
+ setDetailMeshes(index: number, value: number): void;
146
+ detailVerts(index: number): number;
147
+ setDetailVerts(index: number, value: number): void;
148
+ detailVertsCount(): number;
149
+ detailTris(index: number): number;
150
+ setDetailTris(index: number, value: number): void;
151
+ detailTriCount(): number;
152
+ offMeshConVerts(index: number): number;
153
+ offMeshConRad(index: number): number;
154
+ offMeshConDir(index: number): number;
155
+ offMeshConAreas(index: number): number;
156
+ offMeshConFlags(index: number): number;
157
+ offMeshConUserID(index: number): number;
158
+ offMeshConCount(): number;
159
+ userId(): number;
160
+ tileX(): number;
161
+ setTileX(value: number): void;
162
+ tileY(): number;
163
+ setTileY(value: number): void;
164
+ tileLayer(): number;
165
+ setTileLayer(value: number): void;
166
+ boundsMin(): Vector3Tuple;
167
+ setBoundsMin(value: Vector3Tuple): void;
168
+ boundsMax(): Vector3Tuple;
169
+ setBoundsMax(value: Vector3Tuple): void;
170
+ walkableHeight(): number;
171
+ setWalkableHeight(value: number): void;
172
+ walkableRadius(): number;
173
+ setWalkableRadius(value: number): void;
174
+ walkableClimb(): number;
175
+ setWalkableClimb(value: number): void;
176
+ cellSize(): number;
177
+ setCellSize(value: number): void;
178
+ cellHeight(): number;
179
+ setCellHeight(value: number): void;
180
+ buildBvTree(): boolean;
181
+ setBuildBvTree(value: boolean): void;
182
+ destroy(): void;
183
+ }
@@ -0,0 +1,12 @@
1
+ export * from './arrays';
2
+ export * from './crowd';
3
+ export * from './debug-drawer-utils';
4
+ export * from './detour';
5
+ export * from './nav-mesh';
6
+ export * from './nav-mesh-query';
7
+ export * from './random';
8
+ export * from './raw';
9
+ export * from './recast';
10
+ export * from './serdes';
11
+ export * from './tile-cache';
12
+ export * from './utils';