|
@@ -18,30 +18,30 @@ new Float64Array(a),b,c)}function th(){this.vertices=[];this.normals=[];this.col
|
|
|
f,g,2!==b.side,h)))return null;Ee.copy(h);Ee.applyMatrix4(a.matrixWorld);b=c.ray.origin.distanceTo(Ee);return b<c.near||b>c.far?null:{distance:b,point:Ee.clone(),object:a}}function Fe(a,b,c,d,e,f,g,h,l,m,q,p){Ab.fromBufferAttribute(e,m);Bb.fromBufferAttribute(e,q);Cb.fromBufferAttribute(e,p);e=a.morphTargetInfluences;if(b.morphTargets&&f&&e){Ge.set(0,0,0);He.set(0,0,0);Ie.set(0,0,0);for(var A=0,k=f.length;A<k;A++){var t=e[A],v=f[A];0!==t&&(dg.fromBufferAttribute(v,m),eg.fromBufferAttribute(v,q),fg.fromBufferAttribute(v,
|
|
|
p),g?(Ge.addScaledVector(dg,t),He.addScaledVector(eg,t),Ie.addScaledVector(fg,t)):(Ge.addScaledVector(dg.sub(Ab),t),He.addScaledVector(eg.sub(Bb),t),Ie.addScaledVector(fg.sub(Cb),t)))}Ab.add(Ge);Bb.add(He);Cb.add(Ie)}a.isSkinnedMesh&&(a.boneTransform(m,Ab),a.boneTransform(q,Bb),a.boneTransform(p,Cb));if(a=vh(a,b,c,d,Ab,Bb,Cb,Ed))h&&(Ac.fromBufferAttribute(h,m),Bc.fromBufferAttribute(h,q),Cc.fromBufferAttribute(h,p),a.uv=ra.getUV(Ed,Ab,Bb,Cb,Ac,Bc,Cc,new u)),l&&(Ac.fromBufferAttribute(l,m),Bc.fromBufferAttribute(l,
|
|
|
q),Cc.fromBufferAttribute(l,p),a.uv2=ra.getUV(Ed,Ab,Bb,Cb,Ac,Bc,Cc,new u)),h=new zc(m,q,p),ra.getNormal(Ab,Bb,Cb,h.normal),a.face=h;return a}function I(){Object.defineProperty(this,"id",{value:jj+=2});this.uuid=O.generateUUID();this.name="";this.type="Geometry";this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.lineDistancesNeedUpdate=
|
|
|
-this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.verticesNeedUpdate=this.elementsNeedUpdate=!1}function Dc(a){var b={},c;for(c in a){b[c]={};for(var d in a[c]){var e=a[c][d];e&&(e.isColor||e.isMatrix3||e.isMatrix4||e.isVector2||e.isVector3||e.isVector4||e.isTexture)?b[c][d]=e.clone():Array.isArray(e)?b[c][d]=e.slice():b[c][d]=e}}return b}function ya(a){for(var b={},c=0;c<a.length;c++){var d=Dc(a[c]),e;for(e in d)b[e]=d[e]}return b}function Aa(a){K.call(this);this.type="ShaderMaterial";
|
|
|
+this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.verticesNeedUpdate=this.elementsNeedUpdate=!1}function Dc(a){var b={},c;for(c in a){b[c]={};for(var d in a[c]){var e=a[c][d];e&&(e.isColor||e.isMatrix3||e.isMatrix4||e.isVector2||e.isVector3||e.isVector4||e.isTexture)?b[c][d]=e.clone():Array.isArray(e)?b[c][d]=e.slice():b[c][d]=e}}return b}function ya(a){for(var b={},c=0;c<a.length;c++){var d=Dc(a[c]),e;for(e in d)b[e]=d[e]}return b}function Ba(a){K.call(this);this.type="ShaderMaterial";
|
|
|
this.defines={};this.uniforms={};this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}";this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}";this.linewidth=1;this.wireframe=!1;this.wireframeLinewidth=1;this.morphNormals=this.morphTargets=this.skinning=this.clipping=this.lights=this.fog=!1;this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1};this.defaultAttributeValues={color:[1,1,
|
|
|
1],uv:[0,0],uv2:[0,0]};this.index0AttributeName=void 0;this.uniformsNeedUpdate=!1;void 0!==a&&(void 0!==a.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(a))}function db(){x.call(this);this.type="Camera";this.matrixWorldInverse=new U;this.projectionMatrix=new U;this.projectionMatrixInverse=new U}function ma(a,b,c,d){db.call(this);this.type="PerspectiveCamera";this.fov=void 0!==a?a:50;this.zoom=1;this.near=void 0!==
|
|
|
c?c:.1;this.far=void 0!==d?d:2E3;this.focus=10;this.aspect=void 0!==b?b:1;this.view=null;this.filmGauge=35;this.filmOffset=0;this.updateProjectionMatrix()}function Ec(a,b,c){x.call(this);this.type="CubeCamera";if(!0!==c.isWebGLCubeRenderTarget)console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");else{this.renderTarget=c;var d=new ma(90,1,a,b);d.layers=this.layers;d.up.set(0,-1,0);d.lookAt(new n(1,0,0));this.add(d);var e=new ma(90,
|
|
|
1,a,b);e.layers=this.layers;e.up.set(0,-1,0);e.lookAt(new n(-1,0,0));this.add(e);var f=new ma(90,1,a,b);f.layers=this.layers;f.up.set(0,0,1);f.lookAt(new n(0,1,0));this.add(f);var g=new ma(90,1,a,b);g.layers=this.layers;g.up.set(0,0,-1);g.lookAt(new n(0,-1,0));this.add(g);var h=new ma(90,1,a,b);h.layers=this.layers;h.up.set(0,-1,0);h.lookAt(new n(0,0,1));this.add(h);var l=new ma(90,1,a,b);l.layers=this.layers;l.up.set(0,-1,0);l.lookAt(new n(0,0,-1));this.add(l);this.update=function(a,b){null===this.parent&&
|
|
|
this.updateMatrixWorld();var m=a.xr.enabled,q=a.getRenderTarget();a.xr.enabled=!1;var k=c.texture.generateMipmaps;c.texture.generateMipmaps=!1;a.setRenderTarget(c,0);a.render(b,d);a.setRenderTarget(c,1);a.render(b,e);a.setRenderTarget(c,2);a.render(b,f);a.setRenderTarget(c,3);a.render(b,g);a.setRenderTarget(c,4);a.render(b,h);c.texture.generateMipmaps=k;a.setRenderTarget(c,5);a.render(b,l);a.setRenderTarget(q);a.xr.enabled=m};this.clear=function(a,b,d,e){for(var f=a.getRenderTarget(),g=0;6>g;g++)a.setRenderTarget(c,
|
|
|
g),a.clear(b,d,e);a.setRenderTarget(f)}}}function Xb(a,b,c){Number.isInteger(b)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),b=c);Ea.call(this,a,a,b)}function Yb(a,b,c,d,e,f,g,h,l,m,q,p){W.call(this,null,f,g,h,l,m,d,e,q,p);this.image={data:a||null,width:b||1,height:c||1};this.magFilter=void 0!==l?l:1003;this.minFilter=void 0!==m?m:1003;this.flipY=this.generateMipmaps=!1;this.unpackAlignment=1;this.needsUpdate=!0}function Fc(a,b,
|
|
|
-c,d,e,f){this.planes=[void 0!==a?a:new Ua,void 0!==b?b:new Ua,void 0!==c?c:new Ua,void 0!==d?d:new Ua,void 0!==e?e:new Ua,void 0!==f?f:new Ua]}function wh(){function a(e,f){!1!==c&&(d(e,f),b.requestAnimationFrame(a))}var b=null,c=!1,d=null;return{start:function(){!0!==c&&null!==d&&(b.requestAnimationFrame(a),c=!0)},stop:function(){c=!1},setAnimationLoop:function(a){d=a},setContext:function(a){b=a}}}function kj(a,b){function c(b,c){var d=b.array,e=b.usage,f=a.createBuffer();a.bindBuffer(c,f);a.bufferData(c,
|
|
|
-d,e);b.onUploadCallback();c=5126;d instanceof Float32Array?c=5126:d instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):d instanceof Uint16Array?c=5123:d instanceof Int16Array?c=5122:d instanceof Uint32Array?c=5125:d instanceof Int32Array?c=5124:d instanceof Int8Array?c=5120:d instanceof Uint8Array&&(c=5121);return{buffer:f,type:c,bytesPerElement:d.BYTES_PER_ELEMENT,version:b.version}}var d=b.isWebGL2,e=new WeakMap;return{get:function(a){a.isInterleavedBufferAttribute&&
|
|
|
-(a=a.data);return e.get(a)},remove:function(b){b.isInterleavedBufferAttribute&&(b=b.data);var c=e.get(b);c&&(a.deleteBuffer(c.buffer),e.delete(b))},update:function(b,g){b.isInterleavedBufferAttribute&&(b=b.data);var f=e.get(b);if(void 0===f)e.set(b,c(b,g));else if(f.version<b.version){var l=b.array,m=b.updateRange;a.bindBuffer(g,f.buffer);-1===m.count?a.bufferSubData(g,0,l):(d?a.bufferSubData(g,m.offset*l.BYTES_PER_ELEMENT,l,m.offset,m.count):a.bufferSubData(g,m.offset*l.BYTES_PER_ELEMENT,l.subarray(m.offset,
|
|
|
-m.offset+m.count)),m.count=-1);f.version=b.version}}}}function Fd(a,b,c,d){I.call(this);this.type="PlaneGeometry";this.parameters={width:a,height:b,widthSegments:c,heightSegments:d};this.fromBufferGeometry(new Zb(a,b,c,d));this.mergeVertices()}function Zb(a,b,c,d){H.call(this);this.type="PlaneBufferGeometry";this.parameters={width:a,height:b,widthSegments:c,heightSegments:d};a=a||1;b=b||1;var e=a/2,f=b/2;c=Math.floor(c)||1;d=Math.floor(d)||1;var g=c+1,h=d+1,l=a/c,m=b/d;b=[];a=[];for(var q=[],p=[],
|
|
|
-A=0;A<h;A++)for(var k=A*m-f,t=0;t<g;t++)a.push(t*l-e,-k,0),q.push(0,0,1),p.push(t/c),p.push(1-A/d);for(e=0;e<d;e++)for(f=0;f<c;f++)h=f+g*(e+1),l=f+1+g*(e+1),m=f+1+g*e,b.push(f+g*e,h,m),b.push(h,l,m);this.setIndex(b);this.setAttribute("position",new C(a,3));this.setAttribute("normal",new C(q,3));this.setAttribute("uv",new C(p,2))}function lj(a,b,c,d){function e(a,c){b.buffers.color.setClear(a.r,a.g,a.b,c,d)}var f=new E(0),g=0,h,l,m=null,q=0,p=null;return{getClearColor:function(){return f},setClearColor:function(a,
|
|
|
-b){f.set(a);g=void 0!==b?b:1;e(f,g)},getClearAlpha:function(){return g},setClearAlpha:function(a){g=a;e(f,g)},render:function(b,d,t,k){d=!0===d.isScene?d.background:null;t=a.xr;(t=t.getSession&&t.getSession())&&"additive"===t.environmentBlendMode&&(d=null);null===d?e(f,g):d&&d.isColor&&(e(d,1),k=!0);(a.autoClear||k)&&a.clear(a.autoClearColor,a.autoClearDepth,a.autoClearStencil);if(d&&(d.isCubeTexture||d.isWebGLCubeRenderTarget||306===d.mapping)){void 0===l&&(l=new Z(new Gd(1,1,1),new Aa({name:"BackgroundCubeMaterial",
|
|
|
-uniforms:Dc(eb.cube.uniforms),vertexShader:eb.cube.vertexShader,fragmentShader:eb.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(a,b,c){this.matrixWorld.copyPosition(c.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),c.update(l));k=d.isWebGLCubeRenderTarget?d.texture:d;l.material.uniforms.envMap.value=k;l.material.uniforms.flipEnvMap.value=
|
|
|
-k.isCubeTexture?-1:1;if(m!==d||q!==k.version||p!==a.toneMapping)l.material.needsUpdate=!0,m=d,q=k.version,p=a.toneMapping;b.unshift(l,l.geometry,l.material,0,0,null)}else if(d&&d.isTexture){void 0===h&&(h=new Z(new Zb(2,2),new Aa({name:"BackgroundMaterial",uniforms:Dc(eb.background.uniforms),vertexShader:eb.background.vertexShader,fragmentShader:eb.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),Object.defineProperty(h.material,"map",{get:function(){return this.uniforms.t2D.value}}),
|
|
|
-c.update(h));h.material.uniforms.t2D.value=d;!0===d.matrixAutoUpdate&&d.updateMatrix();h.material.uniforms.uvTransform.value.copy(d.matrix);if(m!==d||q!==d.version||p!==a.toneMapping)h.material.needsUpdate=!0,m=d,q=d.version,p=a.toneMapping;b.unshift(h,h.geometry,h.material,0,0,null)}}}}function mj(a,b,c,d){function e(b){return d.isWebGL2?a.bindVertexArray(b):v.bindVertexArrayOES(b)}function f(b){return d.isWebGL2?a.deleteVertexArray(b):v.deleteVertexArrayOES(b)}function g(a){for(var b=[],c=[],d=
|
|
|
-[],e=0;e<t;e++)b[e]=0,c[e]=0,d[e]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:b,enabledAttributes:c,attributeDivisors:d,object:a,attributes:{}}}function h(){for(var a=ca.newAttributes,b=0,c=a.length;b<c;b++)a[b]=0}function l(a){m(a,0)}function m(c,e){var f=ca.enabledAttributes,g=ca.attributeDivisors;ca.newAttributes[c]=1;0===f[c]&&(a.enableVertexAttribArray(c),f[c]=1);g[c]!==e&&((d.isWebGL2?a:b.get("ANGLE_instanced_arrays"))[d.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](c,
|
|
|
-e),g[c]=e)}function q(){for(var b=ca.newAttributes,c=ca.enabledAttributes,d=0,e=c.length;d<e;d++)c[d]!==b[d]&&(a.disableVertexAttribArray(d),c[d]=0)}function p(b,c,e,f,g,h){!0!==d.isWebGL2||5124!==e&&5125!==e?a.vertexAttribPointer(b,c,e,f,g,h):a.vertexAttribIPointer(b,c,e,f,g,h)}function k(){r();ca!==w&&(ca=w,e(ca.object))}function r(){w.geometry=null;w.program=null;w.wireframe=!1}var t=a.getParameter(34921),v=d.isWebGL2?null:b.get("OES_vertex_array_object"),n=d.isWebGL2||null!==v,B={},w=g(null),
|
|
|
-ca=w;return{setup:function(f,t,k,A,r){var y=!1;if(n){y=!0===t.wireframe;var w=B[A.id];void 0===w&&(w={},B[A.id]=w);var z=w[k.id];void 0===z&&(z={},w[k.id]=z);w=z[y];void 0===w&&(w=g(d.isWebGL2?a.createVertexArray():v.createVertexArrayOES()),z[y]=w);y=w;ca!==y&&(ca=y,e(ca.object));a:if(y=ca.attributes,z=A.attributes,Object.keys(y).length!==Object.keys(z).length)y=!0;else{for(var F in z){w=y[F];var N=z[F];if(w.attribute!==N||w.data!==N.data){y=!0;break a}}y=!1}if(y){F={};z=A.attributes;for(var P in z)w=
|
|
|
-z[P],N={},N.attribute=w,w.data&&(N.data=w.data),F[P]=N;ca.attributes=F}}else if(P=!0===t.wireframe,ca.geometry!==A.id||ca.program!==k.id||ca.wireframe!==P)ca.geometry=A.id,ca.program=k.id,ca.wireframe=P,y=!0;!0===f.isInstancedMesh&&(y=!0);null!==r&&c.update(r,34963);if(y){if(!1!==d.isWebGL2||!f.isInstancedMesh&&!A.isInstancedBufferGeometry||null!==b.get("ANGLE_instanced_arrays")){h();P=A.attributes;k=k.getAttributes();t=t.defaultAttributeValues;for(var Je in k)if(F=k[Je],0<=F){var u=P[Je];if(void 0!==
|
|
|
-u){y=u.normalized;z=u.itemSize;var x=c.get(u);if(void 0!==x)if(w=x.buffer,N=x.type,x=x.bytesPerElement,u.isInterleavedBufferAttribute){var C=u.data,D=C.stride;u=u.offset;C&&C.isInstancedInterleavedBuffer?(m(F,C.meshPerAttribute),void 0===A._maxInstanceCount&&(A._maxInstanceCount=C.meshPerAttribute*C.count)):l(F);a.bindBuffer(34962,w);p(F,z,N,y,D*x,u*x)}else u.isInstancedBufferAttribute?(m(F,u.meshPerAttribute),void 0===A._maxInstanceCount&&(A._maxInstanceCount=u.meshPerAttribute*u.count)):l(F),a.bindBuffer(34962,
|
|
|
-w),p(F,z,N,y,0,0)}else if("instanceMatrix"===Je)z=c.get(f.instanceMatrix),void 0!==z&&(y=z.buffer,z=z.type,m(F+0,1),m(F+1,1),m(F+2,1),m(F+3,1),a.bindBuffer(34962,y),a.vertexAttribPointer(F+0,4,z,!1,64,0),a.vertexAttribPointer(F+1,4,z,!1,64,16),a.vertexAttribPointer(F+2,4,z,!1,64,32),a.vertexAttribPointer(F+3,4,z,!1,64,48));else if(void 0!==t&&(y=t[Je],void 0!==y))switch(y.length){case 2:a.vertexAttrib2fv(F,y);break;case 3:a.vertexAttrib3fv(F,y);break;case 4:a.vertexAttrib4fv(F,y);break;default:a.vertexAttrib1fv(F,
|
|
|
-y)}}q()}null!==r&&a.bindBuffer(34963,c.get(r).buffer)}},reset:k,resetDefaultState:r,dispose:function(){k();for(var a in B){var b=B[a],c;for(c in b){var d=b[c],e;for(e in d)f(d[e].object),delete d[e];delete b[c]}delete B[a]}},releaseStatesOfGeometry:function(a){if(void 0!==B[a.id]){var b=B[a.id],c;for(c in b){var d=b[c],e;for(e in d)f(d[e].object),delete d[e];delete b[c]}delete B[a.id]}},releaseStatesOfProgram:function(a){for(var b in B){var c=B[b];if(void 0!==c[a.id]){var d=c[a.id],e;for(e in d)f(d[e].object),
|
|
|
-delete d[e];delete c[a.id]}}},initAttributes:h,enableAttribute:l,disableUnusedAttributes:q}}function nj(a,b,c,d){var e=d.isWebGL2,f;this.setMode=function(a){f=a};this.render=function(b,d){a.drawArrays(f,b,d);c.update(d,f)};this.renderInstances=function(d,h,l,m){if(0!==m){if(e){d=a;var g="drawArraysInstanced"}else if(d=b.get("ANGLE_instanced_arrays"),g="drawArraysInstancedANGLE",null===d){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");
|
|
|
+c,d,e,f){this.planes=[void 0!==a?a:new Ua,void 0!==b?b:new Ua,void 0!==c?c:new Ua,void 0!==d?d:new Ua,void 0!==e?e:new Ua,void 0!==f?f:new Ua]}function wh(){function a(c,g){d(c,g);e=b.requestAnimationFrame(a)}var b=null,c=!1,d=null,e=null;return{start:function(){!0!==c&&null!==d&&(e=b.requestAnimationFrame(a),c=!0)},stop:function(){b.cancelAnimationFrame(e);c=!1},setAnimationLoop:function(a){d=a},setContext:function(a){b=a}}}function kj(a,b){function c(b,c){var d=b.array,e=b.usage,f=a.createBuffer();
|
|
|
+a.bindBuffer(c,f);a.bufferData(c,d,e);b.onUploadCallback();c=5126;d instanceof Float32Array?c=5126:d instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):d instanceof Uint16Array?c=5123:d instanceof Int16Array?c=5122:d instanceof Uint32Array?c=5125:d instanceof Int32Array?c=5124:d instanceof Int8Array?c=5120:d instanceof Uint8Array&&(c=5121);return{buffer:f,type:c,bytesPerElement:d.BYTES_PER_ELEMENT,version:b.version}}var d=b.isWebGL2,e=new WeakMap;
|
|
|
+return{get:function(a){a.isInterleavedBufferAttribute&&(a=a.data);return e.get(a)},remove:function(b){b.isInterleavedBufferAttribute&&(b=b.data);var c=e.get(b);c&&(a.deleteBuffer(c.buffer),e.delete(b))},update:function(b,g){b.isInterleavedBufferAttribute&&(b=b.data);var f=e.get(b);if(void 0===f)e.set(b,c(b,g));else if(f.version<b.version){var l=b.array,m=b.updateRange;a.bindBuffer(g,f.buffer);-1===m.count?a.bufferSubData(g,0,l):(d?a.bufferSubData(g,m.offset*l.BYTES_PER_ELEMENT,l,m.offset,m.count):
|
|
|
+a.bufferSubData(g,m.offset*l.BYTES_PER_ELEMENT,l.subarray(m.offset,m.offset+m.count)),m.count=-1);f.version=b.version}}}}function Fd(a,b,c,d){I.call(this);this.type="PlaneGeometry";this.parameters={width:a,height:b,widthSegments:c,heightSegments:d};this.fromBufferGeometry(new Zb(a,b,c,d));this.mergeVertices()}function Zb(a,b,c,d){H.call(this);this.type="PlaneBufferGeometry";this.parameters={width:a,height:b,widthSegments:c,heightSegments:d};a=a||1;b=b||1;var e=a/2,f=b/2;c=Math.floor(c)||1;d=Math.floor(d)||
|
|
|
+1;var g=c+1,h=d+1,l=a/c,m=b/d;b=[];a=[];for(var q=[],p=[],A=0;A<h;A++)for(var k=A*m-f,t=0;t<g;t++)a.push(t*l-e,-k,0),q.push(0,0,1),p.push(t/c),p.push(1-A/d);for(e=0;e<d;e++)for(f=0;f<c;f++)h=f+g*(e+1),l=f+1+g*(e+1),m=f+1+g*e,b.push(f+g*e,h,m),b.push(h,l,m);this.setIndex(b);this.setAttribute("position",new C(a,3));this.setAttribute("normal",new C(q,3));this.setAttribute("uv",new C(p,2))}function lj(a,b,c,d){function e(a,c){b.buffers.color.setClear(a.r,a.g,a.b,c,d)}var f=new E(0),g=0,h,l,m=null,q=0,
|
|
|
+p=null;return{getClearColor:function(){return f},setClearColor:function(a,b){f.set(a);g=void 0!==b?b:1;e(f,g)},getClearAlpha:function(){return g},setClearAlpha:function(a){g=a;e(f,g)},render:function(b,d,t,k){d=!0===d.isScene?d.background:null;t=a.xr;(t=t.getSession&&t.getSession())&&"additive"===t.environmentBlendMode&&(d=null);null===d?e(f,g):d&&d.isColor&&(e(d,1),k=!0);(a.autoClear||k)&&a.clear(a.autoClearColor,a.autoClearDepth,a.autoClearStencil);if(d&&(d.isCubeTexture||d.isWebGLCubeRenderTarget||
|
|
|
+306===d.mapping)){void 0===l&&(l=new Z(new Gd(1,1,1),new Ba({name:"BackgroundCubeMaterial",uniforms:Dc(eb.cube.uniforms),vertexShader:eb.cube.vertexShader,fragmentShader:eb.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(a,b,c){this.matrixWorld.copyPosition(c.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),c.update(l));k=d.isWebGLCubeRenderTarget?
|
|
|
+d.texture:d;l.material.uniforms.envMap.value=k;l.material.uniforms.flipEnvMap.value=k.isCubeTexture?-1:1;if(m!==d||q!==k.version||p!==a.toneMapping)l.material.needsUpdate=!0,m=d,q=k.version,p=a.toneMapping;b.unshift(l,l.geometry,l.material,0,0,null)}else if(d&&d.isTexture){void 0===h&&(h=new Z(new Zb(2,2),new Ba({name:"BackgroundMaterial",uniforms:Dc(eb.background.uniforms),vertexShader:eb.background.vertexShader,fragmentShader:eb.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),
|
|
|
+h.geometry.deleteAttribute("normal"),Object.defineProperty(h.material,"map",{get:function(){return this.uniforms.t2D.value}}),c.update(h));h.material.uniforms.t2D.value=d;!0===d.matrixAutoUpdate&&d.updateMatrix();h.material.uniforms.uvTransform.value.copy(d.matrix);if(m!==d||q!==d.version||p!==a.toneMapping)h.material.needsUpdate=!0,m=d,q=d.version,p=a.toneMapping;b.unshift(h,h.geometry,h.material,0,0,null)}}}}function mj(a,b,c,d){function e(b){return d.isWebGL2?a.bindVertexArray(b):v.bindVertexArrayOES(b)}
|
|
|
+function f(b){return d.isWebGL2?a.deleteVertexArray(b):v.deleteVertexArrayOES(b)}function g(a){for(var b=[],c=[],d=[],e=0;e<t;e++)b[e]=0,c[e]=0,d[e]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:b,enabledAttributes:c,attributeDivisors:d,object:a,attributes:{}}}function h(){for(var a=ca.newAttributes,b=0,c=a.length;b<c;b++)a[b]=0}function l(a){m(a,0)}function m(c,e){var f=ca.enabledAttributes,g=ca.attributeDivisors;ca.newAttributes[c]=1;0===f[c]&&(a.enableVertexAttribArray(c),f[c]=
|
|
|
+1);g[c]!==e&&((d.isWebGL2?a:b.get("ANGLE_instanced_arrays"))[d.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](c,e),g[c]=e)}function q(){for(var b=ca.newAttributes,c=ca.enabledAttributes,d=0,e=c.length;d<e;d++)c[d]!==b[d]&&(a.disableVertexAttribArray(d),c[d]=0)}function p(b,c,e,f,g,h){!0!==d.isWebGL2||5124!==e&&5125!==e?a.vertexAttribPointer(b,c,e,f,g,h):a.vertexAttribIPointer(b,c,e,f,g,h)}function k(){r();ca!==w&&(ca=w,e(ca.object))}function r(){w.geometry=null;w.program=null;w.wireframe=
|
|
|
+!1}var t=a.getParameter(34921),v=d.isWebGL2?null:b.get("OES_vertex_array_object"),n=d.isWebGL2||null!==v,B={},w=g(null),ca=w;return{setup:function(f,t,k,A,r){var y=!1;if(n){y=!0===t.wireframe;var w=B[A.id];void 0===w&&(w={},B[A.id]=w);var z=w[k.id];void 0===z&&(z={},w[k.id]=z);w=z[y];void 0===w&&(w=g(d.isWebGL2?a.createVertexArray():v.createVertexArrayOES()),z[y]=w);y=w;ca!==y&&(ca=y,e(ca.object));a:if(y=ca.attributes,z=A.attributes,Object.keys(y).length!==Object.keys(z).length)y=!0;else{for(var F in z){w=
|
|
|
+y[F];var N=z[F];if(w.attribute!==N||w.data!==N.data){y=!0;break a}}y=!1}if(y){F={};z=A.attributes;for(var P in z)w=z[P],N={},N.attribute=w,w.data&&(N.data=w.data),F[P]=N;ca.attributes=F}}else if(P=!0===t.wireframe,ca.geometry!==A.id||ca.program!==k.id||ca.wireframe!==P)ca.geometry=A.id,ca.program=k.id,ca.wireframe=P,y=!0;!0===f.isInstancedMesh&&(y=!0);null!==r&&c.update(r,34963);if(y){if(!1!==d.isWebGL2||!f.isInstancedMesh&&!A.isInstancedBufferGeometry||null!==b.get("ANGLE_instanced_arrays")){h();
|
|
|
+P=A.attributes;k=k.getAttributes();t=t.defaultAttributeValues;for(var Je in k)if(F=k[Je],0<=F){var u=P[Je];if(void 0!==u){y=u.normalized;z=u.itemSize;var x=c.get(u);if(void 0!==x)if(w=x.buffer,N=x.type,x=x.bytesPerElement,u.isInterleavedBufferAttribute){var C=u.data,D=C.stride;u=u.offset;C&&C.isInstancedInterleavedBuffer?(m(F,C.meshPerAttribute),void 0===A._maxInstanceCount&&(A._maxInstanceCount=C.meshPerAttribute*C.count)):l(F);a.bindBuffer(34962,w);p(F,z,N,y,D*x,u*x)}else u.isInstancedBufferAttribute?
|
|
|
+(m(F,u.meshPerAttribute),void 0===A._maxInstanceCount&&(A._maxInstanceCount=u.meshPerAttribute*u.count)):l(F),a.bindBuffer(34962,w),p(F,z,N,y,0,0)}else if("instanceMatrix"===Je)z=c.get(f.instanceMatrix),void 0!==z&&(y=z.buffer,z=z.type,m(F+0,1),m(F+1,1),m(F+2,1),m(F+3,1),a.bindBuffer(34962,y),a.vertexAttribPointer(F+0,4,z,!1,64,0),a.vertexAttribPointer(F+1,4,z,!1,64,16),a.vertexAttribPointer(F+2,4,z,!1,64,32),a.vertexAttribPointer(F+3,4,z,!1,64,48));else if(void 0!==t&&(y=t[Je],void 0!==y))switch(y.length){case 2:a.vertexAttrib2fv(F,
|
|
|
+y);break;case 3:a.vertexAttrib3fv(F,y);break;case 4:a.vertexAttrib4fv(F,y);break;default:a.vertexAttrib1fv(F,y)}}q()}null!==r&&a.bindBuffer(34963,c.get(r).buffer)}},reset:k,resetDefaultState:r,dispose:function(){k();for(var a in B){var b=B[a],c;for(c in b){var d=b[c],e;for(e in d)f(d[e].object),delete d[e];delete b[c]}delete B[a]}},releaseStatesOfGeometry:function(a){if(void 0!==B[a.id]){var b=B[a.id],c;for(c in b){var d=b[c],e;for(e in d)f(d[e].object),delete d[e];delete b[c]}delete B[a.id]}},releaseStatesOfProgram:function(a){for(var b in B){var c=
|
|
|
+B[b];if(void 0!==c[a.id]){var d=c[a.id],e;for(e in d)f(d[e].object),delete d[e];delete c[a.id]}}},initAttributes:h,enableAttribute:l,disableUnusedAttributes:q}}function nj(a,b,c,d){var e=d.isWebGL2,f;this.setMode=function(a){f=a};this.render=function(b,d){a.drawArrays(f,b,d);c.update(d,f)};this.renderInstances=function(d,h,l,m){if(0!==m){if(e){d=a;var g="drawArraysInstanced"}else if(d=b.get("ANGLE_instanced_arrays"),g="drawArraysInstancedANGLE",null===d){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");
|
|
|
return}d[g](f,h,l,m);c.update(l,f,m)}}}function oj(a,b,c){function d(b){if("highp"===b){if(0<a.getShaderPrecisionFormat(35633,36338).precision&&0<a.getShaderPrecisionFormat(35632,36338).precision)return"highp";b="mediump"}return"mediump"===b&&0<a.getShaderPrecisionFormat(35633,36337).precision&&0<a.getShaderPrecisionFormat(35632,36337).precision?"mediump":"lowp"}var e,f="undefined"!==typeof WebGL2RenderingContext&&a instanceof WebGL2RenderingContext||"undefined"!==typeof WebGL2ComputeRenderingContext&&
|
|
|
a instanceof WebGL2ComputeRenderingContext,g=void 0!==c.precision?c.precision:"highp",h=d(g);h!==g&&(console.warn("THREE.WebGLRenderer:",g,"not supported, using",h,"instead."),g=h);c=!0===c.logarithmicDepthBuffer;h=a.getParameter(34930);var l=a.getParameter(35660),m=a.getParameter(3379),q=a.getParameter(34076),p=a.getParameter(34921),k=a.getParameter(36347),r=a.getParameter(36348),t=a.getParameter(36349),v=0<l,y=f||!!b.get("OES_texture_float"),n=v&&y,w=f?a.getParameter(36183):0;return{isWebGL2:f,
|
|
|
getMaxAnisotropy:function(){if(void 0!==e)return e;var c=b.get("EXT_texture_filter_anisotropic");return e=null!==c?a.getParameter(c.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:d,precision:g,logarithmicDepthBuffer:c,maxTextures:h,maxVertexTextures:l,maxTextureSize:m,maxCubemapSize:q,maxAttributes:p,maxVertexUniforms:k,maxVaryings:r,maxFragmentUniforms:t,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:n,maxSamples:w}}function pj(){function a(){m.value!==d&&(m.value=d,m.needsUpdate=
|
|
@@ -57,12 +57,12 @@ d)}}}}function uj(a,b){return a[0]-b[0]}function vj(a,b){return Math.abs(b[1])-M
|
|
|
e=h.morphTargets&&g.morphAttributes.position;h=h.morphNormals&&g.morphAttributes.normal;for(f=q=0;8>f;f++)k=d[f],p=k[0],k=k[1],p!==Number.MAX_SAFE_INTEGER&&k?(e&&g.getAttribute("morphTarget"+f)!==e[p]&&g.setAttribute("morphTarget"+f,e[p]),h&&g.getAttribute("morphNormal"+f)!==h[p]&&g.setAttribute("morphNormal"+f,h[p]),c[f]=k,q+=k):(e&&void 0!==g.getAttribute("morphTarget"+f)&&g.deleteAttribute("morphTarget"+f),h&&void 0!==g.getAttribute("morphNormal"+f)&&g.deleteAttribute("morphNormal"+f),c[f]=0);
|
|
|
g=g.morphTargetsRelative?1:1-q;l.getUniforms().setValue(a,"morphTargetBaseInfluence",g);l.getUniforms().setValue(a,"morphTargetInfluences",c)}}}function xj(a,b,c,d){var e=new WeakMap;return{update:function(a){var f=d.render.frame,h=a.geometry,l=b.get(a,h);e.get(l)!==f&&(h.isGeometry&&l.updateFromObject(a),b.update(l),e.set(l,f));a.isInstancedMesh&&c.update(a.instanceMatrix,34962);return l},dispose:function(){e=new WeakMap}}}function ob(a,b,c,d,e,f,g,h,l,m){a=void 0!==a?a:[];W.call(this,a,void 0!==
|
|
|
b?b:301,c,d,e,f,void 0!==g?g:1022,h,l,m);this.flipY=!1}function Gc(a,b,c,d){W.call(this,null);this.image={data:a||null,width:b||1,height:c||1,depth:d||1};this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=!1;this.needsUpdate=!0}function Hc(a,b,c,d){W.call(this,null);this.image={data:a||null,width:b||1,height:c||1,depth:d||1};this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=!1;this.needsUpdate=!0}function Ic(a,b,c){var d=a[0];if(0>=
|
|
|
-d||0<d)return a;var e=b*c,f=xh[e];void 0===f&&(f=new Float32Array(e),xh[e]=f);if(0!==b)for(d.toArray(f,0),d=1,e=0;d!==b;++d)e+=c,a[d].toArray(f,e);return f}function Pa(a,b){if(a.length!==b.length)return!1;for(var c=0,d=a.length;c<d;c++)if(a[c]!==b[c])return!1;return!0}function Ba(a,b){for(var c=0,d=b.length;c<d;c++)a[c]=b[c]}function yh(a,b){var c=zh[b];void 0===c&&(c=new Int32Array(b),zh[b]=c);for(var d=0;d!==b;++d)c[d]=a.allocateTextureUnit();return c}function yj(a,b){var c=this.cache;c[0]!==b&&
|
|
|
-(a.uniform1f(this.addr,b),c[0]=b)}function zj(a,b){var c=this.cache;if(void 0!==b.x){if(c[0]!==b.x||c[1]!==b.y)a.uniform2f(this.addr,b.x,b.y),c[0]=b.x,c[1]=b.y}else Pa(c,b)||(a.uniform2fv(this.addr,b),Ba(c,b))}function Aj(a,b){var c=this.cache;if(void 0!==b.x){if(c[0]!==b.x||c[1]!==b.y||c[2]!==b.z)a.uniform3f(this.addr,b.x,b.y,b.z),c[0]=b.x,c[1]=b.y,c[2]=b.z}else if(void 0!==b.r){if(c[0]!==b.r||c[1]!==b.g||c[2]!==b.b)a.uniform3f(this.addr,b.r,b.g,b.b),c[0]=b.r,c[1]=b.g,c[2]=b.b}else Pa(c,b)||(a.uniform3fv(this.addr,
|
|
|
-b),Ba(c,b))}function Bj(a,b){var c=this.cache;if(void 0!==b.x){if(c[0]!==b.x||c[1]!==b.y||c[2]!==b.z||c[3]!==b.w)a.uniform4f(this.addr,b.x,b.y,b.z,b.w),c[0]=b.x,c[1]=b.y,c[2]=b.z,c[3]=b.w}else Pa(c,b)||(a.uniform4fv(this.addr,b),Ba(c,b))}function Cj(a,b){var c=this.cache,d=b.elements;void 0===d?Pa(c,b)||(a.uniformMatrix2fv(this.addr,!1,b),Ba(c,b)):Pa(c,d)||(Ah.set(d),a.uniformMatrix2fv(this.addr,!1,Ah),Ba(c,d))}function Dj(a,b){var c=this.cache,d=b.elements;void 0===d?Pa(c,b)||(a.uniformMatrix3fv(this.addr,
|
|
|
-!1,b),Ba(c,b)):Pa(c,d)||(Bh.set(d),a.uniformMatrix3fv(this.addr,!1,Bh),Ba(c,d))}function Ej(a,b){var c=this.cache,d=b.elements;void 0===d?Pa(c,b)||(a.uniformMatrix4fv(this.addr,!1,b),Ba(c,b)):Pa(c,d)||(Ch.set(d),a.uniformMatrix4fv(this.addr,!1,Ch),Ba(c,d))}function Fj(a,b,c){var d=this.cache,e=c.allocateTextureUnit();d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=e);c.safeSetTexture2D(b||Dh,e)}function Gj(a,b,c){var d=this.cache,e=c.allocateTextureUnit();d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=e);c.setTexture2DArray(b||
|
|
|
-Hj,e)}function Ij(a,b,c){var d=this.cache,e=c.allocateTextureUnit();d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=e);c.setTexture3D(b||Jj,e)}function Kj(a,b,c){var d=this.cache,e=c.allocateTextureUnit();d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=e);c.safeSetTextureCube(b||Eh,e)}function Lj(a,b){var c=this.cache;c[0]!==b&&(a.uniform1i(this.addr,b),c[0]=b)}function Mj(a,b){var c=this.cache;Pa(c,b)||(a.uniform2iv(this.addr,b),Ba(c,b))}function Nj(a,b){var c=this.cache;Pa(c,b)||(a.uniform3iv(this.addr,b),Ba(c,
|
|
|
-b))}function Oj(a,b){var c=this.cache;Pa(c,b)||(a.uniform4iv(this.addr,b),Ba(c,b))}function Pj(a,b){var c=this.cache;c[0]!==b&&(a.uniform1ui(this.addr,b),c[0]=b)}function Qj(a){switch(a){case 5126:return yj;case 35664:return zj;case 35665:return Aj;case 35666:return Bj;case 35674:return Cj;case 35675:return Dj;case 35676:return Ej;case 5124:case 35670:return Lj;case 35667:case 35671:return Mj;case 35668:case 35672:return Nj;case 35669:case 35673:return Oj;case 5125:return Pj;case 35678:case 36198:case 36298:case 36306:case 35682:return Fj;
|
|
|
+d||0<d)return a;var e=b*c,f=xh[e];void 0===f&&(f=new Float32Array(e),xh[e]=f);if(0!==b)for(d.toArray(f,0),d=1,e=0;d!==b;++d)e+=c,a[d].toArray(f,e);return f}function Pa(a,b){if(a.length!==b.length)return!1;for(var c=0,d=a.length;c<d;c++)if(a[c]!==b[c])return!1;return!0}function Aa(a,b){for(var c=0,d=b.length;c<d;c++)a[c]=b[c]}function yh(a,b){var c=zh[b];void 0===c&&(c=new Int32Array(b),zh[b]=c);for(var d=0;d!==b;++d)c[d]=a.allocateTextureUnit();return c}function yj(a,b){var c=this.cache;c[0]!==b&&
|
|
|
+(a.uniform1f(this.addr,b),c[0]=b)}function zj(a,b){var c=this.cache;if(void 0!==b.x){if(c[0]!==b.x||c[1]!==b.y)a.uniform2f(this.addr,b.x,b.y),c[0]=b.x,c[1]=b.y}else Pa(c,b)||(a.uniform2fv(this.addr,b),Aa(c,b))}function Aj(a,b){var c=this.cache;if(void 0!==b.x){if(c[0]!==b.x||c[1]!==b.y||c[2]!==b.z)a.uniform3f(this.addr,b.x,b.y,b.z),c[0]=b.x,c[1]=b.y,c[2]=b.z}else if(void 0!==b.r){if(c[0]!==b.r||c[1]!==b.g||c[2]!==b.b)a.uniform3f(this.addr,b.r,b.g,b.b),c[0]=b.r,c[1]=b.g,c[2]=b.b}else Pa(c,b)||(a.uniform3fv(this.addr,
|
|
|
+b),Aa(c,b))}function Bj(a,b){var c=this.cache;if(void 0!==b.x){if(c[0]!==b.x||c[1]!==b.y||c[2]!==b.z||c[3]!==b.w)a.uniform4f(this.addr,b.x,b.y,b.z,b.w),c[0]=b.x,c[1]=b.y,c[2]=b.z,c[3]=b.w}else Pa(c,b)||(a.uniform4fv(this.addr,b),Aa(c,b))}function Cj(a,b){var c=this.cache,d=b.elements;void 0===d?Pa(c,b)||(a.uniformMatrix2fv(this.addr,!1,b),Aa(c,b)):Pa(c,d)||(Ah.set(d),a.uniformMatrix2fv(this.addr,!1,Ah),Aa(c,d))}function Dj(a,b){var c=this.cache,d=b.elements;void 0===d?Pa(c,b)||(a.uniformMatrix3fv(this.addr,
|
|
|
+!1,b),Aa(c,b)):Pa(c,d)||(Bh.set(d),a.uniformMatrix3fv(this.addr,!1,Bh),Aa(c,d))}function Ej(a,b){var c=this.cache,d=b.elements;void 0===d?Pa(c,b)||(a.uniformMatrix4fv(this.addr,!1,b),Aa(c,b)):Pa(c,d)||(Ch.set(d),a.uniformMatrix4fv(this.addr,!1,Ch),Aa(c,d))}function Fj(a,b,c){var d=this.cache,e=c.allocateTextureUnit();d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=e);c.safeSetTexture2D(b||Dh,e)}function Gj(a,b,c){var d=this.cache,e=c.allocateTextureUnit();d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=e);c.setTexture2DArray(b||
|
|
|
+Hj,e)}function Ij(a,b,c){var d=this.cache,e=c.allocateTextureUnit();d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=e);c.setTexture3D(b||Jj,e)}function Kj(a,b,c){var d=this.cache,e=c.allocateTextureUnit();d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=e);c.safeSetTextureCube(b||Eh,e)}function Lj(a,b){var c=this.cache;c[0]!==b&&(a.uniform1i(this.addr,b),c[0]=b)}function Mj(a,b){var c=this.cache;Pa(c,b)||(a.uniform2iv(this.addr,b),Aa(c,b))}function Nj(a,b){var c=this.cache;Pa(c,b)||(a.uniform3iv(this.addr,b),Aa(c,
|
|
|
+b))}function Oj(a,b){var c=this.cache;Pa(c,b)||(a.uniform4iv(this.addr,b),Aa(c,b))}function Pj(a,b){var c=this.cache;c[0]!==b&&(a.uniform1ui(this.addr,b),c[0]=b)}function Qj(a){switch(a){case 5126:return yj;case 35664:return zj;case 35665:return Aj;case 35666:return Bj;case 35674:return Cj;case 35675:return Dj;case 35676:return Ej;case 5124:case 35670:return Lj;case 35667:case 35671:return Mj;case 35668:case 35672:return Nj;case 35669:case 35673:return Oj;case 5125:return Pj;case 35678:case 36198:case 36298:case 36306:case 35682:return Fj;
|
|
|
case 35679:case 36299:case 36307:return Ij;case 35680:case 36300:case 36308:case 36293:return Kj;case 36289:case 36303:case 36311:case 36292:return Gj}}function Rj(a,b){a.uniform1fv(this.addr,b)}function Sj(a,b){a.uniform1iv(this.addr,b)}function Tj(a,b){a.uniform2iv(this.addr,b)}function Uj(a,b){a.uniform3iv(this.addr,b)}function Vj(a,b){a.uniform4iv(this.addr,b)}function Wj(a,b){b=Ic(b,this.size,2);a.uniform2fv(this.addr,b)}function Xj(a,b){b=Ic(b,this.size,3);a.uniform3fv(this.addr,b)}function Yj(a,
|
|
|
b){b=Ic(b,this.size,4);a.uniform4fv(this.addr,b)}function Zj(a,b){b=Ic(b,this.size,4);a.uniformMatrix2fv(this.addr,!1,b)}function ak(a,b){b=Ic(b,this.size,9);a.uniformMatrix3fv(this.addr,!1,b)}function bk(a,b){b=Ic(b,this.size,16);a.uniformMatrix4fv(this.addr,!1,b)}function ck(a,b,c){var d=b.length,e=yh(c,d);a.uniform1iv(this.addr,e);for(a=0;a!==d;++a)c.safeSetTexture2D(b[a]||Dh,e[a])}function dk(a,b,c){var d=b.length,e=yh(c,d);a.uniform1iv(this.addr,e);for(a=0;a!==d;++a)c.safeSetTextureCube(b[a]||
|
|
|
Eh,e[a])}function ek(a){switch(a){case 5126:return Rj;case 35664:return Wj;case 35665:return Xj;case 35666:return Yj;case 35674:return Zj;case 35675:return ak;case 35676:return bk;case 5124:case 35670:return Sj;case 35667:case 35671:return Tj;case 35668:case 35672:return Uj;case 35669:case 35673:return Vj;case 35678:case 36198:case 36298:case 36306:case 35682:return ck;case 35680:case 36300:case 36308:case 36293:return dk}}function fk(a,b,c){this.id=a;this.addr=c;this.cache=[];this.setValue=Qj(b.type)}
|
|
@@ -121,7 +121,7 @@ c.target;c.removeEventListener("dispose",a);b.delete(c)}var b=new WeakMap;return
|
|
|
skinning:b}),p[c]=d);return d}function e(a,b,c){c=a<<0|b<<1|c<<2;var d=k[c];void 0===d&&(d=new Fb({morphTargets:a,skinning:b}),k[c]=d);return d}function f(b,c,f,g,h,l,m){var q=d,p=b.customDepthMaterial;!0===g.isPointLight&&(q=e,p=b.customDistanceMaterial);void 0===p?(p=!1,!0===f.morphTargets&&(p=c.morphAttributes&&c.morphAttributes.position&&0<c.morphAttributes.position.length),c=!1,!0===b.isSkinnedMesh&&(!0===f.skinning?c=!0:console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",
|
|
|
b)),b=q(p,c,!0===b.isInstancedMesh)):b=p;a.localClippingEnabled&&!0===f.clipShadows&&0!==f.clippingPlanes.length&&(p=b.uuid,q=f.uuid,c=r[p],void 0===c&&(c={},r[p]=c),p=c[q],void 0===p&&(p=b.clone(),c[q]=p),b=p);b.visible=f.visible;b.wireframe=f.wireframe;b.side=3===m?null!==f.shadowSide?f.shadowSide:f.side:null!==f.shadowSide?f.shadowSide:t[f.side];b.clipShadows=f.clipShadows;b.clippingPlanes=f.clippingPlanes;b.clipIntersection=f.clipIntersection;b.wireframeLinewidth=f.wireframeLinewidth;b.linewidth=
|
|
|
f.linewidth;!0===g.isPointLight&&!0===b.isMeshDistanceMaterial&&(b.referencePosition.setFromMatrixPosition(g.matrixWorld),b.nearDistance=h,b.farDistance=l);return b}function g(c,d,e,l,m){if(!1!==c.visible){if(c.layers.test(d.layers)&&(c.isMesh||c.isLine||c.isPoints)&&(c.castShadow||c.receiveShadow&&3===m)&&(!c.frustumCulled||h.intersectsObject(c))){c.modelViewMatrix.multiplyMatrices(e.matrixWorldInverse,c.matrixWorld);var q=b.update(c),p=c.material;if(Array.isArray(p))for(var k=q.groups,A=0,r=k.length;A<
|
|
|
-r;A++){var t=k[A],v=p[t.materialIndex];v&&v.visible&&(v=f(c,q,v,l,e.near,e.far,m),a.renderBufferDirect(e,null,q,v,c,t))}else p.visible&&(p=f(c,q,p,l,e.near,e.far,m),a.renderBufferDirect(e,null,q,p,c,null))}c=c.children;q=0;for(p=c.length;q<p;q++)g(c[q],d,e,l,m)}}var h=new Fc,l=new u,m=new u,q=new ba,p=[],k=[],r={},t={0:1,1:0,2:2},v=new Aa({defines:{SAMPLE_RATE:.25,HALF_SAMPLE_RATE:.125},uniforms:{shadow_pass:{value:null},resolution:{value:new u},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",
|
|
|
+r;A++){var t=k[A],v=p[t.materialIndex];v&&v.visible&&(v=f(c,q,v,l,e.near,e.far,m),a.renderBufferDirect(e,null,q,v,c,t))}else p.visible&&(p=f(c,q,p,l,e.near,e.far,m),a.renderBufferDirect(e,null,q,p,c,null))}c=c.children;q=0;for(p=c.length;q<p;q++)g(c[q],d,e,l,m)}}var h=new Fc,l=new u,m=new u,q=new ba,p=[],k=[],r={},t={0:1,1:0,2:2},v=new Ba({defines:{SAMPLE_RATE:.25,HALF_SAMPLE_RATE:.125},uniforms:{shadow_pass:{value:null},resolution:{value:new u},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",
|
|
|
fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n float mean = 0.0;\n float squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n #ifdef HORIZONAL_PASS\n vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n mean += distribution.x;\n squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n #else\n float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n mean += depth;\n squared_mean += depth * depth;\n #endif\n }\n mean = mean * HALF_SAMPLE_RATE;\n squared_mean = squared_mean * HALF_SAMPLE_RATE;\n float std_dev = sqrt( squared_mean - mean * mean );\n gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),
|
|
|
n=v.clone();n.defines.HORIZONAL_PASS=1;var B=new H;B.setAttribute("position",new G(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var w=new Z(B,v),ca=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.render=function(d,e,f){if(!1!==ca.enabled&&(!1!==ca.autoUpdate||!1!==ca.needsUpdate)&&0!==d.length){var p=a.getRenderTarget(),k=a.getActiveCubeFace(),A=a.getActiveMipmapLevel(),r=a.state;r.setBlending(0);r.buffers.color.setClear(1,1,1,1);r.buffers.depth.setTest(!0);r.setScissorTest(!1);
|
|
|
for(var t=0,y=d.length;t<y;t++){var B=d[t],z=B.shadow;if(void 0===z)console.warn("THREE.WebGLShadowMap:",B,"has no shadow.");else{l.copy(z.mapSize);var u=z.getFrameExtents();l.multiply(u);m.copy(z.mapSize);if(l.x>c||l.y>c)l.x>c&&(m.x=Math.floor(c/u.x),l.x=m.x*u.x,z.mapSize.x=m.x),l.y>c&&(m.y=Math.floor(c/u.y),l.y=m.y*u.y,z.mapSize.y=m.y);null!==z.map||z.isPointLightShadow||3!==this.type||(u={minFilter:1006,magFilter:1006,format:1023},z.map=new Ea(l.x,l.y,u),z.map.texture.name=B.name+".shadowMap",
|
|
@@ -191,7 +191,7 @@ e.farDistance;else if(e.isMeshNormalMaterial)b(a,e),e.bumpMap&&(a.bumpMap.value=
|
|
|
e.opacity,e.isLineDashedMaterial&&(a.dashSize.value=e.dashSize,a.totalSize.value=e.dashSize+e.gapSize,a.scale.value=e.scale);else if(e.isPointsMaterial){a.diffuse.value.copy(e.color);a.opacity.value=e.opacity;a.size.value=e.size*g;a.scale.value=.5*h;e.map&&(a.map.value=e.map);e.alphaMap&&(a.alphaMap.value=e.alphaMap);if(e.map)var d=e.map;else e.alphaMap&&(d=e.alphaMap);void 0!==d&&(!0===d.matrixAutoUpdate&&d.updateMatrix(),a.uvTransform.value.copy(d.matrix))}else if(e.isSpriteMaterial){a.diffuse.value.copy(e.color);
|
|
|
a.opacity.value=e.opacity;a.rotation.value=e.rotation;e.map&&(a.map.value=e.map);e.alphaMap&&(a.alphaMap.value=e.alphaMap);if(e.map)var m=e.map;else e.alphaMap&&(m=e.alphaMap);void 0!==m&&(!0===m.matrixAutoUpdate&&m.updateMatrix(),a.uvTransform.value.copy(m.matrix))}else e.isShadowMaterial?(a.color.value.copy(e.color),a.opacity.value=e.opacity):e.isShaderMaterial&&(e.uniformsNeedUpdate=!1)}}}function Kd(a){function b(a,b){for(var c=0;c<a.length;c++){var d=r.getContext(a[c],b);if(null!==d)return d}return null}
|
|
|
function c(){na=new qj(M);Ga=new oj(M,na,a);!1===Ga.isWebGL2&&(na.get("WEBGL_depth_texture"),na.get("OES_texture_float"),na.get("OES_texture_half_float"),na.get("OES_texture_half_float_linear"),na.get("OES_standard_derivatives"),na.get("OES_element_index_uint"),na.get("OES_vertex_array_object"),na.get("ANGLE_instanced_arrays"));na.get("OES_texture_float_linear");qa=new Uh(M,na,Ga);oa=new Ak(M,na,Ga);oa.scissor(W.copy(ea).multiplyScalar(R).floor());oa.viewport(V.copy(X).multiplyScalar(R).floor());
|
|
|
-Y=new tj(M);Ha=new qk;T=new Bk(M,na,oa,Ha,Ga,qa,Y);ra=new kj(M,Ga);ia=new mj(M,na,ra,Ga);xa=new rj(M,ra,Y,ia);sa=new xj(M,xa,ra,Y);Aa=new wj(M);ta=new pk(Q,na,Ga,ia);za=new Ck(Ha);ya=new tk;va=new zk;pa=new lj(Q,oa,sa,ca);Ca=new nj(M,na,Y,Ga);Da=new sj(M,na,Y,Ga);Y.programs=ta.programs;Q.capabilities=Ga;Q.extensions=na;Q.properties=Ha;Q.renderLists=ya;Q.state=oa;Q.info=Y}function d(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");C=!0}function e(){console.log("THREE.WebGLRenderer: Context Restored.");
|
|
|
+Y=new tj(M);Ha=new qk;T=new Bk(M,na,oa,Ha,Ga,qa,Y);ra=new kj(M,Ga);ia=new mj(M,na,ra,Ga);xa=new rj(M,ra,Y,ia);sa=new xj(M,xa,ra,Y);Ba=new wj(M);ta=new pk(Q,na,Ga,ia);za=new Ck(Ha);ya=new tk;va=new zk;pa=new lj(Q,oa,sa,ca);Ca=new nj(M,na,Y,Ga);Da=new sj(M,na,Y,Ga);Y.programs=ta.programs;Q.capabilities=Ga;Q.extensions=na;Q.properties=Ha;Q.renderLists=ya;Q.state=oa;Q.info=Y}function d(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");C=!0}function e(){console.log("THREE.WebGLRenderer: Context Restored.");
|
|
|
C=!1;c()}function f(a){a=a.target;a.removeEventListener("dispose",f);g(a);Ha.remove(a)}function g(a){var b=Ha.get(a).program;a.program=void 0;void 0!==b&&ta.releaseProgram(b)}function h(a,b){a.render(function(a){Q.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)x.pushLight(a),a.castShadow&&x.pushShadow(a);else if(a.isSprite){if(!a.frustumCulled||la.intersectsSprite(a)){d&&
|
|
|
Gb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Jd);var e=sa.update(a),f=a.material;f.visible&&P.push(a,e,f,c,Gb.z,null)}}else if(a.isImmediateRenderObject)d&&Gb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Jd),P.push(a,null,a.material,c,Gb.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&a.skeleton.frame!==Y.render.frame&&(a.skeleton.update(),a.skeleton.frame=Y.render.frame),!a.frustumCulled||la.intersectsObject(a))if(d&&Gb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Jd),
|
|
|
e=sa.update(a),f=a.material,Array.isArray(f))for(var g=e.groups,h=0,m=g.length;h<m;h++){var q=g[h],p=f[q.materialIndex];p&&p.visible&&P.push(a,e,p,c,Gb.z,q)}else f.visible&&P.push(a,e,f,c,Gb.z,null);a=a.children;e=0;for(f=a.length;e<f;e++)l(a[e],b,c,d)}}function m(a,b,c){for(var d=!0===b.isScene?b.overrideMaterial:null,e=0,f=a.length;e<f;e++){var g=a[e],h=g.object,l=g.geometry,m=null===d?g.material:d;g=g.group;if(c.isArrayCamera){Ke=c;for(var p=c.cameras,k=0,r=p.length;k<r;k++){var A=p[k];h.layers.test(A.layers)&&
|
|
@@ -209,138 +209,139 @@ za.refreshMaterialUniforms(l,c,f,R,da),void 0!==l.ltc_1&&(l.ltc_1.value=D.LTC_1)
|
|
|
"canvas"),t=void 0!==a.context?a.context:null,v=void 0!==a.alpha?a.alpha:!1,y=void 0!==a.depth?a.depth:!0,B=void 0!==a.stencil?a.stencil:!0,w=void 0!==a.antialias?a.antialias:!1,ca=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,F=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,N=void 0!==a.powerPreference?a.powerPreference:"default",z=void 0!==a.failIfMajorPerformanceCaveat?a.failIfMajorPerformanceCaveat:!1,P=null,x=null;this.domElement=r;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.toneMapping=0;this.toneMappingExposure=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var Q=this,C=!1,E=null,H=0,J=0,G=null,K=null,I=-1,L=null,Ke=null,V=new ba,W=new ba,Z=null,aa=r.width,da=r.height,R=1,fa=null,ja=null,X=new ba(0,0,aa,da),ea=new ba(0,0,aa,da),ka=!1,la=new Fc,S=new pj,ma=
|
|
|
!1,kg=!1,Jd=new U,Gb=new n,lg={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0},M=t;try{t={alpha:v,depth:y,stencil:B,antialias:w,premultipliedAlpha:ca,preserveDrawingBuffer:F,powerPreference:N,failIfMajorPerformanceCaveat:z};r.addEventListener("webglcontextlost",d,!1);r.addEventListener("webglcontextrestored",e,!1);if(null===M&&(v=["webgl2","webgl","experimental-webgl"],!0===Q.isWebGL1Renderer&&v.shift(),M=b(v,t),null===M)){if(b(v))throw Error("Error creating WebGL context with your selected attributes.");
|
|
|
-throw Error("Error creating WebGL context.");}void 0===M.getShaderPrecisionFormat&&(M.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Wh){throw console.error("THREE.WebGLRenderer: "+Wh.message),Wh;}var na,Ga,oa,Y,Ha,T,ra,xa,sa,ta,za,ya,va,pa,Aa,Ca,Da,qa,ia;c();var wa=new Vh(Q,M);this.xr=wa;var Fa=new Th(Q,sa,Ga.maxTextureSize);this.shadowMap=Fa;this.getContext=function(){return M};this.getContextAttributes=function(){return M.getContextAttributes()};this.forceContextLoss=
|
|
|
+throw Error("Error creating WebGL context.");}void 0===M.getShaderPrecisionFormat&&(M.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Wh){throw console.error("THREE.WebGLRenderer: "+Wh.message),Wh;}var na,Ga,oa,Y,Ha,T,ra,xa,sa,ta,za,ya,va,pa,Ba,Ca,Da,qa,ia;c();var wa=new Vh(Q,M);this.xr=wa;var Fa=new Th(Q,sa,Ga.maxTextureSize);this.shadowMap=Fa;this.getContext=function(){return M};this.getContextAttributes=function(){return M.getContextAttributes()};this.forceContextLoss=
|
|
|
function(){var a=na.get("WEBGL_lose_context");a&&a.loseContext()};this.forceContextRestore=function(){var a=na.get("WEBGL_lose_context");a&&a.restoreContext()};this.getPixelRatio=function(){return R};this.setPixelRatio=function(a){void 0!==a&&(R=a,this.setSize(aa,da,!1))};this.getSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),a=new u);return a.set(aa,da)};this.setSize=function(a,b,c){wa.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):
|
|
|
(aa=a,da=b,r.width=Math.floor(a*R),r.height=Math.floor(b*R),!1!==c&&(r.style.width=a+"px",r.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 u);return a.set(aa*R,da*R).floor()};this.setDrawingBufferSize=function(a,b,c){aa=a;da=b;R=c;r.width=Math.floor(a*c);r.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 ba);return a.copy(V)};this.getViewport=function(a){return a.copy(X)};this.setViewport=function(a,b,c,d){a.isVector4?X.set(a.x,a.y,a.z,a.w):X.set(a,b,c,d);oa.viewport(V.copy(X).multiplyScalar(R).floor())};this.getScissor=function(a){return a.copy(ea)};this.setScissor=function(a,b,c,d){a.isVector4?ea.set(a.x,a.y,a.z,a.w):ea.set(a,b,c,d);oa.scissor(W.copy(ea).multiplyScalar(R).floor())};this.getScissorTest=
|
|
|
function(){return ka};this.setScissorTest=function(a){oa.setScissorTest(ka=a)};this.setOpaqueSort=function(a){fa=a};this.setTransparentSort=function(a){ja=a};this.getClearColor=function(){return pa.getClearColor()};this.setClearColor=function(){pa.setClearColor.apply(pa,arguments)};this.getClearAlpha=function(){return pa.getClearAlpha()};this.setClearAlpha=function(){pa.setClearAlpha.apply(pa,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;M.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(){r.removeEventListener("webglcontextlost",d,!1);r.removeEventListener("webglcontextrestored",e,!1);ya.dispose();va.dispose();Ha.dispose();sa.dispose();ia.dispose();wa.dispose();Ba.stop()};this.renderBufferImmediate=function(a,b){ia.initAttributes();var c=Ha.get(a);a.hasPositions&&!c.position&&(c.position=
|
|
|
+c||c)d|=1024;M.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(){r.removeEventListener("webglcontextlost",d,!1);r.removeEventListener("webglcontextrestored",e,!1);ya.dispose();va.dispose();Ha.dispose();sa.dispose();ia.dispose();wa.dispose();Aa.stop()};this.renderBufferImmediate=function(a,b){ia.initAttributes();var c=Ha.get(a);a.hasPositions&&!c.position&&(c.position=
|
|
|
M.createBuffer());a.hasNormals&&!c.normal&&(c.normal=M.createBuffer());a.hasUvs&&!c.uv&&(c.uv=M.createBuffer());a.hasColors&&!c.color&&(c.color=M.createBuffer());b=b.getAttributes();a.hasPositions&&(M.bindBuffer(34962,c.position),M.bufferData(34962,a.positionArray,35048),ia.enableAttribute(b.position),M.vertexAttribPointer(b.position,3,5126,!1,0,0));a.hasNormals&&(M.bindBuffer(34962,c.normal),M.bufferData(34962,a.normalArray,35048),ia.enableAttribute(b.normal),M.vertexAttribPointer(b.normal,3,5126,
|
|
|
!1,0,0));a.hasUvs&&(M.bindBuffer(34962,c.uv),M.bufferData(34962,a.uvArray,35048),ia.enableAttribute(b.uv),M.vertexAttribPointer(b.uv,2,5126,!1,0,0));a.hasColors&&(M.bindBuffer(34962,c.color),M.bufferData(34962,a.colorArray,35048),ia.enableAttribute(b.color),M.vertexAttribPointer(b.color,3,5126,!1,0,0));ia.disableUnusedAttributes();M.drawArrays(4,0,a.count);a.count=0};this.renderBufferDirect=function(a,b,c,d,e,f){null===b&&(b=lg);var g=e.isMesh&&0>e.matrixWorld.determinant();a=k(a,b,d,e);oa.setMaterial(d,
|
|
|
-g);g=c.index;b=c.attributes.position;if(null===g){if(void 0===b||0===b.count)return}else if(0===g.count)return;var h=1;!0===d.wireframe&&(g=xa.getWireframeAttribute(c),h=2);(d.morphTargets||d.morphNormals)&&Aa.update(e,c,d,a);ia.setup(e,d,a,c,g);a=Ca;if(null!==g){var l=ra.get(g);a=Da;a.setIndex(l)}var m=c.drawRange.start*h,q=null!==f?f.start*h:0;l=Math.max(m,q);f=Math.max(0,Math.min(null!==g?g.count:b.count,m+c.drawRange.count*h,q+(null!==f?f.count*h:Infinity))-1-l+1);0!==f&&(e.isMesh?!0===d.wireframe?
|
|
|
+g);g=c.index;b=c.attributes.position;if(null===g){if(void 0===b||0===b.count)return}else if(0===g.count)return;var h=1;!0===d.wireframe&&(g=xa.getWireframeAttribute(c),h=2);(d.morphTargets||d.morphNormals)&&Ba.update(e,c,d,a);ia.setup(e,d,a,c,g);a=Ca;if(null!==g){var l=ra.get(g);a=Da;a.setIndex(l)}var m=c.drawRange.start*h,q=null!==f?f.start*h:0;l=Math.max(m,q);f=Math.max(0,Math.min(null!==g?g.count:b.count,m+c.drawRange.count*h,q+(null!==f?f.count*h:Infinity))-1-l+1);0!==f&&(e.isMesh?!0===d.wireframe?
|
|
|
(oa.setLineWidth(d.wireframeLinewidth*(null===G?R:1)),a.setMode(1)):a.setMode(4):e.isLine?(d=d.linewidth,void 0===d&&(d=1),oa.setLineWidth(d*(null===G?R:1)),e.isLineSegments?a.setMode(1):e.isLineLoop?a.setMode(2):a.setMode(3)):e.isPoints?a.setMode(0):e.isSprite&&a.setMode(4),e.isInstancedMesh?a.renderInstances(c,l,f,e.count):c.isInstancedBufferGeometry?a.renderInstances(c,l,f,Math.min(c.instanceCount,c._maxInstanceCount)):a.render(l,f))};this.compile=function(a,b){x=va.get(a,b);x.init();a.traverse(function(a){a.isLight&&
|
|
|
-(x.pushLight(a),a.castShadow&&x.pushShadow(a))});x.setupLights(b);var c=new WeakMap;a.traverse(function(b){var d=b.material;if(d)if(Array.isArray(d))for(var e=0;e<d.length;e++){var f=d[e];!1===c.has(f)&&(p(f,a,b),c.set(f))}else!1===c.has(d)&&(p(d,a,b),c.set(d))})};var Ea=null,Ba=new wh;Ba.setAnimationLoop(function(a){wa.isPresenting||Ea&&Ea(a)});"undefined"!==typeof window&&Ba.setContext(window);this.setAnimationLoop=function(a){Ea=a;wa.setAnimationLoop(a);Ba.start()};this.render=function(a,b,c,d){if(void 0!==
|
|
|
-c){console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead.");var e=c}if(void 0!==d){console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead.");var f=d}if(void 0!==b&&!0!==b.isCamera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else if(!0!==C){ia.resetDefaultState();I=-1;L=null;!0===a.autoUpdate&&a.updateMatrixWorld();null===b.parent&&b.updateMatrixWorld();
|
|
|
-!0===wa.enabled&&!0===wa.isPresenting&&(b=wa.getCamera(b));if(!0===a.isScene)a.onBeforeRender(Q,a,b,e||G);x=va.get(a,b);x.init();Jd.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);la.setFromProjectionMatrix(Jd);kg=this.localClippingEnabled;ma=S.init(this.clippingPlanes,kg,b);P=ya.get(a,b);P.init();l(a,b,0,Q.sortObjects);P.finish();!0===Q.sortObjects&&P.sort(fa,ja);!0===ma&&S.beginShadows();Fa.render(x.state.shadowsArray,a,b);x.setupLights(b);!0===ma&&S.endShadows();!0===this.info.autoReset&&
|
|
|
-this.info.reset();void 0!==e&&this.setRenderTarget(e);pa.render(P,a,b,f);c=P.opaque;d=P.transparent;0<c.length&&m(c,a,b);0<d.length&&m(d,a,b);if(!0===a.isScene)a.onAfterRender(Q,a,b);null!==G&&(T.updateRenderTargetMipmap(G),T.updateMultisampleRenderTarget(G));oa.buffers.depth.setTest(!0);oa.buffers.depth.setMask(!0);oa.buffers.color.setMask(!0);oa.setPolygonOffset(!1);x=P=null}};this.setFramebuffer=function(a){E!==a&&null===G&&M.bindFramebuffer(36160,a);E=a};this.getActiveCubeFace=function(){return H};
|
|
|
-this.getActiveMipmapLevel=function(){return J};this.getRenderTarget=function(){return G};this.setRenderTarget=function(a,b,c){G=a;H=b;J=c;a&&void 0===Ha.get(a).__webglFramebuffer&&T.setupRenderTarget(a);var d=E,e=!1;a?(d=Ha.get(a).__webglFramebuffer,a.isWebGLCubeRenderTarget?(d=d[b||0],e=!0):d=a.isWebGLMultisampleRenderTarget?Ha.get(a).__webglMultisampledFramebuffer:d,V.copy(a.viewport),W.copy(a.scissor),Z=a.scissorTest):(V.copy(X).multiplyScalar(R).floor(),W.copy(ea).multiplyScalar(R).floor(),Z=
|
|
|
-ka);K!==d&&(M.bindFramebuffer(36160,d),K=d);oa.viewport(V);oa.scissor(W);oa.setScissorTest(Z);e&&(a=Ha.get(a.texture),M.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=Ha.get(a).__webglFramebuffer;a.isWebGLCubeRenderTarget&&void 0!==g&&(h=h[g]);if(h){g=!1;h!==K&&(M.bindFramebuffer(36160,h),g=!0);try{var l=a.texture,m=l.format,q=l.type;1023!==m&&qa.convert(m)!==M.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):
|
|
|
-1009===q||qa.convert(q)===M.getParameter(35738)||1015===q&&(Ga.isWebGL2||na.get("OES_texture_float")||na.get("WEBGL_color_buffer_float"))||1016===q&&(Ga.isWebGL2?na.get("EXT_color_buffer_float"):na.get("EXT_color_buffer_half_float"))?36053===M.checkFramebufferStatus(36160)?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&M.readPixels(b,c,d,e,qa.convert(m),qa.convert(q),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&&
|
|
|
-M.bindFramebuffer(36160,K)}}}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=qa.convert(b.format);T.setTexture2D(b,0);M.copyTexImage2D(3553,c,f,a.x,a.y,e,d,0);oa.unbindTexture()};this.copyTextureToTexture=function(a,b,c,d){void 0===d&&(d=0);var e=b.image.width,f=b.image.height,g=qa.convert(c.format),
|
|
|
-h=qa.convert(c.type);T.setTexture2D(c,0);b.isDataTexture?M.texSubImage2D(3553,d,a.x,a.y,e,f,g,h,b.image.data):b.isCompressedTexture?M.compressedTexSubImage2D(3553,d,a.x,a.y,b.mipmaps[0].width,b.mipmaps[0].height,g,b.mipmaps[0].data):M.texSubImage2D(3553,d,a.x,a.y,g,h,b.image);0===d&&c.generateMipmaps&&M.generateMipmap(3553);oa.unbindTexture()};this.initTexture=function(a){T.setTexture2D(a,0);oa.unbindTexture()};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",
|
|
|
-{detail:this}))}function mg(a){Kd.call(this,a)}function Ne(a,b){this.name="";this.color=new E(a);this.density=void 0!==b?b:2.5E-4}function Oe(a,b,c){this.name="";this.color=new E(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3}function Ia(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;this.uuid=O.generateUUID()}function Hb(a,b,c,d){this.name="";this.data=a;this.itemSize=b;this.offset=c;this.normalized=!0===
|
|
|
-d}function Ib(a){K.call(this);this.type="SpriteMaterial";this.color=new E(16777215);this.alphaMap=this.map=null;this.rotation=0;this.transparent=this.sizeAttenuation=!0;this.setValues(a)}function Ld(a){x.call(this);this.type="Sprite";if(void 0===Kc){Kc=new H;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 Ia(b,5);Kc.setIndex([0,1,2,0,2,3]);Kc.setAttribute("position",new Hb(b,3,0,!1));Kc.setAttribute("uv",new Hb(b,2,3,!1))}this.geometry=Kc;this.material=void 0!==
|
|
|
-a?a:new Ib;this.center=new u(.5,.5)}function Pe(a,b,c,d,e,f){Lc.subVectors(a,c).addScalar(.5).multiply(d);void 0!==e?(Md.x=f*Lc.x-e*Lc.y,Md.y=e*Lc.x+f*Lc.y):Md.copy(Lc);a.copy(b);a.x+=Md.x;a.y+=Md.y;a.applyMatrix4(Xh)}function Nd(){x.call(this);this._currentLevel=0;this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}});this.autoUpdate=!0}function Qe(a,b){a&&a.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");
|
|
|
-Z.call(this,a,b);this.type="SkinnedMesh";this.bindMode="attached";this.bindMatrix=new U;this.bindMatrixInverse=new U}function Re(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 U)}function ng(){x.call(this);
|
|
|
-this.type="Bone"}function Se(a,b,c){Z.call(this,a,b);this.instanceMatrix=new G(new Float32Array(16*c),16);this.count=c;this.frustumCulled=!1}function ja(a){K.call(this);this.type="LineBasicMaterial";this.color=new E(16777215);this.linewidth=1;this.linejoin=this.linecap="round";this.morphTargets=!1;this.setValues(a)}function Ja(a,b,c){1===c&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead.");x.call(this);this.type="Line";this.geometry=void 0!==
|
|
|
-a?a:new H;this.material=void 0!==b?b:new ja;this.updateMorphTargets()}function ea(a,b){Ja.call(this,a,b);this.type="LineSegments"}function Te(a,b){Ja.call(this,a,b);this.type="LineLoop"}function Va(a){K.call(this);this.type="PointsMaterial";this.color=new E(16777215);this.alphaMap=this.map=null;this.size=1;this.sizeAttenuation=!0;this.morphTargets=!1;this.setValues(a)}function Mc(a,b){x.call(this);this.type="Points";this.geometry=void 0!==a?a:new H;this.material=void 0!==b?b:new Va;this.updateMorphTargets()}
|
|
|
-function og(a,b,c,d,e,f,g){var h=pg.distanceSqToPoint(a);h<c&&(c=new n,pg.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 qg(a,b,c,d,e,f,g,h,l){W.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 Nc(a,b,c,d,e,f,g,h,l,m,q,p){W.call(this,null,f,g,h,l,m,d,e,q,
|
|
|
-p);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=this.flipY=!1}function Od(a,b,c,d,e,f,g,h,l){W.call(this,a,b,c,d,e,f,g,h,l);this.needsUpdate=!0}function Pd(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);W.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 Oc(a){H.call(this);this.type="WireframeGeometry";var b=[],c=[0,0],d={},e=["a","b","c"];if(a&&a.isGeometry){for(var f=a.faces,g=0,h=f.length;g<h;g++)for(var l=f[g],m=0;3>m;m++){var q=l[e[m]],p=l[e[(m+1)%3]];c[0]=Math.min(q,p);c[1]=Math.max(q,p);q=c[0]+","+c[1];void 0===d[q]&&(d[q]={index1:c[0],index2:c[1]})}for(var k in d)c=d[k],f=a.vertices[c.index1],b.push(f.x,f.y,f.z),f=a.vertices[c.index2],b.push(f.x,f.y,f.z)}else if(a&&a.isBufferGeometry)if(k=
|
|
|
-new n,null!==a.index){e=a.attributes.position;g=a.index;a=a.groups;0===a.length&&(a=[{start:0,count:g.count,materialIndex:0}]);h=0;for(l=a.length;h<l;++h)for(q=a[h],m=p=q.start,q=p+q.count;m<q;m+=3)for(p=0;3>p;p++){var r=g.getX(m+p),t=g.getX(m+(p+1)%3);c[0]=Math.min(r,t);c[1]=Math.max(r,t);r=c[0]+","+c[1];void 0===d[r]&&(d[r]={index1:c[0],index2:c[1]})}for(f in d)c=d[f],k.fromBufferAttribute(e,c.index1),b.push(k.x,k.y,k.z),k.fromBufferAttribute(e,c.index2),b.push(k.x,k.y,k.z)}else for(d=a.attributes.position,
|
|
|
-c=0,f=d.count/3;c<f;c++)for(a=0;3>a;a++)k.fromBufferAttribute(d,3*c+a),b.push(k.x,k.y,k.z),k.fromBufferAttribute(d,3*c+(a+1)%3),b.push(k.x,k.y,k.z);this.setAttribute("position",new C(b,3))}function Qd(a,b,c){I.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new Pc(a,b,c));this.mergeVertices()}function Pc(a,b,c){H.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,q=new n,k=new n;3>a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");for(var A=b+1,r=0;r<=c;r++)for(var t=r/c,v=0;v<=b;v++){var y=v/b;a(y,t,l);e.push(l.x,l.y,l.z);0<=y-1E-5?(a(y-1E-5,t,m),q.subVectors(l,m)):(a(y+1E-5,t,m),q.subVectors(m,l));0<=t-1E-5?(a(y,t-1E-5,m),k.subVectors(l,m)):(a(y,t+1E-5,m),k.subVectors(m,l));h.crossVectors(q,k).normalize();f.push(h.x,h.y,h.z);g.push(y,t)}for(a=0;a<c;a++)for(h=0;h<b;h++)l=a*A+h+1,m=(a+
|
|
|
-1)*A+h+1,q=(a+1)*A+h,d.push(a*A+h,l,q),d.push(l,m,q);this.setIndex(d);this.setAttribute("position",new C(e,3));this.setAttribute("normal",new C(f,3));this.setAttribute("uv",new C(g,2))}function Rd(a,b,c,d){I.call(this);this.type="PolyhedronGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};this.fromBufferGeometry(new ia(a,b,c,d));this.mergeVertices()}function ia(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)}H.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);for(var l=c,m=d,k=g,B=Math.pow(2,a),w=[],u=0;u<=B;u++){w[u]=[];for(var F=l.clone().lerp(k,u/B),N=m.clone().lerp(k,u/B),z=B-u,x=0;x<=z;x++)w[u][x]=0===x&&u===B?F:F.clone().lerp(N,x/z)}for(l=0;l<B;l++)for(m=
|
|
|
-0;m<2*(B-l)-1;m++)k=Math.floor(m/2),0===m%2?(e(w[l][k+1]),e(w[l+1][k]),e(w[l][k])):(e(w[l][k+1]),e(w[l+1][k+1]),e(w[l+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 u,f=new u,k=new u,y=0,B=0;y<h.length;y+=9,B+=6){a.set(h[y+0],h[y+1],h[y+2]);b.set(h[y+3],h[y+4],h[y+5]);c.set(h[y+6],h[y+7],h[y+8]);e.set(l[B+0],l[B+1]);f.set(l[B+2],l[B+3]);k.set(l[B+4],l[B+5]);d.copy(a).add(b).add(c).divideScalar(3);var w=Math.atan2(d.z,-d.x);g(e,B+0,a,w);g(f,B+2,b,w);g(k,B+4,c,w)}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 C(h,3));
|
|
|
-this.setAttribute("normal",new C(h.slice(),3));this.setAttribute("uv",new C(l,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Sd(a,b){I.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Qc(a,b));this.mergeVertices()}function Qc(a,b){ia.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 Td(a,b){I.call(this);this.type=
|
|
|
-"OctahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new bc(a,b));this.mergeVertices()}function bc(a,b){ia.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 Ud(a,b){I.call(this);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Rc(a,b));this.mergeVertices()}function Rc(a,b){var c=(1+Math.sqrt(5))/
|
|
|
-2;ia.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 Vd(a,b){I.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Sc(a,b));this.mergeVertices()}function Sc(a,b){var c=(1+Math.sqrt(5))/
|
|
|
-2,d=1/c;ia.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 Wd(a,b,c,d,e,f){I.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 cc(a,b,c,d,e);this.tangents=a.tangents;this.normals=a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function cc(a,b,c,d,e){function f(e){q=a.getPointAt(e/b,q);var f=g.normals[e];e=g.binormals[e];for(var m=0;m<=d;m++){var p=m/d*Math.PI*
|
|
|
-2,r=Math.sin(p);p=-Math.cos(p);l.x=p*f.x+r*e.x;l.y=p*f.y+r*e.y;l.z=p*f.z+r*e.z;l.normalize();A.push(l.x,l.y,l.z);h.x=q.x+c*l.x;h.y=q.y+c*l.y;h.z=q.z+c*l.z;k.push(h.x,h.y,h.z)}}H.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 u,q=new n,k=[],A=[],r=[],t=[];(function(){for(var a=
|
|
|
-0;a<b;a++)f(a);f(!1===e?b:0);for(a=0;a<=b;a++)for(var c=0;c<=d;c++)m.x=a/b,m.y=c/d,r.push(m.x,m.y);for(a=1;a<=b;a++)for(c=1;c<=d;c++){var g=(d+1)*a+(c-1),h=(d+1)*a+c,l=(d+1)*(a-1)+c;t.push((d+1)*(a-1)+(c-1),g,l);t.push(g,h,l)}})();this.setIndex(t);this.setAttribute("position",new C(k,3));this.setAttribute("normal",new C(A,3));this.setAttribute("uv",new C(r,2))}function Xd(a,b,c,d,e,f,g){I.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 Tc(a,b,c,d,e,f));this.mergeVertices()}function Tc(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}H.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;for(var h=[],l=[],m=[],q=[],k=new n,A=new n,r=new n,t=new n,v=new n,y=new n,u=new n,w=0;w<=c;++w){var x=w/c*e*Math.PI*2;g(x,e,f,a,r);g(x+.01,e,f,a,t);y.subVectors(t,r);u.addVectors(t,r);v.crossVectors(y,u);u.crossVectors(v,y);v.normalize();u.normalize();for(x=0;x<=d;++x){var F=x/d*Math.PI*2,N=-b*Math.cos(F);F=b*Math.sin(F);k.x=r.x+(N*u.x+F*v.x);k.y=r.y+(N*u.y+F*v.y);k.z=r.z+(N*u.z+F*v.z);l.push(k.x,k.y,k.z);A.subVectors(k,r).normalize();m.push(A.x,A.y,A.z);q.push(w/
|
|
|
-c);q.push(x/d)}}for(a=1;a<=c;a++)for(b=1;b<=d;b++)e=(d+1)*a+(b-1),f=(d+1)*a+b,k=(d+1)*(a-1)+b,h.push((d+1)*(a-1)+(b-1),e,k),h.push(e,f,k);this.setIndex(h);this.setAttribute("position",new C(l,3));this.setAttribute("normal",new C(m,3));this.setAttribute("uv",new C(q,2))}function Yd(a,b,c,d,e){I.call(this);this.type="TorusGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};this.fromBufferGeometry(new Uc(a,b,c,d,e));this.mergeVertices()}function Uc(a,b,c,d,e){H.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;for(var f=[],g=[],h=[],l=[],m=new n,q=new n,k=new n,A=0;A<=c;A++)for(var r=0;r<=d;r++){var t=r/d*e,v=A/c*Math.PI*2;q.x=(a+b*Math.cos(v))*Math.cos(t);q.y=(a+b*Math.cos(v))*Math.sin(t);q.z=b*Math.sin(v);g.push(q.x,q.y,q.z);m.x=a*Math.cos(t);m.y=a*Math.sin(t);k.subVectors(q,m).normalize();h.push(k.x,k.y,k.z);l.push(r/d);l.push(A/
|
|
|
-c)}for(a=1;a<=c;a++)for(b=1;b<=d;b++)e=(d+1)*(a-1)+b-1,m=(d+1)*(a-1)+b,q=(d+1)*a+b,f.push((d+1)*a+b-1,e,q),f.push(e,m,q);this.setIndex(f);this.setAttribute("position",new C(g,3));this.setAttribute("normal",new C(h,3));this.setAttribute("uv",new C(l,2))}function Yh(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=Zh(e,a[e],a[e+1],f);else for(e=c-d;e>=b;e-=d)f=Zh(e,a[e],a[e+1],f);f&&Ue(f,f.next)&&(Zd(f),f=f.next);return f}function Jb(a,b){if(!a)return a;
|
|
|
-b||(b=a);do{var c=!1;if(a.steiner||!Ue(a,a.next)&&0!==ka(a.prev,a,a.next))a=a.next;else{Zd(a);a=b=a.prev;if(a===a.next)break;c=!0}}while(c||a!==b);return b}function $d(a,b,c,d,e,f,g){if(a){if(!g&&f){var h=a,l=h;do null===l.z&&(l.z=rg(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,q,k,A,r=1;do{l=h;var t=h=null;for(q=0;l;){q++;var n=l;for(m=k=0;m<r&&(k++,n=n.nextZ,n);m++);for(A=r;0<k||0<A&&n;)0!==k&&(0===A||!n||l.z<=n.z)?(m=l,l=l.nextZ,k--):(m=
|
|
|
-n,n=n.nextZ,A--),t?t.nextZ=m:h=m,m.prevZ=t,t=m;l=n}t.nextZ=null;r*=2}while(1<q)}for(h=a;a.prev!==a.next;){l=a.prev;n=a.next;if(f)t=Dk(a,d,e,f);else a:if(t=a,q=t.prev,k=t,r=t.next,0<=ka(q,k,r))t=!1;else{for(m=t.next.next;m!==t.prev;){if(Vc(q.x,q.y,k.x,k.y,r.x,r.y,m.x,m.y)&&0<=ka(m.prev,m,m.next)){t=!1;break a}m=m.next}t=!0}if(t)b.push(l.i/c),b.push(a.i/c),b.push(n.i/c),Zd(a),h=a=n.next;else if(a=n,a===h){if(!g)$d(Jb(a),b,c,d,e,f,1);else if(1===g){a=Jb(a);g=b;h=c;l=a;do n=l.prev,t=l.next.next,!Ue(n,
|
|
|
-t)&&$h(n,l,l.next,t)&&ae(n,t)&&ae(t,n)&&(g.push(n.i/h),g.push(l.i/h),g.push(t.i/h),Zd(l),Zd(l.next),l=a=t),l=l.next;while(l!==a);a=Jb(l);$d(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(t=l.next.i!==n.i&&l.prev.i!==n.i){b:{t=l;do{if(t.i!==l.i&&t.next.i!==l.i&&t.i!==n.i&&t.next.i!==n.i&&$h(t,t.next,l,n)){t=!0;break b}t=t.next}while(t!==l);t=!1}t=!t}if(t){if(t=ae(l,n)&&ae(n,l)){t=l;q=!1;k=(l.x+n.x)/2;r=(l.y+n.y)/2;do t.y>r!==t.next.y>r&&t.next.y!==
|
|
|
-t.y&&k<(t.next.x-t.x)*(r-t.y)/(t.next.y-t.y)+t.x&&(q=!q),t=t.next;while(t!==l);t=q}t=t&&(ka(l.prev,l,n.prev)||ka(l,n.prev,n))||Ue(l,n)&&0<ka(l.prev,l,l.next)&&0<ka(n.prev,n,n.next)}l=t}if(l){a=ai(g,h);g=Jb(g,g.next);a=Jb(a,a.next);$d(g,b,c,d,e,f);$d(a,b,c,d,e,f);break a}h=h.next}g=g.next}while(g!==a)}break}}}}function Dk(a,b,c,d){var e=a.prev,f=a.next;if(0<=ka(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=rg(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=rg(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&&Vc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=ka(c.prev,c,c.next))return!1;c=c.prevZ;if(d!==a.prev&&d!==a.next&&Vc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=ka(d.prev,d,d.next))return!1;d=d.nextZ}for(;c&&c.z>=l;){if(c!==a.prev&&c!==a.next&&Vc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=ka(c.prev,c,c.next))return!1;c=c.prevZ}for(;d&&d.z<=b;){if(d!==a.prev&&d!==a.next&&Vc(e.x,
|
|
|
-e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=ka(d.prev,d,d.next))return!1;d=d.nextZ}return!0}function Ek(a,b){return a.x-b.x}function Fk(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;b=h;g=h.x;var l=h.y,m=Infinity;c=h;do{if(d>=c.x&&c.x>=g&&d!==c.x&&Vc(e<l?d:f,e,g,l,
|
|
|
-e<l?f:d,e,c.x,c.y)){var k=Math.abs(e-c.y)/(d-c.x);var p;if((p=ae(c,a))&&!(p=k<m)&&(p=k===m)&&!(p=c.x>h.x)&&(p=c.x===h.x)){p=h;var A=c;p=0>ka(p.prev,p,A.prev)&&0>ka(A.next,p,p.next)}p&&(h=c,m=k)}c=c.next}while(c!==b);return h}function rg(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 Gk(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 Vc(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 ka(a,b,c){return(b.y-a.y)*(c.x-b.x)-(b.x-a.x)*(c.y-b.y)}function Ue(a,b){return a.x===b.x&&a.y===b.y}function $h(a,b,c,d){var e=Ve(ka(a,b,c)),f=Ve(ka(a,b,d)),g=Ve(ka(c,d,a)),h=Ve(ka(c,d,b));return e!==f&&g!==h||0===e&&We(a,c,b)||0===f&&We(a,d,b)||0===g&&We(c,a,d)||0===h&&We(c,b,d)?!0:!1}function We(a,b,c){return b.x<=Math.max(a.x,
|
|
|
-c.x)&&b.x>=Math.min(a.x,c.x)&&b.y<=Math.max(a.y,c.y)&&b.y>=Math.min(a.y,c.y)}function Ve(a){return 0<a?1:0>a?-1:0}function ae(a,b){return 0>ka(a.prev,a,a.next)?0<=ka(a,b,a.next)&&0<=ka(a,a.prev,b):0>ka(a,b,a.prev)||0>ka(a,a.next,b)}function ai(a,b){var c=new sg(a.i,a.x,a.y),d=new sg(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 Zh(a,b,c,d){a=new sg(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 Zd(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 sg(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 bi(a){var b=a.length;2<b&&a[b-1].equals(a[0])&&a.pop()}function ci(a,b){for(var c=0;c<b.length;c++)a.push(b[c].x),a.push(b[c].y)}function dc(a,b){I.call(this);this.type="ExtrudeGeometry";this.parameters={shapes:a,options:b};this.fromBufferGeometry(new fb(a,
|
|
|
-b));this.mergeVertices()}function fb(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 u(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 u(f/e,d/e)}function h(a,b){for(var c=a.length;0<=--c;){var f=c,g=c-1;0>g&&(g=a.length-1);for(var h=0,l=w+2*C;h<l;h++){var m=W*h,k=W*(h+1),q=b+g+m,p=b+g+k;k=b+f+k;t(b+f+m);t(q);t(k);t(q);t(p);t(k);m=e.length/3;m=D.generateSideWallUV(d,e,m-6,m-3,m-2,m-1);v(m[0]);v(m[1]);v(m[3]);v(m[1]);v(m[2]);v(m[3])}}}function l(a,b,c){y.push(a);y.push(b);
|
|
|
-y.push(c)}function k(a,b,c){t(a);t(b);t(c);a=e.length/3;a=D.generateTopUV(d,e,a-3,a-2,a-1);v(a[0]);v(a[1]);v(a[2])}function t(a){e.push(y[3*a]);e.push(y[3*a+1]);e.push(y[3*a+2])}function v(a){f.push(a.x);f.push(a.y)}var y=[],B=void 0!==b.curveSegments?b.curveSegments:12,w=void 0!==b.steps?b.steps:1,x=void 0!==b.depth?b.depth:100,F=void 0!==b.bevelEnabled?b.bevelEnabled:!0,N=void 0!==b.bevelThickness?b.bevelThickness:6,z=void 0!==b.bevelSize?b.bevelSize:N-2,P=void 0!==b.bevelOffset?b.bevelOffset:0,
|
|
|
-C=void 0!==b.bevelSegments?b.bevelSegments:3,Q=b.extrudePath,D=void 0!==b.UVGenerator?b.UVGenerator:Hk;void 0!==b.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),x=b.amount);var E=!1;if(Q){var H=Q.getSpacedPoints(w);E=!0;F=!1;var G=Q.computeFrenetFrames(w,!1);var J=new n;var K=new n;var I=new n}F||(P=z=N=C=0);a=a.extractPoints(B);Q=a.shape;var O=a.holes;if(!pb.isClockWise(Q))for(Q=Q.reverse(),a=0,B=O.length;a<B;a++){var L=O[a];pb.isClockWise(L)&&(O[a]=L.reverse())}var U=
|
|
|
-pb.triangulateShape(Q,O),V=Q;a=0;for(B=O.length;a<B;a++)Q=Q.concat(O[a]);var W=Q.length,aa=U.length;a=[];B=0;L=V.length;for(var da=L-1,R=B+1;B<L;B++,da++,R++)da===L&&(da=0),R===L&&(R=0),a[B]=g(V[B],V[da],V[R]);B=[];L=a.concat();R=0;for(var S=O.length;R<S;R++){var T=O[R];da=[];for(var X=0,Y=T.length,ba=Y-1,Z=X+1;X<Y;X++,ba++,Z++)ba===Y&&(ba=0),Z===Y&&(Z=0),da[X]=g(T[X],T[ba],T[Z]);B.push(da);L=L.concat(da)}for(R=0;R<C;R++){da=R/C;S=N*Math.cos(da*Math.PI/2);T=z*Math.sin(da*Math.PI/2)+P;da=0;for(X=V.length;da<
|
|
|
-X;da++)Y=c(V[da],a[da],T),l(Y.x,Y.y,-S);X=0;for(Y=O.length;X<Y;X++){ba=O[X];da=B[X];Z=0;for(var ea=ba.length;Z<ea;Z++){var fa=c(ba[Z],da[Z],T);l(fa.x,fa.y,-S)}}}da=z+P;for(R=0;R<W;R++)S=F?c(Q[R],L[R],da):Q[R],E?(K.copy(G.normals[0]).multiplyScalar(S.x),J.copy(G.binormals[0]).multiplyScalar(S.y),I.copy(H[0]).add(K).add(J),l(I.x,I.y,I.z)):l(S.x,S.y,0);for(R=1;R<=w;R++)for(S=0;S<W;S++)T=F?c(Q[S],L[S],da):Q[S],E?(K.copy(G.normals[R]).multiplyScalar(T.x),J.copy(G.binormals[R]).multiplyScalar(T.y),I.copy(H[R]).add(K).add(J),
|
|
|
-l(I.x,I.y,I.z)):l(T.x,T.y,x/w*R);for(G=C-1;0<=G;G--){K=G/C;J=N*Math.cos(K*Math.PI/2);K=z*Math.sin(K*Math.PI/2)+P;I=0;for(Q=V.length;I<Q;I++)L=c(V[I],a[I],K),l(L.x,L.y,x+J);I=0;for(Q=O.length;I<Q;I++)for(L=O[I],da=B[I],R=0,S=L.length;R<S;R++)T=c(L[R],da[R],K),E?l(T.x,T.y+H[w-1].y,H[w-1].x+J):l(T.x,T.y,x+J)}(function(){var a=e.length/3;if(F){for(var b=0*W,c=0;c<aa;c++){var f=U[c];k(f[2]+b,f[1]+b,f[0]+b)}b=W*(w+2*C);for(c=0;c<aa;c++)f=U[c],k(f[0]+b,f[1]+b,f[2]+b)}else{for(b=0;b<aa;b++)c=U[b],k(c[2],
|
|
|
-c[1],c[0]);for(b=0;b<aa;b++)c=U[b],k(c[0]+W*w,c[1]+W*w,c[2]+W*w)}d.addGroup(a,e.length/3-a,0)})();(function(){var a=e.length/3,b=0;h(V,b);b+=V.length;for(var c=0,f=O.length;c<f;c++){var g=O[c];h(g,b);b+=g.length}d.addGroup(a,e.length/3-a,1)})()}H.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 C(e,3));this.setAttribute("uv",new C(f,2));this.computeVertexNormals()}
|
|
|
-function di(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 be(a,b){I.call(this);this.type="TextGeometry";this.parameters={text:a,parameters:b};this.fromBufferGeometry(new Wc(a,b));this.mergeVertices()}function Wc(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 I;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);fb.call(this,a,b);this.type="TextBufferGeometry"}function ce(a,b,c,d,e,f,g){I.call(this);this.type="SphereGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};this.fromBufferGeometry(new ec(a,b,c,d,e,f,g));this.mergeVertices()}function ec(a,
|
|
|
-b,c,d,e,f,g){H.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;for(var h=Math.min(f+g,Math.PI),l=0,m=[],k=new n,p=new n,A=[],r=[],t=[],v=[],y=0;y<=c;y++){var u=[],w=y/c,x=0;0==y&&0==f?x=.5/b:y==c&&h==Math.PI&&(x=-.5/b);for(var F=0;F<=b;F++){var N=
|
|
|
-F/b;k.x=-a*Math.cos(d+N*e)*Math.sin(f+w*g);k.y=a*Math.cos(f+w*g);k.z=a*Math.sin(d+N*e)*Math.sin(f+w*g);r.push(k.x,k.y,k.z);p.copy(k).normalize();t.push(p.x,p.y,p.z);v.push(N+x,1-w);u.push(l++)}m.push(u)}for(a=0;a<c;a++)for(d=0;d<b;d++)e=m[a][d+1],g=m[a][d],l=m[a+1][d],k=m[a+1][d+1],(0!==a||0<f)&&A.push(e,g,k),(a!==c-1||h<Math.PI)&&A.push(g,l,k);this.setIndex(A);this.setAttribute("position",new C(r,3));this.setAttribute("normal",new C(t,3));this.setAttribute("uv",new C(v,2))}function de(a,b,c,d,e,
|
|
|
-f){I.call(this);this.type="RingGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,thetaLength:f};this.fromBufferGeometry(new Xc(a,b,c,d,e,f));this.mergeVertices()}function Xc(a,b,c,d,e,f){H.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=[],k=a;a=(b-a)/d;for(var p=new n,A=new u,r=0;r<=d;r++){for(var t=0;t<=c;t++){var v=e+t/c*f;p.x=k*Math.cos(v);p.y=k*Math.sin(v);h.push(p.x,p.y,p.z);l.push(0,0,1);A.x=(p.x/b+1)/2;A.y=(p.y/b+1)/2;m.push(A.x,A.y)}k+=a}for(b=0;b<d;b++)for(e=b*(c+1),f=0;f<c;f++)k=f+e,a=k+c+1,p=k+c+2,A=k+1,g.push(k,a,A),g.push(a,p,A);this.setIndex(g);this.setAttribute("position",new C(h,3));this.setAttribute("normal",new C(l,3));this.setAttribute("uv",new C(m,2))}function ee(a,b,c,d){I.call(this);this.type=
|
|
|
-"LatheGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};this.fromBufferGeometry(new Yc(a,b,c,d));this.mergeVertices()}function Yc(a,b,c,d){H.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=O.clamp(d,0,2*Math.PI);for(var e=[],f=[],g=[],h=1/b,l=new n,m=new u,k=0;k<=b;k++){var p=c+k*h*d,A=Math.sin(p);p=Math.cos(p);for(var r=0;r<=a.length-1;r++)l.x=a[r].x*A,l.y=a[r].y,l.z=a[r].x*p,
|
|
|
-f.push(l.x,l.y,l.z),m.x=k/b,m.y=r/(a.length-1),g.push(m.x,m.y)}for(c=0;c<b;c++)for(h=0;h<a.length-1;h++)l=h+c*a.length,m=l+a.length,k=l+a.length+1,A=l+1,e.push(l,m,A),e.push(m,k,A);this.setIndex(e);this.setAttribute("position",new C(f,3));this.setAttribute("uv",new C(g,2));this.computeVertexNormals();if(d===2*Math.PI)for(d=this.attributes.normal.array,e=new n,f=new n,g=new n,b=b*a.length*3,h=c=0;c<a.length;c++,h+=3)e.x=d[h+0],e.y=d[h+1],e.z=d[h+2],f.x=d[b+h+0],f.y=d[b+h+1],f.z=d[b+h+2],g.addVectors(e,
|
|
|
-f).normalize(),d[h+0]=d[b+h+0]=g.x,d[h+1]=d[b+h+1]=g.y,d[h+2]=d[b+h+2]=g.z}function fc(a,b){I.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 gc(a,b));this.mergeVertices()}function gc(a,b){function c(a){var c=e.length/3,h=a.extractPoints(b);a=h.shape;var m=h.holes;!1===pb.isClockWise(a)&&(a=a.reverse());h=0;for(var k=m.length;h<
|
|
|
-k;h++){var q=m[h];!0===pb.isClockWise(q)&&(m[h]=q.reverse())}h=pb.triangulateShape(a,m);k=0;for(q=m.length;k<q;k++)a=a.concat(m[k]);m=0;for(k=a.length;m<k;m++)q=a[m],e.push(q.x,q.y,0),f.push(0,0,1),g.push(q.x,q.y);a=0;for(m=h.length;a<m;a++)k=h[a],d.push(k[0]+c,k[1]+c,k[2]+c),l+=3}H.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 C(e,3));this.setAttribute("normal",new C(f,3));this.setAttribute("uv",new C(g,2))}function ei(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 Zc(a,b){H.call(this);this.type="EdgesGeometry";this.parameters={thresholdAngle:b};var c=[];b=Math.cos(O.DEG2RAD*(void 0!==b?b:1));var d=[0,0],e={},f=["a","b","c"];if(a.isBufferGeometry){var g=new I;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 p=m[f[k]];var n=m[f[(k+1)%3]];d[0]=Math.min(p,n);d[1]=Math.max(p,n);p=d[0]+","+d[1];void 0===e[p]?e[p]={index1:d[0],index2:d[1],face1:h,face2:void 0}:e[p].face2=h}for(p in e)if(d=e[p],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 C(c,3))}function hc(a,
|
|
|
-b,c,d,e,f,g,h){I.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 u,l=new n,q=0,v=!0===c?a:b,w=!0===c?1:-1;var x=t;for(e=1;e<=d;e++)p.push(0,y*w,0),A.push(0,w,0),r.push(.5,.5),t++;e=t;for(var C=0;C<=d;C++){var D=C/d*h+g,E=Math.cos(D);D=Math.sin(D);l.x=v*D;l.y=
|
|
|
-y*w;l.z=v*E;p.push(l.x,l.y,l.z);A.push(0,w,0);f.x=.5*E+.5;f.y=.5*D*w+.5;r.push(f.x,f.y);t++}for(f=0;f<d;f++)l=x+f,v=e+f,!0===c?k.push(v,v+1,l):k.push(v+1,v,l),q+=3;m.addGroup(B,q,!0===c?1:2);B+=q}H.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=[],p=[],A=[],r=[],t=0,v=[],y=c/2,B=0;(function(){for(var f=new n,l=new n,q=0,u=(b-a)/c,z=0;z<=e;z++){for(var x=[],C=z/e,D=C*(b-a)+a,E=0;E<=d;E++){var G=E/d,H=G*h+g,I=Math.sin(H);H=Math.cos(H);l.x=D*I;l.y=-C*c+y;l.z=D*H;p.push(l.x,l.y,l.z);f.set(I,u,H).normalize();A.push(f.x,f.y,f.z);r.push(G,1-C);x.push(t++)}v.push(x)}for(f=0;f<d;f++)for(l=0;l<e;l++)u=v[l+1][f],z=v[l+1][f+1],x=v[l][f+1],k.push(v[l][f],u,x),k.push(u,z,x),q+=6;m.addGroup(B,q,0);B+=q})();!1===f&&(0<a&&l(!0),0<b&&
|
|
|
-l(!1));this.setIndex(k);this.setAttribute("position",new C(p,3));this.setAttribute("normal",new C(A,3));this.setAttribute("uv",new C(r,2))}function fe(a,b,c,d,e,f,g){hc.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 ge(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 he(a,b,c,d){I.call(this);this.type="CircleGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};this.fromBufferGeometry(new $c(a,b,c,d));this.mergeVertices()}function $c(a,b,c,d){H.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=new n,m=new u;f.push(0,0,0);g.push(0,0,1);h.push(.5,.5);for(var k=
|
|
|
-0,p=3;k<=b;k++,p+=3){var A=c+k/b*d;l.x=a*Math.cos(A);l.y=a*Math.sin(A);f.push(l.x,l.y,l.z);g.push(0,0,1);m.x=(f[p]/a+1)/2;m.y=(f[p+1]/a+1)/2;h.push(m.x,m.y)}for(a=1;a<=b;a++)e.push(a,a+1,0);this.setIndex(e);this.setAttribute("position",new C(f,3));this.setAttribute("normal",new C(g,3));this.setAttribute("uv",new C(h,2))}function ic(a){K.call(this);this.type="ShadowMaterial";this.color=new E(0);this.transparent=!0;this.setValues(a)}function rb(a){Aa.call(this,a);this.type="RawShaderMaterial"}function gb(a){K.call(this);
|
|
|
-this.defines={STANDARD:""};this.type="MeshStandardMaterial";this.color=new E(16777215);this.roughness=1;this.metalness=0;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new E(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new u(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.vertexTangents=this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function jc(a){gb.call(this);this.defines={STANDARD:"",PHYSICAL:""};this.type="MeshPhysicalMaterial";this.clearcoat=0;this.clearcoatMap=null;this.clearcoatRoughness=0;this.clearcoatRoughnessMap=null;this.clearcoatNormalScale=new u(1,1);this.clearcoatNormalMap=
|
|
|
-null;this.reflectivity=.5;this.sheen=null;this.transparency=0;this.setValues(a)}function Kb(a){K.call(this);this.type="MeshPhongMaterial";this.color=new E(16777215);this.specular=new E(1118481);this.shininess=30;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new E(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new u(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 kc(a){K.call(this);this.defines={TOON:""};this.type="MeshToonMaterial";this.color=new E(16777215);this.specular=new E(1118481);this.shininess=30;this.lightMap=this.gradientMap=this.map=null;
|
|
|
-this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new E(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new u(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 lc(a){K.call(this);this.type="MeshNormalMaterial";this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new u(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 mc(a){K.call(this);this.type="MeshLambertMaterial";this.color=new E(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;
|
|
|
-this.aoMap=null;this.aoMapIntensity=1;this.emissive=new E(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 nc(a){K.call(this);this.defines={MATCAP:""};this.type="MeshMatcapMaterial";this.color=new E(16777215);this.bumpMap=
|
|
|
-this.map=this.matcap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new u(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 oc(a){ja.call(this);this.type="LineDashedMaterial";this.scale=1;this.dashSize=3;this.gapSize=1;this.setValues(a)}function Ka(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 Xe(a,b,c,d){Ka.call(this,a,b,c,d);this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function ie(a,b,c,d){Ka.call(this,a,b,c,d)}function Ye(a,b,c,d){Ka.call(this,a,b,c,d)}function sa(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=X.convertArray(b,this.TimeBufferType);this.values=X.convertArray(c,
|
|
|
-this.ValueBufferType);this.setInterpolation(d||this.DefaultInterpolation)}function Ze(a,b,c){sa.call(this,a,b,c)}function $e(a,b,c,d){sa.call(this,a,b,c,d)}function ad(a,b,c,d){sa.call(this,a,b,c,d)}function af(a,b,c,d){Ka.call(this,a,b,c,d)}function je(a,b,c,d){sa.call(this,a,b,c,d)}function bf(a,b,c,d){sa.call(this,a,b,c,d)}function bd(a,b,c,d){sa.call(this,a,b,c,d)}function Qa(a,b,c,d){this.name=a;this.tracks=c;this.duration=void 0!==b?b:-1;this.blendMode=void 0!==d?d:2500;this.uuid=O.generateUUID();
|
|
|
-0>this.duration&&this.resetDuration()}function Ik(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return ad;case "vector":case "vector2":case "vector3":case "vector4":return bd;case "color":return $e;case "quaternion":return je;case "bool":case "boolean":return Ze;case "string":return bf}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+a);}function Jk(a){if(void 0===a.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");
|
|
|
-var b=Ik(a.type);if(void 0===a.times){var c=[],d=[];X.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 tg(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 V(a){this.manager=void 0!==a?a:fi;this.crossOrigin="anonymous";
|
|
|
-this.resourcePath=this.path="";this.requestHeader={}}function Ra(a){V.call(this,a)}function ug(a){V.call(this,a)}function vg(a){V.call(this,a)}function cf(a){V.call(this,a)}function cd(a){V.call(this,a)}function df(a){V.call(this,a)}function ef(a){V.call(this,a)}function J(){this.type="Curve";this.arcLengthDivisions=200}function La(a,b,c,d,e,f,g,h){J.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 dd(a,b,c,d,e,f){La.call(this,a,b,c,c,d,e,f);this.type="ArcCurve"}function wg(){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 va(a,b,c,d){J.call(this);this.type=
|
|
|
-"CatmullRomCurve3";this.points=a||[];this.closed=b||!1;this.curveType=c||"centripetal";this.tension=d||.5}function gi(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 ke(a,b,c,d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function le(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 Wa(a,b,c,d){J.call(this);this.type="CubicBezierCurve";this.v0=a||new u;this.v1=b||new u;this.v2=c||new u;this.v3=d||new u}function hb(a,
|
|
|
-b,c,d){J.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 wa(a,b){J.call(this);this.type="LineCurve";this.v1=a||new u;this.v2=b||new u}function Xa(a,b){J.call(this);this.type="LineCurve3";this.v1=a||new n;this.v2=b||new n}function Ya(a,b,c){J.call(this);this.type="QuadraticBezierCurve";this.v0=a||new u;this.v1=b||new u;this.v2=c||new u}function ib(a,b,c){J.call(this);this.type="QuadraticBezierCurve3";this.v0=a||new n;this.v1=b||
|
|
|
-new n;this.v2=c||new n}function Za(a){J.call(this);this.type="SplineCurve";this.points=a||[]}function sb(){J.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function $a(a){sb.call(this);this.type="Path";this.currentPoint=new u;a&&this.setFromPoints(a)}function Lb(a){$a.call(this,a);this.uuid=O.generateUUID();this.type="Shape";this.holes=[]}function aa(a,b){x.call(this);this.type="Light";this.color=new E(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function ff(a,b,c){aa.call(this,
|
|
|
-a,c);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(x.DefaultUp);this.updateMatrix();this.groundColor=new E(b)}function jb(a){this.camera=a;this.normalOffset=this.bias=0;this.radius=1;this.mapSize=new u(512,512);this.mapPass=this.map=null;this.matrix=new U;this._frustum=new Fc;this._frameExtents=new u(1,1);this._viewportCount=1;this._viewports=[new ba(0,0,1,1)]}function gf(){jb.call(this,new ma(50,1,.5,500))}function hf(a,b,c,d,e,f){aa.call(this,a,b);this.type="SpotLight";this.position.copy(x.DefaultUp);
|
|
|
-this.updateMatrix();this.target=new x;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 gf}function xg(){jb.call(this,new ma(90,1,.5,500));this._frameExtents=new u(4,2);this._viewportCount=6;this._viewports=[new ba(2,1,1,1),new ba(0,1,1,1),new ba(3,1,1,1),new ba(1,1,1,1),new ba(3,0,1,1),new ba(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 jf(a,b,c,d){aa.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 xg}function ed(a,b,c,d,e,f){db.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 kf(){jb.call(this,new ed(-5,5,5,-5,.5,500))}function lf(a,b){aa.call(this,a,b);this.type="DirectionalLight";this.position.copy(x.DefaultUp);this.updateMatrix();this.target=new x;this.shadow=new kf}function mf(a,b){aa.call(this,a,b);this.type="AmbientLight";
|
|
|
-this.castShadow=void 0}function nf(a,b,c,d){aa.call(this,a,b);this.type="RectAreaLight";this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function of(){this.coefficients=[];for(var a=0;9>a;a++)this.coefficients.push(new n)}function Sa(a,b){aa.call(this,void 0,b);this.type="LightProbe";this.sh=void 0!==a?a:new of}function pf(a){V.call(this,a);this.textures={}}function me(){H.call(this);this.type="InstancedBufferGeometry";this.instanceCount=Infinity}function qf(a,b,c,d){"number"===typeof c&&(d=
|
|
|
-c,c=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));G.call(this,a,b,c);this.meshPerAttribute=d||1}function rf(a){V.call(this,a)}function sf(a){V.call(this,a)}function yg(a){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");V.call(this,a);this.options={premultiplyAlpha:"none"}}
|
|
|
-function zg(){this.type="ShapePath";this.color=new E;this.subPaths=[];this.currentPath=null}function Ag(a){this.type="Font";this.data=a}function Bg(a){V.call(this,a)}function tf(a){V.call(this,a)}function Cg(a,b,c){Sa.call(this,void 0,c);a=(new E).set(a);c=(new E).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 Dg(a,b){Sa.call(this,
|
|
|
-void 0,b);a=(new E).set(a);this.sh.coefficients[0].set(a.r,a.g,a.b).multiplyScalar(2*Math.sqrt(Math.PI))}function hi(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new ma;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new ma;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 Eg(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=
|
|
|
-this.startTime=0;this.running=!1}function Fg(){x.call(this);this.type="AudioListener";this.context=Gg.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0;this._clock=new Eg}function fd(a){x.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._progress=this._startedAt=0;this.filters=[]}function Hg(a){fd.call(this,a);this.panner=this.context.createPanner();this.panner.panningModel="HRTF";this.panner.connect(this.gain)}function Ig(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 Jg(a,
|
|
|
-b,c){this.binding=a;this.valueSize=c;switch(b){case "quaternion":a=this._slerp;b=this._slerpAdditive;var d=this._setAdditiveIdentityQuaternion;this.buffer=new Float64Array(6*c);this._workIndex=5;break;case "string":case "bool":b=a=this._select;d=this._setAdditiveIdentityOther;this.buffer=Array(5*c);break;default:a=this._lerp,b=this._lerpAdditive,d=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*c)}this._mixBufferRegion=a;this._mixBufferRegionAdditive=b;this._setIdentity=d;this._origIndex=
|
|
|
-3;this._addIndex=4;this.referenceCount=this.useCount=this.cumulativeWeightAdditive=this.cumulativeWeight=0}function ii(a,b,c){c=c||pa.parseTrackName(b);this._targetGroup=a;this._bindings=a.subscribe_(b,c)}function pa(a,b,c){this.path=b;this.parsedPath=c||pa.parseTrackName(b);this.node=pa.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a}function ji(){this.uuid=O.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 ki(a,b,c,d){this._mixer=a;this._clip=b;this._localRoot=c||null;this.blendMode=d||b.blendMode;a=b.tracks;b=a.length;c=Array(b);d={endingStart:2400,endingEnd:2400};for(var 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 Kg(a){this._root=
|
|
|
-a;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function uf(a,b){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),a=b);this.value=a}function Lg(a,b,c){Ia.call(this,a,b);this.meshPerAttribute=c||1}function Mg(a,b,c,d){this.ray=new Ub(a,b);this.near=c||0;this.far=d||Infinity;this.camera=null;this.layers=new De;this.params={Mesh:{},Line:{threshold:1},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 li(a,b){return a.distance-b.distance}function Ng(a,b,c,d){a.layers.test(b.layers)&&a.raycast(b,c);if(!0===d){a=a.children;d=0;for(var e=a.length;d<e;d++)Ng(a[d],b,c,!0)}}function mi(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 ni(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 Og(a,b){this.min=void 0!==a?a:new u(Infinity,Infinity);this.max=void 0!==b?b:
|
|
|
-new u(-Infinity,-Infinity)}function Pg(a,b){this.start=void 0!==a?a:new n;this.end=void 0!==b?b:new n}function ne(a){x.call(this);this.material=a;this.render=function(){};this.hasUvs=this.hasColors=this.hasNormals=this.hasPositions=!1;this.uvArray=this.colorArray=this.normalArray=this.positionArray=null;this.count=0}function gd(a,b){x.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=b;a=new H;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 C(b,3));b=new ja({fog:!1,toneMapped:!1});this.cone=new ea(a,b);this.add(this.cone);this.update()}function oi(a){var b=[];a&&a.isBone&&b.push(a);for(var c=0;c<a.children.length;c++)b.push.apply(b,oi(a.children[c]));return b}function pc(a){for(var b=oi(a),c=new H,d=[],e=[],f=new E(0,0,1),g=new E(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 C(d,3));c.setAttribute("color",new C(e,3));d=new ja({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});ea.call(this,c,d);this.type="SkeletonHelper";this.root=a;this.bones=b;this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1}function hd(a,b,c){this.light=a;this.light.updateMatrixWorld();this.color=c;a=new ec(b,4,2);b=new Na({wireframe:!0,fog:!1,
|
|
|
-toneMapped:!1});Z.call(this,a,b);this.type="PointLightHelper";this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=!1;this.update()}function id(a,b,c){x.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;a=new bc(b);a.rotateY(.5*Math.PI);this.material=new Na({wireframe:!0,fog:!1,toneMapped:!1});void 0===this.color&&(this.material.vertexColors=!0);b=a.getAttribute("position");b=new Float32Array(3*b.count);a.setAttribute("color",
|
|
|
-new G(b,3));this.add(new Z(a,this.material));this.update()}function vf(a,b,c,d){a=a||10;b=b||10;c=new E(void 0!==c?c:4473924);d=new E(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 p=l===e?c:d;p.toArray(h,m);m+=3;p.toArray(h,m);m+=3;p.toArray(h,m);m+=3;p.toArray(h,m);m+=3}b=new H;b.setAttribute("position",new C(a,3));b.setAttribute("color",new C(h,3));c=new ja({vertexColors:!0,toneMapped:!1});ea.call(this,b,c);
|
|
|
-this.type="GridHelper"}function wf(a,b,c,d,e,f){a=a||10;b=b||16;c=c||8;d=d||64;e=new E(void 0!==e?e:4473924);f=new E(void 0!==f?f:8947848);for(var g=[],h=[],l=0;l<=b;l++){var m=l/b*2*Math.PI,k=Math.sin(m)*a;m=Math.cos(m)*a;g.push(0,0,0);g.push(k,0,m);k=l&1?e:f;h.push(k.r,k.g,k.b);h.push(k.r,k.g,k.b)}for(b=0;b<=c;b++)for(l=b&1?e:f,k=a-a/c*b,m=0;m<d;m++){var p=m/d*2*Math.PI,n=Math.sin(p)*k;p=Math.cos(p)*k;g.push(n,0,p);h.push(l.r,l.g,l.b);p=(m+1)/d*2*Math.PI;n=Math.sin(p)*k;p=Math.cos(p)*k;g.push(n,
|
|
|
-0,p);h.push(l.r,l.g,l.b)}a=new H;a.setAttribute("position",new C(g,3));a.setAttribute("color",new C(h,3));g=new ja({vertexColors:!0,toneMapped:!1});ea.call(this,a,g);this.type="PolarGridHelper"}function jd(a,b,c){x.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;void 0===b&&(b=1);a=new H;a.setAttribute("position",new C([-b,b,0,b,b,0,b,-b,0,-b,-b,0,-b,b,0],3));b=new ja({fog:!1,toneMapped:!1});this.lightPlane=new Ja(a,b);this.add(this.lightPlane);
|
|
|
-a=new H;a.setAttribute("position",new C([0,0,0,0,0,1],3));this.targetLine=new Ja(a,b);this.add(this.targetLine);this.update()}function oe(a){function b(a,b,d){c(a,d);c(b,d)}function c(a,b){f.push(0,0,0);g.push(b.r,b.g,b.b);void 0===h[a]&&(h[a]=[]);h[a].push(f.length/3-1)}var d=new H,e=new ja({color:16777215,vertexColors:!0,toneMapped:!1}),f=[],g=[],h={},l=new E(16755200),m=new E(16711680),k=new E(43775),p=new E(16777215),n=new E(3355443);b("n1","n2",l);b("n2","n4",l);b("n4","n3",l);b("n3","n1",l);
|
|
|
-b("f1","f2",l);b("f2","f4",l);b("f4","f3",l);b("f3","f1",l);b("n1","f1",l);b("n2","f2",l);b("n3","f3",l);b("n4","f4",l);b("p","n1",m);b("p","n2",m);b("p","n3",m);b("p","n4",m);b("u1","u2",k);b("u2","u3",k);b("u3","u1",k);b("c","t",p);b("p","c",n);b("cn1","cn2",n);b("cn3","cn4",n);b("cf1","cf2",n);b("cf3","cf4",n);d.setAttribute("position",new C(f,3));d.setAttribute("color",new C(g,3));ea.call(this,d,e);this.type="CameraHelper";this.camera=a;this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix();
|
|
|
-this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.pointMap=h;this.update()}function S(a,b,c,d,e,f,g){xf.set(e,f,g).unproject(d);a=b[a];if(void 0!==a)for(c=c.getAttribute("position"),b=0,d=a.length;b<d;b++)c.setXYZ(a[b],xf.x,xf.y,xf.z)}function tb(a,b){this.object=a;void 0===b&&(b=16776960);a=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new Float32Array(24),d=new H;d.setIndex(new G(a,1));d.setAttribute("position",new G(c,3));ea.call(this,d,new ja({color:b,toneMapped:!1}));
|
|
|
-this.type="BoxHelper";this.matrixAutoUpdate=!1;this.update()}function pe(a,b){this.type="Box3Helper";this.box=a;b=b||16776960;a=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new H;c.setIndex(new G(a,1));c.setAttribute("position",new C([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3));ea.call(this,c,new ja({color:b,toneMapped:!1}));this.type="Box3Helper";this.geometry.computeBoundingSphere()}function qe(a,b,c){this.plane=a;this.size=void 0===b?1:b;a=void 0!==
|
|
|
-c?c:16776960;b=new H;b.setAttribute("position",new C([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,0,1,0,0,0],3));b.computeBoundingSphere();Ja.call(this,b,new ja({color:a,toneMapped:!1}));this.type="PlaneHelper";b=new H;b.setAttribute("position",new C([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3));b.computeBoundingSphere();this.add(new Z(b,new Na({color:a,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}function ub(a,b,c,d,e,f){x.call(this);this.type="ArrowHelper";void 0===
|
|
|
-a&&(a=new n(0,0,1));void 0===b&&(b=new n(0,0,0));void 0===c&&(c=1);void 0===d&&(d=16776960);void 0===e&&(e=.2*c);void 0===f&&(f=.2*e);void 0===yf&&(yf=new H,yf.setAttribute("position",new C([0,0,0,0,1,0],3)),Qg=new qb(0,.5,1,5,1),Qg.translate(0,-.5,0));this.position.copy(b);this.line=new Ja(yf,new ja({color:d,toneMapped:!1}));this.line.matrixAutoUpdate=!1;this.add(this.line);this.cone=new Z(Qg,new Na({color:d,toneMapped:!1}));this.cone.matrixAutoUpdate=!1;this.add(this.cone);this.setDirection(a);
|
|
|
-this.setLength(c,e,f)}function re(a){a=a||1;var b=[0,0,0,a,0,0,0,0,0,0,a,0,0,0,0,0,0,a];a=new H;a.setAttribute("position",new C(b,3));a.setAttribute("color",new C([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));b=new ja({vertexColors:!0,toneMapped:!1});ea.call(this,a,b);this.type="AxesHelper"}function Rg(a){this._renderer=a;this._pingPongRenderTarget=null;a=new Float32Array(20);var b=new n(0,1,0);this._blurMaterial=new rb({name:"SphericalGaussianBlur",defines:{n:20},uniforms:{envMap:{value:null},samples:{value:1},
|
|
|
-weights:{value:a},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:b},inputEncoding:{value:kb[3E3]},outputEncoding:{value:kb[3E3]}},vertexShader:Sg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform int samples;\nuniform float weights[n];\nuniform bool latitudinal;\nuniform float dTheta;\nuniform float mipInt;\nuniform vec3 poleAxis;\n\n"+Tg()+"\n\n#define ENVMAP_TYPE_CUBE_UV\n#include <cube_uv_reflection_fragment>\n\nvec3 getSample(float theta, vec3 axis) {\n\tfloat cosTheta = cos(theta);\n\t// Rodrigues' axis-angle rotation\n\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t+ cross(axis, vOutputDirection) * sin(theta)\n\t\t+ axis * dot(axis, vOutputDirection) * (1.0 - cosTheta);\n\treturn bilinearCubeUV(envMap, sampleDirection, mipInt);\n}\n\nvoid main() {\n\tvec3 axis = latitudinal ? poleAxis : cross(poleAxis, vOutputDirection);\n\tif (all(equal(axis, vec3(0.0))))\n\t\taxis = vec3(vOutputDirection.z, 0.0, - vOutputDirection.x);\n\taxis = normalize(axis);\n\tgl_FragColor = vec4(0.0);\n\tgl_FragColor.rgb += weights[0] * getSample(0.0, axis);\n\tfor (int i = 1; i < n; i++) {\n\t\tif (i >= samples)\n\t\t\tbreak;\n\t\tfloat theta = dTheta * float(i);\n\t\tgl_FragColor.rgb += weights[i] * getSample(-1.0 * theta, axis);\n\t\tgl_FragColor.rgb += weights[i] * getSample(theta, axis);\n\t}\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",
|
|
|
+(x.pushLight(a),a.castShadow&&x.pushShadow(a))});x.setupLights(b);var c=new WeakMap;a.traverse(function(b){var d=b.material;if(d)if(Array.isArray(d))for(var e=0;e<d.length;e++){var f=d[e];!1===c.has(f)&&(p(f,a,b),c.set(f))}else!1===c.has(d)&&(p(d,a,b),c.set(d))})};var Ea=null,Aa=new wh;Aa.setAnimationLoop(function(a){wa.isPresenting||Ea&&Ea(a)});"undefined"!==typeof window&&Aa.setContext(window);this.setAnimationLoop=function(a){Ea=a;wa.setAnimationLoop(a);null===a?Aa.stop():Aa.start()};this.render=
|
|
|
+function(a,b,c,d){if(void 0!==c){console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead.");var e=c}if(void 0!==d){console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead.");var f=d}if(void 0!==b&&!0!==b.isCamera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else if(!0!==C){ia.resetDefaultState();I=-1;L=null;!0===a.autoUpdate&&a.updateMatrixWorld();
|
|
|
+null===b.parent&&b.updateMatrixWorld();!0===wa.enabled&&!0===wa.isPresenting&&(b=wa.getCamera(b));if(!0===a.isScene)a.onBeforeRender(Q,a,b,e||G);x=va.get(a,b);x.init();Jd.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);la.setFromProjectionMatrix(Jd);kg=this.localClippingEnabled;ma=S.init(this.clippingPlanes,kg,b);P=ya.get(a,b);P.init();l(a,b,0,Q.sortObjects);P.finish();!0===Q.sortObjects&&P.sort(fa,ja);!0===ma&&S.beginShadows();Fa.render(x.state.shadowsArray,a,b);x.setupLights(b);!0===ma&&
|
|
|
+S.endShadows();!0===this.info.autoReset&&this.info.reset();void 0!==e&&this.setRenderTarget(e);pa.render(P,a,b,f);c=P.opaque;d=P.transparent;0<c.length&&m(c,a,b);0<d.length&&m(d,a,b);if(!0===a.isScene)a.onAfterRender(Q,a,b);null!==G&&(T.updateRenderTargetMipmap(G),T.updateMultisampleRenderTarget(G));oa.buffers.depth.setTest(!0);oa.buffers.depth.setMask(!0);oa.buffers.color.setMask(!0);oa.setPolygonOffset(!1);x=P=null}};this.setFramebuffer=function(a){E!==a&&null===G&&M.bindFramebuffer(36160,a);E=
|
|
|
+a};this.getActiveCubeFace=function(){return H};this.getActiveMipmapLevel=function(){return J};this.getRenderTarget=function(){return G};this.setRenderTarget=function(a,b,c){G=a;H=b;J=c;a&&void 0===Ha.get(a).__webglFramebuffer&&T.setupRenderTarget(a);var d=E,e=!1;a?(d=Ha.get(a).__webglFramebuffer,a.isWebGLCubeRenderTarget?(d=d[b||0],e=!0):d=a.isWebGLMultisampleRenderTarget?Ha.get(a).__webglMultisampledFramebuffer:d,V.copy(a.viewport),W.copy(a.scissor),Z=a.scissorTest):(V.copy(X).multiplyScalar(R).floor(),
|
|
|
+W.copy(ea).multiplyScalar(R).floor(),Z=ka);K!==d&&(M.bindFramebuffer(36160,d),K=d);oa.viewport(V);oa.scissor(W);oa.setScissorTest(Z);e&&(a=Ha.get(a.texture),M.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=Ha.get(a).__webglFramebuffer;a.isWebGLCubeRenderTarget&&void 0!==g&&(h=h[g]);if(h){g=!1;h!==K&&(M.bindFramebuffer(36160,h),g=!0);try{var l=a.texture,m=l.format,q=l.type;1023!==m&&qa.convert(m)!==
|
|
|
+M.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===q||qa.convert(q)===M.getParameter(35738)||1015===q&&(Ga.isWebGL2||na.get("OES_texture_float")||na.get("WEBGL_color_buffer_float"))||1016===q&&(Ga.isWebGL2?na.get("EXT_color_buffer_float"):na.get("EXT_color_buffer_half_float"))?36053===M.checkFramebufferStatus(36160)?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&M.readPixels(b,c,d,e,qa.convert(m),qa.convert(q),
|
|
|
+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&&M.bindFramebuffer(36160,K)}}}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=qa.convert(b.format);T.setTexture2D(b,0);M.copyTexImage2D(3553,c,f,a.x,a.y,e,d,0);oa.unbindTexture()};this.copyTextureToTexture=function(a,b,c,d){void 0===d&&(d=0);var e=b.image.width,f=b.image.height,g=qa.convert(c.format),h=qa.convert(c.type);T.setTexture2D(c,0);b.isDataTexture?M.texSubImage2D(3553,d,a.x,a.y,e,f,g,h,b.image.data):b.isCompressedTexture?M.compressedTexSubImage2D(3553,d,a.x,a.y,b.mipmaps[0].width,b.mipmaps[0].height,g,b.mipmaps[0].data):M.texSubImage2D(3553,
|
|
|
+d,a.x,a.y,g,h,b.image);0===d&&c.generateMipmaps&&M.generateMipmap(3553);oa.unbindTexture()};this.initTexture=function(a){T.setTexture2D(a,0);oa.unbindTexture()};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function mg(a){Kd.call(this,a)}function Ne(a,b){this.name="";this.color=new E(a);this.density=void 0!==b?b:2.5E-4}function Oe(a,b,c){this.name="";this.color=new E(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3}function Ia(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;this.uuid=O.generateUUID()}function Hb(a,b,c,d){this.name="";this.data=a;this.itemSize=b;this.offset=c;this.normalized=!0===d}function Ib(a){K.call(this);this.type="SpriteMaterial";this.color=new E(16777215);this.alphaMap=this.map=null;this.rotation=0;this.transparent=this.sizeAttenuation=!0;this.setValues(a)}function Ld(a){x.call(this);this.type="Sprite";if(void 0===
|
|
|
+Kc){Kc=new H;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 Ia(b,5);Kc.setIndex([0,1,2,0,2,3]);Kc.setAttribute("position",new Hb(b,3,0,!1));Kc.setAttribute("uv",new Hb(b,2,3,!1))}this.geometry=Kc;this.material=void 0!==a?a:new Ib;this.center=new u(.5,.5)}function Pe(a,b,c,d,e,f){Lc.subVectors(a,c).addScalar(.5).multiply(d);void 0!==e?(Md.x=f*Lc.x-e*Lc.y,Md.y=e*Lc.x+f*Lc.y):Md.copy(Lc);a.copy(b);a.x+=Md.x;a.y+=Md.y;a.applyMatrix4(Xh)}function Nd(){x.call(this);
|
|
|
+this._currentLevel=0;this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}});this.autoUpdate=!0}function Qe(a,b){a&&a.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");Z.call(this,a,b);this.type="SkinnedMesh";this.bindMode="attached";this.bindMatrix=new U;this.bindMatrixInverse=new U}function Re(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 U)}function ng(){x.call(this);this.type="Bone"}function Se(a,b,c){Z.call(this,a,b);this.instanceMatrix=new G(new Float32Array(16*c),16);this.count=c;this.frustumCulled=!1}function ja(a){K.call(this);this.type="LineBasicMaterial";this.color=new E(16777215);
|
|
|
+this.linewidth=1;this.linejoin=this.linecap="round";this.morphTargets=!1;this.setValues(a)}function Ja(a,b,c){1===c&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead.");x.call(this);this.type="Line";this.geometry=void 0!==a?a:new H;this.material=void 0!==b?b:new ja;this.updateMorphTargets()}function ea(a,b){Ja.call(this,a,b);this.type="LineSegments"}function Te(a,b){Ja.call(this,a,b);this.type="LineLoop"}function Va(a){K.call(this);this.type=
|
|
|
+"PointsMaterial";this.color=new E(16777215);this.alphaMap=this.map=null;this.size=1;this.sizeAttenuation=!0;this.morphTargets=!1;this.setValues(a)}function Mc(a,b){x.call(this);this.type="Points";this.geometry=void 0!==a?a:new H;this.material=void 0!==b?b:new Va;this.updateMorphTargets()}function og(a,b,c,d,e,f,g){var h=pg.distanceSqToPoint(a);h<c&&(c=new n,pg.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 qg(a,b,c,d,e,f,g,h,l){W.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 Nc(a,b,c,d,e,f,g,h,l,m,q,p){W.call(this,null,f,g,h,l,m,d,e,q,p);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=this.flipY=!1}function Od(a,b,c,d,e,f,g,h,l){W.call(this,a,b,c,d,e,f,g,h,l);this.needsUpdate=!0}function Pd(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);W.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 Oc(a){H.call(this);this.type="WireframeGeometry";var b=[],c=[0,0],d={},e=["a","b","c"];if(a&&a.isGeometry){for(var f=a.faces,g=0,h=f.length;g<h;g++)for(var l=
|
|
|
+f[g],m=0;3>m;m++){var q=l[e[m]],p=l[e[(m+1)%3]];c[0]=Math.min(q,p);c[1]=Math.max(q,p);q=c[0]+","+c[1];void 0===d[q]&&(d[q]={index1:c[0],index2:c[1]})}for(var k in d)c=d[k],f=a.vertices[c.index1],b.push(f.x,f.y,f.z),f=a.vertices[c.index2],b.push(f.x,f.y,f.z)}else if(a&&a.isBufferGeometry)if(k=new n,null!==a.index){e=a.attributes.position;g=a.index;a=a.groups;0===a.length&&(a=[{start:0,count:g.count,materialIndex:0}]);h=0;for(l=a.length;h<l;++h)for(q=a[h],m=p=q.start,q=p+q.count;m<q;m+=3)for(p=0;3>
|
|
|
+p;p++){var r=g.getX(m+p),t=g.getX(m+(p+1)%3);c[0]=Math.min(r,t);c[1]=Math.max(r,t);r=c[0]+","+c[1];void 0===d[r]&&(d[r]={index1:c[0],index2:c[1]})}for(f in d)c=d[f],k.fromBufferAttribute(e,c.index1),b.push(k.x,k.y,k.z),k.fromBufferAttribute(e,c.index2),b.push(k.x,k.y,k.z)}else for(d=a.attributes.position,c=0,f=d.count/3;c<f;c++)for(a=0;3>a;a++)k.fromBufferAttribute(d,3*c+a),b.push(k.x,k.y,k.z),k.fromBufferAttribute(d,3*c+(a+1)%3),b.push(k.x,k.y,k.z);this.setAttribute("position",new C(b,3))}function Qd(a,
|
|
|
+b,c){I.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new Pc(a,b,c));this.mergeVertices()}function Pc(a,b,c){H.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,q=new n,k=new n;3>a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");for(var A=b+1,r=0;r<=c;r++)for(var t=r/c,v=0;v<=b;v++){var y=v/
|
|
|
+b;a(y,t,l);e.push(l.x,l.y,l.z);0<=y-1E-5?(a(y-1E-5,t,m),q.subVectors(l,m)):(a(y+1E-5,t,m),q.subVectors(m,l));0<=t-1E-5?(a(y,t-1E-5,m),k.subVectors(l,m)):(a(y,t+1E-5,m),k.subVectors(m,l));h.crossVectors(q,k).normalize();f.push(h.x,h.y,h.z);g.push(y,t)}for(a=0;a<c;a++)for(h=0;h<b;h++)l=a*A+h+1,m=(a+1)*A+h+1,q=(a+1)*A+h,d.push(a*A+h,l,q),d.push(l,m,q);this.setIndex(d);this.setAttribute("position",new C(e,3));this.setAttribute("normal",new C(f,3));this.setAttribute("uv",new C(g,2))}function Rd(a,b,c,
|
|
|
+d){I.call(this);this.type="PolyhedronGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};this.fromBufferGeometry(new ia(a,b,c,d));this.mergeVertices()}function ia(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)}H.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);for(var l=c,m=d,k=g,B=Math.pow(2,a),w=[],u=0;u<=B;u++){w[u]=[];for(var F=l.clone().lerp(k,u/B),N=m.clone().lerp(k,u/B),z=B-u,x=0;x<=z;x++)w[u][x]=0===x&&u===B?F:F.clone().lerp(N,x/z)}for(l=0;l<B;l++)for(m=0;m<2*(B-l)-1;m++)k=Math.floor(m/2),0===m%2?(e(w[l][k+1]),e(w[l+1][k]),e(w[l][k])):(e(w[l][k+1]),e(w[l+1][k+1]),e(w[l+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 u,f=new u,k=new u,y=0,B=0;y<h.length;y+=9,B+=6){a.set(h[y+0],h[y+1],h[y+2]);b.set(h[y+3],h[y+4],h[y+5]);c.set(h[y+6],h[y+7],h[y+8]);e.set(l[B+0],l[B+1]);f.set(l[B+2],l[B+3]);k.set(l[B+4],l[B+5]);d.copy(a).add(b).add(c).divideScalar(3);
|
|
|
+var w=Math.atan2(d.z,-d.x);g(e,B+0,a,w);g(f,B+2,b,w);g(k,B+4,c,w)}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 C(h,3));this.setAttribute("normal",new C(h.slice(),3));this.setAttribute("uv",new C(l,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Sd(a,b){I.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Qc(a,
|
|
|
+b));this.mergeVertices()}function Qc(a,b){ia.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 Td(a,b){I.call(this);this.type="OctahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new bc(a,b));this.mergeVertices()}function bc(a,b){ia.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 Ud(a,b){I.call(this);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Rc(a,b));this.mergeVertices()}function Rc(a,b){var c=(1+Math.sqrt(5))/2;ia.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 Vd(a,b){I.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Sc(a,b));this.mergeVertices()}function Sc(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;ia.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 Wd(a,b,c,d,e,f){I.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 cc(a,b,c,d,e);this.tangents=a.tangents;
|
|
|
+this.normals=a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function cc(a,b,c,d,e){function f(e){q=a.getPointAt(e/b,q);var f=g.normals[e];e=g.binormals[e];for(var m=0;m<=d;m++){var p=m/d*Math.PI*2,r=Math.sin(p);p=-Math.cos(p);l.x=p*f.x+r*e.x;l.y=p*f.y+r*e.y;l.z=p*f.z+r*e.z;l.normalize();A.push(l.x,l.y,l.z);h.x=q.x+c*l.x;h.y=q.y+c*l.y;h.z=q.z+c*l.z;k.push(h.x,h.y,h.z)}}H.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 u,q=new n,k=[],A=[],r=[],t=[];(function(){for(var a=0;a<b;a++)f(a);f(!1===e?b:0);for(a=0;a<=b;a++)for(var c=0;c<=d;c++)m.x=a/b,m.y=c/d,r.push(m.x,m.y);for(a=1;a<=b;a++)for(c=1;c<=d;c++){var g=(d+1)*a+(c-1),h=(d+1)*a+c,l=(d+1)*(a-1)+c;t.push((d+1)*(a-1)+(c-1),g,l);t.push(g,h,l)}})();this.setIndex(t);this.setAttribute("position",
|
|
|
+new C(k,3));this.setAttribute("normal",new C(A,3));this.setAttribute("uv",new C(r,2))}function Xd(a,b,c,d,e,f,g){I.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 Tc(a,b,c,d,e,f));this.mergeVertices()}function Tc(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}H.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;for(var h=[],l=[],m=[],q=[],k=new n,A=new n,r=new n,t=new n,v=new n,y=new n,u=new n,w=0;w<=c;++w){var x=w/c*e*Math.PI*2;g(x,e,f,a,r);g(x+.01,e,f,a,t);y.subVectors(t,r);u.addVectors(t,r);v.crossVectors(y,u);u.crossVectors(v,y);v.normalize();u.normalize();
|
|
|
+for(x=0;x<=d;++x){var F=x/d*Math.PI*2,N=-b*Math.cos(F);F=b*Math.sin(F);k.x=r.x+(N*u.x+F*v.x);k.y=r.y+(N*u.y+F*v.y);k.z=r.z+(N*u.z+F*v.z);l.push(k.x,k.y,k.z);A.subVectors(k,r).normalize();m.push(A.x,A.y,A.z);q.push(w/c);q.push(x/d)}}for(a=1;a<=c;a++)for(b=1;b<=d;b++)e=(d+1)*a+(b-1),f=(d+1)*a+b,k=(d+1)*(a-1)+b,h.push((d+1)*(a-1)+(b-1),e,k),h.push(e,f,k);this.setIndex(h);this.setAttribute("position",new C(l,3));this.setAttribute("normal",new C(m,3));this.setAttribute("uv",new C(q,2))}function Yd(a,b,
|
|
|
+c,d,e){I.call(this);this.type="TorusGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};this.fromBufferGeometry(new Uc(a,b,c,d,e));this.mergeVertices()}function Uc(a,b,c,d,e){H.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;for(var f=[],g=[],h=[],l=[],m=new n,q=new n,k=new n,A=0;A<=c;A++)for(var r=0;r<=d;r++){var t=r/d*e,v=A/c*
|
|
|
+Math.PI*2;q.x=(a+b*Math.cos(v))*Math.cos(t);q.y=(a+b*Math.cos(v))*Math.sin(t);q.z=b*Math.sin(v);g.push(q.x,q.y,q.z);m.x=a*Math.cos(t);m.y=a*Math.sin(t);k.subVectors(q,m).normalize();h.push(k.x,k.y,k.z);l.push(r/d);l.push(A/c)}for(a=1;a<=c;a++)for(b=1;b<=d;b++)e=(d+1)*(a-1)+b-1,m=(d+1)*(a-1)+b,q=(d+1)*a+b,f.push((d+1)*a+b-1,e,q),f.push(e,m,q);this.setIndex(f);this.setAttribute("position",new C(g,3));this.setAttribute("normal",new C(h,3));this.setAttribute("uv",new C(l,2))}function Yh(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=Zh(e,a[e],a[e+1],f);else for(e=c-d;e>=b;e-=d)f=Zh(e,a[e],a[e+1],f);f&&Ue(f,f.next)&&(Zd(f),f=f.next);return f}function Jb(a,b){if(!a)return a;b||(b=a);do{var c=!1;if(a.steiner||!Ue(a,a.next)&&0!==ka(a.prev,a,a.next))a=a.next;else{Zd(a);a=b=a.prev;if(a===a.next)break;c=!0}}while(c||a!==b);return b}function $d(a,b,c,d,e,f,g){if(a){if(!g&&f){var h=a,l=h;do null===l.z&&(l.z=rg(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,q,k,A,r=1;do{l=h;var t=h=null;for(q=0;l;){q++;var n=l;for(m=k=0;m<r&&(k++,n=n.nextZ,n);m++);for(A=r;0<k||0<A&&n;)0!==k&&(0===A||!n||l.z<=n.z)?(m=l,l=l.nextZ,k--):(m=n,n=n.nextZ,A--),t?t.nextZ=m:h=m,m.prevZ=t,t=m;l=n}t.nextZ=null;r*=2}while(1<q)}for(h=a;a.prev!==a.next;){l=a.prev;n=a.next;if(f)t=Dk(a,d,e,f);else a:if(t=a,q=t.prev,k=t,r=t.next,0<=ka(q,k,r))t=!1;else{for(m=t.next.next;m!==t.prev;){if(Vc(q.x,q.y,k.x,k.y,r.x,r.y,m.x,m.y)&&0<=
|
|
|
+ka(m.prev,m,m.next)){t=!1;break a}m=m.next}t=!0}if(t)b.push(l.i/c),b.push(a.i/c),b.push(n.i/c),Zd(a),h=a=n.next;else if(a=n,a===h){if(!g)$d(Jb(a),b,c,d,e,f,1);else if(1===g){a=Jb(a);g=b;h=c;l=a;do n=l.prev,t=l.next.next,!Ue(n,t)&&$h(n,l,l.next,t)&&ae(n,t)&&ae(t,n)&&(g.push(n.i/h),g.push(l.i/h),g.push(t.i/h),Zd(l),Zd(l.next),l=a=t),l=l.next;while(l!==a);a=Jb(l);$d(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(t=l.next.i!==n.i&&l.prev.i!==n.i){b:{t=
|
|
|
+l;do{if(t.i!==l.i&&t.next.i!==l.i&&t.i!==n.i&&t.next.i!==n.i&&$h(t,t.next,l,n)){t=!0;break b}t=t.next}while(t!==l);t=!1}t=!t}if(t){if(t=ae(l,n)&&ae(n,l)){t=l;q=!1;k=(l.x+n.x)/2;r=(l.y+n.y)/2;do t.y>r!==t.next.y>r&&t.next.y!==t.y&&k<(t.next.x-t.x)*(r-t.y)/(t.next.y-t.y)+t.x&&(q=!q),t=t.next;while(t!==l);t=q}t=t&&(ka(l.prev,l,n.prev)||ka(l,n.prev,n))||Ue(l,n)&&0<ka(l.prev,l,l.next)&&0<ka(n.prev,n,n.next)}l=t}if(l){a=ai(g,h);g=Jb(g,g.next);a=Jb(a,a.next);$d(g,b,c,d,e,f);$d(a,b,c,d,e,f);break a}h=h.next}g=
|
|
|
+g.next}while(g!==a)}break}}}}function Dk(a,b,c,d){var e=a.prev,f=a.next;if(0<=ka(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=rg(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=rg(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&&Vc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=ka(c.prev,c,c.next))return!1;c=c.prevZ;if(d!==a.prev&&d!==a.next&&Vc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,
|
|
|
+d.y)&&0<=ka(d.prev,d,d.next))return!1;d=d.nextZ}for(;c&&c.z>=l;){if(c!==a.prev&&c!==a.next&&Vc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=ka(c.prev,c,c.next))return!1;c=c.prevZ}for(;d&&d.z<=b;){if(d!==a.prev&&d!==a.next&&Vc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=ka(d.prev,d,d.next))return!1;d=d.nextZ}return!0}function Ek(a,b){return a.x-b.x}function Fk(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;b=h;g=h.x;var l=h.y,m=Infinity;c=h;do{if(d>=c.x&&c.x>=g&&d!==c.x&&Vc(e<l?d:f,e,g,l,e<l?f:d,e,c.x,c.y)){var k=Math.abs(e-c.y)/(d-c.x);var p;if((p=ae(c,a))&&!(p=k<m)&&(p=k===m)&&!(p=c.x>h.x)&&(p=c.x===h.x)){p=h;var A=c;p=0>ka(p.prev,p,A.prev)&&0>ka(A.next,p,p.next)}p&&(h=c,m=k)}c=c.next}while(c!==b);return h}function rg(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 Gk(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 Vc(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 ka(a,b,c){return(b.y-a.y)*(c.x-b.x)-(b.x-a.x)*(c.y-b.y)}function Ue(a,b){return a.x===b.x&&a.y===b.y}function $h(a,
|
|
|
+b,c,d){var e=Ve(ka(a,b,c)),f=Ve(ka(a,b,d)),g=Ve(ka(c,d,a)),h=Ve(ka(c,d,b));return e!==f&&g!==h||0===e&&We(a,c,b)||0===f&&We(a,d,b)||0===g&&We(c,a,d)||0===h&&We(c,b,d)?!0:!1}function We(a,b,c){return b.x<=Math.max(a.x,c.x)&&b.x>=Math.min(a.x,c.x)&&b.y<=Math.max(a.y,c.y)&&b.y>=Math.min(a.y,c.y)}function Ve(a){return 0<a?1:0>a?-1:0}function ae(a,b){return 0>ka(a.prev,a,a.next)?0<=ka(a,b,a.next)&&0<=ka(a,a.prev,b):0>ka(a,b,a.prev)||0>ka(a,a.next,b)}function ai(a,b){var c=new sg(a.i,a.x,a.y),d=new sg(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 Zh(a,b,c,d){a=new sg(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 Zd(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 sg(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 bi(a){var b=a.length;2<b&&a[b-1].equals(a[0])&&
|
|
|
+a.pop()}function ci(a,b){for(var c=0;c<b.length;c++)a.push(b[c].x),a.push(b[c].y)}function dc(a,b){I.call(this);this.type="ExtrudeGeometry";this.parameters={shapes:a,options:b};this.fromBufferGeometry(new fb(a,b));this.mergeVertices()}function fb(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 u(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 u(f/e,d/e)}function h(a,b){for(var c=a.length;0<=--c;){var f=c,g=c-1;0>g&&(g=a.length-1);for(var h=0,l=w+2*C;h<l;h++){var m=W*h,k=W*(h+
|
|
|
+1),q=b+g+m,p=b+g+k;k=b+f+k;t(b+f+m);t(q);t(k);t(q);t(p);t(k);m=e.length/3;m=D.generateSideWallUV(d,e,m-6,m-3,m-2,m-1);v(m[0]);v(m[1]);v(m[3]);v(m[1]);v(m[2]);v(m[3])}}}function l(a,b,c){y.push(a);y.push(b);y.push(c)}function k(a,b,c){t(a);t(b);t(c);a=e.length/3;a=D.generateTopUV(d,e,a-3,a-2,a-1);v(a[0]);v(a[1]);v(a[2])}function t(a){e.push(y[3*a]);e.push(y[3*a+1]);e.push(y[3*a+2])}function v(a){f.push(a.x);f.push(a.y)}var y=[],B=void 0!==b.curveSegments?b.curveSegments:12,w=void 0!==b.steps?b.steps:
|
|
|
+1,x=void 0!==b.depth?b.depth:100,F=void 0!==b.bevelEnabled?b.bevelEnabled:!0,N=void 0!==b.bevelThickness?b.bevelThickness:6,z=void 0!==b.bevelSize?b.bevelSize:N-2,P=void 0!==b.bevelOffset?b.bevelOffset:0,C=void 0!==b.bevelSegments?b.bevelSegments:3,Q=b.extrudePath,D=void 0!==b.UVGenerator?b.UVGenerator:Hk;void 0!==b.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),x=b.amount);var E=!1;if(Q){var H=Q.getSpacedPoints(w);E=!0;F=!1;var G=Q.computeFrenetFrames(w,!1);
|
|
|
+var J=new n;var K=new n;var I=new n}F||(P=z=N=C=0);a=a.extractPoints(B);Q=a.shape;var O=a.holes;if(!pb.isClockWise(Q))for(Q=Q.reverse(),a=0,B=O.length;a<B;a++){var L=O[a];pb.isClockWise(L)&&(O[a]=L.reverse())}var U=pb.triangulateShape(Q,O),V=Q;a=0;for(B=O.length;a<B;a++)Q=Q.concat(O[a]);var W=Q.length,aa=U.length;a=[];B=0;L=V.length;for(var da=L-1,R=B+1;B<L;B++,da++,R++)da===L&&(da=0),R===L&&(R=0),a[B]=g(V[B],V[da],V[R]);B=[];L=a.concat();R=0;for(var S=O.length;R<S;R++){var T=O[R];da=[];for(var X=
|
|
|
+0,Y=T.length,ba=Y-1,Z=X+1;X<Y;X++,ba++,Z++)ba===Y&&(ba=0),Z===Y&&(Z=0),da[X]=g(T[X],T[ba],T[Z]);B.push(da);L=L.concat(da)}for(R=0;R<C;R++){da=R/C;S=N*Math.cos(da*Math.PI/2);T=z*Math.sin(da*Math.PI/2)+P;da=0;for(X=V.length;da<X;da++)Y=c(V[da],a[da],T),l(Y.x,Y.y,-S);X=0;for(Y=O.length;X<Y;X++){ba=O[X];da=B[X];Z=0;for(var ea=ba.length;Z<ea;Z++){var fa=c(ba[Z],da[Z],T);l(fa.x,fa.y,-S)}}}da=z+P;for(R=0;R<W;R++)S=F?c(Q[R],L[R],da):Q[R],E?(K.copy(G.normals[0]).multiplyScalar(S.x),J.copy(G.binormals[0]).multiplyScalar(S.y),
|
|
|
+I.copy(H[0]).add(K).add(J),l(I.x,I.y,I.z)):l(S.x,S.y,0);for(R=1;R<=w;R++)for(S=0;S<W;S++)T=F?c(Q[S],L[S],da):Q[S],E?(K.copy(G.normals[R]).multiplyScalar(T.x),J.copy(G.binormals[R]).multiplyScalar(T.y),I.copy(H[R]).add(K).add(J),l(I.x,I.y,I.z)):l(T.x,T.y,x/w*R);for(G=C-1;0<=G;G--){K=G/C;J=N*Math.cos(K*Math.PI/2);K=z*Math.sin(K*Math.PI/2)+P;I=0;for(Q=V.length;I<Q;I++)L=c(V[I],a[I],K),l(L.x,L.y,x+J);I=0;for(Q=O.length;I<Q;I++)for(L=O[I],da=B[I],R=0,S=L.length;R<S;R++)T=c(L[R],da[R],K),E?l(T.x,T.y+H[w-
|
|
|
+1].y,H[w-1].x+J):l(T.x,T.y,x+J)}(function(){var a=e.length/3;if(F){for(var b=0*W,c=0;c<aa;c++){var f=U[c];k(f[2]+b,f[1]+b,f[0]+b)}b=W*(w+2*C);for(c=0;c<aa;c++)f=U[c],k(f[0]+b,f[1]+b,f[2]+b)}else{for(b=0;b<aa;b++)c=U[b],k(c[2],c[1],c[0]);for(b=0;b<aa;b++)c=U[b],k(c[0]+W*w,c[1]+W*w,c[2]+W*w)}d.addGroup(a,e.length/3-a,0)})();(function(){var a=e.length/3,b=0;h(V,b);b+=V.length;for(var c=0,f=O.length;c<f;c++){var g=O[c];h(g,b);b+=g.length}d.addGroup(a,e.length/3-a,1)})()}H.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 C(e,3));this.setAttribute("uv",new C(f,2));this.computeVertexNormals()}function di(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 be(a,b){I.call(this);this.type="TextGeometry";this.parameters=
|
|
|
+{text:a,parameters:b};this.fromBufferGeometry(new Wc(a,b));this.mergeVertices()}function Wc(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 I;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);fb.call(this,a,b);this.type="TextBufferGeometry"}function ce(a,b,c,d,
|
|
|
+e,f,g){I.call(this);this.type="SphereGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};this.fromBufferGeometry(new ec(a,b,c,d,e,f,g));this.mergeVertices()}function ec(a,b,c,d,e,f,g){H.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;for(var h=Math.min(f+g,Math.PI),l=0,m=[],k=new n,p=new n,A=[],r=[],t=[],v=[],y=0;y<=c;y++){var u=[],w=y/c,x=0;0==y&&0==f?x=.5/b:y==c&&h==Math.PI&&(x=-.5/b);for(var F=0;F<=b;F++){var N=F/b;k.x=-a*Math.cos(d+N*e)*Math.sin(f+w*g);k.y=a*Math.cos(f+w*g);k.z=a*Math.sin(d+N*e)*Math.sin(f+w*g);r.push(k.x,k.y,k.z);p.copy(k).normalize();t.push(p.x,p.y,p.z);v.push(N+x,1-w);u.push(l++)}m.push(u)}for(a=0;a<c;a++)for(d=0;d<b;d++)e=m[a][d+1],g=m[a][d],l=m[a+
|
|
|
+1][d],k=m[a+1][d+1],(0!==a||0<f)&&A.push(e,g,k),(a!==c-1||h<Math.PI)&&A.push(g,l,k);this.setIndex(A);this.setAttribute("position",new C(r,3));this.setAttribute("normal",new C(t,3));this.setAttribute("uv",new C(v,2))}function de(a,b,c,d,e,f){I.call(this);this.type="RingGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,thetaLength:f};this.fromBufferGeometry(new Xc(a,b,c,d,e,f));this.mergeVertices()}function Xc(a,b,c,d,e,f){H.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=[],k=a;a=(b-a)/d;for(var p=new n,A=new u,r=0;r<=d;r++){for(var t=0;t<=c;t++){var v=e+t/c*f;p.x=k*Math.cos(v);p.y=k*Math.sin(v);h.push(p.x,p.y,p.z);l.push(0,0,1);A.x=(p.x/b+1)/2;A.y=(p.y/b+1)/2;m.push(A.x,A.y)}k+=a}for(b=0;b<d;b++)for(e=b*(c+1),f=0;f<c;f++)k=f+e,
|
|
|
+a=k+c+1,p=k+c+2,A=k+1,g.push(k,a,A),g.push(a,p,A);this.setIndex(g);this.setAttribute("position",new C(h,3));this.setAttribute("normal",new C(l,3));this.setAttribute("uv",new C(m,2))}function ee(a,b,c,d){I.call(this);this.type="LatheGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};this.fromBufferGeometry(new Yc(a,b,c,d));this.mergeVertices()}function Yc(a,b,c,d){H.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=O.clamp(d,0,2*Math.PI);for(var e=[],f=[],g=[],h=1/b,l=new n,m=new u,k=0;k<=b;k++){var p=c+k*h*d,A=Math.sin(p);p=Math.cos(p);for(var r=0;r<=a.length-1;r++)l.x=a[r].x*A,l.y=a[r].y,l.z=a[r].x*p,f.push(l.x,l.y,l.z),m.x=k/b,m.y=r/(a.length-1),g.push(m.x,m.y)}for(c=0;c<b;c++)for(h=0;h<a.length-1;h++)l=h+c*a.length,m=l+a.length,k=l+a.length+1,A=l+1,e.push(l,m,A),e.push(m,k,A);this.setIndex(e);this.setAttribute("position",new C(f,3));this.setAttribute("uv",new C(g,2));this.computeVertexNormals();
|
|
|
+if(d===2*Math.PI)for(d=this.attributes.normal.array,e=new n,f=new n,g=new n,b=b*a.length*3,h=c=0;c<a.length;c++,h+=3)e.x=d[h+0],e.y=d[h+1],e.z=d[h+2],f.x=d[b+h+0],f.y=d[b+h+1],f.z=d[b+h+2],g.addVectors(e,f).normalize(),d[h+0]=d[b+h+0]=g.x,d[h+1]=d[b+h+1]=g.y,d[h+2]=d[b+h+2]=g.z}function fc(a,b){I.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 gc(a,
|
|
|
+b));this.mergeVertices()}function gc(a,b){function c(a){var c=e.length/3,h=a.extractPoints(b);a=h.shape;var m=h.holes;!1===pb.isClockWise(a)&&(a=a.reverse());h=0;for(var k=m.length;h<k;h++){var q=m[h];!0===pb.isClockWise(q)&&(m[h]=q.reverse())}h=pb.triangulateShape(a,m);k=0;for(q=m.length;k<q;k++)a=a.concat(m[k]);m=0;for(k=a.length;m<k;m++)q=a[m],e.push(q.x,q.y,0),f.push(0,0,1),g.push(q.x,q.y);a=0;for(m=h.length;a<m;a++)k=h[a],d.push(k[0]+c,k[1]+c,k[2]+c),l+=3}H.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 C(e,3));this.setAttribute("normal",new C(f,3));this.setAttribute("uv",new C(g,2))}function ei(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 Zc(a,b){H.call(this);this.type="EdgesGeometry";
|
|
|
+this.parameters={thresholdAngle:b};var c=[];b=Math.cos(O.DEG2RAD*(void 0!==b?b:1));var d=[0,0],e={},f=["a","b","c"];if(a.isBufferGeometry){var g=new I;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 p=m[f[k]];var n=m[f[(k+1)%3]];d[0]=Math.min(p,n);d[1]=Math.max(p,n);p=d[0]+","+d[1];void 0===e[p]?e[p]={index1:d[0],index2:d[1],face1:h,face2:void 0}:e[p].face2=h}for(p in e)if(d=e[p],
|
|
|
+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 C(c,3))}function hc(a,b,c,d,e,f,g,h){I.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 u,l=new n,
|
|
|
+q=0,v=!0===c?a:b,w=!0===c?1:-1;var x=t;for(e=1;e<=d;e++)p.push(0,y*w,0),A.push(0,w,0),r.push(.5,.5),t++;e=t;for(var C=0;C<=d;C++){var D=C/d*h+g,E=Math.cos(D);D=Math.sin(D);l.x=v*D;l.y=y*w;l.z=v*E;p.push(l.x,l.y,l.z);A.push(0,w,0);f.x=.5*E+.5;f.y=.5*D*w+.5;r.push(f.x,f.y);t++}for(f=0;f<d;f++)l=x+f,v=e+f,!0===c?k.push(v,v+1,l):k.push(v+1,v,l),q+=3;m.addGroup(B,q,!0===c?1:2);B+=q}H.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=[],p=[],A=[],r=[],t=0,v=[],y=c/2,B=0;(function(){for(var f=new n,l=new n,q=0,u=(b-a)/c,z=0;z<=e;z++){for(var x=[],C=z/e,D=C*(b-a)+a,E=0;E<=d;E++){var G=E/d,H=G*h+g,I=Math.sin(H);H=Math.cos(H);l.x=D*I;l.y=-C*c+y;l.z=D*H;p.push(l.x,l.y,l.z);f.set(I,u,H).normalize();A.push(f.x,f.y,f.z);r.push(G,1-C);x.push(t++)}v.push(x)}for(f=
|
|
|
+0;f<d;f++)for(l=0;l<e;l++)u=v[l+1][f],z=v[l+1][f+1],x=v[l][f+1],k.push(v[l][f],u,x),k.push(u,z,x),q+=6;m.addGroup(B,q,0);B+=q})();!1===f&&(0<a&&l(!0),0<b&&l(!1));this.setIndex(k);this.setAttribute("position",new C(p,3));this.setAttribute("normal",new C(A,3));this.setAttribute("uv",new C(r,2))}function fe(a,b,c,d,e,f,g){hc.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 ge(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 he(a,b,c,d){I.call(this);this.type="CircleGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};this.fromBufferGeometry(new $c(a,b,c,d));this.mergeVertices()}function $c(a,b,c,d){H.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=new n,m=new u;f.push(0,0,0);g.push(0,0,1);h.push(.5,.5);for(var k=0,p=3;k<=b;k++,p+=3){var A=c+k/b*d;l.x=a*Math.cos(A);l.y=a*Math.sin(A);f.push(l.x,l.y,l.z);g.push(0,0,1);m.x=(f[p]/a+1)/2;m.y=(f[p+1]/a+1)/2;h.push(m.x,m.y)}for(a=1;a<=b;a++)e.push(a,a+1,0);this.setIndex(e);this.setAttribute("position",new C(f,3));this.setAttribute("normal",new C(g,3));this.setAttribute("uv",new C(h,2))}function ic(a){K.call(this);
|
|
|
+this.type="ShadowMaterial";this.color=new E(0);this.transparent=!0;this.setValues(a)}function rb(a){Ba.call(this,a);this.type="RawShaderMaterial"}function gb(a){K.call(this);this.defines={STANDARD:""};this.type="MeshStandardMaterial";this.color=new E(16777215);this.roughness=1;this.metalness=0;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new E(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=
|
|
|
+null;this.normalMapType=0;this.normalScale=new u(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.vertexTangents=this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function jc(a){gb.call(this);this.defines={STANDARD:"",PHYSICAL:""};this.type=
|
|
|
+"MeshPhysicalMaterial";this.clearcoat=0;this.clearcoatMap=null;this.clearcoatRoughness=0;this.clearcoatRoughnessMap=null;this.clearcoatNormalScale=new u(1,1);this.clearcoatNormalMap=null;this.reflectivity=.5;this.sheen=null;this.transparency=0;this.setValues(a)}function Kb(a){K.call(this);this.type="MeshPhongMaterial";this.color=new E(16777215);this.specular=new E(1118481);this.shininess=30;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new E(0);
|
|
|
+this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new u(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 kc(a){K.call(this);
|
|
|
+this.defines={TOON:""};this.type="MeshToonMaterial";this.color=new E(16777215);this.specular=new E(1118481);this.shininess=30;this.lightMap=this.gradientMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new E(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new u(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 lc(a){K.call(this);this.type="MeshNormalMaterial";this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new u(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 mc(a){K.call(this);this.type="MeshLambertMaterial";this.color=new E(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new E(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 nc(a){K.call(this);this.defines={MATCAP:""};this.type="MeshMatcapMaterial";this.color=new E(16777215);this.bumpMap=this.map=this.matcap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new u(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 oc(a){ja.call(this);this.type="LineDashedMaterial";this.scale=
|
|
|
+1;this.dashSize=3;this.gapSize=1;this.setValues(a)}function Ka(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 Xe(a,b,c,d){Ka.call(this,a,b,c,d);this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function ie(a,b,c,d){Ka.call(this,a,b,c,d)}function Ye(a,b,c,d){Ka.call(this,a,b,c,d)}function sa(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=X.convertArray(b,this.TimeBufferType);this.values=X.convertArray(c,this.ValueBufferType);this.setInterpolation(d||this.DefaultInterpolation)}function Ze(a,b,c){sa.call(this,a,b,c)}function $e(a,b,c,d){sa.call(this,a,b,c,d)}function ad(a,b,c,d){sa.call(this,a,b,c,d)}function af(a,b,c,d){Ka.call(this,a,b,c,d)}function je(a,b,c,d){sa.call(this,a,b,c,d)}function bf(a,b,c,d){sa.call(this,
|
|
|
+a,b,c,d)}function bd(a,b,c,d){sa.call(this,a,b,c,d)}function Qa(a,b,c,d){this.name=a;this.tracks=c;this.duration=void 0!==b?b:-1;this.blendMode=void 0!==d?d:2500;this.uuid=O.generateUUID();0>this.duration&&this.resetDuration()}function Ik(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return ad;case "vector":case "vector2":case "vector3":case "vector4":return bd;case "color":return $e;case "quaternion":return je;case "bool":case "boolean":return Ze;
|
|
|
+case "string":return bf}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+a);}function Jk(a){if(void 0===a.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var b=Ik(a.type);if(void 0===a.times){var c=[],d=[];X.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 tg(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 V(a){this.manager=void 0!==a?a:fi;this.crossOrigin="anonymous";this.resourcePath=this.path="";this.requestHeader={}}function Ra(a){V.call(this,a)}function ug(a){V.call(this,a)}function vg(a){V.call(this,a)}function cf(a){V.call(this,a)}function cd(a){V.call(this,a)}function df(a){V.call(this,a)}function ef(a){V.call(this,a)}function J(){this.type="Curve";this.arcLengthDivisions=
|
|
|
+200}function La(a,b,c,d,e,f,g,h){J.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 dd(a,b,c,d,e,f){La.call(this,a,b,c,c,d,e,f);this.type="ArcCurve"}function wg(){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 va(a,b,c,d){J.call(this);this.type="CatmullRomCurve3";this.points=a||[];this.closed=b||!1;this.curveType=c||"centripetal";this.tension=d||.5}function gi(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 ke(a,b,c,d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function le(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 Wa(a,b,c,d){J.call(this);this.type="CubicBezierCurve";this.v0=a||new u;this.v1=b||new u;this.v2=c||new u;this.v3=d||new u}function hb(a,b,c,d){J.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 wa(a,b){J.call(this);this.type="LineCurve";this.v1=a||new u;this.v2=b||new u}function Xa(a,b){J.call(this);this.type="LineCurve3";this.v1=a||new n;this.v2=b||new n}function Ya(a,b,c){J.call(this);
|
|
|
+this.type="QuadraticBezierCurve";this.v0=a||new u;this.v1=b||new u;this.v2=c||new u}function ib(a,b,c){J.call(this);this.type="QuadraticBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n}function Za(a){J.call(this);this.type="SplineCurve";this.points=a||[]}function sb(){J.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function $a(a){sb.call(this);this.type="Path";this.currentPoint=new u;a&&this.setFromPoints(a)}function Lb(a){$a.call(this,a);this.uuid=O.generateUUID();
|
|
|
+this.type="Shape";this.holes=[]}function aa(a,b){x.call(this);this.type="Light";this.color=new E(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function ff(a,b,c){aa.call(this,a,c);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(x.DefaultUp);this.updateMatrix();this.groundColor=new E(b)}function jb(a){this.camera=a;this.normalOffset=this.bias=0;this.radius=1;this.mapSize=new u(512,512);this.mapPass=this.map=null;this.matrix=new U;this._frustum=new Fc;this._frameExtents=
|
|
|
+new u(1,1);this._viewportCount=1;this._viewports=[new ba(0,0,1,1)]}function gf(){jb.call(this,new ma(50,1,.5,500))}function hf(a,b,c,d,e,f){aa.call(this,a,b);this.type="SpotLight";this.position.copy(x.DefaultUp);this.updateMatrix();this.target=new x;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 gf}function xg(){jb.call(this,new ma(90,1,.5,500));this._frameExtents=new u(4,2);this._viewportCount=6;this._viewports=[new ba(2,1,1,1),new ba(0,1,1,1),new ba(3,1,1,1),new ba(1,1,1,1),new ba(3,0,1,1),new ba(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 jf(a,b,c,d){aa.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 xg}function ed(a,b,c,d,e,f){db.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 kf(){jb.call(this,new ed(-5,5,
|
|
|
+5,-5,.5,500))}function lf(a,b){aa.call(this,a,b);this.type="DirectionalLight";this.position.copy(x.DefaultUp);this.updateMatrix();this.target=new x;this.shadow=new kf}function mf(a,b){aa.call(this,a,b);this.type="AmbientLight";this.castShadow=void 0}function nf(a,b,c,d){aa.call(this,a,b);this.type="RectAreaLight";this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function of(){this.coefficients=[];for(var a=0;9>a;a++)this.coefficients.push(new n)}function Sa(a,b){aa.call(this,void 0,b);this.type=
|
|
|
+"LightProbe";this.sh=void 0!==a?a:new of}function pf(a){V.call(this,a);this.textures={}}function me(){H.call(this);this.type="InstancedBufferGeometry";this.instanceCount=Infinity}function qf(a,b,c,d){"number"===typeof c&&(d=c,c=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));G.call(this,a,b,c);this.meshPerAttribute=d||1}function rf(a){V.call(this,a)}function sf(a){V.call(this,a)}function yg(a){"undefined"===typeof createImageBitmap&&
|
|
|
+console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");V.call(this,a);this.options={premultiplyAlpha:"none"}}function zg(){this.type="ShapePath";this.color=new E;this.subPaths=[];this.currentPath=null}function Ag(a){this.type="Font";this.data=a}function Bg(a){V.call(this,a)}function tf(a){V.call(this,a)}function Cg(a,b,c){Sa.call(this,void 0,c);a=(new E).set(a);c=(new E).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 Dg(a,b){Sa.call(this,void 0,b);a=(new E).set(a);this.sh.coefficients[0].set(a.r,a.g,a.b).multiplyScalar(2*Math.sqrt(Math.PI))}function hi(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new ma;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new ma;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 Eg(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}function Fg(){x.call(this);this.type="AudioListener";this.context=Gg.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0;this._clock=new Eg}function fd(a){x.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._progress=this._startedAt=0;this.filters=[]}function Hg(a){fd.call(this,a);this.panner=this.context.createPanner();this.panner.panningModel="HRTF";this.panner.connect(this.gain)}function Ig(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 Jg(a,b,c){this.binding=a;this.valueSize=c;switch(b){case "quaternion":a=this._slerp;b=this._slerpAdditive;var d=this._setAdditiveIdentityQuaternion;this.buffer=new Float64Array(6*c);this._workIndex=5;break;case "string":case "bool":b=a=this._select;d=this._setAdditiveIdentityOther;this.buffer=Array(5*c);break;default:a=
|
|
|
+this._lerp,b=this._lerpAdditive,d=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*c)}this._mixBufferRegion=a;this._mixBufferRegionAdditive=b;this._setIdentity=d;this._origIndex=3;this._addIndex=4;this.referenceCount=this.useCount=this.cumulativeWeightAdditive=this.cumulativeWeight=0}function ii(a,b,c){c=c||pa.parseTrackName(b);this._targetGroup=a;this._bindings=a.subscribe_(b,c)}function pa(a,b,c){this.path=b;this.parsedPath=c||pa.parseTrackName(b);this.node=pa.findNode(a,this.parsedPath.nodeName)||
|
|
|
+a;this.rootNode=a}function ji(){this.uuid=O.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 ki(a,b,
|
|
|
+c,d){this._mixer=a;this._clip=b;this._localRoot=c||null;this.blendMode=d||b.blendMode;a=b.tracks;b=a.length;c=Array(b);d={endingStart:2400,endingEnd:2400};for(var 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 Kg(a){this._root=a;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function uf(a,b){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),a=b);this.value=a}function Lg(a,b,c){Ia.call(this,a,b);this.meshPerAttribute=c||1}function Mg(a,b,c,d){this.ray=new Ub(a,b);this.near=
|
|
|
+c||0;this.far=d||Infinity;this.camera=null;this.layers=new De;this.params={Mesh:{},Line:{threshold:1},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 li(a,b){return a.distance-b.distance}function Ng(a,b,c,d){a.layers.test(b.layers)&&a.raycast(b,c);if(!0===d){a=a.children;d=0;for(var e=a.length;d<e;d++)Ng(a[d],b,c,!0)}}function mi(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 ni(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 Og(a,b){this.min=void 0!==a?a:new u(Infinity,Infinity);this.max=void 0!==b?b:new u(-Infinity,-Infinity)}function Pg(a,b){this.start=void 0!==a?a:new n;this.end=void 0!==b?b:new n}function ne(a){x.call(this);this.material=a;this.render=function(){};this.hasUvs=this.hasColors=this.hasNormals=this.hasPositions=
|
|
|
+!1;this.uvArray=this.colorArray=this.normalArray=this.positionArray=null;this.count=0}function gd(a,b){x.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=b;a=new H;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 C(b,3));b=new ja({fog:!1,toneMapped:!1});this.cone=
|
|
|
+new ea(a,b);this.add(this.cone);this.update()}function oi(a){var b=[];a&&a.isBone&&b.push(a);for(var c=0;c<a.children.length;c++)b.push.apply(b,oi(a.children[c]));return b}function pc(a){for(var b=oi(a),c=new H,d=[],e=[],f=new E(0,0,1),g=new E(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 C(d,3));c.setAttribute("color",new C(e,3));d=new ja({vertexColors:!0,depthTest:!1,depthWrite:!1,
|
|
|
+toneMapped:!1,transparent:!0});ea.call(this,c,d);this.type="SkeletonHelper";this.root=a;this.bones=b;this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1}function hd(a,b,c){this.light=a;this.light.updateMatrixWorld();this.color=c;a=new ec(b,4,2);b=new Na({wireframe:!0,fog:!1,toneMapped:!1});Z.call(this,a,b);this.type="PointLightHelper";this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=!1;this.update()}function id(a,b,c){x.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;
|
|
|
+this.matrixAutoUpdate=!1;this.color=c;a=new bc(b);a.rotateY(.5*Math.PI);this.material=new Na({wireframe:!0,fog:!1,toneMapped:!1});void 0===this.color&&(this.material.vertexColors=!0);b=a.getAttribute("position");b=new Float32Array(3*b.count);a.setAttribute("color",new G(b,3));this.add(new Z(a,this.material));this.update()}function vf(a,b,c,d){a=a||10;b=b||10;c=new E(void 0!==c?c:4473924);d=new E(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 p=l===e?c:d;p.toArray(h,m);m+=3;p.toArray(h,m);m+=3;p.toArray(h,m);m+=3;p.toArray(h,m);m+=3}b=new H;b.setAttribute("position",new C(a,3));b.setAttribute("color",new C(h,3));c=new ja({vertexColors:!0,toneMapped:!1});ea.call(this,b,c);this.type="GridHelper"}function wf(a,b,c,d,e,f){a=a||10;b=b||16;c=c||8;d=d||64;e=new E(void 0!==e?e:4473924);f=new E(void 0!==f?f:8947848);for(var g=[],h=[],l=0;l<=b;l++){var m=l/b*2*Math.PI,k=Math.sin(m)*a;m=Math.cos(m)*a;g.push(0,0,
|
|
|
+0);g.push(k,0,m);k=l&1?e:f;h.push(k.r,k.g,k.b);h.push(k.r,k.g,k.b)}for(b=0;b<=c;b++)for(l=b&1?e:f,k=a-a/c*b,m=0;m<d;m++){var p=m/d*2*Math.PI,n=Math.sin(p)*k;p=Math.cos(p)*k;g.push(n,0,p);h.push(l.r,l.g,l.b);p=(m+1)/d*2*Math.PI;n=Math.sin(p)*k;p=Math.cos(p)*k;g.push(n,0,p);h.push(l.r,l.g,l.b)}a=new H;a.setAttribute("position",new C(g,3));a.setAttribute("color",new C(h,3));g=new ja({vertexColors:!0,toneMapped:!1});ea.call(this,a,g);this.type="PolarGridHelper"}function jd(a,b,c){x.call(this);this.light=
|
|
|
+a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;void 0===b&&(b=1);a=new H;a.setAttribute("position",new C([-b,b,0,b,b,0,b,-b,0,-b,-b,0,-b,b,0],3));b=new ja({fog:!1,toneMapped:!1});this.lightPlane=new Ja(a,b);this.add(this.lightPlane);a=new H;a.setAttribute("position",new C([0,0,0,0,0,1],3));this.targetLine=new Ja(a,b);this.add(this.targetLine);this.update()}function oe(a){function b(a,b,d){c(a,d);c(b,d)}function c(a,b){f.push(0,0,0);g.push(b.r,b.g,
|
|
|
+b.b);void 0===h[a]&&(h[a]=[]);h[a].push(f.length/3-1)}var d=new H,e=new ja({color:16777215,vertexColors:!0,toneMapped:!1}),f=[],g=[],h={},l=new E(16755200),m=new E(16711680),k=new E(43775),p=new E(16777215),n=new E(3355443);b("n1","n2",l);b("n2","n4",l);b("n4","n3",l);b("n3","n1",l);b("f1","f2",l);b("f2","f4",l);b("f4","f3",l);b("f3","f1",l);b("n1","f1",l);b("n2","f2",l);b("n3","f3",l);b("n4","f4",l);b("p","n1",m);b("p","n2",m);b("p","n3",m);b("p","n4",m);b("u1","u2",k);b("u2","u3",k);b("u3","u1",
|
|
|
+k);b("c","t",p);b("p","c",n);b("cn1","cn2",n);b("cn3","cn4",n);b("cf1","cf2",n);b("cf3","cf4",n);d.setAttribute("position",new C(f,3));d.setAttribute("color",new C(g,3));ea.call(this,d,e);this.type="CameraHelper";this.camera=a;this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.pointMap=h;this.update()}function S(a,b,c,d,e,f,g){xf.set(e,f,g).unproject(d);a=b[a];if(void 0!==a)for(c=c.getAttribute("position"),b=0,d=a.length;b<
|
|
|
+d;b++)c.setXYZ(a[b],xf.x,xf.y,xf.z)}function tb(a,b){this.object=a;void 0===b&&(b=16776960);a=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new Float32Array(24),d=new H;d.setIndex(new G(a,1));d.setAttribute("position",new G(c,3));ea.call(this,d,new ja({color:b,toneMapped:!1}));this.type="BoxHelper";this.matrixAutoUpdate=!1;this.update()}function pe(a,b){this.type="Box3Helper";this.box=a;b=b||16776960;a=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=
|
|
|
+new H;c.setIndex(new G(a,1));c.setAttribute("position",new C([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3));ea.call(this,c,new ja({color:b,toneMapped:!1}));this.type="Box3Helper";this.geometry.computeBoundingSphere()}function qe(a,b,c){this.plane=a;this.size=void 0===b?1:b;a=void 0!==c?c:16776960;b=new H;b.setAttribute("position",new C([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,0,1,0,0,0],3));b.computeBoundingSphere();Ja.call(this,b,new ja({color:a,toneMapped:!1}));
|
|
|
+this.type="PlaneHelper";b=new H;b.setAttribute("position",new C([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3));b.computeBoundingSphere();this.add(new Z(b,new Na({color:a,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}function ub(a,b,c,d,e,f){x.call(this);this.type="ArrowHelper";void 0===a&&(a=new n(0,0,1));void 0===b&&(b=new n(0,0,0));void 0===c&&(c=1);void 0===d&&(d=16776960);void 0===e&&(e=.2*c);void 0===f&&(f=.2*e);void 0===yf&&(yf=new H,yf.setAttribute("position",new C([0,0,0,0,1,
|
|
|
+0],3)),Qg=new qb(0,.5,1,5,1),Qg.translate(0,-.5,0));this.position.copy(b);this.line=new Ja(yf,new ja({color:d,toneMapped:!1}));this.line.matrixAutoUpdate=!1;this.add(this.line);this.cone=new Z(Qg,new Na({color:d,toneMapped:!1}));this.cone.matrixAutoUpdate=!1;this.add(this.cone);this.setDirection(a);this.setLength(c,e,f)}function re(a){a=a||1;var b=[0,0,0,a,0,0,0,0,0,0,a,0,0,0,0,0,0,a];a=new H;a.setAttribute("position",new C(b,3));a.setAttribute("color",new C([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,
|
|
|
+1],3));b=new ja({vertexColors:!0,toneMapped:!1});ea.call(this,a,b);this.type="AxesHelper"}function Rg(a){this._renderer=a;this._pingPongRenderTarget=null;a=new Float32Array(20);var b=new n(0,1,0);this._blurMaterial=new rb({name:"SphericalGaussianBlur",defines:{n:20},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:a},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:b},inputEncoding:{value:kb[3E3]},outputEncoding:{value:kb[3E3]}},vertexShader:Sg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform int samples;\nuniform float weights[n];\nuniform bool latitudinal;\nuniform float dTheta;\nuniform float mipInt;\nuniform vec3 poleAxis;\n\n"+
|
|
|
+Tg()+"\n\n#define ENVMAP_TYPE_CUBE_UV\n#include <cube_uv_reflection_fragment>\n\nvec3 getSample(float theta, vec3 axis) {\n\tfloat cosTheta = cos(theta);\n\t// Rodrigues' axis-angle rotation\n\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t+ cross(axis, vOutputDirection) * sin(theta)\n\t\t+ axis * dot(axis, vOutputDirection) * (1.0 - cosTheta);\n\treturn bilinearCubeUV(envMap, sampleDirection, mipInt);\n}\n\nvoid main() {\n\tvec3 axis = latitudinal ? poleAxis : cross(poleAxis, vOutputDirection);\n\tif (all(equal(axis, vec3(0.0))))\n\t\taxis = vec3(vOutputDirection.z, 0.0, - vOutputDirection.x);\n\taxis = normalize(axis);\n\tgl_FragColor = vec4(0.0);\n\tgl_FragColor.rgb += weights[0] * getSample(0.0, axis);\n\tfor (int i = 1; i < n; i++) {\n\t\tif (i >= samples)\n\t\t\tbreak;\n\t\tfloat theta = dTheta * float(i);\n\t\tgl_FragColor.rgb += weights[i] * getSample(-1.0 * theta, axis);\n\t\tgl_FragColor.rgb += weights[i] * getSample(theta, axis);\n\t}\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",
|
|
|
blending:0,depthTest:!1,depthWrite:!1});this._cubemapShader=this._equirectShader=null;this._compileMaterial(this._blurMaterial)}function pi(a){a=new Ea(3*lb,3*lb,a);a.texture.mapping=306;a.texture.name="PMREM.cubeUv";a.scissorTest=!0;return a}function Ug(a,b,c,d,e){a.viewport.set(b,c,d,e);a.scissor.set(b,c,d,e)}function qi(){var a=new u(1,1);return new rb({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:a},inputEncoding:{value:kb[3E3]},outputEncoding:{value:kb[3E3]}},
|
|
|
vertexShader:Sg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform vec2 texelSize;\n\n"+Tg()+"\n\n#include <common>\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tvec3 outputDirection = normalize(vOutputDirection);\n\tvec2 uv = equirectUv( outputDirection );\n\tvec2 f = fract(uv / texelSize - 0.5);\n\tuv -= f * texelSize;\n\tvec3 tl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x += texelSize.x;\n\tvec3 tr = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.y += texelSize.y;\n\tvec3 br = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x -= texelSize.x;\n\tvec3 bl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tvec3 tm = mix(tl, tr, f.x);\n\tvec3 bm = mix(bl, br, f.x);\n\tgl_FragColor.rgb = mix(tm, bm, f.y);\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",
|
|
|
blending:0,depthTest:!1,depthWrite:!1})}function ri(){return new rb({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},inputEncoding:{value:kb[3E3]},outputEncoding:{value:kb[3E3]}},vertexShader:Sg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform samplerCube envMap;\n\n"+Tg()+"\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tgl_FragColor.rgb = envMapTexelToLinear(textureCube(envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ))).rgb;\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",
|
|
@@ -583,16 +584,16 @@ l.a=h.a.clone(),l.b=h.b.clone(),l.c=h.c.clone(),e.vertexNormals.push(l);if(void
|
|
|
b.clone());b=a.boundingSphere;null!==b&&(this.boundingSphere=b.clone());this.elementsNeedUpdate=a.elementsNeedUpdate;this.verticesNeedUpdate=a.verticesNeedUpdate;this.uvsNeedUpdate=a.uvsNeedUpdate;this.normalsNeedUpdate=a.normalsNeedUpdate;this.colorsNeedUpdate=a.colorsNeedUpdate;this.lineDistancesNeedUpdate=a.lineDistancesNeedUpdate;this.groupsNeedUpdate=a.groupsNeedUpdate;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});var ih=function(a){function b(b,d,e,f,g,h){a.call(this);
|
|
|
this.type="BoxGeometry";this.parameters={width:b,height:d,depth:e,widthSegments:f,heightSegments:g,depthSegments:h};this.fromBufferGeometry(new Gd(b,d,e,f,g,h));this.mergeVertices()}a&&(b.__proto__=a);b.prototype=Object.create(a&&a.prototype);return b.prototype.constructor=b}(I),Gd=function(a){function b(b,d,e,f,g,h){function c(a,b,c,d,e,f,g,h,l,m,u){var w=f/l,y=g/m,z=f/2,x=g/2,B=h/2;g=l+1;for(var C=m+1,F=f=0,D=new n,E=0;E<C;E++)for(var H=E*y-x,G=0;G<g;G++)D[a]=(G*w-z)*d,D[b]=H*e,D[c]=B,p.push(D.x,
|
|
|
D.y,D.z),D[a]=0,D[b]=0,D[c]=0<h?1:-1,A.push(D.x,D.y,D.z),r.push(G/l),r.push(1-E/m),f+=1;for(a=0;a<m;a++)for(b=0;b<l;b++)c=t+b+g*(a+1),d=t+(b+1)+g*(a+1),e=t+(b+1)+g*a,q.push(t+b+g*a,c,e),q.push(c,d,e),F+=6;k.addGroup(v,F,u);v+=F;t+=f}a.call(this);this.type="BoxBufferGeometry";this.parameters={width:b,height:d,depth:e,widthSegments:f,heightSegments:g,depthSegments:h};var k=this;b=b||1;d=d||1;e=e||1;f=Math.floor(f)||1;g=Math.floor(g)||1;h=Math.floor(h)||1;var q=[],p=[],A=[],r=[],t=0,v=0;c("z","y","x",
|
|
|
--1,-1,e,d,b,h,g,0);c("z","y","x",1,-1,e,d,-b,h,g,1);c("x","z","y",1,1,b,e,d,f,h,2);c("x","z","y",1,-1,b,e,-d,f,h,3);c("x","y","z",1,-1,b,d,e,f,g,4);c("x","y","z",-1,-1,b,d,-e,f,g,5);this.setIndex(q);this.setAttribute("position",new C(p,3));this.setAttribute("normal",new C(A,3));this.setAttribute("uv",new C(r,2))}a&&(b.__proto__=a);b.prototype=Object.create(a&&a.prototype);return b.prototype.constructor=b}(H),Qh={clone:Dc,merge:ya};Aa.prototype=Object.create(K.prototype);Aa.prototype.constructor=Aa;
|
|
|
-Aa.prototype.isShaderMaterial=!0;Aa.prototype.copy=function(a){K.prototype.copy.call(this,a);this.fragmentShader=a.fragmentShader;this.vertexShader=a.vertexShader;this.uniforms=Dc(a.uniforms);this.defines=Object.assign({},a.defines);this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.lights=a.lights;this.clipping=a.clipping;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;this.extensions=Object.assign({},a.extensions);return this};
|
|
|
-Aa.prototype.toJSON=function(a){var b=K.prototype.toJSON.call(this,a);b.uniforms={};for(var c in this.uniforms){var d=this.uniforms[c].value;b.uniforms[c]=d&&d.isTexture?{type:"t",value:d.toJSON(a).uuid}:d&&d.isColor?{type:"c",value:d.getHex()}:d&&d.isVector2?{type:"v2",value:d.toArray()}:d&&d.isVector3?{type:"v3",value:d.toArray()}:d&&d.isVector4?{type:"v4",value:d.toArray()}:d&&d.isMatrix3?{type:"m3",value:d.toArray()}:d&&d.isMatrix4?{type:"m4",value:d.toArray()}:{value:d}}0<Object.keys(this.defines).length&&
|
|
|
+-1,-1,e,d,b,h,g,0);c("z","y","x",1,-1,e,d,-b,h,g,1);c("x","z","y",1,1,b,e,d,f,h,2);c("x","z","y",1,-1,b,e,-d,f,h,3);c("x","y","z",1,-1,b,d,e,f,g,4);c("x","y","z",-1,-1,b,d,-e,f,g,5);this.setIndex(q);this.setAttribute("position",new C(p,3));this.setAttribute("normal",new C(A,3));this.setAttribute("uv",new C(r,2))}a&&(b.__proto__=a);b.prototype=Object.create(a&&a.prototype);return b.prototype.constructor=b}(H),Qh={clone:Dc,merge:ya};Ba.prototype=Object.create(K.prototype);Ba.prototype.constructor=Ba;
|
|
|
+Ba.prototype.isShaderMaterial=!0;Ba.prototype.copy=function(a){K.prototype.copy.call(this,a);this.fragmentShader=a.fragmentShader;this.vertexShader=a.vertexShader;this.uniforms=Dc(a.uniforms);this.defines=Object.assign({},a.defines);this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.lights=a.lights;this.clipping=a.clipping;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;this.extensions=Object.assign({},a.extensions);return this};
|
|
|
+Ba.prototype.toJSON=function(a){var b=K.prototype.toJSON.call(this,a);b.uniforms={};for(var c in this.uniforms){var d=this.uniforms[c].value;b.uniforms[c]=d&&d.isTexture?{type:"t",value:d.toJSON(a).uuid}:d&&d.isColor?{type:"c",value:d.getHex()}:d&&d.isVector2?{type:"v2",value:d.toArray()}:d&&d.isVector3?{type:"v3",value:d.toArray()}:d&&d.isVector4?{type:"v4",value:d.toArray()}:d&&d.isMatrix3?{type:"m3",value:d.toArray()}:d&&d.isMatrix4?{type:"m4",value:d.toArray()}:{value:d}}0<Object.keys(this.defines).length&&
|
|
|
(b.defines=this.defines);b.vertexShader=this.vertexShader;b.fragmentShader=this.fragmentShader;a={};for(var e in this.extensions)!0===this.extensions[e]&&(a[e]=!0);0<Object.keys(a).length&&(b.extensions=a);return b};db.prototype=Object.assign(Object.create(x.prototype),{constructor:db,isCamera:!0,copy:function(a,b){x.prototype.copy.call(this,a,b);this.matrixWorldInverse.copy(a.matrixWorldInverse);this.projectionMatrix.copy(a.projectionMatrix);this.projectionMatrixInverse.copy(a.projectionMatrixInverse);
|
|
|
return this},getWorldDirection:function(a){void 0===a&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),a=new n);this.updateMatrixWorld(!0);var b=this.matrixWorld.elements;return a.set(-b[8],-b[9],-b[10]).normalize()},updateMatrixWorld:function(a){x.prototype.updateMatrixWorld.call(this,a);this.matrixWorldInverse.getInverse(this.matrixWorld)},updateWorldMatrix:function(a,b){x.prototype.updateWorldMatrix.call(this,a,b);this.matrixWorldInverse.getInverse(this.matrixWorld)},
|
|
|
clone:function(){return(new this.constructor).copy(this)}});ma.prototype=Object.assign(Object.create(db.prototype),{constructor:ma,isPerspectiveCamera:!0,copy:function(a,b){db.prototype.copy.call(this,a,b);this.fov=a.fov;this.zoom=a.zoom;this.near=a.near;this.far=a.far;this.focus=a.focus;this.aspect=a.aspect;this.view=null===a.view?null:Object.assign({},a.view);this.filmGauge=a.filmGauge;this.filmOffset=a.filmOffset;return this},setFocalLength:function(a){a=.5*this.getFilmHeight()/a;this.fov=2*O.RAD2DEG*
|
|
|
Math.atan(a);this.updateProjectionMatrix()},getFocalLength:function(){var a=Math.tan(.5*O.DEG2RAD*this.fov);return.5*this.getFilmHeight()/a},getEffectiveFOV:function(){return 2*O.RAD2DEG*Math.atan(Math.tan(.5*O.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(a,b,c,d,e,f){this.aspect=a/b;null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,
|
|
|
offsetX:0,offsetY:0,width:1,height:1});this.view.enabled=!0;this.view.fullWidth=a;this.view.fullHeight=b;this.view.offsetX=c;this.view.offsetY=d;this.view.width=e;this.view.height=f;this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1);this.updateProjectionMatrix()},updateProjectionMatrix:function(){var a=this.near,b=a*Math.tan(.5*O.DEG2RAD*this.fov)/this.zoom,c=2*b,d=this.aspect*c,e=-.5*d,f=this.view;if(null!==this.view&&this.view.enabled){var g=f.fullWidth,
|
|
|
h=f.fullHeight;e+=f.offsetX*d/g;b-=f.offsetY*c/h;d*=f.width/g;c*=f.height/h}f=this.filmOffset;0!==f&&(e+=a*f/this.getFilmWidth());this.projectionMatrix.makePerspective(e,e+d,b,b-c,a,this.far);this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(a){a=x.prototype.toJSON.call(this,a);a.object.fov=this.fov;a.object.zoom=this.zoom;a.object.near=this.near;a.object.far=this.far;a.object.focus=this.focus;a.object.aspect=this.aspect;null!==this.view&&(a.object.view=Object.assign({},
|
|
|
-this.view));a.object.filmGauge=this.filmGauge;a.object.filmOffset=this.filmOffset;return a}});Ec.prototype=Object.create(x.prototype);Ec.prototype.constructor=Ec;Xb.prototype=Object.create(Ea.prototype);Xb.prototype.constructor=Xb;Xb.prototype.isWebGLCubeRenderTarget=!0;Xb.prototype.fromEquirectangularTexture=function(a,b){this.texture.type=b.type;this.texture.format=b.format;this.texture.encoding=b.encoding;var c=new xd,d=new Aa({name:"CubemapFromEquirect",uniforms:Dc({tEquirect:{value:null}}),vertexShader:"varying vec3 vWorldDirection;\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",
|
|
|
+this.view));a.object.filmGauge=this.filmGauge;a.object.filmOffset=this.filmOffset;return a}});Ec.prototype=Object.create(x.prototype);Ec.prototype.constructor=Ec;Xb.prototype=Object.create(Ea.prototype);Xb.prototype.constructor=Xb;Xb.prototype.isWebGLCubeRenderTarget=!0;Xb.prototype.fromEquirectangularTexture=function(a,b){this.texture.type=b.type;this.texture.format=b.format;this.texture.encoding=b.encoding;var c=new xd,d=new Ba({name:"CubemapFromEquirect",uniforms:Dc({tEquirect:{value:null}}),vertexShader:"varying vec3 vWorldDirection;\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",
|
|
|
fragmentShader:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}",side:1,blending:0});d.uniforms.tEquirect.value=b;b=new Z(new Gd(5,5,5),d);c.add(b);(new Ec(1,10,this)).update(a,c);b.geometry.dispose();b.material.dispose();return this};Yb.prototype=Object.create(W.prototype);Yb.prototype.constructor=Yb;Yb.prototype.isDataTexture=
|
|
|
!0;var td=new cb,If=new n;Object.assign(Fc.prototype,{set:function(a,b,c,d,e,f){var g=this.planes;g[0].copy(a);g[1].copy(b);g[2].copy(c);g[3].copy(d);g[4].copy(e);g[5].copy(f);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){for(var b=this.planes,c=0;6>c;c++)b[c].copy(a.planes[c]);return this},setFromProjectionMatrix:function(a){var b=this.planes,c=a.elements;a=c[0];var d=c[1],e=c[2],f=c[3],g=c[4],h=c[5],l=c[6],k=c[7],q=c[8],p=c[9],n=c[10],r=c[11],t=c[12],v=
|
|
|
c[13],u=c[14];c=c[15];b[0].setComponents(f-a,k-g,r-q,c-t).normalize();b[1].setComponents(f+a,k+g,r+q,c+t).normalize();b[2].setComponents(f+d,k+h,r+p,c+v).normalize();b[3].setComponents(f-d,k-h,r-p,c-v).normalize();b[4].setComponents(f-e,k-l,r-n,c-u).normalize();b[5].setComponents(f+e,k+l,r+n,c+u).normalize();return this},intersectsObject:function(a){var b=a.geometry;null===b.boundingSphere&&b.computeBoundingSphere();td.copy(b.boundingSphere).applyMatrix4(a.matrixWorld);return this.intersectsSphere(td)},
|
|
@@ -681,7 +682,7 @@ D.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:L.
|
|
|
t2D:{value:null}},vertexShader:L.background_vert,fragmentShader:L.background_frag},cube:{uniforms:ya([D.envmap,{opacity:{value:1}}]),vertexShader:L.cube_vert,fragmentShader:L.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:L.equirect_vert,fragmentShader:L.equirect_frag},distanceRGBA:{uniforms:ya([D.common,D.displacementmap,{referencePosition:{value:new n},nearDistance:{value:1},farDistance:{value:1E3}}]),vertexShader:L.distanceRGBA_vert,fragmentShader:L.distanceRGBA_frag},shadow:{uniforms:ya([D.lights,
|
|
|
D.fog,{color:{value:new E(0)},opacity:{value:1}}]),vertexShader:L.shadow_vert,fragmentShader:L.shadow_frag}};eb.physical={uniforms:ya([eb.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new u(1,1)},clearcoatNormalMap:{value:null},sheen:{value:new E(0)},transparency:{value:0}}]),vertexShader:L.meshphysical_vert,fragmentShader:L.meshphysical_frag};ob.prototype=Object.create(W.prototype);ob.prototype.constructor=
|
|
|
ob;ob.prototype.isCubeTexture=!0;Object.defineProperty(ob.prototype,"images",{get:function(){return this.image},set:function(a){this.image=a}});Gc.prototype=Object.create(W.prototype);Gc.prototype.constructor=Gc;Gc.prototype.isDataTexture2DArray=!0;Hc.prototype=Object.create(W.prototype);Hc.prototype.constructor=Hc;Hc.prototype.isDataTexture3D=!0;var Dh=new W,Hj=new Gc,Jj=new Hc,Eh=new ob,xh=[],zh=[],Ch=new Float32Array(16),Bh=new Float32Array(9),Ah=new Float32Array(4);Fh.prototype.updateCache=function(a){var b=
|
|
|
-this.cache;a instanceof Float32Array&&b.length!==a.length&&(this.cache=new Float32Array(a.length));Ba(b,a)};Gh.prototype.setValue=function(a,b,c){for(var d=this.seq,e=0,f=d.length;e!==f;++e){var g=d[e];g.setValue(a,b[g.id],c)}};var gg=/([\w\d_]+)(\])?(\[|\.)?/g;Db.prototype.setValue=function(a,b,c,d){b=this.map[b];void 0!==b&&b.setValue(a,c,d)};Db.prototype.setOptional=function(a,b,c){b=b[c];void 0!==b&&this.setValue(a,c,b)};Db.upload=function(a,b,c,d){for(var e=0,f=b.length;e!==f;++e){var g=b[e],
|
|
|
+this.cache;a instanceof Float32Array&&b.length!==a.length&&(this.cache=new Float32Array(a.length));Aa(b,a)};Gh.prototype.setValue=function(a,b,c){for(var d=this.seq,e=0,f=d.length;e!==f;++e){var g=d[e];g.setValue(a,b[g.id],c)}};var gg=/([\w\d_]+)(\])?(\[|\.)?/g;Db.prototype.setValue=function(a,b,c,d){b=this.map[b];void 0!==b&&b.setValue(a,c,d)};Db.prototype.setOptional=function(a,b,c){b=b[c];void 0!==b&&this.setValue(a,c,b)};Db.upload=function(a,b,c,d){for(var e=0,f=b.length;e!==f;++e){var g=b[e],
|
|
|
h=c[g.id];!1!==h.needsUpdate&&g.setValue(a,h.value,d)}};Db.seqWithValue=function(a,b){for(var c=[],d=0,e=a.length;d!==e;++d){var f=a[d];f.id in b&&c.push(f)}return c};var ok=0,ig=/^[ \t]*#include +<([\w\d./]+)>/gm,Ph=/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Oh=/#pragma unroll_loop_start[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}[\s]+?#pragma unroll_loop_end/g,yk=0;Eb.prototype=Object.create(K.prototype);Eb.prototype.constructor=
|
|
|
Eb;Eb.prototype.isMeshDepthMaterial=!0;Eb.prototype.copy=function(a){K.prototype.copy.call(this,a);this.depthPacking=a.depthPacking;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.map=a.map;this.alphaMap=a.alphaMap;this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;return this};Fb.prototype=Object.create(K.prototype);Fb.prototype.constructor=
|
|
|
Fb;Fb.prototype.isMeshDistanceMaterial=!0;Fb.prototype.copy=function(a){K.prototype.copy.call(this,a);this.referencePosition.copy(a.referencePosition);this.nearDistance=a.nearDistance;this.farDistance=a.farDistance;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.map=a.map;this.alphaMap=a.alphaMap;this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;return this};Le.prototype=Object.assign(Object.create(ma.prototype),
|
|
@@ -732,7 +733,7 @@ ce.prototype.constructor=ce;ec.prototype=Object.create(H.prototype);ec.prototype
|
|
|
return ei(this.parameters.shapes,a)};gc.prototype=Object.create(H.prototype);gc.prototype.constructor=gc;gc.prototype.toJSON=function(){var a=H.prototype.toJSON.call(this);return ei(this.parameters.shapes,a)};Zc.prototype=Object.create(H.prototype);Zc.prototype.constructor=Zc;hc.prototype=Object.create(I.prototype);hc.prototype.constructor=hc;qb.prototype=Object.create(H.prototype);qb.prototype.constructor=qb;fe.prototype=Object.create(hc.prototype);fe.prototype.constructor=fe;ge.prototype=Object.create(qb.prototype);
|
|
|
ge.prototype.constructor=ge;he.prototype=Object.create(I.prototype);he.prototype.constructor=he;$c.prototype=Object.create(H.prototype);$c.prototype.constructor=$c;var Da=Object.freeze({__proto__:null,WireframeGeometry:Oc,ParametricGeometry:Qd,ParametricBufferGeometry:Pc,TetrahedronGeometry:Sd,TetrahedronBufferGeometry:Qc,OctahedronGeometry:Td,OctahedronBufferGeometry:bc,IcosahedronGeometry:Ud,IcosahedronBufferGeometry:Rc,DodecahedronGeometry:Vd,DodecahedronBufferGeometry:Sc,PolyhedronGeometry:Rd,
|
|
|
PolyhedronBufferGeometry:ia,TubeGeometry:Wd,TubeBufferGeometry:cc,TorusKnotGeometry:Xd,TorusKnotBufferGeometry:Tc,TorusGeometry:Yd,TorusBufferGeometry:Uc,TextGeometry:be,TextBufferGeometry:Wc,SphereGeometry:ce,SphereBufferGeometry:ec,RingGeometry:de,RingBufferGeometry:Xc,PlaneGeometry:Fd,PlaneBufferGeometry:Zb,LatheGeometry:ee,LatheBufferGeometry:Yc,ShapeGeometry:fc,ShapeBufferGeometry:gc,ExtrudeGeometry:dc,ExtrudeBufferGeometry:fb,EdgesGeometry:Zc,ConeGeometry:fe,ConeBufferGeometry:ge,CylinderGeometry:hc,
|
|
|
-CylinderBufferGeometry:qb,CircleGeometry:he,CircleBufferGeometry:$c,BoxGeometry:ih,BoxBufferGeometry:Gd});ic.prototype=Object.create(K.prototype);ic.prototype.constructor=ic;ic.prototype.isShadowMaterial=!0;ic.prototype.copy=function(a){K.prototype.copy.call(this,a);this.color.copy(a.color);return this};rb.prototype=Object.create(Aa.prototype);rb.prototype.constructor=rb;rb.prototype.isRawShaderMaterial=!0;gb.prototype=Object.create(K.prototype);gb.prototype.constructor=gb;gb.prototype.isMeshStandardMaterial=
|
|
|
+CylinderBufferGeometry:qb,CircleGeometry:he,CircleBufferGeometry:$c,BoxGeometry:ih,BoxBufferGeometry:Gd});ic.prototype=Object.create(K.prototype);ic.prototype.constructor=ic;ic.prototype.isShadowMaterial=!0;ic.prototype.copy=function(a){K.prototype.copy.call(this,a);this.color.copy(a.color);return this};rb.prototype=Object.create(Ba.prototype);rb.prototype.constructor=rb;rb.prototype.isRawShaderMaterial=!0;gb.prototype=Object.create(K.prototype);gb.prototype.constructor=gb;gb.prototype.isMeshStandardMaterial=
|
|
|
!0;gb.prototype.copy=function(a){K.prototype.copy.call(this,a);this.defines={STANDARD:""};this.color.copy(a.color);this.roughness=a.roughness;this.metalness=a.metalness;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=
|
|
|
a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.roughnessMap=a.roughnessMap;this.metalnessMap=a.metalnessMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.envMapIntensity=a.envMapIntensity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=
|
|
|
a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;this.vertexTangents=a.vertexTangents;return this};jc.prototype=Object.create(gb.prototype);jc.prototype.constructor=jc;jc.prototype.isMeshPhysicalMaterial=!0;jc.prototype.copy=function(a){gb.prototype.copy.call(this,a);this.defines={STANDARD:"",PHYSICAL:""};this.clearcoat=a.clearcoat;this.clearcoatMap=a.clearcoatMap;this.clearcoatRoughness=a.clearcoatRoughness;this.clearcoatRoughnessMap=
|
|
@@ -745,7 +746,7 @@ Object.create(K.prototype);lc.prototype.constructor=lc;lc.prototype.isMeshNormal
|
|
|
a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};mc.prototype=Object.create(K.prototype);mc.prototype.constructor=mc;mc.prototype.isMeshLambertMaterial=!0;mc.prototype.copy=function(a){K.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=
|
|
|
a.emissiveIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};nc.prototype=Object.create(K.prototype);nc.prototype.constructor=
|
|
|
nc;nc.prototype.isMeshMatcapMaterial=!0;nc.prototype.copy=function(a){K.prototype.copy.call(this,a);this.defines={MATCAP:""};this.color.copy(a.color);this.matcap=a.matcap;this.map=a.map;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.alphaMap=a.alphaMap;this.skinning=a.skinning;
|
|
|
-this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};oc.prototype=Object.create(ja.prototype);oc.prototype.constructor=oc;oc.prototype.isLineDashedMaterial=!0;oc.prototype.copy=function(a){ja.prototype.copy.call(this,a);this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize=a.gapSize;return this};var Vk=Object.freeze({__proto__:null,ShadowMaterial:ic,SpriteMaterial:Ib,RawShaderMaterial:rb,ShaderMaterial:Aa,PointsMaterial:Va,MeshPhysicalMaterial:jc,MeshStandardMaterial:gb,
|
|
|
+this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};oc.prototype=Object.create(ja.prototype);oc.prototype.constructor=oc;oc.prototype.isLineDashedMaterial=!0;oc.prototype.copy=function(a){ja.prototype.copy.call(this,a);this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize=a.gapSize;return this};var Vk=Object.freeze({__proto__:null,ShadowMaterial:ic,SpriteMaterial:Ib,RawShaderMaterial:rb,ShaderMaterial:Ba,PointsMaterial:Va,MeshPhysicalMaterial:jc,MeshStandardMaterial:gb,
|
|
|
MeshPhongMaterial:Kb,MeshToonMaterial:kc,MeshNormalMaterial:lc,MeshLambertMaterial:mc,MeshDepthMaterial:Eb,MeshDistanceMaterial:Fb,MeshBasicMaterial:Na,MeshMatcapMaterial:nc,LineDashedMaterial:oc,LineBasicMaterial:ja,Material:K}),X={arraySlice:function(a,b,c){return X.isTypedArray(a)?new a.constructor(a.subarray(b,void 0!==c?c:a.length)):a.slice(b,c)},convertArray:function(a,b,c){return!a||!c&&a.constructor===b?a:"number"===typeof b.BYTES_PER_ELEMENT?new b(a):Array.prototype.slice.call(a)},isTypedArray:function(a){return ArrayBuffer.isView(a)&&
|
|
|
!(a instanceof DataView)},getKeyframeOrder:function(a){for(var b=a.length,c=Array(b),d=0;d!==b;++d)c[d]=d;c.sort(function(b,c){return a[b]-a[c]});return c},sortedArray:function(a,b,c){for(var d=a.length,e=new a.constructor(d),f=0,g=0;g!==d;++f)for(var h=c[f]*b,l=0;l!==b;++l)e[g++]=a[h+l];return e},flattenJSON:function(a,b,c,d){for(var e=1,f=a[0];void 0!==f&&void 0===f[d];)f=a[e++];if(void 0!==f){var g=f[d];if(void 0!==g)if(Array.isArray(g)){do g=f[d],void 0!==g&&(b.push(f.time),c.push.apply(c,g)),
|
|
|
f=a[e++];while(void 0!==f)}else if(void 0!==g.toArray){do g=f[d],void 0!==g&&(b.push(f.time),g.toArray(c,c.length)),f=a[e++];while(void 0!==f)}else{do g=f[d],void 0!==g&&(b.push(f.time),c.push(g)),f=a[e++];while(void 0!==f)}}},subclip:function(a,b,c,d,e){e=e||30;a=a.clone();a.name=b;b=[];for(var f=0;f<a.tracks.length;++f){for(var g=a.tracks[f],h=g.getValueSize(),l=[],k=[],q=0;q<g.times.length;++q){var p=g.times[q]*e;if(!(p<c||p>=d))for(l.push(g.times[q]),p=0;p<h;++p)k.push(g.values[q*h+p])}0!==l.length&&
|
|
@@ -1012,7 +1013,7 @@ return 35048===this.usage},set:function(a){console.warn("THREE.InterleavedBuffer
|
|
|
Object.assign(fb.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}});Object.defineProperties(uf.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead.");
|
|
|
return this}}});Object.defineProperties(K.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){console.warn("THREE.Material: .wrapRGB has been removed.");return new E}},shading:{get:function(){console.error("THREE."+
|
|
|
this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(a){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.");this.flatShading=1===a}},stencilMask:{get:function(){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead.");return this.stencilFuncMask},set:function(a){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead.");this.stencilFuncMask=
|
|
|
-a}}});Object.defineProperties(Kb.prototype,{metal:{get:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead.");return!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}});Object.defineProperties(Aa.prototype,{derivatives:{get:function(){console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.");return this.extensions.derivatives},
|
|
|
+a}}});Object.defineProperties(Kb.prototype,{metal:{get:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead.");return!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}});Object.defineProperties(Ba.prototype,{derivatives:{get:function(){console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.");return this.extensions.derivatives},
|
|
|
set:function(a){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives.");this.extensions.derivatives=a}}});Object.assign(Kd.prototype,{clearTarget:function(a,b,c,d){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead.");this.setRenderTarget(a);this.clear(b,c,d)},animate:function(a){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop().");this.setAnimationLoop(a)},getCurrentRenderTarget:function(){console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget().");
|
|
|
return this.getRenderTarget()},getMaxAnisotropy:function(){console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy().");return this.capabilities.getMaxAnisotropy()},getPrecision:function(){console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision.");return this.capabilities.precision},resetGLState:function(){console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset().");return this.state.reset()},supportsFloatTextures:function(){console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' ).");
|
|
|
return this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' ).");return this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' ).");return this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' ).");
|
|
@@ -1054,7 +1055,7 @@ k.PointCloudMaterial=function(a){console.warn("THREE.PointCloudMaterial has been
|
|
|
37496;k.RGBA_PVRTC_2BPPV1_Format=35843;k.RGBA_PVRTC_4BPPV1_Format=35842;k.RGBA_S3TC_DXT1_Format=33777;k.RGBA_S3TC_DXT3_Format=33778;k.RGBA_S3TC_DXT5_Format=33779;k.RGBDEncoding=3006;k.RGBEEncoding=3002;k.RGBEFormat=1023;k.RGBFormat=1022;k.RGBIntegerFormat=1032;k.RGBM16Encoding=3005;k.RGBM7Encoding=3004;k.RGB_ETC1_Format=36196;k.RGB_ETC2_Format=37492;k.RGB_PVRTC_2BPPV1_Format=35841;k.RGB_PVRTC_4BPPV1_Format=35840;k.RGB_S3TC_DXT1_Format=33776;k.RGFormat=1030;k.RGIntegerFormat=1031;k.RawShaderMaterial=
|
|
|
rb;k.Ray=Ub;k.Raycaster=Mg;k.RectAreaLight=nf;k.RedFormat=1028;k.RedIntegerFormat=1029;k.ReinhardToneMapping=2;k.RepeatWrapping=1E3;k.ReplaceStencilOp=7681;k.ReverseSubtractEquation=102;k.RingBufferGeometry=Xc;k.RingGeometry=de;k.SRGB8_ALPHA8_ASTC_10x10_Format=37851;k.SRGB8_ALPHA8_ASTC_10x5_Format=37848;k.SRGB8_ALPHA8_ASTC_10x6_Format=37849;k.SRGB8_ALPHA8_ASTC_10x8_Format=37850;k.SRGB8_ALPHA8_ASTC_12x10_Format=37852;k.SRGB8_ALPHA8_ASTC_12x12_Format=37853;k.SRGB8_ALPHA8_ASTC_4x4_Format=37840;k.SRGB8_ALPHA8_ASTC_5x4_Format=
|
|
|
37841;k.SRGB8_ALPHA8_ASTC_5x5_Format=37842;k.SRGB8_ALPHA8_ASTC_6x5_Format=37843;k.SRGB8_ALPHA8_ASTC_6x6_Format=37844;k.SRGB8_ALPHA8_ASTC_8x5_Format=37845;k.SRGB8_ALPHA8_ASTC_8x6_Format=37846;k.SRGB8_ALPHA8_ASTC_8x8_Format=37847;k.Scene=xd;k.SceneUtils={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};
|
|
|
-k.ShaderChunk=L;k.ShaderLib=eb;k.ShaderMaterial=Aa;k.ShadowMaterial=ic;k.Shape=Lb;k.ShapeBufferGeometry=gc;k.ShapeGeometry=fc;k.ShapePath=zg;k.ShapeUtils=pb;k.ShortType=1011;k.Skeleton=Re;k.SkeletonHelper=pc;k.SkinnedMesh=Qe;k.SmoothShading=2;k.Sphere=cb;k.SphereBufferGeometry=ec;k.SphereGeometry=ce;k.Spherical=mi;k.SphericalHarmonics3=of;k.Spline=Vg;k.SplineCurve=Za;k.SplineCurve3=ti;k.SpotLight=hf;k.SpotLightHelper=gd;k.SpotLightShadow=gf;k.Sprite=Ld;k.SpriteMaterial=Ib;k.SrcAlphaFactor=204;k.SrcAlphaSaturateFactor=
|
|
|
+k.ShaderChunk=L;k.ShaderLib=eb;k.ShaderMaterial=Ba;k.ShadowMaterial=ic;k.Shape=Lb;k.ShapeBufferGeometry=gc;k.ShapeGeometry=fc;k.ShapePath=zg;k.ShapeUtils=pb;k.ShortType=1011;k.Skeleton=Re;k.SkeletonHelper=pc;k.SkinnedMesh=Qe;k.SmoothShading=2;k.Sphere=cb;k.SphereBufferGeometry=ec;k.SphereGeometry=ce;k.Spherical=mi;k.SphericalHarmonics3=of;k.Spline=Vg;k.SplineCurve=Za;k.SplineCurve3=ti;k.SpotLight=hf;k.SpotLightHelper=gd;k.SpotLightShadow=gf;k.Sprite=Ld;k.SpriteMaterial=Ib;k.SrcAlphaFactor=204;k.SrcAlphaSaturateFactor=
|
|
|
210;k.SrcColorFactor=202;k.StaticCopyUsage=35046;k.StaticDrawUsage=35044;k.StaticReadUsage=35045;k.StereoCamera=hi;k.StreamCopyUsage=35042;k.StreamDrawUsage=35040;k.StreamReadUsage=35041;k.StringKeyframeTrack=bf;k.SubtractEquation=101;k.SubtractiveBlending=3;k.TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3};k.TangentSpaceNormalMap=0;k.TetrahedronBufferGeometry=Qc;k.TetrahedronGeometry=Sd;k.TextBufferGeometry=Wc;k.TextGeometry=be;k.Texture=W;k.TextureLoader=ef;k.TorusBufferGeometry=Uc;k.TorusGeometry=
|
|
|
Yd;k.TorusKnotBufferGeometry=Tc;k.TorusKnotGeometry=Xd;k.Triangle=ra;k.TriangleFanDrawMode=2;k.TriangleStripDrawMode=1;k.TrianglesDrawMode=0;k.TubeBufferGeometry=cc;k.TubeGeometry=Wd;k.UVMapping=300;k.Uint16Attribute=function(a,b){console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.");return new Vb(a,b)};k.Uint16BufferAttribute=Vb;k.Uint32Attribute=function(a,b){console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.");
|
|
|
return new Wb(a,b)};k.Uint32BufferAttribute=Wb;k.Uint8Attribute=function(a,b){console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.");return new zd(a,b)};k.Uint8BufferAttribute=zd;k.Uint8ClampedAttribute=function(a,b){console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.");return new Ad(a,b)};k.Uint8ClampedBufferAttribute=Ad;k.Uniform=uf;k.UniformsLib=D;k.UniformsUtils=Qh;k.UnsignedByteType=1009;
|