Ver código fonte

Updated builds.

Mr.doob 8 anos atrás
pai
commit
1ab3a9b6cf
3 arquivos alterados com 93 adições e 65 exclusões
  1. 18 4
      build/three.js
  2. 57 57
      build/three.min.js
  3. 18 4
      build/three.module.js

+ 18 - 4
build/three.js

@@ -11074,6 +11074,7 @@
 			if ( this.view === null ) {
 
 				this.view = {
+					enabled: true,
 					fullWidth: 1,
 					fullHeight: 1,
 					offsetX: 0,
@@ -11084,6 +11085,7 @@
 
 			}
 
+			this.view.enabled = true;
 			this.view.fullWidth = fullWidth;
 			this.view.fullHeight = fullHeight;
 			this.view.offsetX = x;
@@ -11097,7 +11099,12 @@
 
 		clearViewOffset: function () {
 
-			this.view = null;
+			if ( this.view !== null ) {
+
+				this.view.enabled = false;
+
+			}
+
 			this.updateProjectionMatrix();
 
 		},
@@ -11114,7 +11121,7 @@
 			var top = cy + dy;
 			var bottom = cy - dy;
 
-			if ( this.view !== null ) {
+			if ( this.view !== null && this.view.enabled ) {
 
 				var zoomW = this.zoom / ( this.view.width / this.view.fullWidth );
 				var zoomH = this.zoom / ( this.view.height / this.view.fullHeight );
@@ -20406,6 +20413,7 @@
 			if ( this.view === null ) {
 
 				this.view = {
+					enabled: true,
 					fullWidth: 1,
 					fullHeight: 1,
 					offsetX: 0,
@@ -20416,6 +20424,7 @@
 
 			}
 
+			this.view.enabled = true;
 			this.view.fullWidth = fullWidth;
 			this.view.fullHeight = fullHeight;
 			this.view.offsetX = x;
@@ -20429,7 +20438,12 @@
 
 		clearViewOffset: function () {
 
-			this.view = null;
+			if ( this.view !== null ) {
+
+				this.view.enabled = false;
+
+			}
+
 			this.updateProjectionMatrix();
 
 		},
@@ -20444,7 +20458,7 @@
 				left = - 0.5 * width,
 				view = this.view;
 
-			if ( view !== null ) {
+			if ( this.view !== null && this.view.enabled ) {
 
 				var fullWidth = view.fullWidth,
 					fullHeight = view.fullHeight;

+ 57 - 57
build/three.min.js

@@ -496,13 +496,13 @@ void 0!==this.geometry&&(f.geometry=b(a.geometries,this.geometry));if(void 0!==t
 (e.materials=g),0<h.length&&(e.textures=h),0<k.length&&(e.images=k));e.object=f;return e},clone:function(a){return(new this.constructor).copy(this,a)},copy:function(a,b){void 0===b&&(b=!0);this.name=a.name;this.up.copy(a.up);this.position.copy(a.position);this.quaternion.copy(a.quaternion);this.scale.copy(a.scale);this.matrix.copy(a.matrix);this.matrixWorld.copy(a.matrixWorld);this.matrixAutoUpdate=a.matrixAutoUpdate;this.matrixWorldNeedsUpdate=a.matrixWorldNeedsUpdate;this.layers.mask=a.layers.mask;
 this.visible=a.visible;this.castShadow=a.castShadow;this.receiveShadow=a.receiveShadow;this.frustumCulled=a.frustumCulled;this.renderOrder=a.renderOrder;this.userData=JSON.parse(JSON.stringify(a.userData));if(!0===b)for(b=0;b<a.children.length;b++)this.add(a.children[b].clone());return this}});Ma.prototype=Object.assign(Object.create(z.prototype),{constructor:Ma,isCamera:!0,copy:function(a,b){z.prototype.copy.call(this,a,b);this.matrixWorldInverse.copy(a.matrixWorldInverse);this.projectionMatrix.copy(a.projectionMatrix);
 return this},getWorldDirection:function(){var a=new fa;return function(b){b=b||new p;this.getWorldQuaternion(a);return b.set(0,0,-1).applyQuaternion(a)}}(),updateMatrixWorld:function(a){z.prototype.updateMatrixWorld.call(this,a);this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}});Eb.prototype=Object.assign(Object.create(Ma.prototype),{constructor:Eb,isOrthographicCamera:!0,copy:function(a,b){Ma.prototype.copy.call(this,a,b);this.left=a.left;
-this.right=a.right;this.top=a.top;this.bottom=a.bottom;this.near=a.near;this.far=a.far;this.zoom=a.zoom;this.view=null===a.view?null:Object.assign({},a.view);return this},setViewOffset:function(a,b,c,d,e,f){null===this.view&&(this.view={fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1});this.view.fullWidth=a;this.view.fullHeight=b;this.view.offsetX=c;this.view.offsetY=d;this.view.width=e;this.view.height=f;this.updateProjectionMatrix()},clearViewOffset:function(){this.view=null;this.updateProjectionMatrix()},
-updateProjectionMatrix:function(){var a=(this.right-this.left)/(2*this.zoom),b=(this.top-this.bottom)/(2*this.zoom),c=(this.right+this.left)/2,d=(this.top+this.bottom)/2,e=c-a,c=c+a,a=d+b,b=d-b;if(null!==this.view)var c=this.zoom/(this.view.width/this.view.fullWidth),b=this.zoom/(this.view.height/this.view.fullHeight),f=(this.right-this.left)/this.view.width,d=(this.top-this.bottom)/this.view.height,e=e+this.view.offsetX/c*f,c=e+this.view.width/c*f,a=a-this.view.offsetY/b*d,b=a-this.view.height/b*
-d;this.projectionMatrix.makeOrthographic(e,c,a,b,this.near,this.far)},toJSON:function(a){a=z.prototype.toJSON.call(this,a);a.object.zoom=this.zoom;a.object.left=this.left;a.object.right=this.right;a.object.top=this.top;a.object.bottom=this.bottom;a.object.near=this.near;a.object.far=this.far;null!==this.view&&(a.object.view=Object.assign({},this.view));return a}});Object.assign(Qa.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.a=a.a;this.b=a.b;this.c=a.c;
-this.normal.copy(a.normal);this.color.copy(a.color);this.materialIndex=a.materialIndex;for(var b=0,c=a.vertexNormals.length;b<c;b++)this.vertexNormals[b]=a.vertexNormals[b].clone();b=0;for(c=a.vertexColors.length;b<c;b++)this.vertexColors[b]=a.vertexColors[b].clone();return this}});var Rd=0;Object.assign(L.prototype,sa.prototype,{isGeometry:!0,applyMatrix:function(a){for(var b=(new qa).getNormalMatrix(a),c=0,d=this.vertices.length;c<d;c++)this.vertices[c].applyMatrix4(a);c=0;for(d=this.faces.length;c<
-d;c++){a=this.faces[c];a.normal.applyMatrix3(b).normalize();for(var e=0,f=a.vertexNormals.length;e<f;e++)a.vertexNormals[e].applyMatrix3(b).normalize()}null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();this.normalsNeedUpdate=this.verticesNeedUpdate=!0;return this},rotateX:function(){var a=new K;return function(b){a.makeRotationX(b);this.applyMatrix(a);return this}}(),rotateY:function(){var a=new K;return function(b){a.makeRotationY(b);this.applyMatrix(a);
-return this}}(),rotateZ:function(){var a=new K;return function(b){a.makeRotationZ(b);this.applyMatrix(a);return this}}(),translate:function(){var a=new K;return function(b,c,d){a.makeTranslation(b,c,d);this.applyMatrix(a);return this}}(),scale:function(){var a=new K;return function(b,c,d){a.makeScale(b,c,d);this.applyMatrix(a);return this}}(),lookAt:function(){var a=new z;return function(b){a.lookAt(b);a.updateMatrix();this.applyMatrix(a.matrix)}}(),fromBufferGeometry:function(a){function b(a,b,d,
-e){var f=void 0!==g?[q[a].clone(),q[b].clone(),q[d].clone()]:[],v=void 0!==h?[c.colors[a].clone(),c.colors[b].clone(),c.colors[d].clone()]:[];e=new Qa(a,b,d,f,v,e);c.faces.push(e);void 0!==k&&c.faceVertexUvs[0].push([n[a].clone(),n[b].clone(),n[d].clone()]);void 0!==l&&c.faceVertexUvs[1].push([m[a].clone(),m[b].clone(),m[d].clone()])}var c=this,d=null!==a.index?a.index.array:void 0,e=a.attributes,f=e.position.array,g=void 0!==e.normal?e.normal.array:void 0,h=void 0!==e.color?e.color.array:void 0,
+this.right=a.right;this.top=a.top;this.bottom=a.bottom;this.near=a.near;this.far=a.far;this.zoom=a.zoom;this.view=null===a.view?null:Object.assign({},a.view);return this},setViewOffset:function(a,b,c,d,e,f){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1});this.view.enabled=!0;this.view.fullWidth=a;this.view.fullHeight=b;this.view.offsetX=c;this.view.offsetY=d;this.view.width=e;this.view.height=f;this.updateProjectionMatrix()},clearViewOffset:function(){null!==
+this.view&&(this.view.enabled=!1);this.updateProjectionMatrix()},updateProjectionMatrix:function(){var a=(this.right-this.left)/(2*this.zoom),b=(this.top-this.bottom)/(2*this.zoom),c=(this.right+this.left)/2,d=(this.top+this.bottom)/2,e=c-a,c=c+a,a=d+b,b=d-b;if(null!==this.view&&this.view.enabled)var c=this.zoom/(this.view.width/this.view.fullWidth),b=this.zoom/(this.view.height/this.view.fullHeight),f=(this.right-this.left)/this.view.width,d=(this.top-this.bottom)/this.view.height,e=e+this.view.offsetX/
+c*f,c=e+this.view.width/c*f,a=a-this.view.offsetY/b*d,b=a-this.view.height/b*d;this.projectionMatrix.makeOrthographic(e,c,a,b,this.near,this.far)},toJSON:function(a){a=z.prototype.toJSON.call(this,a);a.object.zoom=this.zoom;a.object.left=this.left;a.object.right=this.right;a.object.top=this.top;a.object.bottom=this.bottom;a.object.near=this.near;a.object.far=this.far;null!==this.view&&(a.object.view=Object.assign({},this.view));return a}});Object.assign(Qa.prototype,{clone:function(){return(new this.constructor).copy(this)},
+copy:function(a){this.a=a.a;this.b=a.b;this.c=a.c;this.normal.copy(a.normal);this.color.copy(a.color);this.materialIndex=a.materialIndex;for(var b=0,c=a.vertexNormals.length;b<c;b++)this.vertexNormals[b]=a.vertexNormals[b].clone();b=0;for(c=a.vertexColors.length;b<c;b++)this.vertexColors[b]=a.vertexColors[b].clone();return this}});var Rd=0;Object.assign(L.prototype,sa.prototype,{isGeometry:!0,applyMatrix:function(a){for(var b=(new qa).getNormalMatrix(a),c=0,d=this.vertices.length;c<d;c++)this.vertices[c].applyMatrix4(a);
+c=0;for(d=this.faces.length;c<d;c++){a=this.faces[c];a.normal.applyMatrix3(b).normalize();for(var e=0,f=a.vertexNormals.length;e<f;e++)a.vertexNormals[e].applyMatrix3(b).normalize()}null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();this.normalsNeedUpdate=this.verticesNeedUpdate=!0;return this},rotateX:function(){var a=new K;return function(b){a.makeRotationX(b);this.applyMatrix(a);return this}}(),rotateY:function(){var a=new K;return function(b){a.makeRotationY(b);
+this.applyMatrix(a);return this}}(),rotateZ:function(){var a=new K;return function(b){a.makeRotationZ(b);this.applyMatrix(a);return this}}(),translate:function(){var a=new K;return function(b,c,d){a.makeTranslation(b,c,d);this.applyMatrix(a);return this}}(),scale:function(){var a=new K;return function(b,c,d){a.makeScale(b,c,d);this.applyMatrix(a);return this}}(),lookAt:function(){var a=new z;return function(b){a.lookAt(b);a.updateMatrix();this.applyMatrix(a.matrix)}}(),fromBufferGeometry:function(a){function b(a,
+b,d,e){var f=void 0!==g?[q[a].clone(),q[b].clone(),q[d].clone()]:[],v=void 0!==h?[c.colors[a].clone(),c.colors[b].clone(),c.colors[d].clone()]:[];e=new Qa(a,b,d,f,v,e);c.faces.push(e);void 0!==k&&c.faceVertexUvs[0].push([n[a].clone(),n[b].clone(),n[d].clone()]);void 0!==l&&c.faceVertexUvs[1].push([m[a].clone(),m[b].clone(),m[d].clone()])}var c=this,d=null!==a.index?a.index.array:void 0,e=a.attributes,f=e.position.array,g=void 0!==e.normal?e.normal.array:void 0,h=void 0!==e.color?e.color.array:void 0,
 k=void 0!==e.uv?e.uv.array:void 0,l=void 0!==e.uv2?e.uv2.array:void 0;void 0!==l&&(this.faceVertexUvs[1]=[]);for(var q=[],n=[],m=[],r=e=0;e<f.length;e+=3,r+=2)c.vertices.push(new p(f[e],f[e+1],f[e+2])),void 0!==g&&q.push(new p(g[e],g[e+1],g[e+2])),void 0!==h&&c.colors.push(new H(h[e],h[e+1],h[e+2])),void 0!==k&&n.push(new D(k[r],k[r+1])),void 0!==l&&m.push(new D(l[r],l[r+1]));var t=a.groups;if(0<t.length)for(e=0;e<t.length;e++)for(var f=t[e],u=f.start,w=f.count,r=u,u=u+w;r<u;r+=3)void 0!==d?b(d[r],
 d[r+1],d[r+2],f.materialIndex):b(r,r+1,r+2,f.materialIndex);else if(void 0!==d)for(e=0;e<d.length;e+=3)b(d[e],d[e+1],d[e+2]);else for(e=0;e<f.length/3;e+=3)b(e,e+1,e+2);this.computeFaceNormals();null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());return this},center:function(){this.computeBoundingBox();var a=this.boundingBox.getCenter().negate();this.translate(a.x,a.y,a.z);return a},normalize:function(){this.computeBoundingSphere();
 var a=this.boundingSphere.center,b=this.boundingSphere.radius,b=0===b?1:1/b,c=new K;c.set(b,0,0,-b*a.x,0,b,0,-b*a.y,0,0,b,-b*a.z,0,0,0,1);this.applyMatrix(c);return this},computeFaceNormals:function(){for(var a=new p,b=new p,c=0,d=this.faces.length;c<d;c++){var e=this.faces[c],f=this.vertices[e.a],g=this.vertices[e.b];a.subVectors(this.vertices[e.c],g);b.subVectors(f,g);a.cross(b);a.normalize();e.normal.copy(a)}},computeVertexNormals:function(a){void 0===a&&(a=!0);var b;var c=Array(this.vertices.length);
@@ -578,56 +578,56 @@ if(u.isBufferGeometry){var x=u.index,I=u.attributes.position,A=u.attributes.uv,z
 x;if(void 0!==y){B=D[N.a];E=D[N.b];var U=D[N.c];if(!0===y.morphTargets){var K=u.morphTargets,P=this.morphTargetInfluences;g.set(0,0,0);h.set(0,0,0);k.set(0,0,0);for(var Q=0,R=K.length;Q<R;Q++){var O=P[Q];if(0!==O){var S=K[Q].vertices;g.addScaledVector(l.subVectors(S[N.a],B),O);h.addScaledVector(q.subVectors(S[N.b],E),O);k.addScaledVector(n.subVectors(S[N.c],U),O)}}g.add(B);h.add(E);k.add(U);B=g;E=h;U=k}if(y=b(this,y,v,e,B,E,U,w))I&&I[H]&&(K=I[H],m.copy(K[0]),r.copy(K[1]),t.copy(K[2]),y.uv=a(w,B,E,
 U,m,r,t)),y.face=N,y.faceIndex=H,p.push(y)}}}}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});var gg=0;ha.prototype=Object.assign(Object.create(Ma.prototype),{constructor:ha,isPerspectiveCamera:!0,copy:function(a,b){Ma.prototype.copy.call(this,a,b);this.fov=a.fov;this.zoom=a.zoom;this.near=a.near;this.far=a.far;this.focus=a.focus;this.aspect=a.aspect;this.view=null===a.view?null:Object.assign({},a.view);this.filmGauge=a.filmGauge;this.filmOffset=a.filmOffset;
 return this},setFocalLength:function(a){a=.5*this.getFilmHeight()/a;this.fov=2*R.RAD2DEG*Math.atan(a);this.updateProjectionMatrix()},getFocalLength:function(){var a=Math.tan(.5*R.DEG2RAD*this.fov);return.5*this.getFilmHeight()/a},getEffectiveFOV:function(){return 2*R.RAD2DEG*Math.atan(Math.tan(.5*R.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(a,b,c,
-d,e,f){this.aspect=a/b;null===this.view&&(this.view={fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1});this.view.fullWidth=a;this.view.fullHeight=b;this.view.offsetX=c;this.view.offsetY=d;this.view.width=e;this.view.height=f;this.updateProjectionMatrix()},clearViewOffset:function(){this.view=null;this.updateProjectionMatrix()},updateProjectionMatrix:function(){var a=this.near,b=a*Math.tan(.5*R.DEG2RAD*this.fov)/this.zoom,c=2*b,d=this.aspect*c,e=-.5*d,f=this.view;if(null!==f)var g=f.fullWidth,
-h=f.fullHeight,e=e+f.offsetX*d/g,b=b-f.offsetY*c/h,d=f.width/g*d,c=f.height/h*c;f=this.filmOffset;0!==f&&(e+=a*f/this.getFilmWidth());this.projectionMatrix.makePerspective(e,e+d,b,b-c,a,this.far)},toJSON:function(a){a=z.prototype.toJSON.call(this,a);a.object.fov=this.fov;a.object.zoom=this.zoom;a.object.near=this.near;a.object.far=this.far;a.object.focus=this.focus;a.object.aspect=this.aspect;null!==this.view&&(a.object.view=Object.assign({},this.view));a.object.filmGauge=this.filmGauge;a.object.filmOffset=
-this.filmOffset;return a}});md.prototype=Object.assign(Object.create(ha.prototype),{constructor:md,isArrayCamera:!0});Ib.prototype.isFogExp2=!0;Ib.prototype.clone=function(){return new Ib(this.color.getHex(),this.density)};Ib.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}};Jb.prototype.isFog=!0;Jb.prototype.clone=function(){return new Jb(this.color.getHex(),this.near,this.far)};Jb.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),
-near:this.near,far:this.far}};nd.prototype=Object.assign(Object.create(z.prototype),{constructor:nd,copy:function(a,b){z.prototype.copy.call(this,a,b);null!==a.background&&(this.background=a.background.clone());null!==a.fog&&(this.fog=a.fog.clone());null!==a.overrideMaterial&&(this.overrideMaterial=a.overrideMaterial.clone());this.autoUpdate=a.autoUpdate;this.matrixAutoUpdate=a.matrixAutoUpdate;return this},toJSON:function(a){var b=z.prototype.toJSON.call(this,a);null!==this.background&&(b.object.background=
-this.background.toJSON(a));null!==this.fog&&(b.object.fog=this.fog.toJSON());return b}});Zd.prototype=Object.assign(Object.create(z.prototype),{constructor:Zd,isLensFlare:!0,copy:function(a){z.prototype.copy.call(this,a);this.positionScreen.copy(a.positionScreen);this.customUpdateCallback=a.customUpdateCallback;for(var b=0,c=a.lensFlares.length;b<c;b++)this.lensFlares.push(a.lensFlares[b]);return this},add:function(a,b,c,d,e,f){void 0===b&&(b=-1);void 0===c&&(c=0);void 0===f&&(f=1);void 0===e&&(e=
-new H(16777215));void 0===d&&(d=1);c=Math.min(c,Math.max(0,c));this.lensFlares.push({texture:a,size:b,distance:c,x:0,y:0,z:0,scale:1,rotation:0,opacity:f,color:e,blending:d})},updateLensFlares:function(){var a,b=this.lensFlares.length,c=2*-this.positionScreen.x,d=2*-this.positionScreen.y;for(a=0;a<b;a++){var e=this.lensFlares[a];e.x=this.positionScreen.x+c*e.distance;e.y=this.positionScreen.y+d*e.distance;e.wantedRotation=e.x*Math.PI*.25;e.rotation+=.25*(e.wantedRotation-e.rotation)}}});$a.prototype=
-Object.create(P.prototype);$a.prototype.constructor=$a;$a.prototype.isSpriteMaterial=!0;$a.prototype.copy=function(a){P.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.rotation=a.rotation;return this};yc.prototype=Object.assign(Object.create(z.prototype),{constructor:yc,isSprite:!0,raycast:function(){var a=new p,b=new p,c=new p;return function(d,e){b.setFromMatrixPosition(this.matrixWorld);d.ray.closestPointToPoint(b,a);c.setFromMatrixScale(this.matrixWorld);var f=c.x*c.y/
-4;b.distanceToSquared(a)>f||(f=d.ray.origin.distanceTo(a),f<d.near||f>d.far||e.push({distance:f,point:a.clone(),face:null,object:this}))}}(),clone:function(){return(new this.constructor(this.material)).copy(this)}});zc.prototype=Object.assign(Object.create(z.prototype),{constructor:zc,copy:function(a){z.prototype.copy.call(this,a,!1);a=a.levels;for(var b=0,c=a.length;b<c;b++){var d=a[b];this.addLevel(d.object.clone(),d.distance)}return this},addLevel:function(a,b){void 0===b&&(b=0);b=Math.abs(b);
-for(var c=this.levels,d=0;d<c.length&&!(b<c[d].distance);d++);c.splice(d,0,{distance:b,object:a});this.add(a)},getObjectForDistance:function(a){for(var b=this.levels,c=1,d=b.length;c<d&&!(a<b[c].distance);c++);return b[c-1].object},raycast:function(){var a=new p;return function(b,c){a.setFromMatrixPosition(this.matrixWorld);var d=b.ray.origin.distanceTo(a);this.getObjectForDistance(d).raycast(b,c)}}(),update:function(){var a=new p,b=new p;return function(c){var d=this.levels;if(1<d.length){a.setFromMatrixPosition(c.matrixWorld);
-b.setFromMatrixPosition(this.matrixWorld);c=a.distanceTo(b);d[0].object.visible=!0;for(var e=1,f=d.length;e<f;e++)if(c>=d[e].distance)d[e-1].object.visible=!1,d[e].object.visible=!0;else break;for(;e<f;e++)d[e].object.visible=!1}}}(),toJSON:function(a){a=z.prototype.toJSON.call(this,a);a.object.levels=[];for(var b=this.levels,c=0,d=b.length;c<d;c++){var e=b[c];a.object.levels.push({object:e.object.uuid,distance:e.distance})}return a}});Object.assign(Ac.prototype,{calculateInverses:function(){this.boneInverses=
-[];for(var a=0,b=this.bones.length;a<b;a++){var c=new K;this.bones[a]&&c.getInverse(this.bones[a].matrixWorld);this.boneInverses.push(c)}},pose:function(){var a,b;var c=0;for(b=this.bones.length;c<b;c++)(a=this.bones[c])&&a.matrixWorld.getInverse(this.boneInverses[c]);c=0;for(b=this.bones.length;c<b;c++)if(a=this.bones[c])a.parent&&a.parent.isBone?(a.matrix.getInverse(a.parent.matrixWorld),a.matrix.multiply(a.matrixWorld)):a.matrix.copy(a.matrixWorld),a.matrix.decompose(a.position,a.quaternion,a.scale)},
-update:function(){var a=new K,b=new K;return function(){for(var c=this.bones,d=this.boneInverses,e=this.boneMatrices,f=this.boneTexture,g=0,h=c.length;g<h;g++)a.multiplyMatrices(c[g]?c[g].matrixWorld:b,d[g]),a.toArray(e,16*g);void 0!==f&&(f.needsUpdate=!0)}}(),clone:function(){return new Ac(this.bones,this.boneInverses)}});od.prototype=Object.assign(Object.create(z.prototype),{constructor:od,isBone:!0});pd.prototype=Object.assign(Object.create(ca.prototype),{constructor:pd,isSkinnedMesh:!0,initBones:function(){var a=
-[],b;if(this.geometry&&void 0!==this.geometry.bones){var c=0;for(b=this.geometry.bones.length;c<b;c++){var d=this.geometry.bones[c];var e=new od;a.push(e);e.name=d.name;e.position.fromArray(d.pos);e.quaternion.fromArray(d.rotq);void 0!==d.scl&&e.scale.fromArray(d.scl)}c=0;for(b=this.geometry.bones.length;c<b;c++)d=this.geometry.bones[c],-1!==d.parent&&null!==d.parent&&void 0!==a[d.parent]?a[d.parent].add(a[c]):this.add(a[c])}this.updateMatrixWorld(!0);return a},bind:function(a,b){this.skeleton=a;
-void 0===b&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),b=this.matrixWorld);this.bindMatrix.copy(b);this.bindMatrixInverse.getInverse(b)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var a;if(this.geometry&&this.geometry.isGeometry)for(a=0;a<this.geometry.skinWeights.length;a++){var b=this.geometry.skinWeights[a];var c=1/b.lengthManhattan();Infinity!==c?b.multiplyScalar(c):b.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var b=new da,
-d=this.geometry.attributes.skinWeight;for(a=0;a<d.count;a++)b.x=d.getX(a),b.y=d.getY(a),b.z=d.getZ(a),b.w=d.getW(a),c=1/b.lengthManhattan(),Infinity!==c?b.multiplyScalar(c):b.set(1,0,0,0),d.setXYZW(a,b.x,b.y,b.z,b.w)}},updateMatrixWorld:function(a){ca.prototype.updateMatrixWorld.call(this,a);"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+
-this.bindMode)},clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});X.prototype=Object.create(P.prototype);X.prototype.constructor=X;X.prototype.isLineBasicMaterial=!0;X.prototype.copy=function(a){P.prototype.copy.call(this,a);this.color.copy(a.color);this.linewidth=a.linewidth;this.linecap=a.linecap;this.linejoin=a.linejoin;return this};ua.prototype=Object.assign(Object.create(z.prototype),{constructor:ua,isLine:!0,raycast:function(){var a=new K,b=new ib,c=new ra;
-return function(d,e){var f=d.linePrecision,f=f*f,g=this.geometry,h=this.matrixWorld;null===g.boundingSphere&&g.computeBoundingSphere();c.copy(g.boundingSphere);c.applyMatrix4(h);if(!1!==d.ray.intersectsSphere(c)){a.getInverse(h);b.copy(d.ray).applyMatrix4(a);var k=new p,l=new p,h=new p,q=new p,n=this&&this.isLineSegments?2:1;if(g.isBufferGeometry){var m=g.index;var r=g.attributes.position.array;if(null!==m)for(var t=m.array,g=0,u=t.length-1;g<u;g+=n)m=t[g+1],k.fromArray(r,3*t[g]),l.fromArray(r,3*
-m),m=b.distanceSqToSegment(k,l,q,h),m>f||(q.applyMatrix4(this.matrixWorld),m=d.ray.origin.distanceTo(q),m<d.near||m>d.far||e.push({distance:m,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}));else for(g=0,u=r.length/3-1;g<u;g+=n)k.fromArray(r,3*g),l.fromArray(r,3*g+3),m=b.distanceSqToSegment(k,l,q,h),m>f||(q.applyMatrix4(this.matrixWorld),m=d.ray.origin.distanceTo(q),m<d.near||m>d.far||e.push({distance:m,point:h.clone().applyMatrix4(this.matrixWorld),index:g,
-face:null,faceIndex:null,object:this}))}else if(g.isGeometry)for(k=g.vertices,l=k.length,g=0;g<l-1;g+=n)m=b.distanceSqToSegment(k[g],k[g+1],q,h),m>f||(q.applyMatrix4(this.matrixWorld),m=d.ray.origin.distanceTo(q),m<d.near||m>d.far||e.push({distance:m,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});T.prototype=Object.assign(Object.create(ua.prototype),{constructor:T,
-isLineSegments:!0});qd.prototype=Object.assign(Object.create(ua.prototype),{constructor:qd,isLineLoop:!0});ma.prototype=Object.create(P.prototype);ma.prototype.constructor=ma;ma.prototype.isPointsMaterial=!0;ma.prototype.copy=function(a){P.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.size=a.size;this.sizeAttenuation=a.sizeAttenuation;return this};Kb.prototype=Object.assign(Object.create(z.prototype),{constructor:Kb,isPoints:!0,raycast:function(){var a=new K,b=new ib,c=
-new ra;return function(d,e){function f(a,c){var f=b.distanceSqToPoint(a);if(f<m){a=b.closestPointToPoint(a);a.applyMatrix4(k);var h=d.ray.origin.distanceTo(a);h<d.near||h>d.far||e.push({distance:h,distanceToRay:Math.sqrt(f),point:a.clone(),index:c,face:null,object:g})}}var g=this,h=this.geometry,k=this.matrixWorld,l=d.params.Points.threshold;null===h.boundingSphere&&h.computeBoundingSphere();c.copy(h.boundingSphere);c.applyMatrix4(k);c.radius+=l;if(!1!==d.ray.intersectsSphere(c)){a.getInverse(k);
-b.copy(d.ray).applyMatrix4(a);var l=l/((this.scale.x+this.scale.y+this.scale.z)/3),m=l*l,l=new p;if(h.isBufferGeometry){var n=h.index,h=h.attributes.position.array;if(null!==n)for(var v=n.array,n=0,r=v.length;n<r;n++){var t=v[n];l.fromArray(h,3*t);f(l,t)}else for(n=0,v=h.length/3;n<v;n++)l.fromArray(h,3*n),f(l,n)}else for(l=h.vertices,n=0,v=l.length;n<v;n++)f(l[n],n)}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});Bc.prototype=Object.assign(Object.create(z.prototype),
-{constructor:Bc});rd.prototype=Object.create(O.prototype);rd.prototype.constructor=rd;Lb.prototype=Object.create(O.prototype);Lb.prototype.constructor=Lb;Lb.prototype.isCompressedTexture=!0;Cc.prototype=Object.create(O.prototype);Cc.prototype.constructor=Cc;Cc.prototype.isDepthTexture=!0;Mb.prototype=Object.create(E.prototype);Mb.prototype.constructor=Mb;Dc.prototype=Object.create(L.prototype);Dc.prototype.constructor=Dc;Nb.prototype=Object.create(E.prototype);Nb.prototype.constructor=Nb;Ec.prototype=
-Object.create(L.prototype);Ec.prototype.constructor=Ec;na.prototype=Object.create(E.prototype);na.prototype.constructor=na;Fc.prototype=Object.create(L.prototype);Fc.prototype.constructor=Fc;Ob.prototype=Object.create(na.prototype);Ob.prototype.constructor=Ob;Gc.prototype=Object.create(L.prototype);Gc.prototype.constructor=Gc;kb.prototype=Object.create(na.prototype);kb.prototype.constructor=kb;Hc.prototype=Object.create(L.prototype);Hc.prototype.constructor=Hc;Pb.prototype=Object.create(na.prototype);
-Pb.prototype.constructor=Pb;Ic.prototype=Object.create(L.prototype);Ic.prototype.constructor=Ic;Qb.prototype=Object.create(na.prototype);Qb.prototype.constructor=Qb;Jc.prototype=Object.create(L.prototype);Jc.prototype.constructor=Jc;Rb.prototype=Object.create(E.prototype);Rb.prototype.constructor=Rb;Kc.prototype=Object.create(L.prototype);Kc.prototype.constructor=Kc;Sb.prototype=Object.create(E.prototype);Sb.prototype.constructor=Sb;Lc.prototype=Object.create(L.prototype);Lc.prototype.constructor=
-Lc;Tb.prototype=Object.create(E.prototype);Tb.prototype.constructor=Tb;var Ea={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},triangulate:function(){return function(a,b){var c=a.length;if(3>c)return null;var d=[],e=[],f=[],g;if(0<Ea.area(a))for(g=0;g<c;g++)e[g]=g;else for(g=0;g<c;g++)e[g]=c-1-g;var h=2*c;for(g=c-1;2<c;){if(0>=h--){console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()");break}var k=g;c<=k&&(k=0);g=k+
-1;c<=g&&(g=0);var l=g+1;c<=l&&(l=0);a:{var m;var n=a[e[k]].x;var p=a[e[k]].y;var r=a[e[g]].x;var t=a[e[g]].y;var u=a[e[l]].x;var w=a[e[l]].y;if(0>=(r-n)*(w-p)-(t-p)*(u-n))var x=!1;else{var A=u-r;var y=w-t;var C=n-u;var z=p-w;var D=r-n;x=t-p;for(m=0;m<c;m++){var B=a[e[m]].x;var E=a[e[m]].y;if(!(B===n&&E===p||B===r&&E===t||B===u&&E===w)){var H=B-n;var K=E-p;var L=B-r;var M=E-t;B-=u;E-=w;M=A*M-y*L;K=D*K-x*H;B=C*E-z*B;if(M>=-Number.EPSILON&&B>=-Number.EPSILON&&K>=-Number.EPSILON){x=!1;break a}}}x=!0}}if(x){d.push([a[e[k]],
-a[e[g]],a[e[l]]]);f.push([e[k],e[g],e[l]]);k=g;for(l=g+1;l<c;k++,l++)e[k]=e[l];c--;h=2*c}}return b?f:d}}(),triangulateShape:function(a,b){function c(a){var b=a.length;2<b&&a[b-1].equals(a[0])&&a.pop()}function d(a,b,c){return a.x!==b.x?a.x<b.x?a.x<=c.x&&c.x<=b.x:b.x<=c.x&&c.x<=a.x:a.y<b.y?a.y<=c.y&&c.y<=b.y:b.y<=c.y&&c.y<=a.y}function e(a,b,c,e,f){var g=b.x-a.x,h=b.y-a.y,k=e.x-c.x,l=e.y-c.y,m=a.x-c.x,q=a.y-c.y,n=h*k-g*l,p=h*m-g*q;if(Math.abs(n)>Number.EPSILON){if(0<n){if(0>p||p>n)return[];k=l*m-k*
-q;if(0>k||k>n)return[]}else{if(0<p||p<n)return[];k=l*m-k*q;if(0<k||k<n)return[]}if(0===k)return!f||0!==p&&p!==n?[a]:[];if(k===n)return!f||0!==p&&p!==n?[b]:[];if(0===p)return[c];if(p===n)return[e];f=k/n;return[{x:a.x+f*g,y:a.y+f*h}]}if(0!==p||l*m!==k*q)return[];h=0===g&&0===h;k=0===k&&0===l;if(h&&k)return a.x!==c.x||a.y!==c.y?[]:[a];if(h)return d(c,e,a)?[a]:[];if(k)return d(a,b,c)?[c]:[];0!==g?(a.x<b.x?(g=a,k=a.x,h=b,a=b.x):(g=b,k=b.x,h=a,a=a.x),c.x<e.x?(b=c,n=c.x,l=e,c=e.x):(b=e,n=e.x,l=c,c=c.x)):
-(a.y<b.y?(g=a,k=a.y,h=b,a=b.y):(g=b,k=b.y,h=a,a=a.y),c.y<e.y?(b=c,n=c.y,l=e,c=e.y):(b=e,n=e.y,l=c,c=c.y));return k<=n?a<n?[]:a===n?f?[]:[b]:a<=c?[b,h]:[b,l]:k>c?[]:k===c?f?[]:[g]:a<=c?[g,h]:[g,l]}function f(a,b,c,d){var e=b.x-a.x,f=b.y-a.y;b=c.x-a.x;c=c.y-a.y;var g=d.x-a.x;d=d.y-a.y;a=e*c-f*b;e=e*d-f*g;return Math.abs(a)>Number.EPSILON?(b=g*c-d*b,0<a?0<=e&&0<=b:0<=e||0<=b):0<e}c(a);b.forEach(c);var g,h={},k=a.concat();var l=0;for(g=b.length;l<g;l++)Array.prototype.push.apply(k,b[l]);l=0;for(g=k.length;l<
-g;l++){var m=k[l].x+":"+k[l].y;void 0!==h[m]&&console.warn("THREE.ShapeUtils: Duplicate point",m,l);h[m]=l}l=function(a,b){function c(a,b){var c=h.length-1,d=a-1;0>d&&(d=c);var e=a+1;e>c&&(e=0);c=f(h[a],h[d],h[e],B[b]);if(!c)return!1;c=B.length-1;d=b-1;0>d&&(d=c);e=b+1;e>c&&(e=0);return(c=f(B[b],B[d],B[e],h[a]))?!0:!1}function d(a,b){var c;for(c=0;c<h.length;c++){var d=c+1;d%=h.length;d=e(a,b,h[c],h[d],!0);if(0<d.length)return!0}return!1}function g(a,c){var d,f;for(d=0;d<k.length;d++){var g=b[k[d]];
-for(f=0;f<g.length;f++){var h=f+1;h%=g.length;h=e(a,c,g[f],g[h],!0);if(0<h.length)return!0}}return!1}var h=a.concat(),k=[],l,m;a=[];var q,n=0;for(l=b.length;n<l;n++)k.push(n);var p=0;for(var v=2*k.length;0<k.length;){v--;if(0>v){console.log('THREE.ShapeUtils: Infinite Loop! Holes left:" + indepHoles.length + ", Probably Hole outside Shape!');break}for(m=p;m<h.length;m++){var y=h[m];l=-1;for(n=0;n<k.length;n++){var z=k[n];var D=y.x+":"+y.y+":"+z;if(void 0===a[D]){var B=b[z];for(q=0;q<B.length;q++)if(z=
-B[q],c(m,q)&&!d(y,z)&&!g(y,z)){l=q;k.splice(n,1);p=h.slice(0,m+1);z=h.slice(m);q=B.slice(l);var E=B.slice(0,l+1);h=p.concat(q).concat(E).concat(z);p=m;break}if(0<=l)break;a[D]=!0}}if(0<=l)break}}return h}(a,b);k=Ea.triangulate(l,!1);l=0;for(g=k.length;l<g;l++)for(b=k[l],a=0;3>a;a++)m=b[a].x+":"+b[a].y,m=h[m],void 0!==m&&(b[a]=m);return k.concat()},isClockWise:function(a){return 0>Ea.area(a)}};ab.prototype=Object.create(L.prototype);ab.prototype.constructor=ab;Da.prototype=Object.create(E.prototype);
-Da.prototype.constructor=Da;Da.prototype.getArrays=function(){var a=this.getAttribute("position"),a=a?Array.prototype.slice.call(a.array):[],b=this.getAttribute("uv"),b=b?Array.prototype.slice.call(b.array):[],c=this.index,c=c?Array.prototype.slice.call(c.array):[];return{position:a,uv:b,index:c}};Da.prototype.addShapeList=function(a,b){var c=a.length;b.arrays=this.getArrays();for(var d=0;d<c;d++)this.addShape(a[d],b);this.setIndex(b.arrays.index);this.addAttribute("position",new y(b.arrays.position,
-3));this.addAttribute("uv",new y(b.arrays.uv,2))};Da.prototype.addShape=function(a,b){function c(a,b,c){b||console.error("THREE.ExtrudeGeometry: vec does not exist");return b.clone().multiplyScalar(c).add(a)}function d(a,b,c){var d=a.x-b.x;var e=a.y-b.y;var f=c.x-a.x;var g=c.y-a.y,h=d*d+e*e;if(Math.abs(d*g-e*f)>Number.EPSILON){var k=Math.sqrt(h),l=Math.sqrt(f*f+g*g),h=b.x-e/k;b=b.y+d/k;g=((c.x-g/l-h)*g-(c.y+f/l-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 D(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 D(f/e,d/e)}function e(a,b){for(G=a.length;0<=--G;){var c=G;var d=G-1;0>d&&(d=a.length-1);var e,f=z+2*w;for(e=0;e<f;e++){var g=Y*e,l=Y*(e+1),q=b+d+g,n=b+d+l,l=b+c+l;h(b+c+g);h(q);h(l);h(q);h(n);h(l);g=m.length/3;g=E.generateSideWallUV(R,m,g-6,g-3,g-2,g-1);k(g[0]);k(g[1]);k(g[3]);k(g[1]);k(g[2]);k(g[3])}}}
-function f(a,b,c){r.push(a);r.push(b);r.push(c)}function g(a,b,c){h(a);h(b);h(c);a=m.length/3;a=E.generateTopUV(R,m,a-3,a-2,a-1);k(a[0]);k(a[1]);k(a[2])}function h(a){n.push(m.length/3);m.push(r[3*a+0]);m.push(r[3*a+1]);m.push(r[3*a+2])}function k(a){v.push(a.x);v.push(a.y)}var l=b.arrays?b.arrays:this.getArrays(),m=l.position,n=l.index,v=l.uv,r=[],l=void 0!==b.amount?b.amount:100,t=void 0!==b.bevelThickness?b.bevelThickness:6,u=void 0!==b.bevelSize?b.bevelSize:t-2,w=void 0!==b.bevelSegments?b.bevelSegments:
-3,x=void 0!==b.bevelEnabled?b.bevelEnabled:!0,A=void 0!==b.curveSegments?b.curveSegments:12,z=void 0!==b.steps?b.steps:1,C=b.extrudePath,B=!1,E=void 0!==b.UVGenerator?b.UVGenerator:ab.WorldUVGenerator;if(C){var H=C.getSpacedPoints(z);B=!0;x=!1;var K=void 0!==b.frames?b.frames:C.computeFrenetFrames(z,!1);var L=new p;var Q=new p;var P=new p}x||(u=t=w=0);var M,R=this,A=a.extractPoints(A);a=A.shape;var O=A.holes;if(!Ea.isClockWise(a)){a=a.reverse();var N=0;for(M=O.length;N<M;N++){var U=O[N];Ea.isClockWise(U)&&
-(O[N]=U.reverse())}}var S=Ea.triangulateShape(a,O),X=a;N=0;for(M=O.length;N<M;N++)U=O[N],a=a.concat(U);var T,Y=a.length,V,da=S.length,A=[],G=0;var W=X.length;var ba=W-1;for(T=G+1;G<W;G++,ba++,T++)ba===W&&(ba=0),T===W&&(T=0),A[G]=d(X[G],X[ba],X[T]);var C=[],ea=A.concat();N=0;for(M=O.length;N<M;N++){U=O[N];var ca=[];G=0;W=U.length;ba=W-1;for(T=G+1;G<W;G++,ba++,T++)ba===W&&(ba=0),T===W&&(T=0),ca[G]=d(U[G],U[ba],U[T]);C.push(ca);ea=ea.concat(ca)}for(ba=0;ba<w;ba++){W=ba/w;var fa=t*Math.cos(W*Math.PI/
-2);T=u*Math.sin(W*Math.PI/2);G=0;for(W=X.length;G<W;G++){var ga=c(X[G],A[G],T);f(ga.x,ga.y,-fa)}N=0;for(M=O.length;N<M;N++)for(U=O[N],ca=C[N],G=0,W=U.length;G<W;G++)ga=c(U[G],ca[G],T),f(ga.x,ga.y,-fa)}T=u;for(G=0;G<Y;G++)ga=x?c(a[G],ea[G],T):a[G],B?(Q.copy(K.normals[0]).multiplyScalar(ga.x),L.copy(K.binormals[0]).multiplyScalar(ga.y),P.copy(H[0]).add(Q).add(L),f(P.x,P.y,P.z)):f(ga.x,ga.y,0);for(W=1;W<=z;W++)for(G=0;G<Y;G++)ga=x?c(a[G],ea[G],T):a[G],B?(Q.copy(K.normals[W]).multiplyScalar(ga.x),L.copy(K.binormals[W]).multiplyScalar(ga.y),
-P.copy(H[W]).add(Q).add(L),f(P.x,P.y,P.z)):f(ga.x,ga.y,l/z*W);for(ba=w-1;0<=ba;ba--){W=ba/w;fa=t*Math.cos(W*Math.PI/2);T=u*Math.sin(W*Math.PI/2);G=0;for(W=X.length;G<W;G++)ga=c(X[G],A[G],T),f(ga.x,ga.y,l+fa);N=0;for(M=O.length;N<M;N++)for(U=O[N],ca=C[N],G=0,W=U.length;G<W;G++)ga=c(U[G],ca[G],T),B?f(ga.x,ga.y+H[z-1].y,H[z-1].x+fa):f(ga.x,ga.y,l+fa)}(function(){var a=m.length/3;if(x){var c=0*Y;for(G=0;G<da;G++)V=S[G],g(V[2]+c,V[1]+c,V[0]+c);c=Y*(z+2*w);for(G=0;G<da;G++)V=S[G],g(V[0]+c,V[1]+c,V[2]+c)}else{for(G=
-0;G<da;G++)V=S[G],g(V[2],V[1],V[0]);for(G=0;G<da;G++)V=S[G],g(V[0]+Y*z,V[1]+Y*z,V[2]+Y*z)}R.addGroup(a,m.length/3-a,void 0!==b.material?b.material:0)})();(function(){var a=m.length/3,c=0;e(X,c);c+=X.length;N=0;for(M=O.length;N<M;N++)U=O[N],e(U,c),c+=U.length;R.addGroup(a,m.length/3-a,void 0!==b.extrudeMaterial?b.extrudeMaterial:1)})();b.arrays||(this.setIndex(n),this.addAttribute("position",new y(m,3)),this.addAttribute("uv",new y(b.arrays.uv,2)))};ab.WorldUVGenerator={generateTopUV:function(a,b,
-c,d,e){a=b[3*d];d=b[3*d+1];var f=b[3*e];e=b[3*e+1];return[new D(b[3*c],b[3*c+1]),new D(a,d),new D(f,e)]},generateSideWallUV:function(a,b,c,d,e,f){a=b[3*c];var g=b[3*c+1];c=b[3*c+2];var h=b[3*d],k=b[3*d+1];d=b[3*d+2];var l=b[3*e],m=b[3*e+1];e=b[3*e+2];var n=b[3*f],p=b[3*f+1];b=b[3*f+2];return.01>Math.abs(g-k)?[new D(a,1-c),new D(h,1-d),new D(l,1-e),new D(n,1-b)]:[new D(g,1-c),new D(k,1-d),new D(m,1-e),new D(p,1-b)]}};Mc.prototype=Object.create(L.prototype);Mc.prototype.constructor=Mc;Ub.prototype=
-Object.create(Da.prototype);Ub.prototype.constructor=Ub;Nc.prototype=Object.create(L.prototype);Nc.prototype.constructor=Nc;lb.prototype=Object.create(E.prototype);lb.prototype.constructor=lb;Oc.prototype=Object.create(L.prototype);Oc.prototype.constructor=Oc;Vb.prototype=Object.create(E.prototype);Vb.prototype.constructor=Vb;Pc.prototype=Object.create(L.prototype);Pc.prototype.constructor=Pc;Wb.prototype=Object.create(E.prototype);Wb.prototype.constructor=Wb;Xb.prototype=Object.create(L.prototype);
-Xb.prototype.constructor=Xb;Yb.prototype=Object.create(E.prototype);Yb.prototype.constructor=Yb;Zb.prototype=Object.create(E.prototype);Zb.prototype.constructor=Zb;mb.prototype=Object.create(L.prototype);mb.prototype.constructor=mb;Ta.prototype=Object.create(E.prototype);Ta.prototype.constructor=Ta;Qc.prototype=Object.create(mb.prototype);Qc.prototype.constructor=Qc;Rc.prototype=Object.create(Ta.prototype);Rc.prototype.constructor=Rc;Sc.prototype=Object.create(L.prototype);Sc.prototype.constructor=
-Sc;$b.prototype=Object.create(E.prototype);$b.prototype.constructor=$b;var Ka=Object.freeze({WireframeGeometry:Mb,ParametricGeometry:Dc,ParametricBufferGeometry:Nb,TetrahedronGeometry:Fc,TetrahedronBufferGeometry:Ob,OctahedronGeometry:Gc,OctahedronBufferGeometry:kb,IcosahedronGeometry:Hc,IcosahedronBufferGeometry:Pb,DodecahedronGeometry:Ic,DodecahedronBufferGeometry:Qb,PolyhedronGeometry:Ec,PolyhedronBufferGeometry:na,TubeGeometry:Jc,TubeBufferGeometry:Rb,TorusKnotGeometry:Kc,TorusKnotBufferGeometry:Sb,
-TorusGeometry:Lc,TorusBufferGeometry:Tb,TextGeometry:Mc,TextBufferGeometry:Ub,SphereGeometry:Nc,SphereBufferGeometry:lb,RingGeometry:Oc,RingBufferGeometry:Vb,PlaneGeometry:wc,PlaneBufferGeometry:hb,LatheGeometry:Pc,LatheBufferGeometry:Wb,ShapeGeometry:Xb,ShapeBufferGeometry:Yb,ExtrudeGeometry:ab,ExtrudeBufferGeometry:Da,EdgesGeometry:Zb,ConeGeometry:Qc,ConeBufferGeometry:Rc,CylinderGeometry:mb,CylinderBufferGeometry:Ta,CircleGeometry:Sc,CircleBufferGeometry:$b,BoxGeometry:Fb,BoxBufferGeometry:gb});
-ac.prototype=Object.create(P.prototype);ac.prototype.constructor=ac;ac.prototype.isShadowMaterial=!0;bc.prototype=Object.create(za.prototype);bc.prototype.constructor=bc;bc.prototype.isRawShaderMaterial=!0;Na.prototype=Object.create(P.prototype);Na.prototype.constructor=Na;Na.prototype.isMeshStandardMaterial=!0;Na.prototype.copy=function(a){P.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.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.roughnessMap=a.roughnessMap;this.metalnessMap=
-a.metalnessMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.envMapIntensity=a.envMapIntensity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};nb.prototype=Object.create(Na.prototype);nb.prototype.constructor=nb;nb.prototype.isMeshPhysicalMaterial=
+d,e,f){this.aspect=a/b;null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1});this.view.enabled=!0;this.view.fullWidth=a;this.view.fullHeight=b;this.view.offsetX=c;this.view.offsetY=d;this.view.width=e;this.view.height=f;this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1);this.updateProjectionMatrix()},updateProjectionMatrix:function(){var a=this.near,b=a*Math.tan(.5*R.DEG2RAD*this.fov)/this.zoom,c=2*
+b,d=this.aspect*c,e=-.5*d,f=this.view;if(null!==this.view&&this.view.enabled)var g=f.fullWidth,h=f.fullHeight,e=e+f.offsetX*d/g,b=b-f.offsetY*c/h,d=f.width/g*d,c=f.height/h*c;f=this.filmOffset;0!==f&&(e+=a*f/this.getFilmWidth());this.projectionMatrix.makePerspective(e,e+d,b,b-c,a,this.far)},toJSON:function(a){a=z.prototype.toJSON.call(this,a);a.object.fov=this.fov;a.object.zoom=this.zoom;a.object.near=this.near;a.object.far=this.far;a.object.focus=this.focus;a.object.aspect=this.aspect;null!==this.view&&
+(a.object.view=Object.assign({},this.view));a.object.filmGauge=this.filmGauge;a.object.filmOffset=this.filmOffset;return a}});md.prototype=Object.assign(Object.create(ha.prototype),{constructor:md,isArrayCamera:!0});Ib.prototype.isFogExp2=!0;Ib.prototype.clone=function(){return new Ib(this.color.getHex(),this.density)};Ib.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}};Jb.prototype.isFog=!0;Jb.prototype.clone=function(){return new Jb(this.color.getHex(),
+this.near,this.far)};Jb.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}};nd.prototype=Object.assign(Object.create(z.prototype),{constructor:nd,copy:function(a,b){z.prototype.copy.call(this,a,b);null!==a.background&&(this.background=a.background.clone());null!==a.fog&&(this.fog=a.fog.clone());null!==a.overrideMaterial&&(this.overrideMaterial=a.overrideMaterial.clone());this.autoUpdate=a.autoUpdate;this.matrixAutoUpdate=a.matrixAutoUpdate;return this},
+toJSON:function(a){var b=z.prototype.toJSON.call(this,a);null!==this.background&&(b.object.background=this.background.toJSON(a));null!==this.fog&&(b.object.fog=this.fog.toJSON());return b}});Zd.prototype=Object.assign(Object.create(z.prototype),{constructor:Zd,isLensFlare:!0,copy:function(a){z.prototype.copy.call(this,a);this.positionScreen.copy(a.positionScreen);this.customUpdateCallback=a.customUpdateCallback;for(var b=0,c=a.lensFlares.length;b<c;b++)this.lensFlares.push(a.lensFlares[b]);return this},
+add:function(a,b,c,d,e,f){void 0===b&&(b=-1);void 0===c&&(c=0);void 0===f&&(f=1);void 0===e&&(e=new H(16777215));void 0===d&&(d=1);c=Math.min(c,Math.max(0,c));this.lensFlares.push({texture:a,size:b,distance:c,x:0,y:0,z:0,scale:1,rotation:0,opacity:f,color:e,blending:d})},updateLensFlares:function(){var a,b=this.lensFlares.length,c=2*-this.positionScreen.x,d=2*-this.positionScreen.y;for(a=0;a<b;a++){var e=this.lensFlares[a];e.x=this.positionScreen.x+c*e.distance;e.y=this.positionScreen.y+d*e.distance;
+e.wantedRotation=e.x*Math.PI*.25;e.rotation+=.25*(e.wantedRotation-e.rotation)}}});$a.prototype=Object.create(P.prototype);$a.prototype.constructor=$a;$a.prototype.isSpriteMaterial=!0;$a.prototype.copy=function(a){P.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.rotation=a.rotation;return this};yc.prototype=Object.assign(Object.create(z.prototype),{constructor:yc,isSprite:!0,raycast:function(){var a=new p,b=new p,c=new p;return function(d,e){b.setFromMatrixPosition(this.matrixWorld);
+d.ray.closestPointToPoint(b,a);c.setFromMatrixScale(this.matrixWorld);var f=c.x*c.y/4;b.distanceToSquared(a)>f||(f=d.ray.origin.distanceTo(a),f<d.near||f>d.far||e.push({distance:f,point:a.clone(),face:null,object:this}))}}(),clone:function(){return(new this.constructor(this.material)).copy(this)}});zc.prototype=Object.assign(Object.create(z.prototype),{constructor:zc,copy:function(a){z.prototype.copy.call(this,a,!1);a=a.levels;for(var b=0,c=a.length;b<c;b++){var d=a[b];this.addLevel(d.object.clone(),
+d.distance)}return this},addLevel:function(a,b){void 0===b&&(b=0);b=Math.abs(b);for(var c=this.levels,d=0;d<c.length&&!(b<c[d].distance);d++);c.splice(d,0,{distance:b,object:a});this.add(a)},getObjectForDistance:function(a){for(var b=this.levels,c=1,d=b.length;c<d&&!(a<b[c].distance);c++);return b[c-1].object},raycast:function(){var a=new p;return function(b,c){a.setFromMatrixPosition(this.matrixWorld);var d=b.ray.origin.distanceTo(a);this.getObjectForDistance(d).raycast(b,c)}}(),update:function(){var a=
+new p,b=new p;return function(c){var d=this.levels;if(1<d.length){a.setFromMatrixPosition(c.matrixWorld);b.setFromMatrixPosition(this.matrixWorld);c=a.distanceTo(b);d[0].object.visible=!0;for(var e=1,f=d.length;e<f;e++)if(c>=d[e].distance)d[e-1].object.visible=!1,d[e].object.visible=!0;else break;for(;e<f;e++)d[e].object.visible=!1}}}(),toJSON:function(a){a=z.prototype.toJSON.call(this,a);a.object.levels=[];for(var b=this.levels,c=0,d=b.length;c<d;c++){var e=b[c];a.object.levels.push({object:e.object.uuid,
+distance:e.distance})}return a}});Object.assign(Ac.prototype,{calculateInverses:function(){this.boneInverses=[];for(var a=0,b=this.bones.length;a<b;a++){var c=new K;this.bones[a]&&c.getInverse(this.bones[a].matrixWorld);this.boneInverses.push(c)}},pose:function(){var a,b;var c=0;for(b=this.bones.length;c<b;c++)(a=this.bones[c])&&a.matrixWorld.getInverse(this.boneInverses[c]);c=0;for(b=this.bones.length;c<b;c++)if(a=this.bones[c])a.parent&&a.parent.isBone?(a.matrix.getInverse(a.parent.matrixWorld),
+a.matrix.multiply(a.matrixWorld)):a.matrix.copy(a.matrixWorld),a.matrix.decompose(a.position,a.quaternion,a.scale)},update:function(){var a=new K,b=new K;return function(){for(var c=this.bones,d=this.boneInverses,e=this.boneMatrices,f=this.boneTexture,g=0,h=c.length;g<h;g++)a.multiplyMatrices(c[g]?c[g].matrixWorld:b,d[g]),a.toArray(e,16*g);void 0!==f&&(f.needsUpdate=!0)}}(),clone:function(){return new Ac(this.bones,this.boneInverses)}});od.prototype=Object.assign(Object.create(z.prototype),{constructor:od,
+isBone:!0});pd.prototype=Object.assign(Object.create(ca.prototype),{constructor:pd,isSkinnedMesh:!0,initBones:function(){var a=[],b;if(this.geometry&&void 0!==this.geometry.bones){var c=0;for(b=this.geometry.bones.length;c<b;c++){var d=this.geometry.bones[c];var e=new od;a.push(e);e.name=d.name;e.position.fromArray(d.pos);e.quaternion.fromArray(d.rotq);void 0!==d.scl&&e.scale.fromArray(d.scl)}c=0;for(b=this.geometry.bones.length;c<b;c++)d=this.geometry.bones[c],-1!==d.parent&&null!==d.parent&&void 0!==
+a[d.parent]?a[d.parent].add(a[c]):this.add(a[c])}this.updateMatrixWorld(!0);return a},bind:function(a,b){this.skeleton=a;void 0===b&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),b=this.matrixWorld);this.bindMatrix.copy(b);this.bindMatrixInverse.getInverse(b)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var a;if(this.geometry&&this.geometry.isGeometry)for(a=0;a<this.geometry.skinWeights.length;a++){var b=this.geometry.skinWeights[a];var c=1/b.lengthManhattan();
+Infinity!==c?b.multiplyScalar(c):b.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var b=new da,d=this.geometry.attributes.skinWeight;for(a=0;a<d.count;a++)b.x=d.getX(a),b.y=d.getY(a),b.z=d.getZ(a),b.w=d.getW(a),c=1/b.lengthManhattan(),Infinity!==c?b.multiplyScalar(c):b.set(1,0,0,0),d.setXYZW(a,b.x,b.y,b.z,b.w)}},updateMatrixWorld:function(a){ca.prototype.updateMatrixWorld.call(this,a);"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===
+this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});X.prototype=Object.create(P.prototype);X.prototype.constructor=X;X.prototype.isLineBasicMaterial=!0;X.prototype.copy=function(a){P.prototype.copy.call(this,a);this.color.copy(a.color);this.linewidth=a.linewidth;this.linecap=a.linecap;this.linejoin=a.linejoin;return this};ua.prototype=
+Object.assign(Object.create(z.prototype),{constructor:ua,isLine:!0,raycast:function(){var a=new K,b=new ib,c=new ra;return function(d,e){var f=d.linePrecision,f=f*f,g=this.geometry,h=this.matrixWorld;null===g.boundingSphere&&g.computeBoundingSphere();c.copy(g.boundingSphere);c.applyMatrix4(h);if(!1!==d.ray.intersectsSphere(c)){a.getInverse(h);b.copy(d.ray).applyMatrix4(a);var k=new p,l=new p,h=new p,q=new p,n=this&&this.isLineSegments?2:1;if(g.isBufferGeometry){var m=g.index;var r=g.attributes.position.array;
+if(null!==m)for(var t=m.array,g=0,u=t.length-1;g<u;g+=n)m=t[g+1],k.fromArray(r,3*t[g]),l.fromArray(r,3*m),m=b.distanceSqToSegment(k,l,q,h),m>f||(q.applyMatrix4(this.matrixWorld),m=d.ray.origin.distanceTo(q),m<d.near||m>d.far||e.push({distance:m,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}));else for(g=0,u=r.length/3-1;g<u;g+=n)k.fromArray(r,3*g),l.fromArray(r,3*g+3),m=b.distanceSqToSegment(k,l,q,h),m>f||(q.applyMatrix4(this.matrixWorld),m=d.ray.origin.distanceTo(q),
+m<d.near||m>d.far||e.push({distance:m,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else if(g.isGeometry)for(k=g.vertices,l=k.length,g=0;g<l-1;g+=n)m=b.distanceSqToSegment(k[g],k[g+1],q,h),m>f||(q.applyMatrix4(this.matrixWorld),m=d.ray.origin.distanceTo(q),m<d.near||m>d.far||e.push({distance:m,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}}(),clone:function(){return(new this.constructor(this.geometry,
+this.material)).copy(this)}});T.prototype=Object.assign(Object.create(ua.prototype),{constructor:T,isLineSegments:!0});qd.prototype=Object.assign(Object.create(ua.prototype),{constructor:qd,isLineLoop:!0});ma.prototype=Object.create(P.prototype);ma.prototype.constructor=ma;ma.prototype.isPointsMaterial=!0;ma.prototype.copy=function(a){P.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.size=a.size;this.sizeAttenuation=a.sizeAttenuation;return this};Kb.prototype=Object.assign(Object.create(z.prototype),
+{constructor:Kb,isPoints:!0,raycast:function(){var a=new K,b=new ib,c=new ra;return function(d,e){function f(a,c){var f=b.distanceSqToPoint(a);if(f<m){a=b.closestPointToPoint(a);a.applyMatrix4(k);var h=d.ray.origin.distanceTo(a);h<d.near||h>d.far||e.push({distance:h,distanceToRay:Math.sqrt(f),point:a.clone(),index:c,face:null,object:g})}}var g=this,h=this.geometry,k=this.matrixWorld,l=d.params.Points.threshold;null===h.boundingSphere&&h.computeBoundingSphere();c.copy(h.boundingSphere);c.applyMatrix4(k);
+c.radius+=l;if(!1!==d.ray.intersectsSphere(c)){a.getInverse(k);b.copy(d.ray).applyMatrix4(a);var l=l/((this.scale.x+this.scale.y+this.scale.z)/3),m=l*l,l=new p;if(h.isBufferGeometry){var n=h.index,h=h.attributes.position.array;if(null!==n)for(var v=n.array,n=0,r=v.length;n<r;n++){var t=v[n];l.fromArray(h,3*t);f(l,t)}else for(n=0,v=h.length/3;n<v;n++)l.fromArray(h,3*n),f(l,n)}else for(l=h.vertices,n=0,v=l.length;n<v;n++)f(l[n],n)}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});
+Bc.prototype=Object.assign(Object.create(z.prototype),{constructor:Bc});rd.prototype=Object.create(O.prototype);rd.prototype.constructor=rd;Lb.prototype=Object.create(O.prototype);Lb.prototype.constructor=Lb;Lb.prototype.isCompressedTexture=!0;Cc.prototype=Object.create(O.prototype);Cc.prototype.constructor=Cc;Cc.prototype.isDepthTexture=!0;Mb.prototype=Object.create(E.prototype);Mb.prototype.constructor=Mb;Dc.prototype=Object.create(L.prototype);Dc.prototype.constructor=Dc;Nb.prototype=Object.create(E.prototype);
+Nb.prototype.constructor=Nb;Ec.prototype=Object.create(L.prototype);Ec.prototype.constructor=Ec;na.prototype=Object.create(E.prototype);na.prototype.constructor=na;Fc.prototype=Object.create(L.prototype);Fc.prototype.constructor=Fc;Ob.prototype=Object.create(na.prototype);Ob.prototype.constructor=Ob;Gc.prototype=Object.create(L.prototype);Gc.prototype.constructor=Gc;kb.prototype=Object.create(na.prototype);kb.prototype.constructor=kb;Hc.prototype=Object.create(L.prototype);Hc.prototype.constructor=
+Hc;Pb.prototype=Object.create(na.prototype);Pb.prototype.constructor=Pb;Ic.prototype=Object.create(L.prototype);Ic.prototype.constructor=Ic;Qb.prototype=Object.create(na.prototype);Qb.prototype.constructor=Qb;Jc.prototype=Object.create(L.prototype);Jc.prototype.constructor=Jc;Rb.prototype=Object.create(E.prototype);Rb.prototype.constructor=Rb;Kc.prototype=Object.create(L.prototype);Kc.prototype.constructor=Kc;Sb.prototype=Object.create(E.prototype);Sb.prototype.constructor=Sb;Lc.prototype=Object.create(L.prototype);
+Lc.prototype.constructor=Lc;Tb.prototype=Object.create(E.prototype);Tb.prototype.constructor=Tb;var Ea={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},triangulate:function(){return function(a,b){var c=a.length;if(3>c)return null;var d=[],e=[],f=[],g;if(0<Ea.area(a))for(g=0;g<c;g++)e[g]=g;else for(g=0;g<c;g++)e[g]=c-1-g;var h=2*c;for(g=c-1;2<c;){if(0>=h--){console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()");break}var k=
+g;c<=k&&(k=0);g=k+1;c<=g&&(g=0);var l=g+1;c<=l&&(l=0);a:{var m;var n=a[e[k]].x;var p=a[e[k]].y;var r=a[e[g]].x;var t=a[e[g]].y;var u=a[e[l]].x;var w=a[e[l]].y;if(0>=(r-n)*(w-p)-(t-p)*(u-n))var x=!1;else{var A=u-r;var y=w-t;var C=n-u;var z=p-w;var D=r-n;x=t-p;for(m=0;m<c;m++){var B=a[e[m]].x;var E=a[e[m]].y;if(!(B===n&&E===p||B===r&&E===t||B===u&&E===w)){var H=B-n;var K=E-p;var L=B-r;var M=E-t;B-=u;E-=w;M=A*M-y*L;K=D*K-x*H;B=C*E-z*B;if(M>=-Number.EPSILON&&B>=-Number.EPSILON&&K>=-Number.EPSILON){x=
+!1;break a}}}x=!0}}if(x){d.push([a[e[k]],a[e[g]],a[e[l]]]);f.push([e[k],e[g],e[l]]);k=g;for(l=g+1;l<c;k++,l++)e[k]=e[l];c--;h=2*c}}return b?f:d}}(),triangulateShape:function(a,b){function c(a){var b=a.length;2<b&&a[b-1].equals(a[0])&&a.pop()}function d(a,b,c){return a.x!==b.x?a.x<b.x?a.x<=c.x&&c.x<=b.x:b.x<=c.x&&c.x<=a.x:a.y<b.y?a.y<=c.y&&c.y<=b.y:b.y<=c.y&&c.y<=a.y}function e(a,b,c,e,f){var g=b.x-a.x,h=b.y-a.y,k=e.x-c.x,l=e.y-c.y,m=a.x-c.x,q=a.y-c.y,n=h*k-g*l,p=h*m-g*q;if(Math.abs(n)>Number.EPSILON){if(0<
+n){if(0>p||p>n)return[];k=l*m-k*q;if(0>k||k>n)return[]}else{if(0<p||p<n)return[];k=l*m-k*q;if(0<k||k<n)return[]}if(0===k)return!f||0!==p&&p!==n?[a]:[];if(k===n)return!f||0!==p&&p!==n?[b]:[];if(0===p)return[c];if(p===n)return[e];f=k/n;return[{x:a.x+f*g,y:a.y+f*h}]}if(0!==p||l*m!==k*q)return[];h=0===g&&0===h;k=0===k&&0===l;if(h&&k)return a.x!==c.x||a.y!==c.y?[]:[a];if(h)return d(c,e,a)?[a]:[];if(k)return d(a,b,c)?[c]:[];0!==g?(a.x<b.x?(g=a,k=a.x,h=b,a=b.x):(g=b,k=b.x,h=a,a=a.x),c.x<e.x?(b=c,n=c.x,l=
+e,c=e.x):(b=e,n=e.x,l=c,c=c.x)):(a.y<b.y?(g=a,k=a.y,h=b,a=b.y):(g=b,k=b.y,h=a,a=a.y),c.y<e.y?(b=c,n=c.y,l=e,c=e.y):(b=e,n=e.y,l=c,c=c.y));return k<=n?a<n?[]:a===n?f?[]:[b]:a<=c?[b,h]:[b,l]:k>c?[]:k===c?f?[]:[g]:a<=c?[g,h]:[g,l]}function f(a,b,c,d){var e=b.x-a.x,f=b.y-a.y;b=c.x-a.x;c=c.y-a.y;var g=d.x-a.x;d=d.y-a.y;a=e*c-f*b;e=e*d-f*g;return Math.abs(a)>Number.EPSILON?(b=g*c-d*b,0<a?0<=e&&0<=b:0<=e||0<=b):0<e}c(a);b.forEach(c);var g,h={},k=a.concat();var l=0;for(g=b.length;l<g;l++)Array.prototype.push.apply(k,
+b[l]);l=0;for(g=k.length;l<g;l++){var m=k[l].x+":"+k[l].y;void 0!==h[m]&&console.warn("THREE.ShapeUtils: Duplicate point",m,l);h[m]=l}l=function(a,b){function c(a,b){var c=h.length-1,d=a-1;0>d&&(d=c);var e=a+1;e>c&&(e=0);c=f(h[a],h[d],h[e],B[b]);if(!c)return!1;c=B.length-1;d=b-1;0>d&&(d=c);e=b+1;e>c&&(e=0);return(c=f(B[b],B[d],B[e],h[a]))?!0:!1}function d(a,b){var c;for(c=0;c<h.length;c++){var d=c+1;d%=h.length;d=e(a,b,h[c],h[d],!0);if(0<d.length)return!0}return!1}function g(a,c){var d,f;for(d=0;d<
+k.length;d++){var g=b[k[d]];for(f=0;f<g.length;f++){var h=f+1;h%=g.length;h=e(a,c,g[f],g[h],!0);if(0<h.length)return!0}}return!1}var h=a.concat(),k=[],l,m;a=[];var q,n=0;for(l=b.length;n<l;n++)k.push(n);var p=0;for(var v=2*k.length;0<k.length;){v--;if(0>v){console.log('THREE.ShapeUtils: Infinite Loop! Holes left:" + indepHoles.length + ", Probably Hole outside Shape!');break}for(m=p;m<h.length;m++){var y=h[m];l=-1;for(n=0;n<k.length;n++){var z=k[n];var D=y.x+":"+y.y+":"+z;if(void 0===a[D]){var B=
+b[z];for(q=0;q<B.length;q++)if(z=B[q],c(m,q)&&!d(y,z)&&!g(y,z)){l=q;k.splice(n,1);p=h.slice(0,m+1);z=h.slice(m);q=B.slice(l);var E=B.slice(0,l+1);h=p.concat(q).concat(E).concat(z);p=m;break}if(0<=l)break;a[D]=!0}}if(0<=l)break}}return h}(a,b);k=Ea.triangulate(l,!1);l=0;for(g=k.length;l<g;l++)for(b=k[l],a=0;3>a;a++)m=b[a].x+":"+b[a].y,m=h[m],void 0!==m&&(b[a]=m);return k.concat()},isClockWise:function(a){return 0>Ea.area(a)}};ab.prototype=Object.create(L.prototype);ab.prototype.constructor=ab;Da.prototype=
+Object.create(E.prototype);Da.prototype.constructor=Da;Da.prototype.getArrays=function(){var a=this.getAttribute("position"),a=a?Array.prototype.slice.call(a.array):[],b=this.getAttribute("uv"),b=b?Array.prototype.slice.call(b.array):[],c=this.index,c=c?Array.prototype.slice.call(c.array):[];return{position:a,uv:b,index:c}};Da.prototype.addShapeList=function(a,b){var c=a.length;b.arrays=this.getArrays();for(var d=0;d<c;d++)this.addShape(a[d],b);this.setIndex(b.arrays.index);this.addAttribute("position",
+new y(b.arrays.position,3));this.addAttribute("uv",new y(b.arrays.uv,2))};Da.prototype.addShape=function(a,b){function c(a,b,c){b||console.error("THREE.ExtrudeGeometry: vec does not exist");return b.clone().multiplyScalar(c).add(a)}function d(a,b,c){var d=a.x-b.x;var e=a.y-b.y;var f=c.x-a.x;var g=c.y-a.y,h=d*d+e*e;if(Math.abs(d*g-e*f)>Number.EPSILON){var k=Math.sqrt(h),l=Math.sqrt(f*f+g*g),h=b.x-e/k;b=b.y+d/k;g=((c.x-g/l-h)*g-(c.y+f/l-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 D(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 D(f/e,d/e)}function e(a,b){for(G=a.length;0<=--G;){var c=G;var d=G-1;0>d&&(d=a.length-1);var e,f=z+2*w;for(e=0;e<f;e++){var g=Y*e,l=Y*(e+1),q=b+d+g,n=b+d+l,l=b+c+l;h(b+c+g);h(q);h(l);h(q);h(n);h(l);g=m.length/3;g=E.generateSideWallUV(R,m,g-6,g-3,g-2,g-1);k(g[0]);k(g[1]);k(g[3]);k(g[1]);
+k(g[2]);k(g[3])}}}function f(a,b,c){r.push(a);r.push(b);r.push(c)}function g(a,b,c){h(a);h(b);h(c);a=m.length/3;a=E.generateTopUV(R,m,a-3,a-2,a-1);k(a[0]);k(a[1]);k(a[2])}function h(a){n.push(m.length/3);m.push(r[3*a+0]);m.push(r[3*a+1]);m.push(r[3*a+2])}function k(a){v.push(a.x);v.push(a.y)}var l=b.arrays?b.arrays:this.getArrays(),m=l.position,n=l.index,v=l.uv,r=[],l=void 0!==b.amount?b.amount:100,t=void 0!==b.bevelThickness?b.bevelThickness:6,u=void 0!==b.bevelSize?b.bevelSize:t-2,w=void 0!==b.bevelSegments?
+b.bevelSegments:3,x=void 0!==b.bevelEnabled?b.bevelEnabled:!0,A=void 0!==b.curveSegments?b.curveSegments:12,z=void 0!==b.steps?b.steps:1,C=b.extrudePath,B=!1,E=void 0!==b.UVGenerator?b.UVGenerator:ab.WorldUVGenerator;if(C){var H=C.getSpacedPoints(z);B=!0;x=!1;var K=void 0!==b.frames?b.frames:C.computeFrenetFrames(z,!1);var L=new p;var Q=new p;var P=new p}x||(u=t=w=0);var M,R=this,A=a.extractPoints(A);a=A.shape;var O=A.holes;if(!Ea.isClockWise(a)){a=a.reverse();var N=0;for(M=O.length;N<M;N++){var U=
+O[N];Ea.isClockWise(U)&&(O[N]=U.reverse())}}var S=Ea.triangulateShape(a,O),X=a;N=0;for(M=O.length;N<M;N++)U=O[N],a=a.concat(U);var T,Y=a.length,V,da=S.length,A=[],G=0;var W=X.length;var ba=W-1;for(T=G+1;G<W;G++,ba++,T++)ba===W&&(ba=0),T===W&&(T=0),A[G]=d(X[G],X[ba],X[T]);var C=[],ea=A.concat();N=0;for(M=O.length;N<M;N++){U=O[N];var ca=[];G=0;W=U.length;ba=W-1;for(T=G+1;G<W;G++,ba++,T++)ba===W&&(ba=0),T===W&&(T=0),ca[G]=d(U[G],U[ba],U[T]);C.push(ca);ea=ea.concat(ca)}for(ba=0;ba<w;ba++){W=ba/w;var fa=
+t*Math.cos(W*Math.PI/2);T=u*Math.sin(W*Math.PI/2);G=0;for(W=X.length;G<W;G++){var ga=c(X[G],A[G],T);f(ga.x,ga.y,-fa)}N=0;for(M=O.length;N<M;N++)for(U=O[N],ca=C[N],G=0,W=U.length;G<W;G++)ga=c(U[G],ca[G],T),f(ga.x,ga.y,-fa)}T=u;for(G=0;G<Y;G++)ga=x?c(a[G],ea[G],T):a[G],B?(Q.copy(K.normals[0]).multiplyScalar(ga.x),L.copy(K.binormals[0]).multiplyScalar(ga.y),P.copy(H[0]).add(Q).add(L),f(P.x,P.y,P.z)):f(ga.x,ga.y,0);for(W=1;W<=z;W++)for(G=0;G<Y;G++)ga=x?c(a[G],ea[G],T):a[G],B?(Q.copy(K.normals[W]).multiplyScalar(ga.x),
+L.copy(K.binormals[W]).multiplyScalar(ga.y),P.copy(H[W]).add(Q).add(L),f(P.x,P.y,P.z)):f(ga.x,ga.y,l/z*W);for(ba=w-1;0<=ba;ba--){W=ba/w;fa=t*Math.cos(W*Math.PI/2);T=u*Math.sin(W*Math.PI/2);G=0;for(W=X.length;G<W;G++)ga=c(X[G],A[G],T),f(ga.x,ga.y,l+fa);N=0;for(M=O.length;N<M;N++)for(U=O[N],ca=C[N],G=0,W=U.length;G<W;G++)ga=c(U[G],ca[G],T),B?f(ga.x,ga.y+H[z-1].y,H[z-1].x+fa):f(ga.x,ga.y,l+fa)}(function(){var a=m.length/3;if(x){var c=0*Y;for(G=0;G<da;G++)V=S[G],g(V[2]+c,V[1]+c,V[0]+c);c=Y*(z+2*w);for(G=
+0;G<da;G++)V=S[G],g(V[0]+c,V[1]+c,V[2]+c)}else{for(G=0;G<da;G++)V=S[G],g(V[2],V[1],V[0]);for(G=0;G<da;G++)V=S[G],g(V[0]+Y*z,V[1]+Y*z,V[2]+Y*z)}R.addGroup(a,m.length/3-a,void 0!==b.material?b.material:0)})();(function(){var a=m.length/3,c=0;e(X,c);c+=X.length;N=0;for(M=O.length;N<M;N++)U=O[N],e(U,c),c+=U.length;R.addGroup(a,m.length/3-a,void 0!==b.extrudeMaterial?b.extrudeMaterial:1)})();b.arrays||(this.setIndex(n),this.addAttribute("position",new y(m,3)),this.addAttribute("uv",new y(b.arrays.uv,2)))};
+ab.WorldUVGenerator={generateTopUV:function(a,b,c,d,e){a=b[3*d];d=b[3*d+1];var f=b[3*e];e=b[3*e+1];return[new D(b[3*c],b[3*c+1]),new D(a,d),new D(f,e)]},generateSideWallUV:function(a,b,c,d,e,f){a=b[3*c];var g=b[3*c+1];c=b[3*c+2];var h=b[3*d],k=b[3*d+1];d=b[3*d+2];var l=b[3*e],m=b[3*e+1];e=b[3*e+2];var n=b[3*f],p=b[3*f+1];b=b[3*f+2];return.01>Math.abs(g-k)?[new D(a,1-c),new D(h,1-d),new D(l,1-e),new D(n,1-b)]:[new D(g,1-c),new D(k,1-d),new D(m,1-e),new D(p,1-b)]}};Mc.prototype=Object.create(L.prototype);
+Mc.prototype.constructor=Mc;Ub.prototype=Object.create(Da.prototype);Ub.prototype.constructor=Ub;Nc.prototype=Object.create(L.prototype);Nc.prototype.constructor=Nc;lb.prototype=Object.create(E.prototype);lb.prototype.constructor=lb;Oc.prototype=Object.create(L.prototype);Oc.prototype.constructor=Oc;Vb.prototype=Object.create(E.prototype);Vb.prototype.constructor=Vb;Pc.prototype=Object.create(L.prototype);Pc.prototype.constructor=Pc;Wb.prototype=Object.create(E.prototype);Wb.prototype.constructor=
+Wb;Xb.prototype=Object.create(L.prototype);Xb.prototype.constructor=Xb;Yb.prototype=Object.create(E.prototype);Yb.prototype.constructor=Yb;Zb.prototype=Object.create(E.prototype);Zb.prototype.constructor=Zb;mb.prototype=Object.create(L.prototype);mb.prototype.constructor=mb;Ta.prototype=Object.create(E.prototype);Ta.prototype.constructor=Ta;Qc.prototype=Object.create(mb.prototype);Qc.prototype.constructor=Qc;Rc.prototype=Object.create(Ta.prototype);Rc.prototype.constructor=Rc;Sc.prototype=Object.create(L.prototype);
+Sc.prototype.constructor=Sc;$b.prototype=Object.create(E.prototype);$b.prototype.constructor=$b;var Ka=Object.freeze({WireframeGeometry:Mb,ParametricGeometry:Dc,ParametricBufferGeometry:Nb,TetrahedronGeometry:Fc,TetrahedronBufferGeometry:Ob,OctahedronGeometry:Gc,OctahedronBufferGeometry:kb,IcosahedronGeometry:Hc,IcosahedronBufferGeometry:Pb,DodecahedronGeometry:Ic,DodecahedronBufferGeometry:Qb,PolyhedronGeometry:Ec,PolyhedronBufferGeometry:na,TubeGeometry:Jc,TubeBufferGeometry:Rb,TorusKnotGeometry:Kc,
+TorusKnotBufferGeometry:Sb,TorusGeometry:Lc,TorusBufferGeometry:Tb,TextGeometry:Mc,TextBufferGeometry:Ub,SphereGeometry:Nc,SphereBufferGeometry:lb,RingGeometry:Oc,RingBufferGeometry:Vb,PlaneGeometry:wc,PlaneBufferGeometry:hb,LatheGeometry:Pc,LatheBufferGeometry:Wb,ShapeGeometry:Xb,ShapeBufferGeometry:Yb,ExtrudeGeometry:ab,ExtrudeBufferGeometry:Da,EdgesGeometry:Zb,ConeGeometry:Qc,ConeBufferGeometry:Rc,CylinderGeometry:mb,CylinderBufferGeometry:Ta,CircleGeometry:Sc,CircleBufferGeometry:$b,BoxGeometry:Fb,
+BoxBufferGeometry:gb});ac.prototype=Object.create(P.prototype);ac.prototype.constructor=ac;ac.prototype.isShadowMaterial=!0;bc.prototype=Object.create(za.prototype);bc.prototype.constructor=bc;bc.prototype.isRawShaderMaterial=!0;Na.prototype=Object.create(P.prototype);Na.prototype.constructor=Na;Na.prototype.isMeshStandardMaterial=!0;Na.prototype.copy=function(a){P.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.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.roughnessMap=a.roughnessMap;
+this.metalnessMap=a.metalnessMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.envMapIntensity=a.envMapIntensity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};nb.prototype=Object.create(Na.prototype);nb.prototype.constructor=nb;nb.prototype.isMeshPhysicalMaterial=
 !0;nb.prototype.copy=function(a){Na.prototype.copy.call(this,a);this.defines={PHYSICAL:""};this.reflectivity=a.reflectivity;this.clearCoat=a.clearCoat;this.clearCoatRoughness=a.clearCoatRoughness;return this};Aa.prototype=Object.create(P.prototype);Aa.prototype.constructor=Aa;Aa.prototype.isMeshPhongMaterial=!0;Aa.prototype.copy=function(a){P.prototype.copy.call(this,a);this.color.copy(a.color);this.specular.copy(a.specular);this.shininess=a.shininess;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.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=
 a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};ob.prototype=Object.create(Aa.prototype);ob.prototype.constructor=ob;ob.prototype.isMeshToonMaterial=!0;ob.prototype.copy=function(a){Aa.prototype.copy.call(this,

+ 18 - 4
build/three.module.js

@@ -11068,6 +11068,7 @@ OrthographicCamera.prototype = Object.assign( Object.create( Camera.prototype ),
 		if ( this.view === null ) {
 
 			this.view = {
+				enabled: true,
 				fullWidth: 1,
 				fullHeight: 1,
 				offsetX: 0,
@@ -11078,6 +11079,7 @@ OrthographicCamera.prototype = Object.assign( Object.create( Camera.prototype ),
 
 		}
 
+		this.view.enabled = true;
 		this.view.fullWidth = fullWidth;
 		this.view.fullHeight = fullHeight;
 		this.view.offsetX = x;
@@ -11091,7 +11093,12 @@ OrthographicCamera.prototype = Object.assign( Object.create( Camera.prototype ),
 
 	clearViewOffset: function () {
 
-		this.view = null;
+		if ( this.view !== null ) {
+
+			this.view.enabled = false;
+
+		}
+
 		this.updateProjectionMatrix();
 
 	},
@@ -11108,7 +11115,7 @@ OrthographicCamera.prototype = Object.assign( Object.create( Camera.prototype ),
 		var top = cy + dy;
 		var bottom = cy - dy;
 
-		if ( this.view !== null ) {
+		if ( this.view !== null && this.view.enabled ) {
 
 			var zoomW = this.zoom / ( this.view.width / this.view.fullWidth );
 			var zoomH = this.zoom / ( this.view.height / this.view.fullHeight );
@@ -20400,6 +20407,7 @@ PerspectiveCamera.prototype = Object.assign( Object.create( Camera.prototype ),
 		if ( this.view === null ) {
 
 			this.view = {
+				enabled: true,
 				fullWidth: 1,
 				fullHeight: 1,
 				offsetX: 0,
@@ -20410,6 +20418,7 @@ PerspectiveCamera.prototype = Object.assign( Object.create( Camera.prototype ),
 
 		}
 
+		this.view.enabled = true;
 		this.view.fullWidth = fullWidth;
 		this.view.fullHeight = fullHeight;
 		this.view.offsetX = x;
@@ -20423,7 +20432,12 @@ PerspectiveCamera.prototype = Object.assign( Object.create( Camera.prototype ),
 
 	clearViewOffset: function () {
 
-		this.view = null;
+		if ( this.view !== null ) {
+
+			this.view.enabled = false;
+
+		}
+
 		this.updateProjectionMatrix();
 
 	},
@@ -20438,7 +20452,7 @@ PerspectiveCamera.prototype = Object.assign( Object.create( Camera.prototype ),
 			left = - 0.5 * width,
 			view = this.view;
 
-		if ( view !== null ) {
+		if ( this.view !== null && this.view.enabled ) {
 
 			var fullWidth = view.fullWidth,
 				fullHeight = view.fullHeight;