<!-- SOLID-PLAYTIME · part 78 -->
eToSquared(Ub)>(t.far-t.near)**2)return}if(mb.copy(s).invert(),or.copy(t.ray).applyMatrix4(mb),n.boundingBox!==null){if(or.intersectsBox(n.boundingBox)===!1)return}this._computeIntersections(t,e,or)}_computeIntersections(t,e,n){let i,s=this.geometry,a=this.material,r=s.index,o=s.attributes.position,l=s.attributes.uv,c=s.attributes.uv1,u=s.attributes.normal,{groups:f,drawRange:h}=s;if(r!==null)if(Array.isArray(a))for(let p=0,v=f.length;p<v;p++){let y=f[p],U=a[y.materialIndex],d=Math.max(y.start,h.start),g=Math.min(r.count,Math.min(y.start+y.count,h.start+h.count));for(let m=d,x=g;m<x;m+=3){let S=r.getX(m),A=r.getX(m+1),T=r.getX(m+2);if(i=jh(this,U,t,n,l,c,u,S,A,T),i)i.faceIndex=Math.floor(m/3),i.face.materialIndex=y.materialIndex,e.push(i)}}else{let p=Math.max(0,h.start),v=Math.min(r.count,h.start+h.count);for(let y=p,U=v;y<U;y+=3){let d=r.getX(y),g=r.getX(y+1),m=r.getX(y+2);if(i=jh(this,a,t,n,l,c,u,d,g,m),i)i.faceIndex=Math.floor(y/3),e.push(i)}}else if(o!==void 0)if(Array.isArray(a))for(let p=0,v=f.length;p<v;p++){let y=f[p],U=a[y.materialIndex],d=Math.max(y.start,h.start),g=Math.min(o.count,Math.min(y.start+y.count,h.start+h.count));for(let m=d,x=g;m<x;m+=3){let S=m,A=m+1,T=m+2;if(i=jh(this,U,t,n,l,c,u,S,A,T),i)i.faceIndex=Math.floor(m/3),i.face.materialIndex=y.materialIndex,e.push(i)}}else{let p=Math.max(0,h.start),v=Math.min(o.count,h.start+h.count);for(let y=p,U=v;y<U;y+=3){let d=y,g=y+1,m=y+2;if(i=jh(this,a,t,n,l,c,u,d,g,m),i)i.faceIndex=Math.floor(y/3),e.push(i)}}}}function CS(t,e,n,i,s,a,r,o){let l;if(e.side===1)l=i.intersectTriangle(r,a,s,!0,o);else l=i.intersectTriangle(s,a,r,e.side===0,o);if(l===null)return null;Kh.copy(o),Kh.applyMatrix4(t.matrixWorld);let c=n.ray.origin.distanceTo(Kh);if(c<n.near||c>n.far)return null;return{distance:c,point:Kh.clone(),object:t}}function jh(t,e,n,i,s,a,r,o,l,c){t.getVertexPosition(o,Yh),t.getVertexPosition(l,Qh),t.getVertexPosition(c,qh);let u=CS(t,e,n,i,Yh,Qh,qh,gb);if(u){let f=new C;if(hi.getBarycoord(gb,Yh,Qh,qh,f),s)u.uv=hi.getInterpolatedAttribute(s,o,l,c,f,new Nt);if(a)u.uv1=hi.getInterpolatedAttribute(a,o,l,c,f,new Nt);if(r){if(u.normal=hi.getInterpolatedAttribute(r,o,l,c,f,new C),u.normal.dot(i.direction)>0)u.normal.multiplyScalar(-1)}let h={a:o,b:l,c,normal:new C,materialIndex:0};hi.getNormal(Yh,Qh,qh,h.normal),u.face=h,u.barycoord=f}return u}class $e extends me{constructor(t=1,e=1,n=1,i=1,s=1,a=1){super();this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:i,heightSegments:s,depthSegments:a};let r=this;i=Math.floor(i),s=Math.floor(s),a=Math.floor(a);let o=[],l=[],c=[],u=[],f=0,h=0;p("z","y","x",-1,-1,n,e,t,a,s,0),p("z","y","x",1,-1,n,e,-t,a,s,1),p("x","z","y",1,1,t,n,e,i,a,2),p("x","z","y",1,-1,t,n,-e,i,a,3),p("x","y","z",1,-1,t,e,n,i,s,4),p("x","y","z",-1,-1,t,e,-n,i,s,5),this.setIndex(o),this.setAttribute("position",new Zt(l,3)),this.setAttribute("normal",new Zt(c,3)),this.setAttribute("uv",new Zt(u,2));function p(v,y,U,d,g,m,x,S,A,T,w){let b=m/A,M=x/T,R=m/2,O=x/2,V=S/2,k=A+1,et=T+1,Z=0,at=0,W=new C;for(let ht=0;ht<et;ht++){let mt=ht*M-O;for(let q=0;q<k;q++){let dt=q*b-R;W[v]=dt*d,W[y]=mt*g,W[U]=V,l.push(W.x,W.y,W.z),W[v]=0,W[y]=0,W[U]=S>0?1:-1,c.push(W.x,W.y,W.z),u.push(q/A),u.push(1-ht/T),Z+=1}}for(let ht=0;ht<T;ht++)for(let mt=0;mt<A;mt++){let q=f+mt+k*ht,dt=f+mt+k*(ht+1),Ft=f+(mt+1)+k*(ht+1),Et=f+(mt+1)+k*ht;o.push(q,dt,Et),o.push(dt,Ft,Et),at+=6}r.addGroup(h,at,w),h+=at,f+=Z}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new $e(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}}function fr(t){let e={};for(let n in t){e[n]={};for(let i in t[n]){let s=t[n][i];if(s&&(s.isColor||s.isMatrix3||s.isMatrix4||s.isVector2||s.isVector3||s.isVector4||s.isTexture||s.isQuaternion))if(s.isRenderTargetTexture)console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[n][i]=null;else e[n][i]=s.clone();else if(Array.isArray(s))e[n][i]=s.slice();else e[n][i]=s}}return e}function Hn(t){let e={};for(let n=0;n<t.length;n++){let i=fr(t[n]);for(let s in i)e[s]=i[s]}return e}function DS(t){let e=[];for(let n=0;n<t.length;n++)e.push(t[n].clone());return e}function EU(t){let e=t.getRenderTarget();if(e===null)return t.outputColorSpace;if(e.isXRRenderTarget===!0)return e.texture.colorSpace;return ue.workingColorSpace}var BE={clone:fr,merge:Hn},PS=`void main() {
	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}`,HS=`void main() {
	gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
}`;class Zi extends qi{constructor(t){super();if(this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=PS,this.fragmentShader=HS,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw: