|
@@ -166,163 +166,163 @@ v.viewport=new da;var B=new Se([q,v]);B.layers.enable(1);B.layers.enable(2);this
|
|
|
c),l.addEventListener("squeezestart",c),l.addEventListener("squeezeend",c),l.addEventListener("end",d),a=b.getContextAttributes(),a=new XRWebGLLayer(l,b,{antialias:a.antialias,alpha:a.alpha,depth:a.depth,stencil:a.stencil}),l.updateRenderState({baseLayer:a}),l.requestReferenceSpace(p).then(e),l.addEventListener("inputsourceschange",f),f())};var w=new n,y=new n;this.getCamera=function(a){var b=a.parent,c=B.cameras;g(B,b);for(var d=0;d<c.length;d++)g(c[d],b);a.matrixWorld.copy(B.matrixWorld);a=a.children;
|
|
|
d=0;for(b=a.length;d<b;d++)a[d].updateMatrixWorld(!0);w.setFromMatrixPosition(q.matrixWorld);y.setFromMatrixPosition(v.matrixWorld);d=w.distanceTo(y);var e=q.projectionMatrix.elements,f=v.projectionMatrix.elements,h=e[14]/(e[10]-1);a=e[14]/(e[10]+1);b=(e[9]+1)/e[5];c=(e[9]-1)/e[5];var l=(e[8]-1)/e[0],m=(f[8]+1)/f[0];f=h*l;e=h*m;m=d/(-l+m);l=m*-l;q.matrixWorld.decompose(B.position,B.quaternion,B.scale);B.translateX(l);B.translateZ(m);B.matrixWorld.compose(B.position,B.quaternion,B.scale);B.matrixWorldInverse.getInverse(B.matrixWorld);
|
|
|
h+=m;m=a+m;B.projectionMatrix.makePerspective(f-l,e+(d-l),b*a/m*h,c*a/m*h,h,m);return B};this.isPresenting=function(){return null!==l&&null!==m};var L=null,K=new th;K.setAnimationLoop(function(b,c){r=c.getViewerPose(m);if(null!==r){var d=r.views,e=l.renderState.baseLayer;a.setFramebuffer(e.framebuffer);for(var f=0;f<d.length;f++){var g=d[f],h=e.getViewport(g),p=B.cameras[f];p.matrix.fromArray(g.transform.inverse.matrix).getInverse(p.matrix);p.projectionMatrix.fromArray(g.projectionMatrix);p.viewport.set(h.x,
|
|
|
-h.y,h.width,h.height);0===f&&B.matrix.copy(p.matrix)}}for(f=0;f<k.length;f++){d=k[f];if(e=u[f])if(e=c.getPose(e.targetRaySpace,m),null!==e){d.matrix.fromArray(e.transform.matrix);d.matrix.decompose(d.position,d.rotation,d.scale);d.visible=!0;continue}d.visible=!1}L&&L(b,c)});this.setAnimationLoop=function(a){L=a};this.dispose=function(){}}function qg(a){var b;function c(){ra=new gj(H);Fa=new ej(H,ra,a);!1===Fa.isWebGL2&&(ra.get("WEBGL_depth_texture"),ra.get("OES_texture_float"),ra.get("OES_texture_half_float"),
|
|
|
-ra.get("OES_texture_half_float_linear"),ra.get("OES_standard_derivatives"),ra.get("OES_element_index_uint"),ra.get("ANGLE_instanced_arrays"));ra.get("OES_texture_float_linear");ka=new Qh(H,ra,Fa);ba=new ok(H,ra,Fa);ba.scissor(T.copy(ia).multiplyScalar(U).floor());ba.viewport(db.copy(ha).multiplyScalar(U).floor());fa=new jj(H);aa=new fk;X=new pk(H,ra,ba,aa,Fa,ka,fa);la=new bj(H);xa=new hj(H,la,fa);sa=new mj(H,xa,la,fa);za=new lj(H);oa=new ek(A,ra,Fa);wa=new ik;ua=new nk;ma=new cj(A,ba,sa,x);Ba=new dj(H,
|
|
|
-ra,fa,Fa);Ca=new ij(H,ra,fa,Fa);fa.programs=oa.programs;A.capabilities=Fa;A.extensions=ra;A.properties=aa;A.renderLists=wa;A.state=ba;A.info=fa}function d(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");I=!0}function e(){console.log("THREE.WebGLRenderer: Context Restored.");I=!1;c()}function f(a){a=a.target;a.removeEventListener("dispose",f);g(a);aa.remove(a)}function g(a){var b=aa.get(a).program;a.program=void 0;void 0!==b&&oa.releaseProgram(b)}function h(a,b){a.render(function(a){A.renderBufferImmediate(a,
|
|
|
-b)})}function l(a,b,c,d){if(!1!==a.visible){if(a.layers.test(b.layers))if(a.isGroup)c=a.renderOrder;else if(a.isLOD)!0===a.autoUpdate&&a.update(b);else if(a.isLight)E.pushLight(a),a.castShadow&&E.pushShadow(a);else if(a.isSprite){if(!a.frustumCulled||mg.intersectsSprite(a)){d&&Eb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Id);var e=sa.update(a),f=a.material;f.visible&&C.push(a,e,f,c,Eb.z,null)}}else if(a.isImmediateRenderObject)d&&Eb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Id),C.push(a,
|
|
|
-null,a.material,c,Eb.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&a.skeleton.frame!==fa.render.frame&&(a.skeleton.update(),a.skeleton.frame=fa.render.frame),!a.frustumCulled||mg.intersectsObject(a))if(d&&Eb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Id),e=sa.update(a),f=a.material,Array.isArray(f))for(var g=e.groups,h=0,m=g.length;h<m;h++){var p=g[h],r=f[p.materialIndex];r&&r.visible&&C.push(a,e,r,c,Eb.z,p)}else f.visible&&C.push(a,e,f,c,Eb.z,null);a=a.children;h=0;for(m=
|
|
|
-a.length;h<m;h++)l(a[h],b,c,d)}}function m(a,b,c,d){for(var e=0,f=a.length;e<f;e++){var g=a[e],h=g.object,l=g.geometry,m=void 0===d?g.material:d;g=g.group;if(c.isArrayCamera)if(Z=c,ja.enabled&&ta.isAvailable())p(h,b,c,l,m,g);else for(var r=c.cameras,k=0,t=r.length;k<t;k++){var q=r[k];h.layers.test(q.layers)&&(ba.viewport(db.copy(q.viewport)),E.setupLights(q),p(h,b,q,l,m,g))}else Z=null,p(h,b,c,l,m,g)}}function p(a,c,d,e,f,g){a.onBeforeRender(A,c,d,e,f,g);E=ua.get(c,Z||d);a.modelViewMatrix.multiplyMatrices(d.matrixWorldInverse,
|
|
|
-a.matrixWorld);a.normalMatrix.getNormalMatrix(a.modelViewMatrix);if(a.isImmediateRenderObject){var l=k(d,c.fog,f,a);ba.setMaterial(f);ea=b=null;Re=!1;h(a,l)}else A.renderBufferDirect(d,c.fog,e,f,a,g);a.onAfterRender(A,c,d,e,f,g);E=ua.get(c,Z||d)}function r(a,b,c){var d=aa.get(a),e=E.state.lights,h=e.state.version;c=oa.getParameters(a,e.state,E.state.shadowsArray,b,Sa.numPlanes,Sa.numIntersection,c);var l=oa.getProgramCacheKey(a,c),m=d.program,p=!0;if(void 0===m)a.addEventListener("dispose",f);else if(m.cacheKey!==
|
|
|
-l)g(a);else{if(d.lightsStateVersion!==h)d.lightsStateVersion=h;else if(void 0!==c.shaderID)return;p=!1}p&&(c.shaderID?(l=cb[c.shaderID],d.shader={name:a.type,uniforms:Xb(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}):d.shader={name:a.type,uniforms:a.uniforms,vertexShader:a.vertexShader,fragmentShader:a.fragmentShader},a.onBeforeCompile(d.shader,A),l=oa.getProgramCacheKey(a,c),m=oa.acquireProgram(a,d.shader,c,l),d.program=m,d.outputEncoding=A.outputEncoding,a.program=m);
|
|
|
-c=m.getAttributes();if(a.morphTargets)for(l=a.numSupportedMorphTargets=0;l<A.maxMorphTargets;l++)0<=c["morphTarget"+l]&&a.numSupportedMorphTargets++;if(a.morphNormals)for(l=a.numSupportedMorphNormals=0;l<A.maxMorphNormals;l++)0<=c["morphNormal"+l]&&a.numSupportedMorphNormals++;c=d.shader.uniforms;if(!a.isShaderMaterial&&!a.isRawShaderMaterial||!0===a.clipping)d.numClippingPlanes=Sa.numPlanes,d.numIntersection=Sa.numIntersection,c.clippingPlanes=Sa.uniform;d.fog=b;d.needsLights=a.isMeshLambertMaterial||
|
|
|
-a.isMeshToonMaterial||a.isMeshPhongMaterial||a.isMeshStandardMaterial||a.isShadowMaterial||a.isShaderMaterial&&!0===a.lights;d.lightsStateVersion=h;d.needsLights&&(c.ambientLightColor.value=e.state.ambient,c.lightProbe.value=e.state.probe,c.directionalLights.value=e.state.directional,c.spotLights.value=e.state.spot,c.rectAreaLights.value=e.state.rectArea,c.pointLights.value=e.state.point,c.hemisphereLights.value=e.state.hemi,c.directionalShadowMap.value=e.state.directionalShadowMap,c.directionalShadowMatrix.value=
|
|
|
-e.state.directionalShadowMatrix,c.spotShadowMap.value=e.state.spotShadowMap,c.spotShadowMatrix.value=e.state.spotShadowMatrix,c.pointShadowMap.value=e.state.pointShadowMap,c.pointShadowMatrix.value=e.state.pointShadowMatrix);a=d.program.getUniforms();a=Bb.seqWithValue(a.seq,c);d.uniformsList=a}function k(a,b,c,d){X.resetTextureUnits();var e=aa.get(c),f=E.state.lights;pa&&(ng||a!==S)&&Sa.setState(c.clippingPlanes,c.clipIntersection,c.clipShadows,a,e,a===S&&c.id===Qe);c.version===e.__version&&(void 0===
|
|
|
-e.program?c.needsUpdate=!0:c.fog&&e.fog!==b?c.needsUpdate=!0:e.needsLights&&e.lightsStateVersion!==f.state.version?c.needsUpdate=!0:void 0===e.numClippingPlanes||e.numClippingPlanes===Sa.numPlanes&&e.numIntersection===Sa.numIntersection?e.outputEncoding!==A.outputEncoding&&(c.needsUpdate=!0):c.needsUpdate=!0);c.version!==e.__version&&(r(c,b,d),e.__version=c.version);var g=!1,h=!1,l=!1;f=e.program;var m=f.getUniforms(),p=e.shader.uniforms;ba.useProgram(f.program)&&(l=h=g=!0);c.id!==Qe&&(Qe=c.id,h=
|
|
|
-!0);if(g||S!==a){0<f.numMultiviewViews?ta.updateCameraProjectionMatricesUniform(a,m):m.setValue(H,"projectionMatrix",a.projectionMatrix);Fa.logarithmicDepthBuffer&&m.setValue(H,"logDepthBufFC",2/(Math.log(a.far+1)/Math.LN2));S!==a&&(S=a,l=h=!0);if(c.isShaderMaterial||c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshStandardMaterial||c.envMap)g=m.map.cameraPosition,void 0!==g&&g.setValue(H,Eb.setFromMatrixPosition(a.matrixWorld));(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||
|
|
|
-c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial)&&m.setValue(H,"isOrthographic",!0===a.isOrthographicCamera);if(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial||c.skinning)0<f.numMultiviewViews?ta.updateCameraViewMatricesUniform(a,m):m.setValue(H,"viewMatrix",a.matrixWorldInverse)}if(c.skinning&&(m.setOptional(H,d,"bindMatrix"),m.setOptional(H,d,"bindMatrixInverse"),g=d.skeleton)){var k=g.bones;
|
|
|
-if(Fa.floatVertexTextures){if(void 0===g.boneTexture){k=Math.sqrt(4*k.length);k=P.ceilPowerOfTwo(k);k=Math.max(k,4);var t=new Float32Array(k*k*4);t.set(g.boneMatrices);var v=new Yb(t,k,k,1023,1015);g.boneMatrices=t;g.boneTexture=v;g.boneTextureSize=k}m.setValue(H,"boneTexture",g.boneTexture,X);m.setValue(H,"boneTextureSize",g.boneTextureSize)}else m.setOptional(H,g,"boneMatrices")}if(h||e.receiveShadow!==d.receiveShadow)e.receiveShadow=d.receiveShadow,m.setValue(H,"receiveShadow",d.receiveShadow);
|
|
|
-if(h){m.setValue(H,"toneMappingExposure",A.toneMappingExposure);m.setValue(H,"toneMappingWhitePoint",A.toneMappingWhitePoint);e.needsLights&&(h=l,p.ambientLightColor.needsUpdate=h,p.lightProbe.needsUpdate=h,p.directionalLights.needsUpdate=h,p.pointLights.needsUpdate=h,p.spotLights.needsUpdate=h,p.rectAreaLights.needsUpdate=h,p.hemisphereLights.needsUpdate=h);b&&c.fog&&(p.fogColor.value.copy(b.color),b.isFog?(p.fogNear.value=b.near,p.fogFar.value=b.far):b.isFogExp2&&(p.fogDensity.value=b.density));
|
|
|
-if(c.isMeshBasicMaterial)u(p,c);else if(c.isMeshLambertMaterial)u(p,c),c.emissiveMap&&(p.emissiveMap.value=c.emissiveMap);else if(c.isMeshToonMaterial)u(p,c),p.specular.value.copy(c.specular),p.shininess.value=Math.max(c.shininess,1E-4),c.gradientMap&&(p.gradientMap.value=c.gradientMap),c.emissiveMap&&(p.emissiveMap.value=c.emissiveMap),c.bumpMap&&(p.bumpMap.value=c.bumpMap,p.bumpScale.value=c.bumpScale,1===c.side&&(p.bumpScale.value*=-1)),c.normalMap&&(p.normalMap.value=c.normalMap,p.normalScale.value.copy(c.normalScale),
|
|
|
-1===c.side&&p.normalScale.value.negate()),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias);else if(c.isMeshPhongMaterial)u(p,c),p.specular.value.copy(c.specular),p.shininess.value=Math.max(c.shininess,1E-4),c.emissiveMap&&(p.emissiveMap.value=c.emissiveMap),c.bumpMap&&(p.bumpMap.value=c.bumpMap,p.bumpScale.value=c.bumpScale,1===c.side&&(p.bumpScale.value*=-1)),c.normalMap&&(p.normalMap.value=c.normalMap,
|
|
|
-p.normalScale.value.copy(c.normalScale),1===c.side&&p.normalScale.value.negate()),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias);else if(c.isMeshStandardMaterial)u(p,c),c.isMeshPhysicalMaterial?(q(p,c),p.reflectivity.value=c.reflectivity,p.clearcoat.value=c.clearcoat,p.clearcoatRoughness.value=c.clearcoatRoughness,c.sheen&&p.sheen.value.copy(c.sheen),c.clearcoatNormalMap&&(p.clearcoatNormalScale.value.copy(c.clearcoatNormalScale),
|
|
|
-p.clearcoatNormalMap.value=c.clearcoatNormalMap,1===c.side&&p.clearcoatNormalScale.value.negate()),p.transparency.value=c.transparency):q(p,c);else if(c.isMeshMatcapMaterial)u(p,c),c.matcap&&(p.matcap.value=c.matcap),c.bumpMap&&(p.bumpMap.value=c.bumpMap,p.bumpScale.value=c.bumpScale,1===c.side&&(p.bumpScale.value*=-1)),c.normalMap&&(p.normalMap.value=c.normalMap,p.normalScale.value.copy(c.normalScale),1===c.side&&p.normalScale.value.negate()),c.displacementMap&&(p.displacementMap.value=c.displacementMap,
|
|
|
-p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias);else if(c.isMeshDepthMaterial)u(p,c),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias);else if(c.isMeshDistanceMaterial)u(p,c),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias),p.referencePosition.value.copy(c.referencePosition),
|
|
|
-p.nearDistance.value=c.nearDistance,p.farDistance.value=c.farDistance;else if(c.isMeshNormalMaterial)u(p,c),c.bumpMap&&(p.bumpMap.value=c.bumpMap,p.bumpScale.value=c.bumpScale,1===c.side&&(p.bumpScale.value*=-1)),c.normalMap&&(p.normalMap.value=c.normalMap,p.normalScale.value.copy(c.normalScale),1===c.side&&p.normalScale.value.negate()),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias);else if(c.isLineBasicMaterial)p.diffuse.value.copy(c.color),
|
|
|
-p.opacity.value=c.opacity,c.isLineDashedMaterial&&(p.dashSize.value=c.dashSize,p.totalSize.value=c.dashSize+c.gapSize,p.scale.value=c.scale);else if(c.isPointsMaterial){p.diffuse.value.copy(c.color);p.opacity.value=c.opacity;p.size.value=c.size*U;p.scale.value=.5*J;c.map&&(p.map.value=c.map);c.alphaMap&&(p.alphaMap.value=c.alphaMap);if(c.map)var n=c.map;else c.alphaMap&&(n=c.alphaMap);void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),p.uvTransform.value.copy(n.matrix))}else if(c.isSpriteMaterial){p.diffuse.value.copy(c.color);
|
|
|
-p.opacity.value=c.opacity;p.rotation.value=c.rotation;c.map&&(p.map.value=c.map);c.alphaMap&&(p.alphaMap.value=c.alphaMap);if(c.map)var w=c.map;else c.alphaMap&&(w=c.alphaMap);void 0!==w&&(!0===w.matrixAutoUpdate&&w.updateMatrix(),p.uvTransform.value.copy(w.matrix))}else c.isShadowMaterial&&(p.color.value.copy(c.color),p.opacity.value=c.opacity);void 0!==p.ltc_1&&(p.ltc_1.value=G.LTC_1);void 0!==p.ltc_2&&(p.ltc_2.value=G.LTC_2);Bb.upload(H,e.uniformsList,p,X);c.isShaderMaterial&&(c.uniformsNeedUpdate=
|
|
|
-!1)}c.isShaderMaterial&&!0===c.uniformsNeedUpdate&&(Bb.upload(H,e.uniformsList,p,X),c.uniformsNeedUpdate=!1);c.isSpriteMaterial&&m.setValue(H,"center",d.center);0<f.numMultiviewViews?ta.updateObjectMatricesUniforms(d,a,m):(m.setValue(H,"modelViewMatrix",d.modelViewMatrix),m.setValue(H,"normalMatrix",d.normalMatrix));m.setValue(H,"modelMatrix",d.matrixWorld);return f}function u(a,b){a.opacity.value=b.opacity;b.color&&a.diffuse.value.copy(b.color);b.emissive&&a.emissive.value.copy(b.emissive).multiplyScalar(b.emissiveIntensity);
|
|
|
-b.map&&(a.map.value=b.map);b.alphaMap&&(a.alphaMap.value=b.alphaMap);b.specularMap&&(a.specularMap.value=b.specularMap);b.envMap&&(a.envMap.value=b.envMap,a.flipEnvMap.value=b.envMap.isCubeTexture?-1:1,a.reflectivity.value=b.reflectivity,a.refractionRatio.value=b.refractionRatio,a.maxMipLevel.value=aa.get(b.envMap).__maxMipLevel);b.lightMap&&(a.lightMap.value=b.lightMap,a.lightMapIntensity.value=b.lightMapIntensity);b.aoMap&&(a.aoMap.value=b.aoMap,a.aoMapIntensity.value=b.aoMapIntensity);if(b.map)var c=
|
|
|
-b.map;else b.specularMap?c=b.specularMap:b.displacementMap?c=b.displacementMap:b.normalMap?c=b.normalMap:b.bumpMap?c=b.bumpMap:b.roughnessMap?c=b.roughnessMap:b.metalnessMap?c=b.metalnessMap:b.alphaMap?c=b.alphaMap:b.emissiveMap&&(c=b.emissiveMap);void 0!==c&&(c.isWebGLRenderTarget&&(c=c.texture),!0===c.matrixAutoUpdate&&c.updateMatrix(),a.uvTransform.value.copy(c.matrix));if(b.aoMap)var d=b.aoMap;else b.lightMap&&(d=b.lightMap);void 0!==d&&(d.isWebGLRenderTarget&&(d=d.texture),!0===d.matrixAutoUpdate&&
|
|
|
-d.updateMatrix(),a.uv2Transform.value.copy(d.matrix))}function q(a,b){a.roughness.value=b.roughness;a.metalness.value=b.metalness;b.roughnessMap&&(a.roughnessMap.value=b.roughnessMap);b.metalnessMap&&(a.metalnessMap.value=b.metalnessMap);b.emissiveMap&&(a.emissiveMap.value=b.emissiveMap);b.bumpMap&&(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale,1===b.side&&(a.bumpScale.value*=-1));b.normalMap&&(a.normalMap.value=b.normalMap,a.normalScale.value.copy(b.normalScale),1===b.side&&a.normalScale.value.negate());
|
|
|
-b.displacementMap&&(a.displacementMap.value=b.displacementMap,a.displacementScale.value=b.displacementScale,a.displacementBias.value=b.displacementBias);b.envMap&&(a.envMapIntensity.value=b.envMapIntensity)}a=a||{};var v=void 0!==a.canvas?a.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),B=void 0!==a.context?a.context:null,w=void 0!==a.alpha?a.alpha:!1,y=void 0!==a.depth?a.depth:!0,L=void 0!==a.stencil?a.stencil:!0,K=void 0!==a.antialias?a.antialias:!1,x=void 0!==a.premultipliedAlpha?
|
|
|
-a.premultipliedAlpha:!0,ya=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,D=void 0!==a.powerPreference?a.powerPreference:"default",F=void 0!==a.failIfMajorPerformanceCaveat?a.failIfMajorPerformanceCaveat:!1,C=null,E=null;this.domElement=v;this.debug={checkShaderErrors:!0};this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=!1;this.gammaFactor=2;this.outputEncoding=3E3;this.physicallyCorrectLights=
|
|
|
-!1;this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var A=this,I=!1,M=null,O=0,Q=0,N=null,Y=null,Qe=-1;var ea=b=null;var Re=!1;var S=null,Z=null,db=new da,T=new da,ca=null,W=v.width,J=v.height,U=1,V=null,qa=null,ha=new da(0,0,W,J),ia=new da(0,0,W,J),lg=!1,mg=new Dd,Sa=new fj,pa=!1,ng=!1,Id=new R,Eb=new n;try{w={alpha:w,depth:y,stencil:L,antialias:K,premultipliedAlpha:x,preserveDrawingBuffer:ya,powerPreference:D,failIfMajorPerformanceCaveat:F,
|
|
|
-xrCompatible:!0};v.addEventListener("webglcontextlost",d,!1);v.addEventListener("webglcontextrestored",e,!1);var H=B||v.getContext("webgl",w)||v.getContext("experimental-webgl",w);if(null===H){if(null!==v.getContext("webgl"))throw Error("Error creating WebGL context with your selected attributes.");throw Error("Error creating WebGL context.");}void 0===H.getShaderPrecisionFormat&&(H.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Sh){throw console.error("THREE.WebGLRenderer: "+
|
|
|
-Sh.message),Sh;}var ra,Fa,ba,fa,aa,X,la,xa,sa,oa,wa,ua,ma,za,Ba,Ca,ka;c();var ja=new Rh(A,H);this.xr=ja;var ta=new qk(A,H),Ea=new Oh(A,sa,Fa.maxTextureSize);this.shadowMap=Ea;this.getContext=function(){return H};this.getContextAttributes=function(){return H.getContextAttributes()};this.forceContextLoss=function(){var a=ra.get("WEBGL_lose_context");a&&a.loseContext()};this.forceContextRestore=function(){var a=ra.get("WEBGL_lose_context");a&&a.restoreContext()};this.getPixelRatio=function(){return U};
|
|
|
-this.setPixelRatio=function(a){void 0!==a&&(U=a,this.setSize(W,J,!1))};this.getSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),a=new z);return a.set(W,J)};this.setSize=function(a,b,c){ja.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(W=a,J=b,v.width=Math.floor(a*U),v.height=Math.floor(b*U),!1!==c&&(v.style.width=a+"px",v.style.height=b+"px"),this.setViewport(0,0,a,b))};this.getDrawingBufferSize=
|
|
|
-function(a){void 0===a&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),a=new z);return a.set(W*U,J*U).floor()};this.setDrawingBufferSize=function(a,b,c){W=a;J=b;U=c;v.width=Math.floor(a*c);v.height=Math.floor(b*c);this.setViewport(0,0,a,b)};this.getCurrentViewport=function(a){void 0===a&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),a=new da);return a.copy(db)};this.getViewport=function(a){return a.copy(ha)};
|
|
|
-this.setViewport=function(a,b,c,d){a.isVector4?ha.set(a.x,a.y,a.z,a.w):ha.set(a,b,c,d);ba.viewport(db.copy(ha).multiplyScalar(U).floor())};this.getScissor=function(a){return a.copy(ia)};this.setScissor=function(a,b,c,d){a.isVector4?ia.set(a.x,a.y,a.z,a.w):ia.set(a,b,c,d);ba.scissor(T.copy(ia).multiplyScalar(U).floor())};this.getScissorTest=function(){return lg};this.setScissorTest=function(a){ba.setScissorTest(lg=a)};this.setOpaqueSort=function(a){V=a};this.setTransparentSort=function(a){qa=a};this.getClearColor=
|
|
|
-function(){return ma.getClearColor()};this.setClearColor=function(){ma.setClearColor.apply(ma,arguments)};this.getClearAlpha=function(){return ma.getClearAlpha()};this.setClearAlpha=function(){ma.setClearAlpha.apply(ma,arguments)};this.clear=function(a,b,c){var d=0;if(void 0===a||a)d|=16384;if(void 0===b||b)d|=256;if(void 0===c||c)d|=1024;H.clear(d)};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.dispose=function(){v.removeEventListener("webglcontextlost",d,!1);v.removeEventListener("webglcontextrestored",e,!1);wa.dispose();ua.dispose();aa.dispose();sa.dispose();ja.dispose();Aa.stop()};this.renderBufferImmediate=function(a,b){ba.initAttributes();var c=aa.get(a);a.hasPositions&&!c.position&&(c.position=H.createBuffer());a.hasNormals&&!c.normal&&(c.normal=H.createBuffer());a.hasUvs&&!c.uv&&(c.uv=H.createBuffer());a.hasColors&&!c.color&&(c.color=H.createBuffer());b=b.getAttributes();a.hasPositions&&
|
|
|
-(H.bindBuffer(34962,c.position),H.bufferData(34962,a.positionArray,35048),ba.enableAttribute(b.position),H.vertexAttribPointer(b.position,3,5126,!1,0,0));a.hasNormals&&(H.bindBuffer(34962,c.normal),H.bufferData(34962,a.normalArray,35048),ba.enableAttribute(b.normal),H.vertexAttribPointer(b.normal,3,5126,!1,0,0));a.hasUvs&&(H.bindBuffer(34962,c.uv),H.bufferData(34962,a.uvArray,35048),ba.enableAttribute(b.uv),H.vertexAttribPointer(b.uv,2,5126,!1,0,0));a.hasColors&&(H.bindBuffer(34962,c.color),H.bufferData(34962,
|
|
|
-a.colorArray,35048),ba.enableAttribute(b.color),H.vertexAttribPointer(b.color,3,5126,!1,0,0));ba.disableUnusedAttributes();H.drawArrays(4,0,a.count);a.count=0};this.renderBufferDirect=function(a,c,d,e,f,g){var h=f.isMesh&&0>f.matrixWorld.determinant(),l=k(a,c,e,f);ba.setMaterial(e,h);var m=!1;if(b!==d.id||ea!==l.id||Re!==(!0===e.wireframe))b=d.id,ea=l.id,Re=!0===e.wireframe,m=!0;if(e.morphTargets||e.morphNormals)za.update(f,d,e,l),m=!0;a=d.index;c=d.attributes.position;if((null===a||0!==a.count)&&
|
|
|
-void 0!==c&&0!==c.count){var p=1;!0===e.wireframe&&(a=xa.getWireframeAttribute(d),p=2);h=Ba;if(null!==a){var r=la.get(a);h=Ca;h.setIndex(r)}if(m){if(!1!==Fa.isWebGL2||!f.isInstancedMesh&&!d.isInstancedBufferGeometry||null!==ra.get("ANGLE_instanced_arrays")){ba.initAttributes();m=d.attributes;l=l.getAttributes();var t=e.defaultAttributeValues;for(K in l){var q=l[K];if(0<=q){var u=m[K];if(void 0!==u){var n=u.normalized,v=u.itemSize,w=la.get(u);if(void 0!==w){var B=w.buffer,x=w.type;w=w.bytesPerElement;
|
|
|
-if(u.isInterleavedBufferAttribute){var y=u.data,L=y.stride;u=u.offset;y&&y.isInstancedInterleavedBuffer?(ba.enableAttributeAndDivisor(q,y.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=y.meshPerAttribute*y.count)):ba.enableAttribute(q);H.bindBuffer(34962,B);H.vertexAttribPointer(q,v,x,n,L*w,u*w)}else u.isInstancedBufferAttribute?(ba.enableAttributeAndDivisor(q,u.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=u.meshPerAttribute*u.count)):ba.enableAttribute(q),
|
|
|
-H.bindBuffer(34962,B),H.vertexAttribPointer(q,v,x,n,0,0)}}else if("instanceMatrix"===K)w=la.get(f.instanceMatrix),void 0!==w&&(B=w.buffer,x=w.type,ba.enableAttributeAndDivisor(q+0,1),ba.enableAttributeAndDivisor(q+1,1),ba.enableAttributeAndDivisor(q+2,1),ba.enableAttributeAndDivisor(q+3,1),H.bindBuffer(34962,B),H.vertexAttribPointer(q+0,4,x,!1,64,0),H.vertexAttribPointer(q+1,4,x,!1,64,16),H.vertexAttribPointer(q+2,4,x,!1,64,32),H.vertexAttribPointer(q+3,4,x,!1,64,48));else if(void 0!==t&&(n=t[K],
|
|
|
-void 0!==n))switch(n.length){case 2:H.vertexAttrib2fv(q,n);break;case 3:H.vertexAttrib3fv(q,n);break;case 4:H.vertexAttrib4fv(q,n);break;default:H.vertexAttrib1fv(q,n)}}}ba.disableUnusedAttributes()}null!==a&&H.bindBuffer(34963,r.buffer)}var K=d.drawRange.start*p;m=null!==g?g.start*p:0;r=Math.max(K,m);g=Math.max(0,Math.min(null!==a?a.count:c.count,K+d.drawRange.count*p,m+(null!==g?g.count*p:Infinity))-1-r+1);0!==g&&(f.isMesh?!0===e.wireframe?(ba.setLineWidth(e.wireframeLinewidth*(null===N?U:1)),h.setMode(1)):
|
|
|
-h.setMode(4):f.isLine?(e=e.linewidth,void 0===e&&(e=1),ba.setLineWidth(e*(null===N?U:1)),f.isLineSegments?h.setMode(1):f.isLineLoop?h.setMode(2):h.setMode(3)):f.isPoints?h.setMode(0):f.isSprite&&h.setMode(4),f.isInstancedMesh?h.renderInstances(d,r,g,f.count):d.isInstancedBufferGeometry?h.renderInstances(d,r,g,d.maxInstancedCount):h.render(r,g))}};this.compile=function(a,b){E=ua.get(a,b);E.init();a.traverse(function(a){a.isLight&&(E.pushLight(a),a.castShadow&&E.pushShadow(a))});E.setupLights(b);a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var c=
|
|
|
-0;c<b.material.length;c++)r(b.material[c],a.fog,b);else r(b.material,a.fog,b)})};var Da=null,Aa=new th;Aa.setAnimationLoop(function(a){ja.isPresenting()||Da&&Da(a)});"undefined"!==typeof window&&Aa.setContext(window);this.setAnimationLoop=function(a){Da=a;ja.setAnimationLoop(a);Aa.start()};this.render=function(a,c,d,e){if(void 0!==d){console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead.");var f=d}if(void 0!==e){console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead.");
|
|
|
-var g=e}c&&c.isCamera?I||(ea=b=null,Re=!1,Qe=-1,S=null,!0===a.autoUpdate&&a.updateMatrixWorld(),null===c.parent&&c.updateMatrixWorld(),ja.enabled&&ja.isPresenting()&&(c=ja.getCamera(c)),E=ua.get(a,c),E.init(),a.onBeforeRender(A,a,c,f||N),Id.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse),mg.setFromMatrix(Id),ng=this.localClippingEnabled,pa=Sa.init(this.clippingPlanes,ng,c),C=wa.get(a,c),C.init(),l(a,c,0,A.sortObjects),!0===A.sortObjects&&C.sort(V,qa),pa&&Sa.beginShadows(),Ea.render(E.state.shadowsArray,
|
|
|
-a,c),E.setupLights(c),pa&&Sa.endShadows(),this.info.autoReset&&this.info.reset(),void 0!==f&&this.setRenderTarget(f),ja.enabled&&ta.isAvailable()&&ta.attachCamera(c),ma.render(C,a,c,g),d=C.opaque,e=C.transparent,a.overrideMaterial?(f=a.overrideMaterial,d.length&&m(d,a,c,f),e.length&&m(e,a,c,f)):(d.length&&m(d,a,c),e.length&&m(e,a,c)),a.onAfterRender(A,a,c),null!==N&&(X.updateRenderTargetMipmap(N),X.updateMultisampleRenderTarget(N)),ba.buffers.depth.setTest(!0),ba.buffers.depth.setMask(!0),ba.buffers.color.setMask(!0),
|
|
|
-ba.setPolygonOffset(!1),ja.enabled&&ta.isAvailable()&&ta.detachCamera(c),E=C=null):console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")};this.setFramebuffer=function(a){M!==a&&null===N&&H.bindFramebuffer(36160,a);M=a};this.getActiveCubeFace=function(){return O};this.getActiveMipmapLevel=function(){return Q};this.getRenderTarget=function(){return N};this.setRenderTarget=function(a,b,c){N=a;O=b;Q=c;a&&void 0===aa.get(a).__webglFramebuffer&&X.setupRenderTarget(a);var d=
|
|
|
-M,e=!1;a?(d=aa.get(a).__webglFramebuffer,a.isWebGLRenderTargetCube?(d=d[b||0],e=!0):d=a.isWebGLMultisampleRenderTarget?aa.get(a).__webglMultisampledFramebuffer:d,db.copy(a.viewport),T.copy(a.scissor),ca=a.scissorTest):(db.copy(ha).multiplyScalar(U).floor(),T.copy(ia).multiplyScalar(U).floor(),ca=lg);Y!==d&&(H.bindFramebuffer(36160,d),Y=d);ba.viewport(db);ba.scissor(T);ba.setScissorTest(ca);e&&(a=aa.get(a.texture),H.framebufferTexture2D(36160,36064,34069+(b||0),a.__webglTexture,c||0))};this.readRenderTargetPixels=
|
|
|
-function(a,b,c,d,e,f,g){if(a&&a.isWebGLRenderTarget){var h=aa.get(a).__webglFramebuffer;a.isWebGLRenderTargetCube&&void 0!==g&&(h=h[g]);if(h){g=!1;h!==Y&&(H.bindFramebuffer(36160,h),g=!0);try{var l=a.texture,m=l.format,p=l.type;1023!==m&&ka.convert(m)!==H.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===p||ka.convert(p)===H.getParameter(35738)||1015===p&&(Fa.isWebGL2||ra.get("OES_texture_float")||
|
|
|
-ra.get("WEBGL_color_buffer_float"))||1016===p&&(Fa.isWebGL2?ra.get("EXT_color_buffer_float"):ra.get("EXT_color_buffer_half_float"))?36053===H.checkFramebufferStatus(36160)?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&H.readPixels(b,c,d,e,ka.convert(m),ka.convert(p),f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{g&&
|
|
|
-H.bindFramebuffer(36160,Y)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")};this.copyFramebufferToTexture=function(a,b,c){void 0===c&&(c=0);var d=Math.pow(2,-c),e=Math.floor(b.image.width*d);d=Math.floor(b.image.height*d);var f=ka.convert(b.format);X.setTexture2D(b,0);H.copyTexImage2D(3553,c,f,a.x,a.y,e,d,0);ba.unbindTexture()};this.copyTextureToTexture=function(a,b,c,d){var e=b.image.width,f=b.image.height,g=ka.convert(c.format),h=
|
|
|
-ka.convert(c.type);X.setTexture2D(c,0);b.isDataTexture?H.texSubImage2D(3553,d||0,a.x,a.y,e,f,g,h,b.image.data):H.texSubImage2D(3553,d||0,a.x,a.y,g,h,b.image);ba.unbindTexture()};this.initTexture=function(a){X.setTexture2D(a,0);ba.unbindTexture()};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function Te(a,b){this.name="";this.color=new A(a);this.density=void 0!==b?b:2.5E-4}function Ue(a,b,c){this.name="";this.color=new A(a);this.near=
|
|
|
-void 0!==b?b:1;this.far=void 0!==c?c:1E3}function ob(a,b){this.array=a;this.stride=b;this.count=void 0!==a?a.length/b:0;this.usage=35044;this.updateRange={offset:0,count:-1};this.version=0}function Ld(a,b,c,d){this.data=a;this.itemSize=b;this.offset=c;this.normalized=!0===d}function Fb(a){M.call(this);this.type="SpriteMaterial";this.color=new A(16777215);this.alphaMap=this.map=null;this.rotation=0;this.transparent=this.sizeAttenuation=!0;this.setValues(a)}function Md(a){F.call(this);this.type="Sprite";
|
|
|
-if(void 0===Fc){Fc=new C;var b=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]);b=new ob(b,5);Fc.setIndex([0,1,2,0,2,3]);Fc.setAttribute("position",new Ld(b,3,0,!1));Fc.setAttribute("uv",new Ld(b,2,3,!1))}this.geometry=Fc;this.material=void 0!==a?a:new Fb;this.center=new z(.5,.5)}function Ve(a,b,c,d,e,f){Gc.subVectors(a,c).addScalar(.5).multiply(d);void 0!==e?(Nd.x=f*Gc.x-e*Gc.y,Nd.y=e*Gc.x+f*Gc.y):Nd.copy(Gc);a.copy(b);a.x+=Nd.x;a.y+=Nd.y;a.applyMatrix4(Th)}function Od(){F.call(this);
|
|
|
-this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}});this.autoUpdate=!0}function Pd(a,b){a&&a.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");V.call(this,a,b);this.type="SkinnedMesh";this.bindMode="attached";this.bindMatrix=new R;this.bindMatrixInverse=new R}function We(a,b){a=a||[];this.bones=a.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);this.frame=-1;if(void 0===b)this.calculateInverses();
|
|
|
-else if(this.bones.length===b.length)this.boneInverses=b.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],a=0,b=this.bones.length;a<b;a++)this.boneInverses.push(new R)}function rg(){F.call(this);this.type="Bone"}function Xe(a,b,c){V.call(this,a,b);this.instanceMatrix=new Q(new Float32Array(16*c),16);this.count=c}function Y(a){M.call(this);this.type="LineBasicMaterial";this.color=new A(16777215);this.linewidth=1;this.linejoin=this.linecap="round";
|
|
|
-this.setValues(a)}function xa(a,b,c){1===c&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead.");F.call(this);this.type="Line";this.geometry=void 0!==a?a:new C;this.material=void 0!==b?b:new Y({color:16777215*Math.random()})}function Z(a,b){xa.call(this,a,b);this.type="LineSegments"}function Ye(a,b){xa.call(this,a,b);this.type="LineLoop"}function Ta(a){M.call(this);this.type="PointsMaterial";this.color=new A(16777215);this.alphaMap=this.map=
|
|
|
-null;this.size=1;this.sizeAttenuation=!0;this.morphTargets=!1;this.setValues(a)}function Hc(a,b){F.call(this);this.type="Points";this.geometry=void 0!==a?a:new C;this.material=void 0!==b?b:new Ta({color:16777215*Math.random()});this.updateMorphTargets()}function sg(a,b,c,d,e,f,g){var h=tg.distanceSqToPoint(a);h<c&&(c=new n,tg.closestPointToPoint(a,c),c.applyMatrix4(d),a=e.ray.origin.distanceTo(c),a<e.near||a>e.far||f.push({distance:a,distanceToRay:Math.sqrt(h),point:c,index:b,face:null,object:g}))}
|
|
|
-function ug(a,b,c,d,e,f,g,h,l){T.call(this,a,b,c,d,e,f,g,h,l);this.format=void 0!==g?g:1022;this.minFilter=void 0!==f?f:1006;this.magFilter=void 0!==e?e:1006;this.generateMipmaps=!1}function Ic(a,b,c,d,e,f,g,h,l,m,p,r){T.call(this,null,f,g,h,l,m,d,e,p,r);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=this.flipY=!1}function Qd(a,b,c,d,e,f,g,h,l){T.call(this,a,b,c,d,e,f,g,h,l);this.needsUpdate=!0}function Rd(a,b,c,d,e,f,g,h,l,m){m=void 0!==m?m:1026;if(1026!==m&&1027!==m)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");
|
|
|
-void 0===c&&1026===m&&(c=1012);void 0===c&&1027===m&&(c=1020);T.call(this,null,d,e,f,g,h,m,c,l);this.image={width:a,height:b};this.magFilter=void 0!==g?g:1003;this.minFilter=void 0!==h?h:1003;this.generateMipmaps=this.flipY=!1}function Jc(a){C.call(this);this.type="WireframeGeometry";var b=[],c,d,e,f=[0,0],g={},h=["a","b","c"];if(a&&a.isGeometry){var l=a.faces;var m=0;for(d=l.length;m<d;m++){var p=l[m];for(c=0;3>c;c++){var r=p[h[c]];var k=p[h[(c+1)%3]];f[0]=Math.min(r,k);f[1]=Math.max(r,k);r=f[0]+
|
|
|
-","+f[1];void 0===g[r]&&(g[r]={index1:f[0],index2:f[1]})}}for(r in g)m=g[r],h=a.vertices[m.index1],b.push(h.x,h.y,h.z),h=a.vertices[m.index2],b.push(h.x,h.y,h.z)}else if(a&&a.isBufferGeometry)if(h=new n,null!==a.index){l=a.attributes.position;p=a.index;var u=a.groups;0===u.length&&(u=[{start:0,count:p.count,materialIndex:0}]);a=0;for(e=u.length;a<e;++a)for(m=u[a],c=m.start,d=m.count,m=c,d=c+d;m<d;m+=3)for(c=0;3>c;c++)r=p.getX(m+c),k=p.getX(m+(c+1)%3),f[0]=Math.min(r,k),f[1]=Math.max(r,k),r=f[0]+","+
|
|
|
-f[1],void 0===g[r]&&(g[r]={index1:f[0],index2:f[1]});for(r in g)m=g[r],h.fromBufferAttribute(l,m.index1),b.push(h.x,h.y,h.z),h.fromBufferAttribute(l,m.index2),b.push(h.x,h.y,h.z)}else for(l=a.attributes.position,m=0,d=l.count/3;m<d;m++)for(c=0;3>c;c++)g=3*m+c,h.fromBufferAttribute(l,g),b.push(h.x,h.y,h.z),g=3*m+(c+1)%3,h.fromBufferAttribute(l,g),b.push(h.x,h.y,h.z);this.setAttribute("position",new D(b,3))}function Sd(a,b,c){O.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,
|
|
|
-stacks:c};this.fromBufferGeometry(new Kc(a,b,c));this.mergeVertices()}function Kc(a,b,c){C.call(this);this.type="ParametricBufferGeometry";this.parameters={func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],h=new n,l=new n,m=new n,p=new n,k=new n,t,u;3>a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var q=b+1;for(t=0;t<=c;t++){var v=t/c;for(u=0;u<=b;u++){var B=u/b;a(B,v,l);e.push(l.x,l.y,l.z);0<=B-1E-5?(a(B-1E-5,v,m),p.subVectors(l,m)):(a(B+
|
|
|
-1E-5,v,m),p.subVectors(m,l));0<=v-1E-5?(a(B,v-1E-5,m),k.subVectors(l,m)):(a(B,v+1E-5,m),k.subVectors(m,l));h.crossVectors(p,k).normalize();f.push(h.x,h.y,h.z);g.push(B,v)}}for(t=0;t<c;t++)for(u=0;u<b;u++)a=t*q+u+1,h=(t+1)*q+u+1,l=(t+1)*q+u,d.push(t*q+u,a,l),d.push(a,h,l);this.setIndex(d);this.setAttribute("position",new D(e,3));this.setAttribute("normal",new D(f,3));this.setAttribute("uv",new D(g,2))}function Td(a,b,c,d){O.call(this);this.type="PolyhedronGeometry";this.parameters={vertices:a,indices:b,
|
|
|
-radius:c,detail:d};this.fromBufferGeometry(new Da(a,b,c,d));this.mergeVertices()}function Da(a,b,c,d){function e(a){h.push(a.x,a.y,a.z)}function f(b,c){b*=3;c.x=a[b+0];c.y=a[b+1];c.z=a[b+2]}function g(a,b,c,d){0>d&&1===a.x&&(l[b]=a.x-1);0===c.x&&0===c.z&&(l[b]=d/2/Math.PI+.5)}C.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};c=c||1;d=d||0;var h=[],l=[];(function(a){for(var c=new n,d=new n,g=new n,h=0;h<b.length;h+=3){f(b[h+0],c);f(b[h+1],d);
|
|
|
-f(b[h+2],g);var l,m,k=c,w=d,y=g,L=Math.pow(2,a),K=[];for(m=0;m<=L;m++){K[m]=[];var x=k.clone().lerp(y,m/L),z=w.clone().lerp(y,m/L),A=L-m;for(l=0;l<=A;l++)K[m][l]=0===l&&m===L?x:x.clone().lerp(z,l/A)}for(m=0;m<L;m++)for(l=0;l<2*(L-m)-1;l++)k=Math.floor(l/2),0===l%2?(e(K[m][k+1]),e(K[m+1][k]),e(K[m][k])):(e(K[m][k+1]),e(K[m+1][k+1]),e(K[m+1][k]))}})(d);(function(a){for(var b=new n,c=0;c<h.length;c+=3)b.x=h[c+0],b.y=h[c+1],b.z=h[c+2],b.normalize().multiplyScalar(a),h[c+0]=b.x,h[c+1]=b.y,h[c+2]=b.z})(c);
|
|
|
-(function(){for(var a=new n,b=0;b<h.length;b+=3)a.x=h[b+0],a.y=h[b+1],a.z=h[b+2],l.push(Math.atan2(a.z,-a.x)/2/Math.PI+.5,1-(Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5));a=new n;b=new n;for(var c=new n,d=new n,e=new z,f=new z,k=new z,B=0,w=0;B<h.length;B+=9,w+=6){a.set(h[B+0],h[B+1],h[B+2]);b.set(h[B+3],h[B+4],h[B+5]);c.set(h[B+6],h[B+7],h[B+8]);e.set(l[w+0],l[w+1]);f.set(l[w+2],l[w+3]);k.set(l[w+4],l[w+5]);d.copy(a).add(b).add(c).divideScalar(3);var y=Math.atan2(d.z,-d.x);g(e,w+0,a,y);
|
|
|
-g(f,w+2,b,y);g(k,w+4,c,y)}for(a=0;a<l.length;a+=6)b=l[a+0],c=l[a+2],d=l[a+4],e=Math.min(b,c,d),.9<Math.max(b,c,d)&&.1>e&&(.2>b&&(l[a+0]+=1),.2>c&&(l[a+2]+=1),.2>d&&(l[a+4]+=1))})();this.setAttribute("position",new D(h,3));this.setAttribute("normal",new D(h.slice(),3));this.setAttribute("uv",new D(l,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Ud(a,b){O.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Lc(a,b));this.mergeVertices()}
|
|
|
-function Lc(a,b){Da.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],a,b);this.type="TetrahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Vd(a,b){O.call(this);this.type="OctahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new $b(a,b));this.mergeVertices()}function $b(a,b){Da.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],a,b);this.type="OctahedronBufferGeometry";this.parameters=
|
|
|
-{radius:a,detail:b}}function Wd(a,b){O.call(this);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Mc(a,b));this.mergeVertices()}function Mc(a,b){var c=(1+Math.sqrt(5))/2;Da.call(this,[-1,c,0,1,c,0,-1,-c,0,1,-c,0,0,-1,c,0,1,c,0,-1,-c,0,1,-c,c,0,-1,c,0,1,-c,0,-1,-c,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],a,b);this.type="IcosahedronBufferGeometry";this.parameters=
|
|
|
-{radius:a,detail:b}}function Xd(a,b){O.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Nc(a,b));this.mergeVertices()}function Nc(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;Da.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-d,-c,0,-d,c,0,d,-c,0,d,c,-d,-c,0,-d,c,0,d,-c,0,d,c,0,-c,0,-d,c,0,-d,-c,0,d,c,0,d],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,
|
|
|
-6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],a,b);this.type="DodecahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Yd(a,b,c,d,e,f){O.call(this);this.type="TubeGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};void 0!==f&&console.warn("THREE.TubeGeometry: taper has been removed.");a=new ac(a,b,c,d,e);this.tangents=a.tangents;this.normals=
|
|
|
-a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function ac(a,b,c,d,e){function f(e){p=a.getPointAt(e/b,p);var f=g.normals[e];e=g.binormals[e];for(t=0;t<=d;t++){var m=t/d*Math.PI*2,k=Math.sin(m);m=-Math.cos(m);l.x=m*f.x+k*e.x;l.y=m*f.y+k*e.y;l.z=m*f.z+k*e.z;l.normalize();q.push(l.x,l.y,l.z);h.x=p.x+c*l.x;h.y=p.y+c*l.y;h.z=p.z+c*l.z;u.push(h.x,h.y,h.z)}}C.call(this);this.type="TubeBufferGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,
|
|
|
-closed:e};b=b||64;c=c||1;d=d||8;e=e||!1;var g=a.computeFrenetFrames(b,e);this.tangents=g.tangents;this.normals=g.normals;this.binormals=g.binormals;var h=new n,l=new n,m=new z,p=new n,k,t,u=[],q=[],v=[],B=[];for(k=0;k<b;k++)f(k);f(!1===e?b:0);for(k=0;k<=b;k++)for(t=0;t<=d;t++)m.x=k/b,m.y=t/d,v.push(m.x,m.y);(function(){for(t=1;t<=b;t++)for(k=1;k<=d;k++){var a=(d+1)*t+(k-1),c=(d+1)*t+k,e=(d+1)*(t-1)+k;B.push((d+1)*(t-1)+(k-1),a,e);B.push(a,c,e)}})();this.setIndex(B);this.setAttribute("position",new D(u,
|
|
|
-3));this.setAttribute("normal",new D(q,3));this.setAttribute("uv",new D(v,2))}function Zd(a,b,c,d,e,f,g){O.call(this);this.type="TorusKnotGeometry";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};void 0!==g&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead.");this.fromBufferGeometry(new Oc(a,b,c,d,e,f));this.mergeVertices()}function Oc(a,b,c,d,e,f){function g(a,b,c,d,e){var f=Math.sin(a);b=c/b*a;c=Math.cos(b);e.x=d*
|
|
|
-(2+c)*.5*Math.cos(a);e.y=d*(2+c)*f*.5;e.z=d*Math.sin(b)*.5}C.call(this);this.type="TorusKnotBufferGeometry";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};a=a||1;b=b||.4;c=Math.floor(c)||64;d=Math.floor(d)||8;e=e||2;f=f||3;var h=[],l=[],m=[],p=[],k,t=new n,u=new n,q=new n,v=new n,B=new n,w=new n,y=new n;for(k=0;k<=c;++k){var L=k/c*e*Math.PI*2;g(L,e,f,a,q);g(L+.01,e,f,a,v);w.subVectors(v,q);y.addVectors(v,q);B.crossVectors(w,y);y.crossVectors(B,w);B.normalize();y.normalize();
|
|
|
-for(L=0;L<=d;++L){var K=L/d*Math.PI*2,x=-b*Math.cos(K);K=b*Math.sin(K);t.x=q.x+(x*y.x+K*B.x);t.y=q.y+(x*y.y+K*B.y);t.z=q.z+(x*y.z+K*B.z);l.push(t.x,t.y,t.z);u.subVectors(t,q).normalize();m.push(u.x,u.y,u.z);p.push(k/c);p.push(L/d)}}for(L=1;L<=c;L++)for(k=1;k<=d;k++)a=(d+1)*L+(k-1),b=(d+1)*L+k,e=(d+1)*(L-1)+k,h.push((d+1)*(L-1)+(k-1),a,e),h.push(a,b,e);this.setIndex(h);this.setAttribute("position",new D(l,3));this.setAttribute("normal",new D(m,3));this.setAttribute("uv",new D(p,2))}function $d(a,b,
|
|
|
-c,d,e){O.call(this);this.type="TorusGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};this.fromBufferGeometry(new Pc(a,b,c,d,e));this.mergeVertices()}function Pc(a,b,c,d,e){C.call(this);this.type="TorusBufferGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};a=a||1;b=b||.4;c=Math.floor(c)||8;d=Math.floor(d)||6;e=e||2*Math.PI;var f=[],g=[],h=[],l=[],m=new n,p=new n,k=new n,t,u;for(t=0;t<=c;t++)for(u=0;u<=d;u++){var q=u/d*e,v=t/c*
|
|
|
-Math.PI*2;p.x=(a+b*Math.cos(v))*Math.cos(q);p.y=(a+b*Math.cos(v))*Math.sin(q);p.z=b*Math.sin(v);g.push(p.x,p.y,p.z);m.x=a*Math.cos(q);m.y=a*Math.sin(q);k.subVectors(p,m).normalize();h.push(k.x,k.y,k.z);l.push(u/d);l.push(t/c)}for(t=1;t<=c;t++)for(u=1;u<=d;u++)a=(d+1)*(t-1)+u-1,b=(d+1)*(t-1)+u,e=(d+1)*t+u,f.push((d+1)*t+u-1,a,e),f.push(a,b,e);this.setIndex(f);this.setAttribute("position",new D(g,3));this.setAttribute("normal",new D(h,3));this.setAttribute("uv",new D(l,2))}function Uh(a,b,c,d,e){for(var f,
|
|
|
-g=0,h=b,l=c-d;h<c;h+=d)g+=(a[l]-a[h])*(a[h+1]+a[l+1]),l=h;if(e===0<g)for(e=b;e<c;e+=d)f=Vh(e,a[e],a[e+1],f);else for(e=c-d;e>=b;e-=d)f=Vh(e,a[e],a[e+1],f);f&&bc(f,f.next)&&(ae(f),f=f.next);return f}function be(a,b){if(!a)return a;b||(b=a);do{var c=!1;if(a.steiner||!bc(a,a.next)&&0!==sa(a.prev,a,a.next))a=a.next;else{ae(a);a=b=a.prev;if(a===a.next)break;c=!0}}while(c||a!==b);return b}function ce(a,b,c,d,e,f,g){if(a){if(!g&&f){var h=a,l=h;do null===l.z&&(l.z=vg(l.x,l.y,d,e,f)),l.prevZ=l.prev,l=l.nextZ=
|
|
|
-l.next;while(l!==h);l.prevZ.nextZ=null;l.prevZ=null;h=l;var m,p,k,t,u=1;do{l=h;var q=h=null;for(p=0;l;){p++;var n=l;for(m=k=0;m<u&&(k++,n=n.nextZ,n);m++);for(t=u;0<k||0<t&&n;)0!==k&&(0===t||!n||l.z<=n.z)?(m=l,l=l.nextZ,k--):(m=n,n=n.nextZ,t--),q?q.nextZ=m:h=m,m.prevZ=q,q=m;l=n}q.nextZ=null;u*=2}while(1<p)}for(h=a;a.prev!==a.next;){l=a.prev;n=a.next;if(f)q=rk(a,d,e,f);else a:if(q=a,p=q.prev,k=q,u=q.next,0<=sa(p,k,u))q=!1;else{for(m=q.next.next;m!==q.prev;){if(Qc(p.x,p.y,k.x,k.y,u.x,u.y,m.x,m.y)&&0<=
|
|
|
-sa(m.prev,m,m.next)){q=!1;break a}m=m.next}q=!0}if(q)b.push(l.i/c),b.push(a.i/c),b.push(n.i/c),ae(a),h=a=n.next;else if(a=n,a===h){if(!g)ce(be(a),b,c,d,e,f,1);else if(1===g){g=b;h=c;l=a;do n=l.prev,q=l.next.next,!bc(n,q)&&Wh(n,l,l.next,q)&&de(n,q)&&de(q,n)&&(g.push(n.i/h),g.push(l.i/h),g.push(q.i/h),ae(l),ae(l.next),l=a=q),l=l.next;while(l!==a);a=l;ce(a,b,c,d,e,f,2)}else if(2===g)a:{g=a;do{for(h=g.next.next;h!==g.prev;){if(l=g.i!==h.i){l=g;n=h;if(q=l.next.i!==n.i&&l.prev.i!==n.i){b:{q=l;do{if(q.i!==
|
|
|
-l.i&&q.next.i!==l.i&&q.i!==n.i&&q.next.i!==n.i&&Wh(q,q.next,l,n)){q=!0;break b}q=q.next}while(q!==l);q=!1}q=!q}if(q=q&&de(l,n)&&de(n,l)){q=l;p=!1;k=(l.x+n.x)/2;n=(l.y+n.y)/2;do q.y>n!==q.next.y>n&&q.next.y!==q.y&&k<(q.next.x-q.x)*(n-q.y)/(q.next.y-q.y)+q.x&&(p=!p),q=q.next;while(q!==l);q=p}l=q}if(l){a=Xh(g,h);g=be(g,g.next);a=be(a,a.next);ce(g,b,c,d,e,f);ce(a,b,c,d,e,f);break a}h=h.next}g=g.next}while(g!==a)}break}}}}function rk(a,b,c,d){var e=a.prev,f=a.next;if(0<=sa(e,a,f))return!1;var g=e.x>a.x?
|
|
|
-e.x>f.x?e.x:f.x:a.x>f.x?a.x:f.x,h=e.y>a.y?e.y>f.y?e.y:f.y:a.y>f.y?a.y:f.y,l=vg(e.x<a.x?e.x<f.x?e.x:f.x:a.x<f.x?a.x:f.x,e.y<a.y?e.y<f.y?e.y:f.y:a.y<f.y?a.y:f.y,b,c,d);b=vg(g,h,b,c,d);c=a.prevZ;for(d=a.nextZ;c&&c.z>=l&&d&&d.z<=b;){if(c!==a.prev&&c!==a.next&&Qc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=sa(c.prev,c,c.next))return!1;c=c.prevZ;if(d!==a.prev&&d!==a.next&&Qc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=sa(d.prev,d,d.next))return!1;d=d.nextZ}for(;c&&c.z>=l;){if(c!==a.prev&&c!==a.next&&Qc(e.x,e.y,a.x,a.y,
|
|
|
-f.x,f.y,c.x,c.y)&&0<=sa(c.prev,c,c.next))return!1;c=c.prevZ}for(;d&&d.z<=b;){if(d!==a.prev&&d!==a.next&&Qc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=sa(d.prev,d,d.next))return!1;d=d.nextZ}return!0}function sk(a,b){return a.x-b.x}function tk(a,b){var c=b,d=a.x,e=a.y,f=-Infinity;do{if(e<=c.y&&e>=c.next.y&&c.next.y!==c.y){var g=c.x+(e-c.y)*(c.next.x-c.x)/(c.next.y-c.y);if(g<=d&&g>f){f=g;if(g===d){if(e===c.y)return c;if(e===c.next.y)return c.next}var h=c.x<c.next.x?c:c.next}}c=c.next}while(c!==b);if(!h)return null;
|
|
|
-if(d===f)return h.prev;b=h;g=h.x;var l=h.y,m=Infinity;for(c=h.next;c!==b;){if(d>=c.x&&c.x>=g&&d!==c.x&&Qc(e<l?d:f,e,g,l,e<l?f:d,e,c.x,c.y)){var p=Math.abs(e-c.y)/(d-c.x);(p<m||p===m&&c.x>h.x)&&de(c,a)&&(h=c,m=p)}c=c.next}return h}function vg(a,b,c,d,e){a=32767*(a-c)*e;b=32767*(b-d)*e;a=(a|a<<8)&16711935;a=(a|a<<4)&252645135;a=(a|a<<2)&858993459;b=(b|b<<8)&16711935;b=(b|b<<4)&252645135;b=(b|b<<2)&858993459;return(a|a<<1)&1431655765|((b|b<<1)&1431655765)<<1}function uk(a){var b=a,c=a;do{if(b.x<c.x||
|
|
|
-b.x===c.x&&b.y<c.y)c=b;b=b.next}while(b!==a);return c}function Qc(a,b,c,d,e,f,g,h){return 0<=(e-g)*(b-h)-(a-g)*(f-h)&&0<=(a-g)*(d-h)-(c-g)*(b-h)&&0<=(c-g)*(f-h)-(e-g)*(d-h)}function sa(a,b,c){return(b.y-a.y)*(c.x-b.x)-(b.x-a.x)*(c.y-b.y)}function bc(a,b){return a.x===b.x&&a.y===b.y}function Wh(a,b,c,d){return bc(a,c)&&bc(b,d)||bc(a,d)&&bc(c,b)?!0:0<sa(a,b,c)!==0<sa(a,b,d)&&0<sa(c,d,a)!==0<sa(c,d,b)}function de(a,b){return 0>sa(a.prev,a,a.next)?0<=sa(a,b,a.next)&&0<=sa(a,a.prev,b):0>sa(a,b,a.prev)||
|
|
|
-0>sa(a,a.next,b)}function Xh(a,b){var c=new wg(a.i,a.x,a.y),d=new wg(b.i,b.x,b.y),e=a.next,f=b.prev;a.next=b;b.prev=a;c.next=e;e.prev=c;d.next=c;c.prev=d;f.next=d;d.prev=f;return d}function Vh(a,b,c,d){a=new wg(a,b,c);d?(a.next=d.next,a.prev=d,d.next.prev=a,d.next=a):(a.prev=a,a.next=a);return a}function ae(a){a.next.prev=a.prev;a.prev.next=a.next;a.prevZ&&(a.prevZ.nextZ=a.nextZ);a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function wg(a,b,c){this.i=a;this.x=b;this.y=c;this.nextZ=this.prevZ=this.z=this.next=
|
|
|
-this.prev=null;this.steiner=!1}function Yh(a){var b=a.length;2<b&&a[b-1].equals(a[0])&&a.pop()}function Zh(a,b){for(var c=0;c<b.length;c++)a.push(b[c].x),a.push(b[c].y)}function cc(a,b){O.call(this);this.type="ExtrudeGeometry";this.parameters={shapes:a,options:b};this.fromBufferGeometry(new eb(a,b));this.mergeVertices()}function eb(a,b){function c(a){function c(a,b,c){b||console.error("THREE.ExtrudeGeometry: vec does not exist");return b.clone().multiplyScalar(c).add(a)}function g(a,b,c){var d=a.x-
|
|
|
-b.x;var e=a.y-b.y;var f=c.x-a.x;var g=c.y-a.y,h=d*d+e*e;if(Math.abs(d*g-e*f)>Number.EPSILON){var l=Math.sqrt(h),m=Math.sqrt(f*f+g*g);h=b.x-e/l;b=b.y+d/l;g=((c.x-g/m-h)*g-(c.y+f/m-b)*f)/(d*g-e*f);f=h+d*g-a.x;d=b+e*g-a.y;e=f*f+d*d;if(2>=e)return new z(f,d);e=Math.sqrt(e/2)}else a=!1,d>Number.EPSILON?f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(f=-e,e=Math.sqrt(h)):(f=d,d=e,e=Math.sqrt(h/2));return new z(f/e,d/e)}function h(a,b){for(J=a.length;0<=
|
|
|
---J;){var c=J;var f=J-1;0>f&&(f=a.length-1);var g,h=y+2*C;for(g=0;g<h;g++){var l=Z*g,m=Z*(g+1),p=b+f+l,k=b+f+m;m=b+c+m;q(b+c+l);q(p);q(m);q(p);q(k);q(m);l=e.length/3;l=E.generateSideWallUV(d,e,l-6,l-3,l-2,l-1);v(l[0]);v(l[1]);v(l[3]);v(l[1]);v(l[2]);v(l[3])}}}function l(a,b,c){B.push(a);B.push(b);B.push(c)}function k(a,b,c){q(a);q(b);q(c);a=e.length/3;a=E.generateTopUV(d,e,a-3,a-2,a-1);v(a[0]);v(a[1]);v(a[2])}function q(a){e.push(B[3*a]);e.push(B[3*a+1]);e.push(B[3*a+2])}function v(a){f.push(a.x);
|
|
|
-f.push(a.y)}var B=[],w=void 0!==b.curveSegments?b.curveSegments:12,y=void 0!==b.steps?b.steps:1,L=void 0!==b.depth?b.depth:100,K=void 0!==b.bevelEnabled?b.bevelEnabled:!0,x=void 0!==b.bevelThickness?b.bevelThickness:6,A=void 0!==b.bevelSize?b.bevelSize:x-2,D=void 0!==b.bevelOffset?b.bevelOffset:0,C=void 0!==b.bevelSegments?b.bevelSegments:3,F=b.extrudePath,E=void 0!==b.UVGenerator?b.UVGenerator:vk;void 0!==b.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),L=
|
|
|
-b.amount);var G=!1;if(F){var I=F.getSpacedPoints(y);G=!0;K=!1;var M=F.computeFrenetFrames(y,!1);var O=new n;var Q=new n;var R=new n}K||(D=A=x=C=0);var N;w=a.extractPoints(w);a=w.shape;var P=w.holes;if(!pb.isClockWise(a)){a=a.reverse();var ea=0;for(N=P.length;ea<N;ea++){var S=P[ea];pb.isClockWise(S)&&(P[ea]=S.reverse())}}var aa=pb.triangulateShape(a,P),Y=a;ea=0;for(N=P.length;ea<N;ea++)S=P[ea],a=a.concat(S);var T,Z=a.length,W,ca=aa.length;w=[];var J=0;var U=Y.length;var X=U-1;for(T=J+1;J<U;J++,X++,
|
|
|
-T++)X===U&&(X=0),T===U&&(T=0),w[J]=g(Y[J],Y[X],Y[T]);F=[];var fa=w.concat();ea=0;for(N=P.length;ea<N;ea++){S=P[ea];var da=[];J=0;U=S.length;X=U-1;for(T=J+1;J<U;J++,X++,T++)X===U&&(X=0),T===U&&(T=0),da[J]=g(S[J],S[X],S[T]);F.push(da);fa=fa.concat(da)}for(X=0;X<C;X++){U=X/C;var ha=x*Math.cos(U*Math.PI/2);T=A*Math.sin(U*Math.PI/2)+D;J=0;for(U=Y.length;J<U;J++){var V=c(Y[J],w[J],T);l(V.x,V.y,-ha)}ea=0;for(N=P.length;ea<N;ea++)for(S=P[ea],da=F[ea],J=0,U=S.length;J<U;J++)V=c(S[J],da[J],T),l(V.x,V.y,-ha)}T=
|
|
|
-A+D;for(J=0;J<Z;J++)V=K?c(a[J],fa[J],T):a[J],G?(Q.copy(M.normals[0]).multiplyScalar(V.x),O.copy(M.binormals[0]).multiplyScalar(V.y),R.copy(I[0]).add(Q).add(O),l(R.x,R.y,R.z)):l(V.x,V.y,0);for(U=1;U<=y;U++)for(J=0;J<Z;J++)V=K?c(a[J],fa[J],T):a[J],G?(Q.copy(M.normals[U]).multiplyScalar(V.x),O.copy(M.binormals[U]).multiplyScalar(V.y),R.copy(I[U]).add(Q).add(O),l(R.x,R.y,R.z)):l(V.x,V.y,L/y*U);for(X=C-1;0<=X;X--){U=X/C;ha=x*Math.cos(U*Math.PI/2);T=A*Math.sin(U*Math.PI/2)+D;J=0;for(U=Y.length;J<U;J++)V=
|
|
|
-c(Y[J],w[J],T),l(V.x,V.y,L+ha);ea=0;for(N=P.length;ea<N;ea++)for(S=P[ea],da=F[ea],J=0,U=S.length;J<U;J++)V=c(S[J],da[J],T),G?l(V.x,V.y+I[y-1].y,I[y-1].x+ha):l(V.x,V.y,L+ha)}(function(){var a=e.length/3;if(K){var b=0*Z;for(J=0;J<ca;J++)W=aa[J],k(W[2]+b,W[1]+b,W[0]+b);b=Z*(y+2*C);for(J=0;J<ca;J++)W=aa[J],k(W[0]+b,W[1]+b,W[2]+b)}else{for(J=0;J<ca;J++)W=aa[J],k(W[2],W[1],W[0]);for(J=0;J<ca;J++)W=aa[J],k(W[0]+Z*y,W[1]+Z*y,W[2]+Z*y)}d.addGroup(a,e.length/3-a,0)})();(function(){var a=e.length/3,b=0;h(Y,
|
|
|
-b);b+=Y.length;ea=0;for(N=P.length;ea<N;ea++)S=P[ea],h(S,b),b+=S.length;d.addGroup(a,e.length/3-a,1)})()}C.call(this);this.type="ExtrudeBufferGeometry";this.parameters={shapes:a,options:b};a=Array.isArray(a)?a:[a];for(var d=this,e=[],f=[],g=0,h=a.length;g<h;g++)c(a[g]);this.setAttribute("position",new D(e,3));this.setAttribute("uv",new D(f,2));this.computeVertexNormals()}function $h(a,b,c){c.shapes=[];if(Array.isArray(a))for(var d=0,e=a.length;d<e;d++)c.shapes.push(a[d].uuid);else c.shapes.push(a.uuid);
|
|
|
-void 0!==b.extrudePath&&(c.options.extrudePath=b.extrudePath.toJSON());return c}function ee(a,b){O.call(this);this.type="TextGeometry";this.parameters={text:a,parameters:b};this.fromBufferGeometry(new Rc(a,b));this.mergeVertices()}function Rc(a,b){b=b||{};var c=b.font;if(!c||!c.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new O;a=c.generateShapes(a,b.size);b.depth=void 0!==b.height?b.height:50;void 0===b.bevelThickness&&(b.bevelThickness=10);
|
|
|
-void 0===b.bevelSize&&(b.bevelSize=8);void 0===b.bevelEnabled&&(b.bevelEnabled=!1);eb.call(this,a,b);this.type="TextBufferGeometry"}function fe(a,b,c,d,e,f,g){O.call(this);this.type="SphereGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};this.fromBufferGeometry(new Gb(a,b,c,d,e,f,g));this.mergeVertices()}function Gb(a,b,c,d,e,f,g){C.call(this);this.type="SphereBufferGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,
|
|
|
-phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};a=a||1;b=Math.max(3,Math.floor(b)||8);c=Math.max(2,Math.floor(c)||6);d=void 0!==d?d:0;e=void 0!==e?e:2*Math.PI;f=void 0!==f?f:0;g=void 0!==g?g:Math.PI;var h=Math.min(f+g,Math.PI),l,m,p=0,k=[],t=new n,u=new n,q=[],v=[],B=[],w=[];for(m=0;m<=c;m++){var y=[],L=m/c,K=0;0==m&&0==f?K=.5/b:m==c&&h==Math.PI&&(K=-.5/b);for(l=0;l<=b;l++){var x=l/b;t.x=-a*Math.cos(d+x*e)*Math.sin(f+L*g);t.y=a*Math.cos(f+L*g);t.z=a*Math.sin(d+x*e)*Math.sin(f+L*g);v.push(t.x,t.y,
|
|
|
-t.z);u.copy(t).normalize();B.push(u.x,u.y,u.z);w.push(x+K,1-L);y.push(p++)}k.push(y)}for(m=0;m<c;m++)for(l=0;l<b;l++)a=k[m][l+1],d=k[m][l],e=k[m+1][l],g=k[m+1][l+1],(0!==m||0<f)&&q.push(a,d,g),(m!==c-1||h<Math.PI)&&q.push(d,e,g);this.setIndex(q);this.setAttribute("position",new D(v,3));this.setAttribute("normal",new D(B,3));this.setAttribute("uv",new D(w,2))}function ge(a,b,c,d,e,f){O.call(this);this.type="RingGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,
|
|
|
-thetaLength:f};this.fromBufferGeometry(new Sc(a,b,c,d,e,f));this.mergeVertices()}function Sc(a,b,c,d,e,f){C.call(this);this.type="RingBufferGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,thetaLength:f};a=a||.5;b=b||1;e=void 0!==e?e:0;f=void 0!==f?f:2*Math.PI;c=void 0!==c?Math.max(3,c):8;d=void 0!==d?Math.max(1,d):1;var g=[],h=[],l=[],m=[],p=a,k=(b-a)/d,t=new n,u=new z,q,v;for(q=0;q<=d;q++){for(v=0;v<=c;v++)a=e+v/c*f,t.x=p*Math.cos(a),t.y=p*Math.sin(a),
|
|
|
-h.push(t.x,t.y,t.z),l.push(0,0,1),u.x=(t.x/b+1)/2,u.y=(t.y/b+1)/2,m.push(u.x,u.y);p+=k}for(q=0;q<d;q++)for(b=q*(c+1),v=0;v<c;v++)a=v+b,e=a+c+1,f=a+c+2,p=a+1,g.push(a,e,p),g.push(e,f,p);this.setIndex(g);this.setAttribute("position",new D(h,3));this.setAttribute("normal",new D(l,3));this.setAttribute("uv",new D(m,2))}function he(a,b,c,d){O.call(this);this.type="LatheGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};this.fromBufferGeometry(new Tc(a,b,c,d));this.mergeVertices()}function Tc(a,
|
|
|
-b,c,d){C.call(this);this.type="LatheBufferGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};b=Math.floor(b)||12;c=c||0;d=d||2*Math.PI;d=P.clamp(d,0,2*Math.PI);var e=[],f=[],g=[],h=1/b,l=new n,m=new z,p;for(p=0;p<=b;p++){var k=c+p*h*d;var t=Math.sin(k),u=Math.cos(k);for(k=0;k<=a.length-1;k++)l.x=a[k].x*t,l.y=a[k].y,l.z=a[k].x*u,f.push(l.x,l.y,l.z),m.x=p/b,m.y=k/(a.length-1),g.push(m.x,m.y)}for(p=0;p<b;p++)for(k=0;k<a.length-1;k++)c=k+p*a.length,h=c+a.length,l=c+a.length+1,m=c+
|
|
|
-1,e.push(c,h,m),e.push(h,l,m);this.setIndex(e);this.setAttribute("position",new D(f,3));this.setAttribute("uv",new D(g,2));this.computeVertexNormals();if(d===2*Math.PI)for(d=this.attributes.normal.array,e=new n,f=new n,g=new n,c=b*a.length*3,k=p=0;p<a.length;p++,k+=3)e.x=d[k+0],e.y=d[k+1],e.z=d[k+2],f.x=d[c+k+0],f.y=d[c+k+1],f.z=d[c+k+2],g.addVectors(e,f).normalize(),d[k+0]=d[c+k+0]=g.x,d[k+1]=d[c+k+1]=g.y,d[k+2]=d[c+k+2]=g.z}function dc(a,b){O.call(this);this.type="ShapeGeometry";"object"===typeof b&&
|
|
|
-(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),b=b.curveSegments);this.parameters={shapes:a,curveSegments:b};this.fromBufferGeometry(new ec(a,b));this.mergeVertices()}function ec(a,b){function c(a){var c,h=e.length/3;a=a.extractPoints(b);var m=a.shape,k=a.holes;!1===pb.isClockWise(m)&&(m=m.reverse());a=0;for(c=k.length;a<c;a++){var p=k[a];!0===pb.isClockWise(p)&&(k[a]=p.reverse())}var n=pb.triangulateShape(m,k);a=0;for(c=k.length;a<c;a++)p=k[a],m=m.concat(p);a=0;for(c=m.length;a<
|
|
|
-c;a++)p=m[a],e.push(p.x,p.y,0),f.push(0,0,1),g.push(p.x,p.y);a=0;for(c=n.length;a<c;a++)m=n[a],d.push(m[0]+h,m[1]+h,m[2]+h),l+=3}C.call(this);this.type="ShapeBufferGeometry";this.parameters={shapes:a,curveSegments:b};b=b||12;var d=[],e=[],f=[],g=[],h=0,l=0;if(!1===Array.isArray(a))c(a);else for(var m=0;m<a.length;m++)c(a[m]),this.addGroup(h,l,m),h+=l,l=0;this.setIndex(d);this.setAttribute("position",new D(e,3));this.setAttribute("normal",new D(f,3));this.setAttribute("uv",new D(g,2))}function ai(a,
|
|
|
-b){b.shapes=[];if(Array.isArray(a))for(var c=0,d=a.length;c<d;c++)b.shapes.push(a[c].uuid);else b.shapes.push(a.uuid);return b}function Uc(a,b){C.call(this);this.type="EdgesGeometry";this.parameters={thresholdAngle:b};var c=[];b=Math.cos(P.DEG2RAD*(void 0!==b?b:1));var d=[0,0],e={},f=["a","b","c"];if(a.isBufferGeometry){var g=new O;g.fromBufferGeometry(a)}else g=a.clone();g.mergeVertices();g.computeFaceNormals();a=g.vertices;g=g.faces;for(var h=0,l=g.length;h<l;h++)for(var m=g[h],k=0;3>k;k++){var r=
|
|
|
-m[f[k]];var t=m[f[(k+1)%3]];d[0]=Math.min(r,t);d[1]=Math.max(r,t);r=d[0]+","+d[1];void 0===e[r]?e[r]={index1:d[0],index2:d[1],face1:h,face2:void 0}:e[r].face2=h}for(r in e)if(d=e[r],void 0===d.face2||g[d.face1].normal.dot(g[d.face2].normal)<=b)f=a[d.index1],c.push(f.x,f.y,f.z),f=a[d.index2],c.push(f.x,f.y,f.z);this.setAttribute("position",new D(c,3))}function fc(a,b,c,d,e,f,g,h){O.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,
|
|
|
-openEnded:f,thetaStart:g,thetaLength:h};this.fromBufferGeometry(new qb(a,b,c,d,e,f,g,h));this.mergeVertices()}function qb(a,b,c,d,e,f,g,h){function l(c){var e,f=new z,l=new n,p=0,v=!0===c?a:b,y=!0===c?1:-1;var A=q;for(e=1;e<=d;e++)r.push(0,B*y,0),t.push(0,y,0),u.push(.5,.5),q++;var E=q;for(e=0;e<=d;e++){var C=e/d*h+g,D=Math.cos(C);C=Math.sin(C);l.x=v*C;l.y=B*y;l.z=v*D;r.push(l.x,l.y,l.z);t.push(0,y,0);f.x=.5*D+.5;f.y=.5*C*y+.5;u.push(f.x,f.y);q++}for(e=0;e<d;e++)f=A+e,l=E+e,!0===c?k.push(l,l+1,f):
|
|
|
-k.push(l+1,l,f),p+=3;m.addGroup(w,p,!0===c?1:2);w+=p}C.call(this);this.type="CylinderBufferGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};var m=this;a=void 0!==a?a:1;b=void 0!==b?b:1;c=c||1;d=Math.floor(d)||8;e=Math.floor(e)||1;f=void 0!==f?f:!1;g=void 0!==g?g:0;h=void 0!==h?h:2*Math.PI;var k=[],r=[],t=[],u=[],q=0,v=[],B=c/2,w=0;(function(){var f,l,p=new n,x=new n,z=0,A=(b-a)/c;for(l=0;l<=e;l++){var C=[],D=l/
|
|
|
-e,E=D*(b-a)+a;for(f=0;f<=d;f++){var F=f/d,G=F*h+g,I=Math.sin(G);G=Math.cos(G);x.x=E*I;x.y=-D*c+B;x.z=E*G;r.push(x.x,x.y,x.z);p.set(I,A,G).normalize();t.push(p.x,p.y,p.z);u.push(F,1-D);C.push(q++)}v.push(C)}for(f=0;f<d;f++)for(l=0;l<e;l++)p=v[l+1][f],x=v[l+1][f+1],A=v[l][f+1],k.push(v[l][f],p,A),k.push(p,x,A),z+=6;m.addGroup(w,z,0);w+=z})();!1===f&&(0<a&&l(!0),0<b&&l(!1));this.setIndex(k);this.setAttribute("position",new D(r,3));this.setAttribute("normal",new D(t,3));this.setAttribute("uv",new D(u,
|
|
|
-2))}function ie(a,b,c,d,e,f,g){fc.call(this,0,a,b,c,d,e,f,g);this.type="ConeGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function je(a,b,c,d,e,f,g){qb.call(this,0,a,b,c,d,e,f,g);this.type="ConeBufferGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function ke(a,b,c,d){O.call(this);this.type="CircleGeometry";this.parameters={radius:a,segments:b,thetaStart:c,
|
|
|
-thetaLength:d};this.fromBufferGeometry(new Vc(a,b,c,d));this.mergeVertices()}function Vc(a,b,c,d){C.call(this);this.type="CircleBufferGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};a=a||1;b=void 0!==b?Math.max(3,b):8;c=void 0!==c?c:0;d=void 0!==d?d:2*Math.PI;var e=[],f=[],g=[],h=[],l,m=new n,k=new z;f.push(0,0,0);g.push(0,0,1);h.push(.5,.5);var r=0;for(l=3;r<=b;r++,l+=3){var t=c+r/b*d;m.x=a*Math.cos(t);m.y=a*Math.sin(t);f.push(m.x,m.y,m.z);g.push(0,0,1);k.x=(f[l]/a+1)/
|
|
|
-2;k.y=(f[l+1]/a+1)/2;h.push(k.x,k.y)}for(l=1;l<=b;l++)e.push(l,l+1,0);this.setIndex(e);this.setAttribute("position",new D(f,3));this.setAttribute("normal",new D(g,3));this.setAttribute("uv",new D(h,2))}function gc(a){M.call(this);this.type="ShadowMaterial";this.color=new A(0);this.transparent=!0;this.setValues(a)}function Wc(a){ma.call(this,a);this.type="RawShaderMaterial"}function fb(a){M.call(this);this.defines={STANDARD:""};this.type="MeshStandardMaterial";this.color=new A(16777215);this.roughness=
|
|
|
-1;this.metalness=0;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new A(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new z(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=this.metalnessMap=this.roughnessMap=null;this.envMapIntensity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=
|
|
|
-1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function hc(a){fb.call(this);this.defines={STANDARD:"",PHYSICAL:""};this.type="MeshPhysicalMaterial";this.reflectivity=.5;this.clearcoatRoughness=this.clearcoat=0;this.sheen=null;this.clearcoatNormalScale=new z(1,1);this.clearcoatNormalMap=null;this.transparency=0;this.setValues(a)}function Hb(a){M.call(this);this.type="MeshPhongMaterial";this.color=new A(16777215);this.specular=
|
|
|
-new A(1118481);this.shininess=30;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new A(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new z(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=this.specularMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=
|
|
|
-1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function ic(a){M.call(this);this.defines={TOON:""};this.type="MeshToonMaterial";this.color=new A(16777215);this.specular=new A(1118481);this.shininess=30;this.lightMap=this.gradientMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new A(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=
|
|
|
-null;this.normalMapType=0;this.normalScale=new z(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=this.specularMap=null;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function jc(a){M.call(this);this.type="MeshNormalMaterial";this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new z(1,1);this.displacementMap=
|
|
|
-null;this.displacementScale=1;this.displacementBias=0;this.wireframe=!1;this.wireframeLinewidth=1;this.morphNormals=this.morphTargets=this.skinning=this.fog=!1;this.setValues(a)}function kc(a){M.call(this);this.type="MeshLambertMaterial";this.color=new A(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new A(0);this.emissiveIntensity=1;this.envMap=this.alphaMap=this.specularMap=this.emissiveMap=null;this.combine=0;this.reflectivity=
|
|
|
-1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function lc(a){M.call(this);this.defines={MATCAP:""};this.type="MeshMatcapMaterial";this.color=new A(16777215);this.bumpMap=this.map=this.matcap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new z(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=
|
|
|
-0;this.alphaMap=null;this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function mc(a){Y.call(this);this.type="LineDashedMaterial";this.scale=1;this.dashSize=3;this.gapSize=1;this.setValues(a)}function Ja(a,b,c,d){this.parameterPositions=a;this._cachedIndex=0;this.resultBuffer=void 0!==d?d:new b.constructor(c);this.sampleValues=b;this.valueSize=c}function Ze(a,b,c,d){Ja.call(this,a,b,c,d);this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function le(a,b,c,
|
|
|
-d){Ja.call(this,a,b,c,d)}function $e(a,b,c,d){Ja.call(this,a,b,c,d)}function oa(a,b,c,d){if(void 0===a)throw Error("THREE.KeyframeTrack: track name is undefined");if(void 0===b||0===b.length)throw Error("THREE.KeyframeTrack: no keyframes in track named "+a);this.name=a;this.times=ia.convertArray(b,this.TimeBufferType);this.values=ia.convertArray(c,this.ValueBufferType);this.setInterpolation(d||this.DefaultInterpolation)}function af(a,b,c){oa.call(this,a,b,c)}function bf(a,b,c,d){oa.call(this,a,b,
|
|
|
-c,d)}function Xc(a,b,c,d){oa.call(this,a,b,c,d)}function cf(a,b,c,d){Ja.call(this,a,b,c,d)}function me(a,b,c,d){oa.call(this,a,b,c,d)}function df(a,b,c,d){oa.call(this,a,b,c,d)}function Yc(a,b,c,d){oa.call(this,a,b,c,d)}function Oa(a,b,c){this.name=a;this.tracks=c;this.duration=void 0!==b?b:-1;this.uuid=P.generateUUID();0>this.duration&&this.resetDuration()}function wk(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return Xc;case "vector":case "vector2":case "vector3":case "vector4":return Yc;
|
|
|
-case "color":return bf;case "quaternion":return me;case "bool":case "boolean":return af;case "string":return df}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+a);}function xk(a){if(void 0===a.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var b=wk(a.type);if(void 0===a.times){var c=[],d=[];ia.flattenJSON(a.keys,c,d,"value");a.times=c;a.values=d}return void 0!==b.parse?b.parse(a):new b(a.name,a.times,a.values,a.interpolation)}function xg(a,b,c){var d=this,e=
|
|
|
-!1,f=0,g=0,h=void 0,l=[];this.onStart=void 0;this.onLoad=a;this.onProgress=b;this.onError=c;this.itemStart=function(a){g++;if(!1===e&&void 0!==d.onStart)d.onStart(a,f,g);e=!0};this.itemEnd=function(a){f++;if(void 0!==d.onProgress)d.onProgress(a,f,g);if(f===g&&(e=!1,void 0!==d.onLoad))d.onLoad()};this.itemError=function(a){if(void 0!==d.onError)d.onError(a)};this.resolveURL=function(a){return h?h(a):a};this.setURLModifier=function(a){h=a;return this};this.addHandler=function(a,b){l.push(a,b);return this};
|
|
|
-this.removeHandler=function(a){a=l.indexOf(a);-1!==a&&l.splice(a,2);return this};this.getHandler=function(a){for(var b=0,c=l.length;b<c;b+=2){var d=l[b],e=l[b+1];d.global&&(d.lastIndex=0);if(d.test(a))return e}return null}}function S(a){this.manager=void 0!==a?a:bi;this.crossOrigin="anonymous";this.resourcePath=this.path=""}function Pa(a){S.call(this,a)}function yg(a){S.call(this,a)}function zg(a){S.call(this,a)}function ef(a){S.call(this,a)}function Zc(a){S.call(this,a)}function ff(a){S.call(this,
|
|
|
-a)}function gf(a){S.call(this,a)}function I(){this.type="Curve";this.arcLengthDivisions=200}function Ka(a,b,c,d,e,f,g,h){I.call(this);this.type="EllipseCurve";this.aX=a||0;this.aY=b||0;this.xRadius=c||1;this.yRadius=d||1;this.aStartAngle=e||0;this.aEndAngle=f||2*Math.PI;this.aClockwise=g||!1;this.aRotation=h||0}function $c(a,b,c,d,e,f){Ka.call(this,a,b,c,c,d,e,f);this.type="ArcCurve"}function Ag(){var a=0,b=0,c=0,d=0;return{initCatmullRom:function(e,f,g,h,l){e=l*(g-e);h=l*(h-f);a=f;b=e;c=-3*f+3*g-
|
|
|
-2*e-h;d=2*f-2*g+e+h},initNonuniformCatmullRom:function(e,f,g,h,l,m,k){e=((f-e)/l-(g-e)/(l+m)+(g-f)/m)*m;h=((g-f)/m-(h-f)/(m+k)+(h-g)/k)*m;a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},calc:function(e){var f=e*e;return a+b*e+c*f+d*f*e}}}function za(a,b,c,d){I.call(this);this.type="CatmullRomCurve3";this.points=a||[];this.closed=b||!1;this.curveType=c||"centripetal";this.tension=d||.5}function ci(a,b,c,d,e){b=.5*(d-b);e=.5*(e-c);var f=a*a;return(2*c-2*d+b+e)*a*f+(-3*c+3*d-2*b-e)*f+b*a+c}function ne(a,b,c,
|
|
|
-d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function oe(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}function Ua(a,b,c,d){I.call(this);this.type="CubicBezierCurve";this.v0=a||new z;this.v1=b||new z;this.v2=c||new z;this.v3=d||new z}function gb(a,b,c,d){I.call(this);this.type="CubicBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n;this.v3=d||new n}function Aa(a,b){I.call(this);this.type="LineCurve";this.v1=a||new z;this.v2=b||new z}function Va(a,b){I.call(this);
|
|
|
-this.type="LineCurve3";this.v1=a||new n;this.v2=b||new n}function Wa(a,b,c){I.call(this);this.type="QuadraticBezierCurve";this.v0=a||new z;this.v1=b||new z;this.v2=c||new z}function hb(a,b,c){I.call(this);this.type="QuadraticBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n}function Xa(a){I.call(this);this.type="SplineCurve";this.points=a||[]}function rb(){I.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function Ya(a){rb.call(this);this.type="Path";this.currentPoint=
|
|
|
-new z;a&&this.setFromPoints(a)}function Ib(a){Ya.call(this,a);this.uuid=P.generateUUID();this.type="Shape";this.holes=[]}function W(a,b){F.call(this);this.type="Light";this.color=new A(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function hf(a,b,c){W.call(this,a,c);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(F.DefaultUp);this.updateMatrix();this.groundColor=new A(b)}function ib(a){this.camera=a;this.bias=0;this.radius=1;this.mapSize=new z(512,512);this.mapPass=
|
|
|
-this.map=null;this.matrix=new R;this._frustum=new Dd;this._frameExtents=new z(1,1);this._viewportCount=1;this._viewports=[new da(0,0,1,1)]}function jf(){ib.call(this,new X(50,1,.5,500))}function kf(a,b,c,d,e,f){W.call(this,a,b);this.type="SpotLight";this.position.copy(F.DefaultUp);this.updateMatrix();this.target=new F;Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=void 0!==c?c:0;this.angle=void 0!==d?d:Math.PI/
|
|
|
-3;this.penumbra=void 0!==e?e:0;this.decay=void 0!==f?f:1;this.shadow=new jf}function Bg(){ib.call(this,new X(90,1,.5,500));this._frameExtents=new z(4,2);this._viewportCount=6;this._viewports=[new da(2,1,1,1),new da(0,1,1,1),new da(3,1,1,1),new da(1,1,1,1),new da(3,0,1,1),new da(1,0,1,1)];this._cubeDirections=[new n(1,0,0),new n(-1,0,0),new n(0,0,1),new n(0,0,-1),new n(0,1,0),new n(0,-1,0)];this._cubeUps=[new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,0,1),new n(0,0,-1)]}function lf(a,
|
|
|
-b,c,d){W.call(this,a,b);this.type="PointLight";Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(a){this.intensity=a/(4*Math.PI)}});this.distance=void 0!==c?c:0;this.decay=void 0!==d?d:1;this.shadow=new Bg}function pe(a,b,c,d,e,f){bb.call(this);this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=void 0!==a?a:-1;this.right=void 0!==b?b:1;this.top=void 0!==c?c:1;this.bottom=void 0!==d?d:-1;this.near=void 0!==e?e:.1;this.far=void 0!==f?f:
|
|
|
-2E3;this.updateProjectionMatrix()}function mf(){ib.call(this,new pe(-5,5,5,-5,.5,500))}function nf(a,b){W.call(this,a,b);this.type="DirectionalLight";this.position.copy(F.DefaultUp);this.updateMatrix();this.target=new F;this.shadow=new mf}function of(a,b){W.call(this,a,b);this.type="AmbientLight";this.castShadow=void 0}function pf(a,b,c,d){W.call(this,a,b);this.type="RectAreaLight";this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function qf(a){S.call(this,a);this.textures={}}function rf(){C.call(this);
|
|
|
-this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function sf(a,b,c,d){"number"===typeof c&&(d=c,c=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));Q.call(this,a,b,c);this.meshPerAttribute=d||1}function tf(a){S.call(this,a)}function uf(a){S.call(this,a)}function Cg(a){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");
|
|
|
-S.call(this,a);this.options=void 0}function Dg(){this.type="ShapePath";this.color=new A;this.subPaths=[];this.currentPath=null}function Eg(a){this.type="Font";this.data=a}function Fg(a){S.call(this,a)}function vf(a){S.call(this,a)}function wf(){this.coefficients=[];for(var a=0;9>a;a++)this.coefficients.push(new n)}function Za(a,b){W.call(this,void 0,b);this.sh=void 0!==a?a:new wf}function Gg(a,b,c){Za.call(this,void 0,c);a=(new A).set(a);c=(new A).set(b);b=new n(a.r,a.g,a.b);a=new n(c.r,c.g,c.b);
|
|
|
-c=Math.sqrt(Math.PI);var d=c*Math.sqrt(.75);this.sh.coefficients[0].copy(b).add(a).multiplyScalar(c);this.sh.coefficients[1].copy(b).sub(a).multiplyScalar(d)}function Hg(a,b){Za.call(this,void 0,b);a=(new A).set(a);this.sh.coefficients[0].set(a.r,a.g,a.b).multiplyScalar(2*Math.sqrt(Math.PI))}function di(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new X;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new X;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=
|
|
|
-!1;this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}function Ig(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}function Jg(){F.call(this);this.type="AudioListener";this.context=Kg.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0;this._clock=new Ig}function ad(a){F.call(this);this.type="Audio";this.listener=a;this.context=a.context;this.gain=
|
|
|
-this.context.createGain();this.gain.connect(a.getInput());this.autoplay=!1;this.buffer=null;this.detune=0;this.loop=!1;this.offset=this.loopEnd=this.loopStart=0;this.duration=void 0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty";this._pausedAt=this._startedAt=0;this.filters=[]}function Lg(a){ad.call(this,a);this.panner=this.context.createPanner();this.panner.panningModel="HRTF";this.panner.connect(this.gain)}function Mg(a,b){this.analyser=a.context.createAnalyser();
|
|
|
-this.analyser.fftSize=void 0!==b?b:2048;this.data=new Uint8Array(this.analyser.frequencyBinCount);a.getOutput().connect(this.analyser)}function Ng(a,b,c){this.binding=a;this.valueSize=c;a=Float64Array;switch(b){case "quaternion":b=this._slerp;break;case "string":case "bool":a=Array;b=this._select;break;default:b=this._lerp}this.buffer=new a(4*c);this._mixBufferRegion=b;this.referenceCount=this.useCount=this.cumulativeWeight=0}function ei(a,b,c){c=c||Ba.parseTrackName(b);this._targetGroup=a;this._bindings=
|
|
|
-a.subscribe_(b,c)}function Ba(a,b,c){this.path=b;this.parsedPath=c||Ba.parseTrackName(b);this.node=Ba.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a}function fi(){this.uuid=P.generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_=0;var a={};this._indicesByUUID=a;for(var b=0,c=arguments.length;b!==c;++b)a[arguments[b].uuid]=b;this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath={};var d=this;this.stats={objects:{get total(){return d._objects.length},
|
|
|
-get inUse(){return this.total-d.nCachedObjects_}},get bindingsPerObject(){return d._bindings.length}}}function gi(a,b,c){this._mixer=a;this._clip=b;this._localRoot=c||null;a=b.tracks;b=a.length;c=Array(b);for(var d={endingStart:2400,endingEnd:2400},e=0;e!==b;++e){var f=a[e].createInterpolant(null);c[e]=f;f.settings=d}this._interpolantSettings=d;this._interpolants=c;this._propertyBindings=Array(b);this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null;this.loop=
|
|
|
-2201;this._loopCount=-1;this._startTime=null;this.time=0;this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1;this.repetitions=Infinity;this.paused=!1;this.enabled=!0;this.clampWhenFinished=!1;this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function Og(a){this._root=a;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function xf(a,b){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),a=b);this.value=a}function Pg(a,b,c){ob.call(this,
|
|
|
-a,b);this.meshPerAttribute=c||1}function hi(a,b,c,d){this.ray=new Rb(a,b);this.near=c||0;this.far=d||Infinity;this.camera=null;this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}};Object.defineProperties(this.params,{PointCloud:{get:function(){console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points.");return this.Points}}})}function ii(a,b){return a.distance-b.distance}function Qg(a,b,c,d){if(!1!==a.visible&&(a.raycast(b,c),!0===d)){a=a.children;d=0;for(var e=
|
|
|
-a.length;d<e;d++)Qg(a[d],b,c,!0)}}function ji(a,b,c){this.radius=void 0!==a?a:1;this.phi=void 0!==b?b:0;this.theta=void 0!==c?c:0;return this}function ki(a,b,c){this.radius=void 0!==a?a:1;this.theta=void 0!==b?b:0;this.y=void 0!==c?c:0;return this}function Rg(a,b){this.min=void 0!==a?a:new z(Infinity,Infinity);this.max=void 0!==b?b:new z(-Infinity,-Infinity)}function Sg(a,b){this.start=void 0!==a?a:new n;this.end=void 0!==b?b:new n}function qe(a){F.call(this);this.material=a;this.render=function(){}}
|
|
|
-function re(a,b,c,d){this.object=a;this.size=void 0!==b?b:1;a=void 0!==c?c:16711680;d=void 0!==d?d:1;b=0;(c=this.object.geometry)&&c.isGeometry?b=3*c.faces.length:c&&c.isBufferGeometry&&(b=c.attributes.normal.count);c=new C;b=new D(6*b,3);c.setAttribute("position",b);Z.call(this,c,new Y({color:a,linewidth:d}));this.matrixAutoUpdate=!1;this.update()}function se(a,b,c,d){this.object=a;this.size=void 0!==b?b:1;a=void 0!==c?c:65535;d=void 0!==d?d:1;(b=this.object.geometry)&&b.isBufferGeometry?(c=b.attributes.tangent.count,
|
|
|
-b=new C,c=new D(6*c,3),b.setAttribute("position",c),Z.call(this,b,new Y({color:a,linewidth:d})),this.matrixAutoUpdate=!1,this.update()):console.error("THREE.VertexTangentsHelper: geometry not an instance of THREE.BufferGeometry.",b)}function bd(a,b){F.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=b;a=new C;b=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(var c=0,d=1;32>c;c++,d++){var e=c/32*Math.PI*2,f=d/32*
|
|
|
-Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.setAttribute("position",new D(b,3));b=new Y({fog:!1});this.cone=new Z(a,b);this.add(this.cone);this.update()}function li(a){var b=[];a&&a.isBone&&b.push(a);for(var c=0;c<a.children.length;c++)b.push.apply(b,li(a.children[c]));return b}function cd(a){for(var b=li(a),c=new C,d=[],e=[],f=new A(0,0,1),g=new A(0,1,0),h=0;h<b.length;h++){var l=b[h];l.parent&&l.parent.isBone&&(d.push(0,0,0),d.push(0,0,0),e.push(f.r,f.g,f.b),e.push(g.r,
|
|
|
-g.g,g.b))}c.setAttribute("position",new D(d,3));c.setAttribute("color",new D(e,3));d=new Y({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0});Z.call(this,c,d);this.root=a;this.bones=b;this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1}function dd(a,b,c){this.light=a;this.light.updateMatrixWorld();this.color=c;a=new Gb(b,4,2);b=new Ha({wireframe:!0,fog:!1});V.call(this,a,b);this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=!1;this.update()}function ed(a,b){this.type="RectAreaLightHelper";
|
|
|
-this.light=a;this.color=b;a=new C;a.setAttribute("position",new D([1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],3));a.computeBoundingSphere();b=new Y({fog:!1});xa.call(this,a,b);a=new C;a.setAttribute("position",new D([1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],3));a.computeBoundingSphere();this.add(new V(a,new Ha({side:1,fog:!1})));this.update()}function fd(a,b,c){F.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;a=new $b(b);a.rotateY(.5*
|
|
|
-Math.PI);this.material=new Ha({wireframe:!0,fog:!1});void 0===this.color&&(this.material.vertexColors=2);b=a.getAttribute("position");b=new Float32Array(3*b.count);a.setAttribute("color",new Q(b,3));this.add(new V(a,this.material));this.update()}function gd(a,b){this.lightProbe=a;this.size=b;a=new ma({defines:{GAMMA_OUTPUT:""},uniforms:{sh:{value:this.lightProbe.sh.coefficients},intensity:{value:this.lightProbe.intensity}},vertexShader:"varying vec3 vNormal;\nvoid main() {\n\tvNormal = normalize( normalMatrix * normal );\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",
|
|
|
-fragmentShader:"#define RECIPROCAL_PI 0.318309886\nvec3 inverseTransformDirection( in vec3 normal, in mat4 matrix ) {\n\t// matrix is assumed to be orthogonal\n\treturn normalize( ( vec4( normal, 0.0 ) * matrix ).xyz );\n}\nvec3 linearToOutput( in vec3 a ) {\n\t#ifdef GAMMA_OUTPUT\n\t\treturn pow( a, vec3( 1.0 / float( GAMMA_FACTOR ) ) );\n\t#else\n\t\treturn a;\n\t#endif\n}\n// source: https://graphics.stanford.edu/papers/envmap/envmap.pdf\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\t// normal is assumed to have unit length\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\t// band 0\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\t// band 1\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\t// band 2\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nuniform vec3 sh[ 9 ]; // sh coefficients\nuniform float intensity; // light probe intensity\nvarying vec3 vNormal;\nvoid main() {\n\tvec3 normal = normalize( vNormal );\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, sh );\n\tvec3 outgoingLight = RECIPROCAL_PI * irradiance * intensity;\n\toutgoingLight = linearToOutput( outgoingLight );\n\tgl_FragColor = vec4( outgoingLight, 1.0 );\n}"});
|
|
|
+h.y,h.width,h.height);0===f&&B.matrix.copy(p.matrix)}}for(f=0;f<k.length;f++){d=k[f];if(e=u[f])if(g=c.getPose(e.targetRaySpace,m),null!==g){d.matrix.fromArray(g.transform.matrix);d.matrix.decompose(d.position,d.rotation,d.scale);"pointing"===e.targetRayMode&&(d.visible=!0);continue}d.visible=!1}L&&L(b,c)});this.setAnimationLoop=function(a){L=a};this.dispose=function(){}}function qg(a){var b;function c(){ra=new gj(H);Fa=new ej(H,ra,a);!1===Fa.isWebGL2&&(ra.get("WEBGL_depth_texture"),ra.get("OES_texture_float"),
|
|
|
+ra.get("OES_texture_half_float"),ra.get("OES_texture_half_float_linear"),ra.get("OES_standard_derivatives"),ra.get("OES_element_index_uint"),ra.get("ANGLE_instanced_arrays"));ra.get("OES_texture_float_linear");ka=new Qh(H,ra,Fa);ba=new ok(H,ra,Fa);ba.scissor(T.copy(ia).multiplyScalar(U).floor());ba.viewport(db.copy(ha).multiplyScalar(U).floor());fa=new jj(H);aa=new fk;X=new pk(H,ra,ba,aa,Fa,ka,fa);la=new bj(H);xa=new hj(H,la,fa);sa=new mj(H,xa,la,fa);za=new lj(H);oa=new ek(A,ra,Fa);wa=new ik;ua=new nk;
|
|
|
+ma=new cj(A,ba,sa,x);Ba=new dj(H,ra,fa,Fa);Ca=new ij(H,ra,fa,Fa);fa.programs=oa.programs;A.capabilities=Fa;A.extensions=ra;A.properties=aa;A.renderLists=wa;A.state=ba;A.info=fa}function d(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");I=!0}function e(){console.log("THREE.WebGLRenderer: Context Restored.");I=!1;c()}function f(a){a=a.target;a.removeEventListener("dispose",f);g(a);aa.remove(a)}function g(a){var b=aa.get(a).program;a.program=void 0;void 0!==b&&oa.releaseProgram(b)}
|
|
|
+function h(a,b){a.render(function(a){A.renderBufferImmediate(a,b)})}function l(a,b,c,d){if(!1!==a.visible){if(a.layers.test(b.layers))if(a.isGroup)c=a.renderOrder;else if(a.isLOD)!0===a.autoUpdate&&a.update(b);else if(a.isLight)E.pushLight(a),a.castShadow&&E.pushShadow(a);else if(a.isSprite){if(!a.frustumCulled||mg.intersectsSprite(a)){d&&Eb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Id);var e=sa.update(a),f=a.material;f.visible&&C.push(a,e,f,c,Eb.z,null)}}else if(a.isImmediateRenderObject)d&&
|
|
|
+Eb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Id),C.push(a,null,a.material,c,Eb.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&a.skeleton.frame!==fa.render.frame&&(a.skeleton.update(),a.skeleton.frame=fa.render.frame),!a.frustumCulled||mg.intersectsObject(a))if(d&&Eb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Id),e=sa.update(a),f=a.material,Array.isArray(f))for(var g=e.groups,h=0,m=g.length;h<m;h++){var p=g[h],r=f[p.materialIndex];r&&r.visible&&C.push(a,e,r,c,Eb.z,
|
|
|
+p)}else f.visible&&C.push(a,e,f,c,Eb.z,null);a=a.children;h=0;for(m=a.length;h<m;h++)l(a[h],b,c,d)}}function m(a,b,c,d){for(var e=0,f=a.length;e<f;e++){var g=a[e],h=g.object,l=g.geometry,m=void 0===d?g.material:d;g=g.group;if(c.isArrayCamera)if(Z=c,ja.enabled&&ta.isAvailable())p(h,b,c,l,m,g);else for(var r=c.cameras,k=0,t=r.length;k<t;k++){var q=r[k];h.layers.test(q.layers)&&(ba.viewport(db.copy(q.viewport)),E.setupLights(q),p(h,b,q,l,m,g))}else Z=null,p(h,b,c,l,m,g)}}function p(a,c,d,e,f,g){a.onBeforeRender(A,
|
|
|
+c,d,e,f,g);E=ua.get(c,Z||d);a.modelViewMatrix.multiplyMatrices(d.matrixWorldInverse,a.matrixWorld);a.normalMatrix.getNormalMatrix(a.modelViewMatrix);if(a.isImmediateRenderObject){var l=k(d,c.fog,f,a);ba.setMaterial(f);ea=b=null;Re=!1;h(a,l)}else A.renderBufferDirect(d,c.fog,e,f,a,g);a.onAfterRender(A,c,d,e,f,g);E=ua.get(c,Z||d)}function r(a,b,c){var d=aa.get(a),e=E.state.lights,h=e.state.version;c=oa.getParameters(a,e.state,E.state.shadowsArray,b,Sa.numPlanes,Sa.numIntersection,c);var l=oa.getProgramCacheKey(a,
|
|
|
+c),m=d.program,p=!0;if(void 0===m)a.addEventListener("dispose",f);else if(m.cacheKey!==l)g(a);else{if(d.lightsStateVersion!==h)d.lightsStateVersion=h;else if(void 0!==c.shaderID)return;p=!1}p&&(c.shaderID?(l=cb[c.shaderID],d.shader={name:a.type,uniforms:Xb(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}):d.shader={name:a.type,uniforms:a.uniforms,vertexShader:a.vertexShader,fragmentShader:a.fragmentShader},a.onBeforeCompile(d.shader,A),l=oa.getProgramCacheKey(a,c),m=oa.acquireProgram(a,
|
|
|
+d.shader,c,l),d.program=m,d.outputEncoding=A.outputEncoding,a.program=m);c=m.getAttributes();if(a.morphTargets)for(l=a.numSupportedMorphTargets=0;l<A.maxMorphTargets;l++)0<=c["morphTarget"+l]&&a.numSupportedMorphTargets++;if(a.morphNormals)for(l=a.numSupportedMorphNormals=0;l<A.maxMorphNormals;l++)0<=c["morphNormal"+l]&&a.numSupportedMorphNormals++;c=d.shader.uniforms;if(!a.isShaderMaterial&&!a.isRawShaderMaterial||!0===a.clipping)d.numClippingPlanes=Sa.numPlanes,d.numIntersection=Sa.numIntersection,
|
|
|
+c.clippingPlanes=Sa.uniform;d.fog=b;d.needsLights=a.isMeshLambertMaterial||a.isMeshToonMaterial||a.isMeshPhongMaterial||a.isMeshStandardMaterial||a.isShadowMaterial||a.isShaderMaterial&&!0===a.lights;d.lightsStateVersion=h;d.needsLights&&(c.ambientLightColor.value=e.state.ambient,c.lightProbe.value=e.state.probe,c.directionalLights.value=e.state.directional,c.spotLights.value=e.state.spot,c.rectAreaLights.value=e.state.rectArea,c.pointLights.value=e.state.point,c.hemisphereLights.value=e.state.hemi,
|
|
|
+c.directionalShadowMap.value=e.state.directionalShadowMap,c.directionalShadowMatrix.value=e.state.directionalShadowMatrix,c.spotShadowMap.value=e.state.spotShadowMap,c.spotShadowMatrix.value=e.state.spotShadowMatrix,c.pointShadowMap.value=e.state.pointShadowMap,c.pointShadowMatrix.value=e.state.pointShadowMatrix);a=d.program.getUniforms();a=Bb.seqWithValue(a.seq,c);d.uniformsList=a}function k(a,b,c,d){X.resetTextureUnits();var e=aa.get(c),f=E.state.lights;pa&&(ng||a!==S)&&Sa.setState(c.clippingPlanes,
|
|
|
+c.clipIntersection,c.clipShadows,a,e,a===S&&c.id===Qe);c.version===e.__version&&(void 0===e.program?c.needsUpdate=!0:c.fog&&e.fog!==b?c.needsUpdate=!0:e.needsLights&&e.lightsStateVersion!==f.state.version?c.needsUpdate=!0:void 0===e.numClippingPlanes||e.numClippingPlanes===Sa.numPlanes&&e.numIntersection===Sa.numIntersection?e.outputEncoding!==A.outputEncoding&&(c.needsUpdate=!0):c.needsUpdate=!0);c.version!==e.__version&&(r(c,b,d),e.__version=c.version);var g=!1,h=!1,l=!1;f=e.program;var m=f.getUniforms(),
|
|
|
+p=e.shader.uniforms;ba.useProgram(f.program)&&(l=h=g=!0);c.id!==Qe&&(Qe=c.id,h=!0);if(g||S!==a){0<f.numMultiviewViews?ta.updateCameraProjectionMatricesUniform(a,m):m.setValue(H,"projectionMatrix",a.projectionMatrix);Fa.logarithmicDepthBuffer&&m.setValue(H,"logDepthBufFC",2/(Math.log(a.far+1)/Math.LN2));S!==a&&(S=a,l=h=!0);if(c.isShaderMaterial||c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshStandardMaterial||c.envMap)g=m.map.cameraPosition,void 0!==g&&g.setValue(H,Eb.setFromMatrixPosition(a.matrixWorld));
|
|
|
+(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial)&&m.setValue(H,"isOrthographic",!0===a.isOrthographicCamera);if(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial||c.skinning)0<f.numMultiviewViews?ta.updateCameraViewMatricesUniform(a,m):m.setValue(H,"viewMatrix",a.matrixWorldInverse)}if(c.skinning&&(m.setOptional(H,d,"bindMatrix"),
|
|
|
+m.setOptional(H,d,"bindMatrixInverse"),g=d.skeleton)){var k=g.bones;if(Fa.floatVertexTextures){if(void 0===g.boneTexture){k=Math.sqrt(4*k.length);k=P.ceilPowerOfTwo(k);k=Math.max(k,4);var t=new Float32Array(k*k*4);t.set(g.boneMatrices);var v=new Yb(t,k,k,1023,1015);g.boneMatrices=t;g.boneTexture=v;g.boneTextureSize=k}m.setValue(H,"boneTexture",g.boneTexture,X);m.setValue(H,"boneTextureSize",g.boneTextureSize)}else m.setOptional(H,g,"boneMatrices")}if(h||e.receiveShadow!==d.receiveShadow)e.receiveShadow=
|
|
|
+d.receiveShadow,m.setValue(H,"receiveShadow",d.receiveShadow);if(h){m.setValue(H,"toneMappingExposure",A.toneMappingExposure);m.setValue(H,"toneMappingWhitePoint",A.toneMappingWhitePoint);e.needsLights&&(h=l,p.ambientLightColor.needsUpdate=h,p.lightProbe.needsUpdate=h,p.directionalLights.needsUpdate=h,p.pointLights.needsUpdate=h,p.spotLights.needsUpdate=h,p.rectAreaLights.needsUpdate=h,p.hemisphereLights.needsUpdate=h);b&&c.fog&&(p.fogColor.value.copy(b.color),b.isFog?(p.fogNear.value=b.near,p.fogFar.value=
|
|
|
+b.far):b.isFogExp2&&(p.fogDensity.value=b.density));if(c.isMeshBasicMaterial)u(p,c);else if(c.isMeshLambertMaterial)u(p,c),c.emissiveMap&&(p.emissiveMap.value=c.emissiveMap);else if(c.isMeshToonMaterial)u(p,c),p.specular.value.copy(c.specular),p.shininess.value=Math.max(c.shininess,1E-4),c.gradientMap&&(p.gradientMap.value=c.gradientMap),c.emissiveMap&&(p.emissiveMap.value=c.emissiveMap),c.bumpMap&&(p.bumpMap.value=c.bumpMap,p.bumpScale.value=c.bumpScale,1===c.side&&(p.bumpScale.value*=-1)),c.normalMap&&
|
|
|
+(p.normalMap.value=c.normalMap,p.normalScale.value.copy(c.normalScale),1===c.side&&p.normalScale.value.negate()),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias);else if(c.isMeshPhongMaterial)u(p,c),p.specular.value.copy(c.specular),p.shininess.value=Math.max(c.shininess,1E-4),c.emissiveMap&&(p.emissiveMap.value=c.emissiveMap),c.bumpMap&&(p.bumpMap.value=c.bumpMap,p.bumpScale.value=c.bumpScale,
|
|
|
+1===c.side&&(p.bumpScale.value*=-1)),c.normalMap&&(p.normalMap.value=c.normalMap,p.normalScale.value.copy(c.normalScale),1===c.side&&p.normalScale.value.negate()),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias);else if(c.isMeshStandardMaterial)u(p,c),c.isMeshPhysicalMaterial?(q(p,c),p.reflectivity.value=c.reflectivity,p.clearcoat.value=c.clearcoat,p.clearcoatRoughness.value=c.clearcoatRoughness,
|
|
|
+c.sheen&&p.sheen.value.copy(c.sheen),c.clearcoatNormalMap&&(p.clearcoatNormalScale.value.copy(c.clearcoatNormalScale),p.clearcoatNormalMap.value=c.clearcoatNormalMap,1===c.side&&p.clearcoatNormalScale.value.negate()),p.transparency.value=c.transparency):q(p,c);else if(c.isMeshMatcapMaterial)u(p,c),c.matcap&&(p.matcap.value=c.matcap),c.bumpMap&&(p.bumpMap.value=c.bumpMap,p.bumpScale.value=c.bumpScale,1===c.side&&(p.bumpScale.value*=-1)),c.normalMap&&(p.normalMap.value=c.normalMap,p.normalScale.value.copy(c.normalScale),
|
|
|
+1===c.side&&p.normalScale.value.negate()),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias);else if(c.isMeshDepthMaterial)u(p,c),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias);else if(c.isMeshDistanceMaterial)u(p,c),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=
|
|
|
+c.displacementScale,p.displacementBias.value=c.displacementBias),p.referencePosition.value.copy(c.referencePosition),p.nearDistance.value=c.nearDistance,p.farDistance.value=c.farDistance;else if(c.isMeshNormalMaterial)u(p,c),c.bumpMap&&(p.bumpMap.value=c.bumpMap,p.bumpScale.value=c.bumpScale,1===c.side&&(p.bumpScale.value*=-1)),c.normalMap&&(p.normalMap.value=c.normalMap,p.normalScale.value.copy(c.normalScale),1===c.side&&p.normalScale.value.negate()),c.displacementMap&&(p.displacementMap.value=c.displacementMap,
|
|
|
+p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias);else if(c.isLineBasicMaterial)p.diffuse.value.copy(c.color),p.opacity.value=c.opacity,c.isLineDashedMaterial&&(p.dashSize.value=c.dashSize,p.totalSize.value=c.dashSize+c.gapSize,p.scale.value=c.scale);else if(c.isPointsMaterial){p.diffuse.value.copy(c.color);p.opacity.value=c.opacity;p.size.value=c.size*U;p.scale.value=.5*J;c.map&&(p.map.value=c.map);c.alphaMap&&(p.alphaMap.value=c.alphaMap);if(c.map)var n=
|
|
|
+c.map;else c.alphaMap&&(n=c.alphaMap);void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),p.uvTransform.value.copy(n.matrix))}else if(c.isSpriteMaterial){p.diffuse.value.copy(c.color);p.opacity.value=c.opacity;p.rotation.value=c.rotation;c.map&&(p.map.value=c.map);c.alphaMap&&(p.alphaMap.value=c.alphaMap);if(c.map)var w=c.map;else c.alphaMap&&(w=c.alphaMap);void 0!==w&&(!0===w.matrixAutoUpdate&&w.updateMatrix(),p.uvTransform.value.copy(w.matrix))}else c.isShadowMaterial&&(p.color.value.copy(c.color),
|
|
|
+p.opacity.value=c.opacity);void 0!==p.ltc_1&&(p.ltc_1.value=G.LTC_1);void 0!==p.ltc_2&&(p.ltc_2.value=G.LTC_2);Bb.upload(H,e.uniformsList,p,X);c.isShaderMaterial&&(c.uniformsNeedUpdate=!1)}c.isShaderMaterial&&!0===c.uniformsNeedUpdate&&(Bb.upload(H,e.uniformsList,p,X),c.uniformsNeedUpdate=!1);c.isSpriteMaterial&&m.setValue(H,"center",d.center);0<f.numMultiviewViews?ta.updateObjectMatricesUniforms(d,a,m):(m.setValue(H,"modelViewMatrix",d.modelViewMatrix),m.setValue(H,"normalMatrix",d.normalMatrix));
|
|
|
+m.setValue(H,"modelMatrix",d.matrixWorld);return f}function u(a,b){a.opacity.value=b.opacity;b.color&&a.diffuse.value.copy(b.color);b.emissive&&a.emissive.value.copy(b.emissive).multiplyScalar(b.emissiveIntensity);b.map&&(a.map.value=b.map);b.alphaMap&&(a.alphaMap.value=b.alphaMap);b.specularMap&&(a.specularMap.value=b.specularMap);b.envMap&&(a.envMap.value=b.envMap,a.flipEnvMap.value=b.envMap.isCubeTexture?-1:1,a.reflectivity.value=b.reflectivity,a.refractionRatio.value=b.refractionRatio,a.maxMipLevel.value=
|
|
|
+aa.get(b.envMap).__maxMipLevel);b.lightMap&&(a.lightMap.value=b.lightMap,a.lightMapIntensity.value=b.lightMapIntensity);b.aoMap&&(a.aoMap.value=b.aoMap,a.aoMapIntensity.value=b.aoMapIntensity);if(b.map)var c=b.map;else b.specularMap?c=b.specularMap:b.displacementMap?c=b.displacementMap:b.normalMap?c=b.normalMap:b.bumpMap?c=b.bumpMap:b.roughnessMap?c=b.roughnessMap:b.metalnessMap?c=b.metalnessMap:b.alphaMap?c=b.alphaMap:b.emissiveMap&&(c=b.emissiveMap);void 0!==c&&(c.isWebGLRenderTarget&&(c=c.texture),
|
|
|
+!0===c.matrixAutoUpdate&&c.updateMatrix(),a.uvTransform.value.copy(c.matrix));if(b.aoMap)var d=b.aoMap;else b.lightMap&&(d=b.lightMap);void 0!==d&&(d.isWebGLRenderTarget&&(d=d.texture),!0===d.matrixAutoUpdate&&d.updateMatrix(),a.uv2Transform.value.copy(d.matrix))}function q(a,b){a.roughness.value=b.roughness;a.metalness.value=b.metalness;b.roughnessMap&&(a.roughnessMap.value=b.roughnessMap);b.metalnessMap&&(a.metalnessMap.value=b.metalnessMap);b.emissiveMap&&(a.emissiveMap.value=b.emissiveMap);b.bumpMap&&
|
|
|
+(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale,1===b.side&&(a.bumpScale.value*=-1));b.normalMap&&(a.normalMap.value=b.normalMap,a.normalScale.value.copy(b.normalScale),1===b.side&&a.normalScale.value.negate());b.displacementMap&&(a.displacementMap.value=b.displacementMap,a.displacementScale.value=b.displacementScale,a.displacementBias.value=b.displacementBias);b.envMap&&(a.envMapIntensity.value=b.envMapIntensity)}a=a||{};var v=void 0!==a.canvas?a.canvas:document.createElementNS("http://www.w3.org/1999/xhtml",
|
|
|
+"canvas"),B=void 0!==a.context?a.context:null,w=void 0!==a.alpha?a.alpha:!1,y=void 0!==a.depth?a.depth:!0,L=void 0!==a.stencil?a.stencil:!0,K=void 0!==a.antialias?a.antialias:!1,x=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,ya=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,D=void 0!==a.powerPreference?a.powerPreference:"default",F=void 0!==a.failIfMajorPerformanceCaveat?a.failIfMajorPerformanceCaveat:!1,C=null,E=null;this.domElement=v;this.debug={checkShaderErrors:!0};this.sortObjects=
|
|
|
+this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=!1;this.gammaFactor=2;this.outputEncoding=3E3;this.physicallyCorrectLights=!1;this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var A=this,I=!1,M=null,O=0,Q=0,N=null,Y=null,Qe=-1;var ea=b=null;var Re=!1;var S=null,Z=null,db=new da,T=new da,ca=null,W=v.width,J=v.height,U=1,V=null,qa=null,ha=new da(0,0,W,J),
|
|
|
+ia=new da(0,0,W,J),lg=!1,mg=new Dd,Sa=new fj,pa=!1,ng=!1,Id=new R,Eb=new n;try{w={alpha:w,depth:y,stencil:L,antialias:K,premultipliedAlpha:x,preserveDrawingBuffer:ya,powerPreference:D,failIfMajorPerformanceCaveat:F,xrCompatible:!0};v.addEventListener("webglcontextlost",d,!1);v.addEventListener("webglcontextrestored",e,!1);var H=B||v.getContext("webgl",w)||v.getContext("experimental-webgl",w);if(null===H){if(null!==v.getContext("webgl"))throw Error("Error creating WebGL context with your selected attributes.");
|
|
|
+throw Error("Error creating WebGL context.");}void 0===H.getShaderPrecisionFormat&&(H.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Sh){throw console.error("THREE.WebGLRenderer: "+Sh.message),Sh;}var ra,Fa,ba,fa,aa,X,la,xa,sa,oa,wa,ua,ma,za,Ba,Ca,ka;c();var ja=new Rh(A,H);this.xr=ja;var ta=new qk(A,H),Ea=new Oh(A,sa,Fa.maxTextureSize);this.shadowMap=Ea;this.getContext=function(){return H};this.getContextAttributes=function(){return H.getContextAttributes()};
|
|
|
+this.forceContextLoss=function(){var a=ra.get("WEBGL_lose_context");a&&a.loseContext()};this.forceContextRestore=function(){var a=ra.get("WEBGL_lose_context");a&&a.restoreContext()};this.getPixelRatio=function(){return U};this.setPixelRatio=function(a){void 0!==a&&(U=a,this.setSize(W,J,!1))};this.getSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),a=new z);return a.set(W,J)};this.setSize=function(a,b,c){ja.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):
|
|
|
+(W=a,J=b,v.width=Math.floor(a*U),v.height=Math.floor(b*U),!1!==c&&(v.style.width=a+"px",v.style.height=b+"px"),this.setViewport(0,0,a,b))};this.getDrawingBufferSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),a=new z);return a.set(W*U,J*U).floor()};this.setDrawingBufferSize=function(a,b,c){W=a;J=b;U=c;v.width=Math.floor(a*c);v.height=Math.floor(b*c);this.setViewport(0,0,a,b)};this.getCurrentViewport=function(a){void 0===a&&
|
|
|
+(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),a=new da);return a.copy(db)};this.getViewport=function(a){return a.copy(ha)};this.setViewport=function(a,b,c,d){a.isVector4?ha.set(a.x,a.y,a.z,a.w):ha.set(a,b,c,d);ba.viewport(db.copy(ha).multiplyScalar(U).floor())};this.getScissor=function(a){return a.copy(ia)};this.setScissor=function(a,b,c,d){a.isVector4?ia.set(a.x,a.y,a.z,a.w):ia.set(a,b,c,d);ba.scissor(T.copy(ia).multiplyScalar(U).floor())};this.getScissorTest=
|
|
|
+function(){return lg};this.setScissorTest=function(a){ba.setScissorTest(lg=a)};this.setOpaqueSort=function(a){V=a};this.setTransparentSort=function(a){qa=a};this.getClearColor=function(){return ma.getClearColor()};this.setClearColor=function(){ma.setClearColor.apply(ma,arguments)};this.getClearAlpha=function(){return ma.getClearAlpha()};this.setClearAlpha=function(){ma.setClearAlpha.apply(ma,arguments)};this.clear=function(a,b,c){var d=0;if(void 0===a||a)d|=16384;if(void 0===b||b)d|=256;if(void 0===
|
|
|
+c||c)d|=1024;H.clear(d)};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.dispose=function(){v.removeEventListener("webglcontextlost",d,!1);v.removeEventListener("webglcontextrestored",e,!1);wa.dispose();ua.dispose();aa.dispose();sa.dispose();ja.dispose();Aa.stop()};this.renderBufferImmediate=function(a,b){ba.initAttributes();var c=aa.get(a);a.hasPositions&&!c.position&&(c.position=H.createBuffer());
|
|
|
+a.hasNormals&&!c.normal&&(c.normal=H.createBuffer());a.hasUvs&&!c.uv&&(c.uv=H.createBuffer());a.hasColors&&!c.color&&(c.color=H.createBuffer());b=b.getAttributes();a.hasPositions&&(H.bindBuffer(34962,c.position),H.bufferData(34962,a.positionArray,35048),ba.enableAttribute(b.position),H.vertexAttribPointer(b.position,3,5126,!1,0,0));a.hasNormals&&(H.bindBuffer(34962,c.normal),H.bufferData(34962,a.normalArray,35048),ba.enableAttribute(b.normal),H.vertexAttribPointer(b.normal,3,5126,!1,0,0));a.hasUvs&&
|
|
|
+(H.bindBuffer(34962,c.uv),H.bufferData(34962,a.uvArray,35048),ba.enableAttribute(b.uv),H.vertexAttribPointer(b.uv,2,5126,!1,0,0));a.hasColors&&(H.bindBuffer(34962,c.color),H.bufferData(34962,a.colorArray,35048),ba.enableAttribute(b.color),H.vertexAttribPointer(b.color,3,5126,!1,0,0));ba.disableUnusedAttributes();H.drawArrays(4,0,a.count);a.count=0};this.renderBufferDirect=function(a,c,d,e,f,g){var h=f.isMesh&&0>f.matrixWorld.determinant(),l=k(a,c,e,f);ba.setMaterial(e,h);var m=!1;if(b!==d.id||ea!==
|
|
|
+l.id||Re!==(!0===e.wireframe))b=d.id,ea=l.id,Re=!0===e.wireframe,m=!0;if(e.morphTargets||e.morphNormals)za.update(f,d,e,l),m=!0;a=d.index;c=d.attributes.position;if((null===a||0!==a.count)&&void 0!==c&&0!==c.count){var p=1;!0===e.wireframe&&(a=xa.getWireframeAttribute(d),p=2);h=Ba;if(null!==a){var r=la.get(a);h=Ca;h.setIndex(r)}if(m){if(!1!==Fa.isWebGL2||!f.isInstancedMesh&&!d.isInstancedBufferGeometry||null!==ra.get("ANGLE_instanced_arrays")){ba.initAttributes();m=d.attributes;l=l.getAttributes();
|
|
|
+var t=e.defaultAttributeValues;for(K in l){var q=l[K];if(0<=q){var u=m[K];if(void 0!==u){var n=u.normalized,v=u.itemSize,w=la.get(u);if(void 0!==w){var B=w.buffer,x=w.type;w=w.bytesPerElement;if(u.isInterleavedBufferAttribute){var y=u.data,L=y.stride;u=u.offset;y&&y.isInstancedInterleavedBuffer?(ba.enableAttributeAndDivisor(q,y.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=y.meshPerAttribute*y.count)):ba.enableAttribute(q);H.bindBuffer(34962,B);H.vertexAttribPointer(q,v,x,n,
|
|
|
+L*w,u*w)}else u.isInstancedBufferAttribute?(ba.enableAttributeAndDivisor(q,u.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=u.meshPerAttribute*u.count)):ba.enableAttribute(q),H.bindBuffer(34962,B),H.vertexAttribPointer(q,v,x,n,0,0)}}else if("instanceMatrix"===K)w=la.get(f.instanceMatrix),void 0!==w&&(B=w.buffer,x=w.type,ba.enableAttributeAndDivisor(q+0,1),ba.enableAttributeAndDivisor(q+1,1),ba.enableAttributeAndDivisor(q+2,1),ba.enableAttributeAndDivisor(q+3,1),H.bindBuffer(34962,
|
|
|
+B),H.vertexAttribPointer(q+0,4,x,!1,64,0),H.vertexAttribPointer(q+1,4,x,!1,64,16),H.vertexAttribPointer(q+2,4,x,!1,64,32),H.vertexAttribPointer(q+3,4,x,!1,64,48));else if(void 0!==t&&(n=t[K],void 0!==n))switch(n.length){case 2:H.vertexAttrib2fv(q,n);break;case 3:H.vertexAttrib3fv(q,n);break;case 4:H.vertexAttrib4fv(q,n);break;default:H.vertexAttrib1fv(q,n)}}}ba.disableUnusedAttributes()}null!==a&&H.bindBuffer(34963,r.buffer)}var K=d.drawRange.start*p;m=null!==g?g.start*p:0;r=Math.max(K,m);g=Math.max(0,
|
|
|
+Math.min(null!==a?a.count:c.count,K+d.drawRange.count*p,m+(null!==g?g.count*p:Infinity))-1-r+1);0!==g&&(f.isMesh?!0===e.wireframe?(ba.setLineWidth(e.wireframeLinewidth*(null===N?U:1)),h.setMode(1)):h.setMode(4):f.isLine?(e=e.linewidth,void 0===e&&(e=1),ba.setLineWidth(e*(null===N?U:1)),f.isLineSegments?h.setMode(1):f.isLineLoop?h.setMode(2):h.setMode(3)):f.isPoints?h.setMode(0):f.isSprite&&h.setMode(4),f.isInstancedMesh?h.renderInstances(d,r,g,f.count):d.isInstancedBufferGeometry?h.renderInstances(d,
|
|
|
+r,g,d.maxInstancedCount):h.render(r,g))}};this.compile=function(a,b){E=ua.get(a,b);E.init();a.traverse(function(a){a.isLight&&(E.pushLight(a),a.castShadow&&E.pushShadow(a))});E.setupLights(b);a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var c=0;c<b.material.length;c++)r(b.material[c],a.fog,b);else r(b.material,a.fog,b)})};var Da=null,Aa=new th;Aa.setAnimationLoop(function(a){ja.isPresenting()||Da&&Da(a)});"undefined"!==typeof window&&Aa.setContext(window);this.setAnimationLoop=
|
|
|
+function(a){Da=a;ja.setAnimationLoop(a);Aa.start()};this.render=function(a,c,d,e){if(void 0!==d){console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead.");var f=d}if(void 0!==e){console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead.");var g=e}c&&c.isCamera?I||(ea=b=null,Re=!1,Qe=-1,S=null,!0===a.autoUpdate&&a.updateMatrixWorld(),null===c.parent&&c.updateMatrixWorld(),ja.enabled&&ja.isPresenting()&&
|
|
|
+(c=ja.getCamera(c)),E=ua.get(a,c),E.init(),a.onBeforeRender(A,a,c,f||N),Id.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse),mg.setFromMatrix(Id),ng=this.localClippingEnabled,pa=Sa.init(this.clippingPlanes,ng,c),C=wa.get(a,c),C.init(),l(a,c,0,A.sortObjects),!0===A.sortObjects&&C.sort(V,qa),pa&&Sa.beginShadows(),Ea.render(E.state.shadowsArray,a,c),E.setupLights(c),pa&&Sa.endShadows(),this.info.autoReset&&this.info.reset(),void 0!==f&&this.setRenderTarget(f),ja.enabled&&ta.isAvailable()&&ta.attachCamera(c),
|
|
|
+ma.render(C,a,c,g),d=C.opaque,e=C.transparent,a.overrideMaterial?(f=a.overrideMaterial,d.length&&m(d,a,c,f),e.length&&m(e,a,c,f)):(d.length&&m(d,a,c),e.length&&m(e,a,c)),a.onAfterRender(A,a,c),null!==N&&(X.updateRenderTargetMipmap(N),X.updateMultisampleRenderTarget(N)),ba.buffers.depth.setTest(!0),ba.buffers.depth.setMask(!0),ba.buffers.color.setMask(!0),ba.setPolygonOffset(!1),ja.enabled&&ta.isAvailable()&&ta.detachCamera(c),E=C=null):console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")};
|
|
|
+this.setFramebuffer=function(a){M!==a&&null===N&&H.bindFramebuffer(36160,a);M=a};this.getActiveCubeFace=function(){return O};this.getActiveMipmapLevel=function(){return Q};this.getRenderTarget=function(){return N};this.setRenderTarget=function(a,b,c){N=a;O=b;Q=c;a&&void 0===aa.get(a).__webglFramebuffer&&X.setupRenderTarget(a);var d=M,e=!1;a?(d=aa.get(a).__webglFramebuffer,a.isWebGLRenderTargetCube?(d=d[b||0],e=!0):d=a.isWebGLMultisampleRenderTarget?aa.get(a).__webglMultisampledFramebuffer:d,db.copy(a.viewport),
|
|
|
+T.copy(a.scissor),ca=a.scissorTest):(db.copy(ha).multiplyScalar(U).floor(),T.copy(ia).multiplyScalar(U).floor(),ca=lg);Y!==d&&(H.bindFramebuffer(36160,d),Y=d);ba.viewport(db);ba.scissor(T);ba.setScissorTest(ca);e&&(a=aa.get(a.texture),H.framebufferTexture2D(36160,36064,34069+(b||0),a.__webglTexture,c||0))};this.readRenderTargetPixels=function(a,b,c,d,e,f,g){if(a&&a.isWebGLRenderTarget){var h=aa.get(a).__webglFramebuffer;a.isWebGLRenderTargetCube&&void 0!==g&&(h=h[g]);if(h){g=!1;h!==Y&&(H.bindFramebuffer(36160,
|
|
|
+h),g=!0);try{var l=a.texture,m=l.format,p=l.type;1023!==m&&ka.convert(m)!==H.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===p||ka.convert(p)===H.getParameter(35738)||1015===p&&(Fa.isWebGL2||ra.get("OES_texture_float")||ra.get("WEBGL_color_buffer_float"))||1016===p&&(Fa.isWebGL2?ra.get("EXT_color_buffer_float"):ra.get("EXT_color_buffer_half_float"))?36053===H.checkFramebufferStatus(36160)?0<=b&&b<=
|
|
|
+a.width-d&&0<=c&&c<=a.height-e&&H.readPixels(b,c,d,e,ka.convert(m),ka.convert(p),f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{g&&H.bindFramebuffer(36160,Y)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")};this.copyFramebufferToTexture=
|
|
|
+function(a,b,c){void 0===c&&(c=0);var d=Math.pow(2,-c),e=Math.floor(b.image.width*d);d=Math.floor(b.image.height*d);var f=ka.convert(b.format);X.setTexture2D(b,0);H.copyTexImage2D(3553,c,f,a.x,a.y,e,d,0);ba.unbindTexture()};this.copyTextureToTexture=function(a,b,c,d){var e=b.image.width,f=b.image.height,g=ka.convert(c.format),h=ka.convert(c.type);X.setTexture2D(c,0);b.isDataTexture?H.texSubImage2D(3553,d||0,a.x,a.y,e,f,g,h,b.image.data):H.texSubImage2D(3553,d||0,a.x,a.y,g,h,b.image);ba.unbindTexture()};
|
|
|
+this.initTexture=function(a){X.setTexture2D(a,0);ba.unbindTexture()};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function Te(a,b){this.name="";this.color=new A(a);this.density=void 0!==b?b:2.5E-4}function Ue(a,b,c){this.name="";this.color=new A(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3}function ob(a,b){this.array=a;this.stride=b;this.count=void 0!==a?a.length/b:0;this.usage=35044;this.updateRange={offset:0,count:-1};
|
|
|
+this.version=0}function Ld(a,b,c,d){this.data=a;this.itemSize=b;this.offset=c;this.normalized=!0===d}function Fb(a){M.call(this);this.type="SpriteMaterial";this.color=new A(16777215);this.alphaMap=this.map=null;this.rotation=0;this.transparent=this.sizeAttenuation=!0;this.setValues(a)}function Md(a){F.call(this);this.type="Sprite";if(void 0===Fc){Fc=new C;var b=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]);b=new ob(b,5);Fc.setIndex([0,1,2,0,2,3]);Fc.setAttribute("position",
|
|
|
+new Ld(b,3,0,!1));Fc.setAttribute("uv",new Ld(b,2,3,!1))}this.geometry=Fc;this.material=void 0!==a?a:new Fb;this.center=new z(.5,.5)}function Ve(a,b,c,d,e,f){Gc.subVectors(a,c).addScalar(.5).multiply(d);void 0!==e?(Nd.x=f*Gc.x-e*Gc.y,Nd.y=e*Gc.x+f*Gc.y):Nd.copy(Gc);a.copy(b);a.x+=Nd.x;a.y+=Nd.y;a.applyMatrix4(Th)}function Od(){F.call(this);this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}});this.autoUpdate=!0}function Pd(a,b){a&&a.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");
|
|
|
+V.call(this,a,b);this.type="SkinnedMesh";this.bindMode="attached";this.bindMatrix=new R;this.bindMatrixInverse=new R}function We(a,b){a=a||[];this.bones=a.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);this.frame=-1;if(void 0===b)this.calculateInverses();else if(this.bones.length===b.length)this.boneInverses=b.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],a=0,b=this.bones.length;a<b;a++)this.boneInverses.push(new R)}function rg(){F.call(this);
|
|
|
+this.type="Bone"}function Xe(a,b,c){V.call(this,a,b);this.instanceMatrix=new Q(new Float32Array(16*c),16);this.count=c}function Y(a){M.call(this);this.type="LineBasicMaterial";this.color=new A(16777215);this.linewidth=1;this.linejoin=this.linecap="round";this.setValues(a)}function xa(a,b,c){1===c&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead.");F.call(this);this.type="Line";this.geometry=void 0!==a?a:new C;this.material=void 0!==b?b:new Y({color:16777215*
|
|
|
+Math.random()})}function Z(a,b){xa.call(this,a,b);this.type="LineSegments"}function Ye(a,b){xa.call(this,a,b);this.type="LineLoop"}function Ta(a){M.call(this);this.type="PointsMaterial";this.color=new A(16777215);this.alphaMap=this.map=null;this.size=1;this.sizeAttenuation=!0;this.morphTargets=!1;this.setValues(a)}function Hc(a,b){F.call(this);this.type="Points";this.geometry=void 0!==a?a:new C;this.material=void 0!==b?b:new Ta({color:16777215*Math.random()});this.updateMorphTargets()}function sg(a,
|
|
|
+b,c,d,e,f,g){var h=tg.distanceSqToPoint(a);h<c&&(c=new n,tg.closestPointToPoint(a,c),c.applyMatrix4(d),a=e.ray.origin.distanceTo(c),a<e.near||a>e.far||f.push({distance:a,distanceToRay:Math.sqrt(h),point:c,index:b,face:null,object:g}))}function ug(a,b,c,d,e,f,g,h,l){T.call(this,a,b,c,d,e,f,g,h,l);this.format=void 0!==g?g:1022;this.minFilter=void 0!==f?f:1006;this.magFilter=void 0!==e?e:1006;this.generateMipmaps=!1}function Ic(a,b,c,d,e,f,g,h,l,m,p,r){T.call(this,null,f,g,h,l,m,d,e,p,r);this.image=
|
|
|
+{width:b,height:c};this.mipmaps=a;this.generateMipmaps=this.flipY=!1}function Qd(a,b,c,d,e,f,g,h,l){T.call(this,a,b,c,d,e,f,g,h,l);this.needsUpdate=!0}function Rd(a,b,c,d,e,f,g,h,l,m){m=void 0!==m?m:1026;if(1026!==m&&1027!==m)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===c&&1026===m&&(c=1012);void 0===c&&1027===m&&(c=1020);T.call(this,null,d,e,f,g,h,m,c,l);this.image={width:a,height:b};this.magFilter=void 0!==g?g:1003;this.minFilter=void 0!==
|
|
|
+h?h:1003;this.generateMipmaps=this.flipY=!1}function Jc(a){C.call(this);this.type="WireframeGeometry";var b=[],c,d,e,f=[0,0],g={},h=["a","b","c"];if(a&&a.isGeometry){var l=a.faces;var m=0;for(d=l.length;m<d;m++){var p=l[m];for(c=0;3>c;c++){var r=p[h[c]];var k=p[h[(c+1)%3]];f[0]=Math.min(r,k);f[1]=Math.max(r,k);r=f[0]+","+f[1];void 0===g[r]&&(g[r]={index1:f[0],index2:f[1]})}}for(r in g)m=g[r],h=a.vertices[m.index1],b.push(h.x,h.y,h.z),h=a.vertices[m.index2],b.push(h.x,h.y,h.z)}else if(a&&a.isBufferGeometry)if(h=
|
|
|
+new n,null!==a.index){l=a.attributes.position;p=a.index;var u=a.groups;0===u.length&&(u=[{start:0,count:p.count,materialIndex:0}]);a=0;for(e=u.length;a<e;++a)for(m=u[a],c=m.start,d=m.count,m=c,d=c+d;m<d;m+=3)for(c=0;3>c;c++)r=p.getX(m+c),k=p.getX(m+(c+1)%3),f[0]=Math.min(r,k),f[1]=Math.max(r,k),r=f[0]+","+f[1],void 0===g[r]&&(g[r]={index1:f[0],index2:f[1]});for(r in g)m=g[r],h.fromBufferAttribute(l,m.index1),b.push(h.x,h.y,h.z),h.fromBufferAttribute(l,m.index2),b.push(h.x,h.y,h.z)}else for(l=a.attributes.position,
|
|
|
+m=0,d=l.count/3;m<d;m++)for(c=0;3>c;c++)g=3*m+c,h.fromBufferAttribute(l,g),b.push(h.x,h.y,h.z),g=3*m+(c+1)%3,h.fromBufferAttribute(l,g),b.push(h.x,h.y,h.z);this.setAttribute("position",new D(b,3))}function Sd(a,b,c){O.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new Kc(a,b,c));this.mergeVertices()}function Kc(a,b,c){C.call(this);this.type="ParametricBufferGeometry";this.parameters={func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],h=
|
|
|
+new n,l=new n,m=new n,p=new n,k=new n,t,u;3>a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var q=b+1;for(t=0;t<=c;t++){var v=t/c;for(u=0;u<=b;u++){var B=u/b;a(B,v,l);e.push(l.x,l.y,l.z);0<=B-1E-5?(a(B-1E-5,v,m),p.subVectors(l,m)):(a(B+1E-5,v,m),p.subVectors(m,l));0<=v-1E-5?(a(B,v-1E-5,m),k.subVectors(l,m)):(a(B,v+1E-5,m),k.subVectors(m,l));h.crossVectors(p,k).normalize();f.push(h.x,h.y,h.z);g.push(B,v)}}for(t=0;t<c;t++)for(u=0;u<b;u++)a=
|
|
|
+t*q+u+1,h=(t+1)*q+u+1,l=(t+1)*q+u,d.push(t*q+u,a,l),d.push(a,h,l);this.setIndex(d);this.setAttribute("position",new D(e,3));this.setAttribute("normal",new D(f,3));this.setAttribute("uv",new D(g,2))}function Td(a,b,c,d){O.call(this);this.type="PolyhedronGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};this.fromBufferGeometry(new Da(a,b,c,d));this.mergeVertices()}function Da(a,b,c,d){function e(a){h.push(a.x,a.y,a.z)}function f(b,c){b*=3;c.x=a[b+0];c.y=a[b+1];c.z=a[b+2]}function g(a,
|
|
|
+b,c,d){0>d&&1===a.x&&(l[b]=a.x-1);0===c.x&&0===c.z&&(l[b]=d/2/Math.PI+.5)}C.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};c=c||1;d=d||0;var h=[],l=[];(function(a){for(var c=new n,d=new n,g=new n,h=0;h<b.length;h+=3){f(b[h+0],c);f(b[h+1],d);f(b[h+2],g);var l,m,k=c,w=d,y=g,L=Math.pow(2,a),K=[];for(m=0;m<=L;m++){K[m]=[];var x=k.clone().lerp(y,m/L),z=w.clone().lerp(y,m/L),A=L-m;for(l=0;l<=A;l++)K[m][l]=0===l&&m===L?x:x.clone().lerp(z,l/A)}for(m=
|
|
|
+0;m<L;m++)for(l=0;l<2*(L-m)-1;l++)k=Math.floor(l/2),0===l%2?(e(K[m][k+1]),e(K[m+1][k]),e(K[m][k])):(e(K[m][k+1]),e(K[m+1][k+1]),e(K[m+1][k]))}})(d);(function(a){for(var b=new n,c=0;c<h.length;c+=3)b.x=h[c+0],b.y=h[c+1],b.z=h[c+2],b.normalize().multiplyScalar(a),h[c+0]=b.x,h[c+1]=b.y,h[c+2]=b.z})(c);(function(){for(var a=new n,b=0;b<h.length;b+=3)a.x=h[b+0],a.y=h[b+1],a.z=h[b+2],l.push(Math.atan2(a.z,-a.x)/2/Math.PI+.5,1-(Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5));a=new n;b=new n;for(var c=
|
|
|
+new n,d=new n,e=new z,f=new z,k=new z,B=0,w=0;B<h.length;B+=9,w+=6){a.set(h[B+0],h[B+1],h[B+2]);b.set(h[B+3],h[B+4],h[B+5]);c.set(h[B+6],h[B+7],h[B+8]);e.set(l[w+0],l[w+1]);f.set(l[w+2],l[w+3]);k.set(l[w+4],l[w+5]);d.copy(a).add(b).add(c).divideScalar(3);var y=Math.atan2(d.z,-d.x);g(e,w+0,a,y);g(f,w+2,b,y);g(k,w+4,c,y)}for(a=0;a<l.length;a+=6)b=l[a+0],c=l[a+2],d=l[a+4],e=Math.min(b,c,d),.9<Math.max(b,c,d)&&.1>e&&(.2>b&&(l[a+0]+=1),.2>c&&(l[a+2]+=1),.2>d&&(l[a+4]+=1))})();this.setAttribute("position",
|
|
|
+new D(h,3));this.setAttribute("normal",new D(h.slice(),3));this.setAttribute("uv",new D(l,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Ud(a,b){O.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Lc(a,b));this.mergeVertices()}function Lc(a,b){Da.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],a,b);this.type="TetrahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Vd(a,b){O.call(this);
|
|
|
+this.type="OctahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new $b(a,b));this.mergeVertices()}function $b(a,b){Da.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],a,b);this.type="OctahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Wd(a,b){O.call(this);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Mc(a,b));this.mergeVertices()}function Mc(a,b){var c=
|
|
|
+(1+Math.sqrt(5))/2;Da.call(this,[-1,c,0,1,c,0,-1,-c,0,1,-c,0,0,-1,c,0,1,c,0,-1,-c,0,1,-c,c,0,-1,c,0,1,-c,0,-1,-c,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],a,b);this.type="IcosahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Xd(a,b){O.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Nc(a,b));this.mergeVertices()}function Nc(a,b){var c=
|
|
|
+(1+Math.sqrt(5))/2,d=1/c;Da.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-d,-c,0,-d,c,0,d,-c,0,d,c,-d,-c,0,-d,c,0,d,-c,0,d,c,0,-c,0,-d,c,0,-d,-c,0,d,c,0,d],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],a,b);this.type="DodecahedronBufferGeometry";this.parameters=
|
|
|
+{radius:a,detail:b}}function Yd(a,b,c,d,e,f){O.call(this);this.type="TubeGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};void 0!==f&&console.warn("THREE.TubeGeometry: taper has been removed.");a=new ac(a,b,c,d,e);this.tangents=a.tangents;this.normals=a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function ac(a,b,c,d,e){function f(e){p=a.getPointAt(e/b,p);var f=g.normals[e];e=g.binormals[e];for(t=0;t<=d;t++){var m=t/d*Math.PI*
|
|
|
+2,k=Math.sin(m);m=-Math.cos(m);l.x=m*f.x+k*e.x;l.y=m*f.y+k*e.y;l.z=m*f.z+k*e.z;l.normalize();q.push(l.x,l.y,l.z);h.x=p.x+c*l.x;h.y=p.y+c*l.y;h.z=p.z+c*l.z;u.push(h.x,h.y,h.z)}}C.call(this);this.type="TubeBufferGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};b=b||64;c=c||1;d=d||8;e=e||!1;var g=a.computeFrenetFrames(b,e);this.tangents=g.tangents;this.normals=g.normals;this.binormals=g.binormals;var h=new n,l=new n,m=new z,p=new n,k,t,u=[],q=[],v=[],B=[];for(k=
|
|
|
+0;k<b;k++)f(k);f(!1===e?b:0);for(k=0;k<=b;k++)for(t=0;t<=d;t++)m.x=k/b,m.y=t/d,v.push(m.x,m.y);(function(){for(t=1;t<=b;t++)for(k=1;k<=d;k++){var a=(d+1)*t+(k-1),c=(d+1)*t+k,e=(d+1)*(t-1)+k;B.push((d+1)*(t-1)+(k-1),a,e);B.push(a,c,e)}})();this.setIndex(B);this.setAttribute("position",new D(u,3));this.setAttribute("normal",new D(q,3));this.setAttribute("uv",new D(v,2))}function Zd(a,b,c,d,e,f,g){O.call(this);this.type="TorusKnotGeometry";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,
|
|
|
+p:e,q:f};void 0!==g&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead.");this.fromBufferGeometry(new Oc(a,b,c,d,e,f));this.mergeVertices()}function Oc(a,b,c,d,e,f){function g(a,b,c,d,e){var f=Math.sin(a);b=c/b*a;c=Math.cos(b);e.x=d*(2+c)*.5*Math.cos(a);e.y=d*(2+c)*f*.5;e.z=d*Math.sin(b)*.5}C.call(this);this.type="TorusKnotBufferGeometry";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};a=a||1;b=b||.4;c=Math.floor(c)||
|
|
|
+64;d=Math.floor(d)||8;e=e||2;f=f||3;var h=[],l=[],m=[],p=[],k,t=new n,u=new n,q=new n,v=new n,B=new n,w=new n,y=new n;for(k=0;k<=c;++k){var L=k/c*e*Math.PI*2;g(L,e,f,a,q);g(L+.01,e,f,a,v);w.subVectors(v,q);y.addVectors(v,q);B.crossVectors(w,y);y.crossVectors(B,w);B.normalize();y.normalize();for(L=0;L<=d;++L){var K=L/d*Math.PI*2,x=-b*Math.cos(K);K=b*Math.sin(K);t.x=q.x+(x*y.x+K*B.x);t.y=q.y+(x*y.y+K*B.y);t.z=q.z+(x*y.z+K*B.z);l.push(t.x,t.y,t.z);u.subVectors(t,q).normalize();m.push(u.x,u.y,u.z);p.push(k/
|
|
|
+c);p.push(L/d)}}for(L=1;L<=c;L++)for(k=1;k<=d;k++)a=(d+1)*L+(k-1),b=(d+1)*L+k,e=(d+1)*(L-1)+k,h.push((d+1)*(L-1)+(k-1),a,e),h.push(a,b,e);this.setIndex(h);this.setAttribute("position",new D(l,3));this.setAttribute("normal",new D(m,3));this.setAttribute("uv",new D(p,2))}function $d(a,b,c,d,e){O.call(this);this.type="TorusGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};this.fromBufferGeometry(new Pc(a,b,c,d,e));this.mergeVertices()}function Pc(a,b,c,d,e){C.call(this);
|
|
|
+this.type="TorusBufferGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};a=a||1;b=b||.4;c=Math.floor(c)||8;d=Math.floor(d)||6;e=e||2*Math.PI;var f=[],g=[],h=[],l=[],m=new n,p=new n,k=new n,t,u;for(t=0;t<=c;t++)for(u=0;u<=d;u++){var q=u/d*e,v=t/c*Math.PI*2;p.x=(a+b*Math.cos(v))*Math.cos(q);p.y=(a+b*Math.cos(v))*Math.sin(q);p.z=b*Math.sin(v);g.push(p.x,p.y,p.z);m.x=a*Math.cos(q);m.y=a*Math.sin(q);k.subVectors(p,m).normalize();h.push(k.x,k.y,k.z);l.push(u/d);l.push(t/
|
|
|
+c)}for(t=1;t<=c;t++)for(u=1;u<=d;u++)a=(d+1)*(t-1)+u-1,b=(d+1)*(t-1)+u,e=(d+1)*t+u,f.push((d+1)*t+u-1,a,e),f.push(a,b,e);this.setIndex(f);this.setAttribute("position",new D(g,3));this.setAttribute("normal",new D(h,3));this.setAttribute("uv",new D(l,2))}function Uh(a,b,c,d,e){for(var f,g=0,h=b,l=c-d;h<c;h+=d)g+=(a[l]-a[h])*(a[h+1]+a[l+1]),l=h;if(e===0<g)for(e=b;e<c;e+=d)f=Vh(e,a[e],a[e+1],f);else for(e=c-d;e>=b;e-=d)f=Vh(e,a[e],a[e+1],f);f&&bc(f,f.next)&&(ae(f),f=f.next);return f}function be(a,b){if(!a)return a;
|
|
|
+b||(b=a);do{var c=!1;if(a.steiner||!bc(a,a.next)&&0!==sa(a.prev,a,a.next))a=a.next;else{ae(a);a=b=a.prev;if(a===a.next)break;c=!0}}while(c||a!==b);return b}function ce(a,b,c,d,e,f,g){if(a){if(!g&&f){var h=a,l=h;do null===l.z&&(l.z=vg(l.x,l.y,d,e,f)),l.prevZ=l.prev,l=l.nextZ=l.next;while(l!==h);l.prevZ.nextZ=null;l.prevZ=null;h=l;var m,p,k,t,u=1;do{l=h;var q=h=null;for(p=0;l;){p++;var n=l;for(m=k=0;m<u&&(k++,n=n.nextZ,n);m++);for(t=u;0<k||0<t&&n;)0!==k&&(0===t||!n||l.z<=n.z)?(m=l,l=l.nextZ,k--):(m=
|
|
|
+n,n=n.nextZ,t--),q?q.nextZ=m:h=m,m.prevZ=q,q=m;l=n}q.nextZ=null;u*=2}while(1<p)}for(h=a;a.prev!==a.next;){l=a.prev;n=a.next;if(f)q=rk(a,d,e,f);else a:if(q=a,p=q.prev,k=q,u=q.next,0<=sa(p,k,u))q=!1;else{for(m=q.next.next;m!==q.prev;){if(Qc(p.x,p.y,k.x,k.y,u.x,u.y,m.x,m.y)&&0<=sa(m.prev,m,m.next)){q=!1;break a}m=m.next}q=!0}if(q)b.push(l.i/c),b.push(a.i/c),b.push(n.i/c),ae(a),h=a=n.next;else if(a=n,a===h){if(!g)ce(be(a),b,c,d,e,f,1);else if(1===g){g=b;h=c;l=a;do n=l.prev,q=l.next.next,!bc(n,q)&&Wh(n,
|
|
|
+l,l.next,q)&&de(n,q)&&de(q,n)&&(g.push(n.i/h),g.push(l.i/h),g.push(q.i/h),ae(l),ae(l.next),l=a=q),l=l.next;while(l!==a);a=l;ce(a,b,c,d,e,f,2)}else if(2===g)a:{g=a;do{for(h=g.next.next;h!==g.prev;){if(l=g.i!==h.i){l=g;n=h;if(q=l.next.i!==n.i&&l.prev.i!==n.i){b:{q=l;do{if(q.i!==l.i&&q.next.i!==l.i&&q.i!==n.i&&q.next.i!==n.i&&Wh(q,q.next,l,n)){q=!0;break b}q=q.next}while(q!==l);q=!1}q=!q}if(q=q&&de(l,n)&&de(n,l)){q=l;p=!1;k=(l.x+n.x)/2;n=(l.y+n.y)/2;do q.y>n!==q.next.y>n&&q.next.y!==q.y&&k<(q.next.x-
|
|
|
+q.x)*(n-q.y)/(q.next.y-q.y)+q.x&&(p=!p),q=q.next;while(q!==l);q=p}l=q}if(l){a=Xh(g,h);g=be(g,g.next);a=be(a,a.next);ce(g,b,c,d,e,f);ce(a,b,c,d,e,f);break a}h=h.next}g=g.next}while(g!==a)}break}}}}function rk(a,b,c,d){var e=a.prev,f=a.next;if(0<=sa(e,a,f))return!1;var g=e.x>a.x?e.x>f.x?e.x:f.x:a.x>f.x?a.x:f.x,h=e.y>a.y?e.y>f.y?e.y:f.y:a.y>f.y?a.y:f.y,l=vg(e.x<a.x?e.x<f.x?e.x:f.x:a.x<f.x?a.x:f.x,e.y<a.y?e.y<f.y?e.y:f.y:a.y<f.y?a.y:f.y,b,c,d);b=vg(g,h,b,c,d);c=a.prevZ;for(d=a.nextZ;c&&c.z>=l&&d&&d.z<=
|
|
|
+b;){if(c!==a.prev&&c!==a.next&&Qc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=sa(c.prev,c,c.next))return!1;c=c.prevZ;if(d!==a.prev&&d!==a.next&&Qc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=sa(d.prev,d,d.next))return!1;d=d.nextZ}for(;c&&c.z>=l;){if(c!==a.prev&&c!==a.next&&Qc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=sa(c.prev,c,c.next))return!1;c=c.prevZ}for(;d&&d.z<=b;){if(d!==a.prev&&d!==a.next&&Qc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=sa(d.prev,d,d.next))return!1;d=d.nextZ}return!0}function sk(a,b){return a.x-b.x}
|
|
|
+function tk(a,b){var c=b,d=a.x,e=a.y,f=-Infinity;do{if(e<=c.y&&e>=c.next.y&&c.next.y!==c.y){var g=c.x+(e-c.y)*(c.next.x-c.x)/(c.next.y-c.y);if(g<=d&&g>f){f=g;if(g===d){if(e===c.y)return c;if(e===c.next.y)return c.next}var h=c.x<c.next.x?c:c.next}}c=c.next}while(c!==b);if(!h)return null;if(d===f)return h.prev;b=h;g=h.x;var l=h.y,m=Infinity;for(c=h.next;c!==b;){if(d>=c.x&&c.x>=g&&d!==c.x&&Qc(e<l?d:f,e,g,l,e<l?f:d,e,c.x,c.y)){var p=Math.abs(e-c.y)/(d-c.x);(p<m||p===m&&c.x>h.x)&&de(c,a)&&(h=c,m=p)}c=
|
|
|
+c.next}return h}function vg(a,b,c,d,e){a=32767*(a-c)*e;b=32767*(b-d)*e;a=(a|a<<8)&16711935;a=(a|a<<4)&252645135;a=(a|a<<2)&858993459;b=(b|b<<8)&16711935;b=(b|b<<4)&252645135;b=(b|b<<2)&858993459;return(a|a<<1)&1431655765|((b|b<<1)&1431655765)<<1}function uk(a){var b=a,c=a;do{if(b.x<c.x||b.x===c.x&&b.y<c.y)c=b;b=b.next}while(b!==a);return c}function Qc(a,b,c,d,e,f,g,h){return 0<=(e-g)*(b-h)-(a-g)*(f-h)&&0<=(a-g)*(d-h)-(c-g)*(b-h)&&0<=(c-g)*(f-h)-(e-g)*(d-h)}function sa(a,b,c){return(b.y-a.y)*(c.x-
|
|
|
+b.x)-(b.x-a.x)*(c.y-b.y)}function bc(a,b){return a.x===b.x&&a.y===b.y}function Wh(a,b,c,d){return bc(a,c)&&bc(b,d)||bc(a,d)&&bc(c,b)?!0:0<sa(a,b,c)!==0<sa(a,b,d)&&0<sa(c,d,a)!==0<sa(c,d,b)}function de(a,b){return 0>sa(a.prev,a,a.next)?0<=sa(a,b,a.next)&&0<=sa(a,a.prev,b):0>sa(a,b,a.prev)||0>sa(a,a.next,b)}function Xh(a,b){var c=new wg(a.i,a.x,a.y),d=new wg(b.i,b.x,b.y),e=a.next,f=b.prev;a.next=b;b.prev=a;c.next=e;e.prev=c;d.next=c;c.prev=d;f.next=d;d.prev=f;return d}function Vh(a,b,c,d){a=new wg(a,
|
|
|
+b,c);d?(a.next=d.next,a.prev=d,d.next.prev=a,d.next=a):(a.prev=a,a.next=a);return a}function ae(a){a.next.prev=a.prev;a.prev.next=a.next;a.prevZ&&(a.prevZ.nextZ=a.nextZ);a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function wg(a,b,c){this.i=a;this.x=b;this.y=c;this.nextZ=this.prevZ=this.z=this.next=this.prev=null;this.steiner=!1}function Yh(a){var b=a.length;2<b&&a[b-1].equals(a[0])&&a.pop()}function Zh(a,b){for(var c=0;c<b.length;c++)a.push(b[c].x),a.push(b[c].y)}function cc(a,b){O.call(this);this.type="ExtrudeGeometry";
|
|
|
+this.parameters={shapes:a,options:b};this.fromBufferGeometry(new eb(a,b));this.mergeVertices()}function eb(a,b){function c(a){function c(a,b,c){b||console.error("THREE.ExtrudeGeometry: vec does not exist");return b.clone().multiplyScalar(c).add(a)}function g(a,b,c){var d=a.x-b.x;var e=a.y-b.y;var f=c.x-a.x;var g=c.y-a.y,h=d*d+e*e;if(Math.abs(d*g-e*f)>Number.EPSILON){var l=Math.sqrt(h),m=Math.sqrt(f*f+g*g);h=b.x-e/l;b=b.y+d/l;g=((c.x-g/m-h)*g-(c.y+f/m-b)*f)/(d*g-e*f);f=h+d*g-a.x;d=b+e*g-a.y;e=f*f+
|
|
|
+d*d;if(2>=e)return new z(f,d);e=Math.sqrt(e/2)}else a=!1,d>Number.EPSILON?f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(f=-e,e=Math.sqrt(h)):(f=d,d=e,e=Math.sqrt(h/2));return new z(f/e,d/e)}function h(a,b){for(J=a.length;0<=--J;){var c=J;var f=J-1;0>f&&(f=a.length-1);var g,h=y+2*C;for(g=0;g<h;g++){var l=Z*g,m=Z*(g+1),p=b+f+l,k=b+f+m;m=b+c+m;q(b+c+l);q(p);q(m);q(p);q(k);q(m);l=e.length/3;l=E.generateSideWallUV(d,e,l-6,l-3,l-2,l-1);v(l[0]);
|
|
|
+v(l[1]);v(l[3]);v(l[1]);v(l[2]);v(l[3])}}}function l(a,b,c){B.push(a);B.push(b);B.push(c)}function k(a,b,c){q(a);q(b);q(c);a=e.length/3;a=E.generateTopUV(d,e,a-3,a-2,a-1);v(a[0]);v(a[1]);v(a[2])}function q(a){e.push(B[3*a]);e.push(B[3*a+1]);e.push(B[3*a+2])}function v(a){f.push(a.x);f.push(a.y)}var B=[],w=void 0!==b.curveSegments?b.curveSegments:12,y=void 0!==b.steps?b.steps:1,L=void 0!==b.depth?b.depth:100,K=void 0!==b.bevelEnabled?b.bevelEnabled:!0,x=void 0!==b.bevelThickness?b.bevelThickness:6,
|
|
|
+A=void 0!==b.bevelSize?b.bevelSize:x-2,D=void 0!==b.bevelOffset?b.bevelOffset:0,C=void 0!==b.bevelSegments?b.bevelSegments:3,F=b.extrudePath,E=void 0!==b.UVGenerator?b.UVGenerator:vk;void 0!==b.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),L=b.amount);var G=!1;if(F){var I=F.getSpacedPoints(y);G=!0;K=!1;var M=F.computeFrenetFrames(y,!1);var O=new n;var Q=new n;var R=new n}K||(D=A=x=C=0);var N;w=a.extractPoints(w);a=w.shape;var P=w.holes;if(!pb.isClockWise(a)){a=
|
|
|
+a.reverse();var ea=0;for(N=P.length;ea<N;ea++){var S=P[ea];pb.isClockWise(S)&&(P[ea]=S.reverse())}}var aa=pb.triangulateShape(a,P),Y=a;ea=0;for(N=P.length;ea<N;ea++)S=P[ea],a=a.concat(S);var T,Z=a.length,W,ca=aa.length;w=[];var J=0;var U=Y.length;var X=U-1;for(T=J+1;J<U;J++,X++,T++)X===U&&(X=0),T===U&&(T=0),w[J]=g(Y[J],Y[X],Y[T]);F=[];var fa=w.concat();ea=0;for(N=P.length;ea<N;ea++){S=P[ea];var da=[];J=0;U=S.length;X=U-1;for(T=J+1;J<U;J++,X++,T++)X===U&&(X=0),T===U&&(T=0),da[J]=g(S[J],S[X],S[T]);
|
|
|
+F.push(da);fa=fa.concat(da)}for(X=0;X<C;X++){U=X/C;var ha=x*Math.cos(U*Math.PI/2);T=A*Math.sin(U*Math.PI/2)+D;J=0;for(U=Y.length;J<U;J++){var V=c(Y[J],w[J],T);l(V.x,V.y,-ha)}ea=0;for(N=P.length;ea<N;ea++)for(S=P[ea],da=F[ea],J=0,U=S.length;J<U;J++)V=c(S[J],da[J],T),l(V.x,V.y,-ha)}T=A+D;for(J=0;J<Z;J++)V=K?c(a[J],fa[J],T):a[J],G?(Q.copy(M.normals[0]).multiplyScalar(V.x),O.copy(M.binormals[0]).multiplyScalar(V.y),R.copy(I[0]).add(Q).add(O),l(R.x,R.y,R.z)):l(V.x,V.y,0);for(U=1;U<=y;U++)for(J=0;J<Z;J++)V=
|
|
|
+K?c(a[J],fa[J],T):a[J],G?(Q.copy(M.normals[U]).multiplyScalar(V.x),O.copy(M.binormals[U]).multiplyScalar(V.y),R.copy(I[U]).add(Q).add(O),l(R.x,R.y,R.z)):l(V.x,V.y,L/y*U);for(X=C-1;0<=X;X--){U=X/C;ha=x*Math.cos(U*Math.PI/2);T=A*Math.sin(U*Math.PI/2)+D;J=0;for(U=Y.length;J<U;J++)V=c(Y[J],w[J],T),l(V.x,V.y,L+ha);ea=0;for(N=P.length;ea<N;ea++)for(S=P[ea],da=F[ea],J=0,U=S.length;J<U;J++)V=c(S[J],da[J],T),G?l(V.x,V.y+I[y-1].y,I[y-1].x+ha):l(V.x,V.y,L+ha)}(function(){var a=e.length/3;if(K){var b=0*Z;for(J=
|
|
|
+0;J<ca;J++)W=aa[J],k(W[2]+b,W[1]+b,W[0]+b);b=Z*(y+2*C);for(J=0;J<ca;J++)W=aa[J],k(W[0]+b,W[1]+b,W[2]+b)}else{for(J=0;J<ca;J++)W=aa[J],k(W[2],W[1],W[0]);for(J=0;J<ca;J++)W=aa[J],k(W[0]+Z*y,W[1]+Z*y,W[2]+Z*y)}d.addGroup(a,e.length/3-a,0)})();(function(){var a=e.length/3,b=0;h(Y,b);b+=Y.length;ea=0;for(N=P.length;ea<N;ea++)S=P[ea],h(S,b),b+=S.length;d.addGroup(a,e.length/3-a,1)})()}C.call(this);this.type="ExtrudeBufferGeometry";this.parameters={shapes:a,options:b};a=Array.isArray(a)?a:[a];for(var d=
|
|
|
+this,e=[],f=[],g=0,h=a.length;g<h;g++)c(a[g]);this.setAttribute("position",new D(e,3));this.setAttribute("uv",new D(f,2));this.computeVertexNormals()}function $h(a,b,c){c.shapes=[];if(Array.isArray(a))for(var d=0,e=a.length;d<e;d++)c.shapes.push(a[d].uuid);else c.shapes.push(a.uuid);void 0!==b.extrudePath&&(c.options.extrudePath=b.extrudePath.toJSON());return c}function ee(a,b){O.call(this);this.type="TextGeometry";this.parameters={text:a,parameters:b};this.fromBufferGeometry(new Rc(a,b));this.mergeVertices()}
|
|
|
+function Rc(a,b){b=b||{};var c=b.font;if(!c||!c.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new O;a=c.generateShapes(a,b.size);b.depth=void 0!==b.height?b.height:50;void 0===b.bevelThickness&&(b.bevelThickness=10);void 0===b.bevelSize&&(b.bevelSize=8);void 0===b.bevelEnabled&&(b.bevelEnabled=!1);eb.call(this,a,b);this.type="TextBufferGeometry"}function fe(a,b,c,d,e,f,g){O.call(this);this.type="SphereGeometry";this.parameters={radius:a,widthSegments:b,
|
|
|
+heightSegments:c,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};this.fromBufferGeometry(new Gb(a,b,c,d,e,f,g));this.mergeVertices()}function Gb(a,b,c,d,e,f,g){C.call(this);this.type="SphereBufferGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};a=a||1;b=Math.max(3,Math.floor(b)||8);c=Math.max(2,Math.floor(c)||6);d=void 0!==d?d:0;e=void 0!==e?e:2*Math.PI;f=void 0!==f?f:0;g=void 0!==g?g:Math.PI;var h=Math.min(f+g,Math.PI),l,m,
|
|
|
+p=0,k=[],t=new n,u=new n,q=[],v=[],B=[],w=[];for(m=0;m<=c;m++){var y=[],L=m/c,K=0;0==m&&0==f?K=.5/b:m==c&&h==Math.PI&&(K=-.5/b);for(l=0;l<=b;l++){var x=l/b;t.x=-a*Math.cos(d+x*e)*Math.sin(f+L*g);t.y=a*Math.cos(f+L*g);t.z=a*Math.sin(d+x*e)*Math.sin(f+L*g);v.push(t.x,t.y,t.z);u.copy(t).normalize();B.push(u.x,u.y,u.z);w.push(x+K,1-L);y.push(p++)}k.push(y)}for(m=0;m<c;m++)for(l=0;l<b;l++)a=k[m][l+1],d=k[m][l],e=k[m+1][l],g=k[m+1][l+1],(0!==m||0<f)&&q.push(a,d,g),(m!==c-1||h<Math.PI)&&q.push(d,e,g);this.setIndex(q);
|
|
|
+this.setAttribute("position",new D(v,3));this.setAttribute("normal",new D(B,3));this.setAttribute("uv",new D(w,2))}function ge(a,b,c,d,e,f){O.call(this);this.type="RingGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,thetaLength:f};this.fromBufferGeometry(new Sc(a,b,c,d,e,f));this.mergeVertices()}function Sc(a,b,c,d,e,f){C.call(this);this.type="RingBufferGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,
|
|
|
+thetaLength:f};a=a||.5;b=b||1;e=void 0!==e?e:0;f=void 0!==f?f:2*Math.PI;c=void 0!==c?Math.max(3,c):8;d=void 0!==d?Math.max(1,d):1;var g=[],h=[],l=[],m=[],p=a,k=(b-a)/d,t=new n,u=new z,q,v;for(q=0;q<=d;q++){for(v=0;v<=c;v++)a=e+v/c*f,t.x=p*Math.cos(a),t.y=p*Math.sin(a),h.push(t.x,t.y,t.z),l.push(0,0,1),u.x=(t.x/b+1)/2,u.y=(t.y/b+1)/2,m.push(u.x,u.y);p+=k}for(q=0;q<d;q++)for(b=q*(c+1),v=0;v<c;v++)a=v+b,e=a+c+1,f=a+c+2,p=a+1,g.push(a,e,p),g.push(e,f,p);this.setIndex(g);this.setAttribute("position",new D(h,
|
|
|
+3));this.setAttribute("normal",new D(l,3));this.setAttribute("uv",new D(m,2))}function he(a,b,c,d){O.call(this);this.type="LatheGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};this.fromBufferGeometry(new Tc(a,b,c,d));this.mergeVertices()}function Tc(a,b,c,d){C.call(this);this.type="LatheBufferGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};b=Math.floor(b)||12;c=c||0;d=d||2*Math.PI;d=P.clamp(d,0,2*Math.PI);var e=[],f=[],g=[],h=1/b,l=new n,m=new z,p;for(p=
|
|
|
+0;p<=b;p++){var k=c+p*h*d;var t=Math.sin(k),u=Math.cos(k);for(k=0;k<=a.length-1;k++)l.x=a[k].x*t,l.y=a[k].y,l.z=a[k].x*u,f.push(l.x,l.y,l.z),m.x=p/b,m.y=k/(a.length-1),g.push(m.x,m.y)}for(p=0;p<b;p++)for(k=0;k<a.length-1;k++)c=k+p*a.length,h=c+a.length,l=c+a.length+1,m=c+1,e.push(c,h,m),e.push(h,l,m);this.setIndex(e);this.setAttribute("position",new D(f,3));this.setAttribute("uv",new D(g,2));this.computeVertexNormals();if(d===2*Math.PI)for(d=this.attributes.normal.array,e=new n,f=new n,g=new n,c=
|
|
|
+b*a.length*3,k=p=0;p<a.length;p++,k+=3)e.x=d[k+0],e.y=d[k+1],e.z=d[k+2],f.x=d[c+k+0],f.y=d[c+k+1],f.z=d[c+k+2],g.addVectors(e,f).normalize(),d[k+0]=d[c+k+0]=g.x,d[k+1]=d[c+k+1]=g.y,d[k+2]=d[c+k+2]=g.z}function dc(a,b){O.call(this);this.type="ShapeGeometry";"object"===typeof b&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),b=b.curveSegments);this.parameters={shapes:a,curveSegments:b};this.fromBufferGeometry(new ec(a,b));this.mergeVertices()}function ec(a,b){function c(a){var c,
|
|
|
+h=e.length/3;a=a.extractPoints(b);var m=a.shape,k=a.holes;!1===pb.isClockWise(m)&&(m=m.reverse());a=0;for(c=k.length;a<c;a++){var p=k[a];!0===pb.isClockWise(p)&&(k[a]=p.reverse())}var n=pb.triangulateShape(m,k);a=0;for(c=k.length;a<c;a++)p=k[a],m=m.concat(p);a=0;for(c=m.length;a<c;a++)p=m[a],e.push(p.x,p.y,0),f.push(0,0,1),g.push(p.x,p.y);a=0;for(c=n.length;a<c;a++)m=n[a],d.push(m[0]+h,m[1]+h,m[2]+h),l+=3}C.call(this);this.type="ShapeBufferGeometry";this.parameters={shapes:a,curveSegments:b};b=b||
|
|
|
+12;var d=[],e=[],f=[],g=[],h=0,l=0;if(!1===Array.isArray(a))c(a);else for(var m=0;m<a.length;m++)c(a[m]),this.addGroup(h,l,m),h+=l,l=0;this.setIndex(d);this.setAttribute("position",new D(e,3));this.setAttribute("normal",new D(f,3));this.setAttribute("uv",new D(g,2))}function ai(a,b){b.shapes=[];if(Array.isArray(a))for(var c=0,d=a.length;c<d;c++)b.shapes.push(a[c].uuid);else b.shapes.push(a.uuid);return b}function Uc(a,b){C.call(this);this.type="EdgesGeometry";this.parameters={thresholdAngle:b};var c=
|
|
|
+[];b=Math.cos(P.DEG2RAD*(void 0!==b?b:1));var d=[0,0],e={},f=["a","b","c"];if(a.isBufferGeometry){var g=new O;g.fromBufferGeometry(a)}else g=a.clone();g.mergeVertices();g.computeFaceNormals();a=g.vertices;g=g.faces;for(var h=0,l=g.length;h<l;h++)for(var m=g[h],k=0;3>k;k++){var r=m[f[k]];var t=m[f[(k+1)%3]];d[0]=Math.min(r,t);d[1]=Math.max(r,t);r=d[0]+","+d[1];void 0===e[r]?e[r]={index1:d[0],index2:d[1],face1:h,face2:void 0}:e[r].face2=h}for(r in e)if(d=e[r],void 0===d.face2||g[d.face1].normal.dot(g[d.face2].normal)<=
|
|
|
+b)f=a[d.index1],c.push(f.x,f.y,f.z),f=a[d.index2],c.push(f.x,f.y,f.z);this.setAttribute("position",new D(c,3))}function fc(a,b,c,d,e,f,g,h){O.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};this.fromBufferGeometry(new qb(a,b,c,d,e,f,g,h));this.mergeVertices()}function qb(a,b,c,d,e,f,g,h){function l(c){var e,f=new z,l=new n,p=0,v=!0===c?a:b,y=!0===c?1:-1;var A=q;for(e=1;e<=d;e++)r.push(0,
|
|
|
+B*y,0),t.push(0,y,0),u.push(.5,.5),q++;var E=q;for(e=0;e<=d;e++){var C=e/d*h+g,D=Math.cos(C);C=Math.sin(C);l.x=v*C;l.y=B*y;l.z=v*D;r.push(l.x,l.y,l.z);t.push(0,y,0);f.x=.5*D+.5;f.y=.5*C*y+.5;u.push(f.x,f.y);q++}for(e=0;e<d;e++)f=A+e,l=E+e,!0===c?k.push(l,l+1,f):k.push(l+1,l,f),p+=3;m.addGroup(w,p,!0===c?1:2);w+=p}C.call(this);this.type="CylinderBufferGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};var m=this;
|
|
|
+a=void 0!==a?a:1;b=void 0!==b?b:1;c=c||1;d=Math.floor(d)||8;e=Math.floor(e)||1;f=void 0!==f?f:!1;g=void 0!==g?g:0;h=void 0!==h?h:2*Math.PI;var k=[],r=[],t=[],u=[],q=0,v=[],B=c/2,w=0;(function(){var f,l,p=new n,x=new n,z=0,A=(b-a)/c;for(l=0;l<=e;l++){var C=[],D=l/e,E=D*(b-a)+a;for(f=0;f<=d;f++){var F=f/d,G=F*h+g,I=Math.sin(G);G=Math.cos(G);x.x=E*I;x.y=-D*c+B;x.z=E*G;r.push(x.x,x.y,x.z);p.set(I,A,G).normalize();t.push(p.x,p.y,p.z);u.push(F,1-D);C.push(q++)}v.push(C)}for(f=0;f<d;f++)for(l=0;l<e;l++)p=
|
|
|
+v[l+1][f],x=v[l+1][f+1],A=v[l][f+1],k.push(v[l][f],p,A),k.push(p,x,A),z+=6;m.addGroup(w,z,0);w+=z})();!1===f&&(0<a&&l(!0),0<b&&l(!1));this.setIndex(k);this.setAttribute("position",new D(r,3));this.setAttribute("normal",new D(t,3));this.setAttribute("uv",new D(u,2))}function ie(a,b,c,d,e,f,g){fc.call(this,0,a,b,c,d,e,f,g);this.type="ConeGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function je(a,b,c,d,e,f,g){qb.call(this,0,a,
|
|
|
+b,c,d,e,f,g);this.type="ConeBufferGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function ke(a,b,c,d){O.call(this);this.type="CircleGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};this.fromBufferGeometry(new Vc(a,b,c,d));this.mergeVertices()}function Vc(a,b,c,d){C.call(this);this.type="CircleBufferGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};a=a||1;b=void 0!==b?Math.max(3,
|
|
|
+b):8;c=void 0!==c?c:0;d=void 0!==d?d:2*Math.PI;var e=[],f=[],g=[],h=[],l,m=new n,k=new z;f.push(0,0,0);g.push(0,0,1);h.push(.5,.5);var r=0;for(l=3;r<=b;r++,l+=3){var t=c+r/b*d;m.x=a*Math.cos(t);m.y=a*Math.sin(t);f.push(m.x,m.y,m.z);g.push(0,0,1);k.x=(f[l]/a+1)/2;k.y=(f[l+1]/a+1)/2;h.push(k.x,k.y)}for(l=1;l<=b;l++)e.push(l,l+1,0);this.setIndex(e);this.setAttribute("position",new D(f,3));this.setAttribute("normal",new D(g,3));this.setAttribute("uv",new D(h,2))}function gc(a){M.call(this);this.type=
|
|
|
+"ShadowMaterial";this.color=new A(0);this.transparent=!0;this.setValues(a)}function Wc(a){ma.call(this,a);this.type="RawShaderMaterial"}function fb(a){M.call(this);this.defines={STANDARD:""};this.type="MeshStandardMaterial";this.color=new A(16777215);this.roughness=1;this.metalness=0;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new A(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=
|
|
|
+0;this.normalScale=new z(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=this.metalnessMap=this.roughnessMap=null;this.envMapIntensity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function hc(a){fb.call(this);this.defines={STANDARD:"",PHYSICAL:""};this.type="MeshPhysicalMaterial";this.reflectivity=
|
|
|
+.5;this.clearcoatRoughness=this.clearcoat=0;this.sheen=null;this.clearcoatNormalScale=new z(1,1);this.clearcoatNormalMap=null;this.transparency=0;this.setValues(a)}function Hb(a){M.call(this);this.type="MeshPhongMaterial";this.color=new A(16777215);this.specular=new A(1118481);this.shininess=30;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new A(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=
|
|
|
+null;this.normalMapType=0;this.normalScale=new z(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=this.specularMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function ic(a){M.call(this);this.defines={TOON:""};this.type="MeshToonMaterial";this.color=new A(16777215);
|
|
|
+this.specular=new A(1118481);this.shininess=30;this.lightMap=this.gradientMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new A(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new z(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=this.specularMap=null;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=
|
|
|
+this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function jc(a){M.call(this);this.type="MeshNormalMaterial";this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new z(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=!1;this.wireframeLinewidth=1;this.morphNormals=this.morphTargets=this.skinning=this.fog=!1;this.setValues(a)}function kc(a){M.call(this);this.type=
|
|
|
+"MeshLambertMaterial";this.color=new A(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new A(0);this.emissiveIntensity=1;this.envMap=this.alphaMap=this.specularMap=this.emissiveMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function lc(a){M.call(this);
|
|
|
+this.defines={MATCAP:""};this.type="MeshMatcapMaterial";this.color=new A(16777215);this.bumpMap=this.map=this.matcap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new z(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=null;this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function mc(a){Y.call(this);this.type="LineDashedMaterial";this.scale=1;this.dashSize=3;this.gapSize=1;this.setValues(a)}function Ja(a,
|
|
|
+b,c,d){this.parameterPositions=a;this._cachedIndex=0;this.resultBuffer=void 0!==d?d:new b.constructor(c);this.sampleValues=b;this.valueSize=c}function Ze(a,b,c,d){Ja.call(this,a,b,c,d);this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function le(a,b,c,d){Ja.call(this,a,b,c,d)}function $e(a,b,c,d){Ja.call(this,a,b,c,d)}function oa(a,b,c,d){if(void 0===a)throw Error("THREE.KeyframeTrack: track name is undefined");if(void 0===b||0===b.length)throw Error("THREE.KeyframeTrack: no keyframes in track named "+
|
|
|
+a);this.name=a;this.times=ia.convertArray(b,this.TimeBufferType);this.values=ia.convertArray(c,this.ValueBufferType);this.setInterpolation(d||this.DefaultInterpolation)}function af(a,b,c){oa.call(this,a,b,c)}function bf(a,b,c,d){oa.call(this,a,b,c,d)}function Xc(a,b,c,d){oa.call(this,a,b,c,d)}function cf(a,b,c,d){Ja.call(this,a,b,c,d)}function me(a,b,c,d){oa.call(this,a,b,c,d)}function df(a,b,c,d){oa.call(this,a,b,c,d)}function Yc(a,b,c,d){oa.call(this,a,b,c,d)}function Oa(a,b,c){this.name=a;this.tracks=
|
|
|
+c;this.duration=void 0!==b?b:-1;this.uuid=P.generateUUID();0>this.duration&&this.resetDuration()}function wk(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return Xc;case "vector":case "vector2":case "vector3":case "vector4":return Yc;case "color":return bf;case "quaternion":return me;case "bool":case "boolean":return af;case "string":return df}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+a);}function xk(a){if(void 0===a.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");
|
|
|
+var b=wk(a.type);if(void 0===a.times){var c=[],d=[];ia.flattenJSON(a.keys,c,d,"value");a.times=c;a.values=d}return void 0!==b.parse?b.parse(a):new b(a.name,a.times,a.values,a.interpolation)}function xg(a,b,c){var d=this,e=!1,f=0,g=0,h=void 0,l=[];this.onStart=void 0;this.onLoad=a;this.onProgress=b;this.onError=c;this.itemStart=function(a){g++;if(!1===e&&void 0!==d.onStart)d.onStart(a,f,g);e=!0};this.itemEnd=function(a){f++;if(void 0!==d.onProgress)d.onProgress(a,f,g);if(f===g&&(e=!1,void 0!==d.onLoad))d.onLoad()};
|
|
|
+this.itemError=function(a){if(void 0!==d.onError)d.onError(a)};this.resolveURL=function(a){return h?h(a):a};this.setURLModifier=function(a){h=a;return this};this.addHandler=function(a,b){l.push(a,b);return this};this.removeHandler=function(a){a=l.indexOf(a);-1!==a&&l.splice(a,2);return this};this.getHandler=function(a){for(var b=0,c=l.length;b<c;b+=2){var d=l[b],e=l[b+1];d.global&&(d.lastIndex=0);if(d.test(a))return e}return null}}function S(a){this.manager=void 0!==a?a:bi;this.crossOrigin="anonymous";
|
|
|
+this.resourcePath=this.path=""}function Pa(a){S.call(this,a)}function yg(a){S.call(this,a)}function zg(a){S.call(this,a)}function ef(a){S.call(this,a)}function Zc(a){S.call(this,a)}function ff(a){S.call(this,a)}function gf(a){S.call(this,a)}function I(){this.type="Curve";this.arcLengthDivisions=200}function Ka(a,b,c,d,e,f,g,h){I.call(this);this.type="EllipseCurve";this.aX=a||0;this.aY=b||0;this.xRadius=c||1;this.yRadius=d||1;this.aStartAngle=e||0;this.aEndAngle=f||2*Math.PI;this.aClockwise=g||!1;
|
|
|
+this.aRotation=h||0}function $c(a,b,c,d,e,f){Ka.call(this,a,b,c,c,d,e,f);this.type="ArcCurve"}function Ag(){var a=0,b=0,c=0,d=0;return{initCatmullRom:function(e,f,g,h,l){e=l*(g-e);h=l*(h-f);a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},initNonuniformCatmullRom:function(e,f,g,h,l,m,k){e=((f-e)/l-(g-e)/(l+m)+(g-f)/m)*m;h=((g-f)/m-(h-f)/(m+k)+(h-g)/k)*m;a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},calc:function(e){var f=e*e;return a+b*e+c*f+d*f*e}}}function za(a,b,c,d){I.call(this);this.type="CatmullRomCurve3";
|
|
|
+this.points=a||[];this.closed=b||!1;this.curveType=c||"centripetal";this.tension=d||.5}function ci(a,b,c,d,e){b=.5*(d-b);e=.5*(e-c);var f=a*a;return(2*c-2*d+b+e)*a*f+(-3*c+3*d-2*b-e)*f+b*a+c}function ne(a,b,c,d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function oe(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}function Ua(a,b,c,d){I.call(this);this.type="CubicBezierCurve";this.v0=a||new z;this.v1=b||new z;this.v2=c||new z;this.v3=d||new z}function gb(a,b,c,d){I.call(this);
|
|
|
+this.type="CubicBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n;this.v3=d||new n}function Aa(a,b){I.call(this);this.type="LineCurve";this.v1=a||new z;this.v2=b||new z}function Va(a,b){I.call(this);this.type="LineCurve3";this.v1=a||new n;this.v2=b||new n}function Wa(a,b,c){I.call(this);this.type="QuadraticBezierCurve";this.v0=a||new z;this.v1=b||new z;this.v2=c||new z}function hb(a,b,c){I.call(this);this.type="QuadraticBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n}
|
|
|
+function Xa(a){I.call(this);this.type="SplineCurve";this.points=a||[]}function rb(){I.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function Ya(a){rb.call(this);this.type="Path";this.currentPoint=new z;a&&this.setFromPoints(a)}function Ib(a){Ya.call(this,a);this.uuid=P.generateUUID();this.type="Shape";this.holes=[]}function W(a,b){F.call(this);this.type="Light";this.color=new A(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function hf(a,b,c){W.call(this,a,c);this.type=
|
|
|
+"HemisphereLight";this.castShadow=void 0;this.position.copy(F.DefaultUp);this.updateMatrix();this.groundColor=new A(b)}function ib(a){this.camera=a;this.bias=0;this.radius=1;this.mapSize=new z(512,512);this.mapPass=this.map=null;this.matrix=new R;this._frustum=new Dd;this._frameExtents=new z(1,1);this._viewportCount=1;this._viewports=[new da(0,0,1,1)]}function jf(){ib.call(this,new X(50,1,.5,500))}function kf(a,b,c,d,e,f){W.call(this,a,b);this.type="SpotLight";this.position.copy(F.DefaultUp);this.updateMatrix();
|
|
|
+this.target=new F;Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=void 0!==c?c:0;this.angle=void 0!==d?d:Math.PI/3;this.penumbra=void 0!==e?e:0;this.decay=void 0!==f?f:1;this.shadow=new jf}function Bg(){ib.call(this,new X(90,1,.5,500));this._frameExtents=new z(4,2);this._viewportCount=6;this._viewports=[new da(2,1,1,1),new da(0,1,1,1),new da(3,1,1,1),new da(1,1,1,1),new da(3,0,1,1),new da(1,0,1,1)];this._cubeDirections=
|
|
|
+[new n(1,0,0),new n(-1,0,0),new n(0,0,1),new n(0,0,-1),new n(0,1,0),new n(0,-1,0)];this._cubeUps=[new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,0,1),new n(0,0,-1)]}function lf(a,b,c,d){W.call(this,a,b);this.type="PointLight";Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(a){this.intensity=a/(4*Math.PI)}});this.distance=void 0!==c?c:0;this.decay=void 0!==d?d:1;this.shadow=new Bg}function pe(a,b,c,d,e,f){bb.call(this);this.type="OrthographicCamera";
|
|
|
+this.zoom=1;this.view=null;this.left=void 0!==a?a:-1;this.right=void 0!==b?b:1;this.top=void 0!==c?c:1;this.bottom=void 0!==d?d:-1;this.near=void 0!==e?e:.1;this.far=void 0!==f?f:2E3;this.updateProjectionMatrix()}function mf(){ib.call(this,new pe(-5,5,5,-5,.5,500))}function nf(a,b){W.call(this,a,b);this.type="DirectionalLight";this.position.copy(F.DefaultUp);this.updateMatrix();this.target=new F;this.shadow=new mf}function of(a,b){W.call(this,a,b);this.type="AmbientLight";this.castShadow=void 0}function pf(a,
|
|
|
+b,c,d){W.call(this,a,b);this.type="RectAreaLight";this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function qf(a){S.call(this,a);this.textures={}}function rf(){C.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function sf(a,b,c,d){"number"===typeof c&&(d=c,c=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));Q.call(this,a,b,c);this.meshPerAttribute=d||1}function tf(a){S.call(this,a)}function uf(a){S.call(this,
|
|
|
+a)}function Cg(a){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");S.call(this,a);this.options=void 0}function Dg(){this.type="ShapePath";this.color=new A;this.subPaths=[];this.currentPath=null}function Eg(a){this.type="Font";this.data=a}function Fg(a){S.call(this,a)}function vf(a){S.call(this,a)}function wf(){this.coefficients=[];for(var a=
|
|
|
+0;9>a;a++)this.coefficients.push(new n)}function Za(a,b){W.call(this,void 0,b);this.sh=void 0!==a?a:new wf}function Gg(a,b,c){Za.call(this,void 0,c);a=(new A).set(a);c=(new A).set(b);b=new n(a.r,a.g,a.b);a=new n(c.r,c.g,c.b);c=Math.sqrt(Math.PI);var d=c*Math.sqrt(.75);this.sh.coefficients[0].copy(b).add(a).multiplyScalar(c);this.sh.coefficients[1].copy(b).sub(a).multiplyScalar(d)}function Hg(a,b){Za.call(this,void 0,b);a=(new A).set(a);this.sh.coefficients[0].set(a.r,a.g,a.b).multiplyScalar(2*Math.sqrt(Math.PI))}
|
|
|
+function di(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new X;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new X;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1;this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}function Ig(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}function Jg(){F.call(this);this.type="AudioListener";this.context=Kg.getContext();
|
|
|
+this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0;this._clock=new Ig}function ad(a){F.call(this);this.type="Audio";this.listener=a;this.context=a.context;this.gain=this.context.createGain();this.gain.connect(a.getInput());this.autoplay=!1;this.buffer=null;this.detune=0;this.loop=!1;this.offset=this.loopEnd=this.loopStart=0;this.duration=void 0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty";this._pausedAt=
|
|
|
+this._startedAt=0;this.filters=[]}function Lg(a){ad.call(this,a);this.panner=this.context.createPanner();this.panner.panningModel="HRTF";this.panner.connect(this.gain)}function Mg(a,b){this.analyser=a.context.createAnalyser();this.analyser.fftSize=void 0!==b?b:2048;this.data=new Uint8Array(this.analyser.frequencyBinCount);a.getOutput().connect(this.analyser)}function Ng(a,b,c){this.binding=a;this.valueSize=c;a=Float64Array;switch(b){case "quaternion":b=this._slerp;break;case "string":case "bool":a=
|
|
|
+Array;b=this._select;break;default:b=this._lerp}this.buffer=new a(4*c);this._mixBufferRegion=b;this.referenceCount=this.useCount=this.cumulativeWeight=0}function ei(a,b,c){c=c||Ba.parseTrackName(b);this._targetGroup=a;this._bindings=a.subscribe_(b,c)}function Ba(a,b,c){this.path=b;this.parsedPath=c||Ba.parseTrackName(b);this.node=Ba.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a}function fi(){this.uuid=P.generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_=
|
|
|
+0;var a={};this._indicesByUUID=a;for(var b=0,c=arguments.length;b!==c;++b)a[arguments[b].uuid]=b;this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath={};var d=this;this.stats={objects:{get total(){return d._objects.length},get inUse(){return this.total-d.nCachedObjects_}},get bindingsPerObject(){return d._bindings.length}}}function gi(a,b,c){this._mixer=a;this._clip=b;this._localRoot=c||null;a=b.tracks;b=a.length;c=Array(b);for(var d={endingStart:2400,endingEnd:2400},
|
|
|
+e=0;e!==b;++e){var f=a[e].createInterpolant(null);c[e]=f;f.settings=d}this._interpolantSettings=d;this._interpolants=c;this._propertyBindings=Array(b);this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null;this.loop=2201;this._loopCount=-1;this._startTime=null;this.time=0;this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1;this.repetitions=Infinity;this.paused=!1;this.enabled=!0;this.clampWhenFinished=!1;this.zeroSlopeAtEnd=this.zeroSlopeAtStart=
|
|
|
+!0}function Og(a){this._root=a;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function xf(a,b){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),a=b);this.value=a}function Pg(a,b,c){ob.call(this,a,b);this.meshPerAttribute=c||1}function hi(a,b,c,d){this.ray=new Rb(a,b);this.near=c||0;this.far=d||Infinity;this.camera=null;this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}};Object.defineProperties(this.params,{PointCloud:{get:function(){console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points.");
|
|
|
+return this.Points}}})}function ii(a,b){return a.distance-b.distance}function Qg(a,b,c,d){if(!1!==a.visible&&(a.raycast(b,c),!0===d)){a=a.children;d=0;for(var e=a.length;d<e;d++)Qg(a[d],b,c,!0)}}function ji(a,b,c){this.radius=void 0!==a?a:1;this.phi=void 0!==b?b:0;this.theta=void 0!==c?c:0;return this}function ki(a,b,c){this.radius=void 0!==a?a:1;this.theta=void 0!==b?b:0;this.y=void 0!==c?c:0;return this}function Rg(a,b){this.min=void 0!==a?a:new z(Infinity,Infinity);this.max=void 0!==b?b:new z(-Infinity,
|
|
|
+-Infinity)}function Sg(a,b){this.start=void 0!==a?a:new n;this.end=void 0!==b?b:new n}function qe(a){F.call(this);this.material=a;this.render=function(){}}function re(a,b,c,d){this.object=a;this.size=void 0!==b?b:1;a=void 0!==c?c:16711680;d=void 0!==d?d:1;b=0;(c=this.object.geometry)&&c.isGeometry?b=3*c.faces.length:c&&c.isBufferGeometry&&(b=c.attributes.normal.count);c=new C;b=new D(6*b,3);c.setAttribute("position",b);Z.call(this,c,new Y({color:a,linewidth:d}));this.matrixAutoUpdate=!1;this.update()}
|
|
|
+function se(a,b,c,d){this.object=a;this.size=void 0!==b?b:1;a=void 0!==c?c:65535;d=void 0!==d?d:1;(b=this.object.geometry)&&b.isBufferGeometry?(c=b.attributes.tangent.count,b=new C,c=new D(6*c,3),b.setAttribute("position",c),Z.call(this,b,new Y({color:a,linewidth:d})),this.matrixAutoUpdate=!1,this.update()):console.error("THREE.VertexTangentsHelper: geometry not an instance of THREE.BufferGeometry.",b)}function bd(a,b){F.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;
|
|
|
+this.matrixAutoUpdate=!1;this.color=b;a=new C;b=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(var c=0,d=1;32>c;c++,d++){var e=c/32*Math.PI*2,f=d/32*Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.setAttribute("position",new D(b,3));b=new Y({fog:!1});this.cone=new Z(a,b);this.add(this.cone);this.update()}function li(a){var b=[];a&&a.isBone&&b.push(a);for(var c=0;c<a.children.length;c++)b.push.apply(b,li(a.children[c]));return b}function cd(a){for(var b=
|
|
|
+li(a),c=new C,d=[],e=[],f=new A(0,0,1),g=new A(0,1,0),h=0;h<b.length;h++){var l=b[h];l.parent&&l.parent.isBone&&(d.push(0,0,0),d.push(0,0,0),e.push(f.r,f.g,f.b),e.push(g.r,g.g,g.b))}c.setAttribute("position",new D(d,3));c.setAttribute("color",new D(e,3));d=new Y({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0});Z.call(this,c,d);this.root=a;this.bones=b;this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1}function dd(a,b,c){this.light=a;this.light.updateMatrixWorld();this.color=c;a=new Gb(b,
|
|
|
+4,2);b=new Ha({wireframe:!0,fog:!1});V.call(this,a,b);this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=!1;this.update()}function ed(a,b){this.type="RectAreaLightHelper";this.light=a;this.color=b;a=new C;a.setAttribute("position",new D([1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],3));a.computeBoundingSphere();b=new Y({fog:!1});xa.call(this,a,b);a=new C;a.setAttribute("position",new D([1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],3));a.computeBoundingSphere();this.add(new V(a,new Ha({side:1,fog:!1})));
|
|
|
+this.update()}function fd(a,b,c){F.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;a=new $b(b);a.rotateY(.5*Math.PI);this.material=new Ha({wireframe:!0,fog:!1});void 0===this.color&&(this.material.vertexColors=2);b=a.getAttribute("position");b=new Float32Array(3*b.count);a.setAttribute("color",new Q(b,3));this.add(new V(a,this.material));this.update()}function gd(a,b){this.lightProbe=a;this.size=b;a=new ma({defines:{GAMMA_OUTPUT:""},
|
|
|
+uniforms:{sh:{value:this.lightProbe.sh.coefficients},intensity:{value:this.lightProbe.intensity}},vertexShader:"varying vec3 vNormal;\nvoid main() {\n\tvNormal = normalize( normalMatrix * normal );\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",fragmentShader:"#define RECIPROCAL_PI 0.318309886\nvec3 inverseTransformDirection( in vec3 normal, in mat4 matrix ) {\n\t// matrix is assumed to be orthogonal\n\treturn normalize( ( vec4( normal, 0.0 ) * matrix ).xyz );\n}\nvec3 linearToOutput( in vec3 a ) {\n\t#ifdef GAMMA_OUTPUT\n\t\treturn pow( a, vec3( 1.0 / float( GAMMA_FACTOR ) ) );\n\t#else\n\t\treturn a;\n\t#endif\n}\n// source: https://graphics.stanford.edu/papers/envmap/envmap.pdf\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\t// normal is assumed to have unit length\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\t// band 0\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\t// band 1\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\t// band 2\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nuniform vec3 sh[ 9 ]; // sh coefficients\nuniform float intensity; // light probe intensity\nvarying vec3 vNormal;\nvoid main() {\n\tvec3 normal = normalize( vNormal );\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, sh );\n\tvec3 outgoingLight = RECIPROCAL_PI * irradiance * intensity;\n\toutgoingLight = linearToOutput( outgoingLight );\n\tgl_FragColor = vec4( outgoingLight, 1.0 );\n}"});
|
|
|
b=new Gb(1,32,16);V.call(this,b,a);this.onBeforeRender()}function yf(a,b,c,d){a=a||10;b=b||10;c=new A(void 0!==c?c:4473924);d=new A(void 0!==d?d:8947848);var e=b/2,f=a/b,g=a/2;a=[];for(var h=[],l=0,m=0,k=-g;l<=b;l++,k+=f){a.push(-g,0,k,g,0,k);a.push(k,0,-g,k,0,g);var r=l===e?c:d;r.toArray(h,m);m+=3;r.toArray(h,m);m+=3;r.toArray(h,m);m+=3;r.toArray(h,m);m+=3}b=new C;b.setAttribute("position",new D(a,3));b.setAttribute("color",new D(h,3));c=new Y({vertexColors:2});Z.call(this,b,c)}function zf(a,b,c,
|
|
|
d,e,f){a=a||10;b=b||16;c=c||8;d=d||64;e=new A(void 0!==e?e:4473924);f=new A(void 0!==f?f:8947848);var g=[],h=[],l;for(l=0;l<=b;l++){var m=l/b*2*Math.PI;var k=Math.sin(m)*a;m=Math.cos(m)*a;g.push(0,0,0);g.push(k,0,m);var r=l&1?e:f;h.push(r.r,r.g,r.b);h.push(r.r,r.g,r.b)}for(l=0;l<=c;l++){r=l&1?e:f;var t=a-a/c*l;for(b=0;b<d;b++)m=b/d*2*Math.PI,k=Math.sin(m)*t,m=Math.cos(m)*t,g.push(k,0,m),h.push(r.r,r.g,r.b),m=(b+1)/d*2*Math.PI,k=Math.sin(m)*t,m=Math.cos(m)*t,g.push(k,0,m),h.push(r.r,r.g,r.b)}a=new C;
|
|
|
a.setAttribute("position",new D(g,3));a.setAttribute("color",new D(h,3));g=new Y({vertexColors:2});Z.call(this,a,g)}function hd(a,b,c,d){this.audio=a;this.range=b||1;this.divisionsInnerAngle=c||16;this.divisionsOuterAngle=d||2;a=new C;b=new Float32Array(3*(3*(this.divisionsInnerAngle+2*this.divisionsOuterAngle)+3));a.setAttribute("position",new Q(b,3));b=new Y({color:65280});c=new Y({color:16776960});xa.call(this,a,[c,b]);this.update()}function te(a,b,c,d){this.object=a;this.size=void 0!==b?b:1;a=
|