@recast-navigation/core 0.25.0 → 0.27.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/arrays.d.ts +52 -0
- package/dist/detour.d.ts +5 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/nav-mesh-query.d.ts +6 -5
- package/dist/nav-mesh.d.ts +13 -11
- package/dist/raw.d.ts +5 -12
- package/dist/recast.d.ts +12 -11
- package/dist/tile-cache.d.ts +4 -3
- package/package.json +2 -2
package/dist/arrays.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import RawModule from './raw-module';
|
|
2
|
+
type TypedArray = typeof Int32Array | typeof Uint32Array | typeof Uint8Array | typeof Uint16Array | typeof Float32Array;
|
|
3
|
+
declare abstract class BaseArray<RawType extends RawModule.IntArray | RawModule.UnsignedIntArray | RawModule.UnsignedCharArray | RawModule.UnsignedShortArray | RawModule.FloatArray, T extends TypedArray> {
|
|
4
|
+
raw: RawType;
|
|
5
|
+
get size(): number;
|
|
6
|
+
protected abstract typedArrayClass: T;
|
|
7
|
+
constructor(raw: RawType);
|
|
8
|
+
get(i: number): number;
|
|
9
|
+
set(i: number, value: number): void;
|
|
10
|
+
resize(size: number): void;
|
|
11
|
+
copy(data: InstanceType<T> | number[]): void;
|
|
12
|
+
free(): void;
|
|
13
|
+
getHeapView(): InstanceType<T>;
|
|
14
|
+
toTypedArray(): InstanceType<T>;
|
|
15
|
+
protected abstract getHeap(): InstanceType<T>;
|
|
16
|
+
}
|
|
17
|
+
export declare class IntArray extends BaseArray<RawModule.IntArray, typeof Int32Array> {
|
|
18
|
+
typedArrayClass: Int32ArrayConstructor;
|
|
19
|
+
constructor(raw?: RawModule.IntArray);
|
|
20
|
+
protected getHeap(): Int32Array;
|
|
21
|
+
static fromRaw(raw?: RawModule.IntArray): IntArray;
|
|
22
|
+
}
|
|
23
|
+
export declare class UnsignedIntArray extends BaseArray<RawModule.UnsignedIntArray, typeof Uint32Array> {
|
|
24
|
+
typedArrayClass: Uint32ArrayConstructor;
|
|
25
|
+
constructor(raw?: RawModule.UnsignedIntArray);
|
|
26
|
+
protected getHeap(): Uint32Array;
|
|
27
|
+
static fromRaw(raw?: RawModule.UnsignedIntArray): UnsignedIntArray;
|
|
28
|
+
}
|
|
29
|
+
export declare class UnsignedCharArray extends BaseArray<RawModule.UnsignedCharArray, typeof Uint8Array> {
|
|
30
|
+
typedArrayClass: Uint8ArrayConstructor;
|
|
31
|
+
constructor(raw?: RawModule.UnsignedCharArray);
|
|
32
|
+
protected getHeap(): Uint8Array;
|
|
33
|
+
static fromRaw(raw?: RawModule.UnsignedCharArray): UnsignedCharArray;
|
|
34
|
+
}
|
|
35
|
+
export declare class UnsignedShortArray extends BaseArray<RawModule.UnsignedShortArray, typeof Uint16Array> {
|
|
36
|
+
typedArrayClass: Uint16ArrayConstructor;
|
|
37
|
+
constructor(raw?: RawModule.UnsignedShortArray);
|
|
38
|
+
protected getHeap(): Uint16Array;
|
|
39
|
+
static fromRaw(raw?: RawModule.UnsignedShortArray): UnsignedShortArray;
|
|
40
|
+
}
|
|
41
|
+
export declare class FloatArray extends BaseArray<RawModule.FloatArray, typeof Float32Array> {
|
|
42
|
+
typedArrayClass: Float32ArrayConstructor;
|
|
43
|
+
constructor(raw?: RawModule.FloatArray);
|
|
44
|
+
protected getHeap(): Float32Array;
|
|
45
|
+
static fromRaw(raw?: RawModule.FloatArray): FloatArray;
|
|
46
|
+
}
|
|
47
|
+
export declare const VerticesArray: typeof FloatArray;
|
|
48
|
+
export declare const TrianglesArray: typeof IntArray;
|
|
49
|
+
export declare const TriangleAreasArray: typeof UnsignedCharArray;
|
|
50
|
+
export declare const ChunkIdsArray: typeof IntArray;
|
|
51
|
+
export declare const TileCacheData: typeof UnsignedCharArray;
|
|
52
|
+
export {};
|
package/dist/detour.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { UnsignedCharArray } from './arrays';
|
|
1
2
|
import type R from './raw-module';
|
|
2
3
|
import { RecastPolyMesh, RecastPolyMeshDetail } from './recast';
|
|
3
4
|
import { Vector3, Vector3Tuple } from './utils';
|
|
@@ -96,7 +97,10 @@ export declare class DetourMeshTile {
|
|
|
96
97
|
flags(): number;
|
|
97
98
|
next(): DetourMeshTile;
|
|
98
99
|
}
|
|
99
|
-
export declare const createNavMeshData: (navMeshCreateParams: NavMeshCreateParams) =>
|
|
100
|
+
export declare const createNavMeshData: (navMeshCreateParams: NavMeshCreateParams) => {
|
|
101
|
+
success: boolean;
|
|
102
|
+
navMeshData: UnsignedCharArray;
|
|
103
|
+
};
|
|
100
104
|
export type OffMeshConnectionParams = {
|
|
101
105
|
startPosition: Vector3;
|
|
102
106
|
endPosition: Vector3;
|