|
@@ -1,6 +1,6 @@
|
|
|
// threejs.org/license
|
|
|
-(function(k,Da){"object"===typeof exports&&"undefined"!==typeof module?Da(exports):"function"===typeof define&&define.amd?define(["exports"],Da):(k=k||self,Da(k.THREE={}))})(this,function(k){function Da(){}function y(a,b){this.x=a||0;this.y=b||0}function la(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._w=void 0!==d?d:1}function n(a,b,c){this.x=a||0;this.y=b||0;this.z=c||0}function ca(){this.elements=[1,0,0,0,1,0,0,0,1];0<arguments.length&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}
|
|
|
-function X(a,b,c,d,e,f,g,h,l,m){Object.defineProperty(this,"id",{value:Wi++});this.uuid=P.generateUUID();this.name="";this.image=void 0!==a?a:X.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==b?b:X.DEFAULT_MAPPING;this.wrapS=void 0!==c?c: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!==l?l:1;this.format=void 0!==g?g:1023;this.type=void 0!==h?h:1009;this.offset=new y(0,0);this.repeat=new y(1,1);this.center=new y(0,0);this.rotation=
|
|
|
+(function(k,Da){"object"===typeof exports&&"undefined"!==typeof module?Da(exports):"function"===typeof define&&define.amd?define(["exports"],Da):(k=k||self,Da(k.THREE={}))})(this,function(k){function Da(){}function z(a,b){this.x=a||0;this.y=b||0}function la(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._w=void 0!==d?d:1}function n(a,b,c){this.x=a||0;this.y=b||0;this.z=c||0}function ca(){this.elements=[1,0,0,0,1,0,0,0,1];0<arguments.length&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}
|
|
|
+function X(a,b,c,d,e,f,g,h,l,m){Object.defineProperty(this,"id",{value:Wi++});this.uuid=P.generateUUID();this.name="";this.image=void 0!==a?a:X.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==b?b:X.DEFAULT_MAPPING;this.wrapS=void 0!==c?c: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!==l?l:1;this.format=void 0!==g?g:1023;this.type=void 0!==h?h:1009;this.offset=new z(0,0);this.repeat=new z(1,1);this.center=new z(0,0);this.rotation=
|
|
|
0;this.matrixAutoUpdate=!0;this.matrix=new ca;this.generateMipmaps=!0;this.premultiplyAlpha=!1;this.flipY=!0;this.unpackAlignment=4;this.encoding=void 0!==m?m:3E3;this.version=0;this.onUpdate=null}function fa(a,b,c,d){this.x=a||0;this.y=b||0;this.z=c||0;this.w=void 0!==d?d:1}function ia(a,b,c){this.width=a;this.height=b;this.scissor=new fa(0,0,a,b);this.scissorTest=!1;this.viewport=new fa(0,0,a,b);c=c||{};this.texture=new X(void 0,void 0,c.wrapS,c.wrapT,c.magFilter,c.minFilter,c.format,c.type,c.anisotropy,
|
|
|
c.encoding);this.texture.image={};this.texture.image.width=a;this.texture.image.height=b;this.texture.generateMipmaps=void 0!==c.generateMipmaps?c.generateMipmaps:!1;this.texture.minFilter=void 0!==c.minFilter?c.minFilter:1006;this.depthBuffer=void 0!==c.depthBuffer?c.depthBuffer:!0;this.stencilBuffer=void 0!==c.stencilBuffer?c.stencilBuffer:!0;this.depthTexture=void 0!==c.depthTexture?c.depthTexture:null}function ag(a,b,c){ia.call(this,a,b,c);this.samples=4}function R(){this.elements=[1,0,0,0,0,
|
|
|
1,0,0,0,0,1,0,0,0,0,1];0<arguments.length&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function Qb(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._order=d||Qb.DefaultOrder}function bg(){this.mask=1}function F(){Object.defineProperty(this,"id",{value:Xi++});this.uuid=P.generateUUID();this.name="";this.type="Object3D";this.parent=null;this.children=[];this.up=F.DefaultUp.clone();var a=new n,b=new Qb,c=new la,d=new n(1,1,1);b._onChange(function(){c.setFromEuler(b,
|
|
@@ -16,7 +16,7 @@ b,c){Q.call(this,new Uint32Array(a),b,c)}function D(a,b,c){Q.call(this,new Float
|
|
|
for(var b=a[0],c=1,d=a.length;c<d;++c)a[c]>b&&(b=a[c]);return b}function C(){Object.defineProperty(this,"id",{value:Zi+=2});this.uuid=P.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.morphTargetsRelative=!1;this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange={start:0,count:Infinity};this.userData={}}function V(a,b){F.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new C;this.material=void 0!==b?b:new Ja({color:16777215*
|
|
|
Math.random()});this.updateMorphTargets()}function rh(a,b,c,d,e,f,g,h){if(null===(1===b.side?d.intersectTriangle(g,f,e,!0,h):d.intersectTriangle(e,f,g,2!==b.side,h)))return null;Le.copy(h);Le.applyMatrix4(a.matrixWorld);b=c.ray.origin.distanceTo(Le);return b<c.near||b>c.far?null:{distance:b,point:Le.clone(),object:a}}function Me(a,b,c,d,e,f,g,h,l,m,p,r){Vb.fromBufferAttribute(e,m);Wb.fromBufferAttribute(e,p);Xb.fromBufferAttribute(e,r);e=a.morphTargetInfluences;if(b.morphTargets&&f&&e){Ne.set(0,0,
|
|
|
0);Oe.set(0,0,0);Pe.set(0,0,0);for(var t=0,u=f.length;t<u;t++){var k=e[t],v=f[t];0!==k&&(gg.fromBufferAttribute(v,m),hg.fromBufferAttribute(v,p),ig.fromBufferAttribute(v,r),g?(Ne.addScaledVector(gg,k),Oe.addScaledVector(hg,k),Pe.addScaledVector(ig,k)):(Ne.addScaledVector(gg.sub(Vb),k),Oe.addScaledVector(hg.sub(Wb),k),Pe.addScaledVector(ig.sub(Xb),k)))}Vb.add(Ne);Wb.add(Oe);Xb.add(Pe)}if(a=rh(a,b,c,d,Vb,Wb,Xb,Dd))h&&(yc.fromBufferAttribute(h,m),zc.fromBufferAttribute(h,p),Ac.fromBufferAttribute(h,
|
|
|
-r),a.uv=va.getUV(Dd,Vb,Wb,Xb,yc,zc,Ac,new y)),l&&(yc.fromBufferAttribute(l,m),zc.fromBufferAttribute(l,p),Ac.fromBufferAttribute(l,r),a.uv2=va.getUV(Dd,Vb,Wb,Xb,yc,zc,Ac,new y)),h=new xc(m,p,r),va.getNormal(Vb,Wb,Xb,h.normal),a.face=h;return a}function O(){Object.defineProperty(this,"id",{value:$i+=2});this.uuid=P.generateUUID();this.name="";this.type="Geometry";this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=
|
|
|
+r),a.uv=va.getUV(Dd,Vb,Wb,Xb,yc,zc,Ac,new z)),l&&(yc.fromBufferAttribute(l,m),zc.fromBufferAttribute(l,p),Ac.fromBufferAttribute(l,r),a.uv2=va.getUV(Dd,Vb,Wb,Xb,yc,zc,Ac,new z)),h=new xc(m,p,r),va.getNormal(Vb,Wb,Xb,h.normal),a.face=h;return a}function O(){Object.defineProperty(this,"id",{value:$i+=2});this.uuid=P.generateUUID();this.name="";this.type="Geometry";this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=
|
|
|
[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.verticesNeedUpdate=this.elementsNeedUpdate=!1}function Yb(a){var b={},c;for(c in a){b[c]={};for(var d in a[c]){var e=a[c][d];e&&(e.isColor||e.isMatrix3||e.isMatrix4||e.isVector2||e.isVector3||e.isVector4||e.isTexture)?b[c][d]=e.clone():Array.isArray(e)?b[c][d]=e.slice():b[c][d]=e}}return b}function ma(a){for(var b=
|
|
|
{},c=0;c<a.length;c++){var d=Yb(a[c]),e;for(e in d)b[e]=d[e]}return b}function za(a){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!==a&&(void 0!==a.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(a))}function cb(){F.call(this);this.type="Camera";this.matrixWorldInverse=new R;this.projectionMatrix=new R;this.projectionMatrixInverse=new R}
|
|
@@ -34,8 +34,8 @@ Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.e
|
|
|
fragmentShader:db.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),Object.defineProperty(h.material,"map",{get:function(){return this.uniforms.t2D.value}}),c.update(h));h.material.uniforms.t2D.value=d;!0===d.matrixAutoUpdate&&d.updateMatrix();h.material.uniforms.uvTransform.value.copy(d.matrix);if(m!==d||p!==d.version)h.material.needsUpdate=!0,m=d,p=d.version;b.unshift(h,h.geometry,h.material,0,0,null)}}}}function cj(a,b,c,d){var e=d.isWebGL2,
|
|
|
f;this.setMode=function(a){f=a};this.render=function(b,d){a.drawArrays(f,b,d);c.update(d,f)};this.renderInstances=function(d,h,l,m){if(0!==m){if(e){d=a;var g="drawArraysInstanced"}else if(d=b.get("ANGLE_instanced_arrays"),g="drawArraysInstancedANGLE",null===d){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}d[g](f,h,l,m);c.update(l,f,m)}}}function dj(a,b,c){function d(b){if("highp"===b){if(0<a.getShaderPrecisionFormat(35633,
|
|
|
36338).precision&&0<a.getShaderPrecisionFormat(35632,36338).precision)return"highp";b="mediump"}return"mediump"===b&&0<a.getShaderPrecisionFormat(35633,36337).precision&&0<a.getShaderPrecisionFormat(35632,36337).precision?"mediump":"lowp"}var e,f="undefined"!==typeof WebGL2RenderingContext&&a instanceof WebGL2RenderingContext||"undefined"!==typeof WebGL2ComputeRenderingContext&&a instanceof WebGL2ComputeRenderingContext,g=void 0!==c.precision?c.precision:"highp",h=d(g);h!==g&&(console.warn("THREE.WebGLRenderer:",
|
|
|
-g,"not supported, using",h,"instead."),g=h);c=!0===c.logarithmicDepthBuffer;h=a.getParameter(34930);var l=a.getParameter(35660),m=a.getParameter(3379),p=a.getParameter(34076),r=a.getParameter(34921),k=a.getParameter(36347),u=a.getParameter(36348),q=a.getParameter(36349),v=0<l,n=f||!!b.get("OES_texture_float"),w=v&&n,x=f?a.getParameter(36183):0;return{isWebGL2:f,getMaxAnisotropy:function(){if(void 0!==e)return e;var c=b.get("EXT_texture_filter_anisotropic");return e=null!==c?a.getParameter(c.MAX_TEXTURE_MAX_ANISOTROPY_EXT):
|
|
|
-0},getMaxPrecision:d,precision:g,logarithmicDepthBuffer:c,maxTextures:h,maxVertexTextures:l,maxTextureSize:m,maxCubemapSize:p,maxAttributes:r,maxVertexUniforms:k,maxVaryings:u,maxFragmentUniforms:q,vertexTextures:v,floatFragmentTextures:n,floatVertexTextures:w,maxSamples:x}}function ej(){function a(){m.value!==d&&(m.value=d,m.needsUpdate=0<e);c.numPlanes=e;c.numIntersection=0}function b(a,b,d,e){var f=null!==a?a.length:0,g=null;if(0!==f){g=m.value;if(!0!==e||null===g){e=d+4*f;b=b.matrixWorldInverse;
|
|
|
+g,"not supported, using",h,"instead."),g=h);c=!0===c.logarithmicDepthBuffer;h=a.getParameter(34930);var l=a.getParameter(35660),m=a.getParameter(3379),p=a.getParameter(34076),r=a.getParameter(34921),k=a.getParameter(36347),u=a.getParameter(36348),q=a.getParameter(36349),v=0<l,n=f||!!b.get("OES_texture_float"),w=v&&n,y=f?a.getParameter(36183):0;return{isWebGL2:f,getMaxAnisotropy:function(){if(void 0!==e)return e;var c=b.get("EXT_texture_filter_anisotropic");return e=null!==c?a.getParameter(c.MAX_TEXTURE_MAX_ANISOTROPY_EXT):
|
|
|
+0},getMaxPrecision:d,precision:g,logarithmicDepthBuffer:c,maxTextures:h,maxVertexTextures:l,maxTextureSize:m,maxCubemapSize:p,maxAttributes:r,maxVertexUniforms:k,maxVaryings:u,maxFragmentUniforms:q,vertexTextures:v,floatFragmentTextures:n,floatVertexTextures:w,maxSamples:y}}function ej(){function a(){m.value!==d&&(m.value=d,m.needsUpdate=0<e);c.numPlanes=e;c.numIntersection=0}function b(a,b,d,e){var f=null!==a?a.length:0,g=null;if(0!==f){g=m.value;if(!0!==e||null===g){e=d+4*f;b=b.matrixWorldInverse;
|
|
|
l.getNormalMatrix(b);if(null===g||g.length<e)g=new Float32Array(e);for(e=0;e!==f;++e,d+=4)h.copy(a[e]).applyMatrix4(b,l),h.normal.toArray(g,d),g[d+3]=h.constant}m.value=g;m.needsUpdate=!0}c.numPlanes=f;return g}var c=this,d=null,e=0,f=!1,g=!1,h=new Ta,l=new ca,m={value:null,needsUpdate:!1};this.uniform=m;this.numIntersection=this.numPlanes=0;this.init=function(a,c,g){var h=0!==a.length||c||0!==e||f;f=c;d=b(a,g,0);e=a.length;return h};this.beginShadows=function(){g=!0;b(null)};this.endShadows=function(){g=
|
|
|
!1;a()};this.setState=function(c,h,l,k,q,v){if(!f||null===c||0===c.length||g&&!l)g?b(null):a();else{l=g?0:e;var p=4*l,r=q.clippingState||null;m.value=r;r=b(c,k,p,v);for(c=0;c!==p;++c)r[c]=d[c];q.clippingState=r;this.numIntersection=h?this.numPlanes:0;this.numPlanes+=l}}}function fj(a){var b={};return{get:function(c){if(void 0!==b[c])return b[c];switch(c){case "WEBGL_depth_texture":var d=a.getExtension("WEBGL_depth_texture")||a.getExtension("MOZ_WEBGL_depth_texture")||a.getExtension("WEBKIT_WEBGL_depth_texture");
|
|
|
break;case "EXT_texture_filter_anisotropic":d=a.getExtension("EXT_texture_filter_anisotropic")||a.getExtension("MOZ_EXT_texture_filter_anisotropic")||a.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case "WEBGL_compressed_texture_s3tc":d=a.getExtension("WEBGL_compressed_texture_s3tc")||a.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||a.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case "WEBGL_compressed_texture_pvrtc":d=a.getExtension("WEBGL_compressed_texture_pvrtc")||
|
|
@@ -64,7 +64,7 @@ if(d&&""===e)return"";a=a.getShaderSource(b).split("\n");for(b=0;b<a.length;b++)
|
|
|
b.numPointLights).replace(/NUM_HEMI_LIGHTS/g,b.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,b.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,b.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,b.numPointLightShadows)}function Hh(a,b){return a.replace(/NUM_CLIPPING_PLANES/g,b.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,b.numClippingPlanes-b.numClipIntersection)}function kg(a,b){a=N[b];if(void 0===a)throw Error("Can not resolve #include <"+b+">");return a.replace(lg,kg)}function Ih(a,
|
|
|
b,c,d){a="";for(b=parseInt(b);b<parseInt(c);b++)a+=d.replace(/\[ i \]/g,"[ "+b+" ]").replace(/UNROLLED_LOOP_INDEX/g,b);return a}function Jh(a){var b="precision "+a.precision+" float;\nprecision "+a.precision+" int;";"highp"===a.precision?b+="\n#define HIGH_PRECISION":"mediump"===a.precision?b+="\n#define MEDIUM_PRECISION":"lowp"===a.precision&&(b+="\n#define LOW_PRECISION");return b}function Xj(a){var b="SHADOWMAP_TYPE_BASIC";1===a.shadowMapType?b="SHADOWMAP_TYPE_PCF":2===a.shadowMapType?b="SHADOWMAP_TYPE_PCF_SOFT":
|
|
|
3===a.shadowMapType&&(b="SHADOWMAP_TYPE_VSM");return b}function Yj(a){var b="ENVMAP_TYPE_CUBE";if(a.envMap)switch(a.envMapMode){case 301:case 302:b="ENVMAP_TYPE_CUBE";break;case 306:case 307:b="ENVMAP_TYPE_CUBE_UV";break;case 303:case 304:b="ENVMAP_TYPE_EQUIREC";break;case 305:b="ENVMAP_TYPE_SPHERE"}return b}function Zj(a){var b="ENVMAP_MODE_REFLECTION";if(a.envMap)switch(a.envMapMode){case 302:case 304:b="ENVMAP_MODE_REFRACTION"}return b}function ak(a){var b="ENVMAP_BLENDING_NONE";if(a.envMap)switch(a.combine){case 0:b=
|
|
|
-"ENVMAP_BLENDING_MULTIPLY";break;case 1:b="ENVMAP_BLENDING_MIX";break;case 2:b="ENVMAP_BLENDING_ADD"}return b}function bk(a,b,c,d,e,f){var g=a.getContext(),h=d.defines,l=e.vertexShader,m=e.fragmentShader,p=Xj(f),r=Yj(f),k=Zj(f),u=ak(f),q=0<a.gammaFactor?a.gammaFactor:1,v=f.isWebGL2?"":Vj(d.extensions,f,b),n=Wj(h),w=g.createProgram(),x=f.numMultiviewViews;d.isRawShaderMaterial?(h=[n].filter(Id).join("\n"),0<h.length&&(h+="\n"),b=[v,n].filter(Id).join("\n"),0<b.length&&(b+="\n")):(h=[Jh(f),"#define SHADER_NAME "+
|
|
|
+"ENVMAP_BLENDING_MULTIPLY";break;case 1:b="ENVMAP_BLENDING_MIX";break;case 2:b="ENVMAP_BLENDING_ADD"}return b}function bk(a,b,c,d,e,f){var g=a.getContext(),h=d.defines,l=e.vertexShader,m=e.fragmentShader,p=Xj(f),r=Yj(f),k=Zj(f),u=ak(f),q=0<a.gammaFactor?a.gammaFactor:1,v=f.isWebGL2?"":Vj(d.extensions,f,b),n=Wj(h),w=g.createProgram(),y=f.numMultiviewViews;d.isRawShaderMaterial?(h=[n].filter(Id).join("\n"),0<h.length&&(h+="\n"),b=[v,n].filter(Id).join("\n"),0<b.length&&(b+="\n")):(h=[Jh(f),"#define SHADER_NAME "+
|
|
|
e.name,n,f.instancing?"#define USE_INSTANCING":"",f.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+q,"#define MAX_BONES "+f.maxBones,f.useFog&&f.fog?"#define USE_FOG":"",f.useFog&&f.fogExp2?"#define FOG_EXP2":"",f.map?"#define USE_MAP":"",f.envMap?"#define USE_ENVMAP":"",f.envMap?"#define "+k:"",f.lightMap?"#define USE_LIGHTMAP":"",f.aoMap?"#define USE_AOMAP":"",f.emissiveMap?"#define USE_EMISSIVEMAP":"",f.bumpMap?"#define USE_BUMPMAP":"",f.normalMap?"#define USE_NORMALMAP":
|
|
|
"",f.normalMap&&f.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",f.normalMap&&f.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",f.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",f.displacementMap&&f.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",f.specularMap?"#define USE_SPECULARMAP":"",f.roughnessMap?"#define USE_ROUGHNESSMAP":"",f.metalnessMap?"#define USE_METALNESSMAP":"",f.alphaMap?"#define USE_ALPHAMAP":"",f.vertexTangents?"#define USE_TANGENT":"",f.vertexColors?
|
|
|
"#define USE_COLOR":"",f.vertexUvs?"#define USE_UV":"",f.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",f.flatShading?"#define FLAT_SHADED":"",f.skinning?"#define USE_SKINNING":"",f.useVertexTexture?"#define BONE_TEXTURE":"",f.morphTargets?"#define USE_MORPHTARGETS":"",f.morphNormals&&!1===f.flatShading?"#define USE_MORPHNORMALS":"",f.doubleSided?"#define DOUBLE_SIDED":"",f.flipSided?"#define FLIP_SIDED":"",f.shadowMapEnabled?"#define USE_SHADOWMAP":"",f.shadowMapEnabled?"#define "+p:"",f.sizeAttenuation?
|
|
@@ -77,49 +77,49 @@ e.name,n,f.instancing?"#define USE_INSTANCING":"",f.supportsVertexTextures?"#def
|
|
|
"uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==f.toneMapping?"#define TONE_MAPPING":"",0!==f.toneMapping?N.tonemapping_pars_fragment:"",0!==f.toneMapping?Uj("toneMapping",f.toneMapping):"",f.dithering?"#define DITHERING":"",f.outputEncoding||f.mapEncoding||f.matcapEncoding||f.envMapEncoding||f.emissiveMapEncoding||f.lightMapEncoding?N.encodings_pars_fragment:"",f.mapEncoding?Hd("mapTexelToLinear",f.mapEncoding):"",f.matcapEncoding?Hd("matcapTexelToLinear",f.matcapEncoding):"",f.envMapEncoding?
|
|
|
Hd("envMapTexelToLinear",f.envMapEncoding):"",f.emissiveMapEncoding?Hd("emissiveMapTexelToLinear",f.emissiveMapEncoding):"",f.lightMapEncoding?Hd("lightMapTexelToLinear",f.lightMapEncoding):"",f.outputEncoding?Tj("linearToOutputTexel",f.outputEncoding):"",f.depthPacking?"#define DEPTH_PACKING "+d.depthPacking:"","\n"].filter(Id).join("\n"));l=l.replace(lg,kg);l=Gh(l,f);l=Hh(l,f);m=m.replace(lg,kg);m=Gh(m,f);m=Hh(m,f);l=l.replace(Kh,Ih);m=m.replace(Kh,Ih);f.isWebGL2&&!d.isRawShaderMaterial&&(p=!1,
|
|
|
r=/^\s*#version\s+300\s+es\s*\n/,d.isShaderMaterial&&null!==l.match(r)&&null!==m.match(r)&&(p=!0,l=l.replace(r,""),m=m.replace(r,"")),h="#version 300 es\n\n#define attribute in\n#define varying out\n#define texture2D texture\n"+h,b=["#version 300 es\n\n#define varying in",p?"":"out highp vec4 pc_fragColor;",p?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth\n#define texture2D texture\n#define textureCube texture\n#define texture2DProj textureProj\n#define texture2DLodEXT textureLod\n#define texture2DProjLodEXT textureProjLod\n#define textureCubeLodEXT textureLod\n#define texture2DGradEXT textureGrad\n#define texture2DProjGradEXT textureProjGrad\n#define textureCubeGradEXT textureGrad"].join("\n")+
|
|
|
-"\n"+b,0<x&&(h=h.replace("#version 300 es\n",["#version 300 es\n\n#extension GL_OVR_multiview2 : require","layout(num_views = "+x+") in;","#define VIEW_ID gl_ViewID_OVR"].join("\n")),h=h.replace("uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;",["uniform mat4 modelViewMatrices["+x+"];","uniform mat4 projectionMatrices["+x+"];","uniform mat4 viewMatrices["+x+"];","uniform mat3 normalMatrices["+x+"];","#define modelViewMatrix modelViewMatrices[VIEW_ID]\n#define projectionMatrix projectionMatrices[VIEW_ID]\n#define viewMatrix viewMatrices[VIEW_ID]\n#define normalMatrix normalMatrices[VIEW_ID]"].join("\n")),
|
|
|
-b=b.replace("#version 300 es\n","#version 300 es\n\n#extension GL_OVR_multiview2 : require\n#define VIEW_ID gl_ViewID_OVR"),b=b.replace("uniform mat4 viewMatrix;",["uniform mat4 viewMatrices["+x+"];","#define viewMatrix viewMatrices[VIEW_ID]"].join("\n"))));m=b+m;l=Dh(g,35633,h+l);m=Dh(g,35632,m);g.attachShader(w,l);g.attachShader(w,m);void 0!==d.index0AttributeName?g.bindAttribLocation(w,0,d.index0AttributeName):!0===f.morphTargets&&g.bindAttribLocation(w,0,"position");g.linkProgram(w);if(a.debug.checkShaderErrors){a=
|
|
|
+"\n"+b,0<y&&(h=h.replace("#version 300 es\n",["#version 300 es\n\n#extension GL_OVR_multiview2 : require","layout(num_views = "+y+") in;","#define VIEW_ID gl_ViewID_OVR"].join("\n")),h=h.replace("uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;",["uniform mat4 modelViewMatrices["+y+"];","uniform mat4 projectionMatrices["+y+"];","uniform mat4 viewMatrices["+y+"];","uniform mat3 normalMatrices["+y+"];","#define modelViewMatrix modelViewMatrices[VIEW_ID]\n#define projectionMatrix projectionMatrices[VIEW_ID]\n#define viewMatrix viewMatrices[VIEW_ID]\n#define normalMatrix normalMatrices[VIEW_ID]"].join("\n")),
|
|
|
+b=b.replace("#version 300 es\n","#version 300 es\n\n#extension GL_OVR_multiview2 : require\n#define VIEW_ID gl_ViewID_OVR"),b=b.replace("uniform mat4 viewMatrix;",["uniform mat4 viewMatrices["+y+"];","#define viewMatrix viewMatrices[VIEW_ID]"].join("\n"))));m=b+m;l=Dh(g,35633,h+l);m=Dh(g,35632,m);g.attachShader(w,l);g.attachShader(w,m);void 0!==d.index0AttributeName?g.bindAttribLocation(w,0,d.index0AttributeName):!0===f.morphTargets&&g.bindAttribLocation(w,0,"position");g.linkProgram(w);if(a.debug.checkShaderErrors){a=
|
|
|
g.getProgramInfoLog(w).trim();f=g.getShaderInfoLog(l).trim();p=g.getShaderInfoLog(m).trim();k=r=!0;if(!1===g.getProgramParameter(w,35714))r=!1,u=Fh(g,l,"vertex"),q=Fh(g,m,"fragment"),console.error("THREE.WebGLProgram: shader error: ",g.getError(),"35715",g.getProgramParameter(w,35715),"gl.getProgramInfoLog",a,u,q);else if(""!==a)console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",a);else if(""===f||""===p)k=!1;k&&(this.diagnostics={runnable:r,material:d,programLog:a,vertexShader:{log:f,prefix:h},
|
|
|
fragmentShader:{log:p,prefix:b}})}g.deleteShader(l);g.deleteShader(m);var L;this.getUniforms=function(){void 0===L&&(L=new Cb(g,w));return L};var K;this.getAttributes=function(){if(void 0===K){for(var a={},b=g.getProgramParameter(w,35721),c=0;c<b;c++){var d=g.getActiveAttrib(w,c).name;a[d]=g.getAttribLocation(w,d)}K=a}return K};this.destroy=function(){g.deleteProgram(w);this.program=void 0};this.name=e.name;this.id=ck++;this.cacheKey=c;this.usedTimes=1;this.program=w;this.vertexShader=l;this.fragmentShader=
|
|
|
-m;this.numMultiviewViews=x;return this}function dk(a,b,c){function d(a){if(a)a.isTexture?b=a.encoding:a.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),b=a.texture.encoding);else var b=3E3;return b}var e=[],f=c.isWebGL2,g=c.logarithmicDepthBuffer,h=c.floatVertexTextures,l=c.precision,m=c.maxVertexUniforms,p=c.vertexTextures,r={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",
|
|
|
+m;this.numMultiviewViews=y;return this}function dk(a,b,c){function d(a){if(a)a.isTexture?b=a.encoding:a.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),b=a.texture.encoding);else var b=3E3;return b}var e=[],f=c.isWebGL2,g=c.logarithmicDepthBuffer,h=c.floatVertexTextures,l=c.precision,m=c.maxVertexUniforms,p=c.vertexTextures,r={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",
|
|
|
MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},k="precision isWebGL2 supportsVertexTextures outputEncoding instancing numMultiviewViews map mapEncoding matcap matcapEncoding envMap envMapMode envMapEncoding envMapCubeUV lightMap lightMapEncoding aoMap emissiveMap emissiveMapEncoding bumpMap normalMap objectSpaceNormalMap tangentSpaceNormalMap clearcoatNormalMap displacementMap specularMap roughnessMap metalnessMap gradientMap alphaMap combine vertexColors vertexTangents vertexUvs uvsVertexOnly fog useFog fogExp2 flatShading sizeAttenuation logarithmicDepthBuffer skinning maxBones useVertexTexture morphTargets morphNormals maxMorphTargets maxMorphNormals premultipliedAlpha numDirLights numPointLights numSpotLights numHemiLights numRectAreaLights numDirLightShadows numPointLightShadows numSpotLightShadows shadowMapEnabled shadowMapType toneMapping physicallyCorrectLights alphaTest doubleSided flipSided numClippingPlanes numClipIntersection depthPacking dithering sheen".split(" ");
|
|
|
-this.getParameters=function(b,e,k,t,n,x,L){var q=r[b.type];if(L.isSkinnedMesh){var v=L.skeleton.bones;if(h)v=1024;else{var u=Math.min(Math.floor((m-20)/4),v.length);u<v.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+v.length+" bones. This GPU supports "+u+"."),v=0):v=u}}else v=0;null!==b.precision&&(l=c.getMaxPrecision(b.precision),l!==b.precision&&console.warn("THREE.WebGLProgram.getParameters:",b.precision,"not supported, using",l,"instead."));u=a.getRenderTarget();return{isWebGL2:f,
|
|
|
+this.getParameters=function(b,e,k,t,n,y,L){var q=r[b.type];if(L.isSkinnedMesh){var v=L.skeleton.bones;if(h)v=1024;else{var u=Math.min(Math.floor((m-20)/4),v.length);u<v.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+v.length+" bones. This GPU supports "+u+"."),v=0):v=u}}else v=0;null!==b.precision&&(l=c.getMaxPrecision(b.precision),l!==b.precision&&console.warn("THREE.WebGLProgram.getParameters:",b.precision,"not supported, using",l,"instead."));u=a.getRenderTarget();return{isWebGL2:f,
|
|
|
shaderID:q,precision:l,instancing:!0===L.isInstancedMesh,supportsVertexTextures:p,numMultiviewViews:u&&u.isWebGLMultiviewRenderTarget?u.numViews:0,outputEncoding:null!==u?d(u.texture):a.outputEncoding,map:!!b.map,mapEncoding:d(b.map),matcap:!!b.matcap,matcapEncoding:d(b.matcap),envMap:!!b.envMap,envMapMode:b.envMap&&b.envMap.mapping,envMapEncoding:d(b.envMap),envMapCubeUV:!!b.envMap&&(306===b.envMap.mapping||307===b.envMap.mapping),lightMap:!!b.lightMap,lightMapEncoding:d(b.lightMap),aoMap:!!b.aoMap,
|
|
|
emissiveMap:!!b.emissiveMap,emissiveMapEncoding:d(b.emissiveMap),bumpMap:!!b.bumpMap,normalMap:!!b.normalMap,objectSpaceNormalMap:1===b.normalMapType,tangentSpaceNormalMap:0===b.normalMapType,clearcoatNormalMap:!!b.clearcoatNormalMap,displacementMap:!!b.displacementMap,roughnessMap:!!b.roughnessMap,metalnessMap:!!b.metalnessMap,specularMap:!!b.specularMap,alphaMap:!!b.alphaMap,gradientMap:!!b.gradientMap,sheen:!!b.sheen,combine:b.combine,vertexTangents:b.normalMap&&b.vertexTangents,vertexColors:b.vertexColors,
|
|
|
vertexUvs:!!b.map||!!b.bumpMap||!!b.normalMap||!!b.specularMap||!!b.alphaMap||!!b.emissiveMap||!!b.roughnessMap||!!b.metalnessMap||!!b.clearcoatNormalMap||!!b.displacementMap,uvsVertexOnly:!(b.map||b.bumpMap||b.normalMap||b.specularMap||b.alphaMap||b.emissiveMap||b.roughnessMap||b.metalnessMap||b.clearcoatNormalMap)&&!!b.displacementMap,fog:!!t,useFog:b.fog,fogExp2:t&&t.isFogExp2,flatShading:b.flatShading,sizeAttenuation:b.sizeAttenuation,logarithmicDepthBuffer:g,skinning:b.skinning&&0<v,maxBones:v,
|
|
|
-useVertexTexture:h,morphTargets:b.morphTargets,morphNormals:b.morphNormals,maxMorphTargets:a.maxMorphTargets,maxMorphNormals:a.maxMorphNormals,numDirLights:e.directional.length,numPointLights:e.point.length,numSpotLights:e.spot.length,numRectAreaLights:e.rectArea.length,numHemiLights:e.hemi.length,numDirLightShadows:e.directionalShadowMap.length,numPointLightShadows:e.pointShadowMap.length,numSpotLightShadows:e.spotShadowMap.length,numClippingPlanes:n,numClipIntersection:x,dithering:b.dithering,shadowMapEnabled:a.shadowMap.enabled&&
|
|
|
+useVertexTexture:h,morphTargets:b.morphTargets,morphNormals:b.morphNormals,maxMorphTargets:a.maxMorphTargets,maxMorphNormals:a.maxMorphNormals,numDirLights:e.directional.length,numPointLights:e.point.length,numSpotLights:e.spot.length,numRectAreaLights:e.rectArea.length,numHemiLights:e.hemi.length,numDirLightShadows:e.directionalShadowMap.length,numPointLightShadows:e.pointShadowMap.length,numSpotLightShadows:e.spotShadowMap.length,numClippingPlanes:n,numClipIntersection:y,dithering:b.dithering,shadowMapEnabled:a.shadowMap.enabled&&
|
|
|
0<k.length,shadowMapType:a.shadowMap.type,toneMapping:b.toneMapped?a.toneMapping:0,physicallyCorrectLights:a.physicallyCorrectLights,premultipliedAlpha:b.premultipliedAlpha,alphaTest:b.alphaTest,doubleSided:2===b.side,flipSided:1===b.side,depthPacking:void 0!==b.depthPacking?b.depthPacking:!1}};this.getProgramCacheKey=function(b,c){var d=[];c.shaderID?d.push(c.shaderID):(d.push(b.fragmentShader),d.push(b.vertexShader));if(void 0!==b.defines)for(var e in b.defines)d.push(e),d.push(b.defines[e]);for(e=
|
|
|
0;e<k.length;e++)d.push(c[k[e]]);d.push(b.onBeforeCompile.toString());d.push(a.outputEncoding);d.push(a.gammaFactor);return d.join()};this.acquireProgram=function(c,d,f,g){for(var h,l=0,m=e.length;l<m;l++){var r=e[l];if(r.cacheKey===g){h=r;++h.usedTimes;break}}void 0===h&&(h=new bk(a,b,g,c,d,f),e.push(h));return h};this.releaseProgram=function(a){if(0===--a.usedTimes){var b=e.indexOf(a);e[b]=e[e.length-1];e.pop();a.destroy()}};this.programs=e}function ek(){var a=new WeakMap;return{get:function(b){var c=
|
|
|
a.get(b);void 0===c&&(c={},a.set(b,c));return c},remove:function(b){a.delete(b)},update:function(b,c,d){a.get(b)[c]=d},dispose:function(){a=new WeakMap}}}function fk(a,b){return a.groupOrder!==b.groupOrder?a.groupOrder-b.groupOrder:a.renderOrder!==b.renderOrder?a.renderOrder-b.renderOrder:a.program!==b.program?a.program.id-b.program.id:a.material.id!==b.material.id?a.material.id-b.material.id:a.z!==b.z?a.z-b.z:a.id-b.id}function gk(a,b){return a.groupOrder!==b.groupOrder?a.groupOrder-b.groupOrder:
|
|
|
a.renderOrder!==b.renderOrder?a.renderOrder-b.renderOrder:a.z!==b.z?b.z-a.z:a.id-b.id}function Lh(){function a(a,d,e,m,p,r){var g=b[c];void 0===g?(g={id:a.id,object:a,geometry:d,material:e,program:e.program||f,groupOrder:m,renderOrder:a.renderOrder,z:p,group:r},b[c]=g):(g.id=a.id,g.object=a,g.geometry=d,g.material=e,g.program=e.program||f,g.groupOrder=m,g.renderOrder=a.renderOrder,g.z=p,g.group=r);c++;return g}var b=[],c=0,d=[],e=[],f={id:-1};return{opaque:d,transparent:e,init:function(){c=0;d.length=
|
|
|
0;e.length=0},push:function(b,c,f,m,p,r){b=a(b,c,f,m,p,r);(!0===f.transparent?e:d).push(b)},unshift:function(b,c,f,m,p,r){b=a(b,c,f,m,p,r);(!0===f.transparent?e:d).unshift(b)},sort:function(){1<d.length&&d.sort(fk);1<e.length&&e.sort(gk)}}}function hk(){function a(c){c=c.target;c.removeEventListener("dispose",a);b.delete(c)}var b=new WeakMap;return{get:function(c,d){var e=b.get(c);if(void 0===e){var f=new Lh;b.set(c,new WeakMap);b.get(c).set(d,f);c.addEventListener("dispose",a)}else f=e.get(d),void 0===
|
|
|
-f&&(f=new Lh,e.set(d,f));return f},dispose:function(){b=new WeakMap}}}function ik(){var a={};return{get:function(b){if(void 0!==a[b.id])return a[b.id];switch(b.type){case "DirectionalLight":var c={direction:new n,color:new A,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new y};break;case "SpotLight":c={position:new n,direction:new n,color:new A,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new y};break;case "PointLight":c={position:new n,color:new A,
|
|
|
-distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new y,shadowCameraNear:1,shadowCameraFar:1E3};break;case "HemisphereLight":c={direction:new n,skyColor:new A,groundColor:new A};break;case "RectAreaLight":c={color:new A,position:new n,halfWidth:new n,halfHeight:new n}}return a[b.id]=c}}}function jk(a,b){return(b.castShadow?1:0)-(a.castShadow?1:0)}function kk(){for(var a=new ik,b={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,
|
|
|
-numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},c=0;9>c;c++)b.probe.push(new n);var d=new n,e=new R,f=new R;return{setup:function(c,h,l){for(var g=0,p=0,r=0,k=0;9>k;k++)b.probe[k].set(0,0,0);var u=h=0,q=0,v=0,n=0,w=0,x=
|
|
|
-0,L=0;l=l.matrixWorldInverse;c.sort(jk);k=0;for(var K=c.length;k<K;k++){var z=c[k],ya=z.color,wa=z.intensity,y=z.distance,na=z.shadow&&z.shadow.map?z.shadow.map.texture:null;if(z.isAmbientLight)g+=ya.r*wa,p+=ya.g*wa,r+=ya.b*wa;else if(z.isLightProbe)for(na=0;9>na;na++)b.probe[na].addScaledVector(z.sh.coefficients[na],wa);else if(z.isDirectionalLight){var E=a.get(z);E.color.copy(z.color).multiplyScalar(z.intensity);E.direction.setFromMatrixPosition(z.matrixWorld);d.setFromMatrixPosition(z.target.matrixWorld);
|
|
|
-E.direction.sub(d);E.direction.transformDirection(l);if(E.shadow=z.castShadow)wa=z.shadow,E.shadowBias=wa.bias,E.shadowRadius=wa.radius,E.shadowMapSize=wa.mapSize,b.directionalShadowMap[h]=na,b.directionalShadowMatrix[h]=z.shadow.matrix,w++;b.directional[h]=E;h++}else if(z.isSpotLight){E=a.get(z);E.position.setFromMatrixPosition(z.matrixWorld);E.position.applyMatrix4(l);E.color.copy(ya).multiplyScalar(wa);E.distance=y;E.direction.setFromMatrixPosition(z.matrixWorld);d.setFromMatrixPosition(z.target.matrixWorld);
|
|
|
-E.direction.sub(d);E.direction.transformDirection(l);E.coneCos=Math.cos(z.angle);E.penumbraCos=Math.cos(z.angle*(1-z.penumbra));E.decay=z.decay;if(E.shadow=z.castShadow)wa=z.shadow,E.shadowBias=wa.bias,E.shadowRadius=wa.radius,E.shadowMapSize=wa.mapSize,b.spotShadowMap[q]=na,b.spotShadowMatrix[q]=z.shadow.matrix,L++;b.spot[q]=E;q++}else if(z.isRectAreaLight)E=a.get(z),E.color.copy(ya).multiplyScalar(wa),E.position.setFromMatrixPosition(z.matrixWorld),E.position.applyMatrix4(l),f.identity(),e.copy(z.matrixWorld),
|
|
|
-e.premultiply(l),f.extractRotation(e),E.halfWidth.set(.5*z.width,0,0),E.halfHeight.set(0,.5*z.height,0),E.halfWidth.applyMatrix4(f),E.halfHeight.applyMatrix4(f),b.rectArea[v]=E,v++;else if(z.isPointLight){E=a.get(z);E.position.setFromMatrixPosition(z.matrixWorld);E.position.applyMatrix4(l);E.color.copy(z.color).multiplyScalar(z.intensity);E.distance=z.distance;E.decay=z.decay;if(E.shadow=z.castShadow)wa=z.shadow,E.shadowBias=wa.bias,E.shadowRadius=wa.radius,E.shadowMapSize=wa.mapSize,E.shadowCameraNear=
|
|
|
-wa.camera.near,E.shadowCameraFar=wa.camera.far,b.pointShadowMap[u]=na,b.pointShadowMatrix[u]=z.shadow.matrix,x++;b.point[u]=E;u++}else z.isHemisphereLight&&(E=a.get(z),E.direction.setFromMatrixPosition(z.matrixWorld),E.direction.transformDirection(l),E.direction.normalize(),E.skyColor.copy(z.color).multiplyScalar(wa),E.groundColor.copy(z.groundColor).multiplyScalar(wa),b.hemi[n]=E,n++)}b.ambient[0]=g;b.ambient[1]=p;b.ambient[2]=r;c=b.hash;if(c.directionalLength!==h||c.pointLength!==u||c.spotLength!==
|
|
|
-q||c.rectAreaLength!==v||c.hemiLength!==n||c.numDirectionalShadows!==w||c.numPointShadows!==x||c.numSpotShadows!==L)b.directional.length=h,b.spot.length=q,b.rectArea.length=v,b.point.length=u,b.hemi.length=n,b.directionalShadowMap.length=w,b.pointShadowMap.length=x,b.spotShadowMap.length=L,b.directionalShadowMatrix.length=w,b.pointShadowMatrix.length=x,b.spotShadowMatrix.length=L,c.directionalLength=h,c.pointLength=u,c.spotLength=q,c.rectAreaLength=v,c.hemiLength=n,c.numDirectionalShadows=w,c.numPointShadows=
|
|
|
-x,c.numSpotShadows=L,b.version=lk++},state:b}}function Mh(){var a=new kk,b=[],c=[];return{init:function(){b.length=0;c.length=0},state:{lightsArray:b,shadowsArray:c,lights:a},setupLights:function(d){a.setup(b,c,d)},pushLight:function(a){b.push(a)},pushShadow:function(a){c.push(a)}}}function mk(){function a(c){c=c.target;c.removeEventListener("dispose",a);b.delete(c)}var b=new WeakMap;return{get:function(c,d){if(!1===b.has(c)){var e=new Mh;b.set(c,new WeakMap);b.get(c).set(d,e);c.addEventListener("dispose",
|
|
|
+f&&(f=new Lh,e.set(d,f));return f},dispose:function(){b=new WeakMap}}}function ik(){var a={};return{get:function(b){if(void 0!==a[b.id])return a[b.id];switch(b.type){case "DirectionalLight":var c={direction:new n,color:new A,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new z};break;case "SpotLight":c={position:new n,direction:new n,color:new A,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new z};break;case "PointLight":c={position:new n,color:new A,
|
|
|
+distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new z,shadowCameraNear:1,shadowCameraFar:1E3};break;case "HemisphereLight":c={direction:new n,skyColor:new A,groundColor:new A};break;case "RectAreaLight":c={color:new A,position:new n,halfWidth:new n,halfHeight:new n}}return a[b.id]=c}}}function jk(a,b){return(b.castShadow?1:0)-(a.castShadow?1:0)}function kk(){for(var a=new ik,b={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,
|
|
|
+numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},c=0;9>c;c++)b.probe.push(new n);var d=new n,e=new R,f=new R;return{setup:function(c,h,l){for(var g=0,p=0,r=0,k=0;9>k;k++)b.probe[k].set(0,0,0);var u=h=0,q=0,v=0,n=0,w=0,y=
|
|
|
+0,L=0;l=l.matrixWorldInverse;c.sort(jk);k=0;for(var K=c.length;k<K;k++){var x=c[k],ya=x.color,wa=x.intensity,z=x.distance,na=x.shadow&&x.shadow.map?x.shadow.map.texture:null;if(x.isAmbientLight)g+=ya.r*wa,p+=ya.g*wa,r+=ya.b*wa;else if(x.isLightProbe)for(na=0;9>na;na++)b.probe[na].addScaledVector(x.sh.coefficients[na],wa);else if(x.isDirectionalLight){var E=a.get(x);E.color.copy(x.color).multiplyScalar(x.intensity);E.direction.setFromMatrixPosition(x.matrixWorld);d.setFromMatrixPosition(x.target.matrixWorld);
|
|
|
+E.direction.sub(d);E.direction.transformDirection(l);if(E.shadow=x.castShadow)wa=x.shadow,E.shadowBias=wa.bias,E.shadowRadius=wa.radius,E.shadowMapSize=wa.mapSize,b.directionalShadowMap[h]=na,b.directionalShadowMatrix[h]=x.shadow.matrix,w++;b.directional[h]=E;h++}else if(x.isSpotLight){E=a.get(x);E.position.setFromMatrixPosition(x.matrixWorld);E.position.applyMatrix4(l);E.color.copy(ya).multiplyScalar(wa);E.distance=z;E.direction.setFromMatrixPosition(x.matrixWorld);d.setFromMatrixPosition(x.target.matrixWorld);
|
|
|
+E.direction.sub(d);E.direction.transformDirection(l);E.coneCos=Math.cos(x.angle);E.penumbraCos=Math.cos(x.angle*(1-x.penumbra));E.decay=x.decay;if(E.shadow=x.castShadow)wa=x.shadow,E.shadowBias=wa.bias,E.shadowRadius=wa.radius,E.shadowMapSize=wa.mapSize,b.spotShadowMap[q]=na,b.spotShadowMatrix[q]=x.shadow.matrix,L++;b.spot[q]=E;q++}else if(x.isRectAreaLight)E=a.get(x),E.color.copy(ya).multiplyScalar(wa),E.position.setFromMatrixPosition(x.matrixWorld),E.position.applyMatrix4(l),f.identity(),e.copy(x.matrixWorld),
|
|
|
+e.premultiply(l),f.extractRotation(e),E.halfWidth.set(.5*x.width,0,0),E.halfHeight.set(0,.5*x.height,0),E.halfWidth.applyMatrix4(f),E.halfHeight.applyMatrix4(f),b.rectArea[v]=E,v++;else if(x.isPointLight){E=a.get(x);E.position.setFromMatrixPosition(x.matrixWorld);E.position.applyMatrix4(l);E.color.copy(x.color).multiplyScalar(x.intensity);E.distance=x.distance;E.decay=x.decay;if(E.shadow=x.castShadow)wa=x.shadow,E.shadowBias=wa.bias,E.shadowRadius=wa.radius,E.shadowMapSize=wa.mapSize,E.shadowCameraNear=
|
|
|
+wa.camera.near,E.shadowCameraFar=wa.camera.far,b.pointShadowMap[u]=na,b.pointShadowMatrix[u]=x.shadow.matrix,y++;b.point[u]=E;u++}else x.isHemisphereLight&&(E=a.get(x),E.direction.setFromMatrixPosition(x.matrixWorld),E.direction.transformDirection(l),E.direction.normalize(),E.skyColor.copy(x.color).multiplyScalar(wa),E.groundColor.copy(x.groundColor).multiplyScalar(wa),b.hemi[n]=E,n++)}b.ambient[0]=g;b.ambient[1]=p;b.ambient[2]=r;c=b.hash;if(c.directionalLength!==h||c.pointLength!==u||c.spotLength!==
|
|
|
+q||c.rectAreaLength!==v||c.hemiLength!==n||c.numDirectionalShadows!==w||c.numPointShadows!==y||c.numSpotShadows!==L)b.directional.length=h,b.spot.length=q,b.rectArea.length=v,b.point.length=u,b.hemi.length=n,b.directionalShadowMap.length=w,b.pointShadowMap.length=y,b.spotShadowMap.length=L,b.directionalShadowMatrix.length=w,b.pointShadowMatrix.length=y,b.spotShadowMatrix.length=L,c.directionalLength=h,c.pointLength=u,c.spotLength=q,c.rectAreaLength=v,c.hemiLength=n,c.numDirectionalShadows=w,c.numPointShadows=
|
|
|
+y,c.numSpotShadows=L,b.version=lk++},state:b}}function Mh(){var a=new kk,b=[],c=[];return{init:function(){b.length=0;c.length=0},state:{lightsArray:b,shadowsArray:c,lights:a},setupLights:function(d){a.setup(b,c,d)},pushLight:function(a){b.push(a)},pushShadow:function(a){c.push(a)}}}function mk(){function a(c){c=c.target;c.removeEventListener("dispose",a);b.delete(c)}var b=new WeakMap;return{get:function(c,d){if(!1===b.has(c)){var e=new Mh;b.set(c,new WeakMap);b.get(c).set(d,e);c.addEventListener("dispose",
|
|
|
a)}else!1===b.get(c).has(d)?(e=new Mh,b.get(c).set(d,e)):e=b.get(c).get(d);return e},dispose:function(){b=new WeakMap}}}function Db(a){M.call(this);this.type="MeshDepthMaterial";this.depthPacking=3200;this.morphTargets=this.skinning=!1;this.displacementMap=this.alphaMap=this.map=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=!1;this.wireframeLinewidth=1;this.fog=!1;this.setValues(a)}function Eb(a){M.call(this);this.type="MeshDistanceMaterial";this.referencePosition=new n;this.nearDistance=
|
|
|
1;this.farDistance=1E3;this.morphTargets=this.skinning=!1;this.displacementMap=this.alphaMap=this.map=null;this.displacementScale=1;this.displacementBias=0;this.fog=!1;this.setValues(a)}function Nh(a,b,c){function d(a,b,c){c=a<<0|b<<1|c<<2;var d=r[c];void 0===d&&(d=new Db({depthPacking:3201,morphTargets:a,skinning:b}),r[c]=d);return d}function e(a,b,c){c=a<<0|b<<1|c<<2;var d=k[c];void 0===d&&(d=new Eb({morphTargets:a,skinning:b}),k[c]=d);return d}function f(b,c,f,g,h,l){var m=b.geometry,r=d,p=b.customDepthMaterial;
|
|
|
!0===f.isPointLight&&(r=e,p=b.customDistanceMaterial);void 0===p?(p=!1,!0===c.morphTargets&&(!0===m.isBufferGeometry?p=m.morphAttributes&&m.morphAttributes.position&&0<m.morphAttributes.position.length:!0===m.isGeometry&&(p=m.morphTargets&&0<m.morphTargets.length)),m=!1,!0===b.isSkinnedMesh&&(!0===c.skinning?m=!0:console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",b)),b=r(p,m,!0===b.isInstancedMesh)):b=p;a.localClippingEnabled&&!0===c.clipShadows&&0!==c.clippingPlanes.length&&
|
|
|
(p=b.uuid,r=c.uuid,m=u[p],void 0===m&&(m={},u[p]=m),p=m[r],void 0===p&&(p=b.clone(),m[r]=p),b=p);b.visible=c.visible;b.wireframe=c.wireframe;b.side=3===l?null!==c.shadowSide?c.shadowSide:c.side:null!==c.shadowSide?c.shadowSide:q[c.side];b.clipShadows=c.clipShadows;b.clippingPlanes=c.clippingPlanes;b.clipIntersection=c.clipIntersection;b.wireframeLinewidth=c.wireframeLinewidth;b.linewidth=c.linewidth;!0===f.isPointLight&&!0===b.isMeshDistanceMaterial&&(b.referencePosition.setFromMatrixPosition(f.matrixWorld),
|
|
|
b.nearDistance=g,b.farDistance=h);return b}function g(c,d,e,l,m){if(!1!==c.visible){if(c.layers.test(d.layers)&&(c.isMesh||c.isLine||c.isPoints)&&(c.castShadow||c.receiveShadow&&3===m)&&(!c.frustumCulled||h.intersectsObject(c))){c.modelViewMatrix.multiplyMatrices(e.matrixWorldInverse,c.matrixWorld);var p=b.update(c),r=c.material;if(Array.isArray(r))for(var k=p.groups,t=0,q=k.length;t<q;t++){var v=k[t],u=r[v.materialIndex];u&&u.visible&&(u=f(c,u,l,e.near,e.far,m),a.renderBufferDirect(e,null,p,u,c,
|
|
|
-v))}else r.visible&&(u=f(c,r,l,e.near,e.far,m),a.renderBufferDirect(e,null,p,u,c,null))}c=c.children;p=0;for(r=c.length;p<r;p++)g(c[p],d,e,l,m)}}var h=new Ed,l=new y,m=new y,p=new fa,r=[],k=[],u={},q={0:1,1:0,2:2},v=new za({defines:{SAMPLE_RATE:.25,HALF_SAMPLE_RATE:.125},uniforms:{shadow_pass:{value:null},resolution:{value:new y},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n float mean = 0.0;\n float squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n #ifdef HORIZONAL_PASS\n vec2 distribution = unpack2HalfToRGBA ( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n mean += distribution.x;\n squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n #else\n float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n mean += depth;\n squared_mean += depth * depth;\n #endif\n }\n mean = mean * HALF_SAMPLE_RATE;\n squared_mean = squared_mean * HALF_SAMPLE_RATE;\n float std_dev = sqrt( squared_mean - mean * mean );\n gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),
|
|
|
-n=v.clone();n.defines.HORIZONAL_PASS=1;var w=new C;w.setAttribute("position",new Q(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var x=new V(w,v),L=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.render=function(d,e,f){if(!1!==L.enabled&&(!1!==L.autoUpdate||!1!==L.needsUpdate)&&0!==d.length){var r=a.getRenderTarget(),k=a.getActiveCubeFace(),t=a.getActiveMipmapLevel(),q=a.state;q.setBlending(0);q.buffers.color.setClear(1,1,1,1);q.buffers.depth.setTest(!0);q.setScissorTest(!1);
|
|
|
-for(var u=0,B=d.length;u<B;u++){var w=d[u],z=w.shadow;if(void 0===z)console.warn("THREE.WebGLShadowMap:",w,"has no shadow.");else{l.copy(z.mapSize);var K=z.getFrameExtents();l.multiply(K);m.copy(z.mapSize);if(l.x>c||l.y>c)console.warn("THREE.WebGLShadowMap:",w,"has shadow exceeding max texture size, reducing"),l.x>c&&(m.x=Math.floor(c/K.x),l.x=m.x*K.x,z.mapSize.x=m.x),l.y>c&&(m.y=Math.floor(c/K.y),l.y=m.y*K.y,z.mapSize.y=m.y);null!==z.map||z.isPointLightShadow||3!==this.type||(K={minFilter:1006,magFilter:1006,
|
|
|
-format:1023},z.map=new ia(l.x,l.y,K),z.map.texture.name=w.name+".shadowMap",z.mapPass=new ia(l.x,l.y,K),z.camera.updateProjectionMatrix());null===z.map&&(K={minFilter:1003,magFilter:1003,format:1023},z.map=new ia(l.x,l.y,K),z.map.texture.name=w.name+".shadowMap",z.camera.updateProjectionMatrix());a.setRenderTarget(z.map);a.clear();K=z.getViewportCount();for(var ya=0;ya<K;ya++){var y=z.getViewport(ya);p.set(m.x*y.x,m.y*y.y,m.x*y.z,m.y*y.w);q.viewport(p);z.updateMatrices(w,ya);h=z.getFrustum();g(e,
|
|
|
-f,z.camera,w,this.type)}z.isPointLightShadow||3!==this.type||(w=z,z=f,K=b.update(x),v.uniforms.shadow_pass.value=w.map.texture,v.uniforms.resolution.value=w.mapSize,v.uniforms.radius.value=w.radius,a.setRenderTarget(w.mapPass),a.clear(),a.renderBufferDirect(z,null,K,v,x,null),n.uniforms.shadow_pass.value=w.mapPass.texture,n.uniforms.resolution.value=w.mapSize,n.uniforms.radius.value=w.radius,a.setRenderTarget(w.map),a.clear(),a.renderBufferDirect(z,null,K,n,x,null))}}L.needsUpdate=!1;a.setRenderTarget(r,
|
|
|
-k,t)}}}function nk(a,b,c){function d(b,c,d){var e=new Uint8Array(4),f=a.createTexture();a.bindTexture(b,f);a.texParameteri(b,10241,9728);a.texParameteri(b,10240,9728);for(b=0;b<d;b++)a.texImage2D(c+b,0,6408,1,1,0,6408,5121,e);return f}function e(c,d){n[c]=1;0===w[c]&&(a.enableVertexAttribArray(c),w[c]=1);x[c]!==d&&((k?a:b.get("ANGLE_instanced_arrays"))[k?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](c,d),x[c]=d)}function f(b){!0!==L[b]&&(a.enable(b),L[b]=!0)}function g(b){!1!==L[b]&&(a.disable(b),
|
|
|
-L[b]=!1)}function h(b,c,d,e,h,l,m,p){if(0===b)z&&(g(3042),z=!1);else if(z||(f(3042),z=!0),5!==b){if(b!==ya||p!==C){if(100!==y||100!==E)a.blendEquation(32774),E=y=100;if(p)switch(b){case 1:a.blendFuncSeparate(1,771,1,771);break;case 2:a.blendFunc(1,1);break;case 3:a.blendFuncSeparate(0,0,769,771);break;case 4:a.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",b)}else switch(b){case 1:a.blendFuncSeparate(770,771,1,771);break;case 2:a.blendFunc(770,1);
|
|
|
-break;case 3:a.blendFunc(0,769);break;case 4:a.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",b)}F=G=na=D=null;ya=b;C=p}}else{h=h||c;l=l||d;m=m||e;if(c!==y||h!==E)a.blendEquationSeparate(Fc[c],Fc[h]),y=c,E=h;if(d!==D||e!==na||l!==G||m!==F)a.blendFuncSeparate(J[d],J[e],J[l],J[m]),D=d,na=e,G=l,F=m;ya=b;C=null}}function l(b){A!==b&&(b?a.frontFace(2304):a.frontFace(2305),A=b)}function m(b){0!==b?(f(2884),b!==I&&(1===b?a.cullFace(1029):2===b?a.cullFace(1028):a.cullFace(1032))):
|
|
|
+v))}else r.visible&&(u=f(c,r,l,e.near,e.far,m),a.renderBufferDirect(e,null,p,u,c,null))}c=c.children;p=0;for(r=c.length;p<r;p++)g(c[p],d,e,l,m)}}var h=new Ed,l=new z,m=new z,p=new fa,r=[],k=[],u={},q={0:1,1:0,2:2},v=new za({defines:{SAMPLE_RATE:.25,HALF_SAMPLE_RATE:.125},uniforms:{shadow_pass:{value:null},resolution:{value:new z},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n float mean = 0.0;\n float squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n #ifdef HORIZONAL_PASS\n vec2 distribution = unpack2HalfToRGBA ( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n mean += distribution.x;\n squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n #else\n float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n mean += depth;\n squared_mean += depth * depth;\n #endif\n }\n mean = mean * HALF_SAMPLE_RATE;\n squared_mean = squared_mean * HALF_SAMPLE_RATE;\n float std_dev = sqrt( squared_mean - mean * mean );\n gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),
|
|
|
+n=v.clone();n.defines.HORIZONAL_PASS=1;var w=new C;w.setAttribute("position",new Q(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var y=new V(w,v),L=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.render=function(d,e,f){if(!1!==L.enabled&&(!1!==L.autoUpdate||!1!==L.needsUpdate)&&0!==d.length){var r=a.getRenderTarget(),k=a.getActiveCubeFace(),t=a.getActiveMipmapLevel(),q=a.state;q.setBlending(0);q.buffers.color.setClear(1,1,1,1);q.buffers.depth.setTest(!0);q.setScissorTest(!1);
|
|
|
+for(var u=0,B=d.length;u<B;u++){var w=d[u],x=w.shadow;if(void 0===x)console.warn("THREE.WebGLShadowMap:",w,"has no shadow.");else{l.copy(x.mapSize);var K=x.getFrameExtents();l.multiply(K);m.copy(x.mapSize);if(l.x>c||l.y>c)console.warn("THREE.WebGLShadowMap:",w,"has shadow exceeding max texture size, reducing"),l.x>c&&(m.x=Math.floor(c/K.x),l.x=m.x*K.x,x.mapSize.x=m.x),l.y>c&&(m.y=Math.floor(c/K.y),l.y=m.y*K.y,x.mapSize.y=m.y);null!==x.map||x.isPointLightShadow||3!==this.type||(K={minFilter:1006,magFilter:1006,
|
|
|
+format:1023},x.map=new ia(l.x,l.y,K),x.map.texture.name=w.name+".shadowMap",x.mapPass=new ia(l.x,l.y,K),x.camera.updateProjectionMatrix());null===x.map&&(K={minFilter:1003,magFilter:1003,format:1023},x.map=new ia(l.x,l.y,K),x.map.texture.name=w.name+".shadowMap",x.camera.updateProjectionMatrix());a.setRenderTarget(x.map);a.clear();K=x.getViewportCount();for(var ya=0;ya<K;ya++){var z=x.getViewport(ya);p.set(m.x*z.x,m.y*z.y,m.x*z.z,m.y*z.w);q.viewport(p);x.updateMatrices(w,ya);h=x.getFrustum();g(e,
|
|
|
+f,x.camera,w,this.type)}x.isPointLightShadow||3!==this.type||(w=x,x=f,K=b.update(y),v.uniforms.shadow_pass.value=w.map.texture,v.uniforms.resolution.value=w.mapSize,v.uniforms.radius.value=w.radius,a.setRenderTarget(w.mapPass),a.clear(),a.renderBufferDirect(x,null,K,v,y,null),n.uniforms.shadow_pass.value=w.mapPass.texture,n.uniforms.resolution.value=w.mapSize,n.uniforms.radius.value=w.radius,a.setRenderTarget(w.map),a.clear(),a.renderBufferDirect(x,null,K,n,y,null))}}L.needsUpdate=!1;a.setRenderTarget(r,
|
|
|
+k,t)}}}function nk(a,b,c){function d(b,c,d){var e=new Uint8Array(4),f=a.createTexture();a.bindTexture(b,f);a.texParameteri(b,10241,9728);a.texParameteri(b,10240,9728);for(b=0;b<d;b++)a.texImage2D(c+b,0,6408,1,1,0,6408,5121,e);return f}function e(c,d){n[c]=1;0===w[c]&&(a.enableVertexAttribArray(c),w[c]=1);y[c]!==d&&((k?a:b.get("ANGLE_instanced_arrays"))[k?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](c,d),y[c]=d)}function f(b){!0!==L[b]&&(a.enable(b),L[b]=!0)}function g(b){!1!==L[b]&&(a.disable(b),
|
|
|
+L[b]=!1)}function h(b,c,d,e,h,l,m,p){if(0===b)x&&(g(3042),x=!1);else if(x||(f(3042),x=!0),5!==b){if(b!==ya||p!==C){if(100!==z||100!==E)a.blendEquation(32774),E=z=100;if(p)switch(b){case 1:a.blendFuncSeparate(1,771,1,771);break;case 2:a.blendFunc(1,1);break;case 3:a.blendFuncSeparate(0,0,769,771);break;case 4:a.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",b)}else switch(b){case 1:a.blendFuncSeparate(770,771,1,771);break;case 2:a.blendFunc(770,1);
|
|
|
+break;case 3:a.blendFunc(0,769);break;case 4:a.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",b)}F=G=na=D=null;ya=b;C=p}}else{h=h||c;l=l||d;m=m||e;if(c!==z||h!==E)a.blendEquationSeparate(Fc[c],Fc[h]),z=c,E=h;if(d!==D||e!==na||l!==G||m!==F)a.blendFuncSeparate(J[d],J[e],J[l],J[m]),D=d,na=e,G=l,F=m;ya=b;C=null}}function l(b){A!==b&&(b?a.frontFace(2304):a.frontFace(2305),A=b)}function m(b){0!==b?(f(2884),b!==I&&(1===b?a.cullFace(1029):2===b?a.cullFace(1028):a.cullFace(1032))):
|
|
|
g(2884);I=b}function p(b,c,d){if(b){if(f(32823),O!==c||Q!==d)a.polygonOffset(c,d),O=c,Q=d}else g(32823)}function r(b){void 0===b&&(b=33984+da-1);R!==b&&(a.activeTexture(b),R=b)}var k=c.isWebGL2,u=new function(){var b=!1,c=new fa,d=null,e=new fa(0,0,0,0);return{setMask:function(c){d===c||b||(a.colorMask(c,c,c,c),d=c)},setLocked:function(a){b=a},setClear:function(b,d,f,g,h){!0===h&&(b*=g,d*=g,f*=g);c.set(b,d,f,g);!1===e.equals(c)&&(a.clearColor(b,d,f,g),e.copy(c))},reset:function(){b=!1;d=null;e.set(-1,
|
|
|
0,0,0)}}},q=new function(){var b=!1,c=null,d=null,e=null;return{setTest:function(a){a?f(2929):g(2929)},setMask:function(d){c===d||b||(a.depthMask(d),c=d)},setFunc:function(b){if(d!==b){if(b)switch(b){case 0:a.depthFunc(512);break;case 1:a.depthFunc(519);break;case 2:a.depthFunc(513);break;case 3:a.depthFunc(515);break;case 4:a.depthFunc(514);break;case 5:a.depthFunc(518);break;case 6:a.depthFunc(516);break;case 7:a.depthFunc(517);break;default:a.depthFunc(515)}else a.depthFunc(515);d=b}},setLocked:function(a){b=
|
|
|
a},setClear:function(b){e!==b&&(a.clearDepth(b),e=b)},reset:function(){b=!1;e=d=c=null}}},v=new function(){var b=!1,c=null,d=null,e=null,h=null,l=null,m=null,p=null,r=null;return{setTest:function(a){b||(a?f(2960):g(2960))},setMask:function(d){c===d||b||(a.stencilMask(d),c=d)},setFunc:function(b,c,f){if(d!==b||e!==c||h!==f)a.stencilFunc(b,c,f),d=b,e=c,h=f},setOp:function(b,c,d){if(l!==b||m!==c||p!==d)a.stencilOp(b,c,d),l=b,m=c,p=d},setLocked:function(a){b=a},setClear:function(b){r!==b&&(a.clearStencil(b),
|
|
|
-r=b)},reset:function(){b=!1;r=p=m=l=h=e=d=c=null}}};c=a.getParameter(34921);var n=new Uint8Array(c),w=new Uint8Array(c),x=new Uint8Array(c),L={},K=null,z=null,ya=null,y=null,D=null,na=null,E=null,G=null,F=null,C=!1,A=null,I=null,M=null,O=null,Q=null,da=a.getParameter(35661),P=!1;c=0;c=a.getParameter(7938);-1!==c.indexOf("WebGL")?(c=parseFloat(/^WebGL ([0-9])/.exec(c)[1]),P=1<=c):-1!==c.indexOf("OpenGL ES")&&(c=parseFloat(/^OpenGL ES ([0-9])/.exec(c)[1]),P=2<=c);var R=null,Jd={},eb=new fa,Oh=new fa,
|
|
|
+r=b)},reset:function(){b=!1;r=p=m=l=h=e=d=c=null}}};c=a.getParameter(34921);var n=new Uint8Array(c),w=new Uint8Array(c),y=new Uint8Array(c),L={},K=null,x=null,ya=null,z=null,D=null,na=null,E=null,G=null,F=null,C=!1,A=null,I=null,M=null,O=null,Q=null,da=a.getParameter(35661),P=!1;c=0;c=a.getParameter(7938);-1!==c.indexOf("WebGL")?(c=parseFloat(/^WebGL ([0-9])/.exec(c)[1]),P=1<=c):-1!==c.indexOf("OpenGL ES")&&(c=parseFloat(/^OpenGL ES ([0-9])/.exec(c)[1]),P=2<=c);var R=null,Jd={},eb=new fa,Oh=new fa,
|
|
|
ng={};ng[3553]=d(3553,3553,1);ng[34067]=d(34067,34069,6);u.setClear(0,0,0,1);q.setClear(1);v.setClear(0);f(2929);q.setFunc(3);l(!1);m(1);f(2884);h(0);var Fc={100:32774,101:32778,102:32779};k?(Fc[103]=32775,Fc[104]=32776):(c=b.get("EXT_blend_minmax"),null!==c&&(Fc[103]=c.MIN_EXT,Fc[104]=c.MAX_EXT));var J={200:0,201:1,202:768,204:770,210:776,208:774,206:772,203:769,205:771,209:775,207:773};return{buffers:{color:u,depth:q,stencil:v},initAttributes:function(){for(var a=0,b=n.length;a<b;a++)n[a]=0},enableAttribute:function(a){e(a,
|
|
|
0)},enableAttributeAndDivisor:e,disableUnusedAttributes:function(){for(var b=0,c=w.length;b!==c;++b)w[b]!==n[b]&&(a.disableVertexAttribArray(b),w[b]=0)},enable:f,disable:g,useProgram:function(b){return K!==b?(a.useProgram(b),K=b,!0):!1},setBlending:h,setMaterial:function(a,b){2===a.side?g(2884):f(2884);var c=1===a.side;b&&(c=!c);l(c);1===a.blending&&!1===a.transparent?h(0):h(a.blending,a.blendEquation,a.blendSrc,a.blendDst,a.blendEquationAlpha,a.blendSrcAlpha,a.blendDstAlpha,a.premultipliedAlpha);
|
|
|
q.setFunc(a.depthFunc);q.setTest(a.depthTest);q.setMask(a.depthWrite);u.setMask(a.colorWrite);b=a.stencilWrite;v.setTest(b);b&&(v.setMask(a.stencilWriteMask),v.setFunc(a.stencilFunc,a.stencilRef,a.stencilFuncMask),v.setOp(a.stencilFail,a.stencilZFail,a.stencilZPass));p(a.polygonOffset,a.polygonOffsetFactor,a.polygonOffsetUnits)},setFlipSided:l,setCullFace:m,setLineWidth:function(b){b!==M&&(P&&a.lineWidth(b),M=b)},setPolygonOffset:p,setScissorTest:function(a){a?f(3089):g(3089)},activeTexture:r,bindTexture:function(b,
|
|
@@ -130,85 +130,85 @@ c.getContext("2d").drawImage(a,0,0,b,e),console.warn("THREE.WebGLRenderer: Textu
|
|
|
f))*Math.LOG2E}function k(a,c){if(!1===na)return a;var d=a;6403===a&&(5126===c&&(d=33326),5131===c&&(d=33325),5121===c&&(d=33321));6407===a&&(5126===c&&(d=34837),5131===c&&(d=34843),5121===c&&(d=32849));6408===a&&(5126===c&&(d=34836),5131===c&&(d=34842),5121===c&&(d=32856));33325===d||33326===d||34842===d||34836===d?b.get("EXT_color_buffer_float"):(34843===d||34837===d)&&console.warn("THREE.WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead.");return d}function u(a){return 1003===
|
|
|
a||1004===a||1005===a?9728:9729}function q(b){b=b.target;b.removeEventListener("dispose",q);var c=d.get(b);void 0!==c.__webglInit&&(a.deleteTexture(c.__webglTexture),d.remove(b));b.isVideoTexture&&A.delete(b);g.memory.textures--}function v(b){b=b.target;b.removeEventListener("dispose",v);var c=d.get(b),e=d.get(b.texture);if(b){void 0!==e.__webglTexture&&a.deleteTexture(e.__webglTexture);b.depthTexture&&b.depthTexture.dispose();if(b.isWebGLRenderTargetCube)for(e=0;6>e;e++)a.deleteFramebuffer(c.__webglFramebuffer[e]),
|
|
|
c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer[e]);else a.deleteFramebuffer(c.__webglFramebuffer),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer);if(b.isWebGLMultiviewRenderTarget){a.deleteTexture(c.__webglColorTexture);a.deleteTexture(c.__webglDepthStencilTexture);g.memory.textures-=2;e=0;for(var f=c.__webglViewFramebuffers.length;e<f;e++)a.deleteFramebuffer(c.__webglViewFramebuffers[e])}d.remove(b.texture);d.remove(b)}g.memory.textures--}function n(a,b){var e=d.get(a);
|
|
|
-if(a.isVideoTexture){var f=g.render.frame;A.get(a)!==f&&(A.set(a,f),a.update())}if(0<a.version&&e.__version!==a.version)if(f=a.image,void 0===f)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(!1===f.complete)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{z(e,a,b);return}c.activeTexture(33984+b);c.bindTexture(3553,e.__webglTexture)}function w(b,e){if(6===b.image.length){var g=d.get(b);if(0<b.version&&g.__version!==
|
|
|
-b.version){K(g,b);c.activeTexture(33984+e);c.bindTexture(34067,g.__webglTexture);a.pixelStorei(37440,b.flipY);var h=b&&b.isCompressedTexture;e=b.image[0]&&b.image[0].isDataTexture;for(var q=[],t=0;6>t;t++)q[t]=h||e?e?b.image[t].image:b.image[t]:l(b.image[t],!1,!0,G);var u=q[0],v=m(u)||na,n=f.convert(b.format),w=f.convert(b.type),z=k(n,w);L(34067,b,v);if(h){for(t=0;6>t;t++){var B=q[t].mipmaps;for(h=0;h<B.length;h++){var x=B[h];1023!==b.format&&1022!==b.format?null!==n?c.compressedTexImage2D(34069+
|
|
|
-t,h,z,x.width,x.height,0,x.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):c.texImage2D(34069+t,h,z,x.width,x.height,0,n,w,x.data)}}g.__maxMipLevel=B.length-1}else{B=b.mipmaps;for(t=0;6>t;t++)if(e)for(c.texImage2D(34069+t,0,z,q[t].width,q[t].height,0,n,w,q[t].data),h=0;h<B.length;h++)x=B[h],x=x.image[t].image,c.texImage2D(34069+t,h+1,z,x.width,x.height,0,n,w,x.data);else for(c.texImage2D(34069+t,0,z,n,w,q[t]),h=0;h<B.length;h++)x=
|
|
|
-B[h],c.texImage2D(34069+t,h+1,z,n,w,x.image[t]);g.__maxMipLevel=B.length}p(b,v)&&r(34067,b,u.width,u.height);g.__version=b.version;if(b.onUpdate)b.onUpdate(b)}else c.activeTexture(33984+e),c.bindTexture(34067,g.__webglTexture)}}function x(a,b){c.activeTexture(33984+b);c.bindTexture(34067,d.get(a).__webglTexture)}function L(c,f,g){g?(a.texParameteri(c,10242,Q[f.wrapS]),a.texParameteri(c,10243,Q[f.wrapT]),32879!==c&&35866!==c||a.texParameteri(c,32882,Q[f.wrapR]),a.texParameteri(c,10240,da[f.magFilter]),
|
|
|
+if(a.isVideoTexture){var f=g.render.frame;A.get(a)!==f&&(A.set(a,f),a.update())}if(0<a.version&&e.__version!==a.version)if(f=a.image,void 0===f)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(!1===f.complete)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{x(e,a,b);return}c.activeTexture(33984+b);c.bindTexture(3553,e.__webglTexture)}function w(b,e){if(6===b.image.length){var g=d.get(b);if(0<b.version&&g.__version!==
|
|
|
+b.version){K(g,b);c.activeTexture(33984+e);c.bindTexture(34067,g.__webglTexture);a.pixelStorei(37440,b.flipY);var h=b&&b.isCompressedTexture;e=b.image[0]&&b.image[0].isDataTexture;for(var q=[],t=0;6>t;t++)q[t]=h||e?e?b.image[t].image:b.image[t]:l(b.image[t],!1,!0,G);var u=q[0],v=m(u)||na,n=f.convert(b.format),x=f.convert(b.type),w=k(n,x);L(34067,b,v);if(h){for(t=0;6>t;t++){var B=q[t].mipmaps;for(h=0;h<B.length;h++){var y=B[h];1023!==b.format&&1022!==b.format?null!==n?c.compressedTexImage2D(34069+
|
|
|
+t,h,w,y.width,y.height,0,y.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):c.texImage2D(34069+t,h,w,y.width,y.height,0,n,x,y.data)}}g.__maxMipLevel=B.length-1}else{B=b.mipmaps;for(t=0;6>t;t++)if(e)for(c.texImage2D(34069+t,0,w,q[t].width,q[t].height,0,n,x,q[t].data),h=0;h<B.length;h++)y=B[h],y=y.image[t].image,c.texImage2D(34069+t,h+1,w,y.width,y.height,0,n,x,y.data);else for(c.texImage2D(34069+t,0,w,n,x,q[t]),h=0;h<B.length;h++)y=
|
|
|
+B[h],c.texImage2D(34069+t,h+1,w,n,x,y.image[t]);g.__maxMipLevel=B.length}p(b,v)&&r(34067,b,u.width,u.height);g.__version=b.version;if(b.onUpdate)b.onUpdate(b)}else c.activeTexture(33984+e),c.bindTexture(34067,g.__webglTexture)}}function y(a,b){c.activeTexture(33984+b);c.bindTexture(34067,d.get(a).__webglTexture)}function L(c,f,g){g?(a.texParameteri(c,10242,Q[f.wrapS]),a.texParameteri(c,10243,Q[f.wrapT]),32879!==c&&35866!==c||a.texParameteri(c,32882,Q[f.wrapR]),a.texParameteri(c,10240,da[f.magFilter]),
|
|
|
a.texParameteri(c,10241,da[f.minFilter])):(a.texParameteri(c,10242,33071),a.texParameteri(c,10243,33071),32879!==c&&35866!==c||a.texParameteri(c,32882,33071),1001===f.wrapS&&1001===f.wrapT||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),a.texParameteri(c,10240,u(f.magFilter)),a.texParameteri(c,10241,u(f.minFilter)),1003!==f.minFilter&&1006!==f.minFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter."));
|
|
|
!(g=b.get("EXT_texture_filter_anisotropic"))||1015===f.type&&null===b.get("OES_texture_float_linear")||1016===f.type&&null===(na||b.get("OES_texture_half_float_linear"))||!(1<f.anisotropy||d.get(f).__currentAnisotropy)||(a.texParameterf(c,g.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(f.anisotropy,e.getMaxAnisotropy())),d.get(f).__currentAnisotropy=f.anisotropy)}function K(b,c){void 0===b.__webglInit&&(b.__webglInit=!0,c.addEventListener("dispose",q),b.__webglTexture=a.createTexture(),g.memory.textures++)}
|
|
|
-function z(b,d,e){var g=3553;d.isDataTexture2DArray&&(g=35866);d.isDataTexture3D&&(g=32879);K(b,d);c.activeTexture(33984+e);c.bindTexture(g,b.__webglTexture);a.pixelStorei(37440,d.flipY);a.pixelStorei(37441,d.premultiplyAlpha);a.pixelStorei(3317,d.unpackAlignment);e=na?!1:1001!==d.wrapS||1001!==d.wrapT||1003!==d.minFilter&&1006!==d.minFilter;e=e&&!1===m(d.image);e=l(d.image,e,!1,F);var h=m(e)||na,t=f.convert(d.format),q=f.convert(d.type),u=k(t,q);L(g,d,h);var v=d.mipmaps;if(d.isDepthTexture){u=6402;
|
|
|
+function x(b,d,e){var g=3553;d.isDataTexture2DArray&&(g=35866);d.isDataTexture3D&&(g=32879);K(b,d);c.activeTexture(33984+e);c.bindTexture(g,b.__webglTexture);a.pixelStorei(37440,d.flipY);a.pixelStorei(37441,d.premultiplyAlpha);a.pixelStorei(3317,d.unpackAlignment);e=na?!1:1001!==d.wrapS||1001!==d.wrapT||1003!==d.minFilter&&1006!==d.minFilter;e=e&&!1===m(d.image);e=l(d.image,e,!1,F);var h=m(e)||na,t=f.convert(d.format),q=f.convert(d.type),u=k(t,q);L(g,d,h);var v=d.mipmaps;if(d.isDepthTexture){u=6402;
|
|
|
if(1015===d.type){if(!1===na)throw Error("Float Depth Texture only supported in WebGL2.0");u=36012}else na&&(u=33189);1026===d.format&&6402===u&&1012!==d.type&&1014!==d.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),d.type=1012,q=f.convert(d.type));1027===d.format&&(u=34041,1020!==d.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),d.type=1020,q=f.convert(d.type)));c.texImage2D(3553,
|
|
|
-0,u,e.width,e.height,0,t,q,null)}else if(d.isDataTexture)if(0<v.length&&h){for(var n=0,w=v.length;n<w;n++)g=v[n],c.texImage2D(3553,n,u,g.width,g.height,0,t,q,g.data);d.generateMipmaps=!1;b.__maxMipLevel=v.length-1}else c.texImage2D(3553,0,u,e.width,e.height,0,t,q,e.data),b.__maxMipLevel=0;else if(d.isCompressedTexture){n=0;for(w=v.length;n<w;n++)g=v[n],1023!==d.format&&1022!==d.format?null!==t?c.compressedTexImage2D(3553,n,u,g.width,g.height,0,g.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):
|
|
|
-c.texImage2D(3553,n,u,g.width,g.height,0,t,q,g.data);b.__maxMipLevel=v.length-1}else if(d.isDataTexture2DArray)c.texImage3D(35866,0,u,e.width,e.height,e.depth,0,t,q,e.data),b.__maxMipLevel=0;else if(d.isDataTexture3D)c.texImage3D(32879,0,u,e.width,e.height,e.depth,0,t,q,e.data),b.__maxMipLevel=0;else if(0<v.length&&h){n=0;for(w=v.length;n<w;n++)g=v[n],c.texImage2D(3553,n,u,t,q,g);d.generateMipmaps=!1;b.__maxMipLevel=v.length-1}else c.texImage2D(3553,0,u,t,q,e),b.__maxMipLevel=0;p(d,h)&&r(3553,d,e.width,
|
|
|
-e.height);b.__version=d.version;if(d.onUpdate)d.onUpdate(d)}function ya(b,e,g,h){var l=f.convert(e.texture.format),m=f.convert(e.texture.type),p=k(l,m);c.texImage2D(h,0,p,e.width,e.height,0,l,m,null);a.bindFramebuffer(36160,b);a.framebufferTexture2D(36160,g,h,d.get(e.texture).__webglTexture,0);a.bindFramebuffer(36160,null)}function y(b,c,d){a.bindRenderbuffer(36161,b);if(c.depthBuffer&&!c.stencilBuffer)d?(d=D(c),a.renderbufferStorageMultisample(36161,d,33189,c.width,c.height)):a.renderbufferStorage(36161,
|
|
|
+0,u,e.width,e.height,0,t,q,null)}else if(d.isDataTexture)if(0<v.length&&h){for(var n=0,x=v.length;n<x;n++){var w=v[n];c.texImage2D(3553,n,u,w.width,w.height,0,t,q,w.data)}d.generateMipmaps=!1;b.__maxMipLevel=v.length-1}else c.texImage2D(3553,0,u,e.width,e.height,0,t,q,e.data),b.__maxMipLevel=0;else if(d.isCompressedTexture){n=0;for(x=v.length;n<x;n++)w=v[n],1023!==d.format&&1022!==d.format?null!==t?c.compressedTexImage2D(3553,n,u,w.width,w.height,0,w.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):
|
|
|
+c.texImage2D(3553,n,u,w.width,w.height,0,t,q,w.data);b.__maxMipLevel=v.length-1}else if(d.isDataTexture2DArray)c.texImage3D(35866,0,u,e.width,e.height,e.depth,0,t,q,e.data),b.__maxMipLevel=0;else if(d.isDataTexture3D)c.texImage3D(32879,0,u,e.width,e.height,e.depth,0,t,q,e.data),b.__maxMipLevel=0;else if(0<v.length&&h){n=0;for(x=v.length;n<x;n++)w=v[n],c.texImage2D(3553,n,u,t,q,w);d.generateMipmaps=!1;b.__maxMipLevel=v.length-1}else c.texImage2D(3553,0,u,t,q,e),b.__maxMipLevel=0;p(d,h)&&r(g,d,e.width,
|
|
|
+e.height);b.__version=d.version;if(d.onUpdate)d.onUpdate(d)}function ya(b,e,g,h){var l=f.convert(e.texture.format),m=f.convert(e.texture.type),p=k(l,m);c.texImage2D(h,0,p,e.width,e.height,0,l,m,null);a.bindFramebuffer(36160,b);a.framebufferTexture2D(36160,g,h,d.get(e.texture).__webglTexture,0);a.bindFramebuffer(36160,null)}function z(b,c,d){a.bindRenderbuffer(36161,b);if(c.depthBuffer&&!c.stencilBuffer)d?(d=D(c),a.renderbufferStorageMultisample(36161,d,33189,c.width,c.height)):a.renderbufferStorage(36161,
|
|
|
33189,c.width,c.height),a.framebufferRenderbuffer(36160,36096,36161,b);else if(c.depthBuffer&&c.stencilBuffer)d?(d=D(c),a.renderbufferStorageMultisample(36161,d,35056,c.width,c.height)):a.renderbufferStorage(36161,34041,c.width,c.height),a.framebufferRenderbuffer(36160,33306,36161,b);else{b=f.convert(c.texture.format);var e=f.convert(c.texture.type);b=k(b,e);d?(d=D(c),a.renderbufferStorageMultisample(36161,d,b,c.width,c.height)):a.renderbufferStorage(36161,b,c.width,c.height)}a.bindRenderbuffer(36161,
|
|
|
null)}function D(a){return na&&a.isWebGLMultisampleRenderTarget?Math.min(C,a.samples):0}var na=e.isWebGL2,E=e.maxTextures,G=e.maxCubemapSize,F=e.maxTextureSize,C=e.maxSamples,A=new WeakMap,I,M=!1;try{M="undefined"!==typeof OffscreenCanvas&&null!==(new OffscreenCanvas(1,1)).getContext("2d")}catch(Jd){}var O=0,Q={1E3:10497,1001:33071,1002:33648},da={1003:9728,1004:9984,1005:9986,1006:9729,1007:9985,1008:9987},R=!1,N=!1;this.allocateTextureUnit=function(){var a=O;a>=E&&console.warn("THREE.WebGLTextures: Trying to use "+
|
|
|
-a+" texture units while this GPU supports only "+E);O+=1;return a};this.resetTextureUnits=function(){O=0};this.setTexture2D=n;this.setTexture2DArray=function(a,b){var e=d.get(a);0<a.version&&e.__version!==a.version?z(e,a,b):(c.activeTexture(33984+b),c.bindTexture(35866,e.__webglTexture))};this.setTexture3D=function(a,b){var e=d.get(a);0<a.version&&e.__version!==a.version?z(e,a,b):(c.activeTexture(33984+b),c.bindTexture(32879,e.__webglTexture))};this.setTextureCube=w;this.setTextureCubeDynamic=x;this.setupRenderTarget=
|
|
|
-function(e){var h=d.get(e),l=d.get(e.texture);e.addEventListener("dispose",v);l.__webglTexture=a.createTexture();g.memory.textures++;var t=!0===e.isWebGLRenderTargetCube,q=!0===e.isWebGLMultisampleRenderTarget,u=!0===e.isWebGLMultiviewRenderTarget,w=m(e)||na;if(t){h.__webglFramebuffer=[];for(var z=0;6>z;z++)h.__webglFramebuffer[z]=a.createFramebuffer()}else if(h.__webglFramebuffer=a.createFramebuffer(),q)if(na){h.__webglMultisampledFramebuffer=a.createFramebuffer();h.__webglColorRenderbuffer=a.createRenderbuffer();
|
|
|
-a.bindRenderbuffer(36161,h.__webglColorRenderbuffer);q=f.convert(e.texture.format);var B=f.convert(e.texture.type);q=k(q,B);B=D(e);a.renderbufferStorageMultisample(36161,B,q,e.width,e.height);a.bindFramebuffer(36160,h.__webglMultisampledFramebuffer);a.framebufferRenderbuffer(36160,36064,36161,h.__webglColorRenderbuffer);a.bindRenderbuffer(36161,null);e.depthBuffer&&(h.__webglDepthRenderbuffer=a.createRenderbuffer(),y(h.__webglDepthRenderbuffer,e,!0));a.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");
|
|
|
-else if(u){z=e.width;var x=e.height;q=e.numViews;a.bindFramebuffer(36160,h.__webglFramebuffer);var K=b.get("OVR_multiview2");g.memory.textures+=2;B=a.createTexture();a.bindTexture(35866,B);a.texParameteri(35866,10240,9728);a.texParameteri(35866,10241,9728);a.texImage3D(35866,0,32856,z,x,q,0,6408,5121,null);K.framebufferTextureMultiviewOVR(36160,36064,B,0,0,q);var E=a.createTexture();a.bindTexture(35866,E);a.texParameteri(35866,10240,9728);a.texParameteri(35866,10241,9728);a.texImage3D(35866,0,35056,
|
|
|
-z,x,q,0,34041,34042,null);K.framebufferTextureMultiviewOVR(36160,33306,E,0,0,q);x=Array(q);for(z=0;z<q;++z)x[z]=a.createFramebuffer(),a.bindFramebuffer(36160,x[z]),a.framebufferTextureLayer(36160,36064,B,0,z);h.__webglColorTexture=B;h.__webglDepthStencilTexture=E;h.__webglViewFramebuffers=x;a.bindFramebuffer(36160,null);a.bindTexture(35866,null)}if(t){c.bindTexture(34067,l.__webglTexture);L(34067,e.texture,w);for(z=0;6>z;z++)ya(h.__webglFramebuffer[z],e,36064,34069+z);p(e.texture,w)&&r(34067,e.texture,
|
|
|
+a+" texture units while this GPU supports only "+E);O+=1;return a};this.resetTextureUnits=function(){O=0};this.setTexture2D=n;this.setTexture2DArray=function(a,b){var e=d.get(a);0<a.version&&e.__version!==a.version?x(e,a,b):(c.activeTexture(33984+b),c.bindTexture(35866,e.__webglTexture))};this.setTexture3D=function(a,b){var e=d.get(a);0<a.version&&e.__version!==a.version?x(e,a,b):(c.activeTexture(33984+b),c.bindTexture(32879,e.__webglTexture))};this.setTextureCube=w;this.setTextureCubeDynamic=y;this.setupRenderTarget=
|
|
|
+function(e){var h=d.get(e),l=d.get(e.texture);e.addEventListener("dispose",v);l.__webglTexture=a.createTexture();g.memory.textures++;var t=!0===e.isWebGLRenderTargetCube,q=!0===e.isWebGLMultisampleRenderTarget,u=!0===e.isWebGLMultiviewRenderTarget,w=m(e)||na;if(t){h.__webglFramebuffer=[];for(var x=0;6>x;x++)h.__webglFramebuffer[x]=a.createFramebuffer()}else if(h.__webglFramebuffer=a.createFramebuffer(),q)if(na){h.__webglMultisampledFramebuffer=a.createFramebuffer();h.__webglColorRenderbuffer=a.createRenderbuffer();
|
|
|
+a.bindRenderbuffer(36161,h.__webglColorRenderbuffer);q=f.convert(e.texture.format);var B=f.convert(e.texture.type);q=k(q,B);B=D(e);a.renderbufferStorageMultisample(36161,B,q,e.width,e.height);a.bindFramebuffer(36160,h.__webglMultisampledFramebuffer);a.framebufferRenderbuffer(36160,36064,36161,h.__webglColorRenderbuffer);a.bindRenderbuffer(36161,null);e.depthBuffer&&(h.__webglDepthRenderbuffer=a.createRenderbuffer(),z(h.__webglDepthRenderbuffer,e,!0));a.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");
|
|
|
+else if(u){x=e.width;var y=e.height;q=e.numViews;a.bindFramebuffer(36160,h.__webglFramebuffer);var K=b.get("OVR_multiview2");g.memory.textures+=2;B=a.createTexture();a.bindTexture(35866,B);a.texParameteri(35866,10240,9728);a.texParameteri(35866,10241,9728);a.texImage3D(35866,0,32856,x,y,q,0,6408,5121,null);K.framebufferTextureMultiviewOVR(36160,36064,B,0,0,q);var E=a.createTexture();a.bindTexture(35866,E);a.texParameteri(35866,10240,9728);a.texParameteri(35866,10241,9728);a.texImage3D(35866,0,35056,
|
|
|
+x,y,q,0,34041,34042,null);K.framebufferTextureMultiviewOVR(36160,33306,E,0,0,q);y=Array(q);for(x=0;x<q;++x)y[x]=a.createFramebuffer(),a.bindFramebuffer(36160,y[x]),a.framebufferTextureLayer(36160,36064,B,0,x);h.__webglColorTexture=B;h.__webglDepthStencilTexture=E;h.__webglViewFramebuffers=y;a.bindFramebuffer(36160,null);a.bindTexture(35866,null)}if(t){c.bindTexture(34067,l.__webglTexture);L(34067,e.texture,w);for(x=0;6>x;x++)ya(h.__webglFramebuffer[x],e,36064,34069+x);p(e.texture,w)&&r(34067,e.texture,
|
|
|
e.width,e.height);c.bindTexture(34067,null)}else u||(c.bindTexture(3553,l.__webglTexture),L(3553,e.texture,w),ya(h.__webglFramebuffer,e,36064,3553),p(e.texture,w)&&r(3553,e.texture,e.width,e.height),c.bindTexture(3553,null));if(e.depthBuffer){h=d.get(e);l=!0===e.isWebGLRenderTargetCube;if(e.depthTexture){if(l)throw Error("target.depthTexture not supported in Cube render targets");if(e&&e.isWebGLRenderTargetCube)throw Error("Depth Texture with cube render targets is not supported");a.bindFramebuffer(36160,
|
|
|
h.__webglFramebuffer);if(!e.depthTexture||!e.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");d.get(e.depthTexture).__webglTexture&&e.depthTexture.image.width===e.width&&e.depthTexture.image.height===e.height||(e.depthTexture.image.width=e.width,e.depthTexture.image.height=e.height,e.depthTexture.needsUpdate=!0);n(e.depthTexture,0);h=d.get(e.depthTexture).__webglTexture;if(1026===e.depthTexture.format)a.framebufferTexture2D(36160,36096,
|
|
|
-3553,h,0);else if(1027===e.depthTexture.format)a.framebufferTexture2D(36160,33306,3553,h,0);else throw Error("Unknown depthTexture format");}else if(l)for(h.__webglDepthbuffer=[],l=0;6>l;l++)a.bindFramebuffer(36160,h.__webglFramebuffer[l]),h.__webglDepthbuffer[l]=a.createRenderbuffer(),y(h.__webglDepthbuffer[l],e);else a.bindFramebuffer(36160,h.__webglFramebuffer),h.__webglDepthbuffer=a.createRenderbuffer(),y(h.__webglDepthbuffer,e);a.bindFramebuffer(36160,null)}};this.updateRenderTargetMipmap=function(a){var b=
|
|
|
+3553,h,0);else if(1027===e.depthTexture.format)a.framebufferTexture2D(36160,33306,3553,h,0);else throw Error("Unknown depthTexture format");}else if(l)for(h.__webglDepthbuffer=[],l=0;6>l;l++)a.bindFramebuffer(36160,h.__webglFramebuffer[l]),h.__webglDepthbuffer[l]=a.createRenderbuffer(),z(h.__webglDepthbuffer[l],e);else a.bindFramebuffer(36160,h.__webglFramebuffer),h.__webglDepthbuffer=a.createRenderbuffer(),z(h.__webglDepthbuffer,e);a.bindFramebuffer(36160,null)}};this.updateRenderTargetMipmap=function(a){var b=
|
|
|
a.texture,e=m(a)||na;if(p(b,e)){e=a.isWebGLRenderTargetCube?34067:3553;var f=d.get(b).__webglTexture;c.bindTexture(e,f);r(e,b,a.width,a.height);c.bindTexture(e,null)}};this.updateMultisampleRenderTarget=function(b){if(b.isWebGLMultisampleRenderTarget)if(na){var c=d.get(b);a.bindFramebuffer(36008,c.__webglMultisampledFramebuffer);a.bindFramebuffer(36009,c.__webglFramebuffer);c=b.width;var e=b.height,f=16384;b.depthBuffer&&(f|=256);b.stencilBuffer&&(f|=1024);a.blitFramebuffer(0,0,c,e,0,0,c,e,f,9728)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")};
|
|
|
this.safeSetTexture2D=function(a,b){a&&a.isWebGLRenderTarget&&(!1===R&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),R=!0),a=a.texture);n(a,b)};this.safeSetTextureCube=function(a,b){a&&a.isWebGLRenderTargetCube&&(!1===N&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),N=!0),a=a.texture);a&&a.isCubeTexture||Array.isArray(a.image)&&
|
|
|
-6===a.image.length?w(a,b):x(a,b)}}function Ph(a,b,c){var d=c.isWebGL2;return{convert:function(a){if(1009===a)return 5121;if(1017===a)return 32819;if(1018===a)return 32820;if(1019===a)return 33635;if(1010===a)return 5120;if(1011===a)return 5122;if(1012===a)return 5123;if(1013===a)return 5124;if(1014===a)return 5125;if(1015===a)return 5126;if(1016===a){if(d)return 5131;var c=b.get("OES_texture_half_float");return null!==c?c.HALF_FLOAT_OES:null}if(1021===a)return 6406;if(1022===a)return 6407;if(1023===
|
|
|
+6===a.image.length?w(a,b):y(a,b)}}function Ph(a,b,c){var d=c.isWebGL2;return{convert:function(a){if(1009===a)return 5121;if(1017===a)return 32819;if(1018===a)return 32820;if(1019===a)return 33635;if(1010===a)return 5120;if(1011===a)return 5122;if(1012===a)return 5123;if(1013===a)return 5124;if(1014===a)return 5125;if(1015===a)return 5126;if(1016===a){if(d)return 5131;var c=b.get("OES_texture_half_float");return null!==c?c.HALF_FLOAT_OES:null}if(1021===a)return 6406;if(1022===a)return 6407;if(1023===
|
|
|
a)return 6408;if(1024===a)return 6409;if(1025===a)return 6410;if(1026===a)return 6402;if(1027===a)return 34041;if(1028===a)return 6403;if(33776===a||33777===a||33778===a||33779===a)if(c=b.get("WEBGL_compressed_texture_s3tc"),null!==c){if(33776===a)return c.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===a)return c.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===a)return c.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===a)return c.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(35840===a||35841===a||35842===a||35843===
|
|
|
a)if(c=b.get("WEBGL_compressed_texture_pvrtc"),null!==c){if(35840===a)return c.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===a)return c.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===a)return c.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===a)return c.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(36196===a)return c=b.get("WEBGL_compressed_texture_etc1"),null!==c?c.COMPRESSED_RGB_ETC1_WEBGL:null;if(37808===a||37809===a||37810===a||37811===a||37812===a||37813===a||37814===a||37815===a||37816===a||37817===
|
|
|
a||37818===a||37819===a||37820===a||37821===a)return c=b.get("WEBGL_compressed_texture_astc"),null!==c?a:null;if(1020===a){if(d)return 34042;c=b.get("WEBGL_depth_texture");return null!==c?c.UNSIGNED_INT_24_8_WEBGL:null}}}}function og(a,b,c,d){ia.call(this,a,b,d);this.stencilBuffer=this.depthBuffer=!1;this.numViews=c}function pk(a,b){function c(a){if(a.isArrayCamera)return a.cameras;p[0]=a;return p}function d(a){if(void 0===a.isArrayCamera)return!0;a=a.cameras;if(a.length>u)return!1;for(var b=1,c=
|
|
|
-a.length;b<c;b++)if(a[0].viewport.z!==a[b].viewport.z||a[0].viewport.w!==a[b].viewport.w)return!1;return!0}var e=a.extensions,f=a.properties,g,h,l,m,p,r,k,u=0;this.isAvailable=function(){if(void 0===k){var a=e.get("OVR_multiview2");if(k=null!==a&&!1===b.getContextAttributes().antialias)for(u=b.getParameter(a.MAX_VIEWS_OVR),g=new og(0,0,2),r=new y,m=[],l=[],p=[],a=0;a<u;a++)m[a]=new R,l[a]=new ca}return k};this.attachCamera=function(b){if(!1!==d(b)){(h=a.getRenderTarget())?r.set(h.width,h.height):
|
|
|
+a.length;b<c;b++)if(a[0].viewport.z!==a[b].viewport.z||a[0].viewport.w!==a[b].viewport.w)return!1;return!0}var e=a.extensions,f=a.properties,g,h,l,m,p,r,k,u=0;this.isAvailable=function(){if(void 0===k){var a=e.get("OVR_multiview2");if(k=null!==a&&!1===b.getContextAttributes().antialias)for(u=b.getParameter(a.MAX_VIEWS_OVR),g=new og(0,0,2),r=new z,m=[],l=[],p=[],a=0;a<u;a++)m[a]=new R,l[a]=new ca}return k};this.attachCamera=function(b){if(!1!==d(b)){(h=a.getRenderTarget())?r.set(h.width,h.height):
|
|
|
a.getDrawingBufferSize(r);if(b.isArrayCamera){var c=b.cameras[0].viewport;g.setSize(c.z,c.w);g.setNumViews(b.cameras.length)}else g.setSize(r.x,r.y),g.setNumViews(2);a.setRenderTarget(g)}};this.detachCamera=function(c){if(g===a.getRenderTarget()){a.setRenderTarget(h);var d=g,e=d.numViews,l=f.get(d).__webglViewFramebuffers,m=d.width;d=d.height;if(c.isArrayCamera)for(var p=0;p<e;p++){var k=c.cameras[p].viewport,t=k.x,q=k.y,u=t+k.z;k=q+k.w;b.bindFramebuffer(36008,l[p]);b.blitFramebuffer(0,0,m,d,t,q,
|
|
|
u,k,16384,9728)}else b.bindFramebuffer(36008,l[0]),b.blitFramebuffer(0,0,m,d,0,0,r.x,r.y,16384,9728)}};this.updateCameraProjectionMatricesUniform=function(a,d){a=c(a);for(var e=0;e<a.length;e++)m[e].copy(a[e].projectionMatrix);d.setValue(b,"projectionMatrices",m)};this.updateCameraViewMatricesUniform=function(a,d){a=c(a);for(var e=0;e<a.length;e++)m[e].copy(a[e].matrixWorldInverse);d.setValue(b,"viewMatrices",m)};this.updateObjectMatricesUniforms=function(a,d,e){d=c(d);for(var f=0;f<d.length;f++)m[f].multiplyMatrices(d[f].matrixWorldInverse,
|
|
|
a.matrixWorld),l[f].getNormalMatrix(m[f]);e.setValue(b,"modelViewMatrices",m);e.setValue(b,"normalMatrices",l)}}function Te(a){ja.call(this);this.cameras=a||[]}function Kd(){F.call(this);this.type="Group"}function Qh(a,b){function c(a){for(var b=0;b<k.length;b++)u[b]===a.inputSource&&k[b].dispatchEvent({type:a.type})}function d(){a.setFramebuffer(null);a.setRenderTarget(a.getRenderTarget());K.stop();h.dispatchEvent({type:"sessionend"})}function e(a){m=a;K.setContext(l);K.start();h.dispatchEvent({type:"sessionstart"})}
|
|
|
function f(){for(var a=0;a<k.length;a++){var b=a;a:{var c=l.inputSources;for(var d=0;d<c.length;d++){var e=c[d],f=e.handedness;if(0===a&&("none"===f||"right"===f)){c=e;break a}if(1===a&&"left"===f){c=e;break a}}c=void 0}u[b]=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,l=null,m=null,p="local-floor",r=null,k=[],u=[],q=new ja;q.layers.enable(1);q.viewport=new fa;var v=new ja;
|
|
|
v.layers.enable(2);v.viewport=new fa;var B=new Te([q,v]);B.layers.enable(1);B.layers.enable(2);this.enabled=!1;this.getController=function(a){var b=k[a];void 0===b&&(b=new Kd,b.matrixAutoUpdate=!1,b.visible=!1,k[a]=b);return b};this.setFramebufferScaleFactor=function(){};this.setReferenceSpaceType=function(a){p=a};this.getSession=function(){return l};this.setSession=function(a){l=a;null!==l&&(l.addEventListener("select",c),l.addEventListener("selectstart",c),l.addEventListener("selectend",c),l.addEventListener("squeeze",
|
|
|
-c),l.addEventListener("squeezestart",c),l.addEventListener("squeezeend",c),l.addEventListener("end",d),l.updateRenderState({baseLayer:new XRWebGLLayer(l,b)}),l.requestReferenceSpace(p).then(e),l.addEventListener("inputsourceschange",f),f())};var w=new n,x=new n;this.getCamera=function(a){var b=a.parent,c=B.cameras;g(B,b);for(var d=0;d<c.length;d++)g(c[d],b);a.matrixWorld.copy(B.matrixWorld);a=a.children;d=0;for(b=a.length;d<b;d++)a[d].updateMatrixWorld(!0);w.setFromMatrixPosition(q.matrixWorld);x.setFromMatrixPosition(v.matrixWorld);
|
|
|
-d=w.distanceTo(x);var e=q.projectionMatrix.elements,f=v.projectionMatrix.elements,h=e[14]/(e[10]-1);a=e[14]/(e[10]+1);b=(e[9]+1)/e[5];c=(e[9]-1)/e[5];var l=(e[8]-1)/e[0],m=(f[8]+1)/f[0];f=h*l;e=h*m;m=d/(-l+m);l=m*-l;q.matrixWorld.decompose(B.position,B.quaternion,B.scale);B.translateX(l);B.translateZ(m);B.matrixWorld.compose(B.position,B.quaternion,B.scale);B.matrixWorldInverse.getInverse(B.matrixWorld);h+=m;m=a+m;B.projectionMatrix.makePerspective(f-l,e+(d-l),b*a/m*h,c*a/m*h,h,m);return B};this.isPresenting=
|
|
|
-function(){return null!==l&&null!==m};var L=null,K=new sh;K.setAnimationLoop(function(b,c){r=c.getViewerPose(m);if(null!==r){var d=r.views,e=l.renderState.baseLayer;a.setFramebuffer(e.framebuffer);for(var f=0;f<d.length;f++){var g=d[f],h=e.getViewport(g),p=B.cameras[f];p.matrix.fromArray(g.transform.inverse.matrix).getInverse(p.matrix);p.projectionMatrix.fromArray(g.projectionMatrix);p.viewport.set(h.x,h.y,h.width,h.height);0===f&&B.matrix.copy(p.matrix)}}for(f=0;f<k.length;f++){d=k[f];if(e=u[f])if(e=
|
|
|
-c.getPose(e.targetRaySpace,m),null!==e){d.matrix.fromArray(e.transform.matrix);d.matrix.decompose(d.position,d.rotation,d.scale);d.visible=!0;continue}d.visible=!1}L&&L(b,c)});this.setAnimationLoop=function(a){L=a};this.dispose=function(){}}function pg(a){var b;function c(){qa=new fj(H);Fa=new dj(H,qa,a);!1===Fa.isWebGL2&&(qa.get("WEBGL_depth_texture"),qa.get("OES_texture_float"),qa.get("OES_texture_half_float"),qa.get("OES_texture_half_float_linear"),qa.get("OES_standard_derivatives"),qa.get("OES_element_index_uint"),
|
|
|
-qa.get("ANGLE_instanced_arrays"));qa.get("OES_texture_float_linear");la=new Ph(H,qa,Fa);Z=new nk(H,qa,Fa);Z.scissor(X.copy(ba).multiplyScalar(U).floor());Z.viewport(eb.copy(V).multiplyScalar(U).floor());ea=new ij(H);Ga=new ek;ca=new ok(H,qa,Z,Ga,Fa,la,ea);ja=new aj(H);va=new gj(H,ja,ea);ra=new lj(H,va,ja,ea);za=new kj(H);oa=new dk(A,qa,Fa);xa=new hk;ta=new mk;ma=new bj(A,Z,ra,z);Ba=new cj(H,qa,ea,Fa);Ca=new hj(H,qa,ea,Fa);ea.programs=oa.programs;A.capabilities=Fa;A.extensions=qa;A.properties=Ga;A.renderLists=
|
|
|
-xa;A.state=Z;A.info=ea}function d(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");I=!0}function e(){console.log("THREE.WebGLRenderer: Context Restored.");I=!1;c()}function f(a){a=a.target;a.removeEventListener("dispose",f);g(a);Ga.remove(a)}function g(a){var b=Ga.get(a).program;a.program=void 0;void 0!==b&&oa.releaseProgram(b)}function h(a,b){a.render(function(a){A.renderBufferImmediate(a,b)})}function l(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)E.pushLight(a),a.castShadow&&E.pushShadow(a);else if(a.isSprite){if(!a.frustumCulled||sa.intersectsSprite(a)){d&&Fb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(ka);var e=ra.update(a),f=a.material;f.visible&&C.push(a,e,f,c,Fb.z,null)}}else if(a.isImmediateRenderObject)d&&Fb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(ka),C.push(a,null,a.material,c,Fb.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&
|
|
|
-a.skeleton.frame!==ea.render.frame&&(a.skeleton.update(),a.skeleton.frame=ea.render.frame),!a.frustumCulled||sa.intersectsObject(a))if(d&&Fb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(ka),e=ra.update(a),f=a.material,Array.isArray(f))for(var g=e.groups,h=0,m=g.length;h<m;h++){var p=g[h],r=f[p.materialIndex];r&&r.visible&&C.push(a,e,r,c,Fb.z,p)}else f.visible&&C.push(a,e,f,c,Fb.z,null);a=a.children;h=0;for(m=a.length;h<m;h++)l(a[h],b,c,d)}}function m(a,b,c,d){for(var e=0,f=a.length;e<f;e++){var g=
|
|
|
-a[e],h=g.object,l=g.geometry,m=void 0===d?g.material:d;g=g.group;if(c.isArrayCamera)if(T=c,ia.enabled&&ua.isAvailable())p(h,b,c,l,m,g);else for(var r=c.cameras,k=0,t=r.length;k<t;k++){var q=r[k];h.layers.test(q.layers)&&(Z.viewport(eb.copy(q.viewport)),E.setupLights(q),p(h,b,q,l,m,g))}else T=null,p(h,b,c,l,m,g)}}function p(a,c,d,e,f,g){a.onBeforeRender(A,c,d,e,f,g);E=ta.get(c,T||d);a.modelViewMatrix.multiplyMatrices(d.matrixWorldInverse,a.matrixWorld);a.normalMatrix.getNormalMatrix(a.modelViewMatrix);
|
|
|
-if(a.isImmediateRenderObject){var l=k(d,c.fog,f,a);Z.setMaterial(f);da=b=null;Se=!1;h(a,l)}else A.renderBufferDirect(d,c.fog,e,f,a,g);a.onAfterRender(A,c,d,e,f,g);E=ta.get(c,T||d)}function r(a,b,c){var d=Ga.get(a),e=E.state.lights,h=e.state.version;c=oa.getParameters(a,e.state,E.state.shadowsArray,b,ha.numPlanes,ha.numIntersection,c);var l=oa.getProgramCacheKey(a,c),m=d.program,p=!0;if(void 0===m)a.addEventListener("dispose",f);else if(m.cacheKey!==l)g(a);else{if(d.lightsStateVersion!==h)d.lightsStateVersion=
|
|
|
-h;else if(void 0!==c.shaderID)return;p=!1}p&&(c.shaderID?(l=db[c.shaderID],d.shader={name:a.type,uniforms:Yb(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}):d.shader={name:a.type,uniforms:a.uniforms,vertexShader:a.vertexShader,fragmentShader:a.fragmentShader},a.onBeforeCompile(d.shader,A),l=oa.getProgramCacheKey(a,c),m=oa.acquireProgram(a,d.shader,c,l),d.program=m,d.outputEncoding=A.outputEncoding,a.program=m);c=m.getAttributes();if(a.morphTargets)for(l=a.numSupportedMorphTargets=
|
|
|
-0;l<A.maxMorphTargets;l++)0<=c["morphTarget"+l]&&a.numSupportedMorphTargets++;if(a.morphNormals)for(l=a.numSupportedMorphNormals=0;l<A.maxMorphNormals;l++)0<=c["morphNormal"+l]&&a.numSupportedMorphNormals++;c=d.shader.uniforms;if(!a.isShaderMaterial&&!a.isRawShaderMaterial||!0===a.clipping)d.numClippingPlanes=ha.numPlanes,d.numIntersection=ha.numIntersection,c.clippingPlanes=ha.uniform;d.fog=b;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.spotLights.value=e.state.spot,c.rectAreaLights.value=e.state.rectArea,c.pointLights.value=e.state.point,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=Cb.seqWithValue(a.seq,c);d.uniformsList=a}function k(a,b,c,d){ca.resetTextureUnits();var e=Ga.get(c),f=E.state.lights;Qe&&(mg||a!==S)&&ha.setState(c.clippingPlanes,c.clipIntersection,c.clipShadows,a,e,a===S&&c.id===Re);c.version===e.__version&&(void 0===e.program?c.needsUpdate=!0:c.fog&&e.fog!==b?c.needsUpdate=
|
|
|
-!0:e.needsLights&&e.lightsStateVersion!==f.state.version?c.needsUpdate=!0:void 0===e.numClippingPlanes||e.numClippingPlanes===ha.numPlanes&&e.numIntersection===ha.numIntersection?e.outputEncoding!==A.outputEncoding&&(c.needsUpdate=!0):c.needsUpdate=!0);c.version!==e.__version&&(r(c,b,d),e.__version=c.version);var g=!1,h=!1,l=!1;f=e.program;var m=f.getUniforms(),p=e.shader.uniforms;Z.useProgram(f.program)&&(l=h=g=!0);c.id!==Re&&(Re=c.id,h=!0);if(g||S!==a){0<f.numMultiviewViews?ua.updateCameraProjectionMatricesUniform(a,
|
|
|
-m):m.setValue(H,"projectionMatrix",a.projectionMatrix);Fa.logarithmicDepthBuffer&&m.setValue(H,"logDepthBufFC",2/(Math.log(a.far+1)/Math.LN2));S!==a&&(S=a,l=h=!0);if(c.isShaderMaterial||c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshStandardMaterial||c.envMap)g=m.map.cameraPosition,void 0!==g&&g.setValue(H,Fb.setFromMatrixPosition(a.matrixWorld));(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial)&&m.setValue(H,
|
|
|
-"isOrthographic",!0===a.isOrthographicCamera);if(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial||c.skinning)0<f.numMultiviewViews?ua.updateCameraViewMatricesUniform(a,m):m.setValue(H,"viewMatrix",a.matrixWorldInverse)}if(c.skinning&&(m.setOptional(H,d,"bindMatrix"),m.setOptional(H,d,"bindMatrixInverse"),g=d.skeleton)){var k=g.bones;if(Fa.floatVertexTextures){if(void 0===g.boneTexture){k=Math.sqrt(4*k.length);
|
|
|
-k=P.ceilPowerOfTwo(k);k=Math.max(k,4);var t=new Float32Array(k*k*4);t.set(g.boneMatrices);var v=new Zb(t,k,k,1023,1015);g.boneMatrices=t;g.boneTexture=v;g.boneTextureSize=k}m.setValue(H,"boneTexture",g.boneTexture,ca);m.setValue(H,"boneTextureSize",g.boneTextureSize)}else m.setOptional(H,g,"boneMatrices")}if(h||e.receiveShadow!==d.receiveShadow)e.receiveShadow=d.receiveShadow,m.setValue(H,"receiveShadow",d.receiveShadow);if(h){m.setValue(H,"toneMappingExposure",A.toneMappingExposure);m.setValue(H,
|
|
|
-"toneMappingWhitePoint",A.toneMappingWhitePoint);e.needsLights&&(h=l,p.ambientLightColor.needsUpdate=h,p.lightProbe.needsUpdate=h,p.directionalLights.needsUpdate=h,p.pointLights.needsUpdate=h,p.spotLights.needsUpdate=h,p.rectAreaLights.needsUpdate=h,p.hemisphereLights.needsUpdate=h);b&&c.fog&&(p.fogColor.value.copy(b.color),b.isFog?(p.fogNear.value=b.near,p.fogFar.value=b.far):b.isFogExp2&&(p.fogDensity.value=b.density));if(c.isMeshBasicMaterial)u(p,c);else if(c.isMeshLambertMaterial)u(p,c),c.emissiveMap&&
|
|
|
-(p.emissiveMap.value=c.emissiveMap);else if(c.isMeshToonMaterial)u(p,c),p.specular.value.copy(c.specular),p.shininess.value=Math.max(c.shininess,1E-4),c.gradientMap&&(p.gradientMap.value=c.gradientMap),c.emissiveMap&&(p.emissiveMap.value=c.emissiveMap),c.bumpMap&&(p.bumpMap.value=c.bumpMap,p.bumpScale.value=c.bumpScale,1===c.side&&(p.bumpScale.value*=-1)),c.normalMap&&(p.normalMap.value=c.normalMap,p.normalScale.value.copy(c.normalScale),1===c.side&&p.normalScale.value.negate()),c.displacementMap&&
|
|
|
-(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias);else if(c.isMeshPhongMaterial)u(p,c),p.specular.value.copy(c.specular),p.shininess.value=Math.max(c.shininess,1E-4),c.emissiveMap&&(p.emissiveMap.value=c.emissiveMap),c.bumpMap&&(p.bumpMap.value=c.bumpMap,p.bumpScale.value=c.bumpScale,1===c.side&&(p.bumpScale.value*=-1)),c.normalMap&&(p.normalMap.value=c.normalMap,p.normalScale.value.copy(c.normalScale),1===c.side&&
|
|
|
-p.normalScale.value.negate()),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias);else if(c.isMeshStandardMaterial)u(p,c),c.isMeshPhysicalMaterial?(q(p,c),p.reflectivity.value=c.reflectivity,p.clearcoat.value=c.clearcoat,p.clearcoatRoughness.value=c.clearcoatRoughness,c.sheen&&p.sheen.value.copy(c.sheen),c.clearcoatNormalMap&&(p.clearcoatNormalScale.value.copy(c.clearcoatNormalScale),p.clearcoatNormalMap.value=
|
|
|
-c.clearcoatNormalMap,1===c.side&&p.clearcoatNormalScale.value.negate()),p.transparency.value=c.transparency):q(p,c);else if(c.isMeshMatcapMaterial)u(p,c),c.matcap&&(p.matcap.value=c.matcap),c.bumpMap&&(p.bumpMap.value=c.bumpMap,p.bumpScale.value=c.bumpScale,1===c.side&&(p.bumpScale.value*=-1)),c.normalMap&&(p.normalMap.value=c.normalMap,p.normalScale.value.copy(c.normalScale),1===c.side&&p.normalScale.value.negate()),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=
|
|
|
-c.displacementScale,p.displacementBias.value=c.displacementBias);else if(c.isMeshDepthMaterial)u(p,c),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias);else if(c.isMeshDistanceMaterial)u(p,c),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias),p.referencePosition.value.copy(c.referencePosition),p.nearDistance.value=
|
|
|
-c.nearDistance,p.farDistance.value=c.farDistance;else if(c.isMeshNormalMaterial)u(p,c),c.bumpMap&&(p.bumpMap.value=c.bumpMap,p.bumpScale.value=c.bumpScale,1===c.side&&(p.bumpScale.value*=-1)),c.normalMap&&(p.normalMap.value=c.normalMap,p.normalScale.value.copy(c.normalScale),1===c.side&&p.normalScale.value.negate()),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias);else if(c.isLineBasicMaterial)p.diffuse.value.copy(c.color),
|
|
|
+c),l.addEventListener("squeezestart",c),l.addEventListener("squeezeend",c),l.addEventListener("end",d),a=b.getContextAttributes(),a=new XRWebGLLayer(l,b,{antialias:a.antialias,alpha:a.alpha,depth:a.depth,stencil:a.stencil}),l.updateRenderState({baseLayer:a}),l.requestReferenceSpace(p).then(e),l.addEventListener("inputsourceschange",f),f())};var w=new n,y=new n;this.getCamera=function(a){var b=a.parent,c=B.cameras;g(B,b);for(var d=0;d<c.length;d++)g(c[d],b);a.matrixWorld.copy(B.matrixWorld);a=a.children;
|
|
|
+d=0;for(b=a.length;d<b;d++)a[d].updateMatrixWorld(!0);w.setFromMatrixPosition(q.matrixWorld);y.setFromMatrixPosition(v.matrixWorld);d=w.distanceTo(y);var e=q.projectionMatrix.elements,f=v.projectionMatrix.elements,h=e[14]/(e[10]-1);a=e[14]/(e[10]+1);b=(e[9]+1)/e[5];c=(e[9]-1)/e[5];var l=(e[8]-1)/e[0],m=(f[8]+1)/f[0];f=h*l;e=h*m;m=d/(-l+m);l=m*-l;q.matrixWorld.decompose(B.position,B.quaternion,B.scale);B.translateX(l);B.translateZ(m);B.matrixWorld.compose(B.position,B.quaternion,B.scale);B.matrixWorldInverse.getInverse(B.matrixWorld);
|
|
|
+h+=m;m=a+m;B.projectionMatrix.makePerspective(f-l,e+(d-l),b*a/m*h,c*a/m*h,h,m);return B};this.isPresenting=function(){return null!==l&&null!==m};var L=null,K=new sh;K.setAnimationLoop(function(b,c){r=c.getViewerPose(m);if(null!==r){var d=r.views,e=l.renderState.baseLayer;a.setFramebuffer(e.framebuffer);for(var f=0;f<d.length;f++){var g=d[f],h=e.getViewport(g),p=B.cameras[f];p.matrix.fromArray(g.transform.inverse.matrix).getInverse(p.matrix);p.projectionMatrix.fromArray(g.projectionMatrix);p.viewport.set(h.x,
|
|
|
+h.y,h.width,h.height);0===f&&B.matrix.copy(p.matrix)}}for(f=0;f<k.length;f++){d=k[f];if(e=u[f])if(e=c.getPose(e.targetRaySpace,m),null!==e){d.matrix.fromArray(e.transform.matrix);d.matrix.decompose(d.position,d.rotation,d.scale);d.visible=!0;continue}d.visible=!1}L&&L(b,c)});this.setAnimationLoop=function(a){L=a};this.dispose=function(){}}function pg(a){var b;function c(){qa=new fj(H);Fa=new dj(H,qa,a);!1===Fa.isWebGL2&&(qa.get("WEBGL_depth_texture"),qa.get("OES_texture_float"),qa.get("OES_texture_half_float"),
|
|
|
+qa.get("OES_texture_half_float_linear"),qa.get("OES_standard_derivatives"),qa.get("OES_element_index_uint"),qa.get("ANGLE_instanced_arrays"));qa.get("OES_texture_float_linear");la=new Ph(H,qa,Fa);Z=new nk(H,qa,Fa);Z.scissor(X.copy(ba).multiplyScalar(U).floor());Z.viewport(eb.copy(V).multiplyScalar(U).floor());ea=new ij(H);Ga=new ek;ca=new ok(H,qa,Z,Ga,Fa,la,ea);ja=new aj(H);va=new gj(H,ja,ea);ra=new lj(H,va,ja,ea);za=new kj(H);oa=new dk(A,qa,Fa);xa=new hk;ta=new mk;ma=new bj(A,Z,ra,x);Ba=new cj(H,
|
|
|
+qa,ea,Fa);Ca=new hj(H,qa,ea,Fa);ea.programs=oa.programs;A.capabilities=Fa;A.extensions=qa;A.properties=Ga;A.renderLists=xa;A.state=Z;A.info=ea}function d(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");I=!0}function e(){console.log("THREE.WebGLRenderer: Context Restored.");I=!1;c()}function f(a){a=a.target;a.removeEventListener("dispose",f);g(a);Ga.remove(a)}function g(a){var b=Ga.get(a).program;a.program=void 0;void 0!==b&&oa.releaseProgram(b)}function h(a,b){a.render(function(a){A.renderBufferImmediate(a,
|
|
|
+b)})}function l(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)E.pushLight(a),a.castShadow&&E.pushShadow(a);else if(a.isSprite){if(!a.frustumCulled||sa.intersectsSprite(a)){d&&Fb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(ka);var e=ra.update(a),f=a.material;f.visible&&C.push(a,e,f,c,Fb.z,null)}}else if(a.isImmediateRenderObject)d&&Fb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(ka),C.push(a,
|
|
|
+null,a.material,c,Fb.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&a.skeleton.frame!==ea.render.frame&&(a.skeleton.update(),a.skeleton.frame=ea.render.frame),!a.frustumCulled||sa.intersectsObject(a))if(d&&Fb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(ka),e=ra.update(a),f=a.material,Array.isArray(f))for(var g=e.groups,h=0,m=g.length;h<m;h++){var p=g[h],r=f[p.materialIndex];r&&r.visible&&C.push(a,e,r,c,Fb.z,p)}else f.visible&&C.push(a,e,f,c,Fb.z,null);a=a.children;h=0;for(m=
|
|
|
+a.length;h<m;h++)l(a[h],b,c,d)}}function m(a,b,c,d){for(var e=0,f=a.length;e<f;e++){var g=a[e],h=g.object,l=g.geometry,m=void 0===d?g.material:d;g=g.group;if(c.isArrayCamera)if(T=c,ia.enabled&&ua.isAvailable())p(h,b,c,l,m,g);else for(var r=c.cameras,k=0,t=r.length;k<t;k++){var q=r[k];h.layers.test(q.layers)&&(Z.viewport(eb.copy(q.viewport)),E.setupLights(q),p(h,b,q,l,m,g))}else T=null,p(h,b,c,l,m,g)}}function p(a,c,d,e,f,g){a.onBeforeRender(A,c,d,e,f,g);E=ta.get(c,T||d);a.modelViewMatrix.multiplyMatrices(d.matrixWorldInverse,
|
|
|
+a.matrixWorld);a.normalMatrix.getNormalMatrix(a.modelViewMatrix);if(a.isImmediateRenderObject){var l=k(d,c.fog,f,a);Z.setMaterial(f);da=b=null;Se=!1;h(a,l)}else A.renderBufferDirect(d,c.fog,e,f,a,g);a.onAfterRender(A,c,d,e,f,g);E=ta.get(c,T||d)}function r(a,b,c){var d=Ga.get(a),e=E.state.lights,h=e.state.version;c=oa.getParameters(a,e.state,E.state.shadowsArray,b,ha.numPlanes,ha.numIntersection,c);var l=oa.getProgramCacheKey(a,c),m=d.program,p=!0;if(void 0===m)a.addEventListener("dispose",f);else if(m.cacheKey!==
|
|
|
+l)g(a);else{if(d.lightsStateVersion!==h)d.lightsStateVersion=h;else if(void 0!==c.shaderID)return;p=!1}p&&(c.shaderID?(l=db[c.shaderID],d.shader={name:a.type,uniforms:Yb(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}):d.shader={name:a.type,uniforms:a.uniforms,vertexShader:a.vertexShader,fragmentShader:a.fragmentShader},a.onBeforeCompile(d.shader,A),l=oa.getProgramCacheKey(a,c),m=oa.acquireProgram(a,d.shader,c,l),d.program=m,d.outputEncoding=A.outputEncoding,a.program=m);
|
|
|
+c=m.getAttributes();if(a.morphTargets)for(l=a.numSupportedMorphTargets=0;l<A.maxMorphTargets;l++)0<=c["morphTarget"+l]&&a.numSupportedMorphTargets++;if(a.morphNormals)for(l=a.numSupportedMorphNormals=0;l<A.maxMorphNormals;l++)0<=c["morphNormal"+l]&&a.numSupportedMorphNormals++;c=d.shader.uniforms;if(!a.isShaderMaterial&&!a.isRawShaderMaterial||!0===a.clipping)d.numClippingPlanes=ha.numPlanes,d.numIntersection=ha.numIntersection,c.clippingPlanes=ha.uniform;d.fog=b;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.spotLights.value=e.state.spot,c.rectAreaLights.value=e.state.rectArea,c.pointLights.value=e.state.point,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=Cb.seqWithValue(a.seq,c);d.uniformsList=a}function k(a,b,c,d){ca.resetTextureUnits();var e=Ga.get(c),f=E.state.lights;Qe&&(mg||a!==S)&&ha.setState(c.clippingPlanes,c.clipIntersection,c.clipShadows,a,e,a===S&&c.id===Re);c.version===e.__version&&(void 0===
|
|
|
+e.program?c.needsUpdate=!0:c.fog&&e.fog!==b?c.needsUpdate=!0:e.needsLights&&e.lightsStateVersion!==f.state.version?c.needsUpdate=!0:void 0===e.numClippingPlanes||e.numClippingPlanes===ha.numPlanes&&e.numIntersection===ha.numIntersection?e.outputEncoding!==A.outputEncoding&&(c.needsUpdate=!0):c.needsUpdate=!0);c.version!==e.__version&&(r(c,b,d),e.__version=c.version);var g=!1,h=!1,l=!1;f=e.program;var m=f.getUniforms(),p=e.shader.uniforms;Z.useProgram(f.program)&&(l=h=g=!0);c.id!==Re&&(Re=c.id,h=!0);
|
|
|
+if(g||S!==a){0<f.numMultiviewViews?ua.updateCameraProjectionMatricesUniform(a,m):m.setValue(H,"projectionMatrix",a.projectionMatrix);Fa.logarithmicDepthBuffer&&m.setValue(H,"logDepthBufFC",2/(Math.log(a.far+1)/Math.LN2));S!==a&&(S=a,l=h=!0);if(c.isShaderMaterial||c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshStandardMaterial||c.envMap)g=m.map.cameraPosition,void 0!==g&&g.setValue(H,Fb.setFromMatrixPosition(a.matrixWorld));(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||
|
|
|
+c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial)&&m.setValue(H,"isOrthographic",!0===a.isOrthographicCamera);if(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial||c.skinning)0<f.numMultiviewViews?ua.updateCameraViewMatricesUniform(a,m):m.setValue(H,"viewMatrix",a.matrixWorldInverse)}if(c.skinning&&(m.setOptional(H,d,"bindMatrix"),m.setOptional(H,d,"bindMatrixInverse"),g=d.skeleton)){var k=g.bones;
|
|
|
+if(Fa.floatVertexTextures){if(void 0===g.boneTexture){k=Math.sqrt(4*k.length);k=P.ceilPowerOfTwo(k);k=Math.max(k,4);var t=new Float32Array(k*k*4);t.set(g.boneMatrices);var v=new Zb(t,k,k,1023,1015);g.boneMatrices=t;g.boneTexture=v;g.boneTextureSize=k}m.setValue(H,"boneTexture",g.boneTexture,ca);m.setValue(H,"boneTextureSize",g.boneTextureSize)}else m.setOptional(H,g,"boneMatrices")}if(h||e.receiveShadow!==d.receiveShadow)e.receiveShadow=d.receiveShadow,m.setValue(H,"receiveShadow",d.receiveShadow);
|
|
|
+if(h){m.setValue(H,"toneMappingExposure",A.toneMappingExposure);m.setValue(H,"toneMappingWhitePoint",A.toneMappingWhitePoint);e.needsLights&&(h=l,p.ambientLightColor.needsUpdate=h,p.lightProbe.needsUpdate=h,p.directionalLights.needsUpdate=h,p.pointLights.needsUpdate=h,p.spotLights.needsUpdate=h,p.rectAreaLights.needsUpdate=h,p.hemisphereLights.needsUpdate=h);b&&c.fog&&(p.fogColor.value.copy(b.color),b.isFog?(p.fogNear.value=b.near,p.fogFar.value=b.far):b.isFogExp2&&(p.fogDensity.value=b.density));
|
|
|
+if(c.isMeshBasicMaterial)u(p,c);else if(c.isMeshLambertMaterial)u(p,c),c.emissiveMap&&(p.emissiveMap.value=c.emissiveMap);else if(c.isMeshToonMaterial)u(p,c),p.specular.value.copy(c.specular),p.shininess.value=Math.max(c.shininess,1E-4),c.gradientMap&&(p.gradientMap.value=c.gradientMap),c.emissiveMap&&(p.emissiveMap.value=c.emissiveMap),c.bumpMap&&(p.bumpMap.value=c.bumpMap,p.bumpScale.value=c.bumpScale,1===c.side&&(p.bumpScale.value*=-1)),c.normalMap&&(p.normalMap.value=c.normalMap,p.normalScale.value.copy(c.normalScale),
|
|
|
+1===c.side&&p.normalScale.value.negate()),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias);else if(c.isMeshPhongMaterial)u(p,c),p.specular.value.copy(c.specular),p.shininess.value=Math.max(c.shininess,1E-4),c.emissiveMap&&(p.emissiveMap.value=c.emissiveMap),c.bumpMap&&(p.bumpMap.value=c.bumpMap,p.bumpScale.value=c.bumpScale,1===c.side&&(p.bumpScale.value*=-1)),c.normalMap&&(p.normalMap.value=c.normalMap,
|
|
|
+p.normalScale.value.copy(c.normalScale),1===c.side&&p.normalScale.value.negate()),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias);else if(c.isMeshStandardMaterial)u(p,c),c.isMeshPhysicalMaterial?(q(p,c),p.reflectivity.value=c.reflectivity,p.clearcoat.value=c.clearcoat,p.clearcoatRoughness.value=c.clearcoatRoughness,c.sheen&&p.sheen.value.copy(c.sheen),c.clearcoatNormalMap&&(p.clearcoatNormalScale.value.copy(c.clearcoatNormalScale),
|
|
|
+p.clearcoatNormalMap.value=c.clearcoatNormalMap,1===c.side&&p.clearcoatNormalScale.value.negate()),p.transparency.value=c.transparency):q(p,c);else if(c.isMeshMatcapMaterial)u(p,c),c.matcap&&(p.matcap.value=c.matcap),c.bumpMap&&(p.bumpMap.value=c.bumpMap,p.bumpScale.value=c.bumpScale,1===c.side&&(p.bumpScale.value*=-1)),c.normalMap&&(p.normalMap.value=c.normalMap,p.normalScale.value.copy(c.normalScale),1===c.side&&p.normalScale.value.negate()),c.displacementMap&&(p.displacementMap.value=c.displacementMap,
|
|
|
+p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias);else if(c.isMeshDepthMaterial)u(p,c),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias);else if(c.isMeshDistanceMaterial)u(p,c),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias),p.referencePosition.value.copy(c.referencePosition),
|
|
|
+p.nearDistance.value=c.nearDistance,p.farDistance.value=c.farDistance;else if(c.isMeshNormalMaterial)u(p,c),c.bumpMap&&(p.bumpMap.value=c.bumpMap,p.bumpScale.value=c.bumpScale,1===c.side&&(p.bumpScale.value*=-1)),c.normalMap&&(p.normalMap.value=c.normalMap,p.normalScale.value.copy(c.normalScale),1===c.side&&p.normalScale.value.negate()),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias);else if(c.isLineBasicMaterial)p.diffuse.value.copy(c.color),
|
|
|
p.opacity.value=c.opacity,c.isLineDashedMaterial&&(p.dashSize.value=c.dashSize,p.totalSize.value=c.dashSize+c.gapSize,p.scale.value=c.scale);else if(c.isPointsMaterial){p.diffuse.value.copy(c.color);p.opacity.value=c.opacity;p.size.value=c.size*U;p.scale.value=.5*J;c.map&&(p.map.value=c.map);c.alphaMap&&(p.alphaMap.value=c.alphaMap);if(c.map)var n=c.map;else c.alphaMap&&(n=c.alphaMap);void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),p.uvTransform.value.copy(n.matrix))}else if(c.isSpriteMaterial){p.diffuse.value.copy(c.color);
|
|
|
p.opacity.value=c.opacity;p.rotation.value=c.rotation;c.map&&(p.map.value=c.map);c.alphaMap&&(p.alphaMap.value=c.alphaMap);if(c.map)var w=c.map;else c.alphaMap&&(w=c.alphaMap);void 0!==w&&(!0===w.matrixAutoUpdate&&w.updateMatrix(),p.uvTransform.value.copy(w.matrix))}else c.isShadowMaterial&&(p.color.value.copy(c.color),p.opacity.value=c.opacity);void 0!==p.ltc_1&&(p.ltc_1.value=G.LTC_1);void 0!==p.ltc_2&&(p.ltc_2.value=G.LTC_2);Cb.upload(H,e.uniformsList,p,ca);c.isShaderMaterial&&(c.uniformsNeedUpdate=
|
|
|
!1)}c.isShaderMaterial&&!0===c.uniformsNeedUpdate&&(Cb.upload(H,e.uniformsList,p,ca),c.uniformsNeedUpdate=!1);c.isSpriteMaterial&&m.setValue(H,"center",d.center);0<f.numMultiviewViews?ua.updateObjectMatricesUniforms(d,a,m):(m.setValue(H,"modelViewMatrix",d.modelViewMatrix),m.setValue(H,"normalMatrix",d.normalMatrix));m.setValue(H,"modelMatrix",d.matrixWorld);return f}function u(a,b){a.opacity.value=b.opacity;b.color&&a.diffuse.value.copy(b.color);b.emissive&&a.emissive.value.copy(b.emissive).multiplyScalar(b.emissiveIntensity);
|
|
|
b.map&&(a.map.value=b.map);b.alphaMap&&(a.alphaMap.value=b.alphaMap);b.specularMap&&(a.specularMap.value=b.specularMap);b.envMap&&(a.envMap.value=b.envMap,a.flipEnvMap.value=b.envMap.isCubeTexture?-1:1,a.reflectivity.value=b.reflectivity,a.refractionRatio.value=b.refractionRatio,a.maxMipLevel.value=Ga.get(b.envMap).__maxMipLevel);b.lightMap&&(a.lightMap.value=b.lightMap,a.lightMapIntensity.value=b.lightMapIntensity);b.aoMap&&(a.aoMap.value=b.aoMap,a.aoMapIntensity.value=b.aoMapIntensity);if(b.map)var c=
|
|
|
b.map;else b.specularMap?c=b.specularMap:b.displacementMap?c=b.displacementMap:b.normalMap?c=b.normalMap:b.bumpMap?c=b.bumpMap:b.roughnessMap?c=b.roughnessMap:b.metalnessMap?c=b.metalnessMap:b.alphaMap?c=b.alphaMap:b.emissiveMap&&(c=b.emissiveMap);void 0!==c&&(c.isWebGLRenderTarget&&(c=c.texture),!0===c.matrixAutoUpdate&&c.updateMatrix(),a.uvTransform.value.copy(c.matrix));if(b.aoMap)var d=b.aoMap;else b.lightMap&&(d=b.lightMap);void 0!==d&&(d.isWebGLRenderTarget&&(d=d.texture),!0===d.matrixAutoUpdate&&
|
|
|
d.updateMatrix(),a.uv2Transform.value.copy(d.matrix))}function q(a,b){a.roughness.value=b.roughness;a.metalness.value=b.metalness;b.roughnessMap&&(a.roughnessMap.value=b.roughnessMap);b.metalnessMap&&(a.metalnessMap.value=b.metalnessMap);b.emissiveMap&&(a.emissiveMap.value=b.emissiveMap);b.bumpMap&&(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale,1===b.side&&(a.bumpScale.value*=-1));b.normalMap&&(a.normalMap.value=b.normalMap,a.normalScale.value.copy(b.normalScale),1===b.side&&a.normalScale.value.negate());
|
|
|
-b.displacementMap&&(a.displacementMap.value=b.displacementMap,a.displacementScale.value=b.displacementScale,a.displacementBias.value=b.displacementBias);b.envMap&&(a.envMapIntensity.value=b.envMapIntensity)}a=a||{};var v=void 0!==a.canvas?a.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),B=void 0!==a.context?a.context:null,w=void 0!==a.alpha?a.alpha:!1,x=void 0!==a.depth?a.depth:!0,L=void 0!==a.stencil?a.stencil:!0,K=void 0!==a.antialias?a.antialias:!1,z=void 0!==a.premultipliedAlpha?
|
|
|
+b.displacementMap&&(a.displacementMap.value=b.displacementMap,a.displacementScale.value=b.displacementScale,a.displacementBias.value=b.displacementBias);b.envMap&&(a.envMapIntensity.value=b.envMapIntensity)}a=a||{};var v=void 0!==a.canvas?a.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),B=void 0!==a.context?a.context:null,w=void 0!==a.alpha?a.alpha:!1,y=void 0!==a.depth?a.depth:!0,L=void 0!==a.stencil?a.stencil:!0,K=void 0!==a.antialias?a.antialias:!1,x=void 0!==a.premultipliedAlpha?
|
|
|
a.premultipliedAlpha:!0,ya=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,D=void 0!==a.powerPreference?a.powerPreference:"default",F=void 0!==a.failIfMajorPerformanceCaveat?a.failIfMajorPerformanceCaveat:!1,C=null,E=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.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var A=this,I=!1,M=null,O=0,Q=0,N=null,aa=null,Re=-1;var da=b=null;var Se=!1;var S=null,T=null,eb=new fa,X=new fa,W=null,Y=v.width,J=v.height,U=1,V=new fa(0,0,Y,J),ba=new fa(0,0,Y,J),pa=!1,sa=new Ed,ha=new ej,Qe=!1,mg=!1,ka=new R,Fb=new n;try{w={alpha:w,depth:x,stencil:L,antialias:K,premultipliedAlpha:z,preserveDrawingBuffer:ya,powerPreference:D,failIfMajorPerformanceCaveat:F,xrCompatible:!0};
|
|
|
+!1;this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var A=this,I=!1,M=null,O=0,Q=0,N=null,aa=null,Re=-1;var da=b=null;var Se=!1;var S=null,T=null,eb=new fa,X=new fa,W=null,Y=v.width,J=v.height,U=1,V=new fa(0,0,Y,J),ba=new fa(0,0,Y,J),pa=!1,sa=new Ed,ha=new ej,Qe=!1,mg=!1,ka=new R,Fb=new n;try{w={alpha:w,depth:y,stencil:L,antialias:K,premultipliedAlpha:x,preserveDrawingBuffer:ya,powerPreference:D,failIfMajorPerformanceCaveat:F,xrCompatible:!0};
|
|
|
v.addEventListener("webglcontextlost",d,!1);v.addEventListener("webglcontextrestored",e,!1);var H=B||v.getContext("webgl",w)||v.getContext("experimental-webgl",w);if(null===H){if(null!==v.getContext("webgl"))throw Error("Error creating WebGL context with your selected attributes.");throw Error("Error creating WebGL context.");}void 0===H.getShaderPrecisionFormat&&(H.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Rh){throw console.error("THREE.WebGLRenderer: "+
|
|
|
Rh.message),Rh;}var qa,Fa,Z,ea,Ga,ca,ja,va,ra,oa,xa,ta,ma,za,Ba,Ca,la;c();var ia=new Qh(A,H);this.xr=ia;var ua=new pk(A,H),Ea=new Nh(A,ra,Fa.maxTextureSize);this.shadowMap=Ea;this.getContext=function(){return H};this.getContextAttributes=function(){return H.getContextAttributes()};this.forceContextLoss=function(){var a=qa.get("WEBGL_lose_context");a&&a.loseContext()};this.forceContextRestore=function(){var a=qa.get("WEBGL_lose_context");a&&a.restoreContext()};this.getPixelRatio=function(){return U};
|
|
|
-this.setPixelRatio=function(a){void 0!==a&&(U=a,this.setSize(Y,J,!1))};this.getSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),a=new y);return a.set(Y,J)};this.setSize=function(a,b,c){ia.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(Y=a,J=b,v.width=Math.floor(a*U),v.height=Math.floor(b*U),!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 y);return a.set(Y*U,J*U).floor()};this.setDrawingBufferSize=function(a,b,c){Y=a;J=b;U=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 fa);return a.copy(eb)};this.getViewport=function(a){return a.copy(V)};
|
|
|
+this.setPixelRatio=function(a){void 0!==a&&(U=a,this.setSize(Y,J,!1))};this.getSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),a=new z);return a.set(Y,J)};this.setSize=function(a,b,c){ia.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(Y=a,J=b,v.width=Math.floor(a*U),v.height=Math.floor(b*U),!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 z);return a.set(Y*U,J*U).floor()};this.setDrawingBufferSize=function(a,b,c){Y=a;J=b;U=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 fa);return a.copy(eb)};this.getViewport=function(a){return a.copy(V)};
|
|
|
this.setViewport=function(a,b,c,d){a.isVector4?V.set(a.x,a.y,a.z,a.w):V.set(a,b,c,d);Z.viewport(eb.copy(V).multiplyScalar(U).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);Z.scissor(X.copy(ba).multiplyScalar(U).floor())};this.getScissorTest=function(){return pa};this.setScissorTest=function(a){Z.setScissorTest(pa=a)};this.getClearColor=function(){return ma.getClearColor()};this.setClearColor=function(){ma.setClearColor.apply(ma,
|
|
|
arguments)};this.getClearAlpha=function(){return ma.getClearAlpha()};this.setClearAlpha=function(){ma.setClearAlpha.apply(ma,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;H.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);xa.dispose();ta.dispose();Ga.dispose();ra.dispose();ia.dispose();Aa.stop()};this.renderBufferImmediate=function(a,b){Z.initAttributes();var c=Ga.get(a);a.hasPositions&&!c.position&&(c.position=H.createBuffer());a.hasNormals&&!c.normal&&(c.normal=H.createBuffer());a.hasUvs&&!c.uv&&(c.uv=H.createBuffer());a.hasColors&&!c.color&&(c.color=H.createBuffer());b=b.getAttributes();a.hasPositions&&(H.bindBuffer(34962,c.position),H.bufferData(34962,a.positionArray,35048),Z.enableAttribute(b.position),
|
|
|
H.vertexAttribPointer(b.position,3,5126,!1,0,0));a.hasNormals&&(H.bindBuffer(34962,c.normal),H.bufferData(34962,a.normalArray,35048),Z.enableAttribute(b.normal),H.vertexAttribPointer(b.normal,3,5126,!1,0,0));a.hasUvs&&(H.bindBuffer(34962,c.uv),H.bufferData(34962,a.uvArray,35048),Z.enableAttribute(b.uv),H.vertexAttribPointer(b.uv,2,5126,!1,0,0));a.hasColors&&(H.bindBuffer(34962,c.color),H.bufferData(34962,a.colorArray,35048),Z.enableAttribute(b.color),H.vertexAttribPointer(b.color,3,5126,!1,0,0));
|
|
|
Z.disableUnusedAttributes();H.drawArrays(4,0,a.count);a.count=0};this.renderBufferDirect=function(a,c,d,e,f,g){var h=f.isMesh&&0>f.matrixWorld.determinant(),l=k(a,c,e,f);Z.setMaterial(e,h);var m=!1;if(b!==d.id||da!==l.id||Se!==(!0===e.wireframe))b=d.id,da=l.id,Se=!0===e.wireframe,m=!0;if(e.morphTargets||e.morphNormals)za.update(f,d,e,l),m=!0;a=d.index;c=d.attributes.position;if((null===a||0!==a.count)&&void 0!==c&&0!==c.count){var p=1;!0===e.wireframe&&(a=va.getWireframeAttribute(d),p=2);h=Ba;if(null!==
|
|
|
-a){var r=ja.get(a);h=Ca;h.setIndex(r)}if(m){if(!1!==Fa.isWebGL2||!f.isInstancedMesh&&!d.isInstancedBufferGeometry||null!==qa.get("ANGLE_instanced_arrays")){Z.initAttributes();m=d.attributes;l=l.getAttributes();var t=e.defaultAttributeValues;for(K in l){var q=l[K];if(0<=q){var u=m[K];if(void 0!==u){var n=u.normalized,v=u.itemSize,w=ja.get(u);if(void 0!==w){var B=w.buffer,z=w.type;w=w.bytesPerElement;if(u.isInterleavedBufferAttribute){var x=u.data,L=x.stride;u=u.offset;x&&x.isInstancedInterleavedBuffer?
|
|
|
-(Z.enableAttributeAndDivisor(q,x.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=x.meshPerAttribute*x.count)):Z.enableAttribute(q);H.bindBuffer(34962,B);H.vertexAttribPointer(q,v,z,n,L*w,u*w)}else u.isInstancedBufferAttribute?(Z.enableAttributeAndDivisor(q,u.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=u.meshPerAttribute*u.count)):Z.enableAttribute(q),H.bindBuffer(34962,B),H.vertexAttribPointer(q,v,z,n,0,0)}}else if("instanceMatrix"===K)w=ja.get(f.instanceMatrix),
|
|
|
-void 0!==w&&(B=w.buffer,z=w.type,Z.enableAttributeAndDivisor(q+0,1),Z.enableAttributeAndDivisor(q+1,1),Z.enableAttributeAndDivisor(q+2,1),Z.enableAttributeAndDivisor(q+3,1),H.bindBuffer(34962,B),H.vertexAttribPointer(q+0,4,z,!1,64,0),H.vertexAttribPointer(q+1,4,z,!1,64,16),H.vertexAttribPointer(q+2,4,z,!1,64,32),H.vertexAttribPointer(q+3,4,z,!1,64,48));else if(void 0!==t&&(n=t[K],void 0!==n))switch(n.length){case 2:H.vertexAttrib2fv(q,n);break;case 3:H.vertexAttrib3fv(q,n);break;case 4:H.vertexAttrib4fv(q,
|
|
|
+a){var r=ja.get(a);h=Ca;h.setIndex(r)}if(m){if(!1!==Fa.isWebGL2||!f.isInstancedMesh&&!d.isInstancedBufferGeometry||null!==qa.get("ANGLE_instanced_arrays")){Z.initAttributes();m=d.attributes;l=l.getAttributes();var t=e.defaultAttributeValues;for(K in l){var q=l[K];if(0<=q){var u=m[K];if(void 0!==u){var n=u.normalized,v=u.itemSize,w=ja.get(u);if(void 0!==w){var B=w.buffer,x=w.type;w=w.bytesPerElement;if(u.isInterleavedBufferAttribute){var y=u.data,L=y.stride;u=u.offset;y&&y.isInstancedInterleavedBuffer?
|
|
|
+(Z.enableAttributeAndDivisor(q,y.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=y.meshPerAttribute*y.count)):Z.enableAttribute(q);H.bindBuffer(34962,B);H.vertexAttribPointer(q,v,x,n,L*w,u*w)}else u.isInstancedBufferAttribute?(Z.enableAttributeAndDivisor(q,u.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=u.meshPerAttribute*u.count)):Z.enableAttribute(q),H.bindBuffer(34962,B),H.vertexAttribPointer(q,v,x,n,0,0)}}else if("instanceMatrix"===K)w=ja.get(f.instanceMatrix),
|
|
|
+void 0!==w&&(B=w.buffer,x=w.type,Z.enableAttributeAndDivisor(q+0,1),Z.enableAttributeAndDivisor(q+1,1),Z.enableAttributeAndDivisor(q+2,1),Z.enableAttributeAndDivisor(q+3,1),H.bindBuffer(34962,B),H.vertexAttribPointer(q+0,4,x,!1,64,0),H.vertexAttribPointer(q+1,4,x,!1,64,16),H.vertexAttribPointer(q+2,4,x,!1,64,32),H.vertexAttribPointer(q+3,4,x,!1,64,48));else if(void 0!==t&&(n=t[K],void 0!==n))switch(n.length){case 2:H.vertexAttrib2fv(q,n);break;case 3:H.vertexAttrib3fv(q,n);break;case 4:H.vertexAttrib4fv(q,
|
|
|
n);break;default:H.vertexAttrib1fv(q,n)}}}Z.disableUnusedAttributes()}null!==a&&H.bindBuffer(34963,r.buffer)}var K=d.drawRange.start*p;m=null!==g?g.start*p:0;r=Math.max(K,m);g=Math.max(0,Math.min(null!==a?a.count:c.count,K+d.drawRange.count*p,m+(null!==g?g.count*p:Infinity))-1-r+1);0!==g&&(f.isMesh?!0===e.wireframe?(Z.setLineWidth(e.wireframeLinewidth*(null===N?U:1)),h.setMode(1)):h.setMode(4):f.isLine?(e=e.linewidth,void 0===e&&(e=1),Z.setLineWidth(e*(null===N?U:1)),f.isLineSegments?h.setMode(1):
|
|
|
f.isLineLoop?h.setMode(2):h.setMode(3)):f.isPoints?h.setMode(0):f.isSprite&&h.setMode(4),f.isInstancedMesh?h.renderInstances(d,r,g,f.count):d.isInstancedBufferGeometry?h.renderInstances(d,r,g,d.maxInstancedCount):h.render(r,g))}};this.compile=function(a,b){E=ta.get(a,b);E.init();a.traverse(function(a){a.isLight&&(E.pushLight(a),a.castShadow&&E.pushShadow(a))});E.setupLights(b);a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var c=0;c<b.material.length;c++)r(b.material[c],a.fog,
|
|
|
b);else r(b.material,a.fog,b)})};var Da=null,Aa=new sh;Aa.setAnimationLoop(function(a){ia.isPresenting()||Da&&Da(a)});"undefined"!==typeof window&&Aa.setContext(window);this.setAnimationLoop=function(a){Da=a;ia.setAnimationLoop(a);Aa.start()};this.render=function(a,c,d,e){if(void 0!==d){console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead.");var f=d}if(void 0!==e){console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead.");
|
|
@@ -221,7 +221,7 @@ qa.get("WEBGL_color_buffer_float"))||1016===p&&(Fa.isWebGL2?qa.get("EXT_color_bu
|
|
|
H.bindFramebuffer(36160,aa)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")};this.copyFramebufferToTexture=function(a,b,c){void 0===c&&(c=0);var d=Math.pow(2,-c),e=Math.floor(b.image.width*d);d=Math.floor(b.image.height*d);var f=la.convert(b.format);ca.setTexture2D(b,0);H.copyTexImage2D(3553,c,f,a.x,a.y,e,d,0);Z.unbindTexture()};this.copyTextureToTexture=function(a,b,c,d){var e=b.image.width,f=b.image.height,g=la.convert(c.format),h=
|
|
|
la.convert(c.type);ca.setTexture2D(c,0);b.isDataTexture?H.texSubImage2D(3553,d||0,a.x,a.y,e,f,g,h,b.image.data):H.texSubImage2D(3553,d||0,a.x,a.y,g,h,b.image);Z.unbindTexture()};this.initTexture=function(a){ca.setTexture2D(a,0);Z.unbindTexture()};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function Ue(a,b){this.name="";this.color=new A(a);this.density=void 0!==b?b:2.5E-4}function Ve(a,b,c){this.name="";this.color=new A(a);this.near=
|
|
|
void 0!==b?b:1;this.far=void 0!==c?c:1E3}function pb(a,b){this.array=a;this.stride=b;this.count=void 0!==a?a.length/b:0;this.usage=35044;this.updateRange={offset:0,count:-1};this.version=0}function Ld(a,b,c,d){this.data=a;this.itemSize=b;this.offset=c;this.normalized=!0===d}function Gb(a){M.call(this);this.type="SpriteMaterial";this.color=new A(16777215);this.alphaMap=this.map=null;this.rotation=0;this.transparent=this.sizeAttenuation=!0;this.setValues(a)}function Md(a){F.call(this);this.type="Sprite";
|
|
|
-if(void 0===Gc){Gc=new C;var b=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]);b=new pb(b,5);Gc.setIndex([0,1,2,0,2,3]);Gc.setAttribute("position",new Ld(b,3,0,!1));Gc.setAttribute("uv",new Ld(b,2,3,!1))}this.geometry=Gc;this.material=void 0!==a?a:new Gb;this.center=new y(.5,.5)}function We(a,b,c,d,e,f){Hc.subVectors(a,c).addScalar(.5).multiply(d);void 0!==e?(Nd.x=f*Hc.x-e*Hc.y,Nd.y=e*Hc.x+f*Hc.y):Nd.copy(Hc);a.copy(b);a.x+=Nd.x;a.y+=Nd.y;a.applyMatrix4(Sh)}function Od(){F.call(this);
|
|
|
+if(void 0===Gc){Gc=new C;var b=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]);b=new pb(b,5);Gc.setIndex([0,1,2,0,2,3]);Gc.setAttribute("position",new Ld(b,3,0,!1));Gc.setAttribute("uv",new Ld(b,2,3,!1))}this.geometry=Gc;this.material=void 0!==a?a:new Gb;this.center=new z(.5,.5)}function We(a,b,c,d,e,f){Hc.subVectors(a,c).addScalar(.5).multiply(d);void 0!==e?(Nd.x=f*Hc.x-e*Hc.y,Nd.y=e*Hc.x+f*Hc.y):Nd.copy(Hc);a.copy(b);a.x+=Nd.x;a.y+=Nd.y;a.applyMatrix4(Sh)}function Od(){F.call(this);
|
|
|
this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}});this.autoUpdate=!0}function Pd(a,b){a&&a.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");V.call(this,a,b);this.type="SkinnedMesh";this.bindMode="attached";this.bindMatrix=new R;this.bindMatrixInverse=new R}function Xe(a,b){a=a||[];this.bones=a.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);this.frame=-1;if(void 0===b)this.calculateInverses();
|
|
|
else if(this.bones.length===b.length)this.boneInverses=b.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],a=0,b=this.bones.length;a<b;a++)this.boneInverses.push(new R)}function qg(){F.call(this);this.type="Bone"}function Ye(a,b,c){V.call(this,a,b);this.instanceMatrix=new Q(new Float32Array(16*c),16);this.count=c}function aa(a){M.call(this);this.type="LineBasicMaterial";this.color=new A(16777215);this.linewidth=1;this.linejoin=this.linecap="round";
|
|
|
this.setValues(a)}function ra(a,b,c){1===c&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead.");F.call(this);this.type="Line";this.geometry=void 0!==a?a:new C;this.material=void 0!==b?b:new aa({color:16777215*Math.random()})}function T(a,b){ra.call(this,a,b);this.type="LineSegments"}function Ze(a,b){ra.call(this,a,b);this.type="LineLoop"}function Ua(a){M.call(this);this.type="PointsMaterial";this.color=new A(16777215);this.alphaMap=this.map=
|
|
@@ -233,18 +233,18 @@ f[1],void 0===g[r]&&(g[r]={index1:f[0],index2:f[1]});for(r in g)m=g[r],h.fromBuf
|
|
|
stacks:c};this.fromBufferGeometry(new Lc(a,b,c));this.mergeVertices()}function Lc(a,b,c){C.call(this);this.type="ParametricBufferGeometry";this.parameters={func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],h=new n,l=new n,m=new n,p=new n,k=new n,t,u;3>a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var q=b+1;for(t=0;t<=c;t++){var v=t/c;for(u=0;u<=b;u++){var B=u/b;a(B,v,l);e.push(l.x,l.y,l.z);0<=B-1E-5?(a(B-1E-5,v,m),p.subVectors(l,m)):(a(B+
|
|
|
1E-5,v,m),p.subVectors(m,l));0<=v-1E-5?(a(B,v-1E-5,m),k.subVectors(l,m)):(a(B,v+1E-5,m),k.subVectors(m,l));h.crossVectors(p,k).normalize();f.push(h.x,h.y,h.z);g.push(B,v)}}for(t=0;t<c;t++)for(u=0;u<b;u++)a=t*q+u+1,h=(t+1)*q+u+1,l=(t+1)*q+u,d.push(t*q+u,a,l),d.push(a,h,l);this.setIndex(d);this.setAttribute("position",new D(e,3));this.setAttribute("normal",new D(f,3));this.setAttribute("uv",new D(g,2))}function Td(a,b,c,d){O.call(this);this.type="PolyhedronGeometry";this.parameters={vertices:a,indices:b,
|
|
|
radius:c,detail:d};this.fromBufferGeometry(new Aa(a,b,c,d));this.mergeVertices()}function Aa(a,b,c,d){function e(a){h.push(a.x,a.y,a.z)}function f(b,c){b*=3;c.x=a[b+0];c.y=a[b+1];c.z=a[b+2]}function g(a,b,c,d){0>d&&1===a.x&&(l[b]=a.x-1);0===c.x&&0===c.z&&(l[b]=d/2/Math.PI+.5)}C.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};c=c||1;d=d||0;var h=[],l=[];(function(a){for(var c=new n,d=new n,g=new n,h=0;h<b.length;h+=3){f(b[h+0],c);f(b[h+1],d);
|
|
|
-f(b[h+2],g);var l,m,k=c,w=d,x=g,L=Math.pow(2,a),K=[];for(m=0;m<=L;m++){K[m]=[];var z=k.clone().lerp(x,m/L),y=w.clone().lerp(x,m/L),A=L-m;for(l=0;l<=A;l++)K[m][l]=0===l&&m===L?z:z.clone().lerp(y,l/A)}for(m=0;m<L;m++)for(l=0;l<2*(L-m)-1;l++)k=Math.floor(l/2),0===l%2?(e(K[m][k+1]),e(K[m+1][k]),e(K[m][k])):(e(K[m][k+1]),e(K[m+1][k+1]),e(K[m+1][k]))}})(d);(function(a){for(var b=new n,c=0;c<h.length;c+=3)b.x=h[c+0],b.y=h[c+1],b.z=h[c+2],b.normalize().multiplyScalar(a),h[c+0]=b.x,h[c+1]=b.y,h[c+2]=b.z})(c);
|
|
|
-(function(){for(var a=new n,b=0;b<h.length;b+=3)a.x=h[b+0],a.y=h[b+1],a.z=h[b+2],l.push(Math.atan2(a.z,-a.x)/2/Math.PI+.5,1-(Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5));a=new n;b=new n;for(var c=new n,d=new n,e=new y,f=new y,k=new y,B=0,w=0;B<h.length;B+=9,w+=6){a.set(h[B+0],h[B+1],h[B+2]);b.set(h[B+3],h[B+4],h[B+5]);c.set(h[B+6],h[B+7],h[B+8]);e.set(l[w+0],l[w+1]);f.set(l[w+2],l[w+3]);k.set(l[w+4],l[w+5]);d.copy(a).add(b).add(c).divideScalar(3);var x=Math.atan2(d.z,-d.x);g(e,w+0,a,x);
|
|
|
-g(f,w+2,b,x);g(k,w+4,c,x)}for(a=0;a<l.length;a+=6)b=l[a+0],c=l[a+2],d=l[a+4],e=Math.min(b,c,d),.9<Math.max(b,c,d)&&.1>e&&(.2>b&&(l[a+0]+=1),.2>c&&(l[a+2]+=1),.2>d&&(l[a+4]+=1))})();this.setAttribute("position",new D(h,3));this.setAttribute("normal",new D(h.slice(),3));this.setAttribute("uv",new D(l,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Ud(a,b){O.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Mc(a,b));this.mergeVertices()}
|
|
|
+f(b[h+2],g);var l,m,k=c,w=d,y=g,L=Math.pow(2,a),K=[];for(m=0;m<=L;m++){K[m]=[];var x=k.clone().lerp(y,m/L),z=w.clone().lerp(y,m/L),A=L-m;for(l=0;l<=A;l++)K[m][l]=0===l&&m===L?x:x.clone().lerp(z,l/A)}for(m=0;m<L;m++)for(l=0;l<2*(L-m)-1;l++)k=Math.floor(l/2),0===l%2?(e(K[m][k+1]),e(K[m+1][k]),e(K[m][k])):(e(K[m][k+1]),e(K[m+1][k+1]),e(K[m+1][k]))}})(d);(function(a){for(var b=new n,c=0;c<h.length;c+=3)b.x=h[c+0],b.y=h[c+1],b.z=h[c+2],b.normalize().multiplyScalar(a),h[c+0]=b.x,h[c+1]=b.y,h[c+2]=b.z})(c);
|
|
|
+(function(){for(var a=new n,b=0;b<h.length;b+=3)a.x=h[b+0],a.y=h[b+1],a.z=h[b+2],l.push(Math.atan2(a.z,-a.x)/2/Math.PI+.5,1-(Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5));a=new n;b=new n;for(var c=new n,d=new n,e=new z,f=new z,k=new z,B=0,w=0;B<h.length;B+=9,w+=6){a.set(h[B+0],h[B+1],h[B+2]);b.set(h[B+3],h[B+4],h[B+5]);c.set(h[B+6],h[B+7],h[B+8]);e.set(l[w+0],l[w+1]);f.set(l[w+2],l[w+3]);k.set(l[w+4],l[w+5]);d.copy(a).add(b).add(c).divideScalar(3);var y=Math.atan2(d.z,-d.x);g(e,w+0,a,y);
|
|
|
+g(f,w+2,b,y);g(k,w+4,c,y)}for(a=0;a<l.length;a+=6)b=l[a+0],c=l[a+2],d=l[a+4],e=Math.min(b,c,d),.9<Math.max(b,c,d)&&.1>e&&(.2>b&&(l[a+0]+=1),.2>c&&(l[a+2]+=1),.2>d&&(l[a+4]+=1))})();this.setAttribute("position",new D(h,3));this.setAttribute("normal",new D(h.slice(),3));this.setAttribute("uv",new D(l,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Ud(a,b){O.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Mc(a,b));this.mergeVertices()}
|
|
|
function Mc(a,b){Aa.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],a,b);this.type="TetrahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Vd(a,b){O.call(this);this.type="OctahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new ac(a,b));this.mergeVertices()}function ac(a,b){Aa.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],a,b);this.type="OctahedronBufferGeometry";this.parameters=
|
|
|
{radius:a,detail:b}}function Wd(a,b){O.call(this);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Nc(a,b));this.mergeVertices()}function Nc(a,b){var c=(1+Math.sqrt(5))/2;Aa.call(this,[-1,c,0,1,c,0,-1,-c,0,1,-c,0,0,-1,c,0,1,c,0,-1,-c,0,1,-c,c,0,-1,c,0,1,-c,0,-1,-c,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],a,b);this.type="IcosahedronBufferGeometry";this.parameters=
|
|
|
{radius:a,detail:b}}function Xd(a,b){O.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Oc(a,b));this.mergeVertices()}function Oc(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;Aa.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-d,-c,0,-d,c,0,d,-c,0,d,c,-d,-c,0,-d,c,0,d,-c,0,d,c,0,-c,0,-d,c,0,-d,-c,0,d,c,0,d],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,
|
|
|
6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],a,b);this.type="DodecahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Yd(a,b,c,d,e,f){O.call(this);this.type="TubeGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};void 0!==f&&console.warn("THREE.TubeGeometry: taper has been removed.");a=new bc(a,b,c,d,e);this.tangents=a.tangents;this.normals=
|
|
|
a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function bc(a,b,c,d,e){function f(e){p=a.getPointAt(e/b,p);var f=g.normals[e];e=g.binormals[e];for(t=0;t<=d;t++){var m=t/d*Math.PI*2,k=Math.sin(m);m=-Math.cos(m);l.x=m*f.x+k*e.x;l.y=m*f.y+k*e.y;l.z=m*f.z+k*e.z;l.normalize();q.push(l.x,l.y,l.z);h.x=p.x+c*l.x;h.y=p.y+c*l.y;h.z=p.z+c*l.z;u.push(h.x,h.y,h.z)}}C.call(this);this.type="TubeBufferGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,
|
|
|
-closed:e};b=b||64;c=c||1;d=d||8;e=e||!1;var g=a.computeFrenetFrames(b,e);this.tangents=g.tangents;this.normals=g.normals;this.binormals=g.binormals;var h=new n,l=new n,m=new y,p=new n,k,t,u=[],q=[],v=[],B=[];for(k=0;k<b;k++)f(k);f(!1===e?b:0);for(k=0;k<=b;k++)for(t=0;t<=d;t++)m.x=k/b,m.y=t/d,v.push(m.x,m.y);(function(){for(t=1;t<=b;t++)for(k=1;k<=d;k++){var a=(d+1)*t+(k-1),c=(d+1)*t+k,e=(d+1)*(t-1)+k;B.push((d+1)*(t-1)+(k-1),a,e);B.push(a,c,e)}})();this.setIndex(B);this.setAttribute("position",new D(u,
|
|
|
+closed:e};b=b||64;c=c||1;d=d||8;e=e||!1;var g=a.computeFrenetFrames(b,e);this.tangents=g.tangents;this.normals=g.normals;this.binormals=g.binormals;var h=new n,l=new n,m=new z,p=new n,k,t,u=[],q=[],v=[],B=[];for(k=0;k<b;k++)f(k);f(!1===e?b:0);for(k=0;k<=b;k++)for(t=0;t<=d;t++)m.x=k/b,m.y=t/d,v.push(m.x,m.y);(function(){for(t=1;t<=b;t++)for(k=1;k<=d;k++){var a=(d+1)*t+(k-1),c=(d+1)*t+k,e=(d+1)*(t-1)+k;B.push((d+1)*(t-1)+(k-1),a,e);B.push(a,c,e)}})();this.setIndex(B);this.setAttribute("position",new D(u,
|
|
|
3));this.setAttribute("normal",new D(q,3));this.setAttribute("uv",new D(v,2))}function Zd(a,b,c,d,e,f,g){O.call(this);this.type="TorusKnotGeometry";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};void 0!==g&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead.");this.fromBufferGeometry(new Pc(a,b,c,d,e,f));this.mergeVertices()}function Pc(a,b,c,d,e,f){function g(a,b,c,d,e){var f=Math.sin(a);b=c/b*a;c=Math.cos(b);e.x=d*
|
|
|
-(2+c)*.5*Math.cos(a);e.y=d*(2+c)*f*.5;e.z=d*Math.sin(b)*.5}C.call(this);this.type="TorusKnotBufferGeometry";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};a=a||1;b=b||.4;c=Math.floor(c)||64;d=Math.floor(d)||8;e=e||2;f=f||3;var h=[],l=[],m=[],p=[],k,t=new n,u=new n,q=new n,v=new n,B=new n,w=new n,x=new n;for(k=0;k<=c;++k){var L=k/c*e*Math.PI*2;g(L,e,f,a,q);g(L+.01,e,f,a,v);w.subVectors(v,q);x.addVectors(v,q);B.crossVectors(w,x);x.crossVectors(B,w);B.normalize();x.normalize();
|
|
|
-for(L=0;L<=d;++L){var K=L/d*Math.PI*2,z=-b*Math.cos(K);K=b*Math.sin(K);t.x=q.x+(z*x.x+K*B.x);t.y=q.y+(z*x.y+K*B.y);t.z=q.z+(z*x.z+K*B.z);l.push(t.x,t.y,t.z);u.subVectors(t,q).normalize();m.push(u.x,u.y,u.z);p.push(k/c);p.push(L/d)}}for(L=1;L<=c;L++)for(k=1;k<=d;k++)a=(d+1)*L+(k-1),b=(d+1)*L+k,e=(d+1)*(L-1)+k,h.push((d+1)*(L-1)+(k-1),a,e),h.push(a,b,e);this.setIndex(h);this.setAttribute("position",new D(l,3));this.setAttribute("normal",new D(m,3));this.setAttribute("uv",new D(p,2))}function $d(a,b,
|
|
|
+(2+c)*.5*Math.cos(a);e.y=d*(2+c)*f*.5;e.z=d*Math.sin(b)*.5}C.call(this);this.type="TorusKnotBufferGeometry";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};a=a||1;b=b||.4;c=Math.floor(c)||64;d=Math.floor(d)||8;e=e||2;f=f||3;var h=[],l=[],m=[],p=[],k,t=new n,u=new n,q=new n,v=new n,B=new n,w=new n,y=new n;for(k=0;k<=c;++k){var L=k/c*e*Math.PI*2;g(L,e,f,a,q);g(L+.01,e,f,a,v);w.subVectors(v,q);y.addVectors(v,q);B.crossVectors(w,y);y.crossVectors(B,w);B.normalize();y.normalize();
|
|
|
+for(L=0;L<=d;++L){var K=L/d*Math.PI*2,x=-b*Math.cos(K);K=b*Math.sin(K);t.x=q.x+(x*y.x+K*B.x);t.y=q.y+(x*y.y+K*B.y);t.z=q.z+(x*y.z+K*B.z);l.push(t.x,t.y,t.z);u.subVectors(t,q).normalize();m.push(u.x,u.y,u.z);p.push(k/c);p.push(L/d)}}for(L=1;L<=c;L++)for(k=1;k<=d;k++)a=(d+1)*L+(k-1),b=(d+1)*L+k,e=(d+1)*(L-1)+k,h.push((d+1)*(L-1)+(k-1),a,e),h.push(a,b,e);this.setIndex(h);this.setAttribute("position",new D(l,3));this.setAttribute("normal",new D(m,3));this.setAttribute("uv",new D(p,2))}function $d(a,b,
|
|
|
c,d,e){O.call(this);this.type="TorusGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};this.fromBufferGeometry(new Qc(a,b,c,d,e));this.mergeVertices()}function Qc(a,b,c,d,e){C.call(this);this.type="TorusBufferGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};a=a||1;b=b||.4;c=Math.floor(c)||8;d=Math.floor(d)||6;e=e||2*Math.PI;var f=[],g=[],h=[],l=[],m=new n,p=new n,k=new n,t,u;for(t=0;t<=c;t++)for(u=0;u<=d;u++){var q=u/d*e,v=t/c*
|
|
|
Math.PI*2;p.x=(a+b*Math.cos(v))*Math.cos(q);p.y=(a+b*Math.cos(v))*Math.sin(q);p.z=b*Math.sin(v);g.push(p.x,p.y,p.z);m.x=a*Math.cos(q);m.y=a*Math.sin(q);k.subVectors(p,m).normalize();h.push(k.x,k.y,k.z);l.push(u/d);l.push(t/c)}for(t=1;t<=c;t++)for(u=1;u<=d;u++)a=(d+1)*(t-1)+u-1,b=(d+1)*(t-1)+u,e=(d+1)*t+u,f.push((d+1)*t+u-1,a,e),f.push(a,b,e);this.setIndex(f);this.setAttribute("position",new D(g,3));this.setAttribute("normal",new D(h,3));this.setAttribute("uv",new D(l,2))}function Th(a,b,c,d,e){for(var f,
|
|
|
g=0,h=b,l=c-d;h<c;h+=d)g+=(a[l]-a[h])*(a[h+1]+a[l+1]),l=h;if(e===0<g)for(e=b;e<c;e+=d)f=Uh(e,a[e],a[e+1],f);else for(e=c-d;e>=b;e-=d)f=Uh(e,a[e],a[e+1],f);f&&cc(f,f.next)&&(ae(f),f=f.next);return f}function be(a,b){if(!a)return a;b||(b=a);do{var c=!1;if(a.steiner||!cc(a,a.next)&&0!==oa(a.prev,a,a.next))a=a.next;else{ae(a);a=b=a.prev;if(a===a.next)break;c=!0}}while(c||a!==b);return b}function ce(a,b,c,d,e,f,g){if(a){if(!g&&f){var h=a,l=h;do null===l.z&&(l.z=ug(l.x,l.y,d,e,f)),l.prevZ=l.prev,l=l.nextZ=
|
|
@@ -257,39 +257,39 @@ if(d===f)return h.prev;b=h;g=h.x;var l=h.y,m=Infinity;for(c=h.next;c!==b;){if(d>
|
|
|
b.x===c.x&&b.y<c.y)c=b;b=b.next}while(b!==a);return c}function Rc(a,b,c,d,e,f,g,h){return 0<=(e-g)*(b-h)-(a-g)*(f-h)&&0<=(a-g)*(d-h)-(c-g)*(b-h)&&0<=(c-g)*(f-h)-(e-g)*(d-h)}function oa(a,b,c){return(b.y-a.y)*(c.x-b.x)-(b.x-a.x)*(c.y-b.y)}function cc(a,b){return a.x===b.x&&a.y===b.y}function Vh(a,b,c,d){return cc(a,c)&&cc(b,d)||cc(a,d)&&cc(c,b)?!0:0<oa(a,b,c)!==0<oa(a,b,d)&&0<oa(c,d,a)!==0<oa(c,d,b)}function de(a,b){return 0>oa(a.prev,a,a.next)?0<=oa(a,b,a.next)&&0<=oa(a,a.prev,b):0>oa(a,b,a.prev)||
|
|
|
0>oa(a,a.next,b)}function Wh(a,b){var c=new vg(a.i,a.x,a.y),d=new vg(b.i,b.x,b.y),e=a.next,f=b.prev;a.next=b;b.prev=a;c.next=e;e.prev=c;d.next=c;c.prev=d;f.next=d;d.prev=f;return d}function Uh(a,b,c,d){a=new vg(a,b,c);d?(a.next=d.next,a.prev=d,d.next.prev=a,d.next=a):(a.prev=a,a.next=a);return a}function ae(a){a.next.prev=a.prev;a.prev.next=a.next;a.prevZ&&(a.prevZ.nextZ=a.nextZ);a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function vg(a,b,c){this.i=a;this.x=b;this.y=c;this.nextZ=this.prevZ=this.z=this.next=
|
|
|
this.prev=null;this.steiner=!1}function Xh(a){var b=a.length;2<b&&a[b-1].equals(a[0])&&a.pop()}function Yh(a,b){for(var c=0;c<b.length;c++)a.push(b[c].x),a.push(b[c].y)}function dc(a,b){O.call(this);this.type="ExtrudeGeometry";this.parameters={shapes:a,options:b};this.fromBufferGeometry(new fb(a,b));this.mergeVertices()}function fb(a,b){function c(a){function c(a,b,c){b||console.error("THREE.ExtrudeGeometry: vec does not exist");return b.clone().multiplyScalar(c).add(a)}function g(a,b,c){var d=a.x-
|
|
|
-b.x;var e=a.y-b.y;var f=c.x-a.x;var g=c.y-a.y,h=d*d+e*e;if(Math.abs(d*g-e*f)>Number.EPSILON){var l=Math.sqrt(h),m=Math.sqrt(f*f+g*g);h=b.x-e/l;b=b.y+d/l;g=((c.x-g/m-h)*g-(c.y+f/m-b)*f)/(d*g-e*f);f=h+d*g-a.x;d=b+e*g-a.y;e=f*f+d*d;if(2>=e)return new y(f,d);e=Math.sqrt(e/2)}else a=!1,d>Number.EPSILON?f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(f=-e,e=Math.sqrt(h)):(f=d,d=e,e=Math.sqrt(h/2));return new y(f/e,d/e)}function h(a,b){for(J=a.length;0<=
|
|
|
---J;){var c=J;var f=J-1;0>f&&(f=a.length-1);var g,h=x+2*C;for(g=0;g<h;g++){var l=Y*g,m=Y*(g+1),p=b+f+l,k=b+f+m;m=b+c+m;q(b+c+l);q(p);q(m);q(p);q(k);q(m);l=e.length/3;l=E.generateSideWallUV(d,e,l-6,l-3,l-2,l-1);v(l[0]);v(l[1]);v(l[3]);v(l[1]);v(l[2]);v(l[3])}}}function l(a,b,c){B.push(a);B.push(b);B.push(c)}function k(a,b,c){q(a);q(b);q(c);a=e.length/3;a=E.generateTopUV(d,e,a-3,a-2,a-1);v(a[0]);v(a[1]);v(a[2])}function q(a){e.push(B[3*a]);e.push(B[3*a+1]);e.push(B[3*a+2])}function v(a){f.push(a.x);
|
|
|
-f.push(a.y)}var B=[],w=void 0!==b.curveSegments?b.curveSegments:12,x=void 0!==b.steps?b.steps:1,L=void 0!==b.depth?b.depth:100,K=void 0!==b.bevelEnabled?b.bevelEnabled:!0,z=void 0!==b.bevelThickness?b.bevelThickness:6,A=void 0!==b.bevelSize?b.bevelSize:z-2,D=void 0!==b.bevelOffset?b.bevelOffset:0,C=void 0!==b.bevelSegments?b.bevelSegments:3,F=b.extrudePath,E=void 0!==b.UVGenerator?b.UVGenerator:uk;void 0!==b.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),L=
|
|
|
-b.amount);var G=!1;if(F){var I=F.getSpacedPoints(x);G=!0;K=!1;var M=F.computeFrenetFrames(x,!1);var O=new n;var Q=new n;var R=new n}K||(D=A=z=C=0);var N;w=a.extractPoints(w);a=w.shape;var P=w.holes;if(!qb.isClockWise(a)){a=a.reverse();var da=0;for(N=P.length;da<N;da++){var S=P[da];qb.isClockWise(S)&&(P[da]=S.reverse())}}var aa=qb.triangulateShape(a,P),X=a;da=0;for(N=P.length;da<N;da++)S=P[da],a=a.concat(S);var T,Y=a.length,W,ca=aa.length;w=[];var J=0;var U=X.length;var V=U-1;for(T=J+1;J<U;J++,V++,
|
|
|
-T++)V===U&&(V=0),T===U&&(T=0),w[J]=g(X[J],X[V],X[T]);F=[];var ea=w.concat();da=0;for(N=P.length;da<N;da++){S=P[da];var ba=[];J=0;U=S.length;V=U-1;for(T=J+1;J<U;J++,V++,T++)V===U&&(V=0),T===U&&(T=0),ba[J]=g(S[J],S[V],S[T]);F.push(ba);ea=ea.concat(ba)}for(V=0;V<C;V++){U=V/C;var fa=z*Math.cos(U*Math.PI/2);T=A*Math.sin(U*Math.PI/2)+D;J=0;for(U=X.length;J<U;J++){var ha=c(X[J],w[J],T);l(ha.x,ha.y,-fa)}da=0;for(N=P.length;da<N;da++)for(S=P[da],ba=F[da],J=0,U=S.length;J<U;J++)ha=c(S[J],ba[J],T),l(ha.x,ha.y,
|
|
|
--fa)}T=A+D;for(J=0;J<Y;J++)ha=K?c(a[J],ea[J],T):a[J],G?(Q.copy(M.normals[0]).multiplyScalar(ha.x),O.copy(M.binormals[0]).multiplyScalar(ha.y),R.copy(I[0]).add(Q).add(O),l(R.x,R.y,R.z)):l(ha.x,ha.y,0);for(U=1;U<=x;U++)for(J=0;J<Y;J++)ha=K?c(a[J],ea[J],T):a[J],G?(Q.copy(M.normals[U]).multiplyScalar(ha.x),O.copy(M.binormals[U]).multiplyScalar(ha.y),R.copy(I[U]).add(Q).add(O),l(R.x,R.y,R.z)):l(ha.x,ha.y,L/x*U);for(V=C-1;0<=V;V--){U=V/C;fa=z*Math.cos(U*Math.PI/2);T=A*Math.sin(U*Math.PI/2)+D;J=0;for(U=
|
|
|
-X.length;J<U;J++)ha=c(X[J],w[J],T),l(ha.x,ha.y,L+fa);da=0;for(N=P.length;da<N;da++)for(S=P[da],ba=F[da],J=0,U=S.length;J<U;J++)ha=c(S[J],ba[J],T),G?l(ha.x,ha.y+I[x-1].y,I[x-1].x+fa):l(ha.x,ha.y,L+fa)}(function(){var a=e.length/3;if(K){var b=0*Y;for(J=0;J<ca;J++)W=aa[J],k(W[2]+b,W[1]+b,W[0]+b);b=Y*(x+2*C);for(J=0;J<ca;J++)W=aa[J],k(W[0]+b,W[1]+b,W[2]+b)}else{for(J=0;J<ca;J++)W=aa[J],k(W[2],W[1],W[0]);for(J=0;J<ca;J++)W=aa[J],k(W[0]+Y*x,W[1]+Y*x,W[2]+Y*x)}d.addGroup(a,e.length/3-a,0)})();(function(){var a=
|
|
|
+b.x;var e=a.y-b.y;var f=c.x-a.x;var g=c.y-a.y,h=d*d+e*e;if(Math.abs(d*g-e*f)>Number.EPSILON){var l=Math.sqrt(h),m=Math.sqrt(f*f+g*g);h=b.x-e/l;b=b.y+d/l;g=((c.x-g/m-h)*g-(c.y+f/m-b)*f)/(d*g-e*f);f=h+d*g-a.x;d=b+e*g-a.y;e=f*f+d*d;if(2>=e)return new z(f,d);e=Math.sqrt(e/2)}else a=!1,d>Number.EPSILON?f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(f=-e,e=Math.sqrt(h)):(f=d,d=e,e=Math.sqrt(h/2));return new z(f/e,d/e)}function h(a,b){for(J=a.length;0<=
|
|
|
+--J;){var c=J;var f=J-1;0>f&&(f=a.length-1);var g,h=y+2*C;for(g=0;g<h;g++){var l=Y*g,m=Y*(g+1),p=b+f+l,k=b+f+m;m=b+c+m;q(b+c+l);q(p);q(m);q(p);q(k);q(m);l=e.length/3;l=E.generateSideWallUV(d,e,l-6,l-3,l-2,l-1);v(l[0]);v(l[1]);v(l[3]);v(l[1]);v(l[2]);v(l[3])}}}function l(a,b,c){B.push(a);B.push(b);B.push(c)}function k(a,b,c){q(a);q(b);q(c);a=e.length/3;a=E.generateTopUV(d,e,a-3,a-2,a-1);v(a[0]);v(a[1]);v(a[2])}function q(a){e.push(B[3*a]);e.push(B[3*a+1]);e.push(B[3*a+2])}function v(a){f.push(a.x);
|
|
|
+f.push(a.y)}var B=[],w=void 0!==b.curveSegments?b.curveSegments:12,y=void 0!==b.steps?b.steps:1,L=void 0!==b.depth?b.depth:100,K=void 0!==b.bevelEnabled?b.bevelEnabled:!0,x=void 0!==b.bevelThickness?b.bevelThickness:6,A=void 0!==b.bevelSize?b.bevelSize:x-2,D=void 0!==b.bevelOffset?b.bevelOffset:0,C=void 0!==b.bevelSegments?b.bevelSegments:3,F=b.extrudePath,E=void 0!==b.UVGenerator?b.UVGenerator:uk;void 0!==b.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),L=
|
|
|
+b.amount);var G=!1;if(F){var I=F.getSpacedPoints(y);G=!0;K=!1;var M=F.computeFrenetFrames(y,!1);var O=new n;var Q=new n;var R=new n}K||(D=A=x=C=0);var N;w=a.extractPoints(w);a=w.shape;var P=w.holes;if(!qb.isClockWise(a)){a=a.reverse();var da=0;for(N=P.length;da<N;da++){var S=P[da];qb.isClockWise(S)&&(P[da]=S.reverse())}}var aa=qb.triangulateShape(a,P),X=a;da=0;for(N=P.length;da<N;da++)S=P[da],a=a.concat(S);var T,Y=a.length,W,ca=aa.length;w=[];var J=0;var U=X.length;var V=U-1;for(T=J+1;J<U;J++,V++,
|
|
|
+T++)V===U&&(V=0),T===U&&(T=0),w[J]=g(X[J],X[V],X[T]);F=[];var ea=w.concat();da=0;for(N=P.length;da<N;da++){S=P[da];var ba=[];J=0;U=S.length;V=U-1;for(T=J+1;J<U;J++,V++,T++)V===U&&(V=0),T===U&&(T=0),ba[J]=g(S[J],S[V],S[T]);F.push(ba);ea=ea.concat(ba)}for(V=0;V<C;V++){U=V/C;var fa=x*Math.cos(U*Math.PI/2);T=A*Math.sin(U*Math.PI/2)+D;J=0;for(U=X.length;J<U;J++){var ha=c(X[J],w[J],T);l(ha.x,ha.y,-fa)}da=0;for(N=P.length;da<N;da++)for(S=P[da],ba=F[da],J=0,U=S.length;J<U;J++)ha=c(S[J],ba[J],T),l(ha.x,ha.y,
|
|
|
+-fa)}T=A+D;for(J=0;J<Y;J++)ha=K?c(a[J],ea[J],T):a[J],G?(Q.copy(M.normals[0]).multiplyScalar(ha.x),O.copy(M.binormals[0]).multiplyScalar(ha.y),R.copy(I[0]).add(Q).add(O),l(R.x,R.y,R.z)):l(ha.x,ha.y,0);for(U=1;U<=y;U++)for(J=0;J<Y;J++)ha=K?c(a[J],ea[J],T):a[J],G?(Q.copy(M.normals[U]).multiplyScalar(ha.x),O.copy(M.binormals[U]).multiplyScalar(ha.y),R.copy(I[U]).add(Q).add(O),l(R.x,R.y,R.z)):l(ha.x,ha.y,L/y*U);for(V=C-1;0<=V;V--){U=V/C;fa=x*Math.cos(U*Math.PI/2);T=A*Math.sin(U*Math.PI/2)+D;J=0;for(U=
|
|
|
+X.length;J<U;J++)ha=c(X[J],w[J],T),l(ha.x,ha.y,L+fa);da=0;for(N=P.length;da<N;da++)for(S=P[da],ba=F[da],J=0,U=S.length;J<U;J++)ha=c(S[J],ba[J],T),G?l(ha.x,ha.y+I[y-1].y,I[y-1].x+fa):l(ha.x,ha.y,L+fa)}(function(){var a=e.length/3;if(K){var b=0*Y;for(J=0;J<ca;J++)W=aa[J],k(W[2]+b,W[1]+b,W[0]+b);b=Y*(y+2*C);for(J=0;J<ca;J++)W=aa[J],k(W[0]+b,W[1]+b,W[2]+b)}else{for(J=0;J<ca;J++)W=aa[J],k(W[2],W[1],W[0]);for(J=0;J<ca;J++)W=aa[J],k(W[0]+Y*y,W[1]+Y*y,W[2]+Y*y)}d.addGroup(a,e.length/3-a,0)})();(function(){var a=
|
|
|
e.length/3,b=0;h(X,b);b+=X.length;da=0;for(N=P.length;da<N;da++)S=P[da],h(S,b),b+=S.length;d.addGroup(a,e.length/3-a,1)})()}C.call(this);this.type="ExtrudeBufferGeometry";this.parameters={shapes:a,options:b};a=Array.isArray(a)?a:[a];for(var d=this,e=[],f=[],g=0,h=a.length;g<h;g++)c(a[g]);this.setAttribute("position",new D(e,3));this.setAttribute("uv",new D(f,2));this.computeVertexNormals()}function Zh(a,b,c){c.shapes=[];if(Array.isArray(a))for(var d=0,e=a.length;d<e;d++)c.shapes.push(a[d].uuid);else c.shapes.push(a.uuid);
|
|
|
void 0!==b.extrudePath&&(c.options.extrudePath=b.extrudePath.toJSON());return c}function ee(a,b){O.call(this);this.type="TextGeometry";this.parameters={text:a,parameters:b};this.fromBufferGeometry(new Sc(a,b));this.mergeVertices()}function Sc(a,b){b=b||{};var c=b.font;if(!c||!c.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new O;a=c.generateShapes(a,b.size);b.depth=void 0!==b.height?b.height:50;void 0===b.bevelThickness&&(b.bevelThickness=10);
|
|
|
void 0===b.bevelSize&&(b.bevelSize=8);void 0===b.bevelEnabled&&(b.bevelEnabled=!1);fb.call(this,a,b);this.type="TextBufferGeometry"}function fe(a,b,c,d,e,f,g){O.call(this);this.type="SphereGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};this.fromBufferGeometry(new Hb(a,b,c,d,e,f,g));this.mergeVertices()}function Hb(a,b,c,d,e,f,g){C.call(this);this.type="SphereBufferGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,
|
|
|
-phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};a=a||1;b=Math.max(3,Math.floor(b)||8);c=Math.max(2,Math.floor(c)||6);d=void 0!==d?d:0;e=void 0!==e?e:2*Math.PI;f=void 0!==f?f:0;g=void 0!==g?g:Math.PI;var h=Math.min(f+g,Math.PI),l,m,p=0,k=[],t=new n,u=new n,q=[],v=[],B=[],w=[];for(m=0;m<=c;m++){var x=[],L=m/c,K=0;0==m&&0==f?K=.5/b:m==c&&h==Math.PI&&(K=-.5/b);for(l=0;l<=b;l++){var z=l/b;t.x=-a*Math.cos(d+z*e)*Math.sin(f+L*g);t.y=a*Math.cos(f+L*g);t.z=a*Math.sin(d+z*e)*Math.sin(f+L*g);v.push(t.x,t.y,
|
|
|
-t.z);u.copy(t).normalize();B.push(u.x,u.y,u.z);w.push(z+K,1-L);x.push(p++)}k.push(x)}for(m=0;m<c;m++)for(l=0;l<b;l++)a=k[m][l+1],d=k[m][l],e=k[m+1][l],g=k[m+1][l+1],(0!==m||0<f)&&q.push(a,d,g),(m!==c-1||h<Math.PI)&&q.push(d,e,g);this.setIndex(q);this.setAttribute("position",new D(v,3));this.setAttribute("normal",new D(B,3));this.setAttribute("uv",new D(w,2))}function ge(a,b,c,d,e,f){O.call(this);this.type="RingGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,
|
|
|
-thetaLength:f};this.fromBufferGeometry(new Tc(a,b,c,d,e,f));this.mergeVertices()}function Tc(a,b,c,d,e,f){C.call(this);this.type="RingBufferGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,thetaLength:f};a=a||.5;b=b||1;e=void 0!==e?e:0;f=void 0!==f?f:2*Math.PI;c=void 0!==c?Math.max(3,c):8;d=void 0!==d?Math.max(1,d):1;var g=[],h=[],l=[],m=[],p=a,k=(b-a)/d,t=new n,u=new y,q,v;for(q=0;q<=d;q++){for(v=0;v<=c;v++)a=e+v/c*f,t.x=p*Math.cos(a),t.y=p*Math.sin(a),
|
|
|
+phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};a=a||1;b=Math.max(3,Math.floor(b)||8);c=Math.max(2,Math.floor(c)||6);d=void 0!==d?d:0;e=void 0!==e?e:2*Math.PI;f=void 0!==f?f:0;g=void 0!==g?g:Math.PI;var h=Math.min(f+g,Math.PI),l,m,p=0,k=[],t=new n,u=new n,q=[],v=[],B=[],w=[];for(m=0;m<=c;m++){var y=[],L=m/c,K=0;0==m&&0==f?K=.5/b:m==c&&h==Math.PI&&(K=-.5/b);for(l=0;l<=b;l++){var x=l/b;t.x=-a*Math.cos(d+x*e)*Math.sin(f+L*g);t.y=a*Math.cos(f+L*g);t.z=a*Math.sin(d+x*e)*Math.sin(f+L*g);v.push(t.x,t.y,
|
|
|
+t.z);u.copy(t).normalize();B.push(u.x,u.y,u.z);w.push(x+K,1-L);y.push(p++)}k.push(y)}for(m=0;m<c;m++)for(l=0;l<b;l++)a=k[m][l+1],d=k[m][l],e=k[m+1][l],g=k[m+1][l+1],(0!==m||0<f)&&q.push(a,d,g),(m!==c-1||h<Math.PI)&&q.push(d,e,g);this.setIndex(q);this.setAttribute("position",new D(v,3));this.setAttribute("normal",new D(B,3));this.setAttribute("uv",new D(w,2))}function ge(a,b,c,d,e,f){O.call(this);this.type="RingGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,
|
|
|
+thetaLength:f};this.fromBufferGeometry(new Tc(a,b,c,d,e,f));this.mergeVertices()}function Tc(a,b,c,d,e,f){C.call(this);this.type="RingBufferGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,thetaLength:f};a=a||.5;b=b||1;e=void 0!==e?e:0;f=void 0!==f?f:2*Math.PI;c=void 0!==c?Math.max(3,c):8;d=void 0!==d?Math.max(1,d):1;var g=[],h=[],l=[],m=[],p=a,k=(b-a)/d,t=new n,u=new z,q,v;for(q=0;q<=d;q++){for(v=0;v<=c;v++)a=e+v/c*f,t.x=p*Math.cos(a),t.y=p*Math.sin(a),
|
|
|
h.push(t.x,t.y,t.z),l.push(0,0,1),u.x=(t.x/b+1)/2,u.y=(t.y/b+1)/2,m.push(u.x,u.y);p+=k}for(q=0;q<d;q++)for(b=q*(c+1),v=0;v<c;v++)a=v+b,e=a+c+1,f=a+c+2,p=a+1,g.push(a,e,p),g.push(e,f,p);this.setIndex(g);this.setAttribute("position",new D(h,3));this.setAttribute("normal",new D(l,3));this.setAttribute("uv",new D(m,2))}function he(a,b,c,d){O.call(this);this.type="LatheGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};this.fromBufferGeometry(new Uc(a,b,c,d));this.mergeVertices()}function Uc(a,
|
|
|
-b,c,d){C.call(this);this.type="LatheBufferGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};b=Math.floor(b)||12;c=c||0;d=d||2*Math.PI;d=P.clamp(d,0,2*Math.PI);var e=[],f=[],g=[],h=1/b,l=new n,m=new y,p;for(p=0;p<=b;p++){var k=c+p*h*d;var t=Math.sin(k),u=Math.cos(k);for(k=0;k<=a.length-1;k++)l.x=a[k].x*t,l.y=a[k].y,l.z=a[k].x*u,f.push(l.x,l.y,l.z),m.x=p/b,m.y=k/(a.length-1),g.push(m.x,m.y)}for(p=0;p<b;p++)for(k=0;k<a.length-1;k++)c=k+p*a.length,h=c+a.length,l=c+a.length+1,m=c+
|
|
|
+b,c,d){C.call(this);this.type="LatheBufferGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};b=Math.floor(b)||12;c=c||0;d=d||2*Math.PI;d=P.clamp(d,0,2*Math.PI);var e=[],f=[],g=[],h=1/b,l=new n,m=new z,p;for(p=0;p<=b;p++){var k=c+p*h*d;var t=Math.sin(k),u=Math.cos(k);for(k=0;k<=a.length-1;k++)l.x=a[k].x*t,l.y=a[k].y,l.z=a[k].x*u,f.push(l.x,l.y,l.z),m.x=p/b,m.y=k/(a.length-1),g.push(m.x,m.y)}for(p=0;p<b;p++)for(k=0;k<a.length-1;k++)c=k+p*a.length,h=c+a.length,l=c+a.length+1,m=c+
|
|
|
1,e.push(c,h,m),e.push(h,l,m);this.setIndex(e);this.setAttribute("position",new D(f,3));this.setAttribute("uv",new D(g,2));this.computeVertexNormals();if(d===2*Math.PI)for(d=this.attributes.normal.array,e=new n,f=new n,g=new n,c=b*a.length*3,k=p=0;p<a.length;p++,k+=3)e.x=d[k+0],e.y=d[k+1],e.z=d[k+2],f.x=d[c+k+0],f.y=d[c+k+1],f.z=d[c+k+2],g.addVectors(e,f).normalize(),d[k+0]=d[c+k+0]=g.x,d[k+1]=d[c+k+1]=g.y,d[k+2]=d[c+k+2]=g.z}function ec(a,b){O.call(this);this.type="ShapeGeometry";"object"===typeof b&&
|
|
|
(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),b=b.curveSegments);this.parameters={shapes:a,curveSegments:b};this.fromBufferGeometry(new fc(a,b));this.mergeVertices()}function fc(a,b){function c(a){var c,h=e.length/3;a=a.extractPoints(b);var m=a.shape,k=a.holes;!1===qb.isClockWise(m)&&(m=m.reverse());a=0;for(c=k.length;a<c;a++){var p=k[a];!0===qb.isClockWise(p)&&(k[a]=p.reverse())}var n=qb.triangulateShape(m,k);a=0;for(c=k.length;a<c;a++)p=k[a],m=m.concat(p);a=0;for(c=m.length;a<
|
|
|
c;a++)p=m[a],e.push(p.x,p.y,0),f.push(0,0,1),g.push(p.x,p.y);a=0;for(c=n.length;a<c;a++)m=n[a],d.push(m[0]+h,m[1]+h,m[2]+h),l+=3}C.call(this);this.type="ShapeBufferGeometry";this.parameters={shapes:a,curveSegments:b};b=b||12;var d=[],e=[],f=[],g=[],h=0,l=0;if(!1===Array.isArray(a))c(a);else for(var m=0;m<a.length;m++)c(a[m]),this.addGroup(h,l,m),h+=l,l=0;this.setIndex(d);this.setAttribute("position",new D(e,3));this.setAttribute("normal",new D(f,3));this.setAttribute("uv",new D(g,2))}function $h(a,
|
|
|
b){b.shapes=[];if(Array.isArray(a))for(var c=0,d=a.length;c<d;c++)b.shapes.push(a[c].uuid);else b.shapes.push(a.uuid);return b}function Vc(a,b){C.call(this);this.type="EdgesGeometry";this.parameters={thresholdAngle:b};var c=[];b=Math.cos(P.DEG2RAD*(void 0!==b?b:1));var d=[0,0],e={},f=["a","b","c"];if(a.isBufferGeometry){var g=new O;g.fromBufferGeometry(a)}else g=a.clone();g.mergeVertices();g.computeFaceNormals();a=g.vertices;g=g.faces;for(var h=0,l=g.length;h<l;h++)for(var m=g[h],k=0;3>k;k++){var r=
|
|
|
m[f[k]];var t=m[f[(k+1)%3]];d[0]=Math.min(r,t);d[1]=Math.max(r,t);r=d[0]+","+d[1];void 0===e[r]?e[r]={index1:d[0],index2:d[1],face1:h,face2:void 0}:e[r].face2=h}for(r in e)if(d=e[r],void 0===d.face2||g[d.face1].normal.dot(g[d.face2].normal)<=b)f=a[d.index1],c.push(f.x,f.y,f.z),f=a[d.index2],c.push(f.x,f.y,f.z);this.setAttribute("position",new D(c,3))}function gc(a,b,c,d,e,f,g,h){O.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,
|
|
|
-openEnded:f,thetaStart:g,thetaLength:h};this.fromBufferGeometry(new rb(a,b,c,d,e,f,g,h));this.mergeVertices()}function rb(a,b,c,d,e,f,g,h){function l(c){var e,f=new y,l=new n,p=0,v=!0===c?a:b,x=!0===c?1:-1;var A=q;for(e=1;e<=d;e++)r.push(0,B*x,0),t.push(0,x,0),u.push(.5,.5),q++;var E=q;for(e=0;e<=d;e++){var C=e/d*h+g,D=Math.cos(C);C=Math.sin(C);l.x=v*C;l.y=B*x;l.z=v*D;r.push(l.x,l.y,l.z);t.push(0,x,0);f.x=.5*D+.5;f.y=.5*C*x+.5;u.push(f.x,f.y);q++}for(e=0;e<d;e++)f=A+e,l=E+e,!0===c?k.push(l,l+1,f):
|
|
|
-k.push(l+1,l,f),p+=3;m.addGroup(w,p,!0===c?1:2);w+=p}C.call(this);this.type="CylinderBufferGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};var m=this;a=void 0!==a?a:1;b=void 0!==b?b:1;c=c||1;d=Math.floor(d)||8;e=Math.floor(e)||1;f=void 0!==f?f:!1;g=void 0!==g?g:0;h=void 0!==h?h:2*Math.PI;var k=[],r=[],t=[],u=[],q=0,v=[],B=c/2,w=0;(function(){var f,l,p=new n,z=new n,y=0,A=(b-a)/c;for(l=0;l<=e;l++){var C=[],D=l/
|
|
|
-e,E=D*(b-a)+a;for(f=0;f<=d;f++){var F=f/d,G=F*h+g,I=Math.sin(G);G=Math.cos(G);z.x=E*I;z.y=-D*c+B;z.z=E*G;r.push(z.x,z.y,z.z);p.set(I,A,G).normalize();t.push(p.x,p.y,p.z);u.push(F,1-D);C.push(q++)}v.push(C)}for(f=0;f<d;f++)for(l=0;l<e;l++)p=v[l+1][f],z=v[l+1][f+1],A=v[l][f+1],k.push(v[l][f],p,A),k.push(p,z,A),y+=6;m.addGroup(w,y,0);w+=y})();!1===f&&(0<a&&l(!0),0<b&&l(!1));this.setIndex(k);this.setAttribute("position",new D(r,3));this.setAttribute("normal",new D(t,3));this.setAttribute("uv",new D(u,
|
|
|
+openEnded:f,thetaStart:g,thetaLength:h};this.fromBufferGeometry(new rb(a,b,c,d,e,f,g,h));this.mergeVertices()}function rb(a,b,c,d,e,f,g,h){function l(c){var e,f=new z,l=new n,p=0,v=!0===c?a:b,y=!0===c?1:-1;var A=q;for(e=1;e<=d;e++)r.push(0,B*y,0),t.push(0,y,0),u.push(.5,.5),q++;var E=q;for(e=0;e<=d;e++){var C=e/d*h+g,D=Math.cos(C);C=Math.sin(C);l.x=v*C;l.y=B*y;l.z=v*D;r.push(l.x,l.y,l.z);t.push(0,y,0);f.x=.5*D+.5;f.y=.5*C*y+.5;u.push(f.x,f.y);q++}for(e=0;e<d;e++)f=A+e,l=E+e,!0===c?k.push(l,l+1,f):
|
|
|
+k.push(l+1,l,f),p+=3;m.addGroup(w,p,!0===c?1:2);w+=p}C.call(this);this.type="CylinderBufferGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};var m=this;a=void 0!==a?a:1;b=void 0!==b?b:1;c=c||1;d=Math.floor(d)||8;e=Math.floor(e)||1;f=void 0!==f?f:!1;g=void 0!==g?g:0;h=void 0!==h?h:2*Math.PI;var k=[],r=[],t=[],u=[],q=0,v=[],B=c/2,w=0;(function(){var f,l,p=new n,x=new n,z=0,A=(b-a)/c;for(l=0;l<=e;l++){var C=[],D=l/
|
|
|
+e,E=D*(b-a)+a;for(f=0;f<=d;f++){var F=f/d,G=F*h+g,I=Math.sin(G);G=Math.cos(G);x.x=E*I;x.y=-D*c+B;x.z=E*G;r.push(x.x,x.y,x.z);p.set(I,A,G).normalize();t.push(p.x,p.y,p.z);u.push(F,1-D);C.push(q++)}v.push(C)}for(f=0;f<d;f++)for(l=0;l<e;l++)p=v[l+1][f],x=v[l+1][f+1],A=v[l][f+1],k.push(v[l][f],p,A),k.push(p,x,A),z+=6;m.addGroup(w,z,0);w+=z})();!1===f&&(0<a&&l(!0),0<b&&l(!1));this.setIndex(k);this.setAttribute("position",new D(r,3));this.setAttribute("normal",new D(t,3));this.setAttribute("uv",new D(u,
|
|
|
2))}function ie(a,b,c,d,e,f,g){gc.call(this,0,a,b,c,d,e,f,g);this.type="ConeGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function je(a,b,c,d,e,f,g){rb.call(this,0,a,b,c,d,e,f,g);this.type="ConeBufferGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function ke(a,b,c,d){O.call(this);this.type="CircleGeometry";this.parameters={radius:a,segments:b,thetaStart:c,
|
|
|
-thetaLength:d};this.fromBufferGeometry(new Wc(a,b,c,d));this.mergeVertices()}function Wc(a,b,c,d){C.call(this);this.type="CircleBufferGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};a=a||1;b=void 0!==b?Math.max(3,b):8;c=void 0!==c?c:0;d=void 0!==d?d:2*Math.PI;var e=[],f=[],g=[],h=[],l,m=new n,k=new y;f.push(0,0,0);g.push(0,0,1);h.push(.5,.5);var r=0;for(l=3;r<=b;r++,l+=3){var t=c+r/b*d;m.x=a*Math.cos(t);m.y=a*Math.sin(t);f.push(m.x,m.y,m.z);g.push(0,0,1);k.x=(f[l]/a+1)/
|
|
|
+thetaLength:d};this.fromBufferGeometry(new Wc(a,b,c,d));this.mergeVertices()}function Wc(a,b,c,d){C.call(this);this.type="CircleBufferGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};a=a||1;b=void 0!==b?Math.max(3,b):8;c=void 0!==c?c:0;d=void 0!==d?d:2*Math.PI;var e=[],f=[],g=[],h=[],l,m=new n,k=new z;f.push(0,0,0);g.push(0,0,1);h.push(.5,.5);var r=0;for(l=3;r<=b;r++,l+=3){var t=c+r/b*d;m.x=a*Math.cos(t);m.y=a*Math.sin(t);f.push(m.x,m.y,m.z);g.push(0,0,1);k.x=(f[l]/a+1)/
|
|
|
2;k.y=(f[l+1]/a+1)/2;h.push(k.x,k.y)}for(l=1;l<=b;l++)e.push(l,l+1,0);this.setIndex(e);this.setAttribute("position",new D(f,3));this.setAttribute("normal",new D(g,3));this.setAttribute("uv",new D(h,2))}function hc(a){M.call(this);this.type="ShadowMaterial";this.color=new A(0);this.transparent=!0;this.setValues(a)}function Xc(a){za.call(this,a);this.type="RawShaderMaterial"}function gb(a){M.call(this);this.defines={STANDARD:""};this.type="MeshStandardMaterial";this.color=new A(16777215);this.roughness=
|
|
|
-1;this.metalness=0;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new A(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new y(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=this.metalnessMap=this.roughnessMap=null;this.envMapIntensity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=
|
|
|
-1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function ic(a){gb.call(this);this.defines={STANDARD:"",PHYSICAL:""};this.type="MeshPhysicalMaterial";this.reflectivity=.5;this.clearcoatRoughness=this.clearcoat=0;this.sheen=null;this.clearcoatNormalScale=new y(1,1);this.clearcoatNormalMap=null;this.transparency=0;this.setValues(a)}function Ib(a){M.call(this);this.type="MeshPhongMaterial";this.color=new A(16777215);this.specular=
|
|
|
-new A(1118481);this.shininess=30;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new A(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new y(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=this.specularMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=
|
|
|
+1;this.metalness=0;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new A(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new z(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=this.metalnessMap=this.roughnessMap=null;this.envMapIntensity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=
|
|
|
+1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function ic(a){gb.call(this);this.defines={STANDARD:"",PHYSICAL:""};this.type="MeshPhysicalMaterial";this.reflectivity=.5;this.clearcoatRoughness=this.clearcoat=0;this.sheen=null;this.clearcoatNormalScale=new z(1,1);this.clearcoatNormalMap=null;this.transparency=0;this.setValues(a)}function Ib(a){M.call(this);this.type="MeshPhongMaterial";this.color=new A(16777215);this.specular=
|
|
|
+new A(1118481);this.shininess=30;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new A(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new z(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=this.specularMap=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(a)}function jc(a){M.call(this);this.defines={TOON:""};this.type="MeshToonMaterial";this.color=new A(16777215);this.specular=new A(1118481);this.shininess=30;this.lightMap=this.gradientMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new A(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=
|
|
|
-null;this.normalMapType=0;this.normalScale=new y(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=this.specularMap=null;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function kc(a){M.call(this);this.type="MeshNormalMaterial";this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new y(1,1);this.displacementMap=
|
|
|
+null;this.normalMapType=0;this.normalScale=new z(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=this.specularMap=null;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function kc(a){M.call(this);this.type="MeshNormalMaterial";this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new z(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(a)}function lc(a){M.call(this);this.type="MeshLambertMaterial";this.color=new A(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new A(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(a)}function mc(a){M.call(this);this.defines={MATCAP:""};this.type="MeshMatcapMaterial";this.color=new A(16777215);this.bumpMap=this.map=this.matcap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new y(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=
|
|
|
+1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function mc(a){M.call(this);this.defines={MATCAP:""};this.type="MeshMatcapMaterial";this.color=new A(16777215);this.bumpMap=this.map=this.matcap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new z(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=
|
|
|
0;this.alphaMap=null;this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function nc(a){aa.call(this);this.type="LineDashedMaterial";this.scale=1;this.dashSize=3;this.gapSize=1;this.setValues(a)}function La(a,b,c,d){this.parameterPositions=a;this._cachedIndex=0;this.resultBuffer=void 0!==d?d:new b.constructor(c);this.sampleValues=b;this.valueSize=c}function $e(a,b,c,d){La.call(this,a,b,c,d);this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function le(a,b,c,
|
|
|
d){La.call(this,a,b,c,d)}function af(a,b,c,d){La.call(this,a,b,c,d)}function xa(a,b,c,d){if(void 0===a)throw Error("THREE.KeyframeTrack: track name is undefined");if(void 0===b||0===b.length)throw Error("THREE.KeyframeTrack: no keyframes in track named "+a);this.name=a;this.times=sa.convertArray(b,this.TimeBufferType);this.values=sa.convertArray(c,this.ValueBufferType);this.setInterpolation(d||this.DefaultInterpolation)}function bf(a,b,c){xa.call(this,a,b,c)}function cf(a,b,c,d){xa.call(this,a,b,
|
|
|
c,d)}function Yc(a,b,c,d){xa.call(this,a,b,c,d)}function df(a,b,c,d){La.call(this,a,b,c,d)}function me(a,b,c,d){xa.call(this,a,b,c,d)}function ef(a,b,c,d){xa.call(this,a,b,c,d)}function Zc(a,b,c,d){xa.call(this,a,b,c,d)}function Qa(a,b,c){this.name=a;this.tracks=c;this.duration=void 0!==b?b:-1;this.uuid=P.generateUUID();0>this.duration&&this.resetDuration()}function vk(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return Yc;case "vector":case "vector2":case "vector3":case "vector4":return Zc;
|
|
@@ -298,11 +298,11 @@ case "color":return cf;case "quaternion":return me;case "bool":case "boolean":re
|
|
|
this.removeHandler=function(a){a=l.indexOf(a);-1!==a&&l.splice(a,2);return this};this.getHandler=function(a){for(var b=0,c=l.length;b<c;b+=2){var d=l[b],e=l[b+1];d.global&&(d.lastIndex=0);if(d.test(a))return e}return null}}function S(a){this.manager=void 0!==a?a:ai;this.crossOrigin="anonymous";this.resourcePath=this.path=""}function Ra(a){S.call(this,a)}function xg(a){S.call(this,a)}function yg(a){S.call(this,a)}function ff(a){S.call(this,a)}function $c(a){S.call(this,a)}function gf(a){S.call(this,
|
|
|
a)}function hf(a){S.call(this,a)}function I(){this.type="Curve";this.arcLengthDivisions=200}function Ma(a,b,c,d,e,f,g,h){I.call(this);this.type="EllipseCurve";this.aX=a||0;this.aY=b||0;this.xRadius=c||1;this.yRadius=d||1;this.aStartAngle=e||0;this.aEndAngle=f||2*Math.PI;this.aClockwise=g||!1;this.aRotation=h||0}function ad(a,b,c,d,e,f){Ma.call(this,a,b,c,c,d,e,f);this.type="ArcCurve"}function zg(){var a=0,b=0,c=0,d=0;return{initCatmullRom:function(e,f,g,h,l){e=l*(g-e);h=l*(h-f);a=f;b=e;c=-3*f+3*g-
|
|
|
2*e-h;d=2*f-2*g+e+h},initNonuniformCatmullRom:function(e,f,g,h,l,m,k){e=((f-e)/l-(g-e)/(l+m)+(g-f)/m)*m;h=((g-f)/m-(h-f)/(m+k)+(h-g)/k)*m;a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},calc:function(e){var f=e*e;return a+b*e+c*f+d*f*e}}}function Ba(a,b,c,d){I.call(this);this.type="CatmullRomCurve3";this.points=a||[];this.closed=b||!1;this.curveType=c||"centripetal";this.tension=d||.5}function bi(a,b,c,d,e){b=.5*(d-b);e=.5*(e-c);var f=a*a;return(2*c-2*d+b+e)*a*f+(-3*c+3*d-2*b-e)*f+b*a+c}function ne(a,b,c,
|
|
|
-d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function oe(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}function Va(a,b,c,d){I.call(this);this.type="CubicBezierCurve";this.v0=a||new y;this.v1=b||new y;this.v2=c||new y;this.v3=d||new y}function hb(a,b,c,d){I.call(this);this.type="CubicBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n;this.v3=d||new n}function Ha(a,b){I.call(this);this.type="LineCurve";this.v1=a||new y;this.v2=b||new y}function Wa(a,b){I.call(this);
|
|
|
-this.type="LineCurve3";this.v1=a||new n;this.v2=b||new n}function Xa(a,b,c){I.call(this);this.type="QuadraticBezierCurve";this.v0=a||new y;this.v1=b||new y;this.v2=c||new y}function ib(a,b,c){I.call(this);this.type="QuadraticBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n}function Ya(a){I.call(this);this.type="SplineCurve";this.points=a||[]}function sb(){I.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function Za(a){sb.call(this);this.type="Path";this.currentPoint=
|
|
|
-new y;a&&this.setFromPoints(a)}function Jb(a){Za.call(this,a);this.uuid=P.generateUUID();this.type="Shape";this.holes=[]}function Y(a,b){F.call(this);this.type="Light";this.color=new A(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function jf(a,b,c){Y.call(this,a,c);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(F.DefaultUp);this.updateMatrix();this.groundColor=new A(b)}function jb(a){this.camera=a;this.bias=0;this.radius=1;this.mapSize=new y(512,512);this.mapPass=
|
|
|
-this.map=null;this.matrix=new R;this._frustum=new Ed;this._frameExtents=new y(1,1);this._viewportCount=1;this._viewports=[new fa(0,0,1,1)]}function kf(){jb.call(this,new ja(50,1,.5,500))}function lf(a,b,c,d,e,f){Y.call(this,a,b);this.type="SpotLight";this.position.copy(F.DefaultUp);this.updateMatrix();this.target=new F;Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=void 0!==c?c: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 kf}function Ag(){jb.call(this,new ja(90,1,.5,500));this._frameExtents=new y(4,2);this._viewportCount=6;this._viewports=[new fa(2,1,1,1),new fa(0,1,1,1),new fa(3,1,1,1),new fa(1,1,1,1),new fa(3,0,1,1),new fa(1,0,1,1)];this._cubeDirections=[new n(1,0,0),new n(-1,0,0),new n(0,0,1),new n(0,0,-1),new n(0,1,0),new n(0,-1,0)];this._cubeUps=[new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,0,1),new n(0,0,-1)]}function mf(a,
|
|
|
+d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function oe(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}function Va(a,b,c,d){I.call(this);this.type="CubicBezierCurve";this.v0=a||new z;this.v1=b||new z;this.v2=c||new z;this.v3=d||new z}function hb(a,b,c,d){I.call(this);this.type="CubicBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n;this.v3=d||new n}function Ha(a,b){I.call(this);this.type="LineCurve";this.v1=a||new z;this.v2=b||new z}function Wa(a,b){I.call(this);
|
|
|
+this.type="LineCurve3";this.v1=a||new n;this.v2=b||new n}function Xa(a,b,c){I.call(this);this.type="QuadraticBezierCurve";this.v0=a||new z;this.v1=b||new z;this.v2=c||new z}function ib(a,b,c){I.call(this);this.type="QuadraticBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n}function Ya(a){I.call(this);this.type="SplineCurve";this.points=a||[]}function sb(){I.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function Za(a){sb.call(this);this.type="Path";this.currentPoint=
|
|
|
+new z;a&&this.setFromPoints(a)}function Jb(a){Za.call(this,a);this.uuid=P.generateUUID();this.type="Shape";this.holes=[]}function Y(a,b){F.call(this);this.type="Light";this.color=new A(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function jf(a,b,c){Y.call(this,a,c);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(F.DefaultUp);this.updateMatrix();this.groundColor=new A(b)}function jb(a){this.camera=a;this.bias=0;this.radius=1;this.mapSize=new z(512,512);this.mapPass=
|
|
|
+this.map=null;this.matrix=new R;this._frustum=new Ed;this._frameExtents=new z(1,1);this._viewportCount=1;this._viewports=[new fa(0,0,1,1)]}function kf(){jb.call(this,new ja(50,1,.5,500))}function lf(a,b,c,d,e,f){Y.call(this,a,b);this.type="SpotLight";this.position.copy(F.DefaultUp);this.updateMatrix();this.target=new F;Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=void 0!==c?c: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 kf}function Ag(){jb.call(this,new ja(90,1,.5,500));this._frameExtents=new z(4,2);this._viewportCount=6;this._viewports=[new fa(2,1,1,1),new fa(0,1,1,1),new fa(3,1,1,1),new fa(1,1,1,1),new fa(3,0,1,1),new fa(1,0,1,1)];this._cubeDirections=[new n(1,0,0),new n(-1,0,0),new n(0,0,1),new n(0,0,-1),new n(0,1,0),new n(0,-1,0)];this._cubeUps=[new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,0,1),new n(0,0,-1)]}function mf(a,
|
|
|
b,c,d){Y.call(this,a,b);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!==c?c:0;this.decay=void 0!==d?d:1;this.shadow=new Ag}function pe(a,b,c,d,e,f){cb.call(this);this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=void 0!==a?a:-1;this.right=void 0!==b?b:1;this.top=void 0!==c?c: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 nf(){jb.call(this,new pe(-5,5,5,-5,.5,500))}function of(a,b){Y.call(this,a,b);this.type="DirectionalLight";this.position.copy(F.DefaultUp);this.updateMatrix();this.target=new F;this.shadow=new nf}function pf(a,b){Y.call(this,a,b);this.type="AmbientLight";this.castShadow=void 0}function qf(a,b,c,d){Y.call(this,a,b);this.type="RectAreaLight";this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function rf(a){S.call(this,a);this.textures={}}function sf(){C.call(this);
|
|
|
this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function tf(a,b,c,d){"number"===typeof c&&(d=c,c=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));Q.call(this,a,b,c);this.meshPerAttribute=d||1}function uf(a){S.call(this,a)}function vf(a){S.call(this,a)}function Bg(a){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");
|
|
@@ -315,7 +315,7 @@ a.subscribe_(b,c)}function Ca(a,b,c){this.path=b;this.parsedPath=c||Ca.parseTrac
|
|
|
get inUse(){return this.total-d.nCachedObjects_}},get bindingsPerObject(){return d._bindings.length}}}function fi(a,b,c){this._mixer=a;this._clip=b;this._localRoot=c||null;a=b.tracks;b=a.length;c=Array(b);for(var d={endingStart:2400,endingEnd:2400},e=0;e!==b;++e){var f=a[e].createInterpolant(null);c[e]=f;f.settings=d}this._interpolantSettings=d;this._interpolants=c;this._propertyBindings=Array(b);this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null;this.loop=
|
|
|
2201;this._loopCount=-1;this._startTime=null;this.time=0;this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1;this.repetitions=Infinity;this.paused=!1;this.enabled=!0;this.clampWhenFinished=!1;this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function Ng(a){this._root=a;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function yf(a,b){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),a=b);this.value=a}function Og(a,b,c){pb.call(this,
|
|
|
a,b);this.meshPerAttribute=c||1}function gi(a,b,c,d){this.ray=new Sb(a,b);this.near=c||0;this.far=d||Infinity;this.camera=null;this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}};Object.defineProperties(this.params,{PointCloud:{get:function(){console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points.");return this.Points}}})}function hi(a,b){return a.distance-b.distance}function Pg(a,b,c,d){if(!1!==a.visible&&(a.raycast(b,c),!0===d)){a=a.children;d=0;for(var e=
|
|
|
-a.length;d<e;d++)Pg(a[d],b,c,!0)}}function ii(a,b,c){this.radius=void 0!==a?a:1;this.phi=void 0!==b?b:0;this.theta=void 0!==c?c:0;return this}function ji(a,b,c){this.radius=void 0!==a?a:1;this.theta=void 0!==b?b:0;this.y=void 0!==c?c:0;return this}function Qg(a,b){this.min=void 0!==a?a:new y(Infinity,Infinity);this.max=void 0!==b?b:new y(-Infinity,-Infinity)}function Rg(a,b){this.start=void 0!==a?a:new n;this.end=void 0!==b?b:new n}function qe(a){F.call(this);this.material=a;this.render=function(){}}
|
|
|
+a.length;d<e;d++)Pg(a[d],b,c,!0)}}function ii(a,b,c){this.radius=void 0!==a?a:1;this.phi=void 0!==b?b:0;this.theta=void 0!==c?c:0;return this}function ji(a,b,c){this.radius=void 0!==a?a:1;this.theta=void 0!==b?b:0;this.y=void 0!==c?c:0;return this}function Qg(a,b){this.min=void 0!==a?a:new z(Infinity,Infinity);this.max=void 0!==b?b:new z(-Infinity,-Infinity)}function Rg(a,b){this.start=void 0!==a?a:new n;this.end=void 0!==b?b:new n}function qe(a){F.call(this);this.material=a;this.render=function(){}}
|
|
|
function re(a,b,c,d){this.object=a;this.size=void 0!==b?b:1;a=void 0!==c?c:16711680;d=void 0!==d?d:1;b=0;(c=this.object.geometry)&&c.isGeometry?b=3*c.faces.length:c&&c.isBufferGeometry&&(b=c.attributes.normal.count);c=new C;b=new D(6*b,3);c.setAttribute("position",b);T.call(this,c,new aa({color:a,linewidth:d}));this.matrixAutoUpdate=!1;this.update()}function se(a,b,c,d){this.object=a;this.size=void 0!==b?b:1;a=void 0!==c?c:65535;d=void 0!==d?d:1;(b=this.object.geometry)&&b.isBufferGeometry?(c=b.attributes.tangent.count,
|
|
|
b=new C,c=new D(6*c,3),b.setAttribute("position",c),T.call(this,b,new aa({color:a,linewidth:d})),this.matrixAutoUpdate=!1,this.update()):console.error("THREE.VertexTangentsHelper: geometry not an instance of THREE.BufferGeometry.",b)}function cd(a,b){F.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=b;a=new C;b=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(var c=0,d=1;32>c;c++,d++){var e=c/32*Math.PI*2,f=d/
|
|
|
32*Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.setAttribute("position",new D(b,3));b=new aa({fog:!1});this.cone=new T(a,b);this.add(this.cone);this.update()}function ki(a){var b=[];a&&a.isBone&&b.push(a);for(var c=0;c<a.children.length;c++)b.push.apply(b,ki(a.children[c]));return b}function dd(a){for(var b=ki(a),c=new C,d=[],e=[],f=new A(0,0,1),g=new A(0,1,0),h=0;h<b.length;h++){var l=b[h];l.parent&&l.parent.isBone&&(d.push(0,0,0),d.push(0,0,0),e.push(f.r,f.g,f.b),e.push(g.r,
|
|
@@ -339,8 +339,8 @@ Ba.call(this,a);this.type="catmullrom"}function Tg(a){console.warn("THREE.Spline
|
|
|
this._listeners;void 0===c[a]&&(c[a]=[]);-1===c[a].indexOf(b)&&c[a].push(b)},hasEventListener:function(a,b){if(void 0===this._listeners)return!1;var c=this._listeners;return void 0!==c[a]&&-1!==c[a].indexOf(b)},removeEventListener:function(a,b){void 0!==this._listeners&&(a=this._listeners[a],void 0!==a&&(b=a.indexOf(b),-1!==b&&a.splice(b,1)))},dispatchEvent:function(a){if(void 0!==this._listeners){var b=this._listeners[a.type];if(void 0!==b){a.target=this;b=b.slice(0);for(var c=0,d=b.length;c<d;c++)b[c].call(this,
|
|
|
a)}}}});for(var ta=[],ye=0;256>ye;ye++)ta[ye]=(16>ye?"0":"")+ye.toString(16);var P={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var a=4294967295*Math.random()|0,b=4294967295*Math.random()|0,c=4294967295*Math.random()|0,d=4294967295*Math.random()|0;return(ta[a&255]+ta[a>>8&255]+ta[a>>16&255]+ta[a>>24&255]+"-"+ta[b&255]+ta[b>>8&255]+"-"+ta[b>>16&15|64]+ta[b>>24&255]+"-"+ta[c&63|128]+ta[c>>8&255]+"-"+ta[c>>16&255]+ta[c>>24&255]+ta[d&255]+ta[d>>8&255]+ta[d>>16&255]+ta[d>>24&255]).toUpperCase()},
|
|
|
clamp:function(a,b,c){return Math.max(b,Math.min(c,a))},euclideanModulo:function(a,b){return(a%b+b)%b},mapLinear:function(a,b,c,d,e){return d+(a-b)*(e-d)/(c-b)},lerp:function(a,b,c){return(1-c)*a+c*b},smoothstep:function(a,b,c){if(a<=b)return 0;if(a>=c)return 1;a=(a-b)/(c-b);return a*a*(3-2*a)},smootherstep:function(a,b,c){if(a<=b)return 0;if(a>=c)return 1;a=(a-b)/(c-b);return a*a*a*(a*(6*a-15)+10)},randInt:function(a,b){return a+Math.floor(Math.random()*(b-a+1))},randFloat:function(a,b){return a+
|
|
|
-Math.random()*(b-a)},randFloatSpread:function(a){return a*(.5-Math.random())},degToRad:function(a){return a*P.DEG2RAD},radToDeg:function(a){return a*P.RAD2DEG},isPowerOfTwo:function(a){return 0===(a&a-1)&&0!==a},ceilPowerOfTwo:function(a){return Math.pow(2,Math.ceil(Math.log(a)/Math.LN2))},floorPowerOfTwo:function(a){return Math.pow(2,Math.floor(Math.log(a)/Math.LN2))}};Object.defineProperties(y.prototype,{width:{get:function(){return this.x},set:function(a){this.x=a}},height:{get:function(){return this.y},
|
|
|
-set:function(a){this.y=a}}});Object.assign(y.prototype,{isVector2:!0,set:function(a,b){this.x=a;this.y=b;return this},setScalar:function(a){this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;default:throw Error("index is out of range: "+a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;default:throw Error("index is out of range: "+
|
|
|
+Math.random()*(b-a)},randFloatSpread:function(a){return a*(.5-Math.random())},degToRad:function(a){return a*P.DEG2RAD},radToDeg:function(a){return a*P.RAD2DEG},isPowerOfTwo:function(a){return 0===(a&a-1)&&0!==a},ceilPowerOfTwo:function(a){return Math.pow(2,Math.ceil(Math.log(a)/Math.LN2))},floorPowerOfTwo:function(a){return Math.pow(2,Math.floor(Math.log(a)/Math.LN2))}};Object.defineProperties(z.prototype,{width:{get:function(){return this.x},set:function(a){this.x=a}},height:{get:function(){return this.y},
|
|
|
+set:function(a){this.y=a}}});Object.assign(z.prototype,{isVector2:!0,set:function(a,b){this.x=a;this.y=b;return this},setScalar:function(a){this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;default:throw Error("index is out of range: "+a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;default:throw Error("index is out of range: "+
|
|
|
a);}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(a){this.x=a.x;this.y=a.y;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;return this},addScalar:function(a){this.x+=a;this.y+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;return this},
|
|
|
sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;return this},subScalar:function(a){this.x-=a;this.y-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;return this},multiply:function(a){this.x*=a.x;this.y*=a.y;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;return this},divide:function(a){this.x/=a.x;this.y/=a.y;return this},divideScalar:function(a){return this.multiplyScalar(1/
|
|
|
a)},applyMatrix3:function(a){var b=this.x,c=this.y;a=a.elements;this.x=a[0]*b+a[3]*c+a[6];this.y=a[1]*b+a[4]*c+a[7];return this},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));return this},clampScalar:function(a,b){this.x=Math.max(a,Math.min(b,this.x));this.y=Math.max(a,Math.min(b,
|
|
@@ -375,7 +375,7 @@ b,c){var d=Math.sin(b)*a;this.x=d*Math.sin(c);this.y=Math.cos(b)*a;this.z=d*Math
|
|
|
1).length();a=this.setFromMatrixColumn(a,2).length();this.x=b;this.y=c;this.z=a;return this},setFromMatrixColumn:function(a,b){return this.fromArray(a.elements,4*b)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute().");
|
|
|
this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);return this}});var oc=new n;Object.assign(ca.prototype,{isMatrix3:!0,set:function(a,b,c,d,e,f,g,h,l){var m=this.elements;m[0]=a;m[1]=d;m[2]=g;m[3]=b;m[4]=e;m[5]=h;m[6]=c;m[7]=f;m[8]=l;return this},identity:function(){this.set(1,0,0,0,1,0,0,0,1);return this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(a){var b=this.elements;a=a.elements;b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];
|
|
|
b[7]=a[7];b[8]=a[8];return this},setFromMatrix4:function(a){a=a.elements;this.set(a[0],a[4],a[8],a[1],a[5],a[9],a[2],a[6],a[10]);return this},applyToBufferAttribute:function(a){for(var b=0,c=a.count;b<c;b++)oc.x=a.getX(b),oc.y=a.getY(b),oc.z=a.getZ(b),oc.applyMatrix3(this),a.setXYZ(b,oc.x,oc.y,oc.z);return a},multiply:function(a){return this.multiplyMatrices(this,a)},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,b){var c=a.elements,d=b.elements;b=this.elements;
|
|
|
-a=c[0];var e=c[3],f=c[6],g=c[1],h=c[4],l=c[7],m=c[2],k=c[5];c=c[8];var r=d[0],t=d[3],n=d[6],q=d[1],v=d[4],B=d[7],w=d[2],x=d[5];d=d[8];b[0]=a*r+e*q+f*w;b[3]=a*t+e*v+f*x;b[6]=a*n+e*B+f*d;b[1]=g*r+h*q+l*w;b[4]=g*t+h*v+l*x;b[7]=g*n+h*B+l*d;b[2]=m*r+k*q+c*w;b[5]=m*t+k*v+c*x;b[8]=m*n+k*B+c*d;return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[3]*=a;b[6]*=a;b[1]*=a;b[4]*=a;b[7]*=a;b[2]*=a;b[5]*=a;b[8]*=a;return this},determinant:function(){var a=this.elements,b=a[0],c=a[1],d=a[2],e=a[3],
|
|
|
+a=c[0];var e=c[3],f=c[6],g=c[1],h=c[4],l=c[7],m=c[2],k=c[5];c=c[8];var r=d[0],t=d[3],n=d[6],q=d[1],v=d[4],B=d[7],w=d[2],y=d[5];d=d[8];b[0]=a*r+e*q+f*w;b[3]=a*t+e*v+f*y;b[6]=a*n+e*B+f*d;b[1]=g*r+h*q+l*w;b[4]=g*t+h*v+l*y;b[7]=g*n+h*B+l*d;b[2]=m*r+k*q+c*w;b[5]=m*t+k*v+c*y;b[8]=m*n+k*B+c*d;return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[3]*=a;b[6]*=a;b[1]*=a;b[4]*=a;b[7]*=a;b[2]*=a;b[5]*=a;b[8]*=a;return this},determinant:function(){var a=this.elements,b=a[0],c=a[1],d=a[2],e=a[3],
|
|
|
f=a[4],g=a[5],h=a[6],l=a[7];a=a[8];return b*f*a-b*g*l-c*e*a+c*g*h+d*e*l-d*f*h},getInverse:function(a,b){a&&a.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var c=a.elements;a=this.elements;var d=c[0],e=c[1],f=c[2],g=c[3],h=c[4],l=c[5],m=c[6],k=c[7];c=c[8];var r=c*h-l*k,t=l*m-c*g,n=k*g-h*m,q=d*r+e*t+f*n;if(0===q){if(!0===b)throw Error("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0");console.warn("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0");
|
|
|
return this.identity()}b=1/q;a[0]=r*b;a[1]=(f*k-c*e)*b;a[2]=(l*e-f*h)*b;a[3]=t*b;a[4]=(c*d-f*m)*b;a[5]=(f*g-l*d)*b;a[6]=n*b;a[7]=(e*m-k*d)*b;a[8]=(h*d-e*g)*b;return this},transpose:function(){var a=this.elements;var b=a[1];a[1]=a[3];a[3]=b;b=a[2];a[2]=a[6];a[6]=b;b=a[5];a[5]=a[7];a[7]=b;return this},getNormalMatrix:function(a){return this.setFromMatrix4(a).getInverse(this).transpose()},transposeIntoArray:function(a){var b=this.elements;a[0]=b[0];a[1]=b[3];a[2]=b[6];a[3]=b[1];a[4]=b[4];a[5]=b[7];a[6]=
|
|
|
b[2];a[7]=b[5];a[8]=b[8];return this},setUvTransform:function(a,b,c,d,e,f,g){var h=Math.cos(e);e=Math.sin(e);this.set(c*h,c*e,-c*(h*f+e*g)+f+a,-d*e,d*h,-d*(-e*f+h*g)+g+b,0,0,1)},scale:function(a,b){var c=this.elements;c[0]*=a;c[3]*=a;c[6]*=a;c[1]*=b;c[4]*=b;c[7]*=b;return this},rotate:function(a){var b=Math.cos(a);a=Math.sin(a);var c=this.elements,d=c[0],e=c[3],f=c[6],g=c[1],h=c[4],l=c[7];c[0]=b*d+a*g;c[3]=b*e+a*h;c[6]=b*f+a*l;c[1]=-a*d+b*g;c[4]=-a*e+b*h;c[7]=-a*f+b*l;return this},translate:function(a,
|
|
@@ -405,12 +405,12 @@ b.y,c.y,0,a.z,b.z,c.z,0,0,0,0,1);return this},extractRotation:function(a){var b=
|
|
|
var b=this.elements,c=a.x,d=a.y,e=a.z,f=Math.cos(c);c=Math.sin(c);var g=Math.cos(d);d=Math.sin(d);var h=Math.cos(e);e=Math.sin(e);if("XYZ"===a.order){a=f*h;var l=f*e,m=c*h,k=c*e;b[0]=g*h;b[4]=-g*e;b[8]=d;b[1]=l+m*d;b[5]=a-k*d;b[9]=-c*g;b[2]=k-a*d;b[6]=m+l*d;b[10]=f*g}else"YXZ"===a.order?(a=g*h,l=g*e,m=d*h,k=d*e,b[0]=a+k*c,b[4]=m*c-l,b[8]=f*d,b[1]=f*e,b[5]=f*h,b[9]=-c,b[2]=l*c-m,b[6]=k+a*c,b[10]=f*g):"ZXY"===a.order?(a=g*h,l=g*e,m=d*h,k=d*e,b[0]=a-k*c,b[4]=-f*e,b[8]=m+l*c,b[1]=l+m*c,b[5]=f*h,b[9]=
|
|
|
k-a*c,b[2]=-f*d,b[6]=c,b[10]=f*g):"ZYX"===a.order?(a=f*h,l=f*e,m=c*h,k=c*e,b[0]=g*h,b[4]=m*d-l,b[8]=a*d+k,b[1]=g*e,b[5]=k*d+a,b[9]=l*d-m,b[2]=-d,b[6]=c*g,b[10]=f*g):"YZX"===a.order?(a=f*g,l=f*d,m=c*g,k=c*d,b[0]=g*h,b[4]=k-a*e,b[8]=m*e+l,b[1]=e,b[5]=f*h,b[9]=-c*h,b[2]=-d*h,b[6]=l*e+m,b[10]=a-k*e):"XZY"===a.order&&(a=f*g,l=f*d,m=c*g,k=c*d,b[0]=g*h,b[4]=-e,b[8]=d*h,b[1]=a*e+k,b[5]=f*h,b[9]=l*e-m,b[2]=m*e-l,b[6]=c*h,b[10]=k*e+a);b[3]=0;b[7]=0;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},makeRotationFromQuaternion:function(a){return this.compose(xk,
|
|
|
a,yk)},lookAt:function(a,b,c){var d=this.elements;ua.subVectors(a,b);0===ua.lengthSq()&&(ua.z=1);ua.normalize();Lb.crossVectors(c,ua);0===Lb.lengthSq()&&(1===Math.abs(c.z)?ua.x+=1E-4:ua.z+=1E-4,ua.normalize(),Lb.crossVectors(c,ua));Lb.normalize();Df.crossVectors(ua,Lb);d[0]=Lb.x;d[4]=Df.x;d[8]=ua.x;d[1]=Lb.y;d[5]=Df.y;d[9]=ua.y;d[2]=Lb.z;d[6]=Df.z;d[10]=ua.z;return this},multiply:function(a,b){return void 0!==b?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),
|
|
|
-this.multiplyMatrices(a,b)):this.multiplyMatrices(this,a)},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,b){var c=a.elements,d=b.elements;b=this.elements;a=c[0];var e=c[4],f=c[8],g=c[12],h=c[1],l=c[5],m=c[9],k=c[13],r=c[2],n=c[6],u=c[10],q=c[14],v=c[3],B=c[7],w=c[11];c=c[15];var x=d[0],y=d[4],A=d[8],z=d[12],C=d[1],D=d[5],F=d[9],G=d[13],E=d[2],I=d[6],M=d[10],N=d[14],O=d[3],P=d[7],Q=d[11];d=d[15];b[0]=a*x+e*C+f*E+g*O;b[4]=a*y+e*D+f*I+g*P;b[8]=a*A+e*F+f*M+
|
|
|
-g*Q;b[12]=a*z+e*G+f*N+g*d;b[1]=h*x+l*C+m*E+k*O;b[5]=h*y+l*D+m*I+k*P;b[9]=h*A+l*F+m*M+k*Q;b[13]=h*z+l*G+m*N+k*d;b[2]=r*x+n*C+u*E+q*O;b[6]=r*y+n*D+u*I+q*P;b[10]=r*A+n*F+u*M+q*Q;b[14]=r*z+n*G+u*N+q*d;b[3]=v*x+B*C+w*E+c*O;b[7]=v*y+B*D+w*I+c*P;b[11]=v*A+B*F+w*M+c*Q;b[15]=v*z+B*G+w*N+c*d;return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[4]*=a;b[8]*=a;b[12]*=a;b[1]*=a;b[5]*=a;b[9]*=a;b[13]*=a;b[2]*=a;b[6]*=a;b[10]*=a;b[14]*=a;b[3]*=a;b[7]*=a;b[11]*=a;b[15]*=a;return this},applyToBufferAttribute:function(a){for(var b=
|
|
|
+this.multiplyMatrices(a,b)):this.multiplyMatrices(this,a)},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,b){var c=a.elements,d=b.elements;b=this.elements;a=c[0];var e=c[4],f=c[8],g=c[12],h=c[1],l=c[5],m=c[9],k=c[13],r=c[2],n=c[6],u=c[10],q=c[14],v=c[3],B=c[7],w=c[11];c=c[15];var y=d[0],z=d[4],A=d[8],x=d[12],C=d[1],D=d[5],F=d[9],G=d[13],E=d[2],I=d[6],M=d[10],N=d[14],O=d[3],P=d[7],Q=d[11];d=d[15];b[0]=a*y+e*C+f*E+g*O;b[4]=a*z+e*D+f*I+g*P;b[8]=a*A+e*F+f*M+
|
|
|
+g*Q;b[12]=a*x+e*G+f*N+g*d;b[1]=h*y+l*C+m*E+k*O;b[5]=h*z+l*D+m*I+k*P;b[9]=h*A+l*F+m*M+k*Q;b[13]=h*x+l*G+m*N+k*d;b[2]=r*y+n*C+u*E+q*O;b[6]=r*z+n*D+u*I+q*P;b[10]=r*A+n*F+u*M+q*Q;b[14]=r*x+n*G+u*N+q*d;b[3]=v*y+B*C+w*E+c*O;b[7]=v*z+B*D+w*I+c*P;b[11]=v*A+B*F+w*M+c*Q;b[15]=v*x+B*G+w*N+c*d;return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[4]*=a;b[8]*=a;b[12]*=a;b[1]*=a;b[5]*=a;b[9]*=a;b[13]*=a;b[2]*=a;b[6]*=a;b[10]*=a;b[14]*=a;b[3]*=a;b[7]*=a;b[11]*=a;b[15]*=a;return this},applyToBufferAttribute:function(a){for(var b=
|
|
|
0,c=a.count;b<c;b++)Na.x=a.getX(b),Na.y=a.getY(b),Na.z=a.getZ(b),Na.applyMatrix4(this),a.setXYZ(b,Na.x,Na.y,Na.z);return a},determinant:function(){var a=this.elements,b=a[0],c=a[4],d=a[8],e=a[12],f=a[1],g=a[5],h=a[9],l=a[13],m=a[2],k=a[6],r=a[10],n=a[14];return a[3]*(+e*h*k-d*l*k-e*g*r+c*l*r+d*g*n-c*h*n)+a[7]*(+b*h*n-b*l*r+e*f*r-d*f*n+d*l*m-e*h*m)+a[11]*(+b*l*k-b*g*n-e*f*k+c*f*n+e*g*m-c*l*m)+a[15]*(-d*g*m-b*h*k+b*g*r+d*f*k-c*f*r+c*h*m)},transpose:function(){var a=this.elements;var b=a[1];a[1]=a[4];
|
|
|
-a[4]=b;b=a[2];a[2]=a[8];a[8]=b;b=a[6];a[6]=a[9];a[9]=b;b=a[3];a[3]=a[12];a[12]=b;b=a[7];a[7]=a[13];a[13]=b;b=a[11];a[11]=a[14];a[14]=b;return this},setPosition:function(a,b,c){var d=this.elements;a.isVector3?(d[12]=a.x,d[13]=a.y,d[14]=a.z):(d[12]=a,d[13]=b,d[14]=c);return this},getInverse:function(a,b){var c=this.elements,d=a.elements;a=d[0];var e=d[1],f=d[2],g=d[3],h=d[4],l=d[5],m=d[6],k=d[7],r=d[8],n=d[9],u=d[10],q=d[11],v=d[12],B=d[13],w=d[14];d=d[15];var x=n*w*k-B*u*k+B*m*q-l*w*q-n*m*d+l*u*d,
|
|
|
-y=v*u*k-r*w*k-v*m*q+h*w*q+r*m*d-h*u*d,A=r*B*k-v*n*k+v*l*q-h*B*q-r*l*d+h*n*d,z=v*n*m-r*B*m-v*l*u+h*B*u+r*l*w-h*n*w,C=a*x+e*y+f*A+g*z;if(0===C){if(!0===b)throw Error("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0");console.warn("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0");return this.identity()}b=1/C;c[0]=x*b;c[1]=(B*u*g-n*w*g-B*f*q+e*w*q+n*f*d-e*u*d)*b;c[2]=(l*w*g-B*m*g+B*f*k-e*w*k-l*f*d+e*m*d)*b;c[3]=(n*m*g-l*u*g-n*f*k+e*u*k+l*f*q-e*m*q)*b;c[4]=y*b;c[5]=
|
|
|
-(r*w*g-v*u*g+v*f*q-a*w*q-r*f*d+a*u*d)*b;c[6]=(v*m*g-h*w*g-v*f*k+a*w*k+h*f*d-a*m*d)*b;c[7]=(h*u*g-r*m*g+r*f*k-a*u*k-h*f*q+a*m*q)*b;c[8]=A*b;c[9]=(v*n*g-r*B*g-v*e*q+a*B*q+r*e*d-a*n*d)*b;c[10]=(h*B*g-v*l*g+v*e*k-a*B*k-h*e*d+a*l*d)*b;c[11]=(r*l*g-h*n*g-r*e*k+a*n*k+h*e*q-a*l*q)*b;c[12]=z*b;c[13]=(r*B*f-v*n*f+v*e*u-a*B*u-r*e*w+a*n*w)*b;c[14]=(v*l*f-h*B*f-v*e*m+a*B*m+h*e*w-a*l*w)*b;c[15]=(h*n*f-r*l*f+r*e*m-a*n*m-h*e*u+a*l*u)*b;return this},scale:function(a){var b=this.elements,c=a.x,d=a.y;a=a.z;b[0]*=c;
|
|
|
+a[4]=b;b=a[2];a[2]=a[8];a[8]=b;b=a[6];a[6]=a[9];a[9]=b;b=a[3];a[3]=a[12];a[12]=b;b=a[7];a[7]=a[13];a[13]=b;b=a[11];a[11]=a[14];a[14]=b;return this},setPosition:function(a,b,c){var d=this.elements;a.isVector3?(d[12]=a.x,d[13]=a.y,d[14]=a.z):(d[12]=a,d[13]=b,d[14]=c);return this},getInverse:function(a,b){var c=this.elements,d=a.elements;a=d[0];var e=d[1],f=d[2],g=d[3],h=d[4],l=d[5],m=d[6],k=d[7],r=d[8],n=d[9],u=d[10],q=d[11],v=d[12],B=d[13],w=d[14];d=d[15];var y=n*w*k-B*u*k+B*m*q-l*w*q-n*m*d+l*u*d,
|
|
|
+z=v*u*k-r*w*k-v*m*q+h*w*q+r*m*d-h*u*d,A=r*B*k-v*n*k+v*l*q-h*B*q-r*l*d+h*n*d,x=v*n*m-r*B*m-v*l*u+h*B*u+r*l*w-h*n*w,C=a*y+e*z+f*A+g*x;if(0===C){if(!0===b)throw Error("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0");console.warn("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0");return this.identity()}b=1/C;c[0]=y*b;c[1]=(B*u*g-n*w*g-B*f*q+e*w*q+n*f*d-e*u*d)*b;c[2]=(l*w*g-B*m*g+B*f*k-e*w*k-l*f*d+e*m*d)*b;c[3]=(n*m*g-l*u*g-n*f*k+e*u*k+l*f*q-e*m*q)*b;c[4]=z*b;c[5]=
|
|
|
+(r*w*g-v*u*g+v*f*q-a*w*q-r*f*d+a*u*d)*b;c[6]=(v*m*g-h*w*g-v*f*k+a*w*k+h*f*d-a*m*d)*b;c[7]=(h*u*g-r*m*g+r*f*k-a*u*k-h*f*q+a*m*q)*b;c[8]=A*b;c[9]=(v*n*g-r*B*g-v*e*q+a*B*q+r*e*d-a*n*d)*b;c[10]=(h*B*g-v*l*g+v*e*k-a*B*k-h*e*d+a*l*d)*b;c[11]=(r*l*g-h*n*g-r*e*k+a*n*k+h*e*q-a*l*q)*b;c[12]=x*b;c[13]=(r*B*f-v*n*f+v*e*u-a*B*u-r*e*w+a*n*w)*b;c[14]=(v*l*f-h*B*f-v*e*m+a*B*m+h*e*w-a*l*w)*b;c[15]=(h*n*f-r*l*f+r*e*m-a*n*m-h*e*u+a*l*u)*b;return this},scale:function(a){var b=this.elements,c=a.x,d=a.y;a=a.z;b[0]*=c;
|
|
|
b[4]*=d;b[8]*=a;b[1]*=c;b[5]*=d;b[9]*=a;b[2]*=c;b[6]*=d;b[10]*=a;b[3]*=c;b[7]*=d;b[11]*=a;return this},getMaxScaleOnAxis:function(){var a=this.elements;return Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1]+a[2]*a[2],a[4]*a[4]+a[5]*a[5]+a[6]*a[6],a[8]*a[8]+a[9]*a[9]+a[10]*a[10]))},makeTranslation:function(a,b,c){this.set(1,0,0,a,0,1,0,b,0,0,1,c,0,0,0,1);return this},makeRotationX:function(a){var b=Math.cos(a);a=Math.sin(a);this.set(1,0,0,0,0,b,-a,0,0,a,b,0,0,0,0,1);return this},makeRotationY:function(a){var b=
|
|
|
Math.cos(a);a=Math.sin(a);this.set(b,0,a,0,0,1,0,0,-a,0,b,0,0,0,0,1);return this},makeRotationZ:function(a){var b=Math.cos(a);a=Math.sin(a);this.set(b,-a,0,0,a,b,0,0,0,0,1,0,0,0,0,1);return this},makeRotationAxis:function(a,b){var c=Math.cos(b);b=Math.sin(b);var d=1-c,e=a.x,f=a.y;a=a.z;var g=d*e,h=d*f;this.set(g*e+c,g*f-b*a,g*a+b*f,0,g*f+b*a,h*f+c,h*a-b*e,0,g*a-b*f,h*a+b*e,d*a*a+c,0,0,0,0,1);return this},makeScale:function(a,b,c){this.set(a,0,0,0,0,b,0,0,0,0,c,0,0,0,0,1);return this},makeShear:function(a,
|
|
|
b,c){this.set(1,b,c,0,a,1,c,0,a,b,1,0,0,0,0,1);return this},compose:function(a,b,c){var d=this.elements,e=b._x,f=b._y,g=b._z,h=b._w,l=e+e,m=f+f,k=g+g;b=e*l;var r=e*m;e*=k;var n=f*m;f*=k;g*=k;l*=h;m*=h;h*=k;k=c.x;var u=c.y;c=c.z;d[0]=(1-(n+g))*k;d[1]=(r+h)*k;d[2]=(e-m)*k;d[3]=0;d[4]=(r-h)*u;d[5]=(1-(b+g))*u;d[6]=(f+l)*u;d[7]=0;d[8]=(e+m)*c;d[9]=(f-l)*c;d[10]=(1-(b+n))*c;d[11]=0;d[12]=a.x;d[13]=a.y;d[14]=a.z;d[15]=1;return this},decompose:function(a,b,c){var d=this.elements,e=Na.set(d[0],d[1],d[2]).length(),
|
|
@@ -504,16 +504,16 @@ a.dithering;this.alphaTest=a.alphaTest;this.premultipliedAlpha=a.premultipliedAl
|
|
|
a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=
|
|
|
a.skinning;this.morphTargets=a.morphTargets;return this};var W=new n;Object.defineProperty(Q.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(Q.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setUsage:function(a){this.usage=a;return this},copy:function(a){this.name=a.name;this.array=new a.array.constructor(a.array);this.itemSize=a.itemSize;this.count=a.count;this.normalized=a.normalized;this.usage=a.usage;return this},copyAt:function(a,b,c){a*=this.itemSize;
|
|
|
c*=b.itemSize;for(var d=0,e=this.itemSize;d<e;d++)this.array[a+d]=b.array[c+d];return this},copyArray:function(a){this.array.set(a);return this},copyColorsArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",d),f=new A);b[c++]=f.r;b[c++]=f.g;b[c++]=f.b}return this},copyVector2sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",
|
|
|
-d),f=new y);b[c++]=f.x;b[c++]=f.y}return this},copyVector3sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",d),f=new n);b[c++]=f.x;b[c++]=f.y;b[c++]=f.z}return this},copyVector4sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",d),f=new fa);b[c++]=f.x;b[c++]=f.y;
|
|
|
+d),f=new z);b[c++]=f.x;b[c++]=f.y}return this},copyVector3sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",d),f=new n);b[c++]=f.x;b[c++]=f.y;b[c++]=f.z}return this},copyVector4sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",d),f=new fa);b[c++]=f.x;b[c++]=f.y;
|
|
|
b[c++]=f.z;b[c++]=f.w}return this},applyMatrix3:function(a){for(var b=0,c=this.count;b<c;b++)W.x=this.getX(b),W.y=this.getY(b),W.z=this.getZ(b),W.applyMatrix3(a),this.setXYZ(b,W.x,W.y,W.z);return this},applyMatrix4:function(a){for(var b=0,c=this.count;b<c;b++)W.x=this.getX(b),W.y=this.getY(b),W.z=this.getZ(b),W.applyMatrix4(a),this.setXYZ(b,W.x,W.y,W.z);return this},applyNormalMatrix:function(a){for(var b=0,c=this.count;b<c;b++)W.x=this.getX(b),W.y=this.getY(b),W.z=this.getZ(b),W.applyNormalMatrix(a),
|
|
|
this.setXYZ(b,W.x,W.y,W.z);return this},transformDirection:function(a){for(var b=0,c=this.count;b<c;b++)W.x=this.getX(b),W.y=this.getY(b),W.z=this.getZ(b),W.transformDirection(a),this.setXYZ(b,W.x,W.y,W.z);return this},set:function(a,b){void 0===b&&(b=0);this.array.set(a,b);return this},getX:function(a){return this.array[a*this.itemSize]},setX:function(a,b){this.array[a*this.itemSize]=b;return this},getY:function(a){return this.array[a*this.itemSize+1]},setY:function(a,b){this.array[a*this.itemSize+
|
|
|
1]=b;return this},getZ:function(a){return this.array[a*this.itemSize+2]},setZ:function(a,b){this.array[a*this.itemSize+2]=b;return this},getW:function(a){return this.array[a*this.itemSize+3]},setW:function(a,b){this.array[a*this.itemSize+3]=b;return this},setXY:function(a,b,c){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=c;return this},setXYZ:function(a,b,c,d){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=c;this.array[a+2]=d;return this},setXYZW:function(a,b,c,d,e){a*=this.itemSize;this.array[a+
|
|
|
0]=b;this.array[a+1]=c;this.array[a+2]=d;this.array[a+3]=e;return this},onUpload:function(a){this.onUploadCallback=a;return this},clone:function(){return(new this.constructor(this.array,this.itemSize)).copy(this)},toJSON:function(){return{itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized}}});xd.prototype=Object.create(Q.prototype);xd.prototype.constructor=xd;yd.prototype=Object.create(Q.prototype);yd.prototype.constructor=
|
|
|
yd;zd.prototype=Object.create(Q.prototype);zd.prototype.constructor=zd;Ad.prototype=Object.create(Q.prototype);Ad.prototype.constructor=Ad;Tb.prototype=Object.create(Q.prototype);Tb.prototype.constructor=Tb;Bd.prototype=Object.create(Q.prototype);Bd.prototype.constructor=Bd;Ub.prototype=Object.create(Q.prototype);Ub.prototype.constructor=Ub;D.prototype=Object.create(Q.prototype);D.prototype.constructor=D;Cd.prototype=Object.create(Q.prototype);Cd.prototype.constructor=Cd;Object.assign(ph.prototype,
|
|
|
{computeGroups:function(a){var b=[],c=void 0;a=a.faces;for(var d=0;d<a.length;d++){var e=a[d];if(e.materialIndex!==c){c=e.materialIndex;void 0!==f&&(f.count=3*d-f.start,b.push(f));var f={start:3*d,materialIndex:c}}}void 0!==f&&(f.count=3*d-f.start,b.push(f));this.groups=b},fromGeometry:function(a){var b=a.faces,c=a.vertices,d=a.faceVertexUvs,e=d[0]&&0<d[0].length,f=d[1]&&0<d[1].length,g=a.morphTargets,h=g.length;if(0<h){var l=[];for(var m=0;m<h;m++)l[m]={name:g[m].name,data:[]};this.morphTargets.position=
|
|
|
-l}var k=a.morphNormals,n=k.length;if(0<n){var t=[];for(m=0;m<n;m++)t[m]={name:k[m].name,data:[]};this.morphTargets.normal=t}var u=a.skinIndices,q=a.skinWeights,v=u.length===c.length,B=q.length===c.length;0<c.length&&0===b.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(m=0;m<b.length;m++){var w=b[m];this.vertices.push(c[w.a],c[w.b],c[w.c]);var x=w.vertexNormals;3===x.length?this.normals.push(x[0],x[1],x[2]):(x=w.normal,this.normals.push(x,x,x));x=w.vertexColors;
|
|
|
-3===x.length?this.colors.push(x[0],x[1],x[2]):(x=w.color,this.colors.push(x,x,x));!0===e&&(x=d[0][m],void 0!==x?this.uvs.push(x[0],x[1],x[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",m),this.uvs.push(new y,new y,new y)));!0===f&&(x=d[1][m],void 0!==x?this.uvs2.push(x[0],x[1],x[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",m),this.uvs2.push(new y,new y,new y)));for(x=0;x<h;x++){var A=g[x].vertices;l[x].data.push(A[w.a],A[w.b],A[w.c])}for(x=
|
|
|
-0;x<n;x++)A=k[x].vertexNormals[m],t[x].data.push(A.a,A.b,A.c);v&&this.skinIndices.push(u[w.a],u[w.b],u[w.c]);B&&this.skinWeights.push(q[w.a],q[w.b],q[w.c])}this.computeGroups(a);this.verticesNeedUpdate=a.verticesNeedUpdate;this.normalsNeedUpdate=a.normalsNeedUpdate;this.colorsNeedUpdate=a.colorsNeedUpdate;this.uvsNeedUpdate=a.uvsNeedUpdate;this.groupsNeedUpdate=a.groupsNeedUpdate;null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());
|
|
|
+l}var k=a.morphNormals,n=k.length;if(0<n){var t=[];for(m=0;m<n;m++)t[m]={name:k[m].name,data:[]};this.morphTargets.normal=t}var u=a.skinIndices,q=a.skinWeights,v=u.length===c.length,B=q.length===c.length;0<c.length&&0===b.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(m=0;m<b.length;m++){var w=b[m];this.vertices.push(c[w.a],c[w.b],c[w.c]);var y=w.vertexNormals;3===y.length?this.normals.push(y[0],y[1],y[2]):(y=w.normal,this.normals.push(y,y,y));y=w.vertexColors;
|
|
|
+3===y.length?this.colors.push(y[0],y[1],y[2]):(y=w.color,this.colors.push(y,y,y));!0===e&&(y=d[0][m],void 0!==y?this.uvs.push(y[0],y[1],y[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",m),this.uvs.push(new z,new z,new z)));!0===f&&(y=d[1][m],void 0!==y?this.uvs2.push(y[0],y[1],y[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",m),this.uvs2.push(new z,new z,new z)));for(y=0;y<h;y++){var A=g[y].vertices;l[y].data.push(A[w.a],A[w.b],A[w.c])}for(y=
|
|
|
+0;y<n;y++)A=k[y].vertexNormals[m],t[y].data.push(A.a,A.b,A.c);v&&this.skinIndices.push(u[w.a],u[w.b],u[w.c]);B&&this.skinWeights.push(q[w.a],q[w.b],q[w.c])}this.computeGroups(a);this.verticesNeedUpdate=a.verticesNeedUpdate;this.normalsNeedUpdate=a.normalsNeedUpdate;this.colorsNeedUpdate=a.colorsNeedUpdate;this.uvsNeedUpdate=a.uvsNeedUpdate;this.groupsNeedUpdate=a.groupsNeedUpdate;null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());
|
|
|
return this}});var Zi=1,kb=new R,ch=new F,rd=new n,Oa=new Sa,Ce=new Sa,ea=new n;C.prototype=Object.assign(Object.create(Da.prototype),{constructor:C,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(a){Array.isArray(a)?this.index=new (65535<qh(a)?Ub:Tb)(a,1):this.index=a},getAttribute:function(a){return this.attributes[a]},setAttribute:function(a,b){this.attributes[a]=b;return this},deleteAttribute:function(a){delete this.attributes[a];return this},addGroup:function(a,b,
|
|
|
c){this.groups.push({start:a,count:b,materialIndex:void 0!==c?c:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(a,b){this.drawRange.start=a;this.drawRange.count=b},applyMatrix:function(a){var b=this.attributes.position;void 0!==b&&(b.applyMatrix4(a),b.needsUpdate=!0);b=this.attributes.normal;if(void 0!==b){var c=(new ca).getNormalMatrix(a);b.applyNormalMatrix(c);b.needsUpdate=!0}b=this.attributes.tangent;void 0!==b&&(b.transformDirection(a),b.needsUpdate=!0);null!==this.boundingBox&&
|
|
|
this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();return this},rotateX:function(a){kb.makeRotationX(a);this.applyMatrix(kb);return this},rotateY:function(a){kb.makeRotationY(a);this.applyMatrix(kb);return this},rotateZ:function(a){kb.makeRotationZ(a);this.applyMatrix(kb);return this},translate:function(a,b,c){kb.makeTranslation(a,b,c);this.applyMatrix(kb);return this},scale:function(a,b,c){kb.makeScale(a,b,c);this.applyMatrix(kb);return this},lookAt:function(a){ch.lookAt(a);
|
|
@@ -536,15 +536,15 @@ d=0;for(e=c.length;d<e;d++)f=c[d],b.addGroup(f.start,f.count,f.materialIndex);re
|
|
|
array:Array.prototype.slice.call(b.array)});var c=this.attributes;for(m in c){b=c[m];var d=b.toJSON();""!==b.name&&(d.name=b.name);a.data.attributes[m]=d}c={};var e=!1;for(m in this.morphAttributes){for(var f=this.morphAttributes[m],g=[],h=0,l=f.length;h<l;h++)b=f[h],d=b.toJSON(),""!==b.name&&(d.name=b.name),g.push(d);0<g.length&&(c[m]=g,e=!0)}e&&(a.data.morphAttributes=c,a.data.morphTargetsRelative=this.morphTargetsRelative);var m=this.groups;0<m.length&&(a.data.groups=JSON.parse(JSON.stringify(m)));
|
|
|
m=this.boundingSphere;null!==m&&(a.data.boundingSphere={center:m.center.toArray(),radius:m.radius});return a},clone:function(){return(new C).copy(this)},copy:function(a){var b;this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;this.name=a.name;var c=a.index;null!==c&&this.setIndex(c.clone());c=a.attributes;for(g in c)this.setAttribute(g,c[g].clone());var d=a.morphAttributes;for(g in d){var e=[],f=d[g];c=0;for(b=f.length;c<b;c++)e.push(f[c].clone());
|
|
|
this.morphAttributes[g]=e}this.morphTargetsRelative=a.morphTargetsRelative;var g=a.groups;c=0;for(b=g.length;c<b;c++)d=g[c],this.addGroup(d.start,d.count,d.materialIndex);g=a.boundingBox;null!==g&&(this.boundingBox=g.clone());g=a.boundingSphere;null!==g&&(this.boundingSphere=g.clone());this.drawRange.start=a.drawRange.start;this.drawRange.count=a.drawRange.count;this.userData=a.userData;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});var wi=new R,qc=new Sb,dh=new nb,Vb=new n,
|
|
|
-Wb=new n,Xb=new n,gg=new n,hg=new n,ig=new n,Ne=new n,Oe=new n,Pe=new n,yc=new y,zc=new y,Ac=new y,Dd=new n,Le=new n;V.prototype=Object.assign(Object.create(F.prototype),{constructor:V,isMesh:!0,copy:function(a){F.prototype.copy.call(this,a);void 0!==a.morphTargetInfluences&&(this.morphTargetInfluences=a.morphTargetInfluences.slice());void 0!==a.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},a.morphTargetDictionary));return this},updateMorphTargets:function(){var a=this.geometry;
|
|
|
+Wb=new n,Xb=new n,gg=new n,hg=new n,ig=new n,Ne=new n,Oe=new n,Pe=new n,yc=new z,zc=new z,Ac=new z,Dd=new n,Le=new n;V.prototype=Object.assign(Object.create(F.prototype),{constructor:V,isMesh:!0,copy:function(a){F.prototype.copy.call(this,a);void 0!==a.morphTargetInfluences&&(this.morphTargetInfluences=a.morphTargetInfluences.slice());void 0!==a.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},a.morphTargetDictionary));return this},updateMorphTargets:function(){var a=this.geometry;
|
|
|
if(a.isBufferGeometry){a=a.morphAttributes;var b=Object.keys(a);if(0<b.length){var c=a[b[0]];if(void 0!==c)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},a=0,b=c.length;a<b;a++){var d=c[a].name||String(a);this.morphTargetInfluences.push(0);this.morphTargetDictionary[d]=a}}}else a=a.morphTargets,void 0!==a&&0<a.length&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")},raycast:function(a,b){var c=this.geometry,d=this.material,
|
|
|
e=this.matrixWorld;if(void 0!==d&&(null===c.boundingSphere&&c.computeBoundingSphere(),dh.copy(c.boundingSphere),dh.applyMatrix4(e),!1!==a.ray.intersectsSphere(dh)&&(wi.getInverse(e),qc.copy(a.ray).applyMatrix4(wi),null===c.boundingBox||!1!==qc.intersectsBox(c.boundingBox))))if(c.isBufferGeometry){var f=c.index;e=c.attributes.position;var g=c.morphAttributes.position,h=c.morphTargetsRelative,l=c.attributes.uv,m=c.attributes.uv2,k=c.groups,n=c.drawRange,t,u;if(null!==f)if(Array.isArray(d)){var q=0;
|
|
|
-for(t=k.length;q<t;q++){var v=k[q];var B=d[v.materialIndex];var w=Math.max(v.start,n.start);for(u=c=Math.min(v.start+v.count,n.start+n.count);w<u;w+=3){c=f.getX(w);var x=f.getX(w+1);var A=f.getX(w+2);if(c=Me(this,B,a,qc,e,g,h,l,m,c,x,A))c.faceIndex=Math.floor(w/3),c.face.materialIndex=v.materialIndex,b.push(c)}}}else for(w=Math.max(0,n.start),c=Math.min(f.count,n.start+n.count),q=w,t=c;q<t;q+=3){if(c=f.getX(q),x=f.getX(q+1),A=f.getX(q+2),c=Me(this,d,a,qc,e,g,h,l,m,c,x,A))c.faceIndex=Math.floor(q/
|
|
|
-3),b.push(c)}else if(void 0!==e)if(Array.isArray(d))for(q=0,t=k.length;q<t;q++)for(v=k[q],B=d[v.materialIndex],w=Math.max(v.start,n.start),u=c=Math.min(v.start+v.count,n.start+n.count);w<u;w+=3){if(c=w,x=w+1,A=w+2,c=Me(this,B,a,qc,e,g,h,l,m,c,x,A))c.faceIndex=Math.floor(w/3),c.face.materialIndex=v.materialIndex,b.push(c)}else for(w=Math.max(0,n.start),c=Math.min(e.count,n.start+n.count),q=w,t=c;q<t;q+=3)if(c=q,x=q+1,A=q+2,c=Me(this,d,a,qc,e,g,h,l,m,c,x,A))c.faceIndex=Math.floor(q/3),b.push(c)}else if(c.isGeometry)for(e=
|
|
|
-Array.isArray(d),g=c.vertices,h=c.faces,c=c.faceVertexUvs[0],0<c.length&&(f=c),n=0,q=h.length;n<q;n++)if(t=h[n],c=e?d[t.materialIndex]:d,void 0!==c&&(l=g[t.a],m=g[t.b],k=g[t.c],c=rh(this,c,a,qc,l,m,k,Dd)))f&&f[n]&&(v=f[n],yc.copy(v[0]),zc.copy(v[1]),Ac.copy(v[2]),c.uv=va.getUV(Dd,l,m,k,yc,zc,Ac,new y)),c.face=t,c.faceIndex=n,b.push(c)},clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});var $i=0,lb=new R,eh=new F,Lf=new n;O.prototype=Object.assign(Object.create(Da.prototype),
|
|
|
+for(t=k.length;q<t;q++){var v=k[q];var B=d[v.materialIndex];var w=Math.max(v.start,n.start);for(u=c=Math.min(v.start+v.count,n.start+n.count);w<u;w+=3){c=f.getX(w);var y=f.getX(w+1);var A=f.getX(w+2);if(c=Me(this,B,a,qc,e,g,h,l,m,c,y,A))c.faceIndex=Math.floor(w/3),c.face.materialIndex=v.materialIndex,b.push(c)}}}else for(w=Math.max(0,n.start),c=Math.min(f.count,n.start+n.count),q=w,t=c;q<t;q+=3){if(c=f.getX(q),y=f.getX(q+1),A=f.getX(q+2),c=Me(this,d,a,qc,e,g,h,l,m,c,y,A))c.faceIndex=Math.floor(q/
|
|
|
+3),b.push(c)}else if(void 0!==e)if(Array.isArray(d))for(q=0,t=k.length;q<t;q++)for(v=k[q],B=d[v.materialIndex],w=Math.max(v.start,n.start),u=c=Math.min(v.start+v.count,n.start+n.count);w<u;w+=3){if(c=w,y=w+1,A=w+2,c=Me(this,B,a,qc,e,g,h,l,m,c,y,A))c.faceIndex=Math.floor(w/3),c.face.materialIndex=v.materialIndex,b.push(c)}else for(w=Math.max(0,n.start),c=Math.min(e.count,n.start+n.count),q=w,t=c;q<t;q+=3)if(c=q,y=q+1,A=q+2,c=Me(this,d,a,qc,e,g,h,l,m,c,y,A))c.faceIndex=Math.floor(q/3),b.push(c)}else if(c.isGeometry)for(e=
|
|
|
+Array.isArray(d),g=c.vertices,h=c.faces,c=c.faceVertexUvs[0],0<c.length&&(f=c),n=0,q=h.length;n<q;n++)if(t=h[n],c=e?d[t.materialIndex]:d,void 0!==c&&(l=g[t.a],m=g[t.b],k=g[t.c],c=rh(this,c,a,qc,l,m,k,Dd)))f&&f[n]&&(v=f[n],yc.copy(v[0]),zc.copy(v[1]),Ac.copy(v[2]),c.uv=va.getUV(Dd,l,m,k,yc,zc,Ac,new z)),c.face=t,c.faceIndex=n,b.push(c)},clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});var $i=0,lb=new R,eh=new F,Lf=new n;O.prototype=Object.assign(Object.create(Da.prototype),
|
|
|
{constructor:O,isGeometry:!0,applyMatrix:function(a){for(var b=(new ca).getNormalMatrix(a),c=0,d=this.vertices.length;c<d;c++)this.vertices[c].applyMatrix4(a);c=0;for(d=this.faces.length;c<d;c++){a=this.faces[c];a.normal.applyMatrix3(b).normalize();for(var e=0,f=a.vertexNormals.length;e<f;e++)a.vertexNormals[e].applyMatrix3(b).normalize()}null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();this.normalsNeedUpdate=this.verticesNeedUpdate=!0;return this},
|
|
|
rotateX:function(a){lb.makeRotationX(a);this.applyMatrix(lb);return this},rotateY:function(a){lb.makeRotationY(a);this.applyMatrix(lb);return this},rotateZ:function(a){lb.makeRotationZ(a);this.applyMatrix(lb);return this},translate:function(a,b,c){lb.makeTranslation(a,b,c);this.applyMatrix(lb);return this},scale:function(a,b,c){lb.makeScale(a,b,c);this.applyMatrix(lb);return this},lookAt:function(a){eh.lookAt(a);eh.updateMatrix();this.applyMatrix(eh.matrix);return this},fromBufferGeometry:function(a){function b(a,
|
|
|
-b,d,e){var f=void 0===h?[]:[c.colors[a].clone(),c.colors[b].clone(),c.colors[d].clone()],k=void 0===g?[]:[(new n).fromArray(g,3*a),(new n).fromArray(g,3*b),(new n).fromArray(g,3*d)];e=new xc(a,b,d,k,f,e);c.faces.push(e);void 0!==l&&c.faceVertexUvs[0].push([(new y).fromArray(l,2*a),(new y).fromArray(l,2*b),(new y).fromArray(l,2*d)]);void 0!==m&&c.faceVertexUvs[1].push([(new y).fromArray(m,2*a),(new y).fromArray(m,2*b),(new y).fromArray(m,2*d)])}var c=this,d=null!==a.index?a.index.array:void 0,e=a.attributes;
|
|
|
+b,d,e){var f=void 0===h?[]:[c.colors[a].clone(),c.colors[b].clone(),c.colors[d].clone()],k=void 0===g?[]:[(new n).fromArray(g,3*a),(new n).fromArray(g,3*b),(new n).fromArray(g,3*d)];e=new xc(a,b,d,k,f,e);c.faces.push(e);void 0!==l&&c.faceVertexUvs[0].push([(new z).fromArray(l,2*a),(new z).fromArray(l,2*b),(new z).fromArray(l,2*d)]);void 0!==m&&c.faceVertexUvs[1].push([(new z).fromArray(m,2*a),(new z).fromArray(m,2*b),(new z).fromArray(m,2*d)])}var c=this,d=null!==a.index?a.index.array:void 0,e=a.attributes;
|
|
|
if(void 0===e.position)return console.error("THREE.Geometry.fromBufferGeometry(): Position attribute required for conversion."),this;var f=e.position.array,g=void 0!==e.normal?e.normal.array:void 0,h=void 0!==e.color?e.color.array:void 0,l=void 0!==e.uv?e.uv.array:void 0,m=void 0!==e.uv2?e.uv2.array:void 0;void 0!==m&&(this.faceVertexUvs[1]=[]);for(e=0;e<f.length;e+=3)c.vertices.push((new n).fromArray(f,e)),void 0!==h&&c.colors.push((new A).fromArray(h,e));var k=a.groups;if(0<k.length)for(e=0;e<k.length;e++){f=
|
|
|
k[e];var r=f.start,t=r;for(r+=f.count;t<r;t+=3)void 0!==d?b(d[t],d[t+1],d[t+2],f.materialIndex):b(t,t+1,t+2,f.materialIndex)}else if(void 0!==d)for(e=0;e<d.length;e+=3)b(d[e],d[e+1],d[e+2]);else for(e=0;e<f.length/3;e+=3)b(e,e+1,e+2);this.computeFaceNormals();null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());return this},center:function(){this.computeBoundingBox();this.boundingBox.getCenter(Lf).negate();this.translate(Lf.x,
|
|
|
Lf.y,Lf.z);return this},normalize:function(){this.computeBoundingSphere();var a=this.boundingSphere.center,b=this.boundingSphere.radius;b=0===b?1:1/b;var c=new R;c.set(b,0,0,-b*a.x,0,b,0,-b*a.y,0,0,b,-b*a.z,0,0,0,1);this.applyMatrix(c);return this},computeFaceNormals:function(){for(var a=new n,b=new n,c=0,d=this.faces.length;c<d;c++){var e=this.faces[c],f=this.vertices[e.a],g=this.vertices[e.b];a.subVectors(this.vertices[e.c],g);b.subVectors(f,g);a.cross(b);a.normalize();e.normal.copy(a)}},computeVertexNormals:function(a){void 0===
|
|
@@ -559,14 +559,14 @@ c[b];e=[];h=0;for(l=d.length;h<l;h++)e.push(d[h].clone());this.faceVertexUvs[n].
|
|
|
g=Math.round(g.x*d)+"_"+Math.round(g.y*d)+"_"+Math.round(g.z*d);void 0===a[g]?(a[g]=f,b.push(this.vertices[f]),c[f]=b.length-1):c[f]=c[a[g]]}a=[];f=0;for(e=this.faces.length;f<e;f++)for(d=this.faces[f],d.a=c[d.a],d.b=c[d.b],d.c=c[d.c],d=[d.a,d.b,d.c],g=0;3>g;g++)if(d[g]===d[(g+1)%3]){a.push(f);break}for(f=a.length-1;0<=f;f--)for(d=a[f],this.faces.splice(d,1),c=0,e=this.faceVertexUvs.length;c<e;c++)this.faceVertexUvs[c].splice(d,1);f=this.vertices.length-b.length;this.vertices=b;return f},setFromPoints:function(a){this.vertices=
|
|
|
[];for(var b=0,c=a.length;b<c;b++){var d=a[b];this.vertices.push(new n(d.x,d.y,d.z||0))}return this},sortFacesByMaterialIndex:function(){for(var a=this.faces,b=a.length,c=0;c<b;c++)a[c]._id=c;a.sort(function(a,b){return a.materialIndex-b.materialIndex});var d=this.faceVertexUvs[0],e=this.faceVertexUvs[1],f,g;d&&d.length===b&&(f=[]);e&&e.length===b&&(g=[]);for(c=0;c<b;c++){var h=a[c]._id;f&&f.push(d[h]);g&&g.push(e[h])}f&&(this.faceVertexUvs[0]=f);g&&(this.faceVertexUvs[1]=g)},toJSON:function(){function a(a,
|
|
|
b,c){return c?a|1<<b:a&~(1<<b)}function b(a){var b=a.x.toString()+a.y.toString()+a.z.toString();if(void 0!==m[b])return m[b];m[b]=l.length/3;l.push(a.x,a.y,a.z);return m[b]}function c(a){var b=a.r.toString()+a.g.toString()+a.b.toString();if(void 0!==n[b])return n[b];n[b]=k.length;k.push(a.getHex());return n[b]}function d(a){var b=a.x.toString()+a.y.toString();if(void 0!==u[b])return u[b];u[b]=t.length/2;t.push(a.x,a.y);return u[b]}var e={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};
|
|
|
-e.uuid=this.uuid;e.type=this.type;""!==this.name&&(e.name=this.name);if(void 0!==this.parameters){var f=this.parameters,g;for(g in f)void 0!==f[g]&&(e[g]=f[g]);return e}f=[];for(g=0;g<this.vertices.length;g++){var h=this.vertices[g];f.push(h.x,h.y,h.z)}h=[];var l=[],m={},k=[],n={},t=[],u={};for(g=0;g<this.faces.length;g++){var q=this.faces[g],v=void 0!==this.faceVertexUvs[0][g],B=0<q.normal.length(),w=0<q.vertexNormals.length,x=1!==q.color.r||1!==q.color.g||1!==q.color.b,A=0<q.vertexColors.length,
|
|
|
-y=0;y=a(y,0,0);y=a(y,1,!0);y=a(y,2,!1);y=a(y,3,v);y=a(y,4,B);y=a(y,5,w);y=a(y,6,x);y=a(y,7,A);h.push(y);h.push(q.a,q.b,q.c);h.push(q.materialIndex);v&&(v=this.faceVertexUvs[0][g],h.push(d(v[0]),d(v[1]),d(v[2])));B&&h.push(b(q.normal));w&&(B=q.vertexNormals,h.push(b(B[0]),b(B[1]),b(B[2])));x&&h.push(c(q.color));A&&(q=q.vertexColors,h.push(c(q[0]),c(q[1]),c(q[2])))}e.data={};e.data.vertices=f;e.data.normals=l;0<k.length&&(e.data.colors=k);0<t.length&&(e.data.uvs=[t]);e.data.faces=h;return e},clone:function(){return(new O).copy(this)},
|
|
|
+e.uuid=this.uuid;e.type=this.type;""!==this.name&&(e.name=this.name);if(void 0!==this.parameters){var f=this.parameters,g;for(g in f)void 0!==f[g]&&(e[g]=f[g]);return e}f=[];for(g=0;g<this.vertices.length;g++){var h=this.vertices[g];f.push(h.x,h.y,h.z)}h=[];var l=[],m={},k=[],n={},t=[],u={};for(g=0;g<this.faces.length;g++){var q=this.faces[g],v=void 0!==this.faceVertexUvs[0][g],B=0<q.normal.length(),w=0<q.vertexNormals.length,y=1!==q.color.r||1!==q.color.g||1!==q.color.b,A=0<q.vertexColors.length,
|
|
|
+z=0;z=a(z,0,0);z=a(z,1,!0);z=a(z,2,!1);z=a(z,3,v);z=a(z,4,B);z=a(z,5,w);z=a(z,6,y);z=a(z,7,A);h.push(z);h.push(q.a,q.b,q.c);h.push(q.materialIndex);v&&(v=this.faceVertexUvs[0][g],h.push(d(v[0]),d(v[1]),d(v[2])));B&&h.push(b(q.normal));w&&(B=q.vertexNormals,h.push(b(B[0]),b(B[1]),b(B[2])));y&&h.push(c(q.color));A&&(q=q.vertexColors,h.push(c(q[0]),c(q[1]),c(q[2])))}e.data={};e.data.vertices=f;e.data.normals=l;0<k.length&&(e.data.colors=k);0<t.length&&(e.data.uvs=[t]);e.data.faces=h;return e},clone:function(){return(new O).copy(this)},
|
|
|
copy:function(a){var b,c,d;this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.name=a.name;var e=a.vertices;var f=0;for(b=e.length;f<b;f++)this.vertices.push(e[f].clone());e=a.colors;f=0;for(b=e.length;f<b;f++)this.colors.push(e[f].clone());e=a.faces;f=0;for(b=e.length;f<b;f++)this.faces.push(e[f].clone());f=0;for(b=a.faceVertexUvs.length;f<
|
|
|
b;f++){var g=a.faceVertexUvs[f];void 0===this.faceVertexUvs[f]&&(this.faceVertexUvs[f]=[]);e=0;for(c=g.length;e<c;e++){var h=g[e],l=[];var m=0;for(d=h.length;m<d;m++)l.push(h[m].clone());this.faceVertexUvs[f].push(l)}}m=a.morphTargets;f=0;for(b=m.length;f<b;f++){d={};d.name=m[f].name;if(void 0!==m[f].vertices)for(d.vertices=[],e=0,c=m[f].vertices.length;e<c;e++)d.vertices.push(m[f].vertices[e].clone());if(void 0!==m[f].normals)for(d.normals=[],e=0,c=m[f].normals.length;e<c;e++)d.normals.push(m[f].normals[e].clone());
|
|
|
this.morphTargets.push(d)}m=a.morphNormals;f=0;for(b=m.length;f<b;f++){d={};if(void 0!==m[f].vertexNormals)for(d.vertexNormals=[],e=0,c=m[f].vertexNormals.length;e<c;e++)g=m[f].vertexNormals[e],h={},h.a=g.a.clone(),h.b=g.b.clone(),h.c=g.c.clone(),d.vertexNormals.push(h);if(void 0!==m[f].faceNormals)for(d.faceNormals=[],e=0,c=m[f].faceNormals.length;e<c;e++)d.faceNormals.push(m[f].faceNormals[e].clone());this.morphNormals.push(d)}e=a.skinWeights;f=0;for(b=e.length;f<b;f++)this.skinWeights.push(e[f].clone());
|
|
|
e=a.skinIndices;f=0;for(b=e.length;f<b;f++)this.skinIndices.push(e[f].clone());e=a.lineDistances;f=0;for(b=e.length;f<b;f++)this.lineDistances.push(e[f]);f=a.boundingBox;null!==f&&(this.boundingBox=f.clone());f=a.boundingSphere;null!==f&&(this.boundingSphere=f.clone());this.elementsNeedUpdate=a.elementsNeedUpdate;this.verticesNeedUpdate=a.verticesNeedUpdate;this.uvsNeedUpdate=a.uvsNeedUpdate;this.normalsNeedUpdate=a.normalsNeedUpdate;this.colorsNeedUpdate=a.colorsNeedUpdate;this.lineDistancesNeedUpdate=
|
|
|
a.lineDistancesNeedUpdate;this.groupsNeedUpdate=a.groupsNeedUpdate;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});var fh=function(a){function b(b,d,e,f,g,h){a.call(this);this.type="BoxGeometry";this.parameters={width:b,height:d,depth:e,widthSegments:f,heightSegments:g,depthSegments:h};this.fromBufferGeometry(new Gd(b,d,e,f,g,h));this.mergeVertices()}a&&(b.__proto__=a);b.prototype=Object.create(a&&a.prototype);return b.prototype.constructor=b}(O),Gd=function(a){function b(b,
|
|
|
-d,e,f,g,h){function c(a,b,c,d,e,f,g,h,l,p,y){var w=f/l,B=g/p,x=f/2,z=g/2,A=h/2;g=l+1;var C=p+1,D=f=0,E,F,G=new n;for(F=0;F<C;F++){var K=F*B-z;for(E=0;E<g;E++)G[a]=(E*w-x)*d,G[b]=K*e,G[c]=A,r.push(G.x,G.y,G.z),G[a]=0,G[b]=0,G[c]=0<h?1:-1,t.push(G.x,G.y,G.z),u.push(E/l),u.push(1-F/p),f+=1}for(F=0;F<p;F++)for(E=0;E<l;E++)a=q+E+g*(F+1),b=q+(E+1)+g*(F+1),c=q+(E+1)+g*F,k.push(q+E+g*F,a,c),k.push(a,b,c),D+=6;m.addGroup(v,D,y);v+=D;q+=f}a.call(this);this.type="BoxBufferGeometry";this.parameters={width:b,
|
|
|
+d,e,f,g,h){function c(a,b,c,d,e,f,g,h,l,p,z){var w=f/l,B=g/p,x=f/2,y=g/2,A=h/2;g=l+1;var C=p+1,D=f=0,E,F,G=new n;for(F=0;F<C;F++){var K=F*B-y;for(E=0;E<g;E++)G[a]=(E*w-x)*d,G[b]=K*e,G[c]=A,r.push(G.x,G.y,G.z),G[a]=0,G[b]=0,G[c]=0<h?1:-1,t.push(G.x,G.y,G.z),u.push(E/l),u.push(1-F/p),f+=1}for(F=0;F<p;F++)for(E=0;E<l;E++)a=q+E+g*(F+1),b=q+(E+1)+g*(F+1),c=q+(E+1)+g*F,k.push(q+E+g*F,a,c),k.push(a,b,c),D+=6;m.addGroup(v,D,z);v+=D;q+=f}a.call(this);this.type="BoxBufferGeometry";this.parameters={width:b,
|
|
|
height:d,depth:e,widthSegments:f,heightSegments:g,depthSegments:h};var m=this;b=b||1;d=d||1;e=e||1;f=Math.floor(f)||1;g=Math.floor(g)||1;h=Math.floor(h)||1;var k=[],r=[],t=[],u=[],q=0,v=0;c("z","y","x",-1,-1,e,d,b,h,g,0);c("z","y","x",1,-1,e,d,-b,h,g,1);c("x","z","y",1,1,b,e,d,f,h,2);c("x","z","y",1,-1,b,e,-d,f,h,3);c("x","y","z",1,-1,b,d,e,f,g,4);c("x","y","z",-1,-1,b,d,-e,f,g,5);this.setIndex(k);this.setAttribute("position",new D(r,3));this.setAttribute("normal",new D(t,3));this.setAttribute("uv",
|
|
|
new D(u,2))}a&&(b.__proto__=a);b.prototype=Object.create(a&&a.prototype);return b.prototype.constructor=b}(C),Gk={clone:Yb,merge:ma};za.prototype=Object.create(M.prototype);za.prototype.constructor=za;za.prototype.isShaderMaterial=!0;za.prototype.copy=function(a){M.prototype.copy.call(this,a);this.fragmentShader=a.fragmentShader;this.vertexShader=a.vertexShader;this.uniforms=Yb(a.uniforms);this.defines=Object.assign({},a.defines);this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;
|
|
|
this.lights=a.lights;this.clipping=a.clipping;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;this.extensions=a.extensions;return this};za.prototype.toJSON=function(a){var b=M.prototype.toJSON.call(this,a);b.uniforms={};for(var c in this.uniforms){var d=this.uniforms[c].value;b.uniforms[c]=d&&d.isTexture?{type:"t",value:d.toJSON(a).uuid}:d&&d.isColor?{type:"c",value:d.getHex()}:d&&d.isVector2?{type:"v2",value:d.toArray()}:d&&d.isVector3?{type:"v3",value:d.toArray()}:
|
|
@@ -655,15 +655,15 @@ shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#in
|
|
|
sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",
|
|
|
sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}"},
|
|
|
G={common:{diffuse:{value:new A(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new ca},uv2Transform:{value:new ca},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},
|
|
|
-bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new y(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:2.5E-4},fogNear:{value:1},fogFar:{value:2E3},fogColor:{value:new A(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},
|
|
|
+bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new z(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:2.5E-4},fogNear:{value:1},fogFar:{value:2E3},fogColor:{value:new A(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},
|
|
|
color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},
|
|
|
-shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new A(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new ca}},sprite:{diffuse:{value:new A(15658734)},opacity:{value:1},center:{value:new y(.5,.5)},rotation:{value:0},map:{value:null},
|
|
|
+shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new A(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new ca}},sprite:{diffuse:{value:new A(15658734)},opacity:{value:1},center:{value:new z(.5,.5)},rotation:{value:0},map:{value:null},
|
|
|
alphaMap:{value:null},uvTransform:{value:new ca}}},db={basic:{uniforms:ma([G.common,G.specularmap,G.envmap,G.aomap,G.lightmap,G.fog]),vertexShader:N.meshbasic_vert,fragmentShader:N.meshbasic_frag},lambert:{uniforms:ma([G.common,G.specularmap,G.envmap,G.aomap,G.lightmap,G.emissivemap,G.fog,G.lights,{emissive:{value:new A(0)}}]),vertexShader:N.meshlambert_vert,fragmentShader:N.meshlambert_frag},phong:{uniforms:ma([G.common,G.specularmap,G.envmap,G.aomap,G.lightmap,G.emissivemap,G.bumpmap,G.normalmap,
|
|
|
G.displacementmap,G.fog,G.lights,{emissive:{value:new A(0)},specular:{value:new A(1118481)},shininess:{value:30}}]),vertexShader:N.meshphong_vert,fragmentShader:N.meshphong_frag},standard:{uniforms:ma([G.common,G.envmap,G.aomap,G.lightmap,G.emissivemap,G.bumpmap,G.normalmap,G.displacementmap,G.roughnessmap,G.metalnessmap,G.fog,G.lights,{emissive:{value:new A(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:N.meshphysical_vert,fragmentShader:N.meshphysical_frag},
|
|
|
toon:{uniforms:ma([G.common,G.specularmap,G.aomap,G.lightmap,G.emissivemap,G.bumpmap,G.normalmap,G.displacementmap,G.gradientmap,G.fog,G.lights,{emissive:{value:new A(0)},specular:{value:new A(1118481)},shininess:{value:30}}]),vertexShader:N.meshtoon_vert,fragmentShader:N.meshtoon_frag},matcap:{uniforms:ma([G.common,G.bumpmap,G.normalmap,G.displacementmap,G.fog,{matcap:{value:null}}]),vertexShader:N.meshmatcap_vert,fragmentShader:N.meshmatcap_frag},points:{uniforms:ma([G.points,G.fog]),vertexShader:N.points_vert,
|
|
|
fragmentShader:N.points_frag},dashed:{uniforms:ma([G.common,G.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:N.linedashed_vert,fragmentShader:N.linedashed_frag},depth:{uniforms:ma([G.common,G.displacementmap]),vertexShader:N.depth_vert,fragmentShader:N.depth_frag},normal:{uniforms:ma([G.common,G.bumpmap,G.normalmap,G.displacementmap,{opacity:{value:1}}]),vertexShader:N.normal_vert,fragmentShader:N.normal_frag},sprite:{uniforms:ma([G.sprite,G.fog]),vertexShader:N.sprite_vert,
|
|
|
fragmentShader:N.sprite_frag},background:{uniforms:{uvTransform:{value:new ca},t2D:{value:null}},vertexShader:N.background_vert,fragmentShader:N.background_frag},cube:{uniforms:ma([G.envmap,{opacity:{value:1}}]),vertexShader:N.cube_vert,fragmentShader:N.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:N.equirect_vert,fragmentShader:N.equirect_frag},distanceRGBA:{uniforms:ma([G.common,G.displacementmap,{referencePosition:{value:new n},nearDistance:{value:1},farDistance:{value:1E3}}]),
|
|
|
-vertexShader:N.distanceRGBA_vert,fragmentShader:N.distanceRGBA_frag},shadow:{uniforms:ma([G.lights,G.fog,{color:{value:new A(0)},opacity:{value:1}}]),vertexShader:N.shadow_vert,fragmentShader:N.shadow_frag}};db.physical={uniforms:ma([db.standard.uniforms,{transparency:{value:0},clearcoat:{value:0},clearcoatRoughness:{value:0},sheen:{value:new A(0)},clearcoatNormalScale:{value:new y(1,1)},clearcoatNormalMap:{value:null}}]),vertexShader:N.meshphysical_vert,fragmentShader:N.meshphysical_frag};Fd.prototype=
|
|
|
+vertexShader:N.distanceRGBA_vert,fragmentShader:N.distanceRGBA_frag},shadow:{uniforms:ma([G.lights,G.fog,{color:{value:new A(0)},opacity:{value:1}}]),vertexShader:N.shadow_vert,fragmentShader:N.shadow_frag}};db.physical={uniforms:ma([db.standard.uniforms,{transparency:{value:0},clearcoat:{value:0},clearcoatRoughness:{value:0},sheen:{value:new A(0)},clearcoatNormalScale:{value:new z(1,1)},clearcoatNormalMap:{value:null}}]),vertexShader:N.meshphysical_vert,fragmentShader:N.meshphysical_frag};Fd.prototype=
|
|
|
Object.create(O.prototype);Fd.prototype.constructor=Fd;$b.prototype=Object.create(C.prototype);$b.prototype.constructor=$b;ob.prototype=Object.create(X.prototype);ob.prototype.constructor=ob;ob.prototype.isCubeTexture=!0;Object.defineProperty(ob.prototype,"images",{get:function(){return this.image},set:function(a){this.image=a}});Cc.prototype=Object.create(X.prototype);Cc.prototype.constructor=Cc;Cc.prototype.isDataTexture2DArray=!0;Dc.prototype=Object.create(X.prototype);Dc.prototype.constructor=
|
|
|
Dc;Dc.prototype.isDataTexture3D=!0;var zh=new X,vj=new Cc,xj=new Dc,Ah=new ob,th=[],vh=[],yh=new Float32Array(16),xh=new Float32Array(9),wh=new Float32Array(4);Bh.prototype.updateCache=function(a){var b=this.cache;a instanceof Float32Array&&b.length!==a.length&&(this.cache=new Float32Array(a.length));Ka(b,a)};Ch.prototype.setValue=function(a,b,c){for(var d=this.seq,e=0,f=d.length;e!==f;++e){var g=d[e];g.setValue(a,b[g.id],c)}};var jg=/([\w\d_]+)(\])?(\[|\.)?/g;Cb.prototype.setValue=function(a,b,c,
|
|
|
d){b=this.map[b];void 0!==b&&b.setValue(a,c,d)};Cb.prototype.setOptional=function(a,b,c){b=b[c];void 0!==b&&this.setValue(a,c,b)};Cb.upload=function(a,b,c,d){for(var e=0,f=b.length;e!==f;++e){var g=b[e],h=c[g.id];!1!==h.needsUpdate&&g.setValue(a,h.value,d)}};Cb.seqWithValue=function(a,b){for(var c=[],d=0,e=a.length;d!==e;++d){var f=a[d];f.id in b&&c.push(f)}return c};var ck=0,lg=/^[ \t]*#include +<([\w\d./]+)>/gm,Kh=/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g,
|
|
@@ -675,9 +675,9 @@ Object.assign(Ue.prototype,{isFogExp2:!0,clone:function(){return new Ue(this.col
|
|
|
a;return this}});var rc=new n;Object.defineProperties(Ld.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}});Object.assign(Ld.prototype,{isInterleavedBufferAttribute:!0,applyMatrix4:function(a){for(var b=0,c=this.data.count;b<c;b++)rc.x=this.getX(b),rc.y=this.getY(b),rc.z=this.getZ(b),rc.applyMatrix4(a),this.setXYZ(b,rc.x,rc.y,rc.z);return this},setX:function(a,b){this.data.array[a*this.data.stride+this.offset]=b;return this},setY:function(a,
|
|
|
b){this.data.array[a*this.data.stride+this.offset+1]=b;return this},setZ:function(a,b){this.data.array[a*this.data.stride+this.offset+2]=b;return this},setW:function(a,b){this.data.array[a*this.data.stride+this.offset+3]=b;return this},getX:function(a){return this.data.array[a*this.data.stride+this.offset]},getY:function(a){return this.data.array[a*this.data.stride+this.offset+1]},getZ:function(a){return this.data.array[a*this.data.stride+this.offset+2]},getW:function(a){return this.data.array[a*
|
|
|
this.data.stride+this.offset+3]},setXY:function(a,b,c){a=a*this.data.stride+this.offset;this.data.array[a+0]=b;this.data.array[a+1]=c;return this},setXYZ:function(a,b,c,d){a=a*this.data.stride+this.offset;this.data.array[a+0]=b;this.data.array[a+1]=c;this.data.array[a+2]=d;return this},setXYZW:function(a,b,c,d,e){a=a*this.data.stride+this.offset;this.data.array[a+0]=b;this.data.array[a+1]=c;this.data.array[a+2]=d;this.data.array[a+3]=e;return this}});Gb.prototype=Object.create(M.prototype);Gb.prototype.constructor=
|
|
|
-Gb;Gb.prototype.isSpriteMaterial=!0;Gb.prototype.copy=function(a){M.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.alphaMap=a.alphaMap;this.rotation=a.rotation;this.sizeAttenuation=a.sizeAttenuation;return this};var Gc,De=new n,td=new n,ud=new n,Hc=new y,Nd=new y,Sh=new R,Nf=new n,Ee=new n,Of=new n,xi=new y,gh=new y,yi=new y;Md.prototype=Object.assign(Object.create(F.prototype),{constructor:Md,isSprite:!0,raycast:function(a,b){null===a.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.');
|
|
|
+Gb;Gb.prototype.isSpriteMaterial=!0;Gb.prototype.copy=function(a){M.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.alphaMap=a.alphaMap;this.rotation=a.rotation;this.sizeAttenuation=a.sizeAttenuation;return this};var Gc,De=new n,td=new n,ud=new n,Hc=new z,Nd=new z,Sh=new R,Nf=new n,Ee=new n,Of=new n,xi=new z,gh=new z,yi=new z;Md.prototype=Object.assign(Object.create(F.prototype),{constructor:Md,isSprite:!0,raycast:function(a,b){null===a.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.');
|
|
|
td.setFromMatrixScale(this.matrixWorld);Sh.copy(a.camera.matrixWorld);this.modelViewMatrix.multiplyMatrices(a.camera.matrixWorldInverse,this.matrixWorld);ud.setFromMatrixPosition(this.modelViewMatrix);a.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&td.multiplyScalar(-ud.z);var c=this.material.rotation;if(0!==c){var d=Math.cos(c);var e=Math.sin(c)}c=this.center;We(Nf.set(-.5,-.5,0),ud,c,td,e,d);We(Ee.set(.5,-.5,0),ud,c,td,e,d);We(Of.set(.5,.5,0),ud,c,td,e,d);xi.set(0,0);gh.set(1,
|
|
|
-0);yi.set(1,1);var f=a.ray.intersectTriangle(Nf,Ee,Of,!1,De);if(null===f&&(We(Ee.set(-.5,.5,0),ud,c,td,e,d),gh.set(0,1),f=a.ray.intersectTriangle(Nf,Of,Ee,!1,De),null===f))return;e=a.ray.origin.distanceTo(De);e<a.near||e>a.far||b.push({distance:e,point:De.clone(),uv:va.getUV(De,Nf,Ee,Of,xi,gh,yi,new y),face:null,object:this})},clone:function(){return(new this.constructor(this.material)).copy(this)},copy:function(a){F.prototype.copy.call(this,a);void 0!==a.center&&this.center.copy(a.center);return this}});
|
|
|
+0);yi.set(1,1);var f=a.ray.intersectTriangle(Nf,Ee,Of,!1,De);if(null===f&&(We(Ee.set(-.5,.5,0),ud,c,td,e,d),gh.set(0,1),f=a.ray.intersectTriangle(Nf,Of,Ee,!1,De),null===f))return;e=a.ray.origin.distanceTo(De);e<a.near||e>a.far||b.push({distance:e,point:De.clone(),uv:va.getUV(De,Nf,Ee,Of,xi,gh,yi,new z),face:null,object:this})},clone:function(){return(new this.constructor(this.material)).copy(this)},copy:function(a){F.prototype.copy.call(this,a);void 0!==a.center&&this.center.copy(a.center);return this}});
|
|
|
var Pf=new n,zi=new n;Od.prototype=Object.assign(Object.create(F.prototype),{constructor:Od,isLOD:!0,copy:function(a){F.prototype.copy.call(this,a,!1);for(var b=a.levels,c=0,d=b.length;c<d;c++){var e=b[c];this.addLevel(e.object.clone(),e.distance)}this.autoUpdate=a.autoUpdate;return this},addLevel:function(a,b){void 0===b&&(b=0);b=Math.abs(b);for(var c=this.levels,d=0;d<c.length&&!(b<c[d].distance);d++);c.splice(d,0,{distance:b,object:a});this.add(a);return this},getObjectForDistance:function(a){var b=
|
|
|
this.levels;if(0<b.length){for(var c=1,d=b.length;c<d&&!(a<b[c].distance);c++);return b[c-1].object}return null},raycast:function(a,b){if(0<this.levels.length){Pf.setFromMatrixPosition(this.matrixWorld);var c=a.ray.origin.distanceTo(Pf);this.getObjectForDistance(c).raycast(a,b)}},update:function(a){var b=this.levels;if(1<b.length){Pf.setFromMatrixPosition(a.matrixWorld);zi.setFromMatrixPosition(this.matrixWorld);a=Pf.distanceTo(zi);b[0].object.visible=!0;for(var c=1,d=b.length;c<d;c++)if(a>=b[c].distance)b[c-
|
|
|
1].object.visible=!1,b[c].object.visible=!0;else break;for(;c<d;c++)b[c].object.visible=!1}},toJSON:function(a){a=F.prototype.toJSON.call(this,a);!1===this.autoUpdate&&(a.object.autoUpdate=!1);a.object.levels=[];for(var b=this.levels,c=0,d=b.length;c<d;c++){var e=b[c];a.object.levels.push({object:e.object.uuid,distance:e.distance})}return a}});Pd.prototype=Object.assign(Object.create(V.prototype),{constructor:Pd,isSkinnedMesh:!0,bind:function(a,b){this.skeleton=a;void 0===b&&(this.updateMatrixWorld(!0),
|
|
@@ -702,7 +702,7 @@ Wd;Nc.prototype=Object.create(Aa.prototype);Nc.prototype.constructor=Nc;Xd.proto
|
|
|
Zd;Pc.prototype=Object.create(C.prototype);Pc.prototype.constructor=Pc;$d.prototype=Object.create(O.prototype);$d.prototype.constructor=$d;Qc.prototype=Object.create(C.prototype);Qc.prototype.constructor=Qc;var Ik={triangulate:function(a,b,c){c=c||2;var d=b&&b.length,e=d?b[0]*c:a.length,f=Th(a,0,e,c,!0),g=[];if(!f||f.next===f.prev)return g;var h;if(d){var l=c;d=[];var m;var k=0;for(m=b.length;k<m;k++){var n=b[k]*l;var t=k<m-1?b[k+1]*l:a.length;n=Th(a,n,t,l,!1);n===n.next&&(n.steiner=!0);d.push(tk(n))}d.sort(rk);
|
|
|
for(k=0;k<d.length;k++){b=d[k];l=f;if(l=sk(b,l))b=Wh(l,b),be(b,b.next);f=be(f,f.next)}}if(a.length>80*c){var u=h=a[0];var q=d=a[1];for(l=c;l<e;l+=c)k=a[l],b=a[l+1],k<u&&(u=k),b<q&&(q=b),k>h&&(h=k),b>d&&(d=b);h=Math.max(h-u,d-q);h=0!==h?1/h:0}ce(f,g,c,u,q,h);return g}},qb={area:function(a){for(var b=a.length,c=0,d=b-1,e=0;e<b;d=e++)c+=a[d].x*a[e].y-a[e].x*a[d].y;return.5*c},isClockWise:function(a){return 0>qb.area(a)},triangulateShape:function(a,b){var c=[],d=[],e=[];Xh(a);Yh(c,a);var f=a.length;b.forEach(Xh);
|
|
|
for(a=0;a<b.length;a++)d.push(f),f+=b[a].length,Yh(c,b[a]);b=Ik.triangulate(c,d);for(a=0;a<b.length;a+=3)e.push(b.slice(a,a+3));return e}};dc.prototype=Object.create(O.prototype);dc.prototype.constructor=dc;dc.prototype.toJSON=function(){var a=O.prototype.toJSON.call(this);return Zh(this.parameters.shapes,this.parameters.options,a)};fb.prototype=Object.create(C.prototype);fb.prototype.constructor=fb;fb.prototype.toJSON=function(){var a=C.prototype.toJSON.call(this);return Zh(this.parameters.shapes,
|
|
|
-this.parameters.options,a)};var uk={generateTopUV:function(a,b,c,d,e){a=b[3*d];d=b[3*d+1];var f=b[3*e];e=b[3*e+1];return[new y(b[3*c],b[3*c+1]),new y(a,d),new y(f,e)]},generateSideWallUV:function(a,b,c,d,e,f){a=b[3*c];var g=b[3*c+1];c=b[3*c+2];var h=b[3*d],l=b[3*d+1];d=b[3*d+2];var k=b[3*e],n=b[3*e+1];e=b[3*e+2];var r=b[3*f],t=b[3*f+1];b=b[3*f+2];return.01>Math.abs(g-l)?[new y(a,1-c),new y(h,1-d),new y(k,1-e),new y(r,1-b)]:[new y(g,1-c),new y(l,1-d),new y(n,1-e),new y(t,1-b)]}};ee.prototype=Object.create(O.prototype);
|
|
|
+this.parameters.options,a)};var uk={generateTopUV:function(a,b,c,d,e){a=b[3*d];d=b[3*d+1];var f=b[3*e];e=b[3*e+1];return[new z(b[3*c],b[3*c+1]),new z(a,d),new z(f,e)]},generateSideWallUV:function(a,b,c,d,e,f){a=b[3*c];var g=b[3*c+1];c=b[3*c+2];var h=b[3*d],l=b[3*d+1];d=b[3*d+2];var k=b[3*e],n=b[3*e+1];e=b[3*e+2];var r=b[3*f],t=b[3*f+1];b=b[3*f+2];return.01>Math.abs(g-l)?[new z(a,1-c),new z(h,1-d),new z(k,1-e),new z(r,1-b)]:[new z(g,1-c),new z(l,1-d),new z(n,1-e),new z(t,1-b)]}};ee.prototype=Object.create(O.prototype);
|
|
|
ee.prototype.constructor=ee;Sc.prototype=Object.create(fb.prototype);Sc.prototype.constructor=Sc;fe.prototype=Object.create(O.prototype);fe.prototype.constructor=fe;Hb.prototype=Object.create(C.prototype);Hb.prototype.constructor=Hb;ge.prototype=Object.create(O.prototype);ge.prototype.constructor=ge;Tc.prototype=Object.create(C.prototype);Tc.prototype.constructor=Tc;he.prototype=Object.create(O.prototype);he.prototype.constructor=he;Uc.prototype=Object.create(C.prototype);Uc.prototype.constructor=
|
|
|
Uc;ec.prototype=Object.create(O.prototype);ec.prototype.constructor=ec;ec.prototype.toJSON=function(){var a=O.prototype.toJSON.call(this);return $h(this.parameters.shapes,a)};fc.prototype=Object.create(C.prototype);fc.prototype.constructor=fc;fc.prototype.toJSON=function(){var a=C.prototype.toJSON.call(this);return $h(this.parameters.shapes,a)};Vc.prototype=Object.create(C.prototype);Vc.prototype.constructor=Vc;gc.prototype=Object.create(O.prototype);gc.prototype.constructor=gc;rb.prototype=Object.create(C.prototype);
|
|
|
rb.prototype.constructor=rb;ie.prototype=Object.create(gc.prototype);ie.prototype.constructor=ie;je.prototype=Object.create(rb.prototype);je.prototype.constructor=je;ke.prototype=Object.create(O.prototype);ke.prototype.constructor=ke;Wc.prototype=Object.create(C.prototype);Wc.prototype.constructor=Wc;var Ea=Object.freeze({__proto__:null,WireframeGeometry:Kc,ParametricGeometry:Sd,ParametricBufferGeometry:Lc,TetrahedronGeometry:Ud,TetrahedronBufferGeometry:Mc,OctahedronGeometry:Vd,OctahedronBufferGeometry:ac,
|
|
@@ -762,28 +762,28 @@ return this.getPoint(a,b)},getPoints:function(a){void 0===a&&(a=5);for(var b=[],
|
|
|
a+=1E-4;0>b&&(b=0);1<a&&(a=1);b=this.getPoint(b);return this.getPoint(a).clone().sub(b).normalize()},getTangentAt:function(a){a=this.getUtoTmapping(a);return this.getTangent(a)},computeFrenetFrames:function(a,b){var c=new n,d=[],e=[],f=[],g=new n,h=new R,l;for(l=0;l<=a;l++){var k=l/a;d[l]=this.getTangentAt(k);d[l].normalize()}e[0]=new n;f[0]=new n;l=Number.MAX_VALUE;k=Math.abs(d[0].x);var p=Math.abs(d[0].y),r=Math.abs(d[0].z);k<=l&&(l=k,c.set(1,0,0));p<=l&&(l=p,c.set(0,1,0));r<=l&&c.set(0,0,1);g.crossVectors(d[0],
|
|
|
c).normalize();e[0].crossVectors(d[0],g);f[0].crossVectors(d[0],e[0]);for(l=1;l<=a;l++)e[l]=e[l-1].clone(),f[l]=f[l-1].clone(),g.crossVectors(d[l-1],d[l]),g.length()>Number.EPSILON&&(g.normalize(),c=Math.acos(P.clamp(d[l-1].dot(d[l]),-1,1)),e[l].applyMatrix4(h.makeRotationAxis(g,c))),f[l].crossVectors(d[l],e[l]);if(!0===b)for(c=Math.acos(P.clamp(e[0].dot(e[a]),-1,1)),c/=a,0<d[0].dot(g.crossVectors(e[0],e[a]))&&(c=-c),l=1;l<=a;l++)e[l].applyMatrix4(h.makeRotationAxis(d[l],c*l)),f[l].crossVectors(d[l],
|
|
|
e[l]);return{tangents:d,normals:e,binormals:f}},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.arcLengthDivisions=a.arcLengthDivisions;return this},toJSON:function(){var a={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};a.arcLengthDivisions=this.arcLengthDivisions;a.type=this.type;return a},fromJSON:function(a){this.arcLengthDivisions=a.arcLengthDivisions;return this}});Ma.prototype=Object.create(I.prototype);Ma.prototype.constructor=Ma;Ma.prototype.isEllipseCurve=
|
|
|
-!0;Ma.prototype.getPoint=function(a,b){b=b||new y;for(var c=2*Math.PI,d=this.aEndAngle-this.aStartAngle,e=Math.abs(d)<Number.EPSILON;0>d;)d+=c;for(;d>c;)d-=c;d<Number.EPSILON&&(d=e?0:c);!0!==this.aClockwise||e||(d=d===c?-c:d-c);c=this.aStartAngle+a*d;a=this.aX+this.xRadius*Math.cos(c);var f=this.aY+this.yRadius*Math.sin(c);0!==this.aRotation&&(c=Math.cos(this.aRotation),d=Math.sin(this.aRotation),e=a-this.aX,f-=this.aY,a=e*c-f*d+this.aX,f=e*d+f*c+this.aY);return b.set(a,f)};Ma.prototype.copy=function(a){I.prototype.copy.call(this,
|
|
|
+!0;Ma.prototype.getPoint=function(a,b){b=b||new z;for(var c=2*Math.PI,d=this.aEndAngle-this.aStartAngle,e=Math.abs(d)<Number.EPSILON;0>d;)d+=c;for(;d>c;)d-=c;d<Number.EPSILON&&(d=e?0:c);!0!==this.aClockwise||e||(d=d===c?-c:d-c);c=this.aStartAngle+a*d;a=this.aX+this.xRadius*Math.cos(c);var f=this.aY+this.yRadius*Math.sin(c);0!==this.aRotation&&(c=Math.cos(this.aRotation),d=Math.sin(this.aRotation),e=a-this.aX,f-=this.aY,a=e*c-f*d+this.aX,f=e*d+f*c+this.aY);return b.set(a,f)};Ma.prototype.copy=function(a){I.prototype.copy.call(this,
|
|
|
a);this.aX=a.aX;this.aY=a.aY;this.xRadius=a.xRadius;this.yRadius=a.yRadius;this.aStartAngle=a.aStartAngle;this.aEndAngle=a.aEndAngle;this.aClockwise=a.aClockwise;this.aRotation=a.aRotation;return this};Ma.prototype.toJSON=function(){var a=I.prototype.toJSON.call(this);a.aX=this.aX;a.aY=this.aY;a.xRadius=this.xRadius;a.yRadius=this.yRadius;a.aStartAngle=this.aStartAngle;a.aEndAngle=this.aEndAngle;a.aClockwise=this.aClockwise;a.aRotation=this.aRotation;return a};Ma.prototype.fromJSON=function(a){I.prototype.fromJSON.call(this,
|
|
|
a);this.aX=a.aX;this.aY=a.aY;this.xRadius=a.xRadius;this.yRadius=a.yRadius;this.aStartAngle=a.aStartAngle;this.aEndAngle=a.aEndAngle;this.aClockwise=a.aClockwise;this.aRotation=a.aRotation;return this};ad.prototype=Object.create(Ma.prototype);ad.prototype.constructor=ad;ad.prototype.isArcCurve=!0;var Uf=new n,hh=new zg,ih=new zg,jh=new zg;Ba.prototype=Object.create(I.prototype);Ba.prototype.constructor=Ba;Ba.prototype.isCatmullRomCurve3=!0;Ba.prototype.getPoint=function(a,b){b=b||new n;var c=this.points,
|
|
|
d=c.length;a*=d-(this.closed?0:1);var e=Math.floor(a);a-=e;this.closed?e+=0<e?0:(Math.floor(Math.abs(e)/d)+1)*d:0===a&&e===d-1&&(e=d-2,a=1);if(this.closed||0<e)var f=c[(e-1)%d];else Uf.subVectors(c[0],c[1]).add(c[0]),f=Uf;var g=c[e%d];var h=c[(e+1)%d];this.closed||e+2<d?c=c[(e+2)%d]:(Uf.subVectors(c[d-1],c[d-2]).add(c[d-1]),c=Uf);if("centripetal"===this.curveType||"chordal"===this.curveType){var l="chordal"===this.curveType?.5:.25;d=Math.pow(f.distanceToSquared(g),l);e=Math.pow(g.distanceToSquared(h),
|
|
|
l);l=Math.pow(h.distanceToSquared(c),l);1E-4>e&&(e=1);1E-4>d&&(d=e);1E-4>l&&(l=e);hh.initNonuniformCatmullRom(f.x,g.x,h.x,c.x,d,e,l);ih.initNonuniformCatmullRom(f.y,g.y,h.y,c.y,d,e,l);jh.initNonuniformCatmullRom(f.z,g.z,h.z,c.z,d,e,l)}else"catmullrom"===this.curveType&&(hh.initCatmullRom(f.x,g.x,h.x,c.x,this.tension),ih.initCatmullRom(f.y,g.y,h.y,c.y,this.tension),jh.initCatmullRom(f.z,g.z,h.z,c.z,this.tension));b.set(hh.calc(a),ih.calc(a),jh.calc(a));return b};Ba.prototype.copy=function(a){I.prototype.copy.call(this,
|
|
|
a);this.points=[];for(var b=0,c=a.points.length;b<c;b++)this.points.push(a.points[b].clone());this.closed=a.closed;this.curveType=a.curveType;this.tension=a.tension;return this};Ba.prototype.toJSON=function(){var a=I.prototype.toJSON.call(this);a.points=[];for(var b=0,c=this.points.length;b<c;b++)a.points.push(this.points[b].toArray());a.closed=this.closed;a.curveType=this.curveType;a.tension=this.tension;return a};Ba.prototype.fromJSON=function(a){I.prototype.fromJSON.call(this,a);this.points=[];
|
|
|
-for(var b=0,c=a.points.length;b<c;b++){var d=a.points[b];this.points.push((new n).fromArray(d))}this.closed=a.closed;this.curveType=a.curveType;this.tension=a.tension;return this};Va.prototype=Object.create(I.prototype);Va.prototype.constructor=Va;Va.prototype.isCubicBezierCurve=!0;Va.prototype.getPoint=function(a,b){b=b||new y;var c=this.v0,d=this.v1,e=this.v2,f=this.v3;b.set(oe(a,c.x,d.x,e.x,f.x),oe(a,c.y,d.y,e.y,f.y));return b};Va.prototype.copy=function(a){I.prototype.copy.call(this,a);this.v0.copy(a.v0);
|
|
|
+for(var b=0,c=a.points.length;b<c;b++){var d=a.points[b];this.points.push((new n).fromArray(d))}this.closed=a.closed;this.curveType=a.curveType;this.tension=a.tension;return this};Va.prototype=Object.create(I.prototype);Va.prototype.constructor=Va;Va.prototype.isCubicBezierCurve=!0;Va.prototype.getPoint=function(a,b){b=b||new z;var c=this.v0,d=this.v1,e=this.v2,f=this.v3;b.set(oe(a,c.x,d.x,e.x,f.x),oe(a,c.y,d.y,e.y,f.y));return b};Va.prototype.copy=function(a){I.prototype.copy.call(this,a);this.v0.copy(a.v0);
|
|
|
this.v1.copy(a.v1);this.v2.copy(a.v2);this.v3.copy(a.v3);return this};Va.prototype.toJSON=function(){var a=I.prototype.toJSON.call(this);a.v0=this.v0.toArray();a.v1=this.v1.toArray();a.v2=this.v2.toArray();a.v3=this.v3.toArray();return a};Va.prototype.fromJSON=function(a){I.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);this.v3.fromArray(a.v3);return this};hb.prototype=Object.create(I.prototype);hb.prototype.constructor=hb;hb.prototype.isCubicBezierCurve3=
|
|
|
!0;hb.prototype.getPoint=function(a,b){b=b||new n;var c=this.v0,d=this.v1,e=this.v2,f=this.v3;b.set(oe(a,c.x,d.x,e.x,f.x),oe(a,c.y,d.y,e.y,f.y),oe(a,c.z,d.z,e.z,f.z));return b};hb.prototype.copy=function(a){I.prototype.copy.call(this,a);this.v0.copy(a.v0);this.v1.copy(a.v1);this.v2.copy(a.v2);this.v3.copy(a.v3);return this};hb.prototype.toJSON=function(){var a=I.prototype.toJSON.call(this);a.v0=this.v0.toArray();a.v1=this.v1.toArray();a.v2=this.v2.toArray();a.v3=this.v3.toArray();return a};hb.prototype.fromJSON=
|
|
|
-function(a){I.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);this.v3.fromArray(a.v3);return this};Ha.prototype=Object.create(I.prototype);Ha.prototype.constructor=Ha;Ha.prototype.isLineCurve=!0;Ha.prototype.getPoint=function(a,b){b=b||new y;1===a?b.copy(this.v2):(b.copy(this.v2).sub(this.v1),b.multiplyScalar(a).add(this.v1));return b};Ha.prototype.getPointAt=function(a,b){return this.getPoint(a,b)};Ha.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()};
|
|
|
+function(a){I.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);this.v3.fromArray(a.v3);return this};Ha.prototype=Object.create(I.prototype);Ha.prototype.constructor=Ha;Ha.prototype.isLineCurve=!0;Ha.prototype.getPoint=function(a,b){b=b||new z;1===a?b.copy(this.v2):(b.copy(this.v2).sub(this.v1),b.multiplyScalar(a).add(this.v1));return b};Ha.prototype.getPointAt=function(a,b){return this.getPoint(a,b)};Ha.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()};
|
|
|
Ha.prototype.copy=function(a){I.prototype.copy.call(this,a);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};Ha.prototype.toJSON=function(){var a=I.prototype.toJSON.call(this);a.v1=this.v1.toArray();a.v2=this.v2.toArray();return a};Ha.prototype.fromJSON=function(a){I.prototype.fromJSON.call(this,a);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};Wa.prototype=Object.create(I.prototype);Wa.prototype.constructor=Wa;Wa.prototype.isLineCurve3=!0;Wa.prototype.getPoint=function(a,b){b=b||
|
|
|
new n;1===a?b.copy(this.v2):(b.copy(this.v2).sub(this.v1),b.multiplyScalar(a).add(this.v1));return b};Wa.prototype.getPointAt=function(a,b){return this.getPoint(a,b)};Wa.prototype.copy=function(a){I.prototype.copy.call(this,a);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};Wa.prototype.toJSON=function(){var a=I.prototype.toJSON.call(this);a.v1=this.v1.toArray();a.v2=this.v2.toArray();return a};Wa.prototype.fromJSON=function(a){I.prototype.fromJSON.call(this,a);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);
|
|
|
-return this};Xa.prototype=Object.create(I.prototype);Xa.prototype.constructor=Xa;Xa.prototype.isQuadraticBezierCurve=!0;Xa.prototype.getPoint=function(a,b){b=b||new y;var c=this.v0,d=this.v1,e=this.v2;b.set(ne(a,c.x,d.x,e.x),ne(a,c.y,d.y,e.y));return b};Xa.prototype.copy=function(a){I.prototype.copy.call(this,a);this.v0.copy(a.v0);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};Xa.prototype.toJSON=function(){var a=I.prototype.toJSON.call(this);a.v0=this.v0.toArray();a.v1=this.v1.toArray();a.v2=
|
|
|
+return this};Xa.prototype=Object.create(I.prototype);Xa.prototype.constructor=Xa;Xa.prototype.isQuadraticBezierCurve=!0;Xa.prototype.getPoint=function(a,b){b=b||new z;var c=this.v0,d=this.v1,e=this.v2;b.set(ne(a,c.x,d.x,e.x),ne(a,c.y,d.y,e.y));return b};Xa.prototype.copy=function(a){I.prototype.copy.call(this,a);this.v0.copy(a.v0);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};Xa.prototype.toJSON=function(){var a=I.prototype.toJSON.call(this);a.v0=this.v0.toArray();a.v1=this.v1.toArray();a.v2=
|
|
|
this.v2.toArray();return a};Xa.prototype.fromJSON=function(a){I.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};ib.prototype=Object.create(I.prototype);ib.prototype.constructor=ib;ib.prototype.isQuadraticBezierCurve3=!0;ib.prototype.getPoint=function(a,b){b=b||new n;var c=this.v0,d=this.v1,e=this.v2;b.set(ne(a,c.x,d.x,e.x),ne(a,c.y,d.y,e.y),ne(a,c.z,d.z,e.z));return b};ib.prototype.copy=function(a){I.prototype.copy.call(this,a);
|
|
|
this.v0.copy(a.v0);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};ib.prototype.toJSON=function(){var a=I.prototype.toJSON.call(this);a.v0=this.v0.toArray();a.v1=this.v1.toArray();a.v2=this.v2.toArray();return a};ib.prototype.fromJSON=function(a){I.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};Ya.prototype=Object.create(I.prototype);Ya.prototype.constructor=Ya;Ya.prototype.isSplineCurve=!0;Ya.prototype.getPoint=function(a,b){b=
|
|
|
-b||new y;var c=this.points,d=(c.length-1)*a;a=Math.floor(d);d-=a;var e=c[0===a?a:a-1],f=c[a],g=c[a>c.length-2?c.length-1:a+1];c=c[a>c.length-3?c.length-1:a+2];b.set(bi(d,e.x,f.x,g.x,c.x),bi(d,e.y,f.y,g.y,c.y));return b};Ya.prototype.copy=function(a){I.prototype.copy.call(this,a);this.points=[];for(var b=0,c=a.points.length;b<c;b++)this.points.push(a.points[b].clone());return this};Ya.prototype.toJSON=function(){var a=I.prototype.toJSON.call(this);a.points=[];for(var b=0,c=this.points.length;b<c;b++)a.points.push(this.points[b].toArray());
|
|
|
-return a};Ya.prototype.fromJSON=function(a){I.prototype.fromJSON.call(this,a);this.points=[];for(var b=0,c=a.points.length;b<c;b++){var d=a.points[b];this.points.push((new y).fromArray(d))}return this};var kh=Object.freeze({__proto__:null,ArcCurve:ad,CatmullRomCurve3:Ba,CubicBezierCurve:Va,CubicBezierCurve3:hb,EllipseCurve:Ma,LineCurve:Ha,LineCurve3:Wa,QuadraticBezierCurve:Xa,QuadraticBezierCurve3:ib,SplineCurve:Ya});sb.prototype=Object.assign(Object.create(I.prototype),{constructor:sb,add:function(a){this.curves.push(a)},
|
|
|
+b||new z;var c=this.points,d=(c.length-1)*a;a=Math.floor(d);d-=a;var e=c[0===a?a:a-1],f=c[a],g=c[a>c.length-2?c.length-1:a+1];c=c[a>c.length-3?c.length-1:a+2];b.set(bi(d,e.x,f.x,g.x,c.x),bi(d,e.y,f.y,g.y,c.y));return b};Ya.prototype.copy=function(a){I.prototype.copy.call(this,a);this.points=[];for(var b=0,c=a.points.length;b<c;b++)this.points.push(a.points[b].clone());return this};Ya.prototype.toJSON=function(){var a=I.prototype.toJSON.call(this);a.points=[];for(var b=0,c=this.points.length;b<c;b++)a.points.push(this.points[b].toArray());
|
|
|
+return a};Ya.prototype.fromJSON=function(a){I.prototype.fromJSON.call(this,a);this.points=[];for(var b=0,c=a.points.length;b<c;b++){var d=a.points[b];this.points.push((new z).fromArray(d))}return this};var kh=Object.freeze({__proto__:null,ArcCurve:ad,CatmullRomCurve3:Ba,CubicBezierCurve:Va,CubicBezierCurve3:hb,EllipseCurve:Ma,LineCurve:Ha,LineCurve3:Wa,QuadraticBezierCurve:Xa,QuadraticBezierCurve3:ib,SplineCurve:Ya});sb.prototype=Object.assign(Object.create(I.prototype),{constructor:sb,add:function(a){this.curves.push(a)},
|
|
|
closePath:function(){var a=this.curves[0].getPoint(0),b=this.curves[this.curves.length-1].getPoint(1);a.equals(b)||this.curves.push(new Ha(b,a))},getPoint:function(a){var b=a*this.getLength(),c=this.getCurveLengths();for(a=0;a<c.length;){if(c[a]>=b)return b=c[a]-b,a=this.curves[a],c=a.getLength(),a.getPointAt(0===c?0:1-b/c);a++}return null},getLength:function(){var a=this.getCurveLengths();return a[a.length-1]},updateArcLengths:function(){this.needsUpdate=!0;this.cacheLengths=null;this.getCurveLengths()},
|
|
|
getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var a=[],b=0,c=0,d=this.curves.length;c<d;c++)b+=this.curves[c].getLength(),a.push(b);return this.cacheLengths=a},getSpacedPoints:function(a){void 0===a&&(a=40);for(var b=[],c=0;c<=a;c++)b.push(this.getPoint(c/a));this.autoClose&&b.push(b[0]);return b},getPoints:function(a){a=a||12;for(var b=[],c,d=0,e=this.curves;d<e.length;d++){var f=e[d];f=f.getPoints(f&&f.isEllipseCurve?
|
|
|
2*a:f&&(f.isLineCurve||f.isLineCurve3)?1:f&&f.isSplineCurve?a*f.points.length:a);for(var g=0;g<f.length;g++){var h=f[g];c&&c.equals(h)||(b.push(h),c=h)}}this.autoClose&&1<b.length&&!b[b.length-1].equals(b[0])&&b.push(b[0]);return b},copy:function(a){I.prototype.copy.call(this,a);this.curves=[];for(var b=0,c=a.curves.length;b<c;b++)this.curves.push(a.curves[b].clone());this.autoClose=a.autoClose;return this},toJSON:function(){var a=I.prototype.toJSON.call(this);a.autoClose=this.autoClose;a.curves=
|
|
|
[];for(var b=0,c=this.curves.length;b<c;b++)a.curves.push(this.curves[b].toJSON());return a},fromJSON:function(a){I.prototype.fromJSON.call(this,a);this.autoClose=a.autoClose;this.curves=[];for(var b=0,c=a.curves.length;b<c;b++){var d=a.curves[b];this.curves.push((new kh[d.type]).fromJSON(d))}return this}});Za.prototype=Object.assign(Object.create(sb.prototype),{constructor:Za,setFromPoints:function(a){this.moveTo(a[0].x,a[0].y);for(var b=1,c=a.length;b<c;b++)this.lineTo(a[b].x,a[b].y);return this},
|
|
|
-moveTo:function(a,b){this.currentPoint.set(a,b);return this},lineTo:function(a,b){var c=new Ha(this.currentPoint.clone(),new y(a,b));this.curves.push(c);this.currentPoint.set(a,b);return this},quadraticCurveTo:function(a,b,c,d){a=new Xa(this.currentPoint.clone(),new y(a,b),new y(c,d));this.curves.push(a);this.currentPoint.set(c,d);return this},bezierCurveTo:function(a,b,c,d,e,f){a=new Va(this.currentPoint.clone(),new y(a,b),new y(c,d),new y(e,f));this.curves.push(a);this.currentPoint.set(e,f);return this},
|
|
|
+moveTo:function(a,b){this.currentPoint.set(a,b);return this},lineTo:function(a,b){var c=new Ha(this.currentPoint.clone(),new z(a,b));this.curves.push(c);this.currentPoint.set(a,b);return this},quadraticCurveTo:function(a,b,c,d){a=new Xa(this.currentPoint.clone(),new z(a,b),new z(c,d));this.curves.push(a);this.currentPoint.set(c,d);return this},bezierCurveTo:function(a,b,c,d,e,f){a=new Va(this.currentPoint.clone(),new z(a,b),new z(c,d),new z(e,f));this.curves.push(a);this.currentPoint.set(e,f);return this},
|
|
|
splineThru:function(a){var b=[this.currentPoint.clone()].concat(a);b=new Ya(b);this.curves.push(b);this.currentPoint.copy(a[a.length-1]);return this},arc:function(a,b,c,d,e,f){this.absarc(a+this.currentPoint.x,b+this.currentPoint.y,c,d,e,f);return this},absarc:function(a,b,c,d,e,f){this.absellipse(a,b,c,c,d,e,f);return this},ellipse:function(a,b,c,d,e,f,g,h){this.absellipse(a+this.currentPoint.x,b+this.currentPoint.y,c,d,e,f,g,h);return this},absellipse:function(a,b,c,d,e,f,g,h){a=new Ma(a,b,c,d,
|
|
|
e,f,g,h);0<this.curves.length&&(b=a.getPoint(0),b.equals(this.currentPoint)||this.lineTo(b.x,b.y));this.curves.push(a);a=a.getPoint(1);this.currentPoint.copy(a);return this},copy:function(a){sb.prototype.copy.call(this,a);this.currentPoint.copy(a.currentPoint);return this},toJSON:function(){var a=sb.prototype.toJSON.call(this);a.currentPoint=this.currentPoint.toArray();return a},fromJSON:function(a){sb.prototype.fromJSON.call(this,a);this.currentPoint.fromArray(a.currentPoint);return this}});Jb.prototype=
|
|
|
Object.assign(Object.create(Za.prototype),{constructor:Jb,getPointsHoles:function(a){for(var b=[],c=0,d=this.holes.length;c<d;c++)b[c]=this.holes[c].getPoints(a);return b},extractPoints:function(a){return{shape:this.getPoints(a),holes:this.getPointsHoles(a)}},copy:function(a){Za.prototype.copy.call(this,a);this.holes=[];for(var b=0,c=a.holes.length;b<c;b++)this.holes.push(a.holes[b].clone());return this},toJSON:function(){var a=Za.prototype.toJSON.call(this);a.uuid=this.uuid;a.holes=[];for(var b=
|
|
@@ -805,11 +805,11 @@ a.fog);void 0!==a.flatShading&&(d.flatShading=a.flatShading);void 0!==a.blending
|
|
|
a.stencilWrite);void 0!==a.stencilWriteMask&&(d.stencilWriteMask=a.stencilWriteMask);void 0!==a.stencilFunc&&(d.stencilFunc=a.stencilFunc);void 0!==a.stencilRef&&(d.stencilRef=a.stencilRef);void 0!==a.stencilFuncMask&&(d.stencilFuncMask=a.stencilFuncMask);void 0!==a.stencilFail&&(d.stencilFail=a.stencilFail);void 0!==a.stencilZFail&&(d.stencilZFail=a.stencilZFail);void 0!==a.stencilZPass&&(d.stencilZPass=a.stencilZPass);void 0!==a.wireframe&&(d.wireframe=a.wireframe);void 0!==a.wireframeLinewidth&&
|
|
|
(d.wireframeLinewidth=a.wireframeLinewidth);void 0!==a.wireframeLinecap&&(d.wireframeLinecap=a.wireframeLinecap);void 0!==a.wireframeLinejoin&&(d.wireframeLinejoin=a.wireframeLinejoin);void 0!==a.rotation&&(d.rotation=a.rotation);1!==a.linewidth&&(d.linewidth=a.linewidth);void 0!==a.dashSize&&(d.dashSize=a.dashSize);void 0!==a.gapSize&&(d.gapSize=a.gapSize);void 0!==a.scale&&(d.scale=a.scale);void 0!==a.polygonOffset&&(d.polygonOffset=a.polygonOffset);void 0!==a.polygonOffsetFactor&&(d.polygonOffsetFactor=
|
|
|
a.polygonOffsetFactor);void 0!==a.polygonOffsetUnits&&(d.polygonOffsetUnits=a.polygonOffsetUnits);void 0!==a.skinning&&(d.skinning=a.skinning);void 0!==a.morphTargets&&(d.morphTargets=a.morphTargets);void 0!==a.morphNormals&&(d.morphNormals=a.morphNormals);void 0!==a.dithering&&(d.dithering=a.dithering);void 0!==a.visible&&(d.visible=a.visible);void 0!==a.toneMapped&&(d.toneMapped=a.toneMapped);void 0!==a.userData&&(d.userData=a.userData);if(void 0!==a.uniforms)for(var e in a.uniforms){var f=a.uniforms[e];
|
|
|
-d.uniforms[e]={};switch(f.type){case "t":d.uniforms[e].value=b(f.value);break;case "c":d.uniforms[e].value=(new A).setHex(f.value);break;case "v2":d.uniforms[e].value=(new y).fromArray(f.value);break;case "v3":d.uniforms[e].value=(new n).fromArray(f.value);break;case "v4":d.uniforms[e].value=(new fa).fromArray(f.value);break;case "m3":d.uniforms[e].value=(new ca).fromArray(f.value);case "m4":d.uniforms[e].value=(new R).fromArray(f.value);break;default:d.uniforms[e].value=f.value}}void 0!==a.defines&&
|
|
|
+d.uniforms[e]={};switch(f.type){case "t":d.uniforms[e].value=b(f.value);break;case "c":d.uniforms[e].value=(new A).setHex(f.value);break;case "v2":d.uniforms[e].value=(new z).fromArray(f.value);break;case "v3":d.uniforms[e].value=(new n).fromArray(f.value);break;case "v4":d.uniforms[e].value=(new fa).fromArray(f.value);break;case "m3":d.uniforms[e].value=(new ca).fromArray(f.value);case "m4":d.uniforms[e].value=(new R).fromArray(f.value);break;default:d.uniforms[e].value=f.value}}void 0!==a.defines&&
|
|
|
(d.defines=a.defines);void 0!==a.vertexShader&&(d.vertexShader=a.vertexShader);void 0!==a.fragmentShader&&(d.fragmentShader=a.fragmentShader);if(void 0!==a.extensions)for(var g in a.extensions)d.extensions[g]=a.extensions[g];void 0!==a.shading&&(d.flatShading=1===a.shading);void 0!==a.size&&(d.size=a.size);void 0!==a.sizeAttenuation&&(d.sizeAttenuation=a.sizeAttenuation);void 0!==a.map&&(d.map=b(a.map));void 0!==a.matcap&&(d.matcap=b(a.matcap));void 0!==a.alphaMap&&(d.alphaMap=b(a.alphaMap),d.transparent=
|
|
|
-!0);void 0!==a.bumpMap&&(d.bumpMap=b(a.bumpMap));void 0!==a.bumpScale&&(d.bumpScale=a.bumpScale);void 0!==a.normalMap&&(d.normalMap=b(a.normalMap));void 0!==a.normalMapType&&(d.normalMapType=a.normalMapType);void 0!==a.normalScale&&(e=a.normalScale,!1===Array.isArray(e)&&(e=[e,e]),d.normalScale=(new y).fromArray(e));void 0!==a.displacementMap&&(d.displacementMap=b(a.displacementMap));void 0!==a.displacementScale&&(d.displacementScale=a.displacementScale);void 0!==a.displacementBias&&(d.displacementBias=
|
|
|
+!0);void 0!==a.bumpMap&&(d.bumpMap=b(a.bumpMap));void 0!==a.bumpScale&&(d.bumpScale=a.bumpScale);void 0!==a.normalMap&&(d.normalMap=b(a.normalMap));void 0!==a.normalMapType&&(d.normalMapType=a.normalMapType);void 0!==a.normalScale&&(e=a.normalScale,!1===Array.isArray(e)&&(e=[e,e]),d.normalScale=(new z).fromArray(e));void 0!==a.displacementMap&&(d.displacementMap=b(a.displacementMap));void 0!==a.displacementScale&&(d.displacementScale=a.displacementScale);void 0!==a.displacementBias&&(d.displacementBias=
|
|
|
a.displacementBias);void 0!==a.roughnessMap&&(d.roughnessMap=b(a.roughnessMap));void 0!==a.metalnessMap&&(d.metalnessMap=b(a.metalnessMap));void 0!==a.emissiveMap&&(d.emissiveMap=b(a.emissiveMap));void 0!==a.emissiveIntensity&&(d.emissiveIntensity=a.emissiveIntensity);void 0!==a.specularMap&&(d.specularMap=b(a.specularMap));void 0!==a.envMap&&(d.envMap=b(a.envMap));void 0!==a.envMapIntensity&&(d.envMapIntensity=a.envMapIntensity);void 0!==a.reflectivity&&(d.reflectivity=a.reflectivity);void 0!==a.refractionRatio&&
|
|
|
-(d.refractionRatio=a.refractionRatio);void 0!==a.lightMap&&(d.lightMap=b(a.lightMap));void 0!==a.lightMapIntensity&&(d.lightMapIntensity=a.lightMapIntensity);void 0!==a.aoMap&&(d.aoMap=b(a.aoMap));void 0!==a.aoMapIntensity&&(d.aoMapIntensity=a.aoMapIntensity);void 0!==a.gradientMap&&(d.gradientMap=b(a.gradientMap));void 0!==a.clearcoatNormalMap&&(d.clearcoatNormalMap=b(a.clearcoatNormalMap));void 0!==a.clearcoatNormalScale&&(d.clearcoatNormalScale=(new y).fromArray(a.clearcoatNormalScale));return d},
|
|
|
+(d.refractionRatio=a.refractionRatio);void 0!==a.lightMap&&(d.lightMap=b(a.lightMap));void 0!==a.lightMapIntensity&&(d.lightMapIntensity=a.lightMapIntensity);void 0!==a.aoMap&&(d.aoMap=b(a.aoMap));void 0!==a.aoMapIntensity&&(d.aoMapIntensity=a.aoMapIntensity);void 0!==a.gradientMap&&(d.gradientMap=b(a.gradientMap));void 0!==a.clearcoatNormalMap&&(d.clearcoatNormalMap=b(a.clearcoatNormalMap));void 0!==a.clearcoatNormalScale&&(d.clearcoatNormalScale=(new z).fromArray(a.clearcoatNormalScale));return d},
|
|
|
setTextures:function(a){this.textures=a;return this}});var lh={decodeText:function(a){if("undefined"!==typeof TextDecoder)return(new TextDecoder).decode(a);for(var b="",c=0,d=a.length;c<d;c++)b+=String.fromCharCode(a[c]);try{return decodeURIComponent(escape(b))}catch(e){return b}},extractUrlBase:function(a){var b=a.lastIndexOf("/");return-1===b?"./":a.substr(0,b+1)}};sf.prototype=Object.assign(Object.create(C.prototype),{constructor:sf,isInstancedBufferGeometry:!0,copy:function(a){C.prototype.copy.call(this,
|
|
|
a);this.maxInstancedCount=a.maxInstancedCount;return this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var a=C.prototype.toJSON.call(this);a.maxInstancedCount=this.maxInstancedCount;a.isInstancedBufferGeometry=!0;return a}});tf.prototype=Object.assign(Object.create(Q.prototype),{constructor:tf,isInstancedBufferAttribute:!0,copy:function(a){Q.prototype.copy.call(this,a);this.meshPerAttribute=a.meshPerAttribute;return this},toJSON:function(){var a=Q.prototype.toJSON.call(this);
|
|
|
a.meshPerAttribute=this.meshPerAttribute;a.isInstancedBufferAttribute=!0;return a}});uf.prototype=Object.assign(Object.create(S.prototype),{constructor:uf,load:function(a,b,c,d){var e=this,f=new Ra(e.manager);f.setPath(e.path);f.load(a,function(a){b(e.parse(JSON.parse(a)))},c,d)},parse:function(a){var b=a.isInstancedBufferGeometry?new sf:new C,c=a.data.index;if(void 0!==c){var d=new mh[c.type](c.array);b.setIndex(new Q(d,1))}c=a.data.attributes;for(var e in c){var f=c[e];d=new mh[f.type](f.array);
|
|
@@ -841,8 +841,8 @@ d(b);e.manager.itemError(a);e.manager.itemEnd(a)});e.manager.itemStart(a)}});Obj
|
|
|
return this},toShapes:function(a,b){function c(a){for(var b=[],c=0,d=a.length;c<d;c++){var e=a[c],f=new Jb;f.curves=e.curves;b.push(f)}return b}function d(a,b){for(var c=b.length,d=!1,e=c-1,f=0;f<c;e=f++){var g=b[e],h=b[f],l=h.x-g.x,k=h.y-g.y;if(Math.abs(k)>Number.EPSILON){if(0>k&&(g=b[f],l=-l,h=b[e],k=-k),!(a.y<g.y||a.y>h.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=k*(a.x-g.x)-l*(a.y-g.y);if(0===e)return!0;0>e||(d=!d)}}else if(a.y===g.y&&(h.x<=a.x&&a.x<=g.x||g.x<=a.x&&a.x<=h.x))return!0}return d}
|
|
|
var e=qb.isClockWise,f=this.subPaths;if(0===f.length)return[];if(!0===b)return c(f);b=[];if(1===f.length){var g=f[0];var h=new Jb;h.curves=g.curves;b.push(h);return b}var l=!e(f[0].getPoints());l=a?!l:l;h=[];var k=[],n=[],r=0;k[r]=void 0;n[r]=[];for(var t=0,u=f.length;t<u;t++){g=f[t];var q=g.getPoints();var v=e(q);(v=a?!v:v)?(!l&&k[r]&&r++,k[r]={s:new Jb,p:q},k[r].s.curves=g.curves,l&&r++,n[r]=[]):n[r].push({h:g,p:q[0]})}if(!k[0])return c(f);if(1<k.length){t=!1;a=[];e=0;for(f=k.length;e<f;e++)h[e]=
|
|
|
[];e=0;for(f=k.length;e<f;e++)for(g=n[e],v=0;v<g.length;v++){l=g[v];r=!0;for(q=0;q<k.length;q++)d(l.p,k[q].p)&&(e!==q&&a.push({froms:e,tos:q,hole:v}),r?(r=!1,h[q].push(l)):t=!0);r&&h[e].push(l)}0<a.length&&(t||(n=h))}t=0;for(e=k.length;t<e;t++)for(h=k[t].s,b.push(h),a=n[t],f=0,g=a.length;f<g;f++)h.holes.push(a[f].h);return b}});Object.assign(Dg.prototype,{isFont:!0,generateShapes:function(a,b){void 0===b&&(b=100);var c=[],d=b;b=this.data;var e=Array.from?Array.from(a):String(a).split("");d/=b.resolution;
|
|
|
-var f=(b.boundingBox.yMax-b.boundingBox.yMin+b.underlineThickness)*d;a=[];for(var g=0,h=0,l=0;l<e.length;l++){var k=e[l];if("\n"===k)g=0,h-=f;else{var n=k;k=d;var r=g,t=h,u=b,q=u.glyphs[n]||u.glyphs["?"];if(q){n=new Cg;if(q.o){u=q._cachedOutline||(q._cachedOutline=q.o.split(" "));for(var v=0,y=u.length;v<y;)switch(u[v++]){case "m":var w=u[v++]*k+r;var x=u[v++]*k+t;n.moveTo(w,x);break;case "l":w=u[v++]*k+r;x=u[v++]*k+t;n.lineTo(w,x);break;case "q":var A=u[v++]*k+r;var C=u[v++]*k+t;var z=u[v++]*k+r;
|
|
|
-var D=u[v++]*k+t;n.quadraticCurveTo(z,D,A,C);break;case "b":A=u[v++]*k+r,C=u[v++]*k+t,z=u[v++]*k+r,D=u[v++]*k+t,w=u[v++]*k+r,x=u[v++]*k+t,n.bezierCurveTo(z,D,w,x,A,C)}}k={offsetX:q.ha*k,path:n}}else console.error('THREE.Font: character "'+n+'" does not exists in font family '+u.familyName+"."),k=void 0;g+=k.offsetX;a.push(k.path)}}b=0;for(e=a.length;b<e;b++)Array.prototype.push.apply(c,a[b].toShapes());return c}});Eg.prototype=Object.assign(Object.create(S.prototype),{constructor:Eg,load:function(a,
|
|
|
+var f=(b.boundingBox.yMax-b.boundingBox.yMin+b.underlineThickness)*d;a=[];for(var g=0,h=0,l=0;l<e.length;l++){var k=e[l];if("\n"===k)g=0,h-=f;else{var n=k;k=d;var r=g,t=h,u=b,q=u.glyphs[n]||u.glyphs["?"];if(q){n=new Cg;if(q.o){u=q._cachedOutline||(q._cachedOutline=q.o.split(" "));for(var v=0,z=u.length;v<z;)switch(u[v++]){case "m":var w=u[v++]*k+r;var y=u[v++]*k+t;n.moveTo(w,y);break;case "l":w=u[v++]*k+r;y=u[v++]*k+t;n.lineTo(w,y);break;case "q":var A=u[v++]*k+r;var C=u[v++]*k+t;var x=u[v++]*k+r;
|
|
|
+var D=u[v++]*k+t;n.quadraticCurveTo(x,D,A,C);break;case "b":A=u[v++]*k+r,C=u[v++]*k+t,x=u[v++]*k+r,D=u[v++]*k+t,w=u[v++]*k+r,y=u[v++]*k+t,n.bezierCurveTo(x,D,w,y,A,C)}}k={offsetX:q.ha*k,path:n}}else console.error('THREE.Font: character "'+n+'" does not exists in font family '+u.familyName+"."),k=void 0;g+=k.offsetX;a.push(k.path)}}b=0;for(e=a.length;b<e;b++)Array.prototype.push.apply(c,a[b].toShapes());return c}});Eg.prototype=Object.assign(Object.create(S.prototype),{constructor:Eg,load:function(a,
|
|
|
b,c,d){var e=this,f=new Ra(this.manager);f.setPath(this.path);f.load(a,function(a){try{var c=JSON.parse(a)}catch(l){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),c=JSON.parse(a.substring(65,a.length-2))}a=e.parse(c);b&&b(a)},c,d)},parse:function(a){return new Dg(a)}});var Vf,Jg={getContext:function(){void 0===Vf&&(Vf=new (window.AudioContext||window.webkitAudioContext));return Vf},setContext:function(a){Vf=a}};wf.prototype=Object.assign(Object.create(S.prototype),
|
|
|
{constructor:wf,load:function(a,b,c,d){var e=new Ra(this.manager);e.setResponseType("arraybuffer");e.setPath(this.path);e.load(a,function(a){a=a.slice(0);Jg.getContext().decodeAudioData(a,function(a){b(a)})},c,d)}});Object.assign(xf.prototype,{isSphericalHarmonics3:!0,set:function(a){for(var b=0;9>b;b++)this.coefficients[b].copy(a[b]);return this},zero:function(){for(var a=0;9>a;a++)this.coefficients[a].set(0,0,0);return this},getAt:function(a,b){var c=a.x,d=a.y;a=a.z;var e=this.coefficients;b.copy(e[0]).multiplyScalar(.282095);
|
|
|
b.addScale(e[1],.488603*d);b.addScale(e[2],.488603*a);b.addScale(e[3],.488603*c);b.addScale(e[4],1.092548*c*d);b.addScale(e[5],1.092548*d*a);b.addScale(e[6],.315392*(3*a*a-1));b.addScale(e[7],1.092548*c*a);b.addScale(e[8],.546274*(c*c-d*d));return b},getIrradianceAt:function(a,b){var c=a.x,d=a.y;a=a.z;var e=this.coefficients;b.copy(e[0]).multiplyScalar(.886227);b.addScale(e[1],1.023328*d);b.addScale(e[2],1.023328*a);b.addScale(e[3],1.023328*c);b.addScale(e[4],.858086*c*d);b.addScale(e[5],.858086*
|
|
@@ -881,7 +881,7 @@ this,a);return}a=a[f]}}f=a[d];if(void 0===f)console.error("THREE.PropertyBinding
|
|
|
this);return}if(a.geometry.isBufferGeometry){if(!a.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}for(c=0;c<this.node.geometry.morphAttributes.position.length;c++)if(a.geometry.morphAttributes.position[c].name===e){e=c;break}}else{if(!a.geometry.morphTargets){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",
|
|
|
this);return}for(c=0;c<this.node.geometry.morphTargets.length;c++)if(a.geometry.morphTargets[c].name===e){e=c;break}}}c=this.BindingType.ArrayElement;this.resolvedProperty=f;this.propertyIndex=e}else void 0!==f.fromArray&&void 0!==f.toArray?(c=this.BindingType.HasFromToArray,this.resolvedProperty=f):Array.isArray(f)?(c=this.BindingType.EntireArray,this.resolvedProperty=f):this.propertyName=d;this.getValue=this.GetterByBindingType[c];this.setValue=this.SetterByBindingTypeAndVersioning[c][b]}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+
|
|
|
this.path+" but it wasn't found.")},unbind:function(){this.node=null;this.getValue=this._getValue_unbound;this.setValue=this._setValue_unbound}});Object.assign(Ca.prototype,{_getValue_unbound:Ca.prototype.getValue,_setValue_unbound:Ca.prototype.setValue});Object.assign(ei.prototype,{isAnimationObjectGroup:!0,add:function(){for(var a=this._objects,b=a.length,c=this.nCachedObjects_,d=this._indicesByUUID,e=this._paths,f=this._parsedPaths,g=this._bindings,h=g.length,l=void 0,k=0,n=arguments.length;k!==
|
|
|
-n;++k){var r=arguments[k],t=r.uuid,u=d[t];if(void 0===u){u=b++;d[t]=u;a.push(r);t=0;for(var q=h;t!==q;++t)g[t].push(new Ca(r,e[t],f[t]))}else if(u<c){l=a[u];var v=--c;q=a[v];d[q.uuid]=u;a[u]=q;d[t]=v;a[v]=r;t=0;for(q=h;t!==q;++t){var y=g[t],w=y[u];y[u]=y[v];void 0===w&&(w=new Ca(r,e[t],f[t]));y[v]=w}}else a[u]!==l&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=
|
|
|
+n;++k){var r=arguments[k],t=r.uuid,u=d[t];if(void 0===u){u=b++;d[t]=u;a.push(r);t=0;for(var q=h;t!==q;++t)g[t].push(new Ca(r,e[t],f[t]))}else if(u<c){l=a[u];var v=--c;q=a[v];d[q.uuid]=u;a[u]=q;d[t]=v;a[v]=r;t=0;for(q=h;t!==q;++t){var z=g[t],w=z[u];z[u]=z[v];void 0===w&&(w=new Ca(r,e[t],f[t]));z[v]=w}}else a[u]!==l&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=
|
|
|
c},remove:function(){for(var a=this._objects,b=this.nCachedObjects_,c=this._indicesByUUID,d=this._bindings,e=d.length,f=0,g=arguments.length;f!==g;++f){var h=arguments[f],l=h.uuid,k=c[l];if(void 0!==k&&k>=b){var n=b++,r=a[n];c[r.uuid]=k;a[k]=r;c[l]=n;a[n]=h;h=0;for(l=e;h!==l;++h){r=d[h];var t=r[k];r[k]=r[n];r[n]=t}}}this.nCachedObjects_=b},uncache:function(){for(var a=this._objects,b=a.length,c=this.nCachedObjects_,d=this._indicesByUUID,e=this._bindings,f=e.length,g=0,h=arguments.length;g!==h;++g){var l=
|
|
|
arguments[g].uuid,k=d[l];if(void 0!==k)if(delete d[l],k<c){l=--c;var n=a[l],r=--b,t=a[r];d[n.uuid]=k;a[k]=n;d[t.uuid]=l;a[l]=t;a.pop();n=0;for(t=f;n!==t;++n){var u=e[n],q=u[r];u[k]=u[l];u[l]=q;u.pop()}}else for(r=--b,t=a[r],d[t.uuid]=k,a[k]=t,a.pop(),n=0,t=f;n!==t;++n)u=e[n],u[k]=u[r],u.pop()}this.nCachedObjects_=c},subscribe_:function(a,b){var c=this._bindingsIndicesByPath,d=c[a],e=this._bindings;if(void 0!==d)return e[d];var f=this._paths,g=this._parsedPaths,h=this._objects,k=this.nCachedObjects_,
|
|
|
m=Array(h.length);d=e.length;c[a]=d;f.push(a);g.push(b);e.push(m);c=k;for(d=h.length;c!==d;++c)m[c]=new Ca(h[c],a,b);return m},unsubscribe_:function(a){var b=this._bindingsIndicesByPath,c=b[a];if(void 0!==c){var d=this._paths,e=this._parsedPaths,f=this._bindings,g=f.length-1,h=f[g];b[a[g]]=c;f[c]=h;f.pop();e[c]=e[g];e.pop();d[c]=d[g];d.pop()}}});Object.assign(fi.prototype,{play:function(){this._mixer._activateAction(this);return this},stop:function(){this._mixer._deactivateAction(this);return this.reset()},
|
|
@@ -909,11 +909,11 @@ getRoot:function(){return this._root},uncacheClip:function(a){var b=this._action
|
|
|
copy:function(a){pb.prototype.copy.call(this,a);this.meshPerAttribute=a.meshPerAttribute;return this}});Object.assign(gi.prototype,{linePrecision:1,set:function(a,b){this.ray.set(a,b)},setFromCamera:function(a,b){b&&b.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(b.matrixWorld),this.ray.direction.set(a.x,a.y,.5).unproject(b).sub(this.ray.origin).normalize(),this.camera=b):b&&b.isOrthographicCamera?(this.ray.origin.set(a.x,a.y,(b.near+b.far)/(b.near-b.far)).unproject(b),this.ray.direction.set(0,
|
|
|
0,-1).transformDirection(b.matrixWorld),this.camera=b):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(a,b,c){c=c||[];Pg(a,this,c,b);c.sort(hi);return c},intersectObjects:function(a,b,c){c=c||[];if(!1===Array.isArray(a))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),c;for(var d=0,e=a.length;d<e;d++)Pg(a[d],this,c,b);c.sort(hi);return c}});Object.assign(ii.prototype,{set:function(a,b,c){this.radius=a;this.phi=b;this.theta=c;return this},
|
|
|
clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.radius=a.radius;this.phi=a.phi;this.theta=a.theta;return this},makeSafe:function(){this.phi=Math.max(1E-6,Math.min(Math.PI-1E-6,this.phi));return this},setFromVector3:function(a){return this.setFromCartesianCoords(a.x,a.y,a.z)},setFromCartesianCoords:function(a,b,c){this.radius=Math.sqrt(a*a+b*b+c*c);0===this.radius?this.phi=this.theta=0:(this.theta=Math.atan2(a,c),this.phi=Math.acos(P.clamp(b/this.radius,-1,1)));return this}});
|
|
|
-Object.assign(ji.prototype,{set:function(a,b,c){this.radius=a;this.theta=b;this.y=c;return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.radius=a.radius;this.theta=a.theta;this.y=a.y;return this},setFromVector3:function(a){return this.setFromCartesianCoords(a.x,a.y,a.z)},setFromCartesianCoords:function(a,b,c){this.radius=Math.sqrt(a*a+c*c);this.theta=Math.atan2(a,c);this.y=b;return this}});var Ni=new y;Object.assign(Qg.prototype,{set:function(a,b){this.min.copy(a);
|
|
|
+Object.assign(ji.prototype,{set:function(a,b,c){this.radius=a;this.theta=b;this.y=c;return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.radius=a.radius;this.theta=a.theta;this.y=a.y;return this},setFromVector3:function(a){return this.setFromCartesianCoords(a.x,a.y,a.z)},setFromCartesianCoords:function(a,b,c){this.radius=Math.sqrt(a*a+c*c);this.theta=Math.atan2(a,c);this.y=b;return this}});var Ni=new z;Object.assign(Qg.prototype,{set:function(a,b){this.min.copy(a);
|
|
|
this.max.copy(b);return this},setFromPoints:function(a){this.makeEmpty();for(var b=0,c=a.length;b<c;b++)this.expandByPoint(a[b]);return this},setFromCenterAndSize:function(a,b){b=Ni.copy(b).multiplyScalar(.5);this.min.copy(a).sub(b);this.max.copy(a).add(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.min.copy(a.min);this.max.copy(a.max);return this},makeEmpty:function(){this.min.x=this.min.y=Infinity;this.max.x=this.max.y=-Infinity;return this},isEmpty:function(){return this.max.x<
|
|
|
-this.min.x||this.max.y<this.min.y},getCenter:function(a){void 0===a&&(console.warn("THREE.Box2: .getCenter() target is now required"),a=new y);return this.isEmpty()?a.set(0,0):a.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(a){void 0===a&&(console.warn("THREE.Box2: .getSize() target is now required"),a=new y);return this.isEmpty()?a.set(0,0):a.subVectors(this.max,this.min)},expandByPoint:function(a){this.min.min(a);this.max.max(a);return this},expandByVector:function(a){this.min.sub(a);
|
|
|
-this.max.add(a);return this},expandByScalar:function(a){this.min.addScalar(-a);this.max.addScalar(a);return this},containsPoint:function(a){return a.x<this.min.x||a.x>this.max.x||a.y<this.min.y||a.y>this.max.y?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y},getParameter:function(a,b){void 0===b&&(console.warn("THREE.Box2: .getParameter() target is now required"),b=new y);return b.set((a.x-this.min.x)/(this.max.x-this.min.x),
|
|
|
-(a.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(a){return a.max.x<this.min.x||a.min.x>this.max.x||a.max.y<this.min.y||a.min.y>this.max.y?!1:!0},clampPoint:function(a,b){void 0===b&&(console.warn("THREE.Box2: .clampPoint() target is now required"),b=new y);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(a){return Ni.copy(a).clamp(this.min,this.max).sub(a).length()},intersect:function(a){this.min.max(a.min);this.max.min(a.max);return this},union:function(a){this.min.min(a.min);
|
|
|
+this.min.x||this.max.y<this.min.y},getCenter:function(a){void 0===a&&(console.warn("THREE.Box2: .getCenter() target is now required"),a=new z);return this.isEmpty()?a.set(0,0):a.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(a){void 0===a&&(console.warn("THREE.Box2: .getSize() target is now required"),a=new z);return this.isEmpty()?a.set(0,0):a.subVectors(this.max,this.min)},expandByPoint:function(a){this.min.min(a);this.max.max(a);return this},expandByVector:function(a){this.min.sub(a);
|
|
|
+this.max.add(a);return this},expandByScalar:function(a){this.min.addScalar(-a);this.max.addScalar(a);return this},containsPoint:function(a){return a.x<this.min.x||a.x>this.max.x||a.y<this.min.y||a.y>this.max.y?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y},getParameter:function(a,b){void 0===b&&(console.warn("THREE.Box2: .getParameter() target is now required"),b=new z);return b.set((a.x-this.min.x)/(this.max.x-this.min.x),
|
|
|
+(a.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(a){return a.max.x<this.min.x||a.min.x>this.max.x||a.max.y<this.min.y||a.min.y>this.max.y?!1:!0},clampPoint:function(a,b){void 0===b&&(console.warn("THREE.Box2: .clampPoint() target is now required"),b=new z);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(a){return Ni.copy(a).clamp(this.min,this.max).sub(a).length()},intersect:function(a){this.min.max(a.min);this.max.min(a.max);return this},union:function(a){this.min.min(a.min);
|
|
|
this.max.max(a.max);return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}});var Oi=new n,Wf=new n;Object.assign(Rg.prototype,{set:function(a,b){this.start.copy(a);this.end.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.start.copy(a.start);this.end.copy(a.end);return this},getCenter:function(a){void 0===a&&(console.warn("THREE.Line3: .getCenter() target is now required"),
|
|
|
a=new n);return a.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(a){void 0===a&&(console.warn("THREE.Line3: .delta() target is now required"),a=new n);return a.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(a,b){void 0===b&&(console.warn("THREE.Line3: .at() target is now required"),b=new n);return this.delta(b).multiplyScalar(a).add(this.start)},closestPointToPointParameter:function(a,
|
|
|
b){Oi.subVectors(a,this.start);Wf.subVectors(this.end,this.start);a=Wf.dot(Wf);a=Wf.dot(Oi)/a;b&&(a=P.clamp(a,0,1));return a},closestPointToPoint:function(a,b,c){a=this.closestPointToPointParameter(a,b);void 0===c&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),c=new n);return this.delta(c).multiplyScalar(a).add(this.start)},applyMatrix4:function(a){this.start.applyMatrix4(a);this.end.applyMatrix4(a);return this},equals:function(a){return a.start.equals(this.start)&&a.end.equals(this.end)}});
|
|
@@ -954,7 +954,7 @@ applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Arra
|
|
|
function(a){console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.");return a.applyQuaternion(this)};Object.assign(Sb.prototype,{isIntersectionBox:function(a){console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox().");return this.intersectsBox(a)},isIntersectionPlane:function(a){console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().");return this.intersectsPlane(a)},isIntersectionSphere:function(a){console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().");
|
|
|
return this.intersectsSphere(a)}});Object.assign(va.prototype,{area:function(){console.warn("THREE.Triangle: .area() has been renamed to .getArea().");return this.getArea()},barycoordFromPoint:function(a,b){console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().");return this.getBarycoord(a,b)},midpoint:function(a){console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint().");return this.getMidpoint(a)},normal:function(a){console.warn("THREE.Triangle: .normal() has been renamed to .getNormal().");
|
|
|
return this.getNormal(a)},plane:function(a){console.warn("THREE.Triangle: .plane() has been renamed to .getPlane().");return this.getPlane(a)}});Object.assign(va,{barycoordFromPoint:function(a,b,c,d,e){console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().");return va.getBarycoord(a,b,c,d,e)},normal:function(a,b,c,d){console.warn("THREE.Triangle: .normal() has been renamed to .getNormal().");return va.getNormal(a,b,c,d)}});Object.assign(Jb.prototype,{extractAllPoints:function(a){console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead.");
|
|
|
-return this.extractPoints(a)},extrude:function(a){console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.");return new dc(this,a)},makeGeometry:function(a){console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.");return new ec(this,a)}});Object.assign(y.prototype,{fromAttribute:function(a,b,c){console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,c)},distanceToManhattan:function(a){console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo().");
|
|
|
+return this.extractPoints(a)},extrude:function(a){console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.");return new dc(this,a)},makeGeometry:function(a){console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.");return new ec(this,a)}});Object.assign(z.prototype,{fromAttribute:function(a,b,c){console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,c)},distanceToManhattan:function(a){console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo().");
|
|
|
return this.manhattanDistanceTo(a)},lengthManhattan:function(){console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength().");return this.manhattanLength()}});Object.assign(n.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},
|
|
|
getPositionFromMatrix:function(a){console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().");return this.setFromMatrixPosition(a)},getScaleFromMatrix:function(a){console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().");return this.setFromMatrixScale(a)},getColumnFromMatrix:function(a,b){console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().");return this.setFromMatrixColumn(b,
|
|
|
a)},applyProjection:function(a){console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead.");return this.applyMatrix4(a)},fromAttribute:function(a,b,c){console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,c)},distanceToManhattan:function(a){console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo().");return this.manhattanDistanceTo(a)},lengthManhattan:function(){console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength().");
|
|
@@ -1021,6 +1021,6 @@ hc;k.Shape=Jb;k.ShapeBufferGeometry=fc;k.ShapeGeometry=ec;k.ShapePath=Cg;k.Shape
|
|
|
202;k.StaticCopyUsage=35046;k.StaticDrawUsage=35044;k.StaticReadUsage=35045;k.StereoCamera=ci;k.StreamCopyUsage=35042;k.StreamDrawUsage=35040;k.StreamReadUsage=35041;k.StringKeyframeTrack=ef;k.SubtractEquation=101;k.SubtractiveBlending=3;k.TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3};k.TangentSpaceNormalMap=0;k.TetrahedronBufferGeometry=Mc;k.TetrahedronGeometry=Ud;k.TextBufferGeometry=Sc;k.TextGeometry=ee;k.Texture=X;k.TextureLoader=hf;k.TorusBufferGeometry=Qc;k.TorusGeometry=$d;k.TorusKnotBufferGeometry=
|
|
|
Pc;k.TorusKnotGeometry=Zd;k.Triangle=va;k.TriangleFanDrawMode=2;k.TriangleStripDrawMode=1;k.TrianglesDrawMode=0;k.TubeBufferGeometry=bc;k.TubeGeometry=Yd;k.UVMapping=300;k.Uint16Attribute=function(a,b){console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.");return new Tb(a,b)};k.Uint16BufferAttribute=Tb;k.Uint32Attribute=function(a,b){console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.");return new Ub(a,
|
|
|
b)};k.Uint32BufferAttribute=Ub;k.Uint8Attribute=function(a,b){console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.");return new yd(a,b)};k.Uint8BufferAttribute=yd;k.Uint8ClampedAttribute=function(a,b){console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.");return new zd(a,b)};k.Uint8ClampedBufferAttribute=zd;k.Uncharted2ToneMapping=3;k.Uniform=yf;k.UniformsLib=G;k.UniformsUtils=Gk;k.UnsignedByteType=
|
|
|
-1009;k.UnsignedInt248Type=1020;k.UnsignedIntType=1014;k.UnsignedShort4444Type=1017;k.UnsignedShort5551Type=1018;k.UnsignedShort565Type=1019;k.UnsignedShortType=1012;k.VSMShadowMap=3;k.Vector2=y;k.Vector3=n;k.Vector4=fa;k.VectorKeyframeTrack=Zc;k.Vertex=function(a,b,c){console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead.");return new n(a,b,c)};k.VertexColors=2;k.VertexNormalsHelper=re;k.VertexTangentsHelper=se;k.VideoTexture=tg;k.WebGLMultisampleRenderTarget=ag;k.WebGLRenderTarget=
|
|
|
+1009;k.UnsignedInt248Type=1020;k.UnsignedIntType=1014;k.UnsignedShort4444Type=1017;k.UnsignedShort5551Type=1018;k.UnsignedShort565Type=1019;k.UnsignedShortType=1012;k.VSMShadowMap=3;k.Vector2=z;k.Vector3=n;k.Vector4=fa;k.VectorKeyframeTrack=Zc;k.Vertex=function(a,b,c){console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead.");return new n(a,b,c)};k.VertexColors=2;k.VertexNormalsHelper=re;k.VertexTangentsHelper=se;k.VideoTexture=tg;k.WebGLMultisampleRenderTarget=ag;k.WebGLRenderTarget=
|
|
|
ia;k.WebGLRenderTargetCube=Bb;k.WebGLRenderer=pg;k.WebGLUtils=Ph;k.WireframeGeometry=Kc;k.WireframeHelper=function(a,b){console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead.");return new T(new Kc(a.geometry),new aa({color:void 0!==b?b:16777215}))};k.WrapAroundEnding=2402;k.XHRLoader=function(a){console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader.");return new Ra(a)};k.ZeroCurvatureEnding=2400;k.ZeroFactor=200;k.ZeroSlopeEnding=2401;k.ZeroStencilOp=
|
|
|
0;k.sRGBEncoding=3001;Object.defineProperty(k,"__esModule",{value:!0})});
|