From 6c3d61073a81ccf5b08db6bc37d760ded38c8954 Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Thu, 20 Jun 2019 14:56:01 -0700 Subject: [PATCH] Updated builds. --- build/three.js | 12 +-- build/three.min.js | 221 +++++++++++++++++++++--------------------- build/three.module.js | 12 +-- 3 files changed, 119 insertions(+), 126 deletions(-) diff --git a/build/three.js b/build/three.js index 3b43f799ac..17348eec57 100644 --- a/build/three.js +++ b/build/three.js @@ -6129,11 +6129,9 @@ this.autoUpdate = true; // checked by the renderer - /* - if ( typeof __THREE_DEVTOOLS__ !== undefined ) { - __THREE_DEVTOOLS__.dispatchEvent( { type: 'scene', value: this } ); + if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) { + __THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); } - */ } @@ -25569,11 +25567,9 @@ }; - /* - if ( typeof __THREE_DEVTOOLS__ !== undefined ) { - __THREE_DEVTOOLS__.dispatchEvent( { type: 'renderer', value: this } ); + if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) { + __THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); } - */ } diff --git a/build/three.min.js b/build/three.min.js index b72716aa3a..920cd782af 100644 --- a/build/three.min.js +++ b/build/three.min.js @@ -5,32 +5,33 @@ function U(a,b,c,d,e,f,g,h,k,m){Object.defineProperty(this,"id",{value:Zf++});th c.encoding);this.texture.image={};this.texture.image.width=a;this.texture.image.height=b;this.texture.generateMipmaps=void 0!==c.generateMipmaps?c.generateMipmaps:!1;this.texture.minFilter=void 0!==c.minFilter?c.minFilter:1006;this.depthBuffer=void 0!==c.depthBuffer?c.depthBuffer:!0;this.stencilBuffer=void 0!==c.stencilBuffer?c.stencilBuffer:!0;this.depthTexture=void 0!==c.depthTexture?c.depthTexture:null}function he(a,b,c){Ta.call(this,a,b,c);this.samples=4}function L(){this.elements=[1,0,0,0,0, 1,0,0,0,0,1,0,0,0,0,1];0b&&(b=a[c]);return b}function E(){Object.defineProperty(this,"id",{value:bg+=2});this.uuid=T.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange= -{start:0,count:Infinity};this.userData={}}function sa(a,b){H.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new E;this.material=void 0!==b?b:new ka({color:16777215*Math.random()});this.drawMode=0;this.updateMorphTargets()}function M(){Object.defineProperty(this,"id",{value:cg+=2});this.uuid=T.generateUUID();this.name="";this.type="Geometry";this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[]; -this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.verticesNeedUpdate=this.elementsNeedUpdate=!1}function Ub(a,b,c,d,e,f){M.call(this);this.type="BoxGeometry";this.parameters={width:a,height:b,depth:c,widthSegments:d,heightSegments:e,depthSegments:f};this.fromBufferGeometry(new ib(a,b,c,d,e,f));this.mergeVertices()}function ib(a,b,c,d,e,f){function g(a,b,c,d,e,f,g,l, -la,ya,F){var r=f/la,v=g/ya,w=f/2,y=g/2,z=l/2;g=la+1;var x=ya+1,na=f=0,R,G,A=new n;for(G=0;Gg;g++)a.setRenderTarget(f,g),a.clear(b,c,d);a.setRenderTarget(e)}}function kb(a,b,c){Ta.call(this,a,b,c)}function Ab(a,b,c,d,e,f,g,h,k,m,q,p){U.call(this,null,f,g,h,k,m,d,e,q,p);this.image={data:a,width:b,height:c};this.magFilter=void 0!==k?k:1003;this.minFilter=void 0!==m?m:1003;this.flipY=this.generateMipmaps=!1;this.unpackAlignment=1}function Wa(a,b){this.normal=void 0!==a?a:new n(1,0,0);this.constant=void 0!== -b?b:0}function Bd(a,b,c,d,e,f){this.planes=[void 0!==a?a:new Wa,void 0!==b?b:new Wa,void 0!==c?c:new Wa,void 0!==d?d:new Wa,void 0!==e?e:new Wa,void 0!==f?f:new Wa]}function ke(){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 dg(a){function b(b,c){var d=b.array,e=b.dynamic?35048:35044,h=a.createBuffer(); -a.bindBuffer(c,h);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:h,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.versionb&&(b=a[c]);return b}function E(){Object.defineProperty(this,"id",{value:bg+=2});this.uuid=T.generateUUID();this.name=""; +this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange={start:0,count:Infinity};this.userData={}}function sa(a,b){H.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new E;this.material=void 0!==b?b:new ka({color:16777215*Math.random()});this.drawMode=0;this.updateMorphTargets()}function M(){Object.defineProperty(this,"id",{value:cg+=2});this.uuid=T.generateUUID();this.name="";this.type="Geometry"; +this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.verticesNeedUpdate=this.elementsNeedUpdate=!1}function Ub(a,b,c,d,e,f){M.call(this);this.type="BoxGeometry";this.parameters={width:a,height:b,depth:c,widthSegments:d, +heightSegments:e,depthSegments:f};this.fromBufferGeometry(new ib(a,b,c,d,e,f));this.mergeVertices()}function ib(a,b,c,d,e,f){function g(a,b,c,d,e,f,g,l,la,ya,F){var r=f/la,v=g/ya,w=f/2,y=g/2,z=l/2;g=la+1;var x=ya+1,na=f=0,R,G,A=new n;for(G=0;Gg;g++)a.setRenderTarget(f,g),a.clear(b,c,d);a.setRenderTarget(e)}}function kb(a,b,c){Ta.call(this,a,b,c)}function Ab(a,b,c,d,e,f,g,h,k,m,q,p){U.call(this,null,f,g,h,k,m,d,e,q,p); +this.image={data:a,width:b,height:c};this.magFilter=void 0!==k?k:1003;this.minFilter=void 0!==m?m:1003;this.flipY=this.generateMipmaps=!1;this.unpackAlignment=1}function Wa(a,b){this.normal=void 0!==a?a:new n(1,0,0);this.constant=void 0!==b?b:0}function Bd(a,b,c,d,e,f){this.planes=[void 0!==a?a:new Wa,void 0!==b?b:new Wa,void 0!==c?c:new Wa,void 0!==d?d:new Wa,void 0!==e?e:new Wa,void 0!==f?f:new Wa]}function ke(){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 dg(a){function b(b,c){var d=b.array,e=b.dynamic?35048:35044,h=a.createBuffer();a.bindBuffer(c,h);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:h,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.versionc;c++){var p=q[h[c]];var l=q[h[(c+1)%3]];f[0]=Math.min(p,l);f[1]=Math.max(p,l);p=f[0]+ -","+f[1];void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]})}}for(p in g)m=g[p],h=a.vertices[m.index1],b.push(h.x,h.y,h.z),h=a.vertices[m.index2],b.push(h.x,h.y,h.z)}else if(a&&a.isBufferGeometry)if(h=new n,null!==a.index){k=a.attributes.position;q=a.index;var t=a.groups;0===t.length&&(t=[{start:0,count:q.count,materialIndex:0}]);a=0;for(e=t.length;ac;c++)p=q.getX(m+c),l=q.getX(m+(c+1)%3),f[0]=Math.min(p,l),f[1]=Math.max(p,l),p=f[0]+","+ -f[1],void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]});for(p in g)m=g[p],h.fromBufferAttribute(k,m.index1),b.push(h.x,h.y,h.z),h.fromBufferAttribute(k,m.index2),b.push(h.x,h.y,h.z)}else for(k=a.attributes.position,m=0,d=k.count/3;mc;c++)g=3*m+c,h.fromBufferAttribute(k,g),b.push(h.x,h.y,h.z),g=3*m+(c+1)%3,h.fromBufferAttribute(k,g),b.push(h.x,h.y,h.z);this.addAttribute("position",new D(b,3))}function Uc(a,b,c){M.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b, -stacks:c};this.fromBufferGeometry(new dc(a,b,c));this.mergeVertices()}function dc(a,b,c){E.call(this);this.type="ParametricBufferGeometry";this.parameters={func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],h=new n,k=new n,m=new n,q=new n,p=new n,l,t;3>a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var r=b+1;for(l=0;l<=c;l++){var v=l/c;for(t=0;t<=b;t++){var w=t/b;a(w,v,k);e.push(k.x,k.y,k.z);0<=w-1E-5?(a(w-1E-5,v,m),q.subVectors(k,m)):(a(w+ -1E-5,v,m),q.subVectors(m,k));0<=v-1E-5?(a(w,v-1E-5,m),p.subVectors(k,m)):(a(w,v+1E-5,m),p.subVectors(m,k));h.crossVectors(q,p).normalize();f.push(h.x,h.y,h.z);g.push(w,v)}}for(l=0;ld&&1===a.x&&(k[b]=a.x-1);0===c.x&&0===c.z&&(k[b]=d/2/Math.PI+.5)}E.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};c=c||1;d=d||0;var h=[],k=[];(function(a){for(var c=new n,d=new n,g=new n,h=0;he&&(.2>b&&(k[a+0]+=1),.2>c&&(k[a+2]+=1),.2>d&&(k[a+4]+=1))})();this.addAttribute("position",new D(h,3));this.addAttribute("normal",new D(h.slice(),3));this.addAttribute("uv",new D(k,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Wc(a,b){M.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new ec(a,b));this.mergeVertices()} -function ec(a,b){Aa.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 Xc(a,b){M.call(this);this.type="OctahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Db(a,b));this.mergeVertices()}function Db(a,b){Aa.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 Yc(a,b){M.call(this);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new fc(a,b));this.mergeVertices()}function fc(a,b){var c=(1+Math.sqrt(5))/2;Aa.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 Zc(a,b){M.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new gc(a,b));this.mergeVertices()}function gc(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;Aa.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 $c(a,b,c,d,e,f){M.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 Eb(a,b,c,d,e);this.tangents=a.tangents;this.normals= -a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function Eb(a,b,c,d,e){function f(e){q=a.getPointAt(e/b,q);var f=g.normals[e];e=g.binormals[e];for(l=0;l<=d;l++){var m=l/d*Math.PI*2,p=Math.sin(m);m=-Math.cos(m);k.x=m*f.x+p*e.x;k.y=m*f.y+p*e.y;k.z=m*f.z+p*e.z;k.normalize();r.push(k.x,k.y,k.z);h.x=q.x+c*k.x;h.y=q.y+c*k.y;h.z=q.z+c*k.z;t.push(h.x,h.y,h.z)}}E.call(this);this.type="TubeBufferGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d, -closed:e};b=b||64;c=c||1;d=d||8;e=e||!1;var g=a.computeFrenetFrames(b,e);this.tangents=g.tangents;this.normals=g.normals;this.binormals=g.binormals;var h=new n,k=new n,m=new C,q=new n,p,l,t=[],r=[],v=[],w=[];for(p=0;p=b;e-=d)f=Bf(e,a[e],a[e+1],f);f&&Fb(f,f.next)&&(cd(f),f=f.next);return f}function dd(a,b){if(!a)return a;b||(b=a);do{var c=!1;if(a.steiner||!Fb(a,a.next)&&0!==wa(a.prev,a,a.next))a=a.next;else{cd(a);a=b=a.prev;if(a===a.next)break;c=!0}}while(c||a!==b);return b}function ed(a,b,c,d,e,f,g){if(a){if(!g&&f){var h=a,k=h;do null===k.z&&(k.z=re(k.x,k.y,d,e,f)),k.prevZ=k.prev,k=k.nextZ= -k.next;while(k!==h);k.prevZ.nextZ=null;k.prevZ=null;h=k;var m,q,p,l,t=1;do{k=h;var r=h=null;for(q=0;k;){q++;var n=k;for(m=p=0;mp.x?q.x>t.x?q.x:t.x:p.x>t.x?p.x:t.x,y=q.y>p.y?q.y>t.y?q.y:t.y:p.y> -t.y?p.y:t.y;m=re(q.x=m;){if(w!==r.prev&&w!==r.next&&Id(q.x,q.y,p.x,p.y,t.x,t.y,w.x,w.y)&&0<=wa(w.prev,w,w.next)){r=!1;break a}w=w.prevZ}r=!0}}else a:if(r=a,q=r.prev,p=r,t=r.next,0<=wa(q,p,t))r=!1;else{for(m=r.next.next;m!==r.prev;){if(Id(q.x,q.y, -p.x,p.y,t.x,t.y,m.x,m.y)&&0<=wa(m.prev,m,m.next)){r=!1;break a}m=m.next}r=!0}if(r)b.push(k.i/c),b.push(a.i/c),b.push(n.i/c),cd(a),h=a=n.next;else if(a=n,a===h){if(!g)ed(dd(a),b,c,d,e,f,1);else if(1===g){g=b;h=c;k=a;do n=k.prev,r=k.next.next,!Fb(n,r)&&Cf(n,k,k.next,r)&&fd(n,r)&&fd(r,n)&&(g.push(n.i/h),g.push(k.i/h),g.push(r.i/h),cd(k),cd(k.next),k=a=r),k=k.next;while(k!==a);a=k;ed(a,b,c,d,e,f,2)}else if(2===g)a:{g=a;do{for(h=g.next.next;h!==g.prev;){if(k=g.i!==h.i){k=g;n=h;if(r=k.next.i!==n.i&&k.prev.i!== -n.i){b:{r=k;do{if(r.i!==k.i&&r.next.i!==k.i&&r.i!==n.i&&r.next.i!==n.i&&Cf(r,r.next,k,n)){r=!0;break b}r=r.next}while(r!==k);r=!1}r=!r}if(r=r&&fd(k,n)&&fd(n,k)){r=k;q=!1;p=(k.x+n.x)/2;n=(k.y+n.y)/2;do r.y>n!==r.next.y>n&&r.next.y!==r.y&&p<(r.next.x-r.x)*(n-r.y)/(r.next.y-r.y)+r.x&&(q=!q),r=r.next;while(r!==k);r=q}k=r}if(k){a=Df(g,h);g=dd(g,g.next);a=dd(a,a.next);ed(g,b,c,d,e,f);ed(a,b,c,d,e,f);break a}h=h.next}g=g.next}while(g!==a)}break}}}}function mh(a,b){return a.x-b.x}function nh(a,b){var c=b, -d=a.x,e=a.y,f=-Infinity;do{if(e<=c.y&&e>=c.next.y&&c.next.y!==c.y){var g=c.x+(e-c.y)*(c.next.x-c.x)/(c.next.y-c.y);if(g<=d&&g>f){f=g;if(g===d){if(e===c.y)return c;if(e===c.next.y)return c.next}var h=c.x=c.x&&c.x>=g&&d!==c.x&&Id(eh.x)&&fd(c,a)&&(h=c,m=q)}c=c.next}return h}function re(a, -b,c,d,e){a=32767*(a-c)*e;b=32767*(b-d)*e;a=(a|a<<8)&16711935;a=(a|a<<4)&252645135;a=(a|a<<2)&858993459;b=(b|b<<8)&16711935;b=(b|b<<4)&252645135;b=(b|b<<2)&858993459;return(a|a<<1)&1431655765|((b|b<<1)&1431655765)<<1}function oh(a){var b=a,c=a;do b.xwa(a.prev,a,a.next)?0<=wa(a,b,a.next)&&0<=wa(a,a.prev,b):0>wa(a,b,a.prev)||0>wa(a,a.next,b)}function Df(a,b){var c=new se(a.i,a.x,a.y),d=new se(b.i,b.x,b.y),e=a.next,f=b.prev;a.next=b;b.prev=a;c.next=e;e.prev=c;d.next=c;c.prev=d;f.next=d;d.prev=f;return d}function Bf(a,b,c,d){a=new se(a,b,c);d?(a.next=d.next,a.prev=d,d.next.prev=a,d.next=a): -(a.prev=a,a.next=a);return a}function cd(a){a.next.prev=a.prev;a.prev.next=a.next;a.prevZ&&(a.prevZ.nextZ=a.nextZ);a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function se(a,b,c){this.i=a;this.x=b;this.y=c;this.nextZ=this.prevZ=this.z=this.next=this.prev=null;this.steiner=!1}function Ef(a){var b=a.length;2Number.EPSILON){var k=Math.sqrt(h),m=Math.sqrt(f*f+g*g);h=b.x-e/k;b=b.y+d/k;g=((c.x-g/m-h)*g-(c.y+f/m-b)*f)/(d*g-e*f);f=h+d*g-a.x;d=b+e*g-a.y;e=f*f+d*d;if(2>=e)return new C(f,d);e=Math.sqrt(e/2)}else a=!1,d>Number.EPSILON? -f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(f=-e,e=Math.sqrt(h)):(f=d,d=e,e=Math.sqrt(h/2));return new C(f/e,d/e)}function h(a,b){for(K=a.length;0<=--K;){var c=K;var f=K-1;0>f&&(f=a.length-1);var g,h=x+2*F;for(g=0;gq;q++){var l=m[f[q]];var n=m[f[(q+1)%3]];d[0]=Math.min(l,n);d[1]=Math.max(l,n);l=d[0]+","+d[1];void 0===e[l]?e[l]={index1:d[0],index2:d[1],face1:h,face2:void 0}:e[l].face2=h}for(l in e)if(d=e[l],void 0===d.face2||g[d.face1].normal.dot(g[d.face2].normal)<=b)f=a[d.index1],c.push(f.x,f.y,f.z),f=a[d.index2],c.push(f.x,f.y,f.z);this.addAttribute("position",new D(c,3))}function Jb(a,b,c,d, -e,f,g,h){M.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};this.fromBufferGeometry(new eb(a,b,c,d,e,f,g,h));this.mergeVertices()}function eb(a,b,c,d,e,f,g,h){function k(c){var e,f=new C,k=new n,p=0,v=!0===c?a:b,x=!0===c?1:-1;var D=r;for(e=1;e<=d;e++)l.push(0,w*x,0),u.push(0,x,0),t.push(.5,.5),r++;var B=r;for(e=0;e<=d;e++){var E=e/d*h+g,H=Math.cos(E);E=Math.sin(E);k.x=v*E;k.y=w*x; -k.z=v*H;l.push(k.x,k.y,k.z);u.push(0,x,0);f.x=.5*H+.5;f.y=.5*E*x+.5;t.push(f.x,f.y);r++}for(e=0;ethis.duration&&this.resetDuration()}function qh(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return pc;case "vector":case "vector2":case "vector3":case "vector4":return qc; -case "color":return Md;case "quaternion":return od;case "bool":case "boolean":return Ld;case "string":return Od}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+a);}function rh(a){if(void 0===a.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var b=qh(a.type);if(void 0===a.times){var c=[],d=[];ta.flattenJSON(a.keys,c,d,"value");a.times=c;a.values=d}return void 0!==b.parse?b.parse(a):new b(a.name,a.times,a.values,a.interpolation)}function te(a,b,c){var d=this,e= -!1,f=0,g=0,h=void 0;this.onStart=void 0;this.onLoad=a;this.onProgress=b;this.onError=c;this.itemStart=function(a){g++;if(!1===e&&void 0!==d.onStart)d.onStart(a,f,g);e=!0};this.itemEnd=function(a){f++;if(void 0!==d.onProgress)d.onProgress(a,f,g);if(f===g&&(e=!1,void 0!==d.onLoad))d.onLoad()};this.itemError=function(a){if(void 0!==d.onError)d.onError(a)};this.resolveURL=function(a){return h?h(a):a};this.setURLModifier=function(a){h=a;return this}}function La(a){this.manager=void 0!==a?a:Ba}function If(a){this.manager= -void 0!==a?a:Ba}function Jf(a){this.manager=void 0!==a?a:Ba;this._parser=null}function ue(a){this.manager=void 0!==a?a:Ba;this._parser=null}function pd(a){this.manager=void 0!==a?a:Ba}function ve(a){this.manager=void 0!==a?a:Ba}function Pd(a){this.manager=void 0!==a?a:Ba}function O(){this.type="Curve";this.arcLengthDivisions=200}function Ca(a,b,c,d,e,f,g,h){O.call(this);this.type="EllipseCurve";this.aX=a||0;this.aY=b||0;this.xRadius=c||1;this.yRadius=d||1;this.aStartAngle=e||0;this.aEndAngle=f||2* -Math.PI;this.aClockwise=g||!1;this.aRotation=h||0}function rc(a,b,c,d,e,f){Ca.call(this,a,b,c,c,d,e,f);this.type="ArcCurve"}function we(){var a=0,b=0,c=0,d=0;return{initCatmullRom:function(e,f,g,h,k){e=k*(g-e);h=k*(h-f);a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},initNonuniformCatmullRom:function(e,f,g,h,k,m,q){e=((f-e)/k-(g-e)/(k+m)+(g-f)/m)*m;h=((g-f)/m-(h-f)/(m+q)+(h-g)/q)*m;a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},calc:function(e){var f=e*e;return a+b*e+c*f+d*f*e}}}function va(a,b,c,d){O.call(this); -this.type="CatmullRomCurve3";this.points=a||[];this.closed=b||!1;this.curveType=c||"centripetal";this.tension=d||.5}function Kf(a,b,c,d,e){b=.5*(d-b);e=.5*(e-c);var f=a*a;return(2*c-2*d+b+e)*a*f+(-3*c+3*d-2*b-e)*f+b*a+c}function qd(a,b,c,d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function rd(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}function Ma(a,b,c,d){O.call(this);this.type="CubicBezierCurve";this.v0=a||new C;this.v1=b||new C;this.v2=c||new C;this.v3=d||new C}function $a(a, -b,c,d){O.call(this);this.type="CubicBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n;this.v3=d||new n}function Da(a,b){O.call(this);this.type="LineCurve";this.v1=a||new C;this.v2=b||new C}function Na(a,b){O.call(this);this.type="LineCurve3";this.v1=a||new n;this.v2=b||new n}function Oa(a,b,c){O.call(this);this.type="QuadraticBezierCurve";this.v0=a||new C;this.v1=b||new C;this.v2=c||new C}function ab(a,b,c){O.call(this);this.type="QuadraticBezierCurve3";this.v0=a||new n;this.v1=b|| -new n;this.v2=c||new n}function Pa(a){O.call(this);this.type="SplineCurve";this.points=a||[]}function fb(){O.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function Qa(a){fb.call(this);this.type="Path";this.currentPoint=new C;a&&this.setFromPoints(a)}function rb(a){Qa.call(this,a);this.uuid=T.generateUUID();this.type="Shape";this.holes=[]}function aa(a,b){H.call(this);this.type="Light";this.color=new B(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function Qd(a,b,c){aa.call(this, -a,c);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(H.DefaultUp);this.updateMatrix();this.groundColor=new B(b)}function Rb(a){this.camera=a;this.bias=0;this.radius=1;this.mapSize=new C(512,512);this.map=null;this.matrix=new L}function Rd(){Rb.call(this,new ja(50,1,.5,500))}function Sd(a,b,c,d,e,f){aa.call(this,a,b);this.type="SpotLight";this.position.copy(H.DefaultUp);this.updateMatrix();this.target=new H;Object.defineProperty(this,"power",{get:function(){return this.intensity* -Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=void 0!==c?c:0;this.angle=void 0!==d?d:Math.PI/3;this.penumbra=void 0!==e?e:0;this.decay=void 0!==f?f:1;this.shadow=new Rd}function Td(a,b,c,d){aa.call(this,a,b);this.type="PointLight";Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(a){this.intensity=a/(4*Math.PI)}});this.distance=void 0!==c?c:0;this.decay=void 0!==d?d:1;this.shadow=new Rb(new ja(90,1,.5,500))}function sd(a,b,c,d,e, -f){Va.call(this);this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=void 0!==a?a:-1;this.right=void 0!==b?b:1;this.top=void 0!==c?c:1;this.bottom=void 0!==d?d:-1;this.near=void 0!==e?e:.1;this.far=void 0!==f?f:2E3;this.updateProjectionMatrix()}function Ud(){Rb.call(this,new sd(-5,5,5,-5,.5,500))}function Vd(a,b){aa.call(this,a,b);this.type="DirectionalLight";this.position.copy(H.DefaultUp);this.updateMatrix();this.target=new H;this.shadow=new Ud}function Wd(a,b){aa.call(this,a,b); -this.type="AmbientLight";this.castShadow=void 0}function Xd(a,b,c,d){aa.call(this,a,b);this.type="RectAreaLight";this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function Yd(a){this.manager=void 0!==a?a:Ba;this.textures={}}function Zd(){E.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function $d(a,b,c,d){"number"===typeof c&&(d=c,c=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));P.call(this,a,b, -c);this.meshPerAttribute=d||1}function xe(a){this.manager=void 0!==a?a:Ba}function ye(a){this.manager=void 0!==a?a:Ba;this.resourcePath=""}function ze(a){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");this.manager=void 0!==a?a:Ba;this.options=void 0}function Ae(){this.type="ShapePath";this.color=new B;this.subPaths=[];this.currentPath=null} -function Be(a){this.type="Font";this.data=a}function Lf(a){this.manager=void 0!==a?a:Ba}function td(){}function Ce(a){this.manager=void 0!==a?a:Ba}function ae(){this.coefficients=[];for(var a=0;9>a;a++)this.coefficients.push(new n)}function Ra(a,b){aa.call(this,void 0,b);this.sh=void 0!==a?a:new ae}function De(a,b,c){Ra.call(this,void 0,c);a=(new B).set(a);c=(new B).set(b);b=new n(a.r,a.g,a.b);a=new n(c.r,c.g,c.b);c=Math.sqrt(Math.PI);var d=c*Math.sqrt(.75);this.sh.coefficients[0].copy(b).add(a).multiplyScalar(c); +this.copyFramebufferToTexture=function(a,b,c){var d=b.image.width,e=b.image.height,f=ka.convert(b.format);ba.setTexture2D(b,0);N.copyTexImage2D(3553,c||0,f,a.x,a.y,d,e,0)};this.copyTextureToTexture=function(a,b,c,d){var e=b.image.width,f=b.image.height,g=ka.convert(c.format),h=ka.convert(c.type);ba.setTexture2D(c,0);b.isDataTexture?N.texSubImage2D(3553,d||0,a.x,a.y,e,f,g,h,b.image.data):N.texSubImage2D(3553,d||0,a.x,a.y,g,h,b.image)};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", +{detail:this}))}function Ed(a,b){this.name="";this.color=new B(a);this.density=void 0!==b?b:2.5E-4}function Fd(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 Cb(a,b){this.array=a;this.stride=b;this.count=void 0!==a?a.length/b:0;this.dynamic=!1;this.updateRange={offset:0,count:-1};this.version=0}function Oc(a,b,c,d){this.data=a;this.itemSize=b;this.offset=c;this.normalized=!0===d}function pb(a){I.call(this);this.type="SpriteMaterial";this.color= +new B(16777215);this.map=null;this.rotation=0;this.sizeAttenuation=!0;this.lights=!1;this.transparent=!0;this.setValues(a)}function Pc(a){H.call(this);this.type="Sprite";if(void 0===$b){$b=new E;var b=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]);b=new Cb(b,5);$b.setIndex([0,1,2,0,2,3]);$b.addAttribute("position",new Oc(b,3,0,!1));$b.addAttribute("uv",new Oc(b,2,3,!1))}this.geometry=$b;this.material=void 0!==a?a:new pb;this.center=new C(.5,.5)}function Qc(){H.call(this); +this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Rc(a,b){a&&a.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");sa.call(this,a,b);this.type="SkinnedMesh";this.bindMode="attached";this.bindMatrix=new L;this.bindMatrixInverse=new L}function Gd(a,b){a=a||[];this.bones=a.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);if(void 0===b)this.calculateInverses();else if(this.bones.length=== +b.length)this.boneInverses=b.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],a=0,b=this.bones.length;ac;c++){var p=q[h[c]];var l=q[h[(c+1)%3]];f[0]=Math.min(p,l);f[1]=Math.max(p,l);p=f[0]+","+f[1];void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]})}}for(p in g)m=g[p],h=a.vertices[m.index1],b.push(h.x,h.y,h.z),h=a.vertices[m.index2],b.push(h.x,h.y,h.z)}else if(a&&a.isBufferGeometry)if(h=new n,null!==a.index){k=a.attributes.position;q=a.index;var t=a.groups;0===t.length&&(t=[{start:0,count:q.count,materialIndex:0}]);a=0;for(e=t.length;ac;c++)p=q.getX(m+c),l=q.getX(m+(c+1)%3),f[0]=Math.min(p,l),f[1]=Math.max(p,l),p=f[0]+","+f[1],void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]});for(p in g)m=g[p],h.fromBufferAttribute(k,m.index1),b.push(h.x,h.y,h.z),h.fromBufferAttribute(k,m.index2),b.push(h.x,h.y,h.z)}else for(k=a.attributes.position,m=0,d=k.count/3;mc;c++)g=3*m+c,h.fromBufferAttribute(k,g),b.push(h.x,h.y,h.z),g=3*m+(c+1)%3,h.fromBufferAttribute(k,g),b.push(h.x, +h.y,h.z);this.addAttribute("position",new D(b,3))}function Uc(a,b,c){M.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new dc(a,b,c));this.mergeVertices()}function dc(a,b,c){E.call(this);this.type="ParametricBufferGeometry";this.parameters={func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],h=new n,k=new n,m=new n,q=new n,p=new n,l,t;3>a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter."); +var r=b+1;for(l=0;l<=c;l++){var v=l/c;for(t=0;t<=b;t++){var w=t/b;a(w,v,k);e.push(k.x,k.y,k.z);0<=w-1E-5?(a(w-1E-5,v,m),q.subVectors(k,m)):(a(w+1E-5,v,m),q.subVectors(m,k));0<=v-1E-5?(a(w,v-1E-5,m),p.subVectors(k,m)):(a(w,v+1E-5,m),p.subVectors(m,k));h.crossVectors(q,p).normalize();f.push(h.x,h.y,h.z);g.push(w,v)}}for(l=0;ld&&1===a.x&&(k[b]=a.x-1);0===c.x&&0===c.z&&(k[b]=d/2/Math.PI+.5)}E.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:a, +indices:b,radius:c,detail:d};c=c||1;d=d||0;var h=[],k=[];(function(a){for(var c=new n,d=new n,g=new n,h=0;he&&(.2>b&&(k[a+0]+=1),.2>c&&(k[a+2]+=1),.2>d&&(k[a+4]+=1))})();this.addAttribute("position",new D(h,3));this.addAttribute("normal",new D(h.slice(),3));this.addAttribute("uv",new D(k,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Wc(a, +b){M.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new ec(a,b));this.mergeVertices()}function ec(a,b){Aa.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 Xc(a,b){M.call(this);this.type="OctahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Db(a,b));this.mergeVertices()}function Db(a,b){Aa.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 Yc(a,b){M.call(this);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new fc(a,b));this.mergeVertices()}function fc(a,b){var c=(1+Math.sqrt(5))/2;Aa.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 Zc(a,b){M.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new gc(a,b));this.mergeVertices()}function gc(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;Aa.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 $c(a,b,c,d,e,f){M.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 Eb(a,b,c,d,e);this.tangents=a.tangents;this.normals=a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function Eb(a,b,c,d,e){function f(e){q=a.getPointAt(e/b,q);var f=g.normals[e];e=g.binormals[e];for(l=0;l<=d;l++){var m=l/d*Math.PI*2,p=Math.sin(m);m=-Math.cos(m);k.x=m*f.x+p*e.x;k.y=m*f.y+p*e.y;k.z=m*f.z+p*e.z;k.normalize();r.push(k.x,k.y,k.z);h.x=q.x+c*k.x;h.y=q.y+c*k.y;h.z= +q.z+c*k.z;t.push(h.x,h.y,h.z)}}E.call(this);this.type="TubeBufferGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};b=b||64;c=c||1;d=d||8;e=e||!1;var g=a.computeFrenetFrames(b,e);this.tangents=g.tangents;this.normals=g.normals;this.binormals=g.binormals;var h=new n,k=new n,m=new C,q=new n,p,l,t=[],r=[],v=[],w=[];for(p=0;p=b;e-=d)f=Bf(e,a[e],a[e+1],f);f&&Fb(f,f.next)&&(cd(f),f=f.next);return f}function dd(a,b){if(!a)return a;b||(b=a);do{var c=!1;if(a.steiner||!Fb(a,a.next)&&0!==wa(a.prev,a,a.next))a=a.next;else{cd(a);a=b=a.prev;if(a===a.next)break;c=!0}}while(c||a!==b);return b} +function ed(a,b,c,d,e,f,g){if(a){if(!g&&f){var h=a,k=h;do null===k.z&&(k.z=re(k.x,k.y,d,e,f)),k.prevZ=k.prev,k=k.nextZ=k.next;while(k!==h);k.prevZ.nextZ=null;k.prevZ=null;h=k;var m,q,p,l,t=1;do{k=h;var r=h=null;for(q=0;k;){q++;var n=k;for(m=p=0;mp.x?q.x>t.x?q.x:t.x:p.x>t.x?p.x:t.x,y=q.y>p.y?q.y>t.y?q.y:t.y:p.y>t.y?p.y:t.y;m=re(q.x=m;){if(w!==r.prev&&w!==r.next&&Id(q.x,q.y,p.x,p.y,t.x,t.y,w.x,w.y)&&0<=wa(w.prev,w,w.next)){r=!1;break a}w= +w.prevZ}r=!0}}else a:if(r=a,q=r.prev,p=r,t=r.next,0<=wa(q,p,t))r=!1;else{for(m=r.next.next;m!==r.prev;){if(Id(q.x,q.y,p.x,p.y,t.x,t.y,m.x,m.y)&&0<=wa(m.prev,m,m.next)){r=!1;break a}m=m.next}r=!0}if(r)b.push(k.i/c),b.push(a.i/c),b.push(n.i/c),cd(a),h=a=n.next;else if(a=n,a===h){if(!g)ed(dd(a),b,c,d,e,f,1);else if(1===g){g=b;h=c;k=a;do n=k.prev,r=k.next.next,!Fb(n,r)&&Cf(n,k,k.next,r)&&fd(n,r)&&fd(r,n)&&(g.push(n.i/h),g.push(k.i/h),g.push(r.i/h),cd(k),cd(k.next),k=a=r),k=k.next;while(k!==a);a=k;ed(a, +b,c,d,e,f,2)}else if(2===g)a:{g=a;do{for(h=g.next.next;h!==g.prev;){if(k=g.i!==h.i){k=g;n=h;if(r=k.next.i!==n.i&&k.prev.i!==n.i){b:{r=k;do{if(r.i!==k.i&&r.next.i!==k.i&&r.i!==n.i&&r.next.i!==n.i&&Cf(r,r.next,k,n)){r=!0;break b}r=r.next}while(r!==k);r=!1}r=!r}if(r=r&&fd(k,n)&&fd(n,k)){r=k;q=!1;p=(k.x+n.x)/2;n=(k.y+n.y)/2;do r.y>n!==r.next.y>n&&r.next.y!==r.y&&p<(r.next.x-r.x)*(n-r.y)/(r.next.y-r.y)+r.x&&(q=!q),r=r.next;while(r!==k);r=q}k=r}if(k){a=Df(g,h);g=dd(g,g.next);a=dd(a,a.next);ed(g,b,c,d,e, +f);ed(a,b,c,d,e,f);break a}h=h.next}g=g.next}while(g!==a)}break}}}}function mh(a,b){return a.x-b.x}function nh(a,b){var c=b,d=a.x,e=a.y,f=-Infinity;do{if(e<=c.y&&e>=c.next.y&&c.next.y!==c.y){var g=c.x+(e-c.y)*(c.next.x-c.x)/(c.next.y-c.y);if(g<=d&&g>f){f=g;if(g===d){if(e===c.y)return c;if(e===c.next.y)return c.next}var h=c.x=c.x&&c.x>=g&&d!==c.x&&Id(eh.x)&&fd(c,a)&&(h=c,m=q)}c=c.next}return h}function re(a,b,c,d,e){a=32767*(a-c)*e;b=32767*(b-d)*e;a=(a|a<<8)&16711935;a=(a|a<<4)&252645135;a=(a|a<<2)&858993459;b=(b|b<<8)&16711935;b=(b|b<<4)&252645135;b=(b|b<<2)&858993459;return(a|a<<1)&1431655765|((b|b<<1)&1431655765)<<1}function oh(a){var b=a,c=a;do b.xwa(a.prev,a,a.next)?0<=wa(a,b,a.next)&&0<=wa(a,a.prev,b):0>wa(a,b,a.prev)||0>wa(a,a.next,b)}function Df(a,b){var c=new se(a.i,a.x,a.y),d=new se(b.i,b.x,b.y),e=a.next,f=b.prev;a.next=b;b.prev=a;c.next=e;e.prev= +c;d.next=c;c.prev=d;f.next=d;d.prev=f;return d}function Bf(a,b,c,d){a=new se(a,b,c);d?(a.next=d.next,a.prev=d,d.next.prev=a,d.next=a):(a.prev=a,a.next=a);return a}function cd(a){a.next.prev=a.prev;a.prev.next=a.next;a.prevZ&&(a.prevZ.nextZ=a.nextZ);a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function se(a,b,c){this.i=a;this.x=b;this.y=c;this.nextZ=this.prevZ=this.z=this.next=this.prev=null;this.steiner=!1}function Ef(a){var b=a.length;2Number.EPSILON){var k=Math.sqrt(h),m=Math.sqrt(f*f+g*g);h=b.x-e/k;b=b.y+d/k; +g=((c.x-g/m-h)*g-(c.y+f/m-b)*f)/(d*g-e*f);f=h+d*g-a.x;d=b+e*g-a.y;e=f*f+d*d;if(2>=e)return new C(f,d);e=Math.sqrt(e/2)}else a=!1,d>Number.EPSILON?f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(f=-e,e=Math.sqrt(h)):(f=d,d=e,e=Math.sqrt(h/2));return new C(f/e,d/e)}function h(a,b){for(K=a.length;0<=--K;){var c=K;var f=K-1;0>f&&(f=a.length-1);var g,h=x+2*F;for(g=0;gq;q++){var l=m[f[q]];var n=m[f[(q+1)%3]];d[0]=Math.min(l,n);d[1]=Math.max(l,n);l=d[0]+","+d[1];void 0===e[l]?e[l]={index1:d[0],index2:d[1],face1:h,face2:void 0}:e[l].face2=h}for(l in e)if(d=e[l], +void 0===d.face2||g[d.face1].normal.dot(g[d.face2].normal)<=b)f=a[d.index1],c.push(f.x,f.y,f.z),f=a[d.index2],c.push(f.x,f.y,f.z);this.addAttribute("position",new D(c,3))}function Jb(a,b,c,d,e,f,g,h){M.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};this.fromBufferGeometry(new eb(a,b,c,d,e,f,g,h));this.mergeVertices()}function eb(a,b,c,d,e,f,g,h){function k(c){var e,f=new C,k=new n, +p=0,v=!0===c?a:b,x=!0===c?1:-1;var D=r;for(e=1;e<=d;e++)l.push(0,w*x,0),u.push(0,x,0),t.push(.5,.5),r++;var B=r;for(e=0;e<=d;e++){var E=e/d*h+g,H=Math.cos(E);E=Math.sin(E);k.x=v*E;k.y=w*x;k.z=v*H;l.push(k.x,k.y,k.z);u.push(0,x,0);f.x=.5*H+.5;f.y=.5*E*x+.5;t.push(f.x,f.y);r++}for(e=0;ethis.duration&&this.resetDuration()}function qh(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return pc; +case "vector":case "vector2":case "vector3":case "vector4":return qc;case "color":return Md;case "quaternion":return od;case "bool":case "boolean":return Ld;case "string":return Od}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+a);}function rh(a){if(void 0===a.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var b=qh(a.type);if(void 0===a.times){var c=[],d=[];ta.flattenJSON(a.keys,c,d,"value");a.times=c;a.values=d}return void 0!==b.parse?b.parse(a):new b(a.name, +a.times,a.values,a.interpolation)}function te(a,b,c){var d=this,e=!1,f=0,g=0,h=void 0;this.onStart=void 0;this.onLoad=a;this.onProgress=b;this.onError=c;this.itemStart=function(a){g++;if(!1===e&&void 0!==d.onStart)d.onStart(a,f,g);e=!0};this.itemEnd=function(a){f++;if(void 0!==d.onProgress)d.onProgress(a,f,g);if(f===g&&(e=!1,void 0!==d.onLoad))d.onLoad()};this.itemError=function(a){if(void 0!==d.onError)d.onError(a)};this.resolveURL=function(a){return h?h(a):a};this.setURLModifier=function(a){h=a; +return this}}function La(a){this.manager=void 0!==a?a:Ba}function If(a){this.manager=void 0!==a?a:Ba}function Jf(a){this.manager=void 0!==a?a:Ba;this._parser=null}function ue(a){this.manager=void 0!==a?a:Ba;this._parser=null}function pd(a){this.manager=void 0!==a?a:Ba}function ve(a){this.manager=void 0!==a?a:Ba}function Pd(a){this.manager=void 0!==a?a:Ba}function O(){this.type="Curve";this.arcLengthDivisions=200}function Ca(a,b,c,d,e,f,g,h){O.call(this);this.type="EllipseCurve";this.aX=a||0;this.aY= +b||0;this.xRadius=c||1;this.yRadius=d||1;this.aStartAngle=e||0;this.aEndAngle=f||2*Math.PI;this.aClockwise=g||!1;this.aRotation=h||0}function rc(a,b,c,d,e,f){Ca.call(this,a,b,c,c,d,e,f);this.type="ArcCurve"}function we(){var a=0,b=0,c=0,d=0;return{initCatmullRom:function(e,f,g,h,k){e=k*(g-e);h=k*(h-f);a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},initNonuniformCatmullRom:function(e,f,g,h,k,m,q){e=((f-e)/k-(g-e)/(k+m)+(g-f)/m)*m;h=((g-f)/m-(h-f)/(m+q)+(h-g)/q)*m;a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},calc:function(e){var f= +e*e;return a+b*e+c*f+d*f*e}}}function va(a,b,c,d){O.call(this);this.type="CatmullRomCurve3";this.points=a||[];this.closed=b||!1;this.curveType=c||"centripetal";this.tension=d||.5}function Kf(a,b,c,d,e){b=.5*(d-b);e=.5*(e-c);var f=a*a;return(2*c-2*d+b+e)*a*f+(-3*c+3*d-2*b-e)*f+b*a+c}function qd(a,b,c,d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function rd(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}function Ma(a,b,c,d){O.call(this);this.type="CubicBezierCurve";this.v0= +a||new C;this.v1=b||new C;this.v2=c||new C;this.v3=d||new C}function $a(a,b,c,d){O.call(this);this.type="CubicBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n;this.v3=d||new n}function Da(a,b){O.call(this);this.type="LineCurve";this.v1=a||new C;this.v2=b||new C}function Na(a,b){O.call(this);this.type="LineCurve3";this.v1=a||new n;this.v2=b||new n}function Oa(a,b,c){O.call(this);this.type="QuadraticBezierCurve";this.v0=a||new C;this.v1=b||new C;this.v2=c||new C}function ab(a,b,c){O.call(this); +this.type="QuadraticBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n}function Pa(a){O.call(this);this.type="SplineCurve";this.points=a||[]}function fb(){O.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function Qa(a){fb.call(this);this.type="Path";this.currentPoint=new C;a&&this.setFromPoints(a)}function rb(a){Qa.call(this,a);this.uuid=T.generateUUID();this.type="Shape";this.holes=[]}function aa(a,b){H.call(this);this.type="Light";this.color=new B(a);this.intensity= +void 0!==b?b:1;this.receiveShadow=void 0}function Qd(a,b,c){aa.call(this,a,c);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(H.DefaultUp);this.updateMatrix();this.groundColor=new B(b)}function Rb(a){this.camera=a;this.bias=0;this.radius=1;this.mapSize=new C(512,512);this.map=null;this.matrix=new L}function Rd(){Rb.call(this,new ja(50,1,.5,500))}function Sd(a,b,c,d,e,f){aa.call(this,a,b);this.type="SpotLight";this.position.copy(H.DefaultUp);this.updateMatrix();this.target=new H; +Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=void 0!==c?c:0;this.angle=void 0!==d?d:Math.PI/3;this.penumbra=void 0!==e?e:0;this.decay=void 0!==f?f:1;this.shadow=new Rd}function Td(a,b,c,d){aa.call(this,a,b);this.type="PointLight";Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(a){this.intensity=a/(4*Math.PI)}});this.distance=void 0!==c?c:0;this.decay=void 0!== +d?d:1;this.shadow=new Rb(new ja(90,1,.5,500))}function sd(a,b,c,d,e,f){Va.call(this);this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=void 0!==a?a:-1;this.right=void 0!==b?b:1;this.top=void 0!==c?c:1;this.bottom=void 0!==d?d:-1;this.near=void 0!==e?e:.1;this.far=void 0!==f?f:2E3;this.updateProjectionMatrix()}function Ud(){Rb.call(this,new sd(-5,5,5,-5,.5,500))}function Vd(a,b){aa.call(this,a,b);this.type="DirectionalLight";this.position.copy(H.DefaultUp);this.updateMatrix();this.target= +new H;this.shadow=new Ud}function Wd(a,b){aa.call(this,a,b);this.type="AmbientLight";this.castShadow=void 0}function Xd(a,b,c,d){aa.call(this,a,b);this.type="RectAreaLight";this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function Yd(a){this.manager=void 0!==a?a:Ba;this.textures={}}function Zd(){E.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function $d(a,b,c,d){"number"===typeof c&&(d=c,c=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")); +P.call(this,a,b,c);this.meshPerAttribute=d||1}function xe(a){this.manager=void 0!==a?a:Ba}function ye(a){this.manager=void 0!==a?a:Ba;this.resourcePath=""}function ze(a){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");this.manager=void 0!==a?a:Ba;this.options=void 0}function Ae(){this.type="ShapePath";this.color=new B;this.subPaths=[];this.currentPath= +null}function Be(a){this.type="Font";this.data=a}function Lf(a){this.manager=void 0!==a?a:Ba}function td(){}function Ce(a){this.manager=void 0!==a?a:Ba}function ae(){this.coefficients=[];for(var a=0;9>a;a++)this.coefficients.push(new n)}function Ra(a,b){aa.call(this,void 0,b);this.sh=void 0!==a?a:new ae}function De(a,b,c){Ra.call(this,void 0,c);a=(new B).set(a);c=(new B).set(b);b=new n(a.r,a.g,a.b);a=new n(c.r,c.g,c.b);c=Math.sqrt(Math.PI);var d=c*Math.sqrt(.75);this.sh.coefficients[0].copy(b).add(a).multiplyScalar(c); this.sh.coefficients[1].copy(b).sub(a).multiplyScalar(d)}function Ee(a,b){Ra.call(this,void 0,b);a=(new B).set(a);this.sh.coefficients[0].set(a.r,a.g,a.b).multiplyScalar(2*Math.sqrt(Math.PI))}function Mf(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new ja;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new ja;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1}function Fe(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime= this.startTime=0;this.running=!1}function Ge(){H.call(this);this.type="AudioListener";this.context=He.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0}function sc(a){H.call(this);this.type="Audio";this.listener=a;this.context=a.context;this.gain=this.context.createGain();this.gain.connect(a.getInput());this.autoplay=!1;this.buffer=null;this.detune=0;this.loop=!1;this.offset=this.startTime=0;this.playbackRate=1;this.isPlaying= !1;this.hasPlaybackControl=!0;this.sourceType="empty";this.filters=[]}function Ie(a){sc.call(this,a);this.panner=this.context.createPanner();this.panner.panningModel="HRTF";this.panner.connect(this.gain)}function Je(a,b){this.analyser=a.context.createAnalyser();this.analyser.fftSize=void 0!==b?b:2048;this.data=new Uint8Array(this.analyser.frequencyBinCount);a.getOutput().connect(this.analyser)}function Ke(a,b,c){this.binding=a;this.valueSize=c;a=Float64Array;switch(b){case "quaternion":b=this._slerp; diff --git a/build/three.module.js b/build/three.module.js index 407676ebf6..cbba7e6de3 100644 --- a/build/three.module.js +++ b/build/three.module.js @@ -6123,11 +6123,9 @@ function Scene() { this.autoUpdate = true; // checked by the renderer - /* - if ( typeof __THREE_DEVTOOLS__ !== undefined ) { - __THREE_DEVTOOLS__.dispatchEvent( { type: 'scene', value: this } ); + if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) { + __THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); } - */ } @@ -25563,11 +25561,9 @@ function WebGLRenderer( parameters ) { }; - /* - if ( typeof __THREE_DEVTOOLS__ !== undefined ) { - __THREE_DEVTOOLS__.dispatchEvent( { type: 'renderer', value: this } ); + if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) { + __THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); } - */ } -- GitLab