123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201 |
- // threejs.org/license
- 'use strict';THREE.GeometryUtils={merge:function(a,b,c){console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.");var d;b instanceof THREE.Mesh&&(b.matrixAutoUpdate&&b.updateMatrix(),d=b.matrix,b=b.geometry);a.merge(b,d,c)},center:function(a){console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.");return a.center()}};
- THREE.ImageUtils={crossOrigin:void 0,loadTexture:function(a,b,c,d){var f=new THREE.ImageLoader;f.crossOrigin=this.crossOrigin;var e=new THREE.Texture(void 0,b);f.load(a,function(a){e.image=a;e.needsUpdate=!0;c&&c(e)},void 0,function(a){d&&d(a)});e.sourceFile=a;return e},loadTextureCube:function(a,b,c,d){var f=new THREE.ImageLoader;f.crossOrigin=this.crossOrigin;var e=new THREE.CubeTexture([],b);e.flipY=!1;var g=0;b=function(b){f.load(a[b],function(a){e.images[b]=a;g+=1;6===g&&(e.needsUpdate=!0,c&&
- c(e))})};d=0;for(var h=a.length;d<h;++d)b(d);return e},loadCompressedTexture:function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},loadCompressedTextureCube:function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")},getNormalMap:function(a,b){var c=function(a){var b=Math.sqrt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]);return[a[0]/b,a[1]/b,a[2]/b]};b|=1;var d=a.width,f=a.height,e=document.createElement("canvas");
- e.width=d;e.height=f;var g=e.getContext("2d");g.drawImage(a,0,0);for(var h=g.getImageData(0,0,d,f).data,k=g.createImageData(d,f),l=k.data,m=0;m<d;m++)for(var q=0;q<f;q++){var n=0>q-1?0:q-1,r=q+1>f-1?f-1:q+1,s=0>m-1?0:m-1,p=m+1>d-1?d-1:m+1,t=[],u=[0,0,h[4*(q*d+m)]/255*b];t.push([-1,0,h[4*(q*d+s)]/255*b]);t.push([-1,-1,h[4*(n*d+s)]/255*b]);t.push([0,-1,h[4*(n*d+m)]/255*b]);t.push([1,-1,h[4*(n*d+p)]/255*b]);t.push([1,0,h[4*(q*d+p)]/255*b]);t.push([1,1,h[4*(r*d+p)]/255*b]);t.push([0,1,h[4*(r*d+m)]/255*
- b]);t.push([-1,1,h[4*(r*d+s)]/255*b]);n=[];s=t.length;for(r=0;r<s;r++){var p=t[r],w=t[(r+1)%s],p=[p[0]-u[0],p[1]-u[1],p[2]-u[2]],w=[w[0]-u[0],w[1]-u[1],w[2]-u[2]];n.push(c([p[1]*w[2]-p[2]*w[1],p[2]*w[0]-p[0]*w[2],p[0]*w[1]-p[1]*w[0]]))}t=[0,0,0];for(r=0;r<n.length;r++)t[0]+=n[r][0],t[1]+=n[r][1],t[2]+=n[r][2];t[0]/=n.length;t[1]/=n.length;t[2]/=n.length;u=4*(q*d+m);l[u]=(t[0]+1)/2*255|0;l[u+1]=(t[1]+1)/2*255|0;l[u+2]=255*t[2]|0;l[u+3]=255}g.putImageData(k,0,0);return e},generateDataTexture:function(a,
- b,c){var d=a*b,f=new Uint8Array(3*d),e=Math.floor(255*c.r),g=Math.floor(255*c.g);c=Math.floor(255*c.b);for(var h=0;h<d;h++)f[3*h]=e,f[3*h+1]=g,f[3*h+2]=c;a=new THREE.DataTexture(f,a,b,THREE.RGBFormat);a.needsUpdate=!0;return a}};
- THREE.SceneUtils={createMultiMaterialObject:function(a,b){for(var c=new THREE.Object3D,d=0,f=b.length;d<f;d++)c.add(new THREE.Mesh(a,b[d]));return c},detach:function(a,b,c){a.applyMatrix(b.matrixWorld);b.remove(a);c.add(a)},attach:function(a,b,c){var d=new THREE.Matrix4;d.getInverse(c.matrixWorld);a.applyMatrix(d);b.remove(a);c.add(a)}};
- THREE.FontUtils={faces:{},face:"helvetiker",weight:"normal",style:"normal",size:150,divisions:10,getFace:function(){try{return this.faces[this.face][this.weight][this.style]}catch(a){throw"The font "+this.face+" with "+this.weight+" weight and "+this.style+" style is missing.";}},loadFace:function(a){var b=a.familyName.toLowerCase();this.faces[b]=this.faces[b]||{};this.faces[b][a.cssFontWeight]=this.faces[b][a.cssFontWeight]||{};this.faces[b][a.cssFontWeight][a.cssFontStyle]=a;return this.faces[b][a.cssFontWeight][a.cssFontStyle]=
- a},drawText:function(a){var b=this.getFace(),c=this.size/b.resolution,d=0,f=String(a).split(""),e=f.length,g=[];for(a=0;a<e;a++){var h=new THREE.Path,h=this.extractGlyphPoints(f[a],b,c,d,h),d=d+h.offset;g.push(h.path)}return{paths:g,offset:d/2}},extractGlyphPoints:function(a,b,c,d,f){var e=[],g,h,k,l,m,q,n,r,s,p,t,u=b.glyphs[a]||b.glyphs["?"];if(u){if(u.o)for(b=u._cachedOutline||(u._cachedOutline=u.o.split(" ")),l=b.length,a=0;a<l;)switch(k=b[a++],k){case "m":k=b[a++]*c+d;m=b[a++]*c;f.moveTo(k,m);
- break;case "l":k=b[a++]*c+d;m=b[a++]*c;f.lineTo(k,m);break;case "q":k=b[a++]*c+d;m=b[a++]*c;r=b[a++]*c+d;s=b[a++]*c;f.quadraticCurveTo(r,s,k,m);if(g=e[e.length-1])for(q=g.x,n=g.y,g=1,h=this.divisions;g<=h;g++){var w=g/h;THREE.Shape.Utils.b2(w,q,r,k);THREE.Shape.Utils.b2(w,n,s,m)}break;case "b":if(k=b[a++]*c+d,m=b[a++]*c,r=b[a++]*c+d,s=b[a++]*c,p=b[a++]*c+d,t=b[a++]*c,f.bezierCurveTo(r,s,p,t,k,m),g=e[e.length-1])for(q=g.x,n=g.y,g=1,h=this.divisions;g<=h;g++)w=g/h,THREE.Shape.Utils.b3(w,q,r,p,k),THREE.Shape.Utils.b3(w,
- n,s,t,m)}return{offset:u.ha*c,path:f}}}};
- THREE.FontUtils.generateShapes=function(a,b){b=b||{};var c=void 0!==b.curveSegments?b.curveSegments:4,d=void 0!==b.font?b.font:"helvetiker",f=void 0!==b.weight?b.weight:"normal",e=void 0!==b.style?b.style:"normal";THREE.FontUtils.size=void 0!==b.size?b.size:100;THREE.FontUtils.divisions=c;THREE.FontUtils.face=d;THREE.FontUtils.weight=f;THREE.FontUtils.style=e;c=THREE.FontUtils.drawText(a).paths;d=[];f=0;for(e=c.length;f<e;f++)Array.prototype.push.apply(d,c[f].toShapes());return d};
- (function(a){var b=function(a){for(var b=a.length,f=0,e=b-1,g=0;g<b;e=g++)f+=a[e].x*a[g].y-a[g].x*a[e].y;return.5*f};a.Triangulate=function(a,d){var f=a.length;if(3>f)return null;var e=[],g=[],h=[],k,l,m;if(0<b(a))for(l=0;l<f;l++)g[l]=l;else for(l=0;l<f;l++)g[l]=f-1-l;var q=2*f;for(l=f-1;2<f;){if(0>=q--){console.log("Warning, unable to triangulate polygon!");break}k=l;f<=k&&(k=0);l=k+1;f<=l&&(l=0);m=l+1;f<=m&&(m=0);var n;a:{var r=n=void 0,s=void 0,p=void 0,t=void 0,u=void 0,w=void 0,G=void 0,A=void 0,
- r=a[g[k]].x,s=a[g[k]].y,p=a[g[l]].x,t=a[g[l]].y,u=a[g[m]].x,w=a[g[m]].y;if(1E-10>(p-r)*(w-s)-(t-s)*(u-r))n=!1;else{var I=void 0,D=void 0,x=void 0,y=void 0,z=void 0,B=void 0,E=void 0,L=void 0,F=void 0,N=void 0,F=L=E=A=G=void 0,I=u-p,D=w-t,x=r-u,y=s-w,z=p-r,B=t-s;for(n=0;n<f;n++)if(G=a[g[n]].x,A=a[g[n]].y,!(G===r&&A===s||G===p&&A===t||G===u&&A===w)&&(E=G-r,L=A-s,F=G-p,N=A-t,G-=u,A-=w,F=I*N-D*F,E=z*L-B*E,L=x*A-y*G,-1E-10<=F&&-1E-10<=L&&-1E-10<=E)){n=!1;break a}n=!0}}if(n){e.push([a[g[k]],a[g[l]],a[g[m]]]);
- h.push([g[k],g[l],g[m]]);k=l;for(m=l+1;m<f;k++,m++)g[k]=g[m];f--;q=2*f}}return d?h:e};a.Triangulate.area=b;return a})(THREE.FontUtils);self._typeface_js={faces:THREE.FontUtils.faces,loadFace:THREE.FontUtils.loadFace};THREE.typeface_js=self._typeface_js;
- THREE.Audio=function(a){THREE.Object3D.call(this);this.type="Audio";this.context=a.context;this.source=this.context.createBufferSource();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.panner=this.context.createPanner();this.panner.connect(this.gain)};THREE.Audio.prototype=Object.create(THREE.Object3D.prototype);
- THREE.Audio.prototype.load=function(a){var b=this,c=new XMLHttpRequest;c.open("GET",a,!0);c.responseType="arraybuffer";c.onload=function(a){b.context.decodeAudioData(this.response,function(a){b.source.buffer=a;b.source.connect(b.panner);b.source.start(0)})};c.send();return this};THREE.Audio.prototype.setLoop=function(a){this.source.loop=a};THREE.Audio.prototype.setRefDistance=function(a){this.panner.refDistance=a};THREE.Audio.prototype.setRolloffFactor=function(a){this.panner.rolloffFactor=a};
- THREE.Audio.prototype.updateMatrixWorld=function(){var a=new THREE.Vector3;return function(b){THREE.Object3D.prototype.updateMatrixWorld.call(this,b);a.setFromMatrixPosition(this.matrixWorld);this.panner.setPosition(a.x,a.y,a.z)}}();THREE.AudioListener=function(){THREE.Object3D.call(this);this.type="AudioListener";this.context=new (window.AudioContext||window.webkitAudioContext)};THREE.AudioListener.prototype=Object.create(THREE.Object3D.prototype);
- THREE.AudioListener.prototype.updateMatrixWorld=function(){var a=new THREE.Vector3,b=new THREE.Quaternion,c=new THREE.Vector3,d=new THREE.Vector3,f=new THREE.Vector3,e=new THREE.Vector3;return function(g){THREE.Object3D.prototype.updateMatrixWorld.call(this,g);g=this.context.listener;this.matrixWorld.decompose(a,b,c);d.set(0,0,-1).applyQuaternion(b);f.subVectors(a,e);g.setPosition(a.x,a.y,a.z);g.setOrientation(d.x,d.y,d.z,this.up.x,this.up.y,this.up.z);g.setVelocity(f.x,f.y,f.z);e.copy(a)}}();
- THREE.Curve=function(){};THREE.Curve.prototype.getPoint=function(a){console.log("Warning, getPoint() not implemented!");return null};THREE.Curve.prototype.getPointAt=function(a){a=this.getUtoTmapping(a);return this.getPoint(a)};THREE.Curve.prototype.getPoints=function(a){a||(a=5);var b,c=[];for(b=0;b<=a;b++)c.push(this.getPoint(b/a));return c};THREE.Curve.prototype.getSpacedPoints=function(a){a||(a=5);var b,c=[];for(b=0;b<=a;b++)c.push(this.getPointAt(b/a));return c};
- THREE.Curve.prototype.getLength=function(){var a=this.getLengths();return a[a.length-1]};THREE.Curve.prototype.getLengths=function(a){a||(a=this.__arcLengthDivisions?this.__arcLengthDivisions:200);if(this.cacheArcLengths&&this.cacheArcLengths.length==a+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var b=[],c,d=this.getPoint(0),f,e=0;b.push(0);for(f=1;f<=a;f++)c=this.getPoint(f/a),e+=c.distanceTo(d),b.push(e),d=c;return this.cacheArcLengths=b};
- THREE.Curve.prototype.updateArcLengths=function(){this.needsUpdate=!0;this.getLengths()};THREE.Curve.prototype.getUtoTmapping=function(a,b){var c=this.getLengths(),d=0,f=c.length,e;e=b?b:a*c[f-1];for(var g=0,h=f-1,k;g<=h;)if(d=Math.floor(g+(h-g)/2),k=c[d]-e,0>k)g=d+1;else if(0<k)h=d-1;else{h=d;break}d=h;if(c[d]==e)return d/(f-1);g=c[d];return c=(d+(e-g)/(c[d+1]-g))/(f-1)};THREE.Curve.prototype.getTangent=function(a){var b=a-1E-4;a+=1E-4;0>b&&(b=0);1<a&&(a=1);b=this.getPoint(b);return this.getPoint(a).clone().sub(b).normalize()};
- THREE.Curve.prototype.getTangentAt=function(a){a=this.getUtoTmapping(a);return this.getTangent(a)};
- THREE.Curve.Utils={tangentQuadraticBezier:function(a,b,c,d){return 2*(1-a)*(c-b)+2*a*(d-c)},tangentCubicBezier:function(a,b,c,d,f){return-3*b*(1-a)*(1-a)+3*c*(1-a)*(1-a)-6*a*c*(1-a)+6*a*d*(1-a)-3*a*a*d+3*a*a*f},tangentSpline:function(a,b,c,d,f){return 6*a*a-6*a+(3*a*a-4*a+1)+(-6*a*a+6*a)+(3*a*a-2*a)},interpolate:function(a,b,c,d,f){a=.5*(c-a);d=.5*(d-b);var e=f*f;return(2*b-2*c+a+d)*f*e+(-3*b+3*c-2*a-d)*e+a*f+b}};
- THREE.Curve.create=function(a,b){a.prototype=Object.create(THREE.Curve.prototype);a.prototype.getPoint=b;return a};THREE.CurvePath=function(){this.curves=[];this.bends=[];this.autoClose=!1};THREE.CurvePath.prototype=Object.create(THREE.Curve.prototype);THREE.CurvePath.prototype.add=function(a){this.curves.push(a)};THREE.CurvePath.prototype.checkConnection=function(){};
- THREE.CurvePath.prototype.closePath=function(){var a=this.curves[0].getPoint(0),b=this.curves[this.curves.length-1].getPoint(1);a.equals(b)||this.curves.push(new THREE.LineCurve(b,a))};THREE.CurvePath.prototype.getPoint=function(a){var b=a*this.getLength(),c=this.getCurveLengths();for(a=0;a<c.length;){if(c[a]>=b)return b=c[a]-b,a=this.curves[a],b=1-b/a.getLength(),a.getPointAt(b);a++}return null};THREE.CurvePath.prototype.getLength=function(){var a=this.getCurveLengths();return a[a.length-1]};
- THREE.CurvePath.prototype.getCurveLengths=function(){if(this.cacheLengths&&this.cacheLengths.length==this.curves.length)return this.cacheLengths;var a=[],b=0,c,d=this.curves.length;for(c=0;c<d;c++)b+=this.curves[c].getLength(),a.push(b);return this.cacheLengths=a};
- THREE.CurvePath.prototype.getBoundingBox=function(){var a=this.getPoints(),b,c,d,f,e,g;b=c=Number.NEGATIVE_INFINITY;f=e=Number.POSITIVE_INFINITY;var h,k,l,m,q=a[0]instanceof THREE.Vector3;m=q?new THREE.Vector3:new THREE.Vector2;k=0;for(l=a.length;k<l;k++)h=a[k],h.x>b?b=h.x:h.x<f&&(f=h.x),h.y>c?c=h.y:h.y<e&&(e=h.y),q&&(h.z>d?d=h.z:h.z<g&&(g=h.z)),m.add(h);a={minX:f,minY:e,maxX:b,maxY:c};q&&(a.maxZ=d,a.minZ=g);return a};
- THREE.CurvePath.prototype.createPointsGeometry=function(a){a=this.getPoints(a,!0);return this.createGeometry(a)};THREE.CurvePath.prototype.createSpacedPointsGeometry=function(a){a=this.getSpacedPoints(a,!0);return this.createGeometry(a)};THREE.CurvePath.prototype.createGeometry=function(a){for(var b=new THREE.Geometry,c=0;c<a.length;c++)b.vertices.push(new THREE.Vector3(a[c].x,a[c].y,a[c].z||0));return b};THREE.CurvePath.prototype.addWrapPath=function(a){this.bends.push(a)};
- THREE.CurvePath.prototype.getTransformedPoints=function(a,b){var c=this.getPoints(a),d,f;b||(b=this.bends);d=0;for(f=b.length;d<f;d++)c=this.getWrapPoints(c,b[d]);return c};THREE.CurvePath.prototype.getTransformedSpacedPoints=function(a,b){var c=this.getSpacedPoints(a),d,f;b||(b=this.bends);d=0;for(f=b.length;d<f;d++)c=this.getWrapPoints(c,b[d]);return c};
- THREE.CurvePath.prototype.getWrapPoints=function(a,b){var c=this.getBoundingBox(),d,f,e,g,h,k;d=0;for(f=a.length;d<f;d++)e=a[d],g=e.x,h=e.y,k=g/c.maxX,k=b.getUtoTmapping(k,g),g=b.getPoint(k),k=b.getTangent(k),k.set(-k.y,k.x).multiplyScalar(h),e.x=g.x+k.x,e.y=g.y+k.y;return a};THREE.Gyroscope=function(){THREE.Object3D.call(this)};THREE.Gyroscope.prototype=Object.create(THREE.Object3D.prototype);
- THREE.Gyroscope.prototype.updateMatrixWorld=function(){var a=new THREE.Vector3,b=new THREE.Quaternion,c=new THREE.Vector3,d=new THREE.Vector3,f=new THREE.Quaternion,e=new THREE.Vector3;return function(g){this.matrixAutoUpdate&&this.updateMatrix();if(this.matrixWorldNeedsUpdate||g)this.parent?(this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.decompose(d,f,e),this.matrix.decompose(a,b,c),this.matrixWorld.compose(d,b,e)):this.matrixWorld.copy(this.matrix),this.matrixWorldNeedsUpdate=
- !1,g=!0;for(var h=0,k=this.children.length;h<k;h++)this.children[h].updateMatrixWorld(g)}}();THREE.Path=function(a){THREE.CurvePath.call(this);this.actions=[];a&&this.fromPoints(a)};THREE.Path.prototype=Object.create(THREE.CurvePath.prototype);THREE.PathActions={MOVE_TO:"moveTo",LINE_TO:"lineTo",QUADRATIC_CURVE_TO:"quadraticCurveTo",BEZIER_CURVE_TO:"bezierCurveTo",CSPLINE_THRU:"splineThru",ARC:"arc",ELLIPSE:"ellipse"};
- THREE.Path.prototype.fromPoints=function(a){this.moveTo(a[0].x,a[0].y);for(var b=1,c=a.length;b<c;b++)this.lineTo(a[b].x,a[b].y)};THREE.Path.prototype.moveTo=function(a,b){var c=Array.prototype.slice.call(arguments);this.actions.push({action:THREE.PathActions.MOVE_TO,args:c})};
- THREE.Path.prototype.lineTo=function(a,b){var c=Array.prototype.slice.call(arguments),d=this.actions[this.actions.length-1].args,d=new THREE.LineCurve(new THREE.Vector2(d[d.length-2],d[d.length-1]),new THREE.Vector2(a,b));this.curves.push(d);this.actions.push({action:THREE.PathActions.LINE_TO,args:c})};
- THREE.Path.prototype.quadraticCurveTo=function(a,b,c,d){var f=Array.prototype.slice.call(arguments),e=this.actions[this.actions.length-1].args,e=new THREE.QuadraticBezierCurve(new THREE.Vector2(e[e.length-2],e[e.length-1]),new THREE.Vector2(a,b),new THREE.Vector2(c,d));this.curves.push(e);this.actions.push({action:THREE.PathActions.QUADRATIC_CURVE_TO,args:f})};
- THREE.Path.prototype.bezierCurveTo=function(a,b,c,d,f,e){var g=Array.prototype.slice.call(arguments),h=this.actions[this.actions.length-1].args,h=new THREE.CubicBezierCurve(new THREE.Vector2(h[h.length-2],h[h.length-1]),new THREE.Vector2(a,b),new THREE.Vector2(c,d),new THREE.Vector2(f,e));this.curves.push(h);this.actions.push({action:THREE.PathActions.BEZIER_CURVE_TO,args:g})};
- THREE.Path.prototype.splineThru=function(a){var b=Array.prototype.slice.call(arguments),c=this.actions[this.actions.length-1].args,c=[new THREE.Vector2(c[c.length-2],c[c.length-1])];Array.prototype.push.apply(c,a);c=new THREE.SplineCurve(c);this.curves.push(c);this.actions.push({action:THREE.PathActions.CSPLINE_THRU,args:b})};THREE.Path.prototype.arc=function(a,b,c,d,f,e){var g=this.actions[this.actions.length-1].args;this.absarc(a+g[g.length-2],b+g[g.length-1],c,d,f,e)};
- THREE.Path.prototype.absarc=function(a,b,c,d,f,e){this.absellipse(a,b,c,c,d,f,e)};THREE.Path.prototype.ellipse=function(a,b,c,d,f,e,g){var h=this.actions[this.actions.length-1].args;this.absellipse(a+h[h.length-2],b+h[h.length-1],c,d,f,e,g)};THREE.Path.prototype.absellipse=function(a,b,c,d,f,e,g){var h=Array.prototype.slice.call(arguments),k=new THREE.EllipseCurve(a,b,c,d,f,e,g);this.curves.push(k);k=k.getPoint(1);h.push(k.x);h.push(k.y);this.actions.push({action:THREE.PathActions.ELLIPSE,args:h})};
- THREE.Path.prototype.getSpacedPoints=function(a,b){a||(a=40);for(var c=[],d=0;d<a;d++)c.push(this.getPoint(d/a));return c};
- THREE.Path.prototype.getPoints=function(a,b){if(this.useSpacedPoints)return console.log("tata"),this.getSpacedPoints(a,b);a=a||12;var c=[],d,f,e,g,h,k,l,m,q,n,r,s,p;d=0;for(f=this.actions.length;d<f;d++)switch(e=this.actions[d],g=e.action,e=e.args,g){case THREE.PathActions.MOVE_TO:c.push(new THREE.Vector2(e[0],e[1]));break;case THREE.PathActions.LINE_TO:c.push(new THREE.Vector2(e[0],e[1]));break;case THREE.PathActions.QUADRATIC_CURVE_TO:h=e[2];k=e[3];q=e[0];n=e[1];0<c.length?(g=c[c.length-1],r=g.x,
- s=g.y):(g=this.actions[d-1].args,r=g[g.length-2],s=g[g.length-1]);for(e=1;e<=a;e++)p=e/a,g=THREE.Shape.Utils.b2(p,r,q,h),p=THREE.Shape.Utils.b2(p,s,n,k),c.push(new THREE.Vector2(g,p));break;case THREE.PathActions.BEZIER_CURVE_TO:h=e[4];k=e[5];q=e[0];n=e[1];l=e[2];m=e[3];0<c.length?(g=c[c.length-1],r=g.x,s=g.y):(g=this.actions[d-1].args,r=g[g.length-2],s=g[g.length-1]);for(e=1;e<=a;e++)p=e/a,g=THREE.Shape.Utils.b3(p,r,q,l,h),p=THREE.Shape.Utils.b3(p,s,n,m,k),c.push(new THREE.Vector2(g,p));break;case THREE.PathActions.CSPLINE_THRU:g=
- this.actions[d-1].args;p=[new THREE.Vector2(g[g.length-2],g[g.length-1])];g=a*e[0].length;p=p.concat(e[0]);p=new THREE.SplineCurve(p);for(e=1;e<=g;e++)c.push(p.getPointAt(e/g));break;case THREE.PathActions.ARC:h=e[0];k=e[1];n=e[2];l=e[3];g=e[4];q=!!e[5];r=g-l;s=2*a;for(e=1;e<=s;e++)p=e/s,q||(p=1-p),p=l+p*r,g=h+n*Math.cos(p),p=k+n*Math.sin(p),c.push(new THREE.Vector2(g,p));break;case THREE.PathActions.ELLIPSE:for(h=e[0],k=e[1],n=e[2],m=e[3],l=e[4],g=e[5],q=!!e[6],r=g-l,s=2*a,e=1;e<=s;e++)p=e/s,q||
- (p=1-p),p=l+p*r,g=h+n*Math.cos(p),p=k+m*Math.sin(p),c.push(new THREE.Vector2(g,p))}d=c[c.length-1];1E-10>Math.abs(d.x-c[0].x)&&1E-10>Math.abs(d.y-c[0].y)&&c.splice(c.length-1,1);b&&c.push(c[0]);return c};
- THREE.Path.prototype.toShapes=function(a,b){function c(a){for(var b=[],c=0,d=a.length;c<d;c++){var g=a[c],f=new THREE.Shape;f.actions=g.actions;f.curves=g.curves;b.push(f)}return b}function d(a,b){for(var c=b.length,d=!1,g=c-1,f=0;f<c;g=f++){var e=b[g],h=b[f],k=h.x-e.x,n=h.y-e.y;if(1E-10<Math.abs(n)){if(0>n&&(e=b[f],k=-k,h=b[g],n=-n),!(a.y<e.y||a.y>h.y))if(a.y==e.y){if(a.x==e.x)return!0}else{g=n*(a.x-e.x)-k*(a.y-e.y);if(0==g)return!0;0>g||(d=!d)}}else if(a.y==e.y&&(h.x<=a.x&&a.x<=e.x||e.x<=a.x&&a.x<=
- h.x))return!0}return d}var f=function(a){var b,c,d,g,f=[],e=new THREE.Path;b=0;for(c=a.length;b<c;b++)d=a[b],g=d.args,d=d.action,d==THREE.PathActions.MOVE_TO&&0!=e.actions.length&&(f.push(e),e=new THREE.Path),e[d].apply(e,g);0!=e.actions.length&&f.push(e);return f}(this.actions);if(0==f.length)return[];if(!0===b)return c(f);var e,g,h,k=[];if(1==f.length)return g=f[0],h=new THREE.Shape,h.actions=g.actions,h.curves=g.curves,k.push(h),k;var l=!THREE.Shape.Utils.isClockWise(f[0].getPoints()),l=a?!l:l;
- h=[];var m=[],q=[],n=0,r;m[n]=void 0;q[n]=[];var s,p;s=0;for(p=f.length;s<p;s++)g=f[s],r=g.getPoints(),e=THREE.Shape.Utils.isClockWise(r),(e=a?!e:e)?(!l&&m[n]&&n++,m[n]={s:new THREE.Shape,p:r},m[n].s.actions=g.actions,m[n].s.curves=g.curves,l&&n++,q[n]=[]):q[n].push({h:g,p:r[0]});if(!m[0])return c(f);if(1<m.length){s=!1;p=[];g=0;for(f=m.length;g<f;g++)h[g]=[];g=0;for(f=m.length;g<f;g++)for(e=q[g],l=0;l<e.length;l++){n=e[l];r=!0;for(var t=0;t<m.length;t++)d(n.p,m[t].p)&&(g!=t&&p.push({froms:g,tos:t,
- hole:l}),r?(r=!1,h[t].push(n)):s=!0);r&&h[g].push(n)}0<p.length&&(s||(q=h))}s=0;for(p=m.length;s<p;s++)for(h=m[s].s,k.push(h),g=q[s],f=0,e=g.length;f<e;f++)h.holes.push(g[f].h);return k};THREE.Shape=function(){THREE.Path.apply(this,arguments);this.holes=[]};THREE.Shape.prototype=Object.create(THREE.Path.prototype);THREE.Shape.prototype.extrude=function(a){return new THREE.ExtrudeGeometry(this,a)};THREE.Shape.prototype.makeGeometry=function(a){return new THREE.ShapeGeometry(this,a)};
- THREE.Shape.prototype.getPointsHoles=function(a){var b,c=this.holes.length,d=[];for(b=0;b<c;b++)d[b]=this.holes[b].getTransformedPoints(a,this.bends);return d};THREE.Shape.prototype.getSpacedPointsHoles=function(a){var b,c=this.holes.length,d=[];for(b=0;b<c;b++)d[b]=this.holes[b].getTransformedSpacedPoints(a,this.bends);return d};THREE.Shape.prototype.extractAllPoints=function(a){return{shape:this.getTransformedPoints(a),holes:this.getPointsHoles(a)}};
- THREE.Shape.prototype.extractPoints=function(a){return this.useSpacedPoints?this.extractAllSpacedPoints(a):this.extractAllPoints(a)};THREE.Shape.prototype.extractAllSpacedPoints=function(a){return{shape:this.getTransformedSpacedPoints(a),holes:this.getSpacedPointsHoles(a)}};
- THREE.Shape.Utils={triangulateShape:function(a,b){function c(a,b,c){return a.x!=b.x?a.x<b.x?a.x<=c.x&&c.x<=b.x:b.x<=c.x&&c.x<=a.x:a.y<b.y?a.y<=c.y&&c.y<=b.y:b.y<=c.y&&c.y<=a.y}function d(a,b,d,g,f){var e=b.x-a.x,h=b.y-a.y,k=g.x-d.x,l=g.y-d.y,m=a.x-d.x,q=a.y-d.y,x=h*k-e*l,y=h*m-e*q;if(1E-10<Math.abs(x)){if(0<x){if(0>y||y>x)return[];k=l*m-k*q;if(0>k||k>x)return[]}else{if(0<y||y<x)return[];k=l*m-k*q;if(0<k||k<x)return[]}if(0==k)return!f||0!=y&&y!=x?[a]:[];if(k==x)return!f||0!=y&&y!=x?[b]:[];if(0==y)return[d];
- if(y==x)return[g];f=k/x;return[{x:a.x+f*e,y:a.y+f*h}]}if(0!=y||l*m!=k*q)return[];h=0==e&&0==h;k=0==k&&0==l;if(h&&k)return a.x!=d.x||a.y!=d.y?[]:[a];if(h)return c(d,g,a)?[a]:[];if(k)return c(a,b,d)?[d]:[];0!=e?(a.x<b.x?(e=a,k=a.x,h=b,a=b.x):(e=b,k=b.x,h=a,a=a.x),d.x<g.x?(b=d,x=d.x,l=g,d=g.x):(b=g,x=g.x,l=d,d=d.x)):(a.y<b.y?(e=a,k=a.y,h=b,a=b.y):(e=b,k=b.y,h=a,a=a.y),d.y<g.y?(b=d,x=d.y,l=g,d=g.y):(b=g,x=g.y,l=d,d=d.y));return k<=x?a<x?[]:a==x?f?[]:[b]:a<=d?[b,h]:[b,l]:k>d?[]:k==d?f?[]:[e]:a<=d?[e,h]:
- [e,l]}function f(a,b,c,d){var g=b.x-a.x,e=b.y-a.y;b=c.x-a.x;c=c.y-a.y;var f=d.x-a.x;d=d.y-a.y;a=g*c-e*b;g=g*d-e*f;return 1E-10<Math.abs(a)?(b=f*c-d*b,0<a?0<=g&&0<=b:0<=g||0<=b):0<g}var e,g,h,k,l,m={};h=a.concat();e=0;for(g=b.length;e<g;e++)Array.prototype.push.apply(h,b[e]);e=0;for(g=h.length;e<g;e++)l=h[e].x+":"+h[e].y,void 0!==m[l]&&console.log("Duplicate point",l),m[l]=e;e=function(a,b){function c(a,b){var d=h.length-1,g=a-1;0>g&&(g=d);var e=a+1;e>d&&(e=0);d=f(h[a],h[g],h[e],k[b]);if(!d)return!1;
- d=k.length-1;g=b-1;0>g&&(g=d);e=b+1;e>d&&(e=0);return(d=f(k[b],k[g],k[e],h[a]))?!0:!1}function g(a,b){var c,e;for(c=0;c<h.length;c++)if(e=c+1,e%=h.length,e=d(a,b,h[c],h[e],!0),0<e.length)return!0;return!1}function e(a,c){var g,f,h,k;for(g=0;g<l.length;g++)for(f=b[l[g]],h=0;h<f.length;h++)if(k=h+1,k%=f.length,k=d(a,c,f[h],f[k],!0),0<k.length)return!0;return!1}var h=a.concat(),k,l=[],m,q,D,x,y,z=[],B,E,L,F=0;for(m=b.length;F<m;F++)l.push(F);B=0;for(var N=2*l.length;0<l.length;){N--;if(0>N){console.log("Infinite Loop! Holes left:"+
- l.length+", Probably Hole outside Shape!");break}for(q=B;q<h.length;q++){D=h[q];m=-1;for(F=0;F<l.length;F++)if(x=l[F],y=D.x+":"+D.y+":"+x,void 0===z[y]){k=b[x];for(E=0;E<k.length;E++)if(x=k[E],c(q,E)&&!g(D,x)&&!e(D,x)){m=E;l.splice(F,1);B=h.slice(0,q+1);x=h.slice(q);E=k.slice(m);L=k.slice(0,m+1);h=B.concat(E).concat(L).concat(x);B=q;break}if(0<=m)break;z[y]=!0}if(0<=m)break}}return h}(a,b);var q=THREE.FontUtils.Triangulate(e,!1);e=0;for(g=q.length;e<g;e++)for(k=q[e],h=0;3>h;h++)l=k[h].x+":"+k[h].y,
- l=m[l],void 0!==l&&(k[h]=l);return q.concat()},isClockWise:function(a){return 0>THREE.FontUtils.Triangulate.area(a)},b2p0:function(a,b){var c=1-a;return c*c*b},b2p1:function(a,b){return 2*(1-a)*a*b},b2p2:function(a,b){return a*a*b},b2:function(a,b,c,d){return this.b2p0(a,b)+this.b2p1(a,c)+this.b2p2(a,d)},b3p0:function(a,b){var c=1-a;return c*c*c*b},b3p1:function(a,b){var c=1-a;return 3*c*c*a*b},b3p2:function(a,b){return 3*(1-a)*a*a*b},b3p3:function(a,b){return a*a*a*b},b3:function(a,b,c,d,f){return this.b3p0(a,
- b)+this.b3p1(a,c)+this.b3p2(a,d)+this.b3p3(a,f)}};THREE.LineCurve=function(a,b){this.v1=a;this.v2=b};THREE.LineCurve.prototype=Object.create(THREE.Curve.prototype);THREE.LineCurve.prototype.getPoint=function(a){var b=this.v2.clone().sub(this.v1);b.multiplyScalar(a).add(this.v1);return b};THREE.LineCurve.prototype.getPointAt=function(a){return this.getPoint(a)};THREE.LineCurve.prototype.getTangent=function(a){return this.v2.clone().sub(this.v1).normalize()};
- THREE.QuadraticBezierCurve=function(a,b,c){this.v0=a;this.v1=b;this.v2=c};THREE.QuadraticBezierCurve.prototype=Object.create(THREE.Curve.prototype);THREE.QuadraticBezierCurve.prototype.getPoint=function(a){var b=new THREE.Vector2;b.x=THREE.Shape.Utils.b2(a,this.v0.x,this.v1.x,this.v2.x);b.y=THREE.Shape.Utils.b2(a,this.v0.y,this.v1.y,this.v2.y);return b};
- THREE.QuadraticBezierCurve.prototype.getTangent=function(a){var b=new THREE.Vector2;b.x=THREE.Curve.Utils.tangentQuadraticBezier(a,this.v0.x,this.v1.x,this.v2.x);b.y=THREE.Curve.Utils.tangentQuadraticBezier(a,this.v0.y,this.v1.y,this.v2.y);return b.normalize()};THREE.CubicBezierCurve=function(a,b,c,d){this.v0=a;this.v1=b;this.v2=c;this.v3=d};THREE.CubicBezierCurve.prototype=Object.create(THREE.Curve.prototype);
- THREE.CubicBezierCurve.prototype.getPoint=function(a){var b;b=THREE.Shape.Utils.b3(a,this.v0.x,this.v1.x,this.v2.x,this.v3.x);a=THREE.Shape.Utils.b3(a,this.v0.y,this.v1.y,this.v2.y,this.v3.y);return new THREE.Vector2(b,a)};THREE.CubicBezierCurve.prototype.getTangent=function(a){var b;b=THREE.Curve.Utils.tangentCubicBezier(a,this.v0.x,this.v1.x,this.v2.x,this.v3.x);a=THREE.Curve.Utils.tangentCubicBezier(a,this.v0.y,this.v1.y,this.v2.y,this.v3.y);b=new THREE.Vector2(b,a);b.normalize();return b};
- THREE.SplineCurve=function(a){this.points=void 0==a?[]:a};THREE.SplineCurve.prototype=Object.create(THREE.Curve.prototype);THREE.SplineCurve.prototype.getPoint=function(a){var b=this.points;a*=b.length-1;var c=Math.floor(a);a-=c;var d=b[0==c?c:c-1],f=b[c],e=b[c>b.length-2?b.length-1:c+1],b=b[c>b.length-3?b.length-1:c+2],c=new THREE.Vector2;c.x=THREE.Curve.Utils.interpolate(d.x,f.x,e.x,b.x,a);c.y=THREE.Curve.Utils.interpolate(d.y,f.y,e.y,b.y,a);return c};
- THREE.EllipseCurve=function(a,b,c,d,f,e,g){this.aX=a;this.aY=b;this.xRadius=c;this.yRadius=d;this.aStartAngle=f;this.aEndAngle=e;this.aClockwise=g};THREE.EllipseCurve.prototype=Object.create(THREE.Curve.prototype);
- THREE.EllipseCurve.prototype.getPoint=function(a){var b=this.aEndAngle-this.aStartAngle;0>b&&(b+=2*Math.PI);b>2*Math.PI&&(b-=2*Math.PI);a=!0===this.aClockwise?this.aEndAngle+(1-a)*(2*Math.PI-b):this.aStartAngle+a*b;b=new THREE.Vector2;b.x=this.aX+this.xRadius*Math.cos(a);b.y=this.aY+this.yRadius*Math.sin(a);return b};THREE.ArcCurve=function(a,b,c,d,f,e){THREE.EllipseCurve.call(this,a,b,c,c,d,f,e)};THREE.ArcCurve.prototype=Object.create(THREE.EllipseCurve.prototype);
- THREE.LineCurve3=THREE.Curve.create(function(a,b){this.v1=a;this.v2=b},function(a){var b=new THREE.Vector3;b.subVectors(this.v2,this.v1);b.multiplyScalar(a);b.add(this.v1);return b});THREE.QuadraticBezierCurve3=THREE.Curve.create(function(a,b,c){this.v0=a;this.v1=b;this.v2=c},function(a){var b=new THREE.Vector3;b.x=THREE.Shape.Utils.b2(a,this.v0.x,this.v1.x,this.v2.x);b.y=THREE.Shape.Utils.b2(a,this.v0.y,this.v1.y,this.v2.y);b.z=THREE.Shape.Utils.b2(a,this.v0.z,this.v1.z,this.v2.z);return b});
- THREE.CubicBezierCurve3=THREE.Curve.create(function(a,b,c,d){this.v0=a;this.v1=b;this.v2=c;this.v3=d},function(a){var b=new THREE.Vector3;b.x=THREE.Shape.Utils.b3(a,this.v0.x,this.v1.x,this.v2.x,this.v3.x);b.y=THREE.Shape.Utils.b3(a,this.v0.y,this.v1.y,this.v2.y,this.v3.y);b.z=THREE.Shape.Utils.b3(a,this.v0.z,this.v1.z,this.v2.z,this.v3.z);return b});
- THREE.SplineCurve3=THREE.Curve.create(function(a){this.points=void 0==a?[]:a},function(a){var b=this.points;a*=b.length-1;var c=Math.floor(a);a-=c;var d=b[0==c?c:c-1],f=b[c],e=b[c>b.length-2?b.length-1:c+1],b=b[c>b.length-3?b.length-1:c+2],c=new THREE.Vector3;c.x=THREE.Curve.Utils.interpolate(d.x,f.x,e.x,b.x,a);c.y=THREE.Curve.Utils.interpolate(d.y,f.y,e.y,b.y,a);c.z=THREE.Curve.Utils.interpolate(d.z,f.z,e.z,b.z,a);return c});
- THREE.ClosedSplineCurve3=THREE.Curve.create(function(a){this.points=void 0==a?[]:a},function(a){var b=this.points;a*=b.length-0;var c=Math.floor(a);a-=c;var c=c+(0<c?0:(Math.floor(Math.abs(c)/b.length)+1)*b.length),d=b[(c-1)%b.length],f=b[c%b.length],e=b[(c+1)%b.length],b=b[(c+2)%b.length],c=new THREE.Vector3;c.x=THREE.Curve.Utils.interpolate(d.x,f.x,e.x,b.x,a);c.y=THREE.Curve.Utils.interpolate(d.y,f.y,e.y,b.y,a);c.z=THREE.Curve.Utils.interpolate(d.z,f.z,e.z,b.z,a);return c});
- THREE.AnimationHandler={LINEAR:0,CATMULLROM:1,CATMULLROM_FORWARD:2,add:function(){console.warn("THREE.AnimationHandler.add() has been deprecated.")},get:function(){console.warn("THREE.AnimationHandler.get() has been deprecated.")},remove:function(){console.warn("THREE.AnimationHandler.remove() has been deprecated.")},animations:[],init:function(a){if(!0===a.initialized)return a;for(var b=0;b<a.hierarchy.length;b++){for(var c=0;c<a.hierarchy[b].keys.length;c++)if(0>a.hierarchy[b].keys[c].time&&(a.hierarchy[b].keys[c].time=
- 0),void 0!==a.hierarchy[b].keys[c].rot&&!(a.hierarchy[b].keys[c].rot instanceof THREE.Quaternion)){var d=a.hierarchy[b].keys[c].rot;a.hierarchy[b].keys[c].rot=(new THREE.Quaternion).fromArray(d)}if(a.hierarchy[b].keys.length&&void 0!==a.hierarchy[b].keys[0].morphTargets){d={};for(c=0;c<a.hierarchy[b].keys.length;c++)for(var f=0;f<a.hierarchy[b].keys[c].morphTargets.length;f++){var e=a.hierarchy[b].keys[c].morphTargets[f];d[e]=-1}a.hierarchy[b].usedMorphTargets=d;for(c=0;c<a.hierarchy[b].keys.length;c++){var g=
- {};for(e in d){for(f=0;f<a.hierarchy[b].keys[c].morphTargets.length;f++)if(a.hierarchy[b].keys[c].morphTargets[f]===e){g[e]=a.hierarchy[b].keys[c].morphTargetsInfluences[f];break}f===a.hierarchy[b].keys[c].morphTargets.length&&(g[e]=0)}a.hierarchy[b].keys[c].morphTargetsInfluences=g}}for(c=1;c<a.hierarchy[b].keys.length;c++)a.hierarchy[b].keys[c].time===a.hierarchy[b].keys[c-1].time&&(a.hierarchy[b].keys.splice(c,1),c--);for(c=0;c<a.hierarchy[b].keys.length;c++)a.hierarchy[b].keys[c].index=c}a.initialized=
- !0;return a},parse:function(a){var b=function(a,c){c.push(a);for(var d=0;d<a.children.length;d++)b(a.children[d],c)},c=[];if(a instanceof THREE.SkinnedMesh)for(var d=0;d<a.skeleton.bones.length;d++)c.push(a.skeleton.bones[d]);else b(a,c);return c},play:function(a){-1===this.animations.indexOf(a)&&this.animations.push(a)},stop:function(a){a=this.animations.indexOf(a);-1!==a&&this.animations.splice(a,1)},update:function(a){for(var b=0;b<this.animations.length;b++)this.animations[b].resetBlendWeights();
- for(b=0;b<this.animations.length;b++)this.animations[b].update(a)}};THREE.Animation=function(a,b){this.root=a;this.data=THREE.AnimationHandler.init(b);this.hierarchy=THREE.AnimationHandler.parse(a);this.currentTime=0;this.timeScale=1;this.isPlaying=!1;this.loop=!0;this.weight=0;this.interpolationType=THREE.AnimationHandler.LINEAR};THREE.Animation.prototype.keyTypes=["pos","rot","scl"];
- THREE.Animation.prototype.play=function(a,b){this.currentTime=void 0!==a?a:0;this.weight=void 0!==b?b:1;this.isPlaying=!0;this.reset();THREE.AnimationHandler.play(this)};THREE.Animation.prototype.stop=function(){this.isPlaying=!1;THREE.AnimationHandler.stop(this)};
- THREE.Animation.prototype.reset=function(){for(var a=0,b=this.hierarchy.length;a<b;a++){var c=this.hierarchy[a];c.matrixAutoUpdate=!0;void 0===c.animationCache&&(c.animationCache={animations:{},blending:{positionWeight:0,quaternionWeight:0,scaleWeight:0}});void 0===c.animationCache.animations[this.data.name]&&(c.animationCache.animations[this.data.name]={},c.animationCache.animations[this.data.name].prevKey={pos:0,rot:0,scl:0},c.animationCache.animations[this.data.name].nextKey={pos:0,rot:0,scl:0},
- c.animationCache.animations[this.data.name].originalMatrix=c.matrix);for(var c=c.animationCache.animations[this.data.name],d=0;3>d;d++){for(var f=this.keyTypes[d],e=this.data.hierarchy[a].keys[0],g=this.getNextKeyWith(f,a,1);g.time<this.currentTime&&g.index>e.index;)e=g,g=this.getNextKeyWith(f,a,g.index+1);c.prevKey[f]=e;c.nextKey[f]=g}}};
- THREE.Animation.prototype.resetBlendWeights=function(){for(var a=0,b=this.hierarchy.length;a<b;a++){var c=this.hierarchy[a];void 0!==c.animationCache&&(c.animationCache.blending.positionWeight=0,c.animationCache.blending.quaternionWeight=0,c.animationCache.blending.scaleWeight=0)}};
- THREE.Animation.prototype.update=function(){var a=[],b=new THREE.Vector3,c=new THREE.Vector3,d=new THREE.Quaternion,f=function(a,b){var c=[],d=[],f,q,n,r,s,p;f=(a.length-1)*b;q=Math.floor(f);f-=q;c[0]=0===q?q:q-1;c[1]=q;c[2]=q>a.length-2?q:q+1;c[3]=q>a.length-3?q:q+2;q=a[c[0]];r=a[c[1]];s=a[c[2]];p=a[c[3]];c=f*f;n=f*c;d[0]=e(q[0],r[0],s[0],p[0],f,c,n);d[1]=e(q[1],r[1],s[1],p[1],f,c,n);d[2]=e(q[2],r[2],s[2],p[2],f,c,n);return d},e=function(a,b,c,d,e,f,n){a=.5*(c-a);d=.5*(d-b);return(2*(b-c)+a+d)*n+
- (-3*(b-c)-2*a-d)*f+a*e+b};return function(e){if(!1!==this.isPlaying&&(this.currentTime+=e*this.timeScale,0!==this.weight)){e=this.data.length;if(this.currentTime>e||0>this.currentTime)if(this.loop)this.currentTime%=e,0>this.currentTime&&(this.currentTime+=e),this.reset();else{this.stop();return}e=0;for(var h=this.hierarchy.length;e<h;e++)for(var k=this.hierarchy[e],l=k.animationCache.animations[this.data.name],m=k.animationCache.blending,q=0;3>q;q++){var n=this.keyTypes[q],r=l.prevKey[n],s=l.nextKey[n];
- if(0<this.timeScale&&s.time<=this.currentTime||0>this.timeScale&&r.time>=this.currentTime){r=this.data.hierarchy[e].keys[0];for(s=this.getNextKeyWith(n,e,1);s.time<this.currentTime&&s.index>r.index;)r=s,s=this.getNextKeyWith(n,e,s.index+1);l.prevKey[n]=r;l.nextKey[n]=s}k.matrixAutoUpdate=!0;k.matrixWorldNeedsUpdate=!0;var p=(this.currentTime-r.time)/(s.time-r.time),t=r[n],u=s[n];0>p&&(p=0);1<p&&(p=1);if("pos"===n)if(this.interpolationType===THREE.AnimationHandler.LINEAR)c.x=t[0]+(u[0]-t[0])*p,c.y=
- t[1]+(u[1]-t[1])*p,c.z=t[2]+(u[2]-t[2])*p,r=this.weight/(this.weight+m.positionWeight),k.position.lerp(c,r),m.positionWeight+=this.weight;else{if(this.interpolationType===THREE.AnimationHandler.CATMULLROM||this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD)a[0]=this.getPrevKeyWith("pos",e,r.index-1).pos,a[1]=t,a[2]=u,a[3]=this.getNextKeyWith("pos",e,s.index+1).pos,p=.33*p+.33,s=f(a,p),r=this.weight/(this.weight+m.positionWeight),m.positionWeight+=this.weight,n=k.position,n.x+=(s[0]-
- n.x)*r,n.y+=(s[1]-n.y)*r,n.z+=(s[2]-n.z)*r,this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD&&(p=f(a,1.01*p),b.set(p[0],p[1],p[2]),b.sub(n),b.y=0,b.normalize(),p=Math.atan2(b.x,b.z),k.rotation.set(0,p,0))}else"rot"===n?(THREE.Quaternion.slerp(t,u,d,p),0===m.quaternionWeight?(k.quaternion.copy(d),m.quaternionWeight=this.weight):(r=this.weight/(this.weight+m.quaternionWeight),THREE.Quaternion.slerp(k.quaternion,d,k.quaternion,r),m.quaternionWeight+=this.weight)):"scl"===n&&(c.x=t[0]+
- (u[0]-t[0])*p,c.y=t[1]+(u[1]-t[1])*p,c.z=t[2]+(u[2]-t[2])*p,r=this.weight/(this.weight+m.scaleWeight),k.scale.lerp(c,r),m.scaleWeight+=this.weight)}return!0}}}();THREE.Animation.prototype.getNextKeyWith=function(a,b,c){var d=this.data.hierarchy[b].keys;for(c=this.interpolationType===THREE.AnimationHandler.CATMULLROM||this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD?c<d.length-1?c:d.length-1:c%d.length;c<d.length;c++)if(void 0!==d[c][a])return d[c];return this.data.hierarchy[b].keys[0]};
- THREE.Animation.prototype.getPrevKeyWith=function(a,b,c){var d=this.data.hierarchy[b].keys;for(c=this.interpolationType===THREE.AnimationHandler.CATMULLROM||this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD?0<c?c:0:0<=c?c:c+d.length;0<=c;c--)if(void 0!==d[c][a])return d[c];return this.data.hierarchy[b].keys[d.length-1]};
- THREE.KeyFrameAnimation=function(a){this.root=a.node;this.data=THREE.AnimationHandler.init(a);this.hierarchy=THREE.AnimationHandler.parse(this.root);this.currentTime=0;this.timeScale=.001;this.isPlaying=!1;this.loop=this.isPaused=!0;a=0;for(var b=this.hierarchy.length;a<b;a++){var c=this.data.hierarchy[a].sids,d=this.hierarchy[a];if(this.data.hierarchy[a].keys.length&&c){for(var f=0;f<c.length;f++){var e=c[f],g=this.getNextKeyWith(e,a,0);g&&g.apply(e)}d.matrixAutoUpdate=!1;this.data.hierarchy[a].node.updateMatrix();
- d.matrixWorldNeedsUpdate=!0}}};
- THREE.KeyFrameAnimation.prototype.play=function(a){this.currentTime=void 0!==a?a:0;if(!1===this.isPlaying){this.isPlaying=!0;var b=this.hierarchy.length,c,d;for(a=0;a<b;a++)c=this.hierarchy[a],d=this.data.hierarchy[a],void 0===d.animationCache&&(d.animationCache={},d.animationCache.prevKey=null,d.animationCache.nextKey=null,d.animationCache.originalMatrix=c.matrix),c=this.data.hierarchy[a].keys,c.length&&(d.animationCache.prevKey=c[0],d.animationCache.nextKey=c[1],this.startTime=Math.min(c[0].time,
- this.startTime),this.endTime=Math.max(c[c.length-1].time,this.endTime));this.update(0)}this.isPaused=!1;THREE.AnimationHandler.play(this)};THREE.KeyFrameAnimation.prototype.stop=function(){this.isPaused=this.isPlaying=!1;THREE.AnimationHandler.stop(this);for(var a=0;a<this.data.hierarchy.length;a++){var b=this.hierarchy[a],c=this.data.hierarchy[a];if(void 0!==c.animationCache){var d=c.animationCache.originalMatrix;d.copy(b.matrix);b.matrix=d;delete c.animationCache}}};
- THREE.KeyFrameAnimation.prototype.update=function(a){if(!1!==this.isPlaying){this.currentTime+=a*this.timeScale;a=this.data.length;!0===this.loop&&this.currentTime>a&&(this.currentTime%=a);this.currentTime=Math.min(this.currentTime,a);a=0;for(var b=this.hierarchy.length;a<b;a++){var c=this.hierarchy[a],d=this.data.hierarchy[a],f=d.keys,d=d.animationCache;if(f.length){var e=d.prevKey,g=d.nextKey;if(g.time<=this.currentTime){for(;g.time<this.currentTime&&g.index>e.index;)e=g,g=f[e.index+1];d.prevKey=
- e;d.nextKey=g}g.time>=this.currentTime?e.interpolate(g,this.currentTime):e.interpolate(g,g.time);this.data.hierarchy[a].node.updateMatrix();c.matrixWorldNeedsUpdate=!0}}}};THREE.KeyFrameAnimation.prototype.getNextKeyWith=function(a,b,c){b=this.data.hierarchy[b].keys;for(c%=b.length;c<b.length;c++)if(b[c].hasTarget(a))return b[c];return b[0]};
- THREE.KeyFrameAnimation.prototype.getPrevKeyWith=function(a,b,c){b=this.data.hierarchy[b].keys;for(c=0<=c?c:c+b.length;0<=c;c--)if(b[c].hasTarget(a))return b[c];return b[b.length-1]};THREE.MorphAnimation=function(a){this.mesh=a;this.frames=a.morphTargetInfluences.length;this.currentTime=0;this.duration=1E3;this.loop=!0;this.isPlaying=!1};
- THREE.MorphAnimation.prototype={play:function(){this.isPlaying=!0},pause:function(){this.isPlaying=!1},update:function(){var a=0,b=0;return function(c){if(!1!==this.isPlaying){this.currentTime+=c;!0===this.loop&&this.currentTime>this.duration&&(this.currentTime%=this.duration);this.currentTime=Math.min(this.currentTime,this.duration);c=this.duration/this.frames;var d=Math.floor(this.currentTime/c);d!=b&&(this.mesh.morphTargetInfluences[a]=0,this.mesh.morphTargetInfluences[b]=1,this.mesh.morphTargetInfluences[d]=
- 0,a=b,b=d);this.mesh.morphTargetInfluences[d]=this.currentTime%c/c;this.mesh.morphTargetInfluences[a]=1-this.mesh.morphTargetInfluences[d]}}}()};
- THREE.BoxGeometry=function(a,b,c,d,f,e){function g(a,b,c,d,e,f,g,p){var t,u=h.widthSegments,w=h.heightSegments,G=e/2,A=f/2,I=h.vertices.length;if("x"===a&&"y"===b||"y"===a&&"x"===b)t="z";else if("x"===a&&"z"===b||"z"===a&&"x"===b)t="y",w=h.depthSegments;else if("z"===a&&"y"===b||"y"===a&&"z"===b)t="x",u=h.depthSegments;var D=u+1,x=w+1,y=e/u,z=f/w,B=new THREE.Vector3;B[t]=0<g?1:-1;for(e=0;e<x;e++)for(f=0;f<D;f++){var E=new THREE.Vector3;E[a]=(f*y-G)*c;E[b]=(e*z-A)*d;E[t]=g;h.vertices.push(E)}for(e=
- 0;e<w;e++)for(f=0;f<u;f++)A=f+D*e,a=f+D*(e+1),b=f+1+D*(e+1),c=f+1+D*e,d=new THREE.Vector2(f/u,1-e/w),g=new THREE.Vector2(f/u,1-(e+1)/w),t=new THREE.Vector2((f+1)/u,1-(e+1)/w),G=new THREE.Vector2((f+1)/u,1-e/w),A=new THREE.Face3(A+I,a+I,c+I),A.normal.copy(B),A.vertexNormals.push(B.clone(),B.clone(),B.clone()),A.materialIndex=p,h.faces.push(A),h.faceVertexUvs[0].push([d,g,G]),A=new THREE.Face3(a+I,b+I,c+I),A.normal.copy(B),A.vertexNormals.push(B.clone(),B.clone(),B.clone()),A.materialIndex=p,h.faces.push(A),
- h.faceVertexUvs[0].push([g.clone(),t,G.clone()])}THREE.Geometry.call(this);this.type="BoxGeometry";this.parameters={width:a,height:b,depth:c,widthSegments:d,heightSegments:f,depthSegments:e};this.widthSegments=d||1;this.heightSegments=f||1;this.depthSegments=e||1;var h=this;d=a/2;f=b/2;e=c/2;g("z","y",-1,-1,c,b,d,0);g("z","y",1,-1,c,b,-d,1);g("x","z",1,1,a,c,f,2);g("x","z",1,-1,a,c,-f,3);g("x","y",1,-1,a,b,e,4);g("x","y",-1,-1,a,b,-e,5);this.mergeVertices()};THREE.BoxGeometry.prototype=Object.create(THREE.Geometry.prototype);
- THREE.CircleGeometry=function(a,b,c,d){THREE.Geometry.call(this);this.type="CircleGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};a=a||50;b=void 0!==b?Math.max(3,b):8;c=void 0!==c?c:0;d=void 0!==d?d:2*Math.PI;var f,e=[];f=new THREE.Vector3;var g=new THREE.Vector2(.5,.5);this.vertices.push(f);e.push(g);for(f=0;f<=b;f++){var h=new THREE.Vector3,k=c+f/b*d;h.x=a*Math.cos(k);h.y=a*Math.sin(k);this.vertices.push(h);e.push(new THREE.Vector2((h.x/a+1)/2,(h.y/a+1)/2))}c=new THREE.Vector3(0,
- 0,1);for(f=1;f<=b;f++)this.faces.push(new THREE.Face3(f,f+1,0,[c.clone(),c.clone(),c.clone()])),this.faceVertexUvs[0].push([e[f].clone(),e[f+1].clone(),g.clone()]);this.computeFaceNormals();this.boundingSphere=new THREE.Sphere(new THREE.Vector3,a)};THREE.CircleGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.CubeGeometry=function(a,b,c,d,f,e){console.warn("THREE.CubeGeometry has been renamed to THREE.BoxGeometry.");return new THREE.BoxGeometry(a,b,c,d,f,e)};
- THREE.CylinderGeometry=function(a,b,c,d,f,e){THREE.Geometry.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:f,openEnded:e};a=void 0!==a?a:20;b=void 0!==b?b:20;c=void 0!==c?c:100;d=d||8;f=f||1;e=void 0!==e?e:!1;var g=c/2,h,k,l=[],m=[];for(k=0;k<=f;k++){var q=[],n=[],r=k/f,s=r*(b-a)+a;for(h=0;h<=d;h++){var p=h/d,t=new THREE.Vector3;t.x=s*Math.sin(p*Math.PI*2);t.y=-r*c+g;t.z=s*Math.cos(p*Math.PI*2);this.vertices.push(t);q.push(this.vertices.length-
- 1);n.push(new THREE.Vector2(p,1-r))}l.push(q);m.push(n)}c=(b-a)/c;for(h=0;h<d;h++)for(0!==a?(q=this.vertices[l[0][h]].clone(),n=this.vertices[l[0][h+1]].clone()):(q=this.vertices[l[1][h]].clone(),n=this.vertices[l[1][h+1]].clone()),q.setY(Math.sqrt(q.x*q.x+q.z*q.z)*c).normalize(),n.setY(Math.sqrt(n.x*n.x+n.z*n.z)*c).normalize(),k=0;k<f;k++){var r=l[k][h],s=l[k+1][h],p=l[k+1][h+1],t=l[k][h+1],u=q.clone(),w=q.clone(),G=n.clone(),A=n.clone(),I=m[k][h].clone(),D=m[k+1][h].clone(),x=m[k+1][h+1].clone(),
- y=m[k][h+1].clone();this.faces.push(new THREE.Face3(r,s,t,[u,w,A]));this.faceVertexUvs[0].push([I,D,y]);this.faces.push(new THREE.Face3(s,p,t,[w.clone(),G,A.clone()]));this.faceVertexUvs[0].push([D.clone(),x,y.clone()])}if(!1===e&&0<a)for(this.vertices.push(new THREE.Vector3(0,g,0)),h=0;h<d;h++)r=l[0][h],s=l[0][h+1],p=this.vertices.length-1,u=new THREE.Vector3(0,1,0),w=new THREE.Vector3(0,1,0),G=new THREE.Vector3(0,1,0),I=m[0][h].clone(),D=m[0][h+1].clone(),x=new THREE.Vector2(D.x,0),this.faces.push(new THREE.Face3(r,
- s,p,[u,w,G])),this.faceVertexUvs[0].push([I,D,x]);if(!1===e&&0<b)for(this.vertices.push(new THREE.Vector3(0,-g,0)),h=0;h<d;h++)r=l[k][h+1],s=l[k][h],p=this.vertices.length-1,u=new THREE.Vector3(0,-1,0),w=new THREE.Vector3(0,-1,0),G=new THREE.Vector3(0,-1,0),I=m[k][h+1].clone(),D=m[k][h].clone(),x=new THREE.Vector2(D.x,1),this.faces.push(new THREE.Face3(r,s,p,[u,w,G])),this.faceVertexUvs[0].push([I,D,x]);this.computeFaceNormals()};THREE.CylinderGeometry.prototype=Object.create(THREE.Geometry.prototype);
- THREE.ExtrudeGeometry=function(a,b){"undefined"!==typeof a&&(THREE.Geometry.call(this),this.type="ExtrudeGeometry",a=a instanceof Array?a:[a],this.addShapeList(a,b),this.computeFaceNormals())};THREE.ExtrudeGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.ExtrudeGeometry.prototype.addShapeList=function(a,b){for(var c=a.length,d=0;d<c;d++)this.addShape(a[d],b)};
- THREE.ExtrudeGeometry.prototype.addShape=function(a,b){function c(a,b,c){b||console.log("die");return b.clone().multiplyScalar(c).add(a)}function d(a,b,c){var d=1,d=a.x-b.x,e=a.y-b.y,f=c.x-a.x,g=c.y-a.y,h=d*d+e*e;if(1E-10<Math.abs(d*g-e*f)){var k=Math.sqrt(h),l=Math.sqrt(f*f+g*g),h=b.x-e/k;b=b.y+d/k;f=((c.x-g/l-h)*g-(c.y+f/l-b)*f)/(d*g-e*f);c=h+d*f-a.x;a=b+e*f-a.y;d=c*c+a*a;if(2>=d)return new THREE.Vector2(c,a);d=Math.sqrt(d/2)}else a=!1,1E-10<d?1E-10<f&&(a=!0):-1E-10>d?-1E-10>f&&(a=!0):Math.sign(e)==
- Math.sign(g)&&(a=!0),a?(c=-e,a=d,d=Math.sqrt(h)):(c=d,a=e,d=Math.sqrt(h/2));return new THREE.Vector2(c/d,a/d)}function f(a,b){var c,d;for(v=a.length;0<=--v;){c=v;d=v-1;0>d&&(d=a.length-1);for(var e=0,f=r+2*m,e=0;e<f;e++){var g=P*e,h=P*(e+1),k=b+c+g,g=b+d+g,l=b+d+h,h=b+c+h,k=k+L,g=g+L,l=l+L,h=h+L;E.faces.push(new THREE.Face3(k,g,h,null,null,w));E.faces.push(new THREE.Face3(g,l,h,null,null,w));k=G.generateSideWallUV(E,k,g,l,h);E.faceVertexUvs[0].push([k[0],k[1],k[3]]);E.faceVertexUvs[0].push([k[1],
- k[2],k[3]])}}}function e(a,b,c){E.vertices.push(new THREE.Vector3(a,b,c))}function g(a,b,c){a+=L;b+=L;c+=L;E.faces.push(new THREE.Face3(a,b,c,null,null,u));a=G.generateTopUV(E,a,b,c);E.faceVertexUvs[0].push(a)}var h=void 0!==b.amount?b.amount:100,k=void 0!==b.bevelThickness?b.bevelThickness:6,l=void 0!==b.bevelSize?b.bevelSize:k-2,m=void 0!==b.bevelSegments?b.bevelSegments:3,q=void 0!==b.bevelEnabled?b.bevelEnabled:!0,n=void 0!==b.curveSegments?b.curveSegments:12,r=void 0!==b.steps?b.steps:1,s=b.extrudePath,
- p,t=!1,u=b.material,w=b.extrudeMaterial,G=void 0!==b.UVGenerator?b.UVGenerator:THREE.ExtrudeGeometry.WorldUVGenerator,A,I,D,x;s&&(p=s.getSpacedPoints(r),t=!0,q=!1,A=void 0!==b.frames?b.frames:new THREE.TubeGeometry.FrenetFrames(s,r,!1),I=new THREE.Vector3,D=new THREE.Vector3,x=new THREE.Vector3);q||(l=k=m=0);var y,z,B,E=this,L=this.vertices.length,s=a.extractPoints(n),n=s.shape,F=s.holes;if(s=!THREE.Shape.Utils.isClockWise(n)){n=n.reverse();z=0;for(B=F.length;z<B;z++)y=F[z],THREE.Shape.Utils.isClockWise(y)&&
- (F[z]=y.reverse());s=!1}var N=THREE.Shape.Utils.triangulateShape(n,F),O=n;z=0;for(B=F.length;z<B;z++)y=F[z],n=n.concat(y);var K,J,C,R,H,P=n.length,M,S=N.length,s=[],v=0;C=O.length;K=C-1;for(J=v+1;v<C;v++,K++,J++)K===C&&(K=0),J===C&&(J=0),s[v]=d(O[v],O[K],O[J]);var U=[],Q,T=s.concat();z=0;for(B=F.length;z<B;z++){y=F[z];Q=[];v=0;C=y.length;K=C-1;for(J=v+1;v<C;v++,K++,J++)K===C&&(K=0),J===C&&(J=0),Q[v]=d(y[v],y[K],y[J]);U.push(Q);T=T.concat(Q)}for(K=0;K<m;K++){C=K/m;R=k*(1-C);J=l*Math.sin(C*Math.PI/
- 2);v=0;for(C=O.length;v<C;v++)H=c(O[v],s[v],J),e(H.x,H.y,-R);z=0;for(B=F.length;z<B;z++)for(y=F[z],Q=U[z],v=0,C=y.length;v<C;v++)H=c(y[v],Q[v],J),e(H.x,H.y,-R)}J=l;for(v=0;v<P;v++)H=q?c(n[v],T[v],J):n[v],t?(D.copy(A.normals[0]).multiplyScalar(H.x),I.copy(A.binormals[0]).multiplyScalar(H.y),x.copy(p[0]).add(D).add(I),e(x.x,x.y,x.z)):e(H.x,H.y,0);for(C=1;C<=r;C++)for(v=0;v<P;v++)H=q?c(n[v],T[v],J):n[v],t?(D.copy(A.normals[C]).multiplyScalar(H.x),I.copy(A.binormals[C]).multiplyScalar(H.y),x.copy(p[C]).add(D).add(I),
- e(x.x,x.y,x.z)):e(H.x,H.y,h/r*C);for(K=m-1;0<=K;K--){C=K/m;R=k*(1-C);J=l*Math.sin(C*Math.PI/2);v=0;for(C=O.length;v<C;v++)H=c(O[v],s[v],J),e(H.x,H.y,h+R);z=0;for(B=F.length;z<B;z++)for(y=F[z],Q=U[z],v=0,C=y.length;v<C;v++)H=c(y[v],Q[v],J),t?e(H.x,H.y+p[r-1].y,p[r-1].x+R):e(H.x,H.y,h+R)}(function(){if(q){var a;a=0*P;for(v=0;v<S;v++)M=N[v],g(M[2]+a,M[1]+a,M[0]+a);a=r+2*m;a*=P;for(v=0;v<S;v++)M=N[v],g(M[0]+a,M[1]+a,M[2]+a)}else{for(v=0;v<S;v++)M=N[v],g(M[2],M[1],M[0]);for(v=0;v<S;v++)M=N[v],g(M[0]+P*
- r,M[1]+P*r,M[2]+P*r)}})();(function(){var a=0;f(O,a);a+=O.length;z=0;for(B=F.length;z<B;z++)y=F[z],f(y,a),a+=y.length})()};
- THREE.ExtrudeGeometry.WorldUVGenerator={generateTopUV:function(a,b,c,d){a=a.vertices;b=a[b];c=a[c];d=a[d];return[new THREE.Vector2(b.x,b.y),new THREE.Vector2(c.x,c.y),new THREE.Vector2(d.x,d.y)]},generateSideWallUV:function(a,b,c,d,f){a=a.vertices;b=a[b];c=a[c];d=a[d];f=a[f];return.01>Math.abs(b.y-c.y)?[new THREE.Vector2(b.x,1-b.z),new THREE.Vector2(c.x,1-c.z),new THREE.Vector2(d.x,1-d.z),new THREE.Vector2(f.x,1-f.z)]:[new THREE.Vector2(b.y,1-b.z),new THREE.Vector2(c.y,1-c.z),new THREE.Vector2(d.y,
- 1-d.z),new THREE.Vector2(f.y,1-f.z)]}};THREE.ShapeGeometry=function(a,b){THREE.Geometry.call(this);this.type="ShapeGeometry";!1===a instanceof Array&&(a=[a]);this.addShapeList(a,b);this.computeFaceNormals()};THREE.ShapeGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.ShapeGeometry.prototype.addShapeList=function(a,b){for(var c=0,d=a.length;c<d;c++)this.addShape(a[c],b);return this};
- THREE.ShapeGeometry.prototype.addShape=function(a,b){void 0===b&&(b={});var c=b.material,d=void 0===b.UVGenerator?THREE.ExtrudeGeometry.WorldUVGenerator:b.UVGenerator,f,e,g,h=this.vertices.length;f=a.extractPoints(void 0!==b.curveSegments?b.curveSegments:12);var k=f.shape,l=f.holes;if(!THREE.Shape.Utils.isClockWise(k))for(k=k.reverse(),f=0,e=l.length;f<e;f++)g=l[f],THREE.Shape.Utils.isClockWise(g)&&(l[f]=g.reverse());var m=THREE.Shape.Utils.triangulateShape(k,l);f=0;for(e=l.length;f<e;f++)g=l[f],
- k=k.concat(g);l=k.length;e=m.length;for(f=0;f<l;f++)g=k[f],this.vertices.push(new THREE.Vector3(g.x,g.y,0));for(f=0;f<e;f++)l=m[f],k=l[0]+h,g=l[1]+h,l=l[2]+h,this.faces.push(new THREE.Face3(k,g,l,null,null,c)),this.faceVertexUvs[0].push(d.generateTopUV(this,k,g,l))};
- THREE.LatheGeometry=function(a,b,c,d){THREE.Geometry.call(this);this.type="LatheGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};b=b||12;c=c||0;d=d||2*Math.PI;for(var f=1/(a.length-1),e=1/b,g=0,h=b;g<=h;g++)for(var k=c+g*e*d,l=Math.cos(k),m=Math.sin(k),k=0,q=a.length;k<q;k++){var n=a[k],r=new THREE.Vector3;r.x=l*n.x-m*n.y;r.y=m*n.x+l*n.y;r.z=n.z;this.vertices.push(r)}c=a.length;g=0;for(h=b;g<h;g++)for(k=0,q=a.length-1;k<q;k++){b=m=k+c*g;d=m+c;var l=m+1+c,m=m+1,n=g*e,r=k*f,s=
- n+e,p=r+f;this.faces.push(new THREE.Face3(b,d,m));this.faceVertexUvs[0].push([new THREE.Vector2(n,r),new THREE.Vector2(s,r),new THREE.Vector2(n,p)]);this.faces.push(new THREE.Face3(d,l,m));this.faceVertexUvs[0].push([new THREE.Vector2(s,r),new THREE.Vector2(s,p),new THREE.Vector2(n,p)])}this.mergeVertices();this.computeFaceNormals();this.computeVertexNormals()};THREE.LatheGeometry.prototype=Object.create(THREE.Geometry.prototype);
- THREE.PlaneGeometry=function(a,b,c,d){console.info("THREE.PlaneGeometry: Consider using THREE.PlaneBufferGeometry for lower memory footprint.");THREE.Geometry.call(this);this.type="PlaneGeometry";this.parameters={width:a,height:b,widthSegments:c,heightSegments:d};this.fromBufferGeometry(new THREE.PlaneBufferGeometry(a,b,c,d))};THREE.PlaneGeometry.prototype=Object.create(THREE.Geometry.prototype);
- THREE.PlaneBufferGeometry=function(a,b,c,d){THREE.BufferGeometry.call(this);this.type="PlaneBufferGeometry";this.parameters={width:a,height:b,widthSegments:c,heightSegments:d};var f=a/2,e=b/2;c=c||1;d=d||1;var g=c+1,h=d+1,k=a/c,l=b/d;b=new Float32Array(g*h*3);a=new Float32Array(g*h*3);for(var m=new Float32Array(g*h*2),q=0,n=0,r=0;r<h;r++)for(var s=r*l-e,p=0;p<g;p++)b[q]=p*k-f,b[q+1]=-s,a[q+2]=1,m[n]=p/c,m[n+1]=1-r/d,q+=3,n+=2;q=0;f=new (65535<b.length/3?Uint32Array:Uint16Array)(c*d*6);for(r=0;r<d;r++)for(p=
- 0;p<c;p++)e=p+g*(r+1),h=p+1+g*(r+1),k=p+1+g*r,f[q]=p+g*r,f[q+1]=e,f[q+2]=k,f[q+3]=e,f[q+4]=h,f[q+5]=k,q+=6;this.addAttribute("index",new THREE.BufferAttribute(f,1));this.addAttribute("position",new THREE.BufferAttribute(b,3));this.addAttribute("normal",new THREE.BufferAttribute(a,3));this.addAttribute("uv",new THREE.BufferAttribute(m,2))};THREE.PlaneBufferGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);
- THREE.RingGeometry=function(a,b,c,d,f,e){THREE.Geometry.call(this);this.type="RingGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:f,thetaLength:e};a=a||0;b=b||50;f=void 0!==f?f:0;e=void 0!==e?e:2*Math.PI;c=void 0!==c?Math.max(3,c):8;d=void 0!==d?Math.max(1,d):8;var g,h=[],k=a,l=(b-a)/d;for(a=0;a<d+1;a++){for(g=0;g<c+1;g++){var m=new THREE.Vector3,q=f+g/c*e;m.x=k*Math.cos(q);m.y=k*Math.sin(q);this.vertices.push(m);h.push(new THREE.Vector2((m.x/b+1)/2,
- (m.y/b+1)/2))}k+=l}b=new THREE.Vector3(0,0,1);for(a=0;a<d;a++)for(f=a*(c+1),g=0;g<c;g++)e=q=g+f,l=q+c+1,m=q+c+2,this.faces.push(new THREE.Face3(e,l,m,[b.clone(),b.clone(),b.clone()])),this.faceVertexUvs[0].push([h[e].clone(),h[l].clone(),h[m].clone()]),e=q,l=q+c+2,m=q+1,this.faces.push(new THREE.Face3(e,l,m,[b.clone(),b.clone(),b.clone()])),this.faceVertexUvs[0].push([h[e].clone(),h[l].clone(),h[m].clone()]);this.computeFaceNormals();this.boundingSphere=new THREE.Sphere(new THREE.Vector3,k)};
- THREE.RingGeometry.prototype=Object.create(THREE.Geometry.prototype);
- THREE.SphereGeometry=function(a,b,c,d,f,e,g){THREE.Geometry.call(this);this.type="SphereGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:f,thetaStart:e,thetaLength:g};a=a||50;b=Math.max(3,Math.floor(b)||8);c=Math.max(2,Math.floor(c)||6);d=void 0!==d?d:0;f=void 0!==f?f:2*Math.PI;e=void 0!==e?e:0;g=void 0!==g?g:Math.PI;var h,k,l=[],m=[];for(k=0;k<=c;k++){var q=[],n=[];for(h=0;h<=b;h++){var r=h/b,s=k/c,p=new THREE.Vector3;p.x=-a*Math.cos(d+r*f)*Math.sin(e+s*g);
- p.y=a*Math.cos(e+s*g);p.z=a*Math.sin(d+r*f)*Math.sin(e+s*g);this.vertices.push(p);q.push(this.vertices.length-1);n.push(new THREE.Vector2(r,1-s))}l.push(q);m.push(n)}for(k=0;k<c;k++)for(h=0;h<b;h++){d=l[k][h+1];f=l[k][h];e=l[k+1][h];g=l[k+1][h+1];var q=this.vertices[d].clone().normalize(),n=this.vertices[f].clone().normalize(),r=this.vertices[e].clone().normalize(),s=this.vertices[g].clone().normalize(),p=m[k][h+1].clone(),t=m[k][h].clone(),u=m[k+1][h].clone(),w=m[k+1][h+1].clone();Math.abs(this.vertices[d].y)===
- a?(p.x=(p.x+t.x)/2,this.faces.push(new THREE.Face3(d,e,g,[q,r,s])),this.faceVertexUvs[0].push([p,u,w])):Math.abs(this.vertices[e].y)===a?(u.x=(u.x+w.x)/2,this.faces.push(new THREE.Face3(d,f,e,[q,n,r])),this.faceVertexUvs[0].push([p,t,u])):(this.faces.push(new THREE.Face3(d,f,g,[q,n,s])),this.faceVertexUvs[0].push([p,t,w]),this.faces.push(new THREE.Face3(f,e,g,[n.clone(),r,s.clone()])),this.faceVertexUvs[0].push([t.clone(),u,w.clone()]))}this.computeFaceNormals();this.boundingSphere=new THREE.Sphere(new THREE.Vector3,
- a)};THREE.SphereGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.TextGeometry=function(a,b){b=b||{};var c=THREE.FontUtils.generateShapes(a,b);b.amount=void 0!==b.height?b.height:50;void 0===b.bevelThickness&&(b.bevelThickness=10);void 0===b.bevelSize&&(b.bevelSize=8);void 0===b.bevelEnabled&&(b.bevelEnabled=!1);THREE.ExtrudeGeometry.call(this,c,b);this.type="TextGeometry"};THREE.TextGeometry.prototype=Object.create(THREE.ExtrudeGeometry.prototype);
- THREE.TorusGeometry=function(a,b,c,d,f){THREE.Geometry.call(this);this.type="TorusGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:f};a=a||100;b=b||40;c=c||8;d=d||6;f=f||2*Math.PI;for(var e=new THREE.Vector3,g=[],h=[],k=0;k<=c;k++)for(var l=0;l<=d;l++){var m=l/d*f,q=k/c*Math.PI*2;e.x=a*Math.cos(m);e.y=a*Math.sin(m);var n=new THREE.Vector3;n.x=(a+b*Math.cos(q))*Math.cos(m);n.y=(a+b*Math.cos(q))*Math.sin(m);n.z=b*Math.sin(q);this.vertices.push(n);g.push(new THREE.Vector2(l/
- d,k/c));h.push(n.clone().sub(e).normalize())}for(k=1;k<=c;k++)for(l=1;l<=d;l++)a=(d+1)*k+l-1,b=(d+1)*(k-1)+l-1,f=(d+1)*(k-1)+l,e=(d+1)*k+l,m=new THREE.Face3(a,b,e,[h[a].clone(),h[b].clone(),h[e].clone()]),this.faces.push(m),this.faceVertexUvs[0].push([g[a].clone(),g[b].clone(),g[e].clone()]),m=new THREE.Face3(b,f,e,[h[b].clone(),h[f].clone(),h[e].clone()]),this.faces.push(m),this.faceVertexUvs[0].push([g[b].clone(),g[f].clone(),g[e].clone()]);this.computeFaceNormals()};
- THREE.TorusGeometry.prototype=Object.create(THREE.Geometry.prototype);
- THREE.TorusKnotGeometry=function(a,b,c,d,f,e,g){function h(a,b,c,d,e){var f=Math.cos(a),g=Math.sin(a);a*=b/c;b=Math.cos(a);f*=d*(2+b)*.5;g=d*(2+b)*g*.5;d=e*d*Math.sin(a)*.5;return new THREE.Vector3(f,g,d)}THREE.Geometry.call(this);this.type="TorusKnotGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,p:f,q:e,heightScale:g};a=a||100;b=b||40;c=c||64;d=d||8;f=f||2;e=e||3;g=g||1;for(var k=Array(c),l=new THREE.Vector3,m=new THREE.Vector3,q=new THREE.Vector3,n=0;n<c;++n){k[n]=
- Array(d);var r=n/c*2*f*Math.PI,s=h(r,e,f,a,g),r=h(r+.01,e,f,a,g);l.subVectors(r,s);m.addVectors(r,s);q.crossVectors(l,m);m.crossVectors(q,l);q.normalize();m.normalize();for(r=0;r<d;++r){var p=r/d*2*Math.PI,t=-b*Math.cos(p),p=b*Math.sin(p),u=new THREE.Vector3;u.x=s.x+t*m.x+p*q.x;u.y=s.y+t*m.y+p*q.y;u.z=s.z+t*m.z+p*q.z;k[n][r]=this.vertices.push(u)-1}}for(n=0;n<c;++n)for(r=0;r<d;++r)f=(n+1)%c,e=(r+1)%d,a=k[n][r],b=k[f][r],f=k[f][e],e=k[n][e],g=new THREE.Vector2(n/c,r/d),l=new THREE.Vector2((n+1)/c,
- r/d),m=new THREE.Vector2((n+1)/c,(r+1)/d),q=new THREE.Vector2(n/c,(r+1)/d),this.faces.push(new THREE.Face3(a,b,e)),this.faceVertexUvs[0].push([g,l,q]),this.faces.push(new THREE.Face3(b,f,e)),this.faceVertexUvs[0].push([l.clone(),m,q.clone()]);this.computeFaceNormals();this.computeVertexNormals()};THREE.TorusKnotGeometry.prototype=Object.create(THREE.Geometry.prototype);
- THREE.TubeGeometry=function(a,b,c,d,f){THREE.Geometry.call(this);this.type="TubeGeometry";this.parameters={path:a,segments:b,radius:c,radialSegments:d,closed:f};b=b||64;c=c||1;d=d||8;f=f||!1;var e=[],g,h,k=b+1,l,m,q,n,r=new THREE.Vector3,s,p,t;s=new THREE.TubeGeometry.FrenetFrames(a,b,f);p=s.normals;t=s.binormals;this.tangents=s.tangents;this.normals=p;this.binormals=t;for(s=0;s<k;s++)for(e[s]=[],l=s/(k-1),n=a.getPointAt(l),g=p[s],h=t[s],l=0;l<d;l++)m=l/d*2*Math.PI,q=-c*Math.cos(m),m=c*Math.sin(m),
- r.copy(n),r.x+=q*g.x+m*h.x,r.y+=q*g.y+m*h.y,r.z+=q*g.z+m*h.z,e[s][l]=this.vertices.push(new THREE.Vector3(r.x,r.y,r.z))-1;for(s=0;s<b;s++)for(l=0;l<d;l++)k=f?(s+1)%b:s+1,r=(l+1)%d,a=e[s][l],c=e[k][l],k=e[k][r],r=e[s][r],p=new THREE.Vector2(s/b,l/d),t=new THREE.Vector2((s+1)/b,l/d),g=new THREE.Vector2((s+1)/b,(l+1)/d),h=new THREE.Vector2(s/b,(l+1)/d),this.faces.push(new THREE.Face3(a,c,r)),this.faceVertexUvs[0].push([p,t,h]),this.faces.push(new THREE.Face3(c,k,r)),this.faceVertexUvs[0].push([t.clone(),
- g,h.clone()]);this.computeFaceNormals();this.computeVertexNormals()};THREE.TubeGeometry.prototype=Object.create(THREE.Geometry.prototype);
- THREE.TubeGeometry.FrenetFrames=function(a,b,c){new THREE.Vector3;var d=new THREE.Vector3;new THREE.Vector3;var f=[],e=[],g=[],h=new THREE.Vector3,k=new THREE.Matrix4;b+=1;var l,m,q;this.tangents=f;this.normals=e;this.binormals=g;for(l=0;l<b;l++)m=l/(b-1),f[l]=a.getTangentAt(m),f[l].normalize();e[0]=new THREE.Vector3;g[0]=new THREE.Vector3;a=Number.MAX_VALUE;l=Math.abs(f[0].x);m=Math.abs(f[0].y);q=Math.abs(f[0].z);l<=a&&(a=l,d.set(1,0,0));m<=a&&(a=m,d.set(0,1,0));q<=a&&d.set(0,0,1);h.crossVectors(f[0],
- d).normalize();e[0].crossVectors(f[0],h);g[0].crossVectors(f[0],e[0]);for(l=1;l<b;l++)e[l]=e[l-1].clone(),g[l]=g[l-1].clone(),h.crossVectors(f[l-1],f[l]),1E-4<h.length()&&(h.normalize(),d=Math.acos(THREE.Math.clamp(f[l-1].dot(f[l]),-1,1)),e[l].applyMatrix4(k.makeRotationAxis(h,d))),g[l].crossVectors(f[l],e[l]);if(c)for(d=Math.acos(THREE.Math.clamp(e[0].dot(e[b-1]),-1,1)),d/=b-1,0<f[0].dot(h.crossVectors(e[0],e[b-1]))&&(d=-d),l=1;l<b;l++)e[l].applyMatrix4(k.makeRotationAxis(f[l],d*l)),g[l].crossVectors(f[l],
- e[l])};
- THREE.PolyhedronGeometry=function(a,b,c,d){function f(a){var b=a.normalize().clone();b.index=k.vertices.push(b)-1;var c=Math.atan2(a.z,-a.x)/2/Math.PI+.5;a=Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5;b.uv=new THREE.Vector2(c,1-a);return b}function e(a,b,c){var d=new THREE.Face3(a.index,b.index,c.index,[a.clone(),b.clone(),c.clone()]);k.faces.push(d);t.copy(a).add(b).add(c).divideScalar(3);d=Math.atan2(t.z,-t.x);k.faceVertexUvs[0].push([h(a.uv,a,d),h(b.uv,b,d),h(c.uv,c,d)])}function g(a,b){var c=
- Math.pow(2,b);Math.pow(4,b);for(var d=f(k.vertices[a.a]),g=f(k.vertices[a.b]),h=f(k.vertices[a.c]),l=[],m=0;m<=c;m++){l[m]=[];for(var n=f(d.clone().lerp(h,m/c)),q=f(g.clone().lerp(h,m/c)),r=c-m,p=0;p<=r;p++)l[m][p]=0==p&&m==c?n:f(n.clone().lerp(q,p/r))}for(m=0;m<c;m++)for(p=0;p<2*(c-m)-1;p++)d=Math.floor(p/2),0==p%2?e(l[m][d+1],l[m+1][d],l[m][d]):e(l[m][d+1],l[m+1][d+1],l[m+1][d])}function h(a,b,c){0>c&&1===a.x&&(a=new THREE.Vector2(a.x-1,a.y));0===b.x&&0===b.z&&(a=new THREE.Vector2(c/2/Math.PI+.5,
- a.y));return a.clone()}THREE.Geometry.call(this);this.type="PolyhedronGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};c=c||1;d=d||0;for(var k=this,l=0,m=a.length;l<m;l+=3)f(new THREE.Vector3(a[l],a[l+1],a[l+2]));a=this.vertices;for(var q=[],n=l=0,m=b.length;l<m;l+=3,n++){var r=a[b[l]],s=a[b[l+1]],p=a[b[l+2]];q[n]=new THREE.Face3(r.index,s.index,p.index,[r.clone(),s.clone(),p.clone()])}for(var t=new THREE.Vector3,l=0,m=q.length;l<m;l++)g(q[l],d);l=0;for(m=this.faceVertexUvs[0].length;l<
- m;l++)b=this.faceVertexUvs[0][l],d=b[0].x,a=b[1].x,q=b[2].x,n=Math.max(d,Math.max(a,q)),r=Math.min(d,Math.min(a,q)),.9<n&&.1>r&&(.2>d&&(b[0].x+=1),.2>a&&(b[1].x+=1),.2>q&&(b[2].x+=1));l=0;for(m=this.vertices.length;l<m;l++)this.vertices[l].multiplyScalar(c);this.mergeVertices();this.computeFaceNormals();this.boundingSphere=new THREE.Sphere(new THREE.Vector3,c)};THREE.PolyhedronGeometry.prototype=Object.create(THREE.Geometry.prototype);
- THREE.DodecahedronGeometry=function(a,b){this.parameters={radius:a,detail:b};var c=(1+Math.sqrt(5))/2,d=1/c;THREE.PolyhedronGeometry.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-d,-c,0,-d,c,0,d,-c,0,d,c,-d,-c,0,-d,c,0,d,-c,0,d,c,0,-c,0,-d,c,0,-d,-c,0,d,c,0,d],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,
- 11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],a,b)};THREE.DodecahedronGeometry.prototype=Object.create(THREE.Geometry.prototype);
- THREE.IcosahedronGeometry=function(a,b){var c=(1+Math.sqrt(5))/2;THREE.PolyhedronGeometry.call(this,[-1,c,0,1,c,0,-1,-c,0,1,-c,0,0,-1,c,0,1,c,0,-1,-c,0,1,-c,c,0,-1,c,0,1,-c,0,-1,-c,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],a,b);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b}};THREE.IcosahedronGeometry.prototype=Object.create(THREE.Geometry.prototype);
- THREE.OctahedronGeometry=function(a,b){this.parameters={radius:a,detail:b};THREE.PolyhedronGeometry.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],a,b);this.type="OctahedronGeometry";this.parameters={radius:a,detail:b}};THREE.OctahedronGeometry.prototype=Object.create(THREE.Geometry.prototype);
- THREE.TetrahedronGeometry=function(a,b){THREE.PolyhedronGeometry.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],a,b);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b}};THREE.TetrahedronGeometry.prototype=Object.create(THREE.Geometry.prototype);
- THREE.ParametricGeometry=function(a,b,c){THREE.Geometry.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};var d=this.vertices,f=this.faces,e=this.faceVertexUvs[0],g,h,k,l,m=b+1;for(g=0;g<=c;g++)for(l=g/c,h=0;h<=b;h++)k=h/b,k=a(k,l),d.push(k);var q,n,r,s;for(g=0;g<c;g++)for(h=0;h<b;h++)a=g*m+h,d=g*m+h+1,l=(g+1)*m+h+1,k=(g+1)*m+h,q=new THREE.Vector2(h/b,g/c),n=new THREE.Vector2((h+1)/b,g/c),r=new THREE.Vector2((h+1)/b,(g+1)/c),s=new THREE.Vector2(h/b,(g+1)/c),f.push(new THREE.Face3(a,
- d,k)),e.push([q,n,s]),f.push(new THREE.Face3(d,l,k)),e.push([n.clone(),r,s.clone()]);this.computeFaceNormals();this.computeVertexNormals()};THREE.ParametricGeometry.prototype=Object.create(THREE.Geometry.prototype);
- THREE.AxisHelper=function(a){a=a||1;var b=new Float32Array([0,0,0,a,0,0,0,0,0,0,a,0,0,0,0,0,0,a]),c=new Float32Array([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1]);a=new THREE.BufferGeometry;a.addAttribute("position",new THREE.BufferAttribute(b,3));a.addAttribute("color",new THREE.BufferAttribute(c,3));b=new THREE.LineBasicMaterial({vertexColors:THREE.VertexColors});THREE.Line.call(this,a,b,THREE.LinePieces)};THREE.AxisHelper.prototype=Object.create(THREE.Line.prototype);
- THREE.ArrowHelper=function(){var a=new THREE.Geometry;a.vertices.push(new THREE.Vector3(0,0,0),new THREE.Vector3(0,1,0));var b=new THREE.CylinderGeometry(0,.5,1,5,1);b.applyMatrix((new THREE.Matrix4).makeTranslation(0,-.5,0));return function(c,d,f,e,g,h){THREE.Object3D.call(this);void 0===e&&(e=16776960);void 0===f&&(f=1);void 0===g&&(g=.2*f);void 0===h&&(h=.2*g);this.position.copy(d);this.line=new THREE.Line(a,new THREE.LineBasicMaterial({color:e}));this.line.matrixAutoUpdate=!1;this.add(this.line);
- this.cone=new THREE.Mesh(b,new THREE.MeshBasicMaterial({color:e}));this.cone.matrixAutoUpdate=!1;this.add(this.cone);this.setDirection(c);this.setLength(f,g,h)}}();THREE.ArrowHelper.prototype=Object.create(THREE.Object3D.prototype);THREE.ArrowHelper.prototype.setDirection=function(){var a=new THREE.Vector3,b;return function(c){.99999<c.y?this.quaternion.set(0,0,0,1):-.99999>c.y?this.quaternion.set(1,0,0,0):(a.set(c.z,0,-c.x).normalize(),b=Math.acos(c.y),this.quaternion.setFromAxisAngle(a,b))}}();
- THREE.ArrowHelper.prototype.setLength=function(a,b,c){void 0===b&&(b=.2*a);void 0===c&&(c=.2*b);this.line.scale.set(1,a-b,1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()};THREE.ArrowHelper.prototype.setColor=function(a){this.line.material.color.set(a);this.cone.material.color.set(a)};
- THREE.BoxHelper=function(a){var b=new THREE.BufferGeometry;b.addAttribute("position",new THREE.BufferAttribute(new Float32Array(72),3));THREE.Line.call(this,b,new THREE.LineBasicMaterial({color:16776960}),THREE.LinePieces);void 0!==a&&this.update(a)};THREE.BoxHelper.prototype=Object.create(THREE.Line.prototype);
- THREE.BoxHelper.prototype.update=function(a){var b=a.geometry;null===b.boundingBox&&b.computeBoundingBox();var c=b.boundingBox.min,b=b.boundingBox.max,d=this.geometry.attributes.position.array;d[0]=b.x;d[1]=b.y;d[2]=b.z;d[3]=c.x;d[4]=b.y;d[5]=b.z;d[6]=c.x;d[7]=b.y;d[8]=b.z;d[9]=c.x;d[10]=c.y;d[11]=b.z;d[12]=c.x;d[13]=c.y;d[14]=b.z;d[15]=b.x;d[16]=c.y;d[17]=b.z;d[18]=b.x;d[19]=c.y;d[20]=b.z;d[21]=b.x;d[22]=b.y;d[23]=b.z;d[24]=b.x;d[25]=b.y;d[26]=c.z;d[27]=c.x;d[28]=b.y;d[29]=c.z;d[30]=c.x;d[31]=b.y;
- d[32]=c.z;d[33]=c.x;d[34]=c.y;d[35]=c.z;d[36]=c.x;d[37]=c.y;d[38]=c.z;d[39]=b.x;d[40]=c.y;d[41]=c.z;d[42]=b.x;d[43]=c.y;d[44]=c.z;d[45]=b.x;d[46]=b.y;d[47]=c.z;d[48]=b.x;d[49]=b.y;d[50]=b.z;d[51]=b.x;d[52]=b.y;d[53]=c.z;d[54]=c.x;d[55]=b.y;d[56]=b.z;d[57]=c.x;d[58]=b.y;d[59]=c.z;d[60]=c.x;d[61]=c.y;d[62]=b.z;d[63]=c.x;d[64]=c.y;d[65]=c.z;d[66]=b.x;d[67]=c.y;d[68]=b.z;d[69]=b.x;d[70]=c.y;d[71]=c.z;this.geometry.attributes.position.needsUpdate=!0;this.geometry.computeBoundingSphere();this.matrix=a.matrixWorld;
- this.matrixAutoUpdate=!1};THREE.BoundingBoxHelper=function(a,b){var c=void 0!==b?b:8947848;this.object=a;this.box=new THREE.Box3;THREE.Mesh.call(this,new THREE.BoxGeometry(1,1,1),new THREE.MeshBasicMaterial({color:c,wireframe:!0}))};THREE.BoundingBoxHelper.prototype=Object.create(THREE.Mesh.prototype);THREE.BoundingBoxHelper.prototype.update=function(){this.box.setFromObject(this.object);this.box.size(this.scale);this.box.center(this.position)};
- THREE.CameraHelper=function(a){function b(a,b,d){c(a,d);c(b,d)}function c(a,b){d.vertices.push(new THREE.Vector3);d.colors.push(new THREE.Color(b));void 0===e[a]&&(e[a]=[]);e[a].push(d.vertices.length-1)}var d=new THREE.Geometry,f=new THREE.LineBasicMaterial({color:16777215,vertexColors:THREE.FaceColors}),e={};b("n1","n2",16755200);b("n2","n4",16755200);b("n4","n3",16755200);b("n3","n1",16755200);b("f1","f2",16755200);b("f2","f4",16755200);b("f4","f3",16755200);b("f3","f1",16755200);b("n1","f1",16755200);
- b("n2","f2",16755200);b("n3","f3",16755200);b("n4","f4",16755200);b("p","n1",16711680);b("p","n2",16711680);b("p","n3",16711680);b("p","n4",16711680);b("u1","u2",43775);b("u2","u3",43775);b("u3","u1",43775);b("c","t",16777215);b("p","c",3355443);b("cn1","cn2",3355443);b("cn3","cn4",3355443);b("cf1","cf2",3355443);b("cf3","cf4",3355443);THREE.Line.call(this,d,f,THREE.LinePieces);this.camera=a;this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.pointMap=e;this.update()};
- THREE.CameraHelper.prototype=Object.create(THREE.Line.prototype);
- THREE.CameraHelper.prototype.update=function(){var a,b,c=new THREE.Vector3,d=new THREE.Camera,f=function(e,f,h,k){c.set(f,h,k).unproject(d);e=b[e];if(void 0!==e)for(f=0,h=e.length;f<h;f++)a.vertices[e[f]].copy(c)};return function(){a=this.geometry;b=this.pointMap;d.projectionMatrix.copy(this.camera.projectionMatrix);f("c",0,0,-1);f("t",0,0,1);f("n1",-1,-1,-1);f("n2",1,-1,-1);f("n3",-1,1,-1);f("n4",1,1,-1);f("f1",-1,-1,1);f("f2",1,-1,1);f("f3",-1,1,1);f("f4",1,1,1);f("u1",.7,1.1,-1);f("u2",-.7,1.1,
- -1);f("u3",0,2,-1);f("cf1",-1,0,1);f("cf2",1,0,1);f("cf3",0,-1,1);f("cf4",0,1,1);f("cn1",-1,0,-1);f("cn2",1,0,-1);f("cn3",0,-1,-1);f("cn4",0,1,-1);a.verticesNeedUpdate=!0}}();
- THREE.DirectionalLightHelper=function(a,b){THREE.Object3D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;b=b||1;var c=new THREE.Geometry;c.vertices.push(new THREE.Vector3(-b,b,0),new THREE.Vector3(b,b,0),new THREE.Vector3(b,-b,0),new THREE.Vector3(-b,-b,0),new THREE.Vector3(-b,b,0));var d=new THREE.LineBasicMaterial({fog:!1});d.color.copy(this.light.color).multiplyScalar(this.light.intensity);this.lightPlane=new THREE.Line(c,d);this.add(this.lightPlane);
- c=new THREE.Geometry;c.vertices.push(new THREE.Vector3,new THREE.Vector3);d=new THREE.LineBasicMaterial({fog:!1});d.color.copy(this.light.color).multiplyScalar(this.light.intensity);this.targetLine=new THREE.Line(c,d);this.add(this.targetLine);this.update()};THREE.DirectionalLightHelper.prototype=Object.create(THREE.Object3D.prototype);
- THREE.DirectionalLightHelper.prototype.dispose=function(){this.lightPlane.geometry.dispose();this.lightPlane.material.dispose();this.targetLine.geometry.dispose();this.targetLine.material.dispose()};
- THREE.DirectionalLightHelper.prototype.update=function(){var a=new THREE.Vector3,b=new THREE.Vector3,c=new THREE.Vector3;return function(){a.setFromMatrixPosition(this.light.matrixWorld);b.setFromMatrixPosition(this.light.target.matrixWorld);c.subVectors(b,a);this.lightPlane.lookAt(c);this.lightPlane.material.color.copy(this.light.color).multiplyScalar(this.light.intensity);this.targetLine.geometry.vertices[1].copy(c);this.targetLine.geometry.verticesNeedUpdate=!0;this.targetLine.material.color.copy(this.lightPlane.material.color)}}();
- THREE.EdgesHelper=function(a,b){var c=void 0!==b?b:16777215,d=[0,0],f={},e=function(a,b){return a-b},g=["a","b","c"],h=new THREE.BufferGeometry,k=a.geometry.clone();k.mergeVertices();k.computeFaceNormals();for(var l=k.vertices,k=k.faces,m=0,q=0,n=k.length;q<n;q++)for(var r=k[q],s=0;3>s;s++){d[0]=r[g[s]];d[1]=r[g[(s+1)%3]];d.sort(e);var p=d.toString();void 0===f[p]?(f[p]={vert1:d[0],vert2:d[1],face1:q,face2:void 0},m++):f[p].face2=q}d=new Float32Array(6*m);e=0;for(p in f)if(g=f[p],void 0===g.face2||
- .9999>k[g.face1].normal.dot(k[g.face2].normal))m=l[g.vert1],d[e++]=m.x,d[e++]=m.y,d[e++]=m.z,m=l[g.vert2],d[e++]=m.x,d[e++]=m.y,d[e++]=m.z;h.addAttribute("position",new THREE.BufferAttribute(d,3));THREE.Line.call(this,h,new THREE.LineBasicMaterial({color:c}),THREE.LinePieces);this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1};THREE.EdgesHelper.prototype=Object.create(THREE.Line.prototype);
- THREE.FaceNormalsHelper=function(a,b,c,d){this.object=a;this.size=void 0!==b?b:1;a=void 0!==c?c:16776960;d=void 0!==d?d:1;b=new THREE.Geometry;c=0;for(var f=this.object.geometry.faces.length;c<f;c++)b.vertices.push(new THREE.Vector3,new THREE.Vector3);THREE.Line.call(this,b,new THREE.LineBasicMaterial({color:a,linewidth:d}),THREE.LinePieces);this.matrixAutoUpdate=!1;this.normalMatrix=new THREE.Matrix3;this.update()};THREE.FaceNormalsHelper.prototype=Object.create(THREE.Line.prototype);
- THREE.FaceNormalsHelper.prototype.update=function(){var a=this.geometry.vertices,b=this.object,c=b.geometry.vertices,d=b.geometry.faces,f=b.matrixWorld;b.updateMatrixWorld(!0);this.normalMatrix.getNormalMatrix(f);for(var e=b=0,g=d.length;b<g;b++,e+=2){var h=d[b];a[e].copy(c[h.a]).add(c[h.b]).add(c[h.c]).divideScalar(3).applyMatrix4(f);a[e+1].copy(h.normal).applyMatrix3(this.normalMatrix).normalize().multiplyScalar(this.size).add(a[e])}this.geometry.verticesNeedUpdate=!0;return this};
- THREE.GridHelper=function(a,b){var c=new THREE.Geometry,d=new THREE.LineBasicMaterial({vertexColors:THREE.VertexColors});this.color1=new THREE.Color(4473924);this.color2=new THREE.Color(8947848);for(var f=-a;f<=a;f+=b){c.vertices.push(new THREE.Vector3(-a,0,f),new THREE.Vector3(a,0,f),new THREE.Vector3(f,0,-a),new THREE.Vector3(f,0,a));var e=0===f?this.color1:this.color2;c.colors.push(e,e,e,e)}THREE.Line.call(this,c,d,THREE.LinePieces)};THREE.GridHelper.prototype=Object.create(THREE.Line.prototype);
- THREE.GridHelper.prototype.setColors=function(a,b){this.color1.set(a);this.color2.set(b);this.geometry.colorsNeedUpdate=!0};
- THREE.HemisphereLightHelper=function(a,b,c,d){THREE.Object3D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.colors=[new THREE.Color,new THREE.Color];a=new THREE.SphereGeometry(b,4,2);a.applyMatrix((new THREE.Matrix4).makeRotationX(-Math.PI/2));for(b=0;8>b;b++)a.faces[b].color=this.colors[4>b?0:1];b=new THREE.MeshBasicMaterial({vertexColors:THREE.FaceColors,wireframe:!0});this.lightSphere=new THREE.Mesh(a,b);this.add(this.lightSphere);
- this.update()};THREE.HemisphereLightHelper.prototype=Object.create(THREE.Object3D.prototype);THREE.HemisphereLightHelper.prototype.dispose=function(){this.lightSphere.geometry.dispose();this.lightSphere.material.dispose()};
- THREE.HemisphereLightHelper.prototype.update=function(){var a=new THREE.Vector3;return function(){this.colors[0].copy(this.light.color).multiplyScalar(this.light.intensity);this.colors[1].copy(this.light.groundColor).multiplyScalar(this.light.intensity);this.lightSphere.lookAt(a.setFromMatrixPosition(this.light.matrixWorld).negate());this.lightSphere.geometry.colorsNeedUpdate=!0}}();
- THREE.PointLightHelper=function(a,b){this.light=a;this.light.updateMatrixWorld();var c=new THREE.SphereGeometry(b,4,2),d=new THREE.MeshBasicMaterial({wireframe:!0,fog:!1});d.color.copy(this.light.color).multiplyScalar(this.light.intensity);THREE.Mesh.call(this,c,d);this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=!1};THREE.PointLightHelper.prototype=Object.create(THREE.Mesh.prototype);THREE.PointLightHelper.prototype.dispose=function(){this.geometry.dispose();this.material.dispose()};
- THREE.PointLightHelper.prototype.update=function(){this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity)};
- THREE.SkeletonHelper=function(a){this.bones=this.getBoneList(a);for(var b=new THREE.Geometry,c=0;c<this.bones.length;c++)this.bones[c].parent instanceof THREE.Bone&&(b.vertices.push(new THREE.Vector3),b.vertices.push(new THREE.Vector3),b.colors.push(new THREE.Color(0,0,1)),b.colors.push(new THREE.Color(0,1,0)));c=new THREE.LineBasicMaterial({vertexColors:THREE.VertexColors,depthTest:!1,depthWrite:!1,transparent:!0});THREE.Line.call(this,b,c,THREE.LinePieces);this.root=a;this.matrix=a.matrixWorld;
- this.matrixAutoUpdate=!1;this.update()};THREE.SkeletonHelper.prototype=Object.create(THREE.Line.prototype);THREE.SkeletonHelper.prototype.getBoneList=function(a){var b=[];a instanceof THREE.Bone&&b.push(a);for(var c=0;c<a.children.length;c++)b.push.apply(b,this.getBoneList(a.children[c]));return b};
- THREE.SkeletonHelper.prototype.update=function(){for(var a=this.geometry,b=(new THREE.Matrix4).getInverse(this.root.matrixWorld),c=new THREE.Matrix4,d=0,f=0;f<this.bones.length;f++){var e=this.bones[f];e.parent instanceof THREE.Bone&&(c.multiplyMatrices(b,e.matrixWorld),a.vertices[d].setFromMatrixPosition(c),c.multiplyMatrices(b,e.parent.matrixWorld),a.vertices[d+1].setFromMatrixPosition(c),d+=2)}a.verticesNeedUpdate=!0;a.computeBoundingSphere()};
- THREE.SpotLightHelper=function(a){THREE.Object3D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;a=new THREE.CylinderGeometry(0,1,1,8,1,!0);a.applyMatrix((new THREE.Matrix4).makeTranslation(0,-.5,0));a.applyMatrix((new THREE.Matrix4).makeRotationX(-Math.PI/2));var b=new THREE.MeshBasicMaterial({wireframe:!0,fog:!1});this.cone=new THREE.Mesh(a,b);this.add(this.cone);this.update()};THREE.SpotLightHelper.prototype=Object.create(THREE.Object3D.prototype);
- THREE.SpotLightHelper.prototype.dispose=function(){this.cone.geometry.dispose();this.cone.material.dispose()};THREE.SpotLightHelper.prototype.update=function(){var a=new THREE.Vector3,b=new THREE.Vector3;return function(){var c=this.light.distance?this.light.distance:1E4,d=c*Math.tan(this.light.angle);this.cone.scale.set(d,d,c);a.setFromMatrixPosition(this.light.matrixWorld);b.setFromMatrixPosition(this.light.target.matrixWorld);this.cone.lookAt(b.sub(a));this.cone.material.color.copy(this.light.color).multiplyScalar(this.light.intensity)}}();
- THREE.VertexNormalsHelper=function(a,b,c,d){this.object=a;this.size=void 0!==b?b:1;b=void 0!==c?c:16711680;d=void 0!==d?d:1;c=new THREE.Geometry;a=a.geometry.faces;for(var f=0,e=a.length;f<e;f++)for(var g=0,h=a[f].vertexNormals.length;g<h;g++)c.vertices.push(new THREE.Vector3,new THREE.Vector3);THREE.Line.call(this,c,new THREE.LineBasicMaterial({color:b,linewidth:d}),THREE.LinePieces);this.matrixAutoUpdate=!1;this.normalMatrix=new THREE.Matrix3;this.update()};THREE.VertexNormalsHelper.prototype=Object.create(THREE.Line.prototype);
- THREE.VertexNormalsHelper.prototype.update=function(a){var b=new THREE.Vector3;return function(a){a=["a","b","c","d"];this.object.updateMatrixWorld(!0);this.normalMatrix.getNormalMatrix(this.object.matrixWorld);for(var d=this.geometry.vertices,f=this.object.geometry.vertices,e=this.object.geometry.faces,g=this.object.matrixWorld,h=0,k=0,l=e.length;k<l;k++)for(var m=e[k],q=0,n=m.vertexNormals.length;q<n;q++){var r=m.vertexNormals[q];d[h].copy(f[m[a[q]]]).applyMatrix4(g);b.copy(r).applyMatrix3(this.normalMatrix).normalize().multiplyScalar(this.size);
- b.add(d[h]);h+=1;d[h].copy(b);h+=1}this.geometry.verticesNeedUpdate=!0;return this}}();
- THREE.VertexTangentsHelper=function(a,b,c,d){this.object=a;this.size=void 0!==b?b:1;b=void 0!==c?c:255;d=void 0!==d?d:1;c=new THREE.Geometry;a=a.geometry.faces;for(var f=0,e=a.length;f<e;f++)for(var g=0,h=a[f].vertexTangents.length;g<h;g++)c.vertices.push(new THREE.Vector3),c.vertices.push(new THREE.Vector3);THREE.Line.call(this,c,new THREE.LineBasicMaterial({color:b,linewidth:d}),THREE.LinePieces);this.matrixAutoUpdate=!1;this.update()};THREE.VertexTangentsHelper.prototype=Object.create(THREE.Line.prototype);
- THREE.VertexTangentsHelper.prototype.update=function(a){var b=new THREE.Vector3;return function(a){a=["a","b","c","d"];this.object.updateMatrixWorld(!0);for(var d=this.geometry.vertices,f=this.object.geometry.vertices,e=this.object.geometry.faces,g=this.object.matrixWorld,h=0,k=0,l=e.length;k<l;k++)for(var m=e[k],q=0,n=m.vertexTangents.length;q<n;q++){var r=m.vertexTangents[q];d[h].copy(f[m[a[q]]]).applyMatrix4(g);b.copy(r).transformDirection(g).multiplyScalar(this.size);b.add(d[h]);h+=1;d[h].copy(b);
- h+=1}this.geometry.verticesNeedUpdate=!0;return this}}();
- THREE.WireframeHelper=function(a,b){var c=void 0!==b?b:16777215,d=[0,0],f={},e=function(a,b){return a-b},g=["a","b","c"],h=new THREE.BufferGeometry;if(a.geometry instanceof THREE.Geometry){for(var k=a.geometry.vertices,l=a.geometry.faces,m=0,q=new Uint32Array(6*l.length),n=0,r=l.length;n<r;n++)for(var s=l[n],p=0;3>p;p++){d[0]=s[g[p]];d[1]=s[g[(p+1)%3]];d.sort(e);var t=d.toString();void 0===f[t]&&(q[2*m]=d[0],q[2*m+1]=d[1],f[t]=!0,m++)}d=new Float32Array(6*m);n=0;for(r=m;n<r;n++)for(p=0;2>p;p++)m=
- k[q[2*n+p]],g=6*n+3*p,d[g+0]=m.x,d[g+1]=m.y,d[g+2]=m.z;h.addAttribute("position",new THREE.BufferAttribute(d,3))}else if(a.geometry instanceof THREE.BufferGeometry){if(void 0!==a.geometry.attributes.index){k=a.geometry.attributes.position.array;r=a.geometry.attributes.index.array;l=a.geometry.drawcalls;m=0;0===l.length&&(l=[{count:r.length,index:0,start:0}]);for(var q=new Uint32Array(2*r.length),s=0,u=l.length;s<u;++s)for(var p=l[s].start,t=l[s].count,g=l[s].index,n=p,w=p+t;n<w;n+=3)for(p=0;3>p;p++)d[0]=
- g+r[n+p],d[1]=g+r[n+(p+1)%3],d.sort(e),t=d.toString(),void 0===f[t]&&(q[2*m]=d[0],q[2*m+1]=d[1],f[t]=!0,m++);d=new Float32Array(6*m);n=0;for(r=m;n<r;n++)for(p=0;2>p;p++)g=6*n+3*p,m=3*q[2*n+p],d[g+0]=k[m],d[g+1]=k[m+1],d[g+2]=k[m+2]}else for(k=a.geometry.attributes.position.array,m=k.length/3,q=m/3,d=new Float32Array(6*m),n=0,r=q;n<r;n++)for(p=0;3>p;p++)g=18*n+6*p,q=9*n+3*p,d[g+0]=k[q],d[g+1]=k[q+1],d[g+2]=k[q+2],m=9*n+(p+1)%3*3,d[g+3]=k[m],d[g+4]=k[m+1],d[g+5]=k[m+2];h.addAttribute("position",new THREE.BufferAttribute(d,
- 3))}THREE.Line.call(this,h,new THREE.LineBasicMaterial({color:c}),THREE.LinePieces);this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1};THREE.WireframeHelper.prototype=Object.create(THREE.Line.prototype);THREE.ImmediateRenderObject=function(){THREE.Object3D.call(this);this.render=function(a){}};THREE.ImmediateRenderObject.prototype=Object.create(THREE.Object3D.prototype);
- THREE.MorphBlendMesh=function(a,b){THREE.Mesh.call(this,a,b);this.animationsMap={};this.animationsList=[];var c=this.geometry.morphTargets.length;this.createAnimation("__default",0,c-1,c/1);this.setAnimationWeight("__default",1)};THREE.MorphBlendMesh.prototype=Object.create(THREE.Mesh.prototype);
- THREE.MorphBlendMesh.prototype.createAnimation=function(a,b,c,d){b={startFrame:b,endFrame:c,length:c-b+1,fps:d,duration:(c-b)/d,lastFrame:0,currentFrame:0,active:!1,time:0,direction:1,weight:1,directionBackwards:!1,mirroredLoop:!1};this.animationsMap[a]=b;this.animationsList.push(b)};
- THREE.MorphBlendMesh.prototype.autoCreateAnimations=function(a){for(var b=/([a-z]+)_?(\d+)/,c,d={},f=this.geometry,e=0,g=f.morphTargets.length;e<g;e++){var h=f.morphTargets[e].name.match(b);if(h&&1<h.length){var k=h[1];d[k]||(d[k]={start:Infinity,end:-Infinity});h=d[k];e<h.start&&(h.start=e);e>h.end&&(h.end=e);c||(c=k)}}for(k in d)h=d[k],this.createAnimation(k,h.start,h.end,a);this.firstAnimation=c};
- THREE.MorphBlendMesh.prototype.setAnimationDirectionForward=function(a){if(a=this.animationsMap[a])a.direction=1,a.directionBackwards=!1};THREE.MorphBlendMesh.prototype.setAnimationDirectionBackward=function(a){if(a=this.animationsMap[a])a.direction=-1,a.directionBackwards=!0};THREE.MorphBlendMesh.prototype.setAnimationFPS=function(a,b){var c=this.animationsMap[a];c&&(c.fps=b,c.duration=(c.end-c.start)/c.fps)};
- THREE.MorphBlendMesh.prototype.setAnimationDuration=function(a,b){var c=this.animationsMap[a];c&&(c.duration=b,c.fps=(c.end-c.start)/c.duration)};THREE.MorphBlendMesh.prototype.setAnimationWeight=function(a,b){var c=this.animationsMap[a];c&&(c.weight=b)};THREE.MorphBlendMesh.prototype.setAnimationTime=function(a,b){var c=this.animationsMap[a];c&&(c.time=b)};THREE.MorphBlendMesh.prototype.getAnimationTime=function(a){var b=0;if(a=this.animationsMap[a])b=a.time;return b};
- THREE.MorphBlendMesh.prototype.getAnimationDuration=function(a){var b=-1;if(a=this.animationsMap[a])b=a.duration;return b};THREE.MorphBlendMesh.prototype.playAnimation=function(a){var b=this.animationsMap[a];b?(b.time=0,b.active=!0):console.warn("animation["+a+"] undefined")};THREE.MorphBlendMesh.prototype.stopAnimation=function(a){if(a=this.animationsMap[a])a.active=!1};
- THREE.MorphBlendMesh.prototype.update=function(a){for(var b=0,c=this.animationsList.length;b<c;b++){var d=this.animationsList[b];if(d.active){var f=d.duration/d.length;d.time+=d.direction*a;if(d.mirroredLoop){if(d.time>d.duration||0>d.time)d.direction*=-1,d.time>d.duration&&(d.time=d.duration,d.directionBackwards=!0),0>d.time&&(d.time=0,d.directionBackwards=!1)}else d.time%=d.duration,0>d.time&&(d.time+=d.duration);var e=d.startFrame+THREE.Math.clamp(Math.floor(d.time/f),0,d.length-1),g=d.weight;
- e!==d.currentFrame&&(this.morphTargetInfluences[d.lastFrame]=0,this.morphTargetInfluences[d.currentFrame]=1*g,this.morphTargetInfluences[e]=0,d.lastFrame=d.currentFrame,d.currentFrame=e);f=d.time%f/f;d.directionBackwards&&(f=1-f);this.morphTargetInfluences[d.currentFrame]=f*g;this.morphTargetInfluences[d.lastFrame]=(1-f)*g}}};
|