@recast-navigation/three 0.40.0 → 0.42.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.
@@ -1,4 +1,4 @@
1
- import { DebugDrawerPrimitive, NavMesh, NavMeshQuery, RecastCompactHeightfield, RecastContourSet, RecastHeightfield, RecastHeightfieldLayer, RecastHeightfieldLayerSet, RecastPolyMesh, RecastPolyMeshDetail } from '@recast-navigation/core';
1
+ import { type DebugDrawerPrimitive, type NavMesh, type NavMeshQuery, type RecastCompactHeightfield, type RecastContourSet, type RecastHeightfield, type RecastHeightfieldLayer, type RecastHeightfieldLayerSet, type RecastPolyMesh, type RecastPolyMeshDetail } from '@recast-navigation/core';
2
2
  import * as THREE from 'three';
3
3
  import { LineMaterial } from 'three/addons/lines/LineMaterial.js';
4
4
  export type DebugDrawerParams = {
@@ -31,7 +31,13 @@ export declare class DebugDrawer extends THREE.Group {
31
31
  drawNavMeshNodes(query: NavMeshQuery): void;
32
32
  drawNavMeshBVTree(mesh: NavMesh): void;
33
33
  drawNavMeshPortals(mesh: NavMesh): void;
34
+ /**
35
+ * @param col color in 0xRRGGBBAA format
36
+ */
34
37
  drawNavMeshPolysWithFlags(mesh: NavMesh, flags: number, col: number): void;
38
+ /**
39
+ * @param col color in 0xRRGGBBAA format
40
+ */
35
41
  drawNavMeshPoly(mesh: NavMesh, ref: number, col: number): void;
36
42
  reset(): void;
37
43
  dispose(): void;
@@ -1,5 +1,5 @@
1
- import { Crowd } from '@recast-navigation/core';
2
- import { Material, Mesh, Object3D } from 'three';
1
+ import type { Crowd } from '@recast-navigation/core';
2
+ import { type Material, Mesh, Object3D } from 'three';
3
3
  export type CrowdHelperParams = {
4
4
  agentMaterial?: Material;
5
5
  };
@@ -1,5 +1,5 @@
1
- import { NavMesh } from '@recast-navigation/core';
2
- import { BufferGeometry, Material, Mesh, Object3D } from 'three';
1
+ import { type NavMesh } from '@recast-navigation/core';
2
+ import { BufferGeometry, type Material, Mesh, Object3D } from 'three';
3
3
  export type NavMeshHelperParams = {
4
4
  navMeshMaterial?: Material;
5
5
  };
@@ -1,5 +1,5 @@
1
- import { Obstacle, TileCache } from '@recast-navigation/core';
2
- import { Material, Mesh, Object3D } from 'three';
1
+ import type { Obstacle, TileCache } from '@recast-navigation/core';
2
+ import { type Material, Mesh, Object3D } from 'three';
3
3
  export type TileCacheHelperParams = {
4
4
  obstacleMaterial?: Material;
5
5
  };
package/dist/index.mjs CHANGED
@@ -118,10 +118,16 @@ class DebugDrawer extends THREE.Group {
118
118
  const primitives = this.debugDrawerUtils.drawNavMeshPortals(mesh);
119
119
  this.drawPrimitives(primitives);
120
120
  }
121
+ /**
122
+ * @param col color in 0xRRGGBBAA format
123
+ */
121
124
  drawNavMeshPolysWithFlags(mesh, flags, col) {
122
125
  const primitives = this.debugDrawerUtils.drawNavMeshPolysWithFlags(mesh, flags, col);
123
126
  this.drawPrimitives(primitives);
124
127
  }
128
+ /**
129
+ * @param col color in 0xRRGGBBAA format
130
+ */
125
131
  drawNavMeshPoly(mesh, ref, col) {
126
132
  const primitives = this.debugDrawerUtils.drawNavMeshPoly(mesh, ref, col);
127
133
  this.drawPrimitives(primitives);
@@ -1,5 +1,5 @@
1
- import { SoloNavMeshGeneratorConfig, TileCacheGeneratorConfig, TiledNavMeshGeneratorConfig } from '@recast-navigation/generators';
2
- import { Mesh } from 'three';
1
+ import { type SoloNavMeshGeneratorConfig, type TileCacheGeneratorConfig, type TiledNavMeshGeneratorConfig } from '@recast-navigation/generators';
2
+ import type { Mesh } from 'three';
3
3
  export declare const threeToSoloNavMesh: (meshes: Mesh[], navMeshGeneratorConfig?: Partial<SoloNavMeshGeneratorConfig>, keepIntermediates?: boolean) => import("@recast-navigation/generators").GenerateSoloNavMeshResult;
4
4
  export declare const threeToTiledNavMesh: (meshes: Mesh[], navMeshGeneratorConfig?: Partial<TiledNavMeshGeneratorConfig>, keepIntermediates?: boolean) => import("@recast-navigation/generators").GenerateTiledNavMeshResult;
5
5
  export declare const threeToTileCache: (meshes: Mesh[], navMeshGeneratorConfig?: Partial<TileCacheGeneratorConfig>, keepIntermediates?: boolean) => import("@recast-navigation/generators").TileCacheGeneratorResult;
@@ -1,2 +1,2 @@
1
- import { Mesh } from 'three';
1
+ import { type Mesh } from 'three';
2
2
  export declare const getPositionsAndIndices: (meshes: Mesh[]) => [positions: Float32Array, indices: Uint32Array];
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.40.0",
9
+ "version": "0.42.0",
10
10
  "license": "MIT",
11
11
  "homepage": "https://github.com/isaac-mason/recast-navigation-js",
12
12
  "bugs": {
@@ -23,34 +23,30 @@
23
23
  ],
24
24
  "scripts": {
25
25
  "build": "rollup --config rollup.config.js --bundleConfigAsCjs",
26
- "test": "tsc",
27
- "lint": "eslint src"
26
+ "test": "tsc"
28
27
  },
29
28
  "dependencies": {
30
- "@recast-navigation/core": "0.40.0",
31
- "@recast-navigation/generators": "0.40.0"
29
+ "@recast-navigation/core": "0.42.0",
30
+ "@recast-navigation/generators": "0.42.0"
32
31
  },
33
32
  "peerDependencies": {
34
33
  "@types/three": "0.x.x",
35
34
  "three": "0.x.x"
36
35
  },
37
36
  "devDependencies": {
38
- "@babel/core": "^7.24.5",
39
- "@babel/preset-env": "^7.24.5",
40
- "@babel/preset-typescript": "^7.24.1",
41
- "@isaac-mason/eslint-config-typescript": "^0.0.9",
37
+ "@babel/core": "^7.28.0",
38
+ "@babel/preset-env": "^7.28.0",
39
+ "@babel/preset-typescript": "^7.27.1",
42
40
  "@rollup/plugin-babel": "^6.0.4",
43
- "@rollup/plugin-commonjs": "^25.0.7",
44
- "@rollup/plugin-node-resolve": "^15.0.1",
45
- "@rollup/plugin-typescript": "^11.1.6",
46
- "@types/three": "^0.172.0",
47
- "eslint": "^9.6.0",
48
- "prettier": "^3.1.0",
49
- "rollup": "^4.14.0",
50
- "rollup-plugin-copy": "^3.4.0",
41
+ "@rollup/plugin-commonjs": "^28.0.6",
42
+ "@rollup/plugin-node-resolve": "^16.0.1",
43
+ "@rollup/plugin-typescript": "^12.1.4",
44
+ "@types/three": "^0.178.0",
45
+ "rollup": "^4.42.2",
46
+ "rollup-plugin-copy": "^3.5.0",
51
47
  "rollup-plugin-filesize": "^10.0.0",
52
- "three": "^0.172.0",
53
- "typescript": "^5.4.3"
48
+ "three": "^0.178.0",
49
+ "typescript": "^5.8.3"
54
50
  },
55
51
  "packageManager": "yarn@3.2.1"
56
52
  }