@recast-navigation/core 0.4.0 → 0.4.1
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/dist/crowd.d.ts +1 -1
- package/dist/detour.d.ts +1 -1
- package/dist/generators/generate-tiled-nav-mesh.d.ts +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/nav-mesh-query.d.ts +1 -1
- package/dist/nav-mesh.d.ts +2 -2
- package/dist/raw-module.d.ts +2 -0
- package/dist/raw.d.ts +28 -15
- package/dist/recast.d.ts +1 -1
- package/dist/serdes/import-nav-mesh.d.ts +1 -1
- package/dist/tile-cache.d.ts +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +5 -3
package/dist/crowd.d.ts
CHANGED
package/dist/detour.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type R from '@recast-navigation/wasm';
|
|
2
1
|
import { NavMesh } from '../nav-mesh';
|
|
2
|
+
import type R from '../raw-module';
|
|
3
|
+
import { RecastCompactHeightfield, RecastConfigType, RecastHeightfield, RecastHeightfieldLayerSet } from '../recast';
|
|
3
4
|
import { TileCache } from '../tile-cache';
|
|
4
|
-
import { RecastConfigType, RecastCompactHeightfield, RecastHeightfield, RecastHeightfieldLayerSet } from '../recast';
|
|
5
5
|
export type TiledNavMeshGeneratorConfig = RecastConfigType & {
|
|
6
6
|
/**
|
|
7
7
|
* How many layers (or "floors") each navmesh tile is expected to have.
|
package/dist/index.d.ts
CHANGED
package/dist/index.es.js
CHANGED
|
@@ -3,5 +3,5 @@ const A=globalThis.FinalizationRegistry?(()=>{const A=new FinalizationRegistry((
|
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2010-2023 Three.js Authors
|
|
5
5
|
* SPDX-License-Identifier: MIT
|
|
6
|
-
*/function v(A,g,I){return Math.max(g,Math.min(I,A))}class O{constructor(A=0,g=0,I=0,C=1){this.isQuaternion=!0,this._x=A,this._y=g,this._z=I,this._w=C}static slerpFlat(A,g,I,C,t,B,Q){let e=I[C+0],E=I[C+1],o=I[C+2],i=I[C+3];const r=t[B+0],s=t[B+1],_=t[B+2],p=t[B+3];if(0===Q)return A[g+0]=e,A[g+1]=E,A[g+2]=o,void(A[g+3]=i);if(1===Q)return A[g+0]=r,A[g+1]=s,A[g+2]=_,void(A[g+3]=p);if(i!==p||e!==r||E!==s||o!==_){let A=1-Q;const g=e*r+E*s+o*_+i*p,I=g>=0?1:-1,C=1-g*g;if(C>Number.EPSILON){const t=Math.sqrt(C),B=Math.atan2(t,g*I);A=Math.sin(A*B)/t,Q=Math.sin(Q*B)/t}const t=Q*I;if(e=e*A+r*t,E=E*A+s*t,o=o*A+_*t,i=i*A+p*t,A===1-Q){const A=1/Math.sqrt(e*e+E*E+o*o+i*i);e*=A,E*=A,o*=A,i*=A}}A[g]=e,A[g+1]=E,A[g+2]=o,A[g+3]=i}static multiplyQuaternionsFlat(A,g,I,C,t,B){const Q=I[C],e=I[C+1],E=I[C+2],o=I[C+3],i=t[B],r=t[B+1],s=t[B+2],_=t[B+3];return A[g]=Q*_+o*i+e*s-E*r,A[g+1]=e*_+o*r+E*i-Q*s,A[g+2]=E*_+o*s+Q*r-e*i,A[g+3]=o*_-Q*i-e*r-E*s,A}get x(){return this._x}set x(A){this._x=A,this._onChangeCallback()}get y(){return this._y}set y(A){this._y=A,this._onChangeCallback()}get z(){return this._z}set z(A){this._z=A,this._onChangeCallback()}get w(){return this._w}set w(A){this._w=A,this._onChangeCallback()}set(A,g,I,C){return this._x=A,this._y=g,this._z=I,this._w=C,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(A){return this._x=A.x,this._y=A.y,this._z=A.z,this._w=A.w,this._onChangeCallback(),this}setFromEuler(A,g){const I=A._x,C=A._y,t=A._z,B=A._order,Q=Math.cos,e=Math.sin,E=Q(I/2),o=Q(C/2),i=Q(t/2),r=e(I/2),s=e(C/2),_=e(t/2);switch(B){case"XYZ":this._x=r*o*i+E*s*_,this._y=E*s*i-r*o*_,this._z=E*o*_+r*s*i,this._w=E*o*i-r*s*_;break;case"YXZ":this._x=r*o*i+E*s*_,this._y=E*s*i-r*o*_,this._z=E*o*_-r*s*i,this._w=E*o*i+r*s*_;break;case"ZXY":this._x=r*o*i-E*s*_,this._y=E*s*i+r*o*_,this._z=E*o*_+r*s*i,this._w=E*o*i-r*s*_;break;case"ZYX":this._x=r*o*i-E*s*_,this._y=E*s*i+r*o*_,this._z=E*o*_-r*s*i,this._w=E*o*i+r*s*_;break;case"YZX":this._x=r*o*i+E*s*_,this._y=E*s*i+r*o*_,this._z=E*o*_-r*s*i,this._w=E*o*i-r*s*_;break;case"XZY":this._x=r*o*i-E*s*_,this._y=E*s*i-r*o*_,this._z=E*o*_+r*s*i,this._w=E*o*i+r*s*_;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+B)}return!1!==g&&this._onChangeCallback(),this}setFromAxisAngle(A,g){const I=g/2,C=Math.sin(I);return this._x=A.x*C,this._y=A.y*C,this._z=A.z*C,this._w=Math.cos(I),this._onChangeCallback(),this}setFromRotationMatrix(A){const g=A.elements,I=g[0],C=g[4],t=g[8],B=g[1],Q=g[5],e=g[9],E=g[2],o=g[6],i=g[10],r=I+Q+i;if(r>0){const A=.5/Math.sqrt(r+1);this._w=.25/A,this._x=(o-e)*A,this._y=(t-E)*A,this._z=(B-C)*A}else if(I>Q&&I>i){const A=2*Math.sqrt(1+I-Q-i);this._w=(o-e)/A,this._x=.25*A,this._y=(C+B)/A,this._z=(t+E)/A}else if(Q>i){const A=2*Math.sqrt(1+Q-I-i);this._w=(t-E)/A,this._x=(C+B)/A,this._y=.25*A,this._z=(e+o)/A}else{const A=2*Math.sqrt(1+i-I-Q);this._w=(B-C)/A,this._x=(t+E)/A,this._y=(e+o)/A,this._z=.25*A}return this._onChangeCallback(),this}setFromUnitVectors(A,g){let I=A.dot(g)+1;return I<Number.EPSILON?(I=0,Math.abs(A.x)>Math.abs(A.z)?(this._x=-A.y,this._y=A.x,this._z=0,this._w=I):(this._x=0,this._y=-A.z,this._z=A.y,this._w=I)):(this._x=A.y*g.z-A.z*g.y,this._y=A.z*g.x-A.x*g.z,this._z=A.x*g.y-A.y*g.x,this._w=I),this.normalize()}angleTo(A){return 2*Math.acos(Math.abs(v(this.dot(A),-1,1)))}rotateTowards(A,g){const I=this.angleTo(A);if(0===I)return this;const C=Math.min(1,g/I);return this.slerp(A,C),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(A){return this._x*A._x+this._y*A._y+this._z*A._z+this._w*A._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let A=this.length();return 0===A?(this._x=0,this._y=0,this._z=0,this._w=1):(A=1/A,this._x=this._x*A,this._y=this._y*A,this._z=this._z*A,this._w=this._w*A),this._onChangeCallback(),this}multiply(A){return this.multiplyQuaternions(this,A)}premultiply(A){return this.multiplyQuaternions(A,this)}multiplyQuaternions(A,g){const I=A._x,C=A._y,t=A._z,B=A._w,Q=g._x,e=g._y,E=g._z,o=g._w;return this._x=I*o+B*Q+C*E-t*e,this._y=C*o+B*e+t*Q-I*E,this._z=t*o+B*E+I*e-C*Q,this._w=B*o-I*Q-C*e-t*E,this._onChangeCallback(),this}slerp(A,g){if(0===g)return this;if(1===g)return this.copy(A);const I=this._x,C=this._y,t=this._z,B=this._w;let Q=B*A._w+I*A._x+C*A._y+t*A._z;if(Q<0?(this._w=-A._w,this._x=-A._x,this._y=-A._y,this._z=-A._z,Q=-Q):this.copy(A),Q>=1)return this._w=B,this._x=I,this._y=C,this._z=t,this;const e=1-Q*Q;if(e<=Number.EPSILON){const A=1-g;return this._w=A*B+g*this._w,this._x=A*I+g*this._x,this._y=A*C+g*this._y,this._z=A*t+g*this._z,this.normalize(),this._onChangeCallback(),this}const E=Math.sqrt(e),o=Math.atan2(E,Q),i=Math.sin((1-g)*o)/E,r=Math.sin(g*o)/E;return this._w=B*i+this._w*r,this._x=I*i+this._x*r,this._y=C*i+this._y*r,this._z=t*i+this._z*r,this._onChangeCallback(),this}slerpQuaternions(A,g,I){return this.copy(A).slerp(g,I)}random(){const A=Math.random(),g=Math.sqrt(1-A),I=Math.sqrt(A),C=2*Math.PI*Math.random(),t=2*Math.PI*Math.random();return this.set(g*Math.cos(C),I*Math.sin(t),I*Math.cos(t),g*Math.sin(C))}equals(A){return A._x===this._x&&A._y===this._y&&A._z===this._z&&A._w===this._w}fromArray(A,g=0){return this._x=A[g],this._y=A[g+1],this._z=A[g+2],this._w=A[g+3],this._onChangeCallback(),this}toArray(A=[],g=0){return A[g]=this._x,A[g+1]=this._y,A[g+2]=this._z,A[g+3]=this._w,A}fromBufferAttribute(A,g){return this._x=A.getX(g),this._y=A.getY(g),this._z=A.getZ(g),this._w=A.getW(g),this}toJSON(){return this.toArray()}_onChange(A){return this._onChangeCallback=A,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class P{constructor(A=0,g=0,I=0){P.prototype.isVector3=!0,this.x=A,this.y=g,this.z=I}set(A,g,I){return void 0===I&&(I=this.z),this.x=A,this.y=g,this.z=I,this}setScalar(A){return this.x=A,this.y=A,this.z=A,this}setX(A){return this.x=A,this}setY(A){return this.y=A,this}setZ(A){return this.z=A,this}setComponent(A,g){switch(A){case 0:this.x=g;break;case 1:this.y=g;break;case 2:this.z=g;break;default:throw new Error("index is out of range: "+A)}return this}getComponent(A){switch(A){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+A)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(A){return this.x=A.x,this.y=A.y,this.z=A.z,this}add(A){return this.x+=A.x,this.y+=A.y,this.z+=A.z,this}addScalar(A){return this.x+=A,this.y+=A,this.z+=A,this}addVectors(A,g){return this.x=A.x+g.x,this.y=A.y+g.y,this.z=A.z+g.z,this}addScaledVector(A,g){return this.x+=A.x*g,this.y+=A.y*g,this.z+=A.z*g,this}sub(A){return this.x-=A.x,this.y-=A.y,this.z-=A.z,this}subScalar(A){return this.x-=A,this.y-=A,this.z-=A,this}subVectors(A,g){return this.x=A.x-g.x,this.y=A.y-g.y,this.z=A.z-g.z,this}multiply(A){return this.x*=A.x,this.y*=A.y,this.z*=A.z,this}multiplyScalar(A){return this.x*=A,this.y*=A,this.z*=A,this}multiplyVectors(A,g){return this.x=A.x*g.x,this.y=A.y*g.y,this.z=A.z*g.z,this}applyEuler(A){return this.applyQuaternion(V.setFromEuler(A))}applyAxisAngle(A,g){return this.applyQuaternion(V.setFromAxisAngle(A,g))}applyMatrix3(A){const g=this.x,I=this.y,C=this.z,t=A.elements;return this.x=t[0]*g+t[3]*I+t[6]*C,this.y=t[1]*g+t[4]*I+t[7]*C,this.z=t[2]*g+t[5]*I+t[8]*C,this}applyNormalMatrix(A){return this.applyMatrix3(A).normalize()}applyMatrix4(A){const g=this.x,I=this.y,C=this.z,t=A.elements,B=1/(t[3]*g+t[7]*I+t[11]*C+t[15]);return this.x=(t[0]*g+t[4]*I+t[8]*C+t[12])*B,this.y=(t[1]*g+t[5]*I+t[9]*C+t[13])*B,this.z=(t[2]*g+t[6]*I+t[10]*C+t[14])*B,this}applyQuaternion(A){const g=this.x,I=this.y,C=this.z,t=A.x,B=A.y,Q=A.z,e=A.w,E=e*g+B*C-Q*I,o=e*I+Q*g-t*C,i=e*C+t*I-B*g,r=-t*g-B*I-Q*C;return this.x=E*e+r*-t+o*-Q-i*-B,this.y=o*e+r*-B+i*-t-E*-Q,this.z=i*e+r*-Q+E*-B-o*-t,this}project(A){return this.applyMatrix4(A.matrixWorldInverse).applyMatrix4(A.projectionMatrix)}unproject(A){return this.applyMatrix4(A.projectionMatrixInverse).applyMatrix4(A.matrixWorld)}transformDirection(A){const g=this.x,I=this.y,C=this.z,t=A.elements;return this.x=t[0]*g+t[4]*I+t[8]*C,this.y=t[1]*g+t[5]*I+t[9]*C,this.z=t[2]*g+t[6]*I+t[10]*C,this.normalize()}divide(A){return this.x/=A.x,this.y/=A.y,this.z/=A.z,this}divideScalar(A){return this.multiplyScalar(1/A)}min(A){return this.x=Math.min(this.x,A.x),this.y=Math.min(this.y,A.y),this.z=Math.min(this.z,A.z),this}max(A){return this.x=Math.max(this.x,A.x),this.y=Math.max(this.y,A.y),this.z=Math.max(this.z,A.z),this}clamp(A,g){return this.x=Math.max(A.x,Math.min(g.x,this.x)),this.y=Math.max(A.y,Math.min(g.y,this.y)),this.z=Math.max(A.z,Math.min(g.z,this.z)),this}clampScalar(A,g){return this.x=Math.max(A,Math.min(g,this.x)),this.y=Math.max(A,Math.min(g,this.y)),this.z=Math.max(A,Math.min(g,this.z)),this}clampLength(A,g){const I=this.length();return this.divideScalar(I||1).multiplyScalar(Math.max(A,Math.min(g,I)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(A){return this.x*A.x+this.y*A.y+this.z*A.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(A){return this.normalize().multiplyScalar(A)}lerp(A,g){return this.x+=(A.x-this.x)*g,this.y+=(A.y-this.y)*g,this.z+=(A.z-this.z)*g,this}lerpVectors(A,g,I){return this.x=A.x+(g.x-A.x)*I,this.y=A.y+(g.y-A.y)*I,this.z=A.z+(g.z-A.z)*I,this}cross(A){return this.crossVectors(this,A)}crossVectors(A,g){const I=A.x,C=A.y,t=A.z,B=g.x,Q=g.y,e=g.z;return this.x=C*e-t*Q,this.y=t*B-I*e,this.z=I*Q-C*B,this}projectOnVector(A){const g=A.lengthSq();if(0===g)return this.set(0,0,0);const I=A.dot(this)/g;return this.copy(A).multiplyScalar(I)}projectOnPlane(A){return W.copy(this).projectOnVector(A),this.sub(W)}reflect(A){return this.sub(W.copy(A).multiplyScalar(2*this.dot(A)))}angleTo(A){const g=Math.sqrt(this.lengthSq()*A.lengthSq());if(0===g)return Math.PI/2;const I=this.dot(A)/g;return Math.acos(v(I,-1,1))}distanceTo(A){return Math.sqrt(this.distanceToSquared(A))}distanceToSquared(A){const g=this.x-A.x,I=this.y-A.y,C=this.z-A.z;return g*g+I*I+C*C}manhattanDistanceTo(A){return Math.abs(this.x-A.x)+Math.abs(this.y-A.y)+Math.abs(this.z-A.z)}setFromSpherical(A){return this.setFromSphericalCoords(A.radius,A.phi,A.theta)}setFromSphericalCoords(A,g,I){const C=Math.sin(g)*A;return this.x=C*Math.sin(I),this.y=Math.cos(g)*A,this.z=C*Math.cos(I),this}setFromCylindrical(A){return this.setFromCylindricalCoords(A.radius,A.theta,A.y)}setFromCylindricalCoords(A,g,I){return this.x=A*Math.sin(g),this.y=I,this.z=A*Math.cos(g),this}setFromMatrixPosition(A){const g=A.elements;return this.x=g[12],this.y=g[13],this.z=g[14],this}setFromMatrixScale(A){const g=this.setFromMatrixColumn(A,0).length(),I=this.setFromMatrixColumn(A,1).length(),C=this.setFromMatrixColumn(A,2).length();return this.x=g,this.y=I,this.z=C,this}setFromMatrixColumn(A,g){return this.fromArray(A.elements,4*g)}setFromMatrix3Column(A,g){return this.fromArray(A.elements,3*g)}setFromEuler(A){return this.x=A._x,this.y=A._y,this.z=A._z,this}setFromColor(A){return this.x=A.r,this.y=A.g,this.z=A.b,this}equals(A){return A.x===this.x&&A.y===this.y&&A.z===this.z}fromArray(A,g=0){return this.x=A[g],this.y=A[g+1],this.z=A[g+2],this}toArray(A=[],g=0){return A[g]=this.x,A[g+1]=this.y,A[g+2]=this.z,A}fromBufferAttribute(A,g){return this.x=A.getX(g),this.y=A.getY(g),this.z=A.getZ(g),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const A=2*(Math.random()-.5),g=Math.random()*Math.PI*2,I=Math.sqrt(1-A**2);return this.x=I*Math.cos(g),this.y=I*Math.sin(g),this.z=A,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const W=new P,V=new O;"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"155"}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="155");const X=(A,g)=>{const I=[],C=new P(1/0,1/0,1/0),t=new P(-1/0,-1/0,-1/0);let B=0;for(let Q=0;Q<g.length;Q++){const e=3*g[B++],E=new P(A[e],A[e+1],A[e+2]);C.x=Math.min(C.x,E.x),C.y=Math.min(C.y,E.y),C.z=Math.min(C.z,E.z),t.x=Math.max(t.x,E.x),t.y=Math.max(t.y,E.y),t.z=Math.max(t.z,E.z),I[Q]=E}const Q=[],e=I.length;for(let A=0;A<I.length;A++)Q[3*A+0]=I[A].x,Q[3*A+1]=I[A].y,Q[3*A+2]=I[A].z;const E=[],o=I.length/3;for(let A=0;A<I.length;A++)E[A]=I.length-A-1;return{verts:Q,nVerts:e,tris:E,nTris:o,bbMin:C.toArray(),bbMax:t.toArray()}},Z={...U},z=(A,g,I={},C=!1)=>{const t={},B=A=>(C||(t.heightfield&&Q.Recast.freeHeightfield(t.heightfield.raw),t.compactHeightfield&&Q.Recast.freeCompactHeightfield(t.compactHeightfield.raw),t.contourSet&&Q.Recast.freeContourSet(t.contourSet.raw)),{navMesh:void 0,success:!1,intermediates:C?t:void 0,error:A}),{verts:e,nVerts:E,tris:o,nTris:i,bbMin:r,bbMax:s}=X(A,g),_=new Q.Arrays.FloatArray;_.copy(e,e.length);const p=new Q.Arrays.IntArray;p.copy(o,o.length);const{raw:a}=l.create({...Z,...I});a.minRegionArea=a.minRegionArea*a.minRegionArea,a.mergeRegionArea=a.mergeRegionArea*a.mergeRegionArea,a.detailSampleDist=a.detailSampleDist<.9?0:a.cs*a.detailSampleDist,a.detailSampleMaxError=a.ch*a.detailSampleMaxError;const y=Q.Recast.calcGridSize(r,s,a.cs);a.width=y.width,a.height=y.height;const n=new Q.rcContext,c=Q.Recast.allocHeightfield();if(t.heightfield=new K(c),!Q.Recast.createHeightfield(n,c,a.width,a.height,r,s,a.cs,a.ch))return B("Could not create heightfield");const D=new Q.Arrays.UnsignedCharArray;if(D.resize(i),Q.Recast.markWalkableTriangles(n,a.walkableSlopeAngle,_,E,p,i,D),!Q.Recast.rasterizeTriangles(n,_,E,p,D,i,c,a.walkableClimb))return B("Could not rasterize triangles");D.free(),Q.Recast.filterLowHangingWalkableObstacles(n,a.walkableClimb,c),Q.Recast.filterLedgeSpans(n,a.walkableHeight,a.walkableClimb,c),Q.Recast.filterWalkableLowHeightSpans(n,a.walkableHeight,c);const h=Q.Recast.allocCompactHeightfield();if(t.compactHeightfield=new J(h),!Q.Recast.buildCompactHeightfield(n,a.walkableHeight,a.walkableClimb,c,h))return B("Failed to build compact data");if(!Q.Recast.erodeWalkableArea(n,a.walkableRadius,h))return B("Failed to erode walkable area");if(!Q.Recast.buildDistanceField(n,h))return B("Failed to build distance field");if(!Q.Recast.buildRegions(n,h,a.borderSize,a.minRegionArea,a.mergeRegionArea))return B("Failed to build regions");const w=Q.Recast.allocContourSet();if(t.contourSet=new u(w),!Q.Recast.buildContours(n,h,a.maxSimplificationError,a.maxEdgeLen,w,Q.Module.RC_CONTOUR_TESS_WALL_EDGES))return B("Failed to create contours");const d=Q.Recast.allocPolyMesh();if(!Q.Recast.buildPolyMesh(n,w,a.maxVertsPerPoly,d))return B("Failed to triangulate contours");const R=Q.Recast.allocPolyMeshDetail();if(!Q.Recast.buildPolyMeshDetail(n,d,h,a.detailSampleDist,a.detailSampleMaxError,R))return B("Failed to build detail mesh");C||(Q.Recast.freeHeightfield(c),Q.Recast.freeCompactHeightfield(h),Q.Recast.freeContourSet(w));for(let A=0;A<d.npolys;A++)d.get_areas(A)==Q.Recast.WALKABLE_AREA&&d.set_areas(A,0),0==d.get_areas(A)&&d.set_flags(A,1);const G=new Q.dtNavMeshCreateParams;Q.DetourNavMeshBuilder.setSoloNavMeshCreateParams(G,d,R,a),Q.DetourNavMeshBuilder.setOffMeshConCount(G,0);const M=Q.DetourNavMeshBuilder.createNavMeshData(G);if(!M.success)return B("Failed to create Detour navmesh data");const F=new L,N=M.navMeshData;return F.initSolo(N)?{success:!0,navMesh:F,intermediates:C?t:void 0}:B("Failed to create Detour navmesh")};class ${raw;constructor(A){this.raw=A}static create(A){const g=new Q.Module.dtTileCacheParams;return g.set_orig(0,A.orig[0]),g.set_orig(1,A.orig[1]),g.set_orig(2,A.orig[2]),g.set_cs(A.cs),g.set_ch(A.ch),g.set_width(A.width),g.set_height(A.height),g.set_walkableHeight(A.walkableHeight),g.set_walkableRadius(A.walkableRadius),g.set_walkableClimb(A.walkableClimb),g.set_maxSimplificationError(A.maxSimplificationError),g.set_maxTiles(A.maxTiles),g.set_maxObstacles(A.maxObstacles),new $(g)}}class AA{raw;obstacles=new Map;constructor(g){this.raw=g??new Q.Module.TileCache,A.register(this)}init(A,g,I,C){return this.raw.init(A,g,I,C.raw)}update(A){const{status:g,upToDate:I}=this.raw.update(A.raw);return{status:g,upToDate:I}}addCylinderObstacle(A,g,I){const C=this.raw.addCylinderObstacle(E.toRaw(A),g,I),t={type:"cylinder",ref:C,position:A,radius:g,height:I};return this.obstacles.set(C,t),t}addBoxObstacle(A,g,I){const C=this.raw.addBoxObstacle(E.toRaw(A),E.toRaw(g),I),t={type:"box",ref:C,position:A,extent:g,angle:I};return this.obstacles.set(C,t),t}removeObstacle(A){let g;g="object"==typeof A?A.ref:A,this.obstacles.delete(g),this.raw.removeObstacle(g)}addTile(A,g=Q.Module.DT_COMPRESSEDTILE_FREE_DATA){return this.raw.addTile(A,g)}buildNavMeshTile(A,g){return this.raw.buildNavMeshTile(A,g.raw)}buildNavMeshTilesAt(A,g,I){return this.raw.buildNavMeshTilesAt(A,g,I.raw)}destroy(){A.unregister(this),this.raw.destroy()}}class gA{raw;constructor(A){this.raw=new Q.Module.TileCacheMeshProcess,this.raw.process=(g,I,C)=>{const t=Q.Module.wrapPointer(g,Q.Module.dtNavMeshCreateParams),B=Q.Module.wrapPointer(I,Q.Module.UnsignedCharArray),e=Q.Module.wrapPointer(C,Q.Module.UnsignedShortArray);A&&A(t,B,e)}}}const IA={...U,tileSize:32,expectedLayersPerTile:4,maxObstacles:128},CA=(A,g,I={},C=!1)=>{let t={chunkyTriMesh:void 0,tileIntermediates:[]};const B=A=>{if(!C)for(let A=0;A<t.tileIntermediates.length;A++){const g=t.tileIntermediates[A];g.heightfieldLayerSet&&Q.Recast.freeHeightfieldLayerSet(g.heightfieldLayerSet.raw),g.compactHeightfield&&Q.Recast.freeCompactHeightfield(g.compactHeightfield.raw),g.heightfield&&Q.Recast.freeHeightfield(g.heightfield.raw)}return{success:!1,navMesh:void 0,tileCache:void 0,intermediates:C?t:void 0,error:A}},{verts:e,nVerts:E,tris:o,nTris:i,bbMin:r,bbMax:s}=X(A,g),_=new Q.Arrays.FloatArray;_.copy(e,e.length);const p=new Q.Arrays.IntArray;p.copy(o,o.length);const{expectedLayersPerTile:a,maxObstacles:y,...n}={...IA,...I},{raw:c}=l.create(n);c.minRegionArea=c.minRegionArea*c.minRegionArea,c.mergeRegionArea=c.mergeRegionArea*c.mergeRegionArea,c.detailSampleDist=c.detailSampleDist<.9?0:c.cs*c.detailSampleDist,c.detailSampleMaxError=c.ch*c.detailSampleMaxError;const D=Q.Recast.calcGridSize(r,s,c.cs);c.width=D.width,c.height=D.height;const h=new AA,w=new L,d=Math.round(c.tileSize),R=Math.floor((c.width+d-1)/d),G=Math.floor((c.height+d-1)/d);c.borderSize=c.walkableRadius+3,c.width=c.tileSize+2*c.borderSize,c.height=c.tileSize+2*c.borderSize;const M=new Q.dtTileCacheParams;M.set_orig(0,r[0]),M.set_orig(1,r[1]),M.set_orig(2,r[2]),M.cs=c.cs,M.ch=c.ch,M.width=c.tileSize,M.height=c.tileSize,M.walkableHeight=c.walkableHeight,M.walkableRadius=c.walkableRadius,M.walkableClimb=c.walkableClimb,M.maxSimplificationError=c.maxSimplificationError,M.maxTiles=R*G*a,M.maxObstacles=y;const F=new Q.RecastLinearAllocator(32e3),N=new Q.RecastFastLZCompressor,S=new gA(((A,g,I)=>{for(let C=0;C<A.polyCount;++C)g.set_data(C,0),I.set_data(C,1);Q.DetourNavMeshBuilder.setOffMeshConCount(A,0)}));if(!h.init(M,F,N,S))return B("Failed to initialize tile cache");const b=new Q.dtNavMeshParams;b.set_orig(0,r[0]),b.set_orig(1,r[1]),b.set_orig(2,r[2]),b.tileWidth=c.tileSize*c.cs,b.tileHeight=c.tileSize*c.cs;let U=Math.min(Math.round(function(A){let g=0,I=0;return g=Number(A>65535)<<4,A>>=g,I=Number(A>255)<<3,A>>=I,g|=I,I=Number(A>15)<<2,A>>=I,g|=I,I=Number(A>3)<<1,g|=I,g|=(A>>=I)>>1,g}((k=R*G*a,k--,k|=k>>1,k|=k>>2,k|=k>>4,k|=k>>8,k|=k>>16,++k))),14);var k;U>14&&(U=14);let f=22-U;if(b.maxTiles=1<<U,b.maxPolys=1<<f,!w.initTiled(b))return B("Failed to initialize tiled navmesh");const m=new Q.rcChunkyTriMesh;if(t.chunkyTriMesh=m,!Q.ChunkyTriMesh.createChunkyTriMesh(_,p,i,256,m))return B("Failed to build chunky triangle mesh");const Y=(A,g)=>{const I=new Q.rcContext,C=c.tileSize*c.cs,{raw:B}=new l(c).clone(),e=[r[0]+A*C,r[1],r[2]+g*C],o=[r[0]+(A+1)*C,s[1],r[2]+(g+1)*C];e[0]-=B.borderSize*B.cs,e[2]-=B.borderSize*B.cs,o[0]+=B.borderSize*B.cs,o[2]+=B.borderSize*B.cs,B.set_bmin(0,e[0]),B.set_bmin(1,e[1]),B.set_bmin(2,e[2]),B.set_bmax(0,o[0]),B.set_bmax(1,o[1]),B.set_bmax(2,o[2]);const i=Q.Recast.allocHeightfield();if(!Q.Recast.createHeightfield(I,i,B.width,B.height,e,o,B.cs,B.ch))return{n:0};const p=[e[0],e[2]],a=[o[0],o[2]],y=new Q.Arrays.IntArray;y.resize(512);const n=Q.ChunkyTriMesh.getChunksOverlappingRect(m,p,a,y,512);if(0===n)return{n:0};for(let A=0;A<n;++A){const g=y.get_data(A),C=m.get_nodes(g).n,t=Q.ChunkyTriMesh.getChunkyTriMeshNodeTris(m,g),e=new Q.Arrays.UnsignedCharArray;e.resize(C),Q.Recast.markWalkableTriangles(I,B.walkableSlopeAngle,_,E,t,C,e);const o=Q.Recast.rasterizeTriangles(I,_,E,t,e,C,i,B.walkableClimb);if(e.free(),!o)return{n:0}}Q.Recast.filterLowHangingWalkableObstacles(I,c.walkableClimb,i),Q.Recast.filterLedgeSpans(I,c.walkableHeight,c.walkableClimb,i),Q.Recast.filterWalkableLowHeightSpans(I,c.walkableHeight,i);const D=Q.Recast.allocCompactHeightfield();if(!Q.Recast.buildCompactHeightfield(I,c.walkableHeight,c.walkableClimb,i,D))return{n:0};if(!Q.Recast.erodeWalkableArea(I,c.walkableRadius,D))return{n:0};const h=Q.Recast.allocHeightfieldLayerSet();if(!Q.Recast.buildHeightfieldLayers(I,D,c.borderSize,c.walkableHeight,h))return{n:0};const w=[];for(let I=0;I<h.nlayers;I++){const C=new Q.TileCacheData,t=h.get_layers(I),B=new Q.dtTileCacheLayerHeader;B.magic=Q.Detour.TILECACHE_MAGIC,B.version=Q.Detour.TILECACHE_VERSION,B.tx=A,B.ty=g,B.tlayer=I,B.set_bmin(0,t.get_bmin(0)),B.set_bmin(1,t.get_bmin(1)),B.set_bmin(2,t.get_bmin(2)),B.set_bmax(0,t.get_bmax(0)),B.set_bmax(1,t.get_bmax(1)),B.set_bmax(2,t.get_bmax(2)),B.width=t.width,B.height=t.height,B.minx=t.minx,B.maxx=t.maxx,B.miny=t.miny,B.maxy=t.maxy,B.hmin=t.hmin,B.hmax=t.hmax;const e=Q.Recast.getHeightfieldLayerHeights(t),E=Q.Recast.getHeightfieldLayerAreas(t),o=Q.Recast.getHeightfieldLayerCons(t),i=Q.DetourTileCacheBuilder.buildTileCacheLayer(N,B,e,E,o,C);if(Q.Detour.statusFailed(i))return{n:0};w.push(C)}return t.tileIntermediates.push({tx:A,ty:g,heightfield:new K(i),compactHeightfield:new J(D),heightfieldLayerSet:new T(h)}),{n:w.length,tiles:w}};for(let A=0;A<G;++A)for(let g=0;g<R;++g){const{n:I,tiles:C}=Y(g,A);if(I>0&&C)for(let A=0;A<I;A++){const g=C[A],I=h.addTile(g);Q.Detour.statusFailed(I.status)&&console.error("Failed to add tile to tile cache")}}for(let A=0;A<G;A++)for(let g=0;g<R;g++){const I=h.buildNavMeshTilesAt(g,A,w);if(Q.Detour.statusFailed(I))return B(`Failed to build nav mesh tiles at ${g}, ${A}`)}if(!C)for(let A=0;A<t.tileIntermediates.length;A++){const g=t.tileIntermediates[A];Q.Recast.freeHeightfieldLayerSet(g.heightfieldLayerSet.raw),Q.Recast.freeCompactHeightfield(g.compactHeightfield.raw),Q.Recast.freeHeightfield(g.heightfield.raw)}return{success:!0,tileCache:h,navMesh:w,intermediates:C?t:void 0}};const tA=(A,g)=>{const I=Q.NavMeshExporter.exportNavMesh(A.raw,g?.raw),C=new Uint8Array(Q.Module.HEAPU8.buffer,I.dataPointer,I.size),t=new Uint8Array(I.size);return t.set(C),Q.NavMeshExporter.freeNavMeshExport(I),t},BA=(A,g)=>{const I=A.length*A.BYTES_PER_ELEMENT,C=Q.Module._malloc(I),t=new Uint8Array(Q.Module.HEAPU8.buffer,C,I);t.set(A);const B=new Q.Module.NavMeshExport;B.dataPointer=t.byteOffset,B.size=A.length;const e=Q.NavMeshImporter.importNavMesh(B,g.raw);Q.Module._free(t.byteOffset);const E=e.navMesh,o=e.tileCache;return{navMesh:new L(E),tileCache:new AA(o)}};export{s as Crowd,b as DebugNavMesh,a as DetourBVNode,p as DetourLink,n as DetourMeshHeader,D as DetourMeshTile,y as DetourOffMeshConnection,_ as DetourPolyDetail,L as NavMesh,w as NavMeshAddTileResult,R as NavMeshCalcTileLocResult,M as NavMeshGetOffMeshConnectionPolyEndPointsResult,N as NavMeshGetPolyAreaResult,F as NavMeshGetPolyFlagsResult,G as NavMeshGetTileAndPolyByRefResult,h as NavMeshGetTilesAtResult,i as NavMeshQuery,d as NavMeshRemoveTileResult,S as NavMeshStoreTileStateResult,Q as Raw,m as RecastCompactCell,J as RecastCompactHeightfield,Y as RecastCompactSpan,l as RecastConfig,H as RecastContour,u as RecastContourSet,K as RecastHeightfield,q as RecastHeightfieldLayer,T as RecastHeightfieldLayerSet,x as RecastPolyMesh,j as RecastPolyMeshDetail,k as RecastSpan,f as RecastSpanPool,AA as TileCache,gA as TileCacheMeshProcess,o as array,c as dtPoly,$ as dtTileCacheParams,tA as exportNavMesh,z as generateSoloNavMesh,CA as generateTiledNavMesh,BA as importNavMesh,e as init,U as recastConfigDefaults,Z as soloNavMeshGeneratorConfigDefaults,IA as tiledNavMeshGeneratorConfigDefaults,E as vec3};
|
|
6
|
+
*/function v(A,g,I){return Math.max(g,Math.min(I,A))}class O{constructor(A=0,g=0,I=0,C=1){this.isQuaternion=!0,this._x=A,this._y=g,this._z=I,this._w=C}static slerpFlat(A,g,I,C,t,B,Q){let e=I[C+0],E=I[C+1],o=I[C+2],i=I[C+3];const r=t[B+0],s=t[B+1],_=t[B+2],p=t[B+3];if(0===Q)return A[g+0]=e,A[g+1]=E,A[g+2]=o,void(A[g+3]=i);if(1===Q)return A[g+0]=r,A[g+1]=s,A[g+2]=_,void(A[g+3]=p);if(i!==p||e!==r||E!==s||o!==_){let A=1-Q;const g=e*r+E*s+o*_+i*p,I=g>=0?1:-1,C=1-g*g;if(C>Number.EPSILON){const t=Math.sqrt(C),B=Math.atan2(t,g*I);A=Math.sin(A*B)/t,Q=Math.sin(Q*B)/t}const t=Q*I;if(e=e*A+r*t,E=E*A+s*t,o=o*A+_*t,i=i*A+p*t,A===1-Q){const A=1/Math.sqrt(e*e+E*E+o*o+i*i);e*=A,E*=A,o*=A,i*=A}}A[g]=e,A[g+1]=E,A[g+2]=o,A[g+3]=i}static multiplyQuaternionsFlat(A,g,I,C,t,B){const Q=I[C],e=I[C+1],E=I[C+2],o=I[C+3],i=t[B],r=t[B+1],s=t[B+2],_=t[B+3];return A[g]=Q*_+o*i+e*s-E*r,A[g+1]=e*_+o*r+E*i-Q*s,A[g+2]=E*_+o*s+Q*r-e*i,A[g+3]=o*_-Q*i-e*r-E*s,A}get x(){return this._x}set x(A){this._x=A,this._onChangeCallback()}get y(){return this._y}set y(A){this._y=A,this._onChangeCallback()}get z(){return this._z}set z(A){this._z=A,this._onChangeCallback()}get w(){return this._w}set w(A){this._w=A,this._onChangeCallback()}set(A,g,I,C){return this._x=A,this._y=g,this._z=I,this._w=C,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(A){return this._x=A.x,this._y=A.y,this._z=A.z,this._w=A.w,this._onChangeCallback(),this}setFromEuler(A,g){const I=A._x,C=A._y,t=A._z,B=A._order,Q=Math.cos,e=Math.sin,E=Q(I/2),o=Q(C/2),i=Q(t/2),r=e(I/2),s=e(C/2),_=e(t/2);switch(B){case"XYZ":this._x=r*o*i+E*s*_,this._y=E*s*i-r*o*_,this._z=E*o*_+r*s*i,this._w=E*o*i-r*s*_;break;case"YXZ":this._x=r*o*i+E*s*_,this._y=E*s*i-r*o*_,this._z=E*o*_-r*s*i,this._w=E*o*i+r*s*_;break;case"ZXY":this._x=r*o*i-E*s*_,this._y=E*s*i+r*o*_,this._z=E*o*_+r*s*i,this._w=E*o*i-r*s*_;break;case"ZYX":this._x=r*o*i-E*s*_,this._y=E*s*i+r*o*_,this._z=E*o*_-r*s*i,this._w=E*o*i+r*s*_;break;case"YZX":this._x=r*o*i+E*s*_,this._y=E*s*i+r*o*_,this._z=E*o*_-r*s*i,this._w=E*o*i-r*s*_;break;case"XZY":this._x=r*o*i-E*s*_,this._y=E*s*i-r*o*_,this._z=E*o*_+r*s*i,this._w=E*o*i+r*s*_;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+B)}return!1!==g&&this._onChangeCallback(),this}setFromAxisAngle(A,g){const I=g/2,C=Math.sin(I);return this._x=A.x*C,this._y=A.y*C,this._z=A.z*C,this._w=Math.cos(I),this._onChangeCallback(),this}setFromRotationMatrix(A){const g=A.elements,I=g[0],C=g[4],t=g[8],B=g[1],Q=g[5],e=g[9],E=g[2],o=g[6],i=g[10],r=I+Q+i;if(r>0){const A=.5/Math.sqrt(r+1);this._w=.25/A,this._x=(o-e)*A,this._y=(t-E)*A,this._z=(B-C)*A}else if(I>Q&&I>i){const A=2*Math.sqrt(1+I-Q-i);this._w=(o-e)/A,this._x=.25*A,this._y=(C+B)/A,this._z=(t+E)/A}else if(Q>i){const A=2*Math.sqrt(1+Q-I-i);this._w=(t-E)/A,this._x=(C+B)/A,this._y=.25*A,this._z=(e+o)/A}else{const A=2*Math.sqrt(1+i-I-Q);this._w=(B-C)/A,this._x=(t+E)/A,this._y=(e+o)/A,this._z=.25*A}return this._onChangeCallback(),this}setFromUnitVectors(A,g){let I=A.dot(g)+1;return I<Number.EPSILON?(I=0,Math.abs(A.x)>Math.abs(A.z)?(this._x=-A.y,this._y=A.x,this._z=0,this._w=I):(this._x=0,this._y=-A.z,this._z=A.y,this._w=I)):(this._x=A.y*g.z-A.z*g.y,this._y=A.z*g.x-A.x*g.z,this._z=A.x*g.y-A.y*g.x,this._w=I),this.normalize()}angleTo(A){return 2*Math.acos(Math.abs(v(this.dot(A),-1,1)))}rotateTowards(A,g){const I=this.angleTo(A);if(0===I)return this;const C=Math.min(1,g/I);return this.slerp(A,C),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(A){return this._x*A._x+this._y*A._y+this._z*A._z+this._w*A._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let A=this.length();return 0===A?(this._x=0,this._y=0,this._z=0,this._w=1):(A=1/A,this._x=this._x*A,this._y=this._y*A,this._z=this._z*A,this._w=this._w*A),this._onChangeCallback(),this}multiply(A){return this.multiplyQuaternions(this,A)}premultiply(A){return this.multiplyQuaternions(A,this)}multiplyQuaternions(A,g){const I=A._x,C=A._y,t=A._z,B=A._w,Q=g._x,e=g._y,E=g._z,o=g._w;return this._x=I*o+B*Q+C*E-t*e,this._y=C*o+B*e+t*Q-I*E,this._z=t*o+B*E+I*e-C*Q,this._w=B*o-I*Q-C*e-t*E,this._onChangeCallback(),this}slerp(A,g){if(0===g)return this;if(1===g)return this.copy(A);const I=this._x,C=this._y,t=this._z,B=this._w;let Q=B*A._w+I*A._x+C*A._y+t*A._z;if(Q<0?(this._w=-A._w,this._x=-A._x,this._y=-A._y,this._z=-A._z,Q=-Q):this.copy(A),Q>=1)return this._w=B,this._x=I,this._y=C,this._z=t,this;const e=1-Q*Q;if(e<=Number.EPSILON){const A=1-g;return this._w=A*B+g*this._w,this._x=A*I+g*this._x,this._y=A*C+g*this._y,this._z=A*t+g*this._z,this.normalize(),this._onChangeCallback(),this}const E=Math.sqrt(e),o=Math.atan2(E,Q),i=Math.sin((1-g)*o)/E,r=Math.sin(g*o)/E;return this._w=B*i+this._w*r,this._x=I*i+this._x*r,this._y=C*i+this._y*r,this._z=t*i+this._z*r,this._onChangeCallback(),this}slerpQuaternions(A,g,I){return this.copy(A).slerp(g,I)}random(){const A=Math.random(),g=Math.sqrt(1-A),I=Math.sqrt(A),C=2*Math.PI*Math.random(),t=2*Math.PI*Math.random();return this.set(g*Math.cos(C),I*Math.sin(t),I*Math.cos(t),g*Math.sin(C))}equals(A){return A._x===this._x&&A._y===this._y&&A._z===this._z&&A._w===this._w}fromArray(A,g=0){return this._x=A[g],this._y=A[g+1],this._z=A[g+2],this._w=A[g+3],this._onChangeCallback(),this}toArray(A=[],g=0){return A[g]=this._x,A[g+1]=this._y,A[g+2]=this._z,A[g+3]=this._w,A}fromBufferAttribute(A,g){return this._x=A.getX(g),this._y=A.getY(g),this._z=A.getZ(g),this._w=A.getW(g),this}toJSON(){return this.toArray()}_onChange(A){return this._onChangeCallback=A,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class P{constructor(A=0,g=0,I=0){P.prototype.isVector3=!0,this.x=A,this.y=g,this.z=I}set(A,g,I){return void 0===I&&(I=this.z),this.x=A,this.y=g,this.z=I,this}setScalar(A){return this.x=A,this.y=A,this.z=A,this}setX(A){return this.x=A,this}setY(A){return this.y=A,this}setZ(A){return this.z=A,this}setComponent(A,g){switch(A){case 0:this.x=g;break;case 1:this.y=g;break;case 2:this.z=g;break;default:throw new Error("index is out of range: "+A)}return this}getComponent(A){switch(A){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+A)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(A){return this.x=A.x,this.y=A.y,this.z=A.z,this}add(A){return this.x+=A.x,this.y+=A.y,this.z+=A.z,this}addScalar(A){return this.x+=A,this.y+=A,this.z+=A,this}addVectors(A,g){return this.x=A.x+g.x,this.y=A.y+g.y,this.z=A.z+g.z,this}addScaledVector(A,g){return this.x+=A.x*g,this.y+=A.y*g,this.z+=A.z*g,this}sub(A){return this.x-=A.x,this.y-=A.y,this.z-=A.z,this}subScalar(A){return this.x-=A,this.y-=A,this.z-=A,this}subVectors(A,g){return this.x=A.x-g.x,this.y=A.y-g.y,this.z=A.z-g.z,this}multiply(A){return this.x*=A.x,this.y*=A.y,this.z*=A.z,this}multiplyScalar(A){return this.x*=A,this.y*=A,this.z*=A,this}multiplyVectors(A,g){return this.x=A.x*g.x,this.y=A.y*g.y,this.z=A.z*g.z,this}applyEuler(A){return this.applyQuaternion(V.setFromEuler(A))}applyAxisAngle(A,g){return this.applyQuaternion(V.setFromAxisAngle(A,g))}applyMatrix3(A){const g=this.x,I=this.y,C=this.z,t=A.elements;return this.x=t[0]*g+t[3]*I+t[6]*C,this.y=t[1]*g+t[4]*I+t[7]*C,this.z=t[2]*g+t[5]*I+t[8]*C,this}applyNormalMatrix(A){return this.applyMatrix3(A).normalize()}applyMatrix4(A){const g=this.x,I=this.y,C=this.z,t=A.elements,B=1/(t[3]*g+t[7]*I+t[11]*C+t[15]);return this.x=(t[0]*g+t[4]*I+t[8]*C+t[12])*B,this.y=(t[1]*g+t[5]*I+t[9]*C+t[13])*B,this.z=(t[2]*g+t[6]*I+t[10]*C+t[14])*B,this}applyQuaternion(A){const g=this.x,I=this.y,C=this.z,t=A.x,B=A.y,Q=A.z,e=A.w,E=e*g+B*C-Q*I,o=e*I+Q*g-t*C,i=e*C+t*I-B*g,r=-t*g-B*I-Q*C;return this.x=E*e+r*-t+o*-Q-i*-B,this.y=o*e+r*-B+i*-t-E*-Q,this.z=i*e+r*-Q+E*-B-o*-t,this}project(A){return this.applyMatrix4(A.matrixWorldInverse).applyMatrix4(A.projectionMatrix)}unproject(A){return this.applyMatrix4(A.projectionMatrixInverse).applyMatrix4(A.matrixWorld)}transformDirection(A){const g=this.x,I=this.y,C=this.z,t=A.elements;return this.x=t[0]*g+t[4]*I+t[8]*C,this.y=t[1]*g+t[5]*I+t[9]*C,this.z=t[2]*g+t[6]*I+t[10]*C,this.normalize()}divide(A){return this.x/=A.x,this.y/=A.y,this.z/=A.z,this}divideScalar(A){return this.multiplyScalar(1/A)}min(A){return this.x=Math.min(this.x,A.x),this.y=Math.min(this.y,A.y),this.z=Math.min(this.z,A.z),this}max(A){return this.x=Math.max(this.x,A.x),this.y=Math.max(this.y,A.y),this.z=Math.max(this.z,A.z),this}clamp(A,g){return this.x=Math.max(A.x,Math.min(g.x,this.x)),this.y=Math.max(A.y,Math.min(g.y,this.y)),this.z=Math.max(A.z,Math.min(g.z,this.z)),this}clampScalar(A,g){return this.x=Math.max(A,Math.min(g,this.x)),this.y=Math.max(A,Math.min(g,this.y)),this.z=Math.max(A,Math.min(g,this.z)),this}clampLength(A,g){const I=this.length();return this.divideScalar(I||1).multiplyScalar(Math.max(A,Math.min(g,I)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(A){return this.x*A.x+this.y*A.y+this.z*A.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(A){return this.normalize().multiplyScalar(A)}lerp(A,g){return this.x+=(A.x-this.x)*g,this.y+=(A.y-this.y)*g,this.z+=(A.z-this.z)*g,this}lerpVectors(A,g,I){return this.x=A.x+(g.x-A.x)*I,this.y=A.y+(g.y-A.y)*I,this.z=A.z+(g.z-A.z)*I,this}cross(A){return this.crossVectors(this,A)}crossVectors(A,g){const I=A.x,C=A.y,t=A.z,B=g.x,Q=g.y,e=g.z;return this.x=C*e-t*Q,this.y=t*B-I*e,this.z=I*Q-C*B,this}projectOnVector(A){const g=A.lengthSq();if(0===g)return this.set(0,0,0);const I=A.dot(this)/g;return this.copy(A).multiplyScalar(I)}projectOnPlane(A){return W.copy(this).projectOnVector(A),this.sub(W)}reflect(A){return this.sub(W.copy(A).multiplyScalar(2*this.dot(A)))}angleTo(A){const g=Math.sqrt(this.lengthSq()*A.lengthSq());if(0===g)return Math.PI/2;const I=this.dot(A)/g;return Math.acos(v(I,-1,1))}distanceTo(A){return Math.sqrt(this.distanceToSquared(A))}distanceToSquared(A){const g=this.x-A.x,I=this.y-A.y,C=this.z-A.z;return g*g+I*I+C*C}manhattanDistanceTo(A){return Math.abs(this.x-A.x)+Math.abs(this.y-A.y)+Math.abs(this.z-A.z)}setFromSpherical(A){return this.setFromSphericalCoords(A.radius,A.phi,A.theta)}setFromSphericalCoords(A,g,I){const C=Math.sin(g)*A;return this.x=C*Math.sin(I),this.y=Math.cos(g)*A,this.z=C*Math.cos(I),this}setFromCylindrical(A){return this.setFromCylindricalCoords(A.radius,A.theta,A.y)}setFromCylindricalCoords(A,g,I){return this.x=A*Math.sin(g),this.y=I,this.z=A*Math.cos(g),this}setFromMatrixPosition(A){const g=A.elements;return this.x=g[12],this.y=g[13],this.z=g[14],this}setFromMatrixScale(A){const g=this.setFromMatrixColumn(A,0).length(),I=this.setFromMatrixColumn(A,1).length(),C=this.setFromMatrixColumn(A,2).length();return this.x=g,this.y=I,this.z=C,this}setFromMatrixColumn(A,g){return this.fromArray(A.elements,4*g)}setFromMatrix3Column(A,g){return this.fromArray(A.elements,3*g)}setFromEuler(A){return this.x=A._x,this.y=A._y,this.z=A._z,this}setFromColor(A){return this.x=A.r,this.y=A.g,this.z=A.b,this}equals(A){return A.x===this.x&&A.y===this.y&&A.z===this.z}fromArray(A,g=0){return this.x=A[g],this.y=A[g+1],this.z=A[g+2],this}toArray(A=[],g=0){return A[g]=this.x,A[g+1]=this.y,A[g+2]=this.z,A}fromBufferAttribute(A,g){return this.x=A.getX(g),this.y=A.getY(g),this.z=A.getZ(g),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const A=2*(Math.random()-.5),g=Math.random()*Math.PI*2,I=Math.sqrt(1-A**2);return this.x=I*Math.cos(g),this.y=I*Math.sin(g),this.z=A,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const W=new P,V=new O;"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"155"}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="155");const X=(A,g)=>{const I=[],C=new P(1/0,1/0,1/0),t=new P(-1/0,-1/0,-1/0);let B=0;for(let Q=0;Q<g.length;Q++){const e=3*g[B++],E=new P(A[e],A[e+1],A[e+2]);C.x=Math.min(C.x,E.x),C.y=Math.min(C.y,E.y),C.z=Math.min(C.z,E.z),t.x=Math.max(t.x,E.x),t.y=Math.max(t.y,E.y),t.z=Math.max(t.z,E.z),I[Q]=E}const Q=[],e=I.length;for(let A=0;A<I.length;A++)Q[3*A+0]=I[A].x,Q[3*A+1]=I[A].y,Q[3*A+2]=I[A].z;const E=[],o=I.length/3;for(let A=0;A<I.length;A++)E[A]=I.length-A-1;return{verts:Q,nVerts:e,tris:E,nTris:o,bbMin:C.toArray(),bbMax:t.toArray()}},Z={...U},z=(A,g,I={},C=!1)=>{const t={},B=A=>(C||(t.heightfield&&Q.Recast.freeHeightfield(t.heightfield.raw),t.compactHeightfield&&Q.Recast.freeCompactHeightfield(t.compactHeightfield.raw),t.contourSet&&Q.Recast.freeContourSet(t.contourSet.raw)),{navMesh:void 0,success:!1,intermediates:C?t:void 0,error:A}),{verts:e,nVerts:E,tris:o,nTris:i,bbMin:r,bbMax:s}=X(A,g),_=new Q.Arrays.FloatArray;_.copy(e,e.length);const p=new Q.Arrays.IntArray;p.copy(o,o.length);const{raw:a}=l.create({...Z,...I});a.minRegionArea=a.minRegionArea*a.minRegionArea,a.mergeRegionArea=a.mergeRegionArea*a.mergeRegionArea,a.detailSampleDist=a.detailSampleDist<.9?0:a.cs*a.detailSampleDist,a.detailSampleMaxError=a.ch*a.detailSampleMaxError;const y=Q.Recast.calcGridSize(r,s,a.cs);a.width=y.width,a.height=y.height;const n=new Q.rcContext,c=Q.Recast.allocHeightfield();if(t.heightfield=new K(c),!Q.Recast.createHeightfield(n,c,a.width,a.height,r,s,a.cs,a.ch))return B("Could not create heightfield");const D=new Q.Arrays.UnsignedCharArray;if(D.resize(i),Q.Recast.markWalkableTriangles(n,a.walkableSlopeAngle,_,E,p,i,D),!Q.Recast.rasterizeTriangles(n,_,E,p,D,i,c,a.walkableClimb))return B("Could not rasterize triangles");D.free(),Q.Recast.filterLowHangingWalkableObstacles(n,a.walkableClimb,c),Q.Recast.filterLedgeSpans(n,a.walkableHeight,a.walkableClimb,c),Q.Recast.filterWalkableLowHeightSpans(n,a.walkableHeight,c);const h=Q.Recast.allocCompactHeightfield();if(t.compactHeightfield=new J(h),!Q.Recast.buildCompactHeightfield(n,a.walkableHeight,a.walkableClimb,c,h))return B("Failed to build compact data");if(!Q.Recast.erodeWalkableArea(n,a.walkableRadius,h))return B("Failed to erode walkable area");if(!Q.Recast.buildDistanceField(n,h))return B("Failed to build distance field");if(!Q.Recast.buildRegions(n,h,a.borderSize,a.minRegionArea,a.mergeRegionArea))return B("Failed to build regions");const w=Q.Recast.allocContourSet();if(t.contourSet=new u(w),!Q.Recast.buildContours(n,h,a.maxSimplificationError,a.maxEdgeLen,w,Q.Module.RC_CONTOUR_TESS_WALL_EDGES))return B("Failed to create contours");const d=Q.Recast.allocPolyMesh();if(!Q.Recast.buildPolyMesh(n,w,a.maxVertsPerPoly,d))return B("Failed to triangulate contours");const R=Q.Recast.allocPolyMeshDetail();if(!Q.Recast.buildPolyMeshDetail(n,d,h,a.detailSampleDist,a.detailSampleMaxError,R))return B("Failed to build detail mesh");C||(Q.Recast.freeHeightfield(c),Q.Recast.freeCompactHeightfield(h),Q.Recast.freeContourSet(w));for(let A=0;A<d.npolys;A++)d.get_areas(A)==Q.Recast.WALKABLE_AREA&&d.set_areas(A,0),0==d.get_areas(A)&&d.set_flags(A,1);const G=new Q.dtNavMeshCreateParams;Q.DetourNavMeshBuilder.setSoloNavMeshCreateParams(G,d,R,a),Q.DetourNavMeshBuilder.setOffMeshConCount(G,0);const M=Q.DetourNavMeshBuilder.createNavMeshData(G);if(!M.success)return B("Failed to create Detour navmesh data");const F=new L,N=M.navMeshData;return F.initSolo(N)?{success:!0,navMesh:F,intermediates:C?t:void 0}:B("Failed to create Detour navmesh")};class ${raw;constructor(A){this.raw=A}static create(A){const g=new Q.Module.dtTileCacheParams;return g.set_orig(0,A.orig[0]),g.set_orig(1,A.orig[1]),g.set_orig(2,A.orig[2]),g.set_cs(A.cs),g.set_ch(A.ch),g.set_width(A.width),g.set_height(A.height),g.set_walkableHeight(A.walkableHeight),g.set_walkableRadius(A.walkableRadius),g.set_walkableClimb(A.walkableClimb),g.set_maxSimplificationError(A.maxSimplificationError),g.set_maxTiles(A.maxTiles),g.set_maxObstacles(A.maxObstacles),new $(g)}}class AA{raw;obstacles=new Map;constructor(g){this.raw=g??new Q.Module.TileCache,A.register(this)}init(A,g,I,C){return this.raw.init(A,g,I,C.raw)}update(A){const{status:g,upToDate:I}=this.raw.update(A.raw);return{status:g,upToDate:I}}addCylinderObstacle(A,g,I){const C=this.raw.addCylinderObstacle(E.toRaw(A),g,I),t={type:"cylinder",ref:C,position:A,radius:g,height:I};return this.obstacles.set(C,t),t}addBoxObstacle(A,g,I){const C=this.raw.addBoxObstacle(E.toRaw(A),E.toRaw(g),I),t={type:"box",ref:C,position:A,extent:g,angle:I};return this.obstacles.set(C,t),t}removeObstacle(A){let g;g="object"==typeof A?A.ref:A,this.obstacles.delete(g),this.raw.removeObstacle(g)}addTile(A,g=Q.Module.DT_COMPRESSEDTILE_FREE_DATA){return this.raw.addTile(A,g)}buildNavMeshTile(A,g){return this.raw.buildNavMeshTile(A,g.raw)}buildNavMeshTilesAt(A,g,I){return this.raw.buildNavMeshTilesAt(A,g,I.raw)}destroy(){A.unregister(this),this.raw.destroy()}}class gA{raw;constructor(A){this.raw=new Q.Module.TileCacheMeshProcess,this.raw.process=(g,I,C)=>{const t=Q.Module.wrapPointer(g,Q.Module.dtNavMeshCreateParams),B=Q.Module.wrapPointer(I,Q.Module.UnsignedCharArray),e=Q.Module.wrapPointer(C,Q.Module.UnsignedShortArray);A&&A(t,B,e)}}}const IA={...U,tileSize:32,expectedLayersPerTile:4,maxObstacles:128},CA=(A,g,I={},C=!1)=>{let t={chunkyTriMesh:void 0,tileIntermediates:[]};const B=A=>{if(!C)for(let A=0;A<t.tileIntermediates.length;A++){const g=t.tileIntermediates[A];g.heightfieldLayerSet&&Q.Recast.freeHeightfieldLayerSet(g.heightfieldLayerSet.raw),g.compactHeightfield&&Q.Recast.freeCompactHeightfield(g.compactHeightfield.raw),g.heightfield&&Q.Recast.freeHeightfield(g.heightfield.raw)}return{success:!1,navMesh:void 0,tileCache:void 0,intermediates:C?t:void 0,error:A}},{verts:e,nVerts:E,tris:o,nTris:i,bbMin:r,bbMax:s}=X(A,g),_=new Q.Arrays.FloatArray;_.copy(e,e.length);const p=new Q.Arrays.IntArray;p.copy(o,o.length);const{expectedLayersPerTile:a,maxObstacles:y,...n}={...IA,...I},{raw:c}=l.create(n);c.minRegionArea=c.minRegionArea*c.minRegionArea,c.mergeRegionArea=c.mergeRegionArea*c.mergeRegionArea,c.detailSampleDist=c.detailSampleDist<.9?0:c.cs*c.detailSampleDist,c.detailSampleMaxError=c.ch*c.detailSampleMaxError;const D=Q.Recast.calcGridSize(r,s,c.cs);c.width=D.width,c.height=D.height;const h=new AA,w=new L,d=Math.round(c.tileSize),R=Math.floor((c.width+d-1)/d),G=Math.floor((c.height+d-1)/d);c.borderSize=c.walkableRadius+3,c.width=c.tileSize+2*c.borderSize,c.height=c.tileSize+2*c.borderSize;const M=new Q.dtTileCacheParams;M.set_orig(0,r[0]),M.set_orig(1,r[1]),M.set_orig(2,r[2]),M.cs=c.cs,M.ch=c.ch,M.width=c.tileSize,M.height=c.tileSize,M.walkableHeight=c.walkableHeight,M.walkableRadius=c.walkableRadius,M.walkableClimb=c.walkableClimb,M.maxSimplificationError=c.maxSimplificationError,M.maxTiles=R*G*a,M.maxObstacles=y;const F=new Q.RecastLinearAllocator(32e3),N=new Q.RecastFastLZCompressor,S=new gA(((A,g,I)=>{for(let C=0;C<A.polyCount;++C)g.set_data(C,0),I.set_data(C,1);Q.DetourNavMeshBuilder.setOffMeshConCount(A,0)}));if(!h.init(M,F,N,S))return B("Failed to initialize tile cache");const b=new Q.dtNavMeshParams;b.set_orig(0,r[0]),b.set_orig(1,r[1]),b.set_orig(2,r[2]),b.tileWidth=c.tileSize*c.cs,b.tileHeight=c.tileSize*c.cs;let U=Math.min(Math.round(function(A){let g=0,I=0;return g=Number(A>65535)<<4,A>>=g,I=Number(A>255)<<3,A>>=I,g|=I,I=Number(A>15)<<2,A>>=I,g|=I,I=Number(A>3)<<1,g|=I,g|=(A>>=I)>>1,g}((k=R*G*a,k--,k|=k>>1,k|=k>>2,k|=k>>4,k|=k>>8,k|=k>>16,++k))),14);var k;U>14&&(U=14);let f=22-U;if(b.maxTiles=1<<U,b.maxPolys=1<<f,!w.initTiled(b))return B("Failed to initialize tiled navmesh");const m=new Q.rcChunkyTriMesh;if(t.chunkyTriMesh=m,!Q.ChunkyTriMesh.createChunkyTriMesh(_,p,i,256,m))return B("Failed to build chunky triangle mesh");const Y=(A,g)=>{const I=new Q.rcContext,C=c.tileSize*c.cs,{raw:B}=new l(c).clone(),e=[r[0]+A*C,r[1],r[2]+g*C],o=[r[0]+(A+1)*C,s[1],r[2]+(g+1)*C];e[0]-=B.borderSize*B.cs,e[2]-=B.borderSize*B.cs,o[0]+=B.borderSize*B.cs,o[2]+=B.borderSize*B.cs,B.set_bmin(0,e[0]),B.set_bmin(1,e[1]),B.set_bmin(2,e[2]),B.set_bmax(0,o[0]),B.set_bmax(1,o[1]),B.set_bmax(2,o[2]);const i=Q.Recast.allocHeightfield();if(!Q.Recast.createHeightfield(I,i,B.width,B.height,e,o,B.cs,B.ch))return{n:0};const p=[e[0],e[2]],a=[o[0],o[2]],y=new Q.Arrays.IntArray;y.resize(512);const n=Q.ChunkyTriMesh.getChunksOverlappingRect(m,p,a,y,512);if(0===n)return{n:0};for(let A=0;A<n;++A){const g=y.get_data(A),C=m.get_nodes(g).n,t=Q.ChunkyTriMesh.getChunkyTriMeshNodeTris(m,g),e=new Q.Arrays.UnsignedCharArray;e.resize(C),Q.Recast.markWalkableTriangles(I,B.walkableSlopeAngle,_,E,t,C,e);const o=Q.Recast.rasterizeTriangles(I,_,E,t,e,C,i,B.walkableClimb);if(e.free(),!o)return{n:0}}Q.Recast.filterLowHangingWalkableObstacles(I,c.walkableClimb,i),Q.Recast.filterLedgeSpans(I,c.walkableHeight,c.walkableClimb,i),Q.Recast.filterWalkableLowHeightSpans(I,c.walkableHeight,i);const D=Q.Recast.allocCompactHeightfield();if(!Q.Recast.buildCompactHeightfield(I,c.walkableHeight,c.walkableClimb,i,D))return{n:0};if(!Q.Recast.erodeWalkableArea(I,c.walkableRadius,D))return{n:0};const h=Q.Recast.allocHeightfieldLayerSet();if(!Q.Recast.buildHeightfieldLayers(I,D,c.borderSize,c.walkableHeight,h))return{n:0};const w=[];for(let I=0;I<h.nlayers;I++){const C=new Q.TileCacheData,t=h.get_layers(I),B=new Q.dtTileCacheLayerHeader;B.magic=Q.Detour.TILECACHE_MAGIC,B.version=Q.Detour.TILECACHE_VERSION,B.tx=A,B.ty=g,B.tlayer=I,B.set_bmin(0,t.get_bmin(0)),B.set_bmin(1,t.get_bmin(1)),B.set_bmin(2,t.get_bmin(2)),B.set_bmax(0,t.get_bmax(0)),B.set_bmax(1,t.get_bmax(1)),B.set_bmax(2,t.get_bmax(2)),B.width=t.width,B.height=t.height,B.minx=t.minx,B.maxx=t.maxx,B.miny=t.miny,B.maxy=t.maxy,B.hmin=t.hmin,B.hmax=t.hmax;const e=Q.Recast.getHeightfieldLayerHeights(t),E=Q.Recast.getHeightfieldLayerAreas(t),o=Q.Recast.getHeightfieldLayerCons(t),i=Q.DetourTileCacheBuilder.buildTileCacheLayer(N,B,e,E,o,C);if(Q.Detour.statusFailed(i))return{n:0};w.push(C)}return t.tileIntermediates.push({tx:A,ty:g,heightfield:new K(i),compactHeightfield:new J(D),heightfieldLayerSet:new T(h)}),{n:w.length,tiles:w}};for(let A=0;A<G;++A)for(let g=0;g<R;++g){const{n:I,tiles:C}=Y(g,A);if(I>0&&C)for(let A=0;A<I;A++){const g=C[A],I=h.addTile(g);Q.Detour.statusFailed(I.status)&&console.error("Failed to add tile to tile cache")}}for(let A=0;A<G;A++)for(let g=0;g<R;g++){const I=h.buildNavMeshTilesAt(g,A,w);if(Q.Detour.statusFailed(I))return B(`Failed to build nav mesh tiles at ${g}, ${A}`)}if(!C)for(let A=0;A<t.tileIntermediates.length;A++){const g=t.tileIntermediates[A];Q.Recast.freeHeightfieldLayerSet(g.heightfieldLayerSet.raw),Q.Recast.freeCompactHeightfield(g.compactHeightfield.raw),Q.Recast.freeHeightfield(g.heightfield.raw)}return{success:!0,tileCache:h,navMesh:w,intermediates:C?t:void 0}};const tA=(A,g)=>{const I=Q.NavMeshExporter.exportNavMesh(A.raw,g?.raw),C=new Uint8Array(Q.Module.HEAPU8.buffer,I.dataPointer,I.size),t=new Uint8Array(I.size);return t.set(C),Q.NavMeshExporter.freeNavMeshExport(I),t},BA=(A,g)=>{const I=A.length*A.BYTES_PER_ELEMENT,C=Q.Module._malloc(I),t=new Uint8Array(Q.Module.HEAPU8.buffer,C,I);t.set(A);const B=new Q.Module.NavMeshExport;B.dataPointer=t.byteOffset,B.size=A.length;const e=Q.NavMeshImporter.importNavMesh(B,g.raw);Q.Module._free(t.byteOffset);const E=e.navMesh,o=e.tileCache;return{navMesh:new L(E),tileCache:new AA(o)}};export{s as Crowd,b as DebugNavMesh,a as DetourBVNode,p as DetourLink,n as DetourMeshHeader,D as DetourMeshTile,y as DetourOffMeshConnection,_ as DetourPolyDetail,L as NavMesh,w as NavMeshAddTileResult,R as NavMeshCalcTileLocResult,M as NavMeshGetOffMeshConnectionPolyEndPointsResult,N as NavMeshGetPolyAreaResult,F as NavMeshGetPolyFlagsResult,G as NavMeshGetTileAndPolyByRefResult,h as NavMeshGetTilesAtResult,i as NavMeshQuery,d as NavMeshRemoveTileResult,S as NavMeshStoreTileStateResult,Q as Raw,m as RecastCompactCell,J as RecastCompactHeightfield,Y as RecastCompactSpan,l as RecastConfig,H as RecastContour,u as RecastContourSet,K as RecastHeightfield,q as RecastHeightfieldLayer,T as RecastHeightfieldLayerSet,x as RecastPolyMesh,j as RecastPolyMeshDetail,k as RecastSpan,f as RecastSpanPool,AA as TileCache,gA as TileCacheMeshProcess,I as Wasm,o as array,c as dtPoly,$ as dtTileCacheParams,tA as exportNavMesh,z as generateSoloNavMesh,CA as generateTiledNavMesh,BA as importNavMesh,e as init,U as recastConfigDefaults,Z as soloNavMeshGeneratorConfigDefaults,IA as tiledNavMeshGeneratorConfigDefaults,E as vec3};
|
|
7
7
|
//# sourceMappingURL=index.es.js.map
|