How to use the three-pathfinding.Pathfinding.createZone function in three-pathfinding

To help you get started, we’ve selected a few three-pathfinding examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mozilla / hubs / src / systems / nav.js View on Github external
loadMesh: function(mesh, zone) {
    this.el.object3D.updateMatrixWorld();
    const geometry = new THREE.Geometry().fromBufferGeometry(mesh.geometry);
    geometry.applyMatrix(mesh.matrixWorld);
    this.pathfinder.setZoneData(zone, Pathfinding.createZone(geometry));
  }
});
github donmccurdy / aframe-extras / src / pathfinding / system.js View on Github external
setNavMeshGeometry: function (geometry) {
    this.navMesh = new THREE.Mesh(geometry);
    pathfinder.setZoneData(ZONE, Pathfinding.createZone(geometry));
    Array.from(this.agents).forEach((agent) => agent.updateNavLocation());
  },

three-pathfinding

Navigation mesh toolkit for three.js, based on PatrolJS

MIT
Latest version published 5 months ago

Package Health Score

74 / 100
Full package analysis