@recast-navigation/core 0.13.3 → 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/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "email": "isaac@isaacmason.com",
7
7
  "url": "https://isaacmason.com/"
8
8
  },
9
- "version": "0.13.3",
9
+ "version": "0.14.0",
10
10
  "license": "MIT",
11
11
  "homepage": "https://github.com/isaac-mason/recast-navigation-js",
12
12
  "bugs": {
@@ -21,20 +21,19 @@
21
21
  "LICENSE"
22
22
  ],
23
23
  "scripts": {
24
- "build": "rollup --config rollup.config.js --bundleConfigAsCjs",
25
- "test": "vitest run"
24
+ "build": "rollup --config rollup.config.js --bundleConfigAsCjs"
26
25
  },
27
26
  "dependencies": {
28
- "@recast-navigation/wasm": "0.13.3"
27
+ "@recast-navigation/wasm": "0.14.0"
29
28
  },
30
29
  "devDependencies": {
31
30
  "@babel/core": "^7.22.11",
32
- "@rollup/plugin-commonjs": "^25.0.4",
31
+ "@rollup/plugin-commonjs": "^25.0.7",
33
32
  "@rollup/plugin-node-resolve": "^15.0.1",
34
33
  "@rollup/plugin-terser": "^0.4.3",
35
34
  "@rollup/plugin-typescript": "^11.1.5",
36
35
  "@types/three": "^0.155.0",
37
- "@typescript-eslint/eslint-plugin": "^5.7.0",
36
+ "@typescript-eslint/eslint-plugin": "^6.10.0",
38
37
  "@typescript-eslint/parser": "^6.7.3",
39
38
  "babel-loader": "^9.1.3",
40
39
  "eslint": "^8.51.0",
@@ -43,7 +42,7 @@
43
42
  "eslint-config-prettier": "^9.0.0",
44
43
  "eslint-import-resolver-typescript": "^3.5.5",
45
44
  "eslint-plugin-es": "^4.1.0",
46
- "eslint-plugin-import": "^2.28.0",
45
+ "eslint-plugin-import": "^2.29.0",
47
46
  "eslint-plugin-prettier": "^5.0.1",
48
47
  "eslint-plugin-simple-import-sort": "^10.0.0",
49
48
  "eslint-plugin-typescript-enum": "^2.1.0",
@@ -51,8 +50,7 @@
51
50
  "rollup": "^3.26.3",
52
51
  "rollup-plugin-copy": "^3.4.0",
53
52
  "rollup-plugin-filesize": "^10.0.0",
54
- "typescript": "^5.1.6",
55
- "vitest": "^0.34.6"
53
+ "typescript": "^5.1.6"
56
54
  },
57
55
  "packageManager": "yarn@3.2.1"
58
56
  }
@@ -1,10 +0,0 @@
1
- import { OffMeshConnectionParams } from '../detour';
2
- export declare const getBoundingBox: (positions: ArrayLike<number>, indices: ArrayLike<number>) => {
3
- bbMin: import("../utils").Vector3Tuple;
4
- bbMax: import("../utils").Vector3Tuple;
5
- };
6
- export declare const dtIlog2: (v: number) => number;
7
- export declare const dtNextPow2: (v: number) => number;
8
- export type OffMeshConnectionGeneratorParams = {
9
- offMeshConnections?: OffMeshConnectionParams[];
10
- };
@@ -1,34 +0,0 @@
1
- import { NavMesh } from '../nav-mesh';
2
- import { RecastBuildContext, RecastCompactHeightfield, RecastConfigType, RecastContourSet, RecastHeightfield } from '../recast';
3
- import { Pretty } from '../types';
4
- import { OffMeshConnectionGeneratorParams } from './common';
5
- export type SoloNavMeshGeneratorConfig = Pretty<Omit<RecastConfigType, 'tileSize'> & OffMeshConnectionGeneratorParams>;
6
- export declare const soloNavMeshGeneratorConfigDefaults: SoloNavMeshGeneratorConfig;
7
- export type SoloNavMeshGeneratorIntermediates = {
8
- type: 'solo';
9
- buildContext: RecastBuildContext;
10
- heightfield?: RecastHeightfield;
11
- compactHeightfield?: RecastCompactHeightfield;
12
- contourSet?: RecastContourSet;
13
- };
14
- type SoloNavMeshGeneratorSuccessResult = {
15
- navMesh: NavMesh;
16
- success: true;
17
- intermediates: SoloNavMeshGeneratorIntermediates;
18
- };
19
- type SoloNavMeshGeneratorFailResult = {
20
- navMesh: undefined;
21
- success: false;
22
- intermediates: SoloNavMeshGeneratorIntermediates;
23
- error: string;
24
- };
25
- export type SoloNavMeshGeneratorResult = SoloNavMeshGeneratorSuccessResult | SoloNavMeshGeneratorFailResult;
26
- /**
27
- * Builds a Solo NavMesh from the given positions and indices.
28
- * @param positions a flat array of positions
29
- * @param indices a flat array of indices
30
- * @param navMeshGeneratorConfig optional configuration for the NavMesh generator
31
- * @param keepIntermediates if true intermediates will be returned
32
- */
33
- export declare const generateSoloNavMesh: (positions: ArrayLike<number>, indices: ArrayLike<number>, navMeshGeneratorConfig?: Partial<SoloNavMeshGeneratorConfig>, keepIntermediates?: boolean) => SoloNavMeshGeneratorResult;
34
- export {};
@@ -1,53 +0,0 @@
1
- import { NavMesh } from '../nav-mesh';
2
- import { RecastBuildContext, RecastChunkyTriMesh, RecastCompactHeightfield, RecastConfigType, RecastHeightfield, RecastHeightfieldLayerSet } from '../recast';
3
- import { TileCache } from '../tile-cache';
4
- import { Pretty } from '../types';
5
- import { OffMeshConnectionGeneratorParams } from './common';
6
- export type TileCacheGeneratorConfig = Pretty<RecastConfigType & {
7
- /**
8
- * How many layers (or "floors") each navmesh tile is expected to have.
9
- */
10
- expectedLayersPerTile: number;
11
- /**
12
- * The max number of obstacles
13
- */
14
- maxObstacles: number;
15
- } & OffMeshConnectionGeneratorParams>;
16
- export declare const tileCacheGeneratorConfigDefaults: TileCacheGeneratorConfig;
17
- export type TileCacheGeneratorTileIntermediates = {
18
- tileX: number;
19
- tileY: number;
20
- heightfield?: RecastHeightfield;
21
- compactHeightfield?: RecastCompactHeightfield;
22
- heightfieldLayerSet?: RecastHeightfieldLayerSet;
23
- };
24
- export type TileCacheGeneratorIntermediates = {
25
- type: 'tilecache';
26
- buildContext: RecastBuildContext;
27
- chunkyTriMesh?: RecastChunkyTriMesh;
28
- tileIntermediates: TileCacheGeneratorTileIntermediates[];
29
- };
30
- type TileCacheGeneratorSuccessResult = {
31
- tileCache: TileCache;
32
- navMesh: NavMesh;
33
- success: true;
34
- intermediates: TileCacheGeneratorIntermediates;
35
- };
36
- type TileCacheGeneratorFailResult = {
37
- tileCache: undefined;
38
- navMesh: undefined;
39
- success: false;
40
- error: string;
41
- intermediates: TileCacheGeneratorIntermediates;
42
- };
43
- export type TileCacheGeneratorResult = TileCacheGeneratorSuccessResult | TileCacheGeneratorFailResult;
44
- /**
45
- * Builds a TileCache and NavMesh from the given positions and indices.
46
- * TileCache assumes small tiles (around 32-64 squared) and does some tricks to make the update fast.
47
- * @param positions a flat array of positions
48
- * @param indices a flat array of indices
49
- * @param navMeshConfig optional configuration for the NavMesh
50
- * @param keepIntermediates if true intermediates will be returned
51
- */
52
- export declare const generateTileCache: (positions: ArrayLike<number>, indices: ArrayLike<number>, navMeshGeneratorConfig?: Partial<TileCacheGeneratorConfig>, keepIntermediates?: boolean) => TileCacheGeneratorResult;
53
- export {};
@@ -1,39 +0,0 @@
1
- import { NavMesh } from '../nav-mesh';
2
- import { RecastBuildContext, RecastChunkyTriMesh, RecastCompactHeightfield, RecastConfigType, RecastContourSet, RecastHeightfield } from '../recast';
3
- import { Pretty } from '../types';
4
- import { OffMeshConnectionGeneratorParams } from './common';
5
- export type TiledNavMeshGeneratorConfig = Pretty<RecastConfigType & OffMeshConnectionGeneratorParams>;
6
- export declare const tiledNavMeshGeneratorConfigDefaults: TiledNavMeshGeneratorConfig;
7
- export type TiledNavMeshGeneratorIntermediates = {
8
- type: 'tiled';
9
- buildContext: RecastBuildContext;
10
- chunkyTriMesh?: RecastChunkyTriMesh;
11
- tileIntermediates: {
12
- tileX: number;
13
- tileY: number;
14
- heightfield?: RecastHeightfield;
15
- compactHeightfield?: RecastCompactHeightfield;
16
- contourSet?: RecastContourSet;
17
- }[];
18
- };
19
- type TiledNavMeshGeneratorSuccessResult = {
20
- navMesh: NavMesh;
21
- success: true;
22
- intermediates: TiledNavMeshGeneratorIntermediates;
23
- };
24
- type TiledNavMeshGeneratorFailResult = {
25
- navMesh: undefined;
26
- success: false;
27
- intermediates: TiledNavMeshGeneratorIntermediates;
28
- error: string;
29
- };
30
- export type TiledNavMeshGeneratorResult = TiledNavMeshGeneratorSuccessResult | TiledNavMeshGeneratorFailResult;
31
- /**
32
- * Builds a Tiled NavMesh
33
- * @param positions a flat array of positions
34
- * @param indices a flat array of indices
35
- * @param navMeshGeneratorConfig optional configuration for the NavMesh generator
36
- * @param keepIntermediates if true intermediates will be returned
37
- */
38
- export declare const generateTiledNavMesh: (positions: ArrayLike<number>, indices: ArrayLike<number>, navMeshGeneratorConfig?: Partial<TiledNavMeshGeneratorConfig>, keepIntermediates?: boolean) => TiledNavMeshGeneratorResult;
39
- export {};
@@ -1,4 +0,0 @@
1
- export * from './common';
2
- export * from './generate-solo-nav-mesh';
3
- export * from './generate-tile-cache';
4
- export * from './generate-tiled-nav-mesh';