|
@@ -921,54 +921,54 @@ for(var b=0,c=a.length;b!==c;++b){var d=a[b];0===--d.referenceCount&&this._remov
|
|
|
e);e[c]=a;a._cacheIndex=f.length;f.push(a)},_removeInactiveBinding:function(a){var b=this._bindings,c=a.binding,d=c.rootNode.uuid;c=c.path;var e=this._bindingsByRootAndName,f=e[d],g=b[b.length-1];a=a._cacheIndex;g._cacheIndex=a;b[a]=g;b.pop();delete f[c];0===Object.keys(f).length&&delete e[d]},_lendBinding:function(a){var b=this._bindings,c=a._cacheIndex,d=this._nActiveBindings++,e=b[d];a._cacheIndex=d;b[d]=a;e._cacheIndex=c;b[c]=e},_takeBackBinding:function(a){var b=this._bindings,c=a._cacheIndex,
|
|
|
d=--this._nActiveBindings,e=b[d];a._cacheIndex=d;b[d]=a;e._cacheIndex=c;b[c]=e},_lendControlInterpolant:function(){var a=this._controlInterpolants,b=this._nActiveControlInterpolants++,c=a[b];void 0===c&&(c=new ie(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),c.__cacheIndex=b,a[b]=c);return c},_takeBackControlInterpolant:function(a){var b=this._controlInterpolants,c=a.__cacheIndex,d=--this._nActiveControlInterpolants,e=b[d];a.__cacheIndex=d;b[d]=a;e.__cacheIndex=
|
|
|
c;b[c]=e},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(a,b,c){var d=b||this._root,e=d.uuid;d="string"===typeof a?Sa.findByName(d,a):a;a=null!==d?d.uuid:a;var f=this._actionsByClip[a],g=null;void 0===c&&(c=null!==d?d.blendMode:2500);if(void 0!==f){g=f.actionByRoot[e];if(void 0!==g&&g.blendMode===c)return g;g=f.knownActions[0];null===d&&(d=g._clip)}if(null===d)return null;b=new ki(this,d,b,c);this._bindAction(b,g);this._addInactiveAction(b,a,e);return b},existingAction:function(a,
|
|
|
-b){var c=b||this._root;b=c.uuid;c="string"===typeof a?Sa.findByName(c,a):a;a=this._actionsByClip[c?c.uuid:a];return void 0!==a?a.actionByRoot[b]||null:null},stopAllAction:function(){for(var a=this._actions,b=this._nActiveActions,c=this._bindings,d=this._nActiveBindings,e=this._nActiveBindings=this._nActiveActions=0;e!==b;++e)a[e].reset();for(e=0;e!==d;++e)c[e].useCount=0;return this},update:function(a){a*=this.timeScale;for(var b=this._actions,c=this._nActiveActions,d=this.time+=a,e=Math.sign(a),
|
|
|
-f=this._accuIndex^=1,g=0;g!==c;++g)b[g]._update(d,a,e,f);a=this._bindings;b=this._nActiveBindings;for(g=0;g!==b;++g)a[g].apply(f);return this},setTime:function(a){for(var b=this.time=0;b<this._actions.length;b++)this._actions[b].time=0;return this.update(a)},getRoot:function(){return this._root},uncacheClip:function(a){var b=this._actions;a=a.uuid;var c=this._actionsByClip,d=c[a];if(void 0!==d){d=d.knownActions;for(var e=0,f=d.length;e!==f;++e){var g=d[e];this._deactivateAction(g);var h=g._cacheIndex,
|
|
|
-k=b[b.length-1];g._cacheIndex=null;g._byClipCacheIndex=null;k._cacheIndex=h;b[h]=k;b.pop();this._removeInactiveBindingsForAction(g)}delete c[a]}},uncacheRoot:function(a){a=a.uuid;var b=this._actionsByClip;for(d in b){var c=b[d].actionByRoot[a];void 0!==c&&(this._deactivateAction(c),this._removeInactiveAction(c))}var d=this._bindingsByRootAndName[a];if(void 0!==d)for(var e in d)a=d[e],a.restoreOriginalState(),this._removeInactiveBinding(a)},uncacheAction:function(a,b){a=this.existingAction(a,b);null!==
|
|
|
-a&&(this._deactivateAction(a),this._removeInactiveAction(a))}});vf.prototype.clone=function(){return new vf(void 0===this.value.clone?this.value:this.value.clone())};Jg.prototype=Object.assign(Object.create(sb.prototype),{constructor:Jg,isInstancedInterleavedBuffer:!0,copy:function(a){sb.prototype.copy.call(this,a);this.meshPerAttribute=a.meshPerAttribute;return this}});Object.assign(Kg.prototype,{set:function(a,b){this.ray.set(a,b)},setFromCamera:function(a,b){b&&b.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(b.matrixWorld),
|
|
|
-this.ray.direction.set(a.x,a.y,.5).unproject(b).sub(this.ray.origin).normalize(),this.camera=b):b&&b.isOrthographicCamera?(this.ray.origin.set(a.x,a.y,(b.near+b.far)/(b.near-b.far)).unproject(b),this.ray.direction.set(0,0,-1).transformDirection(b.matrixWorld),this.camera=b):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(a,b,c){c=c||[];Lg(a,this,c,b);c.sort(li);return c},intersectObjects:function(a,b,c){c=c||[];if(!1===Array.isArray(a))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),
|
|
|
-c;for(var d=0,e=a.length;d<e;d++)Lg(a[d],this,c,b);c.sort(li);return c}});Object.assign(mi.prototype,{set:function(a,b,c){this.radius=a;this.phi=b;this.theta=c;return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.radius=a.radius;this.phi=a.phi;this.theta=a.theta;return this},makeSafe:function(){this.phi=Math.max(1E-6,Math.min(Math.PI-1E-6,this.phi));return this},setFromVector3:function(a){return this.setFromCartesianCoords(a.x,a.y,a.z)},setFromCartesianCoords:function(a,
|
|
|
-b,c){this.radius=Math.sqrt(a*a+b*b+c*c);0===this.radius?this.phi=this.theta=0:(this.theta=Math.atan2(a,c),this.phi=Math.acos(M.clamp(b/this.radius,-1,1)));return this}});Object.assign(ni.prototype,{set:function(a,b,c){this.radius=a;this.theta=b;this.y=c;return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.radius=a.radius;this.theta=a.theta;this.y=a.y;return this},setFromVector3:function(a){return this.setFromCartesianCoords(a.x,a.y,a.z)},setFromCartesianCoords:function(a,
|
|
|
-b,c){this.radius=Math.sqrt(a*a+c*c);this.theta=Math.atan2(a,c);this.y=b;return this}});var Ui=new v;Object.assign(Mg.prototype,{set:function(a,b){this.min.copy(a);this.max.copy(b);return this},setFromPoints:function(a){this.makeEmpty();for(var b=0,c=a.length;b<c;b++)this.expandByPoint(a[b]);return this},setFromCenterAndSize:function(a,b){b=Ui.copy(b).multiplyScalar(.5);this.min.copy(a).sub(b);this.max.copy(a).add(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.min.copy(a.min);
|
|
|
-this.max.copy(a.max);return this},makeEmpty:function(){this.min.x=this.min.y=Infinity;this.max.x=this.max.y=-Infinity;return this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(a){void 0===a&&(console.warn("THREE.Box2: .getCenter() target is now required"),a=new v);return this.isEmpty()?a.set(0,0):a.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(a){void 0===a&&(console.warn("THREE.Box2: .getSize() target is now required"),a=new v);return this.isEmpty()?
|
|
|
-a.set(0,0):a.subVectors(this.max,this.min)},expandByPoint:function(a){this.min.min(a);this.max.max(a);return this},expandByVector:function(a){this.min.sub(a);this.max.add(a);return this},expandByScalar:function(a){this.min.addScalar(-a);this.max.addScalar(a);return this},containsPoint:function(a){return a.x<this.min.x||a.x>this.max.x||a.y<this.min.y||a.y>this.max.y?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y},getParameter:function(a,
|
|
|
-b){void 0===b&&(console.warn("THREE.Box2: .getParameter() target is now required"),b=new v);return b.set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(a){return a.max.x<this.min.x||a.min.x>this.max.x||a.max.y<this.min.y||a.min.y>this.max.y?!1:!0},clampPoint:function(a,b){void 0===b&&(console.warn("THREE.Box2: .clampPoint() target is now required"),b=new v);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(a){return Ui.copy(a).clamp(this.min,
|
|
|
-this.max).sub(a).length()},intersect:function(a){this.min.max(a.min);this.max.min(a.max);return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}});var Vi=new p,Tf=new p;Object.assign(Ng.prototype,{set:function(a,b){this.start.copy(a);this.end.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.start.copy(a.start);
|
|
|
-this.end.copy(a.end);return this},getCenter:function(a){void 0===a&&(console.warn("THREE.Line3: .getCenter() target is now required"),a=new p);return a.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(a){void 0===a&&(console.warn("THREE.Line3: .delta() target is now required"),a=new p);return a.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(a,b){void 0===
|
|
|
-b&&(console.warn("THREE.Line3: .at() target is now required"),b=new p);return this.delta(b).multiplyScalar(a).add(this.start)},closestPointToPointParameter:function(a,b){Vi.subVectors(a,this.start);Tf.subVectors(this.end,this.start);a=Tf.dot(Tf);a=Tf.dot(Vi)/a;b&&(a=M.clamp(a,0,1));return a},closestPointToPoint:function(a,b,c){a=this.closestPointToPointParameter(a,b);void 0===c&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),c=new p);return this.delta(c).multiplyScalar(a).add(this.start)},
|
|
|
-applyMatrix4:function(a){this.start.applyMatrix4(a);this.end.applyMatrix4(a);return this},equals:function(a){return a.start.equals(this.start)&&a.end.equals(this.end)}});ne.prototype=Object.create(y.prototype);ne.prototype.constructor=ne;ne.prototype.isImmediateRenderObject=!0;var Wi=new p;hd.prototype=Object.create(y.prototype);hd.prototype.constructor=hd;hd.prototype.dispose=function(){this.cone.geometry.dispose();this.cone.material.dispose()};hd.prototype.update=function(){this.light.updateMatrixWorld();
|
|
|
-var a=this.light.distance?this.light.distance:1E3,b=a*Math.tan(this.light.angle);this.cone.scale.set(b,b,a);Wi.setFromMatrixPosition(this.light.target.matrixWorld);this.cone.lookAt(Wi);void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)};var Vb=new p,Uf=new O,oh=new O;qc.prototype=Object.create(la.prototype);qc.prototype.constructor=qc;qc.prototype.isSkeletonHelper=!0;qc.prototype.updateMatrixWorld=function(a){var b=this.bones,c=this.geometry,
|
|
|
-d=c.getAttribute("position");oh.getInverse(this.root.matrixWorld);for(var e=0,f=0;e<b.length;e++){var g=b[e];g.parent&&g.parent.isBone&&(Uf.multiplyMatrices(oh,g.matrixWorld),Vb.setFromMatrixPosition(Uf),d.setXYZ(f,Vb.x,Vb.y,Vb.z),Uf.multiplyMatrices(oh,g.parent.matrixWorld),Vb.setFromMatrixPosition(Uf),d.setXYZ(f+1,Vb.x,Vb.y,Vb.z),f+=2)}c.getAttribute("position").needsUpdate=!0;y.prototype.updateMatrixWorld.call(this,a)};id.prototype=Object.create(ha.prototype);id.prototype.constructor=id;id.prototype.dispose=
|
|
|
-function(){this.geometry.dispose();this.material.dispose()};id.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)};var el=new p,Xi=new D,Yi=new D;jd.prototype=Object.create(y.prototype);jd.prototype.constructor=jd;jd.prototype.dispose=function(){this.children[0].geometry.dispose();this.children[0].material.dispose()};jd.prototype.update=function(){var a=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);
|
|
|
-else{var b=a.geometry.getAttribute("color");Xi.copy(this.light.color);Yi.copy(this.light.groundColor);for(var c=0,d=b.count;c<d;c++){var e=c<d/2?Xi:Yi;b.setXYZ(c,e.r,e.g,e.b)}b.needsUpdate=!0}a.lookAt(el.setFromMatrixPosition(this.light.matrixWorld).negate())};wf.prototype=Object.assign(Object.create(la.prototype),{constructor:wf,copy:function(a){la.prototype.copy.call(this,a);this.geometry.copy(a.geometry);this.material.copy(a.material);return this},clone:function(){return(new this.constructor).copy(this)}});
|
|
|
-xf.prototype=Object.create(la.prototype);xf.prototype.constructor=xf;var Zi=new p,Vf=new p,$i=new p;kd.prototype=Object.create(y.prototype);kd.prototype.constructor=kd;kd.prototype.dispose=function(){this.lightPlane.geometry.dispose();this.lightPlane.material.dispose();this.targetLine.geometry.dispose();this.targetLine.material.dispose()};kd.prototype.update=function(){Zi.setFromMatrixPosition(this.light.matrixWorld);Vf.setFromMatrixPosition(this.light.target.matrixWorld);$i.subVectors(Vf,Zi);this.lightPlane.lookAt(Vf);
|
|
|
-void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color));this.targetLine.lookAt(Vf);this.targetLine.scale.z=$i.length()};var yf=new p,ea=new fb;oe.prototype=Object.create(la.prototype);oe.prototype.constructor=oe;oe.prototype.update=function(){var a=this.geometry,b=this.pointMap;ea.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse);
|
|
|
-Q("c",b,a,ea,0,0,-1);Q("t",b,a,ea,0,0,1);Q("n1",b,a,ea,-1,-1,-1);Q("n2",b,a,ea,1,-1,-1);Q("n3",b,a,ea,-1,1,-1);Q("n4",b,a,ea,1,1,-1);Q("f1",b,a,ea,-1,-1,1);Q("f2",b,a,ea,1,-1,1);Q("f3",b,a,ea,-1,1,1);Q("f4",b,a,ea,1,1,1);Q("u1",b,a,ea,.7,1.1,-1);Q("u2",b,a,ea,-.7,1.1,-1);Q("u3",b,a,ea,0,2,-1);Q("cf1",b,a,ea,-1,0,1);Q("cf2",b,a,ea,1,0,1);Q("cf3",b,a,ea,0,-1,1);Q("cf4",b,a,ea,0,1,1);Q("cn1",b,a,ea,-1,0,-1);Q("cn2",b,a,ea,1,0,-1);Q("cn3",b,a,ea,0,-1,-1);Q("cn4",b,a,ea,0,1,-1);a.getAttribute("position").needsUpdate=
|
|
|
-!0};var Wf=new Va;xb.prototype=Object.create(la.prototype);xb.prototype.constructor=xb;xb.prototype.update=function(a){void 0!==a&&console.warn("THREE.BoxHelper: .update() has no longer arguments.");void 0!==this.object&&Wf.setFromObject(this.object);if(!Wf.isEmpty()){a=Wf.min;var b=Wf.max,c=this.geometry.attributes.position,d=c.array;d[0]=b.x;d[1]=b.y;d[2]=b.z;d[3]=a.x;d[4]=b.y;d[5]=b.z;d[6]=a.x;d[7]=a.y;d[8]=b.z;d[9]=b.x;d[10]=a.y;d[11]=b.z;d[12]=b.x;d[13]=b.y;d[14]=a.z;d[15]=a.x;d[16]=b.y;d[17]=
|
|
|
-a.z;d[18]=a.x;d[19]=a.y;d[20]=a.z;d[21]=b.x;d[22]=a.y;d[23]=a.z;c.needsUpdate=!0;this.geometry.computeBoundingSphere()}};xb.prototype.setFromObject=function(a){this.object=a;this.update();return this};xb.prototype.copy=function(a){la.prototype.copy.call(this,a);this.object=a.object;return this};xb.prototype.clone=function(){return(new this.constructor).copy(this)};pe.prototype=Object.create(la.prototype);pe.prototype.constructor=pe;pe.prototype.updateMatrixWorld=function(a){var b=this.box;b.isEmpty()||
|
|
|
-(b.getCenter(this.position),b.getSize(this.scale),this.scale.multiplyScalar(.5),y.prototype.updateMatrixWorld.call(this,a))};qe.prototype=Object.create(La.prototype);qe.prototype.constructor=qe;qe.prototype.updateMatrixWorld=function(a){var b=-this.plane.constant;1E-8>Math.abs(b)&&(b=1E-8);this.scale.set(.5*this.size,.5*this.size,b);this.children[0].material.side=0>b?1:0;this.lookAt(this.plane.normal);y.prototype.updateMatrixWorld.call(this,a)};var aj=new p,zf,Og;yb.prototype=Object.create(y.prototype);
|
|
|
-yb.prototype.constructor=yb;yb.prototype.setDirection=function(a){.99999<a.y?this.quaternion.set(0,0,0,1):-.99999>a.y?this.quaternion.set(1,0,0,0):(aj.set(a.z,0,-a.x).normalize(),this.quaternion.setFromAxisAngle(aj,Math.acos(a.y)))};yb.prototype.setLength=function(a,b,c){void 0===b&&(b=.2*a);void 0===c&&(c=.2*b);this.line.scale.set(1,Math.max(1E-4,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()};yb.prototype.setColor=function(a){this.line.material.color.set(a);
|
|
|
-this.cone.material.color.set(a)};yb.prototype.copy=function(a){y.prototype.copy.call(this,a,!1);this.line.copy(a.line);this.cone.copy(a.cone);return this};yb.prototype.clone=function(){return(new this.constructor).copy(this)};re.prototype=Object.create(la.prototype);re.prototype.constructor=re;var nb=Math.pow(2,8),bj=[.125,.215,.35,.446,.526,.582],cj=5+bj.length,mb={3E3:0,3001:1,3002:2,3004:3,3005:4,3006:5,3007:6},ph=new fd,qh=function(){for(var a=[],b=[],c=[],d=8,e=0;e<cj;e++){var f=Math.pow(2,d);
|
|
|
-b.push(f);var g=1/f;4<e?g=bj[e-8+4-1]:0==e&&(g=0);c.push(g);g=1/(f-1);f=-g/2;g=1+g/2;var h=[f,f,g,f,g,g,f,f,g,g,f,g];f=new Float32Array(108);g=new Float32Array(72);for(var k=new Float32Array(36),m=0;6>m;m++){var p=m%3*2/3-1,n=2<m?0:-1;f.set([p,n,0,p+2/3,n,0,p+2/3,n+1,0,p,n,0,p+2/3,n+1,0,p,n+1,0],18*m);g.set(h,12*m);k.set([m,m,m,m,m,m],6*m)}h=new E;h.setAttribute("position",new L(f,3));h.setAttribute("uv",new L(g,2));h.setAttribute("faceIndex",new L(k,1));a.push(h);4<d&&d--}return{_lodPlanes:a,_sizeLods:b,
|
|
|
-_sigmas:c}}(),Ce=qh._lodPlanes,dj=qh._sizeLods,Xf=qh._sigmas,rh=null,zc=(1+Math.sqrt(5))/2,xd=1/zc,ej=[new p(1,1,1),new p(-1,1,1),new p(1,1,-1),new p(-1,1,-1),new p(0,zc,xd),new p(0,zc,-xd),new p(xd,0,zc),new p(-xd,0,zc),new p(zc,xd,0),new p(-zc,xd,0)];Pg.prototype={constructor:Pg,fromScene:function(a,b,c,d){void 0===b&&(b=0);void 0===c&&(c=.1);void 0===d&&(d=100);rh=this._renderer.getRenderTarget();var e=this._allocateTargets();this._sceneToCubeUV(a,c,d,e);0<b&&this._blur(e,0,0,b);this._applyPMREM(e);
|
|
|
-this._cleanup(e);return e},fromEquirectangular:function(a){a.magFilter=1003;a.minFilter=1003;a.generateMipmaps=!1;return this.fromCubemap(a)},fromCubemap:function(a){rh=this._renderer.getRenderTarget();var b=this._allocateTargets(a);this._textureToCubeUV(a,b);this._applyPMREM(b);this._cleanup(b);return b},compileCubemapShader:function(){null===this._cubemapShader&&(this._cubemapShader=ri(),this._compileMaterial(this._cubemapShader))},compileEquirectangularShader:function(){null===this._equirectShader&&
|
|
|
-(this._equirectShader=qi(),this._compileMaterial(this._equirectShader))},dispose:function(){this._blurMaterial.dispose();null!==this._cubemapShader&&this._cubemapShader.dispose();null!==this._equirectShader&&this._equirectShader.dispose();for(var a=0;a<Ce.length;a++)Ce[a].dispose()},_cleanup:function(a){this._pingPongRenderTarget.dispose();this._renderer.setRenderTarget(rh);a.scissorTest=!1;a.setSize(a.width,a.height)},_allocateTargets:function(a){var b=void 0===a||1009!==a.type?!1:3E3===a.encoding||
|
|
|
-3001===a.encoding||3007===a.encoding;b={magFilter:1003,minFilter:1003,generateMipmaps:!1,type:1009,format:1023,encoding:b?a.encoding:3002,depthBuffer:!1,stencilBuffer:!1};var c=pi(b);c.depthBuffer=a?!1:!0;this._pingPongRenderTarget=pi(b);return c},_compileMaterial:function(a){var b=new qb;b.add(new ha(Ce[0],a));this._renderer.compile(b,ph)},_sceneToCubeUV:function(a,b,c,d){b=new S(90,1,b,c);c=[1,-1,1,1,1,1];var e=[1,1,1,-1,-1,-1],f=this._renderer,g=f.outputEncoding,h=f.toneMapping,k=f.toneMappingExposure,
|
|
|
-m=f.getClearColor(),p=f.getClearAlpha();f.toneMapping=1;f.toneMappingExposure=1;f.outputEncoding=3E3;var n=a.background;if(n&&n.isColor){n.convertSRGBToLinear();var t=Math.min(Math.max(Math.ceil(Math.log2(Math.max(n.r,n.g,n.b))),-128),127);n=n.multiplyScalar(Math.pow(2,-t));f.setClearColor(n,(t+128)/255);a.background=null}for(n=0;6>n;n++)t=n%3,0==t?(b.up.set(0,c[n],0),b.lookAt(e[n],0,0)):1==t?(b.up.set(0,0,c[n]),b.lookAt(0,e[n],0)):(b.up.set(0,c[n],0),b.lookAt(0,0,e[n])),Sg(d,t*nb,2<n?nb:0,nb,nb),
|
|
|
-f.setRenderTarget(d),f.render(a,b);f.toneMapping=h;f.toneMappingExposure=k;f.outputEncoding=g;f.setClearColor(m,p)},_textureToCubeUV:function(a,b){var c=new qb,d=this._renderer;a.isCubeTexture?null==this._cubemapShader&&(this._cubemapShader=ri()):null==this._equirectShader&&(this._equirectShader=qi());var e=a.isCubeTexture?this._cubemapShader:this._equirectShader;c.add(new ha(Ce[0],e));e=e.uniforms;e.envMap.value=a;a.isCubeTexture||e.texelSize.value.set(1/a.image.width,1/a.image.height);e.inputEncoding.value=
|
|
|
-mb[a.encoding];e.outputEncoding.value=mb[b.texture.encoding];Sg(b,0,0,3*nb,2*nb);d.setRenderTarget(b);d.render(c,ph)},_applyPMREM:function(a){var b=this._renderer,c=b.autoClear;b.autoClear=!1;for(var d=1;d<cj;d++)this._blur(a,d-1,d,Math.sqrt(Xf[d]*Xf[d]-Xf[d-1]*Xf[d-1]),ej[(d-1)%ej.length]);b.autoClear=c},_blur:function(a,b,c,d,e){var f=this._pingPongRenderTarget;this._halfBlur(a,f,b,c,d,"latitudinal",e);this._halfBlur(f,a,c,c,d,"longitudinal",e)},_halfBlur:function(a,b,c,d,e,f,g){var h=this._renderer,
|
|
|
-k=this._blurMaterial;"latitudinal"!==f&&"longitudinal"!==f&&console.error("blur direction must be either latitudinal or longitudinal!");var m=new qb;m.add(new ha(Ce[d],k));k=k.uniforms;var p=dj[c]-1;p=isFinite(e)?Math.PI/(2*p):2*Math.PI/39;var n=e/p,t=isFinite(e)?1+Math.floor(3*n):20;20<t&&console.warn("sigmaRadians, "+e+", is too large and will clip, as it requested "+t+" samples when the maximum is set to 20");e=[];for(var r=0,q=0;20>q;++q){var u=q/n;u=Math.exp(-u*u/2);e.push(u);0==q?r+=u:q<t&&
|
|
|
-(r+=2*u)}for(q=0;q<e.length;q++)e[q]/=r;k.envMap.value=a.texture;k.samples.value=t;k.weights.value=e;k.latitudinal.value="latitudinal"===f;g&&(k.poleAxis.value=g);k.dTheta.value=p;k.mipInt.value=8-c;k.inputEncoding.value=mb[a.texture.encoding];k.outputEncoding.value=mb[a.texture.encoding];a=dj[d];u=3*Math.max(0,nb-2*a);Sg(b,u,(0===d?0:2*nb)+2*a*(4<d?d-8+4:0),3*a,2*a);h.setRenderTarget(b);h.render(m,ph)}};I.create=function(a,b){console.log("THREE.Curve.create() has been deprecated");a.prototype=Object.create(I.prototype);
|
|
|
-a.prototype.constructor=a;a.prototype.getPoint=b;return a};Object.assign(wb.prototype,{createPointsGeometry:function(a){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");a=this.getPoints(a);return this.createGeometry(a)},createSpacedPointsGeometry:function(a){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");a=this.getSpacedPoints(a);
|
|
|
-return this.createGeometry(a)},createGeometry:function(a){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var b=new F,c=0,d=a.length;c<d;c++){var e=a[c];b.vertices.push(new p(e.x,e.y,e.z||0))}return b}});Object.assign(bb.prototype,{fromPoints:function(a){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints().");return this.setFromPoints(a)}});si.prototype=Object.create(za.prototype);ti.prototype=
|
|
|
-Object.create(za.prototype);Tg.prototype=Object.create(za.prototype);Object.assign(Tg.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}});wf.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")};
|
|
|
-qc.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")};Object.assign(V.prototype,{extractUrlBase:function(a){console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead.");return mh.extractUrlBase(a)}});V.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}};
|
|
|
-Object.assign(tf.prototype,{setTexturePath:function(a){console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath().");return this.setResourcePath(a)}});Object.assign(Mg.prototype,{center:function(a){console.warn("THREE.Box2: .center() has been renamed to .getCenter().");return this.getCenter(a)},empty:function(){console.warn("THREE.Box2: .empty() has been renamed to .isEmpty().");return this.isEmpty()},isIntersectionBox:function(a){console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().");
|
|
|
-return this.intersectsBox(a)},size:function(a){console.warn("THREE.Box2: .size() has been renamed to .getSize().");return this.getSize(a)}});Object.assign(Va.prototype,{center:function(a){console.warn("THREE.Box3: .center() has been renamed to .getCenter().");return this.getCenter(a)},empty:function(){console.warn("THREE.Box3: .empty() has been renamed to .isEmpty().");return this.isEmpty()},isIntersectionBox:function(a){console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().");
|
|
|
-return this.intersectsBox(a)},isIntersectionSphere:function(a){console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().");return this.intersectsSphere(a)},size:function(a){console.warn("THREE.Box3: .size() has been renamed to .getSize().");return this.getSize(a)}});Object.assign(eb.prototype,{empty:function(){console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty().");return this.isEmpty()}});Gc.prototype.setFromMatrix=function(a){console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix().");
|
|
|
-return this.setFromProjectionMatrix(a)};Ng.prototype.center=function(a){console.warn("THREE.Line3: .center() has been renamed to .getCenter().");return this.getCenter(a)};Object.assign(M,{random16:function(){console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead.");return Math.random()},nearestPowerOfTwo:function(a){console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo().");return M.floorPowerOfTwo(a)},nextPowerOfTwo:function(a){console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo().");
|
|
|
-return M.ceilPowerOfTwo(a)}});Object.assign(va.prototype,{flattenToArrayOffset:function(a,b){console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.");return this.toArray(a,b)},multiplyVector3:function(a){console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.");return a.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBufferAttribute:function(a){console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead.");
|
|
|
-return a.applyMatrix3(this)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}});Object.assign(O.prototype,{extractPosition:function(a){console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().");return this.copyPosition(a)},flattenToArrayOffset:function(a,b){console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.");return this.toArray(a,b)},getPosition:function(){console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.");
|
|
|
-return(new p).setFromMatrixColumn(this,3)},setRotationFromQuaternion:function(a){console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().");return this.makeRotationFromQuaternion(a)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(a){console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead.");return a.applyMatrix4(this)},multiplyVector4:function(a){console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.");
|
|
|
+b){var c=b||this._root;b=c.uuid;c="string"===typeof a?Sa.findByName(c,a):a;a=this._actionsByClip[c?c.uuid:a];return void 0!==a?a.actionByRoot[b]||null:null},stopAllAction:function(){for(var a=this._actions,b=this._nActiveActions-1;0<=b;--b)a[b].stop();return this},update:function(a){a*=this.timeScale;for(var b=this._actions,c=this._nActiveActions,d=this.time+=a,e=Math.sign(a),f=this._accuIndex^=1,g=0;g!==c;++g)b[g]._update(d,a,e,f);a=this._bindings;b=this._nActiveBindings;for(g=0;g!==b;++g)a[g].apply(f);
|
|
|
+return this},setTime:function(a){for(var b=this.time=0;b<this._actions.length;b++)this._actions[b].time=0;return this.update(a)},getRoot:function(){return this._root},uncacheClip:function(a){var b=this._actions;a=a.uuid;var c=this._actionsByClip,d=c[a];if(void 0!==d){d=d.knownActions;for(var e=0,f=d.length;e!==f;++e){var g=d[e];this._deactivateAction(g);var h=g._cacheIndex,k=b[b.length-1];g._cacheIndex=null;g._byClipCacheIndex=null;k._cacheIndex=h;b[h]=k;b.pop();this._removeInactiveBindingsForAction(g)}delete c[a]}},
|
|
|
+uncacheRoot:function(a){a=a.uuid;var b=this._actionsByClip;for(d in b){var c=b[d].actionByRoot[a];void 0!==c&&(this._deactivateAction(c),this._removeInactiveAction(c))}var d=this._bindingsByRootAndName[a];if(void 0!==d)for(var e in d)a=d[e],a.restoreOriginalState(),this._removeInactiveBinding(a)},uncacheAction:function(a,b){a=this.existingAction(a,b);null!==a&&(this._deactivateAction(a),this._removeInactiveAction(a))}});vf.prototype.clone=function(){return new vf(void 0===this.value.clone?this.value:
|
|
|
+this.value.clone())};Jg.prototype=Object.assign(Object.create(sb.prototype),{constructor:Jg,isInstancedInterleavedBuffer:!0,copy:function(a){sb.prototype.copy.call(this,a);this.meshPerAttribute=a.meshPerAttribute;return this}});Object.assign(Kg.prototype,{set:function(a,b){this.ray.set(a,b)},setFromCamera:function(a,b){b&&b.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(b.matrixWorld),this.ray.direction.set(a.x,a.y,.5).unproject(b).sub(this.ray.origin).normalize(),this.camera=b):b&&b.isOrthographicCamera?
|
|
|
+(this.ray.origin.set(a.x,a.y,(b.near+b.far)/(b.near-b.far)).unproject(b),this.ray.direction.set(0,0,-1).transformDirection(b.matrixWorld),this.camera=b):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(a,b,c){c=c||[];Lg(a,this,c,b);c.sort(li);return c},intersectObjects:function(a,b,c){c=c||[];if(!1===Array.isArray(a))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),c;for(var d=0,e=a.length;d<e;d++)Lg(a[d],this,c,b);c.sort(li);return c}});
|
|
|
+Object.assign(mi.prototype,{set:function(a,b,c){this.radius=a;this.phi=b;this.theta=c;return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.radius=a.radius;this.phi=a.phi;this.theta=a.theta;return this},makeSafe:function(){this.phi=Math.max(1E-6,Math.min(Math.PI-1E-6,this.phi));return this},setFromVector3:function(a){return this.setFromCartesianCoords(a.x,a.y,a.z)},setFromCartesianCoords:function(a,b,c){this.radius=Math.sqrt(a*a+b*b+c*c);0===this.radius?this.phi=
|
|
|
+this.theta=0:(this.theta=Math.atan2(a,c),this.phi=Math.acos(M.clamp(b/this.radius,-1,1)));return this}});Object.assign(ni.prototype,{set:function(a,b,c){this.radius=a;this.theta=b;this.y=c;return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.radius=a.radius;this.theta=a.theta;this.y=a.y;return this},setFromVector3:function(a){return this.setFromCartesianCoords(a.x,a.y,a.z)},setFromCartesianCoords:function(a,b,c){this.radius=Math.sqrt(a*a+c*c);this.theta=Math.atan2(a,
|
|
|
+c);this.y=b;return this}});var Ui=new v;Object.assign(Mg.prototype,{set:function(a,b){this.min.copy(a);this.max.copy(b);return this},setFromPoints:function(a){this.makeEmpty();for(var b=0,c=a.length;b<c;b++)this.expandByPoint(a[b]);return this},setFromCenterAndSize:function(a,b){b=Ui.copy(b).multiplyScalar(.5);this.min.copy(a).sub(b);this.max.copy(a).add(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.min.copy(a.min);this.max.copy(a.max);return this},
|
|
|
+makeEmpty:function(){this.min.x=this.min.y=Infinity;this.max.x=this.max.y=-Infinity;return this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(a){void 0===a&&(console.warn("THREE.Box2: .getCenter() target is now required"),a=new v);return this.isEmpty()?a.set(0,0):a.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(a){void 0===a&&(console.warn("THREE.Box2: .getSize() target is now required"),a=new v);return this.isEmpty()?a.set(0,0):a.subVectors(this.max,
|
|
|
+this.min)},expandByPoint:function(a){this.min.min(a);this.max.max(a);return this},expandByVector:function(a){this.min.sub(a);this.max.add(a);return this},expandByScalar:function(a){this.min.addScalar(-a);this.max.addScalar(a);return this},containsPoint:function(a){return a.x<this.min.x||a.x>this.max.x||a.y<this.min.y||a.y>this.max.y?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y},getParameter:function(a,b){void 0===b&&(console.warn("THREE.Box2: .getParameter() target is now required"),
|
|
|
+b=new v);return b.set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(a){return a.max.x<this.min.x||a.min.x>this.max.x||a.max.y<this.min.y||a.min.y>this.max.y?!1:!0},clampPoint:function(a,b){void 0===b&&(console.warn("THREE.Box2: .clampPoint() target is now required"),b=new v);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(a){return Ui.copy(a).clamp(this.min,this.max).sub(a).length()},intersect:function(a){this.min.max(a.min);
|
|
|
+this.max.min(a.max);return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}});var Vi=new p,Tf=new p;Object.assign(Ng.prototype,{set:function(a,b){this.start.copy(a);this.end.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.start.copy(a.start);this.end.copy(a.end);return this},getCenter:function(a){void 0===
|
|
|
+a&&(console.warn("THREE.Line3: .getCenter() target is now required"),a=new p);return a.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(a){void 0===a&&(console.warn("THREE.Line3: .delta() target is now required"),a=new p);return a.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(a,b){void 0===b&&(console.warn("THREE.Line3: .at() target is now required"),b=
|
|
|
+new p);return this.delta(b).multiplyScalar(a).add(this.start)},closestPointToPointParameter:function(a,b){Vi.subVectors(a,this.start);Tf.subVectors(this.end,this.start);a=Tf.dot(Tf);a=Tf.dot(Vi)/a;b&&(a=M.clamp(a,0,1));return a},closestPointToPoint:function(a,b,c){a=this.closestPointToPointParameter(a,b);void 0===c&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),c=new p);return this.delta(c).multiplyScalar(a).add(this.start)},applyMatrix4:function(a){this.start.applyMatrix4(a);
|
|
|
+this.end.applyMatrix4(a);return this},equals:function(a){return a.start.equals(this.start)&&a.end.equals(this.end)}});ne.prototype=Object.create(y.prototype);ne.prototype.constructor=ne;ne.prototype.isImmediateRenderObject=!0;var Wi=new p;hd.prototype=Object.create(y.prototype);hd.prototype.constructor=hd;hd.prototype.dispose=function(){this.cone.geometry.dispose();this.cone.material.dispose()};hd.prototype.update=function(){this.light.updateMatrixWorld();var a=this.light.distance?this.light.distance:
|
|
|
+1E3,b=a*Math.tan(this.light.angle);this.cone.scale.set(b,b,a);Wi.setFromMatrixPosition(this.light.target.matrixWorld);this.cone.lookAt(Wi);void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)};var Vb=new p,Uf=new O,oh=new O;qc.prototype=Object.create(la.prototype);qc.prototype.constructor=qc;qc.prototype.isSkeletonHelper=!0;qc.prototype.updateMatrixWorld=function(a){var b=this.bones,c=this.geometry,d=c.getAttribute("position");oh.getInverse(this.root.matrixWorld);
|
|
|
+for(var e=0,f=0;e<b.length;e++){var g=b[e];g.parent&&g.parent.isBone&&(Uf.multiplyMatrices(oh,g.matrixWorld),Vb.setFromMatrixPosition(Uf),d.setXYZ(f,Vb.x,Vb.y,Vb.z),Uf.multiplyMatrices(oh,g.parent.matrixWorld),Vb.setFromMatrixPosition(Uf),d.setXYZ(f+1,Vb.x,Vb.y,Vb.z),f+=2)}c.getAttribute("position").needsUpdate=!0;y.prototype.updateMatrixWorld.call(this,a)};id.prototype=Object.create(ha.prototype);id.prototype.constructor=id;id.prototype.dispose=function(){this.geometry.dispose();this.material.dispose()};
|
|
|
+id.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)};var el=new p,Xi=new D,Yi=new D;jd.prototype=Object.create(y.prototype);jd.prototype.constructor=jd;jd.prototype.dispose=function(){this.children[0].geometry.dispose();this.children[0].material.dispose()};jd.prototype.update=function(){var a=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var b=a.geometry.getAttribute("color");Xi.copy(this.light.color);
|
|
|
+Yi.copy(this.light.groundColor);for(var c=0,d=b.count;c<d;c++){var e=c<d/2?Xi:Yi;b.setXYZ(c,e.r,e.g,e.b)}b.needsUpdate=!0}a.lookAt(el.setFromMatrixPosition(this.light.matrixWorld).negate())};wf.prototype=Object.assign(Object.create(la.prototype),{constructor:wf,copy:function(a){la.prototype.copy.call(this,a);this.geometry.copy(a.geometry);this.material.copy(a.material);return this},clone:function(){return(new this.constructor).copy(this)}});xf.prototype=Object.create(la.prototype);xf.prototype.constructor=
|
|
|
+xf;var Zi=new p,Vf=new p,$i=new p;kd.prototype=Object.create(y.prototype);kd.prototype.constructor=kd;kd.prototype.dispose=function(){this.lightPlane.geometry.dispose();this.lightPlane.material.dispose();this.targetLine.geometry.dispose();this.targetLine.material.dispose()};kd.prototype.update=function(){Zi.setFromMatrixPosition(this.light.matrixWorld);Vf.setFromMatrixPosition(this.light.target.matrixWorld);$i.subVectors(Vf,Zi);this.lightPlane.lookAt(Vf);void 0!==this.color?(this.lightPlane.material.color.set(this.color),
|
|
|
+this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color));this.targetLine.lookAt(Vf);this.targetLine.scale.z=$i.length()};var yf=new p,ea=new fb;oe.prototype=Object.create(la.prototype);oe.prototype.constructor=oe;oe.prototype.update=function(){var a=this.geometry,b=this.pointMap;ea.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse);Q("c",b,a,ea,0,0,-1);Q("t",b,a,ea,0,0,1);Q("n1",b,a,
|
|
|
+ea,-1,-1,-1);Q("n2",b,a,ea,1,-1,-1);Q("n3",b,a,ea,-1,1,-1);Q("n4",b,a,ea,1,1,-1);Q("f1",b,a,ea,-1,-1,1);Q("f2",b,a,ea,1,-1,1);Q("f3",b,a,ea,-1,1,1);Q("f4",b,a,ea,1,1,1);Q("u1",b,a,ea,.7,1.1,-1);Q("u2",b,a,ea,-.7,1.1,-1);Q("u3",b,a,ea,0,2,-1);Q("cf1",b,a,ea,-1,0,1);Q("cf2",b,a,ea,1,0,1);Q("cf3",b,a,ea,0,-1,1);Q("cf4",b,a,ea,0,1,1);Q("cn1",b,a,ea,-1,0,-1);Q("cn2",b,a,ea,1,0,-1);Q("cn3",b,a,ea,0,-1,-1);Q("cn4",b,a,ea,0,1,-1);a.getAttribute("position").needsUpdate=!0};var Wf=new Va;xb.prototype=Object.create(la.prototype);
|
|
|
+xb.prototype.constructor=xb;xb.prototype.update=function(a){void 0!==a&&console.warn("THREE.BoxHelper: .update() has no longer arguments.");void 0!==this.object&&Wf.setFromObject(this.object);if(!Wf.isEmpty()){a=Wf.min;var b=Wf.max,c=this.geometry.attributes.position,d=c.array;d[0]=b.x;d[1]=b.y;d[2]=b.z;d[3]=a.x;d[4]=b.y;d[5]=b.z;d[6]=a.x;d[7]=a.y;d[8]=b.z;d[9]=b.x;d[10]=a.y;d[11]=b.z;d[12]=b.x;d[13]=b.y;d[14]=a.z;d[15]=a.x;d[16]=b.y;d[17]=a.z;d[18]=a.x;d[19]=a.y;d[20]=a.z;d[21]=b.x;d[22]=a.y;d[23]=
|
|
|
+a.z;c.needsUpdate=!0;this.geometry.computeBoundingSphere()}};xb.prototype.setFromObject=function(a){this.object=a;this.update();return this};xb.prototype.copy=function(a){la.prototype.copy.call(this,a);this.object=a.object;return this};xb.prototype.clone=function(){return(new this.constructor).copy(this)};pe.prototype=Object.create(la.prototype);pe.prototype.constructor=pe;pe.prototype.updateMatrixWorld=function(a){var b=this.box;b.isEmpty()||(b.getCenter(this.position),b.getSize(this.scale),this.scale.multiplyScalar(.5),
|
|
|
+y.prototype.updateMatrixWorld.call(this,a))};qe.prototype=Object.create(La.prototype);qe.prototype.constructor=qe;qe.prototype.updateMatrixWorld=function(a){var b=-this.plane.constant;1E-8>Math.abs(b)&&(b=1E-8);this.scale.set(.5*this.size,.5*this.size,b);this.children[0].material.side=0>b?1:0;this.lookAt(this.plane.normal);y.prototype.updateMatrixWorld.call(this,a)};var aj=new p,zf,Og;yb.prototype=Object.create(y.prototype);yb.prototype.constructor=yb;yb.prototype.setDirection=function(a){.99999<
|
|
|
+a.y?this.quaternion.set(0,0,0,1):-.99999>a.y?this.quaternion.set(1,0,0,0):(aj.set(a.z,0,-a.x).normalize(),this.quaternion.setFromAxisAngle(aj,Math.acos(a.y)))};yb.prototype.setLength=function(a,b,c){void 0===b&&(b=.2*a);void 0===c&&(c=.2*b);this.line.scale.set(1,Math.max(1E-4,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()};yb.prototype.setColor=function(a){this.line.material.color.set(a);this.cone.material.color.set(a)};yb.prototype.copy=
|
|
|
+function(a){y.prototype.copy.call(this,a,!1);this.line.copy(a.line);this.cone.copy(a.cone);return this};yb.prototype.clone=function(){return(new this.constructor).copy(this)};re.prototype=Object.create(la.prototype);re.prototype.constructor=re;var nb=Math.pow(2,8),bj=[.125,.215,.35,.446,.526,.582],cj=5+bj.length,mb={3E3:0,3001:1,3002:2,3004:3,3005:4,3006:5,3007:6},ph=new fd,qh=function(){for(var a=[],b=[],c=[],d=8,e=0;e<cj;e++){var f=Math.pow(2,d);b.push(f);var g=1/f;4<e?g=bj[e-8+4-1]:0==e&&(g=0);
|
|
|
+c.push(g);g=1/(f-1);f=-g/2;g=1+g/2;var h=[f,f,g,f,g,g,f,f,g,g,f,g];f=new Float32Array(108);g=new Float32Array(72);for(var k=new Float32Array(36),m=0;6>m;m++){var p=m%3*2/3-1,n=2<m?0:-1;f.set([p,n,0,p+2/3,n,0,p+2/3,n+1,0,p,n,0,p+2/3,n+1,0,p,n+1,0],18*m);g.set(h,12*m);k.set([m,m,m,m,m,m],6*m)}h=new E;h.setAttribute("position",new L(f,3));h.setAttribute("uv",new L(g,2));h.setAttribute("faceIndex",new L(k,1));a.push(h);4<d&&d--}return{_lodPlanes:a,_sizeLods:b,_sigmas:c}}(),Ce=qh._lodPlanes,dj=qh._sizeLods,
|
|
|
+Xf=qh._sigmas,rh=null,zc=(1+Math.sqrt(5))/2,xd=1/zc,ej=[new p(1,1,1),new p(-1,1,1),new p(1,1,-1),new p(-1,1,-1),new p(0,zc,xd),new p(0,zc,-xd),new p(xd,0,zc),new p(-xd,0,zc),new p(zc,xd,0),new p(-zc,xd,0)];Pg.prototype={constructor:Pg,fromScene:function(a,b,c,d){void 0===b&&(b=0);void 0===c&&(c=.1);void 0===d&&(d=100);rh=this._renderer.getRenderTarget();var e=this._allocateTargets();this._sceneToCubeUV(a,c,d,e);0<b&&this._blur(e,0,0,b);this._applyPMREM(e);this._cleanup(e);return e},fromEquirectangular:function(a){a.magFilter=
|
|
|
+1003;a.minFilter=1003;a.generateMipmaps=!1;return this.fromCubemap(a)},fromCubemap:function(a){rh=this._renderer.getRenderTarget();var b=this._allocateTargets(a);this._textureToCubeUV(a,b);this._applyPMREM(b);this._cleanup(b);return b},compileCubemapShader:function(){null===this._cubemapShader&&(this._cubemapShader=ri(),this._compileMaterial(this._cubemapShader))},compileEquirectangularShader:function(){null===this._equirectShader&&(this._equirectShader=qi(),this._compileMaterial(this._equirectShader))},
|
|
|
+dispose:function(){this._blurMaterial.dispose();null!==this._cubemapShader&&this._cubemapShader.dispose();null!==this._equirectShader&&this._equirectShader.dispose();for(var a=0;a<Ce.length;a++)Ce[a].dispose()},_cleanup:function(a){this._pingPongRenderTarget.dispose();this._renderer.setRenderTarget(rh);a.scissorTest=!1;a.setSize(a.width,a.height)},_allocateTargets:function(a){var b=void 0===a||1009!==a.type?!1:3E3===a.encoding||3001===a.encoding||3007===a.encoding;b={magFilter:1003,minFilter:1003,
|
|
|
+generateMipmaps:!1,type:1009,format:1023,encoding:b?a.encoding:3002,depthBuffer:!1,stencilBuffer:!1};var c=pi(b);c.depthBuffer=a?!1:!0;this._pingPongRenderTarget=pi(b);return c},_compileMaterial:function(a){var b=new qb;b.add(new ha(Ce[0],a));this._renderer.compile(b,ph)},_sceneToCubeUV:function(a,b,c,d){b=new S(90,1,b,c);c=[1,-1,1,1,1,1];var e=[1,1,1,-1,-1,-1],f=this._renderer,g=f.outputEncoding,h=f.toneMapping,k=f.toneMappingExposure,m=f.getClearColor(),p=f.getClearAlpha();f.toneMapping=1;f.toneMappingExposure=
|
|
|
+1;f.outputEncoding=3E3;var n=a.background;if(n&&n.isColor){n.convertSRGBToLinear();var t=Math.min(Math.max(Math.ceil(Math.log2(Math.max(n.r,n.g,n.b))),-128),127);n=n.multiplyScalar(Math.pow(2,-t));f.setClearColor(n,(t+128)/255);a.background=null}for(n=0;6>n;n++)t=n%3,0==t?(b.up.set(0,c[n],0),b.lookAt(e[n],0,0)):1==t?(b.up.set(0,0,c[n]),b.lookAt(0,e[n],0)):(b.up.set(0,c[n],0),b.lookAt(0,0,e[n])),Sg(d,t*nb,2<n?nb:0,nb,nb),f.setRenderTarget(d),f.render(a,b);f.toneMapping=h;f.toneMappingExposure=k;f.outputEncoding=
|
|
|
+g;f.setClearColor(m,p)},_textureToCubeUV:function(a,b){var c=new qb,d=this._renderer;a.isCubeTexture?null==this._cubemapShader&&(this._cubemapShader=ri()):null==this._equirectShader&&(this._equirectShader=qi());var e=a.isCubeTexture?this._cubemapShader:this._equirectShader;c.add(new ha(Ce[0],e));e=e.uniforms;e.envMap.value=a;a.isCubeTexture||e.texelSize.value.set(1/a.image.width,1/a.image.height);e.inputEncoding.value=mb[a.encoding];e.outputEncoding.value=mb[b.texture.encoding];Sg(b,0,0,3*nb,2*nb);
|
|
|
+d.setRenderTarget(b);d.render(c,ph)},_applyPMREM:function(a){var b=this._renderer,c=b.autoClear;b.autoClear=!1;for(var d=1;d<cj;d++)this._blur(a,d-1,d,Math.sqrt(Xf[d]*Xf[d]-Xf[d-1]*Xf[d-1]),ej[(d-1)%ej.length]);b.autoClear=c},_blur:function(a,b,c,d,e){var f=this._pingPongRenderTarget;this._halfBlur(a,f,b,c,d,"latitudinal",e);this._halfBlur(f,a,c,c,d,"longitudinal",e)},_halfBlur:function(a,b,c,d,e,f,g){var h=this._renderer,k=this._blurMaterial;"latitudinal"!==f&&"longitudinal"!==f&&console.error("blur direction must be either latitudinal or longitudinal!");
|
|
|
+var m=new qb;m.add(new ha(Ce[d],k));k=k.uniforms;var p=dj[c]-1;p=isFinite(e)?Math.PI/(2*p):2*Math.PI/39;var n=e/p,t=isFinite(e)?1+Math.floor(3*n):20;20<t&&console.warn("sigmaRadians, "+e+", is too large and will clip, as it requested "+t+" samples when the maximum is set to 20");e=[];for(var r=0,q=0;20>q;++q){var u=q/n;u=Math.exp(-u*u/2);e.push(u);0==q?r+=u:q<t&&(r+=2*u)}for(q=0;q<e.length;q++)e[q]/=r;k.envMap.value=a.texture;k.samples.value=t;k.weights.value=e;k.latitudinal.value="latitudinal"===
|
|
|
+f;g&&(k.poleAxis.value=g);k.dTheta.value=p;k.mipInt.value=8-c;k.inputEncoding.value=mb[a.texture.encoding];k.outputEncoding.value=mb[a.texture.encoding];a=dj[d];u=3*Math.max(0,nb-2*a);Sg(b,u,(0===d?0:2*nb)+2*a*(4<d?d-8+4:0),3*a,2*a);h.setRenderTarget(b);h.render(m,ph)}};I.create=function(a,b){console.log("THREE.Curve.create() has been deprecated");a.prototype=Object.create(I.prototype);a.prototype.constructor=a;a.prototype.getPoint=b;return a};Object.assign(wb.prototype,{createPointsGeometry:function(a){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");
|
|
|
+a=this.getPoints(a);return this.createGeometry(a)},createSpacedPointsGeometry:function(a){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");a=this.getSpacedPoints(a);return this.createGeometry(a)},createGeometry:function(a){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var b=new F,c=0,d=a.length;c<d;c++){var e=a[c];b.vertices.push(new p(e.x,
|
|
|
+e.y,e.z||0))}return b}});Object.assign(bb.prototype,{fromPoints:function(a){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints().");return this.setFromPoints(a)}});si.prototype=Object.create(za.prototype);ti.prototype=Object.create(za.prototype);Tg.prototype=Object.create(za.prototype);Object.assign(Tg.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},
|
|
|
+reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}});wf.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")};qc.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")};Object.assign(V.prototype,{extractUrlBase:function(a){console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead.");
|
|
|
+return mh.extractUrlBase(a)}});V.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}};Object.assign(tf.prototype,{setTexturePath:function(a){console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath().");return this.setResourcePath(a)}});Object.assign(Mg.prototype,{center:function(a){console.warn("THREE.Box2: .center() has been renamed to .getCenter().");
|
|
|
+return this.getCenter(a)},empty:function(){console.warn("THREE.Box2: .empty() has been renamed to .isEmpty().");return this.isEmpty()},isIntersectionBox:function(a){console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().");return this.intersectsBox(a)},size:function(a){console.warn("THREE.Box2: .size() has been renamed to .getSize().");return this.getSize(a)}});Object.assign(Va.prototype,{center:function(a){console.warn("THREE.Box3: .center() has been renamed to .getCenter().");
|
|
|
+return this.getCenter(a)},empty:function(){console.warn("THREE.Box3: .empty() has been renamed to .isEmpty().");return this.isEmpty()},isIntersectionBox:function(a){console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().");return this.intersectsBox(a)},isIntersectionSphere:function(a){console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().");return this.intersectsSphere(a)},size:function(a){console.warn("THREE.Box3: .size() has been renamed to .getSize().");
|
|
|
+return this.getSize(a)}});Object.assign(eb.prototype,{empty:function(){console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty().");return this.isEmpty()}});Gc.prototype.setFromMatrix=function(a){console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix().");return this.setFromProjectionMatrix(a)};Ng.prototype.center=function(a){console.warn("THREE.Line3: .center() has been renamed to .getCenter().");return this.getCenter(a)};Object.assign(M,{random16:function(){console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead.");
|
|
|
+return Math.random()},nearestPowerOfTwo:function(a){console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo().");return M.floorPowerOfTwo(a)},nextPowerOfTwo:function(a){console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo().");return M.ceilPowerOfTwo(a)}});Object.assign(va.prototype,{flattenToArrayOffset:function(a,b){console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.");return this.toArray(a,b)},
|
|
|
+multiplyVector3:function(a){console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.");return a.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBufferAttribute:function(a){console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead.");return a.applyMatrix3(this)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}});
|
|
|
+Object.assign(O.prototype,{extractPosition:function(a){console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().");return this.copyPosition(a)},flattenToArrayOffset:function(a,b){console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.");return this.toArray(a,b)},getPosition:function(){console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.");return(new p).setFromMatrixColumn(this,
|
|
|
+3)},setRotationFromQuaternion:function(a){console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().");return this.makeRotationFromQuaternion(a)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(a){console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead.");return a.applyMatrix4(this)},multiplyVector4:function(a){console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.");
|
|
|
return a.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(a){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.");a.transformDirection(this)},crossVector:function(a){console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.");return a.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},
|
|
|
rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBufferAttribute:function(a){console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead.");return a.applyMatrix4(this)},
|
|
|
applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(a,b,c,d,e,f){console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead.");return this.makePerspective(a,b,d,c,e,f)}});Wa.prototype.isIntersectionLine=function(a){console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().");return this.intersectsLine(a)};na.prototype.multiplyVector3=
|