<!-- SOLID-PLAYTIME · part 155 -->
spose(),P.removeEventListener("sessionstart",I),P.removeEventListener("sessionend",lt),Kt.stop()};function xt(_){_.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),x=!0}function Ut(){console.log("THREE.WebGLRenderer: Context Restored."),x=!1;let _=Ue.autoReset,F=z.enabled,G=z.autoUpdate,J=z.needsUpdate,N=z.type;Wt(),Ue.autoReset=_,z.enabled=F,z.autoUpdate=G,z.needsUpdate=J,z.type=N}function Rt(_){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",_.statusMessage)}function ct(_){let F=_.target;F.removeEventListener("dispose",ct),it(F)}function it(_){Ct(_),Dt.remove(_)}function Ct(_){let F=Dt.get(_).programs;if(F!==void 0){if(F.forEach(function(G){B.releaseProgram(G)}),_.isShaderMaterial)B.releaseShaderCache(_)}}this.renderBufferDirect=function(_,F,G,J,N,ut){if(F===null)F=Ht;let Mt=N.isMesh&&N.matrixWorld.determinant()<0,Pt=r_(_,F,G,J,N);St.setMaterial(J,Mt);let wt=G.index,Vt=1;if(J.wireframe===!0){if(wt=L.getWireframeAttribute(G),wt===void 0)return;Vt=2}let $t=G.drawRange,Ot=G.attributes.position,se=$t.start*Vt,Re=($t.start+$t.count)*Vt;if(ut!==null)se=Math.max(se,ut.start*Vt),Re=Math.min(Re,(ut.start+ut.count)*Vt);if(wt!==null)se=Math.max(se,0),Re=Math.min(Re,wt.count);else if(Ot!==void 0&&Ot!==null)se=Math.max(se,0),Re=Math.min(Re,Ot.count);let Qe=Re-se;if(Qe<0||Qe===1/0)return;Lt.setup(N,J,Pt,G,wt);let Oe,He=K;if(wt!==null)Oe=Ee.get(wt),He=rt,He.setIndex(Oe);if(N.isMesh)if(J.wireframe===!0)St.setLineWidth(J.wireframeLinewidth*ye()),He.setMode(D.LINES);else He.setMode(D.TRIANGLES);else if(N.isLine){let zt=J.linewidth;if(zt===void 0)zt=1;if(St.setLineWidth(zt*ye()),N.isLineSegments)He.setMode(D.LINES);else if(N.isLineLoop)He.setMode(D.LINE_LOOP);else He.setMode(D.LINE_STRIP)}else if(N.isPoints)He.setMode(D.POINTS);else if(N.isSprite)He.setMode(D.TRIANGLES);if(N.isBatchedMesh)if(N._multiDrawInstances!==null)Oo("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),He.renderMultiDrawInstances(N._multiDrawStarts,N._multiDrawCounts,N._multiDrawCount,N._multiDrawInstances);else if(!kt.get("WEBGL_multi_draw")){let{_multiDrawStarts:zt,_multiDrawCounts:Je,_multiDrawCount:pe}=N,Kn=wt?Ee.get(wt).bytesPerElement:1,br=Dt.get(J).currentProgram.getUniforms();for(let jn=0;jn<pe;jn++)br.setValue(D,"_gl_DrawID",jn),He.render(zt[jn]/Kn,Je[jn])}else He.renderMultiDraw(N._multiDrawStarts,N._multiDrawCounts,N._multiDrawCount);else if(N.isInstancedMesh)He.renderInstances(se,Qe,N.count);else if(G.isInstancedBufferGeometry){let zt=G._maxInstanceCount!==void 0?G._maxInstanceCount:1/0,Je=Math.min(G.instanceCount,zt);He.renderInstances(se,Qe,Je)}else He.render(se,Qe)};function Jt(_,F,G){if(_.transparent===!0&&_.side===hn&&_.forceSinglePass===!1)_.side=fi,_.needsUpdate=!0,Yc(_,F,G),_.side=zo,_.needsUpdate=!0,Yc(_,F,G),_.side=hn;else Yc(_,F,G)}this.compile=function(_,F,G=null){if(G===null)G=_;if(U=Q.get(G),U.init(F),g.push(U),G.traverseVisible(function(N){if(N.isLight&&N.layers.test(F.layers)){if(U.pushLight(N),N.castShadow)U.pushShadow(N)}}),_!==G)_.traverseVisible(function(N){if(N.isLight&&N.layers.test(F.layers)){if(U.pushLight(N),N.castShadow)U.pushShadow(N)}});U.setupLights();let J=new Set;return _.traverse(function(N){if(!(N.isMesh||N.isPoints||N.isLine||N.isSprite))return;let ut=N.material;if(ut)if(Array.isArray(ut))for(let Mt=0;Mt<ut.length;Mt++){let Pt=ut[Mt];Jt(Pt,G,N),J.add(Pt)}else Jt(ut,G,N),J.add(ut)}),U=g.pop(),J},this.compileAsync=function(_,F,G=null){let J=this.compile(_,F,G);return new Promise((N)=>{function ut(){if(J.forEach(function(Mt){if(Dt.get(Mt).currentProgram.isReady())J.delete(Mt)}),J.size===0){N(_);return}setTimeout(ut,10)}if(kt.get("KHR_parallel_shader_compile")!==null)ut();else setTimeout(ut,10)})};let Me=null;function fe(_){if(Me)Me(_)}function I(){Kt.stop()}function lt(){Kt.start()}let Kt=new dM;if(Kt.setAnimationLoop(fe),typeof self<"u")Kt.setContext(self);this.setAnimationLoop=function(_){Me=_,P.setAnimationLoop(_),_===null?Kt.stop():Kt.start()},P.addEventListener("sessionstart",I),P.addEventListener("sessionend",lt),this.render=function(_,F){if(F!==void 0&&F.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(x===!0)return;if(_.matrixWorldAutoUpdate===!0)_.updateMatrixWorld();if(F.parent===null&&F.matrixWorldAutoUpdate===!0)F.updateMatrixWorld();if(P.enabled===!0&&P.isPresenting===!0){if(P.cameraAutoUpdate===!0)P.updateCamera(F);F=P.getCamera()}if(_.isScene===!0)_.onBeforeRender(m,_,F,T);if(U=Q.get(_,g.length),U.init(F),g.push(U),ot.multiplyMatrices(F.projectionMatrix,F.matrixWorldInverse),Ft.setFromProjectionMatrix(ot,gU,F.reversedDepth),X=this.localClippingEnabled,Et=Tt.init(this.clippingPlanes,X),y=st.get(_,d.length),y.init(),d.push(y),P.enabled===!0&&P.isPresenting===!0){let ut=m.xr.getDepthSensingMesh();if(ut!==null)Yt(ut,F,-1/0,m.sortObjects)}if(Yt(_,