<!-- SOLID-PLAYTIME · part 84 -->
anarPoints(t,e,n){let i=_m.subVectors(n,e).cross(NS.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(i,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){let t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,e){let n=t.delta(_m),i=this.normal.dot(n);if(i===0){if(this.distanceToPoint(t.start)===0)return e.copy(t.start);return null}let s=-(t.start.dot(this.normal)+this.constant)/i;if(s<0||s>1)return null;return e.copy(t.start).addScaledVector(n,s)}intersectsLine(t){let e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){let n=e||BS.getNormalMatrix(t),i=this.coplanarPoint(_m).applyMatrix4(t),s=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(s),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}}var lr=new Ns,OS=new Nt(0.5,0.5),af=new C;class Bc{constructor(t=new Cs,e=new Cs,n=new Cs,i=new Cs,s=new Cs,a=new Cs){this.planes=[t,e,n,i,s,a]}set(t,e,n,i,s,a){let r=this.planes;return r[0].copy(t),r[1].copy(e),r[2].copy(n),r[3].copy(i),r[4].copy(s),r[5].copy(a),this}copy(t){let e=this.planes;for(let n=0;n<6;n++)e[n].copy(t.planes[n]);return this}setFromProjectionMatrix(t,e=2000,n=!1){let i=this.planes,s=t.elements,a=s[0],r=s[1],o=s[2],l=s[3],c=s[4],u=s[5],f=s[6],h=s[7],p=s[8],v=s[9],y=s[10],U=s[11],d=s[12],g=s[13],m=s[14],x=s[15];if(i[0].setComponents(l-a,h-c,U-p,x-d).normalize(),i[1].setComponents(l+a,h+c,U+p,x+d).normalize(),i[2].setComponents(l+r,h+u,U+v,x+g).normalize(),i[3].setComponents(l-r,h-u,U-v,x-g).normalize(),n)i[4].setComponents(o,f,y,m).normalize(),i[5].setComponents(l-o,h-f,U-y,x-m).normalize();else if(i[4].setComponents(l-o,h-f,U-y,x-m).normalize(),e===2000)i[5].setComponents(l+o,h+f,U+y,x+m).normalize();else if(e===2001)i[5].setComponents(o,f,y,m).normalize();else throw Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+e);return this}intersectsObject(t){if(t.boundingSphere!==void 0){if(t.boundingSphere===null)t.computeBoundingSphere();lr.copy(t.boundingSphere).applyMatrix4(t.matrixWorld)}else{let e=t.geometry;if(e.boundingSphere===null)e.computeBoundingSphere();lr.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(lr)}intersectsSprite(t){lr.center.set(0,0,0);let e=OS.distanceTo(t.center);return lr.radius=0.7071067811865476+e,lr.applyMatrix4(t.matrixWorld),this.intersectsSphere(lr)}intersectsSphere(t){let e=this.planes,n=t.center,i=-t.radius;for(let s=0;s<6;s++)if(e[s].distanceToPoint(n)<i)return!1;return!0}intersectsBox(t){let e=this.planes;for(let n=0;n<6;n++){let i=e[n];if(af.x=i.normal.x>0?t.max.x:t.min.x,af.y=i.normal.y>0?t.max.y:t.min.y,af.z=i.normal.z>0?t.max.z:t.min.z,i.distanceToPoint(af)<0)return!1}return!0}containsPoint(t){let e=this.planes;for(let n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}class Sn extends qi{constructor(t){super();this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Xt(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this.fog=t.fog,this}}var pf=new C,mf=new C,_b=new ie,Mc=new Yo,rf=new Ns,Tm=new C,Tb=new C;class Ta extends Ne{constructor(t=new me,e=new Sn){super();this.isLine=!0,this.type="Line",this.geometry=t,this.material=e,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}computeLineDistances(){let t=this.geometry;if(t.index===null){let e=t.attributes.position,n=[0];for(let i=1,s=e.count;i<s;i++)pf.fromBufferAttribute(e,i-1),mf.fromBufferAttribute(e,i),n[i]=n[i-1],n[i]+=pf.distanceTo(mf);t.setAttribute("lineDistance",new Zt(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(t,e){let n=this.geometry,i=this.matrixWorld,s=t.params.Line.threshold,a=n.drawRange;if(n.boundingSphere===null)n.computeBoundingSphere();if(rf.copy(n.boundingSphere),rf.applyMatrix4(i),rf.radius+=s,t