@recast-navigation/core 0.20.0 → 0.21.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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/nav-mesh.d.ts +28 -0
- package/package.json +3 -3
package/dist/nav-mesh.d.ts
CHANGED
|
@@ -32,6 +32,20 @@ export declare class NavMeshStoreTileStateResult {
|
|
|
32
32
|
data(): number[];
|
|
33
33
|
dataSize(): number;
|
|
34
34
|
}
|
|
35
|
+
export type NavMeshDecodePolyIdResult = {
|
|
36
|
+
/**
|
|
37
|
+
* The tile's salt value.
|
|
38
|
+
*/
|
|
39
|
+
tileSalt: number;
|
|
40
|
+
/**
|
|
41
|
+
* The index of the tile. `it` in the C++ api.
|
|
42
|
+
*/
|
|
43
|
+
tileIndex: number;
|
|
44
|
+
/**
|
|
45
|
+
* The index of the polygon within the tile. `ip` in the C++ api.
|
|
46
|
+
*/
|
|
47
|
+
tilePolygonIndex: number;
|
|
48
|
+
};
|
|
35
49
|
export type NavMeshParamsType = {
|
|
36
50
|
orig: Vector3;
|
|
37
51
|
tileWidth: number;
|
|
@@ -71,6 +85,20 @@ export declare class NavMesh {
|
|
|
71
85
|
status: number;
|
|
72
86
|
tileRef: number;
|
|
73
87
|
};
|
|
88
|
+
/**
|
|
89
|
+
* Decodes a standard polygon reference.
|
|
90
|
+
* @param polyRef The polygon reference to decode
|
|
91
|
+
* @returns the decoded polygon reference
|
|
92
|
+
*/
|
|
93
|
+
decodePolyId(polyRef: number): NavMeshDecodePolyIdResult;
|
|
94
|
+
/**
|
|
95
|
+
* Derives a standard polygon reference.
|
|
96
|
+
* @param salt The tile's salt value.
|
|
97
|
+
* @param tileIndex The index of the tile. `it` in the C++ api.
|
|
98
|
+
* @param tilePolygonIndex The index of the polygon within the tile. `ip` in the C++ api.
|
|
99
|
+
* @returns the derived polygon reference
|
|
100
|
+
*/
|
|
101
|
+
encodePolyId(salt: number, tileIndex: number, tilePolygonIndex: number): number;
|
|
74
102
|
/**
|
|
75
103
|
* Removes a tile from the NavMesh
|
|
76
104
|
* @param ref the tile ref
|
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.
|
|
9
|
+
"version": "0.21.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"homepage": "https://github.com/isaac-mason/recast-navigation-js",
|
|
12
12
|
"bugs": {
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"lint": "eslint --ext .ts src"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@recast-navigation/wasm": "0.
|
|
29
|
+
"@recast-navigation/wasm": "0.21.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@babel/core": "^7.
|
|
32
|
+
"@babel/core": "^7.24.4",
|
|
33
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",
|