1import{t as e}from"./nextTick-D5GaOlxv.js";import{_ as t,s as n}from"./mathUtils-DHz9x9TF.js";import{s as r}from"./vec3f64-B-rEQcEG.js";import{i}from"./vec2f64-o4_iuyFd.js";import{A as a,D as o,M as s,S as c,g as l,i as u,l as d,t as f,v as p}from"./vec32-d_u-OXWQ.js";import{r as m}from"./vec4f64-8FULhwgA.js";import{t as h}from"./mat3f64-C0RFw6we.js";import{t as g}from"./mat4f64-BtRGbrav.js";import{t as _}from"./quatf64-I0Znsxki.js";function ee(e,t,n){return c(n,e,d(e,t)/d(e,e))}function v(e,t){return d(e,t)/a(e)}function te(e,t){return-n(d(e,t)/(a(e)*a(t)))}function y(e,t,r){f(b,e),f(x,t);let i=n(d(b,x));return d(l(b,b,x),r)<0?2*Math.PI-i:i}var b=r(),x=r(),S=class t{constructor(e){this._create=e,this._items=[],this._itemsPtr=0}get(){return this._itemsPtr===0&&e((()=>this._reset())),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){let e=2*this._itemsPtr;this._items.length>e&&(this._items.length=e),this._itemsPtr=0}static createVec2f64(){return new t(i)}static createVec3f64(){return new t(r)}static createVec4f64(){return new t(m)}static createMat3f64(){return new t(h)}static createMat4f64(){return new t(g)}static createQuatf64(){return new t(_)}get test(){}},C=S.createVec2f64(),w=S.createVec3f64(),T=S.createVec4f64();S.createMat3f64();var E=S.createMat4f64(),D=S.createQuatf64();function ne(e){let t=e[0]*e[0]+e[4]*e[4]+e[8]*e[8],n=e[1]*e[1]+e[5]*e[5]+e[9]*e[9],r=e[2]*e[2]+e[6]*e[6]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}function re(e,t){return o(e,Math.sqrt(t[0]*t[0]+t[4]*t[4]+t[8]*t[8]),Math.sqrt(t[1]*t[1]+t[5]*t[5]+t[9]*t[9]),Math.sqrt(t[2]*t[2]+t[6]*t[6]+t[10]*t[10])),e}function O(e,t,n){Math.abs(e[0])>Math.abs(e[1])?o(t,0,1,0):o(t,1,0,0),l(n,e,t),l(t,n,e),f(n,n),f(t,t)}r(),r(),r(),r(),r();function k(e=Q){return[e[0],e[1],e[2],e[3]]}function ie(e=Q[0],t=Q[1],n=Q[2],r=Q[3]){return M(e,t,n,r,T.get())}function A(e,t){return M(t[0],t[1],t[2],t[3],e)}function j(e){return e}function M(e,t,n,r,i=k()){return i[0]=e,i[1]=t,i[2]=n,i[3]=r,i}function N(e,t,n){let r=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=Math.abs(r-1)>1e-5&&r>1e-12?1/Math.sqrt(r):1;return n[0]=t[0]*i,n[1]=t[1]*i,n[2]=t[2]*i,n[3]=-(n[0]*e[0]+n[1]*e[1]+n[2]*e[2]),n}function P(e,t,n,r=k()){let i=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2],s=e[0]-t[0],c=e[1]-t[1],l=e[2]-t[2],u=a*l-o*c,d=o*s-i*l,f=i*c-a*s,p=u*u+d*d+f*f,m=Math.abs(p-1)>1e-5&&p>1e-12?1/Math.sqrt(p):1;return r[0]=u*m,r[1]=d*m,r[2]=f*m,r[3]=-(r[0]*e[0]+r[1]*e[1]+r[2]*e[2]),r}function F(e,t,n,r=0,i=Math.floor(1/3*n),a=Math.floor(2/3*n)){if(n<3)return!1;t(L,r);let o=i,s=!1;for(;o<n-1&&!s;)t(R,o),o++,s=!u(L,R);if(!s)return!1;for(o=Math.max(o,a),s=!1;o<n&&!s;)t(z,o),o++,p(B,L,R),f(B,B),p(V,R,z),f(V,V),s=!u(L,z)&&!u(R,z)&&Math.abs(d(B,V))<I;return s?(P(L,R,z,e),!0):(r!==0||i!==1||a!==2)&&F(e,t,n,0,1,2)}function ae(e,t,n=!0){let r=t.length/3;return F(e,((e,n)=>o(e,t[3*n+0],t[3*n+1],t[3*n+2])),n?r-1:r)}var I=.99619469809,L=r(),R=r(),z=r(),B=r(),V=r();function H(e,t,n){return t!==e&&A(e,t),e[3]=-d(j(e),n),e}function U(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}function W(e,t,n,r){return l(z,t,e),N(n,z,r)}function G(e,t,n,r){return X(Z(e,t,p(w.get(),n,t),pe,r))}function K(e,t,n){return t!=null&&X(Z(e,t.origin,t.direction,me,n))}function q(e,t,n){return X(Z(e,t.origin,t.vector,$.NONE,n))}function oe(e,t,n){return X(Z(e,t.origin,t.vector,$.CLAMP,n))}function se(e,t){return J(e,t)>=0}function ce(e,t){let n=d(j(e),t.ray.direction),r=-J(e,t.ray.origin);if(n>-1e-6&&n<1e-6)return r>0;let i=r/n;return n>0?i<t.c1&&(t.c1=i):i>t.c0&&(t.c0=i),t.c0<=t.c1}function le(e,t,n){let r=c(w.get(),j(e),-e[3]);return s(n,de(e,p(w.get(),t,r),w.get()),r),n}function ue(e,t,n,r){let i=j(e),a=w.get(),s=w.get();O(i,a,s);let c=p(w.get(),n,t);return o(r,v(a,c),v(s,c),v(i,c))}function de(e,t,n){return p(n,t,c(w.get(),j(e),d(j(e),t))),n}function fe(e,t){return Math.abs(J(e,t))}function J(e,t){return d(j(e),t)+e[3]}var Y;function X(e){return e===Y.INTERSECTS_INSIDE_OUT||e===Y.INTERSECTS_OUTSIDE_IN}function Z(e,n,r,i,a){let o=d(j(e),r),l=J(e,n);if(o===0)return l>=0?Y.INSIDE:Y.OUTSIDE;let u=-l/o;return i&$.CLAMP&&(u=t(u,0,1)),!(i&$.INFINITE_MIN)&&u<0||!(i&$.INFINITE_MAX)&&u>1?l>
1=0?Y.INSIDE:Y.OUTSIDE:(s(a,n,c(a,r,u)),l>=0?Y.INTERSECTS_INSIDE_OUT:Y.INTERSECTS_OUTSIDE_IN)}(function(e){e[e.INTERSECTS_INSIDE_OUT=0]=`INTERSECTS_INSIDE_OUT`,e[e.INTERSECTS_OUTSIDE_IN=1]=`INTERSECTS_OUTSIDE_IN`,e[e.INSIDE=2]=`INSIDE`,e[e.OUTSIDE=3]=`OUTSIDE`})(Y||={});var Q=[0,0,1,0],$;(function(e){e[e.NONE=0]=`NONE`,e[e.CLAMP=1]=`CLAMP`,e[e.INFINITE_MIN=4]=`INFINITE_MIN`,e[e.INFINITE_MAX=8]=`INFINITE_MAX`})($||={});var pe=$.INFINITE_MIN|$.INFINITE_MAX,me=$.INFINITE_MAX;export{C as A,re as C,E as D,w as E,v as M,ee as N,D as O,y as P,se as S,O as T,q as _,ue as a,K as b,j as c,M as d,J as f,P as g,N as h,le as i,te as j,T as k,W as l,G as m,ie as n,U as o,A as p,ce as r,k as s,ae as t,fe as u,F as v,ne as w,H as x,oe as y}; 2//# sourceMappingURL=plane-ChY0mNrH.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.