<!-- CODERS100 · part 103 -->
!1;n.version===c.__version?c.needsLights&&c.lightsStateVersion!==h.state.version||c.outputEncoding!==a||i.isInstancedMesh&&!1===c.instancing?u=!0:i.isInstancedMesh||!0!==c.instancing?c.envMap!==o||n.fog&&c.fog!==r?u=!0:void 0===c.numClippingPlanes||c.numClippingPlanes===st.numPlanes&&c.numIntersection===st.numIntersection?c.vertexAlphas!==l&&(u=!0):u=!0:u=!0:(u=!0,c.__version=n.version);let p=c.currentProgram;!0===u&&(p=Pt(n,e,i));let m=!1,g=!1,v=!1;const y=p.getUniforms(),x=c.uniforms;if(q.useProgram(p.program)&&(m=!0,g=!0,v=!0),n.id!==w&&(w=n.id,g=!0),m||S!==t){if(y.setValue(pt,"projectionMatrix",t.projectionMatrix),j.logarithmicDepthBuffer&&y.setValue(pt,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),S!==t&&(S=t,g=!0,v=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshStandardMaterial||n.envMap){const e=y.map.cameraPosition;void 0!==e&&e.setValue(pt,U.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial)&&y.setValue(pt,"isOrthographic",!0===t.isOrthographicCamera),(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.isShadowMaterial||n.skinning)&&y.setValue(pt,"viewMatrix",t.matrixWorldInverse)}if(n.skinning){y.setOptional(pt,i,"bindMatrix"),y.setOptional(pt,i,"bindMatrixInverse");const t=i.skeleton;if(t){const e=t.bones;if(j.floatVertexTextures){if(null===t.boneTexture){let n=Math.sqrt(4*e.length);n=mt(n),n=Math.max(n,4);const i=new Float32Array(n*n*4);i.set(t.boneMatrices);const r=new ii(i,n,n,E,b);t.boneMatrices=i,t.boneTexture=r,t.boneTextureSize=n}y.setValue(pt,"boneTexture",t.boneTexture,J),y.setValue(pt,"boneTextureSize",t.boneTextureSize)}else y.setOptional(pt,t,"boneMatrices")}}var M,T;return(g||c.receiveShadow!==i.receiveShadow)&&(c.receiveShadow=i.receiveShadow,y.setValue(pt,"receiveShadow",i.receiveShadow)),g&&(y.setValue(pt,"toneMappingExposure",f.toneMappingExposure),c.needsLights&&(T=v,(M=x).ambientLightColor.needsUpdate=T,M.lightProbe.needsUpdate=T,M.directionalLights.needsUpdate=T,M.directionalLightShadows.needsUpdate=T,M.pointLights.needsUpdate=T,M.pointLightShadows.needsUpdate=T,M.spotLights.needsUpdate=T,M.spotLightShadows.needsUpdate=T,M.rectAreaLights.needsUpdate=T,M.hemisphereLights.needsUpdate=T),r&&n.fog&&nt.refreshFogUniforms(x,r),nt.refreshMaterialUniforms(x,n,P,C),Cr.upload(pt,c.uniformsList,x,J)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(Cr.upload(pt,c.uniformsList,x,J),n.uniformsNeedUpdate=!1),n.isSpriteMaterial&&y.setValue(pt,"center",i.center),y.setValue(pt,"modelViewMatrix",i.modelViewMatrix),y.setValue(pt,"normalMatrix",i.normalMatrix),y.setValue(pt,"modelMatrix",i.matrixWorld),p}Et.setAnimationLoop((function(t){bt&&bt(t)})),"undefined"!=typeof window&&Et.setContext(window),this.setAnimationLoop=function(t){bt=t,yt.setAnimationLoop(t),null===t?Et.stop():Et.start()},yt.addEventListener("sessionstart",Mt),yt.addEventListener("sessionend",Tt),this.render=function(t,e){let n,i;if(void 0!==arguments[2]&&(console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead."),n=arguments[2]),void 0!==arguments[3]&&(console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead."),i=arguments[3]),void 0!==e&&!0!==e.isCamera)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===g)return;!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),!0===yt.enabled&&!0===yt.isPresenting&&(e=yt.getCamera(e)),!0===t.isScene&&t.onBeforeRender(f,t,e,n||_),d=rt.get(t,m.length),d.init(),m.push(d),G.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),F.setFromProjectionMatrix(G),H=this.localClippingEnabled,O=st.init(this.clippingPlanes,H,e),u=it.get(t,p.length),u.init(),p.push(u),At(t,e,0,f.sortObjects),u.finish(),!0===f.sortObjects&&u.sort(D,I),!0===O&&st.beginShadows();const r=d.state.shadowsArray;at.render(r,t,e),d.setupLights(),d.setupLightsView(e),!0===O&&st.endShadows(),!0===this.info.autoReset&&this.info.reset(),void 0!==n&&this.setRenderTarget(n),ot.render(u,t,e,i);const s=u.opaque,a=u.transparent;s.length>0&&Rt(s,t,e),a.length>0&&Rt(a,t,e),null!==_&&(J.updateRenderTargetMipmap(_),J.updateMultisampleRenderTarget(_)),!0===t.isScene&&t.onAfterRender(f,t,e),q.buffers.depth.setTest(!0),q.buffers.depth.setMask(!0),q.buffers.color.setMask(!0),q.setPolygonOffset(!1),dt.resetDefaultState(),w=-1,S=null,m.pop(),d=m.length>0?m[m.length-1]:null,p.pop(),u=p.length>0?p[p.length-1]:null},this.getActiveCubeFace=function(){return v},this.getActiveMipmapLevel=function(){return y},this.getRenderTarget=function(){return _},this.setRenderTarget=function(t,e=0,n=0){_=t,v=e,y=n,t&&void 0===Z.get(t).__webglFramebuffer&&J.setupRenderTarget(t);let i=null,r=!1,s=!