|
@@ -23,60 +23,60 @@ function db(){E.call(this);this.type="Camera";this.matrixWorldInverse=new O;this
|
|
-1,0);e.lookAt(new n(1,0,0));this.add(e);var f=new qa(90,1,a,b);f.up.set(0,-1,0);f.lookAt(new n(-1,0,0));this.add(f);var g=new qa(90,1,a,b);g.up.set(0,0,1);g.lookAt(new n(0,1,0));this.add(g);var k=new qa(90,1,a,b);k.up.set(0,0,-1);k.lookAt(new n(0,-1,0));this.add(k);var l=new qa(90,1,a,b);l.up.set(0,-1,0);l.lookAt(new n(0,0,1));this.add(l);var m=new qa(90,1,a,b);m.up.set(0,-1,0);m.lookAt(new n(0,0,-1));this.add(m);d=d||{format:1022,magFilter:1006,minFilter:1006};this.renderTarget=new Db(c,d);this.renderTarget.texture.name=
|
|
-1,0);e.lookAt(new n(1,0,0));this.add(e);var f=new qa(90,1,a,b);f.up.set(0,-1,0);f.lookAt(new n(-1,0,0));this.add(f);var g=new qa(90,1,a,b);g.up.set(0,0,1);g.lookAt(new n(0,1,0));this.add(g);var k=new qa(90,1,a,b);k.up.set(0,0,-1);k.lookAt(new n(0,-1,0));this.add(k);var l=new qa(90,1,a,b);l.up.set(0,-1,0);l.lookAt(new n(0,0,1));this.add(l);var m=new qa(90,1,a,b);m.up.set(0,-1,0);m.lookAt(new n(0,0,-1));this.add(m);d=d||{format:1022,magFilter:1006,minFilter:1006};this.renderTarget=new Db(c,d);this.renderTarget.texture.name=
|
|
"CubeCamera";this.update=function(a,b){null===this.parent&&this.updateMatrixWorld();var c=a.getRenderTarget(),d=this.renderTarget,p=d.texture.generateMipmaps;d.texture.generateMipmaps=!1;a.setRenderTarget(d,0);a.render(b,e);a.setRenderTarget(d,1);a.render(b,f);a.setRenderTarget(d,2);a.render(b,g);a.setRenderTarget(d,3);a.render(b,k);a.setRenderTarget(d,4);a.render(b,l);d.texture.generateMipmaps=p;a.setRenderTarget(d,5);a.render(b,m);a.setRenderTarget(c)};this.clear=function(a,b,c,d){for(var e=a.getRenderTarget(),
|
|
"CubeCamera";this.update=function(a,b){null===this.parent&&this.updateMatrixWorld();var c=a.getRenderTarget(),d=this.renderTarget,p=d.texture.generateMipmaps;d.texture.generateMipmaps=!1;a.setRenderTarget(d,0);a.render(b,e);a.setRenderTarget(d,1);a.render(b,f);a.setRenderTarget(d,2);a.render(b,g);a.setRenderTarget(d,3);a.render(b,k);a.setRenderTarget(d,4);a.render(b,l);d.texture.generateMipmaps=p;a.setRenderTarget(d,5);a.render(b,m);a.setRenderTarget(c)};this.clear=function(a,b,c,d){for(var e=a.getRenderTarget(),
|
|
f=this.renderTarget,g=0;6>g;g++)a.setRenderTarget(f,g),a.clear(b,c,d);a.setRenderTarget(e)}}function Db(a,b,c){Number.isInteger(b)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),b=c);xa.call(this,a,a,b)}function bc(a,b,c,d,e,f,g,k,l,m,x,p){Y.call(this,null,f,g,k,l,m,d,e,x,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=
|
|
f=this.renderTarget,g=0;6>g;g++)a.setRenderTarget(f,g),a.clear(b,c,d);a.setRenderTarget(e)}}function Db(a,b,c){Number.isInteger(b)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),b=c);xa.call(this,a,a,b)}function bc(a,b,c,d,e,f,g,k,l,m,x,p){Y.call(this,null,f,g,k,l,m,d,e,x,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 Hd(a,b,c,d,e,f){this.planes=[void 0!==a?a:new Ta,void 0!==b?b:new Ta,void 0!==c?c:new Ta,void 0!==d?d:new Ta,void 0!==e?e:new Ta,void 0!==f?f:new Ta]}function Ah(){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 uj(a){function b(b,c){var d=b.array,e=b.usage,k=a.createBuffer();
|
|
|
|
-a.bindBuffer(c,k);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:k,type:c,bytesPerElement:d.BYTES_PER_ELEMENT,version:b.version}}var c=new WeakMap;return{get:function(a){a.isInterleavedBufferAttribute&&
|
|
|
|
-(a=a.data);return c.get(a)},remove:function(b){b.isInterleavedBufferAttribute&&(b=b.data);var d=c.get(b);d&&(a.deleteBuffer(d.buffer),c.delete(b))},update:function(d,e){d.isInterleavedBufferAttribute&&(d=d.data);var f=c.get(d);if(void 0===f)c.set(d,b(d,e));else if(f.version<d.version){var g=d.array,k=d.updateRange;a.bindBuffer(e,f.buffer);-1===k.count?a.bufferSubData(e,0,g):(a.bufferSubData(e,k.offset*g.BYTES_PER_ELEMENT,g.subarray(k.offset,k.offset+k.count)),k.count=-1);f.version=d.version}}}}function Id(a,
|
|
|
|
-b,c,d){L.call(this);this.type="PlaneGeometry";this.parameters={width:a,height:b,widthSegments:c,heightSegments:d};this.fromBufferGeometry(new cc(a,b,c,d));this.mergeVertices()}function cc(a,b,c,d){A.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,k=d+1,l=a/c,m=b/d,x=[],p=[],q=[],t=[];for(a=0;a<k;a++){var r=a*m-f;for(b=0;b<g;b++)p.push(b*l-e,-r,0),q.push(0,0,
|
|
|
|
-1),t.push(b/c),t.push(1-a/d)}for(a=0;a<d;a++)for(b=0;b<c;b++)e=b+g*(a+1),f=b+1+g*(a+1),k=b+1+g*a,x.push(b+g*a,e,k),x.push(e,f,k);this.setIndex(x);this.setAttribute("position",new G(p,3));this.setAttribute("normal",new G(q,3));this.setAttribute("uv",new G(t,2))}function vj(a,b,c,d){function e(a,c){b.buffers.color.setClear(a.r,a.g,a.b,c,d)}var f=new B(0),g=0,k,l,m=null,x=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,r,h){d=d.background;r=a.xr;(r=r.getSession&&r.getSession())&&"additive"===r.environmentBlendMode&&(d=null);null===d?e(f,g):d&&d.isColor&&(e(d,1),h=!0);(a.autoClear||h)&&a.clear(a.autoClearColor,a.autoClearDepth,a.autoClearStencil);if(d&&(d.isCubeTexture||d.isWebGLCubeRenderTarget||306===d.mapping)){void 0===l&&(l=new ca(new Jd(1,1,1),new pa({type:"BackgroundCubeMaterial",uniforms:Fc(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));h=d.isWebGLCubeRenderTarget?d.texture:d;l.material.uniforms.envMap.value=h;l.material.uniforms.flipEnvMap.value=h.isCubeTexture?-1:1;if(m!==d||x!==h.version||p!==a.toneMapping)l.material.needsUpdate=!0,
|
|
|
|
-m=d,x=h.version,p=a.toneMapping;b.unshift(l,l.geometry,l.material,0,0,null)}else if(d&&d.isTexture){void 0===k&&(k=new ca(new cc(2,2),new pa({type:"BackgroundMaterial",uniforms:Fc(eb.background.uniforms),vertexShader:eb.background.vertexShader,fragmentShader:eb.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),k.geometry.deleteAttribute("normal"),Object.defineProperty(k.material,"map",{get:function(){return this.uniforms.t2D.value}}),c.update(k));k.material.uniforms.t2D.value=
|
|
|
|
-d;!0===d.matrixAutoUpdate&&d.updateMatrix();k.material.uniforms.uvTransform.value.copy(d.matrix);if(m!==d||x!==d.version||p!==a.toneMapping)k.material.needsUpdate=!0,m=d,x=d.version,p=a.toneMapping;b.unshift(k,k.geometry,k.material,0,0,null)}}}}function wj(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,k,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,k,l,m);c.update(l,f,m)}}}function xj(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",k=d(g);k!==g&&(console.warn("THREE.WebGLRenderer:",g,"not supported, using",k,"instead."),g=k);c=!0===c.logarithmicDepthBuffer;k=a.getParameter(34930);var l=a.getParameter(35660),m=a.getParameter(3379),x=a.getParameter(34076),p=a.getParameter(34921),
|
|
|
|
-q=a.getParameter(36347),t=a.getParameter(36348),h=a.getParameter(36349),u=0<l,n=f||!!b.get("OES_texture_float"),v=u&&n,C=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:k,maxVertexTextures:l,maxTextureSize:m,maxCubemapSize:x,maxAttributes:p,maxVertexUniforms:q,maxVaryings:t,
|
|
|
|
-maxFragmentUniforms:h,vertexTextures:u,floatFragmentTextures:n,floatVertexTextures:v,maxSamples:C}}function yj(){function a(){m.value!==d&&(m.value=d,m.needsUpdate=0<e);c.numPlanes=e;c.numIntersection=0}function b(a,b,d,e){var f=null!==a?a.length:0,g=null;if(0!==f){g=m.value;if(!0!==e||null===g){e=d+4*f;b=b.matrixWorldInverse;l.getNormalMatrix(b);if(null===g||g.length<e)g=new Float32Array(e);for(e=0;e!==f;++e,d+=4)k.copy(a[e]).applyMatrix4(b,l),k.normal.toArray(g,d),g[d+3]=k.constant}m.value=g;m.needsUpdate=
|
|
|
|
-!0}c.numPlanes=f;return g}var c=this,d=null,e=0,f=!1,g=!1,k=new Ta,l=new Aa,m={value:null,needsUpdate:!1};this.uniform=m;this.numIntersection=this.numPlanes=0;this.init=function(a,c,g){var k=0!==a.length||c||0!==e||f;f=c;d=b(a,g,0);e=a.length;return k};this.beginShadows=function(){g=!0;b(null)};this.endShadows=function(){g=!1;a()};this.setState=function(c,k,l,h,r,u){if(!f||null===c||0===c.length||g&&!l)g?b(null):a();else{l=g?0:e;var p=4*l,x=r.clippingState||null;m.value=x;x=b(c,h,p,u);for(c=0;c!==
|
|
|
|
-p;++c)x[c]=d[c];r.clippingState=x;this.numIntersection=k?this.numPlanes:0;this.numPlanes+=l}}}function zj(a){var b={};return{get:function(c){if(void 0!==b[c])return b[c];switch(c){case "WEBGL_depth_texture":var d=a.getExtension("WEBGL_depth_texture")||a.getExtension("MOZ_WEBGL_depth_texture")||a.getExtension("WEBKIT_WEBGL_depth_texture");break;case "EXT_texture_filter_anisotropic":d=a.getExtension("EXT_texture_filter_anisotropic")||a.getExtension("MOZ_EXT_texture_filter_anisotropic")||a.getExtension("WEBKIT_EXT_texture_filter_anisotropic");
|
|
|
|
-break;case "WEBGL_compressed_texture_s3tc":d=a.getExtension("WEBGL_compressed_texture_s3tc")||a.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||a.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case "WEBGL_compressed_texture_pvrtc":d=a.getExtension("WEBGL_compressed_texture_pvrtc")||a.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:d=a.getExtension(c)}null===d&&console.warn("THREE.WebGLRenderer: "+c+" extension not supported.");return b[c]=d}}}function Aj(a,b,c){function d(a){var e=
|
|
|
|
-a.target;a=f.get(e);null!==a.index&&b.remove(a.index);for(var k in a.attributes)b.remove(a.attributes[k]);e.removeEventListener("dispose",d);f.delete(e);if(k=g.get(a))b.remove(k),g.delete(a);c.memory.geometries--}function e(a){var c=[],d=a.index,e=a.attributes.position;if(null!==d){var f=d.array;d=d.version;e=0;for(var k=f.length;e<k;e+=3){var h=f[e+0],r=f[e+1],u=f[e+2];c.push(h,r,r,u,u,h)}}else for(f=e.array,d=e.version,e=0,k=f.length/3-1;e<k;e+=3)h=e+0,r=e+1,u=e+2,c.push(h,r,r,u,u,h);c=new (65535<
|
|
|
|
-yh(c)?Yb:Xb)(c,1);c.version=d;b.update(c,34963);(f=g.get(a))&&b.remove(f);g.set(a,c)}var f=new WeakMap,g=new WeakMap;return{get:function(a,b){var e=f.get(b);if(e)return e;b.addEventListener("dispose",d);b.isBufferGeometry?e=b:b.isGeometry&&(void 0===b._bufferGeometry&&(b._bufferGeometry=(new A).setFromObject(a)),e=b._bufferGeometry);f.set(b,e);c.memory.geometries++;return e},update:function(a){var c=a.index,d=a.attributes;null!==c&&b.update(c,34963);for(var e in d)b.update(d[e],34962);a=a.morphAttributes;
|
|
|
|
-for(e in a){c=a[e];d=0;for(var f=c.length;d<f;d++)b.update(c[d],34962)}},getWireframeAttribute:function(a){var b=g.get(a);if(b){var c=a.index;null!==c&&b.version<c.version&&e(a)}else e(a);return g.get(a)}}}function Bj(a,b,c,d){var e=d.isWebGL2,f,g,k;this.setMode=function(a){f=a};this.setIndex=function(a){g=a.type;k=a.bytesPerElement};this.render=function(b,d){a.drawElements(f,d,g,b*k);c.update(d,f)};this.renderInstances=function(d,m,x,p){if(0!==p){if(e){d=a;var l="drawElementsInstanced"}else if(d=
|
|
|
|
-b.get("ANGLE_instanced_arrays"),l="drawElementsInstancedANGLE",null===d){console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}d[l](f,x,g,m*k,p);c.update(x,f,p)}}}function Cj(a){var b={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:b,programs:null,autoReset:!0,reset:function(){b.frame++;b.calls=0;b.triangles=0;b.points=0;b.lines=0},update:function(a,
|
|
|
|
-d,e){e=e||1;b.calls++;switch(d){case 4:b.triangles+=a/3*e;break;case 1:b.lines+=a/2*e;break;case 3:b.lines+=e*(a-1);break;case 2:b.lines+=e*a;break;case 0:b.points+=e*a;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",d)}}}}function Dj(a,b){return Math.abs(b[1])-Math.abs(a[1])}function Ej(a){var b={},c=new Float32Array(8);return{update:function(d,e,f,g){var k=d.morphTargetInfluences,l=void 0===k?0:k.length;d=b[e.id];if(void 0===d){d=[];for(var m=0;m<l;m++)d[m]=[m,0];b[e.id]=d}var x=
|
|
|
|
-f.morphTargets&&e.morphAttributes.position;f=f.morphNormals&&e.morphAttributes.normal;for(m=0;m<l;m++){var p=d[m];0!==p[1]&&(x&&e.deleteAttribute("morphTarget"+m),f&&e.deleteAttribute("morphNormal"+m))}for(m=0;m<l;m++)p=d[m],p[0]=m,p[1]=k[m];d.sort(Dj);for(m=k=0;8>m;m++){if(p=d[m])if(l=p[0],p=p[1]){x&&e.setAttribute("morphTarget"+m,x[l]);f&&e.setAttribute("morphNormal"+m,f[l]);c[m]=p;k+=p;continue}c[m]=0}e=e.morphTargetsRelative?1:1-k;g.getUniforms().setValue(a,"morphTargetBaseInfluence",e);g.getUniforms().setValue(a,
|
|
|
|
-"morphTargetInfluences",c)}}}function Fj(a,b,c,d){var e={};return{update:function(a){var f=d.render.frame,k=a.geometry,l=b.get(a,k);e[l.id]!==f&&(k.isGeometry&&l.updateFromObject(a),b.update(l),e[l.id]=f);a.isInstancedMesh&&c.update(a.instanceMatrix,34962);return l},dispose:function(){e={}}}}function qb(a,b,c,d,e,f,g,k,l,m){a=void 0!==a?a:[];Y.call(this,a,void 0!==b?b:301,c,d,e,f,void 0!==g?g:1022,k,l,m);this.flipY=!1}function Hc(a,b,c,d){Y.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,d){Y.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 Jc(a,b,c){var d=a[0];if(0>=d||0<d)return a;var e=b*c,f=Bh[e];void 0===f&&(f=new Float32Array(e),Bh[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 Ja(a,b){for(var c=0,d=b.length;c<d;c++)a[c]=b[c]}function Ch(a,b){var c=Dh[b];void 0===c&&(c=new Int32Array(b),Dh[b]=c);for(var d=0;d!==b;++d)c[d]=a.allocateTextureUnit();return c}function Gj(a,b){var c=this.cache;c[0]!==b&&(a.uniform1f(this.addr,b),c[0]=b)}function Hj(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),Ja(c,b))}function Ij(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),Ja(c,b))}function Jj(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),Ja(c,b))}function Kj(a,b){var c=this.cache,d=b.elements;void 0===d?Pa(c,b)||(a.uniformMatrix2fv(this.addr,!1,b),Ja(c,b)):Pa(c,d)||(Eh.set(d),a.uniformMatrix2fv(this.addr,!1,Eh),Ja(c,d))}function Lj(a,b){var c=this.cache,d=b.elements;void 0===d?Pa(c,b)||(a.uniformMatrix3fv(this.addr,!1,b),Ja(c,b)):Pa(c,d)||(Fh.set(d),a.uniformMatrix3fv(this.addr,!1,Fh),Ja(c,d))}function Mj(a,b){var c=this.cache,d=b.elements;
|
|
|
|
-void 0===d?Pa(c,b)||(a.uniformMatrix4fv(this.addr,!1,b),Ja(c,b)):Pa(c,d)||(Gh.set(d),a.uniformMatrix4fv(this.addr,!1,Gh),Ja(c,d))}function Nj(a,b,c){var d=this.cache,e=c.allocateTextureUnit();d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=e);c.safeSetTexture2D(b||Hh,e)}function Oj(a,b,c){var d=this.cache,e=c.allocateTextureUnit();d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=e);c.setTexture2DArray(b||Pj,e)}function Qj(a,b,c){var d=this.cache,e=c.allocateTextureUnit();d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=
|
|
|
|
-e);c.setTexture3D(b||Rj,e)}function Sj(a,b,c){var d=this.cache,e=c.allocateTextureUnit();d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=e);c.safeSetTextureCube(b||Ih,e)}function Tj(a,b){var c=this.cache;c[0]!==b&&(a.uniform1i(this.addr,b),c[0]=b)}function Uj(a,b){var c=this.cache;Pa(c,b)||(a.uniform2iv(this.addr,b),Ja(c,b))}function Vj(a,b){var c=this.cache;Pa(c,b)||(a.uniform3iv(this.addr,b),Ja(c,b))}function Wj(a,b){var c=this.cache;Pa(c,b)||(a.uniform4iv(this.addr,b),Ja(c,b))}function Xj(a,b){var c=
|
|
|
|
-this.cache;c[0]!==b&&(a.uniform1ui(this.addr,b),c[0]=b)}function Yj(a){switch(a){case 5126:return Gj;case 35664:return Hj;case 35665:return Ij;case 35666:return Jj;case 35674:return Kj;case 35675:return Lj;case 35676:return Mj;case 5124:case 35670:return Tj;case 35667:case 35671:return Uj;case 35668:case 35672:return Vj;case 35669:case 35673:return Wj;case 5125:return Xj;case 35678:case 36198:case 36298:case 36306:case 35682:return Nj;case 35679:case 36299:case 36307:return Qj;case 35680:case 36300:case 36308:case 36293:return Sj;
|
|
|
|
-case 36289:case 36303:case 36311:case 36292:return Oj}}function Zj(a,b){a.uniform1fv(this.addr,b)}function ak(a,b){a.uniform1iv(this.addr,b)}function bk(a,b){a.uniform2iv(this.addr,b)}function ck(a,b){a.uniform3iv(this.addr,b)}function dk(a,b){a.uniform4iv(this.addr,b)}function ek(a,b){b=Jc(b,this.size,2);a.uniform2fv(this.addr,b)}function fk(a,b){b=Jc(b,this.size,3);a.uniform3fv(this.addr,b)}function gk(a,b){b=Jc(b,this.size,4);a.uniform4fv(this.addr,b)}function hk(a,b){b=Jc(b,this.size,4);a.uniformMatrix2fv(this.addr,
|
|
|
|
-!1,b)}function ik(a,b){b=Jc(b,this.size,9);a.uniformMatrix3fv(this.addr,!1,b)}function jk(a,b){b=Jc(b,this.size,16);a.uniformMatrix4fv(this.addr,!1,b)}function kk(a,b,c){var d=b.length,e=Ch(c,d);a.uniform1iv(this.addr,e);for(a=0;a!==d;++a)c.safeSetTexture2D(b[a]||Hh,e[a])}function lk(a,b,c){var d=b.length,e=Ch(c,d);a.uniform1iv(this.addr,e);for(a=0;a!==d;++a)c.safeSetTextureCube(b[a]||Ih,e[a])}function mk(a){switch(a){case 5126:return Zj;case 35664:return ek;case 35665:return fk;case 35666:return gk;
|
|
|
|
-case 35674:return hk;case 35675:return ik;case 35676:return jk;case 5124:case 35670:return ak;case 35667:case 35671:return bk;case 35668:case 35672:return ck;case 35669:case 35673:return dk;case 35678:case 36198:case 36298:case 36306:case 35682:return kk;case 35680:case 36300:case 36308:case 36293:return lk}}function nk(a,b,c){this.id=a;this.addr=c;this.cache=[];this.setValue=Yj(b.type)}function Jh(a,b,c){this.id=a;this.addr=c;this.cache=[];this.size=b.size;this.setValue=mk(b.type)}function Kh(a){this.id=
|
|
|
|
-a;this.seq=[];this.map={}}function Eb(a,b){this.seq=[];this.map={};for(var c=a.getProgramParameter(b,35718),d=0;d<c;++d){var e=a.getActiveUniform(b,d),f=a.getUniformLocation(b,e.name),g=this,k=e.name,l=k.length;for(ig.lastIndex=0;;){var m=ig.exec(k),x=ig.lastIndex,p=m[1],h=m[3];"]"===m[2]&&(p|=0);if(void 0===h||"["===h&&x+2===l){k=g;e=void 0===h?new nk(p,e,f):new Jh(p,e,f);k.seq.push(e);k.map[e.id]=e;break}else h=g.map[p],void 0===h&&(h=new Kh(p),p=g,g=h,p.seq.push(g),p.map[g.id]=g),g=h}}}function Lh(a,
|
|
|
|
-b,c){b=a.createShader(b);a.shaderSource(b,c);a.compileShader(b);return b}function Mh(a){switch(a){case 3E3:return["Linear","( value )"];case 3001:return["sRGB","( value )"];case 3002:return["RGBE","( value )"];case 3004:return["RGBM","( value, 7.0 )"];case 3005:return["RGBM","( value, 16.0 )"];case 3006:return["RGBD","( value, 256.0 )"];case 3007:return["Gamma","( value, float( GAMMA_FACTOR ) )"];case 3003:return["LogLuv","( value )"];default:throw Error("unsupported encoding: "+a);}}function Nh(a,
|
|
|
|
-b,c){var d=a.getShaderParameter(b,35713),e=a.getShaderInfoLog(b).trim();if(d&&""===e)return"";a=a.getShaderSource(b).split("\n");for(b=0;b<a.length;b++)a[b]=b+1+": "+a[b];a=a.join("\n");return"THREE.WebGLShader: gl.getShaderInfoLog() "+c+"\n"+e+a}function Kd(a,b){b=Mh(b);return"vec4 "+a+"( vec4 value ) { return "+b[0]+"ToLinear"+b[1]+"; }"}function ok(a,b){b=Mh(b);return"vec4 "+a+"( vec4 value ) { return LinearTo"+b[0]+b[1]+"; }"}function pk(a,b){switch(b){case 1:b="Linear";break;case 2:b="Reinhard";
|
|
|
|
-break;case 3:b="Uncharted2";break;case 4:b="OptimizedCineon";break;case 5:b="ACESFilmic";break;default:throw Error("unsupported toneMapping: "+b);}return"vec3 "+a+"( vec3 color ) { return "+b+"ToneMapping( color ); }"}function qk(a){var b=[],c;for(c in a){var d=a[c];!1!==d&&b.push("#define "+c+" "+d)}return b.join("\n")}function Ld(a){return""!==a}function Oh(a,b){return a.replace(/NUM_DIR_LIGHTS/g,b.numDirLights).replace(/NUM_SPOT_LIGHTS/g,b.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,b.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,
|
|
|
|
-b.numPointLights).replace(/NUM_HEMI_LIGHTS/g,b.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,b.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,b.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,b.numPointLightShadows)}function Ph(a,b){return a.replace(/NUM_CLIPPING_PLANES/g,b.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,b.numClippingPlanes-b.numClipIntersection)}function jg(a,b){a=N[b];if(void 0===a)throw Error("Can not resolve #include <"+b+">");return a.replace(kg,jg)}function Qh(a,
|
|
|
|
-b,c,d){a="";for(b=parseInt(b);b<parseInt(c);b++)a+=d.replace(/\[ i \]/g,"[ "+b+" ]").replace(/UNROLLED_LOOP_INDEX/g,b);return a}function Rh(a){var b="precision "+a.precision+" float;\nprecision "+a.precision+" int;";"highp"===a.precision?b+="\n#define HIGH_PRECISION":"mediump"===a.precision?b+="\n#define MEDIUM_PRECISION":"lowp"===a.precision&&(b+="\n#define LOW_PRECISION");return b}function rk(a){var b="SHADOWMAP_TYPE_BASIC";1===a.shadowMapType?b="SHADOWMAP_TYPE_PCF":2===a.shadowMapType?b="SHADOWMAP_TYPE_PCF_SOFT":
|
|
|
|
-3===a.shadowMapType&&(b="SHADOWMAP_TYPE_VSM");return b}function sk(a){var b="ENVMAP_TYPE_CUBE";if(a.envMap)switch(a.envMapMode){case 301:case 302:b="ENVMAP_TYPE_CUBE";break;case 306:case 307:b="ENVMAP_TYPE_CUBE_UV";break;case 303:case 304:b="ENVMAP_TYPE_EQUIREC";break;case 305:b="ENVMAP_TYPE_SPHERE"}return b}function tk(a){var b="ENVMAP_MODE_REFLECTION";if(a.envMap)switch(a.envMapMode){case 302:case 304:b="ENVMAP_MODE_REFRACTION"}return b}function uk(a){var b="ENVMAP_BLENDING_NONE";if(a.envMap)switch(a.combine){case 0:b=
|
|
|
|
-"ENVMAP_BLENDING_MULTIPLY";break;case 1:b="ENVMAP_BLENDING_MIX";break;case 2:b="ENVMAP_BLENDING_ADD"}return b}function vk(a,b,c){var d=a.getContext(),e=c.defines,f=c.vertexShader,g=c.fragmentShader,k=rk(c),l=sk(c),m=tk(c),x=uk(c),p=0<a.gammaFactor?a.gammaFactor:1,h=c.isWebGL2?"":[c.extensionDerivatives||c.envMapCubeUV||c.bumpMap||c.tangentSpaceNormalMap||c.clearcoatNormalMap||c.flatShading||"physical"===c.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(c.extensionFragDepth||c.logarithmicDepthBuffer)&&
|
|
|
|
-c.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",c.extensionDrawBuffers&&c.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(c.extensionShaderTextureLOD||c.envMap)&&c.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Ld).join("\n"),t=qk(e),r=d.createProgram(),u=c.numMultiviewViews;c.isRawShaderMaterial?(e=[t].filter(Ld).join("\n"),0<e.length&&(e+="\n"),k=[h,t].filter(Ld).join("\n"),0<k.length&&(k+="\n")):(e=
|
|
|
|
-[Rh(c),"#define SHADER_NAME "+c.shaderName,t,c.instancing?"#define USE_INSTANCING":"",c.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+p,"#define MAX_BONES "+c.maxBones,c.useFog&&c.fog?"#define USE_FOG":"",c.useFog&&c.fogExp2?"#define FOG_EXP2":"",c.map?"#define USE_MAP":"",c.envMap?"#define USE_ENVMAP":"",c.envMap?"#define "+m:"",c.lightMap?"#define USE_LIGHTMAP":"",c.aoMap?"#define USE_AOMAP":"",c.emissiveMap?"#define USE_EMISSIVEMAP":"",c.bumpMap?"#define USE_BUMPMAP":
|
|
|
|
-"",c.normalMap?"#define USE_NORMALMAP":"",c.normalMap&&c.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",c.normalMap&&c.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",c.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",c.displacementMap&&c.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",c.specularMap?"#define USE_SPECULARMAP":"",c.roughnessMap?"#define USE_ROUGHNESSMAP":"",c.metalnessMap?"#define USE_METALNESSMAP":"",c.alphaMap?"#define USE_ALPHAMAP":"",c.vertexTangents?
|
|
|
|
-"#define USE_TANGENT":"",c.vertexColors?"#define USE_COLOR":"",c.vertexUvs?"#define USE_UV":"",c.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",c.flatShading?"#define FLAT_SHADED":"",c.skinning?"#define USE_SKINNING":"",c.useVertexTexture?"#define BONE_TEXTURE":"",c.morphTargets?"#define USE_MORPHTARGETS":"",c.morphNormals&&!1===c.flatShading?"#define USE_MORPHNORMALS":"",c.doubleSided?"#define DOUBLE_SIDED":"",c.flipSided?"#define FLIP_SIDED":"",c.shadowMapEnabled?"#define USE_SHADOWMAP":"",c.shadowMapEnabled?
|
|
|
|
-"#define "+k:"",c.sizeAttenuation?"#define USE_SIZEATTENUATION":"",c.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",c.logarithmicDepthBuffer&&c.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","attribute vec3 position;",
|
|
|
|
-"attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;",
|
|
|
|
-"\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Ld).join("\n"),k=[h,Rh(c),"#define SHADER_NAME "+c.shaderName,t,c.alphaTest?"#define ALPHATEST "+c.alphaTest+(c.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+p,c.useFog&&c.fog?"#define USE_FOG":"",c.useFog&&c.fogExp2?"#define FOG_EXP2":"",c.map?"#define USE_MAP":"",c.matcap?
|
|
|
|
-"#define USE_MATCAP":"",c.envMap?"#define USE_ENVMAP":"",c.envMap?"#define "+l:"",c.envMap?"#define "+m:"",c.envMap?"#define "+x:"",c.lightMap?"#define USE_LIGHTMAP":"",c.aoMap?"#define USE_AOMAP":"",c.emissiveMap?"#define USE_EMISSIVEMAP":"",c.bumpMap?"#define USE_BUMPMAP":"",c.normalMap?"#define USE_NORMALMAP":"",c.normalMap&&c.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",c.normalMap&&c.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",c.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":
|
|
|
|
-"",c.specularMap?"#define USE_SPECULARMAP":"",c.roughnessMap?"#define USE_ROUGHNESSMAP":"",c.metalnessMap?"#define USE_METALNESSMAP":"",c.alphaMap?"#define USE_ALPHAMAP":"",c.sheen?"#define USE_SHEEN":"",c.vertexTangents?"#define USE_TANGENT":"",c.vertexColors?"#define USE_COLOR":"",c.vertexUvs?"#define USE_UV":"",c.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",c.gradientMap?"#define USE_GRADIENTMAP":"",c.flatShading?"#define FLAT_SHADED":"",c.doubleSided?"#define DOUBLE_SIDED":"",c.flipSided?"#define FLIP_SIDED":
|
|
|
|
-"",c.shadowMapEnabled?"#define USE_SHADOWMAP":"",c.shadowMapEnabled?"#define "+k:"",c.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",c.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",c.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",c.logarithmicDepthBuffer&&c.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(c.extensionShaderTextureLOD||c.envMap)&&c.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",
|
|
|
|
-"uniform bool isOrthographic;",0!==c.toneMapping?"#define TONE_MAPPING":"",0!==c.toneMapping?N.tonemapping_pars_fragment:"",0!==c.toneMapping?pk("toneMapping",c.toneMapping):"",c.dithering?"#define DITHERING":"",c.outputEncoding||c.mapEncoding||c.matcapEncoding||c.envMapEncoding||c.emissiveMapEncoding||c.lightMapEncoding?N.encodings_pars_fragment:"",c.mapEncoding?Kd("mapTexelToLinear",c.mapEncoding):"",c.matcapEncoding?Kd("matcapTexelToLinear",c.matcapEncoding):"",c.envMapEncoding?Kd("envMapTexelToLinear",
|
|
|
|
-c.envMapEncoding):"",c.emissiveMapEncoding?Kd("emissiveMapTexelToLinear",c.emissiveMapEncoding):"",c.lightMapEncoding?Kd("lightMapTexelToLinear",c.lightMapEncoding):"",c.outputEncoding?ok("linearToOutputTexel",c.outputEncoding):"",c.depthPacking?"#define DEPTH_PACKING "+c.depthPacking:"","\n"].filter(Ld).join("\n"));f=f.replace(kg,jg);f=Oh(f,c);f=Ph(f,c);g=g.replace(kg,jg);g=Oh(g,c);g=Ph(g,c);f=f.replace(Sh,Qh);g=g.replace(Sh,Qh);c.isWebGL2&&!c.isRawShaderMaterial&&(l=!1,m=/^\s*#version\s+300\s+es\s*\n/,
|
|
|
|
-c.isShaderMaterial&&null!==f.match(m)&&null!==g.match(m)&&(l=!0,f=f.replace(m,""),g=g.replace(m,"")),e="#version 300 es\n\n#define attribute in\n#define varying out\n#define texture2D texture\n"+e,k=["#version 300 es\n\n#define varying in",l?"":"out highp vec4 pc_fragColor;",l?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth\n#define texture2D texture\n#define textureCube texture\n#define texture2DProj textureProj\n#define texture2DLodEXT textureLod\n#define texture2DProjLodEXT textureProjLod\n#define textureCubeLodEXT textureLod\n#define texture2DGradEXT textureGrad\n#define texture2DProjGradEXT textureProjGrad\n#define textureCubeGradEXT textureGrad"].join("\n")+
|
|
|
|
|
|
+1;this.needsUpdate=!0}function Hd(a,b,c,d,e,f){this.planes=[void 0!==a?a:new Ta,void 0!==b?b:new Ta,void 0!==c?c:new Ta,void 0!==d?d:new Ta,void 0!==e?e:new Ta,void 0!==f?f:new Ta]}function Ah(){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 uj(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=new WeakMap;return{get:function(a){a.isInterleavedBufferAttribute&&
|
|
|
|
+(a=a.data);return d.get(a)},remove:function(b){b.isInterleavedBufferAttribute&&(b=b.data);var c=d.get(b);c&&(a.deleteBuffer(c.buffer),d.delete(b))},update:function(e,f){e.isInterleavedBufferAttribute&&(e=e.data);var g=d.get(e);if(void 0===g)d.set(e,c(e,f));else if(g.version<e.version){var k=e.array,l=e.updateRange;a.bindBuffer(f,g.buffer);-1===l.count?a.bufferSubData(f,0,k):(b.isWebGL2?a.bufferSubData(f,l.offset*k.BYTES_PER_ELEMENT,k,l.offset,l.count):a.bufferSubData(f,l.offset*k.BYTES_PER_ELEMENT,
|
|
|
|
+k.subarray(l.offset,l.offset+l.count)),l.count=-1);g.version=e.version}}}}function Id(a,b,c,d){L.call(this);this.type="PlaneGeometry";this.parameters={width:a,height:b,widthSegments:c,heightSegments:d};this.fromBufferGeometry(new cc(a,b,c,d));this.mergeVertices()}function cc(a,b,c,d){A.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,k=d+1,l=a/c,m=b/d,x=[],p=
|
|
|
|
+[],q=[],t=[];for(a=0;a<k;a++){var r=a*m-f;for(b=0;b<g;b++)p.push(b*l-e,-r,0),q.push(0,0,1),t.push(b/c),t.push(1-a/d)}for(a=0;a<d;a++)for(b=0;b<c;b++)e=b+g*(a+1),f=b+1+g*(a+1),k=b+1+g*a,x.push(b+g*a,e,k),x.push(e,f,k);this.setIndex(x);this.setAttribute("position",new G(p,3));this.setAttribute("normal",new G(q,3));this.setAttribute("uv",new G(t,2))}function vj(a,b,c,d){function e(a,c){b.buffers.color.setClear(a.r,a.g,a.b,c,d)}var f=new B(0),g=0,k,l,m=null,x=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,r,h){d=d.background;r=a.xr;(r=r.getSession&&r.getSession())&&"additive"===r.environmentBlendMode&&(d=null);null===d?e(f,g):d&&d.isColor&&(e(d,1),h=!0);(a.autoClear||h)&&a.clear(a.autoClearColor,a.autoClearDepth,a.autoClearStencil);if(d&&(d.isCubeTexture||d.isWebGLCubeRenderTarget||306===d.mapping)){void 0===l&&(l=new ca(new Jd(1,1,1),new pa({type:"BackgroundCubeMaterial",
|
|
|
|
+uniforms:Fc(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));h=d.isWebGLCubeRenderTarget?d.texture:d;l.material.uniforms.envMap.value=h;l.material.uniforms.flipEnvMap.value=
|
|
|
|
+h.isCubeTexture?-1:1;if(m!==d||x!==h.version||p!==a.toneMapping)l.material.needsUpdate=!0,m=d,x=h.version,p=a.toneMapping;b.unshift(l,l.geometry,l.material,0,0,null)}else if(d&&d.isTexture){void 0===k&&(k=new ca(new cc(2,2),new pa({type:"BackgroundMaterial",uniforms:Fc(eb.background.uniforms),vertexShader:eb.background.vertexShader,fragmentShader:eb.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),k.geometry.deleteAttribute("normal"),Object.defineProperty(k.material,"map",{get:function(){return this.uniforms.t2D.value}}),
|
|
|
|
+c.update(k));k.material.uniforms.t2D.value=d;!0===d.matrixAutoUpdate&&d.updateMatrix();k.material.uniforms.uvTransform.value.copy(d.matrix);if(m!==d||x!==d.version||p!==a.toneMapping)k.material.needsUpdate=!0,m=d,x=d.version,p=a.toneMapping;b.unshift(k,k.geometry,k.material,0,0,null)}}}}function wj(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,k,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,k,l,m);c.update(l,f,m)}}}function xj(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",k=d(g);k!==g&&(console.warn("THREE.WebGLRenderer:",g,"not supported, using",k,"instead."),g=k);c=!0===c.logarithmicDepthBuffer;k=a.getParameter(34930);var l=a.getParameter(35660),m=a.getParameter(3379),x=
|
|
|
|
+a.getParameter(34076),p=a.getParameter(34921),q=a.getParameter(36347),t=a.getParameter(36348),h=a.getParameter(36349),u=0<l,n=f||!!b.get("OES_texture_float"),v=u&&n,C=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:k,maxVertexTextures:l,maxTextureSize:m,maxCubemapSize:x,
|
|
|
|
+maxAttributes:p,maxVertexUniforms:q,maxVaryings:t,maxFragmentUniforms:h,vertexTextures:u,floatFragmentTextures:n,floatVertexTextures:v,maxSamples:C}}function yj(){function a(){m.value!==d&&(m.value=d,m.needsUpdate=0<e);c.numPlanes=e;c.numIntersection=0}function b(a,b,d,e){var f=null!==a?a.length:0,g=null;if(0!==f){g=m.value;if(!0!==e||null===g){e=d+4*f;b=b.matrixWorldInverse;l.getNormalMatrix(b);if(null===g||g.length<e)g=new Float32Array(e);for(e=0;e!==f;++e,d+=4)k.copy(a[e]).applyMatrix4(b,l),k.normal.toArray(g,
|
|
|
|
+d),g[d+3]=k.constant}m.value=g;m.needsUpdate=!0}c.numPlanes=f;return g}var c=this,d=null,e=0,f=!1,g=!1,k=new Ta,l=new Aa,m={value:null,needsUpdate:!1};this.uniform=m;this.numIntersection=this.numPlanes=0;this.init=function(a,c,g){var k=0!==a.length||c||0!==e||f;f=c;d=b(a,g,0);e=a.length;return k};this.beginShadows=function(){g=!0;b(null)};this.endShadows=function(){g=!1;a()};this.setState=function(c,k,l,h,r,u){if(!f||null===c||0===c.length||g&&!l)g?b(null):a();else{l=g?0:e;var p=4*l,x=r.clippingState||
|
|
|
|
+null;m.value=x;x=b(c,h,p,u);for(c=0;c!==p;++c)x[c]=d[c];r.clippingState=x;this.numIntersection=k?this.numPlanes:0;this.numPlanes+=l}}}function zj(a){var b={};return{get:function(c){if(void 0!==b[c])return b[c];switch(c){case "WEBGL_depth_texture":var d=a.getExtension("WEBGL_depth_texture")||a.getExtension("MOZ_WEBGL_depth_texture")||a.getExtension("WEBKIT_WEBGL_depth_texture");break;case "EXT_texture_filter_anisotropic":d=a.getExtension("EXT_texture_filter_anisotropic")||a.getExtension("MOZ_EXT_texture_filter_anisotropic")||
|
|
|
|
+a.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case "WEBGL_compressed_texture_s3tc":d=a.getExtension("WEBGL_compressed_texture_s3tc")||a.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||a.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case "WEBGL_compressed_texture_pvrtc":d=a.getExtension("WEBGL_compressed_texture_pvrtc")||a.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:d=a.getExtension(c)}null===d&&console.warn("THREE.WebGLRenderer: "+c+" extension not supported.");
|
|
|
|
+return b[c]=d}}}function Aj(a,b,c){function d(a){var e=a.target;a=f.get(e);null!==a.index&&b.remove(a.index);for(var k in a.attributes)b.remove(a.attributes[k]);e.removeEventListener("dispose",d);f.delete(e);if(k=g.get(a))b.remove(k),g.delete(a);c.memory.geometries--}function e(a){var c=[],d=a.index,e=a.attributes.position;if(null!==d){var f=d.array;d=d.version;e=0;for(var k=f.length;e<k;e+=3){var h=f[e+0],r=f[e+1],u=f[e+2];c.push(h,r,r,u,u,h)}}else for(f=e.array,d=e.version,e=0,k=f.length/3-1;e<
|
|
|
|
+k;e+=3)h=e+0,r=e+1,u=e+2,c.push(h,r,r,u,u,h);c=new (65535<yh(c)?Yb:Xb)(c,1);c.version=d;b.update(c,34963);(f=g.get(a))&&b.remove(f);g.set(a,c)}var f=new WeakMap,g=new WeakMap;return{get:function(a,b){var e=f.get(b);if(e)return e;b.addEventListener("dispose",d);b.isBufferGeometry?e=b:b.isGeometry&&(void 0===b._bufferGeometry&&(b._bufferGeometry=(new A).setFromObject(a)),e=b._bufferGeometry);f.set(b,e);c.memory.geometries++;return e},update:function(a){var c=a.index,d=a.attributes;null!==c&&b.update(c,
|
|
|
|
+34963);for(var e in d)b.update(d[e],34962);a=a.morphAttributes;for(e in a){c=a[e];d=0;for(var f=c.length;d<f;d++)b.update(c[d],34962)}},getWireframeAttribute:function(a){var b=g.get(a);if(b){var c=a.index;null!==c&&b.version<c.version&&e(a)}else e(a);return g.get(a)}}}function Bj(a,b,c,d){var e=d.isWebGL2,f,g,k;this.setMode=function(a){f=a};this.setIndex=function(a){g=a.type;k=a.bytesPerElement};this.render=function(b,d){a.drawElements(f,d,g,b*k);c.update(d,f)};this.renderInstances=function(d,m,x,
|
|
|
|
+p){if(0!==p){if(e){d=a;var l="drawElementsInstanced"}else if(d=b.get("ANGLE_instanced_arrays"),l="drawElementsInstancedANGLE",null===d){console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}d[l](f,x,g,m*k,p);c.update(x,f,p)}}}function Cj(a){var b={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:b,programs:null,autoReset:!0,reset:function(){b.frame++;
|
|
|
|
+b.calls=0;b.triangles=0;b.points=0;b.lines=0},update:function(a,d,e){e=e||1;b.calls++;switch(d){case 4:b.triangles+=a/3*e;break;case 1:b.lines+=a/2*e;break;case 3:b.lines+=e*(a-1);break;case 2:b.lines+=e*a;break;case 0:b.points+=e*a;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",d)}}}}function Dj(a,b){return Math.abs(b[1])-Math.abs(a[1])}function Ej(a){var b={},c=new Float32Array(8);return{update:function(d,e,f,g){var k=d.morphTargetInfluences,l=void 0===k?0:k.length;d=b[e.id];
|
|
|
|
+if(void 0===d){d=[];for(var m=0;m<l;m++)d[m]=[m,0];b[e.id]=d}var x=f.morphTargets&&e.morphAttributes.position;f=f.morphNormals&&e.morphAttributes.normal;for(m=0;m<l;m++){var p=d[m];0!==p[1]&&(x&&e.deleteAttribute("morphTarget"+m),f&&e.deleteAttribute("morphNormal"+m))}for(m=0;m<l;m++)p=d[m],p[0]=m,p[1]=k[m];d.sort(Dj);for(m=k=0;8>m;m++){if(p=d[m])if(l=p[0],p=p[1]){x&&e.setAttribute("morphTarget"+m,x[l]);f&&e.setAttribute("morphNormal"+m,f[l]);c[m]=p;k+=p;continue}c[m]=0}e=e.morphTargetsRelative?1:
|
|
|
|
+1-k;g.getUniforms().setValue(a,"morphTargetBaseInfluence",e);g.getUniforms().setValue(a,"morphTargetInfluences",c)}}}function Fj(a,b,c,d){var e={};return{update:function(a){var f=d.render.frame,k=a.geometry,l=b.get(a,k);e[l.id]!==f&&(k.isGeometry&&l.updateFromObject(a),b.update(l),e[l.id]=f);a.isInstancedMesh&&c.update(a.instanceMatrix,34962);return l},dispose:function(){e={}}}}function qb(a,b,c,d,e,f,g,k,l,m){a=void 0!==a?a:[];Y.call(this,a,void 0!==b?b:301,c,d,e,f,void 0!==g?g:1022,k,l,m);this.flipY=
|
|
|
|
+!1}function Hc(a,b,c,d){Y.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,d){Y.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 Jc(a,b,c){var d=a[0];if(0>=d||0<d)return a;var e=b*c,f=Bh[e];void 0===f&&(f=new Float32Array(e),
|
|
|
|
+Bh[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 Ja(a,b){for(var c=0,d=b.length;c<d;c++)a[c]=b[c]}function Ch(a,b){var c=Dh[b];void 0===c&&(c=new Int32Array(b),Dh[b]=c);for(var d=0;d!==b;++d)c[d]=a.allocateTextureUnit();return c}function Gj(a,b){var c=this.cache;c[0]!==b&&(a.uniform1f(this.addr,b),c[0]=b)}function Hj(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),Ja(c,b))}function Ij(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),Ja(c,b))}function Jj(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),Ja(c,b))}function Kj(a,b){var c=this.cache,d=b.elements;void 0===d?Pa(c,b)||(a.uniformMatrix2fv(this.addr,!1,b),Ja(c,b)):Pa(c,d)||(Eh.set(d),a.uniformMatrix2fv(this.addr,!1,Eh),Ja(c,d))}function Lj(a,b){var c=this.cache,d=b.elements;void 0===d?Pa(c,b)||(a.uniformMatrix3fv(this.addr,!1,b),Ja(c,b)):Pa(c,d)||(Fh.set(d),a.uniformMatrix3fv(this.addr,
|
|
|
|
+!1,Fh),Ja(c,d))}function Mj(a,b){var c=this.cache,d=b.elements;void 0===d?Pa(c,b)||(a.uniformMatrix4fv(this.addr,!1,b),Ja(c,b)):Pa(c,d)||(Gh.set(d),a.uniformMatrix4fv(this.addr,!1,Gh),Ja(c,d))}function Nj(a,b,c){var d=this.cache,e=c.allocateTextureUnit();d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=e);c.safeSetTexture2D(b||Hh,e)}function Oj(a,b,c){var d=this.cache,e=c.allocateTextureUnit();d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=e);c.setTexture2DArray(b||Pj,e)}function Qj(a,b,c){var d=this.cache,e=c.allocateTextureUnit();
|
|
|
|
+d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=e);c.setTexture3D(b||Rj,e)}function Sj(a,b,c){var d=this.cache,e=c.allocateTextureUnit();d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=e);c.safeSetTextureCube(b||Ih,e)}function Tj(a,b){var c=this.cache;c[0]!==b&&(a.uniform1i(this.addr,b),c[0]=b)}function Uj(a,b){var c=this.cache;Pa(c,b)||(a.uniform2iv(this.addr,b),Ja(c,b))}function Vj(a,b){var c=this.cache;Pa(c,b)||(a.uniform3iv(this.addr,b),Ja(c,b))}function Wj(a,b){var c=this.cache;Pa(c,b)||(a.uniform4iv(this.addr,
|
|
|
|
+b),Ja(c,b))}function Xj(a,b){var c=this.cache;c[0]!==b&&(a.uniform1ui(this.addr,b),c[0]=b)}function Yj(a){switch(a){case 5126:return Gj;case 35664:return Hj;case 35665:return Ij;case 35666:return Jj;case 35674:return Kj;case 35675:return Lj;case 35676:return Mj;case 5124:case 35670:return Tj;case 35667:case 35671:return Uj;case 35668:case 35672:return Vj;case 35669:case 35673:return Wj;case 5125:return Xj;case 35678:case 36198:case 36298:case 36306:case 35682:return Nj;case 35679:case 36299:case 36307:return Qj;
|
|
|
|
+case 35680:case 36300:case 36308:case 36293:return Sj;case 36289:case 36303:case 36311:case 36292:return Oj}}function Zj(a,b){a.uniform1fv(this.addr,b)}function ak(a,b){a.uniform1iv(this.addr,b)}function bk(a,b){a.uniform2iv(this.addr,b)}function ck(a,b){a.uniform3iv(this.addr,b)}function dk(a,b){a.uniform4iv(this.addr,b)}function ek(a,b){b=Jc(b,this.size,2);a.uniform2fv(this.addr,b)}function fk(a,b){b=Jc(b,this.size,3);a.uniform3fv(this.addr,b)}function gk(a,b){b=Jc(b,this.size,4);a.uniform4fv(this.addr,
|
|
|
|
+b)}function hk(a,b){b=Jc(b,this.size,4);a.uniformMatrix2fv(this.addr,!1,b)}function ik(a,b){b=Jc(b,this.size,9);a.uniformMatrix3fv(this.addr,!1,b)}function jk(a,b){b=Jc(b,this.size,16);a.uniformMatrix4fv(this.addr,!1,b)}function kk(a,b,c){var d=b.length,e=Ch(c,d);a.uniform1iv(this.addr,e);for(a=0;a!==d;++a)c.safeSetTexture2D(b[a]||Hh,e[a])}function lk(a,b,c){var d=b.length,e=Ch(c,d);a.uniform1iv(this.addr,e);for(a=0;a!==d;++a)c.safeSetTextureCube(b[a]||Ih,e[a])}function mk(a){switch(a){case 5126:return Zj;
|
|
|
|
+case 35664:return ek;case 35665:return fk;case 35666:return gk;case 35674:return hk;case 35675:return ik;case 35676:return jk;case 5124:case 35670:return ak;case 35667:case 35671:return bk;case 35668:case 35672:return ck;case 35669:case 35673:return dk;case 35678:case 36198:case 36298:case 36306:case 35682:return kk;case 35680:case 36300:case 36308:case 36293:return lk}}function nk(a,b,c){this.id=a;this.addr=c;this.cache=[];this.setValue=Yj(b.type)}function Jh(a,b,c){this.id=a;this.addr=c;this.cache=
|
|
|
|
+[];this.size=b.size;this.setValue=mk(b.type)}function Kh(a){this.id=a;this.seq=[];this.map={}}function Eb(a,b){this.seq=[];this.map={};for(var c=a.getProgramParameter(b,35718),d=0;d<c;++d){var e=a.getActiveUniform(b,d),f=a.getUniformLocation(b,e.name),g=this,k=e.name,l=k.length;for(ig.lastIndex=0;;){var m=ig.exec(k),x=ig.lastIndex,p=m[1],h=m[3];"]"===m[2]&&(p|=0);if(void 0===h||"["===h&&x+2===l){k=g;e=void 0===h?new nk(p,e,f):new Jh(p,e,f);k.seq.push(e);k.map[e.id]=e;break}else h=g.map[p],void 0===
|
|
|
|
+h&&(h=new Kh(p),p=g,g=h,p.seq.push(g),p.map[g.id]=g),g=h}}}function Lh(a,b,c){b=a.createShader(b);a.shaderSource(b,c);a.compileShader(b);return b}function Mh(a){switch(a){case 3E3:return["Linear","( value )"];case 3001:return["sRGB","( value )"];case 3002:return["RGBE","( value )"];case 3004:return["RGBM","( value, 7.0 )"];case 3005:return["RGBM","( value, 16.0 )"];case 3006:return["RGBD","( value, 256.0 )"];case 3007:return["Gamma","( value, float( GAMMA_FACTOR ) )"];case 3003:return["LogLuv","( value )"];
|
|
|
|
+default:throw Error("unsupported encoding: "+a);}}function Nh(a,b,c){var d=a.getShaderParameter(b,35713),e=a.getShaderInfoLog(b).trim();if(d&&""===e)return"";a=a.getShaderSource(b).split("\n");for(b=0;b<a.length;b++)a[b]=b+1+": "+a[b];a=a.join("\n");return"THREE.WebGLShader: gl.getShaderInfoLog() "+c+"\n"+e+a}function Kd(a,b){b=Mh(b);return"vec4 "+a+"( vec4 value ) { return "+b[0]+"ToLinear"+b[1]+"; }"}function ok(a,b){b=Mh(b);return"vec4 "+a+"( vec4 value ) { return LinearTo"+b[0]+b[1]+"; }"}function pk(a,
|
|
|
|
+b){switch(b){case 1:b="Linear";break;case 2:b="Reinhard";break;case 3:b="Uncharted2";break;case 4:b="OptimizedCineon";break;case 5:b="ACESFilmic";break;default:throw Error("unsupported toneMapping: "+b);}return"vec3 "+a+"( vec3 color ) { return "+b+"ToneMapping( color ); }"}function qk(a){var b=[],c;for(c in a){var d=a[c];!1!==d&&b.push("#define "+c+" "+d)}return b.join("\n")}function Ld(a){return""!==a}function Oh(a,b){return a.replace(/NUM_DIR_LIGHTS/g,b.numDirLights).replace(/NUM_SPOT_LIGHTS/g,
|
|
|
|
+b.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,b.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,b.numPointLights).replace(/NUM_HEMI_LIGHTS/g,b.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,b.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,b.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,b.numPointLightShadows)}function Ph(a,b){return a.replace(/NUM_CLIPPING_PLANES/g,b.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,b.numClippingPlanes-b.numClipIntersection)}function jg(a,b){a=
|
|
|
|
+N[b];if(void 0===a)throw Error("Can not resolve #include <"+b+">");return a.replace(kg,jg)}function Qh(a,b,c,d){a="";for(b=parseInt(b);b<parseInt(c);b++)a+=d.replace(/\[ i \]/g,"[ "+b+" ]").replace(/UNROLLED_LOOP_INDEX/g,b);return a}function Rh(a){var b="precision "+a.precision+" float;\nprecision "+a.precision+" int;";"highp"===a.precision?b+="\n#define HIGH_PRECISION":"mediump"===a.precision?b+="\n#define MEDIUM_PRECISION":"lowp"===a.precision&&(b+="\n#define LOW_PRECISION");return b}function rk(a){var b=
|
|
|
|
+"SHADOWMAP_TYPE_BASIC";1===a.shadowMapType?b="SHADOWMAP_TYPE_PCF":2===a.shadowMapType?b="SHADOWMAP_TYPE_PCF_SOFT":3===a.shadowMapType&&(b="SHADOWMAP_TYPE_VSM");return b}function sk(a){var b="ENVMAP_TYPE_CUBE";if(a.envMap)switch(a.envMapMode){case 301:case 302:b="ENVMAP_TYPE_CUBE";break;case 306:case 307:b="ENVMAP_TYPE_CUBE_UV";break;case 303:case 304:b="ENVMAP_TYPE_EQUIREC";break;case 305:b="ENVMAP_TYPE_SPHERE"}return b}function tk(a){var b="ENVMAP_MODE_REFLECTION";if(a.envMap)switch(a.envMapMode){case 302:case 304:b=
|
|
|
|
+"ENVMAP_MODE_REFRACTION"}return b}function uk(a){var b="ENVMAP_BLENDING_NONE";if(a.envMap)switch(a.combine){case 0:b="ENVMAP_BLENDING_MULTIPLY";break;case 1:b="ENVMAP_BLENDING_MIX";break;case 2:b="ENVMAP_BLENDING_ADD"}return b}function vk(a,b,c){var d=a.getContext(),e=c.defines,f=c.vertexShader,g=c.fragmentShader,k=rk(c),l=sk(c),m=tk(c),x=uk(c),p=0<a.gammaFactor?a.gammaFactor:1,h=c.isWebGL2?"":[c.extensionDerivatives||c.envMapCubeUV||c.bumpMap||c.tangentSpaceNormalMap||c.clearcoatNormalMap||c.flatShading||
|
|
|
|
+"physical"===c.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(c.extensionFragDepth||c.logarithmicDepthBuffer)&&c.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",c.extensionDrawBuffers&&c.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(c.extensionShaderTextureLOD||c.envMap)&&c.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Ld).join("\n"),t=qk(e),r=d.createProgram(),u=c.numMultiviewViews;
|
|
|
|
+c.isRawShaderMaterial?(e=[t].filter(Ld).join("\n"),0<e.length&&(e+="\n"),k=[h,t].filter(Ld).join("\n"),0<k.length&&(k+="\n")):(e=[Rh(c),"#define SHADER_NAME "+c.shaderName,t,c.instancing?"#define USE_INSTANCING":"",c.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+p,"#define MAX_BONES "+c.maxBones,c.useFog&&c.fog?"#define USE_FOG":"",c.useFog&&c.fogExp2?"#define FOG_EXP2":"",c.map?"#define USE_MAP":"",c.envMap?"#define USE_ENVMAP":"",c.envMap?"#define "+m:"",c.lightMap?
|
|
|
|
+"#define USE_LIGHTMAP":"",c.aoMap?"#define USE_AOMAP":"",c.emissiveMap?"#define USE_EMISSIVEMAP":"",c.bumpMap?"#define USE_BUMPMAP":"",c.normalMap?"#define USE_NORMALMAP":"",c.normalMap&&c.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",c.normalMap&&c.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",c.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",c.displacementMap&&c.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",c.specularMap?"#define USE_SPECULARMAP":"",c.roughnessMap?
|
|
|
|
+"#define USE_ROUGHNESSMAP":"",c.metalnessMap?"#define USE_METALNESSMAP":"",c.alphaMap?"#define USE_ALPHAMAP":"",c.vertexTangents?"#define USE_TANGENT":"",c.vertexColors?"#define USE_COLOR":"",c.vertexUvs?"#define USE_UV":"",c.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",c.flatShading?"#define FLAT_SHADED":"",c.skinning?"#define USE_SKINNING":"",c.useVertexTexture?"#define BONE_TEXTURE":"",c.morphTargets?"#define USE_MORPHTARGETS":"",c.morphNormals&&!1===c.flatShading?"#define USE_MORPHNORMALS":"",c.doubleSided?
|
|
|
|
+"#define DOUBLE_SIDED":"",c.flipSided?"#define FLIP_SIDED":"",c.shadowMapEnabled?"#define USE_SHADOWMAP":"",c.shadowMapEnabled?"#define "+k:"",c.sizeAttenuation?"#define USE_SIZEATTENUATION":"",c.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",c.logarithmicDepthBuffer&&c.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;",
|
|
|
|
+"uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;",
|
|
|
|
+"\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Ld).join("\n"),k=[h,Rh(c),"#define SHADER_NAME "+c.shaderName,t,c.alphaTest?"#define ALPHATEST "+c.alphaTest+(c.alphaTest%
|
|
|
|
+1?"":".0"):"","#define GAMMA_FACTOR "+p,c.useFog&&c.fog?"#define USE_FOG":"",c.useFog&&c.fogExp2?"#define FOG_EXP2":"",c.map?"#define USE_MAP":"",c.matcap?"#define USE_MATCAP":"",c.envMap?"#define USE_ENVMAP":"",c.envMap?"#define "+l:"",c.envMap?"#define "+m:"",c.envMap?"#define "+x:"",c.lightMap?"#define USE_LIGHTMAP":"",c.aoMap?"#define USE_AOMAP":"",c.emissiveMap?"#define USE_EMISSIVEMAP":"",c.bumpMap?"#define USE_BUMPMAP":"",c.normalMap?"#define USE_NORMALMAP":"",c.normalMap&&c.objectSpaceNormalMap?
|
|
|
|
+"#define OBJECTSPACE_NORMALMAP":"",c.normalMap&&c.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",c.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",c.specularMap?"#define USE_SPECULARMAP":"",c.roughnessMap?"#define USE_ROUGHNESSMAP":"",c.metalnessMap?"#define USE_METALNESSMAP":"",c.alphaMap?"#define USE_ALPHAMAP":"",c.sheen?"#define USE_SHEEN":"",c.vertexTangents?"#define USE_TANGENT":"",c.vertexColors?"#define USE_COLOR":"",c.vertexUvs?"#define USE_UV":"",c.uvsVertexOnly?"#define UVS_VERTEX_ONLY":
|
|
|
|
+"",c.gradientMap?"#define USE_GRADIENTMAP":"",c.flatShading?"#define FLAT_SHADED":"",c.doubleSided?"#define DOUBLE_SIDED":"",c.flipSided?"#define FLIP_SIDED":"",c.shadowMapEnabled?"#define USE_SHADOWMAP":"",c.shadowMapEnabled?"#define "+k:"",c.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",c.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",c.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",c.logarithmicDepthBuffer&&c.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",
|
|
|
|
+(c.extensionShaderTextureLOD||c.envMap)&&c.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==c.toneMapping?"#define TONE_MAPPING":"",0!==c.toneMapping?N.tonemapping_pars_fragment:"",0!==c.toneMapping?pk("toneMapping",c.toneMapping):"",c.dithering?"#define DITHERING":"",c.outputEncoding||c.mapEncoding||c.matcapEncoding||c.envMapEncoding||c.emissiveMapEncoding||c.lightMapEncoding?N.encodings_pars_fragment:
|
|
|
|
+"",c.mapEncoding?Kd("mapTexelToLinear",c.mapEncoding):"",c.matcapEncoding?Kd("matcapTexelToLinear",c.matcapEncoding):"",c.envMapEncoding?Kd("envMapTexelToLinear",c.envMapEncoding):"",c.emissiveMapEncoding?Kd("emissiveMapTexelToLinear",c.emissiveMapEncoding):"",c.lightMapEncoding?Kd("lightMapTexelToLinear",c.lightMapEncoding):"",c.outputEncoding?ok("linearToOutputTexel",c.outputEncoding):"",c.depthPacking?"#define DEPTH_PACKING "+c.depthPacking:"","\n"].filter(Ld).join("\n"));f=f.replace(kg,jg);f=
|
|
|
|
+Oh(f,c);f=Ph(f,c);g=g.replace(kg,jg);g=Oh(g,c);g=Ph(g,c);f=f.replace(Sh,Qh);g=g.replace(Sh,Qh);c.isWebGL2&&!c.isRawShaderMaterial&&(l=!1,m=/^\s*#version\s+300\s+es\s*\n/,c.isShaderMaterial&&null!==f.match(m)&&null!==g.match(m)&&(l=!0,f=f.replace(m,""),g=g.replace(m,"")),e="#version 300 es\n\n#define attribute in\n#define varying out\n#define texture2D texture\n"+e,k=["#version 300 es\n\n#define varying in",l?"":"out highp vec4 pc_fragColor;",l?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth\n#define texture2D texture\n#define textureCube texture\n#define texture2DProj textureProj\n#define texture2DLodEXT textureLod\n#define texture2DProjLodEXT textureProjLod\n#define textureCubeLodEXT textureLod\n#define texture2DGradEXT textureGrad\n#define texture2DProjGradEXT textureProjGrad\n#define textureCubeGradEXT textureGrad"].join("\n")+
|
|
"\n"+k,0<u&&(e=e.replace("#version 300 es\n",["#version 300 es\n\n#extension GL_OVR_multiview2 : require","layout(num_views = "+u+") in;","#define VIEW_ID gl_ViewID_OVR"].join("\n")),e=e.replace("uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;",["uniform mat4 modelViewMatrices["+u+"];","uniform mat4 projectionMatrices["+u+"];","uniform mat4 viewMatrices["+u+"];","uniform mat3 normalMatrices["+u+"];","#define modelViewMatrix modelViewMatrices[VIEW_ID]\n#define projectionMatrix projectionMatrices[VIEW_ID]\n#define viewMatrix viewMatrices[VIEW_ID]\n#define normalMatrix normalMatrices[VIEW_ID]"].join("\n")),
|
|
"\n"+k,0<u&&(e=e.replace("#version 300 es\n",["#version 300 es\n\n#extension GL_OVR_multiview2 : require","layout(num_views = "+u+") in;","#define VIEW_ID gl_ViewID_OVR"].join("\n")),e=e.replace("uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;",["uniform mat4 modelViewMatrices["+u+"];","uniform mat4 projectionMatrices["+u+"];","uniform mat4 viewMatrices["+u+"];","uniform mat3 normalMatrices["+u+"];","#define modelViewMatrix modelViewMatrices[VIEW_ID]\n#define projectionMatrix projectionMatrices[VIEW_ID]\n#define viewMatrix viewMatrices[VIEW_ID]\n#define normalMatrix normalMatrices[VIEW_ID]"].join("\n")),
|
|
k=k.replace("#version 300 es\n","#version 300 es\n\n#extension GL_OVR_multiview2 : require\n#define VIEW_ID gl_ViewID_OVR"),k=k.replace("uniform mat4 viewMatrix;",["uniform mat4 viewMatrices["+u+"];","#define viewMatrix viewMatrices[VIEW_ID]"].join("\n"))));g=k+g;f=Lh(d,35633,e+f);g=Lh(d,35632,g);d.attachShader(r,f);d.attachShader(r,g);void 0!==c.index0AttributeName?d.bindAttribLocation(r,0,c.index0AttributeName):!0===c.morphTargets&&d.bindAttribLocation(r,0,"position");d.linkProgram(r);if(a.debug.checkShaderErrors){a=
|
|
k=k.replace("#version 300 es\n","#version 300 es\n\n#extension GL_OVR_multiview2 : require\n#define VIEW_ID gl_ViewID_OVR"),k=k.replace("uniform mat4 viewMatrix;",["uniform mat4 viewMatrices["+u+"];","#define viewMatrix viewMatrices[VIEW_ID]"].join("\n"))));g=k+g;f=Lh(d,35633,e+f);g=Lh(d,35632,g);d.attachShader(r,f);d.attachShader(r,g);void 0!==c.index0AttributeName?d.bindAttribLocation(r,0,c.index0AttributeName):!0===c.morphTargets&&d.bindAttribLocation(r,0,"position");d.linkProgram(r);if(a.debug.checkShaderErrors){a=
|
|
d.getProgramInfoLog(r).trim();l=d.getShaderInfoLog(f).trim();m=d.getShaderInfoLog(g).trim();p=x=!0;if(!1===d.getProgramParameter(r,35714))x=!1,h=Nh(d,f,"vertex"),t=Nh(d,g,"fragment"),console.error("THREE.WebGLProgram: shader error: ",d.getError(),"35715",d.getProgramParameter(r,35715),"gl.getProgramInfoLog",a,h,t);else if(""!==a)console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",a);else if(""===l||""===m)p=!1;p&&(this.diagnostics={runnable:x,programLog:a,vertexShader:{log:l,prefix:e},fragmentShader:{log:m,
|
|
d.getProgramInfoLog(r).trim();l=d.getShaderInfoLog(f).trim();m=d.getShaderInfoLog(g).trim();p=x=!0;if(!1===d.getProgramParameter(r,35714))x=!1,h=Nh(d,f,"vertex"),t=Nh(d,g,"fragment"),console.error("THREE.WebGLProgram: shader error: ",d.getError(),"35715",d.getProgramParameter(r,35715),"gl.getProgramInfoLog",a,h,t);else if(""!==a)console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",a);else if(""===l||""===m)p=!1;p&&(this.diagnostics={runnable:x,programLog:a,vertexShader:{log:l,prefix:e},fragmentShader:{log:m,
|
|
@@ -170,8 +170,8 @@ function(a){x=a};this.getReferenceSpace=function(){return m};this.getSession=fun
|
|
l.requestReferenceSpace(x).then(e),l.addEventListener("inputsourceschange",f))};var w=new n,ja=new n;this.getCamera=function(a){y.near=u.near=r.near=a.near;y.far=u.far=r.far=a.far;if(v!==y.near||C!==y.far)l.updateRenderState({depthNear:y.near,depthFar:y.far}),v=y.near,C=y.far;var b=a.parent,c=y.cameras;g(y,b);for(var d=0;d<c.length;d++)g(c[d],b);a.matrixWorld.copy(y.matrixWorld);a=a.children;d=0;for(b=a.length;d<b;d++)a[d].updateMatrixWorld(!0);w.setFromMatrixPosition(r.matrixWorld);ja.setFromMatrixPosition(u.matrixWorld);
|
|
l.requestReferenceSpace(x).then(e),l.addEventListener("inputsourceschange",f))};var w=new n,ja=new n;this.getCamera=function(a){y.near=u.near=r.near=a.near;y.far=u.far=r.far=a.far;if(v!==y.near||C!==y.far)l.updateRenderState({depthNear:y.near,depthFar:y.far}),v=y.near,C=y.far;var b=a.parent,c=y.cameras;g(y,b);for(var d=0;d<c.length;d++)g(c[d],b);a.matrixWorld.copy(y.matrixWorld);a=a.children;d=0;for(b=a.length;d<b;d++)a[d].updateMatrixWorld(!0);w.setFromMatrixPosition(r.matrixWorld);ja.setFromMatrixPosition(u.matrixWorld);
|
|
d=w.distanceTo(ja);var e=r.projectionMatrix.elements,f=u.projectionMatrix.elements,k=e[14]/(e[10]-1);a=e[14]/(e[10]+1);b=(e[9]+1)/e[5];c=(e[9]-1)/e[5];var m=(e[8]-1)/e[0],p=(f[8]+1)/f[0];f=k*m;e=k*p;p=d/(-m+p);m=p*-m;r.matrixWorld.decompose(y.position,y.quaternion,y.scale);y.translateX(m);y.translateZ(p);y.matrixWorld.compose(y.position,y.quaternion,y.scale);y.matrixWorldInverse.getInverse(y.matrixWorld);k+=p;p=a+p;y.projectionMatrix.makePerspective(f-m,e+(d-m),b*a/p*k,c*a/p*k,k,p);return y};var z=
|
|
d=w.distanceTo(ja);var e=r.projectionMatrix.elements,f=u.projectionMatrix.elements,k=e[14]/(e[10]-1);a=e[14]/(e[10]+1);b=(e[9]+1)/e[5];c=(e[9]-1)/e[5];var m=(e[8]-1)/e[0],p=(f[8]+1)/f[0];f=k*m;e=k*p;p=d/(-m+p);m=p*-m;r.matrixWorld.decompose(y.position,y.quaternion,y.scale);y.translateX(m);y.translateZ(p);y.matrixWorld.compose(y.position,y.quaternion,y.scale);y.matrixWorldInverse.getInverse(y.matrixWorld);k+=p;p=a+p;y.projectionMatrix.makePerspective(f-m,e+(d-m),b*a/p*k,c*a/p*k,k,p);return y};var z=
|
|
null,ra=new Ah;ra.setAnimationLoop(function(b,c){p=c.getViewerPose(m);if(null!==p){var d=p.views,e=l.renderState.baseLayer;a.setFramebuffer(e.framebuffer);for(var f=0;f<d.length;f++){var g=d[f],k=e.getViewport(g),x=y.cameras[f];x.matrix.fromArray(g.transform.matrix);x.projectionMatrix.fromArray(g.projectionMatrix);x.viewport.set(k.x,k.y,k.width,k.height);0===f&&y.matrix.copy(x.matrix)}}d=l.inputSources;for(f=0;f<h.length;f++){e=h[f];if(g=d[f])if(g=c.getPose(g.targetRaySpace,m),null!==g){e.matrix.fromArray(g.transform.matrix);
|
|
null,ra=new Ah;ra.setAnimationLoop(function(b,c){p=c.getViewerPose(m);if(null!==p){var d=p.views,e=l.renderState.baseLayer;a.setFramebuffer(e.framebuffer);for(var f=0;f<d.length;f++){var g=d[f],k=e.getViewport(g),x=y.cameras[f];x.matrix.fromArray(g.transform.matrix);x.projectionMatrix.fromArray(g.projectionMatrix);x.viewport.set(k.x,k.y,k.width,k.height);0===f&&y.matrix.copy(x.matrix)}}d=l.inputSources;for(f=0;f<h.length;f++){e=h[f];if(g=d[f])if(g=c.getPose(g.targetRaySpace,m),null!==g){e.matrix.fromArray(g.transform.matrix);
|
|
-e.matrix.decompose(e.position,e.rotation,e.scale);e.visible=!0;continue}e.visible=!1}z&&z(b,c)});this.setAnimationLoop=function(a){z=a};this.dispose=function(){}}function qg(a){var b;function c(){ta=new zj(H);Ia=new xj(H,ta,a);!1===Ia.isWebGL2&&(ta.get("WEBGL_depth_texture"),ta.get("OES_texture_float"),ta.get("OES_texture_half_float"),ta.get("OES_texture_half_float_linear"),ta.get("OES_standard_derivatives"),ta.get("OES_element_index_uint"),ta.get("ANGLE_instanced_arrays"));ta.get("OES_texture_float_linear");
|
|
|
|
-pa=new Yh(H,ta,Ia);Z=new Hk(H,ta,Ia);Z.scissor(X.copy(ia).multiplyScalar(Q).floor());Z.viewport(W.copy(ea).multiplyScalar(Q).floor());da=new Cj(H);S=new yk;U=new Ik(H,ta,Z,S,Ia,pa,da);na=new uj(H);Aa=new Aj(H,na,da);ua=new Fj(H,Aa,na,da);Ba=new Ej(H);va=new xk(A,ta,Ia);za=new Bk;xa=new Gk;oa=new vj(A,Z,ua,z);Ca=new wj(H,ta,da,Ia);Ea=new Bj(H,ta,da,Ia);da.programs=va.programs;A.capabilities=Ia;A.extensions=ta;A.properties=S;A.renderLists=za;A.state=Z;A.info=da}function d(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");
|
|
|
|
|
|
+e.matrix.decompose(e.position,e.rotation,e.scale);e.visible=!0;continue}e.visible=!1}z&&z(b,c)});this.setAnimationLoop=function(a){z=a};this.dispose=function(){}}function qg(a){var b;function c(){ta=new zj(H);Ha=new xj(H,ta,a);!1===Ha.isWebGL2&&(ta.get("WEBGL_depth_texture"),ta.get("OES_texture_float"),ta.get("OES_texture_half_float"),ta.get("OES_texture_half_float_linear"),ta.get("OES_standard_derivatives"),ta.get("OES_element_index_uint"),ta.get("ANGLE_instanced_arrays"));ta.get("OES_texture_float_linear");
|
|
|
|
+pa=new Yh(H,ta,Ha);Z=new Hk(H,ta,Ha);Z.scissor(X.copy(ia).multiplyScalar(Q).floor());Z.viewport(W.copy(ea).multiplyScalar(Q).floor());da=new Cj(H);S=new yk;U=new Ik(H,ta,Z,S,Ha,pa,da);na=new uj(H,Ha);Aa=new Aj(H,na,da);ua=new Fj(H,Aa,na,da);Ba=new Ej(H);va=new xk(A,ta,Ha);za=new Bk;xa=new Gk;oa=new vj(A,Z,ua,z);Ca=new wj(H,ta,da,Ha);Ea=new Bj(H,ta,da,Ha);da.programs=va.programs;A.capabilities=Ha;A.extensions=ta;A.properties=S;A.renderLists=za;A.state=Z;A.info=da}function d(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");
|
|
I=!0}function e(){console.log("THREE.WebGLRenderer: Context Restored.");I=!1;c()}function f(a){a=a.target;a.removeEventListener("dispose",f);g(a);S.remove(a)}function g(a){var b=S.get(a).program;a.program=void 0;void 0!==b&&va.releaseProgram(b)}function k(a,b){a.render(function(a){A.renderBufferImmediate(a,b)})}function l(a,b,c,d){if(!1!==a.visible){if(a.layers.test(b.layers))if(a.isGroup)c=a.renderOrder;else if(a.isLOD)!0===a.autoUpdate&&a.update(b);else if(a.isLight)F.pushLight(a),a.castShadow&&
|
|
I=!0}function e(){console.log("THREE.WebGLRenderer: Context Restored.");I=!1;c()}function f(a){a=a.target;a.removeEventListener("dispose",f);g(a);S.remove(a)}function g(a){var b=S.get(a).program;a.program=void 0;void 0!==b&&va.releaseProgram(b)}function k(a,b){a.render(function(a){A.renderBufferImmediate(a,b)})}function l(a,b,c,d){if(!1!==a.visible){if(a.layers.test(b.layers))if(a.isGroup)c=a.renderOrder;else if(a.isLOD)!0===a.autoUpdate&&a.update(b);else if(a.isLight)F.pushLight(a),a.castShadow&&
|
|
F.pushShadow(a);else if(a.isSprite){if(!a.frustumCulled||mg.intersectsSprite(a)){d&&Ib.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Nd);var e=ua.update(a),f=a.material;f.visible&&B.push(a,e,f,c,Ib.z,null)}}else if(a.isImmediateRenderObject)d&&Ib.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Nd),B.push(a,null,a.material,c,Ib.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&a.skeleton.frame!==da.render.frame&&(a.skeleton.update(),a.skeleton.frame=da.render.frame),!a.frustumCulled||
|
|
F.pushShadow(a);else if(a.isSprite){if(!a.frustumCulled||mg.intersectsSprite(a)){d&&Ib.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Nd);var e=ua.update(a),f=a.material;f.visible&&B.push(a,e,f,c,Ib.z,null)}}else if(a.isImmediateRenderObject)d&&Ib.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Nd),B.push(a,null,a.material,c,Ib.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&a.skeleton.frame!==da.render.frame&&(a.skeleton.update(),a.skeleton.frame=da.render.frame),!a.frustumCulled||
|
|
mg.intersectsObject(a))if(d&&Ib.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Nd),e=ua.update(a),f=a.material,Array.isArray(f))for(var g=e.groups,k=0,m=g.length;k<m;k++){var p=g[k],x=f[p.materialIndex];x&&x.visible&&B.push(a,e,x,c,Ib.z,p)}else f.visible&&B.push(a,e,f,c,Ib.z,null);a=a.children;k=0;for(m=a.length;k<m;k++)l(a[k],b,c,d)}}function m(a,b,c,d){for(var e=0,f=a.length;e<f;e++){var g=a[e],k=g.object,l=g.geometry,m=void 0===d?g.material:d;g=g.group;if(c.isArrayCamera)if(T=c,la.enabled&&
|
|
mg.intersectsObject(a))if(d&&Ib.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Nd),e=ua.update(a),f=a.material,Array.isArray(f))for(var g=e.groups,k=0,m=g.length;k<m;k++){var p=g[k],x=f[p.materialIndex];x&&x.visible&&B.push(a,e,x,c,Ib.z,p)}else f.visible&&B.push(a,e,f,c,Ib.z,null);a=a.children;k=0;for(m=a.length;k<m;k++)l(a[k],b,c,d)}}function m(a,b,c,d){for(var e=0,f=a.length;e<f;e++){var g=a[e],k=g.object,l=g.geometry,m=void 0===d?g.material:d;g=g.group;if(c.isArrayCamera)if(T=c,la.enabled&&
|
|
@@ -181,9 +181,9 @@ a.isMeshStandardMaterial?b.environment:null,d.outputEncoding=A.outputEncoding,a.
|
|
c.clippingPlanes=Ua.uniform;d.fog=b.fog;d.needsLights=a.isMeshLambertMaterial||a.isMeshToonMaterial||a.isMeshPhongMaterial||a.isMeshStandardMaterial||a.isShadowMaterial||a.isShaderMaterial&&!0===a.lights;d.lightsStateVersion=k;d.needsLights&&(c.ambientLightColor.value=e.state.ambient,c.lightProbe.value=e.state.probe,c.directionalLights.value=e.state.directional,c.spotLights.value=e.state.spot,c.rectAreaLights.value=e.state.rectArea,c.pointLights.value=e.state.point,c.hemisphereLights.value=e.state.hemi,
|
|
c.clippingPlanes=Ua.uniform;d.fog=b.fog;d.needsLights=a.isMeshLambertMaterial||a.isMeshToonMaterial||a.isMeshPhongMaterial||a.isMeshStandardMaterial||a.isShadowMaterial||a.isShaderMaterial&&!0===a.lights;d.lightsStateVersion=k;d.needsLights&&(c.ambientLightColor.value=e.state.ambient,c.lightProbe.value=e.state.probe,c.directionalLights.value=e.state.directional,c.spotLights.value=e.state.spot,c.rectAreaLights.value=e.state.rectArea,c.pointLights.value=e.state.point,c.hemisphereLights.value=e.state.hemi,
|
|
c.directionalShadowMap.value=e.state.directionalShadowMap,c.directionalShadowMatrix.value=e.state.directionalShadowMatrix,c.spotShadowMap.value=e.state.spotShadowMap,c.spotShadowMatrix.value=e.state.spotShadowMatrix,c.pointShadowMap.value=e.state.pointShadowMap,c.pointShadowMatrix.value=e.state.pointShadowMatrix);a=d.program.getUniforms();a=Eb.seqWithValue(a.seq,c);d.uniformsList=a}function h(a,b,c,d){U.resetTextureUnits();var e=b.fog,f=c.isMeshStandardMaterial?b.environment:null,g=S.get(c),k=F.state.lights;
|
|
c.directionalShadowMap.value=e.state.directionalShadowMap,c.directionalShadowMatrix.value=e.state.directionalShadowMatrix,c.spotShadowMap.value=e.state.spotShadowMap,c.spotShadowMatrix.value=e.state.spotShadowMatrix,c.pointShadowMap.value=e.state.pointShadowMap,c.pointShadowMatrix.value=e.state.pointShadowMatrix);a=d.program.getUniforms();a=Eb.seqWithValue(a.seq,c);d.uniformsList=a}function h(a,b,c,d){U.resetTextureUnits();var e=b.fog,f=c.isMeshStandardMaterial?b.environment:null,g=S.get(c),k=F.state.lights;
|
|
qa&&(ng||a!==Y)&&Ua.setState(c.clippingPlanes,c.clipIntersection,c.clipShadows,a,g,a===Y&&c.id===Pe);c.version===g.__version?void 0===g.program?p(c,b,d):c.fog&&g.fog!==e?p(c,b,d):g.environment!==f?p(c,b,d):g.needsLights&&g.lightsStateVersion!==k.state.version?p(c,b,d):void 0===g.numClippingPlanes||g.numClippingPlanes===Ua.numPlanes&&g.numIntersection===Ua.numIntersection?g.outputEncoding!==A.outputEncoding&&p(c,b,d):p(c,b,d):(p(c,b,d),g.__version=c.version);var l=!1,m=!1,x=!1;b=g.program;k=b.getUniforms();
|
|
qa&&(ng||a!==Y)&&Ua.setState(c.clippingPlanes,c.clipIntersection,c.clipShadows,a,g,a===Y&&c.id===Pe);c.version===g.__version?void 0===g.program?p(c,b,d):c.fog&&g.fog!==e?p(c,b,d):g.environment!==f?p(c,b,d):g.needsLights&&g.lightsStateVersion!==k.state.version?p(c,b,d):void 0===g.numClippingPlanes||g.numClippingPlanes===Ua.numPlanes&&g.numIntersection===Ua.numIntersection?g.outputEncoding!==A.outputEncoding&&p(c,b,d):p(c,b,d):(p(c,b,d),g.__version=c.version);var l=!1,m=!1,x=!1;b=g.program;k=b.getUniforms();
|
|
-var h=g.uniforms;Z.useProgram(b.program)&&(x=m=l=!0);c.id!==Pe&&(Pe=c.id,m=!0);if(l||Y!==a){0<b.numMultiviewViews?wa.updateCameraProjectionMatricesUniform(a,k):k.setValue(H,"projectionMatrix",a.projectionMatrix);Ia.logarithmicDepthBuffer&&k.setValue(H,"logDepthBufFC",2/(Math.log(a.far+1)/Math.LN2));Y!==a&&(Y=a,x=m=!0);if(c.isShaderMaterial||c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshStandardMaterial||c.envMap)l=k.map.cameraPosition,void 0!==l&&l.setValue(H,Ib.setFromMatrixPosition(a.matrixWorld));
|
|
|
|
|
|
+var h=g.uniforms;Z.useProgram(b.program)&&(x=m=l=!0);c.id!==Pe&&(Pe=c.id,m=!0);if(l||Y!==a){0<b.numMultiviewViews?wa.updateCameraProjectionMatricesUniform(a,k):k.setValue(H,"projectionMatrix",a.projectionMatrix);Ha.logarithmicDepthBuffer&&k.setValue(H,"logDepthBufFC",2/(Math.log(a.far+1)/Math.LN2));Y!==a&&(Y=a,x=m=!0);if(c.isShaderMaterial||c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshStandardMaterial||c.envMap)l=k.map.cameraPosition,void 0!==l&&l.setValue(H,Ib.setFromMatrixPosition(a.matrixWorld));
|
|
(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial)&&k.setValue(H,"isOrthographic",!0===a.isOrthographicCamera);if(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial||c.skinning)0<b.numMultiviewViews?wa.updateCameraViewMatricesUniform(a,k):k.setValue(H,"viewMatrix",a.matrixWorldInverse)}if(c.skinning&&(k.setOptional(H,d,"bindMatrix"),
|
|
(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial)&&k.setValue(H,"isOrthographic",!0===a.isOrthographicCamera);if(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial||c.skinning)0<b.numMultiviewViews?wa.updateCameraViewMatricesUniform(a,k):k.setValue(H,"viewMatrix",a.matrixWorldInverse)}if(c.skinning&&(k.setOptional(H,d,"bindMatrix"),
|
|
-k.setOptional(H,d,"bindMatrixInverse"),l=d.skeleton)){var q=l.bones;if(Ia.floatVertexTextures){if(void 0===l.boneTexture){q=Math.sqrt(4*q.length);q=P.ceilPowerOfTwo(q);q=Math.max(q,4);var n=new Float32Array(q*q*4);n.set(l.boneMatrices);var u=new bc(n,q,q,1023,1015);l.boneMatrices=n;l.boneTexture=u;l.boneTextureSize=q}k.setValue(H,"boneTexture",l.boneTexture,U);k.setValue(H,"boneTextureSize",l.boneTextureSize)}else k.setOptional(H,l,"boneMatrices")}if(m||g.receiveShadow!==d.receiveShadow)g.receiveShadow=
|
|
|
|
|
|
+k.setOptional(H,d,"bindMatrixInverse"),l=d.skeleton)){var q=l.bones;if(Ha.floatVertexTextures){if(void 0===l.boneTexture){q=Math.sqrt(4*q.length);q=P.ceilPowerOfTwo(q);q=Math.max(q,4);var n=new Float32Array(q*q*4);n.set(l.boneMatrices);var u=new bc(n,q,q,1023,1015);l.boneMatrices=n;l.boneTexture=u;l.boneTextureSize=q}k.setValue(H,"boneTexture",l.boneTexture,U);k.setValue(H,"boneTextureSize",l.boneTextureSize)}else k.setOptional(H,l,"boneMatrices")}if(m||g.receiveShadow!==d.receiveShadow)g.receiveShadow=
|
|
d.receiveShadow,k.setValue(H,"receiveShadow",d.receiveShadow);if(m){k.setValue(H,"toneMappingExposure",A.toneMappingExposure);k.setValue(H,"toneMappingWhitePoint",A.toneMappingWhitePoint);g.needsLights&&(m=x,h.ambientLightColor.needsUpdate=m,h.lightProbe.needsUpdate=m,h.directionalLights.needsUpdate=m,h.pointLights.needsUpdate=m,h.spotLights.needsUpdate=m,h.rectAreaLights.needsUpdate=m,h.hemisphereLights.needsUpdate=m);e&&c.fog&&(h.fogColor.value.copy(e.color),e.isFog?(h.fogNear.value=e.near,h.fogFar.value=
|
|
d.receiveShadow,k.setValue(H,"receiveShadow",d.receiveShadow);if(m){k.setValue(H,"toneMappingExposure",A.toneMappingExposure);k.setValue(H,"toneMappingWhitePoint",A.toneMappingWhitePoint);g.needsLights&&(m=x,h.ambientLightColor.needsUpdate=m,h.lightProbe.needsUpdate=m,h.directionalLights.needsUpdate=m,h.pointLights.needsUpdate=m,h.spotLights.needsUpdate=m,h.rectAreaLights.needsUpdate=m,h.hemisphereLights.needsUpdate=m);e&&c.fog&&(h.fogColor.value.copy(e.color),e.isFog?(h.fogNear.value=e.near,h.fogFar.value=
|
|
e.far):e.isFogExp2&&(h.fogDensity.value=e.density));if(c.isMeshBasicMaterial)t(h,c);else if(c.isMeshLambertMaterial)t(h,c),c.emissiveMap&&(h.emissiveMap.value=c.emissiveMap);else if(c.isMeshToonMaterial)t(h,c),h.specular.value.copy(c.specular),h.shininess.value=Math.max(c.shininess,1E-4),c.gradientMap&&(h.gradientMap.value=c.gradientMap),c.emissiveMap&&(h.emissiveMap.value=c.emissiveMap),c.bumpMap&&(h.bumpMap.value=c.bumpMap,h.bumpScale.value=c.bumpScale,1===c.side&&(h.bumpScale.value*=-1)),c.normalMap&&
|
|
e.far):e.isFogExp2&&(h.fogDensity.value=e.density));if(c.isMeshBasicMaterial)t(h,c);else if(c.isMeshLambertMaterial)t(h,c),c.emissiveMap&&(h.emissiveMap.value=c.emissiveMap);else if(c.isMeshToonMaterial)t(h,c),h.specular.value.copy(c.specular),h.shininess.value=Math.max(c.shininess,1E-4),c.gradientMap&&(h.gradientMap.value=c.gradientMap),c.emissiveMap&&(h.emissiveMap.value=c.emissiveMap),c.bumpMap&&(h.bumpMap.value=c.bumpMap,h.bumpScale.value=c.bumpScale,1===c.side&&(h.bumpScale.value*=-1)),c.normalMap&&
|
|
(h.normalMap.value=c.normalMap,h.normalScale.value.copy(c.normalScale),1===c.side&&h.normalScale.value.negate()),c.displacementMap&&(h.displacementMap.value=c.displacementMap,h.displacementScale.value=c.displacementScale,h.displacementBias.value=c.displacementBias);else if(c.isMeshPhongMaterial)t(h,c),h.specular.value.copy(c.specular),h.shininess.value=Math.max(c.shininess,1E-4),c.emissiveMap&&(h.emissiveMap.value=c.emissiveMap),c.bumpMap&&(h.bumpMap.value=c.bumpMap,h.bumpScale.value=c.bumpScale,
|
|
(h.normalMap.value=c.normalMap,h.normalScale.value.copy(c.normalScale),1===c.side&&h.normalScale.value.negate()),c.displacementMap&&(h.displacementMap.value=c.displacementMap,h.displacementScale.value=c.displacementScale,h.displacementBias.value=c.displacementBias);else if(c.isMeshPhongMaterial)t(h,c),h.specular.value.copy(c.specular),h.shininess.value=Math.max(c.shininess,1E-4),c.emissiveMap&&(h.emissiveMap.value=c.emissiveMap),c.bumpMap&&(h.bumpMap.value=c.bumpMap,h.bumpScale.value=c.bumpScale,
|
|
@@ -201,15 +201,15 @@ d.matrixAutoUpdate&&d.updateMatrix(),a.uvTransform.value.copy(d.matrix));if(b.ao
|
|
"canvas"),y=void 0!==a.context?a.context:null,v=void 0!==a.alpha?a.alpha:!1,C=void 0!==a.depth?a.depth:!0,aa=void 0!==a.stencil?a.stencil:!0,ja=void 0!==a.antialias?a.antialias:!1,z=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,ra=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,E=void 0!==a.powerPreference?a.powerPreference:"default",G=void 0!==a.failIfMajorPerformanceCaveat?a.failIfMajorPerformanceCaveat:!1,B=null,F=null;this.domElement=u;this.debug={checkShaderErrors:!0};this.sortObjects=
|
|
"canvas"),y=void 0!==a.context?a.context:null,v=void 0!==a.alpha?a.alpha:!1,C=void 0!==a.depth?a.depth:!0,aa=void 0!==a.stencil?a.stencil:!0,ja=void 0!==a.antialias?a.antialias:!1,z=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,ra=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,E=void 0!==a.powerPreference?a.powerPreference:"default",G=void 0!==a.failIfMajorPerformanceCaveat?a.failIfMajorPerformanceCaveat:!1,B=null,F=null;this.domElement=u;this.debug={checkShaderErrors:!0};this.sortObjects=
|
|
this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=!1;this.gammaFactor=2;this.outputEncoding=3E3;this.physicallyCorrectLights=!1;this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var A=this,I=!1,K=null,L=0,M=0,N=null,V=null,Pe=-1;var ha=b=null;var ya=!1;var Y=null,T=null,W=new R,X=new R,ba=null,ca=u.width,J=u.height,Q=1,ka=null,ma=null,ea=new R(0,0,ca,J),
|
|
this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=!1;this.gammaFactor=2;this.outputEncoding=3E3;this.physicallyCorrectLights=!1;this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var A=this,I=!1,K=null,L=0,M=0,N=null,V=null,Pe=-1;var ha=b=null;var ya=!1;var Y=null,T=null,W=new R,X=new R,ba=null,ca=u.width,J=u.height,Q=1,ka=null,ma=null,ea=new R(0,0,ca,J),
|
|
ia=new R(0,0,ca,J),lg=!1,mg=new Hd,Ua=new yj,qa=!1,ng=!1,Nd=new O,Ib=new n;try{v={alpha:v,depth:C,stencil:aa,antialias:ja,premultipliedAlpha:z,preserveDrawingBuffer:ra,powerPreference:E,failIfMajorPerformanceCaveat:G,xrCompatible:!0};u.addEventListener("webglcontextlost",d,!1);u.addEventListener("webglcontextrestored",e,!1);var H=y||u.getContext("webgl",v)||u.getContext("experimental-webgl",v);if(null===H){if(null!==u.getContext("webgl"))throw Error("Error creating WebGL context with your selected attributes.");
|
|
ia=new R(0,0,ca,J),lg=!1,mg=new Hd,Ua=new yj,qa=!1,ng=!1,Nd=new O,Ib=new n;try{v={alpha:v,depth:C,stencil:aa,antialias:ja,premultipliedAlpha:z,preserveDrawingBuffer:ra,powerPreference:E,failIfMajorPerformanceCaveat:G,xrCompatible:!0};u.addEventListener("webglcontextlost",d,!1);u.addEventListener("webglcontextrestored",e,!1);var H=y||u.getContext("webgl",v)||u.getContext("experimental-webgl",v);if(null===H){if(null!==u.getContext("webgl"))throw Error("Error creating WebGL context with your selected attributes.");
|
|
-throw Error("Error creating WebGL context.");}void 0===H.getShaderPrecisionFormat&&(H.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch($h){throw console.error("THREE.WebGLRenderer: "+$h.message),$h;}var ta,Ia,Z,da,S,U,na,Aa,ua,va,za,xa,oa,Ba,Ca,Ea,pa;c();var la=new Zh(A,H);this.xr=la;var wa=new Jk(A,H),Ga=new Wh(A,ua,Ia.maxTextureSize);this.shadowMap=Ga;this.getContext=function(){return H};this.getContextAttributes=function(){return H.getContextAttributes()};this.forceContextLoss=
|
|
|
|
|
|
+throw Error("Error creating WebGL context.");}void 0===H.getShaderPrecisionFormat&&(H.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch($h){throw console.error("THREE.WebGLRenderer: "+$h.message),$h;}var ta,Ha,Z,da,S,U,na,Aa,ua,va,za,xa,oa,Ba,Ca,Ea,pa;c();var la=new Zh(A,H);this.xr=la;var wa=new Jk(A,H),Ga=new Wh(A,ua,Ha.maxTextureSize);this.shadowMap=Ga;this.getContext=function(){return H};this.getContextAttributes=function(){return H.getContextAttributes()};this.forceContextLoss=
|
|
function(){var a=ta.get("WEBGL_lose_context");a&&a.loseContext()};this.forceContextRestore=function(){var a=ta.get("WEBGL_lose_context");a&&a.restoreContext()};this.getPixelRatio=function(){return Q};this.setPixelRatio=function(a){void 0!==a&&(Q=a,this.setSize(ca,J,!1))};this.getSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),a=new w);return a.set(ca,J)};this.setSize=function(a,b,c){la.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):
|
|
function(){var a=ta.get("WEBGL_lose_context");a&&a.loseContext()};this.forceContextRestore=function(){var a=ta.get("WEBGL_lose_context");a&&a.restoreContext()};this.getPixelRatio=function(){return Q};this.setPixelRatio=function(a){void 0!==a&&(Q=a,this.setSize(ca,J,!1))};this.getSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),a=new w);return a.set(ca,J)};this.setSize=function(a,b,c){la.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):
|
|
(ca=a,J=b,u.width=Math.floor(a*Q),u.height=Math.floor(b*Q),!1!==c&&(u.style.width=a+"px",u.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 w);return a.set(ca*Q,J*Q).floor()};this.setDrawingBufferSize=function(a,b,c){ca=a;J=b;Q=c;u.width=Math.floor(a*c);u.height=Math.floor(b*c);this.setViewport(0,0,a,b)};this.getCurrentViewport=function(a){void 0===
|
|
(ca=a,J=b,u.width=Math.floor(a*Q),u.height=Math.floor(b*Q),!1!==c&&(u.style.width=a+"px",u.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 w);return a.set(ca*Q,J*Q).floor()};this.setDrawingBufferSize=function(a,b,c){ca=a;J=b;Q=c;u.width=Math.floor(a*c);u.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 R);return a.copy(W)};this.getViewport=function(a){return a.copy(ea)};this.setViewport=function(a,b,c,d){a.isVector4?ea.set(a.x,a.y,a.z,a.w):ea.set(a,b,c,d);Z.viewport(W.copy(ea).multiplyScalar(Q).floor())};this.getScissor=function(a){return a.copy(ia)};this.setScissor=function(a,b,c,d){a.isVector4?ia.set(a.x,a.y,a.z,a.w):ia.set(a,b,c,d);Z.scissor(X.copy(ia).multiplyScalar(Q).floor())};this.getScissorTest=
|
|
a&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),a=new R);return a.copy(W)};this.getViewport=function(a){return a.copy(ea)};this.setViewport=function(a,b,c,d){a.isVector4?ea.set(a.x,a.y,a.z,a.w):ea.set(a,b,c,d);Z.viewport(W.copy(ea).multiplyScalar(Q).floor())};this.getScissor=function(a){return a.copy(ia)};this.setScissor=function(a,b,c,d){a.isVector4?ia.set(a.x,a.y,a.z,a.w):ia.set(a,b,c,d);Z.scissor(X.copy(ia).multiplyScalar(Q).floor())};this.getScissorTest=
|
|
function(){return lg};this.setScissorTest=function(a){Z.setScissorTest(lg=a)};this.setOpaqueSort=function(a){ka=a};this.setTransparentSort=function(a){ma=a};this.getClearColor=function(){return oa.getClearColor()};this.setClearColor=function(){oa.setClearColor.apply(oa,arguments)};this.getClearAlpha=function(){return oa.getClearAlpha()};this.setClearAlpha=function(){oa.setClearAlpha.apply(oa,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===
|
|
function(){return lg};this.setScissorTest=function(a){Z.setScissorTest(lg=a)};this.setOpaqueSort=function(a){ka=a};this.setTransparentSort=function(a){ma=a};this.getClearColor=function(){return oa.getClearColor()};this.setClearColor=function(){oa.setClearColor.apply(oa,arguments)};this.getClearAlpha=function(){return oa.getClearAlpha()};this.setClearAlpha=function(){oa.setClearAlpha.apply(oa,arguments)};this.clear=function(a,b,c){var d=0;if(void 0===a||a)d|=16384;if(void 0===b||b)d|=256;if(void 0===
|
|
c||c)d|=1024;H.clear(d)};this.clearColor=function(){this.clear(!0,!1,!1)};this.clearDepth=function(){this.clear(!1,!0,!1)};this.clearStencil=function(){this.clear(!1,!1,!0)};this.dispose=function(){u.removeEventListener("webglcontextlost",d,!1);u.removeEventListener("webglcontextrestored",e,!1);za.dispose();xa.dispose();S.dispose();ua.dispose();la.dispose();Da.stop()};this.renderBufferImmediate=function(a,b){Z.initAttributes();var c=S.get(a);a.hasPositions&&!c.position&&(c.position=H.createBuffer());
|
|
c||c)d|=1024;H.clear(d)};this.clearColor=function(){this.clear(!0,!1,!1)};this.clearDepth=function(){this.clear(!1,!0,!1)};this.clearStencil=function(){this.clear(!1,!1,!0)};this.dispose=function(){u.removeEventListener("webglcontextlost",d,!1);u.removeEventListener("webglcontextrestored",e,!1);za.dispose();xa.dispose();S.dispose();ua.dispose();la.dispose();Da.stop()};this.renderBufferImmediate=function(a,b){Z.initAttributes();var c=S.get(a);a.hasPositions&&!c.position&&(c.position=H.createBuffer());
|
|
a.hasNormals&&!c.normal&&(c.normal=H.createBuffer());a.hasUvs&&!c.uv&&(c.uv=H.createBuffer());a.hasColors&&!c.color&&(c.color=H.createBuffer());b=b.getAttributes();a.hasPositions&&(H.bindBuffer(34962,c.position),H.bufferData(34962,a.positionArray,35048),Z.enableAttribute(b.position),H.vertexAttribPointer(b.position,3,5126,!1,0,0));a.hasNormals&&(H.bindBuffer(34962,c.normal),H.bufferData(34962,a.normalArray,35048),Z.enableAttribute(b.normal),H.vertexAttribPointer(b.normal,3,5126,!1,0,0));a.hasUvs&&
|
|
a.hasNormals&&!c.normal&&(c.normal=H.createBuffer());a.hasUvs&&!c.uv&&(c.uv=H.createBuffer());a.hasColors&&!c.color&&(c.color=H.createBuffer());b=b.getAttributes();a.hasPositions&&(H.bindBuffer(34962,c.position),H.bufferData(34962,a.positionArray,35048),Z.enableAttribute(b.position),H.vertexAttribPointer(b.position,3,5126,!1,0,0));a.hasNormals&&(H.bindBuffer(34962,c.normal),H.bufferData(34962,a.normalArray,35048),Z.enableAttribute(b.normal),H.vertexAttribPointer(b.normal,3,5126,!1,0,0));a.hasUvs&&
|
|
-(H.bindBuffer(34962,c.uv),H.bufferData(34962,a.uvArray,35048),Z.enableAttribute(b.uv),H.vertexAttribPointer(b.uv,2,5126,!1,0,0));a.hasColors&&(H.bindBuffer(34962,c.color),H.bufferData(34962,a.colorArray,35048),Z.enableAttribute(b.color),H.vertexAttribPointer(b.color,3,5126,!1,0,0));Z.disableUnusedAttributes();H.drawArrays(4,0,a.count);a.count=0};var Ha=new ob;this.renderBufferDirect=function(a,c,d,e,f,g){null===c&&(c=Ha);var k=f.isMesh&&0>f.matrixWorld.determinant(),l=h(a,c,e,f);Z.setMaterial(e,k);
|
|
|
|
-var m=!1;if(b!==d.id||ha!==l.id||ya!==(!0===e.wireframe))b=d.id,ha=l.id,ya=!0===e.wireframe,m=!0;if(e.morphTargets||e.morphNormals)Ba.update(f,d,e,l),m=!0;a=d.index;c=d.attributes.position;if(null===a){if(void 0===c||0===c.count)return}else if(0===a.count)return;var p=1;!0===e.wireframe&&(a=Aa.getWireframeAttribute(d),p=2);k=Ca;if(null!==a){var x=na.get(a);k=Ea;k.setIndex(x)}if(m){if(!1!==Ia.isWebGL2||!f.isInstancedMesh&&!d.isInstancedBufferGeometry||null!==ta.get("ANGLE_instanced_arrays")){Z.initAttributes();
|
|
|
|
|
|
+(H.bindBuffer(34962,c.uv),H.bufferData(34962,a.uvArray,35048),Z.enableAttribute(b.uv),H.vertexAttribPointer(b.uv,2,5126,!1,0,0));a.hasColors&&(H.bindBuffer(34962,c.color),H.bufferData(34962,a.colorArray,35048),Z.enableAttribute(b.color),H.vertexAttribPointer(b.color,3,5126,!1,0,0));Z.disableUnusedAttributes();H.drawArrays(4,0,a.count);a.count=0};var Ia=new ob;this.renderBufferDirect=function(a,c,d,e,f,g){null===c&&(c=Ia);var k=f.isMesh&&0>f.matrixWorld.determinant(),l=h(a,c,e,f);Z.setMaterial(e,k);
|
|
|
|
+var m=!1;if(b!==d.id||ha!==l.id||ya!==(!0===e.wireframe))b=d.id,ha=l.id,ya=!0===e.wireframe,m=!0;if(e.morphTargets||e.morphNormals)Ba.update(f,d,e,l),m=!0;a=d.index;c=d.attributes.position;if(null===a){if(void 0===c||0===c.count)return}else if(0===a.count)return;var p=1;!0===e.wireframe&&(a=Aa.getWireframeAttribute(d),p=2);k=Ca;if(null!==a){var x=na.get(a);k=Ea;k.setIndex(x)}if(m){if(!1!==Ha.isWebGL2||!f.isInstancedMesh&&!d.isInstancedBufferGeometry||null!==ta.get("ANGLE_instanced_arrays")){Z.initAttributes();
|
|
m=d.attributes;l=l.getAttributes();var q=e.defaultAttributeValues;for(aa in l){var r=l[aa];if(0<=r){var t=m[aa];if(void 0!==t){var n=t.normalized,u=t.itemSize,v=na.get(t);if(void 0!==v){var y=v.buffer,z=v.type;v=v.bytesPerElement;if(t.isInterleavedBufferAttribute){var C=t.data,w=C.stride;t=t.offset;C&&C.isInstancedInterleavedBuffer?(Z.enableAttributeAndDivisor(r,C.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=C.meshPerAttribute*C.count)):Z.enableAttribute(r);H.bindBuffer(34962,
|
|
m=d.attributes;l=l.getAttributes();var q=e.defaultAttributeValues;for(aa in l){var r=l[aa];if(0<=r){var t=m[aa];if(void 0!==t){var n=t.normalized,u=t.itemSize,v=na.get(t);if(void 0!==v){var y=v.buffer,z=v.type;v=v.bytesPerElement;if(t.isInterleavedBufferAttribute){var C=t.data,w=C.stride;t=t.offset;C&&C.isInstancedInterleavedBuffer?(Z.enableAttributeAndDivisor(r,C.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=C.meshPerAttribute*C.count)):Z.enableAttribute(r);H.bindBuffer(34962,
|
|
y);H.vertexAttribPointer(r,u,z,n,w*v,t*v)}else t.isInstancedBufferAttribute?(Z.enableAttributeAndDivisor(r,t.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=t.meshPerAttribute*t.count)):Z.enableAttribute(r),H.bindBuffer(34962,y),H.vertexAttribPointer(r,u,z,n,0,0)}}else if("instanceMatrix"===aa)v=na.get(f.instanceMatrix),void 0!==v&&(y=v.buffer,z=v.type,Z.enableAttributeAndDivisor(r+0,1),Z.enableAttributeAndDivisor(r+1,1),Z.enableAttributeAndDivisor(r+2,1),Z.enableAttributeAndDivisor(r+
|
|
y);H.vertexAttribPointer(r,u,z,n,w*v,t*v)}else t.isInstancedBufferAttribute?(Z.enableAttributeAndDivisor(r,t.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=t.meshPerAttribute*t.count)):Z.enableAttribute(r),H.bindBuffer(34962,y),H.vertexAttribPointer(r,u,z,n,0,0)}}else if("instanceMatrix"===aa)v=na.get(f.instanceMatrix),void 0!==v&&(y=v.buffer,z=v.type,Z.enableAttributeAndDivisor(r+0,1),Z.enableAttributeAndDivisor(r+1,1),Z.enableAttributeAndDivisor(r+2,1),Z.enableAttributeAndDivisor(r+
|
|
3,1),H.bindBuffer(34962,y),H.vertexAttribPointer(r+0,4,z,!1,64,0),H.vertexAttribPointer(r+1,4,z,!1,64,16),H.vertexAttribPointer(r+2,4,z,!1,64,32),H.vertexAttribPointer(r+3,4,z,!1,64,48));else if(void 0!==q&&(n=q[aa],void 0!==n))switch(n.length){case 2:H.vertexAttrib2fv(r,n);break;case 3:H.vertexAttrib3fv(r,n);break;case 4:H.vertexAttrib4fv(r,n);break;default:H.vertexAttrib1fv(r,n)}}}Z.disableUnusedAttributes()}null!==a&&H.bindBuffer(34963,x.buffer)}var aa=d.drawRange.start*p;m=null!==g?g.start*p:
|
|
3,1),H.bindBuffer(34962,y),H.vertexAttribPointer(r+0,4,z,!1,64,0),H.vertexAttribPointer(r+1,4,z,!1,64,16),H.vertexAttribPointer(r+2,4,z,!1,64,32),H.vertexAttribPointer(r+3,4,z,!1,64,48));else if(void 0!==q&&(n=q[aa],void 0!==n))switch(n.length){case 2:H.vertexAttrib2fv(r,n);break;case 3:H.vertexAttrib3fv(r,n);break;case 4:H.vertexAttrib4fv(r,n);break;default:H.vertexAttrib1fv(r,n)}}}Z.disableUnusedAttributes()}null!==a&&H.bindBuffer(34963,x.buffer)}var aa=d.drawRange.start*p;m=null!==g?g.start*p:
|
|
@@ -220,7 +220,7 @@ function(a){Fa=a;la.setAnimationLoop(a);Da.start()};this.render=function(a,c,d,e
|
|
oa.render(B,a,c,g),d=B.opaque,e=B.transparent,a.overrideMaterial?(f=a.overrideMaterial,d.length&&m(d,a,c,f),e.length&&m(e,a,c,f)):(d.length&&m(d,a,c),e.length&&m(e,a,c)),a.onAfterRender(A,a,c),null!==N&&(U.updateRenderTargetMipmap(N),U.updateMultisampleRenderTarget(N)),Z.buffers.depth.setTest(!0),Z.buffers.depth.setMask(!0),Z.buffers.color.setMask(!0),Z.setPolygonOffset(!1),la.enabled&&wa.isAvailable()&&wa.detachCamera(c),F=B=null):console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")};
|
|
oa.render(B,a,c,g),d=B.opaque,e=B.transparent,a.overrideMaterial?(f=a.overrideMaterial,d.length&&m(d,a,c,f),e.length&&m(e,a,c,f)):(d.length&&m(d,a,c),e.length&&m(e,a,c)),a.onAfterRender(A,a,c),null!==N&&(U.updateRenderTargetMipmap(N),U.updateMultisampleRenderTarget(N)),Z.buffers.depth.setTest(!0),Z.buffers.depth.setMask(!0),Z.buffers.color.setMask(!0),Z.setPolygonOffset(!1),la.enabled&&wa.isAvailable()&&wa.detachCamera(c),F=B=null):console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")};
|
|
this.setFramebuffer=function(a){K!==a&&null===N&&H.bindFramebuffer(36160,a);K=a};this.getActiveCubeFace=function(){return L};this.getActiveMipmapLevel=function(){return M};this.getRenderTarget=function(){return N};this.setRenderTarget=function(a,b,c){N=a;L=b;M=c;a&&void 0===S.get(a).__webglFramebuffer&&U.setupRenderTarget(a);var d=K,e=!1;a?(d=S.get(a).__webglFramebuffer,a.isWebGLCubeRenderTarget?(d=d[b||0],e=!0):d=a.isWebGLMultisampleRenderTarget?S.get(a).__webglMultisampledFramebuffer:d,W.copy(a.viewport),
|
|
this.setFramebuffer=function(a){K!==a&&null===N&&H.bindFramebuffer(36160,a);K=a};this.getActiveCubeFace=function(){return L};this.getActiveMipmapLevel=function(){return M};this.getRenderTarget=function(){return N};this.setRenderTarget=function(a,b,c){N=a;L=b;M=c;a&&void 0===S.get(a).__webglFramebuffer&&U.setupRenderTarget(a);var d=K,e=!1;a?(d=S.get(a).__webglFramebuffer,a.isWebGLCubeRenderTarget?(d=d[b||0],e=!0):d=a.isWebGLMultisampleRenderTarget?S.get(a).__webglMultisampledFramebuffer:d,W.copy(a.viewport),
|
|
X.copy(a.scissor),ba=a.scissorTest):(W.copy(ea).multiplyScalar(Q).floor(),X.copy(ia).multiplyScalar(Q).floor(),ba=lg);V!==d&&(H.bindFramebuffer(36160,d),V=d);Z.viewport(W);Z.scissor(X);Z.setScissorTest(ba);e&&(a=S.get(a.texture),H.framebufferTexture2D(36160,36064,34069+(b||0),a.__webglTexture,c||0))};this.readRenderTargetPixels=function(a,b,c,d,e,f,g){if(a&&a.isWebGLRenderTarget){var k=S.get(a).__webglFramebuffer;a.isWebGLCubeRenderTarget&&void 0!==g&&(k=k[g]);if(k){g=!1;k!==V&&(H.bindFramebuffer(36160,
|
|
X.copy(a.scissor),ba=a.scissorTest):(W.copy(ea).multiplyScalar(Q).floor(),X.copy(ia).multiplyScalar(Q).floor(),ba=lg);V!==d&&(H.bindFramebuffer(36160,d),V=d);Z.viewport(W);Z.scissor(X);Z.setScissorTest(ba);e&&(a=S.get(a.texture),H.framebufferTexture2D(36160,36064,34069+(b||0),a.__webglTexture,c||0))};this.readRenderTargetPixels=function(a,b,c,d,e,f,g){if(a&&a.isWebGLRenderTarget){var k=S.get(a).__webglFramebuffer;a.isWebGLCubeRenderTarget&&void 0!==g&&(k=k[g]);if(k){g=!1;k!==V&&(H.bindFramebuffer(36160,
|
|
-k),g=!0);try{var l=a.texture,m=l.format,h=l.type;1023!==m&&pa.convert(m)!==H.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===h||pa.convert(h)===H.getParameter(35738)||1015===h&&(Ia.isWebGL2||ta.get("OES_texture_float")||ta.get("WEBGL_color_buffer_float"))||1016===h&&(Ia.isWebGL2?ta.get("EXT_color_buffer_float"):ta.get("EXT_color_buffer_half_float"))?36053===H.checkFramebufferStatus(36160)?0<=b&&b<=
|
|
|
|
|
|
+k),g=!0);try{var l=a.texture,m=l.format,h=l.type;1023!==m&&pa.convert(m)!==H.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===h||pa.convert(h)===H.getParameter(35738)||1015===h&&(Ha.isWebGL2||ta.get("OES_texture_float")||ta.get("WEBGL_color_buffer_float"))||1016===h&&(Ha.isWebGL2?ta.get("EXT_color_buffer_float"):ta.get("EXT_color_buffer_half_float"))?36053===H.checkFramebufferStatus(36160)?0<=b&&b<=
|
|
a.width-d&&0<=c&&c<=a.height-e&&H.readPixels(b,c,d,e,pa.convert(m),pa.convert(h),f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{g&&H.bindFramebuffer(36160,V)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")};this.copyFramebufferToTexture=
|
|
a.width-d&&0<=c&&c<=a.height-e&&H.readPixels(b,c,d,e,pa.convert(m),pa.convert(h),f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{g&&H.bindFramebuffer(36160,V)}}}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=pa.convert(b.format);U.setTexture2D(b,0);H.copyTexImage2D(3553,c,f,a.x,a.y,e,d,0);Z.unbindTexture()};this.copyTextureToTexture=function(a,b,c,d){var e=b.image.width,f=b.image.height,g=pa.convert(c.format),k=pa.convert(c.type);U.setTexture2D(c,0);b.isDataTexture?H.texSubImage2D(3553,d||0,a.x,a.y,e,f,g,k,b.image.data):H.texSubImage2D(3553,d||0,a.x,a.y,g,k,b.image);Z.unbindTexture()};
|
|
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=pa.convert(b.format);U.setTexture2D(b,0);H.copyTexImage2D(3553,c,f,a.x,a.y,e,d,0);Z.unbindTexture()};this.copyTextureToTexture=function(a,b,c,d){var e=b.image.width,f=b.image.height,g=pa.convert(c.format),k=pa.convert(c.type);U.setTexture2D(c,0);b.isDataTexture?H.texSubImage2D(3553,d||0,a.x,a.y,e,f,g,k,b.image.data):H.texSubImage2D(3553,d||0,a.x,a.y,g,k,b.image);Z.unbindTexture()};
|
|
this.initTexture=function(a){U.setTexture2D(a,0);Z.unbindTexture()};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function Re(a,b){this.name="";this.color=new B(a);this.density=void 0!==b?b:2.5E-4}function Se(a,b,c){this.name="";this.color=new B(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3}function rb(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.initTexture=function(a){U.setTexture2D(a,0);Z.unbindTexture()};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function Re(a,b){this.name="";this.color=new B(a);this.density=void 0!==b?b:2.5E-4}function Se(a,b,c){this.name="";this.color=new B(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3}function rb(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};
|
|
@@ -235,13 +235,13 @@ this.type="WireframeGeometry";var b=[],c,d,e,f=[0,0],g={},k=["a","b","c"];if(a&&
|
|
a.groups;0===t.length&&(t=[{start:0,count:h.count,materialIndex:0}]);a=0;for(e=t.length;a<e;++a)for(m=t[a],c=m.start,d=m.count,m=c,d=c+d;m<d;m+=3)for(c=0;3>c;c++)p=h.getX(m+c),q=h.getX(m+(c+1)%3),f[0]=Math.min(p,q),f[1]=Math.max(p,q),p=f[0]+","+f[1],void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]});for(p in g)m=g[p],k.fromBufferAttribute(l,m.index1),b.push(k.x,k.y,k.z),k.fromBufferAttribute(l,m.index2),b.push(k.x,k.y,k.z)}else for(l=a.attributes.position,m=0,d=l.count/3;m<d;m++)for(c=0;3>c;c++)g=3*
|
|
a.groups;0===t.length&&(t=[{start:0,count:h.count,materialIndex:0}]);a=0;for(e=t.length;a<e;++a)for(m=t[a],c=m.start,d=m.count,m=c,d=c+d;m<d;m+=3)for(c=0;3>c;c++)p=h.getX(m+c),q=h.getX(m+(c+1)%3),f[0]=Math.min(p,q),f[1]=Math.max(p,q),p=f[0]+","+f[1],void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]});for(p in g)m=g[p],k.fromBufferAttribute(l,m.index1),b.push(k.x,k.y,k.z),k.fromBufferAttribute(l,m.index2),b.push(k.x,k.y,k.z)}else for(l=a.attributes.position,m=0,d=l.count/3;m<d;m++)for(c=0;3>c;c++)g=3*
|
|
m+c,k.fromBufferAttribute(l,g),b.push(k.x,k.y,k.z),g=3*m+(c+1)%3,k.fromBufferAttribute(l,g),b.push(k.x,k.y,k.z);this.setAttribute("position",new G(b,3))}function Xd(a,b,c){L.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new Qc(a,b,c));this.mergeVertices()}function Qc(a,b,c){A.call(this);this.type="ParametricBufferGeometry";this.parameters={func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],k=new n,l=new n,m=new n,h=new n,p=new n,q,t;3>
|
|
m+c,k.fromBufferAttribute(l,g),b.push(k.x,k.y,k.z),g=3*m+(c+1)%3,k.fromBufferAttribute(l,g),b.push(k.x,k.y,k.z);this.setAttribute("position",new G(b,3))}function Xd(a,b,c){L.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new Qc(a,b,c));this.mergeVertices()}function Qc(a,b,c){A.call(this);this.type="ParametricBufferGeometry";this.parameters={func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],k=new n,l=new n,m=new n,h=new n,p=new n,q,t;3>
|
|
a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var r=b+1;for(q=0;q<=c;q++){var u=q/c;for(t=0;t<=b;t++){var y=t/b;a(y,u,l);e.push(l.x,l.y,l.z);0<=y-1E-5?(a(y-1E-5,u,m),h.subVectors(l,m)):(a(y+1E-5,u,m),h.subVectors(m,l));0<=u-1E-5?(a(y,u-1E-5,m),p.subVectors(l,m)):(a(y,u+1E-5,m),p.subVectors(m,l));k.crossVectors(h,p).normalize();f.push(k.x,k.y,k.z);g.push(y,u)}}for(q=0;q<c;q++)for(t=0;t<b;t++)a=q*r+t+1,k=(q+1)*r+t+1,l=(q+1)*r+t,d.push(q*
|
|
a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var r=b+1;for(q=0;q<=c;q++){var u=q/c;for(t=0;t<=b;t++){var y=t/b;a(y,u,l);e.push(l.x,l.y,l.z);0<=y-1E-5?(a(y-1E-5,u,m),h.subVectors(l,m)):(a(y+1E-5,u,m),h.subVectors(m,l));0<=u-1E-5?(a(y,u-1E-5,m),p.subVectors(l,m)):(a(y,u+1E-5,m),p.subVectors(m,l));k.crossVectors(h,p).normalize();f.push(k.x,k.y,k.z);g.push(y,u)}}for(q=0;q<c;q++)for(t=0;t<b;t++)a=q*r+t+1,k=(q+1)*r+t+1,l=(q+1)*r+t,d.push(q*
|
|
-r+t,a,l),d.push(a,k,l);this.setIndex(d);this.setAttribute("position",new G(e,3));this.setAttribute("normal",new G(f,3));this.setAttribute("uv",new G(g,2))}function Yd(a,b,c,d){L.call(this);this.type="PolyhedronGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};this.fromBufferGeometry(new Ha(a,b,c,d));this.mergeVertices()}function Ha(a,b,c,d){function e(a){k.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&&
|
|
|
|
|
|
+r+t,a,l),d.push(a,k,l);this.setIndex(d);this.setAttribute("position",new G(e,3));this.setAttribute("normal",new G(f,3));this.setAttribute("uv",new G(g,2))}function Yd(a,b,c,d){L.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){k.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)}A.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};c=c||1;d=d||0;var k=[],l=[];(function(a){for(var c=new n,d=new n,g=new n,k=0;k<b.length;k+=3){f(b[k+0],c);f(b[k+1],d);f(b[k+2],g);var l,m,h=c,v=d,C=g,w=Math.pow(2,a),ja=[];for(m=0;m<=w;m++){ja[m]=[];var z=h.clone().lerp(C,m/w),A=v.clone().lerp(C,m/w),B=w-m;for(l=0;l<=B;l++)ja[m][l]=0===l&&m===w?z:z.clone().lerp(A,l/B)}for(m=0;m<w;m++)for(l=0;l<2*(w-m)-1;l++)h=Math.floor(l/
|
|
0===c.z&&(l[b]=d/2/Math.PI+.5)}A.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};c=c||1;d=d||0;var k=[],l=[];(function(a){for(var c=new n,d=new n,g=new n,k=0;k<b.length;k+=3){f(b[k+0],c);f(b[k+1],d);f(b[k+2],g);var l,m,h=c,v=d,C=g,w=Math.pow(2,a),ja=[];for(m=0;m<=w;m++){ja[m]=[];var z=h.clone().lerp(C,m/w),A=v.clone().lerp(C,m/w),B=w-m;for(l=0;l<=B;l++)ja[m][l]=0===l&&m===w?z:z.clone().lerp(A,l/B)}for(m=0;m<w;m++)for(l=0;l<2*(w-m)-1;l++)h=Math.floor(l/
|
|
2),0===l%2?(e(ja[m][h+1]),e(ja[m+1][h]),e(ja[m][h])):(e(ja[m][h+1]),e(ja[m+1][h+1]),e(ja[m+1][h]))}})(d);(function(a){for(var b=new n,c=0;c<k.length;c+=3)b.x=k[c+0],b.y=k[c+1],b.z=k[c+2],b.normalize().multiplyScalar(a),k[c+0]=b.x,k[c+1]=b.y,k[c+2]=b.z})(c);(function(){for(var a=new n,b=0;b<k.length;b+=3)a.x=k[b+0],a.y=k[b+1],a.z=k[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 w,f=new w,h=new w,
|
|
2),0===l%2?(e(ja[m][h+1]),e(ja[m+1][h]),e(ja[m][h])):(e(ja[m][h+1]),e(ja[m+1][h+1]),e(ja[m+1][h]))}})(d);(function(a){for(var b=new n,c=0;c<k.length;c+=3)b.x=k[c+0],b.y=k[c+1],b.z=k[c+2],b.normalize().multiplyScalar(a),k[c+0]=b.x,k[c+1]=b.y,k[c+2]=b.z})(c);(function(){for(var a=new n,b=0;b<k.length;b+=3)a.x=k[b+0],a.y=k[b+1],a.z=k[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 w,f=new w,h=new w,
|
|
y=0,v=0;y<k.length;y+=9,v+=6){a.set(k[y+0],k[y+1],k[y+2]);b.set(k[y+3],k[y+4],k[y+5]);c.set(k[y+6],k[y+7],k[y+8]);e.set(l[v+0],l[v+1]);f.set(l[v+2],l[v+3]);h.set(l[v+4],l[v+5]);d.copy(a).add(b).add(c).divideScalar(3);var C=Math.atan2(d.z,-d.x);g(e,v+0,a,C);g(f,v+2,b,C);g(h,v+4,c,C)}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 G(k,3));this.setAttribute("normal",
|
|
y=0,v=0;y<k.length;y+=9,v+=6){a.set(k[y+0],k[y+1],k[y+2]);b.set(k[y+3],k[y+4],k[y+5]);c.set(k[y+6],k[y+7],k[y+8]);e.set(l[v+0],l[v+1]);f.set(l[v+2],l[v+3]);h.set(l[v+4],l[v+5]);d.copy(a).add(b).add(c).divideScalar(3);var C=Math.atan2(d.z,-d.x);g(e,v+0,a,C);g(f,v+2,b,C);g(h,v+4,c,C)}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 G(k,3));this.setAttribute("normal",
|
|
-new G(k.slice(),3));this.setAttribute("uv",new G(l,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Zd(a,b){L.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Rc(a,b));this.mergeVertices()}function Rc(a,b){Ha.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 $d(a,b){L.call(this);this.type="OctahedronGeometry";this.parameters=
|
|
|
|
-{radius:a,detail:b};this.fromBufferGeometry(new dc(a,b));this.mergeVertices()}function dc(a,b){Ha.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 ae(a,b){L.call(this);this.type="IcosahedronGeometry";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;Ha.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 be(a,b){L.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Tc(a,b));this.mergeVertices()}function Tc(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;Ha.call(this,
|
|
|
|
|
|
+new G(k.slice(),3));this.setAttribute("uv",new G(l,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Zd(a,b){L.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Rc(a,b));this.mergeVertices()}function Rc(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 $d(a,b){L.call(this);this.type="OctahedronGeometry";this.parameters=
|
|
|
|
+{radius:a,detail:b};this.fromBufferGeometry(new dc(a,b));this.mergeVertices()}function dc(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 ae(a,b){L.call(this);this.type="IcosahedronGeometry";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;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 be(a,b){L.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Tc(a,b));this.mergeVertices()}function Tc(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 ce(a,
|
|
[-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 ce(a,
|
|
b,c,d,e,f){L.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 ec(a,b,c,d,e);this.tangents=a.tangents;this.normals=a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function ec(a,b,c,d,e){function f(e){h=a.getPointAt(e/b,h);var f=g.normals[e];e=g.binormals[e];for(q=0;q<=d;q++){var m=q/d*Math.PI*2,p=Math.sin(m);m=-Math.cos(m);
|
|
b,c,d,e,f){L.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 ec(a,b,c,d,e);this.tangents=a.tangents;this.normals=a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function ec(a,b,c,d,e){function f(e){h=a.getPointAt(e/b,h);var f=g.normals[e];e=g.binormals[e];for(q=0;q<=d;q++){var m=q/d*Math.PI*2,p=Math.sin(m);m=-Math.cos(m);
|
|
l.x=m*f.x+p*e.x;l.y=m*f.y+p*e.y;l.z=m*f.z+p*e.z;l.normalize();r.push(l.x,l.y,l.z);k.x=h.x+c*l.x;k.y=h.y+c*l.y;k.z=h.z+c*l.z;t.push(k.x,k.y,k.z)}}A.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 k=new n,l=new n,m=new w,h=new n,p,q,t=[],r=[],u=[],y=[];for(p=0;p<b;p++)f(p);f(!1===e?b:0);for(p=
|
|
l.x=m*f.x+p*e.x;l.y=m*f.y+p*e.y;l.z=m*f.z+p*e.z;l.normalize();r.push(l.x,l.y,l.z);k.x=h.x+c*l.x;k.y=h.y+c*l.y;k.z=h.z+c*l.z;t.push(k.x,k.y,k.z)}}A.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 k=new n,l=new n,m=new w,h=new n,p,q,t=[],r=[],u=[],y=[];for(p=0;p<b;p++)f(p);f(!1===e?b:0);for(p=
|
|
@@ -565,9 +565,9 @@ n=g.vertexColors;h=new Bc(g.a+e,g.b+e,g.c+e);h.normal.copy(g.normal);void 0!==d&
|
|
c[b];e=[];k=0;for(l=d.length;k<l;k++)e.push(d[k].clone());this.faceVertexUvs[p].push(e)}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",a)},mergeMesh:function(a){a&&a.isMesh?(a.matrixAutoUpdate&&a.updateMatrix(),this.merge(a.geometry,a.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",a)},mergeVertices:function(){var a={},b=[],c=[],d=Math.pow(10,4),e;var f=0;for(e=this.vertices.length;f<e;f++){var g=this.vertices[f];
|
|
c[b];e=[];k=0;for(l=d.length;k<l;k++)e.push(d[k].clone());this.faceVertexUvs[p].push(e)}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",a)},mergeMesh:function(a){a&&a.isMesh?(a.matrixAutoUpdate&&a.updateMatrix(),this.merge(a.geometry,a.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",a)},mergeVertices:function(){var a={},b=[],c=[],d=Math.pow(10,4),e;var f=0;for(e=this.vertices.length;f<e;f++){var g=this.vertices[f];
|
|
g=Math.round(g.x*d)+"_"+Math.round(g.y*d)+"_"+Math.round(g.z*d);void 0===a[g]?(a[g]=f,b.push(this.vertices[f]),c[f]=b.length-1):c[f]=c[a[g]]}a=[];f=0;for(e=this.faces.length;f<e;f++)for(d=this.faces[f],d.a=c[d.a],d.b=c[d.b],d.c=c[d.c],d=[d.a,d.b,d.c],g=0;3>g;g++)if(d[g]===d[(g+1)%3]){a.push(f);break}for(f=a.length-1;0<=f;f--)for(d=a[f],this.faces.splice(d,1),c=0,e=this.faceVertexUvs.length;c<e;c++)this.faceVertexUvs[c].splice(d,1);f=this.vertices.length-b.length;this.vertices=b;return f},setFromPoints:function(a){this.vertices=
|
|
g=Math.round(g.x*d)+"_"+Math.round(g.y*d)+"_"+Math.round(g.z*d);void 0===a[g]?(a[g]=f,b.push(this.vertices[f]),c[f]=b.length-1):c[f]=c[a[g]]}a=[];f=0;for(e=this.faces.length;f<e;f++)for(d=this.faces[f],d.a=c[d.a],d.b=c[d.b],d.c=c[d.c],d=[d.a,d.b,d.c],g=0;3>g;g++)if(d[g]===d[(g+1)%3]){a.push(f);break}for(f=a.length-1;0<=f;f--)for(d=a[f],this.faces.splice(d,1),c=0,e=this.faceVertexUvs.length;c<e;c++)this.faceVertexUvs[c].splice(d,1);f=this.vertices.length-b.length;this.vertices=b;return f},setFromPoints:function(a){this.vertices=
|
|
[];for(var b=0,c=a.length;b<c;b++){var d=a[b];this.vertices.push(new n(d.x,d.y,d.z||0))}return this},sortFacesByMaterialIndex:function(){for(var a=this.faces,b=a.length,c=0;c<b;c++)a[c]._id=c;a.sort(function(a,b){return a.materialIndex-b.materialIndex});var d=this.faceVertexUvs[0],e=this.faceVertexUvs[1],f,g;d&&d.length===b&&(f=[]);e&&e.length===b&&(g=[]);for(c=0;c<b;c++){var k=a[c]._id;f&&f.push(d[k]);g&&g.push(e[k])}f&&(this.faceVertexUvs[0]=f);g&&(this.faceVertexUvs[1]=g)},toJSON:function(){function a(a,
|
|
[];for(var b=0,c=a.length;b<c;b++){var d=a[b];this.vertices.push(new n(d.x,d.y,d.z||0))}return this},sortFacesByMaterialIndex:function(){for(var a=this.faces,b=a.length,c=0;c<b;c++)a[c]._id=c;a.sort(function(a,b){return a.materialIndex-b.materialIndex});var d=this.faceVertexUvs[0],e=this.faceVertexUvs[1],f,g;d&&d.length===b&&(f=[]);e&&e.length===b&&(g=[]);for(c=0;c<b;c++){var k=a[c]._id;f&&f.push(d[k]);g&&g.push(e[k])}f&&(this.faceVertexUvs[0]=f);g&&(this.faceVertexUvs[1]=g)},toJSON:function(){function a(a,
|
|
-b,c){return c?a|1<<b:a&~(1<<b)}function b(a){var b=a.x.toString()+a.y.toString()+a.z.toString();if(void 0!==m[b])return m[b];m[b]=h.length/3;h.push(a.x,a.y,a.z);return m[b]}function c(a){var b=a.r.toString()+a.g.toString()+a.b.toString();if(void 0!==p[b])return p[b];p[b]=n.length;n.push(a.getHex());return p[b]}function d(a){var b=a.x.toString()+a.y.toString();if(void 0!==t[b])return t[b];t[b]=q.length/2;q.push(a.x,a.y);return t[b]}var e={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};
|
|
|
|
-e.uuid=this.uuid;e.type=this.type;""!==this.name&&(e.name=this.name);if(void 0!==this.parameters){var f=this.parameters,g;for(g in f)void 0!==f[g]&&(e[g]=f[g]);return e}f=[];for(g=0;g<this.vertices.length;g++){var k=this.vertices[g];f.push(k.x,k.y,k.z)}k=[];var h=[],m={},n=[],p={},q=[],t={};for(g=0;g<this.faces.length;g++){var r=this.faces[g],u=void 0!==this.faceVertexUvs[0][g],y=0<r.normal.length(),v=0<r.vertexNormals.length,w=1!==r.color.r||1!==r.color.g||1!==r.color.b,A=0<r.vertexColors.length,
|
|
|
|
-B=0;B=a(B,0,0);B=a(B,1,!0);B=a(B,2,!1);B=a(B,3,u);B=a(B,4,y);B=a(B,5,v);B=a(B,6,w);B=a(B,7,A);k.push(B);k.push(r.a,r.b,r.c);k.push(r.materialIndex);u&&(u=this.faceVertexUvs[0][g],k.push(d(u[0]),d(u[1]),d(u[2])));y&&k.push(b(r.normal));v&&(y=r.vertexNormals,k.push(b(y[0]),b(y[1]),b(y[2])));w&&k.push(c(r.color));A&&(r=r.vertexColors,k.push(c(r[0]),c(r[1]),c(r[2])))}e.data={};e.data.vertices=f;e.data.normals=h;0<n.length&&(e.data.colors=n);0<q.length&&(e.data.uvs=[q]);e.data.faces=k;return e},clone:function(){return(new L).copy(this)},
|
|
|
|
|
|
+b,c){return c?a|1<<b:a&~(1<<b)}function b(a){var b=a.x.toString()+a.y.toString()+a.z.toString();if(void 0!==h[b])return h[b];h[b]=l.length/3;l.push(a.x,a.y,a.z);return h[b]}function c(a){var b=a.r.toString()+a.g.toString()+a.b.toString();if(void 0!==p[b])return p[b];p[b]=n.length;n.push(a.getHex());return p[b]}function d(a){var b=a.x.toString()+a.y.toString();if(void 0!==t[b])return t[b];t[b]=q.length/2;q.push(a.x,a.y);return t[b]}var e={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};
|
|
|
|
+e.uuid=this.uuid;e.type=this.type;""!==this.name&&(e.name=this.name);if(void 0!==this.parameters){var f=this.parameters,g;for(g in f)void 0!==f[g]&&(e[g]=f[g]);return e}f=[];for(g=0;g<this.vertices.length;g++){var k=this.vertices[g];f.push(k.x,k.y,k.z)}k=[];var l=[],h={},n=[],p={},q=[],t={};for(g=0;g<this.faces.length;g++){var r=this.faces[g],u=void 0!==this.faceVertexUvs[0][g],y=0<r.normal.length(),v=0<r.vertexNormals.length,w=1!==r.color.r||1!==r.color.g||1!==r.color.b,A=0<r.vertexColors.length,
|
|
|
|
+B=0;B=a(B,0,0);B=a(B,1,!0);B=a(B,2,!1);B=a(B,3,u);B=a(B,4,y);B=a(B,5,v);B=a(B,6,w);B=a(B,7,A);k.push(B);k.push(r.a,r.b,r.c);k.push(r.materialIndex);u&&(u=this.faceVertexUvs[0][g],k.push(d(u[0]),d(u[1]),d(u[2])));y&&k.push(b(r.normal));v&&(y=r.vertexNormals,k.push(b(y[0]),b(y[1]),b(y[2])));w&&k.push(c(r.color));A&&(r=r.vertexColors,k.push(c(r[0]),c(r[1]),c(r[2])))}e.data={};e.data.vertices=f;e.data.normals=l;0<n.length&&(e.data.colors=n);0<q.length&&(e.data.uvs=[q]);e.data.faces=k;return e},clone:function(){return(new L).copy(this)},
|
|
copy:function(a){var b,c,d;this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.name=a.name;var e=a.vertices;var f=0;for(b=e.length;f<b;f++)this.vertices.push(e[f].clone());e=a.colors;f=0;for(b=e.length;f<b;f++)this.colors.push(e[f].clone());e=a.faces;f=0;for(b=e.length;f<b;f++)this.faces.push(e[f].clone());f=0;for(b=a.faceVertexUvs.length;f<
|
|
copy:function(a){var b,c,d;this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.name=a.name;var e=a.vertices;var f=0;for(b=e.length;f<b;f++)this.vertices.push(e[f].clone());e=a.colors;f=0;for(b=e.length;f<b;f++)this.colors.push(e[f].clone());e=a.faces;f=0;for(b=e.length;f<b;f++)this.faces.push(e[f].clone());f=0;for(b=a.faceVertexUvs.length;f<
|
|
b;f++){var g=a.faceVertexUvs[f];void 0===this.faceVertexUvs[f]&&(this.faceVertexUvs[f]=[]);e=0;for(c=g.length;e<c;e++){var k=g[e],h=[];var m=0;for(d=k.length;m<d;m++)h.push(k[m].clone());this.faceVertexUvs[f].push(h)}}m=a.morphTargets;f=0;for(b=m.length;f<b;f++){d={};d.name=m[f].name;if(void 0!==m[f].vertices)for(d.vertices=[],e=0,c=m[f].vertices.length;e<c;e++)d.vertices.push(m[f].vertices[e].clone());if(void 0!==m[f].normals)for(d.normals=[],e=0,c=m[f].normals.length;e<c;e++)d.normals.push(m[f].normals[e].clone());
|
|
b;f++){var g=a.faceVertexUvs[f];void 0===this.faceVertexUvs[f]&&(this.faceVertexUvs[f]=[]);e=0;for(c=g.length;e<c;e++){var k=g[e],h=[];var m=0;for(d=k.length;m<d;m++)h.push(k[m].clone());this.faceVertexUvs[f].push(h)}}m=a.morphTargets;f=0;for(b=m.length;f<b;f++){d={};d.name=m[f].name;if(void 0!==m[f].vertices)for(d.vertices=[],e=0,c=m[f].vertices.length;e<c;e++)d.vertices.push(m[f].vertices[e].clone());if(void 0!==m[f].normals)for(d.normals=[],e=0,c=m[f].normals.length;e<c;e++)d.normals.push(m[f].normals[e].clone());
|
|
this.morphTargets.push(d)}m=a.morphNormals;f=0;for(b=m.length;f<b;f++){d={};if(void 0!==m[f].vertexNormals)for(d.vertexNormals=[],e=0,c=m[f].vertexNormals.length;e<c;e++)g=m[f].vertexNormals[e],k={},k.a=g.a.clone(),k.b=g.b.clone(),k.c=g.c.clone(),d.vertexNormals.push(k);if(void 0!==m[f].faceNormals)for(d.faceNormals=[],e=0,c=m[f].faceNormals.length;e<c;e++)d.faceNormals.push(m[f].faceNormals[e].clone());this.morphNormals.push(d)}e=a.skinWeights;f=0;for(b=e.length;f<b;f++)this.skinWeights.push(e[f].clone());
|
|
this.morphTargets.push(d)}m=a.morphNormals;f=0;for(b=m.length;f<b;f++){d={};if(void 0!==m[f].vertexNormals)for(d.vertexNormals=[],e=0,c=m[f].vertexNormals.length;e<c;e++)g=m[f].vertexNormals[e],k={},k.a=g.a.clone(),k.b=g.b.clone(),k.c=g.c.clone(),d.vertexNormals.push(k);if(void 0!==m[f].faceNormals)for(d.faceNormals=[],e=0,c=m[f].faceNormals.length;e<c;e++)d.faceNormals.push(m[f].faceNormals[e].clone());this.morphNormals.push(d)}e=a.skinWeights;f=0;for(b=e.length;f<b;f++)this.skinWeights.push(e[f].clone());
|
|
@@ -703,8 +703,8 @@ a.setAttribute("lineDistance",new G(c,1))}else console.warn("THREE.LineSegments.
|
|
Je.applyMatrix4(d);Je.radius+=e;if(!1!==a.ray.intersectsSphere(Je))if($i.getInverse(d),tg.copy(a.ray).applyMatrix4($i),e/=(this.scale.x+this.scale.y+this.scale.z)/3,e*=e,c.isBufferGeometry){var f=c.index;c=c.attributes.position.array;if(null!==f){var g=f.array;f=0;for(var k=g.length;f<k;f++){var h=g[f];Tf.fromArray(c,3*h);sg(Tf,h,e,d,a,b,this)}}else for(f=0,g=c.length/3;f<g;f++)Tf.fromArray(c,3*f),sg(Tf,f,e,d,a,b,this)}else for(c=c.vertices,f=0,g=c.length;f<g;f++)sg(c[f],f,e,d,a,b,this)},updateMorphTargets:function(){var a=
|
|
Je.applyMatrix4(d);Je.radius+=e;if(!1!==a.ray.intersectsSphere(Je))if($i.getInverse(d),tg.copy(a.ray).applyMatrix4($i),e/=(this.scale.x+this.scale.y+this.scale.z)/3,e*=e,c.isBufferGeometry){var f=c.index;c=c.attributes.position.array;if(null!==f){var g=f.array;f=0;for(var k=g.length;f<k;f++){var h=g[f];Tf.fromArray(c,3*h);sg(Tf,h,e,d,a,b,this)}}else for(f=0,g=c.length/3;f<g;f++)Tf.fromArray(c,3*f),sg(Tf,f,e,d,a,b,this)}else for(c=c.vertices,f=0,g=c.length;f<g;f++)sg(c[f],f,e,d,a,b,this)},updateMorphTargets:function(){var a=
|
|
this.geometry;if(a.isBufferGeometry){a=a.morphAttributes;var b=Object.keys(a);if(0<b.length){var c=a[b[0]];if(void 0!==c)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},a=0,b=c.length;a<b;a++){var d=c[a].name||String(a);this.morphTargetInfluences.push(0);this.morphTargetDictionary[d]=a}}}else a=a.morphTargets,void 0!==a&&0<a.length&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")},clone:function(){return(new this.constructor(this.geometry,
|
|
this.geometry;if(a.isBufferGeometry){a=a.morphAttributes;var b=Object.keys(a);if(0<b.length){var c=a[b[0]];if(void 0!==c)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},a=0,b=c.length;a<b;a++){var d=c[a].name||String(a);this.morphTargetInfluences.push(0);this.morphTargetDictionary[d]=a}}}else a=a.morphTargets,void 0!==a&&0<a.length&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")},clone:function(){return(new this.constructor(this.geometry,
|
|
this.material)).copy(this)}});ug.prototype=Object.assign(Object.create(Y.prototype),{constructor:ug,isVideoTexture:!0,update:function(){var a=this.image;a.readyState>=a.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}});Oc.prototype=Object.create(Y.prototype);Oc.prototype.constructor=Oc;Oc.prototype.isCompressedTexture=!0;Vd.prototype=Object.create(Y.prototype);Vd.prototype.constructor=Vd;Vd.prototype.isCanvasTexture=!0;Wd.prototype=Object.create(Y.prototype);Wd.prototype.constructor=Wd;Wd.prototype.isDepthTexture=
|
|
this.material)).copy(this)}});ug.prototype=Object.assign(Object.create(Y.prototype),{constructor:ug,isVideoTexture:!0,update:function(){var a=this.image;a.readyState>=a.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}});Oc.prototype=Object.create(Y.prototype);Oc.prototype.constructor=Oc;Oc.prototype.isCompressedTexture=!0;Vd.prototype=Object.create(Y.prototype);Vd.prototype.constructor=Vd;Vd.prototype.isCanvasTexture=!0;Wd.prototype=Object.create(Y.prototype);Wd.prototype.constructor=Wd;Wd.prototype.isDepthTexture=
|
|
-!0;Pc.prototype=Object.create(A.prototype);Pc.prototype.constructor=Pc;Xd.prototype=Object.create(L.prototype);Xd.prototype.constructor=Xd;Qc.prototype=Object.create(A.prototype);Qc.prototype.constructor=Qc;Yd.prototype=Object.create(L.prototype);Yd.prototype.constructor=Yd;Ha.prototype=Object.create(A.prototype);Ha.prototype.constructor=Ha;Zd.prototype=Object.create(L.prototype);Zd.prototype.constructor=Zd;Rc.prototype=Object.create(Ha.prototype);Rc.prototype.constructor=Rc;$d.prototype=Object.create(L.prototype);
|
|
|
|
-$d.prototype.constructor=$d;dc.prototype=Object.create(Ha.prototype);dc.prototype.constructor=dc;ae.prototype=Object.create(L.prototype);ae.prototype.constructor=ae;Sc.prototype=Object.create(Ha.prototype);Sc.prototype.constructor=Sc;be.prototype=Object.create(L.prototype);be.prototype.constructor=be;Tc.prototype=Object.create(Ha.prototype);Tc.prototype.constructor=Tc;ce.prototype=Object.create(L.prototype);ce.prototype.constructor=ce;ec.prototype=Object.create(A.prototype);ec.prototype.constructor=
|
|
|
|
|
|
+!0;Pc.prototype=Object.create(A.prototype);Pc.prototype.constructor=Pc;Xd.prototype=Object.create(L.prototype);Xd.prototype.constructor=Xd;Qc.prototype=Object.create(A.prototype);Qc.prototype.constructor=Qc;Yd.prototype=Object.create(L.prototype);Yd.prototype.constructor=Yd;Ia.prototype=Object.create(A.prototype);Ia.prototype.constructor=Ia;Zd.prototype=Object.create(L.prototype);Zd.prototype.constructor=Zd;Rc.prototype=Object.create(Ia.prototype);Rc.prototype.constructor=Rc;$d.prototype=Object.create(L.prototype);
|
|
|
|
+$d.prototype.constructor=$d;dc.prototype=Object.create(Ia.prototype);dc.prototype.constructor=dc;ae.prototype=Object.create(L.prototype);ae.prototype.constructor=ae;Sc.prototype=Object.create(Ia.prototype);Sc.prototype.constructor=Sc;be.prototype=Object.create(L.prototype);be.prototype.constructor=be;Tc.prototype=Object.create(Ia.prototype);Tc.prototype.constructor=Tc;ce.prototype=Object.create(L.prototype);ce.prototype.constructor=ce;ec.prototype=Object.create(A.prototype);ec.prototype.constructor=
|
|
ec;ec.prototype.toJSON=function(){var a=A.prototype.toJSON.call(this);a.path=this.parameters.path.toJSON();return a};de.prototype=Object.create(L.prototype);de.prototype.constructor=de;Uc.prototype=Object.create(A.prototype);Uc.prototype.constructor=Uc;ee.prototype=Object.create(L.prototype);ee.prototype.constructor=ee;Vc.prototype=Object.create(A.prototype);Vc.prototype.constructor=Vc;var al={triangulate:function(a,b,c){c=c||2;var d=b&&b.length,e=d?b[0]*c:a.length,f=bi(a,0,e,c,!0),g=[];if(!f||f.next===
|
|
ec;ec.prototype.toJSON=function(){var a=A.prototype.toJSON.call(this);a.path=this.parameters.path.toJSON();return a};de.prototype=Object.create(L.prototype);de.prototype.constructor=de;Uc.prototype=Object.create(A.prototype);Uc.prototype.constructor=Uc;ee.prototype=Object.create(L.prototype);ee.prototype.constructor=ee;Vc.prototype=Object.create(A.prototype);Vc.prototype.constructor=Vc;var al={triangulate:function(a,b,c){c=c||2;var d=b&&b.length,e=d?b[0]*c:a.length,f=bi(a,0,e,c,!0),g=[];if(!f||f.next===
|
|
f.prev)return g;var k;if(d){var h=c;d=[];var m;var n=0;for(m=b.length;n<m;n++){var p=b[n]*h;var q=n<m-1?b[n+1]*h:a.length;p=bi(a,p,q,h,!1);p===p.next&&(p.steiner=!0);d.push(Nk(p))}d.sort(Lk);for(n=0;n<d.length;n++){b=d[n];h=f;if(h=Mk(b,h))b=ei(h,b),ge(b,b.next);f=ge(f,f.next)}}if(a.length>80*c){var t=k=a[0];var r=d=a[1];for(h=c;h<e;h+=c)n=a[h],b=a[h+1],n<t&&(t=n),b<r&&(r=b),n>k&&(k=n),b>d&&(d=b);k=Math.max(k-t,d-r);k=0!==k?1/k:0}he(f,g,c,t,r,k);return g}},sb={area:function(a){for(var b=a.length,c=
|
|
f.prev)return g;var k;if(d){var h=c;d=[];var m;var n=0;for(m=b.length;n<m;n++){var p=b[n]*h;var q=n<m-1?b[n+1]*h:a.length;p=bi(a,p,q,h,!1);p===p.next&&(p.steiner=!0);d.push(Nk(p))}d.sort(Lk);for(n=0;n<d.length;n++){b=d[n];h=f;if(h=Mk(b,h))b=ei(h,b),ge(b,b.next);f=ge(f,f.next)}}if(a.length>80*c){var t=k=a[0];var r=d=a[1];for(h=c;h<e;h+=c)n=a[h],b=a[h+1],n<t&&(t=n),b<r&&(r=b),n>k&&(k=n),b>d&&(d=b);k=Math.max(k-t,d-r);k=0!==k?1/k:0}he(f,g,c,t,r,k);return g}},sb={area:function(a){for(var b=a.length,c=
|
|
0,d=b-1,e=0;e<b;d=e++)c+=a[d].x*a[e].y-a[e].x*a[d].y;return.5*c},isClockWise:function(a){return 0>sb.area(a)},triangulateShape:function(a,b){var c=[],d=[],e=[];fi(a);gi(c,a);var f=a.length;b.forEach(fi);for(a=0;a<b.length;a++)d.push(f),f+=b[a].length,gi(c,b[a]);b=al.triangulate(c,d);for(a=0;a<b.length;a+=3)e.push(b.slice(a,a+3));return e}};gc.prototype=Object.create(L.prototype);gc.prototype.constructor=gc;gc.prototype.toJSON=function(){var a=L.prototype.toJSON.call(this);return hi(this.parameters.shapes,
|
|
0,d=b-1,e=0;e<b;d=e++)c+=a[d].x*a[e].y-a[e].x*a[d].y;return.5*c},isClockWise:function(a){return 0>sb.area(a)},triangulateShape:function(a,b){var c=[],d=[],e=[];fi(a);gi(c,a);var f=a.length;b.forEach(fi);for(a=0;a<b.length;a++)d.push(f),f+=b[a].length,gi(c,b[a]);b=al.triangulate(c,d);for(a=0;a<b.length;a+=3)e.push(b.slice(a,a+3));return e}};gc.prototype=Object.create(L.prototype);gc.prototype.constructor=gc;gc.prototype.toJSON=function(){var a=L.prototype.toJSON.call(this);return hi(this.parameters.shapes,
|
|
@@ -712,7 +712,7 @@ this.parameters.options,a)};fb.prototype=Object.create(A.prototype);fb.prototype
|
|
b[3*e+2];var p=b[3*f],q=b[3*f+1];b=b[3*f+2];return.01>Math.abs(g-h)?[new w(a,1-c),new w(k,1-d),new w(m,1-e),new w(p,1-b)]:[new w(g,1-c),new w(h,1-d),new w(n,1-e),new w(q,1-b)]}};je.prototype=Object.create(L.prototype);je.prototype.constructor=je;Xc.prototype=Object.create(fb.prototype);Xc.prototype.constructor=Xc;ke.prototype=Object.create(L.prototype);ke.prototype.constructor=ke;hc.prototype=Object.create(A.prototype);hc.prototype.constructor=hc;le.prototype=Object.create(L.prototype);le.prototype.constructor=
|
|
b[3*e+2];var p=b[3*f],q=b[3*f+1];b=b[3*f+2];return.01>Math.abs(g-h)?[new w(a,1-c),new w(k,1-d),new w(m,1-e),new w(p,1-b)]:[new w(g,1-c),new w(h,1-d),new w(n,1-e),new w(q,1-b)]}};je.prototype=Object.create(L.prototype);je.prototype.constructor=je;Xc.prototype=Object.create(fb.prototype);Xc.prototype.constructor=Xc;ke.prototype=Object.create(L.prototype);ke.prototype.constructor=ke;hc.prototype=Object.create(A.prototype);hc.prototype.constructor=hc;le.prototype=Object.create(L.prototype);le.prototype.constructor=
|
|
le;Yc.prototype=Object.create(A.prototype);Yc.prototype.constructor=Yc;me.prototype=Object.create(L.prototype);me.prototype.constructor=me;Zc.prototype=Object.create(A.prototype);Zc.prototype.constructor=Zc;ic.prototype=Object.create(L.prototype);ic.prototype.constructor=ic;ic.prototype.toJSON=function(){var a=L.prototype.toJSON.call(this);return ii(this.parameters.shapes,a)};jc.prototype=Object.create(A.prototype);jc.prototype.constructor=jc;jc.prototype.toJSON=function(){var a=A.prototype.toJSON.call(this);
|
|
le;Yc.prototype=Object.create(A.prototype);Yc.prototype.constructor=Yc;me.prototype=Object.create(L.prototype);me.prototype.constructor=me;Zc.prototype=Object.create(A.prototype);Zc.prototype.constructor=Zc;ic.prototype=Object.create(L.prototype);ic.prototype.constructor=ic;ic.prototype.toJSON=function(){var a=L.prototype.toJSON.call(this);return ii(this.parameters.shapes,a)};jc.prototype=Object.create(A.prototype);jc.prototype.constructor=jc;jc.prototype.toJSON=function(){var a=A.prototype.toJSON.call(this);
|
|
return ii(this.parameters.shapes,a)};$c.prototype=Object.create(A.prototype);$c.prototype.constructor=$c;kc.prototype=Object.create(L.prototype);kc.prototype.constructor=kc;tb.prototype=Object.create(A.prototype);tb.prototype.constructor=tb;ne.prototype=Object.create(kc.prototype);ne.prototype.constructor=ne;oe.prototype=Object.create(tb.prototype);oe.prototype.constructor=oe;pe.prototype=Object.create(L.prototype);pe.prototype.constructor=pe;ad.prototype=Object.create(A.prototype);ad.prototype.constructor=
|
|
return ii(this.parameters.shapes,a)};$c.prototype=Object.create(A.prototype);$c.prototype.constructor=$c;kc.prototype=Object.create(L.prototype);kc.prototype.constructor=kc;tb.prototype=Object.create(A.prototype);tb.prototype.constructor=tb;ne.prototype=Object.create(kc.prototype);ne.prototype.constructor=ne;oe.prototype=Object.create(tb.prototype);oe.prototype.constructor=oe;pe.prototype=Object.create(L.prototype);pe.prototype.constructor=pe;ad.prototype=Object.create(A.prototype);ad.prototype.constructor=
|
|
-ad;var wa=Object.freeze({__proto__:null,WireframeGeometry:Pc,ParametricGeometry:Xd,ParametricBufferGeometry:Qc,TetrahedronGeometry:Zd,TetrahedronBufferGeometry:Rc,OctahedronGeometry:$d,OctahedronBufferGeometry:dc,IcosahedronGeometry:ae,IcosahedronBufferGeometry:Sc,DodecahedronGeometry:be,DodecahedronBufferGeometry:Tc,PolyhedronGeometry:Yd,PolyhedronBufferGeometry:Ha,TubeGeometry:ce,TubeBufferGeometry:ec,TorusKnotGeometry:de,TorusKnotBufferGeometry:Uc,TorusGeometry:ee,TorusBufferGeometry:Vc,TextGeometry:je,
|
|
|
|
|
|
+ad;var wa=Object.freeze({__proto__:null,WireframeGeometry:Pc,ParametricGeometry:Xd,ParametricBufferGeometry:Qc,TetrahedronGeometry:Zd,TetrahedronBufferGeometry:Rc,OctahedronGeometry:$d,OctahedronBufferGeometry:dc,IcosahedronGeometry:ae,IcosahedronBufferGeometry:Sc,DodecahedronGeometry:be,DodecahedronBufferGeometry:Tc,PolyhedronGeometry:Yd,PolyhedronBufferGeometry:Ia,TubeGeometry:ce,TubeBufferGeometry:ec,TorusKnotGeometry:de,TorusKnotBufferGeometry:Uc,TorusGeometry:ee,TorusBufferGeometry:Vc,TextGeometry:je,
|
|
TextBufferGeometry:Xc,SphereGeometry:ke,SphereBufferGeometry:hc,RingGeometry:le,RingBufferGeometry:Yc,PlaneGeometry:Id,PlaneBufferGeometry:cc,LatheGeometry:me,LatheBufferGeometry:Zc,ShapeGeometry:ic,ShapeBufferGeometry:jc,ExtrudeGeometry:gc,ExtrudeBufferGeometry:fb,EdgesGeometry:$c,ConeGeometry:ne,ConeBufferGeometry:oe,CylinderGeometry:kc,CylinderBufferGeometry:tb,CircleGeometry:pe,CircleBufferGeometry:ad,BoxGeometry:nh,BoxBufferGeometry:Jd});lc.prototype=Object.create(K.prototype);lc.prototype.constructor=
|
|
TextBufferGeometry:Xc,SphereGeometry:ke,SphereBufferGeometry:hc,RingGeometry:le,RingBufferGeometry:Yc,PlaneGeometry:Id,PlaneBufferGeometry:cc,LatheGeometry:me,LatheBufferGeometry:Zc,ShapeGeometry:ic,ShapeBufferGeometry:jc,ExtrudeGeometry:gc,ExtrudeBufferGeometry:fb,EdgesGeometry:$c,ConeGeometry:ne,ConeBufferGeometry:oe,CylinderGeometry:kc,CylinderBufferGeometry:tb,CircleGeometry:pe,CircleBufferGeometry:ad,BoxGeometry:nh,BoxBufferGeometry:Jd});lc.prototype=Object.create(K.prototype);lc.prototype.constructor=
|
|
lc;lc.prototype.isShadowMaterial=!0;lc.prototype.copy=function(a){K.prototype.copy.call(this,a);this.color.copy(a.color);return this};ub.prototype=Object.create(pa.prototype);ub.prototype.constructor=ub;ub.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;
|
|
lc;lc.prototype.isShadowMaterial=!0;lc.prototype.copy=function(a){K.prototype.copy.call(this,a);this.color.copy(a.color);return this};ub.prototype=Object.create(pa.prototype);ub.prototype.constructor=ub;ub.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.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;
|
|
@@ -1017,7 +1017,7 @@ h.KeyframeTrack=va;h.LOD=Td;h.LatheBufferGeometry=Zc;h.LatheGeometry=me;h.Layers
|
|
a.isMultiMaterial=!0;a.materials=a;a.clone=function(){return a.slice()};return a};h.MultiplyBlending=4;h.MultiplyOperation=0;h.NearestFilter=1003;h.NearestMipMapLinearFilter=1005;h.NearestMipMapNearestFilter=1004;h.NearestMipmapLinearFilter=1005;h.NearestMipmapNearestFilter=1004;h.NeverDepth=0;h.NeverStencilFunc=512;h.NoBlending=0;h.NoColors=0;h.NoToneMapping=0;h.NormalBlending=1;h.NotEqualDepth=7;h.NotEqualStencilFunc=517;h.NumberKeyframeTrack=bd;h.Object3D=E;h.ObjectLoader=sf;h.ObjectSpaceNormalMap=
|
|
a.isMultiMaterial=!0;a.materials=a;a.clone=function(){return a.slice()};return a};h.MultiplyBlending=4;h.MultiplyOperation=0;h.NearestFilter=1003;h.NearestMipMapLinearFilter=1005;h.NearestMipMapNearestFilter=1004;h.NearestMipmapLinearFilter=1005;h.NearestMipmapNearestFilter=1004;h.NeverDepth=0;h.NeverStencilFunc=512;h.NoBlending=0;h.NoColors=0;h.NoToneMapping=0;h.NormalBlending=1;h.NotEqualDepth=7;h.NotEqualStencilFunc=517;h.NumberKeyframeTrack=bd;h.Object3D=E;h.ObjectLoader=sf;h.ObjectSpaceNormalMap=
|
|
1;h.OctahedronBufferGeometry=dc;h.OctahedronGeometry=$d;h.OneFactor=201;h.OneMinusDstAlphaFactor=207;h.OneMinusDstColorFactor=209;h.OneMinusSrcAlphaFactor=205;h.OneMinusSrcColorFactor=203;h.OrthographicCamera=fd;h.PCFShadowMap=1;h.PCFSoftShadowMap=2;h.PMREMGenerator=Ug;h.ParametricBufferGeometry=Qc;h.ParametricGeometry=Xd;h.Particle=function(a){console.warn("THREE.Particle has been renamed to THREE.Sprite.");return new Rd(a)};h.ParticleBasicMaterial=function(a){console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.");
|
|
1;h.OctahedronBufferGeometry=dc;h.OctahedronGeometry=$d;h.OneFactor=201;h.OneMinusDstAlphaFactor=207;h.OneMinusDstColorFactor=209;h.OneMinusSrcAlphaFactor=205;h.OneMinusSrcColorFactor=203;h.OrthographicCamera=fd;h.PCFShadowMap=1;h.PCFSoftShadowMap=2;h.PMREMGenerator=Ug;h.ParametricBufferGeometry=Qc;h.ParametricGeometry=Xd;h.Particle=function(a){console.warn("THREE.Particle has been renamed to THREE.Sprite.");return new Rd(a)};h.ParticleBasicMaterial=function(a){console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.");
|
|
return new Va(a)};h.ParticleSystem=function(a,b){console.warn("THREE.ParticleSystem has been renamed to THREE.Points.");return new Nc(a,b)};h.ParticleSystemMaterial=function(a){console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.");return new Va(a)};h.Path=$a;h.PerspectiveCamera=qa;h.Plane=Ta;h.PlaneBufferGeometry=cc;h.PlaneGeometry=Id;h.PlaneHelper=xe;h.PointCloud=function(a,b){console.warn("THREE.PointCloud has been renamed to THREE.Points.");return new Nc(a,b)};
|
|
return new Va(a)};h.ParticleSystem=function(a,b){console.warn("THREE.ParticleSystem has been renamed to THREE.Points.");return new Nc(a,b)};h.ParticleSystemMaterial=function(a){console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.");return new Va(a)};h.Path=$a;h.PerspectiveCamera=qa;h.Plane=Ta;h.PlaneBufferGeometry=cc;h.PlaneGeometry=Id;h.PlaneHelper=xe;h.PointCloud=function(a,b){console.warn("THREE.PointCloud has been renamed to THREE.Points.");return new Nc(a,b)};
|
|
-h.PointCloudMaterial=function(a){console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.");return new Va(a)};h.PointLight=jf;h.PointLightHelper=jd;h.Points=Nc;h.PointsMaterial=Va;h.PolarGridHelper=xf;h.PolyhedronBufferGeometry=Ha;h.PolyhedronGeometry=Yd;h.PositionalAudio=Lg;h.PropertyBinding=Ca;h.PropertyMixer=Ng;h.QuadraticBezierCurve=Ya;h.QuadraticBezierCurve3=ib;h.Quaternion=Ea;h.QuaternionKeyframeTrack=re;h.QuaternionLinearInterpolant=af;h.REVISION="113dev";h.RGBADepthPacking=
|
|
|
|
|
|
+h.PointCloudMaterial=function(a){console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.");return new Va(a)};h.PointLight=jf;h.PointLightHelper=jd;h.Points=Nc;h.PointsMaterial=Va;h.PolarGridHelper=xf;h.PolyhedronBufferGeometry=Ia;h.PolyhedronGeometry=Yd;h.PositionalAudio=Lg;h.PropertyBinding=Ca;h.PropertyMixer=Ng;h.QuadraticBezierCurve=Ya;h.QuadraticBezierCurve3=ib;h.Quaternion=Ea;h.QuaternionKeyframeTrack=re;h.QuaternionLinearInterpolant=af;h.REVISION="113dev";h.RGBADepthPacking=
|
|
3201;h.RGBAFormat=1023;h.RGBAIntegerFormat=1033;h.RGBA_ASTC_10x10_Format=37819;h.RGBA_ASTC_10x5_Format=37816;h.RGBA_ASTC_10x6_Format=37817;h.RGBA_ASTC_10x8_Format=37818;h.RGBA_ASTC_12x10_Format=37820;h.RGBA_ASTC_12x12_Format=37821;h.RGBA_ASTC_4x4_Format=37808;h.RGBA_ASTC_5x4_Format=37809;h.RGBA_ASTC_5x5_Format=37810;h.RGBA_ASTC_6x5_Format=37811;h.RGBA_ASTC_6x6_Format=37812;h.RGBA_ASTC_8x5_Format=37813;h.RGBA_ASTC_8x6_Format=37814;h.RGBA_ASTC_8x8_Format=37815;h.RGBA_PVRTC_2BPPV1_Format=35843;h.RGBA_PVRTC_4BPPV1_Format=
|
|
3201;h.RGBAFormat=1023;h.RGBAIntegerFormat=1033;h.RGBA_ASTC_10x10_Format=37819;h.RGBA_ASTC_10x5_Format=37816;h.RGBA_ASTC_10x6_Format=37817;h.RGBA_ASTC_10x8_Format=37818;h.RGBA_ASTC_12x10_Format=37820;h.RGBA_ASTC_12x12_Format=37821;h.RGBA_ASTC_4x4_Format=37808;h.RGBA_ASTC_5x4_Format=37809;h.RGBA_ASTC_5x5_Format=37810;h.RGBA_ASTC_6x5_Format=37811;h.RGBA_ASTC_6x6_Format=37812;h.RGBA_ASTC_8x5_Format=37813;h.RGBA_ASTC_8x6_Format=37814;h.RGBA_ASTC_8x8_Format=37815;h.RGBA_PVRTC_2BPPV1_Format=35843;h.RGBA_PVRTC_4BPPV1_Format=
|
|
35842;h.RGBA_S3TC_DXT1_Format=33777;h.RGBA_S3TC_DXT3_Format=33778;h.RGBA_S3TC_DXT5_Format=33779;h.RGBDEncoding=3006;h.RGBEEncoding=3002;h.RGBEFormat=1023;h.RGBFormat=1022;h.RGBIntegerFormat=1032;h.RGBM16Encoding=3005;h.RGBM7Encoding=3004;h.RGB_ETC1_Format=36196;h.RGB_PVRTC_2BPPV1_Format=35841;h.RGB_PVRTC_4BPPV1_Format=35840;h.RGB_S3TC_DXT1_Format=33776;h.RGFormat=1030;h.RGIntegerFormat=1031;h.RawShaderMaterial=ub;h.Ray=Wb;h.Raycaster=pi;h.RectAreaLight=nf;h.RedFormat=1028;h.RedIntegerFormat=1029;
|
|
35842;h.RGBA_S3TC_DXT1_Format=33777;h.RGBA_S3TC_DXT3_Format=33778;h.RGBA_S3TC_DXT5_Format=33779;h.RGBDEncoding=3006;h.RGBEEncoding=3002;h.RGBEFormat=1023;h.RGBFormat=1022;h.RGBIntegerFormat=1032;h.RGBM16Encoding=3005;h.RGBM7Encoding=3004;h.RGB_ETC1_Format=36196;h.RGB_PVRTC_2BPPV1_Format=35841;h.RGB_PVRTC_4BPPV1_Format=35840;h.RGB_S3TC_DXT1_Format=33776;h.RGFormat=1030;h.RGIntegerFormat=1031;h.RawShaderMaterial=ub;h.Ray=Wb;h.Raycaster=pi;h.RectAreaLight=nf;h.RedFormat=1028;h.RedIntegerFormat=1029;
|
|
h.ReinhardToneMapping=2;h.RepeatWrapping=1E3;h.ReplaceStencilOp=7681;h.ReverseSubtractEquation=102;h.RingBufferGeometry=Yc;h.RingGeometry=le;h.Scene=ob;h.SceneUtils={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}};h.ShaderChunk=
|
|
h.ReinhardToneMapping=2;h.RepeatWrapping=1E3;h.ReplaceStencilOp=7681;h.ReverseSubtractEquation=102;h.RingBufferGeometry=Yc;h.RingGeometry=le;h.Scene=ob;h.SceneUtils={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}};h.ShaderChunk=
|