@recast-navigation/three 0.0.0-development-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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright © 2022 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,113 @@
1
+ # @recast-navigation/core
2
+
3
+ Three.js glue for [`recast-navigation`](https://github.com/isaac-mason/recast-navigation-js/tree/main/packages/recast-navigation).
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ > yarn add @recast-navigation/three
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ### Importing
14
+
15
+ To use the three.js glue, you can either use the `three` entrypoint in `recast-navigation`:
16
+
17
+ ```ts
18
+ import * as RecastNavigationThree from 'recast-navigation/three';
19
+ ```
20
+
21
+ Or you can use this package directly:
22
+
23
+ ```ts
24
+ import * as RecastNavigationThree from '@recast-navigation/three';
25
+ ```
26
+
27
+ ### threeToNavMesh
28
+
29
+ As a convenience, this package exports a function for converting all descendants within three.js `Object3D` to a `NavMesh`:
30
+
31
+ ```ts
32
+ import * as THREE from 'three';
33
+ import { NavMesh } from 'recast-navigation';
34
+ import { threeToNavMesh } from 'recast-navigation/three';
35
+
36
+ const scene = new THREE.Scene();
37
+
38
+ /* add some objects to the scene */
39
+ // ...
40
+
41
+ const navMesh: NavMesh = threeToNavMesh(scene, { /* NavMesh config */ }});
42
+ ```
43
+
44
+ You can also use `threeToNavMeshArgs` to get the arguments for `NavMesh.build`:
45
+
46
+ ```ts
47
+ const [positions, indices] = threeToNavMeshArgs(scene);
48
+ ```
49
+
50
+ ### NavMeshHelper
51
+
52
+ ```ts
53
+ import * as THREE from 'three';
54
+ import { NavMeshHelper } from 'recast-navigation/three';
55
+
56
+ const navMesh = new NavMesh();
57
+
58
+ /* initialize the NavMesh */
59
+ // ...
60
+
61
+ const navMeshHelper = new NavMeshHelper({ navMesh });
62
+
63
+ const scene = new THREE.Scene();
64
+
65
+ scene.add(navMeshHelper.navMesh);
66
+ scene.add(navMeshHelper.obstacles);
67
+
68
+ navMeshHelper.updateNavMesh();
69
+ navMeshHelper.updateObstacles();
70
+ ```
71
+
72
+ You can optionally pass custom materials to the NavMeshHelper constructor.
73
+
74
+ ```ts
75
+ const navMeshMaterial = new THREE.MeshBasicMaterial({ color: 'red' });
76
+ const obstaclesMaterial = new THREE.MeshBasicMaterial({ color: 'blue' });
77
+
78
+ const navMeshHelper = new NavMeshHelper({
79
+ navMesh,
80
+ navMeshMaterial,
81
+ obstaclesMaterial,
82
+ });
83
+ ```
84
+
85
+ ### CrowdHelper
86
+
87
+ ```ts
88
+ import * as THREE from 'three';
89
+ import { Crowd, NavMesh } from 'recast-navigation';
90
+ import { CrowdHelper } from 'recast-navigation/three';
91
+
92
+ const navMesh = new NavMesh();
93
+ /* ... */
94
+ const crowd = new Crowd({ navMesh, maxAgents: 1, maxAgentRadius: 1 });
95
+
96
+ const crowdHelper = new CrowdHelper({ crowd });
97
+
98
+ const scene = new THREE.Scene();
99
+
100
+ scene.add(navMeshHelper.navMesh);
101
+ scene.add(navMeshHelper.obstacles);
102
+
103
+ navMeshHelper.updateNavMesh();
104
+ navMeshHelper.updateObstacles();
105
+ ```
106
+
107
+ You can optionally pass a custom crowd material to the CrowdHelper constructor.
108
+
109
+ ```ts
110
+ const material = new THREE.MeshBasicMaterial({ color: 'red' });
111
+
112
+ const crowdHelper = new CrowdHelper({ crowd, material });
113
+ ```
@@ -0,0 +1,15 @@
1
+ import { Crowd } from '@recast-navigation/core';
2
+ import { Group, Material, Mesh } from 'three';
3
+ export declare type CrowdHelperParams = {
4
+ crowd: Crowd;
5
+ crowdMaterial?: Material;
6
+ };
7
+ export declare class CrowdHelper {
8
+ agents: Group;
9
+ agentMeshes: Map<number, Mesh>;
10
+ recastCrowd: Crowd;
11
+ crowdMaterial: Material;
12
+ constructor({ crowd, crowdMaterial }: CrowdHelperParams);
13
+ updateAgents(): void;
14
+ private createAgentMesh;
15
+ }
@@ -0,0 +1,2 @@
1
+ export * from './crowd-helper';
2
+ export * from './nav-mesh-helper';
@@ -0,0 +1,17 @@
1
+ import { NavMesh } from '@recast-navigation/core';
2
+ import { Group, Material, Mesh } from 'three';
3
+ export declare type NavMeshHelperParams = {
4
+ navMesh: NavMesh;
5
+ navMeshMaterial?: Material;
6
+ obstaclesMaterial?: Material;
7
+ };
8
+ export declare class NavMeshHelper {
9
+ navMesh: Mesh;
10
+ obstacles: Group;
11
+ recastNavMesh: NavMesh;
12
+ navMeshMaterial: Material;
13
+ obstaclesMaterial: Material;
14
+ constructor({ navMesh, navMeshMaterial, obstaclesMaterial }: NavMeshHelperParams);
15
+ updateNavMesh(): void;
16
+ updateObstacles(): void;
17
+ }
@@ -0,0 +1,2 @@
1
+ export * from './helpers';
2
+ export * from './utils';
@@ -0,0 +1,2 @@
1
+ import{MeshBasicMaterial as e,Group as t,Vector3 as s,CapsuleGeometry as a,Mesh as r,BufferGeometry as n,BufferAttribute as o}from"three";import{NavMesh as i}from"@recast-navigation/core";class h{agents;agentMeshes=new Map;recastCrowd;crowdMaterial;constructor({crowd:s,crowdMaterial:a}){this.recastCrowd=s,this.crowdMaterial=a??new e({color:"blue",wireframe:!0}),this.agents=new t}updateAgents(){const e=this.recastCrowd.getAgents(),t=new Set(this.agentMeshes.keys());for(const a of e){t.delete(a);const e=this.recastCrowd.getAgentPosition(a),r=this.recastCrowd.getAgentVelocity(a),n=this.recastCrowd.getAgentParameters(a);let o=this.agentMeshes.get(a);o||(o=this.createAgentMesh(n),this.agents.add(o),this.agentMeshes.set(a,o)),o.position.set(e.x,e.y+n.height/2,e.z),o.lookAt((new s).copy(o.position).add(r))}for(const e of t){const t=this.agentMeshes.get(e);t&&(this.agents.remove(t),this.agentMeshes.delete(e))}}createAgentMesh(e){const t=new a(e.radius,e.height-2*e.radius);return new r(t,this.crowdMaterial)}}class c{navMesh;obstacles;recastNavMesh;navMeshMaterial;obstaclesMaterial;constructor({navMesh:s,navMeshMaterial:a,obstaclesMaterial:o}){this.recastNavMesh=s,this.navMeshMaterial=a||new e({color:"blue",wireframe:!0}),this.obstaclesMaterial=o||new e({color:"red",wireframe:!0}),this.navMesh=new r(new n),this.obstacles=new t,this.updateNavMesh(),this.updateObstacles()}updateNavMesh(){const{positions:e,indices:t}=this.recastNavMesh.getDebugNavMesh();for(let e=0;e<t.length;e+=3){const s=t[e];t[e]=t[e+2],t[e+2]=s}const s=new n;s.setAttribute("position",new o(new Float32Array(e),3)),s.setIndex(new o(new Uint16Array(t),1)),s.computeVertexNormals(),this.navMesh.geometry=s}updateObstacles(){}}const l=e=>{const t=[];let a,n,o;e.traverse((e=>{e instanceof r&&t.push(e)}));const i=[],h=[];let c=0;for(a=0;a<t.length;a++)if(t[a]){const e=t[a],r=e.geometry.getIndex()?.array;if(!r)continue;const l=e.geometry.getAttribute("position").array;if(!l)continue;for(n=0;n<r.length;n++)i.push(r[n]+c);const g=new s;for(o=0;o<l.length;o+=3)g.set(l[o],l[o+1],l[o+2]),e.localToWorld(g),h.push(g.x,g.y,g.z);c+=l.length/3}return[h,i]},g=(e,t={})=>{const[s,a]=l(e),r=new i;return r.build(s,a,t),r};export{h as CrowdHelper,c as NavMeshHelper,g as threeToNavMesh,l as threeToNavMeshArgs};
2
+ //# sourceMappingURL=index.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es.js","sources":["../src/helpers/crowd-helper.ts","../src/helpers/nav-mesh-helper.ts","../src/utils/three-to-nav-mesh.ts"],"sourcesContent":["import { Crowd, CrowdAgentParams } from '@recast-navigation/core';\nimport {\n CapsuleGeometry,\n Group,\n Material,\n Mesh,\n MeshBasicMaterial,\n Vector3,\n} from 'three';\n\nexport type CrowdHelperParams = {\n crowd: Crowd;\n crowdMaterial?: Material;\n};\n\nexport class CrowdHelper {\n agents: Group;\n\n agentMeshes: Map<number, Mesh> = new Map();\n\n recastCrowd: Crowd;\n\n crowdMaterial: Material;\n\n constructor({ crowd, crowdMaterial }: CrowdHelperParams) {\n this.recastCrowd = crowd;\n \n this.crowdMaterial = crowdMaterial ?? new MeshBasicMaterial({ color: 'blue', wireframe: true });\n\n this.agents = new Group();\n }\n\n updateAgents() {\n const agentsIndices = this.recastCrowd.getAgents();\n\n const unseen = new Set(this.agentMeshes.keys());\n\n for (const i of agentsIndices) {\n unseen.delete(i);\n\n const position = this.recastCrowd.getAgentPosition(i);\n const velocity = this.recastCrowd.getAgentVelocity(i);\n const agentParams = this.recastCrowd.getAgentParameters(i);\n\n let agentMesh = this.agentMeshes.get(i);\n\n if (!agentMesh) {\n agentMesh = this.createAgentMesh(agentParams);\n this.agents.add(agentMesh);\n this.agentMeshes.set(i, agentMesh);\n }\n\n agentMesh.position.set(\n position.x,\n position.y + agentParams.height / 2,\n position.z\n );\n agentMesh.lookAt(\n new Vector3().copy(agentMesh.position).add(velocity as Vector3)\n ); \n }\n\n for (const agentId of unseen) {\n const agentMesh = this.agentMeshes.get(agentId);\n\n if (agentMesh) {\n this.agents.remove(agentMesh);\n this.agentMeshes.delete(agentId);\n }\n }\n }\n\n private createAgentMesh(agentParams: CrowdAgentParams): Mesh {\n const geometry = new CapsuleGeometry(\n agentParams.radius,\n agentParams.height - agentParams.radius * 2\n );\n\n return new Mesh(geometry, this.crowdMaterial);\n }\n}\n","import { NavMesh } from '@recast-navigation/core';\nimport {\n BufferAttribute,\n BufferGeometry, Group,\n Material,\n Mesh,\n MeshBasicMaterial\n} from 'three';\n\nexport type NavMeshHelperParams = {\n navMesh: NavMesh;\n navMeshMaterial?: Material;\n obstaclesMaterial?: Material;\n};\n\nexport class NavMeshHelper {\n navMesh: Mesh;\n\n obstacles: Group;\n\n recastNavMesh: NavMesh;\n\n navMeshMaterial: Material;\n\n obstaclesMaterial: Material;\n\n constructor({ navMesh, navMeshMaterial, obstaclesMaterial }: NavMeshHelperParams) {\n this.recastNavMesh = navMesh;\n\n this.navMeshMaterial = navMeshMaterial ? navMeshMaterial : new MeshBasicMaterial({ color: 'blue', wireframe: true });\n this.obstaclesMaterial = obstaclesMaterial ? obstaclesMaterial : new MeshBasicMaterial({ color: 'red', wireframe: true });\n\n this.navMesh = new Mesh(\n new BufferGeometry(),\n \n );\n\n this.obstacles = new Group();\n\n this.updateNavMesh();\n this.updateObstacles();\n }\n\n updateNavMesh() {\n const { positions, indices } = this.recastNavMesh.getDebugNavMesh();\n\n // Set the winding order of the affected faces to clockwise\n for (let i = 0; i < indices.length; i += 3) {\n const tmp = indices[i];\n indices[i] = indices[i + 2];\n indices[i + 2] = tmp;\n }\n\n const geometry = new BufferGeometry();\n\n geometry.setAttribute(\n 'position',\n new BufferAttribute(new Float32Array(positions), 3)\n );\n\n geometry.setIndex(new BufferAttribute(new Uint16Array(indices), 1));\n\n geometry.computeVertexNormals();\n\n this.navMesh.geometry = geometry;\n }\n\n updateObstacles() {\n /* todo! */\n }\n}\n","import { NavMesh, NavMeshConfig } from '@recast-navigation/core';\nimport { BufferAttribute, Mesh, Object3D, Vector3 } from 'three';\n\nexport const threeToNavMeshArgs = (\n object: Object3D\n): [positions: number[], indices: number[]] => {\n const meshes: Mesh[] = [];\n\n object.traverse((child) => {\n if (child instanceof Mesh) {\n meshes.push(child);\n }\n });\n\n let index: number;\n let tri: number;\n let pt: number;\n\n const indices: number[] = [];\n const positions: number[] = [];\n\n let offset = 0;\n for (index = 0; index < meshes.length; index++) {\n if (meshes[index]) {\n const mesh = meshes[index];\n\n const meshIndices = mesh.geometry.getIndex()?.array;\n if (!meshIndices) {\n // todo: to indexed?\n continue;\n }\n\n const meshPositions = (mesh.geometry.getAttribute(\n 'position'\n ) as BufferAttribute)!.array;\n if (!meshPositions) {\n continue;\n }\n\n for (tri = 0; tri < meshIndices.length; tri++) {\n indices.push(meshIndices[tri] + offset);\n }\n\n const position = new Vector3();\n for (pt = 0; pt < meshPositions.length; pt += 3) {\n position.set(\n meshPositions[pt],\n meshPositions[pt + 1],\n meshPositions[pt + 2]\n );\n mesh.localToWorld(position);\n\n positions.push(position.x, position.y, position.z);\n }\n\n offset += meshPositions.length / 3;\n }\n }\n\n return [positions, indices];\n};\n\nexport const threeToNavMesh = (\n object: Object3D,\n navMeshConfig: Partial<NavMeshConfig> = {}\n): NavMesh => {\n const [positions, indices] = threeToNavMeshArgs(object);\n\n const navMesh = new NavMesh();\n navMesh.build(positions, indices, navMeshConfig);\n\n return navMesh;\n};\n"],"names":["CrowdHelper","agents","agentMeshes","Map","recastCrowd","crowdMaterial","constructor","crowd","this","MeshBasicMaterial","color","wireframe","Group","updateAgents","agentsIndices","getAgents","unseen","Set","keys","i","delete","position","getAgentPosition","velocity","getAgentVelocity","agentParams","getAgentParameters","agentMesh","get","createAgentMesh","add","set","x","y","height","z","lookAt","Vector3","copy","agentId","remove","geometry","CapsuleGeometry","radius","Mesh","NavMeshHelper","navMesh","obstacles","recastNavMesh","navMeshMaterial","obstaclesMaterial","BufferGeometry","updateNavMesh","updateObstacles","positions","indices","getDebugNavMesh","length","tmp","setAttribute","BufferAttribute","Float32Array","setIndex","Uint16Array","computeVertexNormals","threeToNavMeshArgs","object","meshes","index","tri","pt","traverse","child","push","offset","mesh","meshIndices","getIndex","array","meshPositions","getAttribute","localToWorld","threeToNavMesh","navMeshConfig","NavMesh","build"],"mappings":"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"}
@@ -0,0 +1 @@
1
+ export * from './three-to-nav-mesh';
@@ -0,0 +1,4 @@
1
+ import { NavMesh, NavMeshConfig } from '@recast-navigation/core';
2
+ import { Object3D } from 'three';
3
+ export declare const threeToNavMeshArgs: (object: Object3D) => [positions: number[], indices: number[]];
4
+ export declare const threeToNavMesh: (object: Object3D, navMeshConfig?: Partial<NavMeshConfig>) => NavMesh;
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@recast-navigation/three",
3
+ "description": "Utilities for using recast-navigation with Three.js",
4
+ "author": {
5
+ "name": "Isaac Mason",
6
+ "email": "isaac@isaacmason.com",
7
+ "url": "https://isaacmason.com/"
8
+ },
9
+ "version": "0.0.0-development-0",
10
+ "license": "MIT",
11
+ "homepage": "https://github.com/isaac-mason/recast-navigation-js",
12
+ "bugs": {
13
+ "url": "https://github.com/isaac-mason/recast-navigation-js/issues"
14
+ },
15
+ "type": "module",
16
+ "main": "./dist/index.es.js",
17
+ "types": "./dist/index.d.ts",
18
+ "files": [
19
+ "dist/**",
20
+ "README.md",
21
+ "LICENSE"
22
+ ],
23
+ "scripts": {
24
+ "build": "rollup --config rollup.config.js --bundleConfigAsCjs"
25
+ },
26
+ "dependencies": {
27
+ "@recast-navigation/core": "0.0.0-development-0",
28
+ "three": "^0.150.1"
29
+ },
30
+ "peerDependencies": {
31
+ "three": "^0.150.1"
32
+ },
33
+ "devDependencies": {
34
+ "@rollup/plugin-commonjs": "^24.0.1",
35
+ "@rollup/plugin-node-resolve": "^15.0.1",
36
+ "@rollup/plugin-terser": "^0.4.0",
37
+ "@rollup/plugin-typescript": "^11.0.0",
38
+ "@types/three": "^0.150.0",
39
+ "@typescript-eslint/eslint-plugin": "^5.7.0",
40
+ "@typescript-eslint/parser": "^5.7.0",
41
+ "eslint": "^8.5.0",
42
+ "eslint-config-airbnb": "^18.2.1",
43
+ "eslint-config-airbnb-base": "^14.2.1",
44
+ "eslint-config-prettier": "^8.3.0",
45
+ "eslint-import-resolver-typescript": "^2.4.0",
46
+ "eslint-plugin-es": "^4.1.0",
47
+ "eslint-plugin-import": "^2.24.2",
48
+ "eslint-plugin-prettier": "^4.0.0",
49
+ "eslint-plugin-simple-import-sort": "^7.0.0",
50
+ "eslint-plugin-typescript-enum": "^2.1.0",
51
+ "prettier": "^2.3.2",
52
+ "rollup": "^3.20.0",
53
+ "rollup-plugin-copy": "^3.4.0",
54
+ "rollup-plugin-filesize": "^10.0.0",
55
+ "typescript": "^4.5.4"
56
+ },
57
+ "packageManager": "yarn@3.2.1"
58
+ }