<!-- SOLUV · part 648 -->
tiplyScalar(j).round())},this.getScissor=function(M){return M.copy(Gt)},this.setScissor=function(M,N,H,V){M.isVector4?Gt.set(M.x,M.y,M.z,M.w):Gt.set(M,N,H,V),y.scissor(Dt.copy(Gt).multiplyScalar(j).round())},this.getScissorTest=function(){return he},this.setScissorTest=function(M){y.setScissorTest(he=M)},this.setOpaqueSort=function(M){xt=M},this.setTransparentSort=function(M){Vt=M},this.getClearColor=function(M){return M.copy(Zt.getClearColor())},this.setClearColor=function(){Zt.setClearColor(...arguments)},this.getClearAlpha=function(){return Zt.getClearAlpha()},this.setClearAlpha=function(){Zt.setClearAlpha(...arguments)},this.clear=function(M=!0,N=!0,H=!0){let V=0;if(M){let k=!1;if(st!==null){let yt=st.texture.format;k=g.has(yt)}if(k){let yt=st.texture.type,At=m.has(yt),vt=Zt.getClearColor(),Ct=Zt.getClearAlpha(),Pt=vt.r,$t=vt.g,te=vt.b;At?(S[0]=Pt,S[1]=$t,S[2]=te,S[3]=Ct,P.clearBufferuiv(P.COLOR,0,S)):(b[0]=Pt,b[1]=$t,b[2]=te,b[3]=Ct,P.clearBufferiv(P.COLOR,0,b))}else V|=P.COLOR_BUFFER_BIT}N&&(V|=P.DEPTH_BUFFER_BIT,this.state.buffers.depth.setMask(!0)),H&&(V|=P.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),V!==0&&P.clear(V)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.setNodesHandler=function(M){M.setRenderer(this),F=M},this.dispose=function(){e.removeEventListener("webglcontextlost",ge,!1),e.removeEventListener("webglcontextrestored",oe,!1),e.removeEventListener("webglcontextcreationerror",gn,!1),Zt.dispose(),gt.dispose(),ft.dispose(),G.dispose(),lt.dispose(),K.dispose(),St.dispose(),it.dispose(),dt.dispose(),It.dispose(),It.removeEventListener("sessionstart",hd),It.removeEventListener("sessionend",ud),bi.stop()};function ge(M){M.preventDefault(),xr("WebGLRenderer: Context Lost."),L=!0}function oe(){xr("WebGLRenderer: Context Restored."),L=!1;let M=O.autoReset,N=zt.enabled,H=zt.autoUpdate,V=zt.needsUpdate,k=zt.type;Ft(),O.autoReset=M,zt.enabled=N,zt.autoUpdate=H,zt.needsUpdate=V,zt.type=k}function gn(M){Lt("WebGLRenderer: A WebGL context could not be created. Reason: ",M.statusMessage)}function Cn(M){let N=M.target;N.removeEventListener("dispose",Cn),rm(N)}function rm(M){am(M),G.remove(M)}function am(M){let N=G.get(M).programs;N!==void 0&&(N.forEach(function(H){dt.releaseProgram(H)}),M.isShaderMaterial&&dt.releaseShaderCache(M))}this.renderBufferDirect=function(M,N,H,V,k,yt){N===null&&(N=Ot);let At=k.isMesh&&k.matrixWorld.determinantAffine()<0,vt=cm(M,N,H,V,k);y.setMaterial(V,At);let Ct=H.index,Pt=1;if(V.wireframe===!0){if(Ct=Z.getWireframeAttribute(H),Ct===void 0)return;Pt=2}let $t=H.drawRange,te=H.attributes.position,Rt=$t.start*Pt,le=($t.start+$t.count)*Pt;yt!==null&&(Rt=Math.max(Rt,yt.start*Pt),le=Math.min(le,(yt.start+yt.count)*Pt)),Ct!==null?(Rt=Math.max(Rt,0),le=Math.min(le,Ct.count)):te!=null&&(Rt=Math.max(Rt,0),le=Math.min(le,te.count));let we=le-Rt;if(we<0||we===1/0)return;St.setup(k,V,vt,H,Ct);let xe,me=pt;if(Ct!==null&&(xe=ct.get(Ct),me=$,me.setIndex(xe)),k.isMesh)V.wireframe===!0?(y.setLineWidth(V.wireframeLinewidth*qt()),me.setMode(P.LINES)):me.setMode(P.TRIANGLES);else if(k.isLine){let Be=V.linewidth;Be===void 0&&(Be=1),y.setLineWidth(Be*qt()),k.isLineSegments?me.setMode(P.LINES):k.isLineLoop?me.setMode(P.LINE_LOOP):me.setMode(P.LINE_STRIP)}else k.isPoints?me.setMode(P.POINTS):k.isSprite&&me.setMode(P.TRIANGLES);if(k.isBatchedMesh)if(jt.get("WEBGL_multi_draw"))me.renderMultiDraw(k._multiDrawStarts,k._multiDrawCounts,k._multiDrawCount);else{let Be=k._multiDrawStarts,Et=k._multiDrawCounts,Xe=k._multiDrawCount,ie=Ct?ct.get(Ct).bytesPerElement:1,dn=G.get(V).currentProgram.getUniforms();for(let Rn=0;Rn<Xe;Rn++)dn.setValue(P,"_gl_DrawID",Rn),me.render(Be[Rn]/ie,Et[Rn])}else if(k.isInstancedMesh)me.renderInstances(Rt,we,k.count);else if(H.isInstancedBufferGeometry){let Be=H._maxInstanceCount!==void 0?H._maxInstanceCount:1/0,Et=Math.min(H.instanceCount,Be);me.renderInstances(Rt,we,Et)}else me.render(Rt,we)};function cd(M,N,H,V){F!==null&&M.isNodeMaterial&&F.setObject(V,M),rt===!0&&Ut.setState(M,H,!1),M.transparent===!0&&M.side===On&&M.forceSinglePass===!1?(M.side=$e,M.needsUpdate=!0,ua(M,N,V),M.side=vi,M.needsUpdate=!0,ua(M,N,V),M.side=On):ua(M,N,V)}this.compile=function(M,N,H=null){H===null&&(H=M),F!==null&&F.renderStart(M,N,H),T=ft.get(H),T.init(N),v.push(T),H.traverseVisible(function(k){k.isLight&&k.layers.test(N.layers)&&(T.pushLight(k),k.castShadow&&T.pushShadow(k))}),M!==H&&M.traverseVisible(function(k){k.isLight&&k.layers.test(N.layers)&&(T.pushLight(k),k.castShadow&&T.pushShadow(k))}),T.setupLights(),F!==null&&F.updateLights(T.state.lightsArray),at=this.localClippingEnabled,rt=Ut.init(this.clippingPlanes,at),rt===!0&&Ut.setGlobalState(this.clippingPlanes,N),F!==null&&zt.render(T.state.shadowsArray,H,N);let V=new Set;return M.traverse(function(k){if(!(k.isMesh||k.isPoints||k.isLine||k.isSprite))return;let yt=k.material;if(yt)if(Arra