<!-- SOLUV · part 633 -->
,c[F]=D);let B=D[z];B===void 0&&(B=I.clone(),D[z]=B,R.addEventListener("dispose",E)),I=B}if(I.visible=R.visible,I.wireframe=R.wireframe,A===Bs?I.side=R.shadowSide!==null?R.shadowSide:R.side:I.side=R.shadowSide!==null?R.shadowSide:d[R.side],I.alphaMap=R.alphaMap,I.alphaTest=R.alphaToCoverage===!0?.5:R.alphaTest,I.map=R.map,I.clipShadows=R.clipShadows,I.clippingPlanes=R.clippingPlanes,I.clipIntersection=R.clipIntersection,I.displacementMap=R.displacementMap,I.displacementScale=R.displacementScale,I.displacementBias=R.displacementBias,I.wireframeLinewidth=R.wireframeLinewidth,I.linewidth=R.linewidth,v.isPointLight===!0&&I.isMeshDistanceMaterial===!0){let F=s.properties.get(I);F.light=v}return I}function x(T,R,v,A,I){if(T.visible===!1)return;if(T.layers.test(R.layers)&&(T.isMesh||T.isLine||T.isPoints)&&(T.castShadow||T.receiveShadow&&I===Bs)&&(!T.frustumCulled||T.intersectsFrustum(n))){T.modelViewMatrix.multiplyMatrices(v.matrixWorldInverse,T.matrixWorld);let z=t.update(T),D=T.material;if(Array.isArray(D)){let B=z.groups;for(let X=0,W=B.length;X<W;X++){let st=B[X],q=D[st.materialIndex];if(q&&q.visible){let Q=b(T,q,A,I);T.onBeforeShadow(s,T,R,v,z,Q,st),s.renderBufferDirect(v,null,z,Q,T,st),T.onAfterShadow(s,T,R,v,z,Q,st)}}}else if(D.visible){let B=b(T,D,A,I);T.onBeforeShadow(s,T,R,v,z,B,null),s.renderBufferDirect(v,null,z,B,T,null),T.onAfterShadow(s,T,R,v,z,B,null)}}let F=T.children;for(let z=0,D=F.length;z<D;z++)x(F[z],R,v,A,I)}function E(T){T.target.removeEventListener("dispose",E);for(let v in c){let A=c[v],I=T.target.uuid;I in A&&(A[I].dispose(),delete A[I])}}}function OS(s,t){function e(){let U=!1,pt=new fe,$=null,mt=new fe(0,0,0,0);return{setMask:function(St){$!==St&&!U&&(s.colorMask(St,St,St,St),$=St)},setLocked:function(St){U=St},setClear:function(St,it,Ft,It,ge){ge===!0&&(St*=It,it*=It,Ft*=It),pt.set(St,it,Ft,It),mt.equals(pt)===!1&&(s.clearColor(St,it,Ft,It),mt.copy(pt))},reset:function(){U=!1,$=null,mt.set(-1,0,0,0)}}}function n(){let U=!1,pt=!1,$=null,mt=null,St=null;return{setReversed:function(it){if(pt!==it){let Ft=t.get("EXT_clip_control");it?Ft.clipControlEXT(Ft.LOWER_LEFT_EXT,Ft.ZERO_TO_ONE_EXT):Ft.clipControlEXT(Ft.LOWER_LEFT_EXT,Ft.NEGATIVE_ONE_TO_ONE_EXT),pt=it;let It=St;St=null,this.setClear(It)}},getReversed:function(){return pt},setTest:function(it){it?j(s.DEPTH_TEST):xt(s.DEPTH_TEST)},setMask:function(it){$!==it&&!U&&(s.depthMask(it),$=it)},setFunc:function(it){if(pt&&(it=_p[it]),mt!==it){switch(it){case io:s.depthFunc(s.NEVER);break;case so:s.depthFunc(s.ALWAYS);break;case ro:s.depthFunc(s.LESS);break;case bs:s.depthFunc(s.LEQUAL);break;case ao:s.depthFunc(s.EQUAL);break;case oo:s.depthFunc(s.GEQUAL);break;case lo:s.depthFunc(s.GREATER);break;case co:s.depthFunc(s.NOTEQUAL);break;default:s.depthFunc(s.LEQUAL)}mt=it}},setLocked:function(it){U=it},setClear:function(it){St!==it&&(St=it,pt&&(it=1-it),s.clearDepth(it))},reset:function(){U=!1,$=null,mt=null,St=null,pt=!1}}}function i(){let U=!1,pt=null,$=null,mt=null,St=null,it=null,Ft=null,It=null,ge=null;return{setTest:function(oe){U||(oe?j(s.STENCIL_TEST):xt(s.STENCIL_TEST))},setMask:function(oe){pt!==oe&&!U&&(s.stencilMask(oe),pt=oe)},setFunc:function(oe,gn,Cn){($!==oe||mt!==gn||St!==Cn)&&(s.stencilFunc(oe,gn,Cn),$=oe,mt=gn,St=Cn)},setOp:function(oe,gn,Cn){(it!==oe||Ft!==gn||It!==Cn)&&(s.stencilOp(oe,gn,Cn),it=oe,Ft=gn,It=Cn)},setLocked:function(oe){U=oe},setClear:function(oe){ge!==oe&&(s.clearStencil(oe),ge=oe)},reset:function(){U=!1,pt=null,$=null,mt=null,St=null,it=null,Ft=null,It=null,ge=null}}}let r=new e,a=new n,o=new i,l=new WeakMap,c=new WeakMap,h={},d={},u={},f=new WeakMap,p=[],_=null,g=!1,m=null,S=null,b=null,x=null,E=null,T=null,R=null,v=new Mt(0,0,0),A=0,I=!1,L=null,F=null,z=null,D=null,B=null,X=s.getParameter(s.MAX_COMBINED_TEXTURE_IMAGE_UNITS),W=!1,st=0,q=s.getParameter(s.VERSION);q.indexOf("WebGL")!==-1?(st=parseFloat(/^WebGL (\d)/.exec(q)[1]),W=st>=1):q.indexOf("OpenGL ES")!==-1&&(st=parseFloat(/^OpenGL ES (\d)/.exec(q)[1]),W=st>=2);let Q=null,et={},Dt=s.getParameter(s.SCISSOR_BOX),wt=s.getParameter(s.VIEWPORT),se=new fe().fromArray(Dt),Qt=new fe().fromArray(wt);function ne(U,pt,$,mt){let St=new Uint8Array(4),it=s.createTexture();s.bindTexture(U,it),s.texParameteri(U,s.TEXTURE_MIN_FILTER,s.NEAREST),s.texParameteri(U,s.TEXTURE_MAG_FILTER,s.NEAREST);for(let Ft=0;Ft<$;Ft++)U===s.TEXTURE_3D||U===s.TEXTURE_2D_ARRAY?s.texImage3D(pt,0,s.RGBA,1,1,mt,0,s.RGBA,s.UNSIGNED_BYTE,St):s.texImage2D(pt+Ft,0,s.RGBA,1,1,0,s.RGBA,s.UNSIGNED_BYTE,St);return it}let J={};J[s.TEXTURE_2D]=ne(s.TEXTURE_2D,s.TEXTURE_2D,1),J[s.TEXTURE_CUBE_MAP]=ne(s.TEXTURE_CUBE_MAP,s.TEXTURE_CUBE_MAP_POSITIVE_X,6),J[s.TEXTURE_2D_ARRAY]=ne(s.TEXTURE_2D_ARRAY,s.TEXTURE_2D_ARRAY,1,1),J[s.TEXTURE_3D]=ne(s.TEXTURE_3D,s.TEXTURE_3D,1,1),r.setClear(0,0,0,1),a.setClear(1),o.setClear(0),j(s.DEPTH_TEST),a.setFunc(bs),ot(!1),ht(Su),j(s.CULL_FACE),rt(Bn);function j(U){h[U]!==!0&&(s.enable(U),h[U]=!0)}function xt(U){h[U]!==!1&&(s.disable(U),h[U]=!1)}fun