|
@@ -1,7 +1,7 @@
|
|
|
// threejs.org/license
|
|
|
-(function(l,Ma){"object"===typeof exports&&"undefined"!==typeof module?Ma(exports):"function"===typeof define&&define.amd?define(["exports"],Ma):(l=l||self,Ma(l.THREE={}))})(this,function(l){function Ma(){}function ha(c,a,b,d,e,f,g,h,k,n){Object.defineProperty(this,"id",{value:gj++});this.uuid=R.generateUUID();this.name="";this.image=void 0!==c?c:ha.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==a?a:ha.DEFAULT_MAPPING;this.wrapS=void 0!==b?b:1001;this.wrapT=void 0!==d?d:1001;this.magFilter=void 0!==
|
|
|
+(function(l,Ma){"object"===typeof exports&&"undefined"!==typeof module?Ma(exports):"function"===typeof define&&define.amd?define(["exports"],Ma):(l=l||self,Ma(l.THREE={}))})(this,function(l){function Ma(){}function ia(c,a,b,d,e,f,g,h,k,n){Object.defineProperty(this,"id",{value:gj++});this.uuid=R.generateUUID();this.name="";this.image=void 0!==c?c:ia.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==a?a:ia.DEFAULT_MAPPING;this.wrapS=void 0!==b?b:1001;this.wrapT=void 0!==d?d:1001;this.magFilter=void 0!==
|
|
|
e?e:1006;this.minFilter=void 0!==f?f:1008;this.anisotropy=void 0!==k?k:1;this.format=void 0!==g?g:1023;this.internalFormat=null;this.type=void 0!==h?h:1009;this.offset=new p(0,0);this.repeat=new p(1,1);this.center=new p(0,0);this.rotation=0;this.matrixAutoUpdate=!0;this.matrix=new U;this.generateMipmaps=!0;this.premultiplyAlpha=!1;this.flipY=!0;this.unpackAlignment=4;this.encoding=void 0!==n?n:3E3;this.version=0;this.onUpdate=null}function Ta(c,a,b){this.width=c;this.height=a;this.scissor=new D(0,
|
|
|
-0,c,a);this.scissorTest=!1;this.viewport=new D(0,0,c,a);b=b||{};this.texture=new ha(void 0,b.mapping,b.wrapS,b.wrapT,b.magFilter,b.minFilter,b.format,b.type,b.anisotropy,b.encoding);this.texture.image={};this.texture.image.width=c;this.texture.image.height=a;this.texture.generateMipmaps=void 0!==b.generateMipmaps?b.generateMipmaps:!1;this.texture.minFilter=void 0!==b.minFilter?b.minFilter:1006;this.depthBuffer=void 0!==b.depthBuffer?b.depthBuffer:!0;this.stencilBuffer=void 0!==b.stencilBuffer?b.stencilBuffer:
|
|
|
+0,c,a);this.scissorTest=!1;this.viewport=new D(0,0,c,a);b=b||{};this.texture=new ia(void 0,b.mapping,b.wrapS,b.wrapT,b.magFilter,b.minFilter,b.format,b.type,b.anisotropy,b.encoding);this.texture.image={};this.texture.image.width=c;this.texture.image.height=a;this.texture.generateMipmaps=void 0!==b.generateMipmaps?b.generateMipmaps:!1;this.texture.minFilter=void 0!==b.minFilter?b.minFilter:1006;this.depthBuffer=void 0!==b.depthBuffer?b.depthBuffer:!0;this.stencilBuffer=void 0!==b.stencilBuffer?b.stencilBuffer:
|
|
|
!1;this.depthTexture=void 0!==b.depthTexture?b.depthTexture:null}function mg(c,a,b){Ta.call(this,c,a,b);this.samples=4}function ng(c,a,b,d,e){for(var f=0,g=c.length-3;f<=g;f+=3){kc.fromArray(c,f);var h=e.x*Math.abs(kc.x)+e.y*Math.abs(kc.y)+e.z*Math.abs(kc.z),k=a.dot(kc),n=b.dot(kc),r=d.dot(kc);if(Math.max(-Math.max(k,n,r),Math.min(k,n,r))>h)return!1}return!0}function K(){Object.defineProperty(this,"id",{value:hj++});this.uuid=R.generateUUID();this.name="";this.type="Object3D";this.parent=null;this.children=
|
|
|
[];this.up=K.DefaultUp.clone();var c=new m,a=new Ba,b=new Q,d=new m(1,1,1);a._onChange(function(){b.setFromEuler(a,!1)});b._onChange(function(){a.setFromQuaternion(b,void 0,!1)});Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:c},rotation:{configurable:!0,enumerable:!0,value:a},quaternion:{configurable:!0,enumerable:!0,value:b},scale:{configurable:!0,enumerable:!0,value:d},modelViewMatrix:{value:new z},normalMatrix:{value:new U}});this.matrix=new z;this.matrixWorld=new z;
|
|
|
this.matrixAutoUpdate=K.DefaultMatrixAutoUpdate;this.matrixWorldNeedsUpdate=!1;this.layers=new ob;this.visible=!0;this.receiveShadow=this.castShadow=!1;this.frustumCulled=!0;this.renderOrder=0;this.userData={}}function E(c,a,b){return void 0===a&&void 0===b?this.set(c):this.setRGB(c,a,b)}function og(c,a,b){0>b&&(b+=1);1<b&&--b;return b<1/6?c+6*(a-c)*b:.5>b?a:b<2/3?c+6*(a-c)*(2/3-b):c}function pg(c){return.04045>c?.0773993808*c:Math.pow(.9478672986*c+.0521327014,2.4)}function qg(c){return.0031308>
|
|
@@ -19,10 +19,10 @@ this.type="BoxGeometry";this.parameters={width:c,height:a,depth:b,widthSegments:
|
|
|
1,-1,b,a,-c,f,e,1);g("x","z","y",1,1,c,b,a,d,f,2);g("x","z","y",1,-1,c,b,-a,d,f,3);g("x","y","z",1,-1,c,a,b,d,e,4);g("x","y","z",-1,-1,c,a,-b,d,e,5);this.setIndex(k);this.setAttribute("position",new F(n,3));this.setAttribute("normal",new F(r,3));this.setAttribute("uv",new F(u,2))}function Sc(c){var a={},b;for(b in c){a[b]={};for(var d in c[b]){var e=c[b][d];e&&(e.isColor||e.isMatrix3||e.isMatrix4||e.isVector2||e.isVector3||e.isVector4||e.isTexture)?a[b][d]=e.clone():Array.isArray(e)?a[b][d]=e.slice():
|
|
|
a[b][d]=e}}return a}function xa(c){for(var a={},b=0;b<c.length;b++){var d=Sc(c[b]),e;for(e in d)a[e]=d[e]}return a}function Ia(c){M.call(this);this.type="ShaderMaterial";this.defines={};this.uniforms={};this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}";this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}";this.linewidth=1;this.wireframe=!1;this.wireframeLinewidth=1;this.morphNormals=this.morphTargets=this.skinning=
|
|
|
this.clipping=this.lights=this.fog=!1;this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1};this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]};this.index0AttributeName=void 0;this.uniformsNeedUpdate=!1;void 0!==c&&(void 0!==c.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(c))}function pb(){K.call(this);this.type="Camera";this.matrixWorldInverse=new z;this.projectionMatrix=new z;
|
|
|
-this.projectionMatrixInverse=new z}function ia(c,a,b,d){pb.call(this);this.type="PerspectiveCamera";this.fov=void 0!==c?c:50;this.zoom=1;this.near=void 0!==b?b:.1;this.far=void 0!==d?d:2E3;this.focus=10;this.aspect=void 0!==a?a:1;this.view=null;this.filmGauge=35;this.filmOffset=0;this.updateProjectionMatrix()}function Tc(c,a,b){K.call(this);this.type="CubeCamera";if(!0!==b.isWebGLCubeRenderTarget)console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");
|
|
|
-else{this.renderTarget=b;var d=new ia(90,1,c,a);d.layers=this.layers;d.up.set(0,-1,0);d.lookAt(new m(1,0,0));this.add(d);var e=new ia(90,1,c,a);e.layers=this.layers;e.up.set(0,-1,0);e.lookAt(new m(-1,0,0));this.add(e);var f=new ia(90,1,c,a);f.layers=this.layers;f.up.set(0,0,1);f.lookAt(new m(0,1,0));this.add(f);var g=new ia(90,1,c,a);g.layers=this.layers;g.up.set(0,0,-1);g.lookAt(new m(0,-1,0));this.add(g);var h=new ia(90,1,c,a);h.layers=this.layers;h.up.set(0,-1,0);h.lookAt(new m(0,0,1));this.add(h);
|
|
|
-var k=new ia(90,1,c,a);k.layers=this.layers;k.up.set(0,-1,0);k.lookAt(new m(0,0,-1));this.add(k);this.update=function(a,c){null===this.parent&&this.updateMatrixWorld();var n=a.xr.enabled,r=a.getRenderTarget();a.xr.enabled=!1;var l=b.texture.generateMipmaps;b.texture.generateMipmaps=!1;a.setRenderTarget(b,0);a.render(c,d);a.setRenderTarget(b,1);a.render(c,e);a.setRenderTarget(b,2);a.render(c,f);a.setRenderTarget(b,3);a.render(c,g);a.setRenderTarget(b,4);a.render(c,h);b.texture.generateMipmaps=l;a.setRenderTarget(b,
|
|
|
-5);a.render(c,k);a.setRenderTarget(r);a.xr.enabled=n};this.clear=function(a,c,d,e){for(var f=a.getRenderTarget(),g=0;6>g;g++)a.setRenderTarget(b,g),a.clear(c,d,e);a.setRenderTarget(f)}}}function Rb(c,a,b){Number.isInteger(a)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),a=b);Ta.call(this,c,c,a);this.texture.isWebGLCubeRenderTargetTexture=!0}function oc(c,a,b,d,e,f,g,h,k,n,r,u){ha.call(this,null,f,g,h,k,n,d,e,r,u);this.image={data:c||
|
|
|
+this.projectionMatrixInverse=new z}function ja(c,a,b,d){pb.call(this);this.type="PerspectiveCamera";this.fov=void 0!==c?c:50;this.zoom=1;this.near=void 0!==b?b:.1;this.far=void 0!==d?d:2E3;this.focus=10;this.aspect=void 0!==a?a:1;this.view=null;this.filmGauge=35;this.filmOffset=0;this.updateProjectionMatrix()}function Tc(c,a,b){K.call(this);this.type="CubeCamera";if(!0!==b.isWebGLCubeRenderTarget)console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");
|
|
|
+else{this.renderTarget=b;var d=new ja(90,1,c,a);d.layers=this.layers;d.up.set(0,-1,0);d.lookAt(new m(1,0,0));this.add(d);var e=new ja(90,1,c,a);e.layers=this.layers;e.up.set(0,-1,0);e.lookAt(new m(-1,0,0));this.add(e);var f=new ja(90,1,c,a);f.layers=this.layers;f.up.set(0,0,1);f.lookAt(new m(0,1,0));this.add(f);var g=new ja(90,1,c,a);g.layers=this.layers;g.up.set(0,0,-1);g.lookAt(new m(0,-1,0));this.add(g);var h=new ja(90,1,c,a);h.layers=this.layers;h.up.set(0,-1,0);h.lookAt(new m(0,0,1));this.add(h);
|
|
|
+var k=new ja(90,1,c,a);k.layers=this.layers;k.up.set(0,-1,0);k.lookAt(new m(0,0,-1));this.add(k);this.update=function(a,c){null===this.parent&&this.updateMatrixWorld();var n=a.xr.enabled,r=a.getRenderTarget();a.xr.enabled=!1;var l=b.texture.generateMipmaps;b.texture.generateMipmaps=!1;a.setRenderTarget(b,0);a.render(c,d);a.setRenderTarget(b,1);a.render(c,e);a.setRenderTarget(b,2);a.render(c,f);a.setRenderTarget(b,3);a.render(c,g);a.setRenderTarget(b,4);a.render(c,h);b.texture.generateMipmaps=l;a.setRenderTarget(b,
|
|
|
+5);a.render(c,k);a.setRenderTarget(r);a.xr.enabled=n};this.clear=function(a,c,d,e){for(var f=a.getRenderTarget(),g=0;6>g;g++)a.setRenderTarget(b,g),a.clear(c,d,e);a.setRenderTarget(f)}}}function Rb(c,a,b){Number.isInteger(a)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),a=b);Ta.call(this,c,c,a);this.texture.isWebGLCubeRenderTargetTexture=!0}function oc(c,a,b,d,e,f,g,h,k,n,r,u){ia.call(this,null,f,g,h,k,n,d,e,r,u);this.image={data:c||
|
|
|
null,width:a||1,height:b||1};this.magFilter=void 0!==k?k:1003;this.minFilter=void 0!==n?n:1003;this.flipY=this.generateMipmaps=!1;this.unpackAlignment=1;this.needsUpdate=!0}function Ah(){function c(b,g){d(b,g);e=a.requestAnimationFrame(c)}var a=null,b=!1,d=null,e=null;return{start:function(){!0!==b&&null!==d&&(e=a.requestAnimationFrame(c),b=!0)},stop:function(){a.cancelAnimationFrame(e);b=!1},setAnimationLoop:function(a){d=a},setContext:function(b){a=b}}}function lj(c,a){function b(a,b){var d=a.array,
|
|
|
e=a.usage,f=c.createBuffer();c.bindBuffer(b,f);c.bufferData(b,d,e);a.onUploadCallback();b=5126;d instanceof Float32Array?b=5126:d instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):d instanceof Uint16Array?b=5123:d instanceof Int16Array?b=5122:d instanceof Uint32Array?b=5125:d instanceof Int32Array?b=5124:d instanceof Int8Array?b=5120:d instanceof Uint8Array&&(b=5121);return{buffer:f,type:b,bytesPerElement:d.BYTES_PER_ELEMENT,version:a.version}}
|
|
|
var d=a.isWebGL2,e=new WeakMap;return{get:function(a){a.isInterleavedBufferAttribute&&(a=a.data);return e.get(a)},remove:function(a){a.isInterleavedBufferAttribute&&(a=a.data);var b=e.get(a);b&&(c.deleteBuffer(b.buffer),e.delete(a))},update:function(a,g){a.isInterleavedBufferAttribute&&(a=a.data);var f=e.get(a);if(void 0===f)e.set(a,b(a,g));else if(f.version<a.version){var k=a.array,n=a.updateRange;c.bindBuffer(g,f.buffer);-1===n.count?c.bufferSubData(g,0,k):(d?c.bufferSubData(g,n.offset*k.BYTES_PER_ELEMENT,
|
|
@@ -56,7 +56,7 @@ return}k[q](f,n,g,d*h,r);b.update(n,f,r)}}}function vj(c){var a={frame:0,calls:0
|
|
|
c)}}}}function wj(c,a){return c[0]-a[0]}function xj(c,a){return Math.abs(a[1])-Math.abs(c[1])}function yj(c){for(var a={},b=new Float32Array(8),d=[],e=0;8>e;e++)d[e]=[e,0];return{update:function(e,g,h,k){var f=e.morphTargetInfluences;e=void 0===f?0:f.length;var r=a[g.id];if(void 0===r){r=[];for(var u=0;u<e;u++)r[u]=[u,0];a[g.id]=r}for(u=0;u<e;u++){var q=r[u];q[0]=u;q[1]=f[u]}r.sort(xj);for(f=0;8>f;f++)f<e&&r[f][1]?(d[f][0]=r[f][0],d[f][1]=r[f][1]):(d[f][0]=Number.MAX_SAFE_INTEGER,d[f][1]=0);d.sort(wj);
|
|
|
e=h.morphTargets&&g.morphAttributes.position;h=h.morphNormals&&g.morphAttributes.normal;for(f=r=0;8>f;f++)q=d[f],u=q[0],q=q[1],u!==Number.MAX_SAFE_INTEGER&&q?(e&&g.getAttribute("morphTarget"+f)!==e[u]&&g.setAttribute("morphTarget"+f,e[u]),h&&g.getAttribute("morphNormal"+f)!==h[u]&&g.setAttribute("morphNormal"+f,h[u]),b[f]=q,r+=q):(e&&void 0!==g.getAttribute("morphTarget"+f)&&g.deleteAttribute("morphTarget"+f),h&&void 0!==g.getAttribute("morphNormal"+f)&&g.deleteAttribute("morphNormal"+f),b[f]=0);
|
|
|
g=g.morphTargetsRelative?1:1-r;k.getUniforms().setValue(c,"morphTargetBaseInfluence",g);k.getUniforms().setValue(c,"morphTargetInfluences",b)}}}function zj(c,a,b,d){var e=new WeakMap;return{update:function(c){var f=d.render.frame,h=c.geometry,k=a.get(c,h);e.get(k)!==f&&(h.isGeometry&&k.updateFromObject(c),a.update(k),e.set(k,f));c.isInstancedMesh&&(b.update(c.instanceMatrix,34962),null!==c.instanceColor&&b.update(c.instanceColor,34962));return k},dispose:function(){e=new WeakMap}}}function Ab(c,a,
|
|
|
-b,d,e,f,g,h,k,n){c=void 0!==c?c:[];ha.call(this,c,void 0!==a?a:301,b,d,e,f,void 0!==g?g:1022,h,k,n);this.flipY=!1}function Uc(c,a,b,d){ha.call(this,null);this.image={data:c||null,width:a||1,height:b||1,depth:d||1};this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=!1;this.needsUpdate=!0}function Vc(c,a,b,d){ha.call(this,null);this.image={data:c||null,width:a||1,height:b||1,depth:d||1};this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=
|
|
|
+b,d,e,f,g,h,k,n){c=void 0!==c?c:[];ia.call(this,c,void 0!==a?a:301,b,d,e,f,void 0!==g?g:1022,h,k,n);this.flipY=!1}function Uc(c,a,b,d){ia.call(this,null);this.image={data:c||null,width:a||1,height:b||1,depth:d||1};this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=!1;this.needsUpdate=!0}function Vc(c,a,b,d){ia.call(this,null);this.image={data:c||null,width:a||1,height:b||1,depth:d||1};this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=
|
|
|
!1;this.needsUpdate=!0}function Wc(c,a,b){var d=c[0];if(0>=d||0<d)return c;var e=a*b,f=Bh[e];void 0===f&&(f=new Float32Array(e),Bh[e]=f);if(0!==a)for(d.toArray(f,0),d=1,e=0;d!==a;++d)e+=b,c[d].toArray(f,e);return f}function ab(c,a){if(c.length!==a.length)return!1;for(var b=0,d=c.length;b<d;b++)if(c[b]!==a[b])return!1;return!0}function Ua(c,a){for(var b=0,d=a.length;b<d;b++)c[b]=a[b]}function Ch(c,a){var b=Dh[a];void 0===b&&(b=new Int32Array(a),Dh[a]=b);for(var d=0;d!==a;++d)b[d]=c.allocateTextureUnit();
|
|
|
return b}function Aj(c,a){var b=this.cache;b[0]!==a&&(c.uniform1f(this.addr,a),b[0]=a)}function Bj(c,a){var b=this.cache;if(void 0!==a.x){if(b[0]!==a.x||b[1]!==a.y)c.uniform2f(this.addr,a.x,a.y),b[0]=a.x,b[1]=a.y}else ab(b,a)||(c.uniform2fv(this.addr,a),Ua(b,a))}function Cj(c,a){var b=this.cache;if(void 0!==a.x){if(b[0]!==a.x||b[1]!==a.y||b[2]!==a.z)c.uniform3f(this.addr,a.x,a.y,a.z),b[0]=a.x,b[1]=a.y,b[2]=a.z}else if(void 0!==a.r){if(b[0]!==a.r||b[1]!==a.g||b[2]!==a.b)c.uniform3f(this.addr,a.r,a.g,
|
|
|
a.b),b[0]=a.r,b[1]=a.g,b[2]=a.b}else ab(b,a)||(c.uniform3fv(this.addr,a),Ua(b,a))}function Dj(c,a){var b=this.cache;if(void 0!==a.x){if(b[0]!==a.x||b[1]!==a.y||b[2]!==a.z||b[3]!==a.w)c.uniform4f(this.addr,a.x,a.y,a.z,a.w),b[0]=a.x,b[1]=a.y,b[2]=a.z,b[3]=a.w}else ab(b,a)||(c.uniform4fv(this.addr,a),Ua(b,a))}function Ej(c,a){var b=this.cache,d=a.elements;void 0===d?ab(b,a)||(c.uniformMatrix2fv(this.addr,!1,a),Ua(b,a)):ab(b,d)||(Eh.set(d),c.uniformMatrix2fv(this.addr,!1,Eh),Ua(b,d))}function Fj(c,a){var b=
|
|
@@ -168,9 +168,9 @@ S=!0),a=a.texture);a&&a.isCubeTexture||Array.isArray(a.image)&&6===a.image.lengt
|
|
|
null}if(1021===b)return 6406;if(1022===b)return 6407;if(1023===b)return 6408;if(1024===b)return 6409;if(1025===b)return 6410;if(1026===b)return 6402;if(1027===b)return 34041;if(1028===b)return 6403;if(1029===b)return 36244;if(1030===b)return 33319;if(1031===b)return 33320;if(1032===b)return 36248;if(1033===b)return 36249;if(33776===b||33777===b||33778===b||33779===b)if(c=a.get("WEBGL_compressed_texture_s3tc"),null!==c){if(33776===b)return c.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===b)return c.COMPRESSED_RGBA_S3TC_DXT1_EXT;
|
|
|
if(33778===b)return c.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===b)return c.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(35840===b||35841===b||35842===b||35843===b)if(c=a.get("WEBGL_compressed_texture_pvrtc"),null!==c){if(35840===b)return c.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===b)return c.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===b)return c.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===b)return c.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(36196===b)return c=a.get("WEBGL_compressed_texture_etc1"),
|
|
|
null!==c?c.COMPRESSED_RGB_ETC1_WEBGL:null;if(37492===b||37496===b)if(c=a.get("WEBGL_compressed_texture_etc"),null!==c){if(37492===b)return c.COMPRESSED_RGB8_ETC2;if(37496===b)return c.COMPRESSED_RGBA8_ETC2_EAC}if(37808===b||37809===b||37810===b||37811===b||37812===b||37813===b||37814===b||37815===b||37816===b||37817===b||37818===b||37819===b||37820===b||37821===b||37840===b||37841===b||37842===b||37843===b||37844===b||37845===b||37846===b||37847===b||37848===b||37849===b||37850===b||37851===b||37852===
|
|
|
-b||37853===b)return c=a.get("WEBGL_compressed_texture_astc"),null!==c?b:null;if(36492===b)return c=a.get("EXT_texture_compression_bptc"),null!==c?b:null;if(1020===b){if(d)return 34042;c=a.get("WEBGL_depth_texture");return null!==c?c.UNSIGNED_INT_24_8_WEBGL:null}}}}function af(c){ia.call(this);this.cameras=c||[]}function Wb(){K.call(this);this.type="Group"}function Zd(){this._hand=this._grip=this._targetRay=null}function Zh(c,a){function b(a){var b=t.get(a.inputSource);b&&b.dispatchEvent({type:a.type})}
|
|
|
+b||37853===b)return c=a.get("WEBGL_compressed_texture_astc"),null!==c?b:null;if(36492===b)return c=a.get("EXT_texture_compression_bptc"),null!==c?b:null;if(1020===b){if(d)return 34042;c=a.get("WEBGL_depth_texture");return null!==c?c.UNSIGNED_INT_24_8_WEBGL:null}}}}function af(c){ja.call(this);this.cameras=c||[]}function Wb(){K.call(this);this.type="Group"}function Zd(){this._hand=this._grip=this._targetRay=null}function Zh(c,a){function b(a){var b=t.get(a.inputSource);b&&b.dispatchEvent({type:a.type})}
|
|
|
function d(){t.forEach(function(a,b){a.disconnect(b)});t.clear();c.setFramebuffer(null);c.setRenderTarget(c.getRenderTarget());O.stop();h.isPresenting=!1;h.dispatchEvent({type:"sessionend"})}function e(a){r=a;O.setContext(k);O.start();h.isPresenting=!0;h.dispatchEvent({type:"sessionstart"})}function f(a){for(var b=k.inputSources,c=0;c<v.length;c++)t.set(b[c],v[c]);for(b=0;b<a.removed.length;b++){c=a.removed[b];var d=t.get(c);d&&(d.dispatchEvent({type:"disconnected",data:c}),t.delete(c))}for(b=0;b<
|
|
|
-a.added.length;b++)c=a.added[b],(d=t.get(c))&&d.dispatchEvent({type:"connected",data:c})}function g(a,b){null===b?a.matrixWorld.copy(a.matrix):a.matrixWorld.multiplyMatrices(b.matrixWorld,a.matrix);a.matrixWorldInverse.getInverse(a.matrixWorld)}var h=this,k=null,n=1,r=null,u="local-floor",l=null,v=[],t=new Map,w=new ia;w.layers.enable(1);w.viewport=new D;var y=new ia;y.layers.enable(2);y.viewport=new D;var x=[w,y],p=new af;p.layers.enable(1);p.layers.enable(2);var C=null,Y=null;this.isPresenting=
|
|
|
+a.added.length;b++)c=a.added[b],(d=t.get(c))&&d.dispatchEvent({type:"connected",data:c})}function g(a,b){null===b?a.matrixWorld.copy(a.matrix):a.matrixWorld.multiplyMatrices(b.matrixWorld,a.matrix);a.matrixWorldInverse.getInverse(a.matrixWorld)}var h=this,k=null,n=1,r=null,u="local-floor",l=null,v=[],t=new Map,w=new ja;w.layers.enable(1);w.viewport=new D;var y=new ja;y.layers.enable(2);y.viewport=new D;var x=[w,y],p=new af;p.layers.enable(1);p.layers.enable(2);var C=null,Y=null;this.isPresenting=
|
|
|
this.enabled=!1;this.getController=function(a){var b=v[a];void 0===b&&(b=new Zd,v[a]=b);return b.getTargetRaySpace()};this.getControllerGrip=function(a){var b=v[a];void 0===b&&(b=new Zd,v[a]=b);return b.getGripSpace()};this.getHand=function(a){var b=v[a];void 0===b&&(b=new Zd,v[a]=b);return b.getHandSpace()};this.setFramebufferScaleFactor=function(a){n=a;!0===h.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")};this.setReferenceSpaceType=function(a){u=
|
|
|
a;!0===h.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")};this.getReferenceSpace=function(){return r};this.getSession=function(){return k};this.setSession=function(c){k=c;null!==k&&(k.addEventListener("select",b),k.addEventListener("selectstart",b),k.addEventListener("selectend",b),k.addEventListener("squeeze",b),k.addEventListener("squeezestart",b),k.addEventListener("squeezeend",b),k.addEventListener("end",d),c=a.getContextAttributes(),!0!==
|
|
|
c.xrCompatible&&a.makeXRCompatible(),c=new XRWebGLLayer(k,a,{antialias:c.antialias,alpha:c.alpha,depth:c.depth,stencil:c.stencil,framebufferScaleFactor:n}),k.updateRenderState({baseLayer:c}),k.requestReferenceSpace(u).then(e),k.addEventListener("inputsourceschange",f))};var H=new m,A=new m;this.getCamera=function(a){p.near=y.near=w.near=a.near;p.far=y.far=w.far=a.far;if(C!==p.near||Y!==p.far)k.updateRenderState({depthNear:p.near,depthFar:p.far}),C=p.near,Y=p.far;var b=a.parent,c=p.cameras;g(p,b);
|
|
@@ -190,38 +190,38 @@ e.displacementBias),c.referencePosition.value.copy(e.referencePosition),c.nearDi
|
|
|
c.displacementBias.value=e.displacementBias);else if(e.isLineBasicMaterial)c.diffuse.value.copy(e.color),c.opacity.value=e.opacity,e.isLineDashedMaterial&&(c.dashSize.value=e.dashSize,c.totalSize.value=e.dashSize+e.gapSize,c.scale.value=e.scale);else if(e.isPointsMaterial){c.diffuse.value.copy(e.color);c.opacity.value=e.opacity;c.size.value=e.size*f;c.scale.value=.5*g;e.map&&(c.map.value=e.map);e.alphaMap&&(c.alphaMap.value=e.alphaMap);if(e.map)var d=e.map;else e.alphaMap&&(d=e.alphaMap);void 0!==
|
|
|
d&&(!0===d.matrixAutoUpdate&&d.updateMatrix(),c.uvTransform.value.copy(d.matrix))}else if(e.isSpriteMaterial){c.diffuse.value.copy(e.color);c.opacity.value=e.opacity;c.rotation.value=e.rotation;e.map&&(c.map.value=e.map);e.alphaMap&&(c.alphaMap.value=e.alphaMap);if(e.map)var k=e.map;else e.alphaMap&&(k=e.alphaMap);void 0!==k&&(!0===k.matrixAutoUpdate&&k.updateMatrix(),c.uvTransform.value.copy(k.matrix))}else e.isShadowMaterial?(c.color.value.copy(e.color),c.opacity.value=e.opacity):e.isShaderMaterial&&
|
|
|
(e.uniformsNeedUpdate=!1)}}}function $d(c){function a(a,b){for(var c=0;c<a.length;c++){var d=v.getContext(a[c],b);if(null!==d)return d}return null}function b(){ya=new sj(P);Ha=new pj(P,ya,c);!1===Ha.isWebGL2&&(ya.get("WEBGL_depth_texture"),ya.get("OES_texture_float"),ya.get("OES_texture_half_float"),ya.get("OES_texture_half_float_linear"),ya.get("OES_standard_derivatives"),ya.get("OES_element_index_uint"),ya.get("OES_vertex_array_object"),ya.get("ANGLE_instanced_arrays"));ya.get("OES_texture_float_linear");
|
|
|
-va=new Yh(P,ya,Ha);za=new Ck(P,ya,Ha);za.scissor(V.copy(ba).multiplyScalar(W).floor());za.viewport(Q.copy(ca).multiplyScalar(W).floor());qb=new vj(P);T=new sk;aa=new Dk(P,ya,za,T,Ha,va,qb);ja=new rj(da);pa=new lj(P,Ha);oa=new nj(P,ya,pa,Ha);sa=new tj(P,pa,qb,oa);na=new zj(P,sa,pa,qb);Ba=new yj(P);ia=new qj(T);ka=new rk(da,ja,ya,Ha,oa,ia);ua=new Ek(T);wa=new vk(T);ta=new Bk;ra=new mj(da,ja,za,na,C);Da=new oj(P,ya,qb,Ha);Ea=new uj(P,ya,qb,Ha);qb.programs=ka.programs;da.capabilities=Ha;da.extensions=
|
|
|
+va=new Yh(P,ya,Ha);za=new Ck(P,ya,Ha);za.scissor(V.copy(ba).multiplyScalar(W).floor());za.viewport(Q.copy(ca).multiplyScalar(W).floor());qb=new vj(P);T=new sk;aa=new Dk(P,ya,za,T,Ha,va,qb);ha=new rj(da);pa=new lj(P,Ha);oa=new nj(P,ya,pa,Ha);sa=new tj(P,pa,qb,oa);na=new zj(P,sa,pa,qb);Ba=new yj(P);ja=new qj(T);ka=new rk(da,ha,ya,Ha,oa,ja);ua=new Ek(T);wa=new vk(T);ta=new Bk;ra=new mj(da,ha,za,na,C);Da=new oj(P,ya,qb,Ha);Ea=new uj(P,ya,qb,Ha);qb.programs=ka.programs;da.capabilities=Ha;da.extensions=
|
|
|
ya;da.properties=T;da.renderLists=wa;da.state=za;da.info=qb}function d(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");F=!0}function e(){console.log("THREE.WebGLRenderer: Context Restored.");F=!1;b()}function f(a){a=a.target;a.removeEventListener("dispose",f);g(a);T.remove(a)}function g(a){a=T.get(a).program;void 0!==a&&ka.releaseProgram(a)}function h(a,b){a.render(function(a){da.renderBufferImmediate(a,b)})}function k(a,b,c,d){if(!1!==a.visible){if(a.layers.test(b.layers))if(a.isGroup)c=
|
|
|
-a.renderOrder;else if(a.isLOD)!0===a.autoUpdate&&a.update(b);else if(a.isLight)O.pushLight(a),a.castShadow&&O.pushShadow(a);else if(a.isSprite){if(!a.frustumCulled||ha.intersectsSprite(a)){d&&Vb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Yd);var e=na.update(a),f=a.material;f.visible&&L.push(a,e,f,c,Vb.z,null)}}else if(a.isImmediateRenderObject)d&&Vb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Yd),L.push(a,null,a.material,c,Vb.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&
|
|
|
-a.skeleton.frame!==qb.render.frame&&(a.skeleton.update(),a.skeleton.frame=qb.render.frame),!a.frustumCulled||ha.intersectsObject(a))if(d&&Vb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Yd),e=na.update(a),f=a.material,Array.isArray(f))for(var g=e.groups,h=0,n=g.length;h<n;h++){var r=g[h],u=f[r.materialIndex];u&&u.visible&&L.push(a,e,u,c,Vb.z,r)}else f.visible&&L.push(a,e,f,c,Vb.z,null);a=a.children;e=0;for(f=a.length;e<f;e++)k(a[e],b,c,d)}}function n(a,b,c){for(var d=!0===b.isScene?b.overrideMaterial:
|
|
|
+a.renderOrder;else if(a.isLOD)!0===a.autoUpdate&&a.update(b);else if(a.isLight)O.pushLight(a),a.castShadow&&O.pushShadow(a);else if(a.isSprite){if(!a.frustumCulled||ia.intersectsSprite(a)){d&&Vb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Yd);var e=na.update(a),f=a.material;f.visible&&L.push(a,e,f,c,Vb.z,null)}}else if(a.isImmediateRenderObject)d&&Vb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Yd),L.push(a,null,a.material,c,Vb.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&
|
|
|
+a.skeleton.frame!==qb.render.frame&&(a.skeleton.update(),a.skeleton.frame=qb.render.frame),!a.frustumCulled||ia.intersectsObject(a))if(d&&Vb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Yd),e=na.update(a),f=a.material,Array.isArray(f))for(var g=e.groups,h=0,n=g.length;h<n;h++){var r=g[h],u=f[r.materialIndex];u&&u.visible&&L.push(a,e,u,c,Vb.z,r)}else f.visible&&L.push(a,e,f,c,Vb.z,null);a=a.children;e=0;for(f=a.length;e<f;e++)k(a[e],b,c,d)}}function n(a,b,c){for(var d=!0===b.isScene?b.overrideMaterial:
|
|
|
null,e=0,f=a.length;e<f;e++){var g=a[e],h=g.object,k=g.geometry,n=null===d?g.material:d;g=g.group;if(c.isArrayCamera){S=c;for(var u=c.cameras,l=0,q=u.length;l<q;l++){var m=u[l];h.layers.test(m.layers)&&(za.viewport(Q.copy(m.viewport)),O.setupLights(m),r(h,b,m,k,n,g))}}else S=null,r(h,b,c,k,n,g)}}function r(a,b,c,d,e,f){a.onBeforeRender(da,b,c,d,e,f);O=ta.get(b,S||c);a.modelViewMatrix.multiplyMatrices(c.matrixWorldInverse,a.matrixWorld);a.normalMatrix.getNormalMatrix(a.modelViewMatrix);if(a.isImmediateRenderObject){var g=
|
|
|
-l(c,b,e,a);za.setMaterial(e);oa.reset();h(a,g)}else da.renderBufferDirect(c,b,d,e,a,f);a.onAfterRender(da,b,c,d,e,f);O=ta.get(b,S||c)}function u(a,b,c){!0!==b.isScene&&(b=yg);var d=T.get(a),e=O.state.lights,h=e.state.version;c=ka.getParameters(a,e.state,O.state.shadowsArray,b,c);var k=ka.getProgramCacheKey(c),n=d.program,r=!0;if(void 0===n)a.addEventListener("dispose",f);else if(n.cacheKey!==k)g(a);else{if(d.lightsStateVersion!==h)d.lightsStateVersion=h;else if(void 0!==c.shaderID)return;r=!1}r&&
|
|
|
-(c.uniforms=ka.getUniforms(a,c),a.onBeforeCompile(c,da),n=ka.acquireProgram(c,k),d.program=n,d.uniforms=c.uniforms,d.outputEncoding=c.outputEncoding);c=n.getAttributes();if(a.morphTargets)for(k=a.numSupportedMorphTargets=0;k<da.maxMorphTargets;k++)0<=c["morphTarget"+k]&&a.numSupportedMorphTargets++;if(a.morphNormals)for(k=a.numSupportedMorphNormals=0;k<da.maxMorphNormals;k++)0<=c["morphNormal"+k]&&a.numSupportedMorphNormals++;c=d.uniforms;if(!a.isShaderMaterial&&!a.isRawShaderMaterial||!0===a.clipping)d.numClippingPlanes=
|
|
|
-ia.numPlanes,d.numIntersection=ia.numIntersection,c.clippingPlanes=ia.uniform;d.environment=a.isMeshStandardMaterial?b.environment:null;d.fog=b.fog;d.envMap=ja.get(a.envMap||d.environment);d.needsLights=a.isMeshLambertMaterial||a.isMeshToonMaterial||a.isMeshPhongMaterial||a.isMeshStandardMaterial||a.isShadowMaterial||a.isShaderMaterial&&!0===a.lights;d.lightsStateVersion=h;d.needsLights&&(c.ambientLightColor.value=e.state.ambient,c.lightProbe.value=e.state.probe,c.directionalLights.value=e.state.directional,
|
|
|
-c.directionalLightShadows.value=e.state.directionalShadow,c.spotLights.value=e.state.spot,c.spotLightShadows.value=e.state.spotShadow,c.rectAreaLights.value=e.state.rectArea,c.ltc_1.value=e.state.rectAreaLTC1,c.ltc_2.value=e.state.rectAreaLTC2,c.pointLights.value=e.state.point,c.pointLightShadows.value=e.state.pointShadow,c.hemisphereLights.value=e.state.hemi,c.directionalShadowMap.value=e.state.directionalShadowMap,c.directionalShadowMatrix.value=e.state.directionalShadowMatrix,c.spotShadowMap.value=
|
|
|
-e.state.spotShadowMap,c.spotShadowMatrix.value=e.state.spotShadowMatrix,c.pointShadowMap.value=e.state.pointShadowMap,c.pointShadowMatrix.value=e.state.pointShadowMatrix);a=d.program.getUniforms();a=Sb.seqWithValue(a.seq,c);d.uniformsList=a}function l(a,b,c,d){!0!==b.isScene&&(b=yg);aa.resetTextureUnits();var e=b.fog,f=c.isMeshStandardMaterial?b.environment:null,g=null===J?da.outputEncoding:J.texture.encoding,h=ja.get(c.envMap||f),k=T.get(c),n=O.state.lights;!0!==la||!0!==qa&&a===M||ia.setState(c,
|
|
|
-a,a===M&&c.id===N);c.version===k.__version?void 0===k.program?u(c,b,d):c.fog&&k.fog!==e?u(c,b,d):k.environment!==f?u(c,b,d):k.needsLights&&k.lightsStateVersion!==n.state.version?u(c,b,d):void 0===k.numClippingPlanes||k.numClippingPlanes===ia.numPlanes&&k.numIntersection===ia.numIntersection?k.outputEncoding!==g?u(c,b,d):k.envMap!==h&&(u(c,b,d),k.envMap=h):u(c,b,d):(u(c,b,d),k.__version=c.version);var r=!1;n=h=!1;b=k.program;f=b.getUniforms();g=k.uniforms;za.useProgram(b.program)&&(n=h=r=!0);c.id!==
|
|
|
-N&&(N=c.id,h=!0);if(r||M!==a){f.setValue(P,"projectionMatrix",a.projectionMatrix);Ha.logarithmicDepthBuffer&&f.setValue(P,"logDepthBufFC",2/(Math.log(a.far+1)/Math.LN2));M!==a&&(M=a,n=h=!0);if(c.isShaderMaterial||c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshStandardMaterial||c.envMap)r=f.map.cameraPosition,void 0!==r&&r.setValue(P,Vb.setFromMatrixPosition(a.matrixWorld));(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||
|
|
|
-c.isShaderMaterial)&&f.setValue(P,"isOrthographic",!0===a.isOrthographicCamera);(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial||c.isShadowMaterial||c.skinning)&&f.setValue(P,"viewMatrix",a.matrixWorldInverse)}if(c.skinning&&(f.setOptional(P,d,"bindMatrix"),f.setOptional(P,d,"bindMatrixInverse"),a=d.skeleton))if(r=a.bones,Ha.floatVertexTextures){if(void 0===a.boneTexture){r=Math.sqrt(4*r.length);r=R.ceilPowerOfTwo(r);
|
|
|
-r=Math.max(r,4);var l=new Float32Array(r*r*4);l.set(a.boneMatrices);var q=new oc(l,r,r,1023,1015);a.boneMatrices=l;a.boneTexture=q;a.boneTextureSize=r}f.setValue(P,"boneTexture",a.boneTexture,aa);f.setValue(P,"boneTextureSize",a.boneTextureSize)}else f.setOptional(P,a,"boneMatrices");if(h||k.receiveShadow!==d.receiveShadow)k.receiveShadow=d.receiveShadow,f.setValue(P,"receiveShadow",d.receiveShadow);h&&(f.setValue(P,"toneMappingExposure",da.toneMappingExposure),k.needsLights&&(a=n,g.ambientLightColor.needsUpdate=
|
|
|
-a,g.lightProbe.needsUpdate=a,g.directionalLights.needsUpdate=a,g.directionalLightShadows.needsUpdate=a,g.pointLights.needsUpdate=a,g.pointLightShadows.needsUpdate=a,g.spotLights.needsUpdate=a,g.spotLightShadows.needsUpdate=a,g.rectAreaLights.needsUpdate=a,g.hemisphereLights.needsUpdate=a),e&&c.fog&&ua.refreshFogUniforms(g,e),ua.refreshMaterialUniforms(g,c,W,Va),Sb.upload(P,k.uniformsList,g,aa));c.isShaderMaterial&&!0===c.uniformsNeedUpdate&&(Sb.upload(P,k.uniformsList,g,aa),c.uniformsNeedUpdate=!1);
|
|
|
-c.isSpriteMaterial&&f.setValue(P,"center",d.center);f.setValue(P,"modelViewMatrix",d.modelViewMatrix);f.setValue(P,"normalMatrix",d.normalMatrix);f.setValue(P,"modelMatrix",d.matrixWorld);return b}c=c||{};var v=void 0!==c.canvas?c.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),t=void 0!==c.context?c.context:null,w=void 0!==c.alpha?c.alpha:!1,y=void 0!==c.depth?c.depth:!0,x=void 0!==c.stencil?c.stencil:!0,B=void 0!==c.antialias?c.antialias:!1,C=void 0!==c.premultipliedAlpha?
|
|
|
-c.premultipliedAlpha:!0,Y=void 0!==c.preserveDrawingBuffer?c.preserveDrawingBuffer:!1,H=void 0!==c.powerPreference?c.powerPreference:"default",A=void 0!==c.failIfMajorPerformanceCaveat?c.failIfMajorPerformanceCaveat:!1,L=null,O=null;this.domElement=v;this.debug={checkShaderErrors:!0};this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=!1;this.gammaFactor=2;this.outputEncoding=3E3;this.physicallyCorrectLights=
|
|
|
-!1;this.toneMapping=0;this.toneMappingExposure=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var da=this,F=!1,E=null,G=0,K=0,J=null,I=null,N=-1,M=null,S=null,Q=new D,V=new D,U=null,Z=v.width,Va=v.height,W=1,X=null,ea=null,ca=new D(0,0,Z,Va),ba=new D(0,0,Z,Va),fa=!1,ha=new Na,la=!1,qa=!1,Yd=new z,Vb=new m,yg={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0},P=t;try{t={alpha:w,depth:y,stencil:x,antialias:B,premultipliedAlpha:C,preserveDrawingBuffer:Y,powerPreference:H,failIfMajorPerformanceCaveat:A};
|
|
|
-v.addEventListener("webglcontextlost",d,!1);v.addEventListener("webglcontextrestored",e,!1);if(null===P&&(w=["webgl2","webgl","experimental-webgl"],!0===da.isWebGL1Renderer&&w.shift(),P=a(w,t),null===P)){if(a(w))throw Error("Error creating WebGL context with your selected attributes.");throw Error("Error creating WebGL context.");}void 0===P.getShaderPrecisionFormat&&(P.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch($h){throw console.error("THREE.WebGLRenderer: "+
|
|
|
-$h.message),$h;}var ya,Ha,za,qb,T,aa,ja,pa,sa,na,ka,ua,wa,ta,ia,ra,Ba,Da,Ea,va,oa;b();var xa=new Zh(da,P);this.xr=xa;var Ga=new Xh(da,na,Ha.maxTextureSize);this.shadowMap=Ga;this.getContext=function(){return P};this.getContextAttributes=function(){return P.getContextAttributes()};this.forceContextLoss=function(){var a=ya.get("WEBGL_lose_context");a&&a.loseContext()};this.forceContextRestore=function(){var a=ya.get("WEBGL_lose_context");a&&a.restoreContext()};this.getPixelRatio=function(){return W};
|
|
|
-this.setPixelRatio=function(a){void 0!==a&&(W=a,this.setSize(Z,Va,!1))};this.getSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),a=new p);return a.set(Z,Va)};this.setSize=function(a,b,c){xa.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(Z=a,Va=b,v.width=Math.floor(a*W),v.height=Math.floor(b*W),!1!==c&&(v.style.width=a+"px",v.style.height=b+"px"),this.setViewport(0,0,a,b))};this.getDrawingBufferSize=
|
|
|
-function(a){void 0===a&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),a=new p);return a.set(Z*W,Va*W).floor()};this.setDrawingBufferSize=function(a,b,c){Z=a;Va=b;W=c;v.width=Math.floor(a*c);v.height=Math.floor(b*c);this.setViewport(0,0,a,b)};this.getCurrentViewport=function(a){void 0===a&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),a=new D);return a.copy(Q)};this.getViewport=function(a){return a.copy(ca)};
|
|
|
-this.setViewport=function(a,b,c,d){a.isVector4?ca.set(a.x,a.y,a.z,a.w):ca.set(a,b,c,d);za.viewport(Q.copy(ca).multiplyScalar(W).floor())};this.getScissor=function(a){return a.copy(ba)};this.setScissor=function(a,b,c,d){a.isVector4?ba.set(a.x,a.y,a.z,a.w):ba.set(a,b,c,d);za.scissor(V.copy(ba).multiplyScalar(W).floor())};this.getScissorTest=function(){return fa};this.setScissorTest=function(a){za.setScissorTest(fa=a)};this.setOpaqueSort=function(a){X=a};this.setTransparentSort=function(a){ea=a};this.getClearColor=
|
|
|
-function(){return ra.getClearColor()};this.setClearColor=function(){ra.setClearColor.apply(ra,arguments)};this.getClearAlpha=function(){return ra.getClearAlpha()};this.setClearAlpha=function(){ra.setClearAlpha.apply(ra,arguments)};this.clear=function(a,b,c){var d=0;if(void 0===a||a)d|=16384;if(void 0===b||b)d|=256;if(void 0===c||c)d|=1024;P.clear(d)};this.clearColor=function(){this.clear(!0,!1,!1)};this.clearDepth=function(){this.clear(!1,!0,!1)};this.clearStencil=function(){this.clear(!1,!1,!0)};
|
|
|
-this.dispose=function(){v.removeEventListener("webglcontextlost",d,!1);v.removeEventListener("webglcontextrestored",e,!1);wa.dispose();ta.dispose();T.dispose();ja.dispose();na.dispose();oa.dispose();xa.dispose();Ca.stop()};this.renderBufferImmediate=function(a,b){oa.initAttributes();var c=T.get(a);a.hasPositions&&!c.position&&(c.position=P.createBuffer());a.hasNormals&&!c.normal&&(c.normal=P.createBuffer());a.hasUvs&&!c.uv&&(c.uv=P.createBuffer());a.hasColors&&!c.color&&(c.color=P.createBuffer());
|
|
|
-b=b.getAttributes();a.hasPositions&&(P.bindBuffer(34962,c.position),P.bufferData(34962,a.positionArray,35048),oa.enableAttribute(b.position),P.vertexAttribPointer(b.position,3,5126,!1,0,0));a.hasNormals&&(P.bindBuffer(34962,c.normal),P.bufferData(34962,a.normalArray,35048),oa.enableAttribute(b.normal),P.vertexAttribPointer(b.normal,3,5126,!1,0,0));a.hasUvs&&(P.bindBuffer(34962,c.uv),P.bufferData(34962,a.uvArray,35048),oa.enableAttribute(b.uv),P.vertexAttribPointer(b.uv,2,5126,!1,0,0));a.hasColors&&
|
|
|
-(P.bindBuffer(34962,c.color),P.bufferData(34962,a.colorArray,35048),oa.enableAttribute(b.color),P.vertexAttribPointer(b.color,3,5126,!1,0,0));oa.disableUnusedAttributes();P.drawArrays(4,0,a.count);a.count=0};this.renderBufferDirect=function(a,b,c,d,e,f){null===b&&(b=yg);var g=e.isMesh&&0>e.matrixWorld.determinant();a=l(a,b,d,e);za.setMaterial(d,g);g=c.index;b=c.attributes.position;if(null===g){if(void 0===b||0===b.count)return}else if(0===g.count)return;var h=1;!0===d.wireframe&&(g=sa.getWireframeAttribute(c),
|
|
|
-h=2);(d.morphTargets||d.morphNormals)&&Ba.update(e,c,d,a);oa.setup(e,d,a,c,g);a=Da;if(null!==g){var k=pa.get(g);a=Ea;a.setIndex(k)}var n=c.drawRange.start*h,r=null!==f?f.start*h:0;k=Math.max(n,r);f=Math.max(0,Math.min(null!==g?g.count:b.count,n+c.drawRange.count*h,r+(null!==f?f.count*h:Infinity))-1-k+1);0!==f&&(e.isMesh?!0===d.wireframe?(za.setLineWidth(d.wireframeLinewidth*(null===J?W:1)),a.setMode(1)):a.setMode(4):e.isLine?(d=d.linewidth,void 0===d&&(d=1),za.setLineWidth(d*(null===J?W:1)),e.isLineSegments?
|
|
|
-a.setMode(1):e.isLineLoop?a.setMode(2):a.setMode(3)):e.isPoints?a.setMode(0):e.isSprite&&a.setMode(4),e.isInstancedMesh?a.renderInstances(k,f,e.count):c.isInstancedBufferGeometry?a.renderInstances(k,f,Math.min(c.instanceCount,c._maxInstanceCount)):a.render(k,f))};this.compile=function(a,b){O=ta.get(a,b);O.init();a.traverse(function(a){a.isLight&&(O.pushLight(a),a.castShadow&&O.pushShadow(a))});O.setupLights(b);var c=new WeakMap;a.traverse(function(b){var d=b.material;if(d)if(Array.isArray(d))for(var e=
|
|
|
-0;e<d.length;e++){var f=d[e];!1===c.has(f)&&(u(f,a,b),c.set(f))}else!1===c.has(d)&&(u(d,a,b),c.set(d))})};var Fa=null,Ca=new Ah;Ca.setAnimationLoop(function(a){xa.isPresenting||Fa&&Fa(a)});"undefined"!==typeof window&&Ca.setContext(window);this.setAnimationLoop=function(a){Fa=a;xa.setAnimationLoop(a);null===a?Ca.stop():Ca.start()};this.render=function(a,b,c,d){if(void 0!==c){console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead.");var e=
|
|
|
-c}if(void 0!==d){console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead.");var f=d}if(void 0!==b&&!0!==b.isCamera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else if(!0!==F){oa.resetDefaultState();N=-1;M=null;!0===a.autoUpdate&&a.updateMatrixWorld();null===b.parent&&b.updateMatrixWorld();!0===xa.enabled&&!0===xa.isPresenting&&(b=xa.getCamera(b));if(!0===a.isScene)a.onBeforeRender(da,a,b,e||J);O=ta.get(a,
|
|
|
-b);O.init();Yd.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);ha.setFromProjectionMatrix(Yd);qa=this.localClippingEnabled;la=ia.init(this.clippingPlanes,qa,b);L=wa.get(a,b);L.init();k(a,b,0,da.sortObjects);L.finish();!0===da.sortObjects&&L.sort(X,ea);!0===la&&ia.beginShadows();Ga.render(O.state.shadowsArray,a,b);O.setupLights(b);!0===la&&ia.endShadows();!0===this.info.autoReset&&this.info.reset();void 0!==e&&this.setRenderTarget(e);ra.render(L,a,b,f);c=L.opaque;d=L.transparent;0<c.length&&
|
|
|
+l(c,b,e,a);za.setMaterial(e);oa.reset();h(a,g)}else da.renderBufferDirect(c,b,d,e,a,f);a.onAfterRender(da,b,c,d,e,f);O=ta.get(b,S||c)}function u(a,b,c){!0!==b.isScene&&(b=yg);var d=T.get(a),e=O.state.lights,h=e.state.version;c=ka.getParameters(a,e.state,O.state.shadowsArray,b,c);var k=ka.getProgramCacheKey(c),n=d.program,r=!0;if(void 0===n)a.addEventListener("dispose",f);else if(n.cacheKey!==k)g(a);else{if(d.lightsStateVersion!==h)d.lightsStateVersion=h;else if(void 0!==c.shaderID){b=a.isMeshStandardMaterial?
|
|
|
+b.environment:null;d.envMap=ha.get(a.envMap||b);return}r=!1}r&&(c.uniforms=ka.getUniforms(a,c),a.onBeforeCompile(c,da),n=ka.acquireProgram(c,k),d.program=n,d.uniforms=c.uniforms,d.outputEncoding=c.outputEncoding);c=n.getAttributes();if(a.morphTargets)for(k=a.numSupportedMorphTargets=0;k<da.maxMorphTargets;k++)0<=c["morphTarget"+k]&&a.numSupportedMorphTargets++;if(a.morphNormals)for(k=a.numSupportedMorphNormals=0;k<da.maxMorphNormals;k++)0<=c["morphNormal"+k]&&a.numSupportedMorphNormals++;c=d.uniforms;
|
|
|
+if(!a.isShaderMaterial&&!a.isRawShaderMaterial||!0===a.clipping)d.numClippingPlanes=ja.numPlanes,d.numIntersection=ja.numIntersection,c.clippingPlanes=ja.uniform;d.environment=a.isMeshStandardMaterial?b.environment:null;d.fog=b.fog;d.envMap=ha.get(a.envMap||d.environment);d.needsLights=a.isMeshLambertMaterial||a.isMeshToonMaterial||a.isMeshPhongMaterial||a.isMeshStandardMaterial||a.isShadowMaterial||a.isShaderMaterial&&!0===a.lights;d.lightsStateVersion=h;d.needsLights&&(c.ambientLightColor.value=
|
|
|
+e.state.ambient,c.lightProbe.value=e.state.probe,c.directionalLights.value=e.state.directional,c.directionalLightShadows.value=e.state.directionalShadow,c.spotLights.value=e.state.spot,c.spotLightShadows.value=e.state.spotShadow,c.rectAreaLights.value=e.state.rectArea,c.ltc_1.value=e.state.rectAreaLTC1,c.ltc_2.value=e.state.rectAreaLTC2,c.pointLights.value=e.state.point,c.pointLightShadows.value=e.state.pointShadow,c.hemisphereLights.value=e.state.hemi,c.directionalShadowMap.value=e.state.directionalShadowMap,
|
|
|
+c.directionalShadowMatrix.value=e.state.directionalShadowMatrix,c.spotShadowMap.value=e.state.spotShadowMap,c.spotShadowMatrix.value=e.state.spotShadowMatrix,c.pointShadowMap.value=e.state.pointShadowMap,c.pointShadowMatrix.value=e.state.pointShadowMatrix);a=d.program.getUniforms();a=Sb.seqWithValue(a.seq,c);d.uniformsList=a}function l(a,b,c,d){!0!==b.isScene&&(b=yg);aa.resetTextureUnits();var e=b.fog,f=c.isMeshStandardMaterial?b.environment:null,g=null===J?da.outputEncoding:J.texture.encoding,h=
|
|
|
+ha.get(c.envMap||f),k=T.get(c),n=O.state.lights;!0!==la||!0!==qa&&a===M||ja.setState(c,a,a===M&&c.id===N);c.version===k.__version?void 0===k.program?u(c,b,d):c.fog&&k.fog!==e?u(c,b,d):k.environment!==f?u(c,b,d):k.needsLights&&k.lightsStateVersion!==n.state.version?u(c,b,d):void 0===k.numClippingPlanes||k.numClippingPlanes===ja.numPlanes&&k.numIntersection===ja.numIntersection?k.outputEncoding!==g?u(c,b,d):k.envMap!==h&&u(c,b,d):u(c,b,d):(u(c,b,d),k.__version=c.version);var r=!1;n=h=!1;b=k.program;
|
|
|
+f=b.getUniforms();g=k.uniforms;za.useProgram(b.program)&&(n=h=r=!0);c.id!==N&&(N=c.id,h=!0);if(r||M!==a){f.setValue(P,"projectionMatrix",a.projectionMatrix);Ha.logarithmicDepthBuffer&&f.setValue(P,"logDepthBufFC",2/(Math.log(a.far+1)/Math.LN2));M!==a&&(M=a,n=h=!0);if(c.isShaderMaterial||c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshStandardMaterial||c.envMap)r=f.map.cameraPosition,void 0!==r&&r.setValue(P,Vb.setFromMatrixPosition(a.matrixWorld));(c.isMeshPhongMaterial||c.isMeshToonMaterial||
|
|
|
+c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial)&&f.setValue(P,"isOrthographic",!0===a.isOrthographicCamera);(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial||c.isShadowMaterial||c.skinning)&&f.setValue(P,"viewMatrix",a.matrixWorldInverse)}if(c.skinning&&(f.setOptional(P,d,"bindMatrix"),f.setOptional(P,d,"bindMatrixInverse"),a=d.skeleton))if(r=a.bones,Ha.floatVertexTextures){if(void 0===
|
|
|
+a.boneTexture){r=Math.sqrt(4*r.length);r=R.ceilPowerOfTwo(r);r=Math.max(r,4);var l=new Float32Array(r*r*4);l.set(a.boneMatrices);var q=new oc(l,r,r,1023,1015);a.boneMatrices=l;a.boneTexture=q;a.boneTextureSize=r}f.setValue(P,"boneTexture",a.boneTexture,aa);f.setValue(P,"boneTextureSize",a.boneTextureSize)}else f.setOptional(P,a,"boneMatrices");if(h||k.receiveShadow!==d.receiveShadow)k.receiveShadow=d.receiveShadow,f.setValue(P,"receiveShadow",d.receiveShadow);h&&(f.setValue(P,"toneMappingExposure",
|
|
|
+da.toneMappingExposure),k.needsLights&&(a=n,g.ambientLightColor.needsUpdate=a,g.lightProbe.needsUpdate=a,g.directionalLights.needsUpdate=a,g.directionalLightShadows.needsUpdate=a,g.pointLights.needsUpdate=a,g.pointLightShadows.needsUpdate=a,g.spotLights.needsUpdate=a,g.spotLightShadows.needsUpdate=a,g.rectAreaLights.needsUpdate=a,g.hemisphereLights.needsUpdate=a),e&&c.fog&&ua.refreshFogUniforms(g,e),ua.refreshMaterialUniforms(g,c,W,Va),Sb.upload(P,k.uniformsList,g,aa));c.isShaderMaterial&&!0===c.uniformsNeedUpdate&&
|
|
|
+(Sb.upload(P,k.uniformsList,g,aa),c.uniformsNeedUpdate=!1);c.isSpriteMaterial&&f.setValue(P,"center",d.center);f.setValue(P,"modelViewMatrix",d.modelViewMatrix);f.setValue(P,"normalMatrix",d.normalMatrix);f.setValue(P,"modelMatrix",d.matrixWorld);return b}c=c||{};var v=void 0!==c.canvas?c.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),t=void 0!==c.context?c.context:null,w=void 0!==c.alpha?c.alpha:!1,y=void 0!==c.depth?c.depth:!0,x=void 0!==c.stencil?c.stencil:!0,B=void 0!==
|
|
|
+c.antialias?c.antialias:!1,C=void 0!==c.premultipliedAlpha?c.premultipliedAlpha:!0,Y=void 0!==c.preserveDrawingBuffer?c.preserveDrawingBuffer:!1,H=void 0!==c.powerPreference?c.powerPreference:"default",A=void 0!==c.failIfMajorPerformanceCaveat?c.failIfMajorPerformanceCaveat:!1,L=null,O=null;this.domElement=v;this.debug={checkShaderErrors:!0};this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=!1;this.gammaFactor=
|
|
|
+2;this.outputEncoding=3E3;this.physicallyCorrectLights=!1;this.toneMapping=0;this.toneMappingExposure=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var da=this,F=!1,E=null,G=0,K=0,J=null,I=null,N=-1,M=null,S=null,Q=new D,V=new D,U=null,Z=v.width,Va=v.height,W=1,X=null,ea=null,ca=new D(0,0,Z,Va),ba=new D(0,0,Z,Va),fa=!1,ia=new Na,la=!1,qa=!1,Yd=new z,Vb=new m,yg={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0},P=t;try{t={alpha:w,depth:y,stencil:x,antialias:B,premultipliedAlpha:C,
|
|
|
+preserveDrawingBuffer:Y,powerPreference:H,failIfMajorPerformanceCaveat:A};v.addEventListener("webglcontextlost",d,!1);v.addEventListener("webglcontextrestored",e,!1);if(null===P&&(w=["webgl2","webgl","experimental-webgl"],!0===da.isWebGL1Renderer&&w.shift(),P=a(w,t),null===P)){if(a(w))throw Error("Error creating WebGL context with your selected attributes.");throw Error("Error creating WebGL context.");}void 0===P.getShaderPrecisionFormat&&(P.getShaderPrecisionFormat=function(){return{rangeMin:1,
|
|
|
+rangeMax:1,precision:1}})}catch($h){throw console.error("THREE.WebGLRenderer: "+$h.message),$h;}var ya,Ha,za,qb,T,aa,ha,pa,sa,na,ka,ua,wa,ta,ja,ra,Ba,Da,Ea,va,oa;b();var xa=new Zh(da,P);this.xr=xa;var Ga=new Xh(da,na,Ha.maxTextureSize);this.shadowMap=Ga;this.getContext=function(){return P};this.getContextAttributes=function(){return P.getContextAttributes()};this.forceContextLoss=function(){var a=ya.get("WEBGL_lose_context");a&&a.loseContext()};this.forceContextRestore=function(){var a=ya.get("WEBGL_lose_context");
|
|
|
+a&&a.restoreContext()};this.getPixelRatio=function(){return W};this.setPixelRatio=function(a){void 0!==a&&(W=a,this.setSize(Z,Va,!1))};this.getSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),a=new p);return a.set(Z,Va)};this.setSize=function(a,b,c){xa.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(Z=a,Va=b,v.width=Math.floor(a*W),v.height=Math.floor(b*W),!1!==c&&(v.style.width=a+"px",
|
|
|
+v.style.height=b+"px"),this.setViewport(0,0,a,b))};this.getDrawingBufferSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),a=new p);return a.set(Z*W,Va*W).floor()};this.setDrawingBufferSize=function(a,b,c){Z=a;Va=b;W=c;v.width=Math.floor(a*c);v.height=Math.floor(b*c);this.setViewport(0,0,a,b)};this.getCurrentViewport=function(a){void 0===a&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),
|
|
|
+a=new D);return a.copy(Q)};this.getViewport=function(a){return a.copy(ca)};this.setViewport=function(a,b,c,d){a.isVector4?ca.set(a.x,a.y,a.z,a.w):ca.set(a,b,c,d);za.viewport(Q.copy(ca).multiplyScalar(W).floor())};this.getScissor=function(a){return a.copy(ba)};this.setScissor=function(a,b,c,d){a.isVector4?ba.set(a.x,a.y,a.z,a.w):ba.set(a,b,c,d);za.scissor(V.copy(ba).multiplyScalar(W).floor())};this.getScissorTest=function(){return fa};this.setScissorTest=function(a){za.setScissorTest(fa=a)};this.setOpaqueSort=
|
|
|
+function(a){X=a};this.setTransparentSort=function(a){ea=a};this.getClearColor=function(){return ra.getClearColor()};this.setClearColor=function(){ra.setClearColor.apply(ra,arguments)};this.getClearAlpha=function(){return ra.getClearAlpha()};this.setClearAlpha=function(){ra.setClearAlpha.apply(ra,arguments)};this.clear=function(a,b,c){var d=0;if(void 0===a||a)d|=16384;if(void 0===b||b)d|=256;if(void 0===c||c)d|=1024;P.clear(d)};this.clearColor=function(){this.clear(!0,!1,!1)};this.clearDepth=function(){this.clear(!1,
|
|
|
+!0,!1)};this.clearStencil=function(){this.clear(!1,!1,!0)};this.dispose=function(){v.removeEventListener("webglcontextlost",d,!1);v.removeEventListener("webglcontextrestored",e,!1);wa.dispose();ta.dispose();T.dispose();ha.dispose();na.dispose();oa.dispose();xa.dispose();Ca.stop()};this.renderBufferImmediate=function(a,b){oa.initAttributes();var c=T.get(a);a.hasPositions&&!c.position&&(c.position=P.createBuffer());a.hasNormals&&!c.normal&&(c.normal=P.createBuffer());a.hasUvs&&!c.uv&&(c.uv=P.createBuffer());
|
|
|
+a.hasColors&&!c.color&&(c.color=P.createBuffer());b=b.getAttributes();a.hasPositions&&(P.bindBuffer(34962,c.position),P.bufferData(34962,a.positionArray,35048),oa.enableAttribute(b.position),P.vertexAttribPointer(b.position,3,5126,!1,0,0));a.hasNormals&&(P.bindBuffer(34962,c.normal),P.bufferData(34962,a.normalArray,35048),oa.enableAttribute(b.normal),P.vertexAttribPointer(b.normal,3,5126,!1,0,0));a.hasUvs&&(P.bindBuffer(34962,c.uv),P.bufferData(34962,a.uvArray,35048),oa.enableAttribute(b.uv),P.vertexAttribPointer(b.uv,
|
|
|
+2,5126,!1,0,0));a.hasColors&&(P.bindBuffer(34962,c.color),P.bufferData(34962,a.colorArray,35048),oa.enableAttribute(b.color),P.vertexAttribPointer(b.color,3,5126,!1,0,0));oa.disableUnusedAttributes();P.drawArrays(4,0,a.count);a.count=0};this.renderBufferDirect=function(a,b,c,d,e,f){null===b&&(b=yg);var g=e.isMesh&&0>e.matrixWorld.determinant();a=l(a,b,d,e);za.setMaterial(d,g);g=c.index;b=c.attributes.position;if(null===g){if(void 0===b||0===b.count)return}else if(0===g.count)return;var h=1;!0===d.wireframe&&
|
|
|
+(g=sa.getWireframeAttribute(c),h=2);(d.morphTargets||d.morphNormals)&&Ba.update(e,c,d,a);oa.setup(e,d,a,c,g);a=Da;if(null!==g){var k=pa.get(g);a=Ea;a.setIndex(k)}var n=c.drawRange.start*h,r=null!==f?f.start*h:0;k=Math.max(n,r);f=Math.max(0,Math.min(null!==g?g.count:b.count,n+c.drawRange.count*h,r+(null!==f?f.count*h:Infinity))-1-k+1);0!==f&&(e.isMesh?!0===d.wireframe?(za.setLineWidth(d.wireframeLinewidth*(null===J?W:1)),a.setMode(1)):a.setMode(4):e.isLine?(d=d.linewidth,void 0===d&&(d=1),za.setLineWidth(d*
|
|
|
+(null===J?W:1)),e.isLineSegments?a.setMode(1):e.isLineLoop?a.setMode(2):a.setMode(3)):e.isPoints?a.setMode(0):e.isSprite&&a.setMode(4),e.isInstancedMesh?a.renderInstances(k,f,e.count):c.isInstancedBufferGeometry?a.renderInstances(k,f,Math.min(c.instanceCount,c._maxInstanceCount)):a.render(k,f))};this.compile=function(a,b){O=ta.get(a,b);O.init();a.traverse(function(a){a.isLight&&(O.pushLight(a),a.castShadow&&O.pushShadow(a))});O.setupLights(b);var c=new WeakMap;a.traverse(function(b){var d=b.material;
|
|
|
+if(d)if(Array.isArray(d))for(var e=0;e<d.length;e++){var f=d[e];!1===c.has(f)&&(u(f,a,b),c.set(f))}else!1===c.has(d)&&(u(d,a,b),c.set(d))})};var Fa=null,Ca=new Ah;Ca.setAnimationLoop(function(a){xa.isPresenting||Fa&&Fa(a)});"undefined"!==typeof window&&Ca.setContext(window);this.setAnimationLoop=function(a){Fa=a;xa.setAnimationLoop(a);null===a?Ca.stop():Ca.start()};this.render=function(a,b,c,d){if(void 0!==c){console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead.");
|
|
|
+var e=c}if(void 0!==d){console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead.");var f=d}if(void 0!==b&&!0!==b.isCamera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else if(!0!==F){oa.resetDefaultState();N=-1;M=null;!0===a.autoUpdate&&a.updateMatrixWorld();null===b.parent&&b.updateMatrixWorld();!0===xa.enabled&&!0===xa.isPresenting&&(b=xa.getCamera(b));if(!0===a.isScene)a.onBeforeRender(da,a,b,e||J);O=ta.get(a,
|
|
|
+b);O.init();Yd.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);ia.setFromProjectionMatrix(Yd);qa=this.localClippingEnabled;la=ja.init(this.clippingPlanes,qa,b);L=wa.get(a,b);L.init();k(a,b,0,da.sortObjects);L.finish();!0===da.sortObjects&&L.sort(X,ea);!0===la&&ja.beginShadows();Ga.render(O.state.shadowsArray,a,b);O.setupLights(b);!0===la&&ja.endShadows();!0===this.info.autoReset&&this.info.reset();void 0!==e&&this.setRenderTarget(e);ra.render(L,a,b,f);c=L.opaque;d=L.transparent;0<c.length&&
|
|
|
n(c,a,b);0<d.length&&n(d,a,b);if(!0===a.isScene)a.onAfterRender(da,a,b);null!==J&&(aa.updateRenderTargetMipmap(J),aa.updateMultisampleRenderTarget(J));za.buffers.depth.setTest(!0);za.buffers.depth.setMask(!0);za.buffers.color.setMask(!0);za.setPolygonOffset(!1);O=L=null}};this.setFramebuffer=function(a){E!==a&&null===J&&P.bindFramebuffer(36160,a);E=a};this.getActiveCubeFace=function(){return G};this.getActiveMipmapLevel=function(){return K};this.getRenderList=function(){return L};this.setRenderList=
|
|
|
function(a){L=a};this.getRenderState=function(){return O};this.setRenderState=function(a){O=a};this.getRenderTarget=function(){return J};this.setRenderTarget=function(a,b,c){J=a;G=b;K=c;a&&void 0===T.get(a).__webglFramebuffer&&aa.setupRenderTarget(a);var d=E,e=!1;a?(d=T.get(a).__webglFramebuffer,a.isWebGLCubeRenderTarget?(d=d[b||0],e=!0):d=a.isWebGLMultisampleRenderTarget?T.get(a).__webglMultisampledFramebuffer:d,Q.copy(a.viewport),V.copy(a.scissor),U=a.scissorTest):(Q.copy(ca).multiplyScalar(W).floor(),
|
|
|
V.copy(ba).multiplyScalar(W).floor(),U=fa);I!==d&&(P.bindFramebuffer(36160,d),I=d);za.viewport(Q);za.scissor(V);za.setScissorTest(U);e&&(a=T.get(a.texture),P.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=T.get(a).__webglFramebuffer;a.isWebGLCubeRenderTarget&&void 0!==g&&(h=h[g]);if(h){g=!1;h!==I&&(P.bindFramebuffer(36160,h),g=!0);try{var k=a.texture,n=k.format,r=k.type;1023!==n&&va.convert(n)!==
|
|
@@ -235,9 +235,9 @@ e,f){Yc.subVectors(c,b).addScalar(.5).multiply(d);void 0!==e?(be.x=f*Yc.x-e*Yc.y
|
|
|
"attached";this.bindMatrix=new z;this.bindMatrixInverse=new z}function df(c,a){c=c||[];this.bones=c.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);this.frame=-1;if(void 0===a)this.calculateInverses();else if(this.bones.length===a.length)this.boneInverses=a.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],c=0,a=this.bones.length;c<a;c++)this.boneInverses.push(new z)}function Ag(){K.call(this);this.type="Bone"}function ef(c,a,
|
|
|
b){la.call(this,c,a);this.instanceMatrix=new N(new Float32Array(16*b),16);this.instanceColor=null;this.count=b;this.frustumCulled=!1}function sa(c){M.call(this);this.type="LineBasicMaterial";this.color=new E(16777215);this.linewidth=1;this.linejoin=this.linecap="round";this.morphTargets=!1;this.setValues(c)}function Oa(c,a,b){1===b&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead.");K.call(this);this.type="Line";this.geometry=void 0!==c?c:
|
|
|
new J;this.material=void 0!==a?a:new sa;this.updateMorphTargets()}function na(c,a){Oa.call(this,c,a);this.type="LineSegments"}function ff(c,a){Oa.call(this,c,a);this.type="LineLoop"}function fb(c){M.call(this);this.type="PointsMaterial";this.color=new E(16777215);this.alphaMap=this.map=null;this.size=1;this.sizeAttenuation=!0;this.morphTargets=!1;this.setValues(c)}function Zc(c,a){K.call(this);this.type="Points";this.geometry=void 0!==c?c:new J;this.material=void 0!==a?a:new fb;this.updateMorphTargets()}
|
|
|
-function Bg(c,a,b,d,e,f,g){var h=Cg.distanceSqToPoint(c);h<b&&(b=new m,Cg.closestPointToPoint(c,b),b.applyMatrix4(d),c=e.ray.origin.distanceTo(b),c<e.near||c>e.far||f.push({distance:c,distanceToRay:Math.sqrt(h),point:b,index:a,face:null,object:g}))}function Dg(c,a,b,d,e,f,g,h,k){function n(){r.needsUpdate=!0;c.requestVideoFrameCallback(n)}ha.call(this,c,a,b,d,e,f,g,h,k);this.format=void 0!==g?g:1022;this.minFilter=void 0!==f?f:1006;this.magFilter=void 0!==e?e:1006;this.generateMipmaps=!1;var r=this;
|
|
|
-"requestVideoFrameCallback"in c&&c.requestVideoFrameCallback(n)}function $c(c,a,b,d,e,f,g,h,k,n,r,u){ha.call(this,null,f,g,h,k,n,d,e,r,u);this.image={width:a,height:b};this.mipmaps=c;this.generateMipmaps=this.flipY=!1}function de(c,a,b,d,e,f,g,h,k){ha.call(this,c,a,b,d,e,f,g,h,k);this.needsUpdate=!0}function ee(c,a,b,d,e,f,g,h,k,n){n=void 0!==n?n:1026;if(1026!==n&&1027!==n)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===b&&1026===n&&(b=1012);
|
|
|
-void 0===b&&1027===n&&(b=1020);ha.call(this,null,d,e,f,g,h,n,b,k);this.image={width:c,height:a};this.magFilter=void 0!==g?g:1003;this.minFilter=void 0!==h?h:1003;this.generateMipmaps=this.flipY=!1}function ad(c){J.call(this);this.type="WireframeGeometry";var a=[],b=[0,0],d={},e=["a","b","c"];if(c&&c.isGeometry){for(var f=c.faces,g=0,h=f.length;g<h;g++)for(var k=f[g],n=0;3>n;n++){var r=k[e[n]],u=k[e[(n+1)%3]];b[0]=Math.min(r,u);b[1]=Math.max(r,u);r=b[0]+","+b[1];void 0===d[r]&&(d[r]={index1:b[0],index2:b[1]})}for(var l in d)b=
|
|
|
+function Bg(c,a,b,d,e,f,g){var h=Cg.distanceSqToPoint(c);h<b&&(b=new m,Cg.closestPointToPoint(c,b),b.applyMatrix4(d),c=e.ray.origin.distanceTo(b),c<e.near||c>e.far||f.push({distance:c,distanceToRay:Math.sqrt(h),point:b,index:a,face:null,object:g}))}function Dg(c,a,b,d,e,f,g,h,k){function n(){r.needsUpdate=!0;c.requestVideoFrameCallback(n)}ia.call(this,c,a,b,d,e,f,g,h,k);this.format=void 0!==g?g:1022;this.minFilter=void 0!==f?f:1006;this.magFilter=void 0!==e?e:1006;this.generateMipmaps=!1;var r=this;
|
|
|
+"requestVideoFrameCallback"in c&&c.requestVideoFrameCallback(n)}function $c(c,a,b,d,e,f,g,h,k,n,r,u){ia.call(this,null,f,g,h,k,n,d,e,r,u);this.image={width:a,height:b};this.mipmaps=c;this.generateMipmaps=this.flipY=!1}function de(c,a,b,d,e,f,g,h,k){ia.call(this,c,a,b,d,e,f,g,h,k);this.needsUpdate=!0}function ee(c,a,b,d,e,f,g,h,k,n){n=void 0!==n?n:1026;if(1026!==n&&1027!==n)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===b&&1026===n&&(b=1012);
|
|
|
+void 0===b&&1027===n&&(b=1020);ia.call(this,null,d,e,f,g,h,n,b,k);this.image={width:c,height:a};this.magFilter=void 0!==g?g:1003;this.minFilter=void 0!==h?h:1003;this.generateMipmaps=this.flipY=!1}function ad(c){J.call(this);this.type="WireframeGeometry";var a=[],b=[0,0],d={},e=["a","b","c"];if(c&&c.isGeometry){for(var f=c.faces,g=0,h=f.length;g<h;g++)for(var k=f[g],n=0;3>n;n++){var r=k[e[n]],u=k[e[(n+1)%3]];b[0]=Math.min(r,u);b[1]=Math.max(r,u);r=b[0]+","+b[1];void 0===d[r]&&(d[r]={index1:b[0],index2:b[1]})}for(var l in d)b=
|
|
|
d[l],f=c.vertices[b.index1],a.push(f.x,f.y,f.z),f=c.vertices[b.index2],a.push(f.x,f.y,f.z)}else if(c&&c.isBufferGeometry)if(l=new m,null!==c.index){e=c.attributes.position;g=c.index;c=c.groups;0===c.length&&(c=[{start:0,count:g.count,materialIndex:0}]);h=0;for(k=c.length;h<k;++h)for(r=c[h],n=u=r.start,r=u+r.count;n<r;n+=3)for(u=0;3>u;u++){var v=g.getX(n+u),t=g.getX(n+(u+1)%3);b[0]=Math.min(v,t);b[1]=Math.max(v,t);v=b[0]+","+b[1];void 0===d[v]&&(d[v]={index1:b[0],index2:b[1]})}for(f in d)b=d[f],l.fromBufferAttribute(e,
|
|
|
b.index1),a.push(l.x,l.y,l.z),l.fromBufferAttribute(e,b.index2),a.push(l.x,l.y,l.z)}else for(d=c.attributes.position,b=0,f=d.count/3;b<f;b++)for(c=0;3>c;c++)l.fromBufferAttribute(d,3*b+c),a.push(l.x,l.y,l.z),l.fromBufferAttribute(d,3*b+(c+1)%3),a.push(l.x,l.y,l.z);this.setAttribute("position",new F(a,3))}function fe(c,a,b){S.call(this);this.type="ParametricGeometry";this.parameters={func:c,slices:a,stacks:b};this.fromBufferGeometry(new bd(c,a,b));this.mergeVertices()}function bd(c,a,b){J.call(this);
|
|
|
this.type="ParametricBufferGeometry";this.parameters={func:c,slices:a,stacks:b};var d=[],e=[],f=[],g=[],h=new m,k=new m,n=new m,r=new m,u=new m;3>c.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");for(var l=a+1,v=0;v<=b;v++)for(var t=v/b,w=0;w<=a;w++){var y=w/a;c(y,t,k);e.push(k.x,k.y,k.z);0<=y-1E-5?(c(y-1E-5,t,n),r.subVectors(k,n)):(c(y+1E-5,t,n),r.subVectors(n,k));0<=t-1E-5?(c(y,t-1E-5,n),u.subVectors(k,n)):(c(y,t+1E-5,n),u.subVectors(n,k));
|
|
@@ -301,24 +301,24 @@ null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=
|
|
|
"MeshNormalMaterial";this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new p(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=!1;this.wireframeLinewidth=1;this.morphNormals=this.morphTargets=this.skinning=this.fog=!1;this.setValues(c)}function Bc(c){M.call(this);this.type="MeshLambertMaterial";this.color=new E(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;
|
|
|
this.emissive=new E(0);this.emissiveIntensity=1;this.envMap=this.alphaMap=this.specularMap=this.emissiveMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(c)}function Cc(c){M.call(this);this.defines={MATCAP:""};this.type="MeshMatcapMaterial";this.color=new E(16777215);this.bumpMap=this.map=this.matcap=null;this.bumpScale=
|
|
|
1;this.normalMap=null;this.normalMapType=0;this.normalScale=new p(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=null;this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(c)}function Dc(c){sa.call(this);this.type="LineDashedMaterial";this.scale=1;this.dashSize=3;this.gapSize=1;this.setValues(c)}function Xa(c,a,b,d){this.parameterPositions=c;this._cachedIndex=0;this.resultBuffer=void 0!==d?d:new a.constructor(b);this.sampleValues=a;this.valueSize=
|
|
|
-b}function kf(c,a,b,d){Xa.call(this,c,a,b,d);this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function ye(c,a,b,d){Xa.call(this,c,a,b,d)}function lf(c,a,b,d){Xa.call(this,c,a,b,d)}function Ea(c,a,b,d){if(void 0===c)throw Error("THREE.KeyframeTrack: track name is undefined");if(void 0===a||0===a.length)throw Error("THREE.KeyframeTrack: no keyframes in track named "+c);this.name=c;this.times=ja.convertArray(a,this.TimeBufferType);this.values=ja.convertArray(b,this.ValueBufferType);
|
|
|
+b}function kf(c,a,b,d){Xa.call(this,c,a,b,d);this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function ye(c,a,b,d){Xa.call(this,c,a,b,d)}function lf(c,a,b,d){Xa.call(this,c,a,b,d)}function Ea(c,a,b,d){if(void 0===c)throw Error("THREE.KeyframeTrack: track name is undefined");if(void 0===a||0===a.length)throw Error("THREE.KeyframeTrack: no keyframes in track named "+c);this.name=c;this.times=ha.convertArray(a,this.TimeBufferType);this.values=ha.convertArray(b,this.ValueBufferType);
|
|
|
this.setInterpolation(d||this.DefaultInterpolation)}function mf(c,a,b){Ea.call(this,c,a,b)}function nf(c,a,b,d){Ea.call(this,c,a,b,d)}function nd(c,a,b,d){Ea.call(this,c,a,b,d)}function of(c,a,b,d){Xa.call(this,c,a,b,d)}function ze(c,a,b,d){Ea.call(this,c,a,b,d)}function pf(c,a,b,d){Ea.call(this,c,a,b,d)}function od(c,a,b,d){Ea.call(this,c,a,b,d)}function bb(c,a,b,d){this.name=c;this.tracks=b;this.duration=void 0!==a?a:-1;this.blendMode=void 0!==d?d:2500;this.uuid=R.generateUUID();0>this.duration&&
|
|
|
this.resetDuration()}function Kk(c){switch(c.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return nd;case "vector":case "vector2":case "vector3":case "vector4":return od;case "color":return nf;case "quaternion":return ze;case "bool":case "boolean":return mf;case "string":return pf}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+c);}function Lk(c){if(void 0===c.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var a=Kk(c.type);
|
|
|
-if(void 0===c.times){var b=[],d=[];ja.flattenJSON(c.keys,b,d,"value");c.times=b;c.values=d}return void 0!==a.parse?a.parse(c):new a(c.name,c.times,c.values,c.interpolation)}function Gg(c,a,b){var d=this,e=!1,f=0,g=0,h=void 0,k=[];this.onStart=void 0;this.onLoad=c;this.onProgress=a;this.onError=b;this.itemStart=function(a){g++;if(!1===e&&void 0!==d.onStart)d.onStart(a,f,g);e=!0};this.itemEnd=function(a){f++;if(void 0!==d.onProgress)d.onProgress(a,f,g);if(f===g&&(e=!1,void 0!==d.onLoad))d.onLoad()};
|
|
|
+if(void 0===c.times){var b=[],d=[];ha.flattenJSON(c.keys,b,d,"value");c.times=b;c.values=d}return void 0!==a.parse?a.parse(c):new a(c.name,c.times,c.values,c.interpolation)}function Gg(c,a,b){var d=this,e=!1,f=0,g=0,h=void 0,k=[];this.onStart=void 0;this.onLoad=c;this.onProgress=a;this.onError=b;this.itemStart=function(a){g++;if(!1===e&&void 0!==d.onStart)d.onStart(a,f,g);e=!0};this.itemEnd=function(a){f++;if(void 0!==d.onProgress)d.onProgress(a,f,g);if(f===g&&(e=!1,void 0!==d.onLoad))d.onLoad()};
|
|
|
this.itemError=function(a){if(void 0!==d.onError)d.onError(a)};this.resolveURL=function(a){return h?h(a):a};this.setURLModifier=function(a){h=a;return this};this.addHandler=function(a,b){k.push(a,b);return this};this.removeHandler=function(a){a=k.indexOf(a);-1!==a&&k.splice(a,2);return this};this.getHandler=function(a){for(var b=0,c=k.length;b<c;b+=2){var d=k[b],e=k[b+1];d.global&&(d.lastIndex=0);if(d.test(a))return e}return null}}function fa(c){this.manager=void 0!==c?c:ji;this.crossOrigin="anonymous";
|
|
|
this.resourcePath=this.path="";this.requestHeader={}}function cb(c){fa.call(this,c)}function Hg(c){fa.call(this,c)}function Ig(c){fa.call(this,c)}function pd(c){fa.call(this,c)}function qf(c){fa.call(this,c)}function rf(c){fa.call(this,c)}function sf(c){fa.call(this,c)}function I(){this.type="Curve";this.arcLengthDivisions=200}function Ya(c,a,b,d,e,f,g,h){I.call(this);this.type="EllipseCurve";this.aX=c||0;this.aY=a||0;this.xRadius=b||1;this.yRadius=d||1;this.aStartAngle=e||0;this.aEndAngle=f||2*Math.PI;
|
|
|
this.aClockwise=g||!1;this.aRotation=h||0}function qd(c,a,b,d,e,f){Ya.call(this,c,a,b,b,d,e,f);this.type="ArcCurve"}function Jg(){var c=0,a=0,b=0,d=0;return{initCatmullRom:function(e,f,g,h,k){e=k*(g-e);h=k*(h-f);c=f;a=e;b=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},initNonuniformCatmullRom:function(e,f,g,h,k,n,r){e=((f-e)/k-(g-e)/(k+n)+(g-f)/n)*n;h=((g-f)/n-(h-f)/(n+r)+(h-g)/r)*n;c=f;a=e;b=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},calc:function(e){var f=e*e;return c+a*e+b*f+d*f*e}}}function Ga(c,a,b,d){I.call(this);this.type=
|
|
|
"CatmullRomCurve3";this.points=c||[];this.closed=a||!1;this.curveType=b||"centripetal";this.tension=void 0!==d?d:.5}function ki(c,a,b,d,e){a=.5*(d-a);e=.5*(e-b);var f=c*c;return(2*b-2*d+a+e)*c*f+(-3*b+3*d-2*a-e)*f+a*c+b}function Ae(c,a,b,d){var e=1-c;return e*e*a+2*(1-c)*c*b+c*c*d}function Be(c,a,b,d,e){var f=1-c,g=1-c;return f*f*f*a+3*g*g*c*b+3*(1-c)*c*c*d+c*c*c*e}function gb(c,a,b,d){I.call(this);this.type="CubicBezierCurve";this.v0=c||new p;this.v1=a||new p;this.v2=b||new p;this.v3=d||new p}function tb(c,
|
|
|
a,b,d){I.call(this);this.type="CubicBezierCurve3";this.v0=c||new m;this.v1=a||new m;this.v2=b||new m;this.v3=d||new m}function Qa(c,a){I.call(this);this.type="LineCurve";this.v1=c||new p;this.v2=a||new p}function hb(c,a){I.call(this);this.type="LineCurve3";this.v1=c||new m;this.v2=a||new m}function ib(c,a,b){I.call(this);this.type="QuadraticBezierCurve";this.v0=c||new p;this.v1=a||new p;this.v2=b||new p}function ub(c,a,b){I.call(this);this.type="QuadraticBezierCurve3";this.v0=c||new m;this.v1=a||
|
|
|
new m;this.v2=b||new m}function jb(c){I.call(this);this.type="SplineCurve";this.points=c||[]}function Fb(){I.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function kb(c){Fb.call(this);this.type="Path";this.currentPoint=new p;c&&this.setFromPoints(c)}function bc(c){kb.call(this,c);this.uuid=R.generateUUID();this.type="Shape";this.holes=[]}function qa(c,a){K.call(this);this.type="Light";this.color=new E(c);this.intensity=void 0!==a?a:1;this.receiveShadow=void 0}function tf(c,a,b){qa.call(this,
|
|
|
-c,b);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(K.DefaultUp);this.updateMatrix();this.groundColor=new E(a)}function vb(c){this.camera=c;this.normalBias=this.bias=0;this.radius=1;this.mapSize=new p(512,512);this.mapPass=this.map=null;this.matrix=new z;this.autoUpdate=!0;this.needsUpdate=!1;this._frustum=new Na;this._frameExtents=new p(1,1);this._viewportCount=1;this._viewports=[new D(0,0,1,1)]}function uf(){vb.call(this,new ia(50,1,.5,500))}function vf(c,a,b,d,e,f){qa.call(this,
|
|
|
-c,a);this.type="SpotLight";this.position.copy(K.DefaultUp);this.updateMatrix();this.target=new K;Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=void 0!==b?b:0;this.angle=void 0!==d?d:Math.PI/3;this.penumbra=void 0!==e?e:0;this.decay=void 0!==f?f:1;this.shadow=new uf}function Kg(){vb.call(this,new ia(90,1,.5,500));this._frameExtents=new p(4,2);this._viewportCount=6;this._viewports=[new D(2,1,1,1),new D(0,1,
|
|
|
+c,b);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(K.DefaultUp);this.updateMatrix();this.groundColor=new E(a)}function vb(c){this.camera=c;this.normalBias=this.bias=0;this.radius=1;this.mapSize=new p(512,512);this.mapPass=this.map=null;this.matrix=new z;this.autoUpdate=!0;this.needsUpdate=!1;this._frustum=new Na;this._frameExtents=new p(1,1);this._viewportCount=1;this._viewports=[new D(0,0,1,1)]}function uf(){vb.call(this,new ja(50,1,.5,500))}function vf(c,a,b,d,e,f){qa.call(this,
|
|
|
+c,a);this.type="SpotLight";this.position.copy(K.DefaultUp);this.updateMatrix();this.target=new K;Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=void 0!==b?b:0;this.angle=void 0!==d?d:Math.PI/3;this.penumbra=void 0!==e?e:0;this.decay=void 0!==f?f:1;this.shadow=new uf}function Kg(){vb.call(this,new ja(90,1,.5,500));this._frameExtents=new p(4,2);this._viewportCount=6;this._viewports=[new D(2,1,1,1),new D(0,1,
|
|
|
1,1),new D(3,1,1,1),new D(1,1,1,1),new D(3,0,1,1),new D(1,0,1,1)];this._cubeDirections=[new m(1,0,0),new m(-1,0,0),new m(0,0,1),new m(0,0,-1),new m(0,1,0),new m(0,-1,0)];this._cubeUps=[new m(0,1,0),new m(0,1,0),new m(0,1,0),new m(0,1,0),new m(0,0,1),new m(0,0,-1)]}function wf(c,a,b,d){qa.call(this,c,a);this.type="PointLight";Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(a){this.intensity=a/(4*Math.PI)}});this.distance=void 0!==b?b:0;this.decay=void 0!==
|
|
|
d?d:1;this.shadow=new Kg}function rd(c,a,b,d,e,f){pb.call(this);this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=void 0!==c?c:-1;this.right=void 0!==a?a:1;this.top=void 0!==b?b:1;this.bottom=void 0!==d?d:-1;this.near=void 0!==e?e:.1;this.far=void 0!==f?f:2E3;this.updateProjectionMatrix()}function xf(){vb.call(this,new rd(-5,5,5,-5,.5,500))}function yf(c,a){qa.call(this,c,a);this.type="DirectionalLight";this.position.copy(K.DefaultUp);this.updateMatrix();this.target=new K;this.shadow=
|
|
|
new xf}function zf(c,a){qa.call(this,c,a);this.type="AmbientLight";this.castShadow=void 0}function Af(c,a,b,d){qa.call(this,c,a);this.type="RectAreaLight";this.width=void 0!==b?b:10;this.height=void 0!==d?d:10}function db(c,a){qa.call(this,void 0,a);this.type="LightProbe";this.sh=void 0!==c?c:new va}function Bf(c){fa.call(this,c);this.textures={}}function Ce(){J.call(this);this.type="InstancedBufferGeometry";this.instanceCount=Infinity}function Cf(c,a,b,d){"number"===typeof b&&(d=b,b=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));
|
|
|
N.call(this,c,a,b);this.meshPerAttribute=d||1}function Df(c){fa.call(this,c)}function Ef(c){fa.call(this,c)}function Lg(c){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");fa.call(this,c);this.options={premultiplyAlpha:"none"}}function Mg(){this.type="ShapePath";this.color=new E;this.subPaths=[];this.currentPath=null}function Ng(c){this.type=
|
|
|
"Font";this.data=c}function Og(c){fa.call(this,c)}function Ff(c){fa.call(this,c)}function Pg(c,a,b){db.call(this,void 0,b);c=(new E).set(c);b=(new E).set(a);a=new m(c.r,c.g,c.b);c=new m(b.r,b.g,b.b);b=Math.sqrt(Math.PI);var d=b*Math.sqrt(.75);this.sh.coefficients[0].copy(a).add(c).multiplyScalar(b);this.sh.coefficients[1].copy(a).sub(c).multiplyScalar(d)}function Qg(c,a){db.call(this,void 0,a);c=(new E).set(c);this.sh.coefficients[0].set(c.r,c.g,c.b).multiplyScalar(2*Math.sqrt(Math.PI))}function li(){this.type=
|
|
|
-"StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new ia;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new ia;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1;this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}function lb(){K.call(this);this.type="AudioListener";this.context=Rg.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0;this._clock=
|
|
|
+"StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new ja;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new ja;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1;this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}function lb(){K.call(this);this.type="AudioListener";this.context=Rg.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0;this._clock=
|
|
|
new sd}function ea(c){K.call(this);this.type="Audio";this.listener=c;this.context=c.context;this.gain=this.context.createGain();this.gain.connect(c.getInput());this.autoplay=!1;this.buffer=null;this.detune=0;this.loop=!1;this.offset=this.loopEnd=this.loopStart=0;this.duration=void 0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.source=null;this.sourceType="empty";this._progress=this._startedAt=0;this.filters=[]}function Ja(c){ea.call(this,c);this.panner=this.context.createPanner();
|
|
|
this.panner.panningModel="HRTF";this.panner.connect(this.gain)}function Sg(c,a,b){this.binding=c;this.valueSize=b;switch(a){case "quaternion":c=this._slerp;a=this._slerpAdditive;var d=this._setAdditiveIdentityQuaternion;this.buffer=new Float64Array(6*b);this._workIndex=5;break;case "string":case "bool":a=c=this._select;d=this._setAdditiveIdentityOther;this.buffer=Array(5*b);break;default:c=this._lerp,a=this._lerpAdditive,d=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*b)}this._mixBufferRegion=
|
|
|
c;this._mixBufferRegionAdditive=a;this._setIdentity=d;this._origIndex=3;this._addIndex=4;this.referenceCount=this.useCount=this.cumulativeWeightAdditive=this.cumulativeWeight=0}function mi(c,a,b){b=b||Fa.parseTrackName(a);this._targetGroup=c;this._bindings=c.subscribe_(a,b)}function Fa(c,a,b){this.path=a;this.parsedPath=b||Fa.parseTrackName(a);this.node=Fa.findNode(c,this.parsedPath.nodeName)||c;this.rootNode=c}function ni(){this.uuid=R.generateUUID();this._objects=Array.prototype.slice.call(arguments);
|
|
@@ -367,12 +367,12 @@ var b=c.elements;c=this.elements;a=b[0];var d=b[1],e=b[2],f=b[3],g=b[4],h=b[5],k
|
|
|
function(c){return this.setFromMatrix4(c).getInverse(this).transpose()};U.prototype.transposeIntoArray=function(c){var a=this.elements;c[0]=a[0];c[1]=a[3];c[2]=a[6];c[3]=a[1];c[4]=a[4];c[5]=a[7];c[6]=a[2];c[7]=a[5];c[8]=a[8];return this};U.prototype.setUvTransform=function(c,a,b,d,e,f,g){var h=Math.cos(e);e=Math.sin(e);this.set(b*h,b*e,-b*(h*f+e*g)+f+c,-d*e,d*h,-d*(-e*f+h*g)+g+a,0,0,1)};U.prototype.scale=function(c,a){var b=this.elements;b[0]*=c;b[3]*=c;b[6]*=c;b[1]*=a;b[4]*=a;b[7]*=a;return this};
|
|
|
U.prototype.rotate=function(c){var a=Math.cos(c);c=Math.sin(c);var b=this.elements,d=b[0],e=b[3],f=b[6],g=b[1],h=b[4],k=b[7];b[0]=a*d+c*g;b[3]=a*e+c*h;b[6]=a*f+c*k;b[1]=-c*d+a*g;b[4]=-c*e+a*h;b[7]=-c*f+a*k;return this};U.prototype.translate=function(c,a){var b=this.elements;b[0]+=c*b[2];b[3]+=c*b[5];b[6]+=c*b[8];b[1]+=a*b[2];b[4]+=a*b[5];b[7]+=a*b[8];return this};U.prototype.equals=function(c){var a=this.elements;c=c.elements;for(var b=0;9>b;b++)if(a[b]!==c[b])return!1;return!0};U.prototype.fromArray=
|
|
|
function(c,a){void 0===a&&(a=0);for(var b=0;9>b;b++)this.elements[b]=c[b+a];return this};U.prototype.toArray=function(c,a){void 0===c&&(c=[]);void 0===a&&(a=0);var b=this.elements;c[a]=b[0];c[a+1]=b[1];c[a+2]=b[2];c[a+3]=b[3];c[a+4]=b[4];c[a+5]=b[5];c[a+6]=b[6];c[a+7]=b[7];c[a+8]=b[8];return c};U.prototype.isMatrix3=!0;var yd,ec={getDataURL:function(c){if(/^data:/i.test(c.src)||"undefined"==typeof HTMLCanvasElement)return c.src;if(!(c instanceof HTMLCanvasElement)){void 0===yd&&(yd=document.createElementNS("http://www.w3.org/1999/xhtml",
|
|
|
-"canvas"));yd.width=c.width;yd.height=c.height;var a=yd.getContext("2d");c instanceof ImageData?a.putImageData(c,0,0):a.drawImage(c,0,0,c.width,c.height);c=yd}return 2048<c.width||2048<c.height?c.toDataURL("image/jpeg",.6):c.toDataURL("image/png")}},gj=0;ha.DEFAULT_IMAGE=void 0;ha.DEFAULT_MAPPING=300;ha.prototype=Object.assign(Object.create(Ma.prototype),{constructor:ha,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,
|
|
|
+"canvas"));yd.width=c.width;yd.height=c.height;var a=yd.getContext("2d");c instanceof ImageData?a.putImageData(c,0,0):a.drawImage(c,0,0,c.width,c.height);c=yd}return 2048<c.width||2048<c.height?c.toDataURL("image/jpeg",.6):c.toDataURL("image/png")}},gj=0;ia.DEFAULT_IMAGE=void 0;ia.DEFAULT_MAPPING=300;ia.prototype=Object.assign(Object.create(Ma.prototype),{constructor:ia,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,
|
|
|
this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(c){this.name=c.name;this.image=c.image;this.mipmaps=c.mipmaps.slice(0);this.mapping=c.mapping;this.wrapS=c.wrapS;this.wrapT=c.wrapT;this.magFilter=c.magFilter;this.minFilter=c.minFilter;this.anisotropy=c.anisotropy;this.format=c.format;this.internalFormat=c.internalFormat;this.type=c.type;this.offset.copy(c.offset);this.repeat.copy(c.repeat);this.center.copy(c.center);this.rotation=c.rotation;this.matrixAutoUpdate=
|
|
|
c.matrixAutoUpdate;this.matrix.copy(c.matrix);this.generateMipmaps=c.generateMipmaps;this.premultiplyAlpha=c.premultiplyAlpha;this.flipY=c.flipY;this.unpackAlignment=c.unpackAlignment;this.encoding=c.encoding;return this},toJSON:function(c){var a=void 0===c||"string"===typeof c;if(!a&&void 0!==c.textures[this.uuid])return c.textures[this.uuid];var b={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=R.generateUUID());if(!a&&void 0===c.images[d.uuid]){if(Array.isArray(d)){var e=[];
|
|
|
for(var f=0,g=d.length;f<g;f++)e.push(ec.getDataURL(d[f]))}else e=ec.getDataURL(d);c.images[d.uuid]={uuid:d.uuid,url:e}}b.image=d.uuid}a||(c.textures[this.uuid]=b);return b},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(c){if(300!==this.mapping)return c;c.applyMatrix3(this.matrix);if(0>c.x||1<c.x)switch(this.wrapS){case 1E3:c.x-=Math.floor(c.x);break;case 1001:c.x=0>c.x?0:1;break;case 1002:c.x=1===Math.abs(Math.floor(c.x)%2)?Math.ceil(c.x)-c.x:c.x-Math.floor(c.x)}if(0>
|
|
|
-c.y||1<c.y)switch(this.wrapT){case 1E3:c.y-=Math.floor(c.y);break;case 1001:c.y=0>c.y?0:1;break;case 1002:c.y=1===Math.abs(Math.floor(c.y)%2)?Math.ceil(c.y)-c.y:c.y-Math.floor(c.y)}this.flipY&&(c.y=1-c.y);return c}});Object.defineProperty(ha.prototype,"needsUpdate",{set:function(c){!0===c&&this.version++}});var D=function(c,a,b,d){void 0===c&&(c=0);void 0===a&&(a=0);void 0===b&&(b=0);void 0===d&&(d=1);this.x=c;this.y=a;this.z=b;this.w=d},Le={width:{configurable:!0},height:{configurable:!0}};Le.width.get=
|
|
|
+c.y||1<c.y)switch(this.wrapT){case 1E3:c.y-=Math.floor(c.y);break;case 1001:c.y=0>c.y?0:1;break;case 1002:c.y=1===Math.abs(Math.floor(c.y)%2)?Math.ceil(c.y)-c.y:c.y-Math.floor(c.y)}this.flipY&&(c.y=1-c.y);return c}});Object.defineProperty(ia.prototype,"needsUpdate",{set:function(c){!0===c&&this.version++}});var D=function(c,a,b,d){void 0===c&&(c=0);void 0===a&&(a=0);void 0===b&&(b=0);void 0===d&&(d=1);this.x=c;this.y=a;this.z=b;this.w=d},Le={width:{configurable:!0},height:{configurable:!0}};Le.width.get=
|
|
|
function(){return this.z};Le.width.set=function(c){this.z=c};Le.height.get=function(){return this.w};Le.height.set=function(c){this.w=c};D.prototype.set=function(c,a,b,d){this.x=c;this.y=a;this.z=b;this.w=d;return this};D.prototype.setScalar=function(c){this.w=this.z=this.y=this.x=c;return this};D.prototype.setX=function(c){this.x=c;return this};D.prototype.setY=function(c){this.y=c;return this};D.prototype.setZ=function(c){this.z=c;return this};D.prototype.setW=function(c){this.w=c;return this};
|
|
|
D.prototype.setComponent=function(c,a){switch(c){case 0:this.x=a;break;case 1:this.y=a;break;case 2:this.z=a;break;case 3:this.w=a;break;default:throw Error("index is out of range: "+c);}return this};D.prototype.getComponent=function(c){switch(c){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: "+c);}};D.prototype.clone=function(){return new this.constructor(this.x,this.y,this.z,this.w)};D.prototype.copy=function(c){this.x=
|
|
|
c.x;this.y=c.y;this.z=c.z;this.w=void 0!==c.w?c.w:1;return this};D.prototype.add=function(c,a){if(void 0!==a)return console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(c,a);this.x+=c.x;this.y+=c.y;this.z+=c.z;this.w+=c.w;return this};D.prototype.addScalar=function(c){this.x+=c;this.y+=c;this.z+=c;this.w+=c;return this};D.prototype.addVectors=function(c,a){this.x=c.x+a.x;this.y=c.y+a.y;this.z=c.z+a.z;this.w=c.w+a.w;return this};D.prototype.addScaledVector=
|
|
@@ -594,14 +594,14 @@ Rc;Qb.prototype=Object.create(J.prototype);Qb.prototype.constructor=Qb;var Uh={c
|
|
|
a.clipping;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;this.extensions=Object.assign({},a.extensions);return this};Ia.prototype.toJSON=function(a){var b=M.prototype.toJSON.call(this,a);b.uniforms={};for(var d in this.uniforms){var e=this.uniforms[d].value;b.uniforms[d]=e&&e.isTexture?{type:"t",value:e.toJSON(a).uuid}:e&&e.isColor?{type:"c",value:e.getHex()}:e&&e.isVector2?{type:"v2",value:e.toArray()}:e&&e.isVector3?{type:"v3",value:e.toArray()}:e&&e.isVector4?
|
|
|
{type:"v4",value:e.toArray()}:e&&e.isMatrix3?{type:"m3",value:e.toArray()}:e&&e.isMatrix4?{type:"m4",value:e.toArray()}:{value:e}}0<Object.keys(this.defines).length&&(b.defines=this.defines);b.vertexShader=this.vertexShader;b.fragmentShader=this.fragmentShader;a={};for(var f in this.extensions)!0===this.extensions[f]&&(a[f]=!0);0<Object.keys(a).length&&(b.extensions=a);return b};pb.prototype=Object.assign(Object.create(K.prototype),{constructor:pb,isCamera:!0,copy:function(a,b){K.prototype.copy.call(this,
|
|
|
a,b);this.matrixWorldInverse.copy(a.matrixWorldInverse);this.projectionMatrix.copy(a.projectionMatrix);this.projectionMatrixInverse.copy(a.projectionMatrixInverse);return this},getWorldDirection:function(a){void 0===a&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),a=new m);this.updateMatrixWorld(!0);var b=this.matrixWorld.elements;return a.set(-b[8],-b[9],-b[10]).normalize()},updateMatrixWorld:function(a){K.prototype.updateMatrixWorld.call(this,a);this.matrixWorldInverse.getInverse(this.matrixWorld)},
|
|
|
-updateWorldMatrix:function(a,b){K.prototype.updateWorldMatrix.call(this,a,b);this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}});ia.prototype=Object.assign(Object.create(pb.prototype),{constructor:ia,isPerspectiveCamera:!0,copy:function(a,b){pb.prototype.copy.call(this,a,b);this.fov=a.fov;this.zoom=a.zoom;this.near=a.near;this.far=a.far;this.focus=a.focus;this.aspect=a.aspect;this.view=null===a.view?null:Object.assign({},a.view);this.filmGauge=
|
|
|
+updateWorldMatrix:function(a,b){K.prototype.updateWorldMatrix.call(this,a,b);this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}});ja.prototype=Object.assign(Object.create(pb.prototype),{constructor:ja,isPerspectiveCamera:!0,copy:function(a,b){pb.prototype.copy.call(this,a,b);this.fov=a.fov;this.zoom=a.zoom;this.near=a.near;this.far=a.far;this.focus=a.focus;this.aspect=a.aspect;this.view=null===a.view?null:Object.assign({},a.view);this.filmGauge=
|
|
|
a.filmGauge;this.filmOffset=a.filmOffset;return this},setFocalLength:function(a){a=.5*this.getFilmHeight()/a;this.fov=2*R.RAD2DEG*Math.atan(a);this.updateProjectionMatrix()},getFocalLength:function(){var a=Math.tan(.5*R.DEG2RAD*this.fov);return.5*this.getFilmHeight()/a},getEffectiveFOV:function(){return 2*R.RAD2DEG*Math.atan(Math.tan(.5*R.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,
|
|
|
1)},setViewOffset:function(a,b,d,e,f,g){this.aspect=a/b;null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1});this.view.enabled=!0;this.view.fullWidth=a;this.view.fullHeight=b;this.view.offsetX=d;this.view.offsetY=e;this.view.width=f;this.view.height=g;this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1);this.updateProjectionMatrix()},updateProjectionMatrix:function(){var a=this.near,b=a*Math.tan(.5*R.DEG2RAD*
|
|
|
this.fov)/this.zoom,d=2*b,e=this.aspect*d,f=-.5*e,g=this.view;if(null!==this.view&&this.view.enabled){var h=g.fullWidth,k=g.fullHeight;f+=g.offsetX*e/h;b-=g.offsetY*d/k;e*=g.width/h;d*=g.height/k}g=this.filmOffset;0!==g&&(f+=a*g/this.getFilmWidth());this.projectionMatrix.makePerspective(f,f+e,b,b-d,a,this.far);this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(a){a=K.prototype.toJSON.call(this,a);a.object.fov=this.fov;a.object.zoom=this.zoom;a.object.near=this.near;a.object.far=
|
|
|
this.far;a.object.focus=this.focus;a.object.aspect=this.aspect;null!==this.view&&(a.object.view=Object.assign({},this.view));a.object.filmGauge=this.filmGauge;a.object.filmOffset=this.filmOffset;return a}});Tc.prototype=Object.create(K.prototype);Tc.prototype.constructor=Tc;Rb.prototype=Object.create(Ta.prototype);Rb.prototype.constructor=Rb;Rb.prototype.isWebGLCubeRenderTarget=!0;Rb.prototype.fromEquirectangularTexture=function(a,b){this.texture.type=b.type;this.texture.format=1023;this.texture.encoding=
|
|
|
b.encoding;this.texture.generateMipmaps=b.generateMipmaps;this.texture.minFilter=b.minFilter;this.texture.magFilter=b.magFilter;var d=new Qb(5,5,5),e=new Ia({name:"CubemapFromEquirect",uniforms:Sc({tEquirect:{value:null}}),vertexShader:"\n\n\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t#include <begin_vertex>\n\t\t\t\t#include <project_vertex>\n\n\t\t\t}\n\t\t",
|
|
|
fragmentShader:"\n\n\t\t\tuniform sampler2D tEquirect;\n\n\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t}\n\t\t",side:1,blending:0});e.uniforms.tEquirect.value=b;d=new la(d,e);e=b.minFilter;var f=a.getRenderList(),g=a.getRenderTarget(),h=a.getRenderState();1008===b.minFilter&&(b.minFilter=
|
|
|
-1006);(new Tc(1,10,this)).update(a,d);b.minFilter=e;a.setRenderTarget(g);a.setRenderList(f);a.setRenderState(h);d.geometry.dispose();d.material.dispose();return this};oc.prototype=Object.create(ha.prototype);oc.prototype.constructor=oc;oc.prototype.isDataTexture=!0;var Hd=new pa,Uf=new m,Na=function(a,b,d,e,f,g){this.planes=[void 0!==a?a:new ba,void 0!==b?b:new ba,void 0!==d?d:new ba,void 0!==e?e:new ba,void 0!==f?f:new ba,void 0!==g?g:new ba]};Na.prototype.set=function(a,b,d,e,f,g){var h=this.planes;
|
|
|
+1006);(new Tc(1,10,this)).update(a,d);b.minFilter=e;a.setRenderTarget(g);a.setRenderList(f);a.setRenderState(h);d.geometry.dispose();d.material.dispose();return this};oc.prototype=Object.create(ia.prototype);oc.prototype.constructor=oc;oc.prototype.isDataTexture=!0;var Hd=new pa,Uf=new m,Na=function(a,b,d,e,f,g){this.planes=[void 0!==a?a:new ba,void 0!==b?b:new ba,void 0!==d?d:new ba,void 0!==e?e:new ba,void 0!==f?f:new ba,void 0!==g?g:new ba]};Na.prototype.set=function(a,b,d,e,f,g){var h=this.planes;
|
|
|
h[0].copy(a);h[1].copy(b);h[2].copy(d);h[3].copy(e);h[4].copy(f);h[5].copy(g);return this};Na.prototype.clone=function(){return(new this.constructor).copy(this)};Na.prototype.copy=function(a){for(var b=this.planes,d=0;6>d;d++)b[d].copy(a.planes[d]);return this};Na.prototype.setFromProjectionMatrix=function(a){var b=this.planes,d=a.elements;a=d[0];var e=d[1],f=d[2],g=d[3],h=d[4],k=d[5],l=d[6],m=d[7],u=d[8],q=d[9],v=d[10],t=d[11],p=d[12],y=d[13],x=d[14];d=d[15];b[0].setComponents(g-a,m-h,t-u,d-p).normalize();
|
|
|
b[1].setComponents(g+a,m+h,t+u,d+p).normalize();b[2].setComponents(g+e,m+k,t+q,d+y).normalize();b[3].setComponents(g-e,m-k,t-q,d-y).normalize();b[4].setComponents(g-f,m-l,t-v,d-x).normalize();b[5].setComponents(g+f,m+l,t+v,d+x).normalize();return this};Na.prototype.intersectsObject=function(a){var b=a.geometry;null===b.boundingSphere&&b.computeBoundingSphere();Hd.copy(b.boundingSphere).applyMatrix4(a.matrixWorld);return this.intersectsSphere(Hd)};Na.prototype.intersectsSprite=function(a){Hd.center.set(0,
|
|
|
0,0);Hd.radius=.7071067811865476;Hd.applyMatrix4(a.matrixWorld);return this.intersectsSphere(Hd)};Na.prototype.intersectsSphere=function(a){var b=this.planes,d=a.center;a=-a.radius;for(var e=0;6>e;e++)if(b[e].distanceToPoint(d)<a)return!1;return!0};Na.prototype.intersectsBox=function(a){for(var b=this.planes,d=0;6>d;d++){var e=b[d];Uf.x=0<e.normal.x?a.max.x:a.min.x;Uf.y=0<e.normal.y?a.max.y:a.min.y;Uf.z=0<e.normal.z?a.max.z:a.min.z;if(0>e.distanceToPoint(Uf))return!1}return!0};Na.prototype.containsPoint=
|
|
@@ -688,12 +688,12 @@ G.metalnessmap,G.fog,G.lights,{emissive:{value:new E(0)},roughness:{value:1},met
|
|
|
vertexShader:Z.meshmatcap_vert,fragmentShader:Z.meshmatcap_frag},points:{uniforms:xa([G.points,G.fog]),vertexShader:Z.points_vert,fragmentShader:Z.points_frag},dashed:{uniforms:xa([G.common,G.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Z.linedashed_vert,fragmentShader:Z.linedashed_frag},depth:{uniforms:xa([G.common,G.displacementmap]),vertexShader:Z.depth_vert,fragmentShader:Z.depth_frag},normal:{uniforms:xa([G.common,G.bumpmap,G.normalmap,G.displacementmap,{opacity:{value:1}}]),
|
|
|
vertexShader:Z.normal_vert,fragmentShader:Z.normal_frag},sprite:{uniforms:xa([G.sprite,G.fog]),vertexShader:Z.sprite_vert,fragmentShader:Z.sprite_frag},background:{uniforms:{uvTransform:{value:new U},t2D:{value:null}},vertexShader:Z.background_vert,fragmentShader:Z.background_frag},cube:{uniforms:xa([G.envmap,{opacity:{value:1}}]),vertexShader:Z.cube_vert,fragmentShader:Z.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Z.equirect_vert,fragmentShader:Z.equirect_frag},distanceRGBA:{uniforms:xa([G.common,
|
|
|
G.displacementmap,{referencePosition:{value:new m},nearDistance:{value:1},farDistance:{value:1E3}}]),vertexShader:Z.distanceRGBA_vert,fragmentShader:Z.distanceRGBA_frag},shadow:{uniforms:xa([G.lights,G.fog,{color:{value:new E(0)},opacity:{value:1}}]),vertexShader:Z.shadow_vert,fragmentShader:Z.shadow_frag}};eb.physical={uniforms:xa([eb.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new p(1,
|
|
|
-1)},clearcoatNormalMap:{value:null},sheen:{value:new E(0)},transmission:{value:0},transmissionMap:{value:null}}]),vertexShader:Z.meshphysical_vert,fragmentShader:Z.meshphysical_frag};Ab.prototype=Object.create(ha.prototype);Ab.prototype.constructor=Ab;Ab.prototype.isCubeTexture=!0;Object.defineProperty(Ab.prototype,"images",{get:function(){return this.image},set:function(a){this.image=a}});Uc.prototype=Object.create(ha.prototype);Uc.prototype.constructor=Uc;Uc.prototype.isDataTexture2DArray=!0;Vc.prototype=
|
|
|
-Object.create(ha.prototype);Vc.prototype.constructor=Vc;Vc.prototype.isDataTexture3D=!0;var Hh=new ha,Jj=new Uc,Lj=new Vc,Ih=new Ab,Bh=[],Dh=[],Gh=new Float32Array(16),Fh=new Float32Array(9),Eh=new Float32Array(4);Jh.prototype.updateCache=function(a){var b=this.cache;a instanceof Float32Array&&b.length!==a.length&&(this.cache=new Float32Array(a.length));Ua(b,a)};Kh.prototype.setValue=function(a,b,d){for(var e=this.seq,f=0,g=e.length;f!==g;++f){var h=e[f];h.setValue(a,b[h.id],d)}};var ug=/([\w\d_]+)(\])?(\[|\.)?/g;
|
|
|
+1)},clearcoatNormalMap:{value:null},sheen:{value:new E(0)},transmission:{value:0},transmissionMap:{value:null}}]),vertexShader:Z.meshphysical_vert,fragmentShader:Z.meshphysical_frag};Ab.prototype=Object.create(ia.prototype);Ab.prototype.constructor=Ab;Ab.prototype.isCubeTexture=!0;Object.defineProperty(Ab.prototype,"images",{get:function(){return this.image},set:function(a){this.image=a}});Uc.prototype=Object.create(ia.prototype);Uc.prototype.constructor=Uc;Uc.prototype.isDataTexture2DArray=!0;Vc.prototype=
|
|
|
+Object.create(ia.prototype);Vc.prototype.constructor=Vc;Vc.prototype.isDataTexture3D=!0;var Hh=new ia,Jj=new Uc,Lj=new Vc,Ih=new Ab,Bh=[],Dh=[],Gh=new Float32Array(16),Fh=new Float32Array(9),Eh=new Float32Array(4);Jh.prototype.updateCache=function(a){var b=this.cache;a instanceof Float32Array&&b.length!==a.length&&(this.cache=new Float32Array(a.length));Ua(b,a)};Kh.prototype.setValue=function(a,b,d){for(var e=this.seq,f=0,g=e.length;f!==g;++f){var h=e[f];h.setValue(a,b[h.id],d)}};var ug=/([\w\d_]+)(\])?(\[|\.)?/g;
|
|
|
Sb.prototype.setValue=function(a,b,d,e){b=this.map[b];void 0!==b&&b.setValue(a,d,e)};Sb.prototype.setOptional=function(a,b,d){b=b[d];void 0!==b&&this.setValue(a,d,b)};Sb.upload=function(a,b,d,e){for(var f=0,g=b.length;f!==g;++f){var h=b[f],k=d[h.id];!1!==k.needsUpdate&&h.setValue(a,k.value,e)}};Sb.seqWithValue=function(a,b){for(var d=[],e=0,f=a.length;e!==f;++e){var g=a[e];g.id in b&&d.push(g)}return d};var qk=0,wg=/^[ \t]*#include +<([\w\d./]+)>/gm,Th=/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g,
|
|
|
Sh=/#pragma unroll_loop_start[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}[\s]+?#pragma unroll_loop_end/g,Ak=0;Tb.prototype=Object.create(M.prototype);Tb.prototype.constructor=Tb;Tb.prototype.isMeshDepthMaterial=!0;Tb.prototype.copy=function(a){M.prototype.copy.call(this,a);this.depthPacking=a.depthPacking;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.map=a.map;this.alphaMap=a.alphaMap;this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;
|
|
|
this.displacementBias=a.displacementBias;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;return this};Ub.prototype=Object.create(M.prototype);Ub.prototype.constructor=Ub;Ub.prototype.isMeshDistanceMaterial=!0;Ub.prototype.copy=function(a){M.prototype.copy.call(this,a);this.referencePosition.copy(a.referencePosition);this.nearDistance=a.nearDistance;this.farDistance=a.farDistance;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.map=a.map;this.alphaMap=a.alphaMap;
|
|
|
-this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;return this};af.prototype=Object.assign(Object.create(ia.prototype),{constructor:af,isArrayCamera:!0});Wb.prototype=Object.assign(Object.create(K.prototype),{constructor:Wb,isGroup:!0});Object.assign(Zd.prototype,{constructor:Zd,getHandSpace:function(){if(null===this._hand&&(this._hand=new Wb,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints=[],this._hand.inputState=
|
|
|
+this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;return this};af.prototype=Object.assign(Object.create(ja.prototype),{constructor:af,isArrayCamera:!0});Wb.prototype=Object.assign(Object.create(K.prototype),{constructor:Wb,isGroup:!0});Object.assign(Zd.prototype,{constructor:Zd,getHandSpace:function(){if(null===this._hand&&(this._hand=new Wb,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints=[],this._hand.inputState=
|
|
|
{pinching:!1},window.XRHand))for(var a=0;a<=window.XRHand.LITTLE_PHALANX_TIP;a++){var b=new Wb;b.matrixAutoUpdate=!1;b.visible=!1;this._hand.joints.push(b);this._hand.add(b)}return this._hand},getTargetRaySpace:function(){null===this._targetRay&&(this._targetRay=new Wb,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1);return this._targetRay},getGripSpace:function(){null===this._grip&&(this._grip=new Wb,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1);return this._grip},dispatchEvent:function(a){null!==
|
|
|
this._targetRay&&this._targetRay.dispatchEvent(a);null!==this._grip&&this._grip.dispatchEvent(a);null!==this._hand&&this._hand.dispatchEvent(a);return this},disconnect:function(a){this.dispatchEvent({type:"disconnected",data:a});null!==this._targetRay&&(this._targetRay.visible=!1);null!==this._grip&&(this._grip.visible=!1);null!==this._hand&&(this._hand.visible=!1);return this},update:function(a,b,d){var e=null,f=null,g=null,h=this._targetRay,k=this._grip,l=this._hand;if(a)if(l&&a.hand){g=!0;for(var m=
|
|
|
0;m<=window.XRHand.LITTLE_PHALANX_TIP;m++)if(a.hand[m]){var u=b.getJointPose(a.hand[m],d),q=l.joints[m];null!==u&&(q.matrix.fromArray(u.transform.matrix),q.matrix.decompose(q.position,q.rotation,q.scale),q.jointRadius=u.radius);q.visible=null!==u;u=l.joints[window.XRHand.INDEX_PHALANX_TIP].position.distanceTo(l.joints[window.XRHand.THUMB_PHALANX_TIP].position);l.inputState.pinching&&.025<u?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:a.handedness,target:this})):!l.inputState.pinching&&
|
|
@@ -732,8 +732,8 @@ var $f=new m,ag=new m;na.prototype=Object.assign(Object.create(Oa.prototype),{co
|
|
|
else if(a.isGeometry)for(b=a.vertices,a=a.lineDistances,d=0,e=b.length;d<e;d+=2)$f.copy(b[d]),ag.copy(b[d+1]),a[d]=0===d?0:a[d-1],a[d+1]=a[d]+$f.distanceTo(ag);return this}});ff.prototype=Object.assign(Object.create(Oa.prototype),{constructor:ff,isLineLoop:!0});fb.prototype=Object.create(M.prototype);fb.prototype.constructor=fb;fb.prototype.isPointsMaterial=!0;fb.prototype.copy=function(a){M.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.alphaMap=a.alphaMap;this.size=a.size;
|
|
|
this.sizeAttenuation=a.sizeAttenuation;this.morphTargets=a.morphTargets;return this};var Oi=new z,Cg=new T,Ue=new pa,bg=new m;Zc.prototype=Object.assign(Object.create(K.prototype),{constructor:Zc,isPoints:!0,copy:function(a){K.prototype.copy.call(this,a);this.material=a.material;this.geometry=a.geometry;return this},raycast:function(a,b){var d=this.geometry,e=this.matrixWorld,f=a.params.Points.threshold;null===d.boundingSphere&&d.computeBoundingSphere();Ue.copy(d.boundingSphere);Ue.applyMatrix4(e);
|
|
|
Ue.radius+=f;if(!1!==a.ray.intersectsSphere(Ue))if(Oi.getInverse(e),Cg.copy(a.ray).applyMatrix4(Oi),f/=(this.scale.x+this.scale.y+this.scale.z)/3,f*=f,d.isBufferGeometry){var g=d.index;d=d.attributes.position.array;if(null!==g){g=g.array;for(var h=0,k=g.length;h<k;h++){var l=g[h];bg.fromArray(d,3*l);Bg(bg,l,f,e,a,b,this)}}else for(g=0,h=d.length/3;g<h;g++)bg.fromArray(d,3*g),Bg(bg,g,f,e,a,b,this)}else for(d=d.vertices,g=0,h=d.length;g<h;g++)Bg(d[g],g,f,e,a,b,this)},updateMorphTargets:function(){var a=
|
|
|
-this.geometry;if(a.isBufferGeometry){a=a.morphAttributes;var b=Object.keys(a);if(0<b.length&&(a=a[b[0]],void 0!==a)){this.morphTargetInfluences=[];this.morphTargetDictionary={};b=0;for(var d=a.length;b<d;b++){var e=a[b].name||String(b);this.morphTargetInfluences.push(0);this.morphTargetDictionary[e]=b}}}else a=a.morphTargets,void 0!==a&&0<a.length&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}});Dg.prototype=Object.assign(Object.create(ha.prototype),
|
|
|
-{constructor:Dg,isVideoTexture:!0,update:function(){var a=this.image;!1==="requestVideoFrameCallback"in a&&a.readyState>=a.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}});$c.prototype=Object.create(ha.prototype);$c.prototype.constructor=$c;$c.prototype.isCompressedTexture=!0;de.prototype=Object.create(ha.prototype);de.prototype.constructor=de;de.prototype.isCanvasTexture=!0;ee.prototype=Object.create(ha.prototype);ee.prototype.constructor=ee;ee.prototype.isDepthTexture=!0;ad.prototype=Object.create(J.prototype);
|
|
|
+this.geometry;if(a.isBufferGeometry){a=a.morphAttributes;var b=Object.keys(a);if(0<b.length&&(a=a[b[0]],void 0!==a)){this.morphTargetInfluences=[];this.morphTargetDictionary={};b=0;for(var d=a.length;b<d;b++){var e=a[b].name||String(b);this.morphTargetInfluences.push(0);this.morphTargetDictionary[e]=b}}}else a=a.morphTargets,void 0!==a&&0<a.length&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}});Dg.prototype=Object.assign(Object.create(ia.prototype),
|
|
|
+{constructor:Dg,isVideoTexture:!0,update:function(){var a=this.image;!1==="requestVideoFrameCallback"in a&&a.readyState>=a.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}});$c.prototype=Object.create(ia.prototype);$c.prototype.constructor=$c;$c.prototype.isCompressedTexture=!0;de.prototype=Object.create(ia.prototype);de.prototype.constructor=de;de.prototype.isCanvasTexture=!0;ee.prototype=Object.create(ia.prototype);ee.prototype.constructor=ee;ee.prototype.isDepthTexture=!0;ad.prototype=Object.create(J.prototype);
|
|
|
ad.prototype.constructor=ad;fe.prototype=Object.create(S.prototype);fe.prototype.constructor=fe;bd.prototype=Object.create(J.prototype);bd.prototype.constructor=bd;ge.prototype=Object.create(S.prototype);ge.prototype.constructor=ge;Pa.prototype=Object.create(J.prototype);Pa.prototype.constructor=Pa;he.prototype=Object.create(S.prototype);he.prototype.constructor=he;cd.prototype=Object.create(Pa.prototype);cd.prototype.constructor=cd;ie.prototype=Object.create(S.prototype);ie.prototype.constructor=
|
|
|
ie;rc.prototype=Object.create(Pa.prototype);rc.prototype.constructor=rc;je.prototype=Object.create(S.prototype);je.prototype.constructor=je;dd.prototype=Object.create(Pa.prototype);dd.prototype.constructor=dd;ke.prototype=Object.create(S.prototype);ke.prototype.constructor=ke;ed.prototype=Object.create(Pa.prototype);ed.prototype.constructor=ed;le.prototype=Object.create(S.prototype);le.prototype.constructor=le;sc.prototype=Object.create(J.prototype);sc.prototype.constructor=sc;sc.prototype.toJSON=
|
|
|
function(){var a=J.prototype.toJSON.call(this);a.path=this.parameters.path.toJSON();return a};me.prototype=Object.create(S.prototype);me.prototype.constructor=me;fd.prototype=Object.create(J.prototype);fd.prototype.constructor=fd;ne.prototype=Object.create(S.prototype);ne.prototype.constructor=ne;gd.prototype=Object.create(J.prototype);gd.prototype.constructor=gd;var Wk={triangulate:function(a,b,d){d=d||2;var e=b&&b.length,f=e?b[0]*d:a.length,g=bi(a,0,f,d,!0),h=[];if(!g||g.next===g.prev)return h;
|
|
@@ -759,29 +759,29 @@ function(a){M.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.ma
|
|
|
this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};Cc.prototype=Object.create(M.prototype);Cc.prototype.constructor=Cc;Cc.prototype.isMeshMatcapMaterial=!0;Cc.prototype.copy=function(a){M.prototype.copy.call(this,a);this.defines={MATCAP:""};this.color.copy(a.color);this.matcap=a.matcap;this.map=a.map;this.bumpMap=a.bumpMap;
|
|
|
this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.alphaMap=a.alphaMap;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};Dc.prototype=Object.create(sa.prototype);Dc.prototype.constructor=Dc;Dc.prototype.isLineDashedMaterial=!0;Dc.prototype.copy=
|
|
|
function(a){sa.prototype.copy.call(this,a);this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize=a.gapSize;return this};var Xk=Object.freeze({__proto__:null,ShadowMaterial:yc,SpriteMaterial:Yb,RawShaderMaterial:Eb,ShaderMaterial:Ia,PointsMaterial:fb,MeshPhysicalMaterial:$b,MeshStandardMaterial:sb,MeshPhongMaterial:ac,MeshToonMaterial:zc,MeshNormalMaterial:Ac,MeshLambertMaterial:Bc,MeshDepthMaterial:Tb,MeshDistanceMaterial:Ub,MeshBasicMaterial:$a,MeshMatcapMaterial:Cc,LineDashedMaterial:Dc,LineBasicMaterial:sa,
|
|
|
-Material:M}),ja={arraySlice:function(a,b,d){return ja.isTypedArray(a)?new a.constructor(a.subarray(b,void 0!==d?d:a.length)):a.slice(b,d)},convertArray:function(a,b,d){return!a||!d&&a.constructor===b?a:"number"===typeof b.BYTES_PER_ELEMENT?new b(a):Array.prototype.slice.call(a)},isTypedArray:function(a){return ArrayBuffer.isView(a)&&!(a instanceof DataView)},getKeyframeOrder:function(a){for(var b=a.length,d=Array(b),e=0;e!==b;++e)d[e]=e;d.sort(function(b,d){return a[b]-a[d]});return d},sortedArray:function(a,
|
|
|
+Material:M}),ha={arraySlice:function(a,b,d){return ha.isTypedArray(a)?new a.constructor(a.subarray(b,void 0!==d?d:a.length)):a.slice(b,d)},convertArray:function(a,b,d){return!a||!d&&a.constructor===b?a:"number"===typeof b.BYTES_PER_ELEMENT?new b(a):Array.prototype.slice.call(a)},isTypedArray:function(a){return ArrayBuffer.isView(a)&&!(a instanceof DataView)},getKeyframeOrder:function(a){for(var b=a.length,d=Array(b),e=0;e!==b;++e)d[e]=e;d.sort(function(b,d){return a[b]-a[d]});return d},sortedArray:function(a,
|
|
|
b,d){for(var e=a.length,f=new a.constructor(e),g=0,h=0;h!==e;++g)for(var k=d[g]*b,l=0;l!==b;++l)f[h++]=a[k+l];return f},flattenJSON:function(a,b,d,e){for(var f=1,g=a[0];void 0!==g&&void 0===g[e];)g=a[f++];if(void 0!==g){var h=g[e];if(void 0!==h)if(Array.isArray(h)){do h=g[e],void 0!==h&&(b.push(g.time),d.push.apply(d,h)),g=a[f++];while(void 0!==g)}else if(void 0!==h.toArray){do h=g[e],void 0!==h&&(b.push(g.time),h.toArray(d,d.length)),g=a[f++];while(void 0!==g)}else{do h=g[e],void 0!==h&&(b.push(g.time),
|
|
|
-d.push(h)),g=a[f++];while(void 0!==g)}}},subclip:function(a,b,d,e,f){f=f||30;a=a.clone();a.name=b;b=[];for(var g=0;g<a.tracks.length;++g){for(var h=a.tracks[g],k=h.getValueSize(),l=[],m=[],u=0;u<h.times.length;++u){var q=h.times[u]*f;if(!(q<d||q>=e))for(l.push(h.times[u]),q=0;q<k;++q)m.push(h.values[u*k+q])}0!==l.length&&(h.times=ja.convertArray(l,h.times.constructor),h.values=ja.convertArray(m,h.values.constructor),b.push(h))}a.tracks=b;d=Infinity;for(e=0;e<a.tracks.length;++e)d>a.tracks[e].times[0]&&
|
|
|
+d.push(h)),g=a[f++];while(void 0!==g)}}},subclip:function(a,b,d,e,f){f=f||30;a=a.clone();a.name=b;b=[];for(var g=0;g<a.tracks.length;++g){for(var h=a.tracks[g],k=h.getValueSize(),l=[],m=[],u=0;u<h.times.length;++u){var q=h.times[u]*f;if(!(q<d||q>=e))for(l.push(h.times[u]),q=0;q<k;++q)m.push(h.values[u*k+q])}0!==l.length&&(h.times=ha.convertArray(l,h.times.constructor),h.values=ha.convertArray(m,h.values.constructor),b.push(h))}a.tracks=b;d=Infinity;for(e=0;e<a.tracks.length;++e)d>a.tracks[e].times[0]&&
|
|
|
(d=a.tracks[e].times[0]);for(e=0;e<a.tracks.length;++e)a.tracks[e].shift(-1*d);a.resetDuration();return a},makeClipAdditive:function(a,b,d,e){void 0===b&&(b=0);void 0===d&&(d=a);if(void 0===e||0>=e)e=30;var f=a.tracks.length,g=b/e;b=function(b){var e=d.tracks[b],f=e.ValueTypeName;if("bool"!==f&&"string"!==f&&(b=a.tracks.find(function(a){return a.name===e.name&&a.ValueTypeName===f}),void 0!==b)){var h=0,l=e.getValueSize();e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(h=l/3);var m=
|
|
|
-0,v=b.getValueSize();b.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(m=v/3);var t=e.times.length-1,p=void 0;g<=e.times[0]?p=ja.arraySlice(e.values,h,l-h):g>=e.times[t]?(p=t*l+h,p=ja.arraySlice(e.values,p,p+l-h)):(p=e.createInterpolant(),t=h,h=l-h,p.evaluate(g),p=ja.arraySlice(p.resultBuffer,t,h));"quaternion"===f&&(new Q).fromArray(p).normalize().conjugate().toArray(p);h=b.times.length;for(l=0;l<h;++l)if(t=l*v+m,"quaternion"===f)Q.multiplyQuaternionsFlat(b.values,t,p,0,b.values,t);
|
|
|
+0,v=b.getValueSize();b.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(m=v/3);var t=e.times.length-1,p=void 0;g<=e.times[0]?p=ha.arraySlice(e.values,h,l-h):g>=e.times[t]?(p=t*l+h,p=ha.arraySlice(e.values,p,p+l-h)):(p=e.createInterpolant(),t=h,h=l-h,p.evaluate(g),p=ha.arraySlice(p.resultBuffer,t,h));"quaternion"===f&&(new Q).fromArray(p).normalize().conjugate().toArray(p);h=b.times.length;for(l=0;l<h;++l)if(t=l*v+m,"quaternion"===f)Q.multiplyQuaternionsFlat(b.values,t,p,0,b.values,t);
|
|
|
else for(var y=v-2*m,x=0;x<y;++x)b.values[t+x]-=p[x]}};for(e=0;e<f;++e)b(e);a.blendMode=2501;return a}};Object.assign(Xa.prototype,{evaluate:function(a){var b=this.parameterPositions,d=this._cachedIndex,e=b[d],f=b[d-1];a:{b:{c:{d:if(!(a<e)){for(var g=d+2;;){if(void 0===e){if(a<f)break d;this._cachedIndex=d=b.length;return this.afterEnd_(d-1,a,f)}if(d===g)break;f=e;e=b[++d];if(a<e)break b}e=b.length;break c}if(a>=f)break a;else{g=b[1];a<g&&(d=2,f=g);for(g=d-2;;){if(void 0===f)return this._cachedIndex=
|
|
|
0,this.beforeStart_(0,a,e);if(d===g)break;e=f;f=b[--d-1];if(a>=f)break b}e=d;d=0}}for(;d<e;)f=d+e>>>1,a<b[f]?e=f:d=f+1;e=b[d];f=b[d-1];if(void 0===f)return this._cachedIndex=0,this.beforeStart_(0,a,e);if(void 0===e)return this._cachedIndex=d=b.length,this.afterEnd_(d-1,f,a)}this._cachedIndex=d;this.intervalChanged_(d,f,e)}return this.interpolate_(d,f,a,e)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(a){var b=this.resultBuffer,
|
|
|
d=this.sampleValues,e=this.valueSize;a*=e;for(var f=0;f!==e;++f)b[f]=d[a+f];return b},interpolate_:function(){throw Error("call to abstract method");},intervalChanged_:function(){}});Object.assign(Xa.prototype,{beforeStart_:Xa.prototype.copySampleValue_,afterEnd_:Xa.prototype.copySampleValue_});kf.prototype=Object.assign(Object.create(Xa.prototype),{constructor:kf,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(a,b,d){var e=this.parameterPositions,f=a-2,g=a+1,h=e[f],k=
|
|
|
e[g];if(void 0===h)switch(this.getSettings_().endingStart){case 2401:f=a;h=2*b-d;break;case 2402:f=e.length-2;h=b+e[f]-e[f+1];break;default:f=a,h=d}if(void 0===k)switch(this.getSettings_().endingEnd){case 2401:g=a;k=2*d-b;break;case 2402:g=1;k=d+e[1]-e[0];break;default:g=a-1,k=b}a=.5*(d-b);e=this.valueSize;this._weightPrev=a/(b-h);this._weightNext=a/(k-d);this._offsetPrev=f*e;this._offsetNext=g*e},interpolate_:function(a,b,d,e){var f=this.resultBuffer,g=this.sampleValues,h=this.valueSize;a*=h;var k=
|
|
|
a-h,l=this._offsetPrev,m=this._offsetNext,u=this._weightPrev,q=this._weightNext,p=(d-b)/(e-b);d=p*p;e=d*p;b=-u*e+2*u*d-u*p;u=(1+u)*e+(-1.5-2*u)*d+(-.5+u)*p+1;p=(-1-q)*e+(1.5+q)*d+.5*p;q=q*e-q*d;for(d=0;d!==h;++d)f[d]=b*g[l+d]+u*g[k+d]+p*g[a+d]+q*g[m+d];return f}});ye.prototype=Object.assign(Object.create(Xa.prototype),{constructor:ye,interpolate_:function(a,b,d,e){var f=this.resultBuffer,g=this.sampleValues,h=this.valueSize;a*=h;var k=a-h;b=(d-b)/(e-b);d=1-b;for(e=0;e!==h;++e)f[e]=g[k+e]*d+g[a+e]*
|
|
|
-b;return f}});lf.prototype=Object.assign(Object.create(Xa.prototype),{constructor:lf,interpolate_:function(a){return this.copySampleValue_(a-1)}});Object.assign(Ea,{toJSON:function(a){var b=a.constructor;if(void 0!==b.toJSON)b=b.toJSON(a);else{b={name:a.name,times:ja.convertArray(a.times,Array),values:ja.convertArray(a.values,Array)};var d=a.getInterpolation();d!==a.DefaultInterpolation&&(b.interpolation=d)}b.type=a.ValueTypeName;return b}});Object.assign(Ea.prototype,{constructor:Ea,TimeBufferType:Float32Array,
|
|
|
+b;return f}});lf.prototype=Object.assign(Object.create(Xa.prototype),{constructor:lf,interpolate_:function(a){return this.copySampleValue_(a-1)}});Object.assign(Ea,{toJSON:function(a){var b=a.constructor;if(void 0!==b.toJSON)b=b.toJSON(a);else{b={name:a.name,times:ha.convertArray(a.times,Array),values:ha.convertArray(a.values,Array)};var d=a.getInterpolation();d!==a.DefaultInterpolation&&(b.interpolation=d)}b.type=a.ValueTypeName;return b}});Object.assign(Ea.prototype,{constructor:Ea,TimeBufferType:Float32Array,
|
|
|
ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(a){return new lf(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodLinear:function(a){return new ye(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodSmooth:function(a){return new kf(this.times,this.values,this.getValueSize(),a)},setInterpolation:function(a){switch(a){case 2300:var b=this.InterpolantFactoryMethodDiscrete;break;case 2301:b=this.InterpolantFactoryMethodLinear;
|
|
|
break;case 2302:b=this.InterpolantFactoryMethodSmooth}if(void 0===b){b="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant)if(a!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw Error(b);console.warn("THREE.KeyframeTrack:",b);return this}this.createInterpolant=b;return this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;
|
|
|
-case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(a){if(0!==a)for(var b=this.times,d=0,e=b.length;d!==e;++d)b[d]+=a;return this},scale:function(a){if(1!==a)for(var b=this.times,d=0,e=b.length;d!==e;++d)b[d]*=a;return this},trim:function(a,b){for(var d=this.times,e=d.length,f=0,g=e-1;f!==e&&d[f]<a;)++f;for(;-1!==g&&d[g]>b;)--g;++g;if(0!==f||g!==e)f>=g&&(g=Math.max(g,1),f=g-1),a=this.getValueSize(),this.times=ja.arraySlice(d,
|
|
|
-f,g),this.values=ja.arraySlice(this.values,f*a,g*a);return this},validate:function(){var a=!0,b=this.getValueSize();0!==b-Math.floor(b)&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),a=!1);var d=this.times;b=this.values;var e=d.length;0===e&&(console.error("THREE.KeyframeTrack: Track is empty.",this),a=!1);for(var f=null,g=0;g!==e;g++){var h=d[g];if("number"===typeof h&&isNaN(h)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,g,h);a=!1;break}if(null!==
|
|
|
-f&&f>h){console.error("THREE.KeyframeTrack: Out of order keys.",this,g,h,f);a=!1;break}f=h}if(void 0!==b&&ja.isTypedArray(b))for(d=0,e=b.length;d!==e;++d)if(f=b[d],isNaN(f)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,d,f);a=!1;break}return a},optimize:function(){for(var a=ja.arraySlice(this.times),b=ja.arraySlice(this.values),d=this.getValueSize(),e=2302===this.getInterpolation(),f=a.length-1,g=1,h=1;h<f;++h){var k=!1,l=a[h];if(l!==a[h+1]&&(1!==h||l!==l[0]))if(e)k=!0;else{l=
|
|
|
-h*d;for(var m=l-d,u=l+d,q=0;q!==d;++q){var p=b[l+q];if(p!==b[m+q]||p!==b[u+q]){k=!0;break}}}if(k){if(h!==g)for(a[g]=a[h],k=h*d,l=g*d,m=0;m!==d;++m)b[l+m]=b[k+m];++g}}if(0<f){a[g]=a[f];e=f*d;f=g*d;for(h=0;h!==d;++h)b[f+h]=b[e+h];++g}g!==a.length?(this.times=ja.arraySlice(a,0,g),this.values=ja.arraySlice(b,0,g*d)):(this.times=a,this.values=b);return this},clone:function(){var a=ja.arraySlice(this.times,0),b=ja.arraySlice(this.values,0);a=new this.constructor(this.name,a,b);a.createInterpolant=this.createInterpolant;
|
|
|
+case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(a){if(0!==a)for(var b=this.times,d=0,e=b.length;d!==e;++d)b[d]+=a;return this},scale:function(a){if(1!==a)for(var b=this.times,d=0,e=b.length;d!==e;++d)b[d]*=a;return this},trim:function(a,b){for(var d=this.times,e=d.length,f=0,g=e-1;f!==e&&d[f]<a;)++f;for(;-1!==g&&d[g]>b;)--g;++g;if(0!==f||g!==e)f>=g&&(g=Math.max(g,1),f=g-1),a=this.getValueSize(),this.times=ha.arraySlice(d,
|
|
|
+f,g),this.values=ha.arraySlice(this.values,f*a,g*a);return this},validate:function(){var a=!0,b=this.getValueSize();0!==b-Math.floor(b)&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),a=!1);var d=this.times;b=this.values;var e=d.length;0===e&&(console.error("THREE.KeyframeTrack: Track is empty.",this),a=!1);for(var f=null,g=0;g!==e;g++){var h=d[g];if("number"===typeof h&&isNaN(h)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,g,h);a=!1;break}if(null!==
|
|
|
+f&&f>h){console.error("THREE.KeyframeTrack: Out of order keys.",this,g,h,f);a=!1;break}f=h}if(void 0!==b&&ha.isTypedArray(b))for(d=0,e=b.length;d!==e;++d)if(f=b[d],isNaN(f)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,d,f);a=!1;break}return a},optimize:function(){for(var a=ha.arraySlice(this.times),b=ha.arraySlice(this.values),d=this.getValueSize(),e=2302===this.getInterpolation(),f=a.length-1,g=1,h=1;h<f;++h){var k=!1,l=a[h];if(l!==a[h+1]&&(1!==h||l!==l[0]))if(e)k=!0;else{l=
|
|
|
+h*d;for(var m=l-d,u=l+d,q=0;q!==d;++q){var p=b[l+q];if(p!==b[m+q]||p!==b[u+q]){k=!0;break}}}if(k){if(h!==g)for(a[g]=a[h],k=h*d,l=g*d,m=0;m!==d;++m)b[l+m]=b[k+m];++g}}if(0<f){a[g]=a[f];e=f*d;f=g*d;for(h=0;h!==d;++h)b[f+h]=b[e+h];++g}g!==a.length?(this.times=ha.arraySlice(a,0,g),this.values=ha.arraySlice(b,0,g*d)):(this.times=a,this.values=b);return this},clone:function(){var a=ha.arraySlice(this.times,0),b=ha.arraySlice(this.values,0);a=new this.constructor(this.name,a,b);a.createInterpolant=this.createInterpolant;
|
|
|
return a}});mf.prototype=Object.assign(Object.create(Ea.prototype),{constructor:mf,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});nf.prototype=Object.assign(Object.create(Ea.prototype),{constructor:nf,ValueTypeName:"color"});nd.prototype=Object.assign(Object.create(Ea.prototype),{constructor:nd,ValueTypeName:"number"});of.prototype=Object.assign(Object.create(Xa.prototype),{constructor:of,interpolate_:function(a,
|
|
|
b,d,e){var f=this.resultBuffer,g=this.sampleValues,h=this.valueSize;b=(d-b)/(e-b);a*=h;for(d=a+h;a!==d;a+=4)Q.slerpFlat(f,0,g,a-h,g,a,b);return f}});ze.prototype=Object.assign(Object.create(Ea.prototype),{constructor:ze,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(a){return new of(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodSmooth:void 0});pf.prototype=Object.assign(Object.create(Ea.prototype),{constructor:pf,ValueTypeName:"string",
|
|
|
ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});od.prototype=Object.assign(Object.create(Ea.prototype),{constructor:od,ValueTypeName:"vector"});Object.assign(bb,{parse:function(a){for(var b=[],d=a.tracks,e=1/(a.fps||1),f=0,g=d.length;f!==g;++f)b.push(Lk(d[f]).scale(e));return new bb(a.name,a.duration,b,a.blendMode)},toJSON:function(a){var b=[],d=a.tracks;a={name:a.name,duration:a.duration,tracks:b,uuid:a.uuid,blendMode:a.blendMode};
|
|
|
-for(var e=0,f=d.length;e!==f;++e)b.push(Ea.toJSON(d[e]));return a},CreateFromMorphTargetSequence:function(a,b,d,e){for(var f=b.length,g=[],h=0;h<f;h++){var k=[],l=[];k.push((h+f-1)%f,h,(h+1)%f);l.push(0,1,0);var m=ja.getKeyframeOrder(k);k=ja.sortedArray(k,1,m);l=ja.sortedArray(l,1,m);e||0!==k[0]||(k.push(f),l.push(l[0]));g.push((new nd(".morphTargetInfluences["+b[h].name+"]",k,l)).scale(1/d))}return new bb(a,-1,g)},findByName:function(a,b){var d=a;Array.isArray(a)||(d=a.geometry&&a.geometry.animations||
|
|
|
+for(var e=0,f=d.length;e!==f;++e)b.push(Ea.toJSON(d[e]));return a},CreateFromMorphTargetSequence:function(a,b,d,e){for(var f=b.length,g=[],h=0;h<f;h++){var k=[],l=[];k.push((h+f-1)%f,h,(h+1)%f);l.push(0,1,0);var m=ha.getKeyframeOrder(k);k=ha.sortedArray(k,1,m);l=ha.sortedArray(l,1,m);e||0!==k[0]||(k.push(f),l.push(l[0]));g.push((new nd(".morphTargetInfluences["+b[h].name+"]",k,l)).scale(1/d))}return new bb(a,-1,g)},findByName:function(a,b){var d=a;Array.isArray(a)||(d=a.geometry&&a.geometry.animations||
|
|
|
a.animations);for(a=0;a<d.length;a++)if(d[a].name===b)return d[a];return null},CreateClipsFromMorphTargetSequences:function(a,b,d){for(var e={},f=/^([\w-]*?)([\d]+)$/,g=0,h=a.length;g<h;g++){var k=a[g],l=k.name.match(f);if(l&&1<l.length){l=l[1];var m=e[l];m||(e[l]=m=[]);m.push(k)}}a=[];for(var u in e)a.push(bb.CreateFromMorphTargetSequence(u,e[u],b,d));return a},parseAnimation:function(a,b){if(!a)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;var d=function(a,b,
|
|
|
-d,e,f){if(0!==d.length){var g=[],h=[];ja.flattenJSON(d,g,h,e);0!==g.length&&f.push(new a(b,g,h))}},e=[],f=a.name||"default",g=a.fps||30,h=a.blendMode,k=a.length||-1;a=a.hierarchy||[];for(var l=0;l<a.length;l++){var m=a[l].keys;if(m&&0!==m.length)if(m[0].morphTargets){k={};var u=void 0;for(u=0;u<m.length;u++)if(m[u].morphTargets)for(var q=0;q<m[u].morphTargets.length;q++)k[m[u].morphTargets[q]]=-1;for(var p in k){q=[];for(var t=[],w=0;w!==m[u].morphTargets.length;++w){var y=m[u];q.push(y.time);t.push(y.morphTarget===
|
|
|
+d,e,f){if(0!==d.length){var g=[],h=[];ha.flattenJSON(d,g,h,e);0!==g.length&&f.push(new a(b,g,h))}},e=[],f=a.name||"default",g=a.fps||30,h=a.blendMode,k=a.length||-1;a=a.hierarchy||[];for(var l=0;l<a.length;l++){var m=a[l].keys;if(m&&0!==m.length)if(m[0].morphTargets){k={};var u=void 0;for(u=0;u<m.length;u++)if(m[u].morphTargets)for(var q=0;q<m[u].morphTargets.length;q++)k[m[u].morphTargets[q]]=-1;for(var p in k){q=[];for(var t=[],w=0;w!==m[u].morphTargets.length;++w){var y=m[u];q.push(y.time);t.push(y.morphTarget===
|
|
|
p?1:0)}e.push(new nd(".morphTargetInfluence["+p+"]",q,t))}k=k.length*(g||1)}else u=".bones["+b[l].name+"]",d(od,u+".position",m,"pos",e),d(ze,u+".quaternion",m,"rot",e),d(od,u+".scale",m,"scl",e)}return 0===e.length?null:new bb(f,k,e,h)}});Object.assign(bb.prototype,{resetDuration:function(){for(var a=0,b=0,d=this.tracks.length;b!==d;++b){var e=this.tracks[b];a=Math.max(a,e.times[e.times.length-1])}this.duration=a;return this},trim:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].trim(0,
|
|
|
this.duration);return this},validate:function(){for(var a=!0,b=0;b<this.tracks.length;b++)a=a&&this.tracks[b].validate();return a},optimize:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].optimize();return this},clone:function(){for(var a=[],b=0;b<this.tracks.length;b++)a.push(this.tracks[b].clone());return new bb(this.name,this.duration,a,this.blendMode)}});var Hc={enabled:!1,files:{},add:function(a,b){!1!==this.enabled&&(this.files[a]=b)},get:function(a){if(!1!==this.enabled)return this.files[a]},
|
|
|
remove:function(a){delete this.files[a]},clear:function(){this.files={}}},ji=new Gg;Object.assign(fa.prototype,{load:function(){},loadAsync:function(a,b){var d=this;return new Promise(function(e,f){d.load(a,e,b,f)})},parse:function(){},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=a;return this},setResourcePath:function(a){this.resourcePath=a;return this},setRequestHeader:function(a){this.requestHeader=a;return this}});var nb={};cb.prototype=Object.assign(Object.create(fa.prototype),
|
|
@@ -796,7 +796,7 @@ a.width,k.image.height=a.height,k.mipmaps=a.mipmaps;1===a.mipmapCount&&(k.minFil
|
|
|
void 0!==this.path&&(a=this.path+a);a=this.manager.resolveURL(a);var h=this,k=Hc.get(a);if(void 0!==k)return h.manager.itemStart(a),setTimeout(function(){b&&b(k);h.manager.itemEnd(a)},0),k;var l=document.createElementNS("http://www.w3.org/1999/xhtml","img");l.addEventListener("load",f,!1);l.addEventListener("error",g,!1);"data:"!==a.substr(0,5)&&void 0!==this.crossOrigin&&(l.crossOrigin=this.crossOrigin);h.manager.itemStart(a);l.src=a;return l}});qf.prototype=Object.assign(Object.create(fa.prototype),
|
|
|
{constructor:qf,load:function(a,b,d,e){function f(d){h.load(a[d],function(a){g.images[d]=a;k++;6===k&&(g.needsUpdate=!0,b&&b(g))},void 0,e)}var g=new Ab,h=new pd(this.manager);h.setCrossOrigin(this.crossOrigin);h.setPath(this.path);var k=0;for(d=0;d<a.length;++d)f(d);return g}});rf.prototype=Object.assign(Object.create(fa.prototype),{constructor:rf,load:function(a,b,d,e){var f=this,g=new oc,h=new cb(this.manager);h.setResponseType("arraybuffer");h.setRequestHeader(this.requestHeader);h.setPath(this.path);
|
|
|
h.load(a,function(a){if(a=f.parse(a))void 0!==a.image?g.image=a.image:void 0!==a.data&&(g.image.width=a.width,g.image.height=a.height,g.image.data=a.data),g.wrapS=void 0!==a.wrapS?a.wrapS:1001,g.wrapT=void 0!==a.wrapT?a.wrapT:1001,g.magFilter=void 0!==a.magFilter?a.magFilter:1006,g.minFilter=void 0!==a.minFilter?a.minFilter:1006,g.anisotropy=void 0!==a.anisotropy?a.anisotropy:1,void 0!==a.format&&(g.format=a.format),void 0!==a.type&&(g.type=a.type),void 0!==a.mipmaps&&(g.mipmaps=a.mipmaps,g.minFilter=
|
|
|
-1008),1===a.mipmapCount&&(g.minFilter=1006),g.needsUpdate=!0,b&&b(g,a)},d,e);return g}});sf.prototype=Object.assign(Object.create(fa.prototype),{constructor:sf,load:function(a,b,d,e){var f=new ha,g=new pd(this.manager);g.setCrossOrigin(this.crossOrigin);g.setPath(this.path);g.load(a,function(d){f.image=d;d=0<a.search(/\.jpe?g($|\?)/i)||0===a.search(/^data:image\/jpeg/);f.format=d?1022:1023;f.needsUpdate=!0;void 0!==b&&b(f)},d,e);return f}});Object.assign(I.prototype,{getPoint:function(){console.warn("THREE.Curve: .getPoint() not implemented.");
|
|
|
+1008),1===a.mipmapCount&&(g.minFilter=1006),g.needsUpdate=!0,b&&b(g,a)},d,e);return g}});sf.prototype=Object.assign(Object.create(fa.prototype),{constructor:sf,load:function(a,b,d,e){var f=new ia,g=new pd(this.manager);g.setCrossOrigin(this.crossOrigin);g.setPath(this.path);g.load(a,function(d){f.image=d;d=0<a.search(/\.jpe?g($|\?)/i)||0===a.search(/^data:image\/jpeg/);f.format=d?1022:1023;f.needsUpdate=!0;void 0!==b&&b(f)},d,e);return f}});Object.assign(I.prototype,{getPoint:function(){console.warn("THREE.Curve: .getPoint() not implemented.");
|
|
|
return null},getPointAt:function(a,b){a=this.getUtoTmapping(a);return this.getPoint(a,b)},getPoints:function(a){void 0===a&&(a=5);for(var b=[],d=0;d<=a;d++)b.push(this.getPoint(d/a));return b},getSpacedPoints:function(a){void 0===a&&(a=5);for(var b=[],d=0;d<=a;d++)b.push(this.getPointAt(d/a));return b},getLength:function(){var a=this.getLengths();return a[a.length-1]},getLengths:function(a){void 0===a&&(a=this.arcLengthDivisions);if(this.cacheArcLengths&&this.cacheArcLengths.length===a+1&&!this.needsUpdate)return this.cacheArcLengths;
|
|
|
this.needsUpdate=!1;var b=[],d=this.getPoint(0),e=0;b.push(0);for(var f=1;f<=a;f++){var g=this.getPoint(f/a);e+=g.distanceTo(d);b.push(e);d=g}return this.cacheArcLengths=b},updateArcLengths:function(){this.needsUpdate=!0;this.getLengths()},getUtoTmapping:function(a,b){var d=this.getLengths(),e=d.length;b=b?b:a*d[e-1];for(var f=0,g=e-1,h;f<=g;)if(a=Math.floor(f+(g-f)/2),h=d[a]-b,0>h)f=a+1;else if(0<h)g=a-1;else{g=a;break}a=g;if(d[a]===b)return a/(e-1);f=d[a];return(a+(b-f)/(d[a+1]-f))/(e-1)},getTangent:function(a,
|
|
|
b){var d=a-1E-4;a+=1E-4;0>d&&(d=0);1<a&&(a=1);d=this.getPoint(d);a=this.getPoint(a);b=b||(d.isVector2?new p:new m);b.copy(a).sub(d).normalize();return b},getTangentAt:function(a,b){a=this.getUtoTmapping(a);return this.getTangent(a,b)},computeFrenetFrames:function(a,b){for(var d=new m,e=[],f=[],g=[],h=new m,k=new z,l=0;l<=a;l++)e[l]=this.getTangentAt(l/a,new m),e[l].normalize();f[0]=new m;g[0]=new m;l=Number.MAX_VALUE;var r=Math.abs(e[0].x),u=Math.abs(e[0].y),q=Math.abs(e[0].z);r<=l&&(l=r,d.set(1,
|
|
@@ -873,10 +873,10 @@ break;case "ExtrudeGeometry":case "ExtrudeBufferGeometry":h=[];l=0;for(m=k.shape
|
|
|
continue}h.uuid=k.uuid;void 0!==k.name&&(h.name=k.name);!0===h.isBufferGeometry&&void 0!==k.userData&&(h.userData=k.userData);d[k.uuid]=h}return d},parseMaterials:function(a,b){var d={},e={};if(void 0!==a){var f=new Bf;f.setTextures(b);b=0;for(var g=a.length;b<g;b++){var h=a[b];if("MultiMaterial"===h.type){for(var k=[],l=0;l<h.materials.length;l++){var m=h.materials[l];void 0===d[m.uuid]&&(d[m.uuid]=f.parse(m));k.push(d[m.uuid])}e[h.uuid]=k}else void 0===d[h.uuid]&&(d[h.uuid]=f.parse(h)),e[h.uuid]=
|
|
|
d[h.uuid]}}return e},parseAnimations:function(a){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=bb.parse(e);void 0!==e.uuid&&(f.uuid=e.uuid);b.push(f)}return b},parseImages:function(a,b){function d(a){e.manager.itemStart(a);return g.load(a,function(){e.manager.itemEnd(a)},void 0,function(){e.manager.itemError(a);e.manager.itemEnd(a)})}var e=this,f={};if(void 0!==a&&0<a.length){b=new Gg(b);var g=new pd(b);g.setCrossOrigin(this.crossOrigin);b=0;for(var h=a.length;b<h;b++){var k=a[b],l=k.url;if(Array.isArray(l)){f[k.uuid]=
|
|
|
[];for(var m=0,p=l.length;m<p;m++){var q=l[m];q=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(q)?q:e.resourcePath+q;f[k.uuid].push(d(q))}}else l=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(k.url)?k.url:e.resourcePath+k.url,f[k.uuid]=d(l)}}return f},parseTextures:function(a,b){function d(a,b){if("number"===typeof a)return a;console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",a);return b[a]}var e={};if(void 0!==a)for(var f=0,g=a.length;f<g;f++){var h=a[f];void 0===h.image&&console.warn('THREE.ObjectLoader: No "image" specified for',
|
|
|
-h.uuid);void 0===b[h.image]&&console.warn("THREE.ObjectLoader: Undefined image",h.image);var k=void 0;k=Array.isArray(b[h.image])?new Ab(b[h.image]):new ha(b[h.image]);k.needsUpdate=!0;k.uuid=h.uuid;void 0!==h.name&&(k.name=h.name);void 0!==h.mapping&&(k.mapping=d(h.mapping,Yk));void 0!==h.offset&&k.offset.fromArray(h.offset);void 0!==h.repeat&&k.repeat.fromArray(h.repeat);void 0!==h.center&&k.center.fromArray(h.center);void 0!==h.rotation&&(k.rotation=h.rotation);void 0!==h.wrap&&(k.wrapS=d(h.wrap[0],
|
|
|
+h.uuid);void 0===b[h.image]&&console.warn("THREE.ObjectLoader: Undefined image",h.image);var k=void 0;k=Array.isArray(b[h.image])?new Ab(b[h.image]):new ia(b[h.image]);k.needsUpdate=!0;k.uuid=h.uuid;void 0!==h.name&&(k.name=h.name);void 0!==h.mapping&&(k.mapping=d(h.mapping,Yk));void 0!==h.offset&&k.offset.fromArray(h.offset);void 0!==h.repeat&&k.repeat.fromArray(h.repeat);void 0!==h.center&&k.center.fromArray(h.center);void 0!==h.rotation&&(k.rotation=h.rotation);void 0!==h.wrap&&(k.wrapS=d(h.wrap[0],
|
|
|
Pi),k.wrapT=d(h.wrap[1],Pi));void 0!==h.format&&(k.format=h.format);void 0!==h.type&&(k.type=h.type);void 0!==h.encoding&&(k.encoding=h.encoding);void 0!==h.minFilter&&(k.minFilter=d(h.minFilter,Qi));void 0!==h.magFilter&&(k.magFilter=d(h.magFilter,Qi));void 0!==h.anisotropy&&(k.anisotropy=h.anisotropy);void 0!==h.flipY&&(k.flipY=h.flipY);void 0!==h.premultiplyAlpha&&(k.premultiplyAlpha=h.premultiplyAlpha);void 0!==h.unpackAlignment&&(k.unpackAlignment=h.unpackAlignment);e[h.uuid]=k}return e},parseObject:function(a,
|
|
|
b,d){function e(a){void 0===b[a]&&console.warn("THREE.ObjectLoader: Undefined geometry",a);return b[a]}function f(a){if(void 0!==a){if(Array.isArray(a)){for(var b=[],e=0,f=a.length;e<f;e++){var g=a[e];void 0===d[g]&&console.warn("THREE.ObjectLoader: Undefined material",g);b.push(d[g])}return b}void 0===d[a]&&console.warn("THREE.ObjectLoader: Undefined material",a);return d[a]}}switch(a.type){case "Scene":var g=new Bb;void 0!==a.background&&Number.isInteger(a.background)&&(g.background=new E(a.background));
|
|
|
-void 0!==a.fog&&("Fog"===a.fog.type?g.fog=new Jd(a.fog.color,a.fog.near,a.fog.far):"FogExp2"===a.fog.type&&(g.fog=new Id(a.fog.color,a.fog.density)));break;case "PerspectiveCamera":g=new ia(a.fov,a.aspect,a.near,a.far);void 0!==a.focus&&(g.focus=a.focus);void 0!==a.zoom&&(g.zoom=a.zoom);void 0!==a.filmGauge&&(g.filmGauge=a.filmGauge);void 0!==a.filmOffset&&(g.filmOffset=a.filmOffset);void 0!==a.view&&(g.view=Object.assign({},a.view));break;case "OrthographicCamera":g=new rd(a.left,a.right,a.top,a.bottom,
|
|
|
+void 0!==a.fog&&("Fog"===a.fog.type?g.fog=new Jd(a.fog.color,a.fog.near,a.fog.far):"FogExp2"===a.fog.type&&(g.fog=new Id(a.fog.color,a.fog.density)));break;case "PerspectiveCamera":g=new ja(a.fov,a.aspect,a.near,a.far);void 0!==a.focus&&(g.focus=a.focus);void 0!==a.zoom&&(g.zoom=a.zoom);void 0!==a.filmGauge&&(g.filmGauge=a.filmGauge);void 0!==a.filmOffset&&(g.filmOffset=a.filmOffset);void 0!==a.view&&(g.view=Object.assign({},a.view));break;case "OrthographicCamera":g=new rd(a.left,a.right,a.top,a.bottom,
|
|
|
a.near,a.far);void 0!==a.zoom&&(g.zoom=a.zoom);void 0!==a.view&&(g.view=Object.assign({},a.view));break;case "AmbientLight":g=new zf(a.color,a.intensity);break;case "DirectionalLight":g=new yf(a.color,a.intensity);break;case "PointLight":g=new wf(a.color,a.intensity,a.distance,a.decay);break;case "RectAreaLight":g=new Af(a.color,a.intensity,a.width,a.height);break;case "SpotLight":g=new vf(a.color,a.intensity,a.distance,a.angle,a.penumbra,a.decay);break;case "HemisphereLight":g=new tf(a.color,a.groundColor,
|
|
|
a.intensity);break;case "LightProbe":g=(new db).fromJSON(a);break;case "SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case "Mesh":g=e(a.geometry);var h=f(a.material);g=new la(g,h);break;case "InstancedMesh":g=e(a.geometry);h=f(a.material);var k=a.instanceMatrix;g=new ef(g,h,a.count);g.instanceMatrix=new N(new Float32Array(k.array),16);break;case "LOD":g=new ce;break;case "Line":g=new Oa(e(a.geometry),f(a.material),a.mode);break;case "LineLoop":g=new ff(e(a.geometry),
|
|
|
f(a.material));break;case "LineSegments":g=new na(e(a.geometry),f(a.material));break;case "PointCloud":case "Points":g=new Zc(e(a.geometry),f(a.material));break;case "Sprite":g=new ae(f(a.material));break;case "Group":g=new Wb;break;default:g=new K}g.uuid=a.uuid;void 0!==a.name&&(g.name=a.name);void 0!==a.matrix?(g.matrix.fromArray(a.matrix),void 0!==a.matrixAutoUpdate&&(g.matrixAutoUpdate=a.matrixAutoUpdate),g.matrixAutoUpdate&&g.matrix.decompose(g.position,g.quaternion,g.scale)):(void 0!==a.position&&
|
|
@@ -987,7 +987,7 @@ Zg()+"\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_
|
|
|
blending:0,depthTest:!1,depthWrite:!1});this._cubemapShader=this._equirectShader=null;this._compileMaterial(this._blurMaterial)};Ca.prototype.fromScene=function(a,b,d,e){void 0===b&&(b=0);void 0===d&&(d=.1);void 0===e&&(e=100);xh=this._renderer.getRenderTarget();var f=this._allocateTargets();this._sceneToCubeUV(a,d,e,f);0<b&&this._blur(f,0,0,b);this._applyPMREM(f);this._cleanup(f);return f};Ca.prototype.fromEquirectangular=function(a){return this._fromTexture(a)};Ca.prototype.fromCubemap=function(a){return this._fromTexture(a)};
|
|
|
Ca.prototype.compileCubemapShader=function(){null===this._cubemapShader&&(this._cubemapShader=si(),this._compileMaterial(this._cubemapShader))};Ca.prototype.compileEquirectangularShader=function(){null===this._equirectShader&&(this._equirectShader=ri(),this._compileMaterial(this._equirectShader))};Ca.prototype.dispose=function(){this._blurMaterial.dispose();null!==this._cubemapShader&&this._cubemapShader.dispose();null!==this._equirectShader&&this._equirectShader.dispose();for(var a=0;a<Ve.length;a++)Ve[a].dispose()};
|
|
|
Ca.prototype._cleanup=function(a){this._pingPongRenderTarget.dispose();this._renderer.setRenderTarget(xh);a.scissorTest=!1;Jf(a,0,0,a.width,a.height)};Ca.prototype._fromTexture=function(a){xh=this._renderer.getRenderTarget();var b=this._allocateTargets(a);this._textureToCubeUV(a,b);this._applyPMREM(b);this._cleanup(b);return b};Ca.prototype._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 d=qi(b);d.depthBuffer=a?!1:!0;this._pingPongRenderTarget=qi(b);return d};Ca.prototype._compileMaterial=function(a){a=new la(Ve[0],a);this._renderer.compile(a,vh)};Ca.prototype._sceneToCubeUV=function(a,b,d,e){b=new ia(90,1,b,d);d=[1,-1,1,1,1,1];var f=[1,1,1,-1,-1,-1],g=this._renderer,h=g.outputEncoding,k=g.toneMapping,l=g.getClearColor(),m=g.getClearAlpha();g.toneMapping=0;g.outputEncoding=3E3;var p=a.background;
|
|
|
+type:1009,format:1023,encoding:b?a.encoding:3002,depthBuffer:!1,stencilBuffer:!1};var d=qi(b);d.depthBuffer=a?!1:!0;this._pingPongRenderTarget=qi(b);return d};Ca.prototype._compileMaterial=function(a){a=new la(Ve[0],a);this._renderer.compile(a,vh)};Ca.prototype._sceneToCubeUV=function(a,b,d,e){b=new ja(90,1,b,d);d=[1,-1,1,1,1,1];var f=[1,1,1,-1,-1,-1],g=this._renderer,h=g.outputEncoding,k=g.toneMapping,l=g.getClearColor(),m=g.getClearAlpha();g.toneMapping=0;g.outputEncoding=3E3;var p=a.background;
|
|
|
if(p&&p.isColor){p.convertSRGBToLinear();var q=Math.min(Math.max(Math.ceil(Math.log2(Math.max(p.r,p.g,p.b))),-128),127);p=p.multiplyScalar(Math.pow(2,-q));g.setClearColor(p,(q+128)/255);a.background=null}for(p=0;6>p;p++)q=p%3,0==q?(b.up.set(0,d[p],0),b.lookAt(f[p],0,0)):1==q?(b.up.set(0,0,d[p]),b.lookAt(0,f[p],0)):(b.up.set(0,d[p],0),b.lookAt(0,0,f[p])),Jf(e,q*wb,2<p?wb:0,wb,wb),g.setRenderTarget(e),g.render(a,b);g.toneMapping=k;g.outputEncoding=h;g.setClearColor(l,m)};Ca.prototype._textureToCubeUV=
|
|
|
function(a,b){var d=this._renderer;a.isCubeTexture?null==this._cubemapShader&&(this._cubemapShader=si()):null==this._equirectShader&&(this._equirectShader=ri());var e=a.isCubeTexture?this._cubemapShader:this._equirectShader,f=new la(Ve[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=xb[a.encoding];e.outputEncoding.value=xb[b.texture.encoding];Jf(b,0,0,3*wb,2*wb);d.setRenderTarget(b);d.render(f,vh)};Ca.prototype._applyPMREM=
|
|
|
function(a){var b=this._renderer,d=b.autoClear;b.autoClear=!1;for(var e=1;e<dj;e++)this._blur(a,e-1,e,Math.sqrt(lg[e]*lg[e]-lg[e-1]*lg[e-1]),fj[(e-1)%fj.length]);b.autoClear=d};Ca.prototype._blur=function(a,b,d,e,f){var g=this._pingPongRenderTarget;this._halfBlur(a,g,b,d,e,"latitudinal",f);this._halfBlur(g,a,d,d,e,"longitudinal",f)};Ca.prototype._halfBlur=function(a,b,d,e,f,g,h){var k=this._renderer,l=this._blurMaterial;"latitudinal"!==g&&"longitudinal"!==g&&console.error("blur direction must be either latitudinal or longitudinal!");
|
|
@@ -1020,7 +1020,7 @@ return this.translateOnAxis(b,a)},getWorldRotation:function(){console.error("THR
|
|
|
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.")}}});Object.assign(la.prototype,{setDrawMode:function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}});
|
|
|
Object.defineProperties(la.prototype,{drawMode:{get:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode.");return 0},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}});Object.defineProperties(ce.prototype,{objects:{get:function(){console.warn("THREE.LOD: .objects has been renamed to .levels.");
|
|
|
return this.levels}}});Object.defineProperty(df.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}});cf.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")};Object.defineProperty(I.prototype,"__arcLengthDivisions",{get:function(){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.");return this.arcLengthDivisions},
|
|
|
-set:function(a){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.");this.arcLengthDivisions=a}});ia.prototype.setLens=function(a,b){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup.");void 0!==b&&(this.filmGauge=b);this.setFocalLength(a)};Object.defineProperties(qa.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(a){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov.");
|
|
|
+set:function(a){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.");this.arcLengthDivisions=a}});ja.prototype.setLens=function(a,b){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup.");void 0!==b&&(this.filmGauge=b);this.setFocalLength(a)};Object.defineProperties(qa.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(a){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov.");
|
|
|
this.shadow.camera.fov=a}},shadowCameraLeft:{set:function(a){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left.");this.shadow.camera.left=a}},shadowCameraRight:{set:function(a){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right.");this.shadow.camera.right=a}},shadowCameraTop:{set:function(a){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top.");this.shadow.camera.top=a}},shadowCameraBottom:{set:function(a){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom.");
|
|
|
this.shadow.camera.bottom=a}},shadowCameraNear:{set:function(a){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near.");this.shadow.camera.near=a}},shadowCameraFar:{set:function(a){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far.");this.shadow.camera.far=a}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(a){console.warn("THREE.Light: .shadowBias is now .shadow.bias.");
|
|
|
this.shadow.bias=a}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(a){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.");this.shadow.mapSize.width=a}},shadowMapHeight:{set:function(a){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.");this.shadow.mapSize.height=a}}});Object.defineProperties(N.prototype,{length:{get:function(){console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead.");
|
|
@@ -1055,7 +1055,7 @@ this.texture.format=a}},type:{get:function(){console.warn("THREE.WebGLRenderTarg
|
|
|
this.texture.generateMipmaps=a}}});Object.defineProperties(ea.prototype,{load:{value:function(a){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var b=this;(new Ff).load(a,function(a){b.setBuffer(a)});return this}},startTime:{set:function(){console.warn("THREE.Audio: .startTime is now .play( delay ).")}}});fg.prototype.getData=function(){console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData().");return this.getFrequencyData()};Tc.prototype.updateCubeMap=
|
|
|
function(a,b){console.warn("THREE.CubeCamera: .updateCubeMap() is now .update().");return this.update(a,b)};ec.crossOrigin=void 0;ec.loadTexture=function(a,b,d,e){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var f=new sf;f.setCrossOrigin(this.crossOrigin);a=f.load(a,d,void 0,e);b&&(a.mapping=b);return a};ec.loadTextureCube=function(a,b,d,e){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");
|
|
|
var f=new qf;f.setCrossOrigin(this.crossOrigin);a=f.load(a,d,void 0,e);b&&(a.mapping=b);return a};ec.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")};ec.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"120dev"}}));
|
|
|
-l.ACESFilmicToneMapping=4;l.AddEquation=100;l.AddOperation=2;l.AdditiveAnimationBlendMode=2501;l.AdditiveBlending=2;l.AlphaFormat=1021;l.AlwaysDepth=1;l.AlwaysStencilFunc=519;l.AmbientLight=zf;l.AmbientLightProbe=Qg;l.AnimationClip=bb;l.AnimationLoader=Hg;l.AnimationMixer=Tg;l.AnimationObjectGroup=ni;l.AnimationUtils=ja;l.ArcCurve=qd;l.ArrayCamera=af;l.ArrowHelper=dc;l.Audio=ea;l.AudioAnalyser=fg;l.AudioContext=Rg;l.AudioListener=lb;l.AudioLoader=Ff;l.AxesHelper=Ie;l.AxisHelper=function(a){console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper.");
|
|
|
+l.ACESFilmicToneMapping=4;l.AddEquation=100;l.AddOperation=2;l.AdditiveAnimationBlendMode=2501;l.AdditiveBlending=2;l.AlphaFormat=1021;l.AlwaysDepth=1;l.AlwaysStencilFunc=519;l.AmbientLight=zf;l.AmbientLightProbe=Qg;l.AnimationClip=bb;l.AnimationLoader=Hg;l.AnimationMixer=Tg;l.AnimationObjectGroup=ni;l.AnimationUtils=ha;l.ArcCurve=qd;l.ArrayCamera=af;l.ArrowHelper=dc;l.Audio=ea;l.AudioAnalyser=fg;l.AudioContext=Rg;l.AudioListener=lb;l.AudioLoader=Ff;l.AxesHelper=Ie;l.AxisHelper=function(a){console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper.");
|
|
|
return new Ie(a)};l.BackSide=1;l.BasicDepthPacking=3200;l.BasicShadowMap=0;l.BinaryTextureLoader=function(a){console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader.");return new rf(a)};l.Bone=Ag;l.BooleanKeyframeTrack=mf;l.BoundingBoxHelper=function(a,b){console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead.");return new cc(a,b)};l.Box2=ka;l.Box3=V;l.Box3Helper=Ge;l.BoxBufferGeometry=Qb;l.BoxGeometry=Rc;l.BoxHelper=cc;l.BufferAttribute=
|
|
|
N;l.BufferGeometry=J;l.BufferGeometryLoader=Df;l.ByteType=1010;l.Cache=Hc;l.Camera=pb;l.CameraHelper=Fe;l.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")};l.CanvasTexture=de;l.CatmullRomCurve3=Ga;l.CineonToneMapping=3;l.CircleBufferGeometry=md;l.CircleGeometry=xe;l.ClampToEdgeWrapping=1001;l.Clock=sd;l.ClosedSplineCurve3=ti;l.Color=E;l.ColorKeyframeTrack=nf;l.CompressedTexture=$c;l.CompressedTextureLoader=Ig;l.ConeBufferGeometry=we;l.ConeGeometry=ve;l.CubeCamera=Tc;
|
|
|
l.CubeGeometry=Rc;l.CubeReflectionMapping=301;l.CubeRefractionMapping=302;l.CubeTexture=Ab;l.CubeTextureLoader=qf;l.CubeUVReflectionMapping=306;l.CubeUVRefractionMapping=307;l.CubicBezierCurve=gb;l.CubicBezierCurve3=tb;l.CubicInterpolant=kf;l.CullFaceBack=1;l.CullFaceFront=2;l.CullFaceFrontBack=3;l.CullFaceNone=0;l.Curve=I;l.CurvePath=Fb;l.CustomBlending=5;l.CustomToneMapping=5;l.CylinderBufferGeometry=Db;l.CylinderGeometry=xc;l.Cylindrical=Md;l.DataTexture=oc;l.DataTexture2DArray=Uc;l.DataTexture3D=
|
|
@@ -1071,14 +1071,14 @@ l.Loader=fa;l.LoaderUtils=th;l.LoadingManager=Gg;l.LogLuvEncoding=3003;l.LoopOnc
|
|
|
return a};l.MeshLambertMaterial=Bc;l.MeshMatcapMaterial=Cc;l.MeshNormalMaterial=Ac;l.MeshPhongMaterial=ac;l.MeshPhysicalMaterial=$b;l.MeshStandardMaterial=sb;l.MeshToonMaterial=zc;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.NearestMipmapLinearFilter=1005;l.NearestMipmapNearestFilter=1004;l.NeverDepth=0;l.NeverStencilFunc=512;l.NoBlending=0;l.NoColors=0;l.NoToneMapping=0;l.NormalAnimationBlendMode=2500;l.NormalBlending=1;l.NotEqualDepth=7;l.NotEqualStencilFunc=517;l.NumberKeyframeTrack=nd;l.Object3D=K;l.ObjectLoader=Ef;l.ObjectSpaceNormalMap=1;l.OctahedronBufferGeometry=rc;l.OctahedronGeometry=ie;l.OneFactor=201;l.OneMinusDstAlphaFactor=207;l.OneMinusDstColorFactor=
|
|
|
209;l.OneMinusSrcAlphaFactor=205;l.OneMinusSrcColorFactor=203;l.OrthographicCamera=rd;l.PCFShadowMap=1;l.PCFSoftShadowMap=2;l.PMREMGenerator=Ca;l.ParametricBufferGeometry=bd;l.ParametricGeometry=fe;l.Particle=function(a){console.warn("THREE.Particle has been renamed to THREE.Sprite.");return new ae(a)};l.ParticleBasicMaterial=function(a){console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.");return new fb(a)};l.ParticleSystem=function(a,b){console.warn("THREE.ParticleSystem has been renamed to THREE.Points.");
|
|
|
-return new Zc(a,b)};l.ParticleSystemMaterial=function(a){console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.");return new fb(a)};l.Path=kb;l.PerspectiveCamera=ia;l.Plane=ba;l.PlaneBufferGeometry=pc;l.PlaneGeometry=Vd;l.PlaneHelper=He;l.PointCloud=function(a,b){console.warn("THREE.PointCloud has been renamed to THREE.Points.");return new Zc(a,b)};l.PointCloudMaterial=function(a){console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.");return new fb(a)};
|
|
|
+return new Zc(a,b)};l.ParticleSystemMaterial=function(a){console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.");return new fb(a)};l.Path=kb;l.PerspectiveCamera=ja;l.Plane=ba;l.PlaneBufferGeometry=pc;l.PlaneGeometry=Vd;l.PlaneHelper=He;l.PointCloud=function(a,b){console.warn("THREE.PointCloud has been renamed to THREE.Points.");return new Zc(a,b)};l.PointCloudMaterial=function(a){console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.");return new fb(a)};
|
|
|
l.PointLight=wf;l.PointLightHelper=vd;l.Points=Zc;l.PointsMaterial=fb;l.PolarGridHelper=Gf;l.PolyhedronBufferGeometry=Pa;l.PolyhedronGeometry=ge;l.PositionalAudio=Ja;l.PropertyBinding=Fa;l.PropertyMixer=Sg;l.QuadraticBezierCurve=ib;l.QuadraticBezierCurve3=ub;l.Quaternion=Q;l.QuaternionKeyframeTrack=ze;l.QuaternionLinearInterpolant=of;l.REVISION="120dev";l.RGBADepthPacking=3201;l.RGBAFormat=1023;l.RGBAIntegerFormat=1033;l.RGBA_ASTC_10x10_Format=37819;l.RGBA_ASTC_10x5_Format=37816;l.RGBA_ASTC_10x6_Format=
|
|
|
37817;l.RGBA_ASTC_10x8_Format=37818;l.RGBA_ASTC_12x10_Format=37820;l.RGBA_ASTC_12x12_Format=37821;l.RGBA_ASTC_4x4_Format=37808;l.RGBA_ASTC_5x4_Format=37809;l.RGBA_ASTC_5x5_Format=37810;l.RGBA_ASTC_6x5_Format=37811;l.RGBA_ASTC_6x6_Format=37812;l.RGBA_ASTC_8x5_Format=37813;l.RGBA_ASTC_8x6_Format=37814;l.RGBA_ASTC_8x8_Format=37815;l.RGBA_BPTC_Format=36492;l.RGBA_ETC2_EAC_Format=37496;l.RGBA_PVRTC_2BPPV1_Format=35843;l.RGBA_PVRTC_4BPPV1_Format=35842;l.RGBA_S3TC_DXT1_Format=33777;l.RGBA_S3TC_DXT3_Format=
|
|
|
33778;l.RGBA_S3TC_DXT5_Format=33779;l.RGBDEncoding=3006;l.RGBEEncoding=3002;l.RGBEFormat=1023;l.RGBFormat=1022;l.RGBIntegerFormat=1032;l.RGBM16Encoding=3005;l.RGBM7Encoding=3004;l.RGB_ETC1_Format=36196;l.RGB_ETC2_Format=37492;l.RGB_PVRTC_2BPPV1_Format=35841;l.RGB_PVRTC_4BPPV1_Format=35840;l.RGB_S3TC_DXT1_Format=33776;l.RGFormat=1030;l.RGIntegerFormat=1031;l.RawShaderMaterial=Eb;l.Ray=T;l.Raycaster=Vg;l.RectAreaLight=Af;l.RedFormat=1028;l.RedIntegerFormat=1029;l.ReinhardToneMapping=2;l.RepeatWrapping=
|
|
|
1E3;l.ReplaceStencilOp=7681;l.ReverseSubtractEquation=102;l.RingBufferGeometry=jd;l.RingGeometry=te;l.SRGB8_ALPHA8_ASTC_10x10_Format=37851;l.SRGB8_ALPHA8_ASTC_10x5_Format=37848;l.SRGB8_ALPHA8_ASTC_10x6_Format=37849;l.SRGB8_ALPHA8_ASTC_10x8_Format=37850;l.SRGB8_ALPHA8_ASTC_12x10_Format=37852;l.SRGB8_ALPHA8_ASTC_12x12_Format=37853;l.SRGB8_ALPHA8_ASTC_4x4_Format=37840;l.SRGB8_ALPHA8_ASTC_5x4_Format=37841;l.SRGB8_ALPHA8_ASTC_5x5_Format=37842;l.SRGB8_ALPHA8_ASTC_6x5_Format=37843;l.SRGB8_ALPHA8_ASTC_6x6_Format=
|
|
|
37844;l.SRGB8_ALPHA8_ASTC_8x5_Format=37845;l.SRGB8_ALPHA8_ASTC_8x6_Format=37846;l.SRGB8_ALPHA8_ASTC_8x8_Format=37847;l.Scene=Bb;l.SceneUtils={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};l.ShaderChunk=Z;l.ShaderLib=
|
|
|
eb;l.ShaderMaterial=Ia;l.ShadowMaterial=yc;l.Shape=bc;l.ShapeBufferGeometry=wc;l.ShapeGeometry=vc;l.ShapePath=Mg;l.ShapeUtils=Cb;l.ShortType=1011;l.Skeleton=df;l.SkeletonHelper=ud;l.SkinnedMesh=cf;l.SmoothShading=2;l.Sphere=pa;l.SphereBufferGeometry=uc;l.SphereGeometry=se;l.Spherical=Mc;l.SphericalHarmonics3=va;l.Spline=$g;l.SplineCurve=jb;l.SplineCurve3=ui;l.SpotLight=vf;l.SpotLightHelper=td;l.SpotLightShadow=uf;l.Sprite=ae;l.SpriteMaterial=Yb;l.SrcAlphaFactor=204;l.SrcAlphaSaturateFactor=210;l.SrcColorFactor=
|
|
|
-202;l.StaticCopyUsage=35046;l.StaticDrawUsage=35044;l.StaticReadUsage=35045;l.StereoCamera=li;l.StreamCopyUsage=35042;l.StreamDrawUsage=35040;l.StreamReadUsage=35041;l.StringKeyframeTrack=pf;l.SubtractEquation=101;l.SubtractiveBlending=3;l.TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3};l.TangentSpaceNormalMap=0;l.TetrahedronBufferGeometry=cd;l.TetrahedronGeometry=he;l.TextBufferGeometry=id;l.TextGeometry=re;l.Texture=ha;l.TextureLoader=sf;l.TorusBufferGeometry=gd;l.TorusGeometry=ne;l.TorusKnotBufferGeometry=
|
|
|
+202;l.StaticCopyUsage=35046;l.StaticDrawUsage=35044;l.StaticReadUsage=35045;l.StereoCamera=li;l.StreamCopyUsage=35042;l.StreamDrawUsage=35040;l.StreamReadUsage=35041;l.StringKeyframeTrack=pf;l.SubtractEquation=101;l.SubtractiveBlending=3;l.TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3};l.TangentSpaceNormalMap=0;l.TetrahedronBufferGeometry=cd;l.TetrahedronGeometry=he;l.TextBufferGeometry=id;l.TextGeometry=re;l.Texture=ia;l.TextureLoader=sf;l.TorusBufferGeometry=gd;l.TorusGeometry=ne;l.TorusKnotBufferGeometry=
|
|
|
fd;l.TorusKnotGeometry=me;l.Triangle=X;l.TriangleFanDrawMode=2;l.TriangleStripDrawMode=1;l.TrianglesDrawMode=0;l.TubeBufferGeometry=sc;l.TubeGeometry=le;l.UVMapping=300;l.Uint16Attribute=function(a,b){console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.");return new lc(a,b)};l.Uint16BufferAttribute=lc;l.Uint32Attribute=function(a,b){console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.");return new mc(a,
|
|
|
b)};l.Uint32BufferAttribute=mc;l.Uint8Attribute=function(a,b){console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.");return new Pd(a,b)};l.Uint8BufferAttribute=Pd;l.Uint8ClampedAttribute=function(a,b){console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.");return new Qd(a,b)};l.Uint8ClampedBufferAttribute=Qd;l.Uniform=gg;l.UniformsLib=G;l.UniformsUtils=Uh;l.UnsignedByteType=1009;l.UnsignedInt248Type=
|
|
|
1020;l.UnsignedIntType=1014;l.UnsignedShort4444Type=1017;l.UnsignedShort5551Type=1018;l.UnsignedShort565Type=1019;l.UnsignedShortType=1012;l.VSMShadowMap=3;l.Vector2=p;l.Vector3=m;l.Vector4=D;l.VectorKeyframeTrack=od;l.Vertex=function(a,b,d){console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead.");return new m(a,b,d)};l.VertexColors=2;l.VideoTexture=Dg;l.WebGL1Renderer=zg;l.WebGLCubeRenderTarget=Rb;l.WebGLMultisampleRenderTarget=mg;l.WebGLRenderTarget=Ta;l.WebGLRenderTargetCube=function(a,
|