diff --git a/build/three.js b/build/three.js index 7fb60f4b9217aebc9ae35881f68ffb18135376de..35fe5dbd3841a14319c569a0e4dffbbdcaf489ab 100644 --- a/build/three.js +++ b/build/three.js @@ -1072,7 +1072,7 @@ set: function ( value ) { this._x = value; - this.onChangeCallback(); + this._onChangeCallback(); } @@ -1089,7 +1089,7 @@ set: function ( value ) { this._y = value; - this.onChangeCallback(); + this._onChangeCallback(); } @@ -1106,7 +1106,7 @@ set: function ( value ) { this._z = value; - this.onChangeCallback(); + this._onChangeCallback(); } @@ -1123,7 +1123,7 @@ set: function ( value ) { this._w = value; - this.onChangeCallback(); + this._onChangeCallback(); } @@ -1142,7 +1142,7 @@ this._z = z; this._w = w; - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -1161,7 +1161,7 @@ this._z = quaternion.z; this._w = quaternion.w; - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -1236,7 +1236,7 @@ } - if ( update !== false ) this.onChangeCallback(); + if ( update !== false ) this._onChangeCallback(); return this; @@ -1255,7 +1255,7 @@ this._z = axis.z * s; this._w = Math.cos( halfAngle ); - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -1314,7 +1314,7 @@ } - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -1397,7 +1397,7 @@ this._y *= - 1; this._z *= - 1; - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -1443,7 +1443,7 @@ } - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -1480,7 +1480,7 @@ this._z = qaz * qbw + qaw * qbz + qax * qby - qay * qbx; this._w = qaw * qbw - qax * qbx - qay * qby - qaz * qbz; - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -1547,7 +1547,7 @@ this._y = ( y * ratioA + this._y * ratioB ); this._z = ( z * ratioA + this._z * ratioB ); - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -1568,7 +1568,7 @@ this._z = array[ offset + 2 ]; this._w = array[ offset + 3 ]; - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -1588,15 +1588,15 @@ }, - onChange: function ( callback ) { + _onChange: function ( callback ) { - this.onChangeCallback = callback; + this._onChangeCallback = callback; return this; }, - onChangeCallback: function () {} + _onChangeCallback: function () {} } ); @@ -3089,6 +3089,42 @@ } + Object.defineProperties( Vector4.prototype, { + + "width": { + + get: function () { + + return this.z; + + }, + + set: function ( value ) { + + this.z = value; + + } + + }, + + "height": { + + get: function () { + + return this.w; + + }, + + set: function ( value ) { + + this.w = value; + + } + + } + + } ); + Object.assign( Vector4.prototype, { isVector4: true, @@ -7915,7 +7951,7 @@ set: function ( value ) { this._x = value; - this.onChangeCallback(); + this._onChangeCallback(); } @@ -7932,7 +7968,7 @@ set: function ( value ) { this._y = value; - this.onChangeCallback(); + this._onChangeCallback(); } @@ -7949,7 +7985,7 @@ set: function ( value ) { this._z = value; - this.onChangeCallback(); + this._onChangeCallback(); } @@ -7966,7 +8002,7 @@ set: function ( value ) { this._order = value; - this.onChangeCallback(); + this._onChangeCallback(); } @@ -7985,7 +8021,7 @@ this._z = z; this._order = order || this._order; - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -8004,7 +8040,7 @@ this._z = euler._z; this._order = euler._order; - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -8127,7 +8163,7 @@ this._order = order; - if ( update !== false ) this.onChangeCallback(); + if ( update !== false ) this._onChangeCallback(); return this; @@ -8182,7 +8218,7 @@ this._z = array[ 2 ]; if ( array[ 3 ] !== undefined ) this._order = array[ 3 ]; - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -8216,15 +8252,15 @@ }, - onChange: function ( callback ) { + _onChange: function ( callback ) { - this.onChangeCallback = callback; + this._onChangeCallback = callback; return this; }, - onChangeCallback: function () {} + _onChangeCallback: function () {} } ); @@ -8313,8 +8349,8 @@ } - rotation.onChange( onRotationChange ); - quaternion.onChange( onQuaternionChange ); + rotation._onChange( onRotationChange ); + quaternion._onChange( onQuaternionChange ); Object.defineProperties( this, { position: { @@ -20699,7 +20735,7 @@ _gl.pixelStorei( 37440, texture.flipY ); - var isCompressed = ( texture.image[ 0 ] && texture.image[ 0 ].isCompressedTexture ); + var isCompressed = ( texture && texture.isCompressedTexture ); var isDataTexture = ( texture.image[ 0 ] && texture.image[ 0 ].isDataTexture ); var cubeImage = []; diff --git a/build/three.min.js b/build/three.min.js index 41b20c7dffed74847f1def5d451db3f18f930711..7dacbd0a2c08aebde1fc506ccbaa55439f22d920 100644 --- a/build/three.min.js +++ b/build/three.min.js @@ -1,7 +1,7 @@ // threejs.org/license (function(l,ra){"object"===typeof exports&&"undefined"!==typeof module?ra(exports):"function"===typeof define&&define.amd?define(["exports"],ra):(l=l||self,ra(l.THREE={}))})(this,function(l){function ra(){}function C(a,b){this.x=a||0;this.y=b||0}function fa(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._w=void 0!==d?d:1}function n(a,b,c){this.x=a||0;this.y=b||0;this.z=c||0}function ia(){this.elements=[1,0,0,0,1,0,0,0,1];0e;e++)a.deleteFramebuffer(c.__webglFramebuffer[e]),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer[e]); else a.deleteFramebuffer(c.__webglFramebuffer),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer);d.remove(b.texture);d.remove(b)}g.memory.textures--}function n(a,b){var e=d.get(a);if(a.isVideoTexture){var f=a.id,h=g.render.frame;jb[f]!==h&&(jb[f]=h,a.update())}if(0q;q++)t[q]=g||l?l?b.image[q].image:b.image[q]:k(b.image[q],!1,!0,e.maxCubemapSize);var u=t[0],n=m(u)||e.isWebGL2,x=f.convert(b.format), -w=f.convert(b.type),R=v(x,w);y(34067,b,n);for(q=0;6>q;q++)if(g)for(var G,z=t[q].mipmaps,na=0,F=z.length;naq;q++)t[q]=g||l?l?b.image[q].image:b.image[q]:k(b.image[q],!1,!0,e.maxCubemapSize);var u=t[0],n=m(u)||e.isWebGL2,x=f.convert(b.format),w=f.convert(b.type), +R=v(x,w);y(34067,b,n);for(q=0;6>q;q++)if(g)for(var G,z=t[q].mipmaps,na=0,F=z.length;naf.matrixWorld.determinant();da.setMaterial(e,h);var k=l(a,c,e,f),m=!1;if(b!==d.id||P!==k.id||S!==(!0===e.wireframe))b=d.id,P=k.id,S=!0===e.wireframe,m=!0;f.morphTargetInfluences&&(Aa.update(f,d,e,k),m=!0);h=d.index;var r=d.attributes.position;c=1;!0===e.wireframe&&(h=wa.getWireframeAttribute(d),c=2);a=Ba;if(null!==h){var p=va.get(h);a=Da;a.setIndex(p)}if(m){if(d&&d.isInstancedBufferGeometry&&!Fa.isWebGL2&&null===ma.get("ANGLE_instanced_arrays"))console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays."); else{da.initAttributes();m=d.attributes;k=k.getAttributes();var v=e.defaultAttributeValues;for(A in k){var q=k[A];if(0<=q){var t=m[A];if(void 0!==t){var n=t.normalized,u=t.itemSize,x=va.get(t);if(void 0!==x){var w=x.buffer,y=x.type;x=x.bytesPerElement;if(t.isInterleavedBufferAttribute){var G=t.data,z=G.stride;t=t.offset;G&&G.isInstancedInterleavedBuffer?(da.enableAttributeAndDivisor(q,G.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=G.meshPerAttribute*G.count)):da.enableAttribute(q); @@ -199,16 +199,16 @@ h&&N.bindBuffer(34963,p.buffer)}p=Infinity;null!==h?p=h.count:void 0!==r&&(p=r.c b);else p(b.material,a.fog,b)})};var Ca=null,za=new ie;za.setAnimationLoop(function(a){pa.isPresenting()||Ca&&Ca(a)});"undefined"!==typeof window&&za.setContext(window);this.setAnimationLoop=function(a){Ca=a;pa.setAnimationLoop(a);za.start()};this.render=function(a,c,d,e){if(void 0!==d){console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead.");var f=d}if(void 0!==e){console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead."); var g=e}c&&c.isCamera?O||(P=b=null,S=!1,bb=-1,Q=null,!0===a.autoUpdate&&a.updateMatrixWorld(),null===c.parent&&c.updateMatrixWorld(),pa.enabled&&(c=pa.getCamera(c)),B=ta.get(a,c),B.init(),a.onBeforeRender(X,a,c,f||I),Kc.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse),ea.setFromMatrix(Kc),ua=this.localClippingEnabled,Cd=Ia.init(this.clippingPlanes,ua,c),E=xa.get(a,c),E.init(),k(a,c,0,X.sortObjects),!0===X.sortObjects&&E.sort(),Cd&&Ia.beginShadows(),Ea.render(B.state.shadowsArray,a,c),B.setupLights(c), Cd&&Ia.endShadows(),this.info.autoReset&&this.info.reset(),void 0!==f&&this.setRenderTarget(f),oa.render(E,a,c,g),d=E.opaque,e=E.transparent,a.overrideMaterial?(f=a.overrideMaterial,d.length&&m(d,a,c,f),e.length&&m(e,a,c,f)):(d.length&&m(d,a,c),e.length&&m(e,a,c)),a.onAfterRender(X,a,c),null!==I&&(ba.updateRenderTargetMipmap(I),ba.updateMultisampleRenderTarget(I)),da.buffers.depth.setTest(!0),da.buffers.depth.setMask(!0),da.buffers.color.setMask(!0),da.setPolygonOffset(!1),pa.enabled&&pa.submitFrame(), -B=E=null):console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")};this.setFramebuffer=function(a){M!==a&&N.bindFramebuffer(36160,a);M=a};this.getActiveCubeFace=function(){return na};this.getActiveMipMapLevel=function(){return R};this.getRenderTarget=function(){return I};this.setRenderTarget=function(a,b,c){I=a;na=b;R=c;a&&void 0===Y.get(a).__webglFramebuffer&&ba.setupRenderTarget(a);var d=M,e=!1;a?(d=Y.get(a).__webglFramebuffer,a.isWebGLRenderTargetCube?(d=d[b||0], -e=!0):d=a.isWebGLMultisampleRenderTarget?Y.get(a).__webglMultisampledFramebuffer:d,W.copy(a.viewport),aa.copy(a.scissor),ja=a.scissorTest):(W.copy(fa).multiplyScalar(ca),aa.copy(ia).multiplyScalar(ca),ja=sa);yb!==d&&(N.bindFramebuffer(36160,d),yb=d);da.viewport(W);da.scissor(aa);da.setScissorTest(ja);e&&(a=Y.get(a.texture),N.framebufferTexture2D(36160,36064,34069+(b||0),a.__webglTexture,c||0))};this.readRenderTargetPixels=function(a,b,c,d,e,f,g){if(a&&a.isWebGLRenderTarget){var h=Y.get(a).__webglFramebuffer; +B=E=null):console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")};this.setFramebuffer=function(a){M!==a&&N.bindFramebuffer(36160,a);M=a};this.getActiveCubeFace=function(){return na};this.getActiveMipMapLevel=function(){return R};this.getRenderTarget=function(){return I};this.setRenderTarget=function(a,b,c){I=a;na=b;R=c;a&&void 0===Z.get(a).__webglFramebuffer&&ba.setupRenderTarget(a);var d=M,e=!1;a?(d=Z.get(a).__webglFramebuffer,a.isWebGLRenderTargetCube?(d=d[b||0], +e=!0):d=a.isWebGLMultisampleRenderTarget?Z.get(a).__webglMultisampledFramebuffer:d,W.copy(a.viewport),aa.copy(a.scissor),ja=a.scissorTest):(W.copy(fa).multiplyScalar(ca),aa.copy(ia).multiplyScalar(ca),ja=sa);yb!==d&&(N.bindFramebuffer(36160,d),yb=d);da.viewport(W);da.scissor(aa);da.setScissorTest(ja);e&&(a=Z.get(a.texture),N.framebufferTexture2D(36160,36064,34069+(b||0),a.__webglTexture,c||0))};this.readRenderTargetPixels=function(a,b,c,d,e,f,g){if(a&&a.isWebGLRenderTarget){var h=Z.get(a).__webglFramebuffer; a.isWebGLRenderTargetCube&&void 0!==g&&(h=h[g]);if(h){g=!1;h!==yb&&(N.bindFramebuffer(36160,h),g=!0);try{var k=a.texture,m=k.format,r=k.type;1023!==m&&la.convert(m)!==N.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===r||la.convert(r)===N.getParameter(35738)||1015===r&&(Fa.isWebGL2||ma.get("OES_texture_float")||ma.get("WEBGL_color_buffer_float"))||1016===r&&(Fa.isWebGL2?ma.get("EXT_color_buffer_float"): ma.get("EXT_color_buffer_half_float"))?36053===N.checkFramebufferStatus(36160)?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&N.readPixels(b,c,d,e,la.convert(m),la.convert(r),f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{g&&N.bindFramebuffer(36160,yb)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")}; this.copyFramebufferToTexture=function(a,b,c){var d=b.image.width,e=b.image.height,f=la.convert(b.format);ba.setTexture2D(b,0);N.copyTexImage2D(3553,c||0,f,a.x,a.y,d,e,0)};this.copyTextureToTexture=function(a,b,c,d){var e=b.image.width,f=b.image.height,g=la.convert(c.format),h=la.convert(c.type);ba.setTexture2D(c,0);b.isDataTexture?N.texSubImage2D(3553,d||0,a.x,a.y,e,f,g,h,b.image.data):N.texSubImage2D(3553,d||0,a.x,a.y,g,h,b.image)}}function Dd(a,b){this.name="";this.color=new B(a);this.density= void 0!==b?b:2.5E-4}function Ed(a,b,c){this.name="";this.color=new B(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3}function Fd(){H.call(this);this.type="Scene";this.overrideMaterial=this.fog=this.background=null;this.autoUpdate=!0}function Bb(a,b){this.array=a;this.stride=b;this.count=void 0!==a?a.length/b:0;this.dynamic=!1;this.updateRange={offset:0,count:-1};this.version=0}function Mc(a,b,c,d){this.data=a;this.itemSize=b;this.offset=c;this.normalized=!0===d}function ob(a){I.call(this);this.type= "SpriteMaterial";this.color=new B(16777215);this.map=null;this.rotation=0;this.sizeAttenuation=!0;this.lights=!1;this.transparent=!0;this.setValues(a)}function Nc(a){H.call(this);this.type="Sprite";if(void 0===Zb){Zb=new E;var b=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]);b=new Bb(b,5);Zb.setIndex([0,1,2,0,2,3]);Zb.addAttribute("position",new Mc(b,3,0,!1));Zb.addAttribute("uv",new Mc(b,2,3,!1))}this.geometry=Zb;this.material=void 0!==a?a:new ob;this.center=new C(.5,.5)} function Oc(){H.call(this);this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Pc(a,b){a&&a.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");ha.call(this,a,b);this.type="SkinnedMesh";this.bindMode="attached";this.bindMatrix=new L;this.bindMatrixInverse=new L}function Gd(a,b){a=a||[];this.bones=a.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);if(void 0===b)this.calculateInverses(); -else if(this.bones.length===b.length)this.boneInverses=b.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],a=0,b=this.bones.length;ac;c++){var p=r[h[c]];var l=r[h[(c+1)%3]];f[0]=Math.min(p,l);f[1]=Math.max(p,l);p=f[0]+","+f[1];void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]})}}for(p in g)m=g[p],h=a.vertices[m.index1],b.push(h.x,h.y,h.z),h=a.vertices[m.index2],b.push(h.x,h.y,h.z)}else if(a&&a.isBufferGeometry)if(h=new n,null!==a.index){k=a.attributes.position;r=a.index;var t=a.groups;0===t.length&&(t=[{start:0,count:r.count,materialIndex:0}]);a=0;for(e=t.length;a=e)return new C(f,d);e=Math.sqrt(e/2)}else a=!1,d>Number.EPSILON?f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(f=-e,e=Math.sqrt(h)):(f=d,d=e,e=Math.sqrt(h/2));return new C(f/e,d/e)}function h(a,b){for(K=a.length;0<=--K;){var c=K;var f=K-1;0>f&&(f=a.length-1);var g,h=w+2*F;for(g=0;gc;c++,d++){var e=c/32*Math.PI*2,f=d/32*Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.addAttribute("position",new D(b,3));b=new Q({fog:!1});this.cone=new W(a,b);this.add(this.cone);this.update()}function Uf(a){var b=[];a&&a.isBone&&b.push(a);for(var c=0;ca?-1:0a&&(a+=2*Math.PI);return a},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b= this.x-a.x;a=this.y-a.y;return b*b+a*a},manhattanDistanceTo:function(a){return Math.abs(this.x-a.x)+Math.abs(this.y-a.y)},setLength:function(a){return this.normalize().multiplyScalar(a)},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];return this},toArray:function(a, b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute().");this.x=a.getX(b);this.y=a.getY(b);return this},rotateAround:function(a,b){var c=Math.cos(b);b=Math.sin(b);var d=this.x-a.x,e=this.y-a.y;this.x=d*c-e*b+a.x;this.y=d*b+e*c+a.y;return this}});Object.assign(fa,{slerp:function(a,b,c,d){return c.copy(a).slerp(b,d)},slerpFlat:function(a,b,c,d,e,f,g){var h= -c[d+0],k=c[d+1],m=c[d+2];c=c[d+3];d=e[f+0];var l=e[f+1],p=e[f+2];e=e[f+3];if(c!==e||h!==d||k!==l||m!==p){f=1-g;var n=h*d+k*l+m*p+c*e,t=0<=n?1:-1,q=1-n*n;q>Number.EPSILON&&(q=Math.sqrt(q),n=Math.atan2(q,n*t),f=Math.sin(f*n)/q,g=Math.sin(g*n)/q);t*=g;h=h*f+d*t;k=k*f+l*t;m=m*f+p*t;c=c*f+e*t;f===1-g&&(g=1/Math.sqrt(h*h+k*k+m*m+c*c),h*=g,k*=g,m*=g,c*=g)}a[b]=h;a[b+1]=k;a[b+2]=m;a[b+3]=c}});Object.defineProperties(fa.prototype,{x:{get:function(){return this._x},set:function(a){this._x=a;this.onChangeCallback()}}, -y:{get:function(){return this._y},set:function(a){this._y=a;this.onChangeCallback()}},z:{get:function(){return this._z},set:function(a){this._z=a;this.onChangeCallback()}},w:{get:function(){return this._w},set:function(a){this._w=a;this.onChangeCallback()}}});Object.assign(fa.prototype,{isQuaternion:!0,set:function(a,b,c,d){this._x=a;this._y=b;this._z=c;this._w=d;this.onChangeCallback();return this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(a){this._x= -a.x;this._y=a.y;this._z=a.z;this._w=a.w;this.onChangeCallback();return this},setFromEuler:function(a,b){if(!a||!a.isEuler)throw Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var c=a._x,d=a._y,e=a._z;a=a.order;var f=Math.cos,g=Math.sin,h=f(c/2),k=f(d/2);f=f(e/2);c=g(c/2);d=g(d/2);e=g(e/2);"XYZ"===a?(this._x=c*k*f+h*d*e,this._y=h*d*f-c*k*e,this._z=h*k*e+c*d*f,this._w=h*k*f-c*d*e):"YXZ"===a?(this._x=c*k*f+h*d*e,this._y=h*d*f-c*k*e,this._z=h* -k*e-c*d*f,this._w=h*k*f+c*d*e):"ZXY"===a?(this._x=c*k*f-h*d*e,this._y=h*d*f+c*k*e,this._z=h*k*e+c*d*f,this._w=h*k*f-c*d*e):"ZYX"===a?(this._x=c*k*f-h*d*e,this._y=h*d*f+c*k*e,this._z=h*k*e-c*d*f,this._w=h*k*f+c*d*e):"YZX"===a?(this._x=c*k*f+h*d*e,this._y=h*d*f+c*k*e,this._z=h*k*e-c*d*f,this._w=h*k*f-c*d*e):"XZY"===a&&(this._x=c*k*f-h*d*e,this._y=h*d*f-c*k*e,this._z=h*k*e+c*d*f,this._w=h*k*f+c*d*e);if(!1!==b)this.onChangeCallback();return this},setFromAxisAngle:function(a,b){b/=2;var c=Math.sin(b); -this._x=a.x*c;this._y=a.y*c;this._z=a.z*c;this._w=Math.cos(b);this.onChangeCallback();return this},setFromRotationMatrix:function(a){var b=a.elements,c=b[0];a=b[4];var d=b[8],e=b[1],f=b[5],g=b[9],h=b[2],k=b[6];b=b[10];var m=c+f+b;0f&&c>b?(c=2*Math.sqrt(1+c-f-b),this._w=(k-g)/c,this._x=.25*c,this._y=(a+e)/c,this._z=(d+h)/c):f>b?(c=2*Math.sqrt(1+f-c-b),this._w=(d-h)/c,this._x=(a+e)/c,this._y=.25*c,this._z=(g+k)/ -c):(c=2*Math.sqrt(1+b-c-f),this._w=(e-a)/c,this._x=(d+h)/c,this._y=(g+k)/c,this._z=.25*c);this.onChangeCallback();return this},setFromUnitVectors:function(a,b){var c=a.dot(b)+1;1E-6>c?(c=0,Math.abs(a.x)>Math.abs(a.z)?(this._x=-a.y,this._y=a.x,this._z=0):(this._x=0,this._y=-a.z,this._z=a.y)):(this._x=a.y*b.z-a.z*b.y,this._y=a.z*b.x-a.x*b.z,this._z=a.x*b.y-a.y*b.x);this._w=c;return this.normalize()},angleTo:function(a){return 2*Math.acos(Math.abs(T.clamp(this.dot(a),-1,1)))},rotateTowards:function(a, -b){var c=this.angleTo(a);if(0===c)return this;this.slerp(a,Math.min(1,b/c));return this},inverse:function(){return this.conjugate()},conjugate:function(){this._x*=-1;this._y*=-1;this._z*=-1;this.onChangeCallback();return this},dot:function(a){return this._x*a._x+this._y*a._y+this._z*a._z+this._w*a._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var a= -this.length();0===a?(this._z=this._y=this._x=0,this._w=1):(a=1/a,this._x*=a,this._y*=a,this._z*=a,this._w*=a);this.onChangeCallback();return this},multiply:function(a,b){return void 0!==b?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(a,b)):this.multiplyQuaternions(this,a)},premultiply:function(a){return this.multiplyQuaternions(a,this)},multiplyQuaternions:function(a,b){var c=a._x,d=a._y,e=a._z;a=a._w; -var f=b._x,g=b._y,h=b._z;b=b._w;this._x=c*b+a*f+d*h-e*g;this._y=d*b+a*g+e*f-c*h;this._z=e*b+a*h+c*g-d*f;this._w=a*b-c*f-d*g-e*h;this.onChangeCallback();return this},slerp:function(a,b){if(0===b)return this;if(1===b)return this.copy(a);var c=this._x,d=this._y,e=this._z,f=this._w,g=f*a._w+c*a._x+d*a._y+e*a._z;0>g?(this._w=-a._w,this._x=-a._x,this._y=-a._y,this._z=-a._z,g=-g):this.copy(a);if(1<=g)return this._w=f,this._x=c,this._y=d,this._z=e,this;a=1-g*g;if(a<=Number.EPSILON)return g=1-b,this._w=g* -f+b*this._w,this._x=g*c+b*this._x,this._y=g*d+b*this._y,this._z=g*e+b*this._z,this.normalize();a=Math.sqrt(a);var h=Math.atan2(a,g);g=Math.sin((1-b)*h)/a;b=Math.sin(b*h)/a;this._w=f*g+this._w*b;this._x=c*g+this._x*b;this._y=d*g+this._y*b;this._z=e*g+this._z*b;this.onChangeCallback();return this},equals:function(a){return a._x===this._x&&a._y===this._y&&a._z===this._z&&a._w===this._w},fromArray:function(a,b){void 0===b&&(b=0);this._x=a[b];this._y=a[b+1];this._z=a[b+2];this._w=a[b+3];this.onChangeCallback(); -return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this._x;a[b+1]=this._y;a[b+2]=this._z;a[b+3]=this._w;return a},onChange:function(a){this.onChangeCallback=a;return this},onChangeCallback:function(){}});Object.assign(n.prototype,{isVector3:!0,set:function(a,b,c){this.x=a;this.y=b;this.z=c;return this},setScalar:function(a){this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this}, +c[d+0],k=c[d+1],m=c[d+2];c=c[d+3];d=e[f+0];var l=e[f+1],p=e[f+2];e=e[f+3];if(c!==e||h!==d||k!==l||m!==p){f=1-g;var n=h*d+k*l+m*p+c*e,t=0<=n?1:-1,q=1-n*n;q>Number.EPSILON&&(q=Math.sqrt(q),n=Math.atan2(q,n*t),f=Math.sin(f*n)/q,g=Math.sin(g*n)/q);t*=g;h=h*f+d*t;k=k*f+l*t;m=m*f+p*t;c=c*f+e*t;f===1-g&&(g=1/Math.sqrt(h*h+k*k+m*m+c*c),h*=g,k*=g,m*=g,c*=g)}a[b]=h;a[b+1]=k;a[b+2]=m;a[b+3]=c}});Object.defineProperties(fa.prototype,{x:{get:function(){return this._x},set:function(a){this._x=a;this._onChangeCallback()}}, +y:{get:function(){return this._y},set:function(a){this._y=a;this._onChangeCallback()}},z:{get:function(){return this._z},set:function(a){this._z=a;this._onChangeCallback()}},w:{get:function(){return this._w},set:function(a){this._w=a;this._onChangeCallback()}}});Object.assign(fa.prototype,{isQuaternion:!0,set:function(a,b,c,d){this._x=a;this._y=b;this._z=c;this._w=d;this._onChangeCallback();return this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(a){this._x= +a.x;this._y=a.y;this._z=a.z;this._w=a.w;this._onChangeCallback();return this},setFromEuler:function(a,b){if(!a||!a.isEuler)throw Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var c=a._x,d=a._y,e=a._z;a=a.order;var f=Math.cos,g=Math.sin,h=f(c/2),k=f(d/2);f=f(e/2);c=g(c/2);d=g(d/2);e=g(e/2);"XYZ"===a?(this._x=c*k*f+h*d*e,this._y=h*d*f-c*k*e,this._z=h*k*e+c*d*f,this._w=h*k*f-c*d*e):"YXZ"===a?(this._x=c*k*f+h*d*e,this._y=h*d*f-c*k*e,this._z= +h*k*e-c*d*f,this._w=h*k*f+c*d*e):"ZXY"===a?(this._x=c*k*f-h*d*e,this._y=h*d*f+c*k*e,this._z=h*k*e+c*d*f,this._w=h*k*f-c*d*e):"ZYX"===a?(this._x=c*k*f-h*d*e,this._y=h*d*f+c*k*e,this._z=h*k*e-c*d*f,this._w=h*k*f+c*d*e):"YZX"===a?(this._x=c*k*f+h*d*e,this._y=h*d*f+c*k*e,this._z=h*k*e-c*d*f,this._w=h*k*f-c*d*e):"XZY"===a&&(this._x=c*k*f-h*d*e,this._y=h*d*f-c*k*e,this._z=h*k*e+c*d*f,this._w=h*k*f+c*d*e);!1!==b&&this._onChangeCallback();return this},setFromAxisAngle:function(a,b){b/=2;var c=Math.sin(b); +this._x=a.x*c;this._y=a.y*c;this._z=a.z*c;this._w=Math.cos(b);this._onChangeCallback();return this},setFromRotationMatrix:function(a){var b=a.elements,c=b[0];a=b[4];var d=b[8],e=b[1],f=b[5],g=b[9],h=b[2],k=b[6];b=b[10];var m=c+f+b;0f&&c>b?(c=2*Math.sqrt(1+c-f-b),this._w=(k-g)/c,this._x=.25*c,this._y=(a+e)/c,this._z=(d+h)/c):f>b?(c=2*Math.sqrt(1+f-c-b),this._w=(d-h)/c,this._x=(a+e)/c,this._y=.25*c,this._z=(g+k)/ +c):(c=2*Math.sqrt(1+b-c-f),this._w=(e-a)/c,this._x=(d+h)/c,this._y=(g+k)/c,this._z=.25*c);this._onChangeCallback();return this},setFromUnitVectors:function(a,b){var c=a.dot(b)+1;1E-6>c?(c=0,Math.abs(a.x)>Math.abs(a.z)?(this._x=-a.y,this._y=a.x,this._z=0):(this._x=0,this._y=-a.z,this._z=a.y)):(this._x=a.y*b.z-a.z*b.y,this._y=a.z*b.x-a.x*b.z,this._z=a.x*b.y-a.y*b.x);this._w=c;return this.normalize()},angleTo:function(a){return 2*Math.acos(Math.abs(T.clamp(this.dot(a),-1,1)))},rotateTowards:function(a, +b){var c=this.angleTo(a);if(0===c)return this;this.slerp(a,Math.min(1,b/c));return this},inverse:function(){return this.conjugate()},conjugate:function(){this._x*=-1;this._y*=-1;this._z*=-1;this._onChangeCallback();return this},dot:function(a){return this._x*a._x+this._y*a._y+this._z*a._z+this._w*a._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var a= +this.length();0===a?(this._z=this._y=this._x=0,this._w=1):(a=1/a,this._x*=a,this._y*=a,this._z*=a,this._w*=a);this._onChangeCallback();return this},multiply:function(a,b){return void 0!==b?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(a,b)):this.multiplyQuaternions(this,a)},premultiply:function(a){return this.multiplyQuaternions(a,this)},multiplyQuaternions:function(a,b){var c=a._x,d=a._y,e=a._z;a=a._w; +var f=b._x,g=b._y,h=b._z;b=b._w;this._x=c*b+a*f+d*h-e*g;this._y=d*b+a*g+e*f-c*h;this._z=e*b+a*h+c*g-d*f;this._w=a*b-c*f-d*g-e*h;this._onChangeCallback();return this},slerp:function(a,b){if(0===b)return this;if(1===b)return this.copy(a);var c=this._x,d=this._y,e=this._z,f=this._w,g=f*a._w+c*a._x+d*a._y+e*a._z;0>g?(this._w=-a._w,this._x=-a._x,this._y=-a._y,this._z=-a._z,g=-g):this.copy(a);if(1<=g)return this._w=f,this._x=c,this._y=d,this._z=e,this;a=1-g*g;if(a<=Number.EPSILON)return g=1-b,this._w=g* +f+b*this._w,this._x=g*c+b*this._x,this._y=g*d+b*this._y,this._z=g*e+b*this._z,this.normalize();a=Math.sqrt(a);var h=Math.atan2(a,g);g=Math.sin((1-b)*h)/a;b=Math.sin(b*h)/a;this._w=f*g+this._w*b;this._x=c*g+this._x*b;this._y=d*g+this._y*b;this._z=e*g+this._z*b;this._onChangeCallback();return this},equals:function(a){return a._x===this._x&&a._y===this._y&&a._z===this._z&&a._w===this._w},fromArray:function(a,b){void 0===b&&(b=0);this._x=a[b];this._y=a[b+1];this._z=a[b+2];this._w=a[b+3];this._onChangeCallback(); +return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this._x;a[b+1]=this._y;a[b+2]=this._z;a[b+3]=this._w;return a},_onChange:function(a){this._onChangeCallback=a;return this},_onChangeCallback:function(){}});Object.assign(n.prototype,{isVector3:!0,set:function(a,b,c){this.x=a;this.y=b;this.z=c;return this},setScalar:function(a){this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this}, setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;case 2:this.z=b;break;default:throw Error("index is out of range: "+a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."), this.addVectors(a,b);this.x+=a.x;this.y+=a.y;this.z+=a.z;return this},addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;this.z+=a.z*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;this.z-=a.z; return this},subScalar:function(a){this.x-=a;this.y-=a;this.z-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;return this},multiply:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(a,b);this.x*=a.x;this.y*=a.y;this.z*=a.z;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;this.z*=a;return this},multiplyVectors:function(a,b){this.x=a.x* @@ -366,21 +366,21 @@ return a}});var Ac,rb={getDataURL:function(a){if("undefined"==typeof HTMLCanvasE a.anisotropy;this.format=a.format;this.type=a.type;this.offset.copy(a.offset);this.repeat.copy(a.repeat);this.center.copy(a.center);this.rotation=a.rotation;this.matrixAutoUpdate=a.matrixAutoUpdate;this.matrix.copy(a.matrix);this.generateMipmaps=a.generateMipmaps;this.premultiplyAlpha=a.premultiplyAlpha;this.flipY=a.flipY;this.unpackAlignment=a.unpackAlignment;this.encoding=a.encoding;return this},toJSON:function(a){var b=void 0===a||"string"===typeof a;if(!b&&void 0!==a.textures[this.uuid])return a.textures[this.uuid]; var c={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment}; if(void 0!==this.image){var d=this.image;void 0===d.uuid&&(d.uuid=T.generateUUID());if(!b&&void 0===a.images[d.uuid]){if(Array.isArray(d)){var e=[];for(var f=0,g=d.length;fa.x||1a.x?0:1;break;case 1002:a.x=1===Math.abs(Math.floor(a.x)%2)?Math.ceil(a.x)-a.x:a.x-Math.floor(a.x)}if(0>a.y||1a.y?0:1;break;case 1002:a.y=1===Math.abs(Math.floor(a.y)%2)?Math.ceil(a.y)-a.y:a.y-Math.floor(a.y)}this.flipY&&(a.y=1-a.y);return a}});Object.defineProperty(U.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(Z.prototype,{isVector4:!0,set:function(a, -b,c,d){this.x=a;this.y=b;this.z=c;this.w=d;return this},setScalar:function(a){this.w=this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},setW:function(a){this.w=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;case 2:this.z=b;break;case 3:this.w=b;break;default:throw Error("index is out of range: "+a);}return this},getComponent:function(a){switch(a){case 0:return this.x; -case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.w=void 0!==a.w?a.w:1;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;this.z+=a.z;this.w+=a.w;return this}, -addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;this.w+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;this.w=a.w+b.w;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;this.z+=a.z*b;this.w+=a.w*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;this.z-=a.z;this.w-=a.w;return this},subScalar:function(a){this.x-= -a;this.y-=a;this.z-=a;this.w-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;this.w=a.w-b.w;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;this.z*=a;this.w*=a;return this},applyMatrix4:function(a){var b=this.x,c=this.y,d=this.z,e=this.w;a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d+a[12]*e;this.y=a[1]*b+a[5]*c+a[9]*d+a[13]*e;this.z=a[2]*b+a[6]*c+a[10]*d+a[14]*e;this.w=a[3]*b+a[7]*c+a[11]*d+a[15]*e;return this},divideScalar:function(a){return this.multiplyScalar(1/ -a)},setAxisAngleFromQuaternion:function(a){this.w=2*Math.acos(a.w);var b=Math.sqrt(1-a.w*a.w);1E-4>b?(this.x=1,this.z=this.y=0):(this.x=a.x/b,this.y=a.y/b,this.z=a.z/b);return this},setAxisAngleFromRotationMatrix:function(a){a=a.elements;var b=a[0];var c=a[4];var d=a[8],e=a[1],f=a[5],g=a[9];var h=a[2];var k=a[6];var m=a[10];if(.01>Math.abs(c-e)&&.01>Math.abs(d-h)&&.01>Math.abs(g-k)){if(.1>Math.abs(c+e)&&.1>Math.abs(d+h)&&.1>Math.abs(g+k)&&.1>Math.abs(b+f+m-3))return this.set(1,0,0,0),this;a=Math.PI; -b=(b+1)/2;f=(f+1)/2;m=(m+1)/2;c=(c+e)/4;d=(d+h)/4;g=(g+k)/4;b>f&&b>m?.01>b?(k=0,c=h=.707106781):(k=Math.sqrt(b),h=c/k,c=d/k):f>m?.01>f?(k=.707106781,h=0,c=.707106781):(h=Math.sqrt(f),k=c/h,c=g/h):.01>m?(h=k=.707106781,c=0):(c=Math.sqrt(m),k=d/c,h=g/c);this.set(k,h,c,a);return this}a=Math.sqrt((k-g)*(k-g)+(d-h)*(d-h)+(e-c)*(e-c));.001>Math.abs(a)&&(a=1);this.x=(k-g)/a;this.y=(d-h)/a;this.z=(e-c)/a;this.w=Math.acos((b+f+m-1)/2);return this},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y, -a.y);this.z=Math.min(this.z,a.z);this.w=Math.min(this.w,a.w);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.z=Math.max(this.z,a.z);this.w=Math.max(this.w,a.w);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));this.z=Math.max(a.z,Math.min(b.z,this.z));this.w=Math.max(a.w,Math.min(b.w,this.w));return this},clampScalar:function(){var a,b;return function(c,d){void 0===a&&(a=new Z,b=new Z);a.set(c, -c,c,c);b.set(d,d,d,d);return this.clamp(a,b)}}(),clampLength:function(a,b){var c=this.length();return this.divideScalar(c||1).multiplyScalar(Math.max(a,Math.min(b,c)))},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);this.w=Math.floor(this.w);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);this.w=Math.ceil(this.w);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y); -this.z=Math.round(this.z);this.w=Math.round(this.w);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z);this.w=0>this.w?Math.ceil(this.w):Math.floor(this.w);return this},negate:function(){this.x=-this.x;this.y=-this.y;this.z=-this.z;this.w=-this.w;return this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z+this.w*a.w},lengthSq:function(){return this.x* -this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(a){return this.normalize().multiplyScalar(a)},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;this.z+=(a.z-this.z)*b;this.w+=(a.w-this.w)*b;return this},lerpVectors:function(a, -b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z&&a.w===this.w},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];this.w=a[b+3];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;a[b+3]=this.w;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."); -this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);this.w=a.getW(b);return this}});Ta.prototype=Object.assign(Object.create(ra.prototype),{constructor:Ta,isWebGLRenderTarget:!0,setSize:function(a,b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.texture.image.width=a,this.texture.image.height=b,this.dispose();this.viewport.set(0,0,a,b);this.scissor.set(0,0,a,b)},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.width=a.width;this.height=a.height;this.viewport.copy(a.viewport); -this.texture=a.texture.clone();this.depthBuffer=a.depthBuffer;this.stencilBuffer=a.stencilBuffer;this.depthTexture=a.depthTexture;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});he.prototype=Object.assign(Object.create(Ta.prototype),{constructor:he,isWebGLMultisampleRenderTarget:!0,copy:function(a){Ta.prototype.copy.call(this,a);this.samples=a.samples;return this}});ib.prototype=Object.create(Ta.prototype);ib.prototype.constructor=ib;ib.prototype.isWebGLRenderTargetCube=!0; -ib.prototype.fromEquirectangularTexture=function(a,b){this.texture.type=b.type;this.texture.format=b.format;this.texture.encoding=b.encoding;var c=new THREE.Scene,d=new THREE.ShaderMaterial({type:"CubemapFromEquirect",uniforms:THREE.UniformsUtils.clone({tEquirect:{value:null}}),vertexShader:"varying vec3 vWorldDirection;\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}", +Math.floor(a.x);break;case 1001:a.x=0>a.x?0:1;break;case 1002:a.x=1===Math.abs(Math.floor(a.x)%2)?Math.ceil(a.x)-a.x:a.x-Math.floor(a.x)}if(0>a.y||1a.y?0:1;break;case 1002:a.y=1===Math.abs(Math.floor(a.y)%2)?Math.ceil(a.y)-a.y:a.y-Math.floor(a.y)}this.flipY&&(a.y=1-a.y);return a}});Object.defineProperty(U.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.defineProperties(Y.prototype,{width:{get:function(){return this.z}, +set:function(a){this.z=a}},height:{get:function(){return this.w},set:function(a){this.w=a}}});Object.assign(Y.prototype,{isVector4:!0,set:function(a,b,c,d){this.x=a;this.y=b;this.z=c;this.w=d;return this},setScalar:function(a){this.w=this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},setW:function(a){this.w=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b; +break;case 2:this.z=b;break;case 3:this.w=b;break;default:throw Error("index is out of range: "+a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.w=void 0!==a.w?a.w:1;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."), +this.addVectors(a,b);this.x+=a.x;this.y+=a.y;this.z+=a.z;this.w+=a.w;return this},addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;this.w+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;this.w=a.w+b.w;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;this.z+=a.z*b;this.w+=a.w*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a, +b);this.x-=a.x;this.y-=a.y;this.z-=a.z;this.w-=a.w;return this},subScalar:function(a){this.x-=a;this.y-=a;this.z-=a;this.w-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;this.w=a.w-b.w;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;this.z*=a;this.w*=a;return this},applyMatrix4:function(a){var b=this.x,c=this.y,d=this.z,e=this.w;a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d+a[12]*e;this.y=a[1]*b+a[5]*c+a[9]*d+a[13]*e;this.z=a[2]*b+a[6]*c+a[10]*d+a[14]* +e;this.w=a[3]*b+a[7]*c+a[11]*d+a[15]*e;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},setAxisAngleFromQuaternion:function(a){this.w=2*Math.acos(a.w);var b=Math.sqrt(1-a.w*a.w);1E-4>b?(this.x=1,this.z=this.y=0):(this.x=a.x/b,this.y=a.y/b,this.z=a.z/b);return this},setAxisAngleFromRotationMatrix:function(a){a=a.elements;var b=a[0];var c=a[4];var d=a[8],e=a[1],f=a[5],g=a[9];var h=a[2];var k=a[6];var m=a[10];if(.01>Math.abs(c-e)&&.01>Math.abs(d-h)&&.01>Math.abs(g-k)){if(.1>Math.abs(c+ +e)&&.1>Math.abs(d+h)&&.1>Math.abs(g+k)&&.1>Math.abs(b+f+m-3))return this.set(1,0,0,0),this;a=Math.PI;b=(b+1)/2;f=(f+1)/2;m=(m+1)/2;c=(c+e)/4;d=(d+h)/4;g=(g+k)/4;b>f&&b>m?.01>b?(k=0,c=h=.707106781):(k=Math.sqrt(b),h=c/k,c=d/k):f>m?.01>f?(k=.707106781,h=0,c=.707106781):(h=Math.sqrt(f),k=c/h,c=g/h):.01>m?(h=k=.707106781,c=0):(c=Math.sqrt(m),k=d/c,h=g/c);this.set(k,h,c,a);return this}a=Math.sqrt((k-g)*(k-g)+(d-h)*(d-h)+(e-c)*(e-c));.001>Math.abs(a)&&(a=1);this.x=(k-g)/a;this.y=(d-h)/a;this.z=(e-c)/a; +this.w=Math.acos((b+f+m-1)/2);return this},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);this.z=Math.min(this.z,a.z);this.w=Math.min(this.w,a.w);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.z=Math.max(this.z,a.z);this.w=Math.max(this.w,a.w);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));this.z=Math.max(a.z,Math.min(b.z,this.z));this.w=Math.max(a.w,Math.min(b.w, +this.w));return this},clampScalar:function(){var a,b;return function(c,d){void 0===a&&(a=new Y,b=new Y);a.set(c,c,c,c);b.set(d,d,d,d);return this.clamp(a,b)}}(),clampLength:function(a,b){var c=this.length();return this.divideScalar(c||1).multiplyScalar(Math.max(a,Math.min(b,c)))},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);this.w=Math.floor(this.w);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z); +this.w=Math.ceil(this.w);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);this.w=Math.round(this.w);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z);this.w=0>this.w?Math.ceil(this.w):Math.floor(this.w);return this},negate:function(){this.x=-this.x;this.y=-this.y;this.z=-this.z;this.w=-this.w;return this}, +dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z+this.w*a.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(a){return this.normalize().multiplyScalar(a)},lerp:function(a,b){this.x+= +(a.x-this.x)*b;this.y+=(a.y-this.y)*b;this.z+=(a.z-this.z)*b;this.w+=(a.w-this.w)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z&&a.w===this.w},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];this.w=a[b+3];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;a[b+3]=this.w;return a},fromBufferAttribute:function(a, +b,c){void 0!==c&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute().");this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);this.w=a.getW(b);return this}});Ta.prototype=Object.assign(Object.create(ra.prototype),{constructor:Ta,isWebGLRenderTarget:!0,setSize:function(a,b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.texture.image.width=a,this.texture.image.height=b,this.dispose();this.viewport.set(0,0,a,b);this.scissor.set(0,0,a,b)},clone:function(){return(new this.constructor).copy(this)}, +copy:function(a){this.width=a.width;this.height=a.height;this.viewport.copy(a.viewport);this.texture=a.texture.clone();this.depthBuffer=a.depthBuffer;this.stencilBuffer=a.stencilBuffer;this.depthTexture=a.depthTexture;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});he.prototype=Object.assign(Object.create(Ta.prototype),{constructor:he,isWebGLMultisampleRenderTarget:!0,copy:function(a){Ta.prototype.copy.call(this,a);this.samples=a.samples;return this}});ib.prototype=Object.create(Ta.prototype); +ib.prototype.constructor=ib;ib.prototype.isWebGLRenderTargetCube=!0;ib.prototype.fromEquirectangularTexture=function(a,b){this.texture.type=b.type;this.texture.format=b.format;this.texture.encoding=b.encoding;var c=new THREE.Scene,d=new THREE.ShaderMaterial({type:"CubemapFromEquirect",uniforms:THREE.UniformsUtils.clone({tEquirect:{value:null}}),vertexShader:"varying vec3 vWorldDirection;\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}", fragmentShader:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}",side:THREE.BackSide,blending:THREE.NoBlending});d.uniforms.tEquirect.value= b;b=new THREE.Mesh(new THREE.BoxBufferGeometry(5,5,5),d);c.add(b);d=new THREE.CubeCamera(1,10,1);d.renderTarget=this;d.renderTarget.texture.name="CubeCameraTexture";d.update(a,c);b.geometry.dispose();b.material.dispose();return this};sb.prototype=Object.create(U.prototype);sb.prototype.constructor=sb;sb.prototype.isDataTexture=!0;Object.assign(Ha.prototype,{isBox3:!0,set:function(a,b){this.min.copy(a);this.max.copy(b);return this},setFromArray:function(a){for(var b=Infinity,c=Infinity,d=Infinity, e=-Infinity,f=-Infinity,g=-Infinity,h=0,k=a.length;he&&(e=m);l>f&&(f=l);p>g&&(g=p)}this.min.set(b,c,d);this.max.set(e,f,g);return this},setFromBufferAttribute:function(a){for(var b=Infinity,c=Infinity,d=Infinity,e=-Infinity,f=-Infinity,g=-Infinity,h=0,k=a.count;he&&(e=m);l>f&&(f=l);p>g&&(g=p)}this.min.set(b,c,d);this.max.set(e,f,g);return this}, @@ -515,12 +515,12 @@ vertexShader:S.meshphysical_vert,fragmentShader:S.meshphysical_frag},matcap:{uni J.displacementmap]),vertexShader:S.depth_vert,fragmentShader:S.depth_frag},normal:{uniforms:ta([J.common,J.bumpmap,J.normalmap,J.displacementmap,{opacity:{value:1}}]),vertexShader:S.normal_vert,fragmentShader:S.normal_frag},sprite:{uniforms:ta([J.sprite,J.fog]),vertexShader:S.sprite_vert,fragmentShader:S.sprite_frag},background:{uniforms:{uvTransform:{value:new ia},t2D:{value:null}},vertexShader:S.background_vert,fragmentShader:S.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1}, opacity:{value:1}},vertexShader:S.cube_vert,fragmentShader:S.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:S.equirect_vert,fragmentShader:S.equirect_frag},distanceRGBA:{uniforms:ta([J.common,J.displacementmap,{referencePosition:{value:new n},nearDistance:{value:1},farDistance:{value:1E3}}]),vertexShader:S.distanceRGBA_vert,fragmentShader:S.distanceRGBA_frag},shadow:{uniforms:ta([J.lights,J.fog,{color:{value:new B(0)},opacity:{value:1}}]),vertexShader:S.shadow_vert,fragmentShader:S.shadow_frag}}; Wa.physical={uniforms:ta([Wa.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:S.meshphysical_vert,fragmentShader:S.meshphysical_frag};Object.assign(Tb.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.a=a.a;this.b=a.b;this.c=a.c;this.normal.copy(a.normal);this.color.copy(a.color);this.materialIndex=a.materialIndex;for(var b=0,c=a.vertexNormals.length;bMath.abs(g)?(this._x=Math.atan2(-m,e),this._z=Math.atan2(-f,a)):(this._x=Math.atan2(p,k),this._z=0)):"YXZ"===b?(this._x=Math.asin(-d(m,-1,1)),.99999>Math.abs(m)?(this._y=Math.atan2(g,e),this._z=Math.atan2(h,k)):(this._y=Math.atan2(-l,a),this._z=0)):"ZXY"===b?(this._x=Math.asin(d(p,-1,1)),.99999>Math.abs(p)?(this._y=Math.atan2(-l,e),this._z=Math.atan2(-f,k)):(this._y=0,this._z=Math.atan2(h,a))):"ZYX"===b?(this._y=Math.asin(-d(l, +c;b++)this.vertexColors[b]=a.vertexColors[b].clone();return this}});tb.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" ");tb.DefaultOrder="XYZ";Object.defineProperties(tb.prototype,{x:{get:function(){return this._x},set:function(a){this._x=a;this._onChangeCallback()}},y:{get:function(){return this._y},set:function(a){this._y=a;this._onChangeCallback()}},z:{get:function(){return this._z},set:function(a){this._z=a;this._onChangeCallback()}},order:{get:function(){return this._order},set:function(a){this._order= +a;this._onChangeCallback()}}});Object.assign(tb.prototype,{isEuler:!0,set:function(a,b,c,d){this._x=a;this._y=b;this._z=c;this._order=d||this._order;this._onChangeCallback();return this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(a){this._x=a._x;this._y=a._y;this._z=a._z;this._order=a._order;this._onChangeCallback();return this},setFromRotationMatrix:function(a,b,c){var d=T.clamp,e=a.elements;a=e[0];var f=e[4],g=e[8],h=e[1],k=e[5],m=e[9],l=e[2], +p=e[6];e=e[10];b=b||this._order;"XYZ"===b?(this._y=Math.asin(d(g,-1,1)),.99999>Math.abs(g)?(this._x=Math.atan2(-m,e),this._z=Math.atan2(-f,a)):(this._x=Math.atan2(p,k),this._z=0)):"YXZ"===b?(this._x=Math.asin(-d(m,-1,1)),.99999>Math.abs(m)?(this._y=Math.atan2(g,e),this._z=Math.atan2(h,k)):(this._y=Math.atan2(-l,a),this._z=0)):"ZXY"===b?(this._x=Math.asin(d(p,-1,1)),.99999>Math.abs(p)?(this._y=Math.atan2(-l,e),this._z=Math.atan2(-f,k)):(this._y=0,this._z=Math.atan2(h,a))):"ZYX"===b?(this._y=Math.asin(-d(l, -1,1)),.99999>Math.abs(l)?(this._x=Math.atan2(p,e),this._z=Math.atan2(h,a)):(this._x=0,this._z=Math.atan2(-f,k))):"YZX"===b?(this._z=Math.asin(d(h,-1,1)),.99999>Math.abs(h)?(this._x=Math.atan2(-m,k),this._y=Math.atan2(-l,a)):(this._x=0,this._y=Math.atan2(g,e))):"XZY"===b?(this._z=Math.asin(-d(f,-1,1)),.99999>Math.abs(f)?(this._x=Math.atan2(p,k),this._y=Math.atan2(g,a)):(this._x=Math.atan2(-m,e),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+b);this._order= -b;if(!1!==c)this.onChangeCallback();return this},setFromQuaternion:function(){var a=new L;return function(b,c,d){a.makeRotationFromQuaternion(b);return this.setFromRotationMatrix(a,c,d)}}(),setFromVector3:function(a,b){return this.set(a.x,a.y,a.z,b||this._order)},reorder:function(){var a=new fa;return function(b){a.setFromEuler(this);return this.setFromQuaternion(a,b)}}(),equals:function(a){return a._x===this._x&&a._y===this._y&&a._z===this._z&&a._order===this._order},fromArray:function(a){this._x= -a[0];this._y=a[1];this._z=a[2];void 0!==a[3]&&(this._order=a[3]);this.onChangeCallback();return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this._x;a[b+1]=this._y;a[b+2]=this._z;a[b+3]=this._order;return a},toVector3:function(a){return a?a.set(this._x,this._y,this._z):new n(this._x,this._y,this._z)},onChange:function(a){this.onChangeCallback=a;return this},onChangeCallback:function(){}});Object.assign(je.prototype,{set:function(a){this.mask=1<e.far||f.push({distance:q,point:b.clone(),uv:ua.getUV(b,h,k,m,l,p,v,new C),face:null,object:this})}}(),clone:function(){return(new this.constructor(this.material)).copy(this)},copy:function(a){H.prototype.copy.call(this,a);void 0!==a.center&&this.center.copy(a.center);return this}});Oc.prototype=Object.assign(Object.create(H.prototype),{constructor:Oc,isLOD:!0,copy:function(a){H.prototype.copy.call(this,a,!1);a=a.levels;for(var b=0,c=a.length;b=d[e].distance)d[e-1].object.visible=!1,d[e].object.visible=!0;else break;for(;ef||(l.applyMatrix4(this.matrixWorld),u=d.ray.origin.distanceTo(l),ud.far||e.push({distance:u,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}else for(g=0,q=t.length/3-1;gf||(l.applyMatrix4(this.matrixWorld),u=d.ray.origin.distanceTo(l), ud.far||e.push({distance:u,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else if(g.isGeometry)for(k=g.vertices,m=k.length,g=0;gf||(l.applyMatrix4(this.matrixWorld),u=d.ray.origin.distanceTo(l),ud.far||e.push({distance:u,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}}(),clone:function(){return(new this.constructor(this.geometry, -this.material)).copy(this)}});W.prototype=Object.assign(Object.create(Y.prototype),{constructor:W,isLineSegments:!0,computeLineDistances:function(){var a=new n,b=new n;return function(){var c=this.geometry;if(c.isBufferGeometry)if(null===c.index){for(var d=c.attributes.position,e=[],f=0,g=d.count;fd.far||e.push({distance:a,distanceToRay:Math.sqrt(f),point:p.clone(),index:c,face:null,object:g}))}var g=this,h=this.geometry,k=this.matrixWorld,m=d.params.Points.threshold; null===h.boundingSphere&&h.computeBoundingSphere();c.copy(h.boundingSphere);c.applyMatrix4(k);c.radius+=m;if(!1!==d.ray.intersectsSphere(c)){a.getInverse(k);b.copy(d.ray).applyMatrix4(a);m/=(this.scale.x+this.scale.y+this.scale.z)/3;var l=m*m;m=new n;var p=new n;if(h.isBufferGeometry){var v=h.index;h=h.attributes.position.array;if(null!==v){var t=v.array;v=0;for(var q=t.length;v=a.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}});ac.prototype=Object.create(U.prototype);ac.prototype.constructor=ac;ac.prototype.isCompressedTexture=!0;Qc.prototype=Object.create(U.prototype);Qc.prototype.constructor=Qc;Qc.prototype.isCanvasTexture= @@ -768,7 +768,7 @@ a);this.width=a.width;this.height=a.height;return this},toJSON:function(a){a=aa. a.vertexColors);void 0!==a.fog&&(d.fog=a.fog);void 0!==a.flatShading&&(d.flatShading=a.flatShading);void 0!==a.blending&&(d.blending=a.blending);void 0!==a.combine&&(d.combine=a.combine);void 0!==a.side&&(d.side=a.side);void 0!==a.opacity&&(d.opacity=a.opacity);void 0!==a.transparent&&(d.transparent=a.transparent);void 0!==a.alphaTest&&(d.alphaTest=a.alphaTest);void 0!==a.depthTest&&(d.depthTest=a.depthTest);void 0!==a.depthWrite&&(d.depthWrite=a.depthWrite);void 0!==a.colorWrite&&(d.colorWrite=a.colorWrite); void 0!==a.wireframe&&(d.wireframe=a.wireframe);void 0!==a.wireframeLinewidth&&(d.wireframeLinewidth=a.wireframeLinewidth);void 0!==a.wireframeLinecap&&(d.wireframeLinecap=a.wireframeLinecap);void 0!==a.wireframeLinejoin&&(d.wireframeLinejoin=a.wireframeLinejoin);void 0!==a.rotation&&(d.rotation=a.rotation);1!==a.linewidth&&(d.linewidth=a.linewidth);void 0!==a.dashSize&&(d.dashSize=a.dashSize);void 0!==a.gapSize&&(d.gapSize=a.gapSize);void 0!==a.scale&&(d.scale=a.scale);void 0!==a.polygonOffset&& (d.polygonOffset=a.polygonOffset);void 0!==a.polygonOffsetFactor&&(d.polygonOffsetFactor=a.polygonOffsetFactor);void 0!==a.polygonOffsetUnits&&(d.polygonOffsetUnits=a.polygonOffsetUnits);void 0!==a.skinning&&(d.skinning=a.skinning);void 0!==a.morphTargets&&(d.morphTargets=a.morphTargets);void 0!==a.dithering&&(d.dithering=a.dithering);void 0!==a.visible&&(d.visible=a.visible);void 0!==a.userData&&(d.userData=a.userData);if(void 0!==a.uniforms)for(var e in a.uniforms){var f=a.uniforms[e];d.uniforms[e]= -{};switch(f.type){case "t":d.uniforms[e].value=b(f.value);break;case "c":d.uniforms[e].value=(new B).setHex(f.value);break;case "v2":d.uniforms[e].value=(new C).fromArray(f.value);break;case "v3":d.uniforms[e].value=(new n).fromArray(f.value);break;case "v4":d.uniforms[e].value=(new Z).fromArray(f.value);break;case "m3":d.uniforms[e].value=(new ia).fromArray(f.value);case "m4":d.uniforms[e].value=(new L).fromArray(f.value);break;default:d.uniforms[e].value=f.value}}void 0!==a.defines&&(d.defines= +{};switch(f.type){case "t":d.uniforms[e].value=b(f.value);break;case "c":d.uniforms[e].value=(new B).setHex(f.value);break;case "v2":d.uniforms[e].value=(new C).fromArray(f.value);break;case "v3":d.uniforms[e].value=(new n).fromArray(f.value);break;case "v4":d.uniforms[e].value=(new Y).fromArray(f.value);break;case "m3":d.uniforms[e].value=(new ia).fromArray(f.value);case "m4":d.uniforms[e].value=(new L).fromArray(f.value);break;default:d.uniforms[e].value=f.value}}void 0!==a.defines&&(d.defines= a.defines);void 0!==a.vertexShader&&(d.vertexShader=a.vertexShader);void 0!==a.fragmentShader&&(d.fragmentShader=a.fragmentShader);if(void 0!==a.extensions)for(var g in a.extensions)d.extensions[g]=a.extensions[g];void 0!==a.shading&&(d.flatShading=1===a.shading);void 0!==a.size&&(d.size=a.size);void 0!==a.sizeAttenuation&&(d.sizeAttenuation=a.sizeAttenuation);void 0!==a.map&&(d.map=b(a.map));void 0!==a.matcap&&(d.matcap=b(a.matcap));void 0!==a.alphaMap&&(d.alphaMap=b(a.alphaMap),d.transparent=!0); void 0!==a.bumpMap&&(d.bumpMap=b(a.bumpMap));void 0!==a.bumpScale&&(d.bumpScale=a.bumpScale);void 0!==a.normalMap&&(d.normalMap=b(a.normalMap));void 0!==a.normalMapType&&(d.normalMapType=a.normalMapType);void 0!==a.normalScale&&(e=a.normalScale,!1===Array.isArray(e)&&(e=[e,e]),d.normalScale=(new C).fromArray(e));void 0!==a.displacementMap&&(d.displacementMap=b(a.displacementMap));void 0!==a.displacementScale&&(d.displacementScale=a.displacementScale);void 0!==a.displacementBias&&(d.displacementBias= a.displacementBias);void 0!==a.roughnessMap&&(d.roughnessMap=b(a.roughnessMap));void 0!==a.metalnessMap&&(d.metalnessMap=b(a.metalnessMap));void 0!==a.emissiveMap&&(d.emissiveMap=b(a.emissiveMap));void 0!==a.emissiveIntensity&&(d.emissiveIntensity=a.emissiveIntensity);void 0!==a.specularMap&&(d.specularMap=b(a.specularMap));void 0!==a.envMap&&(d.envMap=b(a.envMap));void 0!==a.envMapIntensity&&(d.envMapIntensity=a.envMapIntensity);void 0!==a.reflectivity&&(d.reflectivity=a.reflectivity);void 0!==a.lightMap&& @@ -793,7 +793,7 @@ h.center.fromArray(g.center);void 0!==g.rotation&&(h.rotation=g.rotation);void 0 g.premultiplyAlpha);void 0!==g.unpackAlignment&&(h.unpackAlignment=g.unpackAlignment);d[g.uuid]=h}return d},parseObject:function(a,b,c){function d(a){void 0===b[a]&&console.warn("THREE.ObjectLoader: Undefined geometry",a);return b[a]}function e(a){if(void 0!==a){if(Array.isArray(a)){for(var b=[],d=0,e=a.length;dMath.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);H.prototype.updateMatrixWorld.call(this, +xd;xd.prototype.updateMatrixWorld=function(a){var b=this.box;b.isEmpty()||(b.getCenter(this.position),b.getSize(this.scale),this.scale.multiplyScalar(.5),H.prototype.updateMatrixWorld.call(this,a))};yd.prototype=Object.create(Z.prototype);yd.prototype.constructor=yd;yd.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);H.prototype.updateMatrixWorld.call(this, a)};var ee,Qe;hb.prototype=Object.create(H.prototype);hb.prototype.constructor=hb;hb.prototype.setDirection=function(){var a=new n,b;return function(c){.99999c.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))}}();hb.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(0,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y= a;this.cone.updateMatrix()};hb.prototype.setColor=function(a){this.line.material.color.copy(a);this.cone.material.color.copy(a)};hb.prototype.copy=function(a){H.prototype.copy.call(this,a,!1);this.line.copy(a.line);this.cone.copy(a.cone);return this};hb.prototype.clone=function(){return(new this.constructor).copy(this)};zd.prototype=Object.create(W.prototype);zd.prototype.constructor=zd;O.create=function(a,b){console.log("THREE.Curve.create() has been deprecated");a.prototype=Object.create(O.prototype); a.prototype.constructor=a;a.prototype.getPoint=b;return a};Object.assign(fb.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); @@ -926,7 +926,7 @@ b){console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getB return new Fb(this,a)},makeGeometry:function(a){console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.");return new Gb(this,a)}});Object.assign(C.prototype,{fromAttribute:function(a,b,c){console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,c)},distanceToManhattan:function(a){console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo().");return this.manhattanDistanceTo(a)}, lengthManhattan:function(){console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength().");return this.manhattanLength()}});Object.assign(n.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(a){console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."); return this.setFromMatrixPosition(a)},getScaleFromMatrix:function(a){console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().");return this.setFromMatrixScale(a)},getColumnFromMatrix:function(a,b){console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().");return this.setFromMatrixColumn(b,a)},applyProjection:function(a){console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead.");return this.applyMatrix4(a)}, -fromAttribute:function(a,b,c){console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,c)},distanceToManhattan:function(a){console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo().");return this.manhattanDistanceTo(a)},lengthManhattan:function(){console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength().");return this.manhattanLength()}});Object.assign(Z.prototype, +fromAttribute:function(a,b,c){console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,c)},distanceToManhattan:function(a){console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo().");return this.manhattanDistanceTo(a)},lengthManhattan:function(){console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength().");return this.manhattanLength()}});Object.assign(Y.prototype, {fromAttribute:function(a,b,c){console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,c)},lengthManhattan:function(){console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength().");return this.manhattanLength()}});Object.assign(M.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}); Object.assign(H.prototype,{getChildByName:function(a){console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().");return this.getObjectByName(a)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(a,b){console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.");return this.translateOnAxis(b,a)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}); Object.defineProperties(H.prototype,{eulerOrder:{get:function(){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order.");return this.rotation.order},set:function(a){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order.");this.rotation.order=a}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}); @@ -968,7 +968,7 @@ return new Tb(a,b,c,e,f,g)};l.FaceColors=1;l.FaceNormalsHelper=vd;l.FileLoader=L Dd;l.Font=Be;l.FontLoader=Lf;l.FrontFaceDirectionCCW=1;l.FrontFaceDirectionCW=0;l.FrontSide=0;l.Frustum=Ad;l.GammaEncoding=3007;l.Geometry=M;l.GeometryUtils={merge:function(a,b,c){console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.");if(b.isMesh){b.matrixAutoUpdate&&b.updateMatrix();var 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()}};l.GreaterDepth=6;l.GreaterEqualDepth=5;l.GridHelper=ce;l.Group=Yb;l.HalfFloatType=1016;l.HemisphereLight=Qd;l.HemisphereLightHelper=wc;l.HemisphereLightProbe=De;l.IcosahedronBufferGeometry=ec;l.IcosahedronGeometry=Wc;l.ImageBitmapLoader=ze;l.ImageLoader=nd;l.ImageUtils=rb;l.ImmediateRenderObject=td;l.InstancedBufferAttribute=$d;l.InstancedBufferGeometry=Zd;l.InstancedInterleavedBuffer=Me;l.Int16Attribute=function(a,b){console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."); return new Ec(a,b)};l.Int16BufferAttribute=Ec;l.Int32Attribute=function(a,b){console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead.");return new Fc(a,b)};l.Int32BufferAttribute=Fc;l.Int8Attribute=function(a,b){console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead.");return new Bc(a,b)};l.Int8BufferAttribute=Bc;l.IntType=1013;l.InterleavedBuffer=Bb;l.InterleavedBufferAttribute=Mc;l.Interpolant=Ea;l.InterpolateDiscrete= -2300;l.InterpolateLinear=2301;l.InterpolateSmooth=2302;l.JSONLoader=function(){console.error("THREE.JSONLoader has been removed.")};l.KeyframeTrack=ba;l.LOD=Oc;l.LatheBufferGeometry=kc;l.LatheGeometry=hd;l.Layers=je;l.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")};l.LessDepth=2;l.LessEqualDepth=3;l.Light=aa;l.LightProbe=Ra;l.LightProbeHelper=xc;l.LightShadow=Qb;l.Line=Y;l.Line3=Pe;l.LineBasicMaterial=Q;l.LineCurve=Da;l.LineCurve3=Na;l.LineDashedMaterial= +2300;l.InterpolateLinear=2301;l.InterpolateSmooth=2302;l.JSONLoader=function(){console.error("THREE.JSONLoader has been removed.")};l.KeyframeTrack=ba;l.LOD=Oc;l.LatheBufferGeometry=kc;l.LatheGeometry=hd;l.Layers=je;l.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")};l.LessDepth=2;l.LessEqualDepth=3;l.Light=aa;l.LightProbe=Ra;l.LightProbeHelper=xc;l.LightShadow=Qb;l.Line=Z;l.Line3=Pe;l.LineBasicMaterial=Q;l.LineCurve=Da;l.LineCurve3=Na;l.LineDashedMaterial= Pb;l.LineLoop=Hd;l.LinePieces=1;l.LineSegments=W;l.LineStrip=0;l.LinearEncoding=3E3;l.LinearFilter=1006;l.LinearInterpolant=ld;l.LinearMipMapLinearFilter=1008;l.LinearMipMapNearestFilter=1007;l.LinearToneMapping=1;l.Loader=rd;l.LoaderUtils=We;l.LoadingManager=te;l.LogLuvEncoding=3003;l.LoopOnce=2200;l.LoopPingPong=2202;l.LoopRepeat=2201;l.LuminanceAlphaFormat=1025;l.LuminanceFormat=1024;l.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2};l.Material=I;l.MaterialLoader=Yd;l.Math=T;l.Matrix3=ia;l.Matrix4=L;l.MaxEquation= 104;l.Mesh=ha;l.MeshBasicMaterial=la;l.MeshDepthMaterial=lb;l.MeshDistanceMaterial=mb;l.MeshFaceMaterial=function(a){console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead.");return a};l.MeshLambertMaterial=Nb;l.MeshMatcapMaterial=Ob;l.MeshNormalMaterial=Mb;l.MeshPhongMaterial=Ka;l.MeshPhysicalMaterial=Kb;l.MeshStandardMaterial=Za;l.MeshToonMaterial=Lb;l.MinEquation=103;l.MirroredRepeatWrapping=1002;l.MixOperation=1;l.MultiMaterial=function(a){void 0===a&&(a=[]);console.warn("THREE.MultiMaterial has been removed. Use an Array instead."); a.isMultiMaterial=!0;a.materials=a;a.clone=function(){return a.slice()};return a};l.MultiplyBlending=4;l.MultiplyOperation=0;l.NearestFilter=1003;l.NearestMipMapLinearFilter=1005;l.NearestMipMapNearestFilter=1004;l.NeverDepth=0;l.NoBlending=0;l.NoColors=0;l.NoToneMapping=0;l.NormalBlending=1;l.NotEqualDepth=7;l.NumberKeyframeTrack=oc;l.Object3D=H;l.ObjectLoader=ye;l.ObjectSpaceNormalMap=1;l.OctahedronBufferGeometry=Cb;l.OctahedronGeometry=Vc;l.OneFactor=201;l.OneMinusDstAlphaFactor=207;l.OneMinusDstColorFactor= @@ -981,6 +981,6 @@ detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js fd;l.Spherical=Sf;l.SphericalHarmonics3=ae;l.SphericalReflectionMapping=305;l.Spline=Re;l.SplineCurve=Pa;l.SplineCurve3=Wf;l.SpotLight=Sd;l.SpotLightHelper=sc;l.SpotLightShadow=Rd;l.Sprite=Nc;l.SpriteMaterial=ob;l.SrcAlphaFactor=204;l.SrcAlphaSaturateFactor=210;l.SrcColorFactor=202;l.StereoCamera=Mf;l.StringKeyframeTrack=Od;l.SubtractEquation=101;l.SubtractiveBlending=3;l.TangentSpaceNormalMap=0;l.TetrahedronBufferGeometry=dc;l.TetrahedronGeometry=Uc;l.TextBufferGeometry=ic;l.TextGeometry=ed;l.Texture= U;l.TextureLoader=Pd;l.TorusBufferGeometry=hc;l.TorusGeometry=$c;l.TorusKnotBufferGeometry=gc;l.TorusKnotGeometry=Zc;l.Triangle=ua;l.TriangleFanDrawMode=2;l.TriangleStripDrawMode=1;l.TrianglesDrawMode=0;l.TubeBufferGeometry=Db;l.TubeGeometry=Yc;l.UVMapping=300;l.Uint16Attribute=function(a,b){console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.");return new ub(a,b)};l.Uint16BufferAttribute=ub;l.Uint32Attribute=function(a,b){console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."); return new vb(a,b)};l.Uint32BufferAttribute=vb;l.Uint8Attribute=function(a,b){console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.");return new Cc(a,b)};l.Uint8BufferAttribute=Cc;l.Uint8ClampedAttribute=function(a,b){console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.");return new Dc(a,b)};l.Uint8ClampedBufferAttribute=Dc;l.Uncharted2ToneMapping=3;l.Uniform=be;l.UniformsLib=J;l.UniformsUtils= -sh;l.UnsignedByteType=1009;l.UnsignedInt248Type=1020;l.UnsignedIntType=1014;l.UnsignedShort4444Type=1017;l.UnsignedShort5551Type=1018;l.UnsignedShort565Type=1019;l.UnsignedShortType=1012;l.Vector2=C;l.Vector3=n;l.Vector4=Z;l.VectorKeyframeTrack=pc;l.Vertex=function(a,b,c){console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead.");return new n(a,b,c)};l.VertexColors=2;l.VertexNormalsHelper=ud;l.VideoTexture=qe;l.WebGLMultisampleRenderTarget=he;l.WebGLRenderTarget=Ta;l.WebGLRenderTargetCube= +sh;l.UnsignedByteType=1009;l.UnsignedInt248Type=1020;l.UnsignedIntType=1014;l.UnsignedShort4444Type=1017;l.UnsignedShort5551Type=1018;l.UnsignedShort565Type=1019;l.UnsignedShortType=1012;l.Vector2=C;l.Vector3=n;l.Vector4=Y;l.VectorKeyframeTrack=pc;l.Vertex=function(a,b,c){console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead.");return new n(a,b,c)};l.VertexColors=2;l.VertexNormalsHelper=ud;l.VideoTexture=qe;l.WebGLMultisampleRenderTarget=he;l.WebGLRenderTarget=Ta;l.WebGLRenderTargetCube= ib;l.WebGLRenderer=oe;l.WebGLUtils=uf;l.WireframeGeometry=bc;l.WireframeHelper=function(a,b){console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead.");return new W(new bc(a.geometry),new Q({color:void 0!==b?b:16777215}))};l.WrapAroundEnding=2402;l.XHRLoader=function(a){console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader.");return new La(a)};l.ZeroCurvatureEnding=2400;l.ZeroFactor=200;l.ZeroSlopeEnding=2401;l.sRGBEncoding=3001;Object.defineProperty(l, "__esModule",{value:!0})}); diff --git a/build/three.module.js b/build/three.module.js index 6856105b37c2871ccba57cc814fe23d857156a33..a6a48168726f2f8e490d811e508ada95dd7c69bb 100644 --- a/build/three.module.js +++ b/build/three.module.js @@ -1066,7 +1066,7 @@ Object.defineProperties( Quaternion.prototype, { set: function ( value ) { this._x = value; - this.onChangeCallback(); + this._onChangeCallback(); } @@ -1083,7 +1083,7 @@ Object.defineProperties( Quaternion.prototype, { set: function ( value ) { this._y = value; - this.onChangeCallback(); + this._onChangeCallback(); } @@ -1100,7 +1100,7 @@ Object.defineProperties( Quaternion.prototype, { set: function ( value ) { this._z = value; - this.onChangeCallback(); + this._onChangeCallback(); } @@ -1117,7 +1117,7 @@ Object.defineProperties( Quaternion.prototype, { set: function ( value ) { this._w = value; - this.onChangeCallback(); + this._onChangeCallback(); } @@ -1136,7 +1136,7 @@ Object.assign( Quaternion.prototype, { this._z = z; this._w = w; - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -1155,7 +1155,7 @@ Object.assign( Quaternion.prototype, { this._z = quaternion.z; this._w = quaternion.w; - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -1230,7 +1230,7 @@ Object.assign( Quaternion.prototype, { } - if ( update !== false ) this.onChangeCallback(); + if ( update !== false ) this._onChangeCallback(); return this; @@ -1249,7 +1249,7 @@ Object.assign( Quaternion.prototype, { this._z = axis.z * s; this._w = Math.cos( halfAngle ); - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -1308,7 +1308,7 @@ Object.assign( Quaternion.prototype, { } - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -1391,7 +1391,7 @@ Object.assign( Quaternion.prototype, { this._y *= - 1; this._z *= - 1; - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -1437,7 +1437,7 @@ Object.assign( Quaternion.prototype, { } - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -1474,7 +1474,7 @@ Object.assign( Quaternion.prototype, { this._z = qaz * qbw + qaw * qbz + qax * qby - qay * qbx; this._w = qaw * qbw - qax * qbx - qay * qby - qaz * qbz; - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -1541,7 +1541,7 @@ Object.assign( Quaternion.prototype, { this._y = ( y * ratioA + this._y * ratioB ); this._z = ( z * ratioA + this._z * ratioB ); - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -1562,7 +1562,7 @@ Object.assign( Quaternion.prototype, { this._z = array[ offset + 2 ]; this._w = array[ offset + 3 ]; - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -1582,15 +1582,15 @@ Object.assign( Quaternion.prototype, { }, - onChange: function ( callback ) { + _onChange: function ( callback ) { - this.onChangeCallback = callback; + this._onChangeCallback = callback; return this; }, - onChangeCallback: function () {} + _onChangeCallback: function () {} } ); @@ -3083,6 +3083,42 @@ function Vector4( x, y, z, w ) { } +Object.defineProperties( Vector4.prototype, { + + "width": { + + get: function () { + + return this.z; + + }, + + set: function ( value ) { + + this.z = value; + + } + + }, + + "height": { + + get: function () { + + return this.w; + + }, + + set: function ( value ) { + + this.w = value; + + } + + } + +} ); + Object.assign( Vector4.prototype, { isVector4: true, @@ -7909,7 +7945,7 @@ Object.defineProperties( Euler.prototype, { set: function ( value ) { this._x = value; - this.onChangeCallback(); + this._onChangeCallback(); } @@ -7926,7 +7962,7 @@ Object.defineProperties( Euler.prototype, { set: function ( value ) { this._y = value; - this.onChangeCallback(); + this._onChangeCallback(); } @@ -7943,7 +7979,7 @@ Object.defineProperties( Euler.prototype, { set: function ( value ) { this._z = value; - this.onChangeCallback(); + this._onChangeCallback(); } @@ -7960,7 +7996,7 @@ Object.defineProperties( Euler.prototype, { set: function ( value ) { this._order = value; - this.onChangeCallback(); + this._onChangeCallback(); } @@ -7979,7 +8015,7 @@ Object.assign( Euler.prototype, { this._z = z; this._order = order || this._order; - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -7998,7 +8034,7 @@ Object.assign( Euler.prototype, { this._z = euler._z; this._order = euler._order; - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -8121,7 +8157,7 @@ Object.assign( Euler.prototype, { this._order = order; - if ( update !== false ) this.onChangeCallback(); + if ( update !== false ) this._onChangeCallback(); return this; @@ -8176,7 +8212,7 @@ Object.assign( Euler.prototype, { this._z = array[ 2 ]; if ( array[ 3 ] !== undefined ) this._order = array[ 3 ]; - this.onChangeCallback(); + this._onChangeCallback(); return this; @@ -8210,15 +8246,15 @@ Object.assign( Euler.prototype, { }, - onChange: function ( callback ) { + _onChange: function ( callback ) { - this.onChangeCallback = callback; + this._onChangeCallback = callback; return this; }, - onChangeCallback: function () {} + _onChangeCallback: function () {} } ); @@ -8307,8 +8343,8 @@ function Object3D() { } - rotation.onChange( onRotationChange ); - quaternion.onChange( onQuaternionChange ); + rotation._onChange( onRotationChange ); + quaternion._onChange( onQuaternionChange ); Object.defineProperties( this, { position: { @@ -20693,7 +20729,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, _gl.pixelStorei( 37440, texture.flipY ); - var isCompressed = ( texture.image[ 0 ] && texture.image[ 0 ].isCompressedTexture ); + var isCompressed = ( texture && texture.isCompressedTexture ); var isDataTexture = ( texture.image[ 0 ] && texture.image[ 0 ].isDataTexture ); var cubeImage = [];