Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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));
}
});
setNavMeshGeometry: function (geometry) {
this.navMesh = new THREE.Mesh(geometry);
pathfinder.setZoneData(ZONE, Pathfinding.createZone(geometry));
Array.from(this.agents).forEach((agent) => agent.updateNavLocation());
},