|
@@ -184,12 +184,11 @@ qa.setupRenderTarget(a);var b=a&&a.isWebGLRenderTargetCube,c;a?(c=ga.get(a),c=b?
|
|
a.activeMipMapLevel))};this.readRenderTargetPixels=function(a,b,c,d,e,f){if(!1===(a&&a.isWebGLRenderTarget))console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");else{var g=ga.get(a).__webglFramebuffer;if(g){var h=!1;g!==F&&(B.bindFramebuffer(B.FRAMEBUFFER,g),h=!0);try{var k=a.texture,m=k.format,r=k.type;1023!==m&&l(m)!==B.getParameter(B.IMPLEMENTATION_COLOR_READ_FORMAT)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):
|
|
a.activeMipMapLevel))};this.readRenderTargetPixels=function(a,b,c,d,e,f){if(!1===(a&&a.isWebGLRenderTarget))console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");else{var g=ga.get(a).__webglFramebuffer;if(g){var h=!1;g!==F&&(B.bindFramebuffer(B.FRAMEBUFFER,g),h=!0);try{var k=a.texture,m=k.format,r=k.type;1023!==m&&l(m)!==B.getParameter(B.IMPLEMENTATION_COLOR_READ_FORMAT)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):
|
|
1009===r||l(r)===B.getParameter(B.IMPLEMENTATION_COLOR_READ_TYPE)||1015===r&&(ma.get("OES_texture_float")||ma.get("WEBGL_color_buffer_float"))||1016===r&&ma.get("EXT_color_buffer_half_float")?B.checkFramebufferStatus(B.FRAMEBUFFER)===B.FRAMEBUFFER_COMPLETE?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&B.readPixels(b,c,d,e,l(m),l(r),f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{h&&
|
|
1009===r||l(r)===B.getParameter(B.IMPLEMENTATION_COLOR_READ_TYPE)||1015===r&&(ma.get("OES_texture_float")||ma.get("WEBGL_color_buffer_float"))||1016===r&&ma.get("EXT_color_buffer_half_float")?B.checkFramebufferStatus(B.FRAMEBUFFER)===B.FRAMEBUFFER_COMPLETE?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&B.readPixels(b,c,d,e,l(m),l(r),f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{h&&
|
|
B.bindFramebuffer(B.FRAMEBUFFER,F)}}}}}function Gb(a,b){this.name="";this.color=new G(a);this.density=void 0!==b?b:2.5E-4}function Hb(a,b,c){this.name="";this.color=new G(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3}function jd(){D.call(this);this.type="Scene";this.overrideMaterial=this.fog=this.background=null;this.autoUpdate=!0}function Xd(a,b,c,d,e){D.call(this);this.lensFlares=[];this.positionScreen=new p;this.customUpdateCallback=void 0;void 0!==a&&this.add(a,b,c,d,e)}function bb(a){W.call(this);
|
|
B.bindFramebuffer(B.FRAMEBUFFER,F)}}}}}function Gb(a,b){this.name="";this.color=new G(a);this.density=void 0!==b?b:2.5E-4}function Hb(a,b,c){this.name="";this.color=new G(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3}function jd(){D.call(this);this.type="Scene";this.overrideMaterial=this.fog=this.background=null;this.autoUpdate=!0}function Xd(a,b,c,d,e){D.call(this);this.lensFlares=[];this.positionScreen=new p;this.customUpdateCallback=void 0;void 0!==a&&this.add(a,b,c,d,e)}function bb(a){W.call(this);
|
|
-this.type="SpriteMaterial";this.color=new G(16777215);this.map=null;this.rotation=0;this.lights=this.fog=!1;this.setValues(a)}function wc(a){D.call(this);this.type="Sprite";this.material=void 0!==a?a:new bb}function xc(){D.call(this);this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function yc(a,b){this.identityMatrix=new S;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{console.warn("THREE.Skeleton boneInverses is the wrong length.");this.boneInverses=[];for(var c=0,d=this.bones.length;c<d;c++)this.boneInverses.push(new S)}}function kd(){D.call(this);this.type="Bone"}function ld(a,b){ya.call(this,a,b);!1===this.material.skinning&&console.warn("THREE.SkinnedMesh: Material must have skinning set to true.",this.material);this.type="SkinnedMesh";this.bindMode="attached";this.bindMatrix=new S;this.bindMatrixInverse=new S;var c=
|
|
|
|
-[];if(this.geometry&&void 0!==this.geometry.bones){for(var d,e,f=0,g=this.geometry.bones.length;f<g;++f)e=this.geometry.bones[f],d=new kd,c.push(d),d.name=e.name,d.position.fromArray(e.pos),d.quaternion.fromArray(e.rotq),void 0!==e.scl&&d.scale.fromArray(e.scl);f=0;for(g=this.geometry.bones.length;f<g;++f)e=this.geometry.bones[f],-1!==e.parent&&null!==e.parent&&void 0!==c[e.parent]?c[e.parent].add(c[f]):this.add(c[f])}this.normalizeSkinWeights();this.updateMatrixWorld(!0);this.bind(new yc(c),this.matrixWorld)}
|
|
|
|
-function fa(a){W.call(this);this.type="LineBasicMaterial";this.color=new G(16777215);this.linewidth=1;this.linejoin=this.linecap="round";this.lights=!1;this.setValues(a)}function Da(a,b,c){if(1===c)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new U(a,b);D.call(this);this.type="Line";this.geometry=void 0!==a?a:new J;this.material=void 0!==b?b:new fa({color:16777215*Math.random()})}function U(a,b){Da.call(this,a,b);this.type=
|
|
|
|
-"LineSegments"}function md(a,b){Da.call(this,a,b);this.type="LineLoop"}function za(a){W.call(this);this.type="PointsMaterial";this.color=new G(16777215);this.map=null;this.size=1;this.sizeAttenuation=!0;this.lights=!1;this.setValues(a)}function Ib(a,b){D.call(this);this.type="Points";this.geometry=void 0!==a?a:new J;this.material=void 0!==b?b:new za({color:16777215*Math.random()})}function zc(){D.call(this);this.type="Group"}function nd(a,b,c,d,e,f,g,h,k){function m(){requestAnimationFrame(m);a.readyState>=
|
|
|
|
-a.HAVE_CURRENT_DATA&&(r.needsUpdate=!0)}Z.call(this,a,b,c,d,e,f,g,h,k);this.generateMipmaps=!1;var r=this;m()}function Jb(a,b,c,d,e,f,g,h,k,m,r,q){Z.call(this,null,f,g,h,k,m,d,e,r,q);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=this.flipY=!1}function od(a,b,c,d,e,f,g,h,k){Z.call(this,a,b,c,d,e,f,g,h,k);this.needsUpdate=!0}function Ac(a,b,c,d,e,f,g,h,k,m){m=void 0!==m?m:1026;if(1026!==m&&1027!==m)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");
|
|
|
|
|
|
+this.type="SpriteMaterial";this.color=new G(16777215);this.map=null;this.rotation=0;this.lights=this.fog=!1;this.setValues(a)}function wc(a){D.call(this);this.type="Sprite";this.material=void 0!==a?a:new bb}function xc(){D.call(this);this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function yc(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{console.warn("THREE.Skeleton boneInverses is the wrong length.");this.boneInverses=[];for(var c=0,d=this.bones.length;c<d;c++)this.boneInverses.push(new S)}}function kd(){D.call(this);this.type="Bone"}function ld(a,b){ya.call(this,a,b);!1===this.material.skinning&&console.warn("THREE.SkinnedMesh: Material must have skinning set to true.",this.material);this.type="SkinnedMesh";this.bindMode="attached";this.bindMatrix=new S;this.bindMatrixInverse=new S;var c=this.initBones(),c=new yc(c);
|
|
|
|
+this.bind(c,this.matrixWorld);this.normalizeSkinWeights()}function fa(a){W.call(this);this.type="LineBasicMaterial";this.color=new G(16777215);this.linewidth=1;this.linejoin=this.linecap="round";this.lights=!1;this.setValues(a)}function Da(a,b,c){if(1===c)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new U(a,b);D.call(this);this.type="Line";this.geometry=void 0!==a?a:new J;this.material=void 0!==b?b:new fa({color:16777215*Math.random()})}
|
|
|
|
+function U(a,b){Da.call(this,a,b);this.type="LineSegments"}function md(a,b){Da.call(this,a,b);this.type="LineLoop"}function za(a){W.call(this);this.type="PointsMaterial";this.color=new G(16777215);this.map=null;this.size=1;this.sizeAttenuation=!0;this.lights=!1;this.setValues(a)}function Ib(a,b){D.call(this);this.type="Points";this.geometry=void 0!==a?a:new J;this.material=void 0!==b?b:new za({color:16777215*Math.random()})}function zc(){D.call(this);this.type="Group"}function nd(a,b,c,d,e,f,g,h,
|
|
|
|
+k){function m(){requestAnimationFrame(m);a.readyState>=a.HAVE_CURRENT_DATA&&(r.needsUpdate=!0)}Z.call(this,a,b,c,d,e,f,g,h,k);this.generateMipmaps=!1;var r=this;m()}function Jb(a,b,c,d,e,f,g,h,k,m,r,q){Z.call(this,null,f,g,h,k,m,d,e,r,q);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=this.flipY=!1}function od(a,b,c,d,e,f,g,h,k){Z.call(this,a,b,c,d,e,f,g,h,k);this.needsUpdate=!0}function Ac(a,b,c,d,e,f,g,h,k,m){m=void 0!==m?m:1026;if(1026!==m&&1027!==m)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");
|
|
void 0===c&&1026===m&&(c=1012);void 0===c&&1027===m&&(c=1020);Z.call(this,null,d,e,f,g,h,m,c,k);this.image={width:a,height:b};this.magFilter=void 0!==g?g:1003;this.minFilter=void 0!==h?h:1003;this.generateMipmaps=this.flipY=!1}function Kb(a){function b(a,b){return a-b}J.call(this);this.type="WireframeGeometry";var c=[],d,e,f,g,h=[0,0],k={},m,r=["a","b","c"];if(a&&a.isGeometry){var q=a.faces;d=0;for(f=q.length;d<f;d++){var n=q[d];for(e=0;3>e;e++)h[0]=n[r[e]],h[1]=n[r[(e+1)%3]],h.sort(b),m=h.toString(),
|
|
void 0===c&&1026===m&&(c=1012);void 0===c&&1027===m&&(c=1020);Z.call(this,null,d,e,f,g,h,m,c,k);this.image={width:a,height:b};this.magFilter=void 0!==g?g:1003;this.minFilter=void 0!==h?h:1003;this.generateMipmaps=this.flipY=!1}function Kb(a){function b(a,b){return a-b}J.call(this);this.type="WireframeGeometry";var c=[],d,e,f,g,h=[0,0],k={},m,r=["a","b","c"];if(a&&a.isGeometry){var q=a.faces;d=0;for(f=q.length;d<f;d++){var n=q[d];for(e=0;3>e;e++)h[0]=n[r[e]],h[1]=n[r[(e+1)%3]],h.sort(b),m=h.toString(),
|
|
void 0===k[m]&&(k[m]={index1:h[0],index2:h[1]})}for(m in k)d=k[m],r=a.vertices[d.index1],c.push(r.x,r.y,r.z),r=a.vertices[d.index2],c.push(r.x,r.y,r.z)}else if(a&&a.isBufferGeometry){var l,r=new p;if(null!==a.index){q=a.attributes.position;n=a.index;l=a.groups;0===l.length&&(l=[{start:0,count:n.count,materialIndex:0}]);a=0;for(g=l.length;a<g;++a)for(d=l[a],e=d.start,f=d.count,d=e,f=e+f;d<f;d+=3)for(e=0;3>e;e++)h[0]=n.getX(d+e),h[1]=n.getX(d+(e+1)%3),h.sort(b),m=h.toString(),void 0===k[m]&&(k[m]={index1:h[0],
|
|
void 0===k[m]&&(k[m]={index1:h[0],index2:h[1]})}for(m in k)d=k[m],r=a.vertices[d.index1],c.push(r.x,r.y,r.z),r=a.vertices[d.index2],c.push(r.x,r.y,r.z)}else if(a&&a.isBufferGeometry){var l,r=new p;if(null!==a.index){q=a.attributes.position;n=a.index;l=a.groups;0===l.length&&(l=[{start:0,count:n.count,materialIndex:0}]);a=0;for(g=l.length;a<g;++a)for(d=l[a],e=d.start,f=d.count,d=e,f=e+f;d<f;d+=3)for(e=0;3>e;e++)h[0]=n.getX(d+e),h[1]=n.getX(d+(e+1)%3),h.sort(b),m=h.toString(),void 0===k[m]&&(k[m]={index1:h[0],
|
|
index2:h[1]});for(m in k)d=k[m],r.fromBufferAttribute(q,d.index1),c.push(r.x,r.y,r.z),r.fromBufferAttribute(q,d.index2),c.push(r.x,r.y,r.z)}else for(q=a.attributes.position,d=0,f=q.count/3;d<f;d++)for(e=0;3>e;e++)k=3*d+e,r.fromBufferAttribute(q,k),c.push(r.x,r.y,r.z),k=3*d+(e+1)%3,r.fromBufferAttribute(q,k),c.push(r.x,r.y,r.z)}this.addAttribute("position",new F(c,3))}function Bc(a,b,c){L.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new Lb(a,
|
|
index2:h[1]});for(m in k)d=k[m],r.fromBufferAttribute(q,d.index1),c.push(r.x,r.y,r.z),r.fromBufferAttribute(q,d.index2),c.push(r.x,r.y,r.z)}else for(q=a.attributes.position,d=0,f=q.count/3;d<f;d++)for(e=0;3>e;e++)k=3*d+e,r.fromBufferAttribute(q,k),c.push(r.x,r.y,r.z),k=3*d+(e+1)%3,r.fromBufferAttribute(q,k),c.push(r.x,r.y,r.z)}this.addAttribute("position",new F(c,3))}function Bc(a,b,c){L.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new Lb(a,
|
|
@@ -568,46 +567,47 @@ opacity:f,color:e,blending:d})},updateLensFlares:function(){var a,b=this.lensFla
|
|
a);this.color.copy(a.color);this.map=a.map;this.rotation=a.rotation;return this};wc.prototype=Object.assign(Object.create(D.prototype),{constructor:wc,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)}});
|
|
a);this.color.copy(a.color);this.map=a.map;this.rotation=a.rotation;return this};wc.prototype=Object.assign(Object.create(D.prototype),{constructor:wc,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)}});
|
|
xc.prototype=Object.assign(Object.create(D.prototype),{constructor:xc,copy:function(a){D.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-
|
|
xc.prototype=Object.assign(Object.create(D.prototype),{constructor:xc,copy:function(a){D.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;
|
|
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=D.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(yc.prototype,{calculateInverses:function(){this.boneInverses=[];for(var a=0,b=this.bones.length;a<b;a++){var c=new S;this.bones[a]&&c.getInverse(this.bones[a].matrixWorld);this.boneInverses.push(c)}},pose:function(){for(var a,b=0,c=this.bones.length;b<
|
|
|
|
-c;b++)(a=this.bones[b])&&a.matrixWorld.getInverse(this.boneInverses[b]);b=0;for(c=this.bones.length;b<c;b++)if(a=this.bones[b])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 S;return function(){for(var b=this.bones,c=this.boneInverses,d=this.boneMatrices,e=this.boneTexture,f=0,g=b.length;f<g;f++)a.multiplyMatrices(b[f]?b[f].matrixWorld:
|
|
|
|
-this.identityMatrix,c[f]),a.toArray(d,16*f);void 0!==e&&(e.needsUpdate=!0)}}(),clone:function(){return new yc(this.bones,this.boneInverses)}});kd.prototype=Object.assign(Object.create(D.prototype),{constructor:kd,isBone:!0});ld.prototype=Object.assign(Object.create(ya.prototype),{constructor:ld,isSkinnedMesh:!0,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(){if(this.geometry&&this.geometry.isGeometry)for(var a=0;a<this.geometry.skinWeights.length;a++){var b=this.geometry.skinWeights[a],c=1/b.lengthManhattan();Infinity!==c?b.multiplyScalar(c):b.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry)for(var b=new ia,d=this.geometry.attributes.skinWeight,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(){ya.prototype.updateMatrixWorld.call(this,!0);"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)}});fa.prototype=Object.create(W.prototype);fa.prototype.constructor=
|
|
|
|
-fa;fa.prototype.isLineBasicMaterial=!0;fa.prototype.copy=function(a){W.prototype.copy.call(this,a);this.color.copy(a.color);this.linewidth=a.linewidth;this.linecap=a.linecap;this.linejoin=a.linejoin;return this};Da.prototype=Object.assign(Object.create(D.prototype),{constructor:Da,isLine:!0,raycast:function(){var a=new S,b=new fb,c=new Ia;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,m=new p,h=new p,l=new p,q=this&&this.isLineSegments?2:1;if(g.isBufferGeometry){var n=g.index,u=g.attributes.position.array;if(null!==n)for(var n=n.array,g=0,z=n.length-1;g<z;g+=q){var t=n[g+1];k.fromArray(u,3*n[g]);m.fromArray(u,3*t);t=b.distanceSqToSegment(k,m,l,h);t>f||(l.applyMatrix4(this.matrixWorld),t=d.ray.origin.distanceTo(l),t<d.near||t>d.far||e.push({distance:t,point:h.clone().applyMatrix4(this.matrixWorld),
|
|
|
|
-index:g,face:null,faceIndex:null,object:this}))}else for(g=0,z=u.length/3-1;g<z;g+=q)k.fromArray(u,3*g),m.fromArray(u,3*g+3),t=b.distanceSqToSegment(k,m,l,h),t>f||(l.applyMatrix4(this.matrixWorld),t=d.ray.origin.distanceTo(l),t<d.near||t>d.far||e.push({distance:t,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else if(g.isGeometry)for(k=g.vertices,m=k.length,g=0;g<m-1;g+=q)t=b.distanceSqToSegment(k[g],k[g+1],l,h),t>f||(l.applyMatrix4(this.matrixWorld),
|
|
|
|
-t=d.ray.origin.distanceTo(l),t<d.near||t>d.far||e.push({distance:t,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)}});U.prototype=Object.assign(Object.create(Da.prototype),{constructor:U,isLineSegments:!0});md.prototype=Object.assign(Object.create(Da.prototype),{constructor:md,isLineLoop:!0});za.prototype=Object.create(W.prototype);za.prototype.constructor=za;za.prototype.isPointsMaterial=
|
|
|
|
-!0;za.prototype.copy=function(a){W.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.size=a.size;this.sizeAttenuation=a.sizeAttenuation;return this};Ib.prototype=Object.assign(Object.create(D.prototype),{constructor:Ib,isPoints:!0,raycast:function(){var a=new S,b=new fb,c=new Ia;return function(d,e){function f(a,c){var f=b.distanceSqToPoint(a);if(f<l){var h=b.closestPointToPoint(a);h.applyMatrix4(k);var m=d.ray.origin.distanceTo(h);m<d.near||m>d.far||e.push({distance:m,distanceToRay:Math.sqrt(f),
|
|
|
|
-point:h.clone(),index:c,face:null,object:g})}}var g=this,h=this.geometry,k=this.matrixWorld,m=d.params.Points.threshold;null===h.boundingSphere&&h.computeBoundingSphere();c.copy(h.boundingSphere);c.applyMatrix4(k);c.radius+=m;if(!1!==d.ray.intersectsSphere(c)){a.getInverse(k);b.copy(d.ray).applyMatrix4(a);var m=m/((this.scale.x+this.scale.y+this.scale.z)/3),l=m*m,m=new p;if(h.isBufferGeometry){var q=h.index,h=h.attributes.position.array;if(null!==q)for(var n=q.array,q=0,u=n.length;q<u;q++){var z=
|
|
|
|
-n[q];m.fromArray(h,3*z);f(m,z)}else for(q=0,n=h.length/3;q<n;q++)m.fromArray(h,3*q),f(m,q)}else for(m=h.vertices,q=0,n=m.length;q<n;q++)f(m[q],q)}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});zc.prototype=Object.assign(Object.create(D.prototype),{constructor:zc});nd.prototype=Object.create(Z.prototype);nd.prototype.constructor=nd;Jb.prototype=Object.create(Z.prototype);Jb.prototype.constructor=Jb;Jb.prototype.isCompressedTexture=!0;od.prototype=Object.create(Z.prototype);
|
|
|
|
-od.prototype.constructor=od;Ac.prototype=Object.create(Z.prototype);Ac.prototype.constructor=Ac;Ac.prototype.isDepthTexture=!0;Kb.prototype=Object.create(J.prototype);Kb.prototype.constructor=Kb;Bc.prototype=Object.create(L.prototype);Bc.prototype.constructor=Bc;Lb.prototype=Object.create(J.prototype);Lb.prototype.constructor=Lb;Cc.prototype=Object.create(L.prototype);Cc.prototype.constructor=Cc;qa.prototype=Object.create(J.prototype);qa.prototype.constructor=qa;Dc.prototype=Object.create(L.prototype);
|
|
|
|
-Dc.prototype.constructor=Dc;Mb.prototype=Object.create(qa.prototype);Mb.prototype.constructor=Mb;Ec.prototype=Object.create(L.prototype);Ec.prototype.constructor=Ec;kb.prototype=Object.create(qa.prototype);kb.prototype.constructor=kb;Fc.prototype=Object.create(L.prototype);Fc.prototype.constructor=Fc;Nb.prototype=Object.create(qa.prototype);Nb.prototype.constructor=Nb;Gc.prototype=Object.create(L.prototype);Gc.prototype.constructor=Gc;Ob.prototype=Object.create(qa.prototype);Ob.prototype.constructor=
|
|
|
|
-Ob;Hc.prototype=Object.create(L.prototype);Hc.prototype.constructor=Hc;Pb.prototype=Object.create(J.prototype);Pb.prototype.constructor=Pb;Ic.prototype=Object.create(L.prototype);Ic.prototype.constructor=Ic;Qb.prototype=Object.create(J.prototype);Qb.prototype.constructor=Qb;Jc.prototype=Object.create(L.prototype);Jc.prototype.constructor=Jc;Rb.prototype=Object.create(J.prototype);Rb.prototype.constructor=Rb;var ta={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,h,k;if(0<ta.area(a))for(h=0;h<c;h++)e[h]=h;else for(h=0;h<c;h++)e[h]=c-1-h;var m=2*c;for(h=c-1;2<c;){if(0>=m--){console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()");break}g=h;c<=g&&(g=0);h=g+1;c<=h&&(h=0);k=h+1;c<=k&&(k=0);var l;a:{var q,n,p,z,t,w,x,y;q=a[e[g]].x;n=a[e[g]].y;p=a[e[h]].x;z=a[e[h]].y;t=a[e[k]].x;w=a[e[k]].y;if(0>=(p-q)*(w-n)-(z-n)*(t-q))l=
|
|
|
|
-!1;else{var H,v,O,E,C,A,D,F,I,J;H=t-p;v=w-z;O=q-t;E=n-w;C=p-q;A=z-n;for(l=0;l<c;l++)if(x=a[e[l]].x,y=a[e[l]].y,!(x===q&&y===n||x===p&&y===z||x===t&&y===w)&&(D=x-q,F=y-n,I=x-p,J=y-z,x-=t,y-=w,I=H*J-v*I,D=C*F-A*D,F=O*y-E*x,I>=-Number.EPSILON&&F>=-Number.EPSILON&&D>=-Number.EPSILON)){l=!1;break a}l=!0}}if(l){d.push([a[e[g]],a[e[h]],a[e[k]]]);f.push([e[g],e[h],e[k]]);g=h;for(k=h+1;k<c;g++,k++)e[g]=e[k];c--;m=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,m=e.y-c.y,l=a.x-c.x,n=a.y-c.y,r=h*k-g*m,q=h*l-g*n;if(Math.abs(r)>Number.EPSILON){if(0<r){if(0>q||q>r)return[];k=m*l-k*n;if(0>k||k>r)return[]}else{if(0<q||q<r)return[];k=m*l-k*n;if(0<k||k<r)return[]}if(0===k)return!f||0!==q&&q!==r?[a]:[];if(k===r)return!f||0!==q&&q!==r?[b]:[];if(0===q)return[c];if(q===r)return[e];
|
|
|
|
-f=k/r;return[{x:a.x+f*g,y:a.y+f*h}]}if(0!==q||m*l!==k*n)return[];h=0===g&&0===h;k=0===k&&0===m;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,r=c.x,m=e,c=e.x):(b=e,r=e.x,m=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,r=c.y,m=e,c=e.y):(b=e,r=e.y,m=c,c=c.y));return k<=r?a<r?[]:a===r?f?[]:[b]:a<=c?[b,h]:[b,m]:k>c?[]:k===c?f?[]:[g]:a<=c?[g,h]:[g,m]}
|
|
|
|
-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,m,l,q={};k=a.concat();g=0;for(h=b.length;g<h;g++)Array.prototype.push.apply(k,b[g]);g=0;for(h=k.length;g<h;g++)l=k[g].x+":"+k[g].y,void 0!==q[l]&&console.warn("THREE.ShapeUtils: Duplicate point",l,g),q[l]=g;g=function(a,b){function c(a,b){var d=h.length-1,e=a-1;0>e&&(e=d);var g=a+1;g>d&&(g=
|
|
|
|
-0);d=f(h[a],h[e],h[g],k[b]);if(!d)return!1;d=k.length-1;e=b-1;0>e&&(e=d);g=b+1;g>d&&(g=0);return(d=f(k[b],k[e],k[g],h[a]))?!0:!1}function d(a,b){var c,f;for(c=0;c<h.length;c++)if(f=c+1,f%=h.length,f=e(a,b,h[c],h[f],!0),0<f.length)return!0;return!1}function g(a,c){var d,f,h,k;for(d=0;d<m.length;d++)for(f=b[m[d]],h=0;h<f.length;h++)if(k=h+1,k%=f.length,k=e(a,c,f[h],f[k],!0),0<k.length)return!0;return!1}var h=a.concat(),k,m=[],l,n,r,q,p,E=[],D,F,J,G=0;for(l=b.length;G<l;G++)m.push(G);D=0;for(var L=2*
|
|
|
|
-m.length;0<m.length;){L--;if(0>L){console.log("Infinite Loop! Holes left:"+m.length+", Probably Hole outside Shape!");break}for(n=D;n<h.length;n++){r=h[n];l=-1;for(G=0;G<m.length;G++)if(q=m[G],p=r.x+":"+r.y+":"+q,void 0===E[p]){k=b[q];for(F=0;F<k.length;F++)if(q=k[F],c(n,F)&&!d(r,q)&&!g(r,q)){l=F;m.splice(G,1);D=h.slice(0,n+1);q=h.slice(n);F=k.slice(l);J=k.slice(0,l+1);h=D.concat(F).concat(J).concat(q);D=n;break}if(0<=l)break;E[p]=!0}if(0<=l)break}}return h}(a,b);var n=ta.triangulate(g,!1);g=0;for(h=
|
|
|
|
-n.length;g<h;g++)for(m=n[g],k=0;3>k;k++)l=m[k].x+":"+m[k].y,l=q[l],void 0!==l&&(m[k]=l);return n.concat()},isClockWise:function(a){return 0>ta.area(a)}};cb.prototype=Object.create(L.prototype);cb.prototype.constructor=cb;sa.prototype=Object.create(J.prototype);sa.prototype.constructor=sa;sa.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}};sa.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 F(b.arrays.position,3));this.addAttribute("uv",new F(b.arrays.uv,2))};sa.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,e,f;e=a.x-b.x;f=a.y-b.y;d=c.x-
|
|
|
|
-a.x;var g=c.y-a.y,h=e*e+f*f;if(Math.abs(e*g-f*d)>Number.EPSILON){var k=Math.sqrt(h),m=Math.sqrt(d*d+g*g),h=b.x-f/k;b=b.y+e/k;g=((c.x-g/m-h)*g-(c.y+d/m-b)*d)/(e*g-f*d);d=h+e*g-a.x;e=b+f*g-a.y;f=d*d+e*e;if(2>=f)return new E(d,e);f=Math.sqrt(f/2)}else a=!1,e>Number.EPSILON?d>Number.EPSILON&&(a=!0):e<-Number.EPSILON?d<-Number.EPSILON&&(a=!0):Math.sign(f)===Math.sign(g)&&(a=!0),a?(d=-f,f=Math.sqrt(h)):(d=e,e=f,f=Math.sqrt(h/2));return new E(d/f,e/f)}function e(a,b){var c,d;for(Q=a.length;0<=--Q;){c=Q;
|
|
|
|
-d=Q-1;0>d&&(d=a.length-1);var e,f=H+2*w;for(e=0;e<f;e++){var g=ca*e,m=ca*(e+1),n=b+d+g,q=b+d+m,m=b+c+m;h(b+c+g);h(n);h(m);h(n);h(q);h(m);g=l.length/3;g=C.generateSideWallUV(W,l,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){u.push(a);u.push(b);u.push(c)}function g(a,b,c){h(a);h(b);h(c);a=l.length/3;a=C.generateTopUV(W,l,a-3,a-2,a-1);k(a[0]);k(a[1]);k(a[2])}function h(a){q.push(l.length/3);l.push(u[3*a+0]);l.push(u[3*a+1]);l.push(u[3*a+2])}function k(a){n.push(a.x);
|
|
|
|
-n.push(a.y)}var m=b.arrays?b.arrays:this.getArrays(),l=m.position,q=m.index,n=m.uv,u=[],m=void 0!==b.amount?b.amount:100,z=void 0!==b.bevelThickness?b.bevelThickness:6,t=void 0!==b.bevelSize?b.bevelSize:z-2,w=void 0!==b.bevelSegments?b.bevelSegments:3,x=void 0!==b.bevelEnabled?b.bevelEnabled:!0,y=void 0!==b.curveSegments?b.curveSegments:12,H=void 0!==b.steps?b.steps:1,v=b.extrudePath,D,M=!1,C=void 0!==b.UVGenerator?b.UVGenerator:cb.WorldUVGenerator,A,J,G,I;v&&(D=v.getSpacedPoints(H),M=!0,x=!1,A=void 0!==
|
|
|
|
-b.frames?b.frames:v.computeFrenetFrames(H,!1),J=new p,G=new p,I=new p);x||(t=z=w=0);var L,K,S,W=this,v=a.extractPoints(y),y=v.shape,P=v.holes;if(v=!ta.isClockWise(y)){y=y.reverse();K=0;for(S=P.length;K<S;K++)L=P[K],ta.isClockWise(L)&&(P[K]=L.reverse());v=!1}var N=ta.triangulateShape(y,P),X=y;K=0;for(S=P.length;K<S;K++)L=P[K],y=y.concat(L);var T,V,R,Y,U,ca=y.length,Z,ga=N.length,v=[],Q=0;R=X.length;T=R-1;for(V=Q+1;Q<R;Q++,T++,V++)T===R&&(T=0),V===R&&(V=0),v[Q]=d(X[Q],X[T],X[V]);var ia=[],fa,ha=v.concat();
|
|
|
|
-K=0;for(S=P.length;K<S;K++){L=P[K];fa=[];Q=0;R=L.length;T=R-1;for(V=Q+1;Q<R;Q++,T++,V++)T===R&&(T=0),V===R&&(V=0),fa[Q]=d(L[Q],L[T],L[V]);ia.push(fa);ha=ha.concat(fa)}for(T=0;T<w;T++){R=T/w;Y=z*Math.cos(R*Math.PI/2);V=t*Math.sin(R*Math.PI/2);Q=0;for(R=X.length;Q<R;Q++)U=c(X[Q],v[Q],V),f(U.x,U.y,-Y);K=0;for(S=P.length;K<S;K++)for(L=P[K],fa=ia[K],Q=0,R=L.length;Q<R;Q++)U=c(L[Q],fa[Q],V),f(U.x,U.y,-Y)}V=t;for(Q=0;Q<ca;Q++)U=x?c(y[Q],ha[Q],V):y[Q],M?(G.copy(A.normals[0]).multiplyScalar(U.x),J.copy(A.binormals[0]).multiplyScalar(U.y),
|
|
|
|
-I.copy(D[0]).add(G).add(J),f(I.x,I.y,I.z)):f(U.x,U.y,0);for(R=1;R<=H;R++)for(Q=0;Q<ca;Q++)U=x?c(y[Q],ha[Q],V):y[Q],M?(G.copy(A.normals[R]).multiplyScalar(U.x),J.copy(A.binormals[R]).multiplyScalar(U.y),I.copy(D[R]).add(G).add(J),f(I.x,I.y,I.z)):f(U.x,U.y,m/H*R);for(T=w-1;0<=T;T--){R=T/w;Y=z*Math.cos(R*Math.PI/2);V=t*Math.sin(R*Math.PI/2);Q=0;for(R=X.length;Q<R;Q++)U=c(X[Q],v[Q],V),f(U.x,U.y,m+Y);K=0;for(S=P.length;K<S;K++)for(L=P[K],fa=ia[K],Q=0,R=L.length;Q<R;Q++)U=c(L[Q],fa[Q],V),M?f(U.x,U.y+D[H-
|
|
|
|
-1].y,D[H-1].x+Y):f(U.x,U.y,m+Y)}(function(){var a=l.length/3;if(x){var c=0*ca;for(Q=0;Q<ga;Q++)Z=N[Q],g(Z[2]+c,Z[1]+c,Z[0]+c);c=ca*(H+2*w);for(Q=0;Q<ga;Q++)Z=N[Q],g(Z[0]+c,Z[1]+c,Z[2]+c)}else{for(Q=0;Q<ga;Q++)Z=N[Q],g(Z[2],Z[1],Z[0]);for(Q=0;Q<ga;Q++)Z=N[Q],g(Z[0]+ca*H,Z[1]+ca*H,Z[2]+ca*H)}W.addGroup(a,l.length/3-a,void 0!==b.material?b.material:0)})();(function(){var a=l.length/3,c=0;e(X,c);c+=X.length;K=0;for(S=P.length;K<S;K++)L=P[K],e(L,c),c+=L.length;void 0!==b.extrudeMaterial&&W.addGroup(a,
|
|
|
|
-l.length/3-a,void 0!==b.extrudeMaterial?b.extrudeMaterial:1)})();b.arrays||(this.setIndex(q),this.addAttribute("position",new F(l,3)),this.addAttribute("uv",new F(b.arrays.uv,2)))};cb.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 E(b[3*c],b[3*c+1]),new E(a,d),new E(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 m=b[3*e],l=b[3*e+1];e=b[3*e+2];var q=b[3*f],n=b[3*f+
|
|
|
|
-1];b=b[3*f+2];return.01>Math.abs(g-k)?[new E(a,1-c),new E(h,1-d),new E(m,1-e),new E(q,1-b)]:[new E(g,1-c),new E(k,1-d),new E(l,1-e),new E(n,1-b)]}};Kc.prototype=Object.create(L.prototype);Kc.prototype.constructor=Kc;Sb.prototype=Object.create(sa.prototype);Sb.prototype.constructor=Sb;Lc.prototype=Object.create(L.prototype);Lc.prototype.constructor=Lc;lb.prototype=Object.create(J.prototype);lb.prototype.constructor=lb;Mc.prototype=Object.create(L.prototype);Mc.prototype.constructor=Mc;Tb.prototype=
|
|
|
|
-Object.create(J.prototype);Tb.prototype.constructor=Tb;Nc.prototype=Object.create(L.prototype);Nc.prototype.constructor=Nc;Ub.prototype=Object.create(J.prototype);Ub.prototype.constructor=Ub;Vb.prototype=Object.create(L.prototype);Vb.prototype.constructor=Vb;Wb.prototype=Object.create(J.prototype);Wb.prototype.constructor=Wb;Xb.prototype=Object.create(J.prototype);Xb.prototype.constructor=Xb;mb.prototype=Object.create(L.prototype);mb.prototype.constructor=mb;Ua.prototype=Object.create(J.prototype);
|
|
|
|
-Ua.prototype.constructor=Ua;Oc.prototype=Object.create(mb.prototype);Oc.prototype.constructor=Oc;Pc.prototype=Object.create(Ua.prototype);Pc.prototype.constructor=Pc;Qc.prototype=Object.create(L.prototype);Qc.prototype.constructor=Qc;Yb.prototype=Object.create(J.prototype);Yb.prototype.constructor=Yb;var Oa=Object.freeze({WireframeGeometry:Kb,ParametricGeometry:Bc,ParametricBufferGeometry:Lb,TetrahedronGeometry:Dc,TetrahedronBufferGeometry:Mb,OctahedronGeometry:Ec,OctahedronBufferGeometry:kb,IcosahedronGeometry:Fc,
|
|
|
|
-IcosahedronBufferGeometry:Nb,DodecahedronGeometry:Gc,DodecahedronBufferGeometry:Ob,PolyhedronGeometry:Cc,PolyhedronBufferGeometry:qa,TubeGeometry:Hc,TubeBufferGeometry:Pb,TorusKnotGeometry:Ic,TorusKnotBufferGeometry:Qb,TorusGeometry:Jc,TorusBufferGeometry:Rb,TextGeometry:Kc,TextBufferGeometry:Sb,SphereGeometry:Lc,SphereBufferGeometry:lb,RingGeometry:Mc,RingBufferGeometry:Tb,PlaneGeometry:uc,PlaneBufferGeometry:jb,LatheGeometry:Nc,LatheBufferGeometry:Ub,ShapeGeometry:Vb,ShapeBufferGeometry:Wb,ExtrudeGeometry:cb,
|
|
|
|
-ExtrudeBufferGeometry:sa,EdgesGeometry:Xb,ConeGeometry:Oc,ConeBufferGeometry:Pc,CylinderGeometry:mb,CylinderBufferGeometry:Ua,CircleGeometry:Qc,CircleBufferGeometry:Yb,BoxGeometry:Eb,BoxBufferGeometry:ib});Zb.prototype=Object.create(Ca.prototype);Zb.prototype.constructor=Zb;Zb.prototype.isShadowMaterial=!0;$b.prototype=Object.create(Ca.prototype);$b.prototype.constructor=$b;$b.prototype.isRawShaderMaterial=!0;Pa.prototype=Object.create(W.prototype);Pa.prototype.constructor=Pa;Pa.prototype.isMeshStandardMaterial=
|
|
|
|
-!0;Pa.prototype.copy=function(a){W.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(Pa.prototype);nb.prototype.constructor=nb;nb.prototype.isMeshPhysicalMaterial=!0;nb.prototype.copy=function(a){Pa.prototype.copy.call(this,a);this.defines={PHYSICAL:""};this.reflectivity=a.reflectivity;this.clearCoat=a.clearCoat;this.clearCoatRoughness=a.clearCoatRoughness;return this};Ha.prototype=Object.create(W.prototype);Ha.prototype.constructor=Ha;Ha.prototype.isMeshPhongMaterial=!0;Ha.prototype.copy=function(a){W.prototype.copy.call(this,
|
|
|
|
|
|
+for(;e<f;e++)d[e].object.visible=!1}}}(),toJSON:function(a){a=D.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(yc.prototype,{calculateInverses:function(){this.boneInverses=[];for(var a=0,b=this.bones.length;a<b;a++){var c=new S;this.bones[a]&&c.getInverse(this.bones[a].matrixWorld);this.boneInverses.push(c)}},pose:function(){var a,b,c;b=0;for(c=this.bones.length;b<
|
|
|
|
+c;b++)(a=this.bones[b])&&a.matrixWorld.getInverse(this.boneInverses[b]);b=0;for(c=this.bones.length;b<c;b++)if(a=this.bones[b])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 S,b=new S;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 yc(this.bones,this.boneInverses)}});kd.prototype=Object.assign(Object.create(D.prototype),{constructor:kd,isBone:!0});ld.prototype=Object.assign(Object.create(ya.prototype),{constructor:ld,isSkinnedMesh:!0,initBones:function(){var a=[],b,c,d,e;if(this.geometry&&void 0!==this.geometry.bones){d=0;for(e=this.geometry.bones.length;d<e;d++)c=this.geometry.bones[d],b=new kd,a.push(b),b.name=c.name,b.position.fromArray(c.pos),
|
|
|
|
+b.quaternion.fromArray(c.rotq),void 0!==c.scl&&b.scale.fromArray(c.scl);d=0;for(e=this.geometry.bones.length;d<e;d++)c=this.geometry.bones[d],-1!==c.parent&&null!==c.parent&&void 0!==a[c.parent]?a[c.parent].add(a[d]):this.add(a[d])}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,
|
|
|
|
+b;if(this.geometry&&this.geometry.isGeometry)for(b=0;b<this.geometry.skinWeights.length;b++){var c=this.geometry.skinWeights[b];a=1/c.lengthManhattan();Infinity!==a?c.multiplyScalar(a):c.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var c=new ia,d=this.geometry.attributes.skinWeight;for(b=0;b<d.count;b++)c.x=d.getX(b),c.y=d.getY(b),c.z=d.getZ(b),c.w=d.getW(b),a=1/c.lengthManhattan(),Infinity!==a?c.multiplyScalar(a):c.set(1,0,0,0),d.setXYZW(b,c.x,c.y,c.z,c.w)}},updateMatrixWorld:function(a){ya.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)}});fa.prototype=Object.create(W.prototype);fa.prototype.constructor=fa;fa.prototype.isLineBasicMaterial=!0;fa.prototype.copy=function(a){W.prototype.copy.call(this,a);this.color.copy(a.color);
|
|
|
|
+this.linewidth=a.linewidth;this.linecap=a.linecap;this.linejoin=a.linejoin;return this};Da.prototype=Object.assign(Object.create(D.prototype),{constructor:Da,isLine:!0,raycast:function(){var a=new S,b=new fb,c=new Ia;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,m=new p,h=new p,
|
|
|
|
+l=new p,q=this&&this.isLineSegments?2:1;if(g.isBufferGeometry){var n=g.index,u=g.attributes.position.array;if(null!==n)for(var n=n.array,g=0,z=n.length-1;g<z;g+=q){var t=n[g+1];k.fromArray(u,3*n[g]);m.fromArray(u,3*t);t=b.distanceSqToSegment(k,m,l,h);t>f||(l.applyMatrix4(this.matrixWorld),t=d.ray.origin.distanceTo(l),t<d.near||t>d.far||e.push({distance:t,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else for(g=0,z=u.length/3-1;g<z;g+=q)k.fromArray(u,
|
|
|
|
+3*g),m.fromArray(u,3*g+3),t=b.distanceSqToSegment(k,m,l,h),t>f||(l.applyMatrix4(this.matrixWorld),t=d.ray.origin.distanceTo(l),t<d.near||t>d.far||e.push({distance:t,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else if(g.isGeometry)for(k=g.vertices,m=k.length,g=0;g<m-1;g+=q)t=b.distanceSqToSegment(k[g],k[g+1],l,h),t>f||(l.applyMatrix4(this.matrixWorld),t=d.ray.origin.distanceTo(l),t<d.near||t>d.far||e.push({distance:t,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)}});U.prototype=Object.assign(Object.create(Da.prototype),{constructor:U,isLineSegments:!0});md.prototype=Object.assign(Object.create(Da.prototype),{constructor:md,isLineLoop:!0});za.prototype=Object.create(W.prototype);za.prototype.constructor=za;za.prototype.isPointsMaterial=!0;za.prototype.copy=function(a){W.prototype.copy.call(this,a);this.color.copy(a.color);
|
|
|
|
+this.map=a.map;this.size=a.size;this.sizeAttenuation=a.sizeAttenuation;return this};Ib.prototype=Object.assign(Object.create(D.prototype),{constructor:Ib,isPoints:!0,raycast:function(){var a=new S,b=new fb,c=new Ia;return function(d,e){function f(a,c){var f=b.distanceSqToPoint(a);if(f<l){var h=b.closestPointToPoint(a);h.applyMatrix4(k);var m=d.ray.origin.distanceTo(h);m<d.near||m>d.far||e.push({distance:m,distanceToRay:Math.sqrt(f),point:h.clone(),index:c,face:null,object:g})}}var g=this,h=this.geometry,
|
|
|
|
+k=this.matrixWorld,m=d.params.Points.threshold;null===h.boundingSphere&&h.computeBoundingSphere();c.copy(h.boundingSphere);c.applyMatrix4(k);c.radius+=m;if(!1!==d.ray.intersectsSphere(c)){a.getInverse(k);b.copy(d.ray).applyMatrix4(a);var m=m/((this.scale.x+this.scale.y+this.scale.z)/3),l=m*m,m=new p;if(h.isBufferGeometry){var q=h.index,h=h.attributes.position.array;if(null!==q)for(var n=q.array,q=0,u=n.length;q<u;q++){var z=n[q];m.fromArray(h,3*z);f(m,z)}else for(q=0,n=h.length/3;q<n;q++)m.fromArray(h,
|
|
|
|
+3*q),f(m,q)}else for(m=h.vertices,q=0,n=m.length;q<n;q++)f(m[q],q)}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});zc.prototype=Object.assign(Object.create(D.prototype),{constructor:zc});nd.prototype=Object.create(Z.prototype);nd.prototype.constructor=nd;Jb.prototype=Object.create(Z.prototype);Jb.prototype.constructor=Jb;Jb.prototype.isCompressedTexture=!0;od.prototype=Object.create(Z.prototype);od.prototype.constructor=od;Ac.prototype=Object.create(Z.prototype);
|
|
|
|
+Ac.prototype.constructor=Ac;Ac.prototype.isDepthTexture=!0;Kb.prototype=Object.create(J.prototype);Kb.prototype.constructor=Kb;Bc.prototype=Object.create(L.prototype);Bc.prototype.constructor=Bc;Lb.prototype=Object.create(J.prototype);Lb.prototype.constructor=Lb;Cc.prototype=Object.create(L.prototype);Cc.prototype.constructor=Cc;qa.prototype=Object.create(J.prototype);qa.prototype.constructor=qa;Dc.prototype=Object.create(L.prototype);Dc.prototype.constructor=Dc;Mb.prototype=Object.create(qa.prototype);
|
|
|
|
+Mb.prototype.constructor=Mb;Ec.prototype=Object.create(L.prototype);Ec.prototype.constructor=Ec;kb.prototype=Object.create(qa.prototype);kb.prototype.constructor=kb;Fc.prototype=Object.create(L.prototype);Fc.prototype.constructor=Fc;Nb.prototype=Object.create(qa.prototype);Nb.prototype.constructor=Nb;Gc.prototype=Object.create(L.prototype);Gc.prototype.constructor=Gc;Ob.prototype=Object.create(qa.prototype);Ob.prototype.constructor=Ob;Hc.prototype=Object.create(L.prototype);Hc.prototype.constructor=
|
|
|
|
+Hc;Pb.prototype=Object.create(J.prototype);Pb.prototype.constructor=Pb;Ic.prototype=Object.create(L.prototype);Ic.prototype.constructor=Ic;Qb.prototype=Object.create(J.prototype);Qb.prototype.constructor=Qb;Jc.prototype=Object.create(L.prototype);Jc.prototype.constructor=Jc;Rb.prototype=Object.create(J.prototype);Rb.prototype.constructor=Rb;var ta={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,h,k;if(0<ta.area(a))for(h=0;h<c;h++)e[h]=h;else for(h=0;h<c;h++)e[h]=c-1-h;var m=2*c;for(h=c-1;2<c;){if(0>=m--){console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()");break}g=h;c<=g&&(g=0);h=g+1;c<=h&&(h=0);k=h+1;c<=k&&(k=0);var l;a:{var q,n,p,z,t,w,x,y;q=a[e[g]].x;n=a[e[g]].y;p=a[e[h]].x;z=a[e[h]].y;t=a[e[k]].x;w=a[e[k]].y;if(0>=(p-q)*(w-n)-(z-n)*(t-q))l=!1;else{var H,v,O,E,C,A,D,F,I,J;H=t-p;v=w-z;O=q-t;E=n-w;C=p-q;A=z-n;
|
|
|
|
+for(l=0;l<c;l++)if(x=a[e[l]].x,y=a[e[l]].y,!(x===q&&y===n||x===p&&y===z||x===t&&y===w)&&(D=x-q,F=y-n,I=x-p,J=y-z,x-=t,y-=w,I=H*J-v*I,D=C*F-A*D,F=O*y-E*x,I>=-Number.EPSILON&&F>=-Number.EPSILON&&D>=-Number.EPSILON)){l=!1;break a}l=!0}}if(l){d.push([a[e[g]],a[e[h]],a[e[k]]]);f.push([e[g],e[h],e[k]]);g=h;for(k=h+1;k<c;g++,k++)e[g]=e[k];c--;m=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,m=e.y-c.y,l=a.x-c.x,n=a.y-c.y,r=h*k-g*m,q=h*l-g*n;if(Math.abs(r)>Number.EPSILON){if(0<r){if(0>q||q>r)return[];k=m*l-k*n;if(0>k||k>r)return[]}else{if(0<q||q<r)return[];k=m*l-k*n;if(0<k||k<r)return[]}if(0===k)return!f||0!==q&&q!==r?[a]:[];if(k===r)return!f||0!==q&&q!==r?[b]:[];if(0===q)return[c];if(q===r)return[e];f=k/r;return[{x:a.x+f*g,y:a.y+f*h}]}if(0!==q||m*l!==
|
|
|
|
+k*n)return[];h=0===g&&0===h;k=0===k&&0===m;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,r=c.x,m=e,c=e.x):(b=e,r=e.x,m=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,r=c.y,m=e,c=e.y):(b=e,r=e.y,m=c,c=c.y));return k<=r?a<r?[]:a===r?f?[]:[b]:a<=c?[b,h]:[b,m]:k>c?[]:k===c?f?[]:[g]:a<=c?[g,h]:[g,m]}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,m,l,q={};k=a.concat();g=0;for(h=b.length;g<h;g++)Array.prototype.push.apply(k,b[g]);g=0;for(h=k.length;g<h;g++)l=k[g].x+":"+k[g].y,void 0!==q[l]&&console.warn("THREE.ShapeUtils: Duplicate point",l,g),q[l]=g;g=function(a,b){function c(a,b){var d=h.length-1,e=a-1;0>e&&(e=d);var g=a+1;g>d&&(g=0);d=f(h[a],h[e],h[g],k[b]);if(!d)return!1;d=k.length-
|
|
|
|
+1;e=b-1;0>e&&(e=d);g=b+1;g>d&&(g=0);return(d=f(k[b],k[e],k[g],h[a]))?!0:!1}function d(a,b){var c,f;for(c=0;c<h.length;c++)if(f=c+1,f%=h.length,f=e(a,b,h[c],h[f],!0),0<f.length)return!0;return!1}function g(a,c){var d,f,h,k;for(d=0;d<m.length;d++)for(f=b[m[d]],h=0;h<f.length;h++)if(k=h+1,k%=f.length,k=e(a,c,f[h],f[k],!0),0<k.length)return!0;return!1}var h=a.concat(),k,m=[],l,n,r,q,p,E=[],D,F,J,G=0;for(l=b.length;G<l;G++)m.push(G);D=0;for(var L=2*m.length;0<m.length;){L--;if(0>L){console.log("Infinite Loop! Holes left:"+
|
|
|
|
+m.length+", Probably Hole outside Shape!");break}for(n=D;n<h.length;n++){r=h[n];l=-1;for(G=0;G<m.length;G++)if(q=m[G],p=r.x+":"+r.y+":"+q,void 0===E[p]){k=b[q];for(F=0;F<k.length;F++)if(q=k[F],c(n,F)&&!d(r,q)&&!g(r,q)){l=F;m.splice(G,1);D=h.slice(0,n+1);q=h.slice(n);F=k.slice(l);J=k.slice(0,l+1);h=D.concat(F).concat(J).concat(q);D=n;break}if(0<=l)break;E[p]=!0}if(0<=l)break}}return h}(a,b);var n=ta.triangulate(g,!1);g=0;for(h=n.length;g<h;g++)for(m=n[g],k=0;3>k;k++)l=m[k].x+":"+m[k].y,l=q[l],void 0!==
|
|
|
|
+l&&(m[k]=l);return n.concat()},isClockWise:function(a){return 0>ta.area(a)}};cb.prototype=Object.create(L.prototype);cb.prototype.constructor=cb;sa.prototype=Object.create(J.prototype);sa.prototype.constructor=sa;sa.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}};sa.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 F(b.arrays.position,3));this.addAttribute("uv",new F(b.arrays.uv,2))};sa.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,e,f;e=a.x-b.x;f=a.y-b.y;d=c.x-a.x;var g=c.y-a.y,h=e*e+f*f;if(Math.abs(e*g-f*d)>Number.EPSILON){var k=
|
|
|
|
+Math.sqrt(h),m=Math.sqrt(d*d+g*g),h=b.x-f/k;b=b.y+e/k;g=((c.x-g/m-h)*g-(c.y+d/m-b)*d)/(e*g-f*d);d=h+e*g-a.x;e=b+f*g-a.y;f=d*d+e*e;if(2>=f)return new E(d,e);f=Math.sqrt(f/2)}else a=!1,e>Number.EPSILON?d>Number.EPSILON&&(a=!0):e<-Number.EPSILON?d<-Number.EPSILON&&(a=!0):Math.sign(f)===Math.sign(g)&&(a=!0),a?(d=-f,f=Math.sqrt(h)):(d=e,e=f,f=Math.sqrt(h/2));return new E(d/f,e/f)}function e(a,b){var c,d;for(Q=a.length;0<=--Q;){c=Q;d=Q-1;0>d&&(d=a.length-1);var e,f=H+2*w;for(e=0;e<f;e++){var g=ca*e,m=ca*
|
|
|
|
+(e+1),n=b+d+g,q=b+d+m,m=b+c+m;h(b+c+g);h(n);h(m);h(n);h(q);h(m);g=l.length/3;g=C.generateSideWallUV(W,l,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){u.push(a);u.push(b);u.push(c)}function g(a,b,c){h(a);h(b);h(c);a=l.length/3;a=C.generateTopUV(W,l,a-3,a-2,a-1);k(a[0]);k(a[1]);k(a[2])}function h(a){q.push(l.length/3);l.push(u[3*a+0]);l.push(u[3*a+1]);l.push(u[3*a+2])}function k(a){n.push(a.x);n.push(a.y)}var m=b.arrays?b.arrays:this.getArrays(),l=m.position,q=
|
|
|
|
+m.index,n=m.uv,u=[],m=void 0!==b.amount?b.amount:100,z=void 0!==b.bevelThickness?b.bevelThickness:6,t=void 0!==b.bevelSize?b.bevelSize:z-2,w=void 0!==b.bevelSegments?b.bevelSegments:3,x=void 0!==b.bevelEnabled?b.bevelEnabled:!0,y=void 0!==b.curveSegments?b.curveSegments:12,H=void 0!==b.steps?b.steps:1,v=b.extrudePath,D,M=!1,C=void 0!==b.UVGenerator?b.UVGenerator:cb.WorldUVGenerator,A,J,G,I;v&&(D=v.getSpacedPoints(H),M=!0,x=!1,A=void 0!==b.frames?b.frames:v.computeFrenetFrames(H,!1),J=new p,G=new p,
|
|
|
|
+I=new p);x||(t=z=w=0);var L,K,S,W=this,v=a.extractPoints(y),y=v.shape,P=v.holes;if(v=!ta.isClockWise(y)){y=y.reverse();K=0;for(S=P.length;K<S;K++)L=P[K],ta.isClockWise(L)&&(P[K]=L.reverse());v=!1}var N=ta.triangulateShape(y,P),X=y;K=0;for(S=P.length;K<S;K++)L=P[K],y=y.concat(L);var T,V,R,Y,U,ca=y.length,Z,ga=N.length,v=[],Q=0;R=X.length;T=R-1;for(V=Q+1;Q<R;Q++,T++,V++)T===R&&(T=0),V===R&&(V=0),v[Q]=d(X[Q],X[T],X[V]);var ia=[],fa,ha=v.concat();K=0;for(S=P.length;K<S;K++){L=P[K];fa=[];Q=0;R=L.length;
|
|
|
|
+T=R-1;for(V=Q+1;Q<R;Q++,T++,V++)T===R&&(T=0),V===R&&(V=0),fa[Q]=d(L[Q],L[T],L[V]);ia.push(fa);ha=ha.concat(fa)}for(T=0;T<w;T++){R=T/w;Y=z*Math.cos(R*Math.PI/2);V=t*Math.sin(R*Math.PI/2);Q=0;for(R=X.length;Q<R;Q++)U=c(X[Q],v[Q],V),f(U.x,U.y,-Y);K=0;for(S=P.length;K<S;K++)for(L=P[K],fa=ia[K],Q=0,R=L.length;Q<R;Q++)U=c(L[Q],fa[Q],V),f(U.x,U.y,-Y)}V=t;for(Q=0;Q<ca;Q++)U=x?c(y[Q],ha[Q],V):y[Q],M?(G.copy(A.normals[0]).multiplyScalar(U.x),J.copy(A.binormals[0]).multiplyScalar(U.y),I.copy(D[0]).add(G).add(J),
|
|
|
|
+f(I.x,I.y,I.z)):f(U.x,U.y,0);for(R=1;R<=H;R++)for(Q=0;Q<ca;Q++)U=x?c(y[Q],ha[Q],V):y[Q],M?(G.copy(A.normals[R]).multiplyScalar(U.x),J.copy(A.binormals[R]).multiplyScalar(U.y),I.copy(D[R]).add(G).add(J),f(I.x,I.y,I.z)):f(U.x,U.y,m/H*R);for(T=w-1;0<=T;T--){R=T/w;Y=z*Math.cos(R*Math.PI/2);V=t*Math.sin(R*Math.PI/2);Q=0;for(R=X.length;Q<R;Q++)U=c(X[Q],v[Q],V),f(U.x,U.y,m+Y);K=0;for(S=P.length;K<S;K++)for(L=P[K],fa=ia[K],Q=0,R=L.length;Q<R;Q++)U=c(L[Q],fa[Q],V),M?f(U.x,U.y+D[H-1].y,D[H-1].x+Y):f(U.x,U.y,
|
|
|
|
+m+Y)}(function(){var a=l.length/3;if(x){var c=0*ca;for(Q=0;Q<ga;Q++)Z=N[Q],g(Z[2]+c,Z[1]+c,Z[0]+c);c=ca*(H+2*w);for(Q=0;Q<ga;Q++)Z=N[Q],g(Z[0]+c,Z[1]+c,Z[2]+c)}else{for(Q=0;Q<ga;Q++)Z=N[Q],g(Z[2],Z[1],Z[0]);for(Q=0;Q<ga;Q++)Z=N[Q],g(Z[0]+ca*H,Z[1]+ca*H,Z[2]+ca*H)}W.addGroup(a,l.length/3-a,void 0!==b.material?b.material:0)})();(function(){var a=l.length/3,c=0;e(X,c);c+=X.length;K=0;for(S=P.length;K<S;K++)L=P[K],e(L,c),c+=L.length;void 0!==b.extrudeMaterial&&W.addGroup(a,l.length/3-a,void 0!==b.extrudeMaterial?
|
|
|
|
+b.extrudeMaterial:1)})();b.arrays||(this.setIndex(q),this.addAttribute("position",new F(l,3)),this.addAttribute("uv",new F(b.arrays.uv,2)))};cb.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 E(b[3*c],b[3*c+1]),new E(a,d),new E(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 m=b[3*e],l=b[3*e+1];e=b[3*e+2];var q=b[3*f],n=b[3*f+1];b=b[3*f+2];return.01>Math.abs(g-k)?[new E(a,
|
|
|
|
+1-c),new E(h,1-d),new E(m,1-e),new E(q,1-b)]:[new E(g,1-c),new E(k,1-d),new E(l,1-e),new E(n,1-b)]}};Kc.prototype=Object.create(L.prototype);Kc.prototype.constructor=Kc;Sb.prototype=Object.create(sa.prototype);Sb.prototype.constructor=Sb;Lc.prototype=Object.create(L.prototype);Lc.prototype.constructor=Lc;lb.prototype=Object.create(J.prototype);lb.prototype.constructor=lb;Mc.prototype=Object.create(L.prototype);Mc.prototype.constructor=Mc;Tb.prototype=Object.create(J.prototype);Tb.prototype.constructor=
|
|
|
|
+Tb;Nc.prototype=Object.create(L.prototype);Nc.prototype.constructor=Nc;Ub.prototype=Object.create(J.prototype);Ub.prototype.constructor=Ub;Vb.prototype=Object.create(L.prototype);Vb.prototype.constructor=Vb;Wb.prototype=Object.create(J.prototype);Wb.prototype.constructor=Wb;Xb.prototype=Object.create(J.prototype);Xb.prototype.constructor=Xb;mb.prototype=Object.create(L.prototype);mb.prototype.constructor=mb;Ua.prototype=Object.create(J.prototype);Ua.prototype.constructor=Ua;Oc.prototype=Object.create(mb.prototype);
|
|
|
|
+Oc.prototype.constructor=Oc;Pc.prototype=Object.create(Ua.prototype);Pc.prototype.constructor=Pc;Qc.prototype=Object.create(L.prototype);Qc.prototype.constructor=Qc;Yb.prototype=Object.create(J.prototype);Yb.prototype.constructor=Yb;var Oa=Object.freeze({WireframeGeometry:Kb,ParametricGeometry:Bc,ParametricBufferGeometry:Lb,TetrahedronGeometry:Dc,TetrahedronBufferGeometry:Mb,OctahedronGeometry:Ec,OctahedronBufferGeometry:kb,IcosahedronGeometry:Fc,IcosahedronBufferGeometry:Nb,DodecahedronGeometry:Gc,
|
|
|
|
+DodecahedronBufferGeometry:Ob,PolyhedronGeometry:Cc,PolyhedronBufferGeometry:qa,TubeGeometry:Hc,TubeBufferGeometry:Pb,TorusKnotGeometry:Ic,TorusKnotBufferGeometry:Qb,TorusGeometry:Jc,TorusBufferGeometry:Rb,TextGeometry:Kc,TextBufferGeometry:Sb,SphereGeometry:Lc,SphereBufferGeometry:lb,RingGeometry:Mc,RingBufferGeometry:Tb,PlaneGeometry:uc,PlaneBufferGeometry:jb,LatheGeometry:Nc,LatheBufferGeometry:Ub,ShapeGeometry:Vb,ShapeBufferGeometry:Wb,ExtrudeGeometry:cb,ExtrudeBufferGeometry:sa,EdgesGeometry:Xb,
|
|
|
|
+ConeGeometry:Oc,ConeBufferGeometry:Pc,CylinderGeometry:mb,CylinderBufferGeometry:Ua,CircleGeometry:Qc,CircleBufferGeometry:Yb,BoxGeometry:Eb,BoxBufferGeometry:ib});Zb.prototype=Object.create(Ca.prototype);Zb.prototype.constructor=Zb;Zb.prototype.isShadowMaterial=!0;$b.prototype=Object.create(Ca.prototype);$b.prototype.constructor=$b;$b.prototype.isRawShaderMaterial=!0;Pa.prototype=Object.create(W.prototype);Pa.prototype.constructor=Pa;Pa.prototype.isMeshStandardMaterial=!0;Pa.prototype.copy=function(a){W.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(Pa.prototype);nb.prototype.constructor=nb;nb.prototype.isMeshPhysicalMaterial=!0;nb.prototype.copy=function(a){Pa.prototype.copy.call(this,a);this.defines={PHYSICAL:""};this.reflectivity=a.reflectivity;this.clearCoat=a.clearCoat;this.clearCoatRoughness=a.clearCoatRoughness;return this};Ha.prototype=Object.create(W.prototype);Ha.prototype.constructor=Ha;Ha.prototype.isMeshPhongMaterial=!0;Ha.prototype.copy=function(a){W.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);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=
|
|
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(Ha.prototype);ob.prototype.constructor=ob;ob.prototype.isMeshToonMaterial=!0;ob.prototype.copy=function(a){Ha.prototype.copy.call(this,a);this.gradientMap=a.gradientMap;return this};pb.prototype=Object.create(W.prototype);pb.prototype.constructor=pb;pb.prototype.isMeshNormalMaterial=!0;pb.prototype.copy=function(a){W.prototype.copy.call(this,a);this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;
|
|
Object.create(Ha.prototype);ob.prototype.constructor=ob;ob.prototype.isMeshToonMaterial=!0;ob.prototype.copy=function(a){Ha.prototype.copy.call(this,a);this.gradientMap=a.gradientMap;return this};pb.prototype=Object.create(W.prototype);pb.prototype.constructor=pb;pb.prototype.isMeshNormalMaterial=!0;pb.prototype.copy=function(a){W.prototype.copy.call(this,a);this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;
|