text: !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.THREE=t.THREE||{})}(this,function(t){"use strict";function e(){}function i(t,e){this.x=t||0,this.y=e||0}function n(e,a,o,s,c,h,l,u,p,d){Object.defineProperty(this,"id",{value:r()}),this.uuid=t.Math.generateUUID(),this.name="",this.sourceFile="",this.image=void 0!==e?e:n.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==a?a:n.DEFAULT_MAPPING,this.wrapS=void 0!==o?o:_a,this.wrapT=void 0!==s?s:_a,this.magFilter=void 0!==c?c:Ta,this.minFilter=void 0!==h?h:Aa,this.anisotropy=void 0!==p?p:1,this.format=void 0!==l?l:Va,this.type=void 0!==u?u:La,this.offset=new i(0,0),this.repeat=new i(1,1),this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==d?d:vo,this.version=0,this.onUpdate=null}function r(){return So++}function a(){this.elements=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function o(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._w=void 0!==n?n:1}function s(t,e,i){this.x=t||0,this.y=e||0,this.z=i||0}function c(t,e){function i(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),e=new Uint16Array([0,1,2,0,2,3]);c=f.createBuffer(),h=f.createBuffer(),f.bindBuffer(f.ARRAY_BUFFER,c),f.bufferData(f.ARRAY_BUFFER,t,f.STATIC_DRAW),f.bindBuffer(f.ELEMENT_ARRAY_BUFFER,h),f.bufferData(f.ELEMENT_ARRAY_BUFFER,e,f.STATIC_DRAW),l=r(),u={position:f.getAttribLocation(l,"position"),uv:f.getAttribLocation(l,"uv")},p={uvOffset:f.getUniformLocation(l,"uvOffset"),uvScale:f.getUniformLocation(l,"uvScale"),rotation:f.getUniformLocation(l,"rotation"),scale:f.getUniformLocation(l,"scale"),color:f.getUniformLocation(l,"color"),map:f.getUniformLocation(l,"map"),opacity:f.getUniformLocation(l,"opacity"),modelViewMatrix:f.getUniformLocation(l,"modelViewMatrix"),projectionMatrix:f.getUniformLocation(l,"projectionMatrix"),fogType:f.getUniformLocation(l,"fogType"),fogDensity:f.getUniformLocation(l,"fogDensity"),fogNear:f.getUniformLocation(l,"fogNear"),fogFar:f.getUniformLocation(l,"fogFar"),fogColor:f.getUniformLocation(l,"fogColor"),alphaTest:f.getUniformLocation(l,"alphaTest")};var i=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");i.width=8,i.height=8;var a=i.getContext("2d");a.fillStyle="white",a.fillRect(0,0,8,8),d=new n(i),d.needsUpdate=!0}function r(){var e=f.createProgram(),i=f.createShader(f.VERTEX_SHADER),n=f.createShader(f.FRAGMENT_SHADER);return f.shaderSource(i,["precision "+t.getPrecision()+" float;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","void main() {","vUV = uvOffset + uv * uvScale;","vec2 alignedPosition = position * scale;","vec2 rotatedPosition;","rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","vec4 finalPosition;","finalPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","finalPosition.xy += rotatedPosition;","finalPosition = projectionMatrix * finalPosition;","gl_Position = finalPosition;","}"].join("\n")),f.shaderSource(n,["precision "+t.getPrecision()+" float;","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","void main() {","vec4 texture = texture2D( map, vUV );","if ( texture.a < alphaTest ) discard;","gl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","if ( fogType > 0 ) {","float depth = gl_FragCoord.z / gl_FragCoord.w;","float fogFactor = 0.0;","if ( fogType == 1 ) {","fogFactor = smoothstep( fogNear, fogFar, depth );","} else {","const float LOG2 = 1.442695;","fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );","fogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","}","gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );","}","}"].join("\n")),f.compileShader(i),f.compileShader(n),f.attachShader(e,i),f.attachShader(e,n),f.linkProgram(e),e}function a(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}var c,h,l,u,p,d,f=t.context,m=t.state,v=new s,g=new o,y=new s;this.render=function(n,r){if(0!==e.length){void 0===l&&i(),f.useProgram(l),m.initAttributes(),m.enableAttribute(u.position),m.enableAttribute(u.uv),m.disableUnusedAttributes(),m.disable(f.CULL_FACE),m.enable(f.BLEND),f.bindBuffer(f.ARRAY_BUFFER,c),f.vertexAttribPointer(u.position,2,f.FLOAT,!1,16,0),f.vertexAttribPointer(u.uv,2,f.FLOAT,!1,16,8),f.bindBuffer(f.ELEMENT_ARRAY_BUFFER,h),f.uniformMatrix4fv(p.projectionMatrix,!1,r.projectionMatrix.elements),m.activeTexture(f.TEXTURE0),f.uniform1i(p.map,0);var o=0,s=0,x=n.fog;x?(f.uniform3f(p.fogColor,x.color.r,x.color.g,x.color.b),x&&x.isFog?(f.uniform1f(p.fogNear,x.near),f.uniform1f(p.fogFar,x.far),f.uniform1i(p.fogType,1),o=1,s=1):x&&x.isFogExp2&&(f.uniform1f(p.fogDensity,x.density),f.uniform1i(p.fogType,2),o=2,s=2)):(f.uniform1i(p.fogType,0),o=0,s=0);for(var _=0,b=e.length;_<b;_++){var w=e[_];w.modelViewMatrix.multiplyMatrices(r.matrixWorldInverse,w.matrixWorld),w.z=-w.modelViewMatrix.elements[14]}e.sort(a);for(var M=[],_=0,b=e.length;_<b;_++){var w=e[_],E=w.material;if(E.visible!==!1){f.uniform1f(p.alphaTest,E.alphaTest),f.uniformMatrix4fv(p.modelViewMatrix,!1,w.modelViewMatrix.elements),w.matrixWorld.decompose(v,g,y),M[0]=y.x,M[1]=y.y;var T=0;n.fog&&E.fog&&(T=s),o!==T&&(f.uniform1i(p.fogType,T),o=T),null!==E.map?(f.uniform2f(p.uvOffset,E.map.offset.x,E.map.offset.y),f.uniform2f(p.uvScale,E.map.repeat.x,E.map.repeat.y)):(f.uniform2f(p.uvOffset,0,0),f.uniform2f(p.uvScale,1,1)),f.uniform1f(p.opacity,E.opacity),f.uniform3f(p.color,E.color.r,E.color.g,E.color.b),f.uniform1f(p.rotation,E.rotation),f.uniform2fv(p.scale,M),m.setBlending(E.blending,E.blendEquation,E.blendSrc,E.blendDst),m.setDepthTest(E.depthTest),m.setDepthWrite(E.depthWrite),E.map?t.setTexture2D(E.map,0):t.setTexture2D(d,0),f.drawElements(f.TRIANGLES,6,f.UNSIGNED_SHORT,0)}}m.enable(f.CULL_FACE),t.resetGLState()}}}function h(t,e){this.min=void 0!==t?t:new i((+(1/0)),(+(1/0))),this.max=void 0!==e?e:new i((-(1/0)),(-(1/0)))}function l(t,e){function n(){var t=new Float32Array([-1,-1,0,0,1,-1,1,0,1,1,1,1,-1,1,0,1]),e=new Uint16Array([0,1,2,0,2,3]);a=m.createBuffer(),o=m.createBuffer(),m.bindBuffer(m.ARRAY_BUFFER,a),m.bufferData(m.ARRAY_BUFFER,t,m.STATIC_DRAW),m.bindBuffer(m.ELEMENT_ARRAY_BUFFER,o),m.bufferData(m.ELEMENT_ARRAY_BUFFER,e,m.STATIC_DRAW),d=m.createTexture(),f=m.createTexture(),v.bindTexture(m.TEXTURE_2D,d),m.texImage2D(m.TEXTURE_2D,0,m.RGB,16,16,0,m.RGB,m.UNSIGNED_BYTE,null),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,m.CLAMP_TO_EDGE),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,m.CLAMP_TO_EDGE),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.NEAREST),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.NEAREST),v.bindTexture(m.TEXTURE_2D,f),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,16,16,0,m.RGBA,m.UNSIGNED_BYTE,null),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,m.CLAMP_TO_EDGE),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,m.CLAMP_TO_EDGE),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.NEAREST),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.NEAREST),c={vertexShader:["uniform lowp int renderType;","uniform vec3 screenPosition;","uniform vec2 scale;","uniform float rotation;","uniform sampler2D occlusionMap;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float vVisibility;","void main() {","vUV = uv;","vec2 pos = position;","if ( renderType == 2 ) {","vec4 visibility = texture2D( occlusionMap, vec2( 0.1, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.1, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.5 ) );","vVisibility =        visibility.r / 9.0;","vVisibility *= 1.0 - visibility.g / 9.0;","vVisibility *=       visibility.b / 9.0;","vVisibility *= 1.0 - visibility.a / 9.0;","pos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;","pos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;","}","gl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );","}"].join("\n"),fragmentShader:["uniform lowp int renderType;","uniform sampler2D map;","uniform float opacity;","uniform vec3 color;","varying vec2 vUV;","varying float vVisibility;","void main() {","if ( renderType == 0 ) {","gl_FragColor = vec4( 1.0, 0.0, 1.0, 0.0 );","} else if ( renderType == 1 ) {","gl_FragColor = texture2D( map, vUV );","} else {","vec4 texture = texture2D( map, vUV );","texture.a *= opacity * vVisibility;","gl_FragColor = texture;","gl_FragColor.rgb *= color;","}","}"].join("\n")},l=r(c),u={vertex:m.getAttribLocation(l,"position"),uv:m.getAttribLocation(l,"uv")},p={renderType:m.getUniformLocation(l,"renderType"),map:m.getUniformLocation(l,"map"),occlusionMap:m.getUniformLocation(l,"occlusionMap"),opacity:m.getUniformLocation(l,"opacity"),color:m.getUniformLocation(l,"color"),scale:m.getUniformLocation(l,"scale"),rotation:m.getUniformLocation(l,"rotation"),screenPosition:m.getUniformLocation(l,"screenPosition")}}function r(e){var i=m.createProgram(),n=m.createShader(m.FRAGMENT_SHADER),r=m.createShader(m.VERTEX_SHADER),a="precision "+t.getPrecision()+" float;\n";return m.shaderSource(n,a+e.fragmentShader),m.shaderSource(r,a+e.vertexShader),m.compileShader(n),m.compileShader(r),m.attachShader(i,n),m.attachShader(i,r),m.linkProgram(i),i}var a,o,c,l,u,p,d,f,m=t.context,v=t.state;this.render=function(r,c,g){if(0!==e.length){var y=new s,x=g.w/g.z,_=.5*g.z,b=.5*g.w,w=16/g.w,M=new i(w*x,w),E=new s(1,1,0),T=new i(1,1),S=new h;S.min.set(0,0),S.max.set(g.z-16,g.w-16),void 0===l&&n(),m.useProgram(l),v.initAttributes(),v.enableAttribute(u.vertex),v.enableAttribute(u.uv),v.disableUnusedAttributes(),m.uniform1i(p.occlusionMap,0),m.uniform1i(p.map,1),m.bindBuffer(m.ARRAY_BUFFER,a),m.vertexAttribPointer(u.vertex,2,m.FLOAT,!1,16,0),m.vertexAttribPointer(u.uv,2,m.FLOAT,!1,16,8),m.bindBuffer(m.ELEMENT_ARRAY_BUFFER,o),v.disable(m.CULL_FACE),v.setDepthWrite(!1);for(var A=0,L=e.length;A<L;A++){w=16/g.w,M.set(w*x,w);var R=e[A];if(y.set(R.matrixWorld.elements[12],R.matrixWorld.elements[13],R.matrixWorld.elements[14]),y.applyMatrix4(c.matrixWorldInverse),y.applyProjection(c.projectionMatrix),E.copy(y),T.x=g.x+E.x*_+_-8,T.y=g.y+E.y*b+b-8,S.containsPoint(T)===!0){v.activeTexture(m.TEXTURE0),v.bindTexture(m.TEXTURE_2D,null),v.activeTexture(m.TEXTURE1),v.bindTexture(m.TEXTURE_2D,d),m.copyTexImage2D(m.TEXTURE_2D,0,m.RGB,T.x,T.y,16,16,0),m.uniform1i(p.renderType,0),m.uniform2f(p.scale,M.x,M.y),m.uniform3f(p.screenPosition,E.x,E.y,E.z),v.disable(m.BLEND),v.enable(m.DEPTH_TEST),m.drawElements(m.TRIANGLES,6,m.UNSIGNED_SHORT,0),v.activeTexture(m.TEXTURE0),v.bindTexture(m.TEXTURE_2D,f),m.copyTexImage2D(m.TEXTURE_2D,0,m.RGBA,T.x,T.y,16,16,0),m.uniform1i(p.renderType,1),v.disable(m.DEPTH_TEST),v.activeTexture(m.TEXTURE1),v.bindTexture(m.TEXTURE_2D,d),m.drawElements(m.TRIANGLES,6,m.UNSIGNED_SHORT,0),R.positionScreen.copy(E),R.customUpdateCallback?R.customUpdateCallback(R):R.updateLensFlares(),m.uniform1i(p.renderType,2),v.enable(m.BLEND);for(var P=0,C=R.lensFlares.length;P<C;P++){var U=R.lensFlares[P];U.opacity>.001&&U.scale>.001&&(E.x=U.x,E.y=U.y,E.z=U.z,w=U.size*U.scale/g.w,M.x=w*x,M.y=w,m.uniform3f(p.screenPosition,E.x,E.y,E.z),m.uniform2f(p.scale,M.x,M.y),m.uniform1f(p.rotation,U.rotation),m.uniform1f(p.opacity,U.opacity),m.uniform3f(p.color,U.color.r,U.color.g,U.color.b),v.setBlending(U.blending,U.blendEquation,U.blendSrc,U.blendDst),t.setTexture2D(U.texture,1),m.drawElements(m.TRIANGLES,6,m.UNSIGNED_SHORT,0))}}}v.enable(m.CULL_FACE),v.enable(m.DEPTH_TEST),v.setDepthWrite(!0),t.resetGLState()}}}function u(t,e,i,r,a,o,s,c,h,l){t=void 0!==t?t:[],e=void 0!==e?e:pa,n.call(this,t,e,i,r,a,o,s,c,h,l),this.flipY=!1}function p(){this.seq=[],this.map={}}function d(t,e,i){var n=t[0];if(n<=0||n>0)return t;var r=e*i,a=Ro[r];if(void 0===a&&(a=new Float32Array(r),Ro[r]=a),0!==e){n.toArray(a,0);for(var o=1,s=0;o!==e;++o)s+=i,t[o].toArray(a,s)}return a}function f(t,e){var i=Po[e];void 0===i&&(i=new Int32Array(e),Po[e]=i);for(var n=0;n!==e;++n)i[n]=t.allocTextureUnit();return i}function m(t,e){t.uniform1f(this.addr,e)}function v(t,e){t.uniform1i(this.addr,e)}function g(t,e){void 0===e.x?t.uniform2fv(this.addr,e):t.uniform2f(this.addr,e.x,e.y)}function y(t,e){void 0!==e.x?t.uniform3f(this.addr,e.x,e.y,e.z):void 0!==e.r?t.uniform3f(this.addr,e.r,e.g,e.b):t.uniform3fv(this.addr,e)}function x(t,e){void 0===e.x?t.uniform4fv(this.addr,e):t.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function _(t,e){t.uniformMatrix2fv(this.addr,!1,e.elements||e)}function b(t,e){t.uniformMatrix3fv(this.addr,!1,e.elements||e)}function w(t,e){t.uniformMatrix4fv(this.addr,!1,e.elements||e)}function M(t,e,i){var n=i.allocTextureUnit();t.uniform1i(this.addr,n),i.setTexture2D(e||Ao,n)}function E(t,e,i){var n=i.allocTextureUnit();t.uniform1i(this.addr,n),i.setTextureCube(e||Lo,n)}function T(t,e){t.uniform2iv(this.addr,e)}function S(t,e){t.uniform3iv(this.addr,e)}function A(t,e){t.uniform4iv(this.addr,e)}function L(t){switch(t){case 5126:return m;case 35664:return g;case 35665:return y;case 35666:return x;case 35674:return _;case 35675:return b;case 35676:return w;case 35678:return M;case 35680:return E;case 5124:case 35670:return v;case 35667:case 35671:return T;case 35668:case 35672:return S;case 35669:case 35673:return A}}function R(t,e){t.uniform1fv(this.addr,e)}function P(t,e){t.uniform1iv(this.addr,e)}function C(t,e){t.uniform2fv(this.addr,d(e,this.size,2))}function U(t,e){t.uniform3fv(this.addr,d(e,this.size,3))}function I(t,e){t.uniform4fv(this.addr,d(e,this.size,4))}function D(t,e){t.uniformMatrix2fv(this.addr,!1,d(e,this.size,4))}function N(t,e){t.uniformMatrix3fv(this.addr,!1,d(e,this.size,9))}function O(t,e){t.uniformMatrix4fv(this.addr,!1,d(e,this.size,16))}function F(t,e,i){var n=e.length,r=f(i,n);t.uniform1iv(this.addr,r);for(var a=0;a!==n;++a)i.setTexture2D(e[a]||Ao,r[a])}function z(t,e,i){var n=e.length,r=f(i,n);t.uniform1iv(this.addr,r);for(var a=0;a!==n;++a)i.setTextureCube(e[a]||Lo,r[a])}function B(t){switch(t){case 5126:return R;case 35664:return C;case 35665:return U;case 35666:return I;case 35674:return D;case 35675:return N;case 35676:return O;case 35678:return F;case 35680:return z;case 5124:case 35670:return P;case 35667:case 35671:return T;case 35668:case 35672:return S;case 35669:case 35673:return A}}function G(t,e,i){this.id=t,this.addr=i,this.setValue=L(e.type)}function H(t,e,i){this.id=t,this.addr=i,this.size=e.size,this.setValue=B(e.type)}function V(t){this.id=t,p.call(this)}function k(t,e){t.seq.push(e),t.map[e.id]=e}function j(t,e,i){var n=t.name,r=n.length;for(Co.lastIndex=0;;){var a=Co.exec(n),o=Co.lastIndex,s=a[1],c="]"===a[2],h=a[3];if(c&&(s=0|s),void 0===h||"["===h&&o+2===r){k(i,void 0===h?new G(s,t,e):new H(s,t,e));break}var l=i.map,u=l[s];void 0===u&&(u=new V(s),k(i,u)),i=u}}function W(t,e,i){p.call(this),this.renderer=i;for(var n=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),r=0;r!==n;++r){var a=t.getActiveUniform(e,r),o=a.name,s=t.getUniformLocation(e,o);j(a,s,this)}}function X(e,i,n,r,a,o,s){function c(t,e){if(t.width>e||t.height>e){var i=e/Math.max(t.width,t.height),n=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");n.width=Math.floor(t.width*i),n.height=Math.floor(t.height*i);var r=n.getContext("2d");return r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+n.width+"x"+n.height,t),n}return t}function h(e){return t.Math.isPowerOfTwo(e.width)&&t.Math.isPowerOfTwo(e.height)}function l(e){if(e instanceof HTMLImageElement||e instanceof HTMLCanvasElement){var i=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");i.width=t.Math.nearestPowerOfTwo(e.width),i.height=t.Math.nearestPowerOfTwo(e.height);var n=i.getContext("2d");return n.drawImage(e,0,0,i.width,i.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+e.width+"x"+e.height+"). Resized to "+i.width+"x"+i.height,e),i}return e}function u(t){return t.wrapS!==_a||t.wrapT!==_a||t.minFilter!==wa&&t.minFilter!==Ta}function p(t){return t===wa||t===Ma||t===Ea?e.NEAREST:e.LINEAR}function d(t){var e=t.target;e.removeEventListener("dispose",d),m(e),L.textures--}function f(t){var e=t.target;e.removeEventListener("dispose",f),v(e),L.textures--}function m(t){var i=r.get(t);if(t.image&&i.__image__webglTextureCube)e.deleteTexture(i.__image__webglTextureCube);else{if(void 0===i.__webglInit)return;e.deleteTexture(i.__webglTexture)}r["delete"](t)}function v(t){var i=r.get(t),n=r.get(t.texture);if(t){if(void 0!==n.__webglTexture&&e.deleteTexture(n.__webglTexture),t.depthTexture&&t.depthTexture.dispose(),t&&t.isWebGLRenderTargetCube)for(var a=0;a<6;a++)e.deleteFramebuffer(i.__webglFramebuffer[a]),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer[a]);else e.deleteFramebuffer(i.__webglFramebuffer),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer);r["delete"](t.texture),r["delete"](t)}}function g(t,i){var a=r.get(t);if(t.version>0&&a.__version!==t.version){var o=t.image;if(void 0===o)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",t);else{if(o.complete!==!1)return void b(a,t,i);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",t)}}n.activeTexture(e.TEXTURE0+i),n.bindTexture(e.TEXTURE_2D,a.__webglTexture)}function y(t,i){var s=r.get(t);if(6===t.image.length)if(t.version>0&&s.__version!==t.version){s.__image__webglTextureCube||(t.addEventListener("dispose",d),s.__image__webglTextureCube=e.createTexture(),L.textures++),n.activeTexture(e.TEXTURE0+i),n.bindTexture(e.TEXTURE_CUBE_MAP,s.__image__webglTextureCube),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t.flipY);for(var l=t&&t.isCompressedTexture,u=t.image[0]&&t.image[0].isDataTexture,p=[],f=0;f<6;f++)l||u?p[f]=u?t.image[f].image:t.image[f]:p[f]=c(t.image[f],a.maxCubemapSize);var m=p[0],v=h(m),g=o(t.format),y=o(t.type);_(e.TEXTURE_CUBE_MAP,t,v);for(var f=0;f<6;f++)if(l)for(var x,b=p[f].mipmaps,w=0,M=b.length;w<M;w++)x=b[w],t.format!==Va&&t.format!==Ha?n.getCompressedTextureFormats().indexOf(g)>-1?n.compressedTexImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+f,w,g,x.width,x.height,0,x.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+f,w,g,x.width,x.height,0,g,y,x.data);else u?n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+f,0,g,p[f].width,p[f].height,0,g,y,p[f].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+f,0,g,g,y,p[f]);t.generateMipmaps&&v&&e.generateMipmap(e.TEXTURE_CUBE_MAP),s.__version=t.version,t.onUpdate&&t.onUpdate(t)}else n.activeTexture(e.TEXTURE0+i),n.bindTexture(e.TEXTURE_CUBE_MAP,s.__image__webglTextureCube)}function x(t,i){n.activeTexture(e.TEXTURE0+i),n.bindTexture(e.TEXTURE_CUBE_MAP,r.get(t).__webglTexture)}function _(t,n,s){var c;if(s?(e.texParameteri(t,e.TEXTURE_WRAP_S,o(n.wrapS)),e.texParameteri(t,e.TEXTURE_WRAP_T,o(n.wrapT)),e.texParameteri(t,e.TEXTURE_MAG_FILTER,o(n.magFilter)),e.texParameteri(t,e.TEXTURE_MIN_FILTER,o(n.minFilter))):(e.texParameteri(t,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(t,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),n.wrapS===_a&&n.wrapT===_a||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",n),e.texParameteri(t,e.TEXTURE_MAG_FILTER,p(n.magFilter)),e.texParameteri(t,e.TEXTURE_MIN_FILTER,p(n.minFilter)),n.minFilter!==wa&&n.minFilter!==Ta&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",n)),c=i.get("EXT_texture_filter_anisotropic")){if(n.type===Da&&null===i.get("OES_texture_float_linear"))return;if(n.type===Na&&null===i.get("OES_texture_half_float_linear"))return;(n.anisotropy>1||r.get(n).__currentAnisotropy)&&(e.texParameterf(t,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(n.anisotropy,a.getMaxAnisotropy())),r.get(n).__currentAnisotropy=n.anisotropy)}}function b(t,i,r){void 0===t.__webglInit&&(t.__webglInit=!0,i.addEventListener("dispose",d),t.__webglTexture=e.createTexture(),L.textures++),n.activeTexture(e.TEXTURE0+r),n.bindTexture(e.TEXTURE_2D,t.__webglTexture),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,i.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,i.unpackAlignment);var s=c(i.image,a.maxTextureSize);u(i)&&h(s)===!1&&(s=l(s));var p=h(s),f=o(i.format),m=o(i.type);_(e.TEXTURE_2D,i,p);var v,g=i.mipmaps;if(i&&i.isDepthTexture){var y=e.DEPTH_COMPONENT;if(i.type===Da){if(!R)throw new Error("Float Depth Texture only supported in WebGL2.0");y=e.DEPTH_COMPONENT32F}else R&&(y=e.DEPTH_COMPONENT16);i.format===Ya&&(y=e.DEPTH_STENCIL),n.texImage2D(e.TEXTURE_2D,0,y,s.width,s.height,0,f,m,null)}else if(i&&i.isDataTexture)if(g.length>0&&p){for(var x=0,b=g.length;x<b;x++)v=g[x],n.texImage2D(e.TEXTURE_2D,x,f,v.width,v.height,0,f,m,v.data);i.generateMipmaps=!1}else n.texImage2D(e.TEXTURE_2D,0,f,s.width,s.height,0,f,m,s.data);else if(i&&i.isCompressedTexture)for(var x=0,b=g.length;x<b;x++)v=g[x],i.format!==Va&&i.format!==Ha?n.getCompressedTextureFormats().indexOf(f)>-1?n.compressedTexImage2D(e.TEXTURE_2D,x,f,v.width,v.height,0,v.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(e.TEXTURE_2D,x,f,v.width,v.height,0,f,m,v.data);else if(g.length>0&&p){for(var x=0,b=g.length;x<b;x++)v=g[x],n.texImage2D(e.TEXTURE_2D,x,f,f,m,v);i.generateMipmaps=!1}else n.texImage2D(e.TEXTURE_2D,0,f,f,m,s);i.generateMipmaps&&p&&e.generateMipmap(e.TEXTURE_2D),t.__version=i.version,i.onUpdate&&i.onUpdate(i)}function w(t,i,a,s){var c=o(i.texture.format),h=o(i.texture.type);n.texImage2D(s,0,c,i.width,i.height,0,c,h,null),e.bindFramebuffer(e.FRAMEBUFFER,t),e.framebufferTexture2D(e.FRAMEBUFFER,a,s,r.get(i.texture).__webglTexture,0),e.bindFramebuffer(e.FRAMEBUFFER,null)}function M(t,i){e.bindRenderbuffer(e.RENDERBUFFER,t),i.depthBuffer&&!i.stencilBuffer?(e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,i.width,i.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t)):i.depthBuffer&&i.stencilBuffer?(e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,i.width,i.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t)):e.renderbufferStorage(e.RENDERBUFFER,e.RGBA4,i.width,i.height),e.bindRenderbuffer(e.RENDERBUFFER,null)}function E(t,i){var n=i&&i.isWebGLRenderTargetCube;if(n)throw new Error("Depth Texture with cube render targets is not supported!");if(e.bindFramebuffer(e.FRAMEBUFFER,t),!i.depthTexture||!i.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(i.depthTexture).__webglTexture&&i.depthTexture.image.width===i.width&&i.depthTexture.image.height===i.height||(i.depthTexture.image.width=i.width,i.depthTexture.image.height=i.height,i.depthTexture.needsUpdate=!0),g(i.depthTexture,0);var a=r.get(i.depthTexture).__webglTexture;if(i.depthTexture.format===Xa)e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,a,0);else{if(i.depthTexture.format!==Ya)throw new Error("Unknown depthTexture format");e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,a,0)}}function T(t){var i=r.get(t),n=t&&t.isWebGLRenderTargetCube;if(t.depthTexture){if(n)throw new Error("target.depthTexture not supported in Cube render targets");E(i.__webglFramebuffer,t)}else if(n){i.__webglDepthbuffer=[];for(var a=0;a<6;a++)e.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer[a]),i.__webglDepthbuffer[a]=e.createRenderbuffer(),M(i.__webglDepthbuffer[a],t)}else e.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer),i.__webglDepthbuffer=e.createRenderbuffer(),M(i.__webglDepthbuffer,t);e.bindFramebuffer(e.FRAMEBUFFER,null)}function S(t){var i=r.get(t),a=r.get(t.texture);t.addEventListener("dispose",f),a.__webglTexture=e.createTexture(),L.textures++;var o=t&&t.isWebGLRenderTargetCube,s=h(t);if(o){i.__webglFramebuffer=[];for(var c=0;c<6;c++)i.__webglFramebuffer[c]=e.createFramebuffer()}else i.__webglFramebuffer=e.createFramebuffer();if(o){n.bindTexture(e.TEXTURE_CUBE_MAP,a.__webglTexture),_(e.TEXTURE_CUBE_MAP,t.texture,s);for(var c=0;c<6;c++)w(i.__webglFramebuffer[c],t,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+c);t.texture.generateMipmaps&&s&&e.generateMipmap(e.TEXTURE_CUBE_MAP),n.bindTexture(e.TEXTURE_CUBE_MAP,null)}else n.bindTexture(e.TEXTURE_2D,a.__webglTexture),_(e.TEXTURE_2D,t.texture,s),w(i.__webglFramebuffer,t,e.COLOR_ATTACHMENT0,e.TEXTURE_2D),t.texture.generateMipmaps&&s&&e.generateMipmap(e.TEXTURE_2D),n.bindTexture(e.TEXTURE_2D,null);t.depthBuffer&&T(t)}function A(t){var i=t.texture;if(i.generateMipmaps&&h(t)&&i.minFilter!==wa&&i.minFilter!==Ta){var a=t&&t.isWebGLRenderTargetCube?e.TEXTURE_CUBE_MAP:e.TEXTURE_2D,o=r.get(i).__webglTexture;n.bindTexture(a,o),e.generateMipmap(a),n.bindTexture(a,null)}}var L=s.memory,R="undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext;this.setTexture2D=g,this.setTextureCube=y,this.setTextureCubeDynamic=x,this.setupRenderTarget=S,this.updateRenderTargetMipmap=A}function Y(t,e,i,n){this.x=t||0,this.y=e||0,this.z=i||0,this.w=void 0!==n?n:1}function q(t,e,i){function n(){var e=!1,i=new Y,n=null,r=new Y;return{setMask:function(i){n===i||e||(t.colorMask(i,i,i,i),n=i)},setLocked:function(t){e=t},setClear:function(e,n,a,o){i.set(e,n,a,o),r.equals(i)===!1&&(t.clearColor(e,n,a,o),r.copy(i))},reset:function(){e=!1,n=null,r.set(0,0,0,1)}}}function r(){var e=!1,i=null,n=null,r=null;return{setTest:function(e){e?p(t.DEPTH_TEST):d(t.DEPTH_TEST)},setMask:function(n){i===n||e||(t.depthMask(n),i=n)},setFunc:function(e){if(n!==e){if(e)switch(e){case Zr:t.depthFunc(t.NEVER);break;case Jr:t.depthFunc(t.ALWAYS);break;case Qr:t.depthFunc(t.LESS);break;case Kr:t.depthFunc(t.LEQUAL);break;case $r:t.depthFunc(t.EQUAL);break;case ta:t.depthFunc(t.GEQUAL);break;case ea:t.depthFunc(t.GREATER);break;case ia:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}else t.depthFunc(t.LEQUAL);n=e}},setLocked:function(t){e=t},setClear:function(e){r!==e&&(t.clearDepth(e),r=e)},reset:function(){e=!1,i=null,n=null,r=null}}}function a(){var e=!1,i=null,n=null,r=null,a=null,o=null,s=null,c=null,h=null;return{setTest:function(e){e?p(t.STENCIL_TEST):d(t.STENCIL_TEST)},setMask:function(n){i===n||e||(t.stencilMask(n),i=n)},setFunc:function(e,i,o){n===e&&r===i&&a===o||(t.stencilFunc(e,i,o),n=e,r=i,a=o)},setOp:function(e,i,n){o===e&&s===i&&c===n||(t.stencilOp(e,i,n),o=e,s=i,c=n)},setLocked:function(t){e=t},setClear:function(e){h!==e&&(t.clearStencil(e),h=e)},reset:function(){e=!1,i=null,n=null,r=null,a=null,o=null,s=null,c=null,h=null}}}function o(e,i,n){var r=new Uint8Array(4),a=t.createTexture();t.bindTexture(e,a),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(var o=0;o<n;o++)t.texImage2D(i+o,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,r);return a}function s(){D(0,0,0,1),N(1),O(0),p(t.DEPTH_TEST),x(Kr),E(!1),T(ur),p(t.CULL_FACE),p(t.BLEND),m(Lr)}function c(){for(var t=0,e=j.length;t<e;t++)j[t]=0}function h(i){if(j[i]=1,0===W[i]&&(t.enableVertexAttribArray(i),W[i]=1),0!==X[i]){var n=e.get("ANGLE_instanced_arrays");n.vertexAttribDivisorANGLE(i,0),X[i]=0}}function l(e,i,n){j[e]=1,0===W[e]&&(t.enableVertexAttribArray(e),W[e]=1),X[e]!==i&&(n.vertexAttribDivisorANGLE(e,i),X[e]=i)}function u(){for(var e=0,i=W.length;e!==i;++e)W[e]!==j[e]&&(t.disableVertexAttribArray(e),W[e]=0)}function p(e){q[e]!==!0&&(t.enable(e),q[e]=!0)}function d(e){q[e]!==!1&&(t.disable(e),q[e]=!1)}function f(){if(null===Z&&(Z=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")))for(var i=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS),n=0;n<i.length;n++)Z.push(i[n]);return Z}function m(e,n,r,a,o,s,c,h){return e===Ar?(d(t.BLEND),void(J=e)):(p(t.BLEND),e===J&&h===nt||(e===Rr?h?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.SRC_ALPHA,t.ONE)):e===Pr?h?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.ONE_MINUS_SRC_COLOR)):e===Cr?h?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.SRC_COLOR)):h?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)),J=e,nt=h),void(e===Ur?(o=o||n,s=s||r,c=c||a,n===Q&&o===tt||(t.blendEquationSeparate(i(n),i(o)),Q=n,tt=o),r===K&&a===$&&s===et&&c===it||(t.blendFuncSeparate(i(r),i(a),i(s),i(c)),K=r,$=a,et=s,it=c)):(Q=null,K=null,$=null,tt=null,et=null,it=null)))}function v(t){G.setMask(t)}function g(t){H.setTest(t)}function y(t){H.setMask(t)}function x(t){H.setFunc(t)}function _(t){V.setTest(t)}function b(t){V.setMask(t)}function w(t,e,i){V.setFunc(t,e,i)}function M(t,e,i){V.setOp(t,e,i)}function E(e){rt!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),rt=e)}function T(e){e!==lr?(p(t.CULL_FACE),e!==at&&(e===ur?t.cullFace(t.BACK):e===pr?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):d(t.CULL_FACE),at=e}function S(e){e!==ot&&(t.lineWidth(e),ot=e)}function A(e,i,n){e?(p(t.POLYGON_OFFSET_FILL),st===i&&ct===n||(t.polygonOffset(i,n),st=i,ct=n)):d(t.POLYGON_OFFSET_FILL)}function L(){return ht}function R(e){ht=e,e?p(t.SCISSOR_TEST):d(t.SCISSOR_TEST)}function P(e){void 0===e&&(e=t.TEXTURE0+lt-1),ut!==e&&(t.activeTexture(e),ut=e)}function C(e,i){null===ut&&P();var n=pt[ut];void 0===n&&(n={type:void 0,texture:void 0},pt[ut]=n),n.type===e&&n.texture===i||(t.bindTexture(e,i||mt[e]),n.type=e,n.texture=i)}function U(){try{t.compressedTexImage2D.apply(t,arguments)}catch(e){console.error(e)}}function I(){try{t.texImage2D.apply(t,arguments)}catch(e){console.error(e)}}function D(t,e,i,n){G.setClear(t,e,i,n)}function N(t){H.setClear(t)}function O(t){V.setClear(t)}function F(e){dt.equals(e)===!1&&(t.scissor(e.x,e.y,e.z,e.w),dt.copy(e))}function z(e){ft.equals(e)===!1&&(t.viewport(e.x,e.y,e.z,e.w),ft.copy(e))}function B(){for(var e=0;e<W.length;e++)1===W[e]&&(t.disableVertexAttribArray(e),W[e]=0);q={},Z=null,ut=null,pt={},J=null,rt=null,at=null,G.reset(),H.reset(),V.reset()}var G=new n,H=new r,V=new a,k=t.getParameter(t.MAX_VERTEX_ATTRIBS),j=new Uint8Array(k),W=new Uint8Array(k),X=new Uint8Array(k),q={},Z=null,J=null,Q=null,K=null,$=null,tt=null,et=null,it=null,nt=!1,rt=null,at=null,ot=null,st=null,ct=null,ht=null,lt=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),ut=null,pt={},dt=new Y,ft=new Y,mt={};return mt[t.TEXTURE_2D]=o(t.TEXTURE_2D,t.TEXTURE_2D,1),mt[t.TEXTURE_CUBE_MAP]=o(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),{buffers:{color:G,depth:H,
  stencil:V},init:s,initAttributes:c,enableAttribute:h,enableAttributeAndDivisor:l,disableUnusedAttributes:u,enable:p,disable:d,getCompressedTextureFormats:f,setBlending:m,setColorWrite:v,setDepthTest:g,setDepthWrite:y,setDepthFunc:x,setStencilTest:_,setStencilWrite:b,setStencilFunc:w,setStencilOp:M,setFlipSided:E,setCullFace:T,setLineWidth:S,setPolygonOffset:A,getScissorTest:L,setScissorTest:R,activeTexture:P,bindTexture:C,compressedTexImage2D:U,texImage2D:I,clearColor:D,clearDepth:N,clearStencil:O,scissor:F,viewport:z,reset:B}}function Z(e,i,r){this.uuid=t.Math.generateUUID(),this.width=e,this.height=i,this.scissor=new Y(0,0,e,i),this.scissorTest=!1,this.viewport=new Y(0,0,e,i),r=r||{},void 0===r.minFilter&&(r.minFilter=Ta),this.texture=new n((void 0),(void 0),r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.encoding),this.depthBuffer=void 0===r.depthBuffer||r.depthBuffer,this.stencilBuffer=void 0===r.stencilBuffer||r.stencilBuffer,this.depthTexture=void 0!==r.depthTexture?r.depthTexture:null}function J(){Object.defineProperty(this,"id",{value:Q()}),this.uuid=t.Math.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=Lr,this.side=xr,this.shading=Mr,this.vertexColors=Er,this.opacity=1,this.transparent=!1,this.blendSrc=Vr,this.blendDst=kr,this.blendEquation=Ir,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Kr,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipShadows=!1,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this._needsUpdate=!0}function Q(){return Uo++}function K(t){J.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.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!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,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function $(t,e,i){return void 0===e&&void 0===i?this.set(t):this.setRGB(t,e,i)}function tt(t){J.call(this),this.type="MeshDepthMaterial",this.depthPacking=Eo,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(t)}function et(t,e){this.min=void 0!==t?t:new s((+(1/0)),(+(1/0)),(+(1/0))),this.max=void 0!==e?e:new s((-(1/0)),(-(1/0)),(-(1/0)))}function it(t,e){this.center=void 0!==t?t:new s,this.radius=void 0!==e?e:0}function nt(){this.elements=new Float32Array([1,0,0,0,1,0,0,0,1]),arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}function rt(t,e){this.normal=void 0!==t?t:new s(1,0,0),this.constant=void 0!==e?e:0}function at(t,e,i,n,r,a){this.planes=[void 0!==t?t:new rt,void 0!==e?e:new rt,void 0!==i?i:new rt,void 0!==n?n:new rt,void 0!==r?r:new rt,void 0!==a?a:new rt]}function ot(e,n,r,o){function c(t,i,n,r){var a=t.geometry,o=null,s=M,c=t.customDepthMaterial;if(n&&(s=E,c=t.customDistanceMaterial),c)o=c;else{var h=!1;i.morphTargets&&(a&&a.isBufferGeometry?h=a.morphAttributes&&a.morphAttributes.position&&a.morphAttributes.position.length>0:a&&a.isGeometry&&(h=a.morphTargets&&a.morphTargets.length>0));var l=t.isSkinnedMesh&&i.skinning,u=0;h&&(u|=_),l&&(u|=b),o=s[u]}if(e.localClippingEnabled&&i.clipShadows===!0&&0!==i.clippingPlanes.length){var p=o.uuid,d=i.uuid,f=T[p];void 0===f&&(f={},T[p]=f);var m=f[d];void 0===m&&(m=o.clone(),f[d]=m),o=m}o.visible=i.visible,o.wireframe=i.wireframe;var v=i.side;return F.renderSingleSided&&v==br&&(v=xr),F.renderReverseSided&&(v===xr?v=_r:v===_r&&(v=xr)),o.side=v,o.clipShadows=i.clipShadows,o.clippingPlanes=i.clippingPlanes,o.wireframeLinewidth=i.wireframeLinewidth,o.linewidth=i.linewidth,n&&void 0!==o.uniforms.lightPos&&o.uniforms.lightPos.value.copy(r),o}function h(t,e,i){if(t.visible!==!1){var n=0!==(t.layers.mask&e.layers.mask);if(n&&(t.isMesh||t.isLine||t.isPoints)&&t.castShadow&&(t.frustumCulled===!1||p.intersectsObject(t)===!0)){var r=t.material;r.visible===!0&&(t.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse,t.matrixWorld),x.push(t))}for(var a=t.children,o=0,s=a.length;o<s;o++)h(a[o],e,i)}}var l=e.context,u=e.state,p=new at,d=new a,f=n.shadows,m=new i,v=new i(o.maxTextureSize,o.maxTextureSize),g=new s,y=new s,x=[],_=1,b=2,w=(_|b)+1,M=new Array(w),E=new Array(w),T={},S=[new s(1,0,0),new s((-1),0,0),new s(0,0,1),new s(0,0,(-1)),new s(0,1,0),new s(0,(-1),0)],A=[new s(0,1,0),new s(0,1,0),new s(0,1,0),new s(0,1,0),new s(0,0,1),new s(0,0,(-1))],L=[new Y,new Y,new Y,new Y,new Y,new Y],R=new tt;R.depthPacking=To,R.clipping=!0;for(var P=Uc.distanceRGBA,C=t.UniformsUtils.clone(P.uniforms),U=0;U!==w;++U){var I=0!==(U&_),D=0!==(U&b),N=R.clone();N.morphTargets=I,N.skinning=D,M[U]=N;var O=new K({defines:{USE_SHADOWMAP:""},uniforms:C,vertexShader:P.vertexShader,fragmentShader:P.fragmentShader,morphTargets:I,skinning:D,clipping:!0});E[U]=O}var F=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=gr,this.renderReverseSided=!0,this.renderSingleSided=!0,this.render=function(t,i){if(F.enabled!==!1&&(F.autoUpdate!==!1||F.needsUpdate!==!1)&&0!==f.length){u.clearColor(1,1,1,1),u.disable(l.BLEND),u.setDepthTest(!0),u.setScissorTest(!1);for(var n,a,o=0,s=f.length;o<s;o++){var _=f[o],b=_.shadow;if(void 0!==b){var w=b.camera;if(m.copy(b.mapSize),m.min(v),_&&_.isPointLight){n=6,a=!0;var M=m.x,E=m.y;L[0].set(2*M,E,M,E),L[1].set(0,E,M,E),L[2].set(3*M,E,M,E),L[3].set(M,E,M,E),L[4].set(3*M,0,M,E),L[5].set(M,0,M,E),m.x*=4,m.y*=2}else n=1,a=!1;if(null===b.map){var T={minFilter:wa,magFilter:wa,format:Va};b.map=new Z(m.x,m.y,T),w.updateProjectionMatrix()}b&&b.isSpotLightShadow&&b.update(_);var R=b.map,P=b.matrix;y.setFromMatrixPosition(_.matrixWorld),w.position.copy(y),e.setRenderTarget(R),e.clear();for(var C=0;C<n;C++){if(a){g.copy(w.position),g.add(S[C]),w.up.copy(A[C]),w.lookAt(g);var U=L[C];u.viewport(U)}else g.setFromMatrixPosition(_.target.matrixWorld),w.lookAt(g);w.updateMatrixWorld(),w.matrixWorldInverse.getInverse(w.matrixWorld),P.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),P.multiply(w.projectionMatrix),P.multiply(w.matrixWorldInverse),d.multiplyMatrices(w.projectionMatrix,w.matrixWorldInverse),p.setFromMatrix(d),x.length=0,h(t,i,w);for(var I=0,D=x.length;I<D;I++){var N=x[I],O=r.update(N),z=N.material;if(z&&z.isMultiMaterial)for(var B=O.groups,G=z.materials,H=0,V=B.length;H<V;H++){var k=B[H],j=G[k.materialIndex];if(j.visible===!0){var W=c(N,j,a,y);e.renderBufferDirect(w,null,O,W,N,k)}}else{var W=c(N,z,a,y);e.renderBufferDirect(w,null,O,W,N,null)}}}}else console.warn("THREE.WebGLShadowMap:",_,"has no shadow.")}var X=e.getClearColor(),Y=e.getClearAlpha();e.setClearColor(X,Y),F.needsUpdate=!1}}}function st(t){for(var e=t.split("\n"),i=0;i<e.length;i++)e[i]=i+1+": "+e[i];return e.join("\n")}function ct(t,e,i){var n=t.createShader(e);return t.shaderSource(n,i),t.compileShader(n),t.getShaderParameter(n,t.COMPILE_STATUS)===!1&&console.error("THREE.WebGLShader: Shader couldn't compile."),""!==t.getShaderInfoLog(n)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===t.VERTEX_SHADER?"vertex":"fragment",t.getShaderInfoLog(n),st(i)),n}function ht(){var t={};return{get:function(e){var i=e.uuid,n=t[i];return void 0===n&&(n={},t[i]=n),n},"delete":function(e){delete t[e.uuid]},clear:function(){t={}}}}function lt(t){switch(t){case vo:return["Linear","( value )"];case go:return["sRGB","( value )"];case xo:return["RGBE","( value )"];case bo:return["RGBM","( value, 7.0 )"];case wo:return["RGBM","( value, 16.0 )"];case Mo:return["RGBD","( value, 256.0 )"];case yo:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+t)}}function ut(t,e){var i=lt(e);return"vec4 "+t+"( vec4 value ) { return "+i[0]+"ToLinear"+i[1]+"; }"}function pt(t,e){var i=lt(e);return"vec4 "+t+"( vec4 value ) { return LinearTo"+i[0]+i[1]+"; }"}function dt(t,e){var i;switch(e){case sa:i="Linear";break;case ca:i="Reinhard";break;case ha:i="Uncharted2";break;case la:i="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+i+"ToneMapping( color ); }"}function ft(t,e,i){t=t||{};var n=[t.derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&i.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&i.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&i.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""];return n.filter(gt).join("\n")}function mt(t){var e=[];for(var i in t){var n=t[i];n!==!1&&e.push("#define "+i+" "+n)}return e.join("\n")}function vt(t,e,i){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),a=0;a<r;a++){var o=t.getActiveAttrib(e,a),s=o.name;n[s]=t.getAttribLocation(e,s)}return n}function gt(t){return""!==t}function yt(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function xt(t){function e(t,e){var i=Pc[e];if(void 0===i)throw new Error("Can not resolve #include <"+e+">");return xt(i)}var i=/#include +<([\w\d.]+)>/g;return t.replace(i,e)}function _t(t){function e(t,e,i,n){for(var r="",a=parseInt(e);a<parseInt(i);a++)r+=n.replace(/\[ i \]/g,"[ "+a+" ]");return r}var i=/for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g;return t.replace(i,e)}function bt(t,e,i,n){var r=t.context,a=i.extensions,o=i.defines,s=i.__webglShader.vertexShader,c=i.__webglShader.fragmentShader,h="SHADOWMAP_TYPE_BASIC";n.shadowMapType===gr?h="SHADOWMAP_TYPE_PCF":n.shadowMapType===yr&&(h="SHADOWMAP_TYPE_PCF_SOFT");var l="ENVMAP_TYPE_CUBE",u="ENVMAP_MODE_REFLECTION",p="ENVMAP_BLENDING_MULTIPLY";if(n.envMap){switch(i.envMap.mapping){case pa:case da:l="ENVMAP_TYPE_CUBE";break;case ga:case ya:l="ENVMAP_TYPE_CUBE_UV";break;case fa:case ma:l="ENVMAP_TYPE_EQUIREC";break;case va:l="ENVMAP_TYPE_SPHERE"}switch(i.envMap.mapping){case da:case ma:u="ENVMAP_MODE_REFRACTION"}switch(i.combine){case na:p="ENVMAP_BLENDING_MULTIPLY";break;case ra:p="ENVMAP_BLENDING_MIX";break;case aa:p="ENVMAP_BLENDING_ADD"}}var d,f,m=t.gammaFactor>0?t.gammaFactor:1,v=ft(a,n,t.extensions),g=mt(o),y=r.createProgram();i.isRawShaderMaterial?(d=[g,"\n"].filter(gt).join("\n"),f=[v,g,"\n"].filter(gt).join("\n")):(d=["precision "+n.precision+" float;","precision "+n.precision+" int;","#define SHADER_NAME "+i.__webglShader.name,g,n.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+m,"#define MAX_BONES "+n.maxBones,n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.vertexColors?"#define USE_COLOR":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.useVertexTexture?"#define BONE_TEXTURE":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&n.flatShading===!1?"#define USE_MORPHNORMALS":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+n.numClippingPlanes,n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+h:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&t.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(gt).join("\n"),f=[v,"precision "+n.precision+" float;","precision "+n.precision+" int;","#define SHADER_NAME "+i.__webglShader.name,g,n.alphaTest?"#define ALPHATEST "+n.alphaTest:"","#define GAMMA_FACTOR "+m,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+l:"",n.envMap?"#define "+u:"",n.envMap?"#define "+p:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.vertexColors?"#define USE_COLOR":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+n.numClippingPlanes,n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+h:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&t.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",n.envMap&&t.extensions.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",n.toneMapping!==oa?"#define TONE_MAPPING":"",n.toneMapping!==oa?Pc.tonemapping_pars_fragment:"",n.toneMapping!==oa?dt("toneMapping",n.toneMapping):"",n.outputEncoding||n.mapEncoding||n.envMapEncoding||n.emissiveMapEncoding?Pc.encodings_pars_fragment:"",n.mapEncoding?ut("mapTexelToLinear",n.mapEncoding):"",n.envMapEncoding?ut("envMapTexelToLinear",n.envMapEncoding):"",n.emissiveMapEncoding?ut("emissiveMapTexelToLinear",n.emissiveMapEncoding):"",n.outputEncoding?pt("linearToOutputTexel",n.outputEncoding):"",n.depthPacking?"#define DEPTH_PACKING "+i.depthPacking:"","\n"].filter(gt).join("\n")),s=xt(s,n),s=yt(s,n),c=xt(c,n),c=yt(c,n),i.isShaderMaterial||(s=_t(s),c=_t(c));var x=d+s,_=f+c,b=ct(r,r.VERTEX_SHADER,x),w=ct(r,r.FRAGMENT_SHADER,_);r.attachShader(y,b),r.attachShader(y,w),void 0!==i.index0AttributeName?r.bindAttribLocation(y,0,i.index0AttributeName):n.morphTargets===!0&&r.bindAttribLocation(y,0,"position"),r.linkProgram(y);var M=r.getProgramInfoLog(y),E=r.getShaderInfoLog(b),T=r.getShaderInfoLog(w),S=!0,A=!0;r.getProgramParameter(y,r.LINK_STATUS)===!1?(S=!1,console.error("THREE.WebGLProgram: shader error: ",r.getError(),"gl.VALIDATE_STATUS",r.getProgramParameter(y,r.VALIDATE_STATUS),"gl.getProgramInfoLog",M,E,T)):""!==M?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",M):""!==E&&""!==T||(A=!1),A&&(this.diagnostics={runnable:S,material:i,programLog:M,vertexShader:{log:E,prefix:d},fragmentShader:{log:T,prefix:f}}),r.deleteShader(b),r.deleteShader(w);var L;this.getUniforms=function(){return void 0===L&&(L=new W(r,y,t)),L};var R;return this.getAttributes=function(){return void 0===R&&(R=vt(r,y)),R},this.destroy=function(){r.deleteProgram(y),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.id=Ic++,this.code=e,this.usedTimes=1,this.program=y,this.vertexShader=b,this.fragmentShader=w,this}function wt(t,e){function i(t){if(e.floatVertexTextures&&t&&t.skeleton&&t.skeleton.useVertexTexture)return 1024;var i=e.maxVertexUniforms,n=Math.floor((i-20)/4),r=n;return void 0!==t&&t&&t.isSkinnedMesh&&(r=Math.min(t.skeleton.bones.length,r),r<t.skeleton.bones.length&&console.warn("WebGLRenderer: too many bones - "+t.skeleton.bones.length+", this GPU supports just "+r+" (try OpenGL instead of ANGLE)")),r}function n(t,e){var i;return t?t&&t.isTexture?i=t.encoding:t&&t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),i=t.texture.encoding):i=vo,i===vo&&e&&(i=yo),i}var r=[],a={MeshDepthMaterial:"depth",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points"},o=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","depthPacking"];this.getParameters=function(r,o,s,c,h){var l=a[r.type],u=i(h),p=t.getPrecision();null!==r.precision&&(p=e.getMaxPrecision(r.precision),p!==r.precision&&console.warn("THREE.WebGLProgram.getParameters:",r.precision,"not supported, using",p,"instead."));var d=t.getCurrentRenderTarget(),f={shaderID:l,precision:p,supportsVertexTextures:e.vertexTextures,outputEncoding:n(d?d.texture:null,t.gammaOutput),map:!!r.map,mapEncoding:n(r.map,t.gammaInput),envMap:!!r.envMap,envMapMode:r.envMap&&r.envMap.mapping,envMapEncoding:n(r.envMap,t.gammaInput),envMapCubeUV:!!r.envMap&&(r.envMap.mapping===ga||r.envMap.mapping===ya),lightMap:!!r.lightMap,aoMap:!!r.aoMap,emissiveMap:!!r.emissiveMap,emissiveMapEncoding:n(r.emissiveMap,t.gammaInput),bumpMap:!!r.bumpMap,normalMap:!!r.normalMap,displacementMap:!!r.displacementMap,roughnessMap:!!r.roughnessMap,metalnessMap:!!r.metalnessMap,specularMap:!!r.specularMap,alphaMap:!!r.alphaMap,combine:r.combine,vertexColors:r.vertexColors,fog:!!s,useFog:r.fog,fogExp:s&&s.isFogExp2,flatShading:r.shading===wr,sizeAttenuation:r.sizeAttenuation,logarithmicDepthBuffer:e.logarithmicDepthBuffer,skinning:r.skinning,maxBones:u,useVertexTexture:e.floatVertexTextures&&h&&h.skeleton&&h.skeleton.useVertexTexture,morphTargets:r.morphTargets,morphNormals:r.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:o.directional.length,numPointLights:o.point.length,numSpotLights:o.spot.length,numHemiLights:o.hemi.length,numClippingPlanes:c,shadowMapEnabled:t.shadowMap.enabled&&h.receiveShadow&&o.shadows.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:r.premultipliedAlpha,alphaTest:r.alphaTest,doubleSided:r.side===br,flipSided:r.side===_r,depthPacking:void 0!==r.depthPacking&&r.depthPacking};return f},this.getProgramCode=function(t,e){var i=[];if(e.shaderID?i.push(e.shaderID):(i.push(t.fragmentShader),i.push(t.vertexShader)),void 0!==t.defines)for(var n in t.defines)i.push(n),i.push(t.defines[n]);for(var r=0;r<o.length;r++)i.push(e[o[r]]);return i.join()},this.acquireProgram=function(e,i,n){for(var a,o=0,s=r.length;o<s;o++){var c=r[o];if(c.code===n){a=c,++a.usedTimes;break}}return void 0===a&&(a=new bt(t,n,e,i),r.push(a)),a},this.releaseProgram=function(t){if(0===--t.usedTimes){var e=r.indexOf(t);r[e]=r[r.length-1],r.pop(),t.destroy()}},this.programs=r}function Mt(e,i,n){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.uuid=t.Math.generateUUID(),this.array=e,this.itemSize=i,this.normalized=n===!0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Et(t,e){return new Mt(new Int8Array(t),e)}function Tt(t,e){return new Mt(new Uint8Array(t),e)}function St(t,e){return new Mt(new Uint8ClampedArray(t),e)}function At(t,e){return new Mt(new Int16Array(t),e)}function Lt(t,e){return new Mt(new Uint16Array(t),e)}function Rt(t,e){return new Mt(new Int32Array(t),e)}function Pt(t,e){return new Mt(new Uint32Array(t),e)}function Ct(t,e){return new Mt(new Float32Array(t),e)}function Ut(t,e){return new Mt(new Float64Array(t),e)}function It(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new Mt(t,e).setDynamic(!0)}function Dt(t,e,i,n,r,a){this.a=t,this.b=e,this.c=i,this.normal=n&&n.isVector3?n:new s,this.vertexNormals=Array.isArray(n)?n:[],this.color=r&&r.isColor?r:new $,this.vertexColors=Array.isArray(r)?r:[],this.materialIndex=void 0!==a?a:0}function Nt(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._order=n||Nt.DefaultOrder}function Ot(){this.mask=1}function Ft(){function e(){c.setFromEuler(r,!1)}function i(){r.setFromQuaternion(c,void 0,!1)}Object.defineProperty(this,"id",{value:zt()}),this.uuid=t.Math.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Ft.DefaultUp.clone();var n=new s,r=new Nt,c=new o,h=new s(1,1,1);r.onChange(e),c.onChange(i),Object.defineProperties(this,{position:{enumerable:!0,value:n},rotation:{enumerable:!0,value:r},quaternion:{enumerable:!0,value:c},scale:{enumerable:!0,value:h},modelViewMatrix:{value:new a},normalMatrix:{value:new nt}}),this.matrix=new a,this.matrixWorld=new a,this.matrixAutoUpdate=Ft.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new Ot,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function zt(){return Dc++}function Bt(){Object.defineProperty(this,"id",{value:Gt()}),this.uuid=t.Math.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.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function Gt(){return Nc++}function Ht(){Object.defineProperty(this,"id",{value:Gt()}),this.uuid=t.Math.generateUUID(),this.name="",this.type="DirectGeometry",this.indices=[],this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function Vt(){Object.defineProperty(this,"id",{value:Gt()}),this.uuid=t.Math.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function kt(t,e,i){function n(t){var r=t.target,s=c[r.id];null!==s.index&&a(s.index),o(s.attributes),r.removeEventListener("dispose",n),delete c[r.id];var h=e.get(r);h.wireframe&&a(h.wireframe),e["delete"](r);var l=e.get(s);l.wireframe&&a(l.wireframe),e["delete"](s),i.memory.geometries--}function r(t){return t.isInterleavedBufferAttribute?e.get(t.data).__webglBuffer:e.get(t).__webglBuffer}function a(e){var i=r(e);void 0!==i&&(t.deleteBuffer(i),s(e))}function o(t){for(var e in t)a(t[e])}function s(t){t.isInterleavedBufferAttribute?e["delete"](t.data):e["delete"](t)}var c={};return{get:function(t){var e=t.geometry;if(void 0!==c[e.id])return c[e.id];e.addEventListener("dispose",n);var r;return e.isBufferGeometry?r=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new Vt).setFromObject(t)),r=e._bufferGeometry),c[e.id]=r,i.memory.geometries++,r}}}function jt(t,e,i){function n(e){var i=l.get(e);e.geometry.isGeometry&&i.updateFromObject(e);var n=i.index,a=i.attributes;null!==n&&r(n,t.ELEMENT_ARRAY_BUFFER);for(var o in a)r(a[o],t.ARRAY_BUFFER);var s=i.morphAttributes;for(var o in s)for(var c=s[o],h=0,u=c.length;h<u;h++)r(c[h],t.ARRAY_BUFFER);return i}function r(t,i){var n=t.isInterleavedBufferAttribute?t.data:t,r=e.get(n);void 0===r.__webglBuffer?a(r,n,i):r.version!==n.version&&o(r,n,i)}function a(e,i,n){e.__webglBuffer=t.createBuffer(),t.bindBuffer(n,e.__webglBuffer);var r=i.dynamic?t.DYNAMIC_DRAW:t.STATIC_DRAW;t.bufferData(n,i.array,r),e.version=i.version}function o(e,i,n){t.bindBuffer(n,e.__webglBuffer),i.dynamic===!1||i.updateRange.count===-1?t.bufferSubData(n,0,i.array):0===i.updateRange.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(n,i.updateRange.offset*i.array.BYTES_PER_ELEMENT,i.array.subarray(i.updateRange.offset,i.updateRange.offset+i.updateRange.count)),i.updateRange.count=0),e.version=i.version}function s(t){return t.isInterleavedBufferAttribute?e.get(t.data).__webglBuffer:e.get(t).__webglBuffer}function c(i){var n=e.get(i);if(void 0!==n.wireframe)return n.wireframe;var a=[],o=i.index,s=i.attributes,c=s.position;if(null!==o)for(var l={},u=o.array,p=0,d=u.length;p<d;p+=3){var f=u[p+0],m=u[p+1],v=u[p+2];h(l,f,m)&&a.push(f,m),h(l,m,v)&&a.push(m,v),h(l,v,f)&&a.push(v,f)}else for(var u=s.position.array,p=0,d=u.length/3-1;p<d;p+=3){var f=p+0,m=p+1,v=p+2;a.push(f,m,m,v,v,f)}var g=c.count>65535?Uint32Array:Uint16Array,y=new Mt(new g(a),1);return r(y,t.ELEMENT_ARRAY_BUFFER),n.wireframe=y,y}function h(t,e,i){if(e>i){var n=e;e=i,i=n}var r=t[e];return void 0===r?(t[e]=[i],!0):r.indexOf(i)===-1&&(r.push(i),!0)}var l=new kt(t,e,i);return{getAttributeBuffer:s,getWireframeAttribute:c,update:n}}function Wt(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var n;switch(e.type){case"DirectionalLight":n={direction:new s,color:new $,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new i};break;case"SpotLight":n={position:new s,direction:new s,color:new $,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new i};break;case"PointLight":n={position:new s,color:new $,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new i};break;case"HemisphereLight":n={direction:new s,skyColor:new $,groundColor:new $}}return t[e.id]=n,n}}}function Xt(t,e,i){function n(){if(void 0!==a)return a;var i=e.get("EXT_texture_filter_anisotropic");return a=null!==i?t.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}function r(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var a,o=void 0!==i.precision?i.precision:"highp",s=r(o);s!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",s,"instead."),o=s);var c=i.logarithmicDepthBuffer===!0&&!!e.get("EXT_frag_depth"),h=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),u=t.getParameter(t.MAX_TEXTURE_SIZE),p=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),d=t.getParameter(t.MAX_VERTEX_ATTRIBS),f=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),m=t.getParameter(t.MAX_VARYING_VECTORS),v=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),g=l>0,y=!!e.get("OES_texture_float"),x=g&&y;return{getMaxAnisotropy:n,getMaxPrecision:r,precision:o,logarithmicDepthBuffer:c,maxTextures:h,maxVertexTextures:l,maxTextureSize:u,maxCubemapSize:p,maxAttributes:d,maxVertexUniforms:f,maxVaryings:m,maxFragmentUniforms:v,vertexTextures:g,floatFragmentTextures:y,floatVertexTextures:x}}function Yt(t){var e={};return{get:function(i){if(void 0!==e[i])return e[i];var n;switch(i){case"WEBGL_depth_texture":n=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":n=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":n=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":n=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;case"WEBGL_compressed_texture_etc1":n=t.getExtension("WEBGL_compressed_texture_etc1");break;default:n=t.getExtension(i)}return null===n&&console.warn("THREE.WebGLRenderer: "+i+" extension not supported."),e[i]=n,n}}}function qt(t,e,i){function n(t){s=t}function r(i){i.array instanceof Uint32Array&&e.get("OES_element_index_uint")?(c=t.UNSIGNED_INT,h=4):(c=t.UNSIGNED_SHORT,h=2)}function a(e,n){t.drawElements(s,n,c,e*h),i.calls++,i.vertices+=n,s===t.TRIANGLES&&(i.faces+=n/3)}function o(n,r,a){var o=e.get("ANGLE_instanced_arrays");return null===o?void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays."):(o.drawElementsInstancedANGLE(s,a,c,r*h,n.maxInstancedCount),i.calls++,i.vertices+=a*n.maxInstancedCount,void(s===t.TRIANGLES&&(i.faces+=n.maxInstancedCount*a/3)))}var s,c,h;return{setMode:n,setIndex:r,render:a,renderInstances:o}}function Zt(){function t(){h.value!==n&&(h.value=n,h.needsUpdate=r>0),i.numPlanes=r}function e(t,e,n,r){var a=null!==t?t.length:0,o=null;if(0!==a){if(o=h.value,r!==!0||null===o){var l=n+4*a,u=e.matrixWorldInverse;c.getNormalMatrix(u),(null===o||o.length<l)&&(o=new Float32Array(l));for(var p=0,d=n;p!==a;++p,d+=4)s.copy(t[p]).applyMatrix4(u,c),s.normal.toArray(o,d),o[d+3]=s.constant}h.value=o,h.needsUpdate=!0}return i.numPlanes=a,o}var i=this,n=null,r=0,a=!1,o=!1,s=new rt,c=new nt,h={value:null,needsUpdate:!1};this.uniform=h,this.numPlanes=0,this.init=function(t,i,o){var s=0!==t.length||i||0!==r||a;return a=i,n=e(t,o,0),r=t.length,s},this.beginShadows=function(){o=!0,e(null)},this.endShadows=function(){o=!1,t()},this.setState=function(i,s,c,l,u){if(!a||null===i||0===i.length||o&&!s)o?e(null):t();else{var p=o?0:r,d=4*p,f=l.clippingState||null;
  h.value=f,f=e(i,c,d,u);for(var m=0;m!==d;++m)f[m]=n[m];l.clippingState=f,this.numPlanes+=p}}}function Jt(t,e,i){function n(t){o=t}function r(e,n){t.drawArrays(o,e,n),i.calls++,i.vertices+=n,o===t.TRIANGLES&&(i.faces+=n/3)}function a(n){var r=e.get("ANGLE_instanced_arrays");if(null===r)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");var a=n.attributes.position,s=0;a&&a.isInterleavedBufferAttribute?(s=a.data.count,r.drawArraysInstancedANGLE(o,0,s,n.maxInstancedCount)):(s=a.count,r.drawArraysInstancedANGLE(o,0,s,n.maxInstancedCount)),i.calls++,i.vertices+=s*n.maxInstancedCount,o===t.TRIANGLES&&(i.faces+=n.maxInstancedCount*s/3)}var o;return{setMode:n,render:r,renderInstances:a}}function Qt(t,e,i){Z.call(this,t,e,i),this.activeCubeFace=0,this.activeMipMapLevel=0}function Kt(t,e,i,n,r,a){function o(t,e,i){var n=0;return n+=(t+1)*(e+1)*2,n+=(t+1)*(i+1)*2,n+=(i+1)*(e+1)*2}function c(t,e,i){var n=0;return n+=t*e*2,n+=t*i*2,n+=i*e*2,6*n}function h(t,e,i,n,r,a,o,c,h,u,p){for(var w=a/h,M=o/u,E=a/2,T=o/2,S=c/2,A=h+1,L=u+1,R=0,P=0,C=new s,U=0;U<L;U++)for(var I=U*M-T,D=0;D<A;D++){var N=D*w-E;C[t]=N*n,C[e]=I*r,C[i]=S,f[g]=C.x,f[g+1]=C.y,f[g+2]=C.z,C[t]=0,C[e]=0,C[i]=c>0?1:-1,m[g]=C.x,m[g+1]=C.y,m[g+2]=C.z,v[y]=D/h,v[y+1]=1-U/u,g+=3,y+=2,R+=1}for(U=0;U<u;U++)for(D=0;D<h;D++){var O=_+D+A*U,F=_+D+A*(U+1),z=_+(D+1)+A*(U+1),B=_+(D+1)+A*U;d[x]=O,d[x+1]=F,d[x+2]=B,d[x+3]=F,d[x+4]=z,d[x+5]=B,x+=6,P+=6}l.addGroup(b,P,p),b+=P,_+=R}Vt.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:r,depthSegments:a};var l=this;n=Math.floor(n)||1,r=Math.floor(r)||1,a=Math.floor(a)||1;var u=o(n,r,a),p=c(n,r,a),d=new(p>65535?Uint32Array:Uint16Array)(p),f=new Float32Array(3*u),m=new Float32Array(3*u),v=new Float32Array(2*u),g=0,y=0,x=0,_=0,b=0;h("z","y","x",-1,-1,i,e,t,a,r,0),h("z","y","x",1,-1,i,e,-t,a,r,1),h("x","z","y",1,1,t,i,e,n,a,2),h("x","z","y",1,-1,t,i,-e,n,a,3),h("x","y","z",1,-1,t,e,i,n,r,4),h("x","y","z",-1,-1,t,e,-i,n,r,5),this.setIndex(new Mt(d,1)),this.addAttribute("position",new Mt(f,3)),this.addAttribute("normal",new Mt(m,3)),this.addAttribute("uv",new Mt(v,2))}function $t(t,e){this.origin=void 0!==t?t:new s,this.direction=void 0!==e?e:new s}function te(t,e){this.start=void 0!==t?t:new s,this.end=void 0!==e?e:new s}function ee(t,e,i){this.a=void 0!==t?t:new s,this.b=void 0!==e?e:new s,this.c=void 0!==i?i:new s}function ie(t){J.call(this),this.type="MeshBasicMaterial",this.color=new $(16777215),this.map=null,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=na,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(t)}function ne(t,e){Ft.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new Vt,this.material=void 0!==e?e:new ie({color:16777215*Math.random()}),this.drawMode=po,this.updateMorphTargets()}function re(t,e,i,n){Vt.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:n};for(var r=t/2,a=e/2,o=Math.floor(i)||1,s=Math.floor(n)||1,c=o+1,h=s+1,l=t/o,u=e/s,p=new Float32Array(c*h*3),d=new Float32Array(c*h*3),f=new Float32Array(c*h*2),m=0,v=0,g=0;g<h;g++)for(var y=g*u-a,x=0;x<c;x++){var _=x*l-r;p[m]=_,p[m+1]=-y,d[m+2]=1,f[v]=x/o,f[v+1]=1-g/s,m+=3,v+=2}m=0;for(var b=new(p.length/3>65535?Uint32Array:Uint16Array)(o*s*6),g=0;g<s;g++)for(var x=0;x<o;x++){var w=x+c*g,M=x+c*(g+1),E=x+1+c*(g+1),T=x+1+c*g;b[m]=w,b[m+1]=M,b[m+2]=T,b[m+3]=M,b[m+4]=E,b[m+5]=T,m+=6}this.setIndex(new Mt(b,1)),this.addAttribute("position",new Mt(p,3)),this.addAttribute("normal",new Mt(d,3)),this.addAttribute("uv",new Mt(f,2))}function ae(){Ft.call(this),this.type="Camera",this.matrixWorldInverse=new a,this.projectionMatrix=new a}function oe(t,e,i,n){ae.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t:50,this.zoom=1,this.near=void 0!==i?i:.1,this.far=void 0!==n?n:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function se(t,e,i,n,r,a){ae.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=i,this.bottom=n,this.near=void 0!==r?r:.1,this.far=void 0!==a?a:2e3,this.updateProjectionMatrix()}function ce(e){function i(){return null===mt?Rt:1}function n(t,e,i,n){Q===!0&&(t*=n,e*=n,i*=n),ae.clearColor(t,e,i,n)}function r(){ae.init(),ae.scissor(_t.copy(Pt).multiplyScalar(Rt)),ae.viewport(Mt.copy(Ut).multiplyScalar(Rt)),n(Tt.r,Tt.g,Tt.b,St)}function o(){ft=null,xt=null,yt="",gt=-1,ae.reset()}function h(t){t.preventDefault(),o(),r(),ce.clear()}function u(t){var e=t.target;e.removeEventListener("dispose",u),p(e)}function p(t){d(t),ce["delete"](t)}function d(t){var e=ce.get(t).program;t.program=void 0,void 0!==e&&ue.releaseProgram(e)}function f(t,e,i,n){var r;if(i&&i.isInstancedBufferGeometry&&(r=te.get("ANGLE_instanced_arrays"),null===r))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");void 0===n&&(n=0),ae.initAttributes();var a=i.attributes,o=e.getAttributes(),s=t.defaultAttributeValues;for(var c in o){var h=o[c];if(h>=0){var l=a[c];if(void 0!==l){var u=kt.FLOAT,p=l.array,d=l.normalized;p instanceof Float32Array?u=kt.FLOAT:p instanceof Float64Array?console.warn("Unsupported data buffer format: Float64Array"):p instanceof Uint16Array?u=kt.UNSIGNED_SHORT:p instanceof Int16Array?u=kt.SHORT:p instanceof Uint32Array?u=kt.UNSIGNED_INT:p instanceof Int32Array?u=kt.INT:p instanceof Int8Array?u=kt.BYTE:p instanceof Uint8Array&&(u=kt.UNSIGNED_BYTE);var f=l.itemSize,m=le.getAttributeBuffer(l);if(l&&l.isInterleavedBufferAttribute){var v=l.data,g=v.stride,y=l.offset;v&&v.isInstancedInterleavedBuffer?(ae.enableAttributeAndDivisor(h,v.meshPerAttribute,r),void 0===i.maxInstancedCount&&(i.maxInstancedCount=v.meshPerAttribute*v.count)):ae.enableAttribute(h),kt.bindBuffer(kt.ARRAY_BUFFER,m),kt.vertexAttribPointer(h,f,u,d,g*v.array.BYTES_PER_ELEMENT,(n*g+y)*v.array.BYTES_PER_ELEMENT)}else l&&l.isInstancedBufferAttribute?(ae.enableAttributeAndDivisor(h,l.meshPerAttribute,r),void 0===i.maxInstancedCount&&(i.maxInstancedCount=l.meshPerAttribute*l.count)):ae.enableAttribute(h),kt.bindBuffer(kt.ARRAY_BUFFER,m),kt.vertexAttribPointer(h,f,u,d,0,n*f*l.array.BYTES_PER_ELEMENT)}else if(void 0!==s){var x=s[c];if(void 0!==x)switch(x.length){case 2:kt.vertexAttrib2fv(h,x);break;case 3:kt.vertexAttrib3fv(h,x);break;case 4:kt.vertexAttrib4fv(h,x);break;default:kt.vertexAttrib1fv(h,x)}}}}ae.disableUnusedAttributes()}function m(t,e){return Math.abs(e[0])-Math.abs(t[0])}function v(t,e){return t.object.renderOrder!==e.object.renderOrder?t.object.renderOrder-e.object.renderOrder:t.material.program&&e.material.program&&t.material.program!==e.material.program?t.material.program.id-e.material.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function g(t,e){return t.object.renderOrder!==e.object.renderOrder?t.object.renderOrder-e.object.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function y(t,e,i,n,r){var a,o;i.transparent?(a=st,o=++ct):(a=nt,o=++rt);var s=a[o];void 0!==s?(s.id=t.id,s.object=t,s.geometry=e,s.material=i,s.z=Bt.z,s.group=r):(s={id:t.id,object:t,geometry:e,material:i,z:Bt.z,group:r},a.push(s))}function x(t){var e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),Ft.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),b(Ft)}function _(t){return Ft.center.set(0,0,0),Ft.radius=.7071067811865476,Ft.applyMatrix4(t.matrixWorld),b(Ft)}function b(t){if(!It.intersectsSphere(t))return!1;var e=Dt.numPlanes;if(0===e)return!0;var i=dt.clippingPlanes,n=t.center,r=-t.radius,a=0;do if(i[a].distanceToPoint(n)<r)return!1;while(++a!==e);return!0}function w(t,e){if(t.visible!==!1){var i=0!==(t.layers.mask&e.layers.mask);if(i)if(t.isLight)et.push(t);else if(t.isSprite)t.frustumCulled!==!1&&_(t)!==!0||ut.push(t);else if(t.isLensFlare)pt.push(t);else if(t.isImmediateRenderObject)dt.sortObjects===!0&&(Bt.setFromMatrixPosition(t.matrixWorld),Bt.applyProjection(zt)),y(t,null,t.material,Bt.z,null);else if((t.isMesh||t.isLine||t.isPoints)&&(t.isSkinnedMesh&&t.skeleton.update(),t.frustumCulled===!1||x(t)===!0)){var n=t.material;if(n.visible===!0){dt.sortObjects===!0&&(Bt.setFromMatrixPosition(t.matrixWorld),Bt.applyProjection(zt));var r=le.update(t);if(n.isMultiMaterial)for(var a=r.groups,o=n.materials,s=0,c=a.length;s<c;s++){var h=a[s],l=o[h.materialIndex];l.visible===!0&&y(t,r,l,Bt.z,h)}else y(t,r,n,Bt.z,null)}}for(var u=t.children,s=0,c=u.length;s<c;s++)w(u[s],e)}}function M(t,e,i,n){for(var r=0,a=t.length;r<a;r++){var o=t[r],s=o.object,c=o.geometry,h=void 0===n?o.material:n,l=o.group;if(s.modelViewMatrix.multiplyMatrices(e.matrixWorldInverse,s.matrixWorld),s.normalMatrix.getNormalMatrix(s.modelViewMatrix),s.isImmediateRenderObject){T(h);var u=S(e,i,h,s);yt="",s.render(function(t){dt.renderBufferImmediate(t,u,h)})}else dt.renderBufferDirect(e,i,c,h,s,l)}}function E(e,i,n){var r=ce.get(e),a=ue.getParameters(e,Gt,i,Dt.numPlanes,n),o=ue.getProgramCode(e,a),s=r.program,c=!0;if(void 0===s)e.addEventListener("dispose",u);else if(s.code!==o)d(e);else{if(void 0!==a.shaderID)return;c=!1}if(c){if(a.shaderID){var h=Uc[a.shaderID];r.__webglShader={name:e.type,uniforms:t.UniformsUtils.clone(h.uniforms),vertexShader:h.vertexShader,fragmentShader:h.fragmentShader}}else r.__webglShader={name:e.type,uniforms:e.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader};e.__webglShader=r.__webglShader,s=ue.acquireProgram(e,a,o),r.program=s,e.program=s}var l=s.getAttributes();if(e.morphTargets){e.numSupportedMorphTargets=0;for(var p=0;p<dt.maxMorphTargets;p++)l["morphTarget"+p]>=0&&e.numSupportedMorphTargets++}if(e.morphNormals){e.numSupportedMorphNormals=0;for(var p=0;p<dt.maxMorphNormals;p++)l["morphNormal"+p]>=0&&e.numSupportedMorphNormals++}var f=r.__webglShader.uniforms;!e.isShaderMaterial&&!e.isRawShaderMaterial|e.clipping===!0&&(r.numClippingPlanes=Dt.numPlanes,f.clippingPlanes=Dt.uniform),r.fog=i,r.lightsHash=Gt.hash,e.lights&&(f.ambientLightColor.value=Gt.ambient,f.directionalLights.value=Gt.directional,f.spotLights.value=Gt.spot,f.pointLights.value=Gt.point,f.hemisphereLights.value=Gt.hemi,f.directionalShadowMap.value=Gt.directionalShadowMap,f.directionalShadowMatrix.value=Gt.directionalShadowMatrix,f.spotShadowMap.value=Gt.spotShadowMap,f.spotShadowMatrix.value=Gt.spotShadowMatrix,f.pointShadowMap.value=Gt.pointShadowMap,f.pointShadowMatrix.value=Gt.pointShadowMatrix);var m=r.program.getUniforms(),v=W.seqWithValue(m.seq,f);r.uniformsList=v,r.dynamicUniforms=W.splitDynamic(v,f)}function T(t){t.side===br?ae.disable(kt.CULL_FACE):ae.enable(kt.CULL_FACE),ae.setFlipSided(t.side===_r),t.transparent===!0?ae.setBlending(t.blending,t.blendEquation,t.blendSrc,t.blendDst,t.blendEquationAlpha,t.blendSrcAlpha,t.blendDstAlpha,t.premultipliedAlpha):ae.setBlending(Ar),ae.setDepthFunc(t.depthFunc),ae.setDepthTest(t.depthTest),ae.setDepthWrite(t.depthWrite),ae.setColorWrite(t.colorWrite),ae.setPolygonOffset(t.polygonOffset,t.polygonOffsetFactor,t.polygonOffsetUnits)}function S(t,e,i,n){Et=0;var r=ce.get(i);if(Nt&&(Ot||t!==xt)){var a=t===xt&&i.id===gt;Dt.setState(i.clippingPlanes,i.clipShadows,t,r,a)}i.needsUpdate===!1&&(void 0===r.program?i.needsUpdate=!0:i.fog&&r.fog!==e?i.needsUpdate=!0:i.lights&&r.lightsHash!==Gt.hash?i.needsUpdate=!0:void 0!==r.numClippingPlanes&&r.numClippingPlanes!==Dt.numPlanes&&(i.needsUpdate=!0)),i.needsUpdate&&(E(i,e,n),i.needsUpdate=!1);var o=!1,s=!1,c=!1,h=r.program,l=h.getUniforms(),u=r.__webglShader.uniforms;if(h.id!==ft&&(kt.useProgram(h.program),ft=h.id,o=!0,s=!0,c=!0),i.id!==gt&&(gt=i.id,s=!0),o||t!==xt){if(l.set(kt,t,"projectionMatrix"),ee.logarithmicDepthBuffer&&l.setValue(kt,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),t!==xt&&(xt=t,s=!0,c=!0),i.isShaderMaterial||i.isMeshPhongMaterial||i.isMeshStandardMaterial||i.envMap){var p=l.map.cameraPosition;void 0!==p&&p.setValue(kt,Bt.setFromMatrixPosition(t.matrixWorld))}(i.isMeshPhongMaterial||i.isMeshLambertMaterial||i.isMeshBasicMaterial||i.isMeshStandardMaterial||i.isShaderMaterial||i.skinning)&&l.setValue(kt,"viewMatrix",t.matrixWorldInverse),l.set(kt,dt,"toneMappingExposure"),l.set(kt,dt,"toneMappingWhitePoint")}if(i.skinning){l.setOptional(kt,n,"bindMatrix"),l.setOptional(kt,n,"bindMatrixInverse");var d=n.skeleton;d&&(ee.floatVertexTextures&&d.useVertexTexture?(l.set(kt,d,"boneTexture"),l.set(kt,d,"boneTextureWidth"),l.set(kt,d,"boneTextureHeight")):l.setOptional(kt,d,"boneMatrices"))}s&&(i.lights&&O(u,c),e&&i.fog&&C(u,e),(i.isMeshBasicMaterial||i.isMeshLambertMaterial||i.isMeshPhongMaterial||i.isMeshStandardMaterial||i.isMeshDepthMaterial)&&A(u,i),i.isLineBasicMaterial?L(u,i):i.isLineDashedMaterial?(L(u,i),R(u,i)):i.isPointsMaterial?P(u,i):i.isMeshLambertMaterial?U(u,i):i.isMeshPhongMaterial?I(u,i):i.isMeshPhysicalMaterial?N(u,i):i.isMeshStandardMaterial?D(u,i):i.isMeshDepthMaterial?i.displacementMap&&(u.displacementMap.value=i.displacementMap,u.displacementScale.value=i.displacementScale,u.displacementBias.value=i.displacementBias):i.isMeshNormalMaterial&&(u.opacity.value=i.opacity),W.upload(kt,r.uniformsList,u,dt)),l.set(kt,n,"modelViewMatrix"),l.set(kt,n,"normalMatrix"),l.setValue(kt,"modelMatrix",n.matrixWorld);var f=r.dynamicUniforms;return null!==f&&(W.evalDynamic(f,u,n,t),W.upload(kt,f,u,dt)),h}function A(t,e){t.opacity.value=e.opacity,t.diffuse.value=e.color,e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),t.map.value=e.map,t.specularMap.value=e.specularMap,t.alphaMap.value=e.alphaMap,e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity);var i;if(e.map?i=e.map:e.specularMap?i=e.specularMap:e.displacementMap?i=e.displacementMap:e.normalMap?i=e.normalMap:e.bumpMap?i=e.bumpMap:e.roughnessMap?i=e.roughnessMap:e.metalnessMap?i=e.metalnessMap:e.alphaMap?i=e.alphaMap:e.emissiveMap&&(i=e.emissiveMap),void 0!==i){i.isWebGLRenderTarget&&(i=i.texture);var n=i.offset,r=i.repeat;t.offsetRepeat.value.set(n.x,n.y,r.x,r.y)}t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio}function L(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}function R(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}function P(t,e){if(t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*Rt,t.scale.value=.5*H.clientHeight,t.map.value=e.map,null!==e.map){var i=e.map.offset,n=e.map.repeat;t.offsetRepeat.value.set(i.x,i.y,n.x,n.y)}}function C(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}function U(t,e){e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}function I(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function D(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}function N(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,D(t,e)}function O(t,e){t.ambientLightColor.needsUpdate=e,t.directionalLights.needsUpdate=e,t.pointLights.needsUpdate=e,t.spotLights.needsUpdate=e,t.hemisphereLights.needsUpdate=e}function F(t){for(var e=0,i=0,n=t.length;i<n;i++){var r=t[i];r.castShadow&&(Gt.shadows[e++]=r)}Gt.shadows.length=e}function z(t,e){var i,n,r,o,s,c,h,l=0,u=0,p=0,d=e.matrixWorldInverse,f=0,m=0,v=0,g=0;for(i=0,n=t.length;i<n;i++)if(r=t[i],o=r.color,s=r.intensity,c=r.distance,h=r.shadow&&r.shadow.map?r.shadow.map.texture:null,r.isAmbientLight)l+=o.r*s,u+=o.g*s,p+=o.b*s;else if(r.isDirectionalLight){var y=pe.get(r);y.color.copy(r.color).multiplyScalar(r.intensity),y.direction.setFromMatrixPosition(r.matrixWorld),Bt.setFromMatrixPosition(r.target.matrixWorld),y.direction.sub(Bt),y.direction.transformDirection(d),y.shadow=r.castShadow,r.castShadow&&(y.shadowBias=r.shadow.bias,y.shadowRadius=r.shadow.radius,y.shadowMapSize=r.shadow.mapSize),Gt.directionalShadowMap[f]=h,Gt.directionalShadowMatrix[f]=r.shadow.matrix,Gt.directional[f++]=y}else if(r.isSpotLight){var y=pe.get(r);y.position.setFromMatrixPosition(r.matrixWorld),y.position.applyMatrix4(d),y.color.copy(o).multiplyScalar(s),y.distance=c,y.direction.setFromMatrixPosition(r.matrixWorld),Bt.setFromMatrixPosition(r.target.matrixWorld),y.direction.sub(Bt),y.direction.transformDirection(d),y.coneCos=Math.cos(r.angle),y.penumbraCos=Math.cos(r.angle*(1-r.penumbra)),y.decay=0===r.distance?0:r.decay,y.shadow=r.castShadow,r.castShadow&&(y.shadowBias=r.shadow.bias,y.shadowRadius=r.shadow.radius,y.shadowMapSize=r.shadow.mapSize),Gt.spotShadowMap[v]=h,Gt.spotShadowMatrix[v]=r.shadow.matrix,Gt.spot[v++]=y}else if(r.isPointLight){var y=pe.get(r);y.position.setFromMatrixPosition(r.matrixWorld),y.position.applyMatrix4(d),y.color.copy(r.color).multiplyScalar(r.intensity),y.distance=r.distance,y.decay=0===r.distance?0:r.decay,y.shadow=r.castShadow,r.castShadow&&(y.shadowBias=r.shadow.bias,y.shadowRadius=r.shadow.radius,y.shadowMapSize=r.shadow.mapSize),Gt.pointShadowMap[m]=h,void 0===Gt.pointShadowMatrix[m]&&(Gt.pointShadowMatrix[m]=new a),Bt.setFromMatrixPosition(r.matrixWorld).negate(),Gt.pointShadowMatrix[m].identity().setPosition(Bt),Gt.point[m++]=y}else if(r.isHemisphereLight){var y=pe.get(r);y.direction.setFromMatrixPosition(r.matrixWorld),y.direction.transformDirection(d),y.direction.normalize(),y.skyColor.copy(r.color).multiplyScalar(s),y.groundColor.copy(r.groundColor).multiplyScalar(s),Gt.hemi[g++]=y}Gt.ambient[0]=l,Gt.ambient[1]=u,Gt.ambient[2]=p,Gt.directional.length=f,Gt.spot.length=v,Gt.point.length=m,Gt.hemi.length=g,Gt.hash=f+","+m+","+v+","+g+","+Gt.shadows.length}function B(){var t=Et;return t>=ee.maxTextures&&console.warn("WebGLRenderer: trying to use "+t+" texture units while this GPU supports only "+ee.maxTextures),Et+=1,t}function G(t){var e;if(t===xa)return kt.REPEAT;if(t===_a)return kt.CLAMP_TO_EDGE;if(t===ba)return kt.MIRRORED_REPEAT;if(t===wa)return kt.NEAREST;if(t===Ma)return kt.NEAREST_MIPMAP_NEAREST;if(t===Ea)return kt.NEAREST_MIPMAP_LINEAR;if(t===Ta)return kt.LINEAR;if(t===Sa)return kt.LINEAR_MIPMAP_NEAREST;if(t===Aa)return kt.LINEAR_MIPMAP_LINEAR;if(t===La)return kt.UNSIGNED_BYTE;if(t===Oa)return kt.UNSIGNED_SHORT_4_4_4_4;if(t===Fa)return kt.UNSIGNED_SHORT_5_5_5_1;if(t===za)return kt.UNSIGNED_SHORT_5_6_5;if(t===Ra)return kt.BYTE;if(t===Pa)return kt.SHORT;if(t===Ca)return kt.UNSIGNED_SHORT;if(t===Ua)return kt.INT;if(t===Ia)return kt.UNSIGNED_INT;if(t===Da)return kt.FLOAT;if(e=te.get("OES_texture_half_float"),null!==e&&t===Na)return e.HALF_FLOAT_OES;if(t===Ga)return kt.ALPHA;if(t===Ha)return kt.RGB;if(t===Va)return kt.RGBA;if(t===ka)return kt.LUMINANCE;if(t===ja)return kt.LUMINANCE_ALPHA;if(t===Xa)return kt.DEPTH_COMPONENT;if(t===Ya)return kt.DEPTH_STENCIL;if(t===Ir)return kt.FUNC_ADD;if(t===Dr)return kt.FUNC_SUBTRACT;if(t===Nr)return kt.FUNC_REVERSE_SUBTRACT;if(t===zr)return kt.ZERO;if(t===Br)return kt.ONE;if(t===Gr)return kt.SRC_COLOR;if(t===Hr)return kt.ONE_MINUS_SRC_COLOR;if(t===Vr)return kt.SRC_ALPHA;if(t===kr)return kt.ONE_MINUS_SRC_ALPHA;if(t===jr)return kt.DST_ALPHA;if(t===Wr)return kt.ONE_MINUS_DST_ALPHA;if(t===Xr)return kt.DST_COLOR;if(t===Yr)return kt.ONE_MINUS_DST_COLOR;if(t===qr)return kt.SRC_ALPHA_SATURATE;if(e=te.get("WEBGL_compressed_texture_s3tc"),null!==e){if(t===qa)return e.COMPRESSED_RGB_S3TC_DXT1_EXT;if(t===Za)return e.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(t===Ja)return e.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(t===Qa)return e.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(e=te.get("WEBGL_compressed_texture_pvrtc"),null!==e){if(t===Ka)return e.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(t===$a)return e.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(t===to)return e.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(t===eo)return e.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(e=te.get("WEBGL_compressed_texture_etc1"),null!==e&&t===io)return e.COMPRESSED_RGB_ETC1_WEBGL;if(e=te.get("EXT_blend_minmax"),null!==e){if(t===Or)return e.MIN_EXT;if(t===Fr)return e.MAX_EXT}return e=te.get("WEBGL_depth_texture"),null!==e&&t===Ba?e.UNSIGNED_INT_24_8_WEBGL:0}console.log("THREE.WebGLRenderer",cr),e=e||{};var H=void 0!==e.canvas?e.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),V=void 0!==e.context?e.context:null,k=void 0!==e.alpha&&e.alpha,j=void 0===e.depth||e.depth,Z=void 0===e.stencil||e.stencil,J=void 0!==e.antialias&&e.antialias,Q=void 0===e.premultipliedAlpha||e.premultipliedAlpha,tt=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,et=[],nt=[],rt=-1,st=[],ct=-1,lt=new Float32Array(8),ut=[],pt=[];this.domElement=H,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=sa,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var dt=this,ft=null,mt=null,vt=null,gt=-1,yt="",xt=null,_t=new Y,bt=null,Mt=new Y,Et=0,Tt=new $(0),St=0,At=H.width,Lt=H.height,Rt=1,Pt=new Y(0,0,At,Lt),Ct=!1,Ut=new Y(0,0,At,Lt),It=new at,Dt=new Zt,Nt=!1,Ot=!1,Ft=new it,zt=new a,Bt=new s,Gt={hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],shadows:[]},Ht={calls:0,vertices:0,faces:0,points:0};this.info={render:Ht,memory:{geometries:0,textures:0},programs:null};var kt;try{var Qt={alpha:k,depth:j,stencil:Z,antialias:J,premultipliedAlpha:Q,preserveDrawingBuffer:tt};if(kt=V||H.getContext("webgl",Qt)||H.getContext("experimental-webgl",Qt),null===kt)throw null!==H.getContext("webgl")?"Error creating WebGL context with your selected attributes.":"Error creating WebGL context.";void 0===kt.getShaderPrecisionFormat&&(kt.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}}),H.addEventListener("webglcontextlost",h,!1)}catch($t){console.error("THREE.WebGLRenderer: "+$t)}var te=new Yt(kt);te.get("WEBGL_depth_texture"),te.get("OES_texture_float"),te.get("OES_texture_float_linear"),te.get("OES_texture_half_float"),te.get("OES_texture_half_float_linear"),te.get("OES_standard_derivatives"),te.get("ANGLE_instanced_arrays"),te.get("OES_element_index_uint")&&(Vt.MaxIndex=4294967296);var ee=new Xt(kt,te,e),ae=new q(kt,te,G),ce=new ht,he=new X(kt,te,ae,ce,ee,G,this.info),le=new jt(kt,ce,this.info),ue=new wt(this,ee),pe=new Wt;this.info.programs=ue.programs;var de=new Jt(kt,te,Ht),fe=new qt(kt,te,Ht),me=new se((-1),1,1,(-1),0,1),ve=new oe,ge=new ne(new re(2,2),new ie({depthTest:!1,depthWrite:!1,fog:!1})),ye=Uc.cube,xe=new ne(new Kt(5,5,5),new K({uniforms:ye.uniforms,vertexShader:ye.vertexShader,fragmentShader:ye.fragmentShader,side:_r,depthTest:!1,depthWrite:!1,fog:!1}));r(),this.context=kt,this.capabilities=ee,this.extensions=te,this.properties=ce,this.state=ae;var _e=new ot(this,Gt,le,ee);this.shadowMap=_e;var be=new c(this,ut),we=new l(this,pt);this.getContext=function(){return kt},this.getContextAttributes=function(){return kt.getContextAttributes()},this.forceContextLoss=function(){te.get("WEBGL_lose_context").loseContext()},this.getMaxAnisotropy=function(){return ee.getMaxAnisotropy()},this.getPrecision=function(){return ee.precision},this.getPixelRatio=function(){return Rt},this.setPixelRatio=function(t){void 0!==t&&(Rt=t,this.setSize(Ut.z,Ut.w,!1))},this.getSize=function(){return{width:At,height:Lt}},this.setSize=function(t,e,i){At=t,Lt=e,H.width=t*Rt,H.height=e*Rt,i!==!1&&(H.style.width=t+"px",H.style.height=e+"px"),this.setViewport(0,0,t,e)},this.setViewport=function(t,e,i,n){ae.viewport(Ut.set(t,e,i,n))},this.setScissor=function(t,e,i,n){ae.scissor(Pt.set(t,e,i,n))},this.setScissorTest=function(t){ae.setScissorTest(Ct=t)},this.getClearColor=function(){return Tt},this.setClearColor=function(t,e){Tt.set(t),St=void 0!==e?e:1,n(Tt.r,Tt.g,Tt.b,St)},this.getClearAlpha=function(){return St},this.setClearAlpha=function(t){St=t,n(Tt.r,Tt.g,Tt.b,St)},this.clear=function(t,e,i){var n=0;(void 0===t||t)&&(n|=kt.COLOR_BUFFER_BIT),(void 0===e||e)&&(n|=kt.DEPTH_BUFFER_BIT),(void 0===i||i)&&(n|=kt.STENCIL_BUFFER_BIT),kt.clear(n)},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.clearTarget=function(t,e,i,n){this.setRenderTarget(t),this.clear(e,i,n)},this.resetGLState=o,this.dispose=function(){st=[],ct=-1,nt=[],rt=-1,H.removeEventListener("webglcontextlost",h,!1)},this.renderBufferImmediate=function(t,e,i){ae.initAttributes();var n=ce.get(t);t.hasPositions&&!n.position&&(n.position=kt.createBuffer()),t.hasNormals&&!n.normal&&(n.normal=kt.createBuffer()),t.hasUvs&&!n.uv&&(n.uv=kt.createBuffer()),t.hasColors&&!n.color&&(n.color=kt.createBuffer());var r=e.getAttributes();if(t.hasPositions&&(kt.bindBuffer(kt.ARRAY_BUFFER,n.position),kt.bufferData(kt.ARRAY_BUFFER,t.positionArray,kt.DYNAMIC_DRAW),ae.enableAttribute(r.position),kt.vertexAttribPointer(r.position,3,kt.FLOAT,!1,0,0)),t.hasNormals){if(kt.bindBuffer(kt.ARRAY_BUFFER,n.normal),!i.isMeshPhongMaterial&&!i.isMeshStandardMaterial&&i.shading===wr)for(var a=0,o=3*t.count;a<o;a+=9){var s=t.normalArray,c=(s[a+0]+s[a+3]+s[a+6])/3,h=(s[a+1]+s[a+4]+s[a+7])/3,l=(s[a+2]+s[a+5]+s[a+8])/3;s[a+0]=c,s[a+1]=h,s[a+2]=l,s[a+3]=c,s[a+4]=h,s[a+5]=l,s[a+6]=c,s[a+7]=h,s[a+8]=l}kt.bufferData(kt.ARRAY_BUFFER,t.normalArray,kt.DYNAMIC_DRAW),ae.enableAttribute(r.normal),kt.vertexAttribPointer(r.normal,3,kt.FLOAT,!1,0,0)}t.hasUvs&&i.map&&(kt.bindBuffer(kt.ARRAY_BUFFER,n.uv),kt.bufferData(kt.ARRAY_BUFFER,t.uvArray,kt.DYNAMIC_DRAW),ae.enableAttribute(r.uv),kt.vertexAttribPointer(r.uv,2,kt.FLOAT,!1,0,0)),t.hasColors&&i.vertexColors!==Er&&(kt.bindBuffer(kt.ARRAY_BUFFER,n.color),kt.bufferData(kt.ARRAY_BUFFER,t.colorArray,kt.DYNAMIC_DRAW),ae.enableAttribute(r.color),kt.vertexAttribPointer(r.color,3,kt.FLOAT,!1,0,0)),ae.disableUnusedAttributes(),kt.drawArrays(kt.TRIANGLES,0,t.count),t.count=0},this.renderBufferDirect=function(t,e,n,r,a,o){T(r);var s=S(t,e,r,a),c=!1,h=n.id+"_"+s.id+"_"+r.wireframe;h!==yt&&(yt=h,c=!0);var l=a.morphTargetInfluences;if(void 0!==l){for(var u=[],p=0,d=l.length;p<d;p++){var v=l[p];u.push([v,p])}u.sort(m),u.length>8&&(u.length=8);for(var g=n.morphAttributes,p=0,d=u.length;p<d;p++){var v=u[p];if(lt[p]=v[0],0!==v[0]){var y=v[1];r.morphTargets===!0&&g.position&&n.addAttribute("morphTarget"+p,g.position[y]),r.morphNormals===!0&&g.normal&&n.addAttribute("morphNormal"+p,g.normal[y])}else r.morphTargets===!0&&n.removeAttribute("morphTarget"+p),r.morphNormals===!0&&n.removeAttribute("morphNormal"+p)}s.getUniforms().setValue(kt,"morphTargetInfluences",lt),c=!0}var y=n.index,x=n.attributes.position;r.wireframe===!0&&(y=le.getWireframeAttribute(n));var _;null!==y?(_=fe,_.setIndex(y)):_=de,c&&(f(r,s,n),null!==y&&kt.bindBuffer(kt.ELEMENT_ARRAY_BUFFER,le.getAttributeBuffer(y)));var b=0,w=1/0;null!==y?w=y.count:void 0!==x&&(w=x.count);var M=n.drawRange.start,E=n.drawRange.count,A=null!==o?o.start:0,L=null!==o?o.count:1/0,R=Math.max(b,M,A),P=Math.min(b+w,M+E,A+L)-1,C=Math.max(0,P-R+1);if(a.isMesh)if(r.wireframe===!0)ae.setLineWidth(r.wireframeLinewidth*i()),_.setMode(kt.LINES);else switch(a.drawMode){case po:_.setMode(kt.TRIANGLES);break;case fo:_.setMode(kt.TRIANGLE_STRIP);break;case mo:_.setMode(kt.TRIANGLE_FAN)}else if(a.isLine){var U=r.linewidth;void 0===U&&(U=1),ae.setLineWidth(U*i()),a.isLineSegments?_.setMode(kt.LINES):_.setMode(kt.LINE_STRIP)}else a.isPoints&&_.setMode(kt.POINTS);n&&n.isInstancedBufferGeometry?n.maxInstancedCount>0&&_.renderInstances(n,R,C):_.render(R,C)},this.render=function(t,e,i,r){if((e&&e.isCamera)===!1)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");var a=t.fog;yt="",gt=-1,xt=null,t.autoUpdate===!0&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),e.matrixWorldInverse.getInverse(e.matrixWorld),zt.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),It.setFromMatrix(zt),et.length=0,rt=-1,ct=-1,ut.length=0,pt.length=0,Ot=this.localClippingEnabled,Nt=Dt.init(this.clippingPlanes,Ot,e),w(t,e),nt.length=rt+1,st.length=ct+1,dt.sortObjects===!0&&(nt.sort(v),st.sort(g)),Nt&&Dt.beginShadows(),F(et),_e.render(t,e),z(et,e),Nt&&Dt.endShadows(),Ht.calls=0,Ht.vertices=0,Ht.faces=0,Ht.points=0,void 0===i&&(i=null),this.setRenderTarget(i);var o=t.background;if(null===o?n(Tt.r,Tt.g,Tt.b,St):o&&o.isColor&&(n(o.r,o.g,o.b,1),r=!0),(this.autoClear||r)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil),o&&o.isCubeTexture?(ve.projectionMatrix.copy(e.projectionMatrix),ve.matrixWorld.extractRotation(e.matrixWorld),ve.matrixWorldInverse.getInverse(ve.matrixWorld),xe.material.uniforms.tCube.value=o,xe.modelViewMatrix.multiplyMatrices(ve.matrixWorldInverse,xe.matrixWorld),le.update(xe),dt.renderBufferDirect(ve,null,xe.geometry,xe.material,xe,null)):o&&o.isTexture&&(ge.material.map=o,le.update(ge),dt.renderBufferDirect(me,null,ge.geometry,ge.material,ge,null)),t.overrideMaterial){var s=t.overrideMaterial;M(nt,e,a,s),M(st,e,a,s)}else ae.setBlending(Ar),M(nt,e,a),M(st,e,a);be.render(t,e),we.render(t,e,Mt),i&&he.updateRenderTargetMipmap(i),ae.setDepthTest(!0),ae.setDepthWrite(!0),ae.setColorWrite(!0)},this.setFaceCulling=function(t,e){ae.setCullFace(t),ae.setFlipSided(e===fr)},this.allocTextureUnit=B,this.setTexture2D=function(){var t=!1;return function(e,i){e&&e.isWebGLRenderTarget&&(t||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),he.setTexture2D(e,i)}}(),this.setTexture=function(){var t=!1;return function(e,i){t||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),t=!0),he.setTexture2D(e,i)}}(),this.setTextureCube=function(){var t=!1;return function(e,i){e&&e.isWebGLRenderTargetCube&&(t||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?he.setTextureCube(e,i):he.setTextureCubeDynamic(e,i)}}(),this.getCurrentRenderTarget=function(){return mt},this.setRenderTarget=function(t){mt=t,t&&void 0===ce.get(t).__webglFramebuffer&&he.setupRenderTarget(t);var e,i=t&&t.isWebGLRenderTargetCube;if(t){var n=ce.get(t);e=i?n.__webglFramebuffer[t.activeCubeFace]:n.__webglFramebuffer,_t.copy(t.scissor),
  bt=t.scissorTest,Mt.copy(t.viewport)}else e=null,_t.copy(Pt).multiplyScalar(Rt),bt=Ct,Mt.copy(Ut).multiplyScalar(Rt);if(vt!==e&&(kt.bindFramebuffer(kt.FRAMEBUFFER,e),vt=e),ae.scissor(_t),ae.setScissorTest(bt),ae.viewport(Mt),i){var r=ce.get(t.texture);kt.framebufferTexture2D(kt.FRAMEBUFFER,kt.COLOR_ATTACHMENT0,kt.TEXTURE_CUBE_MAP_POSITIVE_X+t.activeCubeFace,r.__webglTexture,t.activeMipMapLevel)}},this.readRenderTargetPixels=function(t,e,i,n,r,a){if((t&&t.isWebGLRenderTarget)===!1)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");var o=ce.get(t).__webglFramebuffer;if(o){var s=!1;o!==vt&&(kt.bindFramebuffer(kt.FRAMEBUFFER,o),s=!0);try{var c=t.texture,h=c.format,l=c.type;if(h!==Va&&G(h)!==kt.getParameter(kt.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(l===La||G(l)===kt.getParameter(kt.IMPLEMENTATION_COLOR_READ_TYPE)||l===Da&&(te.get("OES_texture_float")||te.get("WEBGL_color_buffer_float"))||l===Na&&te.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");kt.checkFramebufferStatus(kt.FRAMEBUFFER)===kt.FRAMEBUFFER_COMPLETE?e>=0&&e<=t.width-n&&i>=0&&i<=t.height-r&&kt.readPixels(e,i,n,r,G(h),G(l),a):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&kt.bindFramebuffer(kt.FRAMEBUFFER,vt)}}}}function he(t,e){this.name="",this.color=new $(t),this.density=void 0!==e?e:25e-5}function le(t,e,i){this.name="",this.color=new $(t),this.near=void 0!==e?e:1,this.far=void 0!==i?i:1e3}function ue(){Ft.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function pe(t,e,i,n,r){Ft.call(this),this.lensFlares=[],this.positionScreen=new s,this.customUpdateCallback=void 0,void 0!==t&&this.add(t,e,i,n,r)}function de(t){J.call(this),this.type="SpriteMaterial",this.color=new $(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function fe(t){Ft.call(this),this.type="Sprite",this.material=void 0!==t?t:new de}function me(){Ft.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function ve(t,e,i,r,a,o,s,c,h,l,u,p){n.call(this,null,o,s,c,h,l,r,a,u,p),this.image={data:t,width:e,height:i},this.magFilter=void 0!==h?h:wa,this.minFilter=void 0!==l?l:wa,this.flipY=!1,this.generateMipmaps=!1}function ge(e,i,n){if(this.useVertexTexture=void 0===n||n,this.identityMatrix=new a,e=e||[],this.bones=e.slice(0),this.useVertexTexture){var r=Math.sqrt(4*this.bones.length);r=t.Math.nextPowerOfTwo(Math.ceil(r)),r=Math.max(r,4),this.boneTextureWidth=r,this.boneTextureHeight=r,this.boneMatrices=new Float32Array(this.boneTextureWidth*this.boneTextureHeight*4),this.boneTexture=new ve(this.boneMatrices,this.boneTextureWidth,this.boneTextureHeight,Va,Da)}else this.boneMatrices=new Float32Array(16*this.bones.length);if(void 0===i)this.calculateInverses();else if(this.bones.length===i.length)this.boneInverses=i.slice(0);else{console.warn("THREE.Skeleton bonInverses is the wrong length."),this.boneInverses=[];for(var o=0,s=this.bones.length;o<s;o++)this.boneInverses.push(new a)}}function ye(t){Ft.call(this),this.type="Bone",this.skin=t}function xe(t,e,i){ne.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new a,this.bindMatrixInverse=new a;var n=[];if(this.geometry&&void 0!==this.geometry.bones){for(var r,o,s=0,c=this.geometry.bones.length;s<c;++s)o=this.geometry.bones[s],r=new ye(this),n.push(r),r.name=o.name,r.position.fromArray(o.pos),r.quaternion.fromArray(o.rotq),void 0!==o.scl&&r.scale.fromArray(o.scl);for(var s=0,c=this.geometry.bones.length;s<c;++s)o=this.geometry.bones[s],o.parent!==-1&&null!==o.parent&&void 0!==n[o.parent]?n[o.parent].add(n[s]):this.add(n[s])}this.normalizeSkinWeights(),this.updateMatrixWorld(!0),this.bind(new ge(n,(void 0),i),this.matrixWorld)}function _e(t){J.call(this),this.type="LineBasicMaterial",this.color=new $(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(t)}function be(t,e,i){return 1===i?(console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new we(t,e)):(Ft.call(this),this.type="Line",this.geometry=void 0!==t?t:new Vt,void(this.material=void 0!==e?e:new _e({color:16777215*Math.random()})))}function we(t,e){be.call(this,t,e),this.type="LineSegments"}function Me(t){J.call(this),this.type="PointsMaterial",this.color=new $(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=!1,this.setValues(t)}function Ee(t,e){Ft.call(this),this.type="Points",this.geometry=void 0!==t?t:new Vt,this.material=void 0!==e?e:new Me({color:16777215*Math.random()})}function Te(){Ft.call(this),this.type="Group"}function Se(t,e,i,r,a,o,s,c,h){function l(){requestAnimationFrame(l),t.readyState>=t.HAVE_CURRENT_DATA&&(u.needsUpdate=!0)}n.call(this,t,e,i,r,a,o,s,c,h),this.generateMipmaps=!1;var u=this;l()}function Ae(t,e,i,r,a,o,s,c,h,l,u,p){n.call(this,null,o,s,c,h,l,r,a,u,p),this.image={width:e,height:i},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function Le(t,e,i,r,a,o,s,c,h){n.call(this,t,e,i,r,a,o,s,c,h),this.needsUpdate=!0}function Re(t,e,i,r,a,o,s,c,h,l){if(l=void 0!==l?l:Xa,l!==Xa&&l!==Ya)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n.call(this,null,r,a,o,s,c,l,i,h),this.image={width:t,height:e},this.type=void 0!==i?i:Ca,this.magFilter=void 0!==s?s:wa,this.minFilter=void 0!==c?c:wa,this.flipY=!1,this.generateMipmaps=!1}function Pe(){K.call(this,{uniforms:t.UniformsUtils.merge([Cc.lights,{opacity:{value:1}}]),vertexShader:Pc.shadow_vert,fragmentShader:Pc.shadow_frag}),this.lights=!0,this.transparent=!0,Object.defineProperties(this,{opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(t){this.uniforms.opacity.value=t}}})}function Ce(t){K.call(this,t),this.type="RawShaderMaterial"}function Ue(e){this.uuid=t.Math.generateUUID(),this.type="MultiMaterial",this.materials=e instanceof Array?e:[],this.visible=!0}function Ie(t){J.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new $(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new $(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new i(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function De(t){Ie.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function Ne(t){J.call(this),this.type="MeshPhongMaterial",this.color=new $(16777215),this.specular=new $(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new $(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new i(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=na,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Oe(t){J.call(this,t),this.type="MeshNormalMaterial",this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.morphTargets=!1,this.setValues(t)}function Fe(t){J.call(this),this.type="MeshLambertMaterial",this.color=new $(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new $(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=na,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function ze(t){J.call(this),this.type="LineDashedMaterial",this.color=new $(16777215),this.linewidth=1,this.scale=1,this.dashSize=3,this.gapSize=1,this.lights=!1,this.setValues(t)}function Be(t,e,i){var n=this,r=!1,a=0,o=0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=i,this.itemStart=function(t){o++,r===!1&&void 0!==n.onStart&&n.onStart(t,a,o),r=!0},this.itemEnd=function(t){a++,void 0!==n.onProgress&&n.onProgress(t,a,o),a===o&&(r=!1,void 0!==n.onLoad&&n.onLoad())},this.itemError=function(t){void 0!==n.onError&&n.onError(t)}}function Ge(e){this.manager=void 0!==e?e:t.DefaultLoadingManager}function He(e){this.manager=void 0!==e?e:t.DefaultLoadingManager,this._parser=null}function Ve(e){this.manager=void 0!==e?e:t.DefaultLoadingManager,this._parser=null}function ke(e){this.manager=void 0!==e?e:t.DefaultLoadingManager}function je(e){this.manager=void 0!==e?e:t.DefaultLoadingManager}function We(e){this.manager=void 0!==e?e:t.DefaultLoadingManager}function Xe(t,e){Ft.call(this),this.type="Light",this.color=new $(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function Ye(t,e,i){Xe.call(this,t,i),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(Ft.DefaultUp),this.updateMatrix(),this.groundColor=new $(e)}function qe(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new i(512,512),this.map=null,this.matrix=new a}function Ze(){qe.call(this,new oe(50,1,.5,500))}function Je(t,e,i,n,r,a){Xe.call(this,t,e),this.type="SpotLight",this.position.copy(Ft.DefaultUp),this.updateMatrix(),this.target=new Ft,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==i?i:0,this.angle=void 0!==n?n:Math.PI/3,this.penumbra=void 0!==r?r:0,this.decay=void 0!==a?a:1,this.shadow=new Ze}function Qe(t,e,i,n){Xe.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==i?i:0,this.decay=void 0!==n?n:1,this.shadow=new qe(new oe(90,1,.5,500))}function Ke(t){qe.call(this,new se((-5),5,5,(-5),.5,500))}function $e(t,e){Xe.call(this,t,e),this.type="DirectionalLight",this.position.copy(Ft.DefaultUp),this.updateMatrix(),this.target=new Ft,this.shadow=new Ke}function ti(t,e){Xe.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function ei(t,e,i,n){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==n?n:new e.constructor(i),this.sampleValues=e,this.valueSize=i}function ii(t,e,i,n){ei.call(this,t,e,i,n),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function ni(t,e,i,n){ei.call(this,t,e,i,n)}function ri(t,e,i,n){ei.call(this,t,e,i,n)}function ai(e,i,n,r){if(void 0===e)throw new Error("track name is undefined");if(void 0===i||0===i.length)throw new Error("no keyframes in track named "+e);this.name=e,this.times=t.AnimationUtils.convertArray(i,this.TimeBufferType),this.values=t.AnimationUtils.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation),this.validate(),this.optimize()}function oi(t,e,i,n){ai.call(this,t,e,i,n)}function si(t,e,i,n){ei.call(this,t,e,i,n)}function ci(t,e,i,n){ai.call(this,t,e,i,n)}function hi(t,e,i,n){ai.call(this,t,e,i,n)}function li(t,e,i,n){ai.call(this,t,e,i,n)}function ui(t,e,i){ai.call(this,t,e,i)}function pi(t,e,i,n){ai.call(this,t,e,i,n)}function di(t,e,i,n){ai.apply(this,arguments)}function fi(e,i,n){this.name=e,this.tracks=n,this.duration=void 0!==i?i:-1,this.uuid=t.Math.generateUUID(),this.duration<0&&this.resetDuration(),this.trim(),this.optimize()}function mi(e){this.manager=void 0!==e?e:t.DefaultLoadingManager,this.textures={}}function vi(e){this.manager=void 0!==e?e:t.DefaultLoadingManager}function gi(){this.onLoadStart=function(){},this.onLoadProgress=function(){},this.onLoadComplete=function(){}}function yi(e){"boolean"==typeof e&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),e=void 0),this.manager=void 0!==e?e:t.DefaultLoadingManager,this.withCredentials=!1}function xi(e){this.manager=void 0!==e?e:t.DefaultLoadingManager,this.texturePath=""}function _i(){}function bi(t,e){this.v1=t,this.v2=e}function wi(){this.curves=[],this.autoClose=!1}function Mi(t,e,i,n,r,a,o,s){this.aX=t,this.aY=e,this.xRadius=i,this.yRadius=n,this.aStartAngle=r,this.aEndAngle=a,this.aClockwise=o,this.aRotation=s||0}function Ei(t){this.points=void 0===t?[]:t}function Ti(t,e,i,n){this.v0=t,this.v1=e,this.v2=i,this.v3=n}function Si(t,e,i){this.v0=t,this.v1=e,this.v2=i}function Ai(t,e,n,r,a,o){function c(t,e,i){return C.vertices.push(new s(t,e,i))-1}Bt.call(this),this.type="TubeGeometry",this.parameters={path:t,segments:e,radius:n,radialSegments:r,closed:a,taper:o},e=e||64,n=n||1,r=r||8,a=a||!1,o=o||Ai.NoTaper;var h,l,u,p,d,f,m,v,g,y,x,_,b,w,M,E,T,S,A,L,R,P=[],C=this,U=e+1,I=new s,D=new Ai.FrenetFrames(t,e,a),N=D.tangents,O=D.normals,F=D.binormals;for(this.tangents=N,this.normals=O,this.binormals=F,y=0;y<U;y++)for(P[y]=[],p=y/(U-1),g=t.getPointAt(p),h=N[y],l=O[y],u=F[y],f=n*o(p),x=0;x<r;x++)d=x/r*2*Math.PI,m=-f*Math.cos(d),v=f*Math.sin(d),I.copy(g),I.x+=m*l.x+v*u.x,I.y+=m*l.y+v*u.y,I.z+=m*l.z+v*u.z,P[y][x]=c(I.x,I.y,I.z);for(y=0;y<e;y++)for(x=0;x<r;x++)_=a?(y+1)%e:y+1,b=(x+1)%r,w=P[y][x],M=P[_][x],E=P[_][b],T=P[y][b],S=new i(y/e,x/r),A=new i((y+1)/e,x/r),L=new i((y+1)/e,(x+1)/r),R=new i(y/e,(x+1)/r),this.faces.push(new Dt(w,M,T)),this.faceVertexUvs[0].push([S,A,R]),this.faces.push(new Dt(M,E,T)),this.faceVertexUvs[0].push([A.clone(),L,R.clone()]);this.computeFaceNormals(),this.computeVertexNormals()}function Li(t,e){return"undefined"==typeof t?void(t=[]):(Bt.call(this),this.type="ExtrudeGeometry",t=Array.isArray(t)?t:[t],this.addShapeList(t,e),void this.computeFaceNormals())}function Ri(t,e){Bt.call(this),this.type="ShapeGeometry",Array.isArray(t)===!1&&(t=[t]),this.addShapeList(t,e),this.computeFaceNormals()}function Pi(){Ci.apply(this,arguments),this.holes=[]}function Ci(t){wi.call(this),this.currentPoint=new i,t&&this.fromPoints(t)}function Ui(){this.subPaths=[],this.currentPath=null}function Ii(t){this.data=t}function Di(e){this.manager=void 0!==e?e:t.DefaultLoadingManager}function Ni(){return void 0===Bc&&(Bc=new(window.AudioContext||window.webkitAudioContext)),Bc}function Oi(e){this.manager=void 0!==e?e:t.DefaultLoadingManager}function Fi(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new oe,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new oe,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function zi(t,e,i){Ft.call(this),this.type="CubeCamera";var n=90,r=1,a=new oe(n,r,t,e);a.up.set(0,-1,0),a.lookAt(new s(1,0,0)),this.add(a);var o=new oe(n,r,t,e);o.up.set(0,-1,0),o.lookAt(new s((-1),0,0)),this.add(o);var c=new oe(n,r,t,e);c.up.set(0,0,1),c.lookAt(new s(0,1,0)),this.add(c);var h=new oe(n,r,t,e);h.up.set(0,0,-1),h.lookAt(new s(0,(-1),0)),this.add(h);var l=new oe(n,r,t,e);l.up.set(0,-1,0),l.lookAt(new s(0,0,1)),this.add(l);var u=new oe(n,r,t,e);u.up.set(0,-1,0),u.lookAt(new s(0,0,(-1))),this.add(u);var p={format:Ha,magFilter:Ta,minFilter:Ta};this.renderTarget=new Qt(i,i,p),this.updateCubeMap=function(t,e){null===this.parent&&this.updateMatrixWorld();var i=this.renderTarget,n=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,i.activeCubeFace=0,t.render(e,a,i),i.activeCubeFace=1,t.render(e,o,i),i.activeCubeFace=2,t.render(e,c,i),i.activeCubeFace=3,t.render(e,h,i),i.activeCubeFace=4,t.render(e,l,i),i.texture.generateMipmaps=n,i.activeCubeFace=5,t.render(e,u,i),t.setRenderTarget(null)}}function Bi(){Ft.call(this),this.type="AudioListener",this.context=Ni(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function Gi(t){Ft.call(this),this.type="Audio",this.context=t.context,this.source=this.context.createBufferSource(),this.source.onended=this.onEnded.bind(this),this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.startTime=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function Hi(t){Gi.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function Vi(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function ki(t,e,i){this.binding=t,this.valueSize=i;var n,r=Float64Array;switch(e){case"quaternion":n=this._slerp;break;case"string":case"bool":r=Array,n=this._select;break;default:n=this._lerp}this.buffer=new r(4*i),this._mixBufferRegion=n,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}function ji(t,e,i){this.path=e,this.parsedPath=i||ji.parseTrackName(e),this.node=ji.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Wi(e){this.uuid=t.Math.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var i={};this._indicesByUUID=i;for(var n=0,r=arguments.length;n!==r;++n)i[arguments[n].uuid]=n;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var a=this;this.stats={objects:{get total(){return a._objects.length},get inUse(){return this.total-a.nCachedObjects_}},get bindingsPerObject(){return a._bindings.length}}}function Xi(t,e,i){this._mixer=t,this._clip=e,this._localRoot=i||null;for(var n=e.tracks,r=n.length,a=new Array(r),o={endingStart:ho,endingEnd:ho},s=0;s!==r;++s){var c=n[s].createInterpolant(null);a[s]=c,c.settings=o}this._interpolantSettings=o,this._interpolants=a,this._propertyBindings=new Array(r),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=ro,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function Yi(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function qi(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t,this.dynamic=!1}function Zi(){Vt.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Ji(e,i,n,r){this.uuid=t.Math.generateUUID(),this.data=e,this.itemSize=i,this.offset=n,this.normalized=r===!0}function Qi(e,i){this.uuid=t.Math.generateUUID(),this.array=e,this.stride=i,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Ki(t,e,i){Qi.call(this,t,e),this.meshPerAttribute=i||1}function $i(t,e,i){Mt.call(this,t,e),this.meshPerAttribute=i||1}function tn(t,e,i,n){this.ray=new $t(t,e),this.near=i||0,this.far=n||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function en(t,e){return t.distance-e.distance}function nn(t,e,i,n){if(t.visible!==!1&&(t.raycast(e,i),n===!0))for(var r=t.children,a=0,o=r.length;a<o;a++)nn(r[a],e,i,!0)}function rn(t){this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}function an(t){function e(t,e,i,n,r,a,o){var s=.5*(i-t),c=.5*(n-e);return(2*(e-i)+s+c)*o+(-3*(e-i)-2*s-c)*a+s*r+e}this.points=t;var i,n,r,a,o,c,h,l,u,p=[],d={x:0,y:0,z:0};this.initFromArray=function(t){this.points=[];for(var e=0;e<t.length;e++)this.points[e]={x:t[e][0],y:t[e][1],z:t[e][2]}},this.getPoint=function(t){return i=(this.points.length-1)*t,n=Math.floor(i),r=i-n,p[0]=0===n?n:n-1,p[1]=n,p[2]=n>this.points.length-2?this.points.length-1:n+1,p[3]=n>this.points.length-3?this.points.length-1:n+2,c=this.points[p[0]],h=this.points[p[1]],l=this.points[p[2]],u=this.points[p[3]],a=r*r,o=r*a,d.x=e(c.x,h.x,l.x,u.x,r,a,o),d.y=e(c.y,h.y,l.y,u.y,r,a,o),d.z=e(c.z,h.z,l.z,u.z,r,a,o),d},this.getControlPointsArray=function(){var t,e,i=this.points.length,n=[];for(t=0;t<i;t++)e=this.points[t],n[t]=[e.x,e.y,e.z];return n},this.getLength=function(t){var e,i,n,r,a=0,o=0,c=0,h=new s,l=new s,u=[],p=0;for(u[0]=0,t||(t=100),n=this.points.length*t,h.copy(this.points[0]),e=1;e<n;e++)i=e/n,r=this.getPoint(i),l.copy(r),p+=l.distanceTo(h),h.copy(r),a=(this.points.length-1)*i,o=Math.floor(a),o!==c&&(u[o]=p,c=o);return u[u.length]=p,{chunks:u,total:p}},this.reparametrizeByArcLength=function(t){var e,i,n,r,a,o,c,h,l=[],u=new s,p=this.getLength();for(l.push(u.copy(this.points[0]).clone()),e=1;e<this.points.length;e++){for(o=p.chunks[e]-p.chunks[e-1],c=Math.ceil(t*o/p.total),r=(e-1)/(this.points.length-1),a=e/(this.points.length-1),i=1;i<c-1;i++)n=r+i*(1/c)*(a-r),h=this.getPoint(n),l.push(u.copy(h).clone());l.push(u.copy(this.points[e]).clone())}this.points=l}}function on(t,e,i){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==i?i:0,this}function sn(t,e){ne.call(this,t,e),this.animationsMap={},this.animationsList=[];var i=this.geometry.morphTargets.length,n="__default",r=0,a=i-1,o=i/1;this.createAnimation(n,r,a,o),this.setAnimationWeight(n,1)}function cn(t){Ft.call(this),this.material=t,this.render=function(t){}}function hn(t){function e(t,e){return t-e}Vt.call(this);var i=[0,0],n={},r=["a","b","c"];if(t&&t.isGeometry){for(var a=t.vertices,o=t.faces,s=0,c=new Uint32Array(6*o.length),h=0,l=o.length;h<l;h++)for(var u=o[h],p=0;p<3;p++){i[0]=u[r[p]],i[1]=u[r[(p+1)%3]],i.sort(e);var d=i.toString();void 0===n[d]&&(c[2*s]=i[0],c[2*s+1]=i[1],n[d]=!0,s++)}for(var f=new Float32Array(2*s*3),h=0,l=s;h<l;h++)for(var p=0;p<2;p++){var m=a[c[2*h+p]],v=6*h+3*p;f[v+0]=m.x,f[v+1]=m.y,f[v+2]=m.z}this.addAttribute("position",new Mt(f,3))}else if(t&&t.isBufferGeometry)if(null!==t.index){var g=t.index.array,a=t.attributes.position,y=t.groups,s=0;0===y.length&&t.addGroup(0,g.length);for(var c=new Uint32Array(2*g.length),x=0,_=y.length;x<_;++x)for(var b=y[x],w=b.start,M=b.count,h=w,E=w+M;h<E;h+=3)for(var p=0;p<3;p++){i[0]=g[h+p],i[1]=g[h+(p+1)%3],i.sort(e);var d=i.toString();void 0===n[d]&&(c[2*s]=i[0],c[2*s+1]=i[1],n[d]=!0,s++)}for(var f=new Float32Array(2*s*3),h=0,l=s;h<l;h++)for(var p=0;p<2;p++){var v=6*h+3*p,T=c[2*h+p];f[v+0]=a.getX(T),f[v+1]=a.getY(T),f[v+2]=a.getZ(T)}this.addAttribute("position",new Mt(f,3))}else{for(var a=t.attributes.position.array,s=a.length/3,S=s/3,f=new Float32Array(2*s*3),h=0,l=S;h<l;h++)for(var p=0;p<3;p++){var v=18*h+6*p,A=9*h+3*p;f[v+0]=a[A],f[v+1]=a[A+1],f[v+2]=a[A+2];var T=9*h+3*((p+1)%3);f[v+3]=a[T],f[v+4]=a[T+1],f[v+5]=a[T+2]}this.addAttribute("position",new Mt(f,3))}}function ln(t,e){var i=void 0!==e?e:16777215;we.call(this,new hn(t.geometry),new _e({color:i})),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function un(t,e,i,n){this.object=t,this.size=void 0!==e?e:1;var r=void 0!==i?i:16711680,a=void 0!==n?n:1,o=0,s=this.object.geometry;s&&s.isGeometry?o=3*s.faces.length:s&&s.isBufferGeometry&&(o=s.attributes.normal.count);var c=new Vt,h=new Ct(2*o*3,3);c.addAttribute("position",h),we.call(this,c,new _e({color:r,linewidth:a})),this.matrixAutoUpdate=!1,this.update()}function pn(t){Ft.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1;for(var e=new Vt,i=[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],n=0,r=1,a=32;n<a;n++,r++){var o=n/a*Math.PI*2,s=r/a*Math.PI*2;i.push(Math.cos(o),Math.sin(o),1,Math.cos(s),Math.sin(s),1)}e.addAttribute("position",new Ct(i,3));var c=new _e({fog:!1});this.cone=new we(e,c),this.add(this.cone),this.update()}function dn(t){this.bones=this.getBoneList(t);for(var e=new Bt,i=0;i<this.bones.length;i++){var n=this.bones[i];n.parent&&n.parent.isBone&&(e.vertices.push(new s),e.vertices.push(new s),e.colors.push(new $(0,0,1)),e.colors.push(new $(0,1,0)))}e.dynamic=!0;var r=new _e({vertexColors:Sr,depthTest:!1,depthWrite:!1,transparent:!0});we.call(this,e,r),this.root=t,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function fn(t,e,i,n,r,a,o){Vt.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:r,thetaStart:a,thetaLength:o},t=t||50,e=Math.max(3,Math.floor(e)||8),i=Math.max(2,Math.floor(i)||6),n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI,a=void 0!==a?a:0,o=void 0!==o?o:Math.PI;for(var c=a+o,h=(e+1)*(i+1),l=new Mt(new Float32Array(3*h),3),u=new Mt(new Float32Array(3*h),3),p=new Mt(new Float32Array(2*h),2),d=0,f=[],m=new s,v=0;v<=i;v++){for(var g=[],y=v/i,x=0;x<=e;x++){var _=x/e,b=-t*Math.cos(n+_*r)*Math.sin(a+y*o),w=t*Math.cos(a+y*o),M=t*Math.sin(n+_*r)*Math.sin(a+y*o);m.set(b,w,M).normalize(),l.setXYZ(d,b,w,M),u.setXYZ(d,m.x,m.y,m.z),p.setXY(d,_,1-y),g.push(d),d++}f.push(g)}for(var E=[],v=0;v<i;v++)for(var x=0;x<e;x++){var T=f[v][x+1],S=f[v][x],A=f[v+1][x],L=f[v+1][x+1];(0!==v||a>0)&&E.push(T,S,L),(v!==i-1||c<Math.PI)&&E.push(S,A,L)}this.setIndex(new(l.count>65535?Pt:Lt)(E,1)),this.addAttribute("position",l),this.addAttribute("normal",u),this.addAttribute("uv",p),this.boundingSphere=new it(new s,t)}function mn(t,e){this.light=t,this.light.updateMatrixWorld();var i=new fn(e,4,2),n=new ie({wireframe:!0,fog:!1});n.color.copy(this.light.color).multiplyScalar(this.light.intensity),ne.call(this,i,n),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1}function vn(t,e,i,n,r,a,o){Bt.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:r,thetaStart:a,thetaLength:o},this.fromBufferGeometry(new fn(t,e,i,n,r,a,o))}function gn(t,e){Ft.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.colors=[new $,new $];var i=new vn(e,4,2);i.rotateX(-Math.PI/2);for(var n=0,r=8;n<r;n++)i.faces[n].color=this.colors[n<4?0:1];var a=new ie({vertexColors:Tr,wireframe:!0});this.lightSphere=new ne(i,a),this.add(this.lightSphere),this.update()}function yn(t,e,i,n){e=e||1,i=new $(void 0!==i?i:4473924),n=new $(void 0!==n?n:8947848);for(var r=e/2,a=2*t/e,o=[],s=[],c=0,h=0,l=-t;c<=e;c++,l+=a){o.push(-t,0,l,t,0,l),o.push(l,0,-t,l,0,t);var u=c===r?i:n;u.toArray(s,h),h+=3,u.toArray(s,h),h+=3,u.toArray(s,h),h+=3,u.toArray(s,h),h+=3}var p=new Vt;p.addAttribute("position",new Ct(o,3)),p.addAttribute("color",new Ct(s,3));var d=new _e({vertexColors:Sr});we.call(this,p,d)}function xn(t,e,i,n){this.object=t,this.size=void 0!==e?e:1;var r=void 0!==i?i:16776960,a=void 0!==n?n:1,o=0,s=this.object.geometry;s&&s.isGeometry?o=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var c=new Vt,h=new Ct(2*o*3,3);c.addAttribute("position",h),we.call(this,c,new _e({color:r,linewidth:a})),this.matrixAutoUpdate=!1,this.update()}function _n(e,i){function n(t,e){return t-e}Vt.call(this),i=void 0!==i?i:1;var r,a=Math.cos(t.Math.DEG2RAD*i),o=[0,0],s={},c=["a","b","c"];e&&e.isBufferGeometry?(r=new Bt,r.fromBufferGeometry(e)):r=e.clone(),r.mergeVertices(),r.computeFaceNormals();for(var h=r.vertices,l=r.faces,u=0,p=l.length;u<p;u++)for(var d=l[u],f=0;f<3;f++){o[0]=d[c[f]],o[1]=d[c[(f+1)%3]],o.sort(n);var m=o.toString();void 0===s[m]?s[m]={vert1:o[0],vert2:o[1],face1:u,face2:void 0}:s[m].face2=u}var v=[];for(var m in s){var g=s[m];if(void 0===g.face2||l[g.face1].normal.dot(l[g.face2].normal)<=a){var y=h[g.vert1];v.push(y.x),v.push(y.y),v.push(y.z),y=h[g.vert2],v.push(y.x),v.push(y.y),v.push(y.z)}}this.addAttribute("position",new Mt(new Float32Array(v),3))}function bn(t,e,i){var n=void 0!==e?e:16777215;we.call(this,new _n(t.geometry,i),new _e({color:n})),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function wn(t,e){Ft.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,void 0===e&&(e=1);var i=new Vt;i.addAttribute("position",new Ct([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));var n=new _e({fog:!1});this.add(new be(i,n)),i=new Vt,i.addAttribute("position",new Ct([0,0,0,0,0,1],3)),this.add(new be(i,n)),this.update()}function Mn(t){function e(t,e,n){i(t,n),i(e,n)}function i(t,e){n.vertices.push(new s),n.colors.push(new $(e)),void 0===a[t]&&(a[t]=[]),a[t].push(n.vertices.length-1)}var n=new Bt,r=new _e({color:16777215,vertexColors:Tr}),a={},o=16755200,c=16711680,h=43775,l=16777215,u=3355443;e("n1","n2",o),e("n2","n4",o),e("n4","n3",o),e("n3","n1",o),e("f1","f2",o),e("f2","f4",o),e("f4","f3",o),e("f3","f1",o),e("n1","f1",o),e("n2","f2",o),e("n3","f3",o),e("n4","f4",o),e("p","n1",c),e("p","n2",c),e("p","n3",c),e("p","n4",c),e("u1","u2",h),e("u2","u3",h),e("u3","u1",h),e("c","t",l),e("p","c",u),e("cn1","cn2",u),e("cn3","cn4",u),e("cf1","cf2",u),e("cf3","cf4",u),we.call(this,n,r),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=a,this.update()}function En(t,e,i,n,r,a){Bt.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:r,depthSegments:a},this.fromBufferGeometry(new Kt(t,e,i,n,r,a)),this.mergeVertices()}function Tn(t,e){var i=void 0!==e?e:8947848;this.object=t,this.box=new et,ne.call(this,new En(1,1,1),new ie({color:i,wireframe:!0}))}function Sn(t,e){void 0===e&&(e=16776960);var i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),n=new Float32Array(24),r=new Vt;r.setIndex(new Mt(i,1)),r.addAttribute("position",new Mt(n,3)),we.call(this,r,new _e({color:e})),void 0!==t&&this.update(t)}function An(t,e,n,r,a,o,c,h){function l(){var t=(r+1)*(a+1);return o===!1&&(t+=(r+1)*m+r*m),t}function u(){var t=r*a*2*3;return o===!1&&(t+=r*m*3),t}function p(){var i,o,l=new s,u=new s,p=0,d=(e-t)/n;for(o=0;o<=a;o++){var m=[],v=o/a,g=v*(e-t)+t;for(i=0;i<=r;i++){var A=i/r;u.x=g*Math.sin(A*h+c),u.y=-v*n+T,u.z=g*Math.cos(A*h+c),x.setXYZ(w,u.x,u.y,u.z),l.copy(u),(0===t&&0===o||0===e&&o===a)&&(l.x=Math.sin(A*h+c),l.z=Math.cos(A*h+c)),l.setY(Math.sqrt(l.x*l.x+l.z*l.z)*d).normalize(),_.setXYZ(w,l.x,l.y,l.z),b.setXY(w,A,1-v),m.push(w),w++}E.push(m)}for(i=0;i<r;i++)for(o=0;o<a;o++){var L=E[o][i],R=E[o+1][i],P=E[o+1][i+1],C=E[o][i+1];y.setX(M,L),M++,y.setX(M,R),M++,y.setX(M,C),M++,y.setX(M,R),M++,y.setX(M,P),M++,y.setX(M,C),M++,p+=6}f.addGroup(S,p,0),S+=p}function d(n){var a,o,l,u=new i,p=new s,d=0,m=n===!0?t:e,v=n===!0?1:-1;for(o=w,a=1;a<=r;a++)x.setXYZ(w,0,T*v,0),_.setXYZ(w,0,v,0),u.x=.5,u.y=.5,b.setXY(w,u.x,u.y),w++;for(l=w,a=0;a<=r;a++){var g=a/r,E=g*h+c,A=Math.cos(E),L=Math.sin(E);p.x=m*L,p.y=T*v,p.z=m*A,x.setXYZ(w,p.x,p.y,p.z),_.setXYZ(w,0,v,0),u.x=.5*A+.5,u.y=.5*L*v+.5,b.setXY(w,u.x,u.y),w++}for(a=0;a<r;a++){var R=o+a,P=l+a;n===!0?(y.setX(M,P),M++,y.setX(M,P+1),M++,y.setX(M,R),M++):(y.setX(M,P+1),M++,y.setX(M,P),M++,y.setX(M,R),M++),d+=3}f.addGroup(S,d,n===!0?1:2),S+=d}Vt.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:a,openEnded:o,thetaStart:c,thetaLength:h};var f=this;t=void 0!==t?t:20,e=void 0!==e?e:20,n=void 0!==n?n:100,r=Math.floor(r)||8,
  a=Math.floor(a)||1,o=void 0!==o&&o,c=void 0!==c?c:0,h=void 0!==h?h:2*Math.PI;var m=0;o===!1&&(t>0&&m++,e>0&&m++);var v=l(),g=u(),y=new Mt(new(g>65535?Uint32Array:Uint16Array)(g),1),x=new Mt(new Float32Array(3*v),3),_=new Mt(new Float32Array(3*v),3),b=new Mt(new Float32Array(2*v),2),w=0,M=0,E=[],T=n/2,S=0;p(),o===!1&&(t>0&&d(!0),e>0&&d(!1)),this.setIndex(y),this.addAttribute("position",x),this.addAttribute("normal",_),this.addAttribute("uv",b)}function Ln(t,e,i,n,r,a){Ft.call(this),void 0===n&&(n=16776960),void 0===i&&(i=1),void 0===r&&(r=.2*i),void 0===a&&(a=.2*r),this.position.copy(e),this.line=new be(Gc,new _e({color:n})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new ne(Hc,new ie({color:n})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(i,r,a)}function Rn(t){t=t||1;var e=new Float32Array([0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t]),i=new Float32Array([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1]),n=new Vt;n.addAttribute("position",new Mt(e,3)),n.addAttribute("color",new Mt(i,3));var r=new _e({vertexColors:Sr});we.call(this,n,r)}function Pn(t,e,n){Bt.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:n};var r,a,o,s,c,h=this.vertices,l=this.faces,u=this.faceVertexUvs[0],p=e+1;for(r=0;r<=n;r++)for(c=r/n,a=0;a<=e;a++)s=a/e,o=t(s,c),h.push(o);var d,f,m,v,g,y,x,_;for(r=0;r<n;r++)for(a=0;a<e;a++)d=r*p+a,f=r*p+a+1,m=(r+1)*p+a+1,v=(r+1)*p+a,g=new i(a/e,r/n),y=new i((a+1)/e,r/n),x=new i((a+1)/e,(r+1)/n),_=new i(a/e,(r+1)/n),l.push(new Dt(d,f,v)),u.push([g,y,_]),l.push(new Dt(f,m,v)),u.push([y.clone(),x,_.clone()]);this.computeFaceNormals(),this.computeVertexNormals()}function Cn(t,e,n,r){function a(t){var e=t.normalize().clone();e.index=p.vertices.push(e)-1;var n=h(t)/2/Math.PI+.5,r=l(t)/Math.PI+.5;return e.uv=new i(n,1-r),e}function o(t,e,i){var n=new Dt(t.index,e.index,i.index,[t.clone(),e.clone(),i.clone()]);p.faces.push(n),b.copy(t).add(e).add(i).divideScalar(3);var r=h(b);p.faceVertexUvs[0].push([u(t.uv,t,r),u(e.uv,e,r),u(i.uv,i,r)])}function c(t,e){for(var i=Math.pow(2,e),n=a(p.vertices[t.a]),r=a(p.vertices[t.b]),s=a(p.vertices[t.c]),c=[],h=0;h<=i;h++){c[h]=[];for(var l=a(n.clone().lerp(s,h/i)),u=a(r.clone().lerp(s,h/i)),d=i-h,f=0;f<=d;f++)0===f&&h===i?c[h][f]=l:c[h][f]=a(l.clone().lerp(u,f/d))}for(var h=0;h<i;h++)for(var f=0;f<2*(i-h)-1;f++){var m=Math.floor(f/2);f%2===0?o(c[h][m+1],c[h+1][m],c[h][m]):o(c[h][m+1],c[h+1][m+1],c[h+1][m])}}function h(t){return Math.atan2(t.z,-t.x)}function l(t){return Math.atan2(-t.y,Math.sqrt(t.x*t.x+t.z*t.z))}function u(t,e,n){return n<0&&1===t.x&&(t=new i(t.x-1,t.y)),0===e.x&&0===e.z&&(t=new i(n/2/Math.PI+.5,t.y)),t.clone()}Bt.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},n=n||1,r=r||0;for(var p=this,d=0,f=t.length;d<f;d+=3)a(new s(t[d],t[d+1],t[d+2]));for(var m=this.vertices,v=[],d=0,g=0,f=e.length;d<f;d+=3,g++){var y=m[e[d]],x=m[e[d+1]],_=m[e[d+2]];v[g]=new Dt(y.index,x.index,_.index,[y.clone(),x.clone(),_.clone()])}for(var b=new s,d=0,f=v.length;d<f;d++)c(v[d],r);for(var d=0,f=this.faceVertexUvs[0].length;d<f;d++){var w=this.faceVertexUvs[0][d],M=w[0].x,E=w[1].x,T=w[2].x,S=Math.max(M,E,T),A=Math.min(M,E,T);S>.9&&A<.1&&(M<.2&&(w[0].x+=1),E<.2&&(w[1].x+=1),T<.2&&(w[2].x+=1))}for(var d=0,f=this.vertices.length;d<f;d++)this.vertices[d].multiplyScalar(n);this.mergeVertices(),this.computeFaceNormals(),this.boundingSphere=new it(new s,n)}function Un(t,e){var i=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],n=[2,1,0,0,3,2,1,3,0,2,3,1];Cn.call(this,i,n,t,e),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e}}function In(t,e){var i=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],n=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];Cn.call(this,i,n,t,e),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e}}function Dn(t,e){var i=(1+Math.sqrt(5))/2,n=[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1],r=[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];Cn.call(this,n,r,t,e),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e}}function Nn(t,e){var i=(1+Math.sqrt(5))/2,n=1/i,r=[-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,-n,-i,0,-n,i,0,n,-i,0,n,i,-n,-i,0,-n,i,0,n,-i,0,n,i,0,-i,0,-n,i,0,-n,-i,0,n,i,0,n],a=[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];Cn.call(this,r,a,t,e),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e}}function On(t,e,n,r,a,o){function c(t,e,i,n,r){var a=Math.cos(t),o=Math.sin(t),s=i/e*t,c=Math.cos(s);r.x=n*(2+c)*.5*a,r.y=n*(2+c)*o*.5,r.z=n*Math.sin(s)*.5}Vt.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:a,q:o},t=t||100,e=e||40,n=Math.floor(n)||64,r=Math.floor(r)||8,a=a||2,o=o||3;var h,l,u=(r+1)*(n+1),p=r*n*2*3,d=new Mt(new(p>65535?Uint32Array:Uint16Array)(p),1),f=new Mt(new Float32Array(3*u),3),m=new Mt(new Float32Array(3*u),3),v=new Mt(new Float32Array(2*u),2),g=0,y=0,x=new s,_=new s,b=new i,w=new s,M=new s,E=new s,T=new s,S=new s;for(h=0;h<=n;++h){var A=h/n*a*Math.PI*2;for(c(A,a,o,t,w),c(A+.01,a,o,t,M),T.subVectors(M,w),S.addVectors(M,w),E.crossVectors(T,S),S.crossVectors(E,T),E.normalize(),S.normalize(),l=0;l<=r;++l){var L=l/r*Math.PI*2,R=-e*Math.cos(L),P=e*Math.sin(L);x.x=w.x+(R*S.x+P*E.x),x.y=w.y+(R*S.y+P*E.y),x.z=w.z+(R*S.z+P*E.z),f.setXYZ(g,x.x,x.y,x.z),_.subVectors(x,w).normalize(),m.setXYZ(g,_.x,_.y,_.z),b.x=h/n,b.y=l/r,v.setXY(g,b.x,b.y),g++}}for(l=1;l<=n;l++)for(h=1;h<=r;h++){var C=(r+1)*(l-1)+(h-1),U=(r+1)*l+(h-1),I=(r+1)*l+h,D=(r+1)*(l-1)+h;d.setX(y,C),y++,d.setX(y,U),y++,d.setX(y,D),y++,d.setX(y,U),y++,d.setX(y,I),y++,d.setX(y,D),y++}this.setIndex(d),this.addAttribute("position",f),this.addAttribute("normal",m),this.addAttribute("uv",v)}function Fn(t,e,i,n,r,a,o){Bt.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:n,p:r,q:a},void 0!==o&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new On(t,e,i,n,r,a)),this.mergeVertices()}function zn(t,e,i,n,r){Vt.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:i,tubularSegments:n,arc:r},t=t||100,e=e||40,i=Math.floor(i)||8,n=Math.floor(n)||6,r=r||2*Math.PI;var a,o,c=(i+1)*(n+1),h=i*n*2*3,l=new(h>65535?Uint32Array:Uint16Array)(h),u=new Float32Array(3*c),p=new Float32Array(3*c),d=new Float32Array(2*c),f=0,m=0,v=0,g=new s,y=new s,x=new s;for(a=0;a<=i;a++)for(o=0;o<=n;o++){var _=o/n*r,b=a/i*Math.PI*2;y.x=(t+e*Math.cos(b))*Math.cos(_),y.y=(t+e*Math.cos(b))*Math.sin(_),y.z=e*Math.sin(b),u[f]=y.x,u[f+1]=y.y,u[f+2]=y.z,g.x=t*Math.cos(_),g.y=t*Math.sin(_),x.subVectors(y,g).normalize(),p[f]=x.x,p[f+1]=x.y,p[f+2]=x.z,d[m]=o/n,d[m+1]=a/i,f+=3,m+=2}for(a=1;a<=i;a++)for(o=1;o<=n;o++){var w=(n+1)*a+o-1,M=(n+1)*(a-1)+o-1,E=(n+1)*(a-1)+o,T=(n+1)*a+o;l[v]=w,l[v+1]=M,l[v+2]=T,l[v+3]=M,l[v+4]=E,l[v+5]=T,v+=6}this.setIndex(new Mt(l,1)),this.addAttribute("position",new Mt(u,3)),this.addAttribute("normal",new Mt(p,3)),this.addAttribute("uv",new Mt(d,2))}function Bn(t,e,i,n,r){Bt.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:i,tubularSegments:n,arc:r},this.fromBufferGeometry(new zn(t,e,i,n,r))}function Gn(t,e){e=e||{};var i=e.font;if((i&&i.isFont)===!1)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Bt;var n=i.generateShapes(t,e.size,e.curveSegments);e.amount=void 0!==e.height?e.height:50,void 0===e.bevelThickness&&(e.bevelThickness=10),void 0===e.bevelSize&&(e.bevelSize=8),void 0===e.bevelEnabled&&(e.bevelEnabled=!1),Li.call(this,n,e),this.type="TextGeometry"}function Hn(t,e,n,r,a,o){Vt.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:a,thetaLength:o},t=t||20,e=e||50,a=void 0!==a?a:0,o=void 0!==o?o:2*Math.PI,n=void 0!==n?Math.max(3,n):8,r=void 0!==r?Math.max(1,r):1;var c,h,l,u=(n+1)*(r+1),p=n*r*2*3,d=new Mt(new(p>65535?Uint32Array:Uint16Array)(p),1),f=new Mt(new Float32Array(3*u),3),m=new Mt(new Float32Array(3*u),3),v=new Mt(new Float32Array(2*u),2),g=0,y=0,x=t,_=(e-t)/r,b=new s,w=new i;for(h=0;h<=r;h++){for(l=0;l<=n;l++)c=a+l/n*o,b.x=x*Math.cos(c),b.y=x*Math.sin(c),f.setXYZ(g,b.x,b.y,b.z),m.setXYZ(g,0,0,1),w.x=(b.x/e+1)/2,w.y=(b.y/e+1)/2,v.setXY(g,w.x,w.y),g++;x+=_}for(h=0;h<r;h++){var M=h*(n+1);for(l=0;l<n;l++){c=l+M;var E=c,T=c+n+1,S=c+n+2,A=c+1;d.setX(y,E),y++,d.setX(y,T),y++,d.setX(y,S),y++,d.setX(y,E),y++,d.setX(y,S),y++,d.setX(y,A),y++}}this.setIndex(d),this.addAttribute("position",f),this.addAttribute("normal",m),this.addAttribute("uv",v)}function Vn(t,e,i,n,r,a){Bt.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:r,thetaLength:a},this.fromBufferGeometry(new Hn(t,e,i,n,r,a))}function kn(t,e,i,n){Bt.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:n},this.fromBufferGeometry(new re(t,e,i,n))}function jn(e,n,r,a){Vt.call(this),this.type="LatheBufferGeometry",this.parameters={points:e,segments:n,phiStart:r,phiLength:a},n=Math.floor(n)||12,r=r||0,a=a||2*Math.PI,a=t.Math.clamp(a,0,2*Math.PI);var o,c,h,l=(n+1)*e.length,u=n*e.length*2*3,p=new Mt(new(u>65535?Uint32Array:Uint16Array)(u),1),d=new Mt(new Float32Array(3*l),3),f=new Mt(new Float32Array(2*l),2),m=0,v=0,g=1/n,y=new s,x=new i;for(c=0;c<=n;c++){var _=r+c*g*a,b=Math.sin(_),w=Math.cos(_);for(h=0;h<=e.length-1;h++)y.x=e[h].x*b,y.y=e[h].y,y.z=e[h].x*w,d.setXYZ(m,y.x,y.y,y.z),x.x=c/n,x.y=h/(e.length-1),f.setXY(m,x.x,x.y),m++}for(c=0;c<n;c++)for(h=0;h<e.length-1;h++){o=h+c*e.length;var M=o,E=o+e.length,T=o+e.length+1,S=o+1;p.setX(v,M),v++,p.setX(v,E),v++,p.setX(v,S),v++,p.setX(v,E),v++,p.setX(v,T),v++,p.setX(v,S),v++}if(this.setIndex(p),this.addAttribute("position",d),this.addAttribute("uv",f),this.computeVertexNormals(),a===2*Math.PI){var A=this.attributes.normal.array,L=new s,R=new s,P=new s;for(o=n*e.length*3,c=0,h=0;c<e.length;c++,h+=3)L.x=A[h+0],L.y=A[h+1],L.z=A[h+2],R.x=A[o+h+0],R.y=A[o+h+1],R.z=A[o+h+2],P.addVectors(L,R).normalize(),A[h+0]=A[o+h+0]=P.x,A[h+1]=A[o+h+1]=P.y,A[h+2]=A[o+h+2]=P.z}}function Wn(t,e,i,n){Bt.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:i,phiLength:n},this.fromBufferGeometry(new jn(t,e,i,n)),this.mergeVertices()}function Xn(t,e,i,n,r,a,o,s){Bt.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:r,openEnded:a,thetaStart:o,thetaLength:s},this.fromBufferGeometry(new An(t,e,i,n,r,a,o,s)),this.mergeVertices()}function Yn(t,e,i,n,r,a,o){Xn.call(this,0,t,e,i,n,r,a,o),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,openEnded:r,thetaStart:a,thetaLength:o}}function qn(t,e,i,n,r,a,o){An.call(this,0,t,e,i,n,r,a,o),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,thetaStart:a,thetaLength:o}}function Zn(t,e,i,n){Vt.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:n},t=t||50,e=void 0!==e?Math.max(3,e):8,i=void 0!==i?i:0,n=void 0!==n?n:2*Math.PI;var r=e+2,a=new Float32Array(3*r),o=new Float32Array(3*r),c=new Float32Array(2*r);o[2]=1,c[0]=.5,c[1]=.5;for(var h=0,l=3,u=2;h<=e;h++,l+=3,u+=2){var p=i+h/e*n;a[l]=t*Math.cos(p),a[l+1]=t*Math.sin(p),o[l+2]=1,c[u]=(a[l]/t+1)/2,c[u+1]=(a[l+1]/t+1)/2}for(var d=[],l=1;l<=e;l++)d.push(l,l+1,0);this.setIndex(new Mt(new Uint16Array(d),1)),this.addAttribute("position",new Mt(a,3)),this.addAttribute("normal",new Mt(o,3)),this.addAttribute("uv",new Mt(c,2)),this.boundingSphere=new it(new s,t)}function Jn(t,e,i,n){Bt.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:n},this.fromBufferGeometry(new Zn(t,e,i,n))}function Qn(e){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Please use THREE.CatmullRomCurve3."),t.CatmullRomCurve3.call(this,e),this.type="catmullrom",this.closed=!0}function Kn(t,e,i,n,r,a){Mi.call(this,t,e,i,i,n,r,a)}function $n(t,e,i,n,r,a,o){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new Dt(t,e,i,r,a,o)}function tr(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new Ee(t,e)}function er(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new Ee(t,e)}function ir(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Me(t)}function nr(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Me(t)}function rr(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Me(t)}function ar(t,e,i){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new s(t,e,i)}function or(){console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js."),this.projectVector=function(t,e){console.warn("THREE.Projector: .projectVector() is now vector.project()."),t.project(e)},this.unprojectVector=function(t,e){console.warn("THREE.Projector: .unprojectVector() is now vector.unproject()."),t.unproject(e)},this.pickingRay=function(t,e){console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")}}function sr(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"),this.domElement=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),this.clear=function(){},this.render=function(){},this.setClearColor=function(){},this.setSize=function(){}}void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),void 0===Function.prototype.name&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*(\S*)\s*\(/)[1]}}),void 0===Object.assign&&!function(){Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(void 0!==n&&null!==n)for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}}(),Object.assign(e.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var i=this._listeners;void 0===i[t]&&(i[t]=[]),i[t].indexOf(e)===-1&&i[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var i=this._listeners;return void 0!==i[t]&&i[t].indexOf(e)!==-1},removeEventListener:function(t,e){if(void 0!==this._listeners){var i=this._listeners,n=i[t];if(void 0!==n){var r=n.indexOf(e);r!==-1&&n.splice(r,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners,i=e[t.type];if(void 0!==i){t.target=this;var n=[],r=0,a=i.length;for(r=0;r<a;r++)n[r]=i[r];for(r=0;r<a;r++)n[r].call(this,t)}}}});var cr="80",hr={LEFT:0,MIDDLE:1,RIGHT:2},lr=0,ur=1,pr=2,dr=3,fr=0,mr=1,vr=0,gr=1,yr=2,xr=0,_r=1,br=2,wr=1,Mr=2,Er=0,Tr=1,Sr=2,Ar=0,Lr=1,Rr=2,Pr=3,Cr=4,Ur=5,Ir=100,Dr=101,Nr=102,Or=103,Fr=104,zr=200,Br=201,Gr=202,Hr=203,Vr=204,kr=205,jr=206,Wr=207,Xr=208,Yr=209,qr=210,Zr=0,Jr=1,Qr=2,Kr=3,$r=4,ta=5,ea=6,ia=7,na=0,ra=1,aa=2,oa=0,sa=1,ca=2,ha=3,la=4,ua=300,pa=301,da=302,fa=303,ma=304,va=305,ga=306,ya=307,xa=1e3,_a=1001,ba=1002,wa=1003,Ma=1004,Ea=1005,Ta=1006,Sa=1007,Aa=1008,La=1009,Ra=1010,Pa=1011,Ca=1012,Ua=1013,Ia=1014,Da=1015,Na=1016,Oa=1017,Fa=1018,za=1019,Ba=1020,Ga=1021,Ha=1022,Va=1023,ka=1024,ja=1025,Wa=Va,Xa=1026,Ya=1027,qa=2001,Za=2002,Ja=2003,Qa=2004,Ka=2100,$a=2101,to=2102,eo=2103,io=2151,no=2200,ro=2201,ao=2202,oo=2300,so=2301,co=2302,ho=2400,lo=2401,uo=2402,po=0,fo=1,mo=2,vo=3e3,go=3001,yo=3007,xo=3002,_o=3003,bo=3004,wo=3005,Mo=3006,Eo=3200,To=3201;t.Math={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var t,e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),i=new Array(36),n=0;return function(){for(var r=0;r<36;r++)8===r||13===r||18===r||23===r?i[r]="-":14===r?i[r]="4":(n<=2&&(n=33554432+16777216*Math.random()|0),t=15&n,n>>=4,i[r]=e[19===r?3&t|8:t]);return i.join("")}}(),clamp:function(t,e,i){return Math.max(e,Math.min(i,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,i,n,r){return n+(t-e)*(r-n)/(i-e)},smoothstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e),t*t*(3-2*t))},smootherstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e),t*t*t*(t*(6*t-15)+10))},random16:function(){return console.warn("THREE.Math.random16() has been deprecated. Use Math.random() instead."),Math.random()},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},degToRad:function(e){return e*t.Math.DEG2RAD},radToDeg:function(e){return e*t.Math.RAD2DEG},isPowerOfTwo:function(t){return 0===(t&t-1)&&0!==t},nearestPowerOfTwo:function(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))},nextPowerOfTwo:function(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t}},i.prototype={constructor:i,isVector2:!0,get width(){return this.x},set width(t){this.x=t},get height(){return this.y},set height(t){this.y=t},set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(t){return this.x=t.x,this.y=t.y,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)},subScalar:function(t){return this.x-=t,this.y-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},multiplyScalar:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:function(){var t,e;return function(n,r){return void 0===t&&(t=new i,e=new i),t.set(n,n),e.set(r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var i=this.length();return this.multiplyScalar(Math.max(t,Math.min(e,i))/i)},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(t){return this.x*t.x+this.y*t.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length())},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,i=this.y-t.y;return e*e+i*i},distanceToManhattan:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.multiplyScalar(t/this.length())},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,i){return this.subVectors(e,t).multiplyScalar(i).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t},fromAttribute:function(t,e,i){return void 0===i&&(i=0),e=e*t.itemSize+i,this.x=t.array[e],this.y=t.array[e+1],this},rotateAround:function(t,e){var i=Math.cos(e),n=Math.sin(e),r=this.x-t.x,a=this.y-t.y;return this.x=r*i-a*n+t.x,this.y=r*n+a*i+t.y,this}},n.DEFAULT_IMAGE=void 0,n.DEFAULT_MAPPING=ua,n.prototype={constructor:n,isTexture:!0,set needsUpdate(t){t===!0&&this.version++},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(e){function i(t){var e;return void 0!==t.toDataURL?e=t:(e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),e.width=t.width,e.height=t.height,e.getContext("2d").drawImage(t,0,0,t.width,t.height)),e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}if(void 0!==e.textures[this.uuid])return e.textures[this.uuid];var n={metadata:{version:4.4,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],wrap:[this.wrapS,this.wrapT],minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var r=this.image;void 0===r.uuid&&(r.uuid=t.Math.generateUUID()),void 0===e.images[r.uuid]&&(e.images[r.uuid]={uuid:r.uuid,url:i(r)}),n.image=r.uuid}return e.textures[this.uuid]=n,n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping===ua){if(t.multiply(this.repeat),t.add(this.offset),t.x<0||t.x>1)switch(this.wrapS){case xa:t.x=t.x-Math.floor(t.x);break;case _a:t.x=t.x<0?0:1;break;case ba:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case xa:t.y=t.y-Math.floor(t.y);break;case _a:t.y=t.y<0?0:1;break;case ba:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}},Object.assign(n.prototype,e.prototype);var So=0;a.prototype={constructor:a,isMatrix4:!0,set:function(t,e,i,n,r,a,o,s,c,h,l,u,p,d,f,m){var v=this.elements;return v[0]=t,v[4]=e,v[8]=i,v[12]=n,v[1]=r,v[5]=a,v[9]=o,v[13]=s,v[2]=c,v[6]=h,v[10]=l,v[14]=u,v[3]=p,v[7]=d,v[11]=f,v[15]=m,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new a).fromArray(this.elements)},copy:function(t){return this.elements.set(t.elements),this},copyPosition:function(t){var e=this.elements,i=t.elements;return e[12]=i[12],e[13]=i[13],e[14]=i[14],this},extractBasis:function(t,e,i){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,i){return this.set(t.x,e.x,i.x,0,t.y,e.y,i.y,0,t.z,e.z,i.z,0,0,0,0,1),this},extractRotation:function(){var t;return function(e){void 0===t&&(t=new s);var i=this.elements,n=e.elements,r=1/t.setFromMatrixColumn(e,0).length(),a=1/t.setFromMatrixColumn(e,1).length(),o=1/t.setFromMatrixColumn(e,2).length();return i[0]=n[0]*r,i[1]=n[1]*r,i[2]=n[2]*r,i[4]=n[4]*a,i[5]=n[5]*a,i[6]=n[6]*a,i[8]=n[8]*o,i[9]=n[9]*o,i[10]=n[10]*o,this}}(),makeRotationFromEuler:function(t){(t&&t.isEuler)===!1&&console.error("THREE.Matrix: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,i=t.x,n=t.y,r=t.z,a=Math.cos(i),o=Math.sin(i),s=Math.cos(n),c=Math.sin(n),h=Math.cos(r),l=Math.sin(r);if("XYZ"===t.order){var u=a*h,p=a*l,d=o*h,f=o*l;e[0]=s*h,e[4]=-s*l,e[8]=c,e[1]=p+d*c,e[5]=u-f*c,e[9]=-o*s,e[2]=f-u*c,e[6]=d+p*c,e[10]=a*s}else if("YXZ"===t.order){var m=s*h,v=s*l,g=c*h,y=c*l;e[0]=m+y*o,e[4]=g*o-v,e[8]=a*c,e[1]=a*l,e[5]=a*h,e[9]=-o,e[2]=v*o-g,e[6]=y+m*o,e[10]=a*s}else if("ZXY"===t.order){var m=s*h,v=s*l,g=c*h,y=c*l;e[0]=m-y*o,e[4]=-a*l,e[8]=g+v*o,e[1]=v+g*o,e[5]=a*h,e[9]=y-m*o,e[2]=-a*c,e[6]=o,e[10]=a*s}else if("ZYX"===t.order){var u=a*h,p=a*l,d=o*h,f=o*l;e[0]=s*h,e[4]=d*c-p,e[8]=u*c+f,e[1]=s*l,e[5]=f*c+u,e[9]=p*c-d,e[2]=-c,e[6]=o*s,e[10]=a*s}else if("YZX"===t.order){var x=a*s,_=a*c,b=o*s,w=o*c;e[0]=s*h,e[4]=w-x*l,e[8]=b*l+_,e[1]=l,e[5]=a*h,e[9]=-o*h,e[2]=-c*h,e[6]=_*l+b,e[10]=x-w*l}else if("XZY"===t.order){var x=a*s,_=a*c,b=o*s,w=o*c;e[0]=s*h,e[4]=-l,e[8]=c*h,e[1]=x*l+w,e[5]=a*h,e[9]=_*l-b,e[2]=b*l-_,e[6]=o*h,e[10]=w*l+x}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(t){var e=this.elements,i=t.x,n=t.y,r=t.z,a=t.w,o=i+i,s=n+n,c=r+r,h=i*o,l=i*s,u=i*c,p=n*s,d=n*c,f=r*c,m=a*o,v=a*s,g=a*c;return e[0]=1-(p+f),e[4]=l-g,e[8]=u+v,e[1]=l+g,e[5]=1-(h+f),e[9]=d-m,e[2]=u-v,e[6]=d+m,e[10]=1-(h+p),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:function(){var t,e,i;return function(n,r,a){void 0===t&&(t=new s,e=new s,i=new s);var o=this.elements;return i.subVectors(n,r).normalize(),0===i.lengthSq()&&(i.z=1),t.crossVectors(a,i).normalize(),0===t.lengthSq()&&(i.z+=1e-4,t.crossVectors(a,i).normalize()),e.crossVectors(i,t),o[0]=t.x,o[4]=e.x,o[8]=i.x,o[1]=t.y,o[5]=e.y,o[9]=i.y,o[2]=t.z,o[6]=e.z,o[10]=i.z,this}}(),multiply:function(t,e){return void 0!==e?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.elements,n=e.elements,r=this.elements,a=i[0],o=i[4],s=i[8],c=i[12],h=i[1],l=i[5],u=i[9],p=i[13],d=i[2],f=i[6],m=i[10],v=i[14],g=i[3],y=i[7],x=i[11],_=i[15],b=n[0],w=n[4],M=n[8],E=n[12],T=n[1],S=n[5],A=n[9],L=n[13],R=n[2],P=n[6],C=n[10],U=n[14],I=n[3],D=n[7],N=n[11],O=n[15];return r[0]=a*b+o*T+s*R+c*I,r[4]=a*w+o*S+s*P+c*D,r[8]=a*M+o*A+s*C+c*N,r[12]=a*E+o*L+s*U+c*O,r[1]=h*b+l*T+u*R+p*I,r[5]=h*w+l*S+u*P+p*D,r[9]=h*M+l*A+u*C+p*N,r[13]=h*E+l*L+u*U+p*O,r[2]=d*b+f*T+m*R+v*I,r[6]=d*w+f*S+m*P+v*D,r[10]=d*M+f*A+m*C+v*N,r[14]=d*E+f*L+m*U+v*O,r[3]=g*b+y*T+x*R+_*I,r[7]=g*w+y*S+x*P+_*D,r[11]=g*M+y*A+x*C+_*N,r[15]=g*E+y*L+x*U+_*O,this},multiplyToArray:function(t,e,i){var n=this.elements;return this.multiplyMatrices(t,e),i[0]=n[0],i[1]=n[1],i[2]=n[2],i[3]=n[3],i[4]=n[4],i[5]=n[5],i[6]=n[6],i[7]=n[7],i[8]=n[8],i[9]=n[9],i[10]=n[10],i[11]=n[11],i[12]=n[12],i[13]=n[13],i[14]=n[14],i[15]=n[15],this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this},applyToVector3Array:function(){var t;return function(e,i,n){void 0===t&&(t=new s),void 0===i&&(i=0),void 0===n&&(n=e.length);for(var r=0,a=i;r<n;r+=3,a+=3)t.fromArray(e,a),t.applyMatrix4(this),t.toArray(e,a);return e}}(),applyToBuffer:function(){var t;return function(e,i,n){void 0===t&&(t=new s),void 0===i&&(i=0),void 0===n&&(n=e.length/e.itemSize);for(var r=0,a=i;r<n;r++,a++)t.x=e.getX(a),t.y=e.getY(a),t.z=e.getZ(a),t.applyMatrix4(this),e.setXYZ(t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],i=t[4],n=t[8],r=t[12],a=t[1],o=t[5],s=t[9],c=t[13],h=t[2],l=t[6],u=t[10],p=t[14],d=t[3],f=t[7],m=t[11],v=t[15];return d*(+r*s*l-n*c*l-r*o*u+i*c*u+n*o*p-i*s*p)+f*(+e*s*p-e*c*u+r*a*u-n*a*p+n*c*h-r*s*h)+m*(+e*c*l-e*o*p-r*a*l+i*a*p+r*o*h-i*c*h)+v*(-n*o*h-e*s*l+e*o*u+n*a*l-i*a*u+i*s*h)},transpose:function(){var t,e=this.elements;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset is deprecated - just use .toArray instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return void 0===t&&(t=new s),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setPosition:function(t){var e=this.elements;return e[12]=t.x,e[13]=t.y,e[14]=t.z,this},getInverse:function(t,e){var i=this.elements,n=t.elements,r=n[0],a=n[1],o=n[2],s=n[3],c=n[4],h=n[5],l=n[6],u=n[7],p=n[8],d=n[9],f=n[10],m=n[11],v=n[12],g=n[13],y=n[14],x=n[15],_=d*y*u-g*f*u+g*l*m-h*y*m-d*l*x+h*f*x,b=v*f*u-p*y*u-v*l*m+c*y*m+p*l*x-c*f*x,w=p*g*u-v*d*u+v*h*m-c*g*m-p*h*x+c*d*x,M=v*d*l-p*g*l-v*h*f+c*g*f+p*h*y-c*d*y,E=r*_+a*b+o*w+s*M;if(0===E){var T="THREE.Matrix4.getInverse(): can't invert matrix, determinant is 0";if(e===!0)throw new Error(T);return console.warn(T),this.identity()}var S=1/E;return i[0]=_*S,i[1]=(g*f*s-d*y*s-g*o*m+a*y*m+d*o*x-a*f*x)*S,i[2]=(h*y*s-g*l*s+g*o*u-a*y*u-h*o*x+a*l*x)*S,i[3]=(d*l*s-h*f*s-d*o*u+a*f*u+h*o*m-a*l*m)*S,i[4]=b*S,i[5]=(p*y*s-v*f*s+v*o*m-r*y*m-p*o*x+r*f*x)*S,i[6]=(v*l*s-c*y*s-v*o*u+r*y*u+c*o*x-r*l*x)*S,i[7]=(c*f*s-p*l*s+p*o*u-r*f*u-c*o*m+r*l*m)*S,i[8]=w*S,i[9]=(v*d*s-p*g*s-v*a*m+r*g*m+p*a*x-r*d*x)*S,i[10]=(c*g*s-v*h*s+v*a*u-r*g*u-c*a*x+r*h*x)*S,i[11]=(p*h*s-c*d*s-p*a*u+r*d*u+c*a*m-r*h*m)*S,i[12]=M*S,i[13]=(p*g*o-v*d*o+v*a*f-r*g*f-p*a*y+r*d*y)*S,i[14]=(v*h*o-c*g*o-v*a*l+r*g*l+c*a*y-r*h*y)*S,i[15]=(c*d*o-p*h*o+p*a*l-r*d*l-c*a*f+r*h*f)*S,this},scale:function(t){var e=this.elements,i=t.x,n=t.y,r=t.z;return e[0]*=i,e[4]*=n,e[8]*=r,e[1]*=i,e[5]*=n,e[9]*=r,e[2]*=i,e[6]*=n,e[10]*=r,e[3]*=i,e[7]*=n,e[11]*=r,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],n=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,i,n))},makeTranslation:function(t,e,i){return this.set(1,0,0,t,0,1,0,e,0,0,1,i,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(1,0,0,0,0,e,-i,0,0,i,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e,0,i,0,0,1,0,0,-i,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),r=1-i,a=t.x,o=t.y,s=t.z,c=r*a,h=r*o;return this.set(c*a+i,c*o-n*s,c*s+n*o,0,c*o+n*s,h*o+i,h*s-n*a,0,c*s-n*o,h*s+n*a,r*s*s+i,0,0,0,0,1),this},makeScale:function(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this},compose:function(t,e,i){return this.makeRotationFromQuaternion(e),this.scale(i),this.setPosition(t),this},decompose:function(){var t,e;return function(i,n,r){void 0===t&&(t=new s,e=new a);var o=this.elements,c=t.set(o[0],o[1],o[2]).length(),h=t.set(o[4],o[5],o[6]).length(),l=t.set(o[8],o[9],o[10]).length(),u=this.determinant();
  u<0&&(c=-c),i.x=o[12],i.y=o[13],i.z=o[14],e.elements.set(this.elements);var p=1/c,d=1/h,f=1/l;return e.elements[0]*=p,e.elements[1]*=p,e.elements[2]*=p,e.elements[4]*=d,e.elements[5]*=d,e.elements[6]*=d,e.elements[8]*=f,e.elements[9]*=f,e.elements[10]*=f,n.setFromRotationMatrix(e),r.x=c,r.y=h,r.z=l,this}}(),makeFrustum:function(t,e,i,n,r,a){var o=this.elements,s=2*r/(e-t),c=2*r/(n-i),h=(e+t)/(e-t),l=(n+i)/(n-i),u=-(a+r)/(a-r),p=-2*a*r/(a-r);return o[0]=s,o[4]=0,o[8]=h,o[12]=0,o[1]=0,o[5]=c,o[9]=l,o[13]=0,o[2]=0,o[6]=0,o[10]=u,o[14]=p,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this},makePerspective:function(e,i,n,r){var a=n*Math.tan(t.Math.DEG2RAD*e*.5),o=-a,s=o*i,c=a*i;return this.makeFrustum(s,c,o,a,n,r)},makeOrthographic:function(t,e,i,n,r,a){var o=this.elements,s=1/(e-t),c=1/(i-n),h=1/(a-r),l=(e+t)*s,u=(i+n)*c,p=(a+r)*h;return o[0]=2*s,o[4]=0,o[8]=0,o[12]=-l,o[1]=0,o[5]=2*c,o[9]=0,o[13]=-u,o[2]=0,o[6]=0,o[10]=-2*h,o[14]=-p,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this},equals:function(t){for(var e=this.elements,i=t.elements,n=0;n<16;n++)if(e[n]!==i[n])return!1;return!0},fromArray:function(t){return this.elements.set(t),this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t}},o.prototype={constructor:o,get x(){return this._x},set x(t){this._x=t,this.onChangeCallback()},get y(){return this._y},set y(t){this._y=t,this.onChangeCallback()},get z(){return this._z},set z(t){this._z=t,this.onChangeCallback()},get w(){return this._w},set w(t){this._w=t,this.onChangeCallback()},set:function(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._w=n,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this.onChangeCallback(),this},setFromEuler:function(t,e){if((t&&t.isEuler)===!1)throw new Error("THREE.Quaternion: .setFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var i=Math.cos(t._x/2),n=Math.cos(t._y/2),r=Math.cos(t._z/2),a=Math.sin(t._x/2),o=Math.sin(t._y/2),s=Math.sin(t._z/2),c=t.order;return"XYZ"===c?(this._x=a*n*r+i*o*s,this._y=i*o*r-a*n*s,this._z=i*n*s+a*o*r,this._w=i*n*r-a*o*s):"YXZ"===c?(this._x=a*n*r+i*o*s,this._y=i*o*r-a*n*s,this._z=i*n*s-a*o*r,this._w=i*n*r+a*o*s):"ZXY"===c?(this._x=a*n*r-i*o*s,this._y=i*o*r+a*n*s,this._z=i*n*s+a*o*r,this._w=i*n*r-a*o*s):"ZYX"===c?(this._x=a*n*r-i*o*s,this._y=i*o*r+a*n*s,this._z=i*n*s-a*o*r,this._w=i*n*r+a*o*s):"YZX"===c?(this._x=a*n*r+i*o*s,this._y=i*o*r+a*n*s,this._z=i*n*s-a*o*r,this._w=i*n*r-a*o*s):"XZY"===c&&(this._x=a*n*r-i*o*s,this._y=i*o*r-a*n*s,this._z=i*n*s+a*o*r,this._w=i*n*r+a*o*s),e!==!1&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var i=e/2,n=Math.sin(i);return this._x=t.x*n,this._y=t.y*n,this._z=t.z*n,this._w=Math.cos(i),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,i=t.elements,n=i[0],r=i[4],a=i[8],o=i[1],s=i[5],c=i[9],h=i[2],l=i[6],u=i[10],p=n+s+u;return p>0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(l-c)*e,this._y=(a-h)*e,this._z=(o-r)*e):n>s&&n>u?(e=2*Math.sqrt(1+n-s-u),this._w=(l-c)/e,this._x=.25*e,this._y=(r+o)/e,this._z=(a+h)/e):s>u?(e=2*Math.sqrt(1+s-n-u),this._w=(a-h)/e,this._x=(r+o)/e,this._y=.25*e,this._z=(c+l)/e):(e=2*Math.sqrt(1+u-n-s),this._w=(o-r)/e,this._x=(a+h)/e,this._y=(c+l)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e,i=1e-6;return function(n,r){return void 0===t&&(t=new s),e=n.dot(r)+1,e<i?(e=0,Math.abs(n.x)>Math.abs(n.z)?t.set(-n.y,n.x,0):t.set(0,-n.z,n.y)):t.crossVectors(n,r),this._x=t.x,this._y=t.y,this._z=t.z,this._w=e,this.normalize()}}(),inverse:function(){return this.conjugate().normalize()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this.onChangeCallback(),this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var i=t._x,n=t._y,r=t._z,a=t._w,o=e._x,s=e._y,c=e._z,h=e._w;return this._x=i*h+a*o+n*c-r*s,this._y=n*h+a*s+r*o-i*c,this._z=r*h+a*c+i*s-n*o,this._w=a*h-i*o-n*s-r*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var i=this._x,n=this._y,r=this._z,a=this._w,o=a*t._w+i*t._x+n*t._y+r*t._z;if(o<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,o=-o):this.copy(t),o>=1)return this._w=a,this._x=i,this._y=n,this._z=r,this;var s=Math.sqrt(1-o*o);if(Math.abs(s)<.001)return this._w=.5*(a+this._w),this._x=.5*(i+this._x),this._y=.5*(n+this._y),this._z=.5*(r+this._z),this;var c=Math.atan2(s,o),h=Math.sin((1-e)*c)/s,l=Math.sin(e*c)/s;return this._w=a*h+this._w*l,this._x=i*h+this._x*l,this._y=n*h+this._y*l,this._z=r*h+this._z*l,this.onChangeCallback(),this},equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w},fromArray:function(t,e){return void 0===e&&(e=0),this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}},Object.assign(o,{slerp:function(t,e,i,n){return i.copy(t).slerp(e,n)},slerpFlat:function(t,e,i,n,r,a,o){var s=i[n+0],c=i[n+1],h=i[n+2],l=i[n+3],u=r[a+0],p=r[a+1],d=r[a+2],f=r[a+3];if(l!==f||s!==u||c!==p||h!==d){var m=1-o,v=s*u+c*p+h*d+l*f,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var x=Math.sqrt(y),_=Math.atan2(x,v*g);m=Math.sin(m*_)/x,o=Math.sin(o*_)/x}var b=o*g;if(s=s*m+u*b,c=c*m+p*b,h=h*m+d*b,l=l*m+f*b,m===1-o){var w=1/Math.sqrt(s*s+c*c+h*h+l*l);s*=w,c*=w,h*=w,l*=w}}t[e]=s,t[e+1]=c,t[e+2]=h,t[e+3]=l}}),s.prototype={constructor:s,isVector3:!0,set:function(t,e,i){return this.x=t,this.y=e,this.z=i,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)},multiplyScalar:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},multiplyVectors:function(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this},applyEuler:function(){var t;return function(e){return(e&&e.isEuler)===!1&&console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),void 0===t&&(t=new o),this.applyQuaternion(t.setFromEuler(e))}}(),applyAxisAngle:function(){var t;return function(e,i){return void 0===t&&(t=new o),this.applyQuaternion(t.setFromAxisAngle(e,i))}}(),applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z,r=t.elements;return this.x=r[0]*e+r[3]*i+r[6]*n,this.y=r[1]*e+r[4]*i+r[7]*n,this.z=r[2]*e+r[5]*i+r[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,r=t.elements;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12],this.y=r[1]*e+r[5]*i+r[9]*n+r[13],this.z=r[2]*e+r[6]*i+r[10]*n+r[14],this},applyProjection:function(t){var e=this.x,i=this.y,n=this.z,r=t.elements,a=1/(r[3]*e+r[7]*i+r[11]*n+r[15]);return this.x=(r[0]*e+r[4]*i+r[8]*n+r[12])*a,this.y=(r[1]*e+r[5]*i+r[9]*n+r[13])*a,this.z=(r[2]*e+r[6]*i+r[10]*n+r[14])*a,this},applyQuaternion:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,a=t.y,o=t.z,s=t.w,c=s*e+a*n-o*i,h=s*i+o*e-r*n,l=s*n+r*i-a*e,u=-r*e-a*i-o*n;return this.x=c*s+u*-r+h*-o-l*-a,this.y=h*s+u*-a+l*-r-c*-o,this.z=l*s+u*-o+c*-a-h*-r,this},project:function(){var t;return function(e){return void 0===t&&(t=new a),t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyProjection(t)}}(),unproject:function(){var t;return function(e){return void 0===t&&(t=new a),t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyProjection(t)}}(),transformDirection:function(t){var e=this.x,i=this.y,n=this.z,r=t.elements;return this.x=r[0]*e+r[4]*i+r[8]*n,this.y=r[1]*e+r[5]*i+r[9]*n,this.z=r[2]*e+r[6]*i+r[10]*n,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t,e;return function(i,n){return void 0===t&&(t=new s,e=new s),t.set(i,i,i),e.set(n,n,n),this.clamp(t,e)}}(),clampLength:function(t,e){var i=this.length();return this.multiplyScalar(Math.max(t,Math.min(e,i))/i)},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length())},setLength:function(t){return this.multiplyScalar(t/this.length())},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this},lerpVectors:function(t,e,i){return this.subVectors(e,t).multiplyScalar(i).add(t)},cross:function(t,e){if(void 0!==e)return console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e);var i=this.x,n=this.y,r=this.z;return this.x=n*t.z-r*t.y,this.y=r*t.x-i*t.z,this.z=i*t.y-n*t.x,this},crossVectors:function(t,e){var i=t.x,n=t.y,r=t.z,a=e.x,o=e.y,s=e.z;return this.x=n*s-r*o,this.y=r*a-i*s,this.z=i*o-n*a,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t;return function(e){return void 0===t&&(t=new s),t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t;return function(e){return void 0===t&&(t=new s),this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(e){var i=this.dot(e)/Math.sqrt(this.lengthSq()*e.lengthSq());return Math.acos(t.Math.clamp(i,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,i=this.y-t.y,n=this.z-t.z;return e*e+i*i+n*n},distanceToManhattan:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromMatrixPosition:function(t){return this.setFromMatrixColumn(t,3)},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),i=this.setFromMatrixColumn(t,1).length(),n=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=i,this.z=n,this},setFromMatrixColumn:function(t,e){if("number"==typeof t){console.warn("THREE.Vector3: setFromMatrixColumn now expects ( matrix, index ).");var i=t;t=e,e=i}return this.fromArray(t.elements,4*e)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t},fromAttribute:function(t,e,i){return void 0===i&&(i=0),e=e*t.itemSize+i,this.x=t.array[e],this.y=t.array[e+1],this.z=t.array[e+2],this}},h.prototype={constructor:h,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new i;return function(e,i){var n=t.copy(i).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.max),this},makeEmpty:function(){return this.min.x=this.min.y=+(1/0),this.max.x=this.max.y=-(1/0),this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},center:function(t){var e=t||new i;return e.addVectors(this.min,this.max).multiplyScalar(.5)},size:function(t){var e=t||new i;return e.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y},getParameter:function(t,e){var n=e||new i;return n.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y)},clampPoint:function(t,e){var n=e||new i;return n.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new i;return function(e){var i=t.copy(e).clamp(this.min,this.max);return i.sub(e).length()}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}},u.prototype=Object.create(n.prototype),u.prototype.constructor=u,u.prototype.isCubeTexture=!0,Object.defineProperty(u.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}});var Ao=new n,Lo=new u,Ro=[],Po=[];V.prototype.setValue=function(t,e){for(var i=this.seq,n=0,r=i.length;n!==r;++n){var a=i[n];a.setValue(t,e[a.id])}};var Co=/([\w\d_]+)(\])?(\[|\.)?/g;W.prototype.setValue=function(t,e,i){var n=this.map[e];void 0!==n&&n.setValue(t,i,this.renderer)},W.prototype.set=function(t,e,i){var n=this.map[i];void 0!==n&&n.setValue(t,e[i],this.renderer)},W.prototype.setOptional=function(t,e,i){var n=e[i];void 0!==n&&this.setValue(t,i,n)},W.upload=function(t,e,i,n){for(var r=0,a=e.length;r!==a;++r){var o=e[r],s=i[o.id];s.needsUpdate!==!1&&o.setValue(t,s.value,n)}},W.seqWithValue=function(t,e){for(var i=[],n=0,r=t.length;n!==r;++n){var a=t[n];a.id in e&&i.push(a)}return i},W.splitDynamic=function(t,e){for(var i=null,n=t.length,r=0,a=0;a!==n;++a){var o=t[a],s=e[o.id];s&&s.dynamic===!0?(null===i&&(i=[]),i.push(o)):(r<a&&(t[r]=o),++r)}return r<n&&(t.length=r),i},W.evalDynamic=function(t,e,i,n){for(var r=0,a=t.length;r!==a;++r){var o=e[t[r].id],s=o.onUpdateCallback;void 0!==s&&s.call(o,i,n)}},Y.prototype={constructor:Y,isVector4:!0,set:function(t,e,i,n){return this.x=t,this.y=e,this.z=i,this.w=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setW:function(t){return this.w=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this},multiplyScalar:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t,this.w*=t):(this.x=0,this.y=0,this.z=0,this.w=0),this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,r=this.w,a=t.elements;return this.x=a[0]*e+a[4]*i+a[8]*n+a[12]*r,this.y=a[1]*e+a[5]*i+a[9]*n+a[13]*r,this.z=a[2]*e+a[6]*i+a[10]*n+a[14]*r,this.w=a[3]*e+a[7]*i+a[11]*n+a[15]*r,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,i,n,r,a=.01,o=.1,s=t.elements,c=s[0],h=s[4],l=s[8],u=s[1],p=s[5],d=s[9],f=s[2],m=s[6],v=s[10];if(Math.abs(h-u)<a&&Math.abs(l-f)<a&&Math.abs(d-m)<a){if(Math.abs(h+u)<o&&Math.abs(l+f)<o&&Math.abs(d+m)<o&&Math.abs(c+p+v-3)<o)return this.set(1,0,0,0),this;e=Math.PI;var g=(c+1)/2,y=(p+1)/2,x=(v+1)/2,_=(h+u)/4,b=(l+f)/4,w=(d+m)/4;return g>y&&g>x?g<a?(i=0,n=.707106781,r=.707106781):(i=Math.sqrt(g),n=_/i,r=b/i):y>x?y<a?(i=.707106781,n=0,r=.707106781):(n=Math.sqrt(y),i=_/n,r=w/n):x<a?(i=.707106781,n=.707106781,r=0):(r=Math.sqrt(x),i=b/r,n=w/r),this.set(i,n,r,e),this}var M=Math.sqrt((m-d)*(m-d)+(l-f)*(l-f)+(u-h)*(u-h));return Math.abs(M)<.001&&(M=1),this.x=(m-d)/M,this.y=(l-f)/M,this.z=(u-h)/M,this.w=Math.acos((c+p+v-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(i,n){return void 0===t&&(t=new Y,e=new Y),t.set(i,i,i,i),e.set(n,n,n,n),this.clamp(t,e)}}(),floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length())},setLength:function(t){return this.multiplyScalar(t/this.length())},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this},lerpVectors:function(t,e,i){return this.subVectors(e,t).multiplyScalar(i).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t},fromAttribute:function(t,e,i){return void 0===i&&(i=0),e=e*t.itemSize+i,this.x=t.array[e],this.y=t.array[e+1],this.z=t.array[e+2],this.w=t.array[e+3],this}},Object.assign(Z.prototype,e.prototype,{isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),J.prototype={constructor:J,isMaterial:!0,get needsUpdate(){return this._needsUpdate},set needsUpdate(t){t===!0&&this.update(),this._needsUpdate=t},setValues:function(t){if(void 0!==t)for(var e in t){var i=t[e];if(void 0!==i){var n=this[e];void 0!==n?n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):"overdraw"===e?this[e]=Number(i):this[e]=i:console.warn("THREE."+this.type+": '"+e+"' is not a property of this material.")}else console.warn("THREE.Material: '"+e+"' parameter is undefined.")}},toJSON:function(t){function e(t){var e=[];for(var i in t){var n=t[i];delete n.metadata,e.push(n)}return e}var i=void 0===t;i&&(t={textures:{},images:{}});var n={metadata:{version:4.4,type:"Material",generator:"Material.toJSON"}};if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==Lr&&(n.blending=this.blending),this.shading!==Mr&&(n.shading=this.shading),this.side!==xr&&(n.side=this.side),this.vertexColors!==Er&&(n.vertexColors=this.vertexColors),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),n.skinning=this.skinning,n.morphTargets=this.morphTargets,i){var r=e(t.textures),a=e(t.images);r.length>0&&(n.textures=r),a.length>0&&(n.images=a)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.shading=t.shading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.clipShadows=t.clipShadows;var e=t.clippingPlanes,i=null;if(null!==e){var n=e.length;i=new Array(n);for(var r=0;r!==n;++r)i[r]=e[r].clone()}return this.clippingPlanes=i,this},update:function(){this.dispatchEvent({type:"update"})},dispose:function(){this.dispatchEvent({type:"dispose"})}},Object.assign(J.prototype,e.prototype);var Uo=0;t.UniformsUtils={merge:function(t){for(var e={},i=0;i<t.length;i++){var n=this.clone(t[i]);for(var r in n)e[r]=n[r]}return e},clone:function(t){var e={};for(var i in t){e[i]={};for(var n in t[i]){var r=t[i][n];r&&r.isColor||r&&r.isVector2||r&&r.isVector3||r&&r.isVector4||r&&r.isMatrix3||r&&r.isMatrix4||r&&r.isTexture?e[i][n]=r.clone():Array.isArray(r)?e[i][n]=r.slice():e[i][n]=r}}return e}},K.prototype=Object.create(J.prototype),K.prototype.constructor=K,K.prototype.isShaderMaterial=!0,K.prototype.copy=function(e){return J.prototype.copy.call(this,e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=t.UniformsUtils.clone(e.uniforms),this.defines=e.defines,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.lights=e.lights,this.clipping=e.clipping,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.extensions=e.extensions,this},K.prototype.toJSON=function(t){var e=J.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e};var Io="#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif\n",Do="#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif\n",No="#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif\n",Oo="#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif\n",Fo="#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",zo="\nvec3 transformed = vec3( position );\n",Bo="\nvec3 objectNormal = vec3( normal );\n",Go="bool testLightInRange( const in float lightDistance, const in float cutoffDistance ) {\n\treturn any( bvec2( cutoffDistance == 0.0, lightDistance < cutoffDistance ) );\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t\tif( decayExponent > 0.0 ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\t\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t\treturn distanceFalloff * maxDistanceCutoffFactor;\n#else\n\t\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n#endif\n\t\t}\n\t\treturn 1.0;\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n\treturn specularColor * AB.x + AB.y;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n",Ho="#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = dFdx( surf_pos );\n\t\tvec3 vSigmaY = dFdy( surf_pos );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif\n",Vo="#if NUM_CLIPPING_PLANES > 0\n\tfor ( int i = 0; i < NUM_CLIPPING_PLANES; ++ i ) {\n\t\tvec4 plane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n#endif\n",ko="#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif\n",jo="#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvarying vec3 vViewPosition;\n#endif\n",Wo="#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n",Xo="#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",Yo="#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n",qo="#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",Zo="#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",Jo="#define PI 3.14159265359\n#define PI2 6.28318530718\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\n",Qo="#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_textureSize (1024.0)\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection = abs(direction);\n\tint face = -1;\n\tif( absDirection.x > absDirection.z ) {\n\t\tif(absDirection.x > absDirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z > absDirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\n#define cubeUV_maxLods1  (log2(cubeUV_textureSize*0.25) - 1.0)\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness = dFdx(roughness);\n\tfloat dyRoughness = dFdy(roughness);\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\td = clamp(d, 1.0, cubeUV_rangeClamp);\n\tfloat mipLevel = 0.5 * log2(d);\n\treturn vec2(floor(mipLevel), fract(mipLevel));\n}\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\tbool bRes = mipLevel == 0.0;\n\tscale =  bRes && (scale < a) ? a : scale;\n\tvec3 r;\n\tvec2 offset;\n\tint face = getFaceFromDirection(direction);\n\tfloat rcpPowScale = 1.0 / powScale;\n\tif( face == 0) {\n\t\tr = vec3(direction.x, -direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ?  a : offset.y;\n\t}\n\telse if( face == 1) {\n\t\tr = vec3(direction.y, direction.x, direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ?  a : offset.y;\n\t}\n\telse if( face == 2) {\n\t\tr = vec3(direction.z, direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ?  a : offset.y;\n\t}\n\telse if( face == 3) {\n\t\tr = vec3(direction.x, direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ?  0.0 : offset.y;\n\t}\n\telse if( face == 4) {\n\t\tr = vec3(direction.y, direction.x, -direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ?  0.0 : offset.y;\n\t}\n\telse {\n\t\tr = vec3(direction.z, -direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ?  0.0 : offset.y;\n\t}\n\tr = normalize(r);\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base = offset + vec2( texelOffset );\n\treturn base + s * ( scale - 2.0 * texelOffset );\n}\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\n\tfloat r1 = floor(roughnessVal);\n\tfloat r2 = r1 + 1.0;\n\tfloat t = fract(roughnessVal);\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s = mipInfo.y;\n\tfloat level0 = mipInfo.x;\n\tfloat level1 = level0 + 1.0;\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n\tvec4 result = mix(color10, color20, t);\n\treturn vec4(result.rgb, 1.0);\n}\n#endif\n",Ko="#ifdef FLIP_SIDED\n\tobjectNormal = -objectNormal;\n#endif\nvec3 transformedNormal = normalMatrix * objectNormal;\n",$o="#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif\n",ts="#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normal * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n",es="#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif\n",is="#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n",ns="  gl_FragColor = linearToOutputTexel( gl_FragColor );\n",rs="\nvec4 LinearToLinear( in vec4 value ) {\n  return value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n  return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n  return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n  return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n  return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n  return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n  float maxComponent = max( max( value.r, value.g ), value.b );\n  float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n  return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n  return vec4( value.xyz * value.w * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n  float maxRGB = max( value.x, max( value.g, value.b ) );\n  float M      = clamp( maxRGB / maxRange, 0.0, 1.0 );\n  M            = ceil( M * 255.0 ) / 255.0;\n  return vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n    return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n    float maxRGB = max( value.x, max( value.g, value.b ) );\n    float D      = max( maxRange / maxRGB, 1.0 );\n    D            = min( floor( D ) / 255.0, 1.0 );\n    return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value )  {\n  vec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\n  Xp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\n  vec4 vResult;\n  vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n  float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n  vResult.w = fract(Le);\n  vResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\n  return vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n  float Le = value.z * 255.0 + value.w;\n  vec3 Xp_Y_XYZp;\n  Xp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\n  Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n  Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n  vec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\n  return vec4( max(vRGB, 0.0), 1.0 );\n}\n",as="#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\tsampleUV.y = saturate( flipNormal * reflectVec.y * 0.5 + 0.5 );\n\t\tsampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\tvec3 reflectView = flipNormal * normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\tenvColor = envMapTexelToLinear( envColor );\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif\n",os="#if defined( USE_ENVMAP ) || defined( PHYSICAL )\n\tuniform float reflectivity;\n\tuniform float envMapIntenstiy;\n#endif\n#ifdef USE_ENVMAP\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\n\t\tvarying vec3 vWorldPosition;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif\n",ss="#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif\n",cs="#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif\n",hs="#ifdef USE_FOG\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tfloat depth = gl_FragDepthEXT / gl_FragCoord.w;\n\t#else\n\t\tfloat depth = gl_FragCoord.z / gl_FragCoord.w;\n\t#endif\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * depth * depth * LOG2 ) );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, depth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif\n",ls="#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",us="#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif\n",ps="#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",ds="vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif\n",fs="uniform vec3 ambientLightColor;\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tif ( testLightInRange( lightDistance, pointLight.distance ) ) {\n\t\t\tdirectLight.color = pointLight.color;\n\t\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( all( bvec2( angleCos > spotLight.coneCos, testLightInRange( lightDistance, spotLight.distance ) ) ) ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif\n#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\t#include <normal_flip>\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = flipNormal * vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec = flipNormal * vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\t#include <normal_flip>\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryReflectVec = flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = saturate( flipNormal * reflectVec.y * 0.5 + 0.5 );\n\t\t\tsampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = flipNormal * normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif\n",ms="BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n",vs="varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)\n",gs="PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef STANDARD\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.clearCoat = saturate( clearCoat );\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\n#endif\n",ys="struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\t#ifndef STANDARD\n\t\tfloat clearCoat;\n\t\tfloat clearCoatRoughness;\n\t#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifndef STANDARD\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#ifndef STANDARD\n\t\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifndef STANDARD\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\tfloat dotNL = dotNV;\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n\t#ifndef STANDARD\n\t\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\n#define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )\n#define Material_ClearCoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}\n",xs="\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t \tirradiance += getLightProbeIndirectIrradiance( geometry, 8 );\n\t#endif\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tvec3 radiance = getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), 8 );\n\t#ifndef STANDARD\n\t\tvec3 clearCoatRadiance = getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), 8 );\n\t#else\n\t\tvec3 clearCoatRadiance = vec3( 0.0 );\n\t#endif\n\t\t\n\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\n#endif\n",_s="#if defined(USE_LOGDEPTHBUF) && defined(USE_LOGDEPTHBUF_EXT)\n\tgl_FragDepthEXT = log2(vFragDepth) * logDepthBufFC * 0.5;\n#endif",bs="#ifdef USE_LOGDEPTHBUF\n\tuniform float logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n#endif\n",ws="#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n\tuniform float logDepthBufFC;\n#endif",Ms="#ifdef USE_LOGDEPTHBUF\n\tgl_Position.z = log2(max( EPSILON, gl_Position.w + 1.0 )) * logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = (gl_Position.z - 1.0) * gl_Position.w;\n\t#endif\n#endif\n",Es="#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif\n",Ts="#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n",Ss="#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y ) * offsetRepeat.zw + offsetRepeat.xy );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n",As="#ifdef USE_MAP\n\tuniform vec4 offsetRepeat;\n\tuniform sampler2D map;\n#endif\n",Ls="float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.r;\n#endif\n",Rs="#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",Ps="#ifdef USE_MORPHNORMALS\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n#endif\n",Cs="#ifdef USE_MORPHTARGETS\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",Us="#ifdef USE_MORPHTARGETS\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif\n",Is="#ifdef DOUBLE_SIDED\n\tfloat flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n#else\n\tfloat flipNormal = 1.0;\n#endif\n",Ds="#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal ) * flipNormal;\n#endif\n#ifdef USE_NORMALMAP\n\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n",Ns="#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 S = normalize( q0 * st1.t - q1 * st0.t );\n\t\tvec3 T = normalize( -q0 * st1.s + q1 * st0.s );\n\t\tvec3 N = normalize( surf_norm );\n\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\tmapN.xy = normalScale * mapN.xy;\n\t\tmat3 tsn = mat3( S, T, N );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif\n",Os="vec3 packNormalToRGB( const in vec3 normal ) {\n  return normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n  return 1.0 - 2.0 * rgb.xyz;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256.,  256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n  return ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n  return linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n  return (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n  return ( near * far ) / ( ( far - near ) * invClipZ - far );\n}\n",Fs="#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif\n",zs="#ifdef USE_SKINNING\n\tvec4 mvPosition = modelViewMatrix * skinned;\n#else\n\tvec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\n#endif\ngl_Position = projectionMatrix * mvPosition;\n",Bs="float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.r;\n#endif\n",Gs="#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",Hs="#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\treturn (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn 1.0;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\tfloat dp = ( length( lightToPosition ) - shadowBias ) / 1000.0;\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif\n",Vs="#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n#endif\n",ks="#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif\n",js="float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}\n",Ws="#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",Xs="#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform sampler2D boneTexture;\n\t\tuniform int boneTextureWidth;\n\t\tuniform int boneTextureHeight;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureWidth ) );\n\t\t\tfloat y = floor( j / float( boneTextureWidth ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureWidth );\n\t\t\tfloat dy = 1.0 / float( boneTextureHeight );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif\n",Ys="#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\tskinned  = bindMatrixInverse * skinned;\n#endif\n",qs="#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n#endif\n",Zs="float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",Js="#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",Qs="#if defined( TONE_MAPPING )\n  gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif\n",Ks="#define saturate(a) clamp( a, 0.0, 1.0 )\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n  return toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n  color *= toneMappingExposure;\n  return saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n  color *= toneMappingExposure;\n  return saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n  color *= toneMappingExposure;\n  color = max( vec3( 0.0 ), color - 0.004 );\n  return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\n",$s="#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n#endif",tc="#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform vec4 offsetRepeat;\n#endif\n",ec="#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = uv * offsetRepeat.zw + offsetRepeat.xy;\n#endif",ic="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",nc="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif",rc="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif",ac="#if defined( USE_ENVMAP ) || defined( PHONG ) || defined( PHYSICAL ) || defined( LAMBERT ) || defined ( USE_SHADOWMAP )\n\t#ifdef USE_SKINNING\n\t\tvec4 worldPosition = modelMatrix * skinned;\n\t#else\n\t\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n\t#endif\n#endif\n",oc="uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\tgl_FragColor.a *= opacity;\n}\n",sc="varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}\n",cc="#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}\n",hc="#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#include <begin_vertex>\n\t#include <displacementmap_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}\n",lc="uniform vec3 lightPos;\nvarying vec4 vWorldPosition;\n#include <common>\n#include <packing>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tgl_FragColor = packDepthToRGBA( length( vWorldPosition.xyz - lightPos.xyz ) / 1000.0 );\n}\n",uc="varying vec4 vWorldPosition;\n#include <common>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <skinbase_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition;\n}\n",pc="uniform sampler2D tEquirect;\nuniform float tFlip;\nvarying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldPosition );\n\tvec2 sampleUV;\n\tsampleUV.y = saturate( tFlip * direction.y * -0.5 + 0.5 );\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}\n",dc="varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}\n",fc="uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_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\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",mc="uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}\n",vc="uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight;\n\treflectedLight.directDiffuse = vec3( 0.0 );\n\treflectedLight.directSpecular = vec3( 0.0 );\n\treflectedLight.indirectDiffuse = diffuseColor.rgb;\n\treflectedLight.indirectSpecular = vec3( 0.0 );\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <normal_flip>\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",gc="#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n}\n",yc="uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <packing>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <bsdfs>\n#include <lights_pars>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <normal_flip>\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",xc="#define LAMBERT\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars>\n#include <color_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n}\n",_c="#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_flip>\n\t#include <normal_fragment>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_template>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",bc="#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <displacementmap_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n}\n",wc="#define PHYSICAL\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifndef STANDARD\n\tuniform float clearCoat;\n\tuniform float clearCoatRoughness;\n#endif\nuniform float envMapIntensity;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <packing>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <lights_pars>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_flip>\n\t#include <normal_fragment>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_template>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",Mc="#define PHYSICAL\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <displacementmap_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n}\n",Ec="uniform float opacity;\nvarying vec3 vNormal;\n#include <common>\n#include <packing>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tgl_FragColor = vec4( packNormalToRGB( vNormal ), opacity );\n\t#include <logdepthbuf_fragment>\n}\n",Tc="varying vec3 vNormal;\n#include <common>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvNormal = normalize( normalMatrix * normal );\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}\n",Sc="uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <shadowmap_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_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",Ac="uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#ifdef USE_SIZEATTENUATION\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\n\t#else\n\t\tgl_PointSize = size;\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n}\n",Lc="uniform float opacity;\n#include <common>\n#include <packing>\n#include <bsdfs>\n#include <lights_pars>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( 0.0, 0.0, 0.0, opacity * ( 1.0  - getShadowMask() ) );\n}\n",Rc="#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n}\n",Pc={
  alphamap_fragment:Io,alphamap_pars_fragment:Do,alphatest_fragment:No,aomap_fragment:Oo,aomap_pars_fragment:Fo,begin_vertex:zo,beginnormal_vertex:Bo,bsdfs:Go,bumpmap_pars_fragment:Ho,clipping_planes_fragment:Vo,clipping_planes_pars_fragment:ko,clipping_planes_pars_vertex:jo,clipping_planes_vertex:Wo,color_fragment:Xo,color_pars_fragment:Yo,color_pars_vertex:qo,color_vertex:Zo,common:Jo,cube_uv_reflection_fragment:Qo,defaultnormal_vertex:Ko,displacementmap_pars_vertex:$o,displacementmap_vertex:ts,emissivemap_fragment:es,emissivemap_pars_fragment:is,encodings_fragment:ns,encodings_pars_fragment:rs,envmap_fragment:as,envmap_pars_fragment:os,envmap_pars_vertex:ss,envmap_vertex:cs,fog_fragment:hs,fog_pars_fragment:ls,lightmap_fragment:us,lightmap_pars_fragment:ps,lights_lambert_vertex:ds,lights_pars:fs,lights_phong_fragment:ms,lights_phong_pars_fragment:vs,lights_physical_fragment:gs,lights_physical_pars_fragment:ys,lights_template:xs,logdepthbuf_fragment:_s,logdepthbuf_pars_fragment:bs,logdepthbuf_pars_vertex:ws,logdepthbuf_vertex:Ms,map_fragment:Es,map_pars_fragment:Ts,map_particle_fragment:Ss,map_particle_pars_fragment:As,metalnessmap_fragment:Ls,metalnessmap_pars_fragment:Rs,morphnormal_vertex:Ps,morphtarget_pars_vertex:Cs,morphtarget_vertex:Us,normal_flip:Is,normal_fragment:Ds,normalmap_pars_fragment:Ns,packing:Os,premultiplied_alpha_fragment:Fs,project_vertex:zs,roughnessmap_fragment:Bs,roughnessmap_pars_fragment:Gs,shadowmap_pars_fragment:Hs,shadowmap_pars_vertex:Vs,shadowmap_vertex:ks,shadowmask_pars_fragment:js,skinbase_vertex:Ws,skinning_pars_vertex:Xs,skinning_vertex:Ys,skinnormal_vertex:qs,specularmap_fragment:Zs,specularmap_pars_fragment:Js,tonemapping_fragment:Qs,tonemapping_pars_fragment:Ks,uv_pars_fragment:$s,uv_pars_vertex:tc,uv_vertex:ec,uv2_pars_fragment:ic,uv2_pars_vertex:nc,uv2_vertex:rc,worldpos_vertex:ac,cube_frag:oc,cube_vert:sc,depth_frag:cc,depth_vert:hc,distanceRGBA_frag:lc,distanceRGBA_vert:uc,equirect_frag:pc,equirect_vert:dc,linedashed_frag:fc,linedashed_vert:mc,meshbasic_frag:vc,meshbasic_vert:gc,meshlambert_frag:yc,meshlambert_vert:xc,meshphong_frag:_c,meshphong_vert:bc,meshphysical_frag:wc,meshphysical_vert:Mc,normal_frag:Ec,normal_vert:Tc,points_frag:Sc,points_vert:Ac,shadow_frag:Lc,shadow_vert:Rc};$.prototype={constructor:$,isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){this.r=t,this.g=t,this.b=t},setHex:function(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this},setRGB:function(t,e,i){return this.r=t,this.g=e,this.b=i,this},setHSL:function(){function e(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+6*(e-t)*(2/3-i):t}return function(i,n,r){if(i=t.Math.euclideanModulo(i,1),n=t.Math.clamp(n,0,1),r=t.Math.clamp(r,0,1),0===n)this.r=this.g=this.b=r;else{var a=r<=.5?r*(1+n):r+n-r*n,o=2*r-a;this.r=e(o,a,i+1/3),this.g=e(o,a,i),this.b=e(o,a,i-1/3)}return this}}(),setStyle:function(e){function i(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(e)){var r,a=n[1],o=n[2];switch(a){case"rgb":case"rgba":if(r=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,i(r[5]),this;if(r=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,i(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o)){var s=parseFloat(r[1])/360,c=parseInt(r[2],10)/100,h=parseInt(r[3],10)/100;return i(r[5]),this.setHSL(s,c,h)}}}else if(n=/^\#([A-Fa-f0-9]+)$/.exec(e)){var l=n[1],u=l.length;if(3===u)return this.r=parseInt(l.charAt(0)+l.charAt(0),16)/255,this.g=parseInt(l.charAt(1)+l.charAt(1),16)/255,this.b=parseInt(l.charAt(2)+l.charAt(2),16)/255,this;if(6===u)return this.r=parseInt(l.charAt(0)+l.charAt(1),16)/255,this.g=parseInt(l.charAt(2)+l.charAt(3),16)/255,this.b=parseInt(l.charAt(4)+l.charAt(5),16)/255,this}if(e&&e.length>0){var l=t.ColorKeywords[e];void 0!==l?this.setHex(l):console.warn("THREE.Color: Unknown color "+e)}return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var i=e>0?1/e:1;return this.r=Math.pow(t.r,i),this.g=Math.pow(t.g,i),this.b=Math.pow(t.b,i),this},convertGammaToLinear:function(){var t=this.r,e=this.g,i=this.b;return this.r=t*t,this.g=e*e,this.b=i*i,this},convertLinearToGamma:function(){return this.r=Math.sqrt(this.r),this.g=Math.sqrt(this.g),this.b=Math.sqrt(this.b),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(t){var e,i,n=t||{h:0,s:0,l:0},r=this.r,a=this.g,o=this.b,s=Math.max(r,a,o),c=Math.min(r,a,o),h=(c+s)/2;if(c===s)e=0,i=0;else{var l=s-c;switch(i=h<=.5?l/(s+c):l/(2-s-c),s){case r:e=(a-o)/l+(a<o?6:0);break;case a:e=(o-r)/l+2;break;case o:e=(r-a)/l+4}e/=6}return n.h=e,n.s=i,n.l=h,n},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(t,e,i){var n=this.getHSL();return n.h+=t,n.s+=e,n.l+=i,this.setHSL(n.h,n.s,n.l),this},add:function(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this},addColors:function(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this},addScalar:function(t){return this.r+=t,this.g+=t,this.b+=t,this},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this},multiply:function(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this},multiplyScalar:function(t){return this.r*=t,this.g*=t,this.b*=t,this},lerp:function(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this},equals:function(t){return t.r===this.r&&t.g===this.g&&t.b===this.b},fromArray:function(t,e){return void 0===e&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}},t.ColorKeywords={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};var Cc={common:{diffuse:{value:new $(15658734)},opacity:{value:1},map:{value:null},offsetRepeat:{value:new Y(0,0,1,1)},specularMap:{value:null},alphaMap:{value:null},envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98}},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 i(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new $(16777215)}},lights:{ambientLightColor:{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:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}}},points:{diffuse:{value:new $(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},offsetRepeat:{value:new Y(0,0,1,1)}}},Uc={basic:{uniforms:t.UniformsUtils.merge([Cc.common,Cc.aomap,Cc.fog]),vertexShader:Pc.meshbasic_vert,fragmentShader:Pc.meshbasic_frag},lambert:{uniforms:t.UniformsUtils.merge([Cc.common,Cc.aomap,Cc.lightmap,Cc.emissivemap,Cc.fog,Cc.lights,{emissive:{value:new $(0)}}]),vertexShader:Pc.meshlambert_vert,fragmentShader:Pc.meshlambert_frag},phong:{uniforms:t.UniformsUtils.merge([Cc.common,Cc.aomap,Cc.lightmap,Cc.emissivemap,Cc.bumpmap,Cc.normalmap,Cc.displacementmap,Cc.fog,Cc.lights,{emissive:{value:new $(0)},specular:{value:new $(1118481)},shininess:{value:30}}]),vertexShader:Pc.meshphong_vert,fragmentShader:Pc.meshphong_frag},standard:{uniforms:t.UniformsUtils.merge([Cc.common,Cc.aomap,Cc.lightmap,Cc.emissivemap,Cc.bumpmap,Cc.normalmap,Cc.displacementmap,Cc.roughnessmap,Cc.metalnessmap,Cc.fog,Cc.lights,{emissive:{value:new $(0)},roughness:{value:.5},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Pc.meshphysical_vert,fragmentShader:Pc.meshphysical_frag},points:{uniforms:t.UniformsUtils.merge([Cc.points,Cc.fog]),vertexShader:Pc.points_vert,fragmentShader:Pc.points_frag},dashed:{uniforms:t.UniformsUtils.merge([Cc.common,Cc.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Pc.linedashed_vert,fragmentShader:Pc.linedashed_frag},depth:{uniforms:t.UniformsUtils.merge([Cc.common,Cc.displacementmap]),vertexShader:Pc.depth_vert,fragmentShader:Pc.depth_frag},normal:{uniforms:{opacity:{value:1}},vertexShader:Pc.normal_vert,fragmentShader:Pc.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Pc.cube_vert,fragmentShader:Pc.cube_frag},equirect:{uniforms:{tEquirect:{value:null},tFlip:{value:-1}},vertexShader:Pc.equirect_vert,fragmentShader:Pc.equirect_frag},distanceRGBA:{uniforms:{lightPos:{value:new s}},vertexShader:Pc.distanceRGBA_vert,fragmentShader:Pc.distanceRGBA_frag}};Uc.physical={uniforms:t.UniformsUtils.merge([Uc.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:Pc.meshphysical_vert,fragmentShader:Pc.meshphysical_frag},tt.prototype=Object.create(J.prototype),tt.prototype.constructor=tt,tt.prototype.isMeshDepthMaterial=!0,tt.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},et.prototype={constructor:et,isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=+(1/0),i=+(1/0),n=+(1/0),r=-(1/0),a=-(1/0),o=-(1/0),s=0,c=t.length;s<c;s+=3){var h=t[s],l=t[s+1],u=t[s+2];h<e&&(e=h),l<i&&(i=l),u<n&&(n=u),h>r&&(r=h),l>a&&(a=l),u>o&&(o=u)}this.min.set(e,i,n),this.max.set(r,a,o)},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new s;return function(e,i){var n=t.copy(i).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}}(),setFromObject:function(){var t=new s;return function(e){var i=this;return e.updateMatrixWorld(!0),this.makeEmpty(),e.traverse(function(e){var n=e.geometry;if(void 0!==n)if(n&&n.isGeometry)for(var r=n.vertices,a=0,o=r.length;a<o;a++)t.copy(r[a]),t.applyMatrix4(e.matrixWorld),i.expandByPoint(t);else if(n&&n.isBufferGeometry){var s=n.attributes.position;if(void 0!==s){var c,h,l;s&&s.isInterleavedBufferAttribute?(c=s.data.array,h=s.offset,l=s.data.stride):(c=s.array,h=0,l=3);for(var a=h,o=c.length;a<o;a+=l)t.fromArray(c,a),t.applyMatrix4(e.matrixWorld),i.expandByPoint(t)}}}),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.max),this},makeEmpty:function(){return this.min.x=this.min.y=this.min.z=+(1/0),this.max.x=this.max.y=this.max.z=-(1/0),this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},center:function(t){var e=t||new s;return e.addVectors(this.min,this.max).multiplyScalar(.5)},size:function(t){var e=t||new s;return e.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z},getParameter:function(t,e){var i=e||new s;return i.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)},intersectsSphere:function(){var t;return function(e){return void 0===t&&(t=new s),this.clampPoint(e.center,t),t.distanceToSquared(e.center)<=e.radius*e.radius}}(),intersectsPlane:function(t){var e,i;return t.normal.x>0?(e=t.normal.x*this.min.x,i=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,i=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,i+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,i+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,i+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,i+=t.normal.z*this.min.z),e<=t.constant&&i>=t.constant},clampPoint:function(t,e){var i=e||new s;return i.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new s;return function(e){var i=t.copy(e).clamp(this.min,this.max);return i.sub(e).length()}}(),getBoundingSphere:function(){var t=new s;return function(e){var i=e||new it;return i.center=this.center(),i.radius=.5*this.size(t).length(),i}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:function(){var t=[new s,new s,new s,new s,new s,new s,new s,new s];return function(e){return this.isEmpty()?this:(t[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),t[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),t[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),t[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),t[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),t[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),t[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),t[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(t),this)}}(),translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}},it.prototype={constructor:it,set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:function(){var t=new et;return function(e,i){var n=this.center;void 0!==i?n.copy(i):t.setFromPoints(e).center(n);for(var r=0,a=0,o=e.length;a<o;a++)r=Math.max(r,n.distanceToSquared(e[a]));return this.radius=Math.sqrt(r),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return this.radius<=0},containsPoint:function(t){return t.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(t){return t.distanceTo(this.center)-this.radius},intersectsSphere:function(t){var e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(this.center.dot(t.normal)-t.constant)<=this.radius},clampPoint:function(t,e){var i=this.center.distanceToSquared(t),n=e||new s;return n.copy(t),i>this.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n},getBoundingBox:function(t){var e=t||new et;return e.set(this.center,this.center),e.expandByScalar(this.radius),e},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this},translate:function(t){return this.center.add(t),this},equals:function(t){return t.center.equals(this.center)&&t.radius===this.radius}},nt.prototype={constructor:nt,isMatrix3:!0,set:function(t,e,i,n,r,a,o,s,c){var h=this.elements;return h[0]=t,h[1]=n,h[2]=o,h[3]=e,h[4]=r,h[5]=s,h[6]=i,h[7]=a,h[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=t.elements;return this.set(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8]),this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToVector3Array:function(){var t;return function(e,i,n){void 0===t&&(t=new s),void 0===i&&(i=0),void 0===n&&(n=e.length);for(var r=0,a=i;r<n;r+=3,a+=3)t.fromArray(e,a),t.applyMatrix3(this),t.toArray(e,a);return e}}(),applyToBuffer:function(){var t;return function(e,i,n){void 0===t&&(t=new s),void 0===i&&(i=0),void 0===n&&(n=e.length/e.itemSize);for(var r=0,a=i;r<n;r++,a++)t.x=e.getX(a),t.y=e.getY(a),t.z=e.getZ(a),t.applyMatrix3(this),e.setXYZ(t.x,t.y,t.z);return e}}(),multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this},determinant:function(){var t=this.elements,e=t[0],i=t[1],n=t[2],r=t[3],a=t[4],o=t[5],s=t[6],c=t[7],h=t[8];return e*a*h-e*o*c-i*r*h+i*o*s+n*r*c-n*a*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3.getInverse no longer takes a Matrix4 argument.");var i=t.elements,n=this.elements,r=i[0],a=i[1],o=i[2],s=i[3],c=i[4],h=i[5],l=i[6],u=i[7],p=i[8],d=p*c-h*u,f=h*l-p*s,m=u*s-c*l,v=r*d+a*f+o*m;if(0===v){var g="THREE.Matrix3.getInverse(): can't invert matrix, determinant is 0";if(e===!0)throw new Error(g);return console.warn(g),this.identity()}var y=1/v;return n[0]=d*y,n[1]=(o*u-p*a)*y,n[2]=(h*a-o*c)*y,n[3]=f*y,n[4]=(p*r-o*l)*y,n[5]=(o*s-h*r)*y,n[6]=m*y,n[7]=(a*l-u*r)*y,n[8]=(c*r-a*s)*y,this},transpose:function(){var t,e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset is deprecated - just use .toArray instead."),this.toArray(t,e)},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},transposeIntoArray:function(t){var e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this},fromArray:function(t){return this.elements.set(t),this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t}},rt.prototype={constructor:rt,set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,i,n){return this.normal.set(t,e,i),this.constant=n,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new s,e=new s;return function(i,n,r){var a=t.subVectors(r,n).cross(e.subVectors(i,n)).normalize();return this.setFromNormalAndCoplanarPoint(a,i),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.normal.copy(t.normal),this.constant=t.constant,this},normalize:function(){var t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(t){return this.normal.dot(t)+this.constant},distanceToSphere:function(t){return this.distanceToPoint(t.center)-t.radius},projectPoint:function(t,e){return this.orthoPoint(t,e).sub(t).negate()},orthoPoint:function(t,e){var i=this.distanceToPoint(t),n=e||new s;return n.copy(this.normal).multiplyScalar(i)},intersectLine:function(){var t=new s;return function(e,i){var n=i||new s,r=e.delta(t),a=this.normal.dot(r);if(0!==a){var o=-(e.start.dot(this.normal)+this.constant)/a;if(!(o<0||o>1))return n.copy(r).multiplyScalar(o).add(e.start)}else if(0===this.distanceToPoint(e.start))return n.copy(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),i=this.distanceToPoint(t.end);return e<0&&i>0||i<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){var e=t||new s;return e.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new s,e=new nt;return function(i,n){var r=this.coplanarPoint(t).applyMatrix4(i),a=n||e.getNormalMatrix(i),o=this.normal.applyMatrix3(a).normalize();return this.constant=-r.dot(o),this}}(),translate:function(t){return this.constant=this.constant-t.dot(this.normal),this},equals:function(t){return t.normal.equals(this.normal)&&t.constant===this.constant}},at.prototype={constructor:at,set:function(t,e,i,n,r,a){var o=this.planes;return o[0].copy(t),o[1].copy(e),o[2].copy(i),o[3].copy(n),o[4].copy(r),o[5].copy(a),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,i=0;i<6;i++)e[i].copy(t.planes[i]);return this},setFromMatrix:function(t){var e=this.planes,i=t.elements,n=i[0],r=i[1],a=i[2],o=i[3],s=i[4],c=i[5],h=i[6],l=i[7],u=i[8],p=i[9],d=i[10],f=i[11],m=i[12],v=i[13],g=i[14],y=i[15];return e[0].setComponents(o-n,l-s,f-u,y-m).normalize(),e[1].setComponents(o+n,l+s,f+u,y+m).normalize(),e[2].setComponents(o+r,l+c,f+p,y+v).normalize(),e[3].setComponents(o-r,l-c,f-p,y-v).normalize(),e[4].setComponents(o-a,l-h,f-d,y-g).normalize(),e[5].setComponents(o+a,l+h,f+d,y+g).normalize(),this},intersectsObject:function(){var t=new it;return function(e){var i=e.geometry;return null===i.boundingSphere&&i.computeBoundingSphere(),t.copy(i.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSprite:function(){var t=new it;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,i=t.center,n=-t.radius,r=0;r<6;r++){var a=e[r].distanceToPoint(i);if(a<n)return!1}return!0},intersectsBox:function(){var t=new s,e=new s;return function(i){for(var n=this.planes,r=0;r<6;r++){var a=n[r];t.x=a.normal.x>0?i.min.x:i.max.x,e.x=a.normal.x>0?i.max.x:i.min.x,t.y=a.normal.y>0?i.min.y:i.max.y,e.y=a.normal.y>0?i.max.y:i.min.y,t.z=a.normal.z>0?i.min.z:i.max.z,e.z=a.normal.z>0?i.max.z:i.min.z;var o=a.distanceToPoint(t),s=a.distanceToPoint(e);if(o<0&&s<0)return!1}return!0}}(),containsPoint:function(t){for(var e=this.planes,i=0;i<6;i++)if(e[i].distanceToPoint(t)<0)return!1;return!0}};var Ic=0;Mt.prototype={constructor:Mt,isBufferAttribute:!0,get count(){return this.array.length/this.itemSize},set needsUpdate(t){t===!0&&this.version++},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,i){t*=this.itemSize,i*=e.itemSize;for(var n=0,r=this.itemSize;n<r;n++)this.array[t+n]=e.array[i+n];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var a=t[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",n),a=new $),e[i++]=a.r,e[i++]=a.g,e[i++]=a.b}return this},copyIndicesArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var a=t[n];e[i++]=a.a,e[i++]=a.b,e[i++]=a.c}return this},copyVector2sArray:function(t){for(var e=this.array,n=0,r=0,a=t.length;r<a;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),o=new i),e[n++]=o.x,e[n++]=o.y}return this},copyVector3sArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var a=t[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",n),a=new s),e[i++]=a.x,e[i++]=a.y,e[i++]=a.z}return this},copyVector4sArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var a=t[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",n),a=new Y),e[i++]=a.x,e[i++]=a.y,e[i++]=a.z,e[i++]=a.w}return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this},setXYZW:function(t,e,i,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this.array[t+3]=r,this},clone:function(){return(new this.constructor).copy(this)}},Dt.prototype={constructor:Dt,clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,i=t.vertexNormals.length;e<i;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(var e=0,i=t.vertexColors.length;e<i;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}},Nt.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],Nt.DefaultOrder="XYZ",Nt.prototype={constructor:Nt,isEuler:!0,get x(){return this._x},set x(t){this._x=t,this.onChangeCallback()},get y(){return this._y},set y(t){this._y=t,this.onChangeCallback()},get z(){return this._z},set z(t){this._z=t,this.onChangeCallback()},get order(){return this._order},set order(t){this._order=t,this.onChangeCallback()},set:function(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._order=n||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this.onChangeCallback(),this},setFromRotationMatrix:function(e,i,n){var r=t.Math.clamp,a=e.elements,o=a[0],s=a[4],c=a[8],h=a[1],l=a[5],u=a[9],p=a[2],d=a[6],f=a[10];return i=i||this._order,"XYZ"===i?(this._y=Math.asin(r(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-u,f),this._z=Math.atan2(-s,o)):(this._x=Math.atan2(d,l),this._z=0)):"YXZ"===i?(this._x=Math.asin(-r(u,-1,1)),Math.abs(u)<.99999?(this._y=Math.atan2(c,f),this._z=Math.atan2(h,l)):(this._y=Math.atan2(-p,o),this._z=0)):"ZXY"===i?(this._x=Math.asin(r(d,-1,1)),Math.abs(d)<.99999?(this._y=Math.atan2(-p,f),this._z=Math.atan2(-s,l)):(this._y=0,this._z=Math.atan2(h,o))):"ZYX"===i?(this._y=Math.asin(-r(p,-1,1)),Math.abs(p)<.99999?(this._x=Math.atan2(d,f),this._z=Math.atan2(h,o)):(this._x=0,this._z=Math.atan2(-s,l))):"YZX"===i?(this._z=Math.asin(r(h,-1,1)),Math.abs(h)<.99999?(this._x=Math.atan2(-u,l),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(c,f))):"XZY"===i?(this._z=Math.asin(-r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(d,l),this._y=Math.atan2(c,o)):(this._x=Math.atan2(-u,f),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+i),this._order=i,n!==!1&&this.onChangeCallback(),this},setFromQuaternion:function(){var t;return function(e,i,n){return void 0===t&&(t=new a),t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,i,n)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:function(){var t=new o;return function(e){return t.setFromEuler(this),this.setFromQuaternion(t,e)}}(),equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},fromArray:function(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new s(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}},Ot.prototype={constructor:Ot,set:function(t){this.mask=1<<t},enable:function(t){this.mask|=1<<t;
  },toggle:function(t){this.mask^=1<<t},disable:function(t){this.mask&=~(1<<t)},test:function(t){return 0!==(this.mask&t.mask)}},Ft.DefaultUp=new s(0,1,0),Ft.DefaultMatrixAutoUpdate=!0,Object.assign(Ft.prototype,e.prototype,{isObject3D:!0,applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},setRotationFromAxisAngle:function(t,e){this.quaternion.setFromAxisAngle(t,e)},setRotationFromEuler:function(t){this.quaternion.setFromEuler(t,!0)},setRotationFromMatrix:function(t){this.quaternion.setFromRotationMatrix(t)},setRotationFromQuaternion:function(t){this.quaternion.copy(t)},rotateOnAxis:function(){var t=new o;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.multiply(t),this}}(),rotateX:function(){var t=new s(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new s(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new s(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new s;return function(e,i){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(i)),this}}(),translateX:function(){var t=new s(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new s(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new s(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var t=new a;return function(e){return e.applyMatrix4(t.getInverse(this.matrixWorld))}}(),lookAt:function(){var t=new a;return function(e){t.lookAt(e,this.position,this.up),this.quaternion.setFromRotationMatrix(t)}}(),add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1)for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);var i=this.children.indexOf(t);i!==-1&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(i,1))},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var i=0,n=this.children.length;i<n;i++){var r=this.children[i],a=r.getObjectByProperty(t,e);if(void 0!==a)return a}},getWorldPosition:function(t){var e=t||new s;return this.updateMatrixWorld(!0),e.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var t=new s,e=new s;return function(i){var n=i||new o;return this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,n,e),n}}(),getWorldRotation:function(){var t=new o;return function(e){var i=e||new Nt;return this.getWorldQuaternion(t),i.setFromQuaternion(t,this.rotation.order,!1)}}(),getWorldScale:function(){var t=new s,e=new o;return function(i){var n=i||new s;return this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,n),n}}(),getWorldDirection:function(){var t=new o;return function(e){var i=e||new s;return this.getWorldQuaternion(t),i.set(0,0,1).applyQuaternion(t)}}(),raycast:function(){},traverse:function(t){t(this);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].traverse(t)},traverseVisible:function(t){if(this.visible!==!1){t(this);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate===!0&&this.updateMatrix(),this.matrixWorldNeedsUpdate!==!0&&t!==!0||(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].updateMatrixWorld(t)},toJSON:function(t){function e(t){var e=[];for(var i in t){var n=t[i];delete n.metadata,e.push(n)}return e}var i=void 0===t||""===t,n={};i&&(t={geometries:{},materials:{},textures:{},images:{}},n.metadata={version:4.4,type:"Object",generator:"Object3D.toJSON"});var r={};if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),this.castShadow===!0&&(r.castShadow=!0),this.receiveShadow===!0&&(r.receiveShadow=!0),this.visible===!1&&(r.visible=!1),r.matrix=this.matrix.toArray(),void 0!==this.geometry&&(void 0===t.geometries[this.geometry.uuid]&&(t.geometries[this.geometry.uuid]=this.geometry.toJSON(t)),r.geometry=this.geometry.uuid),void 0!==this.material&&(void 0===t.materials[this.material.uuid]&&(t.materials[this.material.uuid]=this.material.toJSON(t)),r.material=this.material.uuid),this.children.length>0){r.children=[];for(var a=0;a<this.children.length;a++)r.children.push(this.children[a].toJSON(t).object)}if(i){var o=e(t.geometries),s=e(t.materials),c=e(t.textures),h=e(t.images);o.length>0&&(n.geometries=o),s.length>0&&(n.materials=s),c.length>0&&(n.textures=c),h.length>0&&(n.images=h)}return n.object=r,n},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(var i=0;i<t.children.length;i++){var n=t.children[i];this.add(n.clone())}return this}});var Dc=0;Object.assign(Bt.prototype,e.prototype,{isGeometry:!0,applyMatrix:function(t){for(var e=(new nt).getNormalMatrix(t),i=0,n=this.vertices.length;i<n;i++){var r=this.vertices[i];r.applyMatrix4(t)}for(var i=0,n=this.faces.length;i<n;i++){var a=this.faces[i];a.normal.applyMatrix3(e).normalize();for(var o=0,s=a.vertexNormals.length;o<s;o++)a.vertexNormals[o].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var t;return function(e){return void 0===t&&(t=new a),t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t;return function(e){return void 0===t&&(t=new a),t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t;return function(e){return void 0===t&&(t=new a),t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t;return function(e,i,n){return void 0===t&&(t=new a),t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t;return function(e,i,n){return void 0===t&&(t=new a),t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t;return function(e){void 0===t&&(t=new Ft),t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),fromBufferGeometry:function(t){function e(t,e,i,r){var a=void 0!==c?[p[t].clone(),p[e].clone(),p[i].clone()]:[],o=void 0!==h?[n.colors[t].clone(),n.colors[e].clone(),n.colors[i].clone()]:[],s=new Dt(t,e,i,a,o,r);n.faces.push(s),void 0!==l&&n.faceVertexUvs[0].push([d[t].clone(),d[e].clone(),d[i].clone()]),void 0!==u&&n.faceVertexUvs[1].push([f[t].clone(),f[e].clone(),f[i].clone()])}var n=this,r=null!==t.index?t.index.array:void 0,a=t.attributes,o=a.position.array,c=void 0!==a.normal?a.normal.array:void 0,h=void 0!==a.color?a.color.array:void 0,l=void 0!==a.uv?a.uv.array:void 0,u=void 0!==a.uv2?a.uv2.array:void 0;void 0!==u&&(this.faceVertexUvs[1]=[]);for(var p=[],d=[],f=[],m=0,v=0;m<o.length;m+=3,v+=2)n.vertices.push(new s(o[m],o[m+1],o[m+2])),void 0!==c&&p.push(new s(c[m],c[m+1],c[m+2])),void 0!==h&&n.colors.push(new $(h[m],h[m+1],h[m+2])),void 0!==l&&d.push(new i(l[v],l[v+1])),void 0!==u&&f.push(new i(u[v],u[v+1]));if(void 0!==r){var g=t.groups;if(g.length>0)for(var m=0;m<g.length;m++)for(var y=g[m],x=y.start,_=y.count,v=x,b=x+_;v<b;v+=3)e(r[v],r[v+1],r[v+2],y.materialIndex);else for(var m=0;m<r.length;m+=3)e(r[m],r[m+1],r[m+2])}else for(var m=0;m<o.length/3;m+=3)e(m,m+1,m+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:function(){this.computeBoundingBox();var t=this.boundingBox.center().negate();return this.translate(t.x,t.y,t.z),t},normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius,i=0===e?1:1/e,n=new a;return n.set(i,0,0,-i*t.x,0,i,0,-i*t.y,0,0,i,-i*t.z,0,0,0,1),this.applyMatrix(n),this},computeFaceNormals:function(){for(var t=new s,e=new s,i=0,n=this.faces.length;i<n;i++){var r=this.faces[i],a=this.vertices[r.a],o=this.vertices[r.b],c=this.vertices[r.c];t.subVectors(c,o),e.subVectors(a,o),t.cross(e),t.normalize(),r.normal.copy(t)}},computeVertexNormals:function(t){void 0===t&&(t=!0);var e,i,n,r,a,o;for(o=new Array(this.vertices.length),e=0,i=this.vertices.length;e<i;e++)o[e]=new s;if(t){var c,h,l,u=new s,p=new s;for(n=0,r=this.faces.length;n<r;n++)a=this.faces[n],c=this.vertices[a.a],h=this.vertices[a.b],l=this.vertices[a.c],u.subVectors(l,h),p.subVectors(c,h),u.cross(p),o[a.a].add(u),o[a.b].add(u),o[a.c].add(u)}else for(n=0,r=this.faces.length;n<r;n++)a=this.faces[n],o[a.a].add(a.normal),o[a.b].add(a.normal),o[a.c].add(a.normal);for(e=0,i=this.vertices.length;e<i;e++)o[e].normalize();for(n=0,r=this.faces.length;n<r;n++){a=this.faces[n];var d=a.vertexNormals;3===d.length?(d[0].copy(o[a.a]),d[1].copy(o[a.b]),d[2].copy(o[a.c])):(d[0]=o[a.a].clone(),d[1]=o[a.b].clone(),d[2]=o[a.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,i,n,r;for(i=0,n=this.faces.length;i<n;i++)for(r=this.faces[i],r.__originalFaceNormal?r.__originalFaceNormal.copy(r.normal):r.__originalFaceNormal=r.normal.clone(),r.__originalVertexNormals||(r.__originalVertexNormals=[]),t=0,e=r.vertexNormals.length;t<e;t++)r.__originalVertexNormals[t]?r.__originalVertexNormals[t].copy(r.vertexNormals[t]):r.__originalVertexNormals[t]=r.vertexNormals[t].clone();var a=new Bt;for(a.faces=this.faces,t=0,e=this.morphTargets.length;t<e;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[];var o,c,h=this.morphNormals[t].faceNormals,l=this.morphNormals[t].vertexNormals;for(i=0,n=this.faces.length;i<n;i++)o=new s,c={a:new s,b:new s,c:new s},h.push(o),l.push(c)}var u=this.morphNormals[t];a.vertices=this.morphTargets[t].vertices,a.computeFaceNormals(),a.computeVertexNormals();var o,c;for(i=0,n=this.faces.length;i<n;i++)r=this.faces[i],o=u.faceNormals[i],c=u.vertexNormals[i],o.copy(r.normal),c.a.copy(r.vertexNormals[0]),c.b.copy(r.vertexNormals[1]),c.c.copy(r.vertexNormals[2])}for(i=0,n=this.faces.length;i<n;i++)r=this.faces[i],r.normal=r.__originalFaceNormal,r.vertexNormals=r.__originalVertexNormals},computeTangents:function(){console.warn("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){for(var t=0,e=this.vertices,i=0,n=e.length;i<n;i++)i>0&&(t+=e[i].distanceTo(e[i-1])),this.lineDistances[i]=t},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new et),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new it),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,i){if((t&&t.isGeometry)===!1)return void console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t);var n,r=this.vertices.length,a=this.vertices,o=t.vertices,s=this.faces,c=t.faces,h=this.faceVertexUvs[0],l=t.faceVertexUvs[0];void 0===i&&(i=0),void 0!==e&&(n=(new nt).getNormalMatrix(e));for(var u=0,p=o.length;u<p;u++){var d=o[u],f=d.clone();void 0!==e&&f.applyMatrix4(e),a.push(f)}for(u=0,p=c.length;u<p;u++){var m,v,g,y=c[u],x=y.vertexNormals,_=y.vertexColors;m=new Dt(y.a+r,y.b+r,y.c+r),m.normal.copy(y.normal),void 0!==n&&m.normal.applyMatrix3(n).normalize();for(var b=0,w=x.length;b<w;b++)v=x[b].clone(),void 0!==n&&v.applyMatrix3(n).normalize(),m.vertexNormals.push(v);m.color.copy(y.color);for(var b=0,w=_.length;b<w;b++)g=_[b],m.vertexColors.push(g.clone());m.materialIndex=y.materialIndex+i,s.push(m)}for(u=0,p=l.length;u<p;u++){var M=l[u],E=[];if(void 0!==M){for(var b=0,w=M.length;b<w;b++)E.push(M[b].clone());h.push(E)}}},mergeMesh:function(t){return(t&&t.isMesh)===!1?void console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t):(t.matrixAutoUpdate&&t.updateMatrix(),void this.merge(t.geometry,t.matrix))},mergeVertices:function(){var t,e,i,n,r,a,o,s,c={},h=[],l=[],u=4,p=Math.pow(10,u);for(i=0,n=this.vertices.length;i<n;i++)t=this.vertices[i],e=Math.round(t.x*p)+"_"+Math.round(t.y*p)+"_"+Math.round(t.z*p),void 0===c[e]?(c[e]=i,h.push(this.vertices[i]),l[i]=h.length-1):l[i]=l[c[e]];var d=[];for(i=0,n=this.faces.length;i<n;i++){r=this.faces[i],r.a=l[r.a],r.b=l[r.b],r.c=l[r.c],a=[r.a,r.b,r.c];for(var f=-1,m=0;m<3;m++)if(a[m]===a[(m+1)%3]){f=m,d.push(i);break}}for(i=d.length-1;i>=0;i--){var v=d[i];for(this.faces.splice(v,1),o=0,s=this.faceVertexUvs.length;o<s;o++)this.faceVertexUvs[o].splice(v,1)}var g=this.vertices.length-h.length;return this.vertices=h,g},sortFacesByMaterialIndex:function(){function t(t,e){return t.materialIndex-e.materialIndex}for(var e=this.faces,i=e.length,n=0;n<i;n++)e[n]._id=n;e.sort(t);var r,a,o=this.faceVertexUvs[0],s=this.faceVertexUvs[1];o&&o.length===i&&(r=[]),s&&s.length===i&&(a=[]);for(var n=0;n<i;n++){var c=e[n]._id;r&&r.push(o[c]),a&&a.push(s[c])}r&&(this.faceVertexUvs[0]=r),a&&(this.faceVertexUvs[1]=a)},toJSON:function(){function t(t,e,i){return i?t|1<<e:t&~(1<<e)}function e(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==p[e]?p[e]:(p[e]=u.length/3,u.push(t.x,t.y,t.z),p[e])}function i(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==f[e]?f[e]:(f[e]=d.length,d.push(t.getHex()),f[e])}function n(t){var e=t.x.toString()+t.y.toString();return void 0!==v[e]?v[e]:(v[e]=m.length/2,m.push(t.x,t.y),v[e])}var r={metadata:{version:4.4,type:"Geometry",generator:"Geometry.toJSON"}};if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),void 0!==this.parameters){var a=this.parameters;for(var o in a)void 0!==a[o]&&(r[o]=a[o]);return r}for(var s=[],c=0;c<this.vertices.length;c++){var h=this.vertices[c];s.push(h.x,h.y,h.z)}for(var l=[],u=[],p={},d=[],f={},m=[],v={},c=0;c<this.faces.length;c++){var g=this.faces[c],y=!0,x=!1,_=void 0!==this.faceVertexUvs[0][c],b=g.normal.length()>0,w=g.vertexNormals.length>0,M=1!==g.color.r||1!==g.color.g||1!==g.color.b,E=g.vertexColors.length>0,T=0;if(T=t(T,0,0),T=t(T,1,y),T=t(T,2,x),T=t(T,3,_),T=t(T,4,b),T=t(T,5,w),T=t(T,6,M),T=t(T,7,E),l.push(T),l.push(g.a,g.b,g.c),l.push(g.materialIndex),_){var S=this.faceVertexUvs[0][c];l.push(n(S[0]),n(S[1]),n(S[2]))}if(b&&l.push(e(g.normal)),w){var A=g.vertexNormals;l.push(e(A[0]),e(A[1]),e(A[2]))}if(M&&l.push(i(g.color)),E){var L=g.vertexColors;l.push(i(L[0]),i(L[1]),i(L[2]))}}return r.data={},r.data.vertices=s,r.data.normals=u,d.length>0&&(r.data.colors=d),m.length>0&&(r.data.uvs=[m]),r.data.faces=l,r},clone:function(){return(new Bt).copy(this)},copy:function(t){this.vertices=[],this.faces=[],this.faceVertexUvs=[[]];for(var e=t.vertices,i=0,n=e.length;i<n;i++)this.vertices.push(e[i].clone());for(var r=t.faces,i=0,n=r.length;i<n;i++)this.faces.push(r[i].clone());for(var i=0,n=t.faceVertexUvs.length;i<n;i++){var a=t.faceVertexUvs[i];void 0===this.faceVertexUvs[i]&&(this.faceVertexUvs[i]=[]);for(var o=0,s=a.length;o<s;o++){for(var c=a[o],h=[],l=0,u=c.length;l<u;l++){var p=c[l];h.push(p.clone())}this.faceVertexUvs[i].push(h)}}return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});var Nc=0;Object.assign(Ht.prototype,e.prototype,{computeBoundingBox:Bt.prototype.computeBoundingBox,computeBoundingSphere:Bt.prototype.computeBoundingSphere,computeFaceNormals:function(){console.warn("THREE.DirectGeometry: computeFaceNormals() is not a method of this type of geometry.")},computeVertexNormals:function(){console.warn("THREE.DirectGeometry: computeVertexNormals() is not a method of this type of geometry.")},computeGroups:function(t){for(var e,i,n=[],r=t.faces,a=0;a<r.length;a++){var o=r[a];o.materialIndex!==i&&(i=o.materialIndex,void 0!==e&&(e.count=3*a-e.start,n.push(e)),e={start:3*a,materialIndex:i})}void 0!==e&&(e.count=3*a-e.start,n.push(e)),this.groups=n},fromGeometry:function(t){var e,n=t.faces,r=t.vertices,a=t.faceVertexUvs,o=a[0]&&a[0].length>0,s=a[1]&&a[1].length>0,c=t.morphTargets,h=c.length;if(h>0){e=[];for(var l=0;l<h;l++)e[l]=[];this.morphTargets.position=e}var u,p=t.morphNormals,d=p.length;if(d>0){u=[];for(var l=0;l<d;l++)u[l]=[];this.morphTargets.normal=u}for(var f=t.skinIndices,m=t.skinWeights,v=f.length===r.length,g=m.length===r.length,l=0;l<n.length;l++){var y=n[l];this.vertices.push(r[y.a],r[y.b],r[y.c]);var x=y.vertexNormals;if(3===x.length)this.normals.push(x[0],x[1],x[2]);else{var _=y.normal;this.normals.push(_,_,_)}var b=y.vertexColors;if(3===b.length)this.colors.push(b[0],b[1],b[2]);else{var w=y.color;this.colors.push(w,w,w)}if(o===!0){var M=a[0][l];void 0!==M?this.uvs.push(M[0],M[1],M[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",l),this.uvs.push(new i,new i,new i))}if(s===!0){var M=a[1][l];void 0!==M?this.uvs2.push(M[0],M[1],M[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",l),this.uvs2.push(new i,new i,new i))}for(var E=0;E<h;E++){var T=c[E].vertices;e[E].push(T[y.a],T[y.b],T[y.c])}for(var E=0;E<d;E++){var S=p[E].vertexNormals[l];u[E].push(S.a,S.b,S.c)}v&&this.skinIndices.push(f[y.a],f[y.b],f[y.c]),g&&this.skinWeights.push(m[y.a],m[y.b],m[y.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.assign(Vt.prototype,e.prototype,{isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){this.index=t},addAttribute:function(t,e){return(e&&e.isBufferAttribute)===!1&&(e&&e.isInterleavedBufferAttribute)===!1?(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(t,new Mt(arguments[1],arguments[2]))):"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(e)):(this.attributes[t]=e,this)},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,i){this.groups.push({start:t,count:e,materialIndex:void 0!==i?i:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToVector3Array(e.array),e.needsUpdate=!0);var i=this.attributes.normal;if(void 0!==i){var n=(new nt).getNormalMatrix(t);n.applyToVector3Array(i.array),i.needsUpdate=!0}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t;return function(e){return void 0===t&&(t=new a),t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t;return function(e){return void 0===t&&(t=new a),t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t;return function(e){return void 0===t&&(t=new a),t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t;return function(e,i,n){return void 0===t&&(t=new a),t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t;return function(e,i,n){return void 0===t&&(t=new a),t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t;return function(e){void 0===t&&(t=new Ft),t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){this.computeBoundingBox();var t=this.boundingBox.center().negate();return this.translate(t.x,t.y,t.z),t},setFromObject:function(t){var e=t.geometry;if(t&&t.isPoints||t&&t.isLine){var i=new Ct(3*e.vertices.length,3),n=new Ct(3*e.colors.length,3);if(this.addAttribute("position",i.copyVector3sArray(e.vertices)),this.addAttribute("color",n.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var r=new Ct(e.lineDistances.length,1);this.addAttribute("lineDistance",r.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t&&t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},updateFromObject:function(t){var e=t.geometry;if(t&&t.isMesh){var i=e.__directGeometry;if(e.elementsNeedUpdate===!0&&(i=void 0,e.elementsNeedUpdate=!1),void 0===i)return this.fromGeometry(e);i.verticesNeedUpdate=e.verticesNeedUpdate,i.normalsNeedUpdate=e.normalsNeedUpdate,i.colorsNeedUpdate=e.colorsNeedUpdate,i.uvsNeedUpdate=e.uvsNeedUpdate,i.groupsNeedUpdate=e.groupsNeedUpdate,e.verticesNeedUpdate=!1,e.normalsNeedUpdate=!1,e.colorsNeedUpdate=!1,e.uvsNeedUpdate=!1,e.groupsNeedUpdate=!1,e=i}var n;return e.verticesNeedUpdate===!0&&(n=this.attributes.position,void 0!==n&&(n.copyVector3sArray(e.vertices),n.needsUpdate=!0),e.verticesNeedUpdate=!1),e.normalsNeedUpdate===!0&&(n=this.attributes.normal,void 0!==n&&(n.copyVector3sArray(e.normals),n.needsUpdate=!0),e.normalsNeedUpdate=!1),e.colorsNeedUpdate===!0&&(n=this.attributes.color,void 0!==n&&(n.copyColorsArray(e.colors),n.needsUpdate=!0),e.colorsNeedUpdate=!1),e.uvsNeedUpdate&&(n=this.attributes.uv,void 0!==n&&(n.copyVector2sArray(e.uvs),n.needsUpdate=!0),e.uvsNeedUpdate=!1),e.lineDistancesNeedUpdate&&(n=this.attributes.lineDistance,void 0!==n&&(n.copyArray(e.lineDistances),n.needsUpdate=!0),e.lineDistancesNeedUpdate=!1),e.groupsNeedUpdate&&(e.computeGroups(t.geometry),this.groups=e.groups,e.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new Ht).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new Mt(e,3).copyVector3sArray(t.vertices)),t.normals.length>0){var i=new Float32Array(3*t.normals.length);this.addAttribute("normal",new Mt(i,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var n=new Float32Array(3*t.colors.length);this.addAttribute("color",new Mt(n,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var r=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new Mt(r,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var a=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new Mt(a,2).copyVector2sArray(t.uvs2))}if(t.indices.length>0){var o=t.vertices.length>65535?Uint32Array:Uint16Array,s=new o(3*t.indices.length);this.setIndex(new Mt(s,1).copyIndicesArray(t.indices))}this.groups=t.groups;for(var c in t.morphTargets){for(var h=[],l=t.morphTargets[c],u=0,p=l.length;u<p;u++){var d=l[u],f=new Ct(3*d.length,3);h.push(f.copyVector3sArray(d))}this.morphAttributes[c]=h}if(t.skinIndices.length>0){var m=new Ct(4*t.skinIndices.length,4);this.addAttribute("skinIndex",m.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var v=new Ct(4*t.skinWeights.length,4);this.addAttribute("skinWeight",v.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new et);var t=this.attributes.position.array;void 0!==t?this.boundingBox.setFromArray(t):this.boundingBox.makeEmpty(),(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){var t=new et,e=new s;return function(){null===this.boundingSphere&&(this.boundingSphere=new it);var i=this.attributes.position;if(i){var n=i.array,r=this.boundingSphere.center;t.setFromArray(n),t.center(r);for(var a=0,o=0,s=n.length;o<s;o+=3)e.fromArray(n,o),a=Math.max(a,r.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(a),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes,i=this.groups;if(e.position){var n=e.position.array;if(void 0===e.normal)this.addAttribute("normal",new Mt(new Float32Array(n.length),3));else for(var r=e.normal.array,a=0,o=r.length;a<o;a++)r[a]=0;var c,h,l,u=e.normal.array,p=new s,d=new s,f=new s,m=new s,v=new s;if(t){var g=t.array;0===i.length&&this.addGroup(0,g.length);for(var y=0,x=i.length;y<x;++y)for(var _=i[y],b=_.start,w=_.count,a=b,o=b+w;a<o;a+=3)c=3*g[a+0],h=3*g[a+1],l=3*g[a+2],p.fromArray(n,c),d.fromArray(n,h),f.fromArray(n,l),m.subVectors(f,d),v.subVectors(p,d),m.cross(v),u[c]+=m.x,u[c+1]+=m.y,u[c+2]+=m.z,u[h]+=m.x,u[h+1]+=m.y,u[h+2]+=m.z,u[l]+=m.x,u[l+1]+=m.y,u[l+2]+=m.z}else for(var a=0,o=n.length;a<o;a+=9)p.fromArray(n,a),d.fromArray(n,a+3),f.fromArray(n,a+6),m.subVectors(f,d),v.subVectors(p,d),m.cross(v),u[a]=m.x,u[a+1]=m.y,u[a+2]=m.z,u[a+3]=m.x,u[a+4]=m.y,u[a+5]=m.z,u[a+6]=m.x,u[a+7]=m.y,u[a+8]=m.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if((t&&t.isBufferGeometry)===!1)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t);void 0===e&&(e=0);var i=this.attributes;for(var n in i)if(void 0!==t.attributes[n])for(var r=i[n],a=r.array,o=t.attributes[n],s=o.array,c=o.itemSize,h=0,l=c*e;h<s.length;h++,l++)a[l]=s[h];return this},normalizeNormals:function(){for(var t,e,i,n,r=this.attributes.normal.array,a=0,o=r.length;a<o;a+=3)t=r[a],e=r[a+1],i=r[a+2],n=1/Math.sqrt(t*t+e*e+i*i),r[a]*=n,r[a+1]*=n,r[a+2]*=n},toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Vt,e=this.index.array,i=this.attributes;for(var n in i){for(var r=i[n],a=r.array,o=r.itemSize,s=new a.constructor(e.length*o),c=0,h=0,l=0,u=e.length;l<u;l++){c=e[l]*o;for(var p=0;p<o;p++)s[h++]=a[c++]}t.addAttribute(n,new Mt(s,o))}return t},toJSON:function(){var t={metadata:{version:4.4,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var i in e)void 0!==e[i]&&(t[i]=e[i]);return t}t.data={attributes:{}};var n=this.index;if(null!==n){var r=Array.prototype.slice.call(n.array);t.data.index={type:n.array.constructor.name,array:r}}var a=this.attributes;for(var i in a){var o=a[i],r=Array.prototype.slice.call(o.array);t.data.attributes[i]={itemSize:o.itemSize,type:o.array.constructor.name,array:r,normalized:o.normalized}}var s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new Vt).copy(this)},copy:function(t){var e=t.index;null!==e&&this.setIndex(e.clone());var i=t.attributes;for(var n in i){var r=i[n];this.addAttribute(n,r.clone())}for(var a=t.groups,o=0,s=a.length;o<s;o++){var c=a[o];this.addGroup(c.start,c.count,c.materialIndex)}return this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Vt.MaxIndex=65535,Qt.prototype=Object.create(Z.prototype),Qt.prototype.constructor=Qt,Qt.prototype.isWebGLRenderTargetCube=!0,Kt.prototype=Object.create(Vt.prototype),Kt.prototype.constructor=Kt,$t.prototype={constructor:$t,set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){var i=e||new s;return i.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new s;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){var i=e||new s;i.subVectors(t,this.origin);var n=i.dot(this.direction);return n<0?i.copy(this.origin):i.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new s;return function(e){var i=t.subVectors(e,this.origin).dot(this.direction);return i<0?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(i).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:function(){var t=new s,e=new s,i=new s;return function(n,r,a,o){t.copy(n).add(r).multiplyScalar(.5),e.copy(r).sub(n).normalize(),i.copy(this.origin).sub(t);var s,c,h,l,u=.5*n.distanceTo(r),p=-this.direction.dot(e),d=i.dot(this.direction),f=-i.dot(e),m=i.lengthSq(),v=Math.abs(1-p*p);if(v>0)if(s=p*f-d,c=p*d-f,l=u*v,s>=0)if(c>=-l)if(c<=l){var g=1/v;s*=g,c*=g,h=s*(s+p*c+2*d)+c*(p*s+c+2*f)+m}else c=u,s=Math.max(0,-(p*c+d)),h=-s*s+c*(c+2*f)+m;else c=-u,s=Math.max(0,-(p*c+d)),h=-s*s+c*(c+2*f)+m;else c<=-l?(s=Math.max(0,-(-p*u+d)),c=s>0?-u:Math.min(Math.max(-u,-f),u),h=-s*s+c*(c+2*f)+m):c<=l?(s=0,c=Math.min(Math.max(-u,-f),u),h=c*(c+2*f)+m):(s=Math.max(0,-(p*u+d)),c=s>0?u:Math.min(Math.max(-u,-f),u),h=-s*s+c*(c+2*f)+m);else c=p>0?-u:u,s=Math.max(0,-(p*c+d)),h=-s*s+c*(c+2*f)+m;return a&&a.copy(this.direction).multiplyScalar(s).add(this.origin),o&&o.copy(e).multiplyScalar(c).add(t),h}}(),intersectSphere:function(){var t=new s;return function(e,i){t.subVectors(e.center,this.origin);var n=t.dot(this.direction),r=t.dot(t)-n*n,a=e.radius*e.radius;if(r>a)return null;var o=Math.sqrt(a-r),s=n-o,c=n+o;return s<0&&c<0?null:s<0?this.at(c,i):this.at(s,i)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var i=-(this.origin.dot(t.normal)+t.constant)/e;return i>=0?i:null},intersectPlane:function(t,e){var i=this.distanceToPlane(t);return null===i?null:this.at(i,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);if(0===e)return!0;var i=t.normal.dot(this.direction);return i*e<0},intersectBox:function(t,e){var i,n,r,a,o,s,c=1/this.direction.x,h=1/this.direction.y,l=1/this.direction.z,u=this.origin;return c>=0?(i=(t.min.x-u.x)*c,n=(t.max.x-u.x)*c):(i=(t.max.x-u.x)*c,n=(t.min.x-u.x)*c),h>=0?(r=(t.min.y-u.y)*h,a=(t.max.y-u.y)*h):(r=(t.max.y-u.y)*h,a=(t.min.y-u.y)*h),i>a||r>n?null:((r>i||i!==i)&&(i=r),(a<n||n!==n)&&(n=a),l>=0?(o=(t.min.z-u.z)*l,s=(t.max.z-u.z)*l):(o=(t.max.z-u.z)*l,s=(t.min.z-u.z)*l),i>s||o>n?null:((o>i||i!==i)&&(i=o),(s<n||n!==n)&&(n=s),n<0?null:this.at(i>=0?i:n,e)))},intersectsBox:function(){var t=new s;return function(e){return null!==this.intersectBox(e,t)}}(),intersectTriangle:function(){var t=new s,e=new s,i=new s,n=new s;return function(r,a,o,s,c){
  e.subVectors(a,r),i.subVectors(o,r),n.crossVectors(e,i);var h,l=this.direction.dot(n);if(l>0){if(s)return null;h=1}else{if(!(l<0))return null;h=-1,l=-l}t.subVectors(this.origin,r);var u=h*this.direction.dot(i.crossVectors(t,i));if(u<0)return null;var p=h*this.direction.dot(e.cross(t));if(p<0)return null;if(u+p>l)return null;var d=-h*t.dot(n);return d<0?null:this.at(d/l,c)}}(),applyMatrix4:function(t){return this.direction.add(this.origin).applyMatrix4(t),this.origin.applyMatrix4(t),this.direction.sub(this.origin),this.direction.normalize(),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}},te.prototype={constructor:te,set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},center:function(t){var e=t||new s;return e.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){var e=t||new s;return e.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(t,e){var i=e||new s;return this.delta(i).multiplyScalar(t).add(this.start)},closestPointToPointParameter:function(){var e=new s,i=new s;return function(n,r){e.subVectors(n,this.start),i.subVectors(this.end,this.start);var a=i.dot(i),o=i.dot(e),s=o/a;return r&&(s=t.Math.clamp(s,0,1)),s}}(),closestPointToPoint:function(t,e,i){var n=this.closestPointToPointParameter(t,e),r=i||new s;return this.delta(r).multiplyScalar(n).add(this.start)},applyMatrix4:function(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this},equals:function(t){return t.start.equals(this.start)&&t.end.equals(this.end)}},ee.normal=function(){var t=new s;return function(e,i,n,r){var a=r||new s;a.subVectors(n,i),t.subVectors(e,i),a.cross(t);var o=a.lengthSq();return o>0?a.multiplyScalar(1/Math.sqrt(o)):a.set(0,0,0)}}(),ee.barycoordFromPoint=function(){var t=new s,e=new s,i=new s;return function(n,r,a,o,c){t.subVectors(o,r),e.subVectors(a,r),i.subVectors(n,r);var h=t.dot(t),l=t.dot(e),u=t.dot(i),p=e.dot(e),d=e.dot(i),f=h*p-l*l,m=c||new s;if(0===f)return m.set(-2,-1,-1);var v=1/f,g=(p*u-l*d)*v,y=(h*d-l*u)*v;return m.set(1-g-y,y,g)}}(),ee.containsPoint=function(){var t=new s;return function(e,i,n,r){var a=ee.barycoordFromPoint(e,i,n,r,t);return a.x>=0&&a.y>=0&&a.x+a.y<=1}}(),ee.prototype={constructor:ee,set:function(t,e,i){return this.a.copy(t),this.b.copy(e),this.c.copy(i),this},setFromPointsAndIndices:function(t,e,i,n){return this.a.copy(t[e]),this.b.copy(t[i]),this.c.copy(t[n]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},area:function(){var t=new s,e=new s;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),midpoint:function(t){var e=t||new s;return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},normal:function(t){return ee.normal(this.a,this.b,this.c,t)},plane:function(t){var e=t||new rt;return e.setFromCoplanarPoints(this.a,this.b,this.c)},barycoordFromPoint:function(t,e){return ee.barycoordFromPoint(t,this.a,this.b,this.c,e)},containsPoint:function(t){return ee.containsPoint(t,this.a,this.b,this.c)},closestPointToPoint:function(){var t,e,i,n;return function(r,a){void 0===t&&(t=new rt,e=[new te,new te,new te],i=new s,n=new s);var o=a||new s,c=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(r,i),this.containsPoint(i)===!0)o.copy(i);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var h=0;h<e.length;h++){e[h].closestPointToPoint(i,!0,n);var l=i.distanceToSquared(n);l<c&&(c=l,o.copy(n))}}return o}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}},ie.prototype=Object.create(J.prototype),ie.prototype.constructor=ie,ie.prototype.isMeshBasicMaterial=!0,ie.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},ne.prototype=Object.assign(Object.create(Ft.prototype),{constructor:ne,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return Ft.prototype.copy.call(this,t),this.drawMode=t.drawMode,this},updateMorphTargets:function(){if(void 0!==this.geometry.morphTargets&&this.geometry.morphTargets.length>0){this.morphTargetBase=-1,this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var t=0,e=this.geometry.morphTargets.length;t<e;t++)this.morphTargetInfluences.push(0),this.morphTargetDictionary[this.geometry.morphTargets[t].name]=t}},getMorphTargetIndexByName:function(t){return void 0!==this.morphTargetDictionary[t]?this.morphTargetDictionary[t]:(console.warn("THREE.Mesh.getMorphTargetIndexByName: morph target "+t+" does not exist. Returning 0."),0)},raycast:function(){function t(t,e,i,n,r,a,o){return ee.barycoordFromPoint(t,e,i,n,y),r.multiplyScalar(y.x),a.multiplyScalar(y.y),o.multiplyScalar(y.z),r.add(a).add(o),r.clone()}function e(t,e,i,n,r,a,o){var s,c=t.material;if(s=c.side===_r?i.intersectTriangle(a,r,n,!0,o):i.intersectTriangle(n,r,a,c.side!==br,o),null===s)return null;_.copy(o),_.applyMatrix4(t.matrixWorld);var h=e.ray.origin.distanceTo(_);return h<e.near||h>e.far?null:{distance:h,point:_.clone(),object:t}}function n(i,n,r,a,o,s,c,p){h.fromArray(a,3*s),l.fromArray(a,3*c),u.fromArray(a,3*p);var d=e(i,n,r,h,l,u,x);return d&&(o&&(m.fromArray(o,2*s),v.fromArray(o,2*c),g.fromArray(o,2*p),d.uv=t(x,h,l,u,m,v,g)),d.face=new Dt(s,c,p,ee.normal(h,l,u)),d.faceIndex=s),d}var r=new a,o=new $t,c=new it,h=new s,l=new s,u=new s,p=new s,d=new s,f=new s,m=new i,v=new i,g=new i,y=new s,x=new s,_=new s;return function(i,a){var s=this.geometry,y=this.material,_=this.matrixWorld;if(void 0!==y&&(null===s.boundingSphere&&s.computeBoundingSphere(),c.copy(s.boundingSphere),c.applyMatrix4(_),i.ray.intersectsSphere(c)!==!1&&(r.getInverse(_),o.copy(i.ray).applyMatrix4(r),null===s.boundingBox||o.intersectsBox(s.boundingBox)!==!1))){var b,w;if(s&&s.isBufferGeometry){var M,E,T,S=s.index,A=s.attributes,L=A.position.array;if(void 0!==A.uv&&(b=A.uv.array),null!==S)for(var R=S.array,P=0,C=R.length;P<C;P+=3)M=R[P],E=R[P+1],T=R[P+2],w=n(this,i,o,L,b,M,E,T),w&&(w.faceIndex=Math.floor(P/3),a.push(w));else for(var P=0,C=L.length;P<C;P+=9)M=P/3,E=M+1,T=M+2,w=n(this,i,o,L,b,M,E,T),w&&(w.index=M,a.push(w))}else if(s&&s.isGeometry){var U,I,D,N=y&&y.isMultiMaterial,O=N===!0?y.materials:null,F=s.vertices,z=s.faces,B=s.faceVertexUvs[0];B.length>0&&(b=B);for(var G=0,H=z.length;G<H;G++){var V=z[G],k=N===!0?O[V.materialIndex]:y;if(void 0!==k){if(U=F[V.a],I=F[V.b],D=F[V.c],k.morphTargets===!0){var j=s.morphTargets,W=this.morphTargetInfluences;h.set(0,0,0),l.set(0,0,0),u.set(0,0,0);for(var X=0,Y=j.length;X<Y;X++){var q=W[X];if(0!==q){var Z=j[X].vertices;h.addScaledVector(p.subVectors(Z[V.a],U),q),l.addScaledVector(d.subVectors(Z[V.b],I),q),u.addScaledVector(f.subVectors(Z[V.c],D),q)}}h.add(U),l.add(I),u.add(D),U=h,I=l,D=u}if(w=e(this,i,o,U,I,D,x)){if(b){var J=b[G];m.copy(J[0]),v.copy(J[1]),g.copy(J[2]),w.uv=t(x,U,I,D,m,v,g)}w.face=V,w.faceIndex=G,a.push(w)}}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),re.prototype=Object.create(Vt.prototype),re.prototype.constructor=re,ae.prototype=Object.create(Ft.prototype),ae.prototype.constructor=ae,ae.prototype.isCamera=!0,ae.prototype.getWorldDirection=function(){var t=new o;return function(e){var i=e||new s;return this.getWorldQuaternion(t),i.set(0,0,-1).applyQuaternion(t)}}(),ae.prototype.lookAt=function(){var t=new a;return function(e){t.lookAt(this.position,e,this.up),this.quaternion.setFromRotationMatrix(t)}}(),ae.prototype.clone=function(){return(new this.constructor).copy(this)},ae.prototype.copy=function(t){return Ft.prototype.copy.call(this,t),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this},oe.prototype=Object.assign(Object.create(ae.prototype),{constructor:oe,isPerspectiveCamera:!0,copy:function(t){return ae.prototype.copy.call(this,t),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(e){var i=.5*this.getFilmHeight()/e;this.fov=2*t.Math.RAD2DEG*Math.atan(i),this.updateProjectionMatrix()},getFocalLength:function(){var e=Math.tan(.5*t.Math.DEG2RAD*this.fov);return.5*this.getFilmHeight()/e},getEffectiveFOV:function(){return 2*t.Math.RAD2DEG*Math.atan(Math.tan(.5*t.Math.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,i,n,r,a){this.aspect=t/e,this.view={fullWidth:t,fullHeight:e,offsetX:i,offsetY:n,width:r,height:a},this.updateProjectionMatrix()},clearViewOffset:function(){this.view=null,this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=this.near,i=e*Math.tan(.5*t.Math.DEG2RAD*this.fov)/this.zoom,n=2*i,r=this.aspect*n,a=-.5*r,o=this.view;if(null!==o){var s=o.fullWidth,c=o.fullHeight;a+=o.offsetX*r/s,i-=o.offsetY*n/c,r*=o.width/s,n*=o.height/c}var h=this.filmOffset;0!==h&&(a+=e*h/this.getFilmWidth()),this.projectionMatrix.makeFrustum(a,a+r,i-n,i,e,this.far)},toJSON:function(t){var e=Ft.prototype.toJSON.call(this,t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}),se.prototype=Object.assign(Object.create(ae.prototype),{constructor:se,isOrthographicCamera:!0,copy:function(t){return ae.prototype.copy.call(this,t),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this},setViewOffset:function(t,e,i,n,r,a){this.view={fullWidth:t,fullHeight:e,offsetX:i,offsetY:n,width:r,height:a},this.updateProjectionMatrix()},clearViewOffset:function(){this.view=null,this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2,r=i-t,a=i+t,o=n+e,s=n-e;if(null!==this.view){var c=this.zoom/(this.view.width/this.view.fullWidth),h=this.zoom/(this.view.height/this.view.fullHeight),l=(this.right-this.left)/this.view.width,u=(this.top-this.bottom)/this.view.height;r+=l*(this.view.offsetX/c),a=r+l*(this.view.width/c),o-=u*(this.view.offsetY/h),s=o-u*(this.view.height/h)}this.projectionMatrix.makeOrthographic(r,a,o,s,this.near,this.far)},toJSON:function(t){var e=Ft.prototype.toJSON.call(this,t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}),he.prototype.isFogExp2=!0,he.prototype.clone=function(){return new he(this.color.getHex(),this.density)},he.prototype.toJSON=function(t){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},le.prototype.isFog=!0,le.prototype.clone=function(){return new le(this.color.getHex(),this.near,this.far)},le.prototype.toJSON=function(t){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},ue.prototype=Object.create(Ft.prototype),ue.prototype.constructor=ue,ue.prototype.copy=function(t,e){return Ft.prototype.copy.call(this,t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},ue.prototype.toJSON=function(t){var e=Ft.prototype.toJSON.call(this,t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e},pe.prototype=Object.assign(Object.create(Ft.prototype),{constructor:pe,isLensFlare:!0,copy:function(t){Ft.prototype.copy.call(this,t),this.positionScreen.copy(t.positionScreen),this.customUpdateCallback=t.customUpdateCallback;for(var e=0,i=t.lensFlares.length;e<i;e++)this.lensFlares.push(t.lensFlares[e]);return this},add:function(t,e,i,n,r,a){void 0===e&&(e=-1),void 0===i&&(i=0),void 0===a&&(a=1),void 0===r&&(r=new $(16777215)),void 0===n&&(n=Lr),i=Math.min(i,Math.max(0,i)),this.lensFlares.push({texture:t,size:e,distance:i,x:0,y:0,z:0,scale:1,rotation:0,opacity:a,color:r,blending:n})},updateLensFlares:function(){var t,e,i=this.lensFlares.length,n=2*-this.positionScreen.x,r=2*-this.positionScreen.y;for(t=0;t<i;t++)e=this.lensFlares[t],e.x=this.positionScreen.x+n*e.distance,e.y=this.positionScreen.y+r*e.distance,e.wantedRotation=e.x*Math.PI*.25,e.rotation+=.25*(e.wantedRotation-e.rotation)}}),de.prototype=Object.create(J.prototype),de.prototype.constructor=de,de.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this},fe.prototype=Object.assign(Object.create(Ft.prototype),{constructor:fe,isSprite:!0,raycast:function(){var t=new s;return function(e,i){t.setFromMatrixPosition(this.matrixWorld);var n=e.ray.distanceSqToPoint(t),r=this.scale.x*this.scale.y/4;n>r||i.push({distance:Math.sqrt(n),point:this.position,face:null,object:this})}}(),clone:function(){return new this.constructor(this.material).copy(this)}}),me.prototype=Object.assign(Object.create(Ft.prototype),{constructor:me,copy:function(t){Ft.prototype.copy.call(this,t,!1);for(var e=t.levels,i=0,n=e.length;i<n;i++){var r=e[i];this.addLevel(r.object.clone(),r.distance)}return this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var i=this.levels,n=0;n<i.length&&!(e<i[n].distance);n++);i.splice(n,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,i=1,n=e.length;i<n&&!(t<e[i].distance);i++);return e[i-1].object},raycast:function(){var t=new s;return function(e,i){t.setFromMatrixPosition(this.matrixWorld);var n=e.ray.origin.distanceTo(t);this.getObjectForDistance(n).raycast(e,i)}}(),update:function(){var t=new s,e=new s;return function(i){var n=this.levels;if(n.length>1){t.setFromMatrixPosition(i.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var r=t.distanceTo(e);n[0].object.visible=!0;for(var a=1,o=n.length;a<o&&r>=n[a].distance;a++)n[a-1].object.visible=!1,n[a].object.visible=!0;for(;a<o;a++)n[a].object.visible=!1}}}(),toJSON:function(t){var e=Ft.prototype.toJSON.call(this,t);e.object.levels=[];for(var i=this.levels,n=0,r=i.length;n<r;n++){var a=i[n];e.object.levels.push({object:a.object.uuid,distance:a.distance})}return e}}),ve.prototype=Object.create(n.prototype),ve.prototype.constructor=ve,ve.prototype.isDataTexture=!0,Object.assign(ge.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var i=new a;this.bones[t]&&i.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(i)}},pose:function(){for(var t,e=0,i=this.bones.length;e<i;e++)t=this.bones[e],t&&t.matrixWorld.getInverse(this.boneInverses[e]);for(var e=0,i=this.bones.length;e<i;e++)t=this.bones[e],t&&(t.parent&&t.parent.isBone?(t.matrix.getInverse(t.parent.matrixWorld),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))},update:function(){var t=new a;return function(){for(var e=0,i=this.bones.length;e<i;e++){var n=this.bones[e]?this.bones[e].matrixWorld:this.identityMatrix;t.multiplyMatrices(n,this.boneInverses[e]),t.toArray(this.boneMatrices,16*e)}this.useVertexTexture&&(this.boneTexture.needsUpdate=!0)}}(),clone:function(){return new ge(this.bones,this.boneInverses,this.useVertexTexture)}}),ye.prototype=Object.assign(Object.create(Ft.prototype),{constructor:ye,isBone:!0,copy:function(t){return Ft.prototype.copy.call(this,t),this.skin=t.skin,this}}),xe.prototype=Object.assign(Object.create(ne.prototype),{constructor:xe,isSkinnedMesh:!0,bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){if(this.geometry&&this.geometry.isGeometry)for(var t=0;t<this.geometry.skinWeights.length;t++){var e=this.geometry.skinWeights[t],i=1/e.lengthManhattan();i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry)for(var n=new Y,r=this.geometry.attributes.skinWeight,t=0;t<r.count;t++){n.x=r.getX(t),n.y=r.getY(t),n.z=r.getZ(t),n.w=r.getW(t);var i=1/n.lengthManhattan();i!==1/0?n.multiplyScalar(i):n.set(1,0,0,0),r.setXYZW(t,n.x,n.y,n.z,n.w)}},updateMatrixWorld:function(t){ne.prototype.updateMatrixWorld.call(this,!0),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material,this.skeleton.useVertexTexture).copy(this)}}),_e.prototype=Object.create(J.prototype),_e.prototype.constructor=_e,_e.prototype.isLineBasicMaterial=!0,_e.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},be.prototype=Object.assign(Object.create(Ft.prototype),{constructor:be,isLine:!0,raycast:function(){var t=new a,e=new $t,i=new it;return function(n,r){var a=n.linePrecision,o=a*a,c=this.geometry,h=this.matrixWorld;if(null===c.boundingSphere&&c.computeBoundingSphere(),i.copy(c.boundingSphere),i.applyMatrix4(h),n.ray.intersectsSphere(i)!==!1){t.getInverse(h),e.copy(n.ray).applyMatrix4(t);var l=new s,u=new s,p=new s,d=new s,f=this&&this.isLineSegments?2:1;if(c&&c.isBufferGeometry){var m=c.index,v=c.attributes,g=v.position.array;if(null!==m)for(var y=m.array,x=0,_=y.length-1;x<_;x+=f){var b=y[x],w=y[x+1];l.fromArray(g,3*b),u.fromArray(g,3*w);var M=e.distanceSqToSegment(l,u,d,p);if(!(M>o)){d.applyMatrix4(this.matrixWorld);var E=n.ray.origin.distanceTo(d);E<n.near||E>n.far||r.push({distance:E,point:p.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}}else for(var x=0,_=g.length/3-1;x<_;x+=f){l.fromArray(g,3*x),u.fromArray(g,3*x+3);var M=e.distanceSqToSegment(l,u,d,p);if(!(M>o)){d.applyMatrix4(this.matrixWorld);var E=n.ray.origin.distanceTo(d);E<n.near||E>n.far||r.push({distance:E,point:p.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}}}else if(c&&c.isGeometry)for(var T=c.vertices,S=T.length,x=0;x<S-1;x+=f){var M=e.distanceSqToSegment(T[x],T[x+1],d,p);if(!(M>o)){d.applyMatrix4(this.matrixWorld);var E=n.ray.origin.distanceTo(d);E<n.near||E>n.far||r.push({distance:E,point:p.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),we.prototype=Object.assign(Object.create(be.prototype),{constructor:we,isLineSegments:!0}),Me.prototype=Object.create(J.prototype),Me.prototype.constructor=Me,Me.prototype.isPointsMaterial=!0,Me.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this},Ee.prototype=Object.assign(Object.create(Ft.prototype),{constructor:Ee,isPoints:!0,raycast:function(){var t=new a,e=new $t,i=new it;return function(n,r){function a(t,i){var a=e.distanceSqToPoint(t);if(a<p){var s=e.closestPointToPoint(t);s.applyMatrix4(h);var c=n.ray.origin.distanceTo(s);if(c<n.near||c>n.far)return;r.push({distance:c,distanceToRay:Math.sqrt(a),point:s.clone(),index:i,face:null,object:o})}}var o=this,c=this.geometry,h=this.matrixWorld,l=n.params.Points.threshold;if(null===c.boundingSphere&&c.computeBoundingSphere(),i.copy(c.boundingSphere),i.applyMatrix4(h),n.ray.intersectsSphere(i)!==!1){t.getInverse(h),e.copy(n.ray).applyMatrix4(t);var u=l/((this.scale.x+this.scale.y+this.scale.z)/3),p=u*u,d=new s;if(c&&c.isBufferGeometry){var f=c.index,m=c.attributes,v=m.position.array;if(null!==f)for(var g=f.array,y=0,x=g.length;y<x;y++){var _=g[y];d.fromArray(v,3*_),a(d,_)}else for(var y=0,b=v.length/3;y<b;y++)d.fromArray(v,3*y),a(d,y)}else for(var w=c.vertices,y=0,b=w.length;y<b;y++)a(w[y],y)}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Te.prototype=Object.assign(Object.create(Ft.prototype),{constructor:Te}),Se.prototype=Object.create(n.prototype),Se.prototype.constructor=Se,Ae.prototype=Object.create(n.prototype),Ae.prototype.constructor=Ae,Ae.prototype.isCompressedTexture=!0,Le.prototype=Object.create(n.prototype),Le.prototype.constructor=Le,Re.prototype=Object.create(n.prototype),Re.prototype.constructor=Re,Re.prototype.isDepthTexture=!0,Pe.prototype=Object.create(K.prototype),Pe.prototype.constructor=Pe,Pe.prototype.isShadowMaterial=!0,Ce.prototype=Object.create(K.prototype),Ce.prototype.constructor=Ce,Ce.prototype.isRawShaderMaterial=!0,Ue.prototype={constructor:Ue,isMultiMaterial:!0,toJSON:function(t){for(var e={metadata:{version:4.2,type:"material",generator:"MaterialExporter"},uuid:this.uuid,type:this.type,materials:[]},i=this.materials,n=0,r=i.length;n<r;n++){var a=i[n].toJSON(t);delete a.metadata,e.materials.push(a)}return e.visible=this.visible,e},clone:function(){for(var t=new this.constructor,e=0;e<this.materials.length;e++)t.materials.push(this.materials[e].clone());return t.visible=this.visible,t}},Ie.prototype=Object.create(J.prototype),Ie.prototype.constructor=Ie,Ie.prototype.isMeshStandardMaterial=!0,Ie.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},De.prototype=Object.create(Ie.prototype),De.prototype.constructor=De,De.prototype.isMeshPhysicalMaterial=!0,De.prototype.copy=function(t){return Ie.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},Ne.prototype=Object.create(J.prototype),Ne.prototype.constructor=Ne,Ne.prototype.isMeshPhongMaterial=!0,Ne.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Oe.prototype=Object.create(J.prototype),Oe.prototype.constructor=Oe,Oe.prototype.isMeshNormalMaterial=!0,Oe.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},Fe.prototype=Object.create(J.prototype),Fe.prototype.constructor=Fe,Fe.prototype.isMeshLambertMaterial=!0,Fe.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},ze.prototype=Object.create(J.prototype),ze.prototype.constructor=ze,ze.prototype.isLineDashedMaterial=!0,ze.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this},t.Cache={enabled:!1,files:{},add:function(t,e){this.enabled!==!1&&(this.files[t]=e)},get:function(t){if(this.enabled!==!1)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}},t.DefaultLoadingManager=new Be,Object.assign(Ge.prototype,{load:function(e,i,n,r){void 0!==this.path&&(e=this.path+e);var a=this,o=t.Cache.get(e);if(void 0!==o)return a.manager.itemStart(e),setTimeout(function(){i&&i(o),a.manager.itemEnd(e)},0),o;var s=new XMLHttpRequest;return s.open("GET",e,!0),s.addEventListener("load",function(n){var o=n.target.response;t.Cache.add(e,o),200===this.status?(i&&i(o),a.manager.itemEnd(e)):0===this.status?(console.warn("THREE.XHRLoader: HTTP Status 0 received."),i&&i(o),a.manager.itemEnd(e)):(r&&r(n),a.manager.itemError(e))},!1),void 0!==n&&s.addEventListener("progress",function(t){n(t)},!1),s.addEventListener("error",function(t){r&&r(t),a.manager.itemError(e)},!1),void 0!==this.responseType&&(s.responseType=this.responseType),void 0!==this.withCredentials&&(s.withCredentials=this.withCredentials),s.overrideMimeType&&s.overrideMimeType("text/plain"),s.send(null),a.manager.itemStart(e),s},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this}}),Object.assign(He.prototype,{load:function(t,e,i,n){function r(r){c.load(t[r],function(t){var i=a._parser(t,!0);o[r]={width:i.width,height:i.height,format:i.format,mipmaps:i.mipmaps},h+=1,6===h&&(1===i.mipmapCount&&(s.minFilter=Ta),s.format=i.format,s.needsUpdate=!0,e&&e(s))},i,n)}var a=this,o=[],s=new Ae;s.image=o;var c=new Ge(this.manager);if(c.setPath(this.path),c.setResponseType("arraybuffer"),Array.isArray(t))for(var h=0,l=0,u=t.length;l<u;++l)r(l);else c.load(t,function(t){var i=a._parser(t,!0);if(i.isCubemap)for(var n=i.mipmaps.length/i.mipmapCount,r=0;r<n;r++){o[r]={mipmaps:[]};for(var c=0;c<i.mipmapCount;c++)o[r].mipmaps.push(i.mipmaps[r*i.mipmapCount+c]),o[r].format=i.format,o[r].width=i.width,o[r].height=i.height}else s.image.width=i.width,s.image.height=i.height,s.mipmaps=i.mipmaps;1===i.mipmapCount&&(s.minFilter=Ta),s.format=i.format,s.needsUpdate=!0,e&&e(s)},i,n);return s},setPath:function(t){return this.path=t,this}});var Oc=Ve;Object.assign(Ve.prototype,{load:function(t,e,i,n){var r=this,a=new ve,o=new Ge(this.manager);return o.setResponseType("arraybuffer"),o.load(t,function(t){var i=r._parser(t);i&&(void 0!==i.image?a.image=i.image:void 0!==i.data&&(a.image.width=i.width,a.image.height=i.height,a.image.data=i.data),a.wrapS=void 0!==i.wrapS?i.wrapS:_a,a.wrapT=void 0!==i.wrapT?i.wrapT:_a,a.magFilter=void 0!==i.magFilter?i.magFilter:Ta,a.minFilter=void 0!==i.minFilter?i.minFilter:Aa,a.anisotropy=void 0!==i.anisotropy?i.anisotropy:1,void 0!==i.format&&(a.format=i.format),void 0!==i.type&&(a.type=i.type),void 0!==i.mipmaps&&(a.mipmaps=i.mipmaps),1===i.mipmapCount&&(a.minFilter=Ta),a.needsUpdate=!0,e&&e(a,i))},i,n),a}}),Object.assign(ke.prototype,{load:function(t,e,i,n){var r=this,a=document.createElementNS("http://www.w3.org/1999/xhtml","img");if(a.onload=function(){URL.revokeObjectURL(a.src),e&&e(a),r.manager.itemEnd(t)},0===t.indexOf("data:"))a.src=t;else{var o=new Ge;o.setPath(this.path),o.setResponseType("blob"),o.setWithCredentials(this.withCredentials),o.load(t,function(t){a.src=URL.createObjectURL(t)},i,n)}return r.manager.itemStart(t),a},setCrossOrigin:function(t){return this.crossOrigin=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(je.prototype,{load:function(t,e,i,n){function r(i){o.load(t[i],function(t){a.images[i]=t,s++,6===s&&(a.needsUpdate=!0,e&&e(a))},void 0,n)}var a=new u,o=new ke(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);for(var s=0,c=0;c<t.length;++c)r(c);return a},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(We.prototype,{load:function(t,e,i,r){var a=new n,o=new ke(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setWithCredentials(this.withCredentials),o.setPath(this.path),o.load(t,function(i){var n=t.search(/\.(jpg|jpeg)$/)>0||0===t.search(/^data\:image\/jpeg/);a.format=n?Ha:Va,a.image=i,a.needsUpdate=!0,void 0!==e&&e(a)},i,r),a},setCrossOrigin:function(t){return this.crossOrigin=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setPath:function(t){return this.path=t,this}}),Xe.prototype=Object.assign(Object.create(Ft.prototype),{constructor:Xe,isLight:!0,copy:function(t){return Ft.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=Ft.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),Ye.prototype=Object.assign(Object.create(Xe.prototype),{constructor:Ye,isHemisphereLight:!0,copy:function(t){return Xe.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(qe.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,
  this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),Ze.prototype=Object.assign(Object.create(qe.prototype),{constructor:Ze,isSpotLightShadow:!0,update:function(e){var i=2*t.Math.RAD2DEG*e.angle,n=this.mapSize.width/this.mapSize.height,r=e.distance||500,a=this.camera;i===a.fov&&n===a.aspect&&r===a.far||(a.fov=i,a.aspect=n,a.far=r,a.updateProjectionMatrix())}}),Je.prototype=Object.assign(Object.create(Xe.prototype),{constructor:Je,isSpotLight:!0,copy:function(t){return Xe.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Qe.prototype=Object.assign(Object.create(Xe.prototype),{constructor:Qe,isPointLight:!0,copy:function(t){return Xe.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),Ke.prototype=Object.assign(Object.create(qe.prototype),{constructor:Ke}),$e.prototype=Object.assign(Object.create(Xe.prototype),{constructor:$e,isDirectionalLight:!0,copy:function(t){return Xe.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),ti.prototype=Object.assign(Object.create(Xe.prototype),{constructor:ti,isAmbientLight:!0}),t.AnimationUtils={arraySlice:function(e,i,n){return t.AnimationUtils.isTypedArray(e)?new e.constructor(e.subarray(i,n)):e.slice(i,n)},convertArray:function(t,e,i){return!t||!i&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){function e(e,i){return t[e]-t[i]}for(var i=t.length,n=new Array(i),r=0;r!==i;++r)n[r]=r;return n.sort(e),n},sortedArray:function(t,e,i){for(var n=t.length,r=new t.constructor(n),a=0,o=0;o!==n;++a)for(var s=i[a]*e,c=0;c!==e;++c)r[o++]=t[s+c];return r},flattenJSON:function(t,e,i,n){for(var r=1,a=t[0];void 0!==a&&void 0===a[n];)a=t[r++];if(void 0!==a){var o=a[n];if(void 0!==o)if(Array.isArray(o)){do o=a[n],void 0!==o&&(e.push(a.time),i.push.apply(i,o)),a=t[r++];while(void 0!==a)}else if(void 0!==o.toArray){do o=a[n],void 0!==o&&(e.push(a.time),o.toArray(i,i.length)),a=t[r++];while(void 0!==a)}else do o=a[n],void 0!==o&&(e.push(a.time),i.push(o)),a=t[r++];while(void 0!==a)}}},ei.prototype={constructor:ei,evaluate:function(t){var e=this.parameterPositions,i=this._cachedIndex,n=e[i],r=e[i-1];t:{e:{var a;i:{n:if(!(t<n)){for(var o=i+2;;){if(void 0===n){if(t<r)break n;return i=e.length,this._cachedIndex=i,this.afterEnd_(i-1,t,r)}if(i===o)break;if(r=n,n=e[++i],t<n)break e}a=e.length;break i}{if(t>=r)break t;var s=e[1];t<s&&(i=2,r=s);for(var o=i-2;;){if(void 0===r)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(i===o)break;if(n=r,r=e[--i-1],t>=r)break e}a=i,i=0}}for(;i<a;){var c=i+a>>>1;t<e[c]?a=c:i=c+1}if(n=e[i],r=e[i-1],void 0===r)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(void 0===n)return i=e.length,this._cachedIndex=i,this.afterEnd_(i-1,r,t)}this._cachedIndex=i,this.intervalChanged_(i,r,n)}return this.interpolate_(i,r,t,n)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){for(var e=this.resultBuffer,i=this.sampleValues,n=this.valueSize,r=t*n,a=0;a!==n;++a)e[a]=i[r+a];return e},interpolate_:function(t,e,i,n){throw new Error("call to abstract method")},intervalChanged_:function(t,e,i){}},Object.assign(ei.prototype,{beforeStart_:ei.prototype.copySampleValue_,afterEnd_:ei.prototype.copySampleValue_}),ii.prototype=Object.assign(Object.create(ei.prototype),{constructor:ii,DefaultSettings_:{endingStart:ho,endingEnd:ho},intervalChanged_:function(t,e,i){var n=this.parameterPositions,r=t-2,a=t+1,o=n[r],s=n[a];if(void 0===o)switch(this.getSettings_().endingStart){case lo:r=t,o=2*e-i;break;case uo:r=n.length-2,o=e+n[r]-n[r+1];break;default:r=t,o=i}if(void 0===s)switch(this.getSettings_().endingEnd){case lo:a=t,s=2*i-e;break;case uo:a=1,s=i+n[1]-n[0];break;default:a=t-1,s=e}var c=.5*(i-e),h=this.valueSize;this._weightPrev=c/(e-o),this._weightNext=c/(s-i),this._offsetPrev=r*h,this._offsetNext=a*h},interpolate_:function(t,e,i,n){for(var r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=t*o,c=s-o,h=this._offsetPrev,l=this._offsetNext,u=this._weightPrev,p=this._weightNext,d=(i-e)/(n-e),f=d*d,m=f*d,v=-u*m+2*u*f-u*d,g=(1+u)*m+(-1.5-2*u)*f+(-.5+u)*d+1,y=(-1-p)*m+(1.5+p)*f+.5*d,x=p*m-p*f,_=0;_!==o;++_)r[_]=v*a[h+_]+g*a[c+_]+y*a[s+_]+x*a[l+_];return r}}),ni.prototype=Object.assign(Object.create(ei.prototype),{constructor:ni,interpolate_:function(t,e,i,n){for(var r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=t*o,c=s-o,h=(i-e)/(n-e),l=1-h,u=0;u!==o;++u)r[u]=a[c+u]*l+a[s+u]*h;return r}}),ri.prototype=Object.assign(Object.create(ei.prototype),{constructor:ri,interpolate_:function(t,e,i,n){return this.copySampleValue_(t-1)}});var Fc;Fc={TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:so,InterpolantFactoryMethodDiscrete:function(t){return new ri(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new ni(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new ii(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){var e;switch(t){case oo:e=this.InterpolantFactoryMethodDiscrete;break;case so:e=this.InterpolantFactoryMethodLinear;break;case co:e=this.InterpolantFactoryMethodSmooth}if(void 0===e){var i="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(i);this.setInterpolation(this.DefaultInterpolation)}return void console.warn(i)}this.createInterpolant=e},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return oo;case this.InterpolantFactoryMethodLinear:return so;case this.InterpolantFactoryMethodSmooth:return co}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]+=t;return this},scale:function(t){if(1!==t)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]*=t;return this},trim:function(e,i){for(var n=this.times,r=n.length,a=0,o=r-1;a!==r&&n[a]<e;)++a;for(;o!==-1&&n[o]>i;)--o;if(++o,0!==a||o!==r){a>=o&&(o=Math.max(o,1),a=o-1);var s=this.getValueSize();this.times=t.AnimationUtils.arraySlice(n,a,o),this.values=t.AnimationUtils.arraySlice(this.values,a*s,o*s)}return this},validate:function(){var e=!0,i=this.getValueSize();i-Math.floor(i)!==0&&(console.error("invalid value size in track",this),e=!1);var n=this.times,r=this.values,a=n.length;0===a&&(console.error("track is empty",this),e=!1);for(var o=null,s=0;s!==a;s++){var c=n[s];if("number"==typeof c&&isNaN(c)){console.error("time is not a valid number",this,s,c),e=!1;break}if(null!==o&&o>c){console.error("out of order keys",this,s,c,o),e=!1;break}o=c}if(void 0!==r&&t.AnimationUtils.isTypedArray(r))for(var s=0,h=r.length;s!==h;++s){var l=r[s];if(isNaN(l)){console.error("value is not a valid number",this,s,l),e=!1;break}}return e},optimize:function(){for(var e=this.times,i=this.values,n=this.getValueSize(),r=1,a=1,o=e.length-1;a<=o;++a){var s=!1,c=e[a],h=e[a+1];if(c!==h&&(1!==a||c!==c[0]))for(var l=a*n,u=l-n,p=l+n,d=0;d!==n;++d){var f=i[l+d];if(f!==i[u+d]||f!==i[p+d]){s=!0;break}}if(s){if(a!==r){e[r]=e[a];for(var m=a*n,v=r*n,d=0;d!==n;++d)i[v+d]=i[m+d]}++r}}return r!==e.length&&(this.times=t.AnimationUtils.arraySlice(e,0,r),this.values=t.AnimationUtils.arraySlice(i,0,r*n)),this}},oi.prototype=Object.assign(Object.create(Fc),{constructor:oi,ValueTypeName:"vector"}),si.prototype=Object.assign(Object.create(ei.prototype),{constructor:si,interpolate_:function(t,e,i,n){for(var r=this.resultBuffer,a=this.sampleValues,s=this.valueSize,c=t*s,h=(i-e)/(n-e),l=c+s;c!==l;c+=4)o.slerpFlat(r,0,a,c-s,a,c,h);return r}}),ci.prototype=Object.assign(Object.create(Fc),{constructor:ci,ValueTypeName:"quaternion",DefaultInterpolation:so,InterpolantFactoryMethodLinear:function(t){return new si(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),hi.prototype=Object.assign(Object.create(Fc),{constructor:hi,ValueTypeName:"number"}),li.prototype=Object.assign(Object.create(Fc),{constructor:li,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:oo,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),ui.prototype=Object.assign(Object.create(Fc),{constructor:ui,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:oo,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),pi.prototype=Object.assign(Object.create(Fc),{constructor:pi,ValueTypeName:"color"}),di.prototype=Fc,Fc.constructor=di,Object.assign(di,{parse:function(e){if(void 0===e.type)throw new Error("track type undefined, can not parse");var i=di._getTrackTypeForValueTypeName(e.type);if(void 0===e.times){var n=[],r=[];t.AnimationUtils.flattenJSON(e.keys,n,r,"value"),e.times=n,e.values=r}return void 0!==i.parse?i.parse(e):new i(e.name,e.times,e.values,e.interpolation)},toJSON:function(e){var i,n=e.constructor;if(void 0!==n.toJSON)i=n.toJSON(e);else{i={name:e.name,times:t.AnimationUtils.convertArray(e.times,Array),values:t.AnimationUtils.convertArray(e.values,Array)};var r=e.getInterpolation();r!==e.DefaultInterpolation&&(i.interpolation=r)}return i.type=e.ValueTypeName,i},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return hi;case"vector":case"vector2":case"vector3":case"vector4":return oi;case"color":return pi;case"quaternion":return ci;case"bool":case"boolean":return ui;case"string":return li}throw new Error("Unsupported typeName: "+t)}}),fi.prototype={constructor:fi,resetDuration:function(){for(var t=this.tracks,e=0,i=0,n=t.length;i!==n;++i){var r=this.tracks[i];e=Math.max(e,r.times[r.times.length-1])}this.duration=e},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}},Object.assign(fi,{parse:function(t){for(var e=[],i=t.tracks,n=1/(t.fps||1),r=0,a=i.length;r!==a;++r)e.push(di.parse(i[r]).scale(n));return new fi(t.name,t.duration,e)},toJSON:function(t){for(var e=[],i=t.tracks,n={name:t.name,duration:t.duration,tracks:e},r=0,a=i.length;r!==a;++r)e.push(di.toJSON(i[r]));return n},CreateFromMorphTargetSequence:function(e,i,n,r){for(var a=i.length,o=[],s=0;s<a;s++){var c=[],h=[];c.push((s+a-1)%a,s,(s+1)%a),h.push(0,1,0);var l=t.AnimationUtils.getKeyframeOrder(c);c=t.AnimationUtils.sortedArray(c,1,l),h=t.AnimationUtils.sortedArray(h,1,l),r||0!==c[0]||(c.push(a),h.push(h[0])),o.push(new hi(".morphTargetInfluences["+i[s].name+"]",c,h).scale(1/n))}return new fi(e,(-1),o)},findByName:function(t,e){var i=t;if(!Array.isArray(t)){var n=t;i=n.geometry&&n.geometry.animations||n.animations}for(var r=0;r<i.length;r++)if(i[r].name===e)return i[r];return null},CreateClipsFromMorphTargetSequences:function(t,e,i){for(var n={},r=/^([\w-]*?)([\d]+)$/,a=0,o=t.length;a<o;a++){var s=t[a],c=s.name.match(r);if(c&&c.length>1){var h=c[1],l=n[h];l||(n[h]=l=[]),l.push(s)}}var u=[];for(var h in n)u.push(fi.CreateFromMorphTargetSequence(h,n[h],e,i));return u},parseAnimation:function(e,i,n){if(!e)return console.error("  no animation in JSONLoader data"),null;for(var r=function(e,i,n,r,a){if(0!==n.length){var o=[],s=[];t.AnimationUtils.flattenJSON(n,o,s,r),0!==o.length&&a.push(new e(i,o,s))}},a=[],o=e.name||"default",s=e.length||-1,c=e.fps||30,h=e.hierarchy||[],l=0;l<h.length;l++){var u=h[l].keys;if(u&&0!==u.length)if(u[0].morphTargets){for(var p={},d=0;d<u.length;d++)if(u[d].morphTargets)for(var f=0;f<u[d].morphTargets.length;f++)p[u[d].morphTargets[f]]=-1;for(var m in p){for(var v=[],g=[],f=0;f!==u[d].morphTargets.length;++f){var y=u[d];v.push(y.time),g.push(y.morphTarget===m?1:0)}a.push(new hi(".morphTargetInfluence["+m+"]",v,g))}s=p.length*(c||1)}else{var x=".bones["+i[l].name+"]";r(oi,x+".position",u,"pos",a),r(ci,x+".quaternion",u,"rot",a),r(oi,x+".scale",u,"scl",a)}}if(0===a.length)return null;var _=new fi(o,s,a);return _}}),Object.assign(mi.prototype,{load:function(t,e,i,n){var r=this,a=new Ge(r.manager);a.load(t,function(t){e(r.parse(JSON.parse(t)))},i,n)},setTextures:function(t){this.textures=t},parse:function(t){function e(t){return void 0===n[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),n[t]}var n=this.textures,r=new THREE[t.type];if(void 0!==t.uuid&&(r.uuid=t.uuid),void 0!==t.name&&(r.name=t.name),void 0!==t.color&&r.color.setHex(t.color),void 0!==t.roughness&&(r.roughness=t.roughness),void 0!==t.metalness&&(r.metalness=t.metalness),void 0!==t.emissive&&r.emissive.setHex(t.emissive),void 0!==t.specular&&r.specular.setHex(t.specular),void 0!==t.shininess&&(r.shininess=t.shininess),void 0!==t.uniforms&&(r.uniforms=t.uniforms),void 0!==t.vertexShader&&(r.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(r.fragmentShader=t.fragmentShader),void 0!==t.vertexColors&&(r.vertexColors=t.vertexColors),void 0!==t.fog&&(r.fog=t.fog),void 0!==t.shading&&(r.shading=t.shading),void 0!==t.blending&&(r.blending=t.blending),void 0!==t.side&&(r.side=t.side),void 0!==t.opacity&&(r.opacity=t.opacity),void 0!==t.transparent&&(r.transparent=t.transparent),void 0!==t.alphaTest&&(r.alphaTest=t.alphaTest),void 0!==t.depthTest&&(r.depthTest=t.depthTest),void 0!==t.depthWrite&&(r.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(r.colorWrite=t.colorWrite),void 0!==t.wireframe&&(r.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(r.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(r.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(r.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.skinning&&(r.skinning=t.skinning),void 0!==t.morphTargets&&(r.morphTargets=t.morphTargets),void 0!==t.size&&(r.size=t.size),void 0!==t.sizeAttenuation&&(r.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(r.map=e(t.map)),void 0!==t.alphaMap&&(r.alphaMap=e(t.alphaMap),r.transparent=!0),void 0!==t.bumpMap&&(r.bumpMap=e(t.bumpMap)),void 0!==t.bumpScale&&(r.bumpScale=t.bumpScale),void 0!==t.normalMap&&(r.normalMap=e(t.normalMap)),void 0!==t.normalScale){var a=t.normalScale;Array.isArray(a)===!1&&(a=[a,a]),r.normalScale=(new i).fromArray(a)}if(void 0!==t.displacementMap&&(r.displacementMap=e(t.displacementMap)),void 0!==t.displacementScale&&(r.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(r.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(r.roughnessMap=e(t.roughnessMap)),void 0!==t.metalnessMap&&(r.metalnessMap=e(t.metalnessMap)),void 0!==t.emissiveMap&&(r.emissiveMap=e(t.emissiveMap)),void 0!==t.emissiveIntensity&&(r.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(r.specularMap=e(t.specularMap)),void 0!==t.envMap&&(r.envMap=e(t.envMap)),void 0!==t.reflectivity&&(r.reflectivity=t.reflectivity),void 0!==t.lightMap&&(r.lightMap=e(t.lightMap)),void 0!==t.lightMapIntensity&&(r.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(r.aoMap=e(t.aoMap)),void 0!==t.aoMapIntensity&&(r.aoMapIntensity=t.aoMapIntensity),void 0!==t.materials)for(var o=0,s=t.materials.length;o<s;o++)r.materials.push(this.parse(t.materials[o]));return r}}),Object.assign(vi.prototype,{load:function(t,e,i,n){var r=this,a=new Ge(r.manager);a.load(t,function(t){e(r.parse(JSON.parse(t)))},i,n)},parse:function(t){var e=new Vt,i=t.data.index,n={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};if(void 0!==i){var r=new n[i.type](i.array);e.setIndex(new Mt(r,1))}var a=t.data.attributes;for(var o in a){var c=a[o],r=new n[c.type](c.array);e.addAttribute(o,new Mt(r,c.itemSize,c.normalized))}var h=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==h)for(var l=0,u=h.length;l!==u;++l){var p=h[l];e.addGroup(p.start,p.count,p.materialIndex)}var d=t.data.boundingSphere;if(void 0!==d){var f=new s;void 0!==d.center&&f.fromArray(d.center),e.boundingSphere=new it(f,d.radius)}return e}}),gi.prototype={constructor:gi,crossOrigin:void 0,extractUrlBase:function(t){var e=t.split("/");return 1===e.length?"./":(e.pop(),e.join("/")+"/")},initMaterials:function(t,e,i){for(var n=[],r=0;r<t.length;++r)n[r]=this.createMaterial(t[r],e,i);return n},createMaterial:function(){var e,i,n;return function(r,a,o){function s(e,n,r,s,h){var l,u=a+e,p=gi.Handlers.get(u);null!==p?l=p.load(u):(i.setCrossOrigin(o),l=i.load(u)),void 0!==n&&(l.repeat.fromArray(n),1!==n[0]&&(l.wrapS=xa),1!==n[1]&&(l.wrapT=xa)),void 0!==r&&l.offset.fromArray(r),void 0!==s&&("repeat"===s[0]&&(l.wrapS=xa),"mirror"===s[0]&&(l.wrapS=ba),"repeat"===s[1]&&(l.wrapT=xa),"mirror"===s[1]&&(l.wrapT=ba)),void 0!==h&&(l.anisotropy=h);var d=t.Math.generateUUID();return c[d]=l,d}void 0===e&&(e=new $),void 0===i&&(i=new We),void 0===n&&(n=new mi);var c={},h={uuid:t.Math.generateUUID(),type:"MeshLambertMaterial"};for(var l in r){var u=r[l];switch(l){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":h.name=u;break;case"blending":h.blending=THREE[u];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",l,"is no longer supported.");break;case"colorDiffuse":h.color=e.fromArray(u).getHex();break;case"colorSpecular":h.specular=e.fromArray(u).getHex();break;case"colorEmissive":h.emissive=e.fromArray(u).getHex();break;case"specularCoef":h.shininess=u;break;case"shading":"basic"===u.toLowerCase()&&(h.type="MeshBasicMaterial"),"phong"===u.toLowerCase()&&(h.type="MeshPhongMaterial"),"standard"===u.toLowerCase()&&(h.type="MeshStandardMaterial");break;case"mapDiffuse":h.map=s(u,r.mapDiffuseRepeat,r.mapDiffuseOffset,r.mapDiffuseWrap,r.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":h.emissiveMap=s(u,r.mapEmissiveRepeat,r.mapEmissiveOffset,r.mapEmissiveWrap,r.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":h.lightMap=s(u,r.mapLightRepeat,r.mapLightOffset,r.mapLightWrap,r.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":h.aoMap=s(u,r.mapAORepeat,r.mapAOOffset,r.mapAOWrap,r.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":h.bumpMap=s(u,r.mapBumpRepeat,r.mapBumpOffset,r.mapBumpWrap,r.mapBumpAnisotropy);break;case"mapBumpScale":h.bumpScale=u;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":h.normalMap=s(u,r.mapNormalRepeat,r.mapNormalOffset,r.mapNormalWrap,r.mapNormalAnisotropy);break;case"mapNormalFactor":h.normalScale=[u,u];break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":h.specularMap=s(u,r.mapSpecularRepeat,r.mapSpecularOffset,r.mapSpecularWrap,r.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":h.metalnessMap=s(u,r.mapMetalnessRepeat,r.mapMetalnessOffset,r.mapMetalnessWrap,r.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":h.roughnessMap=s(u,r.mapRoughnessRepeat,r.mapRoughnessOffset,r.mapRoughnessWrap,r.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":h.alphaMap=s(u,r.mapAlphaRepeat,r.mapAlphaOffset,r.mapAlphaWrap,r.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":h.side=_r;break;case"doubleSided":h.side=br;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),h.opacity=u;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":h[l]=u;break;case"vertexColors":u===!0&&(h.vertexColors=Sr),"face"===u&&(h.vertexColors=Tr);break;default:console.error("THREE.Loader.createMaterial: Unsupported",l,u)}}return"MeshBasicMaterial"===h.type&&delete h.emissive,"MeshPhongMaterial"!==h.type&&delete h.specular,h.opacity<1&&(h.transparent=!0),n.setTextures(c),n.parse(h)}}()},gi.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,i=0,n=e.length;i<n;i+=2){var r=e[i],a=e[i+1];if(r.test(t))return a}return null}},Object.assign(yi.prototype,{load:function(t,e,i,n){var r=this,a=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:gi.prototype.extractUrlBase(t),o=new Ge(this.manager);o.setWithCredentials(this.withCredentials),o.load(t,function(i){var n=JSON.parse(i),o=n.metadata;if(void 0!==o){var s=o.type;if(void 0!==s){if("object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.");if("scene"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.SceneLoader instead.")}}var c=r.parse(n,a);e(c.geometry,c.materials)},i,n)},setTexturePath:function(t){this.texturePath=t},parse:function(t,e){function n(e){function n(t,e){return t&1<<e}var r,a,o,h,l,u,p,d,f,m,v,g,y,x,_,b,w,M,E,T,S,A,L,R,P,C,U,I=t.faces,D=t.vertices,N=t.normals,O=t.colors,F=0;if(void 0!==t.uvs){for(r=0;r<t.uvs.length;r++)t.uvs[r].length&&F++;for(r=0;r<F;r++)c.faceVertexUvs[r]=[]}for(h=0,l=D.length;h<l;)M=new s,M.x=D[h++]*e,M.y=D[h++]*e,M.z=D[h++]*e,c.vertices.push(M);for(h=0,l=I.length;h<l;)if(m=I[h++],v=n(m,0),g=n(m,1),y=n(m,3),x=n(m,4),_=n(m,5),b=n(m,6),w=n(m,7),v){if(T=new Dt,T.a=I[h],T.b=I[h+1],T.c=I[h+3],S=new Dt,S.a=I[h+1],S.b=I[h+2],S.c=I[h+3],h+=4,g&&(f=I[h++],T.materialIndex=f,S.materialIndex=f),o=c.faces.length,y)for(r=0;r<F;r++)for(R=t.uvs[r],c.faceVertexUvs[r][o]=[],c.faceVertexUvs[r][o+1]=[],a=0;a<4;a++)d=I[h++],C=R[2*d],U=R[2*d+1],P=new i(C,U),2!==a&&c.faceVertexUvs[r][o].push(P),0!==a&&c.faceVertexUvs[r][o+1].push(P);if(x&&(p=3*I[h++],T.normal.set(N[p++],N[p++],N[p]),S.normal.copy(T.normal)),_)for(r=0;r<4;r++)p=3*I[h++],L=new s(N[p++],N[p++],N[p]),2!==r&&T.vertexNormals.push(L),0!==r&&S.vertexNormals.push(L);if(b&&(u=I[h++],A=O[u],T.color.setHex(A),S.color.setHex(A)),w)for(r=0;r<4;r++)u=I[h++],A=O[u],2!==r&&T.vertexColors.push(new $(A)),0!==r&&S.vertexColors.push(new $(A));c.faces.push(T),c.faces.push(S)}else{if(E=new Dt,E.a=I[h++],E.b=I[h++],E.c=I[h++],g&&(f=I[h++],E.materialIndex=f),o=c.faces.length,y)for(r=0;r<F;r++)for(R=t.uvs[r],c.faceVertexUvs[r][o]=[],a=0;a<3;a++)d=I[h++],C=R[2*d],U=R[2*d+1],P=new i(C,U),c.faceVertexUvs[r][o].push(P);if(x&&(p=3*I[h++],E.normal.set(N[p++],N[p++],N[p])),_)for(r=0;r<3;r++)p=3*I[h++],L=new s(N[p++],N[p++],N[p]),E.vertexNormals.push(L);if(b&&(u=I[h++],E.color.setHex(O[u])),w)for(r=0;r<3;r++)u=I[h++],E.vertexColors.push(new $(O[u]));c.faces.push(E)}}function r(){var e=void 0!==t.influencesPerVertex?t.influencesPerVertex:2;if(t.skinWeights)for(var i=0,n=t.skinWeights.length;i<n;i+=e){var r=t.skinWeights[i],a=e>1?t.skinWeights[i+1]:0,o=e>2?t.skinWeights[i+2]:0,s=e>3?t.skinWeights[i+3]:0;c.skinWeights.push(new Y(r,a,o,s))}if(t.skinIndices)for(var i=0,n=t.skinIndices.length;i<n;i+=e){var h=t.skinIndices[i],l=e>1?t.skinIndices[i+1]:0,u=e>2?t.skinIndices[i+2]:0,p=e>3?t.skinIndices[i+3]:0;c.skinIndices.push(new Y(h,l,u,p))}c.bones=t.bones,c.bones&&c.bones.length>0&&(c.skinWeights.length!==c.skinIndices.length||c.skinIndices.length!==c.vertices.length)&&console.warn("When skinning, number of vertices ("+c.vertices.length+"), skinIndices ("+c.skinIndices.length+"), and skinWeights ("+c.skinWeights.length+") should match.")}function a(e){if(void 0!==t.morphTargets)for(var i=0,n=t.morphTargets.length;i<n;i++){c.morphTargets[i]={},c.morphTargets[i].name=t.morphTargets[i].name,c.morphTargets[i].vertices=[];for(var r=c.morphTargets[i].vertices,a=t.morphTargets[i].vertices,o=0,h=a.length;o<h;o+=3){var l=new s;l.x=a[o]*e,l.y=a[o+1]*e,l.z=a[o+2]*e,r.push(l)}}if(void 0!==t.morphColors&&t.morphColors.length>0){console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.');for(var u=c.faces,p=t.morphColors[0].colors,i=0,n=u.length;i<n;i++)u[i].color.fromArray(p,3*i)}}function o(){var e=[],i=[];void 0!==t.animation&&i.push(t.animation),void 0!==t.animations&&(t.animations.length?i=i.concat(t.animations):i.push(t.animations));for(var n=0;n<i.length;n++){var r=fi.parseAnimation(i[n],c.bones);r&&e.push(r)}if(c.morphTargets){var a=fi.CreateClipsFromMorphTargetSequences(c.morphTargets,10);e=e.concat(a)}e.length>0&&(c.animations=e)}var c=new Bt,h=void 0!==t.scale?1/t.scale:1;if(n(h),r(),a(h),o(),c.computeFaceNormals(),c.computeBoundingSphere(),void 0===t.materials||0===t.materials.length)return{geometry:c};var l=gi.prototype.initMaterials(t.materials,e,this.crossOrigin);return{geometry:c,materials:l}}}),Object.assign(xi.prototype,{load:function(t,e,i,n){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var r=this,a=new Ge(r.manager);a.load(t,function(t){r.parse(JSON.parse(t),e)},i,n)},setTexturePath:function(t){this.texturePath=t},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t,e){var i=this.parseGeometries(t.geometries),n=this.parseImages(t.images,function(){void 0!==e&&e(o)}),r=this.parseTextures(t.textures,n),a=this.parseMaterials(t.materials,r),o=this.parseObject(t.object,i,a);return t.animations&&(o.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(o),o},parseGeometries:function(t){var e={};if(void 0!==t)for(var i=new yi,n=new vi,r=0,a=t.length;r<a;r++){var o,s=t[r];switch(s.type){case"PlaneGeometry":case"PlaneBufferGeometry":o=new THREE[s.type](s.width,s.height,s.widthSegments,s.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":o=new THREE[s.type](s.width,s.height,s.depth,s.widthSegments,s.heightSegments,s.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":o=new THREE[s.type](s.radius,s.segments,s.thetaStart,s.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":o=new THREE[s.type](s.radiusTop,s.radiusBottom,s.height,s.radialSegments,s.heightSegments,s.openEnded,s.thetaStart,s.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":o=new THREE[s.type](s.radius,s.height,s.radialSegments,s.heightSegments,s.openEnded,s.thetaStart,s.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":o=new THREE[s.type](s.radius,s.widthSegments,s.heightSegments,s.phiStart,s.phiLength,s.thetaStart,s.thetaLength);break;case"DodecahedronGeometry":case"IcosahedronGeometry":case"OctahedronGeometry":case"TetrahedronGeometry":o=new THREE[s.type](s.radius,s.detail);break;case"RingGeometry":case"RingBufferGeometry":o=new THREE[s.type](s.innerRadius,s.outerRadius,s.thetaSegments,s.phiSegments,s.thetaStart,s.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":o=new THREE[s.type](s.radius,s.tube,s.radialSegments,s.tubularSegments,s.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":o=new THREE[s.type](s.radius,s.tube,s.tubularSegments,s.radialSegments,s.p,s.q);break;case"LatheGeometry":case"LatheBufferGeometry":o=new THREE[s.type](s.points,s.segments,s.phiStart,s.phiLength);break;case"BufferGeometry":o=n.parse(s);break;case"Geometry":o=i.parse(s.data,this.texturePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+s.type+'"');continue}o.uuid=s.uuid,void 0!==s.name&&(o.name=s.name),e[s.uuid]=o}return e},parseMaterials:function(t,e){var i={};if(void 0!==t){var n=new mi;n.setTextures(e);for(var r=0,a=t.length;r<a;r++){var o=n.parse(t[r]);i[o.uuid]=o}}return i},parseAnimations:function(t){for(var e=[],i=0;i<t.length;i++){var n=fi.parse(t[i]);e.push(n)}return e},parseImages:function(t,e){function i(t){return n.manager.itemStart(t),o.load(t,function(){n.manager.itemEnd(t)},void 0,function(){n.manager.itemError(t)})}var n=this,r={};if(void 0!==t&&t.length>0){var a=new Be(e),o=new ke(a);o.setCrossOrigin(this.crossOrigin);for(var s=0,c=t.length;s<c;s++){var h=t[s],l=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(h.url)?h.url:n.texturePath+h.url;r[h.uuid]=i(l)}}return r},parseTextures:function(t,e){function i(t){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),THREE[t])}var r={};if(void 0!==t)for(var a=0,o=t.length;a<o;a++){var s=t[a];void 0===s.image&&console.warn('THREE.ObjectLoader: No "image" specified for',s.uuid),void 0===e[s.image]&&console.warn("THREE.ObjectLoader: Undefined image",s.image);var c=new n(e[s.image]);c.needsUpdate=!0,c.uuid=s.uuid,void 0!==s.name&&(c.name=s.name),void 0!==s.mapping&&(c.mapping=i(s.mapping)),void 0!==s.offset&&c.offset.fromArray(s.offset),void 0!==s.repeat&&c.repeat.fromArray(s.repeat),void 0!==s.wrap&&(c.wrapS=i(s.wrap[0]),c.wrapT=i(s.wrap[1])),void 0!==s.minFilter&&(c.minFilter=i(s.minFilter)),void 0!==s.magFilter&&(c.magFilter=i(s.magFilter)),void 0!==s.anisotropy&&(c.anisotropy=s.anisotropy),void 0!==s.flipY&&(c.flipY=s.flipY),r[s.uuid]=c}return r},parseObject:function(){var t=new a;return function(e,i,n){function r(t){return void 0===i[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),i[t]}function a(t){if(void 0!==t)return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),n[t]}var o;switch(e.type){case"Scene":o=new ue,void 0!==e.background&&Number.isInteger(e.background)&&(o.background=new THREE.Color(e.background)),void 0!==e.fog&&("Fog"===e.fog.type?o.fog=new le(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(o.fog=new he(e.fog.color,e.fog.density)));break;case"PerspectiveCamera":o=new oe(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(o.focus=e.focus),void 0!==e.zoom&&(o.zoom=e.zoom),void 0!==e.filmGauge&&(o.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(o.filmOffset=e.filmOffset),void 0!==e.view&&(o.view=Object.assign({},e.view));break;case"OrthographicCamera":o=new se(e.left,e.right,e.top,e.bottom,e.near,e.far);break;case"AmbientLight":o=new ti(e.color,e.intensity);break;case"DirectionalLight":o=new $e(e.color,e.intensity);break;case"PointLight":o=new Qe(e.color,e.intensity,e.distance,e.decay);break;case"SpotLight":o=new Je(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":o=new Ye(e.color,e.groundColor,e.intensity);break;case"Mesh":var s=r(e.geometry),c=a(e.material);o=s.bones&&s.bones.length>0?new xe(s,c):new ne(s,c);break;case"LOD":o=new me;break;case"Line":o=new be(r(e.geometry),a(e.material),e.mode);break;case"LineSegments":o=new we(r(e.geometry),a(e.material));break;case"PointCloud":case"Points":o=new Ee(r(e.geometry),a(e.material));break;case"Sprite":o=new fe(a(e.material));break;case"Group":o=new Te;break;default:o=new Ft}if(o.uuid=e.uuid,void 0!==e.name&&(o.name=e.name),void 0!==e.matrix?(t.fromArray(e.matrix),t.decompose(o.position,o.quaternion,o.scale)):(void 0!==e.position&&o.position.fromArray(e.position),void 0!==e.rotation&&o.rotation.fromArray(e.rotation),void 0!==e.quaternion&&o.quaternion.fromArray(e.quaternion),void 0!==e.scale&&o.scale.fromArray(e.scale)),
  void 0!==e.castShadow&&(o.castShadow=e.castShadow),void 0!==e.receiveShadow&&(o.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(o.shadow.bias=e.shadow.bias),void 0!==e.shadow.radius&&(o.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&o.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(o.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(o.visible=e.visible),void 0!==e.userData&&(o.userData=e.userData),void 0!==e.children)for(var h in e.children)o.add(this.parseObject(e.children[h],i,n));if("LOD"===e.type)for(var l=e.levels,u=0;u<l.length;u++){var p=l[u],h=o.getObjectByProperty("uuid",p.object);void 0!==h&&o.addLevel(h,p.distance)}return o}}()}),t.ShapeUtils={area:function(t){for(var e=t.length,i=0,n=e-1,r=0;r<e;n=r++)i+=t[n].x*t[r].y-t[r].x*t[n].y;return.5*i},triangulate:function(){function e(t,e,i,n,r,a){var o,s,c,h,l,u,p,d,f;if(s=t[a[e]].x,c=t[a[e]].y,h=t[a[i]].x,l=t[a[i]].y,u=t[a[n]].x,p=t[a[n]].y,Number.EPSILON>(h-s)*(p-c)-(l-c)*(u-s))return!1;var m,v,g,y,x,_,b,w,M,E,T,S,A,L,R;for(m=u-h,v=p-l,g=s-u,y=c-p,x=h-s,_=l-c,o=0;o<r;o++)if(d=t[a[o]].x,f=t[a[o]].y,!(d===s&&f===c||d===h&&f===l||d===u&&f===p)&&(b=d-s,w=f-c,M=d-h,E=f-l,T=d-u,S=f-p,R=m*E-v*M,A=x*w-_*b,L=g*S-y*T,R>=-Number.EPSILON&&L>=-Number.EPSILON&&A>=-Number.EPSILON))return!1;return!0}return function(i,n){var r=i.length;if(r<3)return null;var a,o,s,c=[],h=[],l=[];if(t.ShapeUtils.area(i)>0)for(o=0;o<r;o++)h[o]=o;else for(o=0;o<r;o++)h[o]=r-1-o;var u=r,p=2*u;for(o=u-1;u>2;){if(p--<=0)return console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()"),n?l:c;if(a=o,u<=a&&(a=0),o=a+1,u<=o&&(o=0),s=o+1,u<=s&&(s=0),e(i,a,o,s,u,h)){var d,f,m,v,g;for(d=h[a],f=h[o],m=h[s],c.push([i[d],i[f],i[m]]),l.push([h[a],h[o],h[s]]),v=o,g=o+1;g<u;v++,g++)h[v]=h[g];u--,p=2*u}}return n?l:c}}(),triangulateShape:function(e,i){function n(t){var e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function r(t,e,i){return t.x!==e.x?t.x<e.x?t.x<=i.x&&i.x<=e.x:e.x<=i.x&&i.x<=t.x:t.y<e.y?t.y<=i.y&&i.y<=e.y:e.y<=i.y&&i.y<=t.y}function a(t,e,i,n,a){var o=e.x-t.x,s=e.y-t.y,c=n.x-i.x,h=n.y-i.y,l=t.x-i.x,u=t.y-i.y,p=s*c-o*h,d=s*l-o*u;if(Math.abs(p)>Number.EPSILON){var f;if(p>0){if(d<0||d>p)return[];if(f=h*l-c*u,f<0||f>p)return[]}else{if(d>0||d<p)return[];if(f=h*l-c*u,f>0||f<p)return[]}if(0===f)return!a||0!==d&&d!==p?[t]:[];if(f===p)return!a||0!==d&&d!==p?[e]:[];if(0===d)return[i];if(d===p)return[n];var m=f/p;return[{x:t.x+m*o,y:t.y+m*s}]}if(0!==d||h*l!==c*u)return[];var v=0===o&&0===s,g=0===c&&0===h;if(v&&g)return t.x!==i.x||t.y!==i.y?[]:[t];if(v)return r(i,n,t)?[t]:[];if(g)return r(t,e,i)?[i]:[];var y,x,_,b,w,M,E,T;return 0!==o?(t.x<e.x?(y=t,_=t.x,x=e,b=e.x):(y=e,_=e.x,x=t,b=t.x),i.x<n.x?(w=i,E=i.x,M=n,T=n.x):(w=n,E=n.x,M=i,T=i.x)):(t.y<e.y?(y=t,_=t.y,x=e,b=e.y):(y=e,_=e.y,x=t,b=t.y),i.y<n.y?(w=i,E=i.y,M=n,T=n.y):(w=n,E=n.y,M=i,T=i.y)),_<=E?b<E?[]:b===E?a?[]:[w]:b<=T?[w,x]:[w,M]:_>T?[]:_===T?a?[]:[y]:b<=T?[y,x]:[y,M]}function o(t,e,i,n){var r=e.x-t.x,a=e.y-t.y,o=i.x-t.x,s=i.y-t.y,c=n.x-t.x,h=n.y-t.y,l=r*s-a*o,u=r*h-a*c;if(Math.abs(l)>Number.EPSILON){var p=c*s-h*o;return l>0?u>=0&&p>=0:u>=0||p>=0}return u>0}function s(t,e){function i(t,e){var i=y.length-1,n=t-1;n<0&&(n=i);var r=t+1;r>i&&(r=0);var a=o(y[t],y[n],y[r],s[e]);if(!a)return!1;var c=s.length-1,h=e-1;h<0&&(h=c);var l=e+1;return l>c&&(l=0),a=o(s[e],s[h],s[l],y[t]),!!a}function n(t,e){var i,n,r;for(i=0;i<y.length;i++)if(n=i+1,n%=y.length,r=a(t,e,y[i],y[n],!0),r.length>0)return!0;return!1}function r(t,i){var n,r,o,s,c;for(n=0;n<x.length;n++)for(r=e[x[n]],o=0;o<r.length;o++)if(s=o+1,s%=r.length,c=a(t,i,r[o],r[s],!0),c.length>0)return!0;return!1}for(var s,c,h,l,u,p,d,f,m,v,g,y=t.concat(),x=[],_=[],b=0,w=e.length;b<w;b++)x.push(b);for(var M=0,E=2*x.length;x.length>0;){if(E--,E<0){console.log("Infinite Loop! Holes left:"+x.length+", Probably Hole outside Shape!");break}for(h=M;h<y.length;h++){l=y[h],c=-1;for(var b=0;b<x.length;b++)if(p=x[b],d=l.x+":"+l.y+":"+p,void 0===_[d]){s=e[p];for(var T=0;T<s.length;T++)if(u=s[T],i(h,T)&&!n(l,u)&&!r(l,u)){c=T,x.splice(b,1),f=y.slice(0,h+1),m=y.slice(h),v=s.slice(c),g=s.slice(0,c+1),y=f.concat(v).concat(g).concat(m),M=h;break}if(c>=0)break;_[d]=!0}if(c>=0)break}}return y}n(e),i.forEach(n);for(var c,h,l,u,p,d,f={},m=e.concat(),v=0,g=i.length;v<g;v++)Array.prototype.push.apply(m,i[v]);for(c=0,h=m.length;c<h;c++)p=m[c].x+":"+m[c].y,void 0!==f[p]&&console.warn("THREE.ShapeUtils: Duplicate point",p,c),f[p]=c;var y=s(e,i),x=t.ShapeUtils.triangulate(y,!1);for(c=0,h=x.length;c<h;c++)for(u=x[c],l=0;l<3;l++)p=u[l].x+":"+u[l].y,d=f[p],void 0!==d&&(u[l]=d);return x.concat()},isClockWise:function(e){return t.ShapeUtils.area(e)<0},b2:function(){function t(t,e){var i=1-t;return i*i*e}function e(t,e){return 2*(1-t)*t*e}function i(t,e){return t*t*e}return function(n,r,a,o){return t(n,r)+e(n,a)+i(n,o)}}(),b3:function(){function t(t,e){var i=1-t;return i*i*i*e}function e(t,e){var i=1-t;return 3*i*i*t*e}function i(t,e){var i=1-t;return 3*i*t*t*e}function n(t,e){return t*t*t*e}return function(r,a,o,s,c){return t(r,a)+e(r,o)+i(r,s)+n(r,c)}}()},_i.prototype={constructor:_i,getPoint:function(t){return console.warn("THREE.Curve: Warning, getPoint() not implemented!"),null},getPointAt:function(t){var e=this.getUtoTmapping(t);return this.getPoint(e)},getPoints:function(t){t||(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getSpacedPoints:function(t){t||(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPointAt(i/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(t||(t=this.__arcLengthDivisions?this.__arcLengthDivisions:200),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i,n=[],r=this.getPoint(0),a=0;for(n.push(0),i=1;i<=t;i++)e=this.getPoint(i/t),a+=e.distanceTo(r),n.push(a),r=e;return this.cacheArcLengths=n,n},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var i,n=this.getLengths(),r=0,a=n.length;i=e?e:t*n[a-1];for(var o,s=0,c=a-1;s<=c;)if(r=Math.floor(s+(c-s)/2),o=n[r]-i,o<0)s=r+1;else{if(!(o>0)){c=r;break}c=r-1}if(r=c,n[r]===i){var h=r/(a-1);return h}var l=n[r],u=n[r+1],p=u-l,d=(i-l)/p,h=(r+d)/(a-1);return h},getTangent:function(t){var e=1e-4,i=t-e,n=t+e;i<0&&(i=0),n>1&&(n=1);var r=this.getPoint(i),a=this.getPoint(n),o=a.clone().sub(r);return o.normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)}},_i.create=function(t,e){return t.prototype=Object.create(_i.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},bi.prototype=Object.create(_i.prototype),bi.prototype.constructor=bi,bi.prototype.isLineCurve=!0,bi.prototype.getPoint=function(t){if(1===t)return this.v2.clone();var e=this.v2.clone().sub(this.v1);return e.multiplyScalar(t).add(this.v1),e},bi.prototype.getPointAt=function(t){return this.getPoint(t)},bi.prototype.getTangent=function(t){var e=this.v2.clone().sub(this.v1);return e.normalize()},wi.prototype=Object.assign(Object.create(_i.prototype),{constructor:wi,add:function(t){this.curves.push(t)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new bi(e,t))},getPoint:function(t){for(var e=t*this.getLength(),i=this.getCurveLengths(),n=0;n<i.length;){if(i[n]>=e){var r=i[n]-e,a=this.curves[n],o=a.getLength(),s=0===o?0:1-r/o;return a.getPointAt(s)}n++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,i=0,n=this.curves.length;i<n;i++)e+=this.curves[i].getLength(),t.push(e);return this.cacheLengths=t,t},getSpacedPoints:function(t){t||(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e,i=[],n=0,r=this.curves;n<r.length;n++)for(var a=r[n],o=a&&a.isEllipseCurve?2*t:a&&a.isLineCurve?1:a&&a.isSplineCurve?t*a.points.length:t,s=a.getPoints(o),c=0;c<s.length;c++){var h=s[c];e&&e.equals(h)||(i.push(h),e=h)}return this.autoClose&&i.length>1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},createPointsGeometry:function(t){var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){for(var e=new Bt,i=0,n=t.length;i<n;i++){var r=t[i];e.vertices.push(new s(r.x,r.y,r.z||0))}return e}}),Mi.prototype=Object.create(_i.prototype),Mi.prototype.constructor=Mi,Mi.prototype.isEllipseCurve=!0,Mi.prototype.getPoint=function(t){for(var e=2*Math.PI,n=this.aEndAngle-this.aStartAngle,r=Math.abs(n)<Number.EPSILON;n<0;)n+=e;for(;n>e;)n-=e;n<Number.EPSILON&&(n=r?0:e),this.aClockwise!==!0||r||(n===e?n=-e:n-=e);var a=this.aStartAngle+t*n,o=this.aX+this.xRadius*Math.cos(a),s=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){var c=Math.cos(this.aRotation),h=Math.sin(this.aRotation),l=o-this.aX,u=s-this.aY;o=l*c-u*h+this.aX,s=l*h+u*c+this.aY}return new i(o,s)},t.CurveUtils={tangentQuadraticBezier:function(t,e,i,n){return 2*(1-t)*(i-e)+2*t*(n-i)},tangentCubicBezier:function(t,e,i,n,r){return-3*e*(1-t)*(1-t)+3*i*(1-t)*(1-t)-6*t*i*(1-t)+6*t*n*(1-t)-3*t*t*n+3*t*t*r},tangentSpline:function(t,e,i,n,r){var a=6*t*t-6*t,o=3*t*t-4*t+1,s=-6*t*t+6*t,c=3*t*t-2*t;return a+o+s+c},interpolate:function(t,e,i,n,r){var a=.5*(i-t),o=.5*(n-e),s=r*r,c=r*s;return(2*e-2*i+a+o)*c+(-3*e+3*i-2*a-o)*s+a*r+e}},Ei.prototype=Object.create(_i.prototype),Ei.prototype.constructor=Ei,Ei.prototype.isSplineCurve=!0,Ei.prototype.getPoint=function(e){var n=this.points,r=(n.length-1)*e,a=Math.floor(r),o=r-a,s=n[0===a?a:a-1],c=n[a],h=n[a>n.length-2?n.length-1:a+1],l=n[a>n.length-3?n.length-1:a+2],u=t.CurveUtils.interpolate;return new i(u(s.x,c.x,h.x,l.x,o),u(s.y,c.y,h.y,l.y,o))},Ti.prototype=Object.create(_i.prototype),Ti.prototype.constructor=Ti,Ti.prototype.getPoint=function(e){var n=t.ShapeUtils.b3;return new i(n(e,this.v0.x,this.v1.x,this.v2.x,this.v3.x),n(e,this.v0.y,this.v1.y,this.v2.y,this.v3.y))},Ti.prototype.getTangent=function(e){var n=t.CurveUtils.tangentCubicBezier;return new i(n(e,this.v0.x,this.v1.x,this.v2.x,this.v3.x),n(e,this.v0.y,this.v1.y,this.v2.y,this.v3.y)).normalize()},Si.prototype=Object.create(_i.prototype),Si.prototype.constructor=Si,Si.prototype.getPoint=function(e){var n=t.ShapeUtils.b2;return new i(n(e,this.v0.x,this.v1.x,this.v2.x),n(e,this.v0.y,this.v1.y,this.v2.y))},Si.prototype.getTangent=function(e){var n=t.CurveUtils.tangentQuadraticBezier;return new i(n(e,this.v0.x,this.v1.x,this.v2.x),n(e,this.v0.y,this.v1.y,this.v2.y)).normalize()};var zc=Object.assign(Object.create(wi.prototype),{fromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,i=t.length;e<i;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var n=new bi(this.currentPoint.clone(),new i(t,e));this.curves.push(n),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,n,r){var a=new Si(this.currentPoint.clone(),new i(t,e),new i(n,r));this.curves.push(a),this.currentPoint.set(n,r)},bezierCurveTo:function(t,e,n,r,a,o){var s=new Ti(this.currentPoint.clone(),new i(t,e),new i(n,r),new i(a,o));this.curves.push(s),this.currentPoint.set(a,o)},splineThru:function(t){var e=[this.currentPoint.clone()].concat(t),i=new Ei(e);this.curves.push(i),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,i,n,r,a){var o=this.currentPoint.x,s=this.currentPoint.y;this.absarc(t+o,e+s,i,n,r,a)},absarc:function(t,e,i,n,r,a){this.absellipse(t,e,i,i,n,r,a)},ellipse:function(t,e,i,n,r,a,o,s){var c=this.currentPoint.x,h=this.currentPoint.y;this.absellipse(t+c,e+h,i,n,r,a,o,s)},absellipse:function(t,e,i,n,r,a,o,s){var c=new Mi(t,e,i,n,r,a,o,s);if(this.curves.length>0){var h=c.getPoint(0);h.equals(this.currentPoint)||this.lineTo(h.x,h.y)}this.curves.push(c);var l=c.getPoint(1);this.currentPoint.copy(l)}});Ai.prototype=Object.create(Bt.prototype),Ai.prototype.constructor=Ai,Ai.NoTaper=function(t){return 1},Ai.SinusoidalTaper=function(t){return Math.sin(Math.PI*t)},Ai.FrenetFrames=function(e,i,n){function r(){v[0]=new s,g[0]=new s,c=Number.MAX_VALUE,h=Math.abs(m[0].x),l=Math.abs(m[0].y),u=Math.abs(m[0].z),h<=c&&(c=h,f.set(1,0,0)),l<=c&&(c=l,f.set(0,1,0)),u<=c&&f.set(0,0,1),y.crossVectors(m[0],f).normalize(),v[0].crossVectors(m[0],y),g[0].crossVectors(m[0],v[0])}var o,c,h,l,u,p,d,f=new s,m=[],v=[],g=[],y=new s,x=new a,_=i+1;for(this.tangents=m,this.normals=v,this.binormals=g,p=0;p<_;p++)d=p/(_-1),m[p]=e.getTangentAt(d),m[p].normalize();for(r(),p=1;p<_;p++)v[p]=v[p-1].clone(),g[p]=g[p-1].clone(),y.crossVectors(m[p-1],m[p]),y.length()>Number.EPSILON&&(y.normalize(),o=Math.acos(t.Math.clamp(m[p-1].dot(m[p]),-1,1)),v[p].applyMatrix4(x.makeRotationAxis(y,o))),g[p].crossVectors(m[p],v[p]);if(n)for(o=Math.acos(t.Math.clamp(v[0].dot(v[_-1]),-1,1)),o/=_-1,m[0].dot(y.crossVectors(v[0],v[_-1]))>0&&(o=-o),p=1;p<_;p++)v[p].applyMatrix4(x.makeRotationAxis(m[p],o*p)),g[p].crossVectors(m[p],v[p])},Li.prototype=Object.create(Bt.prototype),Li.prototype.constructor=Li,Li.prototype.addShapeList=function(t,e){for(var i=t.length,n=0;n<i;n++){var r=t[n];this.addShape(r,e)}},Li.prototype.addShape=function(e,n){function r(t,e,i){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(i).add(t)}function a(t,e,n){var r,a,o=1,s=t.x-e.x,c=t.y-e.y,h=n.x-t.x,l=n.y-t.y,u=s*s+c*c,p=s*l-c*h;if(Math.abs(p)>Number.EPSILON){var d=Math.sqrt(u),f=Math.sqrt(h*h+l*l),m=e.x-c/d,v=e.y+s/d,g=n.x-l/f,y=n.y+h/f,x=((g-m)*l-(y-v)*h)/(s*l-c*h);r=m+s*x-t.x,a=v+c*x-t.y;var _=r*r+a*a;if(_<=2)return new i(r,a);o=Math.sqrt(_/2)}else{var b=!1;s>Number.EPSILON?h>Number.EPSILON&&(b=!0):s<-Number.EPSILON?h<-Number.EPSILON&&(b=!0):Math.sign(c)===Math.sign(l)&&(b=!0),b?(r=-c,a=s,o=Math.sqrt(u)):(r=s,a=c,o=Math.sqrt(u/2))}return new i(r/o,a/o)}function o(){if(w){var t=0,e=W*t;for(q=0;q<X;q++)j=F[q],u(j[2]+e,j[1]+e,j[0]+e);for(t=E+2*b,e=W*t,q=0;q<X;q++)j=F[q],u(j[0]+e,j[1]+e,j[2]+e)}else{for(q=0;q<X;q++)j=F[q],u(j[2],j[1],j[0]);for(q=0;q<X;q++)j=F[q],u(j[0]+W*E,j[1]+W*E,j[2]+W*E)}}function c(){var t=0;for(h(z,t),t+=z.length,R=0,P=N.length;R<P;R++)L=N[R],h(L,t),t+=L.length}function h(t,e){var i,n;for(q=t.length;--q>=0;){i=q,n=q-1,n<0&&(n=t.length-1);var r=0,a=E+2*b;for(r=0;r<a;r++){var o=W*r,s=W*(r+1),c=e+i+o,h=e+n+o,l=e+n+s,u=e+i+s;p(c,h,l,u,t,r,a,i,n)}}}function l(t,e,i){C.vertices.push(new s(t,e,i))}function u(t,e,i){t+=U,e+=U,i+=U,C.faces.push(new Dt(t,e,i,null,null,0));var n=A.generateTopUV(C,t,e,i);C.faceVertexUvs[0].push(n)}function p(t,e,i,n,r,a,o,s,c){t+=U,e+=U,i+=U,n+=U,C.faces.push(new Dt(t,e,n,null,null,1)),C.faces.push(new Dt(e,i,n,null,null,1));var h=A.generateSideWallUV(C,t,e,i,n);C.faceVertexUvs[0].push([h[0],h[1],h[3]]),C.faceVertexUvs[0].push([h[1],h[2],h[3]])}var d,f,m,v,g,y=void 0!==n.amount?n.amount:100,x=void 0!==n.bevelThickness?n.bevelThickness:6,_=void 0!==n.bevelSize?n.bevelSize:x-2,b=void 0!==n.bevelSegments?n.bevelSegments:3,w=void 0===n.bevelEnabled||n.bevelEnabled,M=void 0!==n.curveSegments?n.curveSegments:12,E=void 0!==n.steps?n.steps:1,T=n.extrudePath,S=!1,A=void 0!==n.UVGenerator?n.UVGenerator:Li.WorldUVGenerator;T&&(d=T.getSpacedPoints(E),S=!0,w=!1,f=void 0!==n.frames?n.frames:new Ai.FrenetFrames(T,E,(!1)),m=new s,v=new s,g=new s),w||(b=0,x=0,_=0);var L,R,P,C=this,U=this.vertices.length,I=e.extractPoints(M),D=I.shape,N=I.holes,O=!t.ShapeUtils.isClockWise(D);if(O){for(D=D.reverse(),R=0,P=N.length;R<P;R++)L=N[R],t.ShapeUtils.isClockWise(L)&&(N[R]=L.reverse());O=!1}var F=t.ShapeUtils.triangulateShape(D,N),z=D;for(R=0,P=N.length;R<P;R++)L=N[R],D=D.concat(L);for(var B,G,H,V,k,j,W=D.length,X=F.length,Y=[],q=0,Z=z.length,J=Z-1,Q=q+1;q<Z;q++,J++,Q++)J===Z&&(J=0),Q===Z&&(Q=0),Y[q]=a(z[q],z[J],z[Q]);var K,$=[],tt=Y.concat();for(R=0,P=N.length;R<P;R++){for(L=N[R],K=[],q=0,Z=L.length,J=Z-1,Q=q+1;q<Z;q++,J++,Q++)J===Z&&(J=0),Q===Z&&(Q=0),K[q]=a(L[q],L[J],L[Q]);$.push(K),tt=tt.concat(K)}for(B=0;B<b;B++){for(H=B/b,V=x*Math.cos(H*Math.PI/2),G=_*Math.sin(H*Math.PI/2),q=0,Z=z.length;q<Z;q++)k=r(z[q],Y[q],G),l(k.x,k.y,-V);for(R=0,P=N.length;R<P;R++)for(L=N[R],K=$[R],q=0,Z=L.length;q<Z;q++)k=r(L[q],K[q],G),l(k.x,k.y,-V)}for(G=_,q=0;q<W;q++)k=w?r(D[q],tt[q],G):D[q],S?(v.copy(f.normals[0]).multiplyScalar(k.x),m.copy(f.binormals[0]).multiplyScalar(k.y),g.copy(d[0]).add(v).add(m),l(g.x,g.y,g.z)):l(k.x,k.y,0);var et;for(et=1;et<=E;et++)for(q=0;q<W;q++)k=w?r(D[q],tt[q],G):D[q],S?(v.copy(f.normals[et]).multiplyScalar(k.x),m.copy(f.binormals[et]).multiplyScalar(k.y),g.copy(d[et]).add(v).add(m),l(g.x,g.y,g.z)):l(k.x,k.y,y/E*et);for(B=b-1;B>=0;B--){for(H=B/b,V=x*Math.cos(H*Math.PI/2),G=_*Math.sin(H*Math.PI/2),q=0,Z=z.length;q<Z;q++)k=r(z[q],Y[q],G),l(k.x,k.y,y+V);for(R=0,P=N.length;R<P;R++)for(L=N[R],K=$[R],q=0,Z=L.length;q<Z;q++)k=r(L[q],K[q],G),S?l(k.x,k.y+d[E-1].y,d[E-1].x+V):l(k.x,k.y,y+V)}o(),c()},Li.WorldUVGenerator={generateTopUV:function(t,e,n,r){var a=t.vertices,o=a[e],s=a[n],c=a[r];return[new i(o.x,o.y),new i(s.x,s.y),new i(c.x,c.y)]},generateSideWallUV:function(t,e,n,r,a){var o=t.vertices,s=o[e],c=o[n],h=o[r],l=o[a];return Math.abs(s.y-c.y)<.01?[new i(s.x,1-s.z),new i(c.x,1-c.z),new i(h.x,1-h.z),new i(l.x,1-l.z)]:[new i(s.y,1-s.z),new i(c.y,1-c.z),new i(h.y,1-h.z),new i(l.y,1-l.z)]}},Ri.prototype=Object.create(Bt.prototype),Ri.prototype.constructor=Ri,Ri.prototype.addShapeList=function(t,e){for(var i=0,n=t.length;i<n;i++)this.addShape(t[i],e);return this},Ri.prototype.addShape=function(e,i){void 0===i&&(i={});var n,r,a,o=void 0!==i.curveSegments?i.curveSegments:12,c=i.material,h=void 0===i.UVGenerator?Li.WorldUVGenerator:i.UVGenerator,l=this.vertices.length,u=e.extractPoints(o),p=u.shape,d=u.holes,f=!t.ShapeUtils.isClockWise(p);if(f){for(p=p.reverse(),n=0,r=d.length;n<r;n++)a=d[n],t.ShapeUtils.isClockWise(a)&&(d[n]=a.reverse());f=!1}var m=t.ShapeUtils.triangulateShape(p,d);for(n=0,r=d.length;n<r;n++)a=d[n],p=p.concat(a);var v,g,y=p.length,x=m.length;for(n=0;n<y;n++)v=p[n],this.vertices.push(new s(v.x,v.y,0));for(n=0;n<x;n++){g=m[n];var _=g[0]+l,b=g[1]+l,w=g[2]+l;this.faces.push(new Dt(_,b,w,null,null,c)),this.faceVertexUvs[0].push(h.generateTopUV(this,_,b,w))}},Pi.prototype=Object.assign(Object.create(zc),{constructor:Pi,extrude:function(t){return new Li(this,t)},makeGeometry:function(t){return new Ri(this,t)},getPointsHoles:function(t){for(var e=[],i=0,n=this.holes.length;i<n;i++)e[i]=this.holes[i].getPoints(t);return e},extractAllPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},extractPoints:function(t){return this.extractAllPoints(t)}}),Ci.prototype=zc,zc.constructor=Ci,Ui.prototype={moveTo:function(t,e){this.currentPath=new Ci,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,i,n){this.currentPath.quadraticCurveTo(t,e,i,n)},bezierCurveTo:function(t,e,i,n,r,a){this.currentPath.bezierCurveTo(t,e,i,n,r,a)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(e,i){function n(t){for(var e=[],i=0,n=t.length;i<n;i++){var r=t[i],a=new Pi;a.curves=r.curves,e.push(a)}return e}function r(t,e){for(var i=e.length,n=!1,r=i-1,a=0;a<i;r=a++){var o=e[r],s=e[a],c=s.x-o.x,h=s.y-o.y;if(Math.abs(h)>Number.EPSILON){if(h<0&&(o=e[a],c=-c,s=e[r],h=-h),t.y<o.y||t.y>s.y)continue;if(t.y===o.y){if(t.x===o.x)return!0}else{var l=h*(t.x-o.x)-c*(t.y-o.y);if(0===l)return!0;if(l<0)continue;n=!n}}else{if(t.y!==o.y)continue;if(s.x<=t.x&&t.x<=o.x||o.x<=t.x&&t.x<=s.x)return!0}}return n}var a=t.ShapeUtils.isClockWise,o=this.subPaths;if(0===o.length)return[];if(i===!0)return n(o);var s,c,h,l=[];if(1===o.length)return c=o[0],h=new Pi,h.curves=c.curves,l.push(h),l;var u=!a(o[0].getPoints());u=e?!u:u;var p,d=[],f=[],m=[],v=0;f[v]=void 0,m[v]=[];for(var g=0,y=o.length;g<y;g++)c=o[g],p=c.getPoints(),s=a(p),s=e?!s:s,s?(!u&&f[v]&&v++,f[v]={s:new Pi,p:p},f[v].s.curves=c.curves,u&&v++,m[v]=[]):m[v].push({h:c,p:p[0]});if(!f[0])return n(o);if(f.length>1){for(var x=!1,_=[],b=0,w=f.length;b<w;b++)d[b]=[];for(var b=0,w=f.length;b<w;b++)for(var M=m[b],E=0;E<M.length;E++){for(var T=M[E],S=!0,A=0;A<f.length;A++)r(T.p,f[A].p)&&(b!==A&&_.push({froms:b,tos:A,hole:E}),S?(S=!1,d[A].push(T)):x=!0);S&&d[b].push(T)}_.length>0&&(x||(m=d))}for(var L,g=0,R=f.length;g<R;g++){h=f[g].s,l.push(h),L=m[g];for(var P=0,C=L.length;P<C;P++)h.holes.push(L[P].h)}return l}},Object.assign(Ii.prototype,{isFont:!0,generateShapes:function(e,i,n){function r(t){for(var e=String(t).split(""),n=i/o.resolution,r=0,s=[],c=0;c<e.length;c++){var h=a(e[c],n,r);r+=h.offset,s.push(h.path)}return s}function a(e,i,r){var a=o.glyphs[e]||o.glyphs["?"];if(a){var s,c,h,l,u,p,d,f,m,v,g,y=new Ui,x=[],_=t.ShapeUtils.b2,b=t.ShapeUtils.b3;if(a.o)for(var w=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),M=0,E=w.length;M<E;){var T=w[M++];switch(T){case"m":s=w[M++]*i+r,c=w[M++]*i,y.moveTo(s,c);break;case"l":s=w[M++]*i+r,c=w[M++]*i,y.lineTo(s,c);break;case"q":if(h=w[M++]*i+r,l=w[M++]*i,d=w[M++]*i+r,f=w[M++]*i,y.quadraticCurveTo(d,f,h,l),g=x[x.length-1]){u=g.x,p=g.y;for(var S=1;S<=n;S++){var A=S/n;_(A,u,d,h),_(A,p,f,l)}}break;case"b":if(h=w[M++]*i+r,l=w[M++]*i,d=w[M++]*i+r,f=w[M++]*i,m=w[M++]*i+r,v=w[M++]*i,y.bezierCurveTo(d,f,m,v,h,l),g=x[x.length-1]){u=g.x,p=g.y;for(var S=1;S<=n;S++){var A=S/n;b(A,u,d,m,h),b(A,p,f,v,l)}}}}return{offset:a.ha*i,path:y}}}void 0===i&&(i=100),void 0===n&&(n=4);for(var o=this.data,s=r(e),c=[],h=0,l=s.length;h<l;h++)Array.prototype.push.apply(c,s[h].toShapes());return c}}),Object.assign(Di.prototype,{load:function(t,e,i,n){var r=this,a=new Ge(this.manager);a.load(t,function(t){var i;try{i=JSON.parse(t)}catch(n){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),i=JSON.parse(t.substring(65,t.length-2))}var a=r.parse(i);e&&e(a)},i,n)},parse:function(t){return new Ii(t)}});var Bc;Object.assign(Oi.prototype,{load:function(t,e,i,n){var r=new Ge(this.manager);r.setResponseType("arraybuffer"),r.load(t,function(t){var i=Ni();i.decodeAudioData(t,function(t){e(t)})},i,n)}}),Object.assign(Fi.prototype,{update:function(){var e,i,n,r,o,s=new a,c=new a;return function(a){var h=e!==a.focus||i!==a.fov||n!==a.aspect*this.aspect||r!==a.near||o!==a.far;if(h){e=a.focus,i=a.fov,n=a.aspect*this.aspect,r=a.near,o=a.far;var l,u,p=a.projectionMatrix.clone(),d=this.eyeSep/2,f=d*r/e,m=r*Math.tan(t.Math.DEG2RAD*i*.5);c.elements[12]=-d,s.elements[12]=d,l=-m*n+f,u=m*n+f,p.elements[0]=2*r/(u-l),p.elements[8]=(u+l)/(u-l),this.cameraL.projectionMatrix.copy(p),l=-m*n-f,u=m*n-f,p.elements[0]=2*r/(u-l),p.elements[8]=(u+l)/(u-l),this.cameraR.projectionMatrix.copy(p)}this.cameraL.matrixWorld.copy(a.matrixWorld).multiply(c),this.cameraR.matrixWorld.copy(a.matrixWorld).multiply(s)}}()}),zi.prototype=Object.create(Ft.prototype),zi.prototype.constructor=zi,Bi.prototype=Object.assign(Object.create(Ft.prototype),{constructor:Bi,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(t){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){this.gain.gain.value=t},updateMatrixWorld:function(){var t=new s,e=new o,i=new s,n=new s;return function(r){Ft.prototype.updateMatrixWorld.call(this,r);var a=this.context.listener,o=this.up;this.matrixWorld.decompose(t,e,i),n.set(0,0,-1).applyQuaternion(e),a.setPosition(t.x,t.y,t.z),a.setOrientation(n.x,n.y,n.z,o.x,o.y,o.z)}}()}),Gi.prototype=Object.assign(Object.create(Ft.prototype),{constructor:Gi,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setBuffer:function(t){return this.source.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(this.isPlaying===!0)return void console.warn("THREE.Audio: Audio is already playing.");if(this.hasPlaybackControl===!1)return void console.warn("THREE.Audio: this Audio has no playback control.");var t=this.context.createBufferSource();return t.buffer=this.source.buffer,t.loop=this.source.loop,t.onended=this.source.onended,t.start(0,this.startTime),t.playbackRate.value=this.playbackRate,this.isPlaying=!0,this.source=t,this.connect()},pause:function(){return this.hasPlaybackControl===!1?void console.warn("THREE.Audio: this Audio has no playback control."):(this.source.stop(),this.startTime=this.context.currentTime,this.isPlaying=!1,this)},stop:function(){return this.hasPlaybackControl===!1?void console.warn("THREE.Audio: this Audio has no playback control."):(this.source.stop(),this.startTime=0,this.isPlaying=!1,this)},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),this.isPlaying===!0?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){return this.hasPlaybackControl===!1?void console.warn("THREE.Audio: this Audio has no playback control."):(this.playbackRate=t,this.isPlaying===!0&&(this.source.playbackRate.value=this.playbackRate),this)},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return this.hasPlaybackControl===!1?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.source.loop},setLoop:function(t){return this.hasPlaybackControl===!1?void console.warn("THREE.Audio: this Audio has no playback control."):void(this.source.loop=t)},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.value=t,this}}),Hi.prototype=Object.assign(Object.create(Gi.prototype),{constructor:Hi,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){this.panner.refDistance=t},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){this.panner.rolloffFactor=t},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){this.panner.distanceModel=t},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){this.panner.maxDistance=t},updateMatrixWorld:function(){var t=new s;return function(e){Ft.prototype.updateMatrixWorld.call(this,e),t.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(t.x,t.y,t.z)}}()}),Object.assign(Vi.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),i=0;i<e.length;i++)t+=e[i];return t/e.length}}),ki.prototype={constructor:ki,accumulate:function(t,e){var i=this.buffer,n=this.valueSize,r=t*n+n,a=this.cumulativeWeight;if(0===a){for(var o=0;o!==n;++o)i[r+o]=i[o];a=e}else{a+=e;var s=e/a;this._mixBufferRegion(i,r,0,s,n)}this.cumulativeWeight=a},apply:function(t){var e=this.valueSize,i=this.buffer,n=t*e+e,r=this.cumulativeWeight,a=this.binding;if(this.cumulativeWeight=0,r<1){var o=3*e;this._mixBufferRegion(i,n,o,1-r,e)}for(var s=e,c=e+e;s!==c;++s)if(i[s]!==i[s+e]){a.setValue(i,n);break}},saveOriginalState:function(){var t=this.binding,e=this.buffer,i=this.valueSize,n=3*i;t.getValue(e,n);for(var r=i,a=n;r!==a;++r)e[r]=e[n+r%i];this.cumulativeWeight=0},restoreOriginalState:function(){var t=3*this.valueSize;this.binding.setValue(this.buffer,t)},_select:function(t,e,i,n,r){if(n>=.5)for(var a=0;a!==r;++a)t[e+a]=t[i+a]},_slerp:function(t,e,i,n,r){o.slerpFlat(t,e,t,e,t,i,n)},_lerp:function(t,e,i,n,r){for(var a=1-n,o=0;o!==r;++o){var s=e+o;t[s]=t[s]*a+t[i+o]*n}}},ji.prototype={constructor:ji,getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,i=e.objectName,n=e.propertyName,r=e.propertyIndex;if(t||(t=ji.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t)return void console.error("  trying to update node for track: "+this.path+" but it wasn't found.");if(i){var a=e.objectIndex;switch(i){case"materials":if(!t.material)return void console.error("  can not bind to material as node does not have a material",this);if(!t.material.materials)return void console.error("  can not bind to material.materials as node.material does not have a materials array",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("  can not bind to bones as node does not have a skeleton",this);t=t.skeleton.bones;for(var o=0;o<t.length;o++)if(t[o].name===a){a=o;break}break;default:if(void 0===t[i])return void console.error("  can not bind to objectName of node, undefined",this);t=t[i]}if(void 0!==a){if(void 0===t[a])return void console.error("  trying to bind to objectIndex of objectName, but is undefined:",this,t);t=t[a]}}var s=t[n];if(void 0===s){var c=e.nodeName;return void console.error("  trying to update property for track: "+c+"."+n+" but it wasn't found.",t)}var h=this.Versioning.None;void 0!==t.needsUpdate?(h=this.Versioning.NeedsUpdate,this.targetObject=t):void 0!==t.matrixWorldNeedsUpdate&&(h=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=t);var l=this.BindingType.Direct;if(void 0!==r){if("morphTargetInfluences"===n){if(!t.geometry)return void console.error("  can not bind to morphTargetInfluences becasuse node does not have a geometry",this);if(!t.geometry.morphTargets)return void console.error("  can not bind to morphTargetInfluences becasuse node does not have a geometry.morphTargets",this);for(var o=0;o<this.node.geometry.morphTargets.length;o++)if(t.geometry.morphTargets[o].name===r){r=o;break}}l=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=r}else void 0!==s.fromArray&&void 0!==s.toArray?(l=this.BindingType.HasFromToArray,this.resolvedProperty=s):void 0!==s.length?(l=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=n;this.getValue=this.GetterByBindingType[l],this.setValue=this.SetterByBindingTypeAndVersioning[l][h]},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}},Object.assign(ji.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},_getValue_unbound:ji.prototype.getValue,_setValue_unbound:ji.prototype.setValue,BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)t[e++]=i[n]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e);
  }],SetterByBindingTypeAndVersioning:[[function(t,e){this.node[this.propertyName]=t[e]},function(t,e){this.node[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.node[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=t[e++]},function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]]}),ji.Composite=function(t,e,i){var n=i||ji.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,n)},ji.Composite.prototype={constructor:ji.Composite,getValue:function(t,e){this.bind();var i=this._targetGroup.nCachedObjects_,n=this._bindings[i];void 0!==n&&n.getValue(t,e)},setValue:function(t,e){for(var i=this._bindings,n=this._targetGroup.nCachedObjects_,r=i.length;n!==r;++n)i[n].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].unbind()}},ji.create=function(t,e,i){return t&&t.isAnimationObjectGroup?new ji.Composite(t,e,i):new ji(t,e,i)},ji.parseTrackName=function(t){var e=/^((?:\w+\/)*)(\w+)?(?:\.(\w+)(?:\[(.+)\])?)?\.(\w+)(?:\[(.+)\])?$/,i=e.exec(t);if(!i)throw new Error("cannot parse trackName at all: "+t);var n={nodeName:i[2],objectName:i[3],objectIndex:i[4],propertyName:i[5],propertyIndex:i[6]};if(null===n.propertyName||0===n.propertyName.length)throw new Error("can not parse propertyName from trackName: "+t);return n},ji.findNode=function(t,e){if(!e||""===e||"root"===e||"."===e||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){var i=function(t){for(var i=0;i<t.bones.length;i++){var n=t.bones[i];if(n.name===e)return n}return null},n=i(t.skeleton);if(n)return n}if(t.children){var r=function(t){for(var i=0;i<t.length;i++){var n=t[i];if(n.name===e||n.uuid===e)return n;var a=r(n.children);if(a)return a}return null},a=r(t.children);if(a)return a}return null},Wi.prototype={constructor:Wi,isAnimationObjectGroup:!0,add:function(t){for(var e=this._objects,i=e.length,n=this.nCachedObjects_,r=this._indicesByUUID,a=this._paths,o=this._parsedPaths,s=this._bindings,c=s.length,h=0,l=arguments.length;h!==l;++h){var u=arguments[h],p=u.uuid,d=r[p];if(void 0===d){d=i++,r[p]=d,e.push(u);for(var f=0,m=c;f!==m;++f)s[f].push(new ji(u,a[f],o[f]))}else if(d<n){var v=e[d],g=--n,y=e[g];r[y.uuid]=d,e[d]=y,r[p]=g,e[g]=u;for(var f=0,m=c;f!==m;++f){var x=s[f],_=x[g],b=x[d];x[d]=_,void 0===b&&(b=new ji(u,a[f],o[f])),x[g]=b}}else e[d]!==v&&console.error("Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes...")}this.nCachedObjects_=n},remove:function(t){for(var e=this._objects,i=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,a=r.length,o=0,s=arguments.length;o!==s;++o){var c=arguments[o],h=c.uuid,l=n[h];if(void 0!==l&&l>=i){var u=i++,p=e[u];n[p.uuid]=l,e[l]=p,n[h]=u,e[u]=c;for(var d=0,f=a;d!==f;++d){var m=r[d],v=m[u],g=m[l];m[l]=v,m[u]=g}}}this.nCachedObjects_=i},uncache:function(t){for(var e=this._objects,i=e.length,n=this.nCachedObjects_,r=this._indicesByUUID,a=this._bindings,o=a.length,s=0,c=arguments.length;s!==c;++s){var h=arguments[s],l=h.uuid,u=r[l];if(void 0!==u)if(delete r[l],u<n){var p=--n,d=e[p],f=--i,m=e[f];r[d.uuid]=u,e[u]=d,r[m.uuid]=p,e[p]=m,e.pop();for(var v=0,g=o;v!==g;++v){var y=a[v],x=y[p],_=y[f];y[u]=x,y[p]=_,y.pop()}}else{var f=--i,m=e[f];r[m.uuid]=u,e[u]=m,e.pop();for(var v=0,g=o;v!==g;++v){var y=a[v];y[u]=y[f],y.pop()}}}this.nCachedObjects_=n},subscribe_:function(t,e){var i=this._bindingsIndicesByPath,n=i[t],r=this._bindings;if(void 0!==n)return r[n];var a=this._paths,o=this._parsedPaths,s=this._objects,c=s.length,h=this.nCachedObjects_,l=new Array(c);n=r.length,i[t]=n,a.push(t),o.push(e),r.push(l);for(var u=h,p=s.length;u!==p;++u){var d=s[u];l[u]=new ji(d,t,e)}return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,i=e[t];if(void 0!==i){var n=this._paths,r=this._parsedPaths,a=this._bindings,o=a.length-1,s=a[o],c=t[o];e[c]=i,a[i]=s,a.pop(),r[i]=r[o],r.pop(),n[i]=n[o],n.pop()}}},Xi.prototype={constructor:Xi,play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,i){if(t.fadeOut(e),this.fadeIn(e),i){var n=this._clip.duration,r=t._clip.duration,a=r/n,o=n/r;t.warp(1,a,e),this.warp(o,1,e)}return this},crossFadeTo:function(t,e,i){return t.crossFadeFrom(this,e,i)},stopFading:function(){var t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,i){var n=this._mixer,r=n.time,a=this._timeScaleInterpolant,o=this.timeScale;null===a&&(a=n._lendControlInterpolant(),this._timeScaleInterpolant=a);var s=a.parameterPositions,c=a.sampleValues;return s[0]=r,s[1]=r+i,c[0]=t/o,c[1]=e/o,this},stopWarping:function(){var t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,i,n){var r=this._startTime;if(null!==r){var a=(t-r)*i;if(a<0||0===i)return;this._startTime=null,e=i*a}e*=this._updateTimeScale(t);var o=this._updateTime(e),s=this._updateWeight(t);if(s>0)for(var c=this._interpolants,h=this._propertyBindings,l=0,u=c.length;l!==u;++l)c[l].evaluate(o),h[l].accumulate(n,s)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var i=this._weightInterpolant;if(null!==i){var n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopFading(),0===n&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var i=this._timeScaleInterpolant;if(null!==i){var n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var i=this._clip.duration,n=this.loop,r=this._loopCount;if(n===no){r===-1&&(this.loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=i)e=i;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{var a=n===ao;if(r===-1&&(t>=0?(r=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),e>=i||e<0){var o=Math.floor(e/i);e-=i*o,r+=Math.abs(o);var s=this.repetitions-r;if(s<0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?i:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(0===s){var c=t<0;this._setEndings(c,!c,a)}else this._setEndings(!1,!1,a);this._loopCount=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:o})}}if(a&&1===(1&r))return this.time=e,i-e}return this.time=e,e},_setEndings:function(t,e,i){var n=this._interpolantSettings;i?(n.endingStart=lo,n.endingEnd=lo):(t?n.endingStart=this.zeroSlopeAtStart?lo:ho:n.endingStart=uo,e?n.endingEnd=this.zeroSlopeAtEnd?lo:ho:n.endingEnd=uo)},_scheduleFading:function(t,e,i){var n=this._mixer,r=n.time,a=this._weightInterpolant;null===a&&(a=n._lendControlInterpolant(),this._weightInterpolant=a);var o=a.parameterPositions,s=a.sampleValues;return o[0]=r,s[0]=e,o[1]=r+t,s[1]=i,this}},Object.assign(Yi.prototype,e.prototype,{clipAction:function(t,e){var i=e||this._root,n=i.uuid,r="string"==typeof t?fi.findByName(i,t):t,a=null!==r?r.uuid:t,o=this._actionsByClip[a],s=null;if(void 0!==o){var c=o.actionByRoot[n];if(void 0!==c)return c;s=o.knownActions[0],null===r&&(r=s._clip)}if(null===r)return null;var h=new Xi(this,r,e);return this._bindAction(h,s),this._addInactiveAction(h,a,n),h},existingAction:function(t,e){var i=e||this._root,n=i.uuid,r="string"==typeof t?fi.findByName(i,t):t,a=r?r.uuid:t,o=this._actionsByClip[a];return void 0!==o?o.actionByRoot[n]||null:null},stopAllAction:function(){var t=this._actions,e=this._nActiveActions,i=this._bindings,n=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var r=0;r!==e;++r)t[r].reset();for(var r=0;r!==n;++r)i[r].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,i=this._nActiveActions,n=this.time+=t,r=Math.sign(t),a=this._accuIndex^=1,o=0;o!==i;++o){var s=e[o];s.enabled&&s._update(n,t,r,a)}for(var c=this._bindings,h=this._nActiveBindings,o=0;o!==h;++o)c[o].apply(a);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions,i=t.uuid,n=this._actionsByClip,r=n[i];if(void 0!==r){for(var a=r.knownActions,o=0,s=a.length;o!==s;++o){var c=a[o];this._deactivateAction(c);var h=c._cacheIndex,l=e[e.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,l._cacheIndex=h,e[h]=l,e.pop(),this._removeInactiveBindingsForAction(c)}delete n[i]}},uncacheRoot:function(t){var e=t.uuid,i=this._actionsByClip;for(var n in i){var r=i[n].actionByRoot,a=r[e];void 0!==a&&(this._deactivateAction(a),this._removeInactiveAction(a))}var o=this._bindingsByRootAndName,s=o[e];if(void 0!==s)for(var c in s){var h=s[c];h.restoreOriginalState(),this._removeInactiveBinding(h)}},uncacheAction:function(t,e){var i=this.existingAction(t,e);null!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}}),Object.assign(Yi.prototype,{_bindAction:function(t,e){var i=t._localRoot||this._root,n=t._clip.tracks,r=n.length,a=t._propertyBindings,o=t._interpolants,s=i.uuid,c=this._bindingsByRootAndName,h=c[s];void 0===h&&(h={},c[s]=h);for(var l=0;l!==r;++l){var u=n[l],p=u.name,d=h[p];if(void 0!==d)a[l]=d;else{if(d=a[l],void 0!==d){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,p));continue}var f=e&&e._propertyBindings[l].binding.parsedPath;d=new ki(ji.create(i,p,f),u.ValueTypeName,u.getValueSize()),++d.referenceCount,this._addInactiveBinding(d,s,p),a[l]=d}o[l].resultBuffer=d.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,i=t._clip.uuid,n=this._actionsByClip[i];this._bindAction(t,n&&n.knownActions[0]),this._addInactiveAction(t,i,e)}for(var r=t._propertyBindings,a=0,o=r.length;a!==o;++a){var s=r[a];0===s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var r=e[i];0===--r.useCount&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e<this._nActiveActions},_addInactiveAction:function(t,e,i){var n=this._actions,r=this._actionsByClip,a=r[e];if(void 0===a)a={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,r[e]=a;else{var o=a.knownActions;t._byClipCacheIndex=o.length,o.push(t)}t._cacheIndex=n.length,n.push(t),a.actionByRoot[i]=t},_removeInactiveAction:function(t){var e=this._actions,i=e[e.length-1],n=t._cacheIndex;i._cacheIndex=n,e[n]=i,e.pop(),t._cacheIndex=null;var r=t._clip.uuid,a=this._actionsByClip,o=a[r],s=o.knownActions,c=s[s.length-1],h=t._byClipCacheIndex;c._byClipCacheIndex=h,s[h]=c,s.pop(),t._byClipCacheIndex=null;var l=o.actionByRoot,u=(e._localRoot||this._root).uuid;delete l[u],0===s.length&&delete a[r],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){for(var e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var r=e[i];0===--r.referenceCount&&this._removeInactiveBinding(r)}},_lendAction:function(t){var e=this._actions,i=t._cacheIndex,n=this._nActiveActions++,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_takeBackAction:function(t){var e=this._actions,i=t._cacheIndex,n=--this._nActiveActions,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_addInactiveBinding:function(t,e,i){var n=this._bindingsByRootAndName,r=n[e],a=this._bindings;void 0===r&&(r={},n[e]=r),r[i]=t,t._cacheIndex=a.length,a.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,i=t.binding,n=i.rootNode.uuid,r=i.path,a=this._bindingsByRootAndName,o=a[n],s=e[e.length-1],c=t._cacheIndex;s._cacheIndex=c,e[c]=s,e.pop(),delete o[r];t:{for(var h in o)break t;delete a[n]}},_lendBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=this._nActiveBindings++,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_takeBackBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=--this._nActiveBindings,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,i=t[e];return void 0===i&&(i=new ni(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),i.__cacheIndex=e,t[e]=i),i},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,i=t.__cacheIndex,n=--this._nActiveControlInterpolants,r=e[n];t.__cacheIndex=n,e[n]=t,r.__cacheIndex=i,e[i]=r},_controlInterpolantsResultBuffer:new Float32Array(1)}),qi.prototype={constructor:qi,onUpdate:function(t){return this.dynamic=!0,this.onUpdateCallback=t,this}},Zi.prototype=Object.create(Vt.prototype),Zi.prototype.constructor=Zi,Zi.prototype.isInstancedBufferGeometry=!0,Zi.prototype.addGroup=function(t,e,i){this.groups.push({start:t,count:e,instances:i})},Zi.prototype.copy=function(t){var e=t.index;null!==e&&this.setIndex(e.clone());var i=t.attributes;for(var n in i){var r=i[n];this.addAttribute(n,r.clone())}for(var a=t.groups,o=0,s=a.length;o<s;o++){var c=a[o];this.addGroup(c.start,c.count,c.instances)}return this},Ji.prototype={constructor:Ji,isInterleavedBufferAttribute:!0,get length(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Please use .count."),this.array.length},get count(){return this.data.count},get array(){return this.data.array},setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=n,this},setXYZW:function(t,e,i,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=n,this.data.array[t+3]=r,this}},Qi.prototype={constructor:Qi,isInterleavedBuffer:!0,get length(){return this.array.length},get count(){return this.array.length/this.stride},set needsUpdate(t){t===!0&&this.version++},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,i){t*=this.stride,i*=e.stride;for(var n=0,r=this.stride;n<r;n++)this.array[t+n]=e.array[i+n];return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(){return(new this.constructor).copy(this)}},Ki.prototype=Object.create(Qi.prototype),Ki.prototype.constructor=Ki,Ki.prototype.isInstancedInterleavedBuffer=!0,Ki.prototype.copy=function(t){return Qi.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this},$i.prototype=Object.create(Mt.prototype),$i.prototype.constructor=$i,$i.prototype.isInstancedBufferAttribute=!0,$i.prototype.copy=function(t){return Mt.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this},tn.prototype={constructor:tn,linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e){var i=[];return nn(t,this,i,e),i.sort(en),i},intersectObjects:function(t,e){var i=[];if(Array.isArray(t)===!1)return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),i;for(var n=0,r=t.length;n<r;n++)nn(t[n],this,i,e);return i.sort(en),i}},rn.prototype={constructor:rn,start:function(){this.startTime=(performance||Date).now(),this.oldTime=this.startTime,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running&&this.start(),this.running){var e=(performance||Date).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}},on.prototype={constructor:on,set:function(t,e,i){return this.radius=t,this.phi=e,this.theta=i,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius.copy(t.radius),this.phi.copy(t.phi),this.theta.copy(t.theta),this},makeSafe:function(){var t=1e-6;return this.phi=Math.max(t,Math.min(Math.PI-t,this.phi)),this},setFromVector3:function(e){return this.radius=e.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e.x,e.z),this.phi=Math.acos(t.Math.clamp(e.y/this.radius,-1,1))),this}},sn.prototype=Object.create(ne.prototype),sn.prototype.constructor=sn,sn.prototype.createAnimation=function(t,e,i,n){var r={start:e,end:i,length:i-e+1,fps:n,duration:(i-e)/n,lastFrame:0,currentFrame:0,active:!1,time:0,direction:1,weight:1,directionBackwards:!1,mirroredLoop:!1};this.animationsMap[t]=r,this.animationsList.push(r)},sn.prototype.autoCreateAnimations=function(t){for(var e,i=/([a-z]+)_?(\d+)/i,n={},r=this.geometry,a=0,o=r.morphTargets.length;a<o;a++){var s=r.morphTargets[a],c=s.name.match(i);if(c&&c.length>1){var h=c[1];n[h]||(n[h]={start:1/0,end:-(1/0)});var l=n[h];a<l.start&&(l.start=a),a>l.end&&(l.end=a),e||(e=h)}}for(var h in n){var l=n[h];this.createAnimation(h,l.start,l.end,t)}this.firstAnimation=e},sn.prototype.setAnimationDirectionForward=function(t){var e=this.animationsMap[t];e&&(e.direction=1,e.directionBackwards=!1)},sn.prototype.setAnimationDirectionBackward=function(t){var e=this.animationsMap[t];e&&(e.direction=-1,e.directionBackwards=!0)},sn.prototype.setAnimationFPS=function(t,e){var i=this.animationsMap[t];i&&(i.fps=e,i.duration=(i.end-i.start)/i.fps)},sn.prototype.setAnimationDuration=function(t,e){var i=this.animationsMap[t];i&&(i.duration=e,i.fps=(i.end-i.start)/i.duration)},sn.prototype.setAnimationWeight=function(t,e){var i=this.animationsMap[t];i&&(i.weight=e)},sn.prototype.setAnimationTime=function(t,e){var i=this.animationsMap[t];i&&(i.time=e)},sn.prototype.getAnimationTime=function(t){var e=0,i=this.animationsMap[t];return i&&(e=i.time),e},sn.prototype.getAnimationDuration=function(t){var e=-1,i=this.animationsMap[t];return i&&(e=i.duration),e},sn.prototype.playAnimation=function(t){var e=this.animationsMap[t];e?(e.time=0,e.active=!0):console.warn("THREE.MorphBlendMesh: animation["+t+"] undefined in .playAnimation()")},sn.prototype.stopAnimation=function(t){var e=this.animationsMap[t];e&&(e.active=!1)},sn.prototype.update=function(e){for(var i=0,n=this.animationsList.length;i<n;i++){var r=this.animationsList[i];if(r.active){var a=r.duration/r.length;r.time+=r.direction*e,r.mirroredLoop?(r.time>r.duration||r.time<0)&&(r.direction*=-1,r.time>r.duration&&(r.time=r.duration,r.directionBackwards=!0),r.time<0&&(r.time=0,r.directionBackwards=!1)):(r.time=r.time%r.duration,r.time<0&&(r.time+=r.duration));var o=r.start+t.Math.clamp(Math.floor(r.time/a),0,r.length-1),s=r.weight;o!==r.currentFrame&&(this.morphTargetInfluences[r.lastFrame]=0,this.morphTargetInfluences[r.currentFrame]=1*s,this.morphTargetInfluences[o]=0,r.lastFrame=r.currentFrame,r.currentFrame=o);var c=r.time%a/a;r.directionBackwards&&(c=1-c),r.currentFrame!==r.lastFrame?(this.morphTargetInfluences[r.currentFrame]=c*s,this.morphTargetInfluences[r.lastFrame]=(1-c)*s):this.morphTargetInfluences[r.currentFrame]=s}}},cn.prototype=Object.create(Ft.prototype),cn.prototype.constructor=cn,cn.prototype.isImmediateRenderObject=!0,hn.prototype=Object.create(Vt.prototype),hn.prototype.constructor=hn,ln.prototype=Object.create(we.prototype),ln.prototype.constructor=ln,un.prototype=Object.create(we.prototype),un.prototype.constructor=un,un.prototype.update=function(){var t=new s,e=new s,i=new nt;return function(){var n=["a","b","c"];this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var r=this.object.matrixWorld,a=this.geometry.attributes.position,o=this.object.geometry;if(o&&o.isGeometry)for(var s=o.vertices,c=o.faces,h=0,l=0,u=c.length;l<u;l++)for(var p=c[l],d=0,f=p.vertexNormals.length;d<f;d++){var m=s[p[n[d]]],v=p.vertexNormals[d];t.copy(m).applyMatrix4(r),e.copy(v).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),a.setXYZ(h,t.x,t.y,t.z),h+=1,a.setXYZ(h,e.x,e.y,e.z),h+=1}else if(o&&o.isBufferGeometry)for(var g=o.attributes.position,y=o.attributes.normal,h=0,d=0,f=g.count;d<f;d++)t.set(g.getX(d),g.getY(d),g.getZ(d)).applyMatrix4(r),e.set(y.getX(d),y.getY(d),y.getZ(d)),e.applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),a.setXYZ(h,t.x,t.y,t.z),h+=1,a.setXYZ(h,e.x,e.y,e.z),h+=1;return a.needsUpdate=!0,this}}(),pn.prototype=Object.create(Ft.prototype),pn.prototype.constructor=pn,pn.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},pn.prototype.update=function(){var t=new s,e=new s;return function(){var i=this.light.distance?this.light.distance:1e3,n=i*Math.tan(this.light.angle);this.cone.scale.set(n,n,i),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),this.cone.material.color.copy(this.light.color).multiplyScalar(this.light.intensity)}}(),dn.prototype=Object.create(we.prototype),dn.prototype.constructor=dn,dn.prototype.getBoneList=function(t){var e=[];t&&t.isBone&&e.push(t);for(var i=0;i<t.children.length;i++)e.push.apply(e,this.getBoneList(t.children[i]));return e},dn.prototype.update=function(){for(var t=this.geometry,e=(new a).getInverse(this.root.matrixWorld),i=new a,n=0,r=0;r<this.bones.length;r++){var o=this.bones[r];o.parent&&o.parent.isBone&&(i.multiplyMatrices(e,o.matrixWorld),t.vertices[n].setFromMatrixPosition(i),i.multiplyMatrices(e,o.parent.matrixWorld),t.vertices[n+1].setFromMatrixPosition(i),n+=2)}t.verticesNeedUpdate=!0,t.computeBoundingSphere()},fn.prototype=Object.create(Vt.prototype),fn.prototype.constructor=fn,mn.prototype=Object.create(ne.prototype),mn.prototype.constructor=mn,mn.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},mn.prototype.update=function(){this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity)},vn.prototype=Object.create(Bt.prototype),vn.prototype.constructor=vn,gn.prototype=Object.create(Ft.prototype),gn.prototype.constructor=gn,gn.prototype.dispose=function(){this.lightSphere.geometry.dispose(),this.lightSphere.material.dispose()},gn.prototype.update=function(){var t=new s;return function(){this.colors[0].copy(this.light.color).multiplyScalar(this.light.intensity),this.colors[1].copy(this.light.groundColor).multiplyScalar(this.light.intensity),this.lightSphere.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate()),this.lightSphere.geometry.colorsNeedUpdate=!0}}(),yn.prototype=Object.create(we.prototype),yn.prototype.constructor=yn,yn.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},xn.prototype=Object.create(we.prototype),xn.prototype.constructor=xn,xn.prototype.update=function(){var t=new s,e=new s,i=new nt;return function(){this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);for(var n=this.object.matrixWorld,r=this.geometry.attributes.position,a=this.object.geometry,o=a.vertices,s=a.faces,c=0,h=0,l=s.length;h<l;h++){var u=s[h],p=u.normal;t.copy(o[u.a]).add(o[u.b]).add(o[u.c]).divideScalar(3).applyMatrix4(n),e.copy(p).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),r.setXYZ(c,t.x,t.y,t.z),c+=1,r.setXYZ(c,e.x,e.y,e.z),c+=1}return r.needsUpdate=!0,this}}(),_n.prototype=Object.create(Vt.prototype),_n.prototype.constructor=_n,bn.prototype=Object.create(we.prototype),bn.prototype.constructor=bn,wn.prototype=Object.create(Ft.prototype),wn.prototype.constructor=wn,wn.prototype.dispose=function(){var t=this.children[0],e=this.children[1];t.geometry.dispose(),t.material.dispose(),e.geometry.dispose(),e.material.dispose()},wn.prototype.update=function(){var t=new s,e=new s,i=new s;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),i.subVectors(e,t);var n=this.children[0],r=this.children[1];n.lookAt(i),n.material.color.copy(this.light.color).multiplyScalar(this.light.intensity),r.lookAt(i),r.scale.z=i.length()}}(),Mn.prototype=Object.create(we.prototype),Mn.prototype.constructor=Mn,Mn.prototype.update=function(){function t(t,a,o,s){n.set(a,o,s).unproject(r);var c=i[t];if(void 0!==c)for(var h=0,l=c.length;h<l;h++)e.vertices[c[h]].copy(n)}var e,i,n=new s,r=new ae;return function(){e=this.geometry,i=this.pointMap;var n=1,a=1;r.projectionMatrix.copy(this.camera.projectionMatrix),t("c",0,0,-1),t("t",0,0,1),t("n1",-n,-a,-1),t("n2",n,-a,-1),t("n3",-n,a,-1),t("n4",n,a,-1),t("f1",-n,-a,1),t("f2",n,-a,1),t("f3",-n,a,1),t("f4",n,a,1),t("u1",.7*n,1.1*a,-1),t("u2",.7*-n,1.1*a,-1),t("u3",0,2*a,-1),t("cf1",-n,0,1),t("cf2",n,0,1),t("cf3",0,-a,1),t("cf4",0,a,1),t("cn1",-n,0,-1),t("cn2",n,0,-1),t("cn3",0,-a,-1),t("cn4",0,a,-1),e.verticesNeedUpdate=!0}}(),En.prototype=Object.create(Bt.prototype),En.prototype.constructor=En,Tn.prototype=Object.create(ne.prototype),Tn.prototype.constructor=Tn,Tn.prototype.update=function(){this.box.setFromObject(this.object),this.box.size(this.scale),this.box.center(this.position)},Sn.prototype=Object.create(we.prototype),Sn.prototype.constructor=Sn,Sn.prototype.update=function(){var t=new et;return function(e){if(e&&e.isBox3?t.copy(e):t.setFromObject(e),!t.isEmpty()){var i=t.min,n=t.max,r=this.geometry.attributes.position,a=r.array;a[0]=n.x,a[1]=n.y,a[2]=n.z,a[3]=i.x,a[4]=n.y,a[5]=n.z,a[6]=i.x,a[7]=i.y,a[8]=n.z,a[9]=n.x,a[10]=i.y,a[11]=n.z,a[12]=n.x,a[13]=n.y,a[14]=i.z,a[15]=i.x,a[16]=n.y,a[17]=i.z,a[18]=i.x,a[19]=i.y,a[20]=i.z,a[21]=n.x,a[22]=i.y,a[23]=i.z,r.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),An.prototype=Object.create(Vt.prototype),An.prototype.constructor=An;var Gc=new Vt;Gc.addAttribute("position",new Ct([0,0,0,0,1,0],3));var Hc=new An(0,.5,1,5,1);Hc.translate(0,-.5,0),Ln.prototype=Object.create(Ft.prototype),Ln.prototype.constructor=Ln,Ln.prototype.setDirection=function(){var t,e=new s;return function(i){i.y>.99999?this.quaternion.set(0,0,0,1):i.y<-.99999?this.quaternion.set(1,0,0,0):(e.set(i.z,0,-i.x).normalize(),t=Math.acos(i.y),this.quaternion.setFromAxisAngle(e,t))}}(),Ln.prototype.setLength=function(t,e,i){void 0===e&&(e=.2*t),void 0===i&&(i=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(i,e,i),this.cone.position.y=t,this.cone.updateMatrix()},Ln.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},Rn.prototype=Object.create(we.prototype),Rn.prototype.constructor=Rn,Pn.prototype=Object.create(Bt.prototype),Pn.prototype.constructor=Pn,Cn.prototype=Object.create(Bt.prototype),Cn.prototype.constructor=Cn,Un.prototype=Object.create(Cn.prototype),Un.prototype.constructor=Un,In.prototype=Object.create(Cn.prototype),In.prototype.constructor=In,Dn.prototype=Object.create(Cn.prototype),Dn.prototype.constructor=Dn,Nn.prototype=Object.create(Cn.prototype),Nn.prototype.constructor=Nn,On.prototype=Object.create(Vt.prototype),On.prototype.constructor=On,Fn.prototype=Object.create(Bt.prototype),Fn.prototype.constructor=Fn,zn.prototype=Object.create(Vt.prototype),zn.prototype.constructor=zn,Bn.prototype=Object.create(Bt.prototype),Bn.prototype.constructor=Bn,Gn.prototype=Object.create(Li.prototype),Gn.prototype.constructor=Gn,Hn.prototype=Object.create(Vt.prototype),Hn.prototype.constructor=Hn,Vn.prototype=Object.create(Bt.prototype),Vn.prototype.constructor=Vn,kn.prototype=Object.create(Bt.prototype),kn.prototype.constructor=kn,jn.prototype=Object.create(Vt.prototype),jn.prototype.constructor=jn,Wn.prototype=Object.create(Bt.prototype),Wn.prototype.constructor=Wn,Xn.prototype=Object.create(Bt.prototype),Xn.prototype.constructor=Xn,Yn.prototype=Object.create(Xn.prototype),Yn.prototype.constructor=Yn,qn.prototype=Object.create(Vt.prototype),qn.prototype.constructor=qn,Zn.prototype=Object.create(Vt.prototype),Zn.prototype.constructor=Zn,Jn.prototype=Object.create(Bt.prototype),Jn.prototype.constructor=Jn,t.CatmullRomCurve3=function(){function t(){}var e=new s,i=new t,n=new t,r=new t;return t.prototype.init=function(t,e,i,n){this.c0=t,this.c1=i,this.c2=-3*t+3*e-2*i-n,this.c3=2*t-2*e+i+n},t.prototype.initNonuniformCatmullRom=function(t,e,i,n,r,a,o){
  var s=(e-t)/r-(i-t)/(r+a)+(i-e)/a,c=(i-e)/a-(n-e)/(a+o)+(n-i)/o;s*=a,c*=a,this.init(e,i,s,c)},t.prototype.initCatmullRom=function(t,e,i,n,r){this.init(e,i,r*(i-t),r*(n-e))},t.prototype.calc=function(t){var e=t*t,i=e*t;return this.c0+this.c1*t+this.c2*e+this.c3*i},_i.create(function(t){this.points=t||[],this.closed=!1},function(t){var a,o,c,h,l=this.points;h=l.length,h<2&&console.log("duh, you need at least 2 points"),a=(h-(this.closed?0:1))*t,o=Math.floor(a),c=a-o,this.closed?o+=o>0?0:(Math.floor(Math.abs(o)/l.length)+1)*l.length:0===c&&o===h-1&&(o=h-2,c=1);var u,p,d,f;if(this.closed||o>0?u=l[(o-1)%h]:(e.subVectors(l[0],l[1]).add(l[0]),u=e),p=l[o%h],d=l[(o+1)%h],this.closed||o+2<h?f=l[(o+2)%h]:(e.subVectors(l[h-1],l[h-2]).add(l[h-1]),f=e),void 0===this.type||"centripetal"===this.type||"chordal"===this.type){var m="chordal"===this.type?.5:.25,v=Math.pow(u.distanceToSquared(p),m),g=Math.pow(p.distanceToSquared(d),m),y=Math.pow(d.distanceToSquared(f),m);g<1e-4&&(g=1),v<1e-4&&(v=g),y<1e-4&&(y=g),i.initNonuniformCatmullRom(u.x,p.x,d.x,f.x,v,g,y),n.initNonuniformCatmullRom(u.y,p.y,d.y,f.y,v,g,y),r.initNonuniformCatmullRom(u.z,p.z,d.z,f.z,v,g,y)}else if("catmullrom"===this.type){var x=void 0!==this.tension?this.tension:.5;i.initCatmullRom(u.x,p.x,d.x,f.x,x),n.initCatmullRom(u.y,p.y,d.y,f.y,x),r.initCatmullRom(u.z,p.z,d.z,f.z,x)}var _=new s(i.calc(c),n.calc(c),r.calc(c));return _})}(),Qn.prototype=Object.create(t.CatmullRomCurve3.prototype);var Vc=_i.create(function(t){console.warn("THREE.SplineCurve3 will be deprecated. Please use THREE.CatmullRomCurve3"),this.points=void 0===t?[]:t},function(e){var i=this.points,n=(i.length-1)*e,r=Math.floor(n),a=n-r,o=i[0==r?r:r-1],c=i[r],h=i[r>i.length-2?i.length-1:r+1],l=i[r>i.length-3?i.length-1:r+2],u=t.CurveUtils.interpolate;return new s(u(o.x,c.x,h.x,l.x,a),u(o.y,c.y,h.y,l.y,a),u(o.z,c.z,h.z,l.z,a))});t.CubicBezierCurve3=_i.create(function(t,e,i,n){this.v0=t,this.v1=e,this.v2=i,this.v3=n},function(e){var i=t.ShapeUtils.b3;return new s(i(e,this.v0.x,this.v1.x,this.v2.x,this.v3.x),i(e,this.v0.y,this.v1.y,this.v2.y,this.v3.y),i(e,this.v0.z,this.v1.z,this.v2.z,this.v3.z))}),t.QuadraticBezierCurve3=_i.create(function(t,e,i){this.v0=t,this.v1=e,this.v2=i},function(e){var i=t.ShapeUtils.b2;return new s(i(e,this.v0.x,this.v1.x,this.v2.x),i(e,this.v0.y,this.v1.y,this.v2.y),i(e,this.v0.z,this.v1.z,this.v2.z))}),t.LineCurve3=_i.create(function(t,e){this.v1=t,this.v2=e},function(t){if(1===t)return this.v2.clone();var e=new s;return e.subVectors(this.v2,this.v1),e.multiplyScalar(t),e.add(this.v1),e}),Kn.prototype=Object.create(Mi.prototype),Kn.prototype.constructor=Kn,t.SceneUtils={createMultiMaterialObject:function(t,e){for(var i=new Te,n=0,r=e.length;n<r;n++)i.add(new ne(t,e[n]));return i},detach:function(t,e,i){t.applyMatrix(e.matrixWorld),e.remove(t),i.add(t)},attach:function(t,e,i){var n=new a;n.getInverse(i.matrixWorld),t.applyMatrix(n),e.remove(t),i.add(t)}};var kc=0,jc=1;Object.assign(h.prototype,{empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)}}),Object.assign(et.prototype,{empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(nt.prototype,{multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(t){return console.warn("THREE.Matrix3: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead."),this.applyToVector3Array(t)}}),Object.assign(a.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) or vector.applyProjection( matrix ) instead."),t.applyProjection(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(t){return console.warn("THREE.Matrix4: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead."),this.applyToVector3Array(t)},rotateAxis:function(t){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),t.transformDirection(this)},crossVector:function(t){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},translate:function(t){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(t){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(t){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(t){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(t,e){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")}}),Object.assign(rt.prototype,{isIntersectionLine:function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)}}),Object.assign(o.prototype,{multiplyVector3:function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)}}),Object.assign($t.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(s.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(t){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(t)},getScaleFromMatrix:function(t){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(t)},getColumnFromMatrix:function(t,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,t)}}),Object.assign(Ft.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(t){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)}}),Object.defineProperties(Ft.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(t){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(me.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),oe.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(Xe.prototype,{onlyShadow:{set:function(t){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(t){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(t){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(Mt.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Please use .count."),this.array.length}}}),Object.assign(Vt.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,i){void 0!==i&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(Vt.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.defineProperties(J.prototype,{wrapAround:{get:function(){console.warn("THREE."+this.type+": .wrapAround has been removed.")},set:function(t){console.warn("THREE."+this.type+": .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE."+this.type+": .wrapRGB has been removed."),new $}}}),Object.defineProperties(Ne.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(t){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(K.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),e.prototype=Object.assign(Object.create({constructor:e,apply:function(t){console.warn("THREE.EventDispatcher: .apply is deprecated, just inherit or Object.assign the prototype to mix-in."),Object.assign(t,this)}}),e.prototype),Object.assign(ce.prototype,{supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")}}),Object.defineProperties(ce.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){return this.shadowMap.cullFace},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace."),this.shadowMap.cullFace=t}}}),Object.defineProperties(ot.prototype,{cullFace:{get:function(){return this.renderReverseSided?pr:ur},set:function(t){var e=t!==ur;console.warn("WebGLRenderer: .shadowMap.cullFace is deprecated. Set .shadowMap.renderReverseSided to "+e+"."),this.renderReverseSided=e}}}),Object.defineProperties(Z.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.assign(Gi.prototype,{load:function(t){console.warn("THREE.Audio: .load has been deprecated. Please use THREE.AudioLoader.");var e=this,i=new Oi;return i.load(t,function(t){e.setBuffer(t)}),this}}),Object.assign(Vi.prototype,{getData:function(t){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()}});var Wc={merge:function(t,e,i){console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.");var n;e.isMesh&&(e.matrixAutoUpdate&&e.updateMatrix(),n=e.matrix,e=e.geometry),t.merge(e,n,i)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},Xc={crossOrigin:void 0,loadTexture:function(t,e,i,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var r=new We;r.setCrossOrigin(this.crossOrigin);var a=r.load(t,i,void 0,n);return e&&(a.mapping=e),a},loadTextureCube:function(t,e,i,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var r=new je;r.setCrossOrigin(this.crossOrigin);var a=r.load(t,i,void 0,n);return e&&(a.mapping=e),a},loadCompressedTexture:function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},loadCompressedTextureCube:function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")}};Object.defineProperty(t,"AudioContext",{get:function(){return t.getAudioContext()}}),t.SpritePlugin=c,t.LensFlarePlugin=l,t.WebGLUniforms=W,t.WebGLTextures=X,t.WebGLState=q,t.WebGLShadowMap=ot,t.WebGLShader=ct,t.WebGLProperties=ht,t.WebGLPrograms=wt,t.WebGLProgram=bt,t.WebGLObjects=jt,t.WebGLLights=Wt,t.WebGLGeometries=kt,t.WebGLCapabilities=Xt,t.WebGLExtensions=Yt,t.WebGLIndexedBufferRenderer=qt,t.WebGLClipping=Zt,t.WebGLBufferRenderer=Jt,t.WebGLRenderTargetCube=Qt,t.WebGLRenderTarget=Z,t.WebGLRenderer=ce,t.ShaderLib=Uc,t.UniformsLib=Cc,t.ShaderChunk=Pc,t.FogExp2=he,t.Fog=le,t.Scene=ue,t.LensFlare=pe,t.Sprite=fe,t.LOD=me,t.SkinnedMesh=xe,t.Skeleton=ge,t.Bone=ye,t.Mesh=ne,t.LineSegments=we,t.Line=be,t.Points=Ee,t.Group=Te,t.VideoTexture=Se,t.DataTexture=ve,t.CompressedTexture=Ae,t.CubeTexture=u,t.CanvasTexture=Le,t.DepthTexture=Re,t.TextureIdCount=r,t.Texture=n,t.ShadowMaterial=Pe,t.SpriteMaterial=de,t.RawShaderMaterial=Ce,t.ShaderMaterial=K,t.PointsMaterial=Me,t.MultiMaterial=Ue,t.MeshPhysicalMaterial=De,t.MeshStandardMaterial=Ie,t.MeshPhongMaterial=Ne,t.MeshNormalMaterial=Oe,t.MeshLambertMaterial=Fe,t.MeshDepthMaterial=tt,t.MeshBasicMaterial=ie,t.LineDashedMaterial=ze,t.LineBasicMaterial=_e,t.MaterialIdCount=Q,t.Material=J,t.CompressedTextureLoader=He,t.BinaryTextureLoader=Ve,t.DataTextureLoader=Oc,t.CubeTextureLoader=je,t.TextureLoader=We,t.ObjectLoader=xi,t.MaterialLoader=mi,t.BufferGeometryLoader=vi,t.LoadingManager=Be,t.JSONLoader=yi,t.ImageLoader=ke,t.FontLoader=Di,t.XHRLoader=Ge,t.Loader=gi,t.AudioLoader=Oi,t.SpotLightShadow=Ze,t.SpotLight=Je,t.PointLight=Qe,t.HemisphereLight=Ye,t.DirectionalLightShadow=Ke,t.DirectionalLight=$e,t.AmbientLight=ti,t.LightShadow=qe,t.Light=Xe,t.StereoCamera=Fi,t.PerspectiveCamera=oe,t.OrthographicCamera=se,t.CubeCamera=zi,t.Camera=ae,t.AudioListener=Bi,t.PositionalAudio=Hi,t.getAudioContext=Ni,t.AudioAnalyser=Vi,t.Audio=Gi,t.VectorKeyframeTrack=oi,t.StringKeyframeTrack=li,t.QuaternionKeyframeTrack=ci,t.NumberKeyframeTrack=hi,t.ColorKeyframeTrack=pi,t.BooleanKeyframeTrack=ui,t.PropertyMixer=ki,t.PropertyBinding=ji,t.KeyframeTrack=di,t.AnimationObjectGroup=Wi,t.AnimationMixer=Yi,t.AnimationClip=fi,t.Uniform=qi,t.InstancedBufferGeometry=Zi,t.BufferGeometry=Vt,t.DirectGeometry=Ht,t.GeometryIdCount=Gt,t.Geometry=Bt,t.InterleavedBufferAttribute=Ji,t.InstancedInterleavedBuffer=Ki,t.InterleavedBuffer=Qi,t.InstancedBufferAttribute=$i,t.DynamicBufferAttribute=It,t.Float64Attribute=Ut,t.Float32Attribute=Ct,t.Uint32Attribute=Pt,t.Int32Attribute=Rt,t.Uint16Attribute=Lt,t.Int16Attribute=At,t.Uint8ClampedAttribute=St,t.Uint8Attribute=Tt,t.Int8Attribute=Et,t.BufferAttribute=Mt,t.Face3=Dt,t.Object3DIdCount=zt,t.Object3D=Ft,t.Raycaster=tn,t.Layers=Ot,t.EventDispatcher=e,t.Clock=rn,t.QuaternionLinearInterpolant=si,t.LinearInterpolant=ni,t.DiscreteInterpolant=ri,t.CubicInterpolant=ii,t.Interpolant=ei,t.Triangle=ee,t.Spline=an,t.Spherical=on,t.Plane=rt,t.Frustum=at,t.Sphere=it,t.Ray=$t,t.Matrix4=a,t.Matrix3=nt,t.Box3=et,t.Box2=h,t.Line3=te,t.Euler=Nt,t.Vector4=Y,t.Vector3=s,t.Vector2=i,t.Quaternion=o,t.Color=$,t.MorphBlendMesh=sn,t.ImmediateRenderObject=cn,t.WireframeHelper=ln,t.VertexNormalsHelper=un,t.SpotLightHelper=pn,t.SkeletonHelper=dn,t.PointLightHelper=mn,t.HemisphereLightHelper=gn,t.GridHelper=yn,t.FaceNormalsHelper=xn,t.EdgesHelper=bn,t.DirectionalLightHelper=wn,t.CameraHelper=Mn,t.BoundingBoxHelper=Tn,t.BoxHelper=Sn,t.ArrowHelper=Ln,t.AxisHelper=Rn,t.WireframeGeometry=hn,t.ParametricGeometry=Pn,t.TetrahedronGeometry=Un,t.OctahedronGeometry=In,t.IcosahedronGeometry=Dn,t.DodecahedronGeometry=Nn,t.PolyhedronGeometry=Cn,t.TubeGeometry=Ai,t.TorusKnotGeometry=Fn,t.TorusKnotBufferGeometry=On,t.TorusGeometry=Bn,t.TorusBufferGeometry=zn,t.TextGeometry=Gn,t.SphereBufferGeometry=fn,t.SphereGeometry=vn,t.RingGeometry=Vn,t.RingBufferGeometry=Hn,t.PlaneBufferGeometry=re,t.PlaneGeometry=kn,t.LatheGeometry=Wn,t.LatheBufferGeometry=jn,t.ShapeGeometry=Ri,t.ExtrudeGeometry=Li,t.EdgesGeometry=_n,t.ConeGeometry=Yn,t.ConeBufferGeometry=qn,t.CylinderGeometry=Xn,t.CylinderBufferGeometry=An,t.CircleBufferGeometry=Zn,t.CircleGeometry=Jn,t.BoxBufferGeometry=Kt,t.BoxGeometry=En,t.ClosedSplineCurve3=Qn,t.SplineCurve3=Vc,t.ArcCurve=Kn,t.EllipseCurve=Mi,t.SplineCurve=Ei,t.CubicBezierCurve=Ti,t.QuadraticBezierCurve=Si,t.LineCurve=bi,t.Shape=Pi,t.ShapePath=Ui,t.Path=Ci,t.Font=Ii,t.CurvePath=wi,t.Curve=_i,t.REVISION=cr,t.MOUSE=hr,t.CullFaceNone=lr,t.CullFaceBack=ur,t.CullFaceFront=pr,t.CullFaceFrontBack=dr,t.FrontFaceDirectionCW=fr,t.FrontFaceDirectionCCW=mr,t.BasicShadowMap=vr,t.PCFShadowMap=gr,t.PCFSoftShadowMap=yr,t.FrontSide=xr,t.BackSide=_r,t.DoubleSide=br,t.FlatShading=wr,t.SmoothShading=Mr,t.NoColors=Er,t.FaceColors=Tr,t.VertexColors=Sr,t.NoBlending=Ar,t.NormalBlending=Lr,t.AdditiveBlending=Rr,t.SubtractiveBlending=Pr,t.MultiplyBlending=Cr,t.CustomBlending=Ur,t.AddEquation=Ir,t.SubtractEquation=Dr,t.ReverseSubtractEquation=Nr,t.MinEquation=Or,t.MaxEquation=Fr,t.ZeroFactor=zr,t.OneFactor=Br,t.SrcColorFactor=Gr,t.OneMinusSrcColorFactor=Hr,t.SrcAlphaFactor=Vr,t.OneMinusSrcAlphaFactor=kr,t.DstAlphaFactor=jr,t.OneMinusDstAlphaFactor=Wr,t.DstColorFactor=Xr,t.OneMinusDstColorFactor=Yr,t.SrcAlphaSaturateFactor=qr,t.NeverDepth=Zr,t.AlwaysDepth=Jr,t.LessDepth=Qr,t.LessEqualDepth=Kr,t.EqualDepth=$r,t.GreaterEqualDepth=ta,t.GreaterDepth=ea,t.NotEqualDepth=ia,t.MultiplyOperation=na,t.MixOperation=ra,t.AddOperation=aa,t.NoToneMapping=oa,t.LinearToneMapping=sa,t.ReinhardToneMapping=ca,t.Uncharted2ToneMapping=ha,t.CineonToneMapping=la,t.UVMapping=ua,t.CubeReflectionMapping=pa,t.CubeRefractionMapping=da,t.EquirectangularReflectionMapping=fa,t.EquirectangularRefractionMapping=ma,t.SphericalReflectionMapping=va,t.CubeUVReflectionMapping=ga,t.CubeUVRefractionMapping=ya,t.RepeatWrapping=xa,t.ClampToEdgeWrapping=_a,t.MirroredRepeatWrapping=ba,t.NearestFilter=wa,t.NearestMipMapNearestFilter=Ma,t.NearestMipMapLinearFilter=Ea,t.LinearFilter=Ta,t.LinearMipMapNearestFilter=Sa,t.LinearMipMapLinearFilter=Aa,t.UnsignedByteType=La,t.ByteType=Ra,t.ShortType=Pa,t.UnsignedShortType=Ca,t.IntType=Ua,t.UnsignedIntType=Ia,t.FloatType=Da,t.HalfFloatType=Na,t.UnsignedShort4444Type=Oa,t.UnsignedShort5551Type=Fa,t.UnsignedShort565Type=za,t.UnsignedInt248Type=Ba,t.AlphaFormat=Ga,t.RGBFormat=Ha,t.RGBAFormat=Va,t.LuminanceFormat=ka,t.LuminanceAlphaFormat=ja,t.RGBEFormat=Wa,t.DepthFormat=Xa,t.DepthStencilFormat=Ya,t.RGB_S3TC_DXT1_Format=qa,t.RGBA_S3TC_DXT1_Format=Za,t.RGBA_S3TC_DXT3_Format=Ja,t.RGBA_S3TC_DXT5_Format=Qa,t.RGB_PVRTC_4BPPV1_Format=Ka,t.RGB_PVRTC_2BPPV1_Format=$a,t.RGBA_PVRTC_4BPPV1_Format=to,t.RGBA_PVRTC_2BPPV1_Format=eo,t.RGB_ETC1_Format=io,t.LoopOnce=no,t.LoopRepeat=ro,t.LoopPingPong=ao,t.InterpolateDiscrete=oo,t.InterpolateLinear=so,t.InterpolateSmooth=co,t.ZeroCurvatureEnding=ho,t.ZeroSlopeEnding=lo,t.WrapAroundEnding=uo,t.TrianglesDrawMode=po,t.TriangleStripDrawMode=fo,t.TriangleFanDrawMode=mo,t.LinearEncoding=vo,t.sRGBEncoding=go,t.GammaEncoding=yo,t.RGBEEncoding=xo,t.LogLuvEncoding=_o,t.RGBM7Encoding=bo,t.RGBM16Encoding=wo,t.RGBDEncoding=Mo,t.BasicDepthPacking=Eo,t.RGBADepthPacking=To,t.CubeGeometry=En,t.Face4=$n,t.LineStrip=kc,t.LinePieces=jc,t.MeshFaceMaterial=Ue,t.PointCloud=tr,t.Particle=fe,t.ParticleSystem=er,t.PointCloudMaterial=ir,t.ParticleBasicMaterial=nr,t.ParticleSystemMaterial=rr,t.Vertex=ar,t.GeometryUtils=Wc,t.ImageUtils=Xc,t.Projector=or,t.CanvasRenderer=sr,Object.defineProperty(t,"__esModule",{value:!0})});
  "use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};window.GEILDANKEVR=function(){var e={};return e.single=function(e){var t=!1,o={};t="object"===_typeof(e.container)&&"object"===("undefined"==typeof e?"undefined":_typeof(e)),GEILDANKEVR.utils.errorChecker(t),o=GEILDANKEVR.stage.init(e.container),GEILDANKEVR.content.init("single",o,e)},e.gallery=function(e){var t=!1,o={};t="object"===_typeof(e.container)&&"object"===_typeof(e.singles),GEILDANKEVR.utils.errorChecker(t),o=GEILDANKEVR.stage.init(e.container),GEILDANKEVR.content.init("gallery",o,e)},e.remove=function(){GEILDANKEVR.stage.cancelRenderLoop(),GEILDANKEVR.stage.destroyScene(),GEILDANKEVR.content.single.destroy()},e}(),window.GEILDANKEVR.content=function(){var e={};return e.init=function(e,t,o){var n=void 0;n={single:function(){GEILDANKEVR.content.single.init(t,o)},gallery:function(){GEILDANKEVR.content.gallery.init(t,o)}},n[e]()},e}(),window.GEILDANKEVR.assets=function(){var e={};return e.getIconPlayWhite=function(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAQAAAD9CzEMAAABl0lEQVR4Ae2XveraUBiHY4xD3URx8F+9gHZW9EKEOgi9Cz8uQFtXiwRsobvgIoLXIfYCKrqoaadCk+Xp4HiSc15PQkvB512FB37xvB/Ok/8BXDqMWXMgICIi4MCaEW1cHFOZftBgxpkkTnygbi+osiTCRIhPxUbQ5wdSAnqPCQp84VF8PKmgyA4bthQlggI7bNnimQWfSYNvEvRJyzudoMpP0nKjnCxYkgWLJEFD+6ze8wsZIS/xghk6HN7wDRnTOIHLGR33F/IVCUdyqqCDHudewqhaqmAsEwijGqqCtUwgjGqlCg4ygTCqvSoIZAJhVFdVEMkEwqjCvyiwj+gt8oiy/8j/4G86QosSjZ6BKmhn2iqaqsDllFmz+x7X7Bw+ouMejYxJ/DyoZzRwflNLGpk+WTBPnskVAtJyoaRbW3qkpWtavHzS8Mm82XlssWVDXrb82ik2vJKu7x6+RTj5xw6QHjekXOjanFBlFoSCZzWnZH8EvmbKUdNzJtQER6ChXFoMWbHnSkjIlT0rBjTJyc/Y7OspkNYf1H6eRU02jH0AAAAASUVORK5CYII="},e}();var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};window.GEILDANKEVR.content.gallery=function(){var e={},t={},o={},n={},i={},r={},a={},s={},c={},l={},d={},u={},E={},p={},f={},g={},m={},y={},R={},v={},h={},w={};return d=function(e){var t={color:{idle:2209448,error:15602965}},o={},n={},i={};return o=new THREE.PlaneGeometry(.8,3),n=new THREE.MeshPhongMaterial({color:t.color.idle,shading:THREE.FlatShading,shininess:60,transparent:!0,opacity:.2}),i=new THREE.Mesh(o,n),i.state={mode:"idle"},"right"===e.direction?i.sign=1:i.sign=-1,i.rotation.y=-Math.PI/2*i.sign,i.name=e.name,i.setMode=function(e){var o=["scroll","error","idle"],n={};this.state.mode===e||o.indexOf(e)<0||(this.state.mode=e,n={scroll:{opacity:.6,color:new THREE.Color(t.color.idle)},idle:{opacity:.2,color:new THREE.Color(t.color.idle)},error:{opacity:.6,color:new THREE.Color(t.color.error)}},this.material.opacity=n[e].opacity,this.material.color=n[e].color)},i},i=function(){var e=void 0,t=new THREE.RingGeometry(.001,.002,16),o=new THREE.MeshBasicMaterial({color:11206570,side:THREE.DoubleSide}),n=GEILDANKEVR.utils.getMouse3d();e=GEILDANKEVR.stage.getStage().camera,y=new THREE.Mesh(t,o),y.position.x=0,y.position.y=0,y.position.z=-.2,GEILDANKEVR.mobileDetection.isMobile()===!0?e.add(y):GEILDANKEVR.stage.registerAnimation("CROSSHAIR_POINTER",function(){y.position.set(n.x,n.y,n.z),GEILDANKEVR.stage.getStage().scene.add(y)})},v=function(e,t){for(var o=0,n=e.length;o<n;o+=1){var i=e[o];GEILDANKEVR.utils.handleLookat({element:i,lookAt:h,lookAtArguments:{sign:i.object.sign,object:i.object},lookAway:R,lookAwayArguments:{sign:i.object.sign,object:i.object},delay:t})}},r=function(){var e={},t={},o={},n={},i={};return n=new THREE.BoxGeometry(40,4,10),i=new THREE.MeshLambertMaterial({color:16250871}),t=new THREE.Mesh(n,i),t.receiveShadow=!0,t.position.x=25,t.position.y=2,t.position.z=-7,o=new THREE.Mesh(n,i),o.receiveShadow=!0,o.position.x=-25,o.position.y=2,o.position.z=-7,e=new THREE.Object3D,e.add(t,o),e},c=function(e){GEILDANKEVR.mobileDetection&&GEILDANKEVR.mobileDetection.isMobile()===!0?t(e):o(e)},s=function(){var e={},t={},o={};return t=new THREE.CylinderGeometry(1e3,1e3,1,100),o=new THREE.MeshLambertMaterial({color:5860458}),e=new THREE.Mesh(t,o),e.receiveShadow=!0,e.position.y=-.1,e},f=function(e,t){var o={},n={},i={},r=0,a=0,s={},c={},l={},d=0,u=0;return r=GEILDANKEVR.utils.getRandomGauss(4,8,1),a=r*(.21*Math.random()+.3),d=.25*r,u=.3*d,n=new THREE.CylinderGeometry(0,a,r,8),i=new THREE.MeshLambertMaterial({color:5093036,shading:THREE.FlatShading}),o=new THREE.Mesh(n,i),o.position.set(e,.5*r+d,t),c=new THREE.CylinderGeometry(u,u,d,5),l=new THREE.MeshLambertMaterial({color:6111287}),s=new THREE.Mesh(c,l),s.position.set(0,2.5*-d,0),o.add(s),o.castShadow=!0,o.receiveShadow=!0,o},E=function(){var e={},t={},o={};o=s(),t=r(),e=new THREE.Object3D;for(var n=0;n<200;n+=1){var i={},a=GEILDANKEVR.utils.getRandomInteger(-50,50),c=GEILDANKEVR.utils.getRandomInteger(10,50);i=f(a,c),e.add(i)}for(var l=0;l<25;l+=1){var d={},u=GEILDANKEVR.utils.getRandomInteger(-60,-20),E=GEILDANKEVR.utils.getRandomInteger(-10,10);d=f(u,E),e.add(d)}for(var p=0;p<25;p+=1){var g={},m=GEILDANKEVR.utils.getRandomInteger(20,60),y=GEILDANKEVR.utils.getRandomInteger(-10,10);g=f(m,y),e.add(g)}e.add(o,t),GEILDANKEVR.stage.getStage().scene.add(e)},t=function(e){var t=GEILDANKEVR.stage.getStage().camera,o=!1,n=new THREE.Raycaster;GEILDANKEVR.stage.registerAnimation("BUTTON_RAYCASTER",function(){var i={},r=[],a={};a=t.getWorldPosition(),i=t.getWorldDirection(),n.set(a,i),r=n.intersectObjects(e),o||v(r,1e3),o=0!==r.length})},o=function(e){var t=GEILDANKEVR.stage.getStage().camera,o=!1,n=new THREE.Raycaster;GEILDANKEVR.stage.registerAnimation("BUTTON_RAYCASTER",function(){var i=[];n.setFromCamera(GEILDANKEVR.utils.getMouse2d(),t),i=n.intersectObjects(e),o||v(i,10),o=0!==i.length})},n=function(e){var t={},o=0,n=.2,i=2;t=new THREE.Object3D;for(var r=0,a=e.length;r<a;r+=1){var s={},c={};s={thumbWidth:i,spaceBetweenThumbs:n},c=u(e[r],r,a,s),t.add(c)}return o=-(e.length-1)*(i+n),t.scrollOffset={current:0,min:o,max:0},t},a=function(){var e={},t={},o={};return e=new THREE.Object3D,t=d({direction:"left"}),o=d({direction:"right"}),t.position.set(-1,1.2,-1),o.position.set(1,1.2,-1),e.add(t,o),c([t,o]),e},u=function(e,t,o,n){var i={},r={},a={},s=n.spaceBetweenThumbs,c={},l=n.thumbWidth,d=0;return d=(l+s)*t,i=new THREE.BoxGeometry(l,l,.025),c=p(e.url,1024),r=new THREE.MeshPhongMaterial({map:c}),a=new THREE.Mesh(i,r),a.position.set(d,1.6,-2.45),a.castShadow=!1,a.receiveShadow=!1,a},p=function(e,t){var o=void 0,n=void 0,i={};return i=(new THREE.TextureLoader).load(e,function(){t&&(o=i.image.naturalHeight/i.image.naturalWidth,o>1?(n=1/o,o=1,i.repeat.set(o,n),i.offset.y=(n-1)/2*-1):(n=1,i.repeat.set(o,n),i.offset.x=(o-1)/2*-1))}),t?(i.wrapT=THREE.RepeatWrapping,i.wrapS=THREE.RepeatWrapping):(i.wrapT=THREE.ClampToEdgeWrapping,i.wrapS=THREE.ClampToEdgeWrapping),i},g=function(e,t,o){var n=void 0,i=(e-t)/2,r=new THREE.MeshBasicMaterial({color:10341319,transparent:!0,opacity:.3}),a=new THREE.Object3D,s=void 0,c=void 0;return s=new THREE.Mesh(new THREE.BoxGeometry(i,2.5,.2),o),s.position.set(-t/2-i/2,0,0),c=new THREE.Mesh(new THREE.BoxGeometry(i,2.5,.2),o),c.position.set(t/2+i/2,0,0),n=new THREE.Mesh(new THREE.BoxGeometry(t,2.5,.2),r),n.position.set(0,0,0),a.add(s,c,n),a},l=function(e,t){var o=void 0,n=void 0,i=void 0,r=void 0;n=g(6,5,t),n.rotation.z=Math.PI,n.position.set(0,2,1.4),i=g(3,2.25,t),i.rotation.y=Math.PI/2,i.position.set(-3,2,-0),r=g(3,2.25,t),r.rotation.y=-Math.PI/2,r.position.set(3,2,-0),o=new THREE.Mesh(new THREE.BoxGeometry(6,3,.3),t),o.rotation.x=-Math.PI/2,o.position.set(0,.75,0),e.add(n,i,r,o)},m=function(){var e=[],t={},o=void 0,n=new THREE.BoxGeometry(12,4,1),i=void 0,r=void 0;return t=new THREE.Object3D,i=new THREE.MeshPhongMaterial({shininess:2}),r=new THREE.Mesh(n,i),r.position.set(0,2,-3),r.castShadow=!0,r.receiveShadow=!0,o=new THREE.Mesh(new THREE.BoxGeometry(100,100,100),new THREE.MeshBasicMaterial({color:11263227,side:THREE.BackSide,fog:!1})),e[0]=new THREE.PointLight(16777215,.75),e[0].position.set(0,3,0),e[0].castShadow=!0,e[1]=new THREE.AmbientLight(4473924),e[1].position.set(0,0,0),l(t,i),E(),t.add(r),t.add(e[0],e[1],o),t},R=function(e){e.object.setMode("idle"),GEILDANKEVR.stage.deregisterAnimation("THUMBS_SCROLLING")},h=function(e){var t=-.015*e.sign;GEILDANKEVR.stage.registerAnimation("THUMBS_SCROLLING",function(){var o=w.scrollOffset,n=w.position.x;o.current+t<o.max&&o.current+t>o.min?(o.current=o.current+t,w.position.x=n+t,e.object.setMode("scroll")):e.object.setMode("error")})},e.init=function(e,t){var o=!1,r={},s=[],c={},l={};o="object"===_typeof(t.container)&&"object"===_typeof(e.scene)&&"object"===_typeof(t.singles),GEILDANKEVR.utils.errorChecker(o),r=e.scene,s=t.singles,w=n(s),l=m(),c=a(),i(),r.fog=new THREE.Fog(13421772,5,50),r.add(w,l,c)},e.createSingleThumb=u,e.createSIF=d,e.handleIntersection=v,e.createRaycaster=c,e.endThumbAnimation=R,e.startThumbAnimation=h,e.createTexture=p,e}();var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};window.GEILDANKEVR.content.single=function(){var e=10,t="GEILDANKEVR-video-play",o={},n=void 0,i=void 0,r=void 0,a={},s={},c={},l={},d={},u={},E={},p={},f={},g={},m={},y={},R={},v={},h=null,w=null,b=null;return n=function(){var e={},o={},n=GEILDANKEVR.assets.getIconPlayWhite();e=document.createElement("div"),e.setAttribute("id",t),e.style.backgroundImage="url("+n+")",e.style.backgroundColor="transparent",e.style.backgroundSize="contain",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.content="",e.style.display="block",e.style.position="absolute",e.style.top="50%",e.style.left="50%",e.style.transform="translate(-50%, -50%)",e.style.width="40px",e.style.height="40px",o=GEILDANKEVR.stage.getStage().container,o.appendChild(e)},r=function(e,t,o,n){var i={},r=!1,c={};return r="object"===("undefined"==typeof e?"undefined":_typeof(e))&&"string"==typeof t&&"object"===("undefined"==typeof o?"undefined":_typeof(o)),GEILDANKEVR.utils.errorChecker(r),i=new THREE.SphereGeometry(500,60,40),h=document.createElement("video"),h.loop=!0,h.setAttribute("webkit-playsinline","webkit-playsinline"),h=a(o),s(e),"object"===_typeof(n.single.optionalConfig)&&f(n.single.optionalConfig),b=new THREE.VideoTexture(h),b.minFilter=THREE.NearestFilter,b.maxFilter=THREE.NearestFilter,b.format=THREE.RGBFormat,b.generateMipmaps=!1,b.wrapS=THREE.ClampToEdgeWrapping,b.wrapT=THREE.ClampToEdgeWrapping,b.repeat.set(1,1),i.scale(-1,1,1),w=new THREE.MeshBasicMaterial({map:b}),c=new THREE.Mesh(i,w)},a=function(e){return GEILDANKEVR.mobileDetection.isMobile()?(n(),e.addEventListener("click",function(){R(),h.play()})):h.play(),h},s=function(e){Object.keys(e).forEach(function(t){var o=e[t],n=document.createElement("source");n.setAttribute("src",o),n.setAttribute("type","video/"+t),h.appendChild(n)})},i=function(e){var t={},o=!1,n={},i={},r={};return o="string"==typeof e,GEILDANKEVR.utils.errorChecker(o),t=new THREE.SphereGeometry(500,60,40),i=(new THREE.TextureLoader).load(e),i.wrapS=THREE.RepeatWrapping,i.wrapT=THREE.RepeatWrapping,i.repeat.set(1,1),n=new THREE.MeshBasicMaterial({map:i}),r=new THREE.Mesh(t,n),r.scale.set(-1,1,1),r},c=function(){GEILDANKEVR.stage.deregisterAnimation("AUTO_ROTATION")},l=function(t){var o=e;return t&&"number"==typeof t&&(o=t),o},u=function(e){E(e),p(e),d(e),g(e)},d=function(e){var t=null;"string"==typeof e.clearColor&&(t=e.clearColor.toString(16),t=new THREE.Color(t),GEILDANKEVR.stage.setClearColor(t))},E=function(e){var t=0,o=!1;o="object"===("undefined"==typeof e?"undefined":_typeof(e)),GEILDANKEVR.utils.errorChecker(o),t=l(e.animationSpeed),e.isAnimation===!0&&GEILDANKEVR.mobileDetection.isMobile()===!1&&GEILDANKEVR.utils.getVrDisplayMode()===!1&&v(t)},p=function(e){"number"==typeof e.startRotation&&GEILDANKEVR.stage.setLookAt(e.startRotation)},f=function(e){"boolean"==typeof e.videoMuted&&e.videoMuted===!0&&(h.muted=!0,h.setAttribute("muted","true")),"boolean"==typeof e.videoMuted&&e.videoMuted===!1&&(h.muted=!1)},g=function(e){"string"==typeof e.videoPoster&&h.setAttribute("poster",e.videoPoster)},m=function(){GEILDANKEVR.utils.getVrDisplayMode()===!0?c():v()},y=function(){h.pause(),h.src="",h.remove(),h=null,b.dispose(),w.dispose()},R=function(){var e={};e=document.getElementById(t),e.parentNode.removeChild(e)},v=function(e){var t=0,o=0;GEILDANKEVR.stage.registerAnimation("AUTO_ROTATION",function(){var n=GEILDANKEVR.stage.getStage(),i=n.dolly.rotation.y;t=GEILDANKEVR.stage.getStage().clock,o=t.getDelta(),n.dolly.rotation.y=i-o*Math.PI/180*e})},o.init=function(e,t){var o={},n={},a={},s=!1,c={},l={},d={},E={};s="object"===_typeof(e.camera)&&"object"===_typeof(e.scene)&&"object"===_typeof(t.container)&&"object"===_typeof(t.single)&&"string"==typeof t.single.mediaType,GEILDANKEVR.utils.errorChecker(s),o=e.camera,n=t.container,l=t.single.mediaType,d=e.scene,E=t.single.url,a={image:function(){c=i(E),d.add(c)},video:function(){o.layers.enable(1),c=r(E,"left",n,t),d.add(c),c=r(E,"right",n,t),d.add(c)}},a[l](),"object"===_typeof(t.single.optionalConfig)&&u(t.single.optionalConfig),window.addEventListener("vrdisplaypresentchange",function(e){m(e)})},o.destroy=function(){c(),null!==h&&y()},o.endAnimation=c,o.handleOptionalAnimationSpeed=l,o.handleOptionalStartRotation=p,o.removeVideo=y,o.startAnimation=v,o.createVideoPlayHandling=a,o.addVideoPlayButton=n,o}();var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};window.GEILDANKEVR.globalEvents=function(){var e={},t={};return t=function(e){var t=!1;t="object"===("undefined"==typeof e?"undefined":_typeof(e))&&"object"===_typeof(e.detail)&&"object"===_typeof(e.detail.vrdisplay)&&"boolean"==typeof e.detail.vrdisplay.isPresenting,GEILDANKEVR.utils.errorChecker(t),GEILDANKEVR.utils.setVrDisplayMode(e.detail.vrdisplay.isPresenting)},window.addEventListener("vrdisplaypresentchange",t),e.handleVrDisplayChange=t,e}(),window.GEILDANKEVR.mobileDetection=function(){var e={};return e.isMobile=function(){var e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e},e}();var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};window.GEILDANKEVR.stage=function(){var e=new THREE.Color(0),t={},o=void 0,n=void 0,i=void 0,r=void 0,a=void 0,s=void 0,c=void 0,l=void 0,d=void 0,u=void 0,E=void 0,p=void 0,f=void 0,g=void 0,m=void 0,y=void 0,R=void 0,v=void 0,h={},w=void 0,b={};return o=function(e,t,o){var n=["webkitfullscreenchange","mozfullscreenchange","msfullscreenchange"];window.addEventListener("resize",function(){m(e,t,o)},!0),window.addEventListener("vrdisplaypresentchange",function(){m(e,t,o)},!0);for(var i=0,r=n.length;i<r;i+=1)document.addEventListener(n[i],p.bind(null,e,t,o),!0)},p=function(e,t,o){GEILDANKEVR.utils.isFullscreen()?g(e,t,o):f(e,t,o)},n=function(e,t,o,i,r){t.update(),i.render(r,o,e),Object.keys(b).forEach(function(e){b[e]()}),R=requestAnimationFrame(function(){n(e,t,o,i,r)})},i=function(e){var t=void 0,o=e.offsetWidth/e.offsetHeight;return t=new THREE.PerspectiveCamera(75,o,.1,1e4)},r=function(e){var t={};return t=new THREE.Group,t.add(e),t},a=function(e){var t=void 0;return t=new THREE.VRControls(e),t.standing=!0,t},s=function(){var t=void 0;return t=new THREE.WebGLRenderer({antialias:!0}),t.setClearColor(e,1),t.setPixelRatio(window.devicePixelRatio),t.shadowMap.enabled=!0,t.shadowMap.type=THREE.PCFSoftShadowMap,t},c=function(){var e=void 0;return e=new THREE.Scene},l=function(e,t){var o=void 0;return o=new THREE.VREffect(e),o.setSize(t.offsetWidth,t.offsetHeight),o},d=function(e,t,o){var n=void 0,i={hideButton:!1,isUndistorted:!1};return n=new WebVRManager(e,t,i,o)},u=function(e){var t={};return t.width=e.offsetWidth,t.height=e.offsetHeight,GEILDANKEVR.utils.isFullscreen()&&GEILDANKEVR.utils.isLandscapeMode()?(t.width=screen.width,t.height=screen.height):GEILDANKEVR.utils.isFullscreen()&&GEILDANKEVR.utils.isPortraitMode()&&(t.width=screen.width,t.height=screen.height),t},E=function(e){return e.style.paddingBottom="0",e.style.position="fixed",e.style.top="0",e.style.left="0",e.width=screen.width,e.style.width=screen.width+"px",e.height=screen.height,e.style.height=screen.height+"px",e.style.zIndex="1",e},f=function(e,t,o){w(e),v(e,e.offsetWidth,e.offsetHeight),m(e,t,o)},g=function(e,t,o){E(e),v(e,screen.width,screen.height),m(e,t,o)},m=function(e,t,o){var n={};GEILDANKEVR.utils.isFullscreen()&&E(e),n=u(e),o.setSize(n.width,n.height),t.aspect=n.width/n.height,t.updateProjectionMatrix()},y=function(){document.body.style.width="100%"},v=function(e,t,o){var n=e.getElementsByTagName("canvas")[0];n.width=t,n.style.width=t+"px",n.height=o,n.style.height=o+"px"},w=function(e){return e.style.removeProperty("padding-bottom"),e.style.removeProperty("position"),e.style.removeProperty("top"),e.style.removeProperty("left"),e.style.removeProperty("width"),e.style.removeProperty("height"),e.style.removeProperty("z-index"),e},t.cancelRenderLoop=function(){cancelAnimationFrame(R)},t.getStage=function(){return h},t.init=function(e,t){var u=void 0,E=void 0,p=void 0,f=void 0,g=void 0,m=void 0,R=void 0,v=void 0,w=void 0;return m="object"===("undefined"==typeof e?"undefined":_typeof(e)),GEILDANKEVR.utils.errorChecker(m),v=s(t),w=c(),u=i(e),p=a(u),g=l(v,e),R=d(v,g,e),f=r(u),E=new THREE.Clock,y(),e.appendChild(v.domElement),w.add(f),h.renderer=v,h.camera=u,h.controls=p,h.dolly=f,h.manager=R,h.scene=w,h.renderer=v,h.clock=E,h.container=e,requestAnimationFrame(function(e){n(e,p,u,R,w)}),o(e,u,g),h},t.registerAnimation=function(e,t){b[e]=t},t.deregisterAnimation=function(e){delete b[e]},t.destroyScene=function(){h.scene=null,h.camera=null,h.controls=null,h.manager=null,h.dolly=null,h.renderer=null},t.setClearColor=function(e){h.renderer.clearColor=e},t.setLookAt=function(e){var t=GEILDANKEVR.utils.degreeToRadians(e);h.dolly.rotation.y=t},t.getCurrentContainerDimensions=u,t.makeContainerFullscreen=E,t.onFullscreenStart=g,t.undoContainerFullscreen=w,t}();var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};window.GEILDANKEVR.utils=function(){var e={},t={},o={},n={},i={},r=!1,a=new THREE.Vector2,s=new THREE.Vector3,c={};return t=function(e,t,o){var n={},i={},r={};r=new THREE.Raycaster,n=GEILDANKEVR.stage.getStage().camera,i=window.setInterval(function(){var a=[];r.set(n.getWorldPosition(),n.getWorldDirection()),a=r.intersectObject(t),0===a.length&&(o(),clearTimeout(e),clearInterval(i))},50)},o=function(e,t,o){var n={},i={},r={};r=new THREE.Raycaster,n=GEILDANKEVR.stage.getStage().camera,i=window.setInterval(function(){var s=[];r.setFromCamera(a,n),s=r.intersectObject(t),0===s.length&&(o(),clearTimeout(e),clearInterval(i))},50)},n=function(){var e={};return e=screen.orientation.type||screen.mozOrientation.type||screen.msOrientation.type},i=function(){GEILDANKEVR.mobileDetection&&GEILDANKEVR.mobileDetection.isMobile()===!1&&document.addEventListener("mousemove",c,!1)},c=function(e){var t=GEILDANKEVR.stage.getStage().camera,o=GEILDANKEVR.stage.getStage().container,n=GEILDANKEVR.utils.getElementPosition(o).x,i=GEILDANKEVR.utils.getElementPosition(o).y,r=GEILDANKEVR.utils.getCanvasDimensions().height,c=GEILDANKEVR.utils.getCanvasDimensions().width;e.preventDefault(),a.x=(e.clientX-n)/c*2-1,a.y=-(e.clientY-i)/r*2+1,s=new THREE.Vector3(a.x,a.y,.5).unproject(t)},e.degreeToRadians=function(e){return e*Math.PI/180},e.errorChecker=function(e){if(!e)throw new Error("Arguments are not correct.")},e.getCanvasDimensions=function(){var e=0,t=0;return t=GEILDANKEVR.stage.getStage().container.clientWidth,e=GEILDANKEVR.stage.getStage().container.clientHeight,{height:e,width:t}},e.getElementPosition=function(e){var t=e.getBoundingClientRect(),o=0,n=0;return o=window.pageXOffset||document.documentElement.scrollLeft,n=window.pageYOffset||document.documentElement.scrollTop,{x:t.left+o,y:t.top+n}},e.getRandomInteger=function(e,t){return Math.floor(Math.random()*(t-e+1))+e},e.getRandomGauss=function(e,t,o){return t*Math.pow(Math.random()-.5,o)+e},e.getVrDisplayMode=function(){return r},e.isFullscreen=function(){var e=!1;return null!==document.webkitFullscreenElement&&null!==document.mozFullScreenElement&&(e=!0),e},e.isLandscapeMode=function(){var e=!1,t=n();return"landscape-primary"!==t&&"landscape-secondary"!==t||(e=!0),e},e.isPortraitMode=function(){var e=!1,t=n();return"portrait-primary"!==t&&"portrait-secondary"!==t||(e=!0),e},e.handleLookat=function(e){var n=void 0,i=!1;i="object"===("undefined"==typeof e?"undefined":_typeof(e))&&"object"===_typeof(e.element)&&"function"==typeof e.lookAt&&"object"===_typeof(e.lookAtArguments)&&"function"==typeof e.lookAway&&"object"===_typeof(e.lookAwayArguments),GEILDANKEVR.utils.errorChecker(i),e.delay?n=setTimeout(function(){e.lookAt(e.lookAtArguments)},e.delay):e.lookAt(e.lookAtArguments),GEILDANKEVR.mobileDetection.isMobile()===!0?t(n,e.element.object,function(){e.lookAway(e.lookAwayArguments)}):o(n,e.element.object,function(){e.lookAway(e.lookAwayArguments)})},e.setVrDisplayMode=function(e){r=e},e.getMouse2d=function(){return a},e.getMouse3d=function(){return s},i(),e}();
  THREE.VRControls=function(o,e){function t(o){for(var t=0;t<o.length;t++)if("VRDisplay"in window&&o[t]instanceof VRDisplay||"PositionSensorVRDevice"in window&&o[t]instanceof PositionSensorVRDevice){i=o[t];break}i||e&&e("VR input not available.")}var i,s=this,n=new THREE.Matrix4;navigator.getVRDisplays?navigator.getVRDisplays().then(t):navigator.getVRDevices&&navigator.getVRDevices().then(t),this.scale=1,this.standing=!1,this.userHeight=1.6,this.update=function(){if(i){if(i.getPose){var e=i.getPose();null!==e.orientation&&o.quaternion.fromArray(e.orientation),null!==e.position?o.position.fromArray(e.position):o.position.set(0,0,0)}else{var t=i.getState();null!==t.orientation&&o.quaternion.copy(t.orientation),null!==t.position?o.position.copy(t.position):o.position.set(0,0,0)}this.standing&&(i.stageParameters?(o.updateMatrix(),n.fromArray(i.stageParameters.sittingToStandingTransform),o.applyMatrix(n)):o.position.setY(o.position.y+this.userHeight)),o.position.multiplyScalar(s.scale)}},this.resetPose=function(){i&&(void 0!==i.resetPose?i.resetPose():void 0!==i.resetSensor?i.resetSensor():void 0!==i.zeroSensor&&i.zeroSensor())},this.resetSensor=function(){console.warn("THREE.VRControls: .resetSensor() is now .resetPose()."),this.resetPose()},this.zeroSensor=function(){console.warn("THREE.VRControls: .zeroSensor() is now .resetPose()."),this.resetPose()},this.dispose=function(){i=null}};
  THREE.VREffect=function(e,t){function r(e){for(var r=0;r<e.length;r++){if("VRDisplay"in window&&e[r]instanceof VRDisplay){o=e[r],u=!1;break}if("HMDVRDevice"in window&&e[r]instanceof HMDVRDevice){o=e[r],u=!0;break}}void 0===o&&t&&t("HMD not available")}function n(){var t=w;if(w=void 0!==o&&(o.isPresenting||u&&document[R]instanceof window.HTMLElement),t!==w)if(w){m=e.getPixelRatio(),v=e.getSize();var r,n,i=o.getEyeParameters("left");u?(r=i.renderRect.width,n=i.renderRect.height):(r=i.renderWidth,n=i.renderHeight),e.setPixelRatio(1),e.setSize(2*r,n,!1)}else e.setPixelRatio(m),e.setSize(v.width,v.height)}function i(e){var t=2/(e.leftTan+e.rightTan),r=(e.leftTan-e.rightTan)*t*.5,n=2/(e.upTan+e.downTan),i=(e.upTan-e.downTan)*n*.5;return{scale:[t,n],offset:[r,i]}}function a(e,t,r,n){t=void 0===t||t,r=void 0===r?.01:r,n=void 0===n?1e4:n;var a=t?-1:1,s=new THREE.Matrix4,o=s.elements,l=i(e);return o[0]=l.scale[0],o[1]=0,o[2]=l.offset[0]*a,o[3]=0,o[4]=0,o[5]=l.scale[1],o[6]=-l.offset[1]*a,o[7]=0,o[8]=0,o[9]=0,o[10]=n/(r-n)*-a,o[11]=n*r/(r-n),o[12]=0,o[13]=0,o[14]=a,o[15]=0,s.transpose(),s}function s(e,t,r,n){var i=Math.PI/180,s={upTan:Math.tan(e.upDegrees*i),downTan:Math.tan(e.downDegrees*i),leftTan:Math.tan(e.leftDegrees*i),rightTan:Math.tan(e.rightDegrees*i)};return a(s,t,r,n)}var o,l,d,c,h,u=!1,f=new THREE.Vector3,g=new THREE.Vector3;navigator.getVRDisplays?navigator.getVRDisplays().then(r):navigator.getVRDevices&&navigator.getVRDevices().then(r),this.scale=1;var w=!1,v=e.getSize(),m=e.getPixelRatio();this.setSize=function(t,r){if(v={width:t,height:r},w){var n=o.getEyeParameters("left");e.setPixelRatio(1),u?e.setSize(2*n.renderRect.width,n.renderRect.height,!1):e.setSize(2*n.renderWidth,n.renderHeight,!1)}else e.setPixelRatio(m),e.setSize(t,r)};var p,E,R,y=e.domElement;y.requestFullscreen?(p="requestFullscreen",R="fullscreenElement",E="exitFullscreen",document.addEventListener("fullscreenchange",n,!1)):y.mozRequestFullScreen?(p="mozRequestFullScreen",R="mozFullScreenElement",E="mozCancelFullScreen",document.addEventListener("mozfullscreenchange",n,!1)):(p="webkitRequestFullscreen",R="webkitFullscreenElement",E="webkitExitFullscreen",document.addEventListener("webkitfullscreenchange",n,!1)),window.addEventListener("vrdisplaypresentchange",n,!1),this.setFullScreen=function(e){return new Promise(function(t,r){return void 0===o?void r(new Error("No VR hardware found.")):w===e?void t():void(u?y[p]?(y[e?p:E]({vrDisplay:o}),t()):(console.error("No compatible requestFullscreen method found."),r(new Error("No compatible requestFullscreen method found."))):t(e?o.requestPresent([{source:y}]):o.exitPresent()))})},this.requestPresent=function(){return this.setFullScreen(!0)},this.exitPresent=function(){return this.setFullScreen(!1)};var x=new THREE.PerspectiveCamera;x.layers.enable(1);var T=new THREE.PerspectiveCamera;T.layers.enable(2),this.render=function(t,r){if(o&&w){var n=t.autoUpdate;n&&(t.updateMatrixWorld(),t.autoUpdate=!1);var i=o.getEyeParameters("left"),a=o.getEyeParameters("right");u?(f.copy(i.eyeTranslation),g.copy(a.eyeTranslation),c=i.recommendedFieldOfView,h=a.recommendedFieldOfView):(f.fromArray(i.offset),g.fromArray(a.offset),c=i.fieldOfView,h=a.fieldOfView),Array.isArray(t)&&(console.warn("THREE.VREffect.render() no longer supports arrays. Use object.layers instead."),t=t[0]);var v=e.getSize();l={x:0,y:0,width:v.width/2,height:v.height},d={x:v.width/2,y:0,width:v.width/2,height:v.height},e.setScissorTest(!0),e.clear(),null===r.parent&&r.updateMatrixWorld(),x.projectionMatrix=s(c,!0,r.near,r.far),T.projectionMatrix=s(h,!0,r.near,r.far),r.matrixWorld.decompose(x.position,x.quaternion,x.scale),r.matrixWorld.decompose(T.position,T.quaternion,T.scale);var m=this.scale;return x.translateOnAxis(f,m),T.translateOnAxis(g,m),e.setViewport(l.x,l.y,l.width,l.height),e.setScissor(l.x,l.y,l.width,l.height),e.render(t,x),e.setViewport(d.x,d.y,d.width,d.height),e.setScissor(d.x,d.y,d.width,d.height),e.render(t,T),e.setScissorTest(!1),n&&(t.autoUpdate=!0),void(u||o.submitFrame())}e.render(t,r)}};
  !function e(t,i,n){function o(r,a){if(!i[r]){if(!t[r]){var c="function"==typeof require&&require;if(!a&&c)return c(r,!0);if(s)return s(r,!0);var u=new Error("Cannot find module '"+r+"'");throw u.code="MODULE_NOT_FOUND",u}var l=i[r]={exports:{}};t[r][0].call(l.exports,function(e){var i=t[r][1][e];return o(i?i:e)},l,l.exports,e,t,i,n)}return i[r].exports}for(var s="function"==typeof require&&require,r=0;r<n.length;r++)o(n[r]);return o}({1:[function(e,t,i){function n(e){var t=e||document.body;this.loadIcons_();var i=this.createButton();i.src=this.ICONS.fullscreen,i.title="Fullscreen mode";var n=i.style;n.bottom=0,n.right=0,i.addEventListener("click",this.createClickHandler_("fs")),t.appendChild(i),this.fsButton=i;var o=this.createButton();o.src=this.ICONS.cardboard,o.title="Virtual reality mode";var n=o.style;n.bottom=0,n.right="48px",o.addEventListener("click",this.createClickHandler_("vr")),t.appendChild(o),this.vrButton=o,this.isVisible=!0}var o=e("./emitter.js"),s=e("./modes.js"),r=e("./util.js");n.prototype=new o,n.prototype.createButton=function(){var e=document.createElement("img");e.className="webvr-button";var t=e.style;return t.position="absolute",t.width="24px",t.height="24px",t.backgroundSize="cover",t.backgroundColor="transparent",t.border=0,t.userSelect="none",t.webkitUserSelect="none",t.MozUserSelect="none",t.cursor="pointer",t.padding="12px",t.zIndex=1,t.display="none",t.boxSizing="content-box",e.draggable=!1,e.addEventListener("dragstart",function(e){e.preventDefault()}),e.addEventListener("mouseenter",function(e){t.filter=t.webkitFilter="drop-shadow(0 0 5px rgba(255,255,255,1))"}),e.addEventListener("mouseleave",function(e){t.filter=t.webkitFilter=""}),e},n.prototype.setMode=function(e,t){if(t=t||WebVRConfig.FORCE_ENABLE_VR,this.isVisible){switch(e){case s.NORMAL:this.fsButton.style.display="block",this.fsButton.src=this.ICONS.fullscreen,this.vrButton.style.display=t?"block":"none";break;case s.MAGIC_WINDOW:this.fsButton.style.display="block",this.fsButton.src=this.ICONS.exitFullscreen,this.vrButton.style.display=t?"block":"none";break;case s.VR:this.fsButton.style.display="none",this.vrButton.style.display="none"}var i=this.fsButton.style.display;this.fsButton.style.display="inline-block",this.fsButton.offsetHeight,this.fsButton.style.display=i}},n.prototype.setVisibility=function(e){this.isVisible=e,this.fsButton.style.display=e?"block":"none",this.vrButton.style.display=e?"block":"none"},n.prototype.createClickHandler_=function(e){return function(t){t.stopPropagation(),t.preventDefault(),this.emit(e)}.bind(this)},n.prototype.loadIcons_=function(){this.ICONS={},this.ICONS.cardboard=r.base64("image/svg+xml","PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNHB4IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iI0ZGRkZGRiI+CiAgICA8cGF0aCBkPSJNMjAuNzQgNkgzLjIxQzI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uNjRsMiAzLjQ2Yy4xMi4yMi4zOS4zLjYxLjIybDIuNDktMWMuNTIuNCAxLjA4LjczIDEuNjkuOThsLjM4IDIuNjVjLjAzLjI0LjI0LjQyLjQ5LjQyaDRjLjI1IDAgLjQ2LS4xOC40OS0uNDJsLjM4LTIuNjVjLjYxLS4yNSAxLjE3LS41OSAxLjY5LS45OGwyLjQ5IDFjLjIzLjA5LjQ5IDAgLjYxLS4yMmwyLTMuNDZjLjEyLS4yMi4wNy0uNDktLjEyLS42NGwtMi4xMS0xLjY1ek0xMiAxNS41Yy0xLjkzIDAtMy41LTEuNTctMy41LTMuNXMxLjU3LTMuNSAzLjUtMy41IDMuNSAxLjU3IDMuNSAzLjUtMS41NyAzLjUtMy41IDMuNXoiLz4KPC9zdmc+Cg==")},t.exports=n},{"./emitter.js":2,"./modes.js":4,"./util.js":5}],2:[function(e,t,i){function n(){this.callbacks={}}n.prototype.emit=function(e){var t=this.callbacks[e];if(t){var i=[].slice.call(arguments);i.shift();for(var n=0;n<t.length;n++)t[n].apply(this,i)}},n.prototype.on=function(e,t){e in this.callbacks?this.callbacks[e].push(t):this.callbacks[e]=[t]},t.exports=n},{}],3:[function(e,t,i){var n=e("./webvr-manager.js");window.WebVRConfig=window.WebVRConfig||{},window.WebVRManager=n},{"./webvr-manager.js":6}],4:[function(e,t,i){var n={UNKNOWN:0,NORMAL:1,MAGIC_WINDOW:2,VR:3};t.exports=n},{}],5:[function(e,t,i){var n={};n.base64=function(e,t){return"data:"+e+";base64,"+t},n.isMobile=function(){var e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e},n.isFirefox=function(){return/firefox/i.test(navigator.userAgent)},n.isIOS=function(){return/(iPad|iPhone|iPod)/g.test(navigator.userAgent)},n.isIFrame=function(){try{return window.self!==window.top}catch(e){return!0}},n.appendQueryParameter=function(e,t,i){var n=e.indexOf("?")<0?"?":"&";return e+=n+t+"="+i},n.getQueryParameter=function(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)"),i=t.exec(location.search);return null===i?"":decodeURIComponent(i[1].replace(/\+/g," "))},n.isLandscapeMode=function(){return 90==window.orientation||window.orientation==-90},n.getScreenWidth=function(){return Math.max(window.screen.width,window.screen.height)*window.devicePixelRatio},n.getScreenHeight=function(){return Math.min(window.screen.width,window.screen.height)*window.devicePixelRatio},n.projectionMatrixToVector_=function(e,t){var i=t||{},n=i.xScale||1,o=i.yScale||1,s=i.xTrans||0,r=i.yTrans||0,a=e.elements,c=new THREE.Vector4;return c.set(a[0]*n,a[5]*o,a[8]-1-s,a[9]-1-r).divideScalar(2),c},n.leftProjectionVectorToRight_=function(e){var t=new THREE.Vector4(0,0,1,0);return t.add(e),t.z*=-1,t},t.exports=n},{}],6:[function(e,t,i){function n(e,t,i,n){this.params=i||{},this.mode=r.UNKNOWN,this.hideButton=this.params.hideButton||!1,this.predistorted=!!this.params.predistorted,this.renderer=e,this.effect=t,this.button=new o(n),this.isFullscreenDisabled=!!a.getQueryParameter("no_fullscreen"),this.startMode=r.NORMAL;var s=parseInt(a.getQueryParameter("start_mode"));isNaN(s)||(this.startMode=s),this.hideButton&&this.button.setVisibility(!1),this.getDeviceByType_(VRDisplay).then(function(e){switch(this.hmd=e,this.isVRCompatible=!e.isPolyfilled||a.isMobile(),this.startMode){case r.MAGIC_WINDOW:this.setMode_(r.MAGIC_WINDOW);break;case r.VR:this.enterVRMode_(),this.setMode_(r.VR);break;default:this.setMode_(r.NORMAL)}this.emit("initialized")}.bind(this)),this.button.on("fs",this.onFSClick_.bind(this)),this.button.on("vr",this.onVRClick_.bind(this)),document.addEventListener("webkitfullscreenchange",this.onFullscreenChange_.bind(this)),document.addEventListener("mozfullscreenchange",this.onFullscreenChange_.bind(this)),document.addEventListener("msfullscreenchange",this.onFullscreenChange_.bind(this)),window.addEventListener("vrdisplaypresentchange",this.onVRDisplayPresentChange_.bind(this)),window.addEventListener("vrdisplaydeviceparamschange",this.onVRDisplayDeviceParamsChange_.bind(this))}var o=e("./button-manager.js"),s=e("./emitter.js"),r=e("./modes.js"),a=e("./util.js");n.prototype=new s,n.Modes=r,n.prototype.getDeviceByType_=function(e){return new Promise(function(t,i){navigator.getVRDisplays().then(function(i){for(var n=0;n<i.length;n++)if(i[n]instanceof e){t(i[n]);break}t(null)},function(){t(null)})})},n.prototype.render=function(e,t,i){e instanceof Array?this.effect.render(e[0],t):this.effect.render(e,t)},n.prototype.enterVRMode_=function(){this.hmd.requestPresent({source:this.renderer.domElement,predistorted:this.predistorted})},n.prototype.setMode_=function(e){var t=this.mode;return e==this.mode?void console.warn("Not changing modes, already in %s",e):(console.log("Mode change: %s => %s",this.mode,e),this.mode=e,this.button.setMode(e,this.isVRCompatible),void this.emit("modechange",e,t))},n.prototype.onFSClick_=function(){switch(this.mode){case r.NORMAL:if(a.isIOS()&&a.isIFrame()){var e=window.location.href;return e=a.appendQueryParameter(e,"no_fullscreen","true"),e=a.appendQueryParameter(e,"start_mode",r.MAGIC_WINDOW),void(top.location.href=e)}this.setMode_(r.MAGIC_WINDOW),this.requestFullscreen_();break;case r.MAGIC_WINDOW:if(this.isFullscreenDisabled)return void window.history.back();this.setMode_(r.NORMAL),this.exitFullscreen_()}},n.prototype.onVRClick_=function(){if(this.mode==r.NORMAL&&a.isIOS()&&a.isIFrame()){var e=window.location.href;return e=a.appendQueryParameter(e,"no_fullscreen","true"),e=a.appendQueryParameter(e,"start_mode",r.VR),void(top.location.href=e)}this.enterVRMode_()},n.prototype.requestFullscreen_=function(){var e=document.body;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()},n.prototype.exitFullscreen_=function(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},n.prototype.onVRDisplayPresentChange_=function(e){console.log("onVRDisplayPresentChange_",e),this.hmd.isPresenting?this.setMode_(r.VR):this.setMode_(r.NORMAL)},n.prototype.onVRDisplayDeviceParamsChange_=function(e){console.log("onVRDisplayDeviceParamsChange_",e)},n.prototype.onFullscreenChange_=function(e){null!==document.webkitFullscreenElement&&null!==document.mozFullScreenElement||this.setMode_(r.NORMAL)},t.exports=n},{"./button-manager.js":1,"./emitter.js":2,"./modes.js":4,"./util.js":5}]},{},[3]);
  !function e(t,i,M){function s(r,N){if(!i[r]){if(!t[r]){var n="function"==typeof require&&require;if(!N&&n)return n(r,!0);if(A)return A(r,!0);var D=new Error("Cannot find module '"+r+"'");throw D.code="MODULE_NOT_FOUND",D}var u=i[r]={exports:{}};t[r][0].call(u.exports,function(e){var i=t[r][1][e];return s(i?i:e)},u,u.exports,e,t,i,M)}return i[r].exports}for(var A="function"==typeof require&&require,r=0;r<M.length;r++)s(M[r]);return s}({1:[function(e,t,i){(function(i,M){(function(){"use strict";function s(e){return"function"==typeof e||"object"==typeof e&&null!==e}function A(e){return"function"==typeof e}function r(e){H=e}function N(e){q=e}function n(){return function(){i.nextTick(g)}}function D(){return function(){Z(g)}}function u(){var e=0,t=new te(g),i=document.createTextNode("");return t.observe(i,{characterData:!0}),function(){i.data=e=++e%2}}function o(){var e=new MessageChannel;return e.port1.onmessage=g,function(){e.port2.postMessage(0)}}function a(){return function(){setTimeout(g,1)}}function g(){for(var e=0;e<K;e+=2){var t=se[e],i=se[e+1];t(i),se[e]=void 0,se[e+1]=void 0}K=0}function j(){try{var t=e,i=t("vertx");return Z=i.runOnLoop||i.runOnContext,D()}catch(M){return a()}}function I(e,t){var i=this,M=new this.constructor(c);void 0===M[Ne]&&Y(M);var s=i._state;if(s){var A=arguments[s-1];q(function(){m(s,M,A,i._result)})}else S(i,M,e,t);return M}function L(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var i=new t(c);return d(i,e),i}function c(){}function T(){return new TypeError("You cannot resolve a promise with itself")}function E(){return new TypeError("A promises callback cannot return that same promise.")}function y(e){try{return e.then}catch(t){return oe.error=t,oe}}function w(e,t,i,M){try{e.call(t,i,M)}catch(s){return s}}function l(e,t,i){q(function(e){var M=!1,s=w(i,t,function(i){M||(M=!0,t!==i?d(e,i):O(e,i))},function(t){M||(M=!0,C(e,t))},"Settle: "+(e._label||" unknown promise"));!M&&s&&(M=!0,C(e,s))},e)}function z(e,t){t._state===De?O(e,t._result):t._state===ue?C(e,t._result):S(t,void 0,function(t){d(e,t)},function(t){C(e,t)})}function h(e,t,i){t.constructor===e.constructor&&i===Ae&&constructor.resolve===re?z(e,t):i===oe?C(e,oe.error):void 0===i?O(e,t):A(i)?l(e,t,i):O(e,t)}function d(e,t){e===t?C(e,T()):s(t)?h(e,t,y(t)):O(e,t)}function x(e){e._onerror&&e._onerror(e._result),p(e)}function O(e,t){e._state===ne&&(e._result=t,e._state=De,0!==e._subscribers.length&&q(p,e))}function C(e,t){e._state===ne&&(e._state=ue,e._result=t,q(x,e))}function S(e,t,i,M){var s=e._subscribers,A=s.length;e._onerror=null,s[A]=t,s[A+De]=i,s[A+ue]=M,0===A&&e._state&&q(p,e)}function p(e){var t=e._subscribers,i=e._state;if(0!==t.length){for(var M,s,A=e._result,r=0;r<t.length;r+=3)M=t[r],s=t[r+i],M?m(i,M,s,A):s(A);e._subscribers.length=0}}function f(){this.error=null}function Q(e,t){try{return e(t)}catch(i){return ae.error=i,ae}}function m(e,t,i,M){var s,r,N,n,D=A(i);if(D){if(s=Q(i,M),s===ae?(n=!0,r=s.error,s=null):N=!0,t===s)return void C(t,E())}else s=M,N=!0;t._state!==ne||(D&&N?d(t,s):n?C(t,r):e===De?O(t,s):e===ue&&C(t,s))}function k(e,t){try{t(function(t){d(e,t)},function(t){C(e,t)})}catch(i){C(e,i)}}function U(){return ge++}function Y(e){e[Ne]=ge++,e._state=void 0,e._result=void 0,e._subscribers=[]}function v(e){return new Te(this,e).promise}function B(e){var t=this;return new t(J(e)?function(i,M){for(var s=e.length,A=0;A<s;A++)t.resolve(e[A]).then(i,M)}:function(e,t){t(new TypeError("You must pass an array to race."))})}function b(e){var t=this,i=new t(c);return C(i,e),i}function _(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function R(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function G(e){this[Ne]=U(),this._result=this._state=void 0,this._subscribers=[],c!==e&&("function"!=typeof e&&_(),this instanceof G?k(this,e):R())}function P(e,t){this._instanceConstructor=e,this.promise=new e(c),this.promise[Ne]||Y(this.promise),J(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?O(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&O(this.promise,this._result))):C(this.promise,F())}function F(){return new Error("Array Methods must be provided an Array")}function W(){var e;if("undefined"!=typeof M)e=M;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var i=e.Promise;i&&"[object Promise]"===Object.prototype.toString.call(i.resolve())&&!i.cast||(e.Promise=ce)}var V;V=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var Z,H,X,J=V,K=0,q=function(e,t){se[K]=e,se[K+1]=t,K+=2,2===K&&(H?H(g):X())},$="undefined"!=typeof window?window:void 0,ee=$||{},te=ee.MutationObserver||ee.WebKitMutationObserver,ie="undefined"==typeof self&&"undefined"!=typeof i&&"[object process]"==={}.toString.call(i),Me="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,se=new Array(1e3);X=ie?n():te?u():Me?o():void 0===$&&"function"==typeof e?j():a();var Ae=I,re=L,Ne=Math.random().toString(36).substring(16),ne=void 0,De=1,ue=2,oe=new f,ae=new f,ge=0,je=v,Ie=B,Le=b,ce=G;G.all=je,G.race=Ie,G.resolve=re,G.reject=Le,G._setScheduler=r,G._setAsap=N,G._asap=q,G.prototype={constructor:G,then:Ae,"catch":function(e){return this.then(null,e)}};var Te=P;P.prototype._enumerate=function(){for(var e=this.length,t=this._input,i=0;this._state===ne&&i<e;i++)this._eachEntry(t[i],i)},P.prototype._eachEntry=function(e,t){var i=this._instanceConstructor,M=i.resolve;if(M===re){var s=y(e);if(s===Ae&&e._state!==ne)this._settledAt(e._state,t,e._result);else if("function"!=typeof s)this._remaining--,this._result[t]=e;else if(i===ce){var A=new i(c);h(A,e,s),this._willSettleAt(A,t)}else this._willSettleAt(new i(function(t){t(e)}),t)}else this._willSettleAt(M(e),t)},P.prototype._settledAt=function(e,t,i){var M=this.promise;M._state===ne&&(this._remaining--,e===ue?C(M,i):this._result[t]=i),0===this._remaining&&O(M,this._result)},P.prototype._willSettleAt=function(e,t){var i=this;S(e,void 0,function(e){i._settledAt(De,t,e)},function(e){i._settledAt(ue,t,e)})};var Ee=W,ye={Promise:ce,polyfill:Ee};"function"==typeof define&&define.amd?define(function(){return ye}):"undefined"!=typeof t&&t.exports?t.exports=ye:"undefined"!=typeof this&&(this.ES6Promise=ye),Ee()}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:3}],2:[function(e,t,i){"use strict";function M(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function s(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;var M=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==M.join(""))return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach(function(e){s[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},s)).join("")}catch(A){return!1}}var A=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;t.exports=s()?Object.assign:function(e,t){for(var i,s,N=M(e),n=1;n<arguments.length;n++){i=Object(arguments[n]);for(var D in i)A.call(i,D)&&(N[D]=i[D]);if(Object.getOwnPropertySymbols){s=Object.getOwnPropertySymbols(i);for(var u=0;u<s.length;u++)r.call(i,s[u])&&(N[s[u]]=i[s[u]])}}return N}},{}],3:[function(e,t,i){function M(){u&&N&&(u=!1,N.length?D=N.concat(D):o=-1,D.length&&s())}function s(){if(!u){var e=setTimeout(M);u=!0;for(var t=D.length;t;){for(N=D,D=[];++o<t;)N&&N[o].run();o=-1,t=D.length}N=null,u=!1,clearTimeout(e)}}function A(e,t){this.fun=e,this.array=t}function r(){}var N,n=t.exports={},D=[],u=!1,o=-1;n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];D.push(new A(e,t)),1!==D.length||u||setTimeout(s,0)},A.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=r,n.addListener=r,n.once=r,n.off=r,n.removeListener=r,n.removeAllListeners=r,n.emit=r,n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},{}],4:[function(e,t,i){function M(){this.isPolyfilled=!0,this.displayId=D++,this.displayName="webvr-polyfill displayName",this.isConnected=!0,this.isPresenting=!1,this.capabilities={hasPosition:!1,hasOrientation:!1,hasExternalDisplay:!1,canPresent:!1,maxLayers:1},this.stageParameters=null,this.waitingForPresent_=!1,this.layer_=null,this.fullscreenElement_=null,this.fullscreenWrapper_=null,this.fullscreenElementCachedStyle_=null,this.fullscreenEventTarget_=null,this.fullscreenChangeHandler_=null,this.fullscreenErrorHandler_=null,this.wakelock_=new n}function s(){this.isPolyfilled=!0,this.hardwareUnitId="webvr-polyfill hardwareUnitId",this.deviceId="webvr-polyfill deviceId",this.deviceName="webvr-polyfill deviceName"}function A(){}function r(){}var N=e("./util.js"),n=e("./wakelock.js"),D=1e3,u=!1;M.prototype.getPose=function(){return this.getImmediatePose()},M.prototype.requestAnimationFrame=function(e){return window.requestAnimationFrame(e)},M.prototype.cancelAnimationFrame=function(e){return window.cancelAnimationFrame(e)},M.prototype.wrapForFullscreen=function(e){function t(){if(s.fullscreenElement_){var e=["position: absolute","top: 0","left: 0","width: "+Math.max(screen.width,screen.height)+"px","height: "+Math.min(screen.height,screen.width)+"px","border: 0","margin: 0","padding: 0"];s.fullscreenElement_.setAttribute("style",e.join("; ")+";")}}if(N.isIOS())return e;if(!this.fullscreenWrapper_){this.fullscreenWrapper_=document.createElement("div");var i=["height: "+Math.min(screen.height,screen.width)+"px !important","top: 0 !important","left: 0 !important","right: 0 !important","border: 0","margin: 0","padding: 0","z-index: 999999 !important","position: fixed"];this.fullscreenWrapper_.setAttribute("style",i.join("; ")+";"),this.fullscreenWrapper_.classList.add("webvr-polyfill-fullscreen-wrapper")}if(this.fullscreenElement_==e)return this.fullscreenWrapper_;this.removeFullscreenWrapper(),this.fullscreenElement_=e;var M=this.fullscreenElement_.parentElement;M.insertBefore(this.fullscreenWrapper_,this.fullscreenElement_),M.removeChild(this.fullscreenElement_),this.fullscreenWrapper_.insertBefore(this.fullscreenElement_,this.fullscreenWrapper_.firstChild),this.fullscreenElementCachedStyle_=this.fullscreenElement_.getAttribute("style");var s=this;return t(),this.fullscreenWrapper_},M.prototype.removeFullscreenWrapper=function(){if(this.fullscreenElement_){var e=this.fullscreenElement_;this.fullscreenElementCachedStyle_?e.setAttribute("style",this.fullscreenElementCachedStyle_):e.removeAttribute("style"),this.fullscreenElement_=null,this.fullscreenElementCachedStyle_=null;var t=this.fullscreenWrapper_.parentElement;return this.fullscreenWrapper_.removeChild(e),t.insertBefore(e,this.fullscreenWrapper_),t.removeChild(this.fullscreenWrapper_),e}},M.prototype.requestPresent=function(e){if(this.isPresenting)return void console.error("Already presenting!");var t=this;return e instanceof Array||(u||(console.warn("Using a deprecated form of requestPresent. Should pass in an array of VRLayers."),u=!0),e=[e]),new Promise(function(i,M){function s(){var e=N.getFullscreenElement();t.isPresenting=r===e,t.isPresenting?(screen.orientation&&screen.orientation.lock&&screen.orientation.lock("landscape-primary"),t.waitingForPresent_=!1,t.beginPresent_(),i()):(screen.orientation&&screen.orientation.unlock&&screen.orientation.unlock(),t.removeFullscreenWrapper(),t.wakelock_.release(),t.endPresent_(),t.removeFullscreenListeners_()),t.fireVRDisplayPresentChange_()}function A(){t.waitingForPresent_&&(t.removeFullscreenWrapper(),t.removeFullscreenListeners_(),t.wakelock_.release(),t.waitingForPresent_=!1,t.isPresenting=!1,M(new Error("Unable to present.")))}if(!t.capabilities.canPresent)return void M(new Error("VRDisplay is not capable of presenting."));if(0==e.length||e.length>t.capabilities.maxLayers)return void M(new Error("Invalid number of layers."));if(t.layer_=e[0],t.waitingForPresent_=!1,t.layer_&&t.layer_.source){var r=t.wrapForFullscreen(t.layer_.source);t.addFullscreenListeners_(r,s,A),N.requestFullscreen(r)?(t.wakelock_.request(),t.waitingForPresent_=!0):N.isIOS()&&(t.wakelock_.request(),t.isPresenting=!0,t.beginPresent_(),t.fireVRDisplayPresentChange_(),i())}t.waitingForPresent_||N.isIOS()||(N.exitFullscreen(),M(new Error("Unable to present.")))})},M.prototype.exitPresent=function(){var e=this.isPresenting,t=this;return this.isPresenting=!1,this.layer_=null,this.wakelock_.release(),new Promise(function(i,M){e?(!N.exitFullscreen()&&N.isIOS()&&(t.endPresent_(),t.fireVRDisplayPresentChange_()),i()):M(new Error("Was not presenting to VRDisplay."))})},M.prototype.getLayers=function(){return this.layer_?[this.layer_]:[]},M.prototype.fireVRDisplayPresentChange_=function(){var e=new CustomEvent("vrdisplaypresentchange",{detail:{vrdisplay:this}});window.dispatchEvent(e)},M.prototype.addFullscreenListeners_=function(e,t,i){this.removeFullscreenListeners_(),this.fullscreenEventTarget_=e,this.fullscreenChangeHandler_=t,this.fullscreenErrorHandler_=i,t&&(e.addEventListener("fullscreenchange",t,!1),e.addEventListener("webkitfullscreenchange",t,!1),document.addEventListener("mozfullscreenchange",t,!1),e.addEventListener("msfullscreenchange",t,!1)),i&&(e.addEventListener("fullscreenerror",i,!1),e.addEventListener("webkitfullscreenerror",i,!1),document.addEventListener("mozfullscreenerror",i,!1),e.addEventListener("msfullscreenerror",i,!1))},M.prototype.removeFullscreenListeners_=function(){if(this.fullscreenEventTarget_){var e=this.fullscreenEventTarget_;if(this.fullscreenChangeHandler_){var t=this.fullscreenChangeHandler_;e.removeEventListener("fullscreenchange",t,!1),e.removeEventListener("webkitfullscreenchange",t,!1),document.removeEventListener("mozfullscreenchange",t,!1),e.removeEventListener("msfullscreenchange",t,!1)}if(this.fullscreenErrorHandler_){var i=this.fullscreenErrorHandler_;e.removeEventListener("fullscreenerror",i,!1),e.removeEventListener("webkitfullscreenerror",i,!1),document.removeEventListener("mozfullscreenerror",i,!1),e.removeEventListener("msfullscreenerror",i,!1)}this.fullscreenEventTarget_=null,this.fullscreenChangeHandler_=null,this.fullscreenErrorHandler_=null}},M.prototype.beginPresent_=function(){},M.prototype.endPresent_=function(){},M.prototype.submitFrame=function(e){},M.prototype.getEyeParameters=function(e){return null},A.prototype=new s,r.prototype=new s,t.exports.VRDisplay=M,t.exports.VRDevice=s,t.exports.HMDVRDevice=A,t.exports.PositionSensorVRDevice=r},{"./util.js":24,"./wakelock.js":26}],5:[function(e,t,i){function M(e){this.gl=e,this.ctxAttribs=e.getContextAttributes(),this.meshWidth=20,this.meshHeight=20,this.bufferScale=WebVRConfig.BUFFER_SCALE,this.bufferWidth=e.drawingBufferWidth,this.bufferHeight=e.drawingBufferHeight,this.realBindFramebuffer=e.bindFramebuffer,this.realEnable=e.enable,this.realDisable=e.disable,this.realColorMask=e.colorMask,this.realClearColor=e.clearColor,this.realViewport=e.viewport,A.isIOS()||(this.realCanvasWidth=Object.getOwnPropertyDescriptor(e.canvas.__proto__,"width"),this.realCanvasHeight=Object.getOwnPropertyDescriptor(e.canvas.__proto__,"height")),this.isPatched=!1,this.lastBoundFramebuffer=null,this.cullFace=!1,this.depthTest=!1,this.blend=!1,this.scissorTest=!1,this.stencilTest=!1,this.viewport=[0,0,0,0],this.colorMask=[!0,!0,!0,!0],this.clearColor=[0,0,0,0],this.attribs={position:0,texCoord:1},this.program=A.linkProgram(e,N,n,this.attribs),this.uniforms=A.getProgramUniforms(e,this.program),this.viewportOffsetScale=new Float32Array(8),this.setTextureBounds(),this.vertexBuffer=e.createBuffer(),this.indexBuffer=e.createBuffer(),this.indexCount=0,this.renderTarget=e.createTexture(),this.framebuffer=e.createFramebuffer(),this.depthStencilBuffer=null,this.depthBuffer=null,this.stencilBuffer=null,this.ctxAttribs.depth&&this.ctxAttribs.stencil?this.depthStencilBuffer=e.createRenderbuffer():this.ctxAttribs.depth?this.depthBuffer=e.createRenderbuffer():this.ctxAttribs.stencil&&(this.stencilBuffer=e.createRenderbuffer()),this.patch(),this.onResize(),WebVRConfig.CARDBOARD_UI_DISABLED||(this.cardboardUI=new s(e))}var s=e("./cardboard-ui.js"),A=e("./util.js"),r=e("./deps/wglu-preserve-state.js"),N=["attribute vec2 position;","attribute vec3 texCoord;","varying vec2 vTexCoord;","uniform vec4 viewportOffsetScale[2];","void main() {","  vec4 viewport = viewportOffsetScale[int(texCoord.z)];","  vTexCoord = (texCoord.xy * viewport.zw) + viewport.xy;","  gl_Position = vec4( position, 1.0, 1.0 );","}"].join("\n"),n=["precision mediump float;","uniform sampler2D diffuse;","varying vec2 vTexCoord;","void main() {","  gl_FragColor = texture2D(diffuse, vTexCoord);","}"].join("\n");M.prototype.destroy=function(){var e=this.gl;this.unpatch(),e.deleteProgram(this.program),e.deleteBuffer(this.vertexBuffer),e.deleteBuffer(this.indexBuffer),e.deleteTexture(this.renderTarget),e.deleteFramebuffer(this.framebuffer),this.depthStencilBuffer&&e.deleteRenderbuffer(this.depthStencilBuffer),this.depthBuffer&&e.deleteRenderbuffer(this.depthBuffer),this.stencilBuffer&&e.deleteRenderbuffer(this.stencilBuffer),this.cardboardUI&&this.cardboardUI.destroy()},M.prototype.onResize=function(){var e=this.gl,t=this,i=[e.RENDERBUFFER_BINDING,e.TEXTURE_BINDING_2D,e.TEXTURE0];r(e,i,function(e){t.realBindFramebuffer.call(e,e.FRAMEBUFFER,null),t.scissorTest&&t.realDisable.call(e,e.SCISSOR_TEST),t.realColorMask.call(e,!0,!0,!0,!0),t.realViewport.call(e,0,0,e.drawingBufferWidth,e.drawingBufferHeight),t.realClearColor.call(e,0,0,0,1),e.clear(e.COLOR_BUFFER_BIT),t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.framebuffer),e.bindTexture(e.TEXTURE_2D,t.renderTarget),e.texImage2D(e.TEXTURE_2D,0,t.ctxAttribs.alpha?e.RGBA:e.RGB,t.bufferWidth,t.bufferHeight,0,t.ctxAttribs.alpha?e.RGBA:e.RGB,e.UNSIGNED_BYTE,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t.renderTarget,0),t.ctxAttribs.depth&&t.ctxAttribs.stencil?(e.bindRenderbuffer(e.RENDERBUFFER,t.depthStencilBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.bufferWidth,t.bufferHeight),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t.depthStencilBuffer)):t.ctxAttribs.depth?(e.bindRenderbuffer(e.RENDERBUFFER,t.depthBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,t.bufferWidth,t.bufferHeight),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t.depthBuffer)):t.ctxAttribs.stencil&&(e.bindRenderbuffer(e.RENDERBUFFER,t.stencilBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.STENCIL_INDEX8,t.bufferWidth,t.bufferHeight),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.STENCIL_ATTACHMENT,e.RENDERBUFFER,t.stencilBuffer)),!e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer incomplete!"),t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.lastBoundFramebuffer),t.scissorTest&&t.realEnable.call(e,e.SCISSOR_TEST),t.realColorMask.apply(e,t.colorMask),t.realViewport.apply(e,t.viewport),t.realClearColor.apply(e,t.clearColor)}),this.cardboardUI&&this.cardboardUI.onResize()},M.prototype.patch=function(){if(!this.isPatched){var e=this,t=this.gl.canvas,i=this.gl;A.isIOS()||(t.width=A.getScreenWidth()*this.bufferScale,t.height=A.getScreenHeight()*this.bufferScale,Object.defineProperty(t,"width",{configurable:!0,enumerable:!0,get:function(){return e.bufferWidth},set:function(t){e.bufferWidth=t,e.onResize()}}),Object.defineProperty(t,"height",{configurable:!0,enumerable:!0,get:function(){return e.bufferHeight},set:function(t){e.bufferHeight=t,e.onResize()}})),this.lastBoundFramebuffer=i.getParameter(i.FRAMEBUFFER_BINDING),null==this.lastBoundFramebuffer&&(this.lastBoundFramebuffer=this.framebuffer,this.gl.bindFramebuffer(i.FRAMEBUFFER,this.framebuffer)),this.gl.bindFramebuffer=function(t,M){e.lastBoundFramebuffer=M?M:e.framebuffer,e.realBindFramebuffer.call(i,t,e.lastBoundFramebuffer)},this.cullFace=i.getParameter(i.CULL_FACE),this.depthTest=i.getParameter(i.DEPTH_TEST),this.blend=i.getParameter(i.BLEND),this.scissorTest=i.getParameter(i.SCISSOR_TEST),this.stencilTest=i.getParameter(i.STENCIL_TEST),i.enable=function(t){switch(t){case i.CULL_FACE:e.cullFace=!0;break;case i.DEPTH_TEST:e.depthTest=!0;break;case i.BLEND:e.blend=!0;break;case i.SCISSOR_TEST:e.scissorTest=!0;break;case i.STENCIL_TEST:e.stencilTest=!0}e.realEnable.call(i,t)},i.disable=function(t){switch(t){case i.CULL_FACE:e.cullFace=!1;break;case i.DEPTH_TEST:e.depthTest=!1;break;case i.BLEND:e.blend=!1;break;case i.SCISSOR_TEST:e.scissorTest=!1;break;case i.STENCIL_TEST:e.stencilTest=!1}e.realDisable.call(i,t)},this.colorMask=i.getParameter(i.COLOR_WRITEMASK),i.colorMask=function(t,M,s,A){e.colorMask[0]=t,e.colorMask[1]=M,e.colorMask[2]=s,e.colorMask[3]=A,e.realColorMask.call(i,t,M,s,A)},this.clearColor=i.getParameter(i.COLOR_CLEAR_VALUE),i.clearColor=function(t,M,s,A){e.clearColor[0]=t,e.clearColor[1]=M,e.clearColor[2]=s,e.clearColor[3]=A,e.realClearColor.call(i,t,M,s,A)},this.viewport=i.getParameter(i.VIEWPORT),i.viewport=function(t,M,s,A){e.viewport[0]=t,e.viewport[1]=M,e.viewport[2]=s,e.viewport[3]=A,e.realViewport.call(i,t,M,s,A)},this.isPatched=!0,A.safariCssSizeWorkaround(t)}},M.prototype.unpatch=function(){if(this.isPatched){var e=this.gl,t=this.gl.canvas;A.isIOS()||(Object.defineProperty(t,"width",this.realCanvasWidth),Object.defineProperty(t,"height",this.realCanvasHeight)),t.width=this.bufferWidth,t.height=this.bufferHeight,e.bindFramebuffer=this.realBindFramebuffer,e.enable=this.realEnable,e.disable=this.realDisable,e.colorMask=this.realColorMask,e.clearColor=this.realClearColor,e.viewport=this.realViewport,this.lastBoundFramebuffer==this.framebuffer&&e.bindFramebuffer(e.FRAMEBUFFER,null),this.isPatched=!1,setTimeout(function(){A.safariCssSizeWorkaround(t)},1)}},M.prototype.setTextureBounds=function(e,t){e||(e=[0,0,.5,1]),t||(t=[.5,0,.5,1]),this.viewportOffsetScale[0]=e[0],this.viewportOffsetScale[1]=e[1],this.viewportOffsetScale[2]=e[2],this.viewportOffsetScale[3]=e[3],this.viewportOffsetScale[4]=t[0],this.viewportOffsetScale[5]=t[1],this.viewportOffsetScale[6]=t[2],this.viewportOffsetScale[7]=t[3]},M.prototype.submitFrame=function(){var e=this.gl,t=this,i=[];if(WebVRConfig.DIRTY_SUBMIT_FRAME_BINDINGS||i.push(e.CURRENT_PROGRAM,e.ARRAY_BUFFER_BINDING,e.ELEMENT_ARRAY_BUFFER_BINDING,e.TEXTURE_BINDING_2D,e.TEXTURE0),r(e,i,function(e){t.realBindFramebuffer.call(e,e.FRAMEBUFFER,null),t.cullFace&&t.realDisable.call(e,e.CULL_FACE),t.depthTest&&t.realDisable.call(e,e.DEPTH_TEST),t.blend&&t.realDisable.call(e,e.BLEND),t.scissorTest&&t.realDisable.call(e,e.SCISSOR_TEST),t.stencilTest&&t.realDisable.call(e,e.STENCIL_TEST),t.realColorMask.call(e,!0,!0,!0,!0),t.realViewport.call(e,0,0,e.drawingBufferWidth,e.drawingBufferHeight),(t.ctxAttribs.alpha||A.isIOS())&&(t.realClearColor.call(e,0,0,0,1),e.clear(e.COLOR_BUFFER_BIT)),e.useProgram(t.program),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t.indexBuffer),e.bindBuffer(e.ARRAY_BUFFER,t.vertexBuffer),e.enableVertexAttribArray(t.attribs.position),e.enableVertexAttribArray(t.attribs.texCoord),e.vertexAttribPointer(t.attribs.position,2,e.FLOAT,!1,20,0),e.vertexAttribPointer(t.attribs.texCoord,3,e.FLOAT,!1,20,8),e.activeTexture(e.TEXTURE0),e.uniform1i(t.uniforms.diffuse,0),e.bindTexture(e.TEXTURE_2D,t.renderTarget),e.uniform4fv(t.uniforms.viewportOffsetScale,t.viewportOffsetScale),e.drawElements(e.TRIANGLES,t.indexCount,e.UNSIGNED_SHORT,0),t.cardboardUI&&t.cardboardUI.renderNoState(),t.realBindFramebuffer.call(t.gl,e.FRAMEBUFFER,t.framebuffer),t.ctxAttribs.preserveDrawingBuffer||(t.realClearColor.call(e,0,0,0,0),e.clear(e.COLOR_BUFFER_BIT)),WebVRConfig.DIRTY_SUBMIT_FRAME_BINDINGS||t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.lastBoundFramebuffer),t.cullFace&&t.realEnable.call(e,e.CULL_FACE),t.depthTest&&t.realEnable.call(e,e.DEPTH_TEST),t.blend&&t.realEnable.call(e,e.BLEND),t.scissorTest&&t.realEnable.call(e,e.SCISSOR_TEST),t.stencilTest&&t.realEnable.call(e,e.STENCIL_TEST),t.realColorMask.apply(e,t.colorMask),t.realViewport.apply(e,t.viewport),!t.ctxAttribs.alpha&&t.ctxAttribs.preserveDrawingBuffer||t.realClearColor.apply(e,t.clearColor)}),A.isIOS()){var M=e.canvas;M.width==t.bufferWidth&&M.height==t.bufferHeight||(t.bufferWidth=M.width,t.bufferHeight=M.height,t.onResize())}},M.prototype.updateDeviceInfo=function(e){var t=this.gl,i=this,M=[t.ARRAY_BUFFER_BINDING,t.ELEMENT_ARRAY_BUFFER_BINDING];r(t,M,function(t){var M=i.computeMeshVertices_(i.meshWidth,i.meshHeight,e);if(t.bindBuffer(t.ARRAY_BUFFER,i.vertexBuffer),t.bufferData(t.ARRAY_BUFFER,M,t.STATIC_DRAW),!i.indexCount){var s=i.computeMeshIndices_(i.meshWidth,i.meshHeight);t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,i.indexBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,s,t.STATIC_DRAW),i.indexCount=s.length}})},M.prototype.computeMeshVertices_=function(e,t,i){for(var M=new Float32Array(2*e*t*5),s=i.getLeftEyeVisibleTanAngles(),r=i.getLeftEyeNoLensTanAngles(),N=i.getLeftEyeVisibleScreenRect(r),n=0,D=0;D<2;D++){for(var u=0;u<t;u++)for(var o=0;o<e;o++,n++){var a=o/(e-1),g=u/(t-1),j=a,I=g,L=A.lerp(s[0],s[2],a),c=A.lerp(s[3],s[1],g),T=Math.sqrt(L*L+c*c),E=i.distortion.distortInverse(T),y=L*E/T,w=c*E/T;a=(y-r[0])/(r[2]-r[0]),g=(w-r[3])/(r[1]-r[3]);i.device.widthMeters/i.device.heightMeters;a=2*(N.x+a*N.width-.5),g=2*(N.y+g*N.height-.5),M[5*n+0]=a,M[5*n+1]=g,M[5*n+2]=j,M[5*n+3]=I,M[5*n+4]=D}var l=s[2]-s[0];s[0]=-(l+s[0]),s[2]=l-s[2],l=r[2]-r[0],r[0]=-(l+r[0]),r[2]=l-r[2],N.x=1-(N.x+N.width)}return M},M.prototype.computeMeshIndices_=function(e,t){for(var i=new Uint16Array(2*(e-1)*(t-1)*6),M=e/2,s=t/2,A=0,r=0,N=0;N<2;N++)for(var n=0;n<t;n++)for(var D=0;D<e;D++,A++)0!=D&&0!=n&&(D<=M==n<=s?(i[r++]=A,i[r++]=A-e-1,i[r++]=A-e,i[r++]=A-e-1,i[r++]=A,i[r++]=A-1):(i[r++]=A-1,i[r++]=A-e,i[r++]=A,i[r++]=A-e,i[r++]=A-1,i[r++]=A-e-1));return i},M.prototype.getOwnPropertyDescriptor_=function(e,t){var i=Object.getOwnPropertyDescriptor(e,t);return void 0!==i.get&&void 0!==i.set||(i.configurable=!0,i.enumerable=!0,i.get=function(){return this.getAttribute(t)},i.set=function(e){this.setAttribute(t,e)}),i},t.exports=M},{"./cardboard-ui.js":6,"./deps/wglu-preserve-state.js":8,"./util.js":24}],6:[function(e,t,i){function M(e){this.gl=e,this.attribs={position:0},this.program=s.linkProgram(e,r,N,this.attribs),this.uniforms=s.getProgramUniforms(e,this.program),this.vertexBuffer=e.createBuffer(),this.gearOffset=0,this.gearVertexCount=0,this.arrowOffset=0,this.arrowVertexCount=0,this.projMat=new Float32Array(16),this.listener=null,this.onResize()}var s=e("./util.js"),A=e("./deps/wglu-preserve-state.js"),r=["attribute vec2 position;","uniform mat4 projectionMat;","void main() {","  gl_Position = projectionMat * vec4( position, -1.0, 1.0 );","}"].join("\n"),N=["precision mediump float;","uniform vec4 color;","void main() {","  gl_FragColor = color;","}"].join("\n"),n=Math.PI/180,D=60,u=12,o=20,a=1,g=.75,j=.3125,I=4,L=28,c=1.5;M.prototype.destroy=function(){var e=this.gl;this.listener&&e.canvas.removeEventListener("click",this.listener,!1),e.deleteProgram(this.program),e.deleteBuffer(this.vertexBuffer)},M.prototype.listen=function(e,t){var i=this.gl.canvas;this.listener=function(M){var s=i.clientWidth/2,A=L*c;M.clientX>s-A&&M.clientX<s+A&&M.clientY>i.clientHeight-A?e(M):M.clientX<A&&M.clientY<A&&t(M)},i.addEventListener("click",this.listener,!1)},M.prototype.onResize=function(){var e=this.gl,t=this,i=[e.ARRAY_BUFFER_BINDING];A(e,i,function(e){function i(e,t){var i=(90-e)*n,M=Math.cos(i),s=Math.sin(i);A.push(j*M*y+r,j*s*y+y),A.push(t*M*y+r,t*s*y+y)}function M(t,i){A.push(w+t,e.drawingBufferHeight-w-i)}var A=[],r=e.drawingBufferWidth/2,N=e.drawingBufferWidth/(screen.width*window.devicePixelRatio);s.isIOS()||(N*=window.devicePixelRatio);var T=I*N/2,E=L*c*N,y=L*N/2,w=(L*c-L)*N;A.push(r-T,E),A.push(r-T,e.drawingBufferHeight),A.push(r+T,E),A.push(r+T,e.drawingBufferHeight),t.gearOffset=A.length/2;for(var l=0;l<=6;l++){var z=l*D;i(z,a),i(z+u,a),i(z+o,g),i(z+(D-o),g),i(z+(D-u),a)}t.gearVertexCount=A.length/2-t.gearOffset,t.arrowOffset=A.length/2;var h=T/Math.sin(45*n);M(0,y),M(y,0),M(y+h,h),M(h,y+h),M(h,y-h),M(0,y),M(y,2*y),M(y+h,2*y-h),M(h,y-h),M(0,y),M(h,y-T),M(L*N,y-T),M(h,y+T),M(L*N,y+T),t.arrowVertexCount=A.length/2-t.arrowOffset,e.bindBuffer(e.ARRAY_BUFFER,t.vertexBuffer),e.bufferData(e.ARRAY_BUFFER,new Float32Array(A),e.STATIC_DRAW)})},M.prototype.render=function(){var e=this.gl,t=this,i=[e.CULL_FACE,e.DEPTH_TEST,e.BLEND,e.SCISSOR_TEST,e.STENCIL_TEST,e.COLOR_WRITEMASK,e.VIEWPORT,e.CURRENT_PROGRAM,e.ARRAY_BUFFER_BINDING];A(e,i,function(e){e.disable(e.CULL_FACE),e.disable(e.DEPTH_TEST),e.disable(e.BLEND),e.disable(e.SCISSOR_TEST),e.disable(e.STENCIL_TEST),e.colorMask(!0,!0,!0,!0),e.viewport(0,0,e.drawingBufferWidth,e.drawingBufferHeight),t.renderNoState()})},M.prototype.renderNoState=function(){var e=this.gl;e.useProgram(this.program),e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer),e.enableVertexAttribArray(this.attribs.position),e.vertexAttribPointer(this.attribs.position,2,e.FLOAT,!1,8,0),e.uniform4f(this.uniforms.color,1,1,1,1),s.orthoMatrix(this.projMat,0,e.drawingBufferWidth,0,e.drawingBufferHeight,.1,1024),e.uniformMatrix4fv(this.uniforms.projectionMat,!1,this.projMat),e.drawArrays(e.TRIANGLE_STRIP,0,4),e.drawArrays(e.TRIANGLE_STRIP,this.gearOffset,this.gearVertexCount),e.drawArrays(e.TRIANGLE_STRIP,this.arrowOffset,this.arrowVertexCount)},t.exports=M},{"./deps/wglu-preserve-state.js":8,"./util.js":24}],7:[function(e,t,i){function M(){this.displayName="Cardboard VRDisplay (webvr-polyfill)",this.capabilities.hasOrientation=!0,this.capabilities.canPresent=!0,this.bufferScale_=WebVRConfig.BUFFER_SCALE,this.poseSensor_=new n,this.distorter_=null,this.cardboardUI_=null,this.dpdb_=new N((!0),this.onDeviceParamsUpdated_.bind(this)),this.deviceInfo_=new r(this.dpdb_.getDeviceParams()),this.viewerSelector_=new u,this.viewerSelector_.on("change",this.onViewerChanged_.bind(this)),this.deviceInfo_.setViewer(this.viewerSelector_.getCurrentViewer()),WebVRConfig.ROTATE_INSTRUCTIONS_DISABLED||(this.rotateInstructions_=new D),a.isIOS()&&window.addEventListener("resize",this.onResize_.bind(this))}var s=e("./cardboard-distorter.js"),A=e("./cardboard-ui.js"),r=e("./device-info.js"),N=e("./dpdb/dpdb.js"),n=e("./sensor-fusion/fusion-pose-sensor.js"),D=e("./rotate-instructions.js"),u=e("./viewer-selector.js"),o=e("./base.js").VRDisplay,a=e("./util.js"),g={LEFT:"left",RIGHT:"right"};M.prototype=new o,M.prototype.getImmediatePose=function(){return{position:this.poseSensor_.getPosition(),orientation:this.poseSensor_.getOrientation(),linearVelocity:null,linearAcceleration:null,angularVelocity:null,angularAcceleration:null}},M.prototype.resetPose=function(){this.poseSensor_.resetPose()},M.prototype.getEyeParameters=function(e){var t,i=[.5*this.deviceInfo_.viewer.interLensDistance,0,0];if(e==g.LEFT)i[0]*=-1,t=this.deviceInfo_.getFieldOfViewLeftEye();else{if(e!=g.RIGHT)return console.error("Invalid eye provided: %s",e),null;t=this.deviceInfo_.getFieldOfViewRightEye()}return{fieldOfView:t,offset:i,renderWidth:.5*this.deviceInfo_.device.width*this.bufferScale_,renderHeight:this.deviceInfo_.device.height*this.bufferScale_
  }},M.prototype.onDeviceParamsUpdated_=function(e){console.log("DPDB reported that device params were updated."),this.deviceInfo_.updateDeviceParams(e),this.distorter_&&this.distorter.updateDeviceInfo(this.deviceInfo_)},M.prototype.beginPresent_=function(){var e=this.layer_.source.getContext("webgl");e||(e=this.layer_.source.getContext("experimental-webgl")),e||(e=this.layer_.source.getContext("webgl2")),e&&(this.layer_.predistorted?WebVRConfig.CARDBOARD_UI_DISABLED||(e.canvas.width=a.getScreenWidth()*this.bufferScale_,e.canvas.height=a.getScreenHeight()*this.bufferScale_,this.cardboardUI_=new A(e)):(this.distorter_=new s(e),this.distorter_.updateDeviceInfo(this.deviceInfo_),this.cardboardUI_=this.distorter_.cardboardUI,(this.layer_.leftBounds||this.layer_.rightBounds)&&this.distorter_.setTextureBounds(this.layer_.leftBounds,this.layer_.rightBounds)),this.cardboardUI_&&this.cardboardUI_.listen(function(e){this.viewerSelector_.show(this.layer_.source.parentElement),e.stopPropagation(),e.preventDefault()}.bind(this),function(e){this.exitPresent(),e.stopPropagation(),e.preventDefault()}.bind(this)),this.rotateInstructions_&&(a.isLandscapeMode()&&a.isMobile()?this.rotateInstructions_.showTemporarily(3e3,this.layer_.source.parentElement):this.rotateInstructions_.update()),this.orientationHandler=this.onOrientationChange_.bind(this),window.addEventListener("orientationchange",this.orientationHandler),this.fireVRDisplayDeviceParamsChange_())},M.prototype.endPresent_=function(){this.distorter_&&(this.distorter_.destroy(),this.distorter_=null),this.cardboardUI_&&(this.cardboardUI_.destroy(),this.cardboardUI_=null),this.rotateInstructions_&&this.rotateInstructions_.hide(),this.viewerSelector_.hide(),window.removeEventListener("orientationchange",this.orientationHandler)},M.prototype.submitFrame=function(e){if(this.distorter_)this.distorter_.submitFrame();else if(this.cardboardUI_&&this.layer_){var t=this.layer_.source.getContext("webgl").canvas;t.width==this.lastWidth&&t.height==this.lastHeight||this.cardboardUI_.onResize(),this.lastWidth=t.width,this.lastHeight=t.height,this.cardboardUI_.render()}},M.prototype.onOrientationChange_=function(e){console.log("onOrientationChange_"),this.viewerSelector_.hide(),this.rotateInstructions_&&this.rotateInstructions_.update(),this.onResize_()},M.prototype.onResize_=function(e){if(this.layer_){var t=this.layer_.source.getContext("webgl"),i=["position: absolute","top: 0","left: 0","width: "+Math.max(screen.width,screen.height)+"px","height: "+Math.min(screen.height,screen.width)+"px","border: 0","margin: 0","padding: 0"];t.canvas.setAttribute("style",i.join("; ")+";"),a.safariCssSizeWorkaround(t.canvas)}},M.prototype.onViewerChanged_=function(e){this.deviceInfo_.setViewer(e),this.distorter_&&this.distorter_.updateDeviceInfo(this.deviceInfo_),this.fireVRDisplayDeviceParamsChange_()},M.prototype.fireVRDisplayDeviceParamsChange_=function(){var e=new CustomEvent("vrdisplaydeviceparamschange",{detail:{vrdisplay:this,deviceInfo:this.deviceInfo_}});window.dispatchEvent(e)},t.exports=M},{"./base.js":4,"./cardboard-distorter.js":5,"./cardboard-ui.js":6,"./device-info.js":9,"./dpdb/dpdb.js":13,"./rotate-instructions.js":18,"./sensor-fusion/fusion-pose-sensor.js":20,"./util.js":24,"./viewer-selector.js":25}],8:[function(e,t,i){function M(e,t,i){if(!t)return void i(e);for(var M=[],s=null,A=0;A<t.length;++A){var r=t[A];switch(r){case e.TEXTURE_BINDING_2D:case e.TEXTURE_BINDING_CUBE_MAP:var N=t[++A];if(N<e.TEXTURE0||N>e.TEXTURE31){console.error("TEXTURE_BINDING_2D or TEXTURE_BINDING_CUBE_MAP must be followed by a valid texture unit"),M.push(null,null);break}s||(s=e.getParameter(e.ACTIVE_TEXTURE)),e.activeTexture(N),M.push(e.getParameter(r),null);break;case e.ACTIVE_TEXTURE:s=e.getParameter(e.ACTIVE_TEXTURE),M.push(null);break;default:M.push(e.getParameter(r))}}i(e);for(var A=0;A<t.length;++A){var r=t[A],n=M[A];switch(r){case e.ACTIVE_TEXTURE:break;case e.ARRAY_BUFFER_BINDING:e.bindBuffer(e.ARRAY_BUFFER,n);break;case e.COLOR_CLEAR_VALUE:e.clearColor(n[0],n[1],n[2],n[3]);break;case e.COLOR_WRITEMASK:e.colorMask(n[0],n[1],n[2],n[3]);break;case e.CURRENT_PROGRAM:e.useProgram(n);break;case e.ELEMENT_ARRAY_BUFFER_BINDING:e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n);break;case e.FRAMEBUFFER_BINDING:e.bindFramebuffer(e.FRAMEBUFFER,n);break;case e.RENDERBUFFER_BINDING:e.bindRenderbuffer(e.RENDERBUFFER,n);break;case e.TEXTURE_BINDING_2D:var N=t[++A];if(N<e.TEXTURE0||N>e.TEXTURE31)break;e.activeTexture(N),e.bindTexture(e.TEXTURE_2D,n);break;case e.TEXTURE_BINDING_CUBE_MAP:var N=t[++A];if(N<e.TEXTURE0||N>e.TEXTURE31)break;e.activeTexture(N),e.bindTexture(e.TEXTURE_CUBE_MAP,n);break;case e.VIEWPORT:e.viewport(n[0],n[1],n[2],n[3]);break;case e.BLEND:case e.CULL_FACE:case e.DEPTH_TEST:case e.SCISSOR_TEST:case e.STENCIL_TEST:n?e.enable(r):e.disable(r);break;default:console.log("No GL restore behavior for 0x"+r.toString(16))}s&&e.activeTexture(s)}}t.exports=M},{}],9:[function(e,t,i){function M(e){this.width=e.width||n.getScreenWidth(),this.height=e.height||n.getScreenHeight(),this.widthMeters=e.widthMeters,this.heightMeters=e.heightMeters,this.bevelMeters=e.bevelMeters}function s(e){this.viewer=o.CardboardV2,this.updateDeviceParams(e),this.distortion=new r(this.viewer.distortionCoefficients)}function A(e){this.id=e.id,this.label=e.label,this.fov=e.fov,this.interLensDistance=e.interLensDistance,this.baselineLensDistance=e.baselineLensDistance,this.screenLensDistance=e.screenLensDistance,this.distortionCoefficients=e.distortionCoefficients,this.inverseCoefficients=e.inverseCoefficients}var r=e("./distortion/distortion.js"),N=e("./math-util.js"),n=e("./util.js"),D=new M({widthMeters:.11,heightMeters:.062,bevelMeters:.004}),u=new M({widthMeters:.1038,heightMeters:.0584,bevelMeters:.004}),o={CardboardV1:new A({id:"CardboardV1",label:"Cardboard I/O 2014",fov:40,interLensDistance:.06,baselineLensDistance:.035,screenLensDistance:.042,distortionCoefficients:[.441,.156],inverseCoefficients:[-.4410035,.42756155,-.4804439,.5460139,-.58821183,.5733938,-.48303202,.33299083,-.17573841,.0651772,-.01488963,.001559834]}),CardboardV2:new A({id:"CardboardV2",label:"Cardboard I/O 2015",fov:60,interLensDistance:.064,baselineLensDistance:.035,screenLensDistance:.039,distortionCoefficients:[.34,.55],inverseCoefficients:[-.33836704,-.18162185,.862655,-1.2462051,1.0560602,-.58208317,.21609078,-.05444823,.009177956,-.0009904169,6183535e-11,-16981803e-13]})};s.prototype.updateDeviceParams=function(e){this.device=this.determineDevice_(e)||this.device},s.prototype.getDevice=function(){return this.device},s.prototype.setViewer=function(e){this.viewer=e,this.distortion=new r(this.viewer.distortionCoefficients)},s.prototype.determineDevice_=function(e){if(!e)return n.isIOS()?(console.warn("Using fallback iOS device measurements."),u):(console.warn("Using fallback Android device measurements."),D);var t=.0254,i=t/e.xdpi,s=t/e.ydpi,A=n.getScreenWidth(),r=n.getScreenHeight();return new M({widthMeters:i*A,heightMeters:s*r,bevelMeters:.001*e.bevelMm})},s.prototype.getDistortedFieldOfViewLeftEye=function(){var e=this.viewer,t=this.device,i=this.distortion,M=e.screenLensDistance,s=(t.widthMeters-e.interLensDistance)/2,A=e.interLensDistance/2,r=e.baselineLensDistance-t.bevelMeters,n=t.heightMeters-r,D=N.radToDeg*Math.atan(i.distort(s/M)),u=N.radToDeg*Math.atan(i.distort(A/M)),o=N.radToDeg*Math.atan(i.distort(r/M)),a=N.radToDeg*Math.atan(i.distort(n/M));return{leftDegrees:Math.min(D,e.fov),rightDegrees:Math.min(u,e.fov),downDegrees:Math.min(o,e.fov),upDegrees:Math.min(a,e.fov)}},s.prototype.getLeftEyeVisibleTanAngles=function(){var e=this.viewer,t=this.device,i=this.distortion,M=Math.tan(-N.degToRad*e.fov),s=Math.tan(N.degToRad*e.fov),A=Math.tan(N.degToRad*e.fov),r=Math.tan(-N.degToRad*e.fov),n=t.widthMeters/4,D=t.heightMeters/2,u=e.baselineLensDistance-t.bevelMeters-D,o=e.interLensDistance/2-n,a=-u,g=e.screenLensDistance,j=i.distort((o-n)/g),I=i.distort((a+D)/g),L=i.distort((o+n)/g),c=i.distort((a-D)/g),T=new Float32Array(4);return T[0]=Math.max(M,j),T[1]=Math.min(s,I),T[2]=Math.min(A,L),T[3]=Math.max(r,c),T},s.prototype.getLeftEyeNoLensTanAngles=function(){var e=this.viewer,t=this.device,i=this.distortion,M=new Float32Array(4),s=i.distortInverse(Math.tan(-N.degToRad*e.fov)),A=i.distortInverse(Math.tan(N.degToRad*e.fov)),r=i.distortInverse(Math.tan(N.degToRad*e.fov)),n=i.distortInverse(Math.tan(-N.degToRad*e.fov)),D=t.widthMeters/4,u=t.heightMeters/2,o=e.baselineLensDistance-t.bevelMeters-u,a=e.interLensDistance/2-D,g=-o,j=e.screenLensDistance,I=(a-D)/j,L=(g+u)/j,c=(a+D)/j,T=(g-u)/j;return M[0]=Math.max(s,I),M[1]=Math.min(A,L),M[2]=Math.min(r,c),M[3]=Math.max(n,T),M},s.prototype.getLeftEyeVisibleScreenRect=function(e){var t=this.viewer,i=this.device,M=t.screenLensDistance,s=(i.widthMeters-t.interLensDistance)/2,A=t.baselineLensDistance-i.bevelMeters,r=(e[0]*M+s)/i.widthMeters,N=(e[1]*M+A)/i.heightMeters,n=(e[2]*M+s)/i.widthMeters,D=(e[3]*M+A)/i.heightMeters;return{x:r,y:D,width:n-r,height:N-D}},s.prototype.getFieldOfViewLeftEye=function(e){return e?this.getUndistortedFieldOfViewLeftEye():this.getDistortedFieldOfViewLeftEye()},s.prototype.getFieldOfViewRightEye=function(e){var t=this.getFieldOfViewLeftEye(e);return{leftDegrees:t.rightDegrees,rightDegrees:t.leftDegrees,upDegrees:t.upDegrees,downDegrees:t.downDegrees}},s.prototype.getUndistortedFieldOfViewLeftEye=function(){var e=this.getUndistortedParams_();return{leftDegrees:N.radToDeg*Math.atan(e.outerDist),rightDegrees:N.radToDeg*Math.atan(e.innerDist),downDegrees:N.radToDeg*Math.atan(e.bottomDist),upDegrees:N.radToDeg*Math.atan(e.topDist)}},s.prototype.getUndistortedViewportLeftEye=function(){var e=this.getUndistortedParams_(),t=this.viewer,i=this.device,M=t.screenLensDistance,s=i.widthMeters/M,A=i.heightMeters/M,r=i.width/s,N=i.height/A,n=Math.round((e.eyePosX-e.outerDist)*r),D=Math.round((e.eyePosY-e.bottomDist)*N);return{x:n,y:D,width:Math.round((e.eyePosX+e.innerDist)*r)-n,height:Math.round((e.eyePosY+e.topDist)*N)-D}},s.prototype.getUndistortedParams_=function(){var e=this.viewer,t=this.device,i=this.distortion,M=e.screenLensDistance,s=e.interLensDistance/2/M,A=t.widthMeters/M,r=t.heightMeters/M,n=A/2-s,D=(e.baselineLensDistance-t.bevelMeters)/M,u=e.fov,o=i.distortInverse(Math.tan(N.degToRad*u)),a=Math.min(n,o),g=Math.min(s,o),j=Math.min(D,o),I=Math.min(r-D,o);return{outerDist:a,innerDist:g,topDist:I,bottomDist:j,eyePosX:n,eyePosY:D}},s.Viewers=o,t.exports=s},{"./distortion/distortion.js":11,"./math-util.js":16,"./util.js":24}],10:[function(e,t,i){function M(e){this.display=e,this.hardwareUnitId=e.displayId,this.deviceId="webvr-polyfill:HMD:"+e.displayId,this.deviceName=e.displayName+" (HMD)"}function s(e){this.display=e,this.hardwareUnitId=e.displayId,this.deviceId="webvr-polyfill:PositionSensor: "+e.displayId,this.deviceName=e.displayName+" (PositionSensor)"}var A=(e("./base.js").VRDisplay,e("./base.js").HMDVRDevice),r=e("./base.js").PositionSensorVRDevice;M.prototype=new A,M.prototype.getEyeParameters=function(e){var t=this.display.getEyeParameters(e);return{currentFieldOfView:t.fieldOfView,maximumFieldOfView:t.fieldOfView,minimumFieldOfView:t.fieldOfView,recommendedFieldOfView:t.fieldOfView,eyeTranslation:{x:t.offset[0],y:t.offset[1],z:t.offset[2]},renderRect:{x:"right"==e?t.renderWidth:0,y:0,width:t.renderWidth,height:t.renderHeight}}},M.prototype.setFieldOfView=function(e,t,i,M){},s.prototype=new r,s.prototype.getState=function(){var e=this.display.getPose();return{position:e.position?{x:e.position[0],y:e.position[1],z:e.position[2]}:null,orientation:e.orientation?{x:e.orientation[0],y:e.orientation[1],z:e.orientation[2],w:e.orientation[3]}:null,linearVelocity:null,linearAcceleration:null,angularVelocity:null,angularAcceleration:null}},s.prototype.resetState=function(){return this.positionDevice.resetPose()},t.exports.VRDisplayHMDDevice=M,t.exports.VRDisplayPositionSensorDevice=s},{"./base.js":4}],11:[function(e,t,i){function M(e){this.coefficients=e}M.prototype.distortInverse=function(e){for(var t=0,i=1,M=e-this.distort(t);Math.abs(i-t)>1e-4;){var s=e-this.distort(i),A=i-s*((i-t)/(s-M));t=i,i=A,M=s}return i},M.prototype.distort=function(e){for(var t=e*e,i=0,M=0;M<this.coefficients.length;M++)i=t*(i+this.coefficients[M]);return(i+1)*e},M.prototype.solveLinear_=function(e,t){for(var i=e.length,M=0;M<i-1;++M)for(var s=M+1;s<i;++s){for(var A=e[M][s]/e[M][M],r=M+1;r<i;++r)e[r][s]-=A*e[r][M];t[s]-=A*t[M]}for(var N=new Array(i),M=i-1;M>=0;--M){for(var n=t[M],r=M+1;r<i;++r)n-=e[r][M]*N[r];N[M]=n/e[M][M]}return N},M.prototype.solveLeastSquares_=function(e,t){var i,M,s,A,r=e.length,N=e[0].length;if(r!=t.Length)throw new Error("Matrix / vector dimension mismatch");var n=new Array(N);for(s=0;s<N;++s)for(n[s]=new Array(N),M=0;M<N;++M){for(A=0,i=0;i<r;++i)A+=e[M][i]*e[s][i];n[s][M]=A}var D=new Array(N);for(M=0;M<N;++M){for(A=0,i=0;i<r;++i)A+=e[M][i]*t[i];D[M]=A}return this.solveLinear_(n,D)},M.prototype.approximateInverse=function(e,t){e=e||1,t=t||100;var i,s,A=6,r=new Array(A);for(s=0;s<A;++s)r[s]=new Array(t);var N=new Array(t);for(i=0;i<t;++i){var n=e*(i+1)/t,D=this.distort(n),u=D;for(s=0;s<A;++s)u*=D*D,r[s][i]=u;N[i]=n-D}var o=this.solveLeastSquares_(r,N);return new M(o)},t.exports=M},{}],12:[function(e,t,i){var M={format:1,last_updated:"2016-01-20T00:18:35Z",devices:[{type:"android",rules:[{mdmh:"asus/*/Nexus 7/*"},{ua:"Nexus 7"}],dpi:[320.8,323],bw:3,ac:500},{type:"android",rules:[{mdmh:"asus/*/ASUS_Z00AD/*"},{ua:"ASUS_Z00AD"}],dpi:[403,404.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"HTC/*/HTC6435LVW/*"},{ua:"HTC6435LVW"}],dpi:[449.7,443.3],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"HTC/*/HTC One XL/*"},{ua:"HTC One XL"}],dpi:[315.3,314.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"htc/*/Nexus 9/*"},{ua:"Nexus 9"}],dpi:289,bw:3,ac:500},{type:"android",rules:[{mdmh:"HTC/*/HTC One M9/*"},{ua:"HTC One M9"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{mdmh:"HTC/*/HTC One_M8/*"},{ua:"HTC One_M8"}],dpi:[449.7,447.4],bw:3,ac:500},{type:"android",rules:[{mdmh:"HTC/*/HTC One/*"},{ua:"HTC One"}],dpi:472.8,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Huawei/*/Nexus 6P/*"},{ua:"Nexus 6P"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/Nexus 5X/*"},{ua:"Nexus 5X"}],dpi:[422,419.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LGMS345/*"},{ua:"LGMS345"}],dpi:[221.7,219.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/LG-D800/*"},{ua:"LG-D800"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/LG-D850/*"},{ua:"LG-D850"}],dpi:[537.9,541.9],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/VS985 4G/*"},{ua:"VS985 4G"}],dpi:[537.9,535.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/Nexus 5/*"},{ua:"Nexus 5 "}],dpi:[442.4,444.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/Nexus 4/*"},{ua:"Nexus 4"}],dpi:[319.8,318.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LG-P769/*"},{ua:"LG-P769"}],dpi:[240.6,247.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LGMS323/*"},{ua:"LGMS323"}],dpi:[206.6,204.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LGLS996/*"},{ua:"LGLS996"}],dpi:[403.4,401.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Micromax/*/4560MMX/*"},{ua:"4560MMX"}],dpi:[240,219.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Micromax/*/A250/*"},{ua:"Micromax A250"}],dpi:[480,446.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Micromax/*/Micromax AQ4501/*"},{ua:"Micromax AQ4501"}],dpi:240,bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/DROID RAZR/*"},{ua:"DROID RAZR"}],dpi:[368.1,256.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT830C/*"},{ua:"XT830C"}],dpi:[254,255.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1021/*"},{ua:"XT1021"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1023/*"},{ua:"XT1023"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1028/*"},{ua:"XT1028"}],dpi:[326.6,327.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1034/*"},{ua:"XT1034"}],dpi:[326.6,328.4],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1053/*"},{ua:"XT1053"}],dpi:[315.3,316.1],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1562/*"},{ua:"XT1562"}],dpi:[403.4,402.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/Nexus 6/*"},{ua:"Nexus 6 "}],dpi:[494.3,489.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1063/*"},{ua:"XT1063"}],dpi:[295,296.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1064/*"},{ua:"XT1064"}],dpi:[295,295.6],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1092/*"},{ua:"XT1092"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1095/*"},{ua:"XT1095"}],dpi:[422,423.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/A0001/*"},{ua:"A0001"}],dpi:[403.4,401],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE E1005/*"},{ua:"ONE E1005"}],dpi:[442.4,441.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE A2005/*"},{ua:"ONE A2005"}],dpi:[391.9,405.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OPPO/*/X909/*"},{ua:"X909"}],dpi:[442.4,444.1],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9082/*"},{ua:"GT-I9082"}],dpi:[184.7,185.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G360P/*"},{ua:"SM-G360P"}],dpi:[196.7,205.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/Nexus S/*"},{ua:"Nexus S"}],dpi:[234.5,229.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9300/*"},{ua:"GT-I9300"}],dpi:[304.8,303.9],bw:5,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-T230NU/*"},{ua:"SM-T230NU"}],dpi:216,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SGH-T399/*"},{ua:"SGH-T399"}],dpi:[217.7,231.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N9005/*"},{ua:"SM-N9005"}],dpi:[386.4,387],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SAMSUNG-SM-N900A/*"},{ua:"SAMSUNG-SM-N900A"}],dpi:[386.4,387.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9500/*"},{ua:"GT-I9500"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/GT-I9505/*"},{ua:"GT-I9505"}],dpi:439.4,bw:4,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G900F/*"},{ua:"SM-G900F"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G900M/*"},{ua:"SM-G900M"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G800F/*"},{ua:"SM-G800F"}],dpi:326.8,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G906S/*"},{ua:"SM-G906S"}],dpi:[562.7,572.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9300/*"},{ua:"GT-I9300"}],dpi:[306.7,304.8],bw:5,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-T535/*"},{ua:"SM-T535"}],dpi:[142.6,136.4],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-N920C/*"},{ua:"SM-N920C"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9300I/*"},{ua:"GT-I9300I"}],dpi:[304.8,305.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9195/*"},{ua:"GT-I9195"}],dpi:[249.4,256.7],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SPH-L520/*"},{ua:"SPH-L520"}],dpi:[249.4,255.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SAMSUNG-SGH-I717/*"},{ua:"SAMSUNG-SGH-I717"}],dpi:285.8,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SPH-D710/*"},{ua:"SPH-D710"}],dpi:[217.7,204.2],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-N7100/*"},{ua:"GT-N7100"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SCH-I605/*"},{ua:"SCH-I605"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/Galaxy Nexus/*"},{ua:"Galaxy Nexus"}],dpi:[315.3,314.2],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N910H/*"},{ua:"SM-N910H"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N910C/*"},{ua:"SM-N910C"}],dpi:[515.2,520.2],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G130M/*"},{ua:"SM-G130M"}],dpi:[165.9,164.8],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G928I/*"},{ua:"SM-G928I"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G920F/*"},{ua:"SM-G920F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G920P/*"},{ua:"SM-G920P"}],dpi:[522.5,577],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G925F/*"},{ua:"SM-G925F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G925V/*"},{ua:"SM-G925V"}],dpi:[522.5,576.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/C6903/*"},{ua:"C6903"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{mdmh:"Sony/*/D6653/*"},{ua:"D6653"}],dpi:[428.6,427.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/E6653/*"},{ua:"E6653"}],dpi:[428.6,425.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/E6853/*"},{ua:"E6853"}],dpi:[403.4,401.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/SGP321/*"},{ua:"SGP321"}],dpi:[224.7,224.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"TCT/*/ALCATEL ONE TOUCH Fierce/*"},{ua:"ALCATEL ONE TOUCH Fierce"}],dpi:[240,247.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"THL/*/thl 5000/*"},{ua:"thl 5000"}],dpi:[480,443.3],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"ZTE/*/ZTE Blade L2/*"},{ua:"ZTE Blade L2"}],dpi:240,bw:3,ac:500},{type:"ios",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:"ios",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:"ios",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:"ios",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:"ios",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3}]};t.exports=M},{}],13:[function(e,t,i){function M(e,t){if(this.dpdb=A,this.recalculateDeviceParams_(),e){this.onDeviceParamsUpdated=t,console.log("Fetching DPDB...");var i=new XMLHttpRequest,M=this;i.open("GET",N,!0),i.addEventListener("load",function(){M.loading=!1,i.status>=200&&i.status<=299?(console.log("Successfully loaded online DPDB."),M.dpdb=JSON.parse(i.response),M.recalculateDeviceParams_()):console.error("Error loading online DPDB!")}),i.send()}}function s(e){this.xdpi=e.xdpi,this.ydpi=e.ydpi,this.bevelMm=e.bevelMm}var A=e("./dpdb-cache.js"),r=e("../util.js"),N="https://storage.googleapis.com/cardboard-dpdb/dpdb.json";M.prototype.getDeviceParams=function(){return this.deviceParams},M.prototype.recalculateDeviceParams_=function(){console.log("Recalculating device params.");var e=this.calcDeviceParams_();console.log("New device parameters:"),console.log(e),e?(this.deviceParams=e,this.onDeviceParamsUpdated&&this.onDeviceParamsUpdated(this.deviceParams)):console.error("Failed to recalculate device parameters.")},M.prototype.calcDeviceParams_=function(){var e=this.dpdb;if(!e)return console.error("DPDB not available."),null;if(1!=e.format)return console.error("DPDB has unexpected format version."),null;if(!e.devices||!e.devices.length)return console.error("DPDB does not have a devices section."),null;var t=navigator.userAgent||navigator.vendor||window.opera,i=r.getScreenWidth(),M=r.getScreenHeight();if(console.log("User agent: "+t),console.log("Pixel width: "+i),console.log("Pixel height: "+M),!e.devices)return console.error("DPDB has no devices section."),null;for(var A=0;A<e.devices.length;A++){var N=e.devices[A];if(N.rules)if("ios"==N.type||"android"==N.type){if(r.isIOS()==("ios"==N.type)){for(var n=!1,D=0;D<N.rules.length;D++){var u=N.rules[D];if(this.matchRule_(u,t,i,M)){console.log("Rule matched:"),console.log(u),n=!0;break}}if(n){var o=N.dpi[0]||N.dpi,a=N.dpi[1]||N.dpi;return new s({xdpi:o,ydpi:a,bevelMm:N.bw})}}}else console.warn("Device["+A+"] has invalid type.");else console.warn("Device["+A+"] has no rules section.")}return console.warn("No DPDB device match."),null},M.prototype.matchRule_=function(e,t,i,M){if(!e.ua&&!e.res)return!1;if(e.ua&&t.indexOf(e.ua)<0)return!1;if(e.res){if(!e.res[0]||!e.res[1])return!1;var s=e.res[0],A=e.res[1];if(Math.min(i,M)!=Math.min(s,A)||Math.max(i,M)!=Math.max(s,A))return!1}return!0},t.exports=M},{"../util.js":24,"./dpdb-cache.js":12}],14:[function(e,t,i){function M(){this.callbacks={}}M.prototype.emit=function(e){var t=this.callbacks[e];if(t){var i=[].slice.call(arguments);i.shift();for(var M=0;M<t.length;M++)t[M].apply(this,i)}},M.prototype.on=function(e,t){e in this.callbacks?this.callbacks[e].push(t):this.callbacks[e]=[t]},t.exports=M},{}],15:[function(e,t,i){var M=e("./util.js"),s=e("./webvr-polyfill.js");window.WebVRConfig=M.extend({FORCE_ENABLE_VR:!1,K_FILTER:.98,PREDICTION_TIME_S:.04,TOUCH_PANNER_DISABLED:!1,CARDBOARD_UI_DISABLED:!1,ROTATE_INSTRUCTIONS_DISABLED:!1,YAW_ONLY:!1,MOUSE_KEYBOARD_CONTROLS_DISABLED:!1,DEFER_INITIALIZATION:!1,ENABLE_DEPRECATED_API:!1,BUFFER_SCALE:.5,DIRTY_SUBMIT_FRAME_BINDINGS:!1},window.WebVRConfig),window.WebVRConfig.DEFER_INITIALIZATION?window.InitializeWebVRPolyfill=function(){new s}:new s},{"./util.js":24,"./webvr-polyfill.js":27}],16:[function(e,t,i){var M=window.MathUtil||{};M.degToRad=Math.PI/180,M.radToDeg=180/Math.PI,M.Vector2=function(e,t){this.x=e||0,this.y=t||0},M.Vector2.prototype={constructor:M.Vector2,set:function(e,t){return this.x=e,this.y=t,this},copy:function(e){return this.x=e.x,this.y=e.y,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}},M.Vector3=function(e,t,i){this.x=e||0,this.y=t||0,this.z=i||0},M.Vector3.prototype={constructor:M.Vector3,set:function(e,t,i){return this.x=e,this.y=t,this.z=i,this},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},normalize:function(){var e=this.length();if(0!==e){var t=1/e;this.multiplyScalar(t)}else this.x=0,this.y=0,this.z=0;return this},multiplyScalar:function(e){this.x*=e,this.y*=e,this.z*=e},applyQuaternion:function(e){var t=this.x,i=this.y,M=this.z,s=e.x,A=e.y,r=e.z,N=e.w,n=N*t+A*M-r*i,D=N*i+r*t-s*M,u=N*M+s*i-A*t,o=-s*t-A*i-r*M;return this.x=n*N+o*-s+D*-r-u*-A,this.y=D*N+o*-A+u*-s-n*-r,this.z=u*N+o*-r+n*-A-D*-s,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},crossVectors:function(e,t){var i=e.x,M=e.y,s=e.z,A=t.x,r=t.y,N=t.z;return this.x=M*N-s*r,this.y=s*A-i*N,this.z=i*r-M*A,this}},M.Quaternion=function(e,t,i,M){this.x=e||0,this.y=t||0,this.z=i||0,this.w=void 0!==M?M:1},M.Quaternion.prototype={constructor:M.Quaternion,set:function(e,t,i,M){return this.x=e,this.y=t,this.z=i,this.w=M,this},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w,this},setFromEulerXYZ:function(e,t,i){var M=Math.cos(e/2),s=Math.cos(t/2),A=Math.cos(i/2),r=Math.sin(e/2),N=Math.sin(t/2),n=Math.sin(i/2);return this.x=r*s*A+M*N*n,this.y=M*N*A-r*s*n,this.z=M*s*n+r*N*A,this.w=M*s*A-r*N*n,this},setFromEulerYXZ:function(e,t,i){var M=Math.cos(e/2),s=Math.cos(t/2),A=Math.cos(i/2),r=Math.sin(e/2),N=Math.sin(t/2),n=Math.sin(i/2);return this.x=r*s*A+M*N*n,this.y=M*N*A-r*s*n,this.z=M*s*n-r*N*A,this.w=M*s*A+r*N*n,this},setFromAxisAngle:function(e,t){var i=t/2,M=Math.sin(i);return this.x=e.x*M,this.y=e.y*M,this.z=e.z*M,this.w=Math.cos(i),this},multiply:function(e){return this.multiplyQuaternions(this,e)},multiplyQuaternions:function(e,t){var i=e.x,M=e.y,s=e.z,A=e.w,r=t.x,N=t.y,n=t.z,D=t.w;return this.x=i*D+A*r+M*n-s*N,this.y=M*D+A*N+s*r-i*n,this.z=s*D+A*n+i*N-M*r,this.w=A*D-i*r-M*N-s*n,this},inverse:function(){return this.x*=-1,this.y*=-1,this.z*=-1,this.normalize(),this},normalize:function(){var e=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);return 0===e?(this.x=0,this.y=0,this.z=0,this.w=1):(e=1/e,this.x=this.x*e,this.y=this.y*e,this.z=this.z*e,this.w=this.w*e),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var i=this.x,M=this.y,s=this.z,A=this.w,r=A*e.w+i*e.x+M*e.y+s*e.z;if(r<0?(this.w=-e.w,this.x=-e.x,this.y=-e.y,this.z=-e.z,r=-r):this.copy(e),r>=1)return this.w=A,this.x=i,this.y=M,this.z=s,this;var N=Math.acos(r),n=Math.sqrt(1-r*r);if(Math.abs(n)<.001)return this.w=.5*(A+this.w),this.x=.5*(i+this.x),this.y=.5*(M+this.y),this.z=.5*(s+this.z),this;var D=Math.sin((1-t)*N)/n,u=Math.sin(t*N)/n;return this.w=A*D+this.w*u,this.x=i*D+this.x*u,this.y=M*D+this.y*u,this.z=s*D+this.z*u,this},setFromUnitVectors:function(){var e,t,i=1e-6;return function(s,A){return void 0===e&&(e=new M.Vector3),t=s.dot(A)+1,t<i?(t=0,Math.abs(s.x)>Math.abs(s.z)?e.set(-s.y,s.x,0):e.set(0,-s.z,s.y)):e.crossVectors(s,A),this.x=e.x,this.y=e.y,this.z=e.z,this.w=t,this.normalize(),this}}()},t.exports=M},{}],17:[function(e,t,i){function M(){this.displayName="Mouse and Keyboard VRDisplay (webvr-polyfill)",this.capabilities.hasOrientation=!0,window.addEventListener("keydown",this.onKeyDown_.bind(this)),window.addEventListener("mousemove",this.onMouseMove_.bind(this)),window.addEventListener("mousedown",this.onMouseDown_.bind(this)),window.addEventListener("mouseup",this.onMouseUp_.bind(this)),this.phi_=0,this.theta_=0,this.targetAngle_=null,this.angleAnimation_=null,this.orientation_=new A.Quaternion,this.rotateStart_=new A.Vector2,this.rotateEnd_=new A.Vector2,this.rotateDelta_=new A.Vector2,this.isDragging_=!1,this.orientationOut_=new Float32Array(4)}var s=e("./base.js").VRDisplay,A=e("./math-util.js"),r=e("./util.js"),N=.15,n=80,D=.5,u=.3;M.prototype=new s,M.prototype.getImmediatePose=function(){return this.orientation_.setFromEulerYXZ(this.phi_,this.theta_,0),this.orientationOut_[0]=this.orientation_.x,this.orientationOut_[1]=this.orientation_.y,this.orientationOut_[2]=this.orientation_.z,this.orientationOut_[3]=this.orientation_.w,{position:null,orientation:this.orientationOut_,linearVelocity:null,linearAcceleration:null,angularVelocity:null,angularAcceleration:null}},M.prototype.onKeyDown_=function(e){38==e.keyCode?this.animatePhi_(this.phi_+N):39==e.keyCode?this.animateTheta_(this.theta_-N):40==e.keyCode?this.animatePhi_(this.phi_-N):37==e.keyCode&&this.animateTheta_(this.theta_+N)},M.prototype.animateTheta_=function(e){this.animateKeyTransitions_("theta_",e)},M.prototype.animatePhi_=function(e){e=r.clamp(e,-Math.PI/2,Math.PI/2),this.animateKeyTransitions_("phi_",e)},M.prototype.animateKeyTransitions_=function(e,t){this.angleAnimation_&&cancelAnimationFrame(this.angleAnimation_);var i=this[e],M=new Date;this.angleAnimation_=requestAnimationFrame(function s(){var A=new Date-M;if(A>=n)return this[e]=t,void cancelAnimationFrame(this.angleAnimation_);this.angleAnimation_=requestAnimationFrame(s.bind(this));var r=A/n;this[e]=i+(t-i)*r}.bind(this))},M.prototype.onMouseDown_=function(e){this.rotateStart_.set(e.clientX,e.clientY),this.isDragging_=!0},M.prototype.onMouseMove_=function(e){if(this.isDragging_||this.isPointerLocked_()){if(this.isPointerLocked_()){var t=e.movementX||e.mozMovementX||0,i=e.movementY||e.mozMovementY||0;this.rotateEnd_.set(this.rotateStart_.x-t,this.rotateStart_.y-i)}else this.rotateEnd_.set(e.clientX,e.clientY);this.rotateDelta_.subVectors(this.rotateEnd_,this.rotateStart_),this.rotateStart_.copy(this.rotateEnd_),this.phi_+=2*Math.PI*this.rotateDelta_.y/screen.height*u,this.theta_+=2*Math.PI*this.rotateDelta_.x/screen.width*D,this.phi_=r.clamp(this.phi_,-Math.PI/2,Math.PI/2)}},M.prototype.onMouseUp_=function(e){this.isDragging_=!1},M.prototype.isPointerLocked_=function(){var e=document.pointerLockElement||document.mozPointerLockElement||document.webkitPointerLockElement;return void 0!==e},M.prototype.resetPose=function(){this.phi_=0,this.theta_=0},t.exports=M},{"./base.js":4,"./math-util.js":16,"./util.js":24}],18:[function(e,t,i){function M(){this.loadIcon_();var e=document.createElement("div"),t=e.style;t.position="fixed",t.top=0,t.right=0,t.bottom=0,t.left=0,t.backgroundColor="gray",t.fontFamily="sans-serif",t.zIndex=1e6;var i=document.createElement("img");i.src=this.icon;var t=i.style;t.marginLeft="25%",t.marginTop="25%",t.width="50%",e.appendChild(i);var M=document.createElement("div"),t=M.style;t.textAlign="center",t.fontSize="16px",t.lineHeight="24px",t.margin="24px 25%",t.width="50%",M.innerHTML="Place your phone into your Cardboard viewer.",
  e.appendChild(M);var s=document.createElement("div"),t=s.style;t.backgroundColor="#CFD8DC",t.position="fixed",t.bottom=0,t.width="100%",t.height="48px",t.padding="14px 24px",t.boxSizing="border-box",t.color="#656A6B",e.appendChild(s);var A=document.createElement("div");A.style["float"]="left",A.innerHTML="No Cardboard viewer?";var r=document.createElement("a");r.href="https://www.google.com/get/cardboard/get-cardboard/",r.innerHTML="get one",r.target="_blank";var t=r.style;t["float"]="right",t.fontWeight=600,t.textTransform="uppercase",t.borderLeft="1px solid gray",t.paddingLeft="24px",t.textDecoration="none",t.color="#656A6B",s.appendChild(A),s.appendChild(r),this.overlay=e,this.text=M,this.hide()}var s=e("./util.js");M.prototype.show=function(e){e||this.overlay.parentElement?e&&(this.overlay.parentElement&&this.overlay.parentElement!=e&&this.overlay.parentElement.removeChild(this.overlay),e.appendChild(this.overlay)):document.body.appendChild(this.overlay),this.overlay.style.display="block";var t=this.overlay.querySelector("img"),i=t.style;s.isLandscapeMode()?(i.width="20%",i.marginLeft="40%",i.marginTop="3%"):(i.width="50%",i.marginLeft="25%",i.marginTop="25%")},M.prototype.hide=function(){this.overlay.style.display="none"},M.prototype.showTemporarily=function(e,t){this.show(t),this.timer=setTimeout(this.hide.bind(this),e)},M.prototype.disableShowTemporarily=function(){clearTimeout(this.timer)},M.prototype.update=function(){this.disableShowTemporarily(),!s.isLandscapeMode()&&s.isMobile()?this.show():this.hide()},M.prototype.loadIcon_=function(){this.icon=s.base64("image/svg+xml","PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjE5OHB4IiBoZWlnaHQ9IjI0MHB4IiB2aWV3Qm94PSIwIDAgMTk4IDI0MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWxuczpza2V0Y2g9Imh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaC9ucyI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDMuMy4zICgxMjA4MSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+dHJhbnNpdGlvbjwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHNrZXRjaDp0eXBlPSJNU1B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NTQsNTEuMzY1IEw3Ny4xNTQsNy45ODUgTDEwLjMzMyw0Ni41NjQgTDEwLjMzMyw0Ni41NjQgWiIgaWQ9IkZpbGwtMjAiIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMjUuNzM3LDg4LjY0NyBMMTE4LjA5OCw5MS45ODEgTDExOC4wOTgsODQgTDEwNi42MzksODguNzEzIEwxMDYuNjM5LDk2Ljk4MiBMOTksMTAwLjMxNSBMMTEyLjM2OSwxMDMuOTYxIEwxMjUuNzM3LDg4LjY0NyIgaWQ9IkltcG9ydGVkLUxheWVycy1Db3B5LTIiIGZpbGw9IiM0NTVBNjQiIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+");
  },t.exports=M},{"./util.js":24}],19:[function(e,t,i){function M(e){this.kFilter=e,this.currentAccelMeasurement=new s,this.currentGyroMeasurement=new s,this.previousGyroMeasurement=new s,this.filterQ=new A.Quaternion,this.previousFilterQ=new A.Quaternion,this.accelQ=new A.Quaternion,this.isOrientationInitialized=!1,this.estimatedGravity=new A.Vector3,this.measuredGravity=new A.Vector3,this.gyroIntegralQ=new A.Quaternion}var s=e("./sensor-sample.js"),A=e("../math-util.js"),r=e("../util.js"),N=!1;M.prototype.addAccelMeasurement=function(e,t){this.currentAccelMeasurement.set(e,t)},M.prototype.addGyroMeasurement=function(e,t){this.currentGyroMeasurement.set(e,t);var i=t-this.previousGyroMeasurement.timestampS;r.isTimestampDeltaValid(i)&&this.run_(),this.previousGyroMeasurement.copy(this.currentGyroMeasurement)},M.prototype.run_=function(){if(!this.isOrientationInitialized)return this.accelQ=this.accelToQuaternion_(this.currentAccelMeasurement.sample),this.previousFilterQ.copy(this.accelQ),void(this.isOrientationInitialized=!0);var e=this.currentGyroMeasurement.timestampS-this.previousGyroMeasurement.timestampS,t=this.gyroToQuaternionDelta_(this.currentGyroMeasurement.sample,e);this.gyroIntegralQ.multiply(t),this.filterQ.copy(this.previousFilterQ),this.filterQ.multiply(t);var i=new A.Quaternion;i.copy(this.filterQ),i.inverse(),this.estimatedGravity.set(0,0,-1),this.estimatedGravity.applyQuaternion(i),this.estimatedGravity.normalize(),this.measuredGravity.copy(this.currentAccelMeasurement.sample),this.measuredGravity.normalize();var M=new A.Quaternion;M.setFromUnitVectors(this.estimatedGravity,this.measuredGravity),M.inverse(),N&&console.log("Delta: %d deg, G_est: (%s, %s, %s), G_meas: (%s, %s, %s)",A.radToDeg*r.getQuaternionAngle(M),this.estimatedGravity.x.toFixed(1),this.estimatedGravity.y.toFixed(1),this.estimatedGravity.z.toFixed(1),this.measuredGravity.x.toFixed(1),this.measuredGravity.y.toFixed(1),this.measuredGravity.z.toFixed(1));var s=new A.Quaternion;s.copy(this.filterQ),s.multiply(M),this.filterQ.slerp(s,1-this.kFilter),this.previousFilterQ.copy(this.filterQ)},M.prototype.getOrientation=function(){return this.filterQ},M.prototype.accelToQuaternion_=function(e){var t=new A.Vector3;t.copy(e),t.normalize();var i=new A.Quaternion;return i.setFromUnitVectors(new A.Vector3(0,0,(-1)),t),i.inverse(),i},M.prototype.gyroToQuaternionDelta_=function(e,t){var i=new A.Quaternion,M=new A.Vector3;return M.copy(e),M.normalize(),i.setFromAxisAngle(M,e.length()*t),i},t.exports=M},{"../math-util.js":16,"../util.js":24,"./sensor-sample.js":22}],20:[function(e,t,i){function M(){this.deviceId="webvr-polyfill:fused",this.deviceName="VR Position Device (webvr-polyfill:fused)",this.accelerometer=new N.Vector3,this.gyroscope=new N.Vector3,window.addEventListener("devicemotion",this.onDeviceMotionChange_.bind(this)),window.addEventListener("orientationchange",this.onScreenOrientationChange_.bind(this)),this.filter=new s(WebVRConfig.K_FILTER),this.posePredictor=new A(WebVRConfig.PREDICTION_TIME_S),this.touchPanner=new r,this.filterToWorldQ=new N.Quaternion,n.isIOS()?this.filterToWorldQ.setFromAxisAngle(new N.Vector3(1,0,0),Math.PI/2):this.filterToWorldQ.setFromAxisAngle(new N.Vector3(1,0,0),-Math.PI/2),this.inverseWorldToScreenQ=new N.Quaternion,this.worldToScreenQ=new N.Quaternion,this.originalPoseAdjustQ=new N.Quaternion,this.originalPoseAdjustQ.setFromAxisAngle(new N.Vector3(0,0,1),-window.orientation*Math.PI/180),this.setScreenTransform_(),n.isLandscapeMode()&&this.filterToWorldQ.multiply(this.inverseWorldToScreenQ),this.resetQ=new N.Quaternion,this.isFirefoxAndroid=n.isFirefoxAndroid(),this.isIOS=n.isIOS(),this.orientationOut_=new Float32Array(4)}var s=e("./complementary-filter.js"),A=e("./pose-predictor.js"),r=e("../touch-panner.js"),N=e("../math-util.js"),n=e("../util.js");M.prototype.getPosition=function(){return null},M.prototype.getOrientation=function(){var e=this.filter.getOrientation();this.predictedQ=this.posePredictor.getPrediction(e,this.gyroscope,this.previousTimestampS);var t=new N.Quaternion;return t.copy(this.filterToWorldQ),t.multiply(this.resetQ),WebVRConfig.TOUCH_PANNER_DISABLED||t.multiply(this.touchPanner.getOrientation()),t.multiply(this.predictedQ),t.multiply(this.worldToScreenQ),WebVRConfig.YAW_ONLY&&(t.x=0,t.z=0,t.normalize()),this.orientationOut_[0]=t.x,this.orientationOut_[1]=t.y,this.orientationOut_[2]=t.z,this.orientationOut_[3]=t.w,this.orientationOut_},M.prototype.resetPose=function(){this.resetQ.copy(this.filter.getOrientation()),this.resetQ.x=0,this.resetQ.y=0,this.resetQ.z*=-1,this.resetQ.normalize(),n.isLandscapeMode()&&this.resetQ.multiply(this.inverseWorldToScreenQ),this.resetQ.multiply(this.originalPoseAdjustQ),WebVRConfig.TOUCH_PANNER_DISABLED||this.touchPanner.resetSensor()},M.prototype.onDeviceMotionChange_=function(e){var t=e.accelerationIncludingGravity,i=e.rotationRate,M=e.timeStamp/1e3;this.isFirefoxAndroid&&(M/=1e3);var s=M-this.previousTimestampS;return s<=n.MIN_TIMESTEP||s>n.MAX_TIMESTEP?(console.warn("Invalid timestamps detected. Time step between successive gyroscope sensor samples is very small or not monotonic"),void(this.previousTimestampS=M)):(this.accelerometer.set(-t.x,-t.y,-t.z),this.gyroscope.set(i.alpha,i.beta,i.gamma),(this.isIOS||this.isFirefoxAndroid)&&this.gyroscope.multiplyScalar(Math.PI/180),this.filter.addAccelMeasurement(this.accelerometer,M),this.filter.addGyroMeasurement(this.gyroscope,M),void(this.previousTimestampS=M))},M.prototype.onScreenOrientationChange_=function(e){this.setScreenTransform_()},M.prototype.setScreenTransform_=function(){switch(this.worldToScreenQ.set(0,0,0,1),window.orientation){case 0:break;case 90:this.worldToScreenQ.setFromAxisAngle(new N.Vector3(0,0,1),-Math.PI/2);break;case-90:this.worldToScreenQ.setFromAxisAngle(new N.Vector3(0,0,1),Math.PI/2);break;case 180:}this.inverseWorldToScreenQ.copy(this.worldToScreenQ),this.inverseWorldToScreenQ.inverse()},t.exports=M},{"../math-util.js":16,"../touch-panner.js":23,"../util.js":24,"./complementary-filter.js":19,"./pose-predictor.js":21}],21:[function(e,t,i){function M(e){this.predictionTimeS=e,this.previousQ=new s.Quaternion,this.previousTimestampS=null,this.deltaQ=new s.Quaternion,this.outQ=new s.Quaternion}var s=e("../math-util.js"),A=!1;M.prototype.getPrediction=function(e,t,i){if(!this.previousTimestampS)return this.previousQ.copy(e),this.previousTimestampS=i,e;var M=new s.Vector3;M.copy(t),M.normalize();var r=t.length();if(r<20*s.degToRad)return A&&console.log("Moving slowly, at %s deg/s: no prediction",(s.radToDeg*r).toFixed(1)),this.outQ.copy(e),this.previousQ.copy(e),this.outQ;var N=(i-this.previousTimestampS,r*this.predictionTimeS);return this.deltaQ.setFromAxisAngle(M,N),this.outQ.copy(this.previousQ),this.outQ.multiply(this.deltaQ),this.previousQ.copy(e),this.outQ},t.exports=M},{"../math-util.js":16}],22:[function(e,t,i){function M(e,t){this.set(e,t)}M.prototype.set=function(e,t){this.sample=e,this.timestampS=t},M.prototype.copy=function(e){this.set(e.sample,e.timestampS)},t.exports=M},{}],23:[function(e,t,i){function M(){window.addEventListener("touchstart",this.onTouchStart_.bind(this)),window.addEventListener("touchmove",this.onTouchMove_.bind(this)),window.addEventListener("touchend",this.onTouchEnd_.bind(this)),this.isTouching=!1,this.rotateStart=new s.Vector2,this.rotateEnd=new s.Vector2,this.rotateDelta=new s.Vector2,this.theta=0,this.orientation=new s.Quaternion}var s=e("./math-util.js"),A=e("./util.js"),r=.5;M.prototype.getOrientation=function(){return this.orientation.setFromEulerXYZ(0,0,this.theta),this.orientation},M.prototype.resetSensor=function(){this.theta=0},M.prototype.onTouchStart_=function(e){1==e.touches.length&&(this.rotateStart.set(e.touches[0].pageX,e.touches[0].pageY),this.isTouching=!0)},M.prototype.onTouchMove_=function(e){if(this.isTouching){this.rotateEnd.set(e.touches[0].pageX,e.touches[0].pageY),this.rotateDelta.subVectors(this.rotateEnd,this.rotateStart),this.rotateStart.copy(this.rotateEnd),A.isIOS()&&(this.rotateDelta.x*=-1);var t=document.body;this.theta+=2*Math.PI*this.rotateDelta.x/t.clientWidth*r}},M.prototype.onTouchEnd_=function(e){this.isTouching=!1},t.exports=M},{"./math-util.js":16,"./util.js":24}],24:[function(e,t,i){var M=e("object-assign"),s=window.Util||{};s.MIN_TIMESTEP=.001,s.MAX_TIMESTEP=1,s.base64=function(e,t){return"data:"+e+";base64,"+t},s.clamp=function(e,t,i){return Math.min(Math.max(t,e),i)},s.lerp=function(e,t,i){return e+(t-e)*i},s.isIOS=function(){var e=/iPad|iPhone|iPod/.test(navigator.platform);return function(){return e}}(),s.isSafari=function(){var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);return function(){return e}}(),s.isFirefoxAndroid=function(){var e=navigator.userAgent.indexOf("Firefox")!==-1&&navigator.userAgent.indexOf("Android")!==-1;return function(){return e}}(),s.isLandscapeMode=function(){return 90==window.orientation||window.orientation==-90},s.isTimestampDeltaValid=function(e){return!isNaN(e)&&(!(e<=s.MIN_TIMESTEP)&&!(e>s.MAX_TIMESTEP))},s.getScreenWidth=function(){return Math.max(window.screen.width,window.screen.height)*window.devicePixelRatio},s.getScreenHeight=function(){return Math.min(window.screen.width,window.screen.height)*window.devicePixelRatio},s.requestFullscreen=function(e){if(e.requestFullscreen)e.requestFullscreen();else if(e.webkitRequestFullscreen)e.webkitRequestFullscreen();else if(e.mozRequestFullScreen)e.mozRequestFullScreen();else{if(!e.msRequestFullscreen)return!1;e.msRequestFullscreen()}return!0},s.exitFullscreen=function(){if(document.exitFullscreen)document.exitFullscreen();else if(document.webkitExitFullscreen)document.webkitExitFullscreen();else if(document.mozCancelFullScreen)document.mozCancelFullScreen();else{if(!document.msExitFullscreen)return!1;document.msExitFullscreen()}return!0},s.getFullscreenElement=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},s.linkProgram=function(e,t,i,M){var s=e.createShader(e.VERTEX_SHADER);e.shaderSource(s,t),e.compileShader(s);var A=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(A,i),e.compileShader(A);var r=e.createProgram();e.attachShader(r,s),e.attachShader(r,A);for(var N in M)e.bindAttribLocation(r,M[N],N);return e.linkProgram(r),e.deleteShader(s),e.deleteShader(A),r},s.getProgramUniforms=function(e,t){for(var i={},M=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),s="",A=0;A<M;A++){var r=e.getActiveUniform(t,A);s=r.name.replace("[0]",""),i[s]=e.getUniformLocation(t,s)}return i},s.orthoMatrix=function(e,t,i,M,s,A,r){var N=1/(t-i),n=1/(M-s),D=1/(A-r);return e[0]=-2*N,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*D,e[11]=0,e[12]=(t+i)*N,e[13]=(s+M)*n,e[14]=(r+A)*D,e[15]=1,e},s.isMobile=function(){var e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e},s.extend=M,s.safariCssSizeWorkaround=function(e){if(s.isIOS()){var t=e.style.width,i=e.style.height;e.style.width=parseInt(t)+1+"px",e.style.height=parseInt(i)+"px",console.log("Resetting width to...",t),setTimeout(function(){console.log("Done. Width is now",t),e.style.width=t,e.style.height=i},100)}window.Util=s,window.canvas=e},t.exports=s},{"object-assign":2}],25:[function(e,t,i){function M(){try{this.selectedKey=localStorage.getItem(N)||r}catch(e){console.error("Failed to load viewer profile: %s",e)}this.dialog=this.createDialog_(A.Viewers),this.root=null}var s=e("./emitter.js"),A=(e("./util.js"),e("./device-info.js")),r="CardboardV1",N="WEBVR_CARDBOARD_VIEWER",n="webvr-polyfill-viewer-selector";M.prototype=new s,M.prototype.show=function(e){this.root=e,e.appendChild(this.dialog);var t=this.dialog.querySelector("#"+this.selectedKey);t.checked=!0,this.dialog.style.display="block"},M.prototype.hide=function(){this.root&&this.root.contains(this.dialog)&&this.root.removeChild(this.dialog),this.dialog.style.display="none"},M.prototype.getCurrentViewer=function(){return A.Viewers[this.selectedKey]},M.prototype.getSelectedKey_=function(){var e=this.dialog.querySelector("input[name=field]:checked");return e?e.id:null},M.prototype.onSave_=function(){if(this.selectedKey=this.getSelectedKey_(),!this.selectedKey||!A.Viewers[this.selectedKey])return void console.error("ViewerSelector.onSave_: this should never happen!");this.emit("change",A.Viewers[this.selectedKey]);try{localStorage.setItem(N,this.selectedKey)}catch(e){console.error("Failed to save viewer profile: %s",e)}this.hide()},M.prototype.createDialog_=function(e){var t=document.createElement("div");t.classList.add(n),t.style.display="none";var i=document.createElement("div"),M=i.style;M.position="fixed",M.left=0,M.top=0,M.width="100%",M.height="100%",M.background="rgba(0, 0, 0, 0.3)",i.addEventListener("click",this.hide.bind(this));var s=280,A=document.createElement("div"),M=A.style;M.boxSizing="border-box",M.position="fixed",M.top="24px",M.left="50%",M.marginLeft=-s/2+"px",M.width=s+"px",M.padding="24px",M.overflow="hidden",M.background="#fafafa",M.fontFamily="'Roboto', sans-serif",M.boxShadow="0px 5px 20px #666",A.appendChild(this.createH1_("Select your viewer"));for(var r in e)A.appendChild(this.createChoice_(r,e[r].label));return A.appendChild(this.createButton_("Save",this.onSave_.bind(this))),t.appendChild(i),t.appendChild(A),t},M.prototype.createH1_=function(e){var t=document.createElement("h1"),i=t.style;return i.color="black",i.fontSize="20px",i.fontWeight="bold",i.marginTop=0,i.marginBottom="24px",t.innerHTML=e,t},M.prototype.createChoice_=function(e,t){var i=document.createElement("div");i.style.marginTop="8px",i.style.color="black";var M=document.createElement("input");M.style.fontSize="30px",M.setAttribute("id",e),M.setAttribute("type","radio"),M.setAttribute("value",e),M.setAttribute("name","field");var s=document.createElement("label");return s.style.marginLeft="4px",s.setAttribute("for",e),s.innerHTML=t,i.appendChild(M),i.appendChild(s),i},M.prototype.createButton_=function(e,t){var i=document.createElement("button");i.innerHTML=e;var M=i.style;return M["float"]="right",M.textTransform="uppercase",M.color="#1094f7",M.fontSize="14px",M.letterSpacing=0,M.border=0,M.background="none",M.marginTop="16px",i.addEventListener("click",t),i},t.exports=M},{"./device-info.js":9,"./emitter.js":14,"./util.js":24}],26:[function(e,t,i){function M(){var e=document.createElement("video");e.addEventListener("ended",function(){e.play()}),this.request=function(){e.paused&&(e.src=r.base64("video/mp4","AAAAGGZ0eXBpc29tAAAAAG1wNDFhdmMxAAAIA21vb3YAAABsbXZoZAAAAADSa9v60mvb+gABX5AAlw/gAAEAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAdkdHJhawAAAFx0a2hkAAAAAdJr2/rSa9v6AAAAAQAAAAAAlw/gAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAQAAAAHAAAAAAAJGVkdHMAAAAcZWxzdAAAAAAAAAABAJcP4AAAAAAAAQAAAAAG3G1kaWEAAAAgbWRoZAAAAADSa9v60mvb+gAPQkAGjneAFccAAAAAAC1oZGxyAAAAAAAAAAB2aWRlAAAAAAAAAAAAAAAAVmlkZW9IYW5kbGVyAAAABodtaW5mAAAAFHZtaGQAAAABAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAAZHc3RibAAAAJdzdHNkAAAAAAAAAAEAAACHYXZjMQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAMABwASAAAAEgAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABj//wAAADFhdmNDAWQAC//hABlnZAALrNlfllw4QAAAAwBAAAADAKPFCmWAAQAFaOvssiwAAAAYc3R0cwAAAAAAAAABAAAAbgAPQkAAAAAUc3RzcwAAAAAAAAABAAAAAQAAA4BjdHRzAAAAAAAAAG4AAAABAD0JAAAAAAEAehIAAAAAAQA9C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MCCH//uAAAAAKQZ7KRRUsP/++gQAAAAgBnul0Q3/EgAAAAAgBnutqQ3/EgAAAAA5BmvBJqEFsmUwIIf/+4QAAAApBnw5FFSw//76BAAAACAGfLXRDf8SBAAAACAGfL2pDf8SAAAAADkGbNEmoQWyZTAgh//7gAAAACkGfUkUVLD//voEAAAAIAZ9xdEN/xIAAAAAIAZ9zakN/xIAAAAAOQZt4SahBbJlMCCH//uEAAAAKQZ+WRRUsP/++gAAAAAgBn7V0Q3/EgQAAAAgBn7dqQ3/EgQAAAA5Bm7xJqEFsmUwIIf/+4AAAAApBn9pFFSw//76BAAAACAGf+XRDf8SAAAAACAGf+2pDf8SBAAAADkGb4EmoQWyZTAgh//7hAAAACkGeHkUVLD//voAAAAAIAZ49dEN/xIAAAAAIAZ4/akN/xIEAAAAOQZokSahBbJlMCCH//uAAAAAKQZ5CRRUsP/++gQAAAAgBnmF0Q3/EgAAAAAgBnmNqQ3/EgQAAAA5BmmhJqEFsmUwIIf/+4QAAAApBnoZFFSw//76BAAAACAGepXRDf8SBAAAACAGep2pDf8SAAAAADkGarEmoQWyZTAgh//7gAAAACkGeykUVLD//voEAAAAIAZ7pdEN/xIAAAAAIAZ7rakN/xIAAAAAPQZruSahBbJlMFEw3//7B"),e.play())},this.release=function(){e.pause(),e.src=""}}function s(){var e=null;this.request=function(){e||(e=setInterval(function(){window.location=window.location,setTimeout(window.stop,0)},3e4))},this.release=function(){e&&(clearInterval(e),e=null)}}function A(){var e=navigator.userAgent||navigator.vendor||window.opera;return e.match(/iPhone/i)||e.match(/iPod/i)?s:M}var r=e("./util.js");t.exports=A()},{"./util.js":24}],27:[function(e,t,i){function M(){this.displays=[],this.devices=[],this.devicesPopulated=!1,this.nativeWebVRAvailable=this.isWebVRAvailable(),this.nativeLegacyWebVRAvailable=this.isDeprecatedWebVRAvailable(),this.nativeLegacyWebVRAvailable||(this.nativeWebVRAvailable||this.enablePolyfill(),WebVRConfig.ENABLE_DEPRECATED_API&&this.enableDeprecatedPolyfill())}e("es6-promise").polyfill();var s=e("./cardboard-vr-display.js"),A=e("./mouse-keyboard-vr-display.js"),r=e("./base.js").VRDisplay,N=e("./base.js").HMDVRDevice,n=e("./base.js").PositionSensorVRDevice,D=e("./display-wrappers.js").VRDisplayHMDDevice,u=e("./display-wrappers.js").VRDisplayPositionSensorDevice;M.prototype.isWebVRAvailable=function(){return"getVRDisplays"in navigator},M.prototype.isDeprecatedWebVRAvailable=function(){return"getVRDevices"in navigator||"mozGetVRDevices"in navigator},M.prototype.populateDevices=function(){if(!this.devicesPopulated){var e=null;this.isCardboardCompatible()&&(e=new s,this.displays.push(e),WebVRConfig.ENABLE_DEPRECATED_API&&(this.devices.push(new D(e)),this.devices.push(new u(e)))),this.isMobile()||WebVRConfig.MOUSE_KEYBOARD_CONTROLS_DISABLED||(e=new A,this.displays.push(e),WebVRConfig.ENABLE_DEPRECATED_API&&(this.devices.push(new D(e)),this.devices.push(new u(e)))),this.devicesPopulated=!0}},M.prototype.enablePolyfill=function(){navigator.getVRDisplays=this.getVRDisplays.bind(this),window.VRDisplay=r},M.prototype.enableDeprecatedPolyfill=function(){navigator.getVRDevices=this.getVRDevices.bind(this),window.HMDVRDevice=N,window.PositionSensorVRDevice=n},M.prototype.getVRDisplays=function(){this.populateDevices();var e=this.displays;return new Promise(function(t,i){try{t(e)}catch(M){i(M)}})},M.prototype.getVRDevices=function(){console.warn("getVRDevices is deprecated. Please update your code to use getVRDisplays instead.");var e=this;return new Promise(function(t,i){try{if(!e.devicesPopulated){if(e.nativeWebVRAvailable)return navigator.getVRDisplays(function(i){for(var M=0;M<i.length;++M)e.devices.push(new D(i[M])),e.devices.push(new u(i[M]));e.devicesPopulated=!0,t(e.devices)},i);if(e.nativeLegacyWebVRAvailable)return(navigator.getVRDDevices||navigator.mozGetVRDevices)(function(i){for(var M=0;M<i.length;++M)i[M]instanceof N&&e.devices.push(i[M]),i[M]instanceof n&&e.devices.push(i[M]);e.devicesPopulated=!0,t(e.devices)},i)}e.populateDevices(),t(e.devices)}catch(M){i(M)}})},M.prototype.isMobile=function(){return/Android/i.test(navigator.userAgent)||/iPhone|iPad|iPod/i.test(navigator.userAgent)},M.prototype.isCardboardCompatible=function(){return this.isMobile()||WebVRConfig.FORCE_ENABLE_VR},t.exports=M},{"./base.js":4,"./cardboard-vr-display.js":7,"./display-wrappers.js":10,"./mouse-keyboard-vr-display.js":17,"es6-promise":1}]},{},[15]);