|
@@ -477,95 +477,96 @@ b);this.quaternion.multiply(te);return this},rotateOnWorldAxis:function(a,b){te.
|
|
|
a)},translateZ:function(a){return this.translateOnAxis(Bj,a)},localToWorld:function(a){return a.applyMatrix4(this.matrixWorld)},worldToLocal:function(a){return a.applyMatrix4(vc.getInverse(this.matrixWorld))},lookAt:function(a,b,d){a.isVector3?Hg.copy(a):Hg.set(a,b,d);a=this.parent;this.updateWorldMatrix(!0,!1);Ef.setFromMatrixPosition(this.matrixWorld);this.isCamera||this.isLight?vc.lookAt(Ef,Hg,this.up):vc.lookAt(Hg,Ef,this.up);this.quaternion.setFromRotationMatrix(vc);a&&(vc.extractRotation(a.matrixWorld),
|
|
|
te.setFromRotationMatrix(vc),this.quaternion.premultiply(te.inverse()))},add:function(a){if(1<arguments.length){for(var b=0;b<arguments.length;b++)this.add(arguments[b]);return this}if(a===this)return console.error("THREE.Object3D.add: object can't be added as a child of itself.",a),this;a&&a.isObject3D?(null!==a.parent&&a.parent.remove(a),a.parent=this,this.children.push(a),a.dispatchEvent(Rl)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",a);return this},remove:function(a){if(1<
|
|
|
arguments.length){for(var b=0;b<arguments.length;b++)this.remove(arguments[b]);return this}b=this.children.indexOf(a);-1!==b&&(a.parent=null,this.children.splice(b,1),a.dispatchEvent(Sl));return this},attach:function(a){this.updateWorldMatrix(!0,!1);vc.getInverse(this.matrixWorld);null!==a.parent&&(a.parent.updateWorldMatrix(!0,!1),vc.multiply(a.parent.matrixWorld));a.applyMatrix4(vc);a.updateWorldMatrix(!1,!1);this.add(a);return this},getObjectById:function(a){return this.getObjectByProperty("id",
|
|
|
-a)},getObjectByName:function(a){return this.getObjectByProperty("name",a)},getObjectByProperty:function(a,b){if(this[a]===b)return this;for(var d=0,e=this.children.length;d<e;d++){var f=this.children[d].getObjectByProperty(a,b);if(void 0!==f)return f}},getWorldPosition:function(a){void 0===a&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),a=new w);this.updateMatrixWorld(!0);return a.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(a){void 0===a&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),
|
|
|
-a=new ua);this.updateMatrixWorld(!0);this.matrixWorld.decompose(Ef,a,Pl);return a},getWorldScale:function(a){void 0===a&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),a=new w);this.updateMatrixWorld(!0);this.matrixWorld.decompose(Ef,Ql,a);return a},getWorldDirection:function(a){void 0===a&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),a=new w);this.updateMatrixWorld(!0);var b=this.matrixWorld.elements;return a.set(b[8],b[9],b[10]).normalize()},
|
|
|
-raycast:function(){},traverse:function(a){a(this);for(var b=this.children,d=0,e=b.length;d<e;d++)b[d].traverse(a)},traverseVisible:function(a){if(!1!==this.visible){a(this);for(var b=this.children,d=0,e=b.length;d<e;d++)b[d].traverseVisible(a)}},traverseAncestors:function(a){var b=this.parent;null!==b&&(a(b),b.traverseAncestors(a))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale);this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(a){this.matrixAutoUpdate&&
|
|
|
-this.updateMatrix();if(this.matrixWorldNeedsUpdate||a)null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,a=!0;for(var b=this.children,d=0,e=b.length;d<e;d++)b[d].updateMatrixWorld(a)},updateWorldMatrix:function(a,b){var d=this.parent;!0===a&&null!==d&&d.updateWorldMatrix(!0,!1);this.matrixAutoUpdate&&this.updateMatrix();null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,
|
|
|
-this.matrix);if(!0===b)for(a=this.children,b=0,d=a.length;b<d;b++)a[b].updateWorldMatrix(!1,!0)},toJSON:function(a){function b(n,p){void 0===n[p.uuid]&&(n[p.uuid]=p.toJSON(a));return p.uuid}function d(n){var p=[],t;for(t in n){var q=n[t];delete q.metadata;p.push(q)}return p}var e=void 0===a||"string"===typeof a,f={};e&&(a={geometries:{},materials:{},textures:{},images:{},shapes:{}},f.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var g={};g.uuid=this.uuid;g.type=this.type;""!==
|
|
|
-this.name&&(g.name=this.name);!0===this.castShadow&&(g.castShadow=!0);!0===this.receiveShadow&&(g.receiveShadow=!0);!1===this.visible&&(g.visible=!1);!1===this.frustumCulled&&(g.frustumCulled=!1);0!==this.renderOrder&&(g.renderOrder=this.renderOrder);"{}"!==JSON.stringify(this.userData)&&(g.userData=this.userData);g.layers=this.layers.mask;g.matrix=this.matrix.toArray();!1===this.matrixAutoUpdate&&(g.matrixAutoUpdate=!1);this.isInstancedMesh&&(g.type="InstancedMesh",g.count=this.count,g.instanceMatrix=
|
|
|
-this.instanceMatrix.toJSON());if(this.isMesh||this.isLine||this.isPoints){g.geometry=b(a.geometries,this.geometry);var h=this.geometry.parameters;if(void 0!==h&&void 0!==h.shapes)if(h=h.shapes,Array.isArray(h))for(var k=0,l=h.length;k<l;k++)b(a.shapes,h[k]);else b(a.shapes,h)}if(void 0!==this.material)if(Array.isArray(this.material)){h=[];k=0;for(l=this.material.length;k<l;k++)h.push(b(a.materials,this.material[k]));g.material=h}else g.material=b(a.materials,this.material);if(0<this.children.length)for(g.children=
|
|
|
-[],h=0;h<this.children.length;h++)g.children.push(this.children[h].toJSON(a).object);if(e){e=d(a.geometries);h=d(a.materials);k=d(a.textures);l=d(a.images);var m=d(a.shapes);0<e.length&&(f.geometries=e);0<h.length&&(f.materials=h);0<k.length&&(f.textures=k);0<l.length&&(f.images=l);0<m.length&&(f.shapes=m)}f.object=g;return f},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.rotation.order=
|
|
|
-a.rotation.order;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}});var ci=new w,Tl=new w,Ul=new Da,Na=function(a,b){Object.defineProperty(this,"isPlane",{value:!0});this.normal=void 0!==a?a:new w(1,0,0);this.constant=void 0!==b?b:0};Na.prototype.set=function(a,b){this.normal.copy(a);this.constant=b;return this};Na.prototype.setComponents=function(a,b,d,e){this.normal.set(a,b,d);this.constant=e;return this};Na.prototype.setFromNormalAndCoplanarPoint=function(a,b){this.normal.copy(a);this.constant=-b.dot(this.normal);return this};Na.prototype.setFromCoplanarPoints=
|
|
|
-function(a,b,d){b=ci.subVectors(d,b).cross(Tl.subVectors(a,b)).normalize();this.setFromNormalAndCoplanarPoint(b,a);return this};Na.prototype.clone=function(){return(new this.constructor).copy(this)};Na.prototype.copy=function(a){this.normal.copy(a.normal);this.constant=a.constant;return this};Na.prototype.normalize=function(){var a=1/this.normal.length();this.normal.multiplyScalar(a);this.constant*=a;return this};Na.prototype.negate=function(){this.constant*=-1;this.normal.negate();return this};Na.prototype.distanceToPoint=
|
|
|
-function(a){return this.normal.dot(a)+this.constant};Na.prototype.distanceToSphere=function(a){return this.distanceToPoint(a.center)-a.radius};Na.prototype.projectPoint=function(a,b){void 0===b&&(console.warn("THREE.Plane: .projectPoint() target is now required"),b=new w);return b.copy(this.normal).multiplyScalar(-this.distanceToPoint(a)).add(a)};Na.prototype.intersectLine=function(a,b){void 0===b&&(console.warn("THREE.Plane: .intersectLine() target is now required"),b=new w);var d=a.delta(ci),e=
|
|
|
-this.normal.dot(d);if(0===e){if(0===this.distanceToPoint(a.start))return b.copy(a.start)}else if(e=-(a.start.dot(this.normal)+this.constant)/e,!(0>e||1<e))return b.copy(d).multiplyScalar(e).add(a.start)};Na.prototype.intersectsLine=function(a){var b=this.distanceToPoint(a.start);a=this.distanceToPoint(a.end);return 0>b&&0<a||0>a&&0<b};Na.prototype.intersectsBox=function(a){return a.intersectsPlane(this)};Na.prototype.intersectsSphere=function(a){return a.intersectsPlane(this)};Na.prototype.coplanarPoint=
|
|
|
-function(a){void 0===a&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),a=new w);return a.copy(this.normal).multiplyScalar(-this.constant)};Na.prototype.applyMatrix4=function(a,b){b=b||Ul.getNormalMatrix(a);a=this.coplanarPoint(ci).applyMatrix4(a);b=this.normal.applyMatrix3(b).normalize();this.constant=-a.dot(b);return this};Na.prototype.translate=function(a){this.constant-=a.dot(this.normal);return this};Na.prototype.equals=function(a){return a.normal.equals(this.normal)&&a.constant===
|
|
|
-this.constant};var Yb=new w,wc=new w,di=new w,xc=new w,ue=new w,ve=new w,Cj=new w,ei=new w,fi=new w,gi=new w,Ga=function(a,b,d){this.a=void 0!==a?a:new w;this.b=void 0!==b?b:new w;this.c=void 0!==d?d:new w};Ga.getNormal=function(a,b,d,e){void 0===e&&(console.warn("THREE.Triangle: .getNormal() target is now required"),e=new w);e.subVectors(d,b);Yb.subVectors(a,b);e.cross(Yb);a=e.lengthSq();return 0<a?e.multiplyScalar(1/Math.sqrt(a)):e.set(0,0,0)};Ga.getBarycoord=function(a,b,d,e,f){Yb.subVectors(e,
|
|
|
-b);wc.subVectors(d,b);di.subVectors(a,b);a=Yb.dot(Yb);b=Yb.dot(wc);d=Yb.dot(di);var g=wc.dot(wc);e=wc.dot(di);var h=a*g-b*b;void 0===f&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),f=new w);if(0===h)return f.set(-2,-1,-1);h=1/h;g=(g*d-b*e)*h;a=(a*e-b*d)*h;return f.set(1-g-a,a,g)};Ga.containsPoint=function(a,b,d,e){this.getBarycoord(a,b,d,e,xc);return 0<=xc.x&&0<=xc.y&&1>=xc.x+xc.y};Ga.getUV=function(a,b,d,e,f,g,h,k){this.getBarycoord(a,b,d,e,xc);k.set(0,0);k.addScaledVector(f,
|
|
|
-xc.x);k.addScaledVector(g,xc.y);k.addScaledVector(h,xc.z);return k};Ga.isFrontFacing=function(a,b,d,e){Yb.subVectors(d,b);wc.subVectors(a,b);return 0>Yb.cross(wc).dot(e)?!0:!1};Ga.prototype.set=function(a,b,d){this.a.copy(a);this.b.copy(b);this.c.copy(d);return this};Ga.prototype.setFromPointsAndIndices=function(a,b,d,e){this.a.copy(a[b]);this.b.copy(a[d]);this.c.copy(a[e]);return this};Ga.prototype.clone=function(){return(new this.constructor).copy(this)};Ga.prototype.copy=function(a){this.a.copy(a.a);
|
|
|
-this.b.copy(a.b);this.c.copy(a.c);return this};Ga.prototype.getArea=function(){Yb.subVectors(this.c,this.b);wc.subVectors(this.a,this.b);return.5*Yb.cross(wc).length()};Ga.prototype.getMidpoint=function(a){void 0===a&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),a=new w);return a.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)};Ga.prototype.getNormal=function(a){return Ga.getNormal(this.a,this.b,this.c,a)};Ga.prototype.getPlane=function(a){void 0===a&&(console.warn("THREE.Triangle: .getPlane() target is now required"),
|
|
|
-a=new Na);return a.setFromCoplanarPoints(this.a,this.b,this.c)};Ga.prototype.getBarycoord=function(a,b){return Ga.getBarycoord(a,this.a,this.b,this.c,b)};Ga.prototype.getUV=function(a,b,d,e,f){return Ga.getUV(a,this.a,this.b,this.c,b,d,e,f)};Ga.prototype.containsPoint=function(a){return Ga.containsPoint(a,this.a,this.b,this.c)};Ga.prototype.isFrontFacing=function(a){return Ga.isFrontFacing(this.a,this.b,this.c,a)};Ga.prototype.intersectsBox=function(a){return a.intersectsTriangle(this)};Ga.prototype.closestPointToPoint=
|
|
|
-function(a,b){void 0===b&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),b=new w);var d=this.a,e=this.b,f=this.c;ue.subVectors(e,d);ve.subVectors(f,d);ei.subVectors(a,d);var g=ue.dot(ei),h=ve.dot(ei);if(0>=g&&0>=h)return b.copy(d);fi.subVectors(a,e);var k=ue.dot(fi),l=ve.dot(fi);if(0<=k&&l<=k)return b.copy(e);var m=g*l-k*h;if(0>=m&&0<=g&&0>=k)return e=g/(g-k),b.copy(d).addScaledVector(ue,e);gi.subVectors(a,f);a=ue.dot(gi);var n=ve.dot(gi);if(0<=n&&a<=n)return b.copy(f);
|
|
|
-g=a*h-g*n;if(0>=g&&0<=h&&0>=n)return m=h/(h-n),b.copy(d).addScaledVector(ve,m);h=k*n-a*l;if(0>=h&&0<=l-k&&0<=a-n)return Cj.subVectors(f,e),m=(l-k)/(l-k+(a-n)),b.copy(e).addScaledVector(Cj,m);f=1/(h+g+m);e=g*f;m*=f;return b.copy(d).addScaledVector(ue,e).addScaledVector(ve,m)};Ga.prototype.equals=function(a){return a.a.equals(this.a)&&a.b.equals(this.b)&&a.c.equals(this.c)};var Dj={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,
|
|
|
-blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,
|
|
|
-darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,
|
|
|
-lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,
|
|
|
-mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,
|
|
|
-purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},
|
|
|
-Bb={h:0,s:0,l:0},Ig={h:0,s:0,l:0},S=function(a,b,d){Object.defineProperty(this,"isColor",{value:!0});return void 0===b&&void 0===d?this.set(a):this.setRGB(a,b,d)};S.prototype.set=function(a){a&&a.isColor?this.copy(a):"number"===typeof a?this.setHex(a):"string"===typeof a&&this.setStyle(a);return this};S.prototype.setScalar=function(a){this.b=this.g=this.r=a;return this};S.prototype.setHex=function(a){a=Math.floor(a);this.r=(a>>16&255)/255;this.g=(a>>8&255)/255;this.b=(a&255)/255;return this};S.prototype.setRGB=
|
|
|
-function(a,b,d){this.r=a;this.g=b;this.b=d;return this};S.prototype.setHSL=function(a,b,d){a=xa.euclideanModulo(a,1);b=xa.clamp(b,0,1);d=xa.clamp(d,0,1);0===b?this.r=this.g=this.b=d:(b=.5>=d?d*(1+b):d+b-d*b,d=2*d-b,this.r=fh(d,b,a+1/3),this.g=fh(d,b,a),this.b=fh(d,b,a-1/3));return this};S.prototype.setStyle=function(a){function b(h){void 0!==h&&1>parseFloat(h)&&console.warn("THREE.Color: Alpha component of "+a+" will be ignored.")}var d;if(d=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(a)){var e=d[2];switch(d[1]){case "rgb":case "rgba":if(d=
|
|
|
-/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(e))return this.r=Math.min(255,parseInt(d[1],10))/255,this.g=Math.min(255,parseInt(d[2],10))/255,this.b=Math.min(255,parseInt(d[3],10))/255,b(d[5]),this;if(d=/^(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(e))return this.r=Math.min(100,parseInt(d[1],10))/100,this.g=Math.min(100,parseInt(d[2],10))/100,this.b=Math.min(100,parseInt(d[3],10))/100,b(d[5]),this;break;case "hsl":case "hsla":if(d=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(e)){e=
|
|
|
-parseFloat(d[1])/360;var f=parseInt(d[2],10)/100,g=parseInt(d[3],10)/100;b(d[5]);return this.setHSL(e,f,g)}}}else if(d=/^#([A-Fa-f0-9]+)$/.exec(a)){d=d[1];e=d.length;if(3===e)return this.r=parseInt(d.charAt(0)+d.charAt(0),16)/255,this.g=parseInt(d.charAt(1)+d.charAt(1),16)/255,this.b=parseInt(d.charAt(2)+d.charAt(2),16)/255,this;if(6===e)return this.r=parseInt(d.charAt(0)+d.charAt(1),16)/255,this.g=parseInt(d.charAt(2)+d.charAt(3),16)/255,this.b=parseInt(d.charAt(4)+d.charAt(5),16)/255,this}return a&&
|
|
|
-0<a.length?this.setColorName(a):this};S.prototype.setColorName=function(a){var b=Dj[a];void 0!==b?this.setHex(b):console.warn("THREE.Color: Unknown color "+a);return this};S.prototype.clone=function(){return new this.constructor(this.r,this.g,this.b)};S.prototype.copy=function(a){this.r=a.r;this.g=a.g;this.b=a.b;return this};S.prototype.copyGammaToLinear=function(a,b){void 0===b&&(b=2);this.r=Math.pow(a.r,b);this.g=Math.pow(a.g,b);this.b=Math.pow(a.b,b);return this};S.prototype.copyLinearToGamma=
|
|
|
-function(a,b){void 0===b&&(b=2);b=0<b?1/b:1;this.r=Math.pow(a.r,b);this.g=Math.pow(a.g,b);this.b=Math.pow(a.b,b);return this};S.prototype.convertGammaToLinear=function(a){this.copyGammaToLinear(this,a);return this};S.prototype.convertLinearToGamma=function(a){this.copyLinearToGamma(this,a);return this};S.prototype.copySRGBToLinear=function(a){this.r=gh(a.r);this.g=gh(a.g);this.b=gh(a.b);return this};S.prototype.copyLinearToSRGB=function(a){this.r=hh(a.r);this.g=hh(a.g);this.b=hh(a.b);return this};
|
|
|
-S.prototype.convertSRGBToLinear=function(){this.copySRGBToLinear(this);return this};S.prototype.convertLinearToSRGB=function(){this.copyLinearToSRGB(this);return this};S.prototype.getHex=function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0};S.prototype.getHexString=function(){return("000000"+this.getHex().toString(16)).slice(-6)};S.prototype.getHSL=function(a){void 0===a&&(console.warn("THREE.Color: .getHSL() target is now required"),a={h:0,s:0,l:0});var b=this.r,d=this.g,e=this.b,f=Math.max(b,
|
|
|
-d,e),g=Math.min(b,d,e),h,k=(g+f)/2;if(g===f)g=h=0;else{var l=f-g;g=.5>=k?l/(f+g):l/(2-f-g);switch(f){case b:h=(d-e)/l+(d<e?6:0);break;case d:h=(e-b)/l+2;break;case e:h=(b-d)/l+4}h/=6}a.h=h;a.s=g;a.l=k;return a};S.prototype.getStyle=function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"};S.prototype.offsetHSL=function(a,b,d){this.getHSL(Bb);Bb.h+=a;Bb.s+=b;Bb.l+=d;this.setHSL(Bb.h,Bb.s,Bb.l);return this};S.prototype.add=function(a){this.r+=a.r;this.g+=a.g;this.b+=a.b;return this};
|
|
|
-S.prototype.addColors=function(a,b){this.r=a.r+b.r;this.g=a.g+b.g;this.b=a.b+b.b;return this};S.prototype.addScalar=function(a){this.r+=a;this.g+=a;this.b+=a;return this};S.prototype.sub=function(a){this.r=Math.max(0,this.r-a.r);this.g=Math.max(0,this.g-a.g);this.b=Math.max(0,this.b-a.b);return this};S.prototype.multiply=function(a){this.r*=a.r;this.g*=a.g;this.b*=a.b;return this};S.prototype.multiplyScalar=function(a){this.r*=a;this.g*=a;this.b*=a;return this};S.prototype.lerp=function(a,b){this.r+=
|
|
|
-(a.r-this.r)*b;this.g+=(a.g-this.g)*b;this.b+=(a.b-this.b)*b;return this};S.prototype.lerpHSL=function(a,b){this.getHSL(Bb);a.getHSL(Ig);a=xa.lerp(Bb.h,Ig.h,b);var d=xa.lerp(Bb.s,Ig.s,b);b=xa.lerp(Bb.l,Ig.l,b);this.setHSL(a,d,b);return this};S.prototype.equals=function(a){return a.r===this.r&&a.g===this.g&&a.b===this.b};S.prototype.fromArray=function(a,b){void 0===b&&(b=0);this.r=a[b];this.g=a[b+1];this.b=a[b+2];return this};S.prototype.toArray=function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=
|
|
|
-this.r;a[b+1]=this.g;a[b+2]=this.b;return a};S.prototype.fromBufferAttribute=function(a,b){this.r=a.getX(b);this.g=a.getY(b);this.b=a.getZ(b);!0===a.normalized&&(this.r/=255,this.g/=255,this.b/=255);return this};S.prototype.toJSON=function(){return this.getHex()};S.NAMES=Dj;S.prototype.r=1;S.prototype.g=1;S.prototype.b=1;var ad=function(a,b,d,e,f,g){this.a=a;this.b=b;this.c=d;this.normal=e&&e.isVector3?e:new w;this.vertexNormals=Array.isArray(e)?e:[];this.color=f&&f.isColor?f:new S;this.vertexColors=
|
|
|
-Array.isArray(f)?f:[];this.materialIndex=void 0!==g?g:0};ad.prototype.clone=function(){return(new this.constructor).copy(this)};ad.prototype.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,d=a.vertexNormals.length;b<d;b++)this.vertexNormals[b]=a.vertexNormals[b].clone();b=0;for(d=a.vertexColors.length;b<d;b++)this.vertexColors[b]=a.vertexColors[b].clone();return this};var jk=0;ra.prototype=Object.assign(Object.create(wb.prototype),
|
|
|
-{constructor:ra,isMaterial:!0,onBeforeCompile:function(){},customProgramCacheKey:function(){return this.onBeforeCompile.toString()},setValues:function(a){if(void 0!==a)for(var b in a){var d=a[b];if(void 0===d)console.warn("THREE.Material: '"+b+"' parameter is undefined.");else if("shading"===b)console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===d?!0:!1;else{var e=this[b];void 0===e?console.warn("THREE."+this.type+": '"+b+"' is not a property of this material."):
|
|
|
-e&&e.isColor?e.set(d):e&&e.isVector3&&d&&d.isVector3?e.copy(d):this[b]=d}}},toJSON:function(a){function b(f){var g=[],h;for(h in f){var k=f[h];delete k.metadata;g.push(k)}return g}var d=void 0===a||"string"===typeof a;d&&(a={textures:{},images:{}});var e={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};e.uuid=this.uuid;e.type=this.type;""!==this.name&&(e.name=this.name);this.color&&this.color.isColor&&(e.color=this.color.getHex());void 0!==this.roughness&&(e.roughness=this.roughness);
|
|
|
-void 0!==this.metalness&&(e.metalness=this.metalness);this.sheen&&this.sheen.isColor&&(e.sheen=this.sheen.getHex());this.emissive&&this.emissive.isColor&&(e.emissive=this.emissive.getHex());this.emissiveIntensity&&1!==this.emissiveIntensity&&(e.emissiveIntensity=this.emissiveIntensity);this.specular&&this.specular.isColor&&(e.specular=this.specular.getHex());void 0!==this.shininess&&(e.shininess=this.shininess);void 0!==this.clearcoat&&(e.clearcoat=this.clearcoat);void 0!==this.clearcoatRoughness&&
|
|
|
-(e.clearcoatRoughness=this.clearcoatRoughness);this.clearcoatMap&&this.clearcoatMap.isTexture&&(e.clearcoatMap=this.clearcoatMap.toJSON(a).uuid);this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(e.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(a).uuid);this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(e.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(a).uuid,e.clearcoatNormalScale=this.clearcoatNormalScale.toArray());this.map&&this.map.isTexture&&(e.map=this.map.toJSON(a).uuid);
|
|
|
-this.matcap&&this.matcap.isTexture&&(e.matcap=this.matcap.toJSON(a).uuid);this.alphaMap&&this.alphaMap.isTexture&&(e.alphaMap=this.alphaMap.toJSON(a).uuid);this.lightMap&&this.lightMap.isTexture&&(e.lightMap=this.lightMap.toJSON(a).uuid);this.aoMap&&this.aoMap.isTexture&&(e.aoMap=this.aoMap.toJSON(a).uuid,e.aoMapIntensity=this.aoMapIntensity);this.bumpMap&&this.bumpMap.isTexture&&(e.bumpMap=this.bumpMap.toJSON(a).uuid,e.bumpScale=this.bumpScale);this.normalMap&&this.normalMap.isTexture&&(e.normalMap=
|
|
|
-this.normalMap.toJSON(a).uuid,e.normalMapType=this.normalMapType,e.normalScale=this.normalScale.toArray());this.displacementMap&&this.displacementMap.isTexture&&(e.displacementMap=this.displacementMap.toJSON(a).uuid,e.displacementScale=this.displacementScale,e.displacementBias=this.displacementBias);this.roughnessMap&&this.roughnessMap.isTexture&&(e.roughnessMap=this.roughnessMap.toJSON(a).uuid);this.metalnessMap&&this.metalnessMap.isTexture&&(e.metalnessMap=this.metalnessMap.toJSON(a).uuid);this.emissiveMap&&
|
|
|
-this.emissiveMap.isTexture&&(e.emissiveMap=this.emissiveMap.toJSON(a).uuid);this.specularMap&&this.specularMap.isTexture&&(e.specularMap=this.specularMap.toJSON(a).uuid);this.envMap&&this.envMap.isTexture&&(e.envMap=this.envMap.toJSON(a).uuid,e.reflectivity=this.reflectivity,e.refractionRatio=this.refractionRatio,void 0!==this.combine&&(e.combine=this.combine),void 0!==this.envMapIntensity&&(e.envMapIntensity=this.envMapIntensity));this.gradientMap&&this.gradientMap.isTexture&&(e.gradientMap=this.gradientMap.toJSON(a).uuid);
|
|
|
-void 0!==this.size&&(e.size=this.size);void 0!==this.sizeAttenuation&&(e.sizeAttenuation=this.sizeAttenuation);1!==this.blending&&(e.blending=this.blending);!0===this.flatShading&&(e.flatShading=this.flatShading);0!==this.side&&(e.side=this.side);this.vertexColors&&(e.vertexColors=!0);1>this.opacity&&(e.opacity=this.opacity);!0===this.transparent&&(e.transparent=this.transparent);e.depthFunc=this.depthFunc;e.depthTest=this.depthTest;e.depthWrite=this.depthWrite;e.stencilWrite=this.stencilWrite;e.stencilWriteMask=
|
|
|
-this.stencilWriteMask;e.stencilFunc=this.stencilFunc;e.stencilRef=this.stencilRef;e.stencilFuncMask=this.stencilFuncMask;e.stencilFail=this.stencilFail;e.stencilZFail=this.stencilZFail;e.stencilZPass=this.stencilZPass;this.rotation&&0!==this.rotation&&(e.rotation=this.rotation);!0===this.polygonOffset&&(e.polygonOffset=!0);0!==this.polygonOffsetFactor&&(e.polygonOffsetFactor=this.polygonOffsetFactor);0!==this.polygonOffsetUnits&&(e.polygonOffsetUnits=this.polygonOffsetUnits);this.linewidth&&1!==this.linewidth&&
|
|
|
-(e.linewidth=this.linewidth);void 0!==this.dashSize&&(e.dashSize=this.dashSize);void 0!==this.gapSize&&(e.gapSize=this.gapSize);void 0!==this.scale&&(e.scale=this.scale);!0===this.dithering&&(e.dithering=!0);0<this.alphaTest&&(e.alphaTest=this.alphaTest);!0===this.premultipliedAlpha&&(e.premultipliedAlpha=this.premultipliedAlpha);!0===this.wireframe&&(e.wireframe=this.wireframe);1<this.wireframeLinewidth&&(e.wireframeLinewidth=this.wireframeLinewidth);"round"!==this.wireframeLinecap&&(e.wireframeLinecap=
|
|
|
-this.wireframeLinecap);"round"!==this.wireframeLinejoin&&(e.wireframeLinejoin=this.wireframeLinejoin);!0===this.morphTargets&&(e.morphTargets=!0);!0===this.morphNormals&&(e.morphNormals=!0);!0===this.skinning&&(e.skinning=!0);!1===this.visible&&(e.visible=!1);!1===this.toneMapped&&(e.toneMapped=!1);"{}"!==JSON.stringify(this.userData)&&(e.userData=this.userData);d&&(d=b(a.textures),a=b(a.images),0<d.length&&(e.textures=d),0<a.length&&(e.images=a));return e},clone:function(){return(new this.constructor).copy(this)},
|
|
|
-copy:function(a){this.name=a.name;this.fog=a.fog;this.blending=a.blending;this.side=a.side;this.flatShading=a.flatShading;this.vertexColors=a.vertexColors;this.opacity=a.opacity;this.transparent=a.transparent;this.blendSrc=a.blendSrc;this.blendDst=a.blendDst;this.blendEquation=a.blendEquation;this.blendSrcAlpha=a.blendSrcAlpha;this.blendDstAlpha=a.blendDstAlpha;this.blendEquationAlpha=a.blendEquationAlpha;this.depthFunc=a.depthFunc;this.depthTest=a.depthTest;this.depthWrite=a.depthWrite;this.stencilWriteMask=
|
|
|
-a.stencilWriteMask;this.stencilFunc=a.stencilFunc;this.stencilRef=a.stencilRef;this.stencilFuncMask=a.stencilFuncMask;this.stencilFail=a.stencilFail;this.stencilZFail=a.stencilZFail;this.stencilZPass=a.stencilZPass;this.stencilWrite=a.stencilWrite;var b=a.clippingPlanes,d=null;if(null!==b){var e=b.length;d=Array(e);for(var f=0;f!==e;++f)d[f]=b[f].clone()}this.clippingPlanes=d;this.clipIntersection=a.clipIntersection;this.clipShadows=a.clipShadows;this.shadowSide=a.shadowSide;this.colorWrite=a.colorWrite;
|
|
|
-this.precision=a.precision;this.polygonOffset=a.polygonOffset;this.polygonOffsetFactor=a.polygonOffsetFactor;this.polygonOffsetUnits=a.polygonOffsetUnits;this.dithering=a.dithering;this.alphaTest=a.alphaTest;this.premultipliedAlpha=a.premultipliedAlpha;this.visible=a.visible;this.toneMapped=a.toneMapped;this.userData=JSON.parse(JSON.stringify(a.userData));return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});Object.defineProperty(ra.prototype,"needsUpdate",{set:function(a){!0===
|
|
|
-a&&this.version++}});Kb.prototype=Object.create(ra.prototype);Kb.prototype.constructor=Kb;Kb.prototype.isMeshBasicMaterial=!0;Kb.prototype.copy=function(a){ra.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.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;return this};var Ua=new w,Jg=new L;Object.defineProperty(pa.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(pa.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setUsage:function(a){this.usage=a;return this},copy:function(a){this.name=
|
|
|
-a.name;this.array=new a.array.constructor(a.array);this.itemSize=a.itemSize;this.count=a.count;this.normalized=a.normalized;this.usage=a.usage;return this},copyAt:function(a,b,d){a*=this.itemSize;d*=b.itemSize;for(var e=0,f=this.itemSize;e<f;e++)this.array[a+e]=b.array[d+e];return this},copyArray:function(a){this.array.set(a);return this},copyColorsArray:function(a){for(var b=this.array,d=0,e=0,f=a.length;e<f;e++){var g=a[e];void 0===g&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",
|
|
|
-e),g=new S);b[d++]=g.r;b[d++]=g.g;b[d++]=g.b}return this},copyVector2sArray:function(a){for(var b=this.array,d=0,e=0,f=a.length;e<f;e++){var g=a[e];void 0===g&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",e),g=new L);b[d++]=g.x;b[d++]=g.y}return this},copyVector3sArray:function(a){for(var b=this.array,d=0,e=0,f=a.length;e<f;e++){var g=a[e];void 0===g&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",e),g=new w);b[d++]=g.x;b[d++]=g.y;
|
|
|
-b[d++]=g.z}return this},copyVector4sArray:function(a){for(var b=this.array,d=0,e=0,f=a.length;e<f;e++){var g=a[e];void 0===g&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",e),g=new ca);b[d++]=g.x;b[d++]=g.y;b[d++]=g.z;b[d++]=g.w}return this},applyMatrix3:function(a){if(2===this.itemSize)for(var b=0,d=this.count;b<d;b++)Jg.fromBufferAttribute(this,b),Jg.applyMatrix3(a),this.setXY(b,Jg.x,Jg.y);else if(3===this.itemSize)for(b=0,d=this.count;b<d;b++)Ua.fromBufferAttribute(this,
|
|
|
-b),Ua.applyMatrix3(a),this.setXYZ(b,Ua.x,Ua.y,Ua.z);return this},applyMatrix4:function(a){for(var b=0,d=this.count;b<d;b++)Ua.x=this.getX(b),Ua.y=this.getY(b),Ua.z=this.getZ(b),Ua.applyMatrix4(a),this.setXYZ(b,Ua.x,Ua.y,Ua.z);return this},applyNormalMatrix:function(a){for(var b=0,d=this.count;b<d;b++)Ua.x=this.getX(b),Ua.y=this.getY(b),Ua.z=this.getZ(b),Ua.applyNormalMatrix(a),this.setXYZ(b,Ua.x,Ua.y,Ua.z);return this},transformDirection:function(a){for(var b=0,d=this.count;b<d;b++)Ua.x=this.getX(b),
|
|
|
-Ua.y=this.getY(b),Ua.z=this.getZ(b),Ua.transformDirection(a),this.setXYZ(b,Ua.x,Ua.y,Ua.z);return this},set:function(a,b){void 0===b&&(b=0);this.array.set(a,b);return this},getX:function(a){return this.array[a*this.itemSize]},setX:function(a,b){this.array[a*this.itemSize]=b;return this},getY:function(a){return this.array[a*this.itemSize+1]},setY:function(a,b){this.array[a*this.itemSize+1]=b;return this},getZ:function(a){return this.array[a*this.itemSize+2]},setZ:function(a,b){this.array[a*this.itemSize+
|
|
|
-2]=b;return this},getW:function(a){return this.array[a*this.itemSize+3]},setW:function(a,b){this.array[a*this.itemSize+3]=b;return this},setXY:function(a,b,d){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=d;return this},setXYZ:function(a,b,d,e){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=d;this.array[a+2]=e;return this},setXYZW:function(a,b,d,e,f){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=d;this.array[a+2]=e;this.array[a+3]=f;return this},onUpload:function(a){this.onUploadCallback=
|
|
|
-a;return this},clone:function(){return(new this.constructor(this.array,this.itemSize)).copy(this)},toJSON:function(){return{itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized}}});Ce.prototype=Object.create(pa.prototype);Ce.prototype.constructor=Ce;De.prototype=Object.create(pa.prototype);De.prototype.constructor=De;Ee.prototype=Object.create(pa.prototype);Ee.prototype.constructor=Ee;Fe.prototype=Object.create(pa.prototype);
|
|
|
-Fe.prototype.constructor=Fe;Zc.prototype=Object.create(pa.prototype);Zc.prototype.constructor=Zc;Ge.prototype=Object.create(pa.prototype);Ge.prototype.constructor=Ge;$c.prototype=Object.create(pa.prototype);$c.prototype.constructor=$c;ea.prototype=Object.create(pa.prototype);ea.prototype.constructor=ea;He.prototype=Object.create(pa.prototype);He.prototype.constructor=He;var hi=function(){this.vertices=[];this.normals=[];this.colors=[];this.uvs=[];this.uvs2=[];this.groups=[];this.morphTargets={};this.skinWeights=
|
|
|
-[];this.skinIndices=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.uvsNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.verticesNeedUpdate=!1};hi.prototype.computeGroups=function(a){var b=[],d=void 0,e=a.faces;for(a=0;a<e.length;a++){var f=e[a];if(f.materialIndex!==d){d=f.materialIndex;void 0!==g&&(g.count=3*a-g.start,b.push(g));var g={start:3*a,materialIndex:d}}}void 0!==g&&(g.count=3*a-g.start,b.push(g));this.groups=b};hi.prototype.fromGeometry=function(a){var b=
|
|
|
-a.faces,d=a.vertices,e=a.faceVertexUvs,f=e[0]&&0<e[0].length,g=e[1]&&0<e[1].length,h=a.morphTargets,k=h.length;if(0<k){var l=[];for(var m=0;m<k;m++)l[m]={name:h[m].name,data:[]};this.morphTargets.position=l}m=a.morphNormals;var n=m.length;if(0<n){var p=[];for(var t=0;t<n;t++)p[t]={name:m[t].name,data:[]};this.morphTargets.normal=p}t=a.skinIndices;var q=a.skinWeights,v=t.length===d.length,u=q.length===d.length;0<d.length&&0===b.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");
|
|
|
-for(var A=0;A<b.length;A++){var B=b[A];this.vertices.push(d[B.a],d[B.b],d[B.c]);var D=B.vertexNormals;3===D.length?this.normals.push(D[0],D[1],D[2]):(D=B.normal,this.normals.push(D,D,D));D=B.vertexColors;3===D.length?this.colors.push(D[0],D[1],D[2]):(D=B.color,this.colors.push(D,D,D));!0===f&&(D=e[0][A],void 0!==D?this.uvs.push(D[0],D[1],D[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",A),this.uvs.push(new L,new L,new L)));!0===g&&(D=e[1][A],void 0!==D?this.uvs2.push(D[0],
|
|
|
-D[1],D[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",A),this.uvs2.push(new L,new L,new L)));for(D=0;D<k;D++){var G=h[D].vertices;l[D].data.push(G[B.a],G[B.b],G[B.c])}for(D=0;D<n;D++)G=m[D].vertexNormals[A],p[D].data.push(G.a,G.b,G.c);v&&this.skinIndices.push(t[B.a],t[B.b],t[B.c]);u&&this.skinWeights.push(q[B.a],q[B.b],q[B.c])}this.computeGroups(a);this.verticesNeedUpdate=a.verticesNeedUpdate;this.normalsNeedUpdate=a.normalsNeedUpdate;this.colorsNeedUpdate=a.colorsNeedUpdate;
|
|
|
-this.uvsNeedUpdate=a.uvsNeedUpdate;this.groupsNeedUpdate=a.groupsNeedUpdate;null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());return this};var kk=1,ic=new da,ii=new ha,we=new w,Jb=new za,Ff=new za,jb=new w;ka.prototype=Object.assign(Object.create(wb.prototype),{constructor:ka,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(a){Array.isArray(a)?this.index=new (65535<vi(a)?$c:Zc)(a,1):this.index=
|
|
|
-a},getAttribute:function(a){return this.attributes[a]},setAttribute:function(a,b){this.attributes[a]=b;return this},deleteAttribute:function(a){delete this.attributes[a];return this},addGroup:function(a,b,d){this.groups.push({start:a,count:b,materialIndex:void 0!==d?d:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(a,b){this.drawRange.start=a;this.drawRange.count=b},applyMatrix4:function(a){var b=this.attributes.position;void 0!==b&&(b.applyMatrix4(a),b.needsUpdate=!0);b=this.attributes.normal;
|
|
|
-if(void 0!==b){var d=(new Da).getNormalMatrix(a);b.applyNormalMatrix(d);b.needsUpdate=!0}b=this.attributes.tangent;void 0!==b&&(b.transformDirection(a),b.needsUpdate=!0);null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();return this},rotateX:function(a){ic.makeRotationX(a);this.applyMatrix4(ic);return this},rotateY:function(a){ic.makeRotationY(a);this.applyMatrix4(ic);return this},rotateZ:function(a){ic.makeRotationZ(a);this.applyMatrix4(ic);
|
|
|
-return this},translate:function(a,b,d){ic.makeTranslation(a,b,d);this.applyMatrix4(ic);return this},scale:function(a,b,d){ic.makeScale(a,b,d);this.applyMatrix4(ic);return this},lookAt:function(a){ii.lookAt(a);ii.updateMatrix();this.applyMatrix4(ii.matrix);return this},center:function(){this.computeBoundingBox();this.boundingBox.getCenter(we).negate();this.translate(we.x,we.y,we.z);return this},setFromObject:function(a){var b=a.geometry;if(a.isPoints||a.isLine){a=new ea(3*b.vertices.length,3);var d=
|
|
|
-new ea(3*b.colors.length,3);this.setAttribute("position",a.copyVector3sArray(b.vertices));this.setAttribute("color",d.copyColorsArray(b.colors));b.lineDistances&&b.lineDistances.length===b.vertices.length&&(a=new ea(b.lineDistances.length,1),this.setAttribute("lineDistance",a.copyArray(b.lineDistances)));null!==b.boundingSphere&&(this.boundingSphere=b.boundingSphere.clone());null!==b.boundingBox&&(this.boundingBox=b.boundingBox.clone())}else a.isMesh&&b&&b.isGeometry&&this.fromGeometry(b);return this},
|
|
|
-setFromPoints:function(a){for(var b=[],d=0,e=a.length;d<e;d++){var f=a[d];b.push(f.x,f.y,f.z||0)}this.setAttribute("position",new ea(b,3));return this},updateFromObject:function(a){var b=a.geometry;if(a.isMesh){var d=b.__directGeometry;!0===b.elementsNeedUpdate&&(d=void 0,b.elementsNeedUpdate=!1);if(void 0===d)return this.fromGeometry(b);d.verticesNeedUpdate=b.verticesNeedUpdate;d.normalsNeedUpdate=b.normalsNeedUpdate;d.colorsNeedUpdate=b.colorsNeedUpdate;d.uvsNeedUpdate=b.uvsNeedUpdate;d.groupsNeedUpdate=
|
|
|
-b.groupsNeedUpdate;b.verticesNeedUpdate=!1;b.normalsNeedUpdate=!1;b.colorsNeedUpdate=!1;b.uvsNeedUpdate=!1;b.groupsNeedUpdate=!1;b=d}!0===b.verticesNeedUpdate&&(d=this.attributes.position,void 0!==d&&(d.copyVector3sArray(b.vertices),d.needsUpdate=!0),b.verticesNeedUpdate=!1);!0===b.normalsNeedUpdate&&(d=this.attributes.normal,void 0!==d&&(d.copyVector3sArray(b.normals),d.needsUpdate=!0),b.normalsNeedUpdate=!1);!0===b.colorsNeedUpdate&&(d=this.attributes.color,void 0!==d&&(d.copyColorsArray(b.colors),
|
|
|
-d.needsUpdate=!0),b.colorsNeedUpdate=!1);b.uvsNeedUpdate&&(d=this.attributes.uv,void 0!==d&&(d.copyVector2sArray(b.uvs),d.needsUpdate=!0),b.uvsNeedUpdate=!1);b.lineDistancesNeedUpdate&&(d=this.attributes.lineDistance,void 0!==d&&(d.copyArray(b.lineDistances),d.needsUpdate=!0),b.lineDistancesNeedUpdate=!1);b.groupsNeedUpdate&&(b.computeGroups(a.geometry),this.groups=b.groups,b.groupsNeedUpdate=!1);return this},fromGeometry:function(a){a.__directGeometry=(new hi).fromGeometry(a);return this.fromDirectGeometry(a.__directGeometry)},
|
|
|
-fromDirectGeometry:function(a){var b=new Float32Array(3*a.vertices.length);this.setAttribute("position",(new pa(b,3)).copyVector3sArray(a.vertices));0<a.normals.length&&(b=new Float32Array(3*a.normals.length),this.setAttribute("normal",(new pa(b,3)).copyVector3sArray(a.normals)));0<a.colors.length&&(b=new Float32Array(3*a.colors.length),this.setAttribute("color",(new pa(b,3)).copyColorsArray(a.colors)));0<a.uvs.length&&(b=new Float32Array(2*a.uvs.length),this.setAttribute("uv",(new pa(b,2)).copyVector2sArray(a.uvs)));
|
|
|
-0<a.uvs2.length&&(b=new Float32Array(2*a.uvs2.length),this.setAttribute("uv2",(new pa(b,2)).copyVector2sArray(a.uvs2)));this.groups=a.groups;for(var d in a.morphTargets){b=[];for(var e=a.morphTargets[d],f=0,g=e.length;f<g;f++){var h=e[f],k=new ea(3*h.data.length,3);k.name=h.name;b.push(k.copyVector3sArray(h.data))}this.morphAttributes[d]=b}0<a.skinIndices.length&&(d=new ea(4*a.skinIndices.length,4),this.setAttribute("skinIndex",d.copyVector4sArray(a.skinIndices)));0<a.skinWeights.length&&(d=new ea(4*
|
|
|
-a.skinWeights.length,4),this.setAttribute("skinWeight",d.copyVector4sArray(a.skinWeights)));null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());return this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new za);var a=this.attributes.position,b=this.morphAttributes.position;if(a&&a.isGLBufferAttribute)console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',
|
|
|
-this),this.boundingBox.set(new w(-Infinity,-Infinity,-Infinity),new w(Infinity,Infinity,Infinity));else{if(void 0!==a){if(this.boundingBox.setFromBufferAttribute(a),b){a=0;for(var d=b.length;a<d;a++)Jb.setFromBufferAttribute(b[a]),this.morphTargetsRelative?(jb.addVectors(this.boundingBox.min,Jb.min),this.boundingBox.expandByPoint(jb),jb.addVectors(this.boundingBox.max,Jb.max),this.boundingBox.expandByPoint(jb)):(this.boundingBox.expandByPoint(Jb.min),this.boundingBox.expandByPoint(Jb.max))}}else this.boundingBox.makeEmpty();
|
|
|
-(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new Wa);var a=this.attributes.position,b=this.morphAttributes.position;if(a&&a.isGLBufferAttribute)console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',
|
|
|
-this),this.boundingSphere.set(new w,Infinity);else if(a){var d=this.boundingSphere.center;Jb.setFromBufferAttribute(a);if(b)for(var e=0,f=b.length;e<f;e++)Ff.setFromBufferAttribute(b[e]),this.morphTargetsRelative?(jb.addVectors(Jb.min,Ff.min),Jb.expandByPoint(jb),jb.addVectors(Jb.max,Ff.max),Jb.expandByPoint(jb)):(Jb.expandByPoint(Ff.min),Jb.expandByPoint(Ff.max));Jb.getCenter(d);f=e=0;for(var g=a.count;f<g;f++)jb.fromBufferAttribute(a,f),e=Math.max(e,d.distanceToSquared(jb));if(b)for(f=0,g=b.length;f<
|
|
|
-g;f++)for(var h=b[f],k=this.morphTargetsRelative,l=0,m=h.count;l<m;l++)jb.fromBufferAttribute(h,l),k&&(we.fromBufferAttribute(a,l),jb.add(we)),e=Math.max(e,d.distanceToSquared(jb));this.boundingSphere.radius=Math.sqrt(e);isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}},computeFaceNormals:function(){},computeVertexNormals:function(){var a=this.index,b=this.getAttribute("position");
|
|
|
-if(void 0!==b){var d=this.getAttribute("normal");if(void 0===d)d=new pa(new Float32Array(3*b.count),3),this.setAttribute("normal",d);else for(var e=0,f=d.count;e<f;e++)d.setXYZ(e,0,0,0);e=new w;f=new w;var g=new w,h=new w,k=new w,l=new w,m=new w,n=new w;if(a)for(var p=0,t=a.count;p<t;p+=3){var q=a.getX(p+0),v=a.getX(p+1),u=a.getX(p+2);e.fromBufferAttribute(b,q);f.fromBufferAttribute(b,v);g.fromBufferAttribute(b,u);m.subVectors(g,f);n.subVectors(e,f);m.cross(n);h.fromBufferAttribute(d,q);k.fromBufferAttribute(d,
|
|
|
-v);l.fromBufferAttribute(d,u);h.add(m);k.add(m);l.add(m);d.setXYZ(q,h.x,h.y,h.z);d.setXYZ(v,k.x,k.y,k.z);d.setXYZ(u,l.x,l.y,l.z)}else for(a=0,h=b.count;a<h;a+=3)e.fromBufferAttribute(b,a+0),f.fromBufferAttribute(b,a+1),g.fromBufferAttribute(b,a+2),m.subVectors(g,f),n.subVectors(e,f),m.cross(n),d.setXYZ(a+0,m.x,m.y,m.z),d.setXYZ(a+1,m.x,m.y,m.z),d.setXYZ(a+2,m.x,m.y,m.z);this.normalizeNormals();d.needsUpdate=!0}},merge:function(a,b){if(a&&a.isBufferGeometry){void 0===b&&(b=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));
|
|
|
-var d=this.attributes,e;for(e in d)if(void 0!==a.attributes[e]){var f=d[e].array,g=a.attributes[e],h=g.array,k=g.itemSize*b;g=Math.min(h.length,f.length-k);for(var l=0;l<g;l++,k++)f[k]=h[l]}return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",a)},normalizeNormals:function(){for(var a=this.attributes.normal,b=0,d=a.count;b<d;b++)jb.fromBufferAttribute(a,b),jb.normalize(),a.setXYZ(b,jb.x,jb.y,jb.z)},toNonIndexed:function(){function a(n,p){var t=
|
|
|
-n.array,q=n.itemSize;n=n.normalized;for(var v=new t.constructor(p.length*q),u,A=0,B=0,D=p.length;B<D;B++){u=p[B]*q;for(var G=0;G<q;G++)v[A++]=t[u++]}return new pa(v,q,n)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var b=new ka,d=this.index.array,e=this.attributes;for(h in e){var f=a(e[h],d);b.setAttribute(h,f)}e=this.morphAttributes;for(var g in e){var h=[];f=e[g];for(var k=0,l=f.length;k<l;k++){var m=a(f[k],d);h.push(m)}b.morphAttributes[g]=
|
|
|
-h}b.morphTargetsRelative=this.morphTargetsRelative;d=this.groups;g=0;for(e=d.length;g<e;g++)h=d[g],b.addGroup(h.start,h.count,h.materialIndex);return b},toJSON:function(){var a={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};a.uuid=this.uuid;a.type=this.type;""!==this.name&&(a.name=this.name);0<Object.keys(this.userData).length&&(a.userData=this.userData);if(void 0!==this.parameters){var b=this.parameters;for(d in b)void 0!==b[d]&&(a[d]=b[d]);return a}a.data={attributes:{}};
|
|
|
-var d=this.index;null!==d&&(a.data.index={type:d.array.constructor.name,array:Array.prototype.slice.call(d.array)});d=this.attributes;for(var e in d){var f=d[e],g=f.toJSON(a.data);""!==f.name&&(g.name=f.name);a.data.attributes[e]=g}e={};d=!1;for(b in this.morphAttributes){f=this.morphAttributes[b];g=[];for(var h=0,k=f.length;h<k;h++){var l=f[h],m=l.toJSON(a.data);""!==l.name&&(m.name=l.name);g.push(m)}0<g.length&&(e[b]=g,d=!0)}d&&(a.data.morphAttributes=e,a.data.morphTargetsRelative=this.morphTargetsRelative);
|
|
|
-b=this.groups;0<b.length&&(a.data.groups=JSON.parse(JSON.stringify(b)));b=this.boundingSphere;null!==b&&(a.data.boundingSphere={center:b.center.toArray(),radius:b.radius});return a},clone:function(){return(new ka).copy(this)},copy:function(a){this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;var b={};this.name=a.name;var d=a.index;null!==d&&this.setIndex(d.clone(b));d=a.attributes;for(var e in d)this.setAttribute(e,d[e].clone(b));e=
|
|
|
-a.morphAttributes;for(var f in e){d=[];for(var g=e[f],h=0,k=g.length;h<k;h++)d.push(g[h].clone(b));this.morphAttributes[f]=d}this.morphTargetsRelative=a.morphTargetsRelative;b=a.groups;f=0;for(e=b.length;f<e;f++)d=b[f],this.addGroup(d.start,d.count,d.materialIndex);b=a.boundingBox;null!==b&&(this.boundingBox=b.clone());b=a.boundingSphere;null!==b&&(this.boundingSphere=b.clone());this.drawRange.start=a.drawRange.start;this.drawRange.count=a.drawRange.count;this.userData=a.userData;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});
|
|
|
+a)},getObjectByName:function(a){return this.getObjectByProperty("name",a)},getObjectByProperty:function(a,b){if(this[a]===b)return this;for(var d=0,e=this.children.length;d<e;d++){var f=this.children[d].getObjectByProperty(a,b);if(void 0!==f)return f}},getWorldPosition:function(a){void 0===a&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),a=new w);this.updateWorldMatrix(!0,!1);return a.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(a){void 0===a&&
|
|
|
+(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),a=new ua);this.updateWorldMatrix(!0,!1);this.matrixWorld.decompose(Ef,a,Pl);return a},getWorldScale:function(a){void 0===a&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),a=new w);this.updateWorldMatrix(!0,!1);this.matrixWorld.decompose(Ef,Ql,a);return a},getWorldDirection:function(a){void 0===a&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),a=new w);this.updateWorldMatrix(!0,
|
|
|
+!1);var b=this.matrixWorld.elements;return a.set(b[8],b[9],b[10]).normalize()},raycast:function(){},traverse:function(a){a(this);for(var b=this.children,d=0,e=b.length;d<e;d++)b[d].traverse(a)},traverseVisible:function(a){if(!1!==this.visible){a(this);for(var b=this.children,d=0,e=b.length;d<e;d++)b[d].traverseVisible(a)}},traverseAncestors:function(a){var b=this.parent;null!==b&&(a(b),b.traverseAncestors(a))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale);this.matrixWorldNeedsUpdate=
|
|
|
+!0},updateMatrixWorld:function(a){this.matrixAutoUpdate&&this.updateMatrix();if(this.matrixWorldNeedsUpdate||a)null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,a=!0;for(var b=this.children,d=0,e=b.length;d<e;d++)b[d].updateMatrixWorld(a)},updateWorldMatrix:function(a,b){var d=this.parent;!0===a&&null!==d&&d.updateWorldMatrix(!0,!1);this.matrixAutoUpdate&&this.updateMatrix();null===this.parent?
|
|
|
+this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix);if(!0===b)for(a=this.children,b=0,d=a.length;b<d;b++)a[b].updateWorldMatrix(!1,!0)},toJSON:function(a){function b(n,p){void 0===n[p.uuid]&&(n[p.uuid]=p.toJSON(a));return p.uuid}function d(n){var p=[],t;for(t in n){var q=n[t];delete q.metadata;p.push(q)}return p}var e=void 0===a||"string"===typeof a,f={};e&&(a={geometries:{},materials:{},textures:{},images:{},shapes:{}},f.metadata={version:4.5,
|
|
|
+type:"Object",generator:"Object3D.toJSON"});var g={};g.uuid=this.uuid;g.type=this.type;""!==this.name&&(g.name=this.name);!0===this.castShadow&&(g.castShadow=!0);!0===this.receiveShadow&&(g.receiveShadow=!0);!1===this.visible&&(g.visible=!1);!1===this.frustumCulled&&(g.frustumCulled=!1);0!==this.renderOrder&&(g.renderOrder=this.renderOrder);"{}"!==JSON.stringify(this.userData)&&(g.userData=this.userData);g.layers=this.layers.mask;g.matrix=this.matrix.toArray();!1===this.matrixAutoUpdate&&(g.matrixAutoUpdate=
|
|
|
+!1);this.isInstancedMesh&&(g.type="InstancedMesh",g.count=this.count,g.instanceMatrix=this.instanceMatrix.toJSON());if(this.isMesh||this.isLine||this.isPoints){g.geometry=b(a.geometries,this.geometry);var h=this.geometry.parameters;if(void 0!==h&&void 0!==h.shapes)if(h=h.shapes,Array.isArray(h))for(var k=0,l=h.length;k<l;k++)b(a.shapes,h[k]);else b(a.shapes,h)}if(void 0!==this.material)if(Array.isArray(this.material)){h=[];k=0;for(l=this.material.length;k<l;k++)h.push(b(a.materials,this.material[k]));
|
|
|
+g.material=h}else g.material=b(a.materials,this.material);if(0<this.children.length)for(g.children=[],h=0;h<this.children.length;h++)g.children.push(this.children[h].toJSON(a).object);if(e){e=d(a.geometries);h=d(a.materials);k=d(a.textures);l=d(a.images);var m=d(a.shapes);0<e.length&&(f.geometries=e);0<h.length&&(f.materials=h);0<k.length&&(f.textures=k);0<l.length&&(f.images=l);0<m.length&&(f.shapes=m)}f.object=g;return f},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.rotation.order=a.rotation.order;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}});var ci=new w,Tl=new w,Ul=new Da,Na=function(a,b){Object.defineProperty(this,"isPlane",{value:!0});this.normal=void 0!==a?a:new w(1,0,0);this.constant=void 0!==b?b:0};Na.prototype.set=function(a,b){this.normal.copy(a);this.constant=b;return this};Na.prototype.setComponents=function(a,b,d,e){this.normal.set(a,b,d);this.constant=e;return this};Na.prototype.setFromNormalAndCoplanarPoint=
|
|
|
+function(a,b){this.normal.copy(a);this.constant=-b.dot(this.normal);return this};Na.prototype.setFromCoplanarPoints=function(a,b,d){b=ci.subVectors(d,b).cross(Tl.subVectors(a,b)).normalize();this.setFromNormalAndCoplanarPoint(b,a);return this};Na.prototype.clone=function(){return(new this.constructor).copy(this)};Na.prototype.copy=function(a){this.normal.copy(a.normal);this.constant=a.constant;return this};Na.prototype.normalize=function(){var a=1/this.normal.length();this.normal.multiplyScalar(a);
|
|
|
+this.constant*=a;return this};Na.prototype.negate=function(){this.constant*=-1;this.normal.negate();return this};Na.prototype.distanceToPoint=function(a){return this.normal.dot(a)+this.constant};Na.prototype.distanceToSphere=function(a){return this.distanceToPoint(a.center)-a.radius};Na.prototype.projectPoint=function(a,b){void 0===b&&(console.warn("THREE.Plane: .projectPoint() target is now required"),b=new w);return b.copy(this.normal).multiplyScalar(-this.distanceToPoint(a)).add(a)};Na.prototype.intersectLine=
|
|
|
+function(a,b){void 0===b&&(console.warn("THREE.Plane: .intersectLine() target is now required"),b=new w);var d=a.delta(ci),e=this.normal.dot(d);if(0===e){if(0===this.distanceToPoint(a.start))return b.copy(a.start)}else if(e=-(a.start.dot(this.normal)+this.constant)/e,!(0>e||1<e))return b.copy(d).multiplyScalar(e).add(a.start)};Na.prototype.intersectsLine=function(a){var b=this.distanceToPoint(a.start);a=this.distanceToPoint(a.end);return 0>b&&0<a||0>a&&0<b};Na.prototype.intersectsBox=function(a){return a.intersectsPlane(this)};
|
|
|
+Na.prototype.intersectsSphere=function(a){return a.intersectsPlane(this)};Na.prototype.coplanarPoint=function(a){void 0===a&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),a=new w);return a.copy(this.normal).multiplyScalar(-this.constant)};Na.prototype.applyMatrix4=function(a,b){b=b||Ul.getNormalMatrix(a);a=this.coplanarPoint(ci).applyMatrix4(a);b=this.normal.applyMatrix3(b).normalize();this.constant=-a.dot(b);return this};Na.prototype.translate=function(a){this.constant-=a.dot(this.normal);
|
|
|
+return this};Na.prototype.equals=function(a){return a.normal.equals(this.normal)&&a.constant===this.constant};var Yb=new w,wc=new w,di=new w,xc=new w,ue=new w,ve=new w,Cj=new w,ei=new w,fi=new w,gi=new w,Ga=function(a,b,d){this.a=void 0!==a?a:new w;this.b=void 0!==b?b:new w;this.c=void 0!==d?d:new w};Ga.getNormal=function(a,b,d,e){void 0===e&&(console.warn("THREE.Triangle: .getNormal() target is now required"),e=new w);e.subVectors(d,b);Yb.subVectors(a,b);e.cross(Yb);a=e.lengthSq();return 0<a?e.multiplyScalar(1/
|
|
|
+Math.sqrt(a)):e.set(0,0,0)};Ga.getBarycoord=function(a,b,d,e,f){Yb.subVectors(e,b);wc.subVectors(d,b);di.subVectors(a,b);a=Yb.dot(Yb);b=Yb.dot(wc);d=Yb.dot(di);var g=wc.dot(wc);e=wc.dot(di);var h=a*g-b*b;void 0===f&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),f=new w);if(0===h)return f.set(-2,-1,-1);h=1/h;g=(g*d-b*e)*h;a=(a*e-b*d)*h;return f.set(1-g-a,a,g)};Ga.containsPoint=function(a,b,d,e){this.getBarycoord(a,b,d,e,xc);return 0<=xc.x&&0<=xc.y&&1>=xc.x+xc.y};Ga.getUV=
|
|
|
+function(a,b,d,e,f,g,h,k){this.getBarycoord(a,b,d,e,xc);k.set(0,0);k.addScaledVector(f,xc.x);k.addScaledVector(g,xc.y);k.addScaledVector(h,xc.z);return k};Ga.isFrontFacing=function(a,b,d,e){Yb.subVectors(d,b);wc.subVectors(a,b);return 0>Yb.cross(wc).dot(e)?!0:!1};Ga.prototype.set=function(a,b,d){this.a.copy(a);this.b.copy(b);this.c.copy(d);return this};Ga.prototype.setFromPointsAndIndices=function(a,b,d,e){this.a.copy(a[b]);this.b.copy(a[d]);this.c.copy(a[e]);return this};Ga.prototype.clone=function(){return(new this.constructor).copy(this)};
|
|
|
+Ga.prototype.copy=function(a){this.a.copy(a.a);this.b.copy(a.b);this.c.copy(a.c);return this};Ga.prototype.getArea=function(){Yb.subVectors(this.c,this.b);wc.subVectors(this.a,this.b);return.5*Yb.cross(wc).length()};Ga.prototype.getMidpoint=function(a){void 0===a&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),a=new w);return a.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)};Ga.prototype.getNormal=function(a){return Ga.getNormal(this.a,this.b,this.c,a)};Ga.prototype.getPlane=
|
|
|
+function(a){void 0===a&&(console.warn("THREE.Triangle: .getPlane() target is now required"),a=new Na);return a.setFromCoplanarPoints(this.a,this.b,this.c)};Ga.prototype.getBarycoord=function(a,b){return Ga.getBarycoord(a,this.a,this.b,this.c,b)};Ga.prototype.getUV=function(a,b,d,e,f){return Ga.getUV(a,this.a,this.b,this.c,b,d,e,f)};Ga.prototype.containsPoint=function(a){return Ga.containsPoint(a,this.a,this.b,this.c)};Ga.prototype.isFrontFacing=function(a){return Ga.isFrontFacing(this.a,this.b,this.c,
|
|
|
+a)};Ga.prototype.intersectsBox=function(a){return a.intersectsTriangle(this)};Ga.prototype.closestPointToPoint=function(a,b){void 0===b&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),b=new w);var d=this.a,e=this.b,f=this.c;ue.subVectors(e,d);ve.subVectors(f,d);ei.subVectors(a,d);var g=ue.dot(ei),h=ve.dot(ei);if(0>=g&&0>=h)return b.copy(d);fi.subVectors(a,e);var k=ue.dot(fi),l=ve.dot(fi);if(0<=k&&l<=k)return b.copy(e);var m=g*l-k*h;if(0>=m&&0<=g&&0>=k)return e=g/(g-
|
|
|
+k),b.copy(d).addScaledVector(ue,e);gi.subVectors(a,f);a=ue.dot(gi);var n=ve.dot(gi);if(0<=n&&a<=n)return b.copy(f);g=a*h-g*n;if(0>=g&&0<=h&&0>=n)return m=h/(h-n),b.copy(d).addScaledVector(ve,m);h=k*n-a*l;if(0>=h&&0<=l-k&&0<=a-n)return Cj.subVectors(f,e),m=(l-k)/(l-k+(a-n)),b.copy(e).addScaledVector(Cj,m);f=1/(h+g+m);e=g*f;m*=f;return b.copy(d).addScaledVector(ue,e).addScaledVector(ve,m)};Ga.prototype.equals=function(a){return a.a.equals(this.a)&&a.b.equals(this.b)&&a.c.equals(this.c)};var Dj={aliceblue:15792383,
|
|
|
+antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,
|
|
|
+darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,
|
|
|
+indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,
|
|
|
+magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,
|
|
|
+palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,
|
|
|
+turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Bb={h:0,s:0,l:0},Ig={h:0,s:0,l:0},S=function(a,b,d){Object.defineProperty(this,"isColor",{value:!0});return void 0===b&&void 0===d?this.set(a):this.setRGB(a,b,d)};S.prototype.set=function(a){a&&a.isColor?this.copy(a):"number"===typeof a?this.setHex(a):"string"===typeof a&&this.setStyle(a);return this};S.prototype.setScalar=function(a){this.b=this.g=this.r=a;return this};S.prototype.setHex=
|
|
|
+function(a){a=Math.floor(a);this.r=(a>>16&255)/255;this.g=(a>>8&255)/255;this.b=(a&255)/255;return this};S.prototype.setRGB=function(a,b,d){this.r=a;this.g=b;this.b=d;return this};S.prototype.setHSL=function(a,b,d){a=xa.euclideanModulo(a,1);b=xa.clamp(b,0,1);d=xa.clamp(d,0,1);0===b?this.r=this.g=this.b=d:(b=.5>=d?d*(1+b):d+b-d*b,d=2*d-b,this.r=fh(d,b,a+1/3),this.g=fh(d,b,a),this.b=fh(d,b,a-1/3));return this};S.prototype.setStyle=function(a){function b(h){void 0!==h&&1>parseFloat(h)&&console.warn("THREE.Color: Alpha component of "+
|
|
|
+a+" will be ignored.")}var d;if(d=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(a)){var e=d[2];switch(d[1]){case "rgb":case "rgba":if(d=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(e))return this.r=Math.min(255,parseInt(d[1],10))/255,this.g=Math.min(255,parseInt(d[2],10))/255,this.b=Math.min(255,parseInt(d[3],10))/255,b(d[5]),this;if(d=/^(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(e))return this.r=Math.min(100,parseInt(d[1],10))/100,this.g=Math.min(100,parseInt(d[2],
|
|
|
+10))/100,this.b=Math.min(100,parseInt(d[3],10))/100,b(d[5]),this;break;case "hsl":case "hsla":if(d=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(e)){e=parseFloat(d[1])/360;var f=parseInt(d[2],10)/100,g=parseInt(d[3],10)/100;b(d[5]);return this.setHSL(e,f,g)}}}else if(d=/^#([A-Fa-f0-9]+)$/.exec(a)){d=d[1];e=d.length;if(3===e)return this.r=parseInt(d.charAt(0)+d.charAt(0),16)/255,this.g=parseInt(d.charAt(1)+d.charAt(1),16)/255,this.b=parseInt(d.charAt(2)+d.charAt(2),
|
|
|
+16)/255,this;if(6===e)return this.r=parseInt(d.charAt(0)+d.charAt(1),16)/255,this.g=parseInt(d.charAt(2)+d.charAt(3),16)/255,this.b=parseInt(d.charAt(4)+d.charAt(5),16)/255,this}return a&&0<a.length?this.setColorName(a):this};S.prototype.setColorName=function(a){var b=Dj[a];void 0!==b?this.setHex(b):console.warn("THREE.Color: Unknown color "+a);return this};S.prototype.clone=function(){return new this.constructor(this.r,this.g,this.b)};S.prototype.copy=function(a){this.r=a.r;this.g=a.g;this.b=a.b;
|
|
|
+return this};S.prototype.copyGammaToLinear=function(a,b){void 0===b&&(b=2);this.r=Math.pow(a.r,b);this.g=Math.pow(a.g,b);this.b=Math.pow(a.b,b);return this};S.prototype.copyLinearToGamma=function(a,b){void 0===b&&(b=2);b=0<b?1/b:1;this.r=Math.pow(a.r,b);this.g=Math.pow(a.g,b);this.b=Math.pow(a.b,b);return this};S.prototype.convertGammaToLinear=function(a){this.copyGammaToLinear(this,a);return this};S.prototype.convertLinearToGamma=function(a){this.copyLinearToGamma(this,a);return this};S.prototype.copySRGBToLinear=
|
|
|
+function(a){this.r=gh(a.r);this.g=gh(a.g);this.b=gh(a.b);return this};S.prototype.copyLinearToSRGB=function(a){this.r=hh(a.r);this.g=hh(a.g);this.b=hh(a.b);return this};S.prototype.convertSRGBToLinear=function(){this.copySRGBToLinear(this);return this};S.prototype.convertLinearToSRGB=function(){this.copyLinearToSRGB(this);return this};S.prototype.getHex=function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0};S.prototype.getHexString=function(){return("000000"+this.getHex().toString(16)).slice(-6)};
|
|
|
+S.prototype.getHSL=function(a){void 0===a&&(console.warn("THREE.Color: .getHSL() target is now required"),a={h:0,s:0,l:0});var b=this.r,d=this.g,e=this.b,f=Math.max(b,d,e),g=Math.min(b,d,e),h,k=(g+f)/2;if(g===f)g=h=0;else{var l=f-g;g=.5>=k?l/(f+g):l/(2-f-g);switch(f){case b:h=(d-e)/l+(d<e?6:0);break;case d:h=(e-b)/l+2;break;case e:h=(b-d)/l+4}h/=6}a.h=h;a.s=g;a.l=k;return a};S.prototype.getStyle=function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"};S.prototype.offsetHSL=
|
|
|
+function(a,b,d){this.getHSL(Bb);Bb.h+=a;Bb.s+=b;Bb.l+=d;this.setHSL(Bb.h,Bb.s,Bb.l);return this};S.prototype.add=function(a){this.r+=a.r;this.g+=a.g;this.b+=a.b;return this};S.prototype.addColors=function(a,b){this.r=a.r+b.r;this.g=a.g+b.g;this.b=a.b+b.b;return this};S.prototype.addScalar=function(a){this.r+=a;this.g+=a;this.b+=a;return this};S.prototype.sub=function(a){this.r=Math.max(0,this.r-a.r);this.g=Math.max(0,this.g-a.g);this.b=Math.max(0,this.b-a.b);return this};S.prototype.multiply=function(a){this.r*=
|
|
|
+a.r;this.g*=a.g;this.b*=a.b;return this};S.prototype.multiplyScalar=function(a){this.r*=a;this.g*=a;this.b*=a;return this};S.prototype.lerp=function(a,b){this.r+=(a.r-this.r)*b;this.g+=(a.g-this.g)*b;this.b+=(a.b-this.b)*b;return this};S.prototype.lerpHSL=function(a,b){this.getHSL(Bb);a.getHSL(Ig);a=xa.lerp(Bb.h,Ig.h,b);var d=xa.lerp(Bb.s,Ig.s,b);b=xa.lerp(Bb.l,Ig.l,b);this.setHSL(a,d,b);return this};S.prototype.equals=function(a){return a.r===this.r&&a.g===this.g&&a.b===this.b};S.prototype.fromArray=
|
|
|
+function(a,b){void 0===b&&(b=0);this.r=a[b];this.g=a[b+1];this.b=a[b+2];return this};S.prototype.toArray=function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.r;a[b+1]=this.g;a[b+2]=this.b;return a};S.prototype.fromBufferAttribute=function(a,b){this.r=a.getX(b);this.g=a.getY(b);this.b=a.getZ(b);!0===a.normalized&&(this.r/=255,this.g/=255,this.b/=255);return this};S.prototype.toJSON=function(){return this.getHex()};S.NAMES=Dj;S.prototype.r=1;S.prototype.g=1;S.prototype.b=1;var ad=function(a,
|
|
|
+b,d,e,f,g){this.a=a;this.b=b;this.c=d;this.normal=e&&e.isVector3?e:new w;this.vertexNormals=Array.isArray(e)?e:[];this.color=f&&f.isColor?f:new S;this.vertexColors=Array.isArray(f)?f:[];this.materialIndex=void 0!==g?g:0};ad.prototype.clone=function(){return(new this.constructor).copy(this)};ad.prototype.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,d=a.vertexNormals.length;b<d;b++)this.vertexNormals[b]=
|
|
|
+a.vertexNormals[b].clone();b=0;for(d=a.vertexColors.length;b<d;b++)this.vertexColors[b]=a.vertexColors[b].clone();return this};var jk=0;ra.prototype=Object.assign(Object.create(wb.prototype),{constructor:ra,isMaterial:!0,onBeforeCompile:function(){},customProgramCacheKey:function(){return this.onBeforeCompile.toString()},setValues:function(a){if(void 0!==a)for(var b in a){var d=a[b];if(void 0===d)console.warn("THREE.Material: '"+b+"' parameter is undefined.");else if("shading"===b)console.warn("THREE."+
|
|
|
+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===d?!0:!1;else{var e=this[b];void 0===e?console.warn("THREE."+this.type+": '"+b+"' is not a property of this material."):e&&e.isColor?e.set(d):e&&e.isVector3&&d&&d.isVector3?e.copy(d):this[b]=d}}},toJSON:function(a){function b(f){var g=[],h;for(h in f){var k=f[h];delete k.metadata;g.push(k)}return g}var d=void 0===a||"string"===typeof a;d&&(a={textures:{},images:{}});var e={metadata:{version:4.5,type:"Material",
|
|
|
+generator:"Material.toJSON"}};e.uuid=this.uuid;e.type=this.type;""!==this.name&&(e.name=this.name);this.color&&this.color.isColor&&(e.color=this.color.getHex());void 0!==this.roughness&&(e.roughness=this.roughness);void 0!==this.metalness&&(e.metalness=this.metalness);this.sheen&&this.sheen.isColor&&(e.sheen=this.sheen.getHex());this.emissive&&this.emissive.isColor&&(e.emissive=this.emissive.getHex());this.emissiveIntensity&&1!==this.emissiveIntensity&&(e.emissiveIntensity=this.emissiveIntensity);
|
|
|
+this.specular&&this.specular.isColor&&(e.specular=this.specular.getHex());void 0!==this.shininess&&(e.shininess=this.shininess);void 0!==this.clearcoat&&(e.clearcoat=this.clearcoat);void 0!==this.clearcoatRoughness&&(e.clearcoatRoughness=this.clearcoatRoughness);this.clearcoatMap&&this.clearcoatMap.isTexture&&(e.clearcoatMap=this.clearcoatMap.toJSON(a).uuid);this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(e.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(a).uuid);this.clearcoatNormalMap&&
|
|
|
+this.clearcoatNormalMap.isTexture&&(e.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(a).uuid,e.clearcoatNormalScale=this.clearcoatNormalScale.toArray());this.map&&this.map.isTexture&&(e.map=this.map.toJSON(a).uuid);this.matcap&&this.matcap.isTexture&&(e.matcap=this.matcap.toJSON(a).uuid);this.alphaMap&&this.alphaMap.isTexture&&(e.alphaMap=this.alphaMap.toJSON(a).uuid);this.lightMap&&this.lightMap.isTexture&&(e.lightMap=this.lightMap.toJSON(a).uuid);this.aoMap&&this.aoMap.isTexture&&(e.aoMap=this.aoMap.toJSON(a).uuid,
|
|
|
+e.aoMapIntensity=this.aoMapIntensity);this.bumpMap&&this.bumpMap.isTexture&&(e.bumpMap=this.bumpMap.toJSON(a).uuid,e.bumpScale=this.bumpScale);this.normalMap&&this.normalMap.isTexture&&(e.normalMap=this.normalMap.toJSON(a).uuid,e.normalMapType=this.normalMapType,e.normalScale=this.normalScale.toArray());this.displacementMap&&this.displacementMap.isTexture&&(e.displacementMap=this.displacementMap.toJSON(a).uuid,e.displacementScale=this.displacementScale,e.displacementBias=this.displacementBias);this.roughnessMap&&
|
|
|
+this.roughnessMap.isTexture&&(e.roughnessMap=this.roughnessMap.toJSON(a).uuid);this.metalnessMap&&this.metalnessMap.isTexture&&(e.metalnessMap=this.metalnessMap.toJSON(a).uuid);this.emissiveMap&&this.emissiveMap.isTexture&&(e.emissiveMap=this.emissiveMap.toJSON(a).uuid);this.specularMap&&this.specularMap.isTexture&&(e.specularMap=this.specularMap.toJSON(a).uuid);this.envMap&&this.envMap.isTexture&&(e.envMap=this.envMap.toJSON(a).uuid,e.reflectivity=this.reflectivity,e.refractionRatio=this.refractionRatio,
|
|
|
+void 0!==this.combine&&(e.combine=this.combine),void 0!==this.envMapIntensity&&(e.envMapIntensity=this.envMapIntensity));this.gradientMap&&this.gradientMap.isTexture&&(e.gradientMap=this.gradientMap.toJSON(a).uuid);void 0!==this.size&&(e.size=this.size);void 0!==this.sizeAttenuation&&(e.sizeAttenuation=this.sizeAttenuation);1!==this.blending&&(e.blending=this.blending);!0===this.flatShading&&(e.flatShading=this.flatShading);0!==this.side&&(e.side=this.side);this.vertexColors&&(e.vertexColors=!0);
|
|
|
+1>this.opacity&&(e.opacity=this.opacity);!0===this.transparent&&(e.transparent=this.transparent);e.depthFunc=this.depthFunc;e.depthTest=this.depthTest;e.depthWrite=this.depthWrite;e.stencilWrite=this.stencilWrite;e.stencilWriteMask=this.stencilWriteMask;e.stencilFunc=this.stencilFunc;e.stencilRef=this.stencilRef;e.stencilFuncMask=this.stencilFuncMask;e.stencilFail=this.stencilFail;e.stencilZFail=this.stencilZFail;e.stencilZPass=this.stencilZPass;this.rotation&&0!==this.rotation&&(e.rotation=this.rotation);
|
|
|
+!0===this.polygonOffset&&(e.polygonOffset=!0);0!==this.polygonOffsetFactor&&(e.polygonOffsetFactor=this.polygonOffsetFactor);0!==this.polygonOffsetUnits&&(e.polygonOffsetUnits=this.polygonOffsetUnits);this.linewidth&&1!==this.linewidth&&(e.linewidth=this.linewidth);void 0!==this.dashSize&&(e.dashSize=this.dashSize);void 0!==this.gapSize&&(e.gapSize=this.gapSize);void 0!==this.scale&&(e.scale=this.scale);!0===this.dithering&&(e.dithering=!0);0<this.alphaTest&&(e.alphaTest=this.alphaTest);!0===this.premultipliedAlpha&&
|
|
|
+(e.premultipliedAlpha=this.premultipliedAlpha);!0===this.wireframe&&(e.wireframe=this.wireframe);1<this.wireframeLinewidth&&(e.wireframeLinewidth=this.wireframeLinewidth);"round"!==this.wireframeLinecap&&(e.wireframeLinecap=this.wireframeLinecap);"round"!==this.wireframeLinejoin&&(e.wireframeLinejoin=this.wireframeLinejoin);!0===this.morphTargets&&(e.morphTargets=!0);!0===this.morphNormals&&(e.morphNormals=!0);!0===this.skinning&&(e.skinning=!0);!1===this.visible&&(e.visible=!1);!1===this.toneMapped&&
|
|
|
+(e.toneMapped=!1);"{}"!==JSON.stringify(this.userData)&&(e.userData=this.userData);d&&(d=b(a.textures),a=b(a.images),0<d.length&&(e.textures=d),0<a.length&&(e.images=a));return e},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.name=a.name;this.fog=a.fog;this.blending=a.blending;this.side=a.side;this.flatShading=a.flatShading;this.vertexColors=a.vertexColors;this.opacity=a.opacity;this.transparent=a.transparent;this.blendSrc=a.blendSrc;this.blendDst=a.blendDst;this.blendEquation=
|
|
|
+a.blendEquation;this.blendSrcAlpha=a.blendSrcAlpha;this.blendDstAlpha=a.blendDstAlpha;this.blendEquationAlpha=a.blendEquationAlpha;this.depthFunc=a.depthFunc;this.depthTest=a.depthTest;this.depthWrite=a.depthWrite;this.stencilWriteMask=a.stencilWriteMask;this.stencilFunc=a.stencilFunc;this.stencilRef=a.stencilRef;this.stencilFuncMask=a.stencilFuncMask;this.stencilFail=a.stencilFail;this.stencilZFail=a.stencilZFail;this.stencilZPass=a.stencilZPass;this.stencilWrite=a.stencilWrite;var b=a.clippingPlanes,
|
|
|
+d=null;if(null!==b){var e=b.length;d=Array(e);for(var f=0;f!==e;++f)d[f]=b[f].clone()}this.clippingPlanes=d;this.clipIntersection=a.clipIntersection;this.clipShadows=a.clipShadows;this.shadowSide=a.shadowSide;this.colorWrite=a.colorWrite;this.precision=a.precision;this.polygonOffset=a.polygonOffset;this.polygonOffsetFactor=a.polygonOffsetFactor;this.polygonOffsetUnits=a.polygonOffsetUnits;this.dithering=a.dithering;this.alphaTest=a.alphaTest;this.premultipliedAlpha=a.premultipliedAlpha;this.visible=
|
|
|
+a.visible;this.toneMapped=a.toneMapped;this.userData=JSON.parse(JSON.stringify(a.userData));return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});Object.defineProperty(ra.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Kb.prototype=Object.create(ra.prototype);Kb.prototype.constructor=Kb;Kb.prototype.isMeshBasicMaterial=!0;Kb.prototype.copy=function(a){ra.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=
|
|
|
+a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.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;return this};var Ua=new w,Jg=new L;Object.defineProperty(pa.prototype,
|
|
|
+"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(pa.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setUsage:function(a){this.usage=a;return this},copy:function(a){this.name=a.name;this.array=new a.array.constructor(a.array);this.itemSize=a.itemSize;this.count=a.count;this.normalized=a.normalized;this.usage=a.usage;return this},copyAt:function(a,b,d){a*=this.itemSize;d*=b.itemSize;for(var e=0,f=this.itemSize;e<f;e++)this.array[a+e]=b.array[d+e];return this},copyArray:function(a){this.array.set(a);
|
|
|
+return this},copyColorsArray:function(a){for(var b=this.array,d=0,e=0,f=a.length;e<f;e++){var g=a[e];void 0===g&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",e),g=new S);b[d++]=g.r;b[d++]=g.g;b[d++]=g.b}return this},copyVector2sArray:function(a){for(var b=this.array,d=0,e=0,f=a.length;e<f;e++){var g=a[e];void 0===g&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",e),g=new L);b[d++]=g.x;b[d++]=g.y}return this},copyVector3sArray:function(a){for(var b=
|
|
|
+this.array,d=0,e=0,f=a.length;e<f;e++){var g=a[e];void 0===g&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",e),g=new w);b[d++]=g.x;b[d++]=g.y;b[d++]=g.z}return this},copyVector4sArray:function(a){for(var b=this.array,d=0,e=0,f=a.length;e<f;e++){var g=a[e];void 0===g&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",e),g=new ca);b[d++]=g.x;b[d++]=g.y;b[d++]=g.z;b[d++]=g.w}return this},applyMatrix3:function(a){if(2===this.itemSize)for(var b=
|
|
|
+0,d=this.count;b<d;b++)Jg.fromBufferAttribute(this,b),Jg.applyMatrix3(a),this.setXY(b,Jg.x,Jg.y);else if(3===this.itemSize)for(b=0,d=this.count;b<d;b++)Ua.fromBufferAttribute(this,b),Ua.applyMatrix3(a),this.setXYZ(b,Ua.x,Ua.y,Ua.z);return this},applyMatrix4:function(a){for(var b=0,d=this.count;b<d;b++)Ua.x=this.getX(b),Ua.y=this.getY(b),Ua.z=this.getZ(b),Ua.applyMatrix4(a),this.setXYZ(b,Ua.x,Ua.y,Ua.z);return this},applyNormalMatrix:function(a){for(var b=0,d=this.count;b<d;b++)Ua.x=this.getX(b),Ua.y=
|
|
|
+this.getY(b),Ua.z=this.getZ(b),Ua.applyNormalMatrix(a),this.setXYZ(b,Ua.x,Ua.y,Ua.z);return this},transformDirection:function(a){for(var b=0,d=this.count;b<d;b++)Ua.x=this.getX(b),Ua.y=this.getY(b),Ua.z=this.getZ(b),Ua.transformDirection(a),this.setXYZ(b,Ua.x,Ua.y,Ua.z);return this},set:function(a,b){void 0===b&&(b=0);this.array.set(a,b);return this},getX:function(a){return this.array[a*this.itemSize]},setX:function(a,b){this.array[a*this.itemSize]=b;return this},getY:function(a){return this.array[a*
|
|
|
+this.itemSize+1]},setY:function(a,b){this.array[a*this.itemSize+1]=b;return this},getZ:function(a){return this.array[a*this.itemSize+2]},setZ:function(a,b){this.array[a*this.itemSize+2]=b;return this},getW:function(a){return this.array[a*this.itemSize+3]},setW:function(a,b){this.array[a*this.itemSize+3]=b;return this},setXY:function(a,b,d){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=d;return this},setXYZ:function(a,b,d,e){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=d;this.array[a+2]=
|
|
|
+e;return this},setXYZW:function(a,b,d,e,f){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=d;this.array[a+2]=e;this.array[a+3]=f;return this},onUpload:function(a){this.onUploadCallback=a;return this},clone:function(){return(new this.constructor(this.array,this.itemSize)).copy(this)},toJSON:function(){return{itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized}}});Ce.prototype=Object.create(pa.prototype);Ce.prototype.constructor=
|
|
|
+Ce;De.prototype=Object.create(pa.prototype);De.prototype.constructor=De;Ee.prototype=Object.create(pa.prototype);Ee.prototype.constructor=Ee;Fe.prototype=Object.create(pa.prototype);Fe.prototype.constructor=Fe;Zc.prototype=Object.create(pa.prototype);Zc.prototype.constructor=Zc;Ge.prototype=Object.create(pa.prototype);Ge.prototype.constructor=Ge;$c.prototype=Object.create(pa.prototype);$c.prototype.constructor=$c;ea.prototype=Object.create(pa.prototype);ea.prototype.constructor=ea;He.prototype=Object.create(pa.prototype);
|
|
|
+He.prototype.constructor=He;var hi=function(){this.vertices=[];this.normals=[];this.colors=[];this.uvs=[];this.uvs2=[];this.groups=[];this.morphTargets={};this.skinWeights=[];this.skinIndices=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.uvsNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.verticesNeedUpdate=!1};hi.prototype.computeGroups=function(a){var b=[],d=void 0,e=a.faces;for(a=0;a<e.length;a++){var f=e[a];if(f.materialIndex!==d){d=f.materialIndex;void 0!==
|
|
|
+g&&(g.count=3*a-g.start,b.push(g));var g={start:3*a,materialIndex:d}}}void 0!==g&&(g.count=3*a-g.start,b.push(g));this.groups=b};hi.prototype.fromGeometry=function(a){var b=a.faces,d=a.vertices,e=a.faceVertexUvs,f=e[0]&&0<e[0].length,g=e[1]&&0<e[1].length,h=a.morphTargets,k=h.length;if(0<k){var l=[];for(var m=0;m<k;m++)l[m]={name:h[m].name,data:[]};this.morphTargets.position=l}m=a.morphNormals;var n=m.length;if(0<n){var p=[];for(var t=0;t<n;t++)p[t]={name:m[t].name,data:[]};this.morphTargets.normal=
|
|
|
+p}t=a.skinIndices;var q=a.skinWeights,v=t.length===d.length,u=q.length===d.length;0<d.length&&0===b.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(var A=0;A<b.length;A++){var B=b[A];this.vertices.push(d[B.a],d[B.b],d[B.c]);var D=B.vertexNormals;3===D.length?this.normals.push(D[0],D[1],D[2]):(D=B.normal,this.normals.push(D,D,D));D=B.vertexColors;3===D.length?this.colors.push(D[0],D[1],D[2]):(D=B.color,this.colors.push(D,D,D));!0===f&&(D=e[0][A],void 0!==D?
|
|
|
+this.uvs.push(D[0],D[1],D[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",A),this.uvs.push(new L,new L,new L)));!0===g&&(D=e[1][A],void 0!==D?this.uvs2.push(D[0],D[1],D[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",A),this.uvs2.push(new L,new L,new L)));for(D=0;D<k;D++){var G=h[D].vertices;l[D].data.push(G[B.a],G[B.b],G[B.c])}for(D=0;D<n;D++)G=m[D].vertexNormals[A],p[D].data.push(G.a,G.b,G.c);v&&this.skinIndices.push(t[B.a],t[B.b],t[B.c]);
|
|
|
+u&&this.skinWeights.push(q[B.a],q[B.b],q[B.c])}this.computeGroups(a);this.verticesNeedUpdate=a.verticesNeedUpdate;this.normalsNeedUpdate=a.normalsNeedUpdate;this.colorsNeedUpdate=a.colorsNeedUpdate;this.uvsNeedUpdate=a.uvsNeedUpdate;this.groupsNeedUpdate=a.groupsNeedUpdate;null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());return this};var kk=1,ic=new da,ii=new ha,we=new w,Jb=new za,Ff=new za,jb=new w;ka.prototype=
|
|
|
+Object.assign(Object.create(wb.prototype),{constructor:ka,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(a){Array.isArray(a)?this.index=new (65535<vi(a)?$c:Zc)(a,1):this.index=a},getAttribute:function(a){return this.attributes[a]},setAttribute:function(a,b){this.attributes[a]=b;return this},deleteAttribute:function(a){delete this.attributes[a];return this},addGroup:function(a,b,d){this.groups.push({start:a,count:b,materialIndex:void 0!==d?d:0})},clearGroups:function(){this.groups=
|
|
|
+[]},setDrawRange:function(a,b){this.drawRange.start=a;this.drawRange.count=b},applyMatrix4:function(a){var b=this.attributes.position;void 0!==b&&(b.applyMatrix4(a),b.needsUpdate=!0);b=this.attributes.normal;if(void 0!==b){var d=(new Da).getNormalMatrix(a);b.applyNormalMatrix(d);b.needsUpdate=!0}b=this.attributes.tangent;void 0!==b&&(b.transformDirection(a),b.needsUpdate=!0);null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();return this},rotateX:function(a){ic.makeRotationX(a);
|
|
|
+this.applyMatrix4(ic);return this},rotateY:function(a){ic.makeRotationY(a);this.applyMatrix4(ic);return this},rotateZ:function(a){ic.makeRotationZ(a);this.applyMatrix4(ic);return this},translate:function(a,b,d){ic.makeTranslation(a,b,d);this.applyMatrix4(ic);return this},scale:function(a,b,d){ic.makeScale(a,b,d);this.applyMatrix4(ic);return this},lookAt:function(a){ii.lookAt(a);ii.updateMatrix();this.applyMatrix4(ii.matrix);return this},center:function(){this.computeBoundingBox();this.boundingBox.getCenter(we).negate();
|
|
|
+this.translate(we.x,we.y,we.z);return this},setFromObject:function(a){var b=a.geometry;if(a.isPoints||a.isLine){a=new ea(3*b.vertices.length,3);var d=new ea(3*b.colors.length,3);this.setAttribute("position",a.copyVector3sArray(b.vertices));this.setAttribute("color",d.copyColorsArray(b.colors));b.lineDistances&&b.lineDistances.length===b.vertices.length&&(a=new ea(b.lineDistances.length,1),this.setAttribute("lineDistance",a.copyArray(b.lineDistances)));null!==b.boundingSphere&&(this.boundingSphere=
|
|
|
+b.boundingSphere.clone());null!==b.boundingBox&&(this.boundingBox=b.boundingBox.clone())}else a.isMesh&&b&&b.isGeometry&&this.fromGeometry(b);return this},setFromPoints:function(a){for(var b=[],d=0,e=a.length;d<e;d++){var f=a[d];b.push(f.x,f.y,f.z||0)}this.setAttribute("position",new ea(b,3));return this},updateFromObject:function(a){var b=a.geometry;if(a.isMesh){var d=b.__directGeometry;!0===b.elementsNeedUpdate&&(d=void 0,b.elementsNeedUpdate=!1);if(void 0===d)return this.fromGeometry(b);d.verticesNeedUpdate=
|
|
|
+b.verticesNeedUpdate;d.normalsNeedUpdate=b.normalsNeedUpdate;d.colorsNeedUpdate=b.colorsNeedUpdate;d.uvsNeedUpdate=b.uvsNeedUpdate;d.groupsNeedUpdate=b.groupsNeedUpdate;b.verticesNeedUpdate=!1;b.normalsNeedUpdate=!1;b.colorsNeedUpdate=!1;b.uvsNeedUpdate=!1;b.groupsNeedUpdate=!1;b=d}!0===b.verticesNeedUpdate&&(d=this.attributes.position,void 0!==d&&(d.copyVector3sArray(b.vertices),d.needsUpdate=!0),b.verticesNeedUpdate=!1);!0===b.normalsNeedUpdate&&(d=this.attributes.normal,void 0!==d&&(d.copyVector3sArray(b.normals),
|
|
|
+d.needsUpdate=!0),b.normalsNeedUpdate=!1);!0===b.colorsNeedUpdate&&(d=this.attributes.color,void 0!==d&&(d.copyColorsArray(b.colors),d.needsUpdate=!0),b.colorsNeedUpdate=!1);b.uvsNeedUpdate&&(d=this.attributes.uv,void 0!==d&&(d.copyVector2sArray(b.uvs),d.needsUpdate=!0),b.uvsNeedUpdate=!1);b.lineDistancesNeedUpdate&&(d=this.attributes.lineDistance,void 0!==d&&(d.copyArray(b.lineDistances),d.needsUpdate=!0),b.lineDistancesNeedUpdate=!1);b.groupsNeedUpdate&&(b.computeGroups(a.geometry),this.groups=
|
|
|
+b.groups,b.groupsNeedUpdate=!1);return this},fromGeometry:function(a){a.__directGeometry=(new hi).fromGeometry(a);return this.fromDirectGeometry(a.__directGeometry)},fromDirectGeometry:function(a){var b=new Float32Array(3*a.vertices.length);this.setAttribute("position",(new pa(b,3)).copyVector3sArray(a.vertices));0<a.normals.length&&(b=new Float32Array(3*a.normals.length),this.setAttribute("normal",(new pa(b,3)).copyVector3sArray(a.normals)));0<a.colors.length&&(b=new Float32Array(3*a.colors.length),
|
|
|
+this.setAttribute("color",(new pa(b,3)).copyColorsArray(a.colors)));0<a.uvs.length&&(b=new Float32Array(2*a.uvs.length),this.setAttribute("uv",(new pa(b,2)).copyVector2sArray(a.uvs)));0<a.uvs2.length&&(b=new Float32Array(2*a.uvs2.length),this.setAttribute("uv2",(new pa(b,2)).copyVector2sArray(a.uvs2)));this.groups=a.groups;for(var d in a.morphTargets){b=[];for(var e=a.morphTargets[d],f=0,g=e.length;f<g;f++){var h=e[f],k=new ea(3*h.data.length,3);k.name=h.name;b.push(k.copyVector3sArray(h.data))}this.morphAttributes[d]=
|
|
|
+b}0<a.skinIndices.length&&(d=new ea(4*a.skinIndices.length,4),this.setAttribute("skinIndex",d.copyVector4sArray(a.skinIndices)));0<a.skinWeights.length&&(d=new ea(4*a.skinWeights.length,4),this.setAttribute("skinWeight",d.copyVector4sArray(a.skinWeights)));null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());return this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new za);var a=this.attributes.position,
|
|
|
+b=this.morphAttributes.position;if(a&&a.isGLBufferAttribute)console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),this.boundingBox.set(new w(-Infinity,-Infinity,-Infinity),new w(Infinity,Infinity,Infinity));else{if(void 0!==a){if(this.boundingBox.setFromBufferAttribute(a),b){a=0;for(var d=b.length;a<d;a++)Jb.setFromBufferAttribute(b[a]),this.morphTargetsRelative?(jb.addVectors(this.boundingBox.min,
|
|
|
+Jb.min),this.boundingBox.expandByPoint(jb),jb.addVectors(this.boundingBox.max,Jb.max),this.boundingBox.expandByPoint(jb)):(this.boundingBox.expandByPoint(Jb.min),this.boundingBox.expandByPoint(Jb.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}},computeBoundingSphere:function(){null===
|
|
|
+this.boundingSphere&&(this.boundingSphere=new Wa);var a=this.attributes.position,b=this.morphAttributes.position;if(a&&a.isGLBufferAttribute)console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),this.boundingSphere.set(new w,Infinity);else if(a){var d=this.boundingSphere.center;Jb.setFromBufferAttribute(a);if(b)for(var e=0,f=b.length;e<f;e++)Ff.setFromBufferAttribute(b[e]),this.morphTargetsRelative?
|
|
|
+(jb.addVectors(Jb.min,Ff.min),Jb.expandByPoint(jb),jb.addVectors(Jb.max,Ff.max),Jb.expandByPoint(jb)):(Jb.expandByPoint(Ff.min),Jb.expandByPoint(Ff.max));Jb.getCenter(d);f=e=0;for(var g=a.count;f<g;f++)jb.fromBufferAttribute(a,f),e=Math.max(e,d.distanceToSquared(jb));if(b)for(f=0,g=b.length;f<g;f++)for(var h=b[f],k=this.morphTargetsRelative,l=0,m=h.count;l<m;l++)jb.fromBufferAttribute(h,l),k&&(we.fromBufferAttribute(a,l),jb.add(we)),e=Math.max(e,d.distanceToSquared(jb));this.boundingSphere.radius=
|
|
|
+Math.sqrt(e);isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}},computeFaceNormals:function(){},computeVertexNormals:function(){var a=this.index,b=this.getAttribute("position");if(void 0!==b){var d=this.getAttribute("normal");if(void 0===d)d=new pa(new Float32Array(3*b.count),3),this.setAttribute("normal",d);else for(var e=0,f=d.count;e<f;e++)d.setXYZ(e,0,0,0);e=new w;
|
|
|
+f=new w;var g=new w,h=new w,k=new w,l=new w,m=new w,n=new w;if(a)for(var p=0,t=a.count;p<t;p+=3){var q=a.getX(p+0),v=a.getX(p+1),u=a.getX(p+2);e.fromBufferAttribute(b,q);f.fromBufferAttribute(b,v);g.fromBufferAttribute(b,u);m.subVectors(g,f);n.subVectors(e,f);m.cross(n);h.fromBufferAttribute(d,q);k.fromBufferAttribute(d,v);l.fromBufferAttribute(d,u);h.add(m);k.add(m);l.add(m);d.setXYZ(q,h.x,h.y,h.z);d.setXYZ(v,k.x,k.y,k.z);d.setXYZ(u,l.x,l.y,l.z)}else for(a=0,h=b.count;a<h;a+=3)e.fromBufferAttribute(b,
|
|
|
+a+0),f.fromBufferAttribute(b,a+1),g.fromBufferAttribute(b,a+2),m.subVectors(g,f),n.subVectors(e,f),m.cross(n),d.setXYZ(a+0,m.x,m.y,m.z),d.setXYZ(a+1,m.x,m.y,m.z),d.setXYZ(a+2,m.x,m.y,m.z);this.normalizeNormals();d.needsUpdate=!0}},merge:function(a,b){if(a&&a.isBufferGeometry){void 0===b&&(b=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var d=this.attributes,e;for(e in d)if(void 0!==
|
|
|
+a.attributes[e]){var f=d[e].array,g=a.attributes[e],h=g.array,k=g.itemSize*b;g=Math.min(h.length,f.length-k);for(var l=0;l<g;l++,k++)f[k]=h[l]}return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",a)},normalizeNormals:function(){for(var a=this.attributes.normal,b=0,d=a.count;b<d;b++)jb.fromBufferAttribute(a,b),jb.normalize(),a.setXYZ(b,jb.x,jb.y,jb.z)},toNonIndexed:function(){function a(n,p){var t=n.array,q=n.itemSize;n=n.normalized;for(var v=
|
|
|
+new t.constructor(p.length*q),u,A=0,B=0,D=p.length;B<D;B++){u=p[B]*q;for(var G=0;G<q;G++)v[A++]=t[u++]}return new pa(v,q,n)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var b=new ka,d=this.index.array,e=this.attributes;for(h in e){var f=a(e[h],d);b.setAttribute(h,f)}e=this.morphAttributes;for(var g in e){var h=[];f=e[g];for(var k=0,l=f.length;k<l;k++){var m=a(f[k],d);h.push(m)}b.morphAttributes[g]=h}b.morphTargetsRelative=this.morphTargetsRelative;
|
|
|
+d=this.groups;g=0;for(e=d.length;g<e;g++)h=d[g],b.addGroup(h.start,h.count,h.materialIndex);return b},toJSON:function(){var a={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};a.uuid=this.uuid;a.type=this.type;""!==this.name&&(a.name=this.name);0<Object.keys(this.userData).length&&(a.userData=this.userData);if(void 0!==this.parameters){var b=this.parameters;for(d in b)void 0!==b[d]&&(a[d]=b[d]);return a}a.data={attributes:{}};var d=this.index;null!==d&&(a.data.index=
|
|
|
+{type:d.array.constructor.name,array:Array.prototype.slice.call(d.array)});d=this.attributes;for(var e in d){var f=d[e],g=f.toJSON(a.data);""!==f.name&&(g.name=f.name);a.data.attributes[e]=g}e={};d=!1;for(b in this.morphAttributes){f=this.morphAttributes[b];g=[];for(var h=0,k=f.length;h<k;h++){var l=f[h],m=l.toJSON(a.data);""!==l.name&&(m.name=l.name);g.push(m)}0<g.length&&(e[b]=g,d=!0)}d&&(a.data.morphAttributes=e,a.data.morphTargetsRelative=this.morphTargetsRelative);b=this.groups;0<b.length&&(a.data.groups=
|
|
|
+JSON.parse(JSON.stringify(b)));b=this.boundingSphere;null!==b&&(a.data.boundingSphere={center:b.center.toArray(),radius:b.radius});return a},clone:function(){return(new ka).copy(this)},copy:function(a){this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;var b={};this.name=a.name;var d=a.index;null!==d&&this.setIndex(d.clone(b));d=a.attributes;for(var e in d)this.setAttribute(e,d[e].clone(b));e=a.morphAttributes;for(var f in e){d=[];for(var g=
|
|
|
+e[f],h=0,k=g.length;h<k;h++)d.push(g[h].clone(b));this.morphAttributes[f]=d}this.morphTargetsRelative=a.morphTargetsRelative;b=a.groups;f=0;for(e=b.length;f<e;f++)d=b[f],this.addGroup(d.start,d.count,d.materialIndex);b=a.boundingBox;null!==b&&(this.boundingBox=b.clone());b=a.boundingSphere;null!==b&&(this.boundingSphere=b.clone());this.drawRange.start=a.drawRange.start;this.drawRange.count=a.drawRange.count;this.userData=a.userData;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});
|
|
|
var Ej=new da,td=new Ta,ji=new Wa,yc=new w,zc=new w,Ac=new w,ih=new w,jh=new w,kh=new w,Qf=new w,Rf=new w,Sf=new w,Cd=new L,Dd=new L,Ed=new L,Ie=new w,Of=new w;Qa.prototype=Object.assign(Object.create(ha.prototype),{constructor:Qa,isMesh:!0,copy:function(a){ha.prototype.copy.call(this,a);void 0!==a.morphTargetInfluences&&(this.morphTargetInfluences=a.morphTargetInfluences.slice());void 0!==a.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},a.morphTargetDictionary));this.material=
|
|
|
a.material;this.geometry=a.geometry;return this},updateMorphTargets:function(){var a=this.geometry;if(a.isBufferGeometry){a=a.morphAttributes;var b=Object.keys(a);if(0<b.length&&(a=a[b[0]],void 0!==a)){this.morphTargetInfluences=[];this.morphTargetDictionary={};b=0;for(var d=a.length;b<d;b++){var e=a[b].name||String(b);this.morphTargetInfluences.push(0);this.morphTargetDictionary[e]=b}}}else a=a.morphTargets,void 0!==a&&0<a.length&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")},
|
|
|
raycast:function(a,b){var d=this.geometry,e=this.material,f=this.matrixWorld;if(void 0!==e&&(null===d.boundingSphere&&d.computeBoundingSphere(),ji.copy(d.boundingSphere),ji.applyMatrix4(f),!1!==a.ray.intersectsSphere(ji)&&(Ej.getInverse(f),td.copy(a.ray).applyMatrix4(Ej),null===d.boundingBox||!1!==td.intersectsBox(d.boundingBox))))if(d.isBufferGeometry){var g=d.index,h=d.attributes.position;f=d.morphAttributes.position;var k=d.morphTargetsRelative,l=d.attributes.uv,m=d.attributes.uv2,n=d.groups,p=
|