Created
April 3, 2017 19:09
-
-
Save dkozma/9e3b1161c1c417d3c22001571848cd32 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| !function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=132)}([function(e,t,n){!function(e,n){n(t)}(0,function(e){"use strict";function t(){}function n(e,t){this.x=e||0,this.y=t||0}function r(e,t,o,a,s,u,c,l,p,h){Object.defineProperty(this,"id",{value:i()}),this.uuid=Oa.generateUUID(),this.name="",this.sourceFile="",this.image=void 0!==e?e:r.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==t?t:r.DEFAULT_MAPPING,this.wrapS=void 0!==o?o:Po,this.wrapT=void 0!==a?a:Po,this.magFilter=void 0!==s?s:jo,this.minFilter=void 0!==u?u:Do,this.anisotropy=void 0!==p?p:1,this.format=void 0!==c?c:Qo,this.type=void 0!==l?l:ko,this.offset=new n(0,0),this.repeat=new n(1,1),this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==h?h:va,this.version=0,this.onUpdate=null}function i(){return Pa++}function o(e,t,n,r){this.x=e||0,this.y=t||0,this.z=n||0,this.w=void 0!==r?r:1}function a(e,t,n){this.uuid=Oa.generateUUID(),this.width=e,this.height=t,this.scissor=new o(0,0,e,t),this.scissorTest=!1,this.viewport=new o(0,0,e,t),n=n||{},void 0===n.minFilter&&(n.minFilter=jo),this.texture=new r(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function s(e,t,n){a.call(this,e,t,n),this.activeCubeFace=0,this.activeMipMapLevel=0}function u(e,t,n,r){this._x=e||0,this._y=t||0,this._z=n||0,this._w=void 0!==r?r:1}function c(e,t,n){this.x=e||0,this.y=t||0,this.z=n||0}function l(){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 p(e,t,n,i,o,a,s,u,c,l){e=void 0!==e?e:[],t=void 0!==t?t:yo,r.call(this,e,t,n,i,o,a,s,u,c,l),this.flipY=!1}function h(){this.seq=[],this.map={}}function f(e,t,n){var r=e[0];if(r<=0||r>0)return e;var i=t*n,o=Ca[i];if(void 0===o&&(o=new Float32Array(i),Ca[i]=o),0!==t){r.toArray(o,0);for(var a=1,s=0;a!==t;++a)s+=n,e[a].toArray(o,s)}return o}function d(e,t){var n=Ra[t];void 0===n&&(n=new Int32Array(t),Ra[t]=n);for(var r=0;r!==t;++r)n[r]=e.allocTextureUnit();return n}function m(e,t){e.uniform1f(this.addr,t)}function v(e,t){e.uniform1i(this.addr,t)}function y(e,t){void 0===t.x?e.uniform2fv(this.addr,t):e.uniform2f(this.addr,t.x,t.y)}function g(e,t){void 0!==t.x?e.uniform3f(this.addr,t.x,t.y,t.z):void 0!==t.r?e.uniform3f(this.addr,t.r,t.g,t.b):e.uniform3fv(this.addr,t)}function _(e,t){void 0===t.x?e.uniform4fv(this.addr,t):e.uniform4f(this.addr,t.x,t.y,t.z,t.w)}function b(e,t){e.uniformMatrix2fv(this.addr,!1,t.elements||t)}function w(e,t){e.uniformMatrix3fv(this.addr,!1,t.elements||t)}function x(e,t){e.uniformMatrix4fv(this.addr,!1,t.elements||t)}function M(e,t,n){var r=n.allocTextureUnit();e.uniform1i(this.addr,r),n.setTexture2D(t||Ta,r)}function E(e,t,n){var r=n.allocTextureUnit();e.uniform1i(this.addr,r),n.setTextureCube(t||Sa,r)}function O(e,t){e.uniform2iv(this.addr,t)}function P(e,t){e.uniform3iv(this.addr,t)}function T(e,t){e.uniform4iv(this.addr,t)}function S(e){switch(e){case 5126:return m;case 35664:return y;case 35665:return g;case 35666:return _;case 35674:return b;case 35675:return w;case 35676:return x;case 35678:return M;case 35680:return E;case 5124:case 35670:return v;case 35667:case 35671:return O;case 35668:case 35672:return P;case 35669:case 35673:return T}}function C(e,t){e.uniform1fv(this.addr,t)}function R(e,t){e.uniform1iv(this.addr,t)}function A(e,t){e.uniform2fv(this.addr,f(t,this.size,2))}function j(e,t){e.uniform3fv(this.addr,f(t,this.size,3))}function L(e,t){e.uniform4fv(this.addr,f(t,this.size,4))}function D(e,t){e.uniformMatrix2fv(this.addr,!1,f(t,this.size,4))}function I(e,t){e.uniformMatrix3fv(this.addr,!1,f(t,this.size,9))}function k(e,t){e.uniformMatrix4fv(this.addr,!1,f(t,this.size,16))}function N(e,t,n){var r=t.length,i=d(n,r);e.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTexture2D(t[o]||Ta,i[o])}function U(e,t,n){var r=t.length,i=d(n,r);e.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTextureCube(t[o]||Sa,i[o])}function F(e){switch(e){case 5126:return C;case 35664:return A;case 35665:return j;case 35666:return L;case 35674:return D;case 35675:return I;case 35676:return k;case 35678:return N;case 35680:return U;case 5124:case 35670:return R;case 35667:case 35671:return O;case 35668:case 35672:return P;case 35669:case 35673:return T}}function B(e,t,n){this.id=e,this.addr=n,this.setValue=S(t.type)}function z(e,t,n){this.id=e,this.addr=n,this.size=t.size,this.setValue=F(t.type)}function G(e){this.id=e,h.call(this)}function H(e,t){e.seq.push(t),e.map[t.id]=t}function V(e,t,n){var r=e.name,i=r.length;for(Aa.lastIndex=0;;){var o=Aa.exec(r),a=Aa.lastIndex,s=o[1],u="]"===o[2],c=o[3];if(u&&(s|=0),void 0===c||"["===c&&a+2===i){H(n,void 0===c?new B(s,e,t):new z(s,e,t));break}var l=n.map,p=l[s];void 0===p&&(p=new G(s),H(n,p)),n=p}}function W(e,t,n){h.call(this),this.renderer=n;for(var r=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),i=0;i!==r;++i){var o=e.getActiveUniform(t,i),a=o.name;V(o,e.getUniformLocation(t,a),this)}}function X(e,t,n){return void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}function q(e,t){this.min=void 0!==e?e:new n(+(1/0),+(1/0)),this.max=void 0!==t?t:new n(-(1/0),-(1/0))}function Y(e,t){function r(){var e=new Float32Array([-1,-1,0,0,1,-1,1,0,1,1,1,1,-1,1,0,1]),t=new Uint16Array([0,1,2,0,2,3]);o=d.createBuffer(),a=d.createBuffer(),d.bindBuffer(d.ARRAY_BUFFER,o),d.bufferData(d.ARRAY_BUFFER,e,d.STATIC_DRAW),d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,a),d.bufferData(d.ELEMENT_ARRAY_BUFFER,t,d.STATIC_DRAW),h=d.createTexture(),f=d.createTexture(),m.bindTexture(d.TEXTURE_2D,h),d.texImage2D(d.TEXTURE_2D,0,d.RGB,16,16,0,d.RGB,d.UNSIGNED_BYTE,null),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.NEAREST),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.NEAREST),m.bindTexture(d.TEXTURE_2D,f),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,16,16,0,d.RGBA,d.UNSIGNED_BYTE,null),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.NEAREST),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.NEAREST),s={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")},u=i(s),l={vertex:d.getAttribLocation(u,"position"),uv:d.getAttribLocation(u,"uv")},p={renderType:d.getUniformLocation(u,"renderType"),map:d.getUniformLocation(u,"map"),occlusionMap:d.getUniformLocation(u,"occlusionMap"),opacity:d.getUniformLocation(u,"opacity"),color:d.getUniformLocation(u,"color"),scale:d.getUniformLocation(u,"scale"),rotation:d.getUniformLocation(u,"rotation"),screenPosition:d.getUniformLocation(u,"screenPosition")}}function i(t){var n=d.createProgram(),r=d.createShader(d.FRAGMENT_SHADER),i=d.createShader(d.VERTEX_SHADER),o="precision "+e.getPrecision()+" float;\n";return d.shaderSource(r,o+t.fragmentShader),d.shaderSource(i,o+t.vertexShader),d.compileShader(r),d.compileShader(i),d.attachShader(n,r),d.attachShader(n,i),d.linkProgram(n),n}var o,a,s,u,l,p,h,f,d=e.context,m=e.state;this.render=function(i,s,v){if(0!==t.length){var y=new c,g=v.w/v.z,_=.5*v.z,b=.5*v.w,w=16/v.w,x=new n(w*g,w),M=new c(1,1,0),E=new n(1,1),O=new q;O.min.set(v.x,v.y),O.max.set(v.x+(v.z-16),v.y+(v.w-16)),void 0===u&&r(),d.useProgram(u),m.initAttributes(),m.enableAttribute(l.vertex),m.enableAttribute(l.uv),m.disableUnusedAttributes(),d.uniform1i(p.occlusionMap,0),d.uniform1i(p.map,1),d.bindBuffer(d.ARRAY_BUFFER,o),d.vertexAttribPointer(l.vertex,2,d.FLOAT,!1,16,0),d.vertexAttribPointer(l.uv,2,d.FLOAT,!1,16,8),d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,a),m.disable(d.CULL_FACE),m.setDepthWrite(!1);for(var P=0,T=t.length;P<T;P++){w=16/v.w,x.set(w*g,w);var S=t[P];if(y.set(S.matrixWorld.elements[12],S.matrixWorld.elements[13],S.matrixWorld.elements[14]),y.applyMatrix4(s.matrixWorldInverse),y.applyProjection(s.projectionMatrix),M.copy(y),E.x=v.x+M.x*_+_-8,E.y=v.y+M.y*b+b-8,O.containsPoint(E)===!0){m.activeTexture(d.TEXTURE0),m.bindTexture(d.TEXTURE_2D,null),m.activeTexture(d.TEXTURE1),m.bindTexture(d.TEXTURE_2D,h),d.copyTexImage2D(d.TEXTURE_2D,0,d.RGB,E.x,E.y,16,16,0),d.uniform1i(p.renderType,0),d.uniform2f(p.scale,x.x,x.y),d.uniform3f(p.screenPosition,M.x,M.y,M.z),m.disable(d.BLEND),m.enable(d.DEPTH_TEST),d.drawElements(d.TRIANGLES,6,d.UNSIGNED_SHORT,0),m.activeTexture(d.TEXTURE0),m.bindTexture(d.TEXTURE_2D,f),d.copyTexImage2D(d.TEXTURE_2D,0,d.RGBA,E.x,E.y,16,16,0),d.uniform1i(p.renderType,1),m.disable(d.DEPTH_TEST),m.activeTexture(d.TEXTURE1),m.bindTexture(d.TEXTURE_2D,h),d.drawElements(d.TRIANGLES,6,d.UNSIGNED_SHORT,0),S.positionScreen.copy(M),S.customUpdateCallback?S.customUpdateCallback(S):S.updateLensFlares(),d.uniform1i(p.renderType,2),m.enable(d.BLEND);for(var C=0,R=S.lensFlares.length;C<R;C++){var A=S.lensFlares[C];A.opacity>.001&&A.scale>.001&&(M.x=A.x,M.y=A.y,M.z=A.z,w=A.size*A.scale/v.w,x.x=w*g,x.y=w,d.uniform3f(p.screenPosition,M.x,M.y,M.z),d.uniform2f(p.scale,x.x,x.y),d.uniform1f(p.rotation,A.rotation),d.uniform1f(p.opacity,A.opacity),d.uniform3f(p.color,A.color.r,A.color.g,A.color.b),m.setBlending(A.blending,A.blendEquation,A.blendSrc,A.blendDst),e.setTexture2D(A.texture,1),d.drawElements(d.TRIANGLES,6,d.UNSIGNED_SHORT,0))}}}m.enable(d.CULL_FACE),m.enable(d.DEPTH_TEST),m.setDepthWrite(!0),e.resetGLState()}}}function Z(e,t){function n(){var e=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),t=new Uint16Array([0,1,2,0,2,3]);a=d.createBuffer(),s=d.createBuffer(),d.bindBuffer(d.ARRAY_BUFFER,a),d.bufferData(d.ARRAY_BUFFER,e,d.STATIC_DRAW),d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,s),d.bufferData(d.ELEMENT_ARRAY_BUFFER,t,d.STATIC_DRAW),l=i(),p={position:d.getAttribLocation(l,"position"),uv:d.getAttribLocation(l,"uv")},h={uvOffset:d.getUniformLocation(l,"uvOffset"),uvScale:d.getUniformLocation(l,"uvScale"),rotation:d.getUniformLocation(l,"rotation"),scale:d.getUniformLocation(l,"scale"),color:d.getUniformLocation(l,"color"),map:d.getUniformLocation(l,"map"),opacity:d.getUniformLocation(l,"opacity"),modelViewMatrix:d.getUniformLocation(l,"modelViewMatrix"),projectionMatrix:d.getUniformLocation(l,"projectionMatrix"),fogType:d.getUniformLocation(l,"fogType"),fogDensity:d.getUniformLocation(l,"fogDensity"),fogNear:d.getUniformLocation(l,"fogNear"),fogFar:d.getUniformLocation(l,"fogFar"),fogColor:d.getUniformLocation(l,"fogColor"),alphaTest:d.getUniformLocation(l,"alphaTest")};var n=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");n.width=8,n.height=8;var o=n.getContext("2d");o.fillStyle="white",o.fillRect(0,0,8,8),f=new r(n),f.needsUpdate=!0}function i(){var t=d.createProgram(),n=d.createShader(d.VERTEX_SHADER),r=d.createShader(d.FRAGMENT_SHADER);return d.shaderSource(n,["precision "+e.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")),d.shaderSource(r,["precision "+e.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")),d.compileShader(n),d.compileShader(r),d.attachShader(t,n),d.attachShader(t,r),d.linkProgram(t),t}function o(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:t.id-e.id}var a,s,l,p,h,f,d=e.context,m=e.state,v=new c,y=new u,g=new c;this.render=function(r,i){if(0!==t.length){void 0===l&&n(),d.useProgram(l),m.initAttributes(),m.enableAttribute(p.position),m.enableAttribute(p.uv),m.disableUnusedAttributes(),m.disable(d.CULL_FACE),m.enable(d.BLEND),d.bindBuffer(d.ARRAY_BUFFER,a),d.vertexAttribPointer(p.position,2,d.FLOAT,!1,16,0),d.vertexAttribPointer(p.uv,2,d.FLOAT,!1,16,8),d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,s),d.uniformMatrix4fv(h.projectionMatrix,!1,i.projectionMatrix.elements),m.activeTexture(d.TEXTURE0),d.uniform1i(h.map,0);var u=0,c=0,_=r.fog;_?(d.uniform3f(h.fogColor,_.color.r,_.color.g,_.color.b),_&&_.isFog?(d.uniform1f(h.fogNear,_.near),d.uniform1f(h.fogFar,_.far),d.uniform1i(h.fogType,1),u=1,c=1):_&&_.isFogExp2&&(d.uniform1f(h.fogDensity,_.density),d.uniform1i(h.fogType,2),u=2,c=2)):(d.uniform1i(h.fogType,0),u=0,c=0);for(var b=0,w=t.length;b<w;b++){var x=t[b];x.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse,x.matrixWorld),x.z=-x.modelViewMatrix.elements[14]}t.sort(o);for(var M=[],b=0,w=t.length;b<w;b++){var x=t[b],E=x.material;if(E.visible!==!1){d.uniform1f(h.alphaTest,E.alphaTest),d.uniformMatrix4fv(h.modelViewMatrix,!1,x.modelViewMatrix.elements),x.matrixWorld.decompose(v,y,g),M[0]=g.x,M[1]=g.y;var O=0;r.fog&&E.fog&&(O=c),u!==O&&(d.uniform1i(h.fogType,O),u=O),null!==E.map?(d.uniform2f(h.uvOffset,E.map.offset.x,E.map.offset.y),d.uniform2f(h.uvScale,E.map.repeat.x,E.map.repeat.y)):(d.uniform2f(h.uvOffset,0,0),d.uniform2f(h.uvScale,1,1)),d.uniform1f(h.opacity,E.opacity),d.uniform3f(h.color,E.color.r,E.color.g,E.color.b),d.uniform1f(h.rotation,E.rotation),d.uniform2fv(h.scale,M),m.setBlending(E.blending,E.blendEquation,E.blendSrc,E.blendDst),m.setDepthTest(E.depthTest),m.setDepthWrite(E.depthWrite),E.map?e.setTexture2D(E.map,0):e.setTexture2D(f,0),d.drawElements(d.TRIANGLES,6,d.UNSIGNED_SHORT,0)}}m.enable(d.CULL_FACE),e.resetGLState()}}}function Q(){Object.defineProperty(this,"id",{value:J()}),this.uuid=Oa.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=ji,this.side=Mi,this.shading=Ti,this.vertexColors=Si,this.opacity=1,this.transparent=!1,this.blendSrc=qi,this.blendDst=Yi,this.blendEquation=Ui,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=ro,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,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 J(){return Na++}function K(e){Q.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!==e&&(void 0!==e.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))}function $(e){Q.call(this),this.type="MeshDepthMaterial",this.depthPacking=Ma,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(e)}function ee(e,t){this.min=void 0!==e?e:new c(+(1/0),+(1/0),+(1/0)),this.max=void 0!==t?t:new c(-(1/0),-(1/0),-(1/0))}function te(e,t){this.center=void 0!==e?e:new c,this.radius=void 0!==t?t:0}function ne(){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 re(e,t){this.normal=void 0!==e?e:new c(1,0,0),this.constant=void 0!==t?t:0}function ie(e,t,n,r,i,o){this.planes=[void 0!==e?e:new re,void 0!==t?t:new re,void 0!==n?n:new re,void 0!==r?r:new re,void 0!==i?i:new re,void 0!==o?o:new re]}function oe(e,t,r,i){function s(t,n,r,i){var o=t.geometry,a=null,s=E,u=t.customDepthMaterial;if(r&&(s=O,u=t.customDistanceMaterial),u)a=u;else{var c=!1;n.morphTargets&&(o&&o.isBufferGeometry?c=o.morphAttributes&&o.morphAttributes.position&&o.morphAttributes.position.length>0:o&&o.isGeometry&&(c=o.morphTargets&&o.morphTargets.length>0));var l=t.isSkinnedMesh&&n.skinning,p=0;c&&(p|=w),l&&(p|=x),a=s[p]}if(e.localClippingEnabled&&n.clipShadows===!0&&0!==n.clippingPlanes.length){var h=a.uuid,f=n.uuid,d=P[h];void 0===d&&(d={},P[h]=d);var m=d[f];void 0===m&&(m=a.clone(),d[f]=m),a=m}a.visible=n.visible,a.wireframe=n.wireframe;var v=n.side;return U.renderSingleSided&&v==Oi&&(v=Mi),U.renderReverseSided&&(v===Mi?v=Ei:v===Ei&&(v=Mi)),a.side=v,a.clipShadows=n.clipShadows,a.clippingPlanes=n.clippingPlanes,a.wireframeLinewidth=n.wireframeLinewidth,a.linewidth=n.linewidth,r&&void 0!==a.uniforms.lightPos&&a.uniforms.lightPos.value.copy(i),a}function u(e,t,n){if(e.visible!==!1){if(0!=(e.layers.mask&t.layers.mask)&&(e.isMesh||e.isLine||e.isPoints)&&e.castShadow&&(e.frustumCulled===!1||f.intersectsObject(e)===!0)){e.material.visible===!0&&(e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),b.push(e))}for(var r=e.children,i=0,o=r.length;i<o;i++)u(r[i],t,n)}}var p=e.context,h=e.state,f=new ie,d=new l,m=t.shadows,v=new n,y=new n(i.maxTextureSize,i.maxTextureSize),g=new c,_=new c,b=[],w=1,x=2,M=1+(w|x),E=new Array(M),O=new Array(M),P={},T=[new c(1,0,0),new c(-1,0,0),new c(0,0,1),new c(0,0,-1),new c(0,1,0),new c(0,-1,0)],S=[new c(0,1,0),new c(0,1,0),new c(0,1,0),new c(0,1,0),new c(0,0,1),new c(0,0,-1)],C=[new o,new o,new o,new o,new o,new o],R=new $;R.depthPacking=Ea,R.clipping=!0;for(var A=ka.distanceRGBA,j=ja.clone(A.uniforms),L=0;L!==M;++L){var D=0!=(L&w),I=0!=(L&x),k=R.clone();k.morphTargets=D,k.skinning=I,E[L]=k;var N=new K({defines:{USE_SHADOWMAP:""},uniforms:j,vertexShader:A.vertexShader,fragmentShader:A.fragmentShader,morphTargets:D,skinning:I,clipping:!0});O[L]=N}var U=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=wi,this.renderReverseSided=!0,this.renderSingleSided=!0,this.render=function(t,n){if(U.enabled!==!1&&(U.autoUpdate!==!1||U.needsUpdate!==!1)&&0!==m.length){h.clearColor(1,1,1,1),h.disable(p.BLEND),h.setDepthTest(!0),h.setScissorTest(!1);for(var i,o,c=0,l=m.length;c<l;c++){var w=m[c],x=w.shadow;if(void 0!==x){var M=x.camera;if(v.copy(x.mapSize),v.min(y),w&&w.isPointLight){i=6,o=!0;var E=v.x,O=v.y;C[0].set(2*E,O,E,O),C[1].set(0,O,E,O),C[2].set(3*E,O,E,O),C[3].set(E,O,E,O),C[4].set(3*E,0,E,O),C[5].set(E,0,E,O),v.x*=4,v.y*=2}else i=1,o=!1;if(null===x.map){var P={minFilter:Co,magFilter:Co,format:Qo};x.map=new a(v.x,v.y,P),M.updateProjectionMatrix()}x&&x.isSpotLightShadow&&x.update(w);var R=x.map,A=x.matrix;_.setFromMatrixPosition(w.matrixWorld),M.position.copy(_),e.setRenderTarget(R),e.clear();for(var j=0;j<i;j++){if(o){g.copy(M.position),g.add(T[j]),M.up.copy(S[j]),M.lookAt(g);var L=C[j];h.viewport(L)}else g.setFromMatrixPosition(w.target.matrixWorld),M.lookAt(g);M.updateMatrixWorld(),M.matrixWorldInverse.getInverse(M.matrixWorld),A.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),A.multiply(M.projectionMatrix),A.multiply(M.matrixWorldInverse),d.multiplyMatrices(M.projectionMatrix,M.matrixWorldInverse),f.setFromMatrix(d),b.length=0,u(t,n,M);for(var D=0,I=b.length;D<I;D++){var k=b[D],N=r.update(k),F=k.material;if(F&&F.isMultiMaterial)for(var B=N.groups,z=F.materials,G=0,H=B.length;G<H;G++){var V=B[G],W=z[V.materialIndex];if(W.visible===!0){var X=s(k,W,o,_);e.renderBufferDirect(M,null,N,X,k,V)}}else{var X=s(k,F,o,_);e.renderBufferDirect(M,null,N,X,k,null)}}}}else console.warn("THREE.WebGLShadowMap:",w,"has no shadow.")}var q=e.getClearColor(),Y=e.getClearAlpha();e.setClearColor(q,Y),U.needsUpdate=!1}}}function ae(e,t){this.origin=void 0!==e?e:new c,this.direction=void 0!==t?t:new c}function se(e,t,n,r){this._x=e||0,this._y=t||0,this._z=n||0,this._order=r||se.DefaultOrder}function ue(){this.mask=1}function ce(){function e(){i.setFromEuler(r,!1)}function t(){r.setFromQuaternion(i,void 0,!1)}Object.defineProperty(this,"id",{value:le()}),this.uuid=Oa.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=ce.DefaultUp.clone();var n=new c,r=new se,i=new u,o=new c(1,1,1);r.onChange(e),i.onChange(t),Object.defineProperties(this,{position:{enumerable:!0,value:n},rotation:{enumerable:!0,value:r},quaternion:{enumerable:!0,value:i},scale:{enumerable:!0,value:o},modelViewMatrix:{value:new l},normalMatrix:{value:new ne}}),this.matrix=new l,this.matrixWorld=new l,this.matrixAutoUpdate=ce.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new ue,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={},this.onBeforeRender=function(){},this.onAfterRender=function(){}}function le(){return Ua++}function pe(e,t){this.start=void 0!==e?e:new c,this.end=void 0!==t?t:new c}function he(e,t,n){this.a=void 0!==e?e:new c,this.b=void 0!==t?t:new c,this.c=void 0!==n?n:new c}function fe(e,t,n,r,i,o){this.a=e,this.b=t,this.c=n,this.normal=r&&r.isVector3?r:new c,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new X,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==o?o:0}function de(e){Q.call(this),this.type="MeshBasicMaterial",this.color=new X(16777215),this.map=null,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=uo,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(e)}function me(e,t,n){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.uuid=Oa.generateUUID(),this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=n===!0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function ve(e,t){return new me(new Int8Array(e),t)}function ye(e,t){return new me(new Uint8Array(e),t)}function ge(e,t){return new me(new Uint8ClampedArray(e),t)}function _e(e,t){return new me(new Int16Array(e),t)}function be(e,t){return new me(new Uint16Array(e),t)}function we(e,t){return new me(new Int32Array(e),t)}function xe(e,t){return new me(new Uint32Array(e),t)}function Me(e,t){return new me(new Float32Array(e),t)}function Ee(e,t){return new me(new Float64Array(e),t)}function Oe(e,t){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new me(e,t).setDynamic(!0)}function Pe(){Object.defineProperty(this,"id",{value:Te()}),this.uuid=Oa.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 Te(){return Fa++}function Se(){Object.defineProperty(this,"id",{value:Te()}),this.uuid=Oa.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 Ce(){Object.defineProperty(this,"id",{value:Te()}),this.uuid=Oa.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 Re(e,t){ce.call(this),this.type="Mesh",this.geometry=void 0!==e?e:new Ce,this.material=void 0!==t?t:new de({color:16777215*Math.random()}),this.drawMode=fa,this.updateMorphTargets()}function Ae(e,t,n,r,i,o){function a(e,t,n,r,i,o,a,u,l,b,w){for(var x=o/l,M=a/b,E=o/2,O=a/2,P=u/2,T=l+1,S=b+1,C=0,R=0,A=new c,j=0;j<S;j++)for(var L=j*M-O,D=0;D<T;D++){var I=D*x-E;A[e]=I*r,A[t]=L*i,A[n]=P,h[m]=A.x,h[m+1]=A.y,h[m+2]=A.z,A[e]=0,A[t]=0,A[n]=u>0?1:-1,f[m]=A.x,f[m+1]=A.y,f[m+2]=A.z,d[v]=D/l,d[v+1]=1-j/b,m+=3,v+=2,C+=1}for(j=0;j<b;j++)for(D=0;D<l;D++){var k=g+D+T*j,N=g+D+T*(j+1),U=g+(D+1)+T*(j+1),F=g+(D+1)+T*j;p[y]=k,p[y+1]=N,p[y+2]=F,p[y+3]=N,p[y+4]=U,p[y+5]=F,y+=6,R+=6}s.addGroup(_,R,w),_+=R,g+=C}Ce.call(this),this.type="BoxBufferGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};var s=this;r=Math.floor(r)||1,i=Math.floor(i)||1,o=Math.floor(o)||1;var u=function(e,t,n){var r=0;return r+=(e+1)*(t+1)*2,r+=(e+1)*(n+1)*2,r+=(n+1)*(t+1)*2}(r,i,o),l=function(e,t,n){var r=0;return r+=e*t*2,r+=e*n*2,6*(r+=n*t*2)}(r,i,o),p=new(l>65535?Uint32Array:Uint16Array)(l),h=new Float32Array(3*u),f=new Float32Array(3*u),d=new Float32Array(2*u),m=0,v=0,y=0,g=0,_=0;a("z","y","x",-1,-1,n,t,e,o,i,0),a("z","y","x",1,-1,n,t,-e,o,i,1),a("x","z","y",1,1,e,n,t,r,o,2),a("x","z","y",1,-1,e,n,-t,r,o,3),a("x","y","z",1,-1,e,t,n,r,i,4),a("x","y","z",-1,-1,e,t,-n,r,i,5),this.setIndex(new me(p,1)),this.addAttribute("position",new me(h,3)),this.addAttribute("normal",new me(f,3)),this.addAttribute("uv",new me(d,2))}function je(e,t,n,r){Ce.call(this),this.type="PlaneBufferGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r};for(var i=e/2,o=t/2,a=Math.floor(n)||1,s=Math.floor(r)||1,u=a+1,c=s+1,l=e/a,p=t/s,h=new Float32Array(u*c*3),f=new Float32Array(u*c*3),d=new Float32Array(u*c*2),m=0,v=0,y=0;y<c;y++)for(var g=y*p-o,_=0;_<u;_++){var b=_*l-i;h[m]=b,h[m+1]=-g,f[m+2]=1,d[v]=_/a,d[v+1]=1-y/s,m+=3,v+=2}m=0;for(var w=new(h.length/3>65535?Uint32Array:Uint16Array)(a*s*6),y=0;y<s;y++)for(var _=0;_<a;_++){var x=_+u*y,M=_+u*(y+1),E=_+1+u*(y+1),O=_+1+u*y;w[m]=x,w[m+1]=M,w[m+2]=O,w[m+3]=M,w[m+4]=E,w[m+5]=O,m+=6}this.setIndex(new me(w,1)),this.addAttribute("position",new me(h,3)),this.addAttribute("normal",new me(f,3)),this.addAttribute("uv",new me(d,2))}function Le(){ce.call(this),this.type="Camera",this.matrixWorldInverse=new l,this.projectionMatrix=new l}function De(e,t,n,r){Le.call(this),this.type="PerspectiveCamera",this.fov=void 0!==e?e:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==r?r:2e3,this.focus=10,this.aspect=void 0!==t?t:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Ie(e,t,n,r,i,o){Le.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=void 0!==i?i:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function ke(e,t,n){function r(e){s=e}function i(n){n.array instanceof Uint32Array&&t.get("OES_element_index_uint")?(u=e.UNSIGNED_INT,c=4):(u=e.UNSIGNED_SHORT,c=2)}function o(t,r){e.drawElements(s,r,u,t*c),n.calls++,n.vertices+=r,s===e.TRIANGLES&&(n.faces+=r/3)}function a(r,i,o){var a=t.get("ANGLE_instanced_arrays");if(null===a)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");a.drawElementsInstancedANGLE(s,o,u,i*c,r.maxInstancedCount),n.calls++,n.vertices+=o*r.maxInstancedCount,s===e.TRIANGLES&&(n.faces+=r.maxInstancedCount*o/3)}var s,u,c;return{setMode:r,setIndex:i,render:o,renderInstances:a}}function Ne(e,t,n){function r(e){a=e}function i(t,r){e.drawArrays(a,t,r),n.calls++,n.vertices+=r,a===e.TRIANGLES&&(n.faces+=r/3)}function o(r){var i=t.get("ANGLE_instanced_arrays");if(null===i)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");var o=r.attributes.position,s=0;o&&o.isInterleavedBufferAttribute?(s=o.data.count,i.drawArraysInstancedANGLE(a,0,s,r.maxInstancedCount)):(s=o.count,i.drawArraysInstancedANGLE(a,0,s,r.maxInstancedCount)),n.calls++,n.vertices+=s*r.maxInstancedCount,a===e.TRIANGLES&&(n.faces+=r.maxInstancedCount*s/3)}var a;return{setMode:r,render:i,renderInstances:o}}function Ue(){var e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];var r;switch(t.type){case"DirectionalLight":r={direction:new c,color:new X,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new n};break;case"SpotLight":r={position:new c,direction:new c,color:new X,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new n};break;case"PointLight":r={position:new c,color:new X,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new n};break;case"HemisphereLight":r={direction:new c,skyColor:new X,groundColor:new X}}return e[t.id]=r,r}}}function Fe(e){for(var t=e.split("\n"),n=0;n<t.length;n++)t[n]=n+1+": "+t[n];return t.join("\n")}function Be(e,t,n){var r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS)===!1&&console.error("THREE.WebGLShader: Shader couldn't compile."),""!==e.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",t===e.VERTEX_SHADER?"vertex":"fragment",e.getShaderInfoLog(r),Fe(n)),r}function ze(e){switch(e){case va:return["Linear","( value )"];case ya:return["sRGB","( value )"];case _a:return["RGBE","( value )"];case ba:return["RGBM","( value, 7.0 )"];case wa:return["RGBM","( value, 16.0 )"];case xa:return["RGBD","( value, 256.0 )"];case ga:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+e)}}function Ge(e,t){var n=ze(t);return"vec4 "+e+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function He(e,t){var n=ze(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function Ve(e,t){var n;switch(t){case ho:n="Linear";break;case fo:n="Reinhard";break;case mo:n="Uncharted2";break;case vo:n="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+t)}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function We(e,t,n){return e=e||{},[e.derivatives||t.envMapCubeUV||t.bumpMap||t.normalMap||t.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(e.fragDepth||t.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",e.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(e.shaderTextureLOD||t.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Ye).join("\n")}function Xe(e){var t=[];for(var n in e){var r=e[n];r!==!1&&t.push("#define "+n+" "+r)}return t.join("\n")}function qe(e,t,n){for(var r={},i=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),o=0;o<i;o++){var a=e.getActiveAttrib(t,o),s=a.name;r[s]=e.getAttribLocation(t,s)}return r}function Ye(e){return""!==e}function Ze(e,t){return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights)}function Qe(e){function t(e,t){var n=La[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return Qe(n)}return e.replace(/#include +<([\w\d.]+)>/g,t)}function Je(e){function t(e,t,n,r){for(var i="",o=parseInt(t);o<parseInt(n);o++)i+=r.replace(/\[ i \]/g,"[ "+o+" ]");return i}return e.replace(/for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,t)}function Ke(e,t,n,r){var i=e.context,o=n.extensions,a=n.defines,s=n.__webglShader.vertexShader,u=n.__webglShader.fragmentShader,c="SHADOWMAP_TYPE_BASIC";r.shadowMapType===wi?c="SHADOWMAP_TYPE_PCF":r.shadowMapType===xi&&(c="SHADOWMAP_TYPE_PCF_SOFT");var l="ENVMAP_TYPE_CUBE",p="ENVMAP_MODE_REFLECTION",h="ENVMAP_BLENDING_MULTIPLY";if(r.envMap){switch(n.envMap.mapping){case yo:case go:l="ENVMAP_TYPE_CUBE";break;case xo:case Mo:l="ENVMAP_TYPE_CUBE_UV";break;case _o:case bo:l="ENVMAP_TYPE_EQUIREC";break;case wo:l="ENVMAP_TYPE_SPHERE"}switch(n.envMap.mapping){case go:case bo:p="ENVMAP_MODE_REFRACTION"}switch(n.combine){case uo:h="ENVMAP_BLENDING_MULTIPLY";break;case co:h="ENVMAP_BLENDING_MIX";break;case lo:h="ENVMAP_BLENDING_ADD"}}var f,d,m=e.gammaFactor>0?e.gammaFactor:1,v=We(o,r,e.extensions),y=Xe(a),g=i.createProgram();n.isRawShaderMaterial?(f=[y,"\n"].filter(Ye).join("\n"),d=[v,y,"\n"].filter(Ye).join("\n")):(f=["precision "+r.precision+" float;","precision "+r.precision+" int;","#define SHADER_NAME "+n.__webglShader.name,y,r.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+m,"#define MAX_BONES "+r.maxBones,r.map?"#define USE_MAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+p:"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.displacementMap&&r.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.vertexColors?"#define USE_COLOR":"",r.flatShading?"#define FLAT_SHADED":"",r.skinning?"#define USE_SKINNING":"",r.useVertexTexture?"#define BONE_TEXTURE":"",r.morphTargets?"#define USE_MORPHTARGETS":"",r.morphNormals&&r.flatShading===!1?"#define USE_MORPHNORMALS":"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+r.numClippingPlanes,r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+c:"",r.sizeAttenuation?"#define USE_SIZEATTENUATION":"",r.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",r.logarithmicDepthBuffer&&e.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(Ye).join("\n"),d=[v,"precision "+r.precision+" float;","precision "+r.precision+" int;","#define SHADER_NAME "+n.__webglShader.name,y,r.alphaTest?"#define ALPHATEST "+r.alphaTest:"","#define GAMMA_FACTOR "+m,r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp?"#define FOG_EXP2":"",r.map?"#define USE_MAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+l:"",r.envMap?"#define "+p:"",r.envMap?"#define "+h:"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.vertexColors?"#define USE_COLOR":"",r.flatShading?"#define FLAT_SHADED":"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+r.numClippingPlanes,"#define UNION_CLIPPING_PLANES "+(r.numClippingPlanes-r.numClipIntersection),r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+c:"",r.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",r.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",r.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",r.logarithmicDepthBuffer&&e.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",r.envMap&&e.extensions.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",r.toneMapping!==po?"#define TONE_MAPPING":"",r.toneMapping!==po?La.tonemapping_pars_fragment:"",r.toneMapping!==po?Ve("toneMapping",r.toneMapping):"",r.outputEncoding||r.mapEncoding||r.envMapEncoding||r.emissiveMapEncoding?La.encodings_pars_fragment:"",r.mapEncoding?Ge("mapTexelToLinear",r.mapEncoding):"",r.envMapEncoding?Ge("envMapTexelToLinear",r.envMapEncoding):"",r.emissiveMapEncoding?Ge("emissiveMapTexelToLinear",r.emissiveMapEncoding):"",r.outputEncoding?He("linearToOutputTexel",r.outputEncoding):"",r.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(Ye).join("\n")),s=Qe(s,r),s=Ze(s,r),u=Qe(u,r),u=Ze(u,r),n.isShaderMaterial||(s=Je(s),u=Je(u));var _=f+s,b=d+u,w=Be(i,i.VERTEX_SHADER,_),x=Be(i,i.FRAGMENT_SHADER,b);i.attachShader(g,w),i.attachShader(g,x),void 0!==n.index0AttributeName?i.bindAttribLocation(g,0,n.index0AttributeName):r.morphTargets===!0&&i.bindAttribLocation(g,0,"position"),i.linkProgram(g);var M=i.getProgramInfoLog(g),E=i.getShaderInfoLog(w),O=i.getShaderInfoLog(x),P=!0,T=!0;i.getProgramParameter(g,i.LINK_STATUS)===!1?(P=!1,console.error("THREE.WebGLProgram: shader error: ",i.getError(),"gl.VALIDATE_STATUS",i.getProgramParameter(g,i.VALIDATE_STATUS),"gl.getProgramInfoLog",M,E,O)):""!==M?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",M):""!==E&&""!==O||(T=!1),T&&(this.diagnostics={runnable:P,material:n,programLog:M,vertexShader:{log:E,prefix:f},fragmentShader:{log:O,prefix:d}}),i.deleteShader(w),i.deleteShader(x);var S;this.getUniforms=function(){return void 0===S&&(S=new W(i,g,e)),S};var C;return this.getAttributes=function(){return void 0===C&&(C=qe(i,g)),C},this.destroy=function(){i.deleteProgram(g),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=Ba++,this.code=t,this.usedTimes=1,this.program=g,this.vertexShader=w,this.fragmentShader=x,this}function $e(e,t){function n(e){if(t.floatVertexTextures&&e&&e.skeleton&&e.skeleton.useVertexTexture)return 1024;var n=t.maxVertexUniforms,r=Math.floor((n-20)/4),i=r;return void 0!==e&&e&&e.isSkinnedMesh&&(i=Math.min(e.skeleton.bones.length,i))<e.skeleton.bones.length&&console.warn("WebGLRenderer: too many bones - "+e.skeleton.bones.length+", this GPU supports just "+i+" (try OpenGL instead of ANGLE)"),i}function r(e,t){var n;return e?e&&e.isTexture?n=e.encoding:e&&e.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),n=e.texture.encoding):n=va,n===va&&t&&(n=ga),n}var i=[],o={MeshDepthMaterial:"depth",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points"},a=["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","numClipIntersection","depthPacking"];this.getParameters=function(i,a,s,u,c,l){var p=o[i.type],h=n(l),f=e.getPrecision();null!==i.precision&&(f=t.getMaxPrecision(i.precision))!==i.precision&&console.warn("THREE.WebGLProgram.getParameters:",i.precision,"not supported, using",f,"instead.");var d=e.getCurrentRenderTarget();return{shaderID:p,precision:f,supportsVertexTextures:t.vertexTextures,outputEncoding:r(d?d.texture:null,e.gammaOutput),map:!!i.map,mapEncoding:r(i.map,e.gammaInput),envMap:!!i.envMap,envMapMode:i.envMap&&i.envMap.mapping,envMapEncoding:r(i.envMap,e.gammaInput),envMapCubeUV:!!i.envMap&&(i.envMap.mapping===xo||i.envMap.mapping===Mo),lightMap:!!i.lightMap,aoMap:!!i.aoMap,emissiveMap:!!i.emissiveMap,emissiveMapEncoding:r(i.emissiveMap,e.gammaInput),bumpMap:!!i.bumpMap,normalMap:!!i.normalMap,displacementMap:!!i.displacementMap,roughnessMap:!!i.roughnessMap,metalnessMap:!!i.metalnessMap,specularMap:!!i.specularMap,alphaMap:!!i.alphaMap,combine:i.combine,vertexColors:i.vertexColors,fog:!!s,useFog:i.fog,fogExp:s&&s.isFogExp2,flatShading:i.shading===Pi,sizeAttenuation:i.sizeAttenuation,logarithmicDepthBuffer:t.logarithmicDepthBuffer,skinning:i.skinning,maxBones:h,useVertexTexture:t.floatVertexTextures&&l&&l.skeleton&&l.skeleton.useVertexTexture,morphTargets:i.morphTargets,morphNormals:i.morphNormals,maxMorphTargets:e.maxMorphTargets,maxMorphNormals:e.maxMorphNormals,numDirLights:a.directional.length,numPointLights:a.point.length,numSpotLights:a.spot.length,numHemiLights:a.hemi.length,numClippingPlanes:u,numClipIntersection:c,shadowMapEnabled:e.shadowMap.enabled&&l.receiveShadow&&a.shadows.length>0,shadowMapType:e.shadowMap.type,toneMapping:e.toneMapping,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:i.premultipliedAlpha,alphaTest:i.alphaTest,doubleSided:i.side===Oi,flipSided:i.side===Ei,depthPacking:void 0!==i.depthPacking&&i.depthPacking}},this.getProgramCode=function(e,t){var n=[];if(t.shaderID?n.push(t.shaderID):(n.push(e.fragmentShader),n.push(e.vertexShader)),void 0!==e.defines)for(var r in e.defines)n.push(r),n.push(e.defines[r]);for(var i=0;i<a.length;i++)n.push(t[a[i]]);return n.join()},this.acquireProgram=function(t,n,r){for(var o,a=0,s=i.length;a<s;a++){var u=i[a];if(u.code===r){o=u,++o.usedTimes;break}}return void 0===o&&(o=new Ke(e,r,t,n),i.push(o)),o},this.releaseProgram=function(e){if(0==--e.usedTimes){var t=i.indexOf(e);i[t]=i[i.length-1],i.pop(),e.destroy()}},this.programs=i}function et(e,t,n){function r(e){var i=e.target,s=u[i.id];null!==s.index&&o(s.index),a(s.attributes),i.removeEventListener("dispose",r),delete u[i.id];var c=t.get(i);c.wireframe&&o(c.wireframe),t.delete(i);var l=t.get(s);l.wireframe&&o(l.wireframe),t.delete(s),n.memory.geometries--}function i(e){return e.isInterleavedBufferAttribute?t.get(e.data).__webglBuffer:t.get(e).__webglBuffer}function o(t){var n=i(t);void 0!==n&&(e.deleteBuffer(n),s(t))}function a(e){for(var t in e)o(e[t])}function s(e){e.isInterleavedBufferAttribute?t.delete(e.data):t.delete(e)}var u={};return{get:function(e){var t=e.geometry;if(void 0!==u[t.id])return u[t.id];t.addEventListener("dispose",r);var i;return t.isBufferGeometry?i=t:t.isGeometry&&(void 0===t._bufferGeometry&&(t._bufferGeometry=(new Ce).setFromObject(e)),i=t._bufferGeometry),u[t.id]=i,n.memory.geometries++,i}}}function tt(e,t,n){function r(t){var n=c.get(t);t.geometry.isGeometry&&n.updateFromObject(t);var r=n.index,o=n.attributes;null!==r&&i(r,e.ELEMENT_ARRAY_BUFFER);for(var a in o)i(o[a],e.ARRAY_BUFFER);var s=n.morphAttributes;for(var a in s)for(var u=s[a],l=0,p=u.length;l<p;l++)i(u[l],e.ARRAY_BUFFER);return n}function i(e,n){var r=e.isInterleavedBufferAttribute?e.data:e,i=t.get(r);void 0===i.__webglBuffer?o(i,r,n):i.version!==r.version&&a(i,r,n)}function o(t,n,r){t.__webglBuffer=e.createBuffer(),e.bindBuffer(r,t.__webglBuffer);var i=n.dynamic?e.DYNAMIC_DRAW:e.STATIC_DRAW;e.bufferData(r,n.array,i),t.version=n.version}function a(t,n,r){e.bindBuffer(r,t.__webglBuffer),n.dynamic===!1?e.bufferData(r,n.array,e.STATIC_DRAW):n.updateRange.count===-1?e.bufferSubData(r,0,n.array):0===n.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."):(e.bufferSubData(r,n.updateRange.offset*n.array.BYTES_PER_ELEMENT,n.array.subarray(n.updateRange.offset,n.updateRange.offset+n.updateRange.count)),n.updateRange.count=0),t.version=n.version}function s(e){return e.isInterleavedBufferAttribute?t.get(e.data).__webglBuffer:t.get(e).__webglBuffer}function u(n){var r=t.get(n);if(void 0!==r.wireframe)return r.wireframe;var o=[],a=n.index,s=n.attributes,u=s.position;if(null!==a)for(var c=a.array,l=0,p=c.length;l<p;l+=3){var h=c[l+0],f=c[l+1],d=c[l+2];o.push(h,f,f,d,d,h)}else for(var c=s.position.array,l=0,p=c.length/3-1;l<p;l+=3){var h=l+0,f=l+1,d=l+2;o.push(h,f,f,d,d,h)}var m=u.count>65535?Uint32Array:Uint16Array,v=new me(new m(o),1);return i(v,e.ELEMENT_ARRAY_BUFFER),r.wireframe=v,v}var c=new et(e,t,n);return{getAttributeBuffer:s,getWireframeAttribute:u,update:r}}function nt(e,t,n,r,i,o,a){function s(e,t){if(e.width>t||e.height>t){var n=t/Math.max(e.width,e.height),r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=Math.floor(e.width*n),r.height=Math.floor(e.height*n);return r.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+e.width+"x"+e.height+"). Resized to "+r.width+"x"+r.height,e),r}return e}function u(e){return Oa.isPowerOfTwo(e.width)&&Oa.isPowerOfTwo(e.height)}function c(e){if(e instanceof HTMLImageElement||e instanceof HTMLCanvasElement){var t=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");t.width=Oa.nearestPowerOfTwo(e.width),t.height=Oa.nearestPowerOfTwo(e.height);return t.getContext("2d").drawImage(e,0,0,t.width,t.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+e.width+"x"+e.height+"). Resized to "+t.width+"x"+t.height,e),t}return e}function l(e){return e.wrapS!==Po||e.wrapT!==Po||e.minFilter!==Co&&e.minFilter!==jo}function p(t){return t===Co||t===Ro||t===Ao?e.NEAREST:e.LINEAR}function h(e){var t=e.target;t.removeEventListener("dispose",h),d(t),T.textures--}function f(e){var t=e.target;t.removeEventListener("dispose",f),m(t),T.textures--}function d(t){var n=r.get(t);if(t.image&&n.__image__webglTextureCube)e.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)return;e.deleteTexture(n.__webglTexture)}r.delete(t)}function m(t){var n=r.get(t),i=r.get(t.texture);if(t){if(void 0!==i.__webglTexture&&e.deleteTexture(i.__webglTexture),t.depthTexture&&t.depthTexture.dispose(),t&&t.isWebGLRenderTargetCube)for(var o=0;o<6;o++)e.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer[o]);else e.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer);r.delete(t.texture),r.delete(t)}}function v(t,i){var o=r.get(t);if(t.version>0&&o.__version!==t.version){var a=t.image;if(void 0===a)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",t);else{if(a.complete!==!1)return void b(o,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,o.__webglTexture)}function y(t,a){var c=r.get(t);if(6===t.image.length)if(t.version>0&&c.__version!==t.version){c.__image__webglTextureCube||(t.addEventListener("dispose",h),c.__image__webglTextureCube=e.createTexture(),T.textures++),n.activeTexture(e.TEXTURE0+a),n.bindTexture(e.TEXTURE_CUBE_MAP,c.__image__webglTextureCube),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t.flipY);for(var l=t&&t.isCompressedTexture,p=t.image[0]&&t.image[0].isDataTexture,f=[],d=0;d<6;d++)f[d]=l||p?p?t.image[d].image:t.image[d]:s(t.image[d],i.maxCubemapSize);var m=f[0],v=u(m),y=o(t.format),g=o(t.type);_(e.TEXTURE_CUBE_MAP,t,v);for(var d=0;d<6;d++)if(l)for(var b,w=f[d].mipmaps,x=0,M=w.length;x<M;x++)b=w[x],t.format!==Qo&&t.format!==Zo?n.getCompressedTextureFormats().indexOf(y)>-1?n.compressedTexImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+d,x,y,b.width,b.height,0,b.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+d,x,y,b.width,b.height,0,y,g,b.data);else p?n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+d,0,y,f[d].width,f[d].height,0,y,g,f[d].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+d,0,y,y,g,f[d]);t.generateMipmaps&&v&&e.generateMipmap(e.TEXTURE_CUBE_MAP),c.__version=t.version,t.onUpdate&&t.onUpdate(t)}else n.activeTexture(e.TEXTURE0+a),n.bindTexture(e.TEXTURE_CUBE_MAP,c.__image__webglTextureCube)}function g(t,i){n.activeTexture(e.TEXTURE0+i),n.bindTexture(e.TEXTURE_CUBE_MAP,r.get(t).__webglTexture)}function _(n,a,s){var u;if(s?(e.texParameteri(n,e.TEXTURE_WRAP_S,o(a.wrapS)),e.texParameteri(n,e.TEXTURE_WRAP_T,o(a.wrapT)),e.texParameteri(n,e.TEXTURE_MAG_FILTER,o(a.magFilter)),e.texParameteri(n,e.TEXTURE_MIN_FILTER,o(a.minFilter))):(e.texParameteri(n,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(n,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),a.wrapS===Po&&a.wrapT===Po||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",a),e.texParameteri(n,e.TEXTURE_MAG_FILTER,p(a.magFilter)),e.texParameteri(n,e.TEXTURE_MIN_FILTER,p(a.minFilter)),a.minFilter!==Co&&a.minFilter!==jo&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",a)),u=t.get("EXT_texture_filter_anisotropic")){if(a.type===Go&&null===t.get("OES_texture_float_linear"))return;if(a.type===Ho&&null===t.get("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(e.texParameterf(n,u.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function b(t,r,a){void 0===t.__webglInit&&(t.__webglInit=!0,r.addEventListener("dispose",h),t.__webglTexture=e.createTexture(),T.textures++),n.activeTexture(e.TEXTURE0+a),n.bindTexture(e.TEXTURE_2D,t.__webglTexture),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,r.unpackAlignment);var p=s(r.image,i.maxTextureSize);l(r)&&u(p)===!1&&(p=c(p));var f=u(p),d=o(r.format),m=o(r.type);_(e.TEXTURE_2D,r,f);var v,y=r.mipmaps;if(r&&r.isDepthTexture){var g=e.DEPTH_COMPONENT;if(r.type===Go){if(!S)throw new Error("Float Depth Texture only supported in WebGL2.0");g=e.DEPTH_COMPONENT32F}else S&&(g=e.DEPTH_COMPONENT16);r.format===ta&&(g=e.DEPTH_STENCIL),n.texImage2D(e.TEXTURE_2D,0,g,p.width,p.height,0,d,m,null)}else if(r&&r.isDataTexture)if(y.length>0&&f){for(var b=0,w=y.length;b<w;b++)v=y[b],n.texImage2D(e.TEXTURE_2D,b,d,v.width,v.height,0,d,m,v.data);r.generateMipmaps=!1}else n.texImage2D(e.TEXTURE_2D,0,d,p.width,p.height,0,d,m,p.data);else if(r&&r.isCompressedTexture)for(var b=0,w=y.length;b<w;b++)v=y[b],r.format!==Qo&&r.format!==Zo?n.getCompressedTextureFormats().indexOf(d)>-1?n.compressedTexImage2D(e.TEXTURE_2D,b,d,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,b,d,v.width,v.height,0,d,m,v.data);else if(y.length>0&&f){for(var b=0,w=y.length;b<w;b++)v=y[b],n.texImage2D(e.TEXTURE_2D,b,d,d,m,v);r.generateMipmaps=!1}else n.texImage2D(e.TEXTURE_2D,0,d,d,m,p);r.generateMipmaps&&f&&e.generateMipmap(e.TEXTURE_2D),t.__version=r.version,r.onUpdate&&r.onUpdate(r)}function w(t,i,a,s){var u=o(i.texture.format),c=o(i.texture.type);n.texImage2D(s,0,u,i.width,i.height,0,u,c,null),e.bindFramebuffer(e.FRAMEBUFFER,t),e.framebufferTexture2D(e.FRAMEBUFFER,a,s,r.get(i.texture).__webglTexture,0),e.bindFramebuffer(e.FRAMEBUFFER,null)}function x(t,n){e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer&&!n.stencilBuffer?(e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t)):n.depthBuffer&&n.stencilBuffer?(e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t)):e.renderbufferStorage(e.RENDERBUFFER,e.RGBA4,n.width,n.height),e.bindRenderbuffer(e.RENDERBUFFER,null)}function M(t,n){if(n&&n.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported!");if(e.bindFramebuffer(e.FRAMEBUFFER,t),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),v(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===ea)e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,i,0);else{if(n.depthTexture.format!==ta)throw new Error("Unknown depthTexture format");e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,i,0)}}function E(t){var n=r.get(t),i=t&&t.isWebGLRenderTargetCube;if(t.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");M(n.__webglFramebuffer,t)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)e.bindFramebuffer(e.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=e.createRenderbuffer(),x(n.__webglDepthbuffer[o],t)}else e.bindFramebuffer(e.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=e.createRenderbuffer(),x(n.__webglDepthbuffer,t);e.bindFramebuffer(e.FRAMEBUFFER,null)}function O(t){var i=r.get(t),o=r.get(t.texture);t.addEventListener("dispose",f),o.__webglTexture=e.createTexture(),T.textures++;var a=t&&t.isWebGLRenderTargetCube,s=u(t);if(a){i.__webglFramebuffer=[];for(var c=0;c<6;c++)i.__webglFramebuffer[c]=e.createFramebuffer()}else i.__webglFramebuffer=e.createFramebuffer();if(a){n.bindTexture(e.TEXTURE_CUBE_MAP,o.__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,o.__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&&E(t)}function P(t){var i=t.texture;if(i.generateMipmaps&&u(t)&&i.minFilter!==Co&&i.minFilter!==jo){var o=t&&t.isWebGLRenderTargetCube?e.TEXTURE_CUBE_MAP:e.TEXTURE_2D,a=r.get(i).__webglTexture;n.bindTexture(o,a),e.generateMipmap(o),n.bindTexture(o,null)}}var T=a.memory,S="undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext;this.setTexture2D=v,this.setTextureCube=y,this.setTextureCubeDynamic=g,this.setupRenderTarget=O,this.updateRenderTargetMipmap=P}function rt(){var e={};return{get:function(t){var n=t.uuid,r=e[n];return void 0===r&&(r={},e[n]=r),r},delete:function(t){delete e[t.uuid]},clear:function(){e={}}}}function it(e,t,n){function r(){var t=!1,n=new o,r=null,i=new o;return{setMask:function(n){r===n||t||(e.colorMask(n,n,n,n),r=n)},setLocked:function(e){t=e},setClear:function(t,r,o,a){n.set(t,r,o,a),i.equals(n)===!1&&(e.clearColor(t,r,o,a),i.copy(n))},reset:function(){t=!1,r=null,i.set(0,0,0,1)}}}function i(){var t=!1,n=null,r=null,i=null;return{setTest:function(t){t?f(e.DEPTH_TEST):d(e.DEPTH_TEST)},setMask:function(r){n===r||t||(e.depthMask(r),n=r)},setFunc:function(t){if(r!==t){if(t)switch(t){case eo:e.depthFunc(e.NEVER);break;case to:e.depthFunc(e.ALWAYS);break;case no:e.depthFunc(e.LESS);break;case ro:e.depthFunc(e.LEQUAL);break;case io:e.depthFunc(e.EQUAL);break;case oo:e.depthFunc(e.GEQUAL);break;case ao:e.depthFunc(e.GREATER);break;case so:e.depthFunc(e.NOTEQUAL);break;default:e.depthFunc(e.LEQUAL)}else e.depthFunc(e.LEQUAL);r=t}},setLocked:function(e){t=e},setClear:function(t){i!==t&&(e.clearDepth(t),i=t)},reset:function(){t=!1,n=null,r=null,i=null}}}function a(){var t=!1,n=null,r=null,i=null,o=null,a=null,s=null,u=null,c=null;return{setTest:function(t){t?f(e.STENCIL_TEST):d(e.STENCIL_TEST)},setMask:function(r){n===r||t||(e.stencilMask(r),n=r)},setFunc:function(t,n,a){r===t&&i===n&&o===a||(e.stencilFunc(t,n,a),r=t,i=n,o=a)},setOp:function(t,n,r){a===t&&s===n&&u===r||(e.stencilOp(t,n,r),a=t,s=n,u=r)},setLocked:function(e){t=e},setClear:function(t){c!==t&&(e.clearStencil(t),c=t)},reset:function(){t=!1,n=null,r=null,i=null,o=null,a=null,s=null,u=null,c=null}}}function s(t,n,r){var i=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(var a=0;a<r;a++)e.texImage2D(n+a,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,i);return o}function u(){I(0,0,0,1),k(1),N(0),f(e.DEPTH_TEST),b(ro),O(!1),P(gi),f(e.CULL_FACE),f(e.BLEND),v(ji)}function c(){for(var e=0,t=W.length;e<t;e++)W[e]=0}function l(n){if(W[n]=1,0===X[n]&&(e.enableVertexAttribArray(n),X[n]=1),0!==q[n]){t.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,0),q[n]=0}}function p(t,n,r){W[t]=1,0===X[t]&&(e.enableVertexAttribArray(t),X[t]=1),q[t]!==n&&(r.vertexAttribDivisorANGLE(t,n),q[t]=n)}function h(){for(var t=0,n=X.length;t!==n;++t)X[t]!==W[t]&&(e.disableVertexAttribArray(t),X[t]=0)}function f(t){Y[t]!==!0&&(e.enable(t),Y[t]=!0)}function d(t){Y[t]!==!1&&(e.disable(t),Y[t]=!1)}function m(){if(null===Z&&(Z=[],t.get("WEBGL_compressed_texture_pvrtc")||t.get("WEBGL_compressed_texture_s3tc")||t.get("WEBGL_compressed_texture_etc1")))for(var n=e.getParameter(e.COMPRESSED_TEXTURE_FORMATS),r=0;r<n.length;r++)Z.push(n[r]);return Z}function v(t,r,i,o,a,s,u,c){t!==Ai?f(e.BLEND):d(e.BLEND),t===Q&&c===re||(t===Li?c?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ONE,e.ONE,e.ONE,e.ONE)):(e.blendEquation(e.FUNC_ADD),e.blendFunc(e.SRC_ALPHA,e.ONE)):t===Di?c?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ZERO,e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ONE_MINUS_SRC_ALPHA)):(e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ZERO,e.ONE_MINUS_SRC_COLOR)):t===Ii?c?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ZERO,e.SRC_COLOR,e.ZERO,e.SRC_ALPHA)):(e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ZERO,e.SRC_COLOR)):c?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ONE,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA)):(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA)),Q=t,re=c),t===ki?(a=a||r,s=s||i,u=u||o,r===J&&a===ee||(e.blendEquationSeparate(n(r),n(a)),J=r,ee=a),i===K&&o===$&&s===te&&u===ne||(e.blendFuncSeparate(n(i),n(o),n(s),n(u)),K=i,$=o,te=s,ne=u)):(J=null,K=null,$=null,ee=null,te=null,ne=null)}function y(e){z.setMask(e)}function g(e){G.setTest(e)}function _(e){G.setMask(e)}function b(e){G.setFunc(e)}function w(e){H.setTest(e)}function x(e){H.setMask(e)}function M(e,t,n){H.setFunc(e,t,n)}function E(e,t,n){H.setOp(e,t,n)}function O(t){ie!==t&&(t?e.frontFace(e.CW):e.frontFace(e.CCW),ie=t)}function P(t){t!==yi?(f(e.CULL_FACE),t!==oe&&(t===gi?e.cullFace(e.BACK):t===_i?e.cullFace(e.FRONT):e.cullFace(e.FRONT_AND_BACK))):d(e.CULL_FACE),oe=t}function T(t){t!==ae&&(e.lineWidth(t),ae=t)}function S(t,n,r){t?(f(e.POLYGON_OFFSET_FILL),se===n&&ue===r||(e.polygonOffset(n,r),se=n,ue=r)):d(e.POLYGON_OFFSET_FILL)}function C(){return ce}function R(t){ce=t,t?f(e.SCISSOR_TEST):d(e.SCISSOR_TEST)}function A(t){void 0===t&&(t=e.TEXTURE0+le-1),pe!==t&&(e.activeTexture(t),pe=t)}function j(t,n){null===pe&&A();var r=he[pe];void 0===r&&(r={type:void 0,texture:void 0},he[pe]=r),r.type===t&&r.texture===n||(e.bindTexture(t,n||me[t]),r.type=t,r.texture=n)}function L(){try{e.compressedTexImage2D.apply(e,arguments)}catch(e){console.error(e)}}function D(){try{e.texImage2D.apply(e,arguments)}catch(e){console.error(e)}}function I(e,t,n,r){z.setClear(e,t,n,r)}function k(e){G.setClear(e)}function N(e){H.setClear(e)}function U(t){fe.equals(t)===!1&&(e.scissor(t.x,t.y,t.z,t.w),fe.copy(t))}function F(t){de.equals(t)===!1&&(e.viewport(t.x,t.y,t.z,t.w),de.copy(t))}function B(){for(var t=0;t<X.length;t++)1===X[t]&&(e.disableVertexAttribArray(t),X[t]=0);Y={},Z=null,pe=null,he={},Q=null,ie=null,oe=null,z.reset(),G.reset(),H.reset()}var z=new r,G=new i,H=new a,V=e.getParameter(e.MAX_VERTEX_ATTRIBS),W=new Uint8Array(V),X=new Uint8Array(V),q=new Uint8Array(V),Y={},Z=null,Q=null,J=null,K=null,$=null,ee=null,te=null,ne=null,re=!1,ie=null,oe=null,ae=null,se=null,ue=null,ce=null,le=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),pe=null,he={},fe=new o,de=new o,me={};return me[e.TEXTURE_2D]=s(e.TEXTURE_2D,e.TEXTURE_2D,1),me[e.TEXTURE_CUBE_MAP]=s(e.TEXTURE_CUBE_MAP,e.TEXTURE_CUBE_MAP_POSITIVE_X,6),{buffers:{color:z,depth:G,stencil:H},init:u,initAttributes:c,enableAttribute:l,enableAttributeAndDivisor:p,disableUnusedAttributes:h,enable:f,disable:d,getCompressedTextureFormats:m,setBlending:v,setColorWrite:y,setDepthTest:g,setDepthWrite:_,setDepthFunc:b,setStencilTest:w,setStencilWrite:x,setStencilFunc:M,setStencilOp:E,setFlipSided:O,setCullFace:P,setLineWidth:T,setPolygonOffset:S,getScissorTest:C,setScissorTest:R,activeTexture:A,bindTexture:j,compressedTexImage2D:L,texImage2D:D,clearColor:I,clearDepth:k,clearStencil:N,scissor:U,viewport:F,reset:B}}function ot(e,t,n){function r(){if(void 0!==o)return o;var n=t.get("EXT_texture_filter_anisotropic");return o=null!==n?e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}function i(t){if("highp"===t){if(e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o,a=void 0!==n.precision?n.precision:"highp",s=i(a);s!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",s,"instead."),a=s);var u=n.logarithmicDepthBuffer===!0&&!!t.get("EXT_frag_depth"),c=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),l=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),p=e.getParameter(e.MAX_TEXTURE_SIZE),h=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),f=e.getParameter(e.MAX_VERTEX_ATTRIBS),d=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),m=e.getParameter(e.MAX_VARYING_VECTORS),v=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),y=l>0,g=!!t.get("OES_texture_float");return{getMaxAnisotropy:r,getMaxPrecision:i,precision:a,logarithmicDepthBuffer:u,maxTextures:c,maxVertexTextures:l,maxTextureSize:p,maxCubemapSize:h,maxAttributes:f,maxVertexUniforms:d,maxVaryings:m,maxFragmentUniforms:v,vertexTextures:y,floatFragmentTextures:g,floatVertexTextures:y&&g}}function at(e){var t={};return{get:function(n){if(void 0!==t[n])return t[n];var r;switch(n){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;case"WEBGL_compressed_texture_etc1":r=e.getExtension("WEBGL_compressed_texture_etc1");break;default:r=e.getExtension(n)}return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),t[n]=r,r}}}function st(){function e(){c.value!==r&&(c.value=r,c.needsUpdate=i>0),n.numPlanes=i,n.numIntersection=0}function t(e,t,r,i){var o=null!==e?e.length:0,a=null;if(0!==o){if(a=c.value,i!==!0||null===a){var l=r+4*o,p=t.matrixWorldInverse;u.getNormalMatrix(p),(null===a||a.length<l)&&(a=new Float32Array(l));for(var h=0,f=r;h!==o;++h,f+=4)s.copy(e[h]).applyMatrix4(p,u),s.normal.toArray(a,f),a[f+3]=s.constant}c.value=a,c.needsUpdate=!0}return n.numPlanes=o,a}var n=this,r=null,i=0,o=!1,a=!1,s=new re,u=new ne,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(e,n,a){var s=0!==e.length||n||0!==i||o;return o=n,r=t(e,a,0),i=e.length,s},this.beginShadows=function(){a=!0,t(null)},this.endShadows=function(){a=!1,e()},this.setState=function(n,s,u,l,p,h){if(!o||null===n||0===n.length||a&&!u)a?t(null):e();else{var f=a?0:i,d=4*f,m=p.clippingState||null;c.value=m,m=t(n,l,d,h);for(var v=0;v!==d;++v)m[v]=r[v];p.clippingState=m,this.numIntersection=s?this.numPlanes:0,this.numPlanes+=f}}}function ut(e){function t(){return null===pe?Oe:1}function n(e,t,n,r){q===!0&&(e*=r,t*=r,n*=r),Je.clearColor(e,t,n,r)}function r(){Je.init(),Je.scissor(ye.copy(Pe).multiplyScalar(Oe)),Je.viewport(_e.copy(Se).multiplyScalar(Oe)),n(we.r,we.g,we.b,xe)}function i(){le=null,ve=null,me="",fe=-1,Je.reset()}function a(e){e.preventDefault(),i(),r(),Ke.clear()}function s(e){var t=e.target;t.removeEventListener("dispose",s),u(t)}function u(e){p(e),Ke.delete(e)}function p(e){var t=Ke.get(e).program;e.program=void 0,void 0!==t&&ct.releaseProgram(t)}function h(e,t,n,r){var i;if(n&&n.isInstancedBufferGeometry&&null===(i=Ze.get("ANGLE_instanced_arrays")))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");void 0===r&&(r=0),Je.initAttributes();var o=n.attributes,a=t.getAttributes(),s=e.defaultAttributeValues;for(var u in a){var c=a[u];if(c>=0){var l=o[u];if(void 0!==l){var p=qe.FLOAT,h=l.array,f=l.normalized;h instanceof Float32Array?p=qe.FLOAT:h instanceof Float64Array?console.warn("Unsupported data buffer format: Float64Array"):h instanceof Uint16Array?p=qe.UNSIGNED_SHORT:h instanceof Int16Array?p=qe.SHORT:h instanceof Uint32Array?p=qe.UNSIGNED_INT:h instanceof Int32Array?p=qe.INT:h instanceof Int8Array?p=qe.BYTE:h instanceof Uint8Array&&(p=qe.UNSIGNED_BYTE);var d=l.itemSize,m=ut.getAttributeBuffer(l);if(l.isInterleavedBufferAttribute){var v=l.data,y=v.stride,g=l.offset;v&&v.isInstancedInterleavedBuffer?(Je.enableAttributeAndDivisor(c,v.meshPerAttribute,i),void 0===n.maxInstancedCount&&(n.maxInstancedCount=v.meshPerAttribute*v.count)):Je.enableAttribute(c),qe.bindBuffer(qe.ARRAY_BUFFER,m),qe.vertexAttribPointer(c,d,p,f,y*v.array.BYTES_PER_ELEMENT,(r*y+g)*v.array.BYTES_PER_ELEMENT)}else l.isInstancedBufferAttribute?(Je.enableAttributeAndDivisor(c,l.meshPerAttribute,i),void 0===n.maxInstancedCount&&(n.maxInstancedCount=l.meshPerAttribute*l.count)):Je.enableAttribute(c),qe.bindBuffer(qe.ARRAY_BUFFER,m),qe.vertexAttribPointer(c,d,p,f,0,r*d*l.array.BYTES_PER_ELEMENT)}else if(void 0!==s){var _=s[u];if(void 0!==_)switch(_.length){case 2:qe.vertexAttrib2fv(c,_);break;case 3:qe.vertexAttrib3fv(c,_);break;case 4:qe.vertexAttrib4fv(c,_);break;default:qe.vertexAttrib1fv(c,_)}}}}Je.disableUnusedAttributes()}function f(e,t){return Math.abs(t[0])-Math.abs(e[0])}function d(e,t){return e.object.renderOrder!==t.object.renderOrder?e.object.renderOrder-t.object.renderOrder:e.material.program&&t.material.program&&e.material.program!==t.material.program?e.material.program.id-t.material.program.id:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function m(e,t){return e.object.renderOrder!==t.object.renderOrder?e.object.renderOrder-t.object.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function v(e,t,n,r,i){var o,a;n.transparent?(o=ne,a=++re):(o=$,a=++ee);var s=o[a];void 0!==s?(s.id=e.id,s.object=e,s.geometry=t,s.material=n,s.z=Ve.z,s.group=i):(s={id:e.id,object:e,geometry:t,material:n,z:Ve.z,group:i},o.push(s))}function y(e){var t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),Ge.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),_(Ge)}function g(e){return Ge.center.set(0,0,0),Ge.radius=.7071067811865476,Ge.applyMatrix4(e.matrixWorld),_(Ge)}function _(e){if(!Le.intersectsSphere(e))return!1;var t=Fe.numPlanes;if(0===t)return!0;var n=ce.clippingPlanes,r=e.center,i=-e.radius,o=0;do{if(n[o].distanceToPoint(r)<i)return!1}while(++o!==t);return!0}function b(e,t){if(e.visible!==!1){if(0!=(e.layers.mask&t.layers.mask))if(e.isLight)J.push(e);else if(e.isSprite)e.frustumCulled!==!1&&g(e)!==!0||se.push(e);else if(e.isLensFlare)ue.push(e);else if(e.isImmediateRenderObject)ce.sortObjects===!0&&(Ve.setFromMatrixPosition(e.matrixWorld),Ve.applyProjection(He)),v(e,null,e.material,Ve.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.update(),e.frustumCulled===!1||y(e)===!0)){var n=e.material;if(n.visible===!0){ce.sortObjects===!0&&(Ve.setFromMatrixPosition(e.matrixWorld),Ve.applyProjection(He));var r=ut.update(e);if(n.isMultiMaterial)for(var i=r.groups,o=n.materials,a=0,s=i.length;a<s;a++){var u=i[a],c=o[u.materialIndex];c.visible===!0&&v(e,r,c,Ve.z,u)}else v(e,r,n,Ve.z,null)}}for(var l=e.children,a=0,s=l.length;a<s;a++)b(l[a],t)}}function w(e,t,n,r){for(var i=0,o=e.length;i<o;i++){var a=e[i],s=a.object,u=a.geometry,c=void 0===r?a.material:r,l=a.group;if(s.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,s.matrixWorld),s.normalMatrix.getNormalMatrix(s.modelViewMatrix),s.onBeforeRender(ce,t,n,u,c,l),s.isImmediateRenderObject){M(c);var p=E(n,t.fog,c,s);me="",s.render(function(e){ce.renderBufferImmediate(e,p,c)})}else ce.renderBufferDirect(n,t.fog,u,c,s,l);s.onAfterRender(ce,t,n,u,c,l)}}function x(e,t,n){var r=Ke.get(e),i=ct.getParameters(e,We,t,Fe.numPlanes,Fe.numIntersection,n),o=ct.getProgramCode(e,i),a=r.program,u=!0;if(void 0===a)e.addEventListener("dispose",s);else if(a.code!==o)p(e);else{if(void 0!==i.shaderID)return;u=!1}if(u){if(i.shaderID){var c=ka[i.shaderID];r.__webglShader={name:e.type,uniforms:ja.clone(c.uniforms),vertexShader:c.vertexShader,fragmentShader:c.fragmentShader}}else r.__webglShader={name:e.type,uniforms:e.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader};e.__webglShader=r.__webglShader,a=ct.acquireProgram(e,i,o),r.program=a,e.program=a}var l=a.getAttributes();if(e.morphTargets){e.numSupportedMorphTargets=0;for(var h=0;h<ce.maxMorphTargets;h++)l["morphTarget"+h]>=0&&e.numSupportedMorphTargets++}if(e.morphNormals){e.numSupportedMorphNormals=0;for(var h=0;h<ce.maxMorphNormals;h++)l["morphNormal"+h]>=0&&e.numSupportedMorphNormals++}var f=r.__webglShader.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&e.clipping!==!0||(r.numClippingPlanes=Fe.numPlanes,r.numIntersection=Fe.numIntersection,f.clippingPlanes=Fe.uniform),r.fog=t,r.lightsHash=We.hash,e.lights&&(f.ambientLightColor.value=We.ambient,f.directionalLights.value=We.directional,f.spotLights.value=We.spot,f.pointLights.value=We.point,f.hemisphereLights.value=We.hemi,f.directionalShadowMap.value=We.directionalShadowMap,f.directionalShadowMatrix.value=We.directionalShadowMatrix,f.spotShadowMap.value=We.spotShadowMap,f.spotShadowMatrix.value=We.spotShadowMatrix,f.pointShadowMap.value=We.pointShadowMap,f.pointShadowMatrix.value=We.pointShadowMatrix);var d=r.program.getUniforms(),m=W.seqWithValue(d.seq,f);r.uniformsList=m}function M(e){e.side===Oi?Je.disable(qe.CULL_FACE):Je.enable(qe.CULL_FACE),Je.setFlipSided(e.side===Ei),e.transparent===!0?Je.setBlending(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha):Je.setBlending(Ai),Je.setDepthFunc(e.depthFunc),Je.setDepthTest(e.depthTest),Je.setDepthWrite(e.depthWrite),Je.setColorWrite(e.colorWrite),Je.setPolygonOffset(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)}function E(e,t,n,r){be=0;var i=Ke.get(n);if(Be&&(ze||e!==ve)){var o=e===ve&&n.id===fe;Fe.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,e,i,o)}n.needsUpdate===!1&&(void 0===i.program?n.needsUpdate=!0:n.fog&&i.fog!==t?n.needsUpdate=!0:n.lights&&i.lightsHash!==We.hash?n.needsUpdate=!0:void 0===i.numClippingPlanes||i.numClippingPlanes===Fe.numPlanes&&i.numIntersection===Fe.numIntersection||(n.needsUpdate=!0)),n.needsUpdate&&(x(n,t,r),n.needsUpdate=!1);var a=!1,s=!1,u=!1,c=i.program,l=c.getUniforms(),p=i.__webglShader.uniforms;if(c.id!==le&&(qe.useProgram(c.program),le=c.id,a=!0,s=!0,u=!0),n.id!==fe&&(fe=n.id,s=!0),a||e!==ve){if(l.set(qe,e,"projectionMatrix"),Qe.logarithmicDepthBuffer&&l.setValue(qe,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),e!==ve&&(ve=e,s=!0,u=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var h=l.map.cameraPosition;void 0!==h&&h.setValue(qe,Ve.setFromMatrixPosition(e.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&l.setValue(qe,"viewMatrix",e.matrixWorldInverse),l.set(qe,ce,"toneMappingExposure"),l.set(qe,ce,"toneMappingWhitePoint")}if(n.skinning){l.setOptional(qe,r,"bindMatrix"),l.setOptional(qe,r,"bindMatrixInverse");var f=r.skeleton;f&&(Qe.floatVertexTextures&&f.useVertexTexture?(l.set(qe,f,"boneTexture"),l.set(qe,f,"boneTextureWidth"),l.set(qe,f,"boneTextureHeight")):l.setOptional(qe,f,"boneMatrices"))}return s&&(n.lights&&D(p,u),t&&n.fog&&C(p,t),(n.isMeshBasicMaterial||n.isMeshLambertMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.isMeshDepthMaterial)&&O(p,n),n.isLineBasicMaterial?P(p,n):n.isLineDashedMaterial?(P(p,n),T(p,n)):n.isPointsMaterial?S(p,n):n.isMeshLambertMaterial?R(p,n):n.isMeshPhongMaterial?A(p,n):n.isMeshPhysicalMaterial?L(p,n):n.isMeshStandardMaterial?j(p,n):n.isMeshDepthMaterial?n.displacementMap&&(p.displacementMap.value=n.displacementMap,p.displacementScale.value=n.displacementScale,p.displacementBias.value=n.displacementBias):n.isMeshNormalMaterial&&(p.opacity.value=n.opacity),W.upload(qe,i.uniformsList,p,ce)),l.set(qe,r,"modelViewMatrix"),l.set(qe,r,"normalMatrix"),l.setValue(qe,"modelMatrix",r.matrixWorld),c}function O(e,t){e.opacity.value=t.opacity,e.diffuse.value=t.color,t.emissive&&e.emissive.value.copy(t.emissive).multiplyScalar(t.emissiveIntensity),e.map.value=t.map,e.specularMap.value=t.specularMap,e.alphaMap.value=t.alphaMap,t.aoMap&&(e.aoMap.value=t.aoMap,e.aoMapIntensity.value=t.aoMapIntensity);var n;if(t.map?n=t.map:t.specularMap?n=t.specularMap:t.displacementMap?n=t.displacementMap:t.normalMap?n=t.normalMap:t.bumpMap?n=t.bumpMap:t.roughnessMap?n=t.roughnessMap:t.metalnessMap?n=t.metalnessMap:t.alphaMap?n=t.alphaMap:t.emissiveMap&&(n=t.emissiveMap),void 0!==n){n.isWebGLRenderTarget&&(n=n.texture);var r=n.offset,i=n.repeat;e.offsetRepeat.value.set(r.x,r.y,i.x,i.y)}e.envMap.value=t.envMap,e.flipEnvMap.value=t.envMap&&t.envMap.isCubeTexture?-1:1,e.reflectivity.value=t.reflectivity,e.refractionRatio.value=t.refractionRatio}function P(e,t){e.diffuse.value=t.color,e.opacity.value=t.opacity}function T(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}function S(e,t){if(e.diffuse.value=t.color,e.opacity.value=t.opacity,e.size.value=t.size*Oe,e.scale.value=.5*Ee,e.map.value=t.map,null!==t.map){var n=t.map.offset,r=t.map.repeat;e.offsetRepeat.value.set(n.x,n.y,r.x,r.y)}}function C(e,t){e.fogColor.value=t.color,t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)}function R(e,t){t.lightMap&&(e.lightMap.value=t.lightMap,e.lightMapIntensity.value=t.lightMapIntensity),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}function A(e,t){e.specular.value=t.specular,e.shininess.value=Math.max(t.shininess,1e-4),t.lightMap&&(e.lightMap.value=t.lightMap,e.lightMapIntensity.value=t.lightMapIntensity),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale)),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}function j(e,t){e.roughness.value=t.roughness,e.metalness.value=t.metalness,t.roughnessMap&&(e.roughnessMap.value=t.roughnessMap),t.metalnessMap&&(e.metalnessMap.value=t.metalnessMap),t.lightMap&&(e.lightMap.value=t.lightMap,e.lightMapIntensity.value=t.lightMapIntensity),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale)),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias),t.envMap&&(e.envMapIntensity.value=t.envMapIntensity)}function L(e,t){e.clearCoat.value=t.clearCoat,e.clearCoatRoughness.value=t.clearCoatRoughness,j(e,t)}function D(e,t){e.ambientLightColor.needsUpdate=t,e.directionalLights.needsUpdate=t,e.pointLights.needsUpdate=t,e.spotLights.needsUpdate=t,e.hemisphereLights.needsUpdate=t}function I(e){for(var t=0,n=0,r=e.length;n<r;n++){var i=e[n];i.castShadow&&(We.shadows[t++]=i)}We.shadows.length=t}function k(e,t){var n,r,i,o,a,s,u,c=0,p=0,h=0,f=t.matrixWorldInverse,d=0,m=0,v=0,y=0;for(n=0,r=e.length;n<r;n++)if(i=e[n],o=i.color,a=i.intensity,s=i.distance,u=i.shadow&&i.shadow.map?i.shadow.map.texture:null,i.isAmbientLight)c+=o.r*a,p+=o.g*a,h+=o.b*a;else if(i.isDirectionalLight){var g=lt.get(i);g.color.copy(i.color).multiplyScalar(i.intensity),g.direction.setFromMatrixPosition(i.matrixWorld),Ve.setFromMatrixPosition(i.target.matrixWorld),g.direction.sub(Ve),g.direction.transformDirection(f),g.shadow=i.castShadow,i.castShadow&&(g.shadowBias=i.shadow.bias,g.shadowRadius=i.shadow.radius,g.shadowMapSize=i.shadow.mapSize),We.directionalShadowMap[d]=u,We.directionalShadowMatrix[d]=i.shadow.matrix,We.directional[d++]=g}else if(i.isSpotLight){var g=lt.get(i);g.position.setFromMatrixPosition(i.matrixWorld),g.position.applyMatrix4(f),g.color.copy(o).multiplyScalar(a),g.distance=s,g.direction.setFromMatrixPosition(i.matrixWorld),Ve.setFromMatrixPosition(i.target.matrixWorld),g.direction.sub(Ve),g.direction.transformDirection(f),g.coneCos=Math.cos(i.angle),g.penumbraCos=Math.cos(i.angle*(1-i.penumbra)),g.decay=0===i.distance?0:i.decay,g.shadow=i.castShadow,i.castShadow&&(g.shadowBias=i.shadow.bias,g.shadowRadius=i.shadow.radius,g.shadowMapSize=i.shadow.mapSize),We.spotShadowMap[v]=u,We.spotShadowMatrix[v]=i.shadow.matrix,We.spot[v++]=g}else if(i.isPointLight){var g=lt.get(i);g.position.setFromMatrixPosition(i.matrixWorld),g.position.applyMatrix4(f),g.color.copy(i.color).multiplyScalar(i.intensity),g.distance=i.distance,g.decay=0===i.distance?0:i.decay,g.shadow=i.castShadow,i.castShadow&&(g.shadowBias=i.shadow.bias,g.shadowRadius=i.shadow.radius,g.shadowMapSize=i.shadow.mapSize),We.pointShadowMap[m]=u,void 0===We.pointShadowMatrix[m]&&(We.pointShadowMatrix[m]=new l),Ve.setFromMatrixPosition(i.matrixWorld).negate(),We.pointShadowMatrix[m].identity().setPosition(Ve),We.point[m++]=g}else if(i.isHemisphereLight){var g=lt.get(i);g.direction.setFromMatrixPosition(i.matrixWorld),g.direction.transformDirection(f),g.direction.normalize(),g.skyColor.copy(i.color).multiplyScalar(a),g.groundColor.copy(i.groundColor).multiplyScalar(a),We.hemi[y++]=g}We.ambient[0]=c,We.ambient[1]=p,We.ambient[2]=h,We.directional.length=d,We.spot.length=v,We.point.length=m,We.hemi.length=y,We.hash=d+","+m+","+v+","+y+","+We.shadows.length}function N(){var e=be;return e>=Qe.maxTextures&&console.warn("WebGLRenderer: trying to use "+e+" texture units while this GPU supports only "+Qe.maxTextures),be+=1,e}function U(e){var t;if(e===Oo)return qe.REPEAT;if(e===Po)return qe.CLAMP_TO_EDGE;if(e===To)return qe.MIRRORED_REPEAT;if(e===Co)return qe.NEAREST;if(e===Ro)return qe.NEAREST_MIPMAP_NEAREST;if(e===Ao)return qe.NEAREST_MIPMAP_LINEAR;if(e===jo)return qe.LINEAR;if(e===Lo)return qe.LINEAR_MIPMAP_NEAREST;if(e===Do)return qe.LINEAR_MIPMAP_LINEAR;if(e===ko)return qe.UNSIGNED_BYTE;if(e===Vo)return qe.UNSIGNED_SHORT_4_4_4_4;if(e===Wo)return qe.UNSIGNED_SHORT_5_5_5_1;if(e===Xo)return qe.UNSIGNED_SHORT_5_6_5;if(e===No)return qe.BYTE;if(e===Uo)return qe.SHORT;if(e===Fo)return qe.UNSIGNED_SHORT;if(e===Bo)return qe.INT;if(e===zo)return qe.UNSIGNED_INT;if(e===Go)return qe.FLOAT;if(e===Ho&&null!==(t=Ze.get("OES_texture_half_float")))return t.HALF_FLOAT_OES;if(e===Yo)return qe.ALPHA;if(e===Zo)return qe.RGB;if(e===Qo)return qe.RGBA;if(e===Jo)return qe.LUMINANCE;if(e===Ko)return qe.LUMINANCE_ALPHA;if(e===ea)return qe.DEPTH_COMPONENT;if(e===ta)return qe.DEPTH_STENCIL;if(e===Ui)return qe.FUNC_ADD;if(e===Fi)return qe.FUNC_SUBTRACT;if(e===Bi)return qe.FUNC_REVERSE_SUBTRACT;if(e===Hi)return qe.ZERO;if(e===Vi)return qe.ONE;if(e===Wi)return qe.SRC_COLOR;if(e===Xi)return qe.ONE_MINUS_SRC_COLOR;if(e===qi)return qe.SRC_ALPHA;if(e===Yi)return qe.ONE_MINUS_SRC_ALPHA;if(e===Zi)return qe.DST_ALPHA;if(e===Qi)return qe.ONE_MINUS_DST_ALPHA;if(e===Ji)return qe.DST_COLOR;if(e===Ki)return qe.ONE_MINUS_DST_COLOR;if(e===$i)return qe.SRC_ALPHA_SATURATE;if((e===na||e===ra||e===ia||e===oa)&&null!==(t=Ze.get("WEBGL_compressed_texture_s3tc"))){if(e===na)return t.COMPRESSED_RGB_S3TC_DXT1_EXT;if(e===ra)return t.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(e===ia)return t.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(e===oa)return t.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((e===aa||e===sa||e===ua||e===ca)&&null!==(t=Ze.get("WEBGL_compressed_texture_pvrtc"))){if(e===aa)return t.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(e===sa)return t.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(e===ua)return t.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(e===ca)return t.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(e===la&&null!==(t=Ze.get("WEBGL_compressed_texture_etc1")))return t.COMPRESSED_RGB_ETC1_WEBGL;if((e===zi||e===Gi)&&null!==(t=Ze.get("EXT_blend_minmax"))){if(e===zi)return t.MIN_EXT;if(e===Gi)return t.MAX_EXT}return e===qo&&null!==(t=Ze.get("WEBGL_depth_texture"))?t.UNSIGNED_INT_24_8_WEBGL:0}console.log("THREE.WebGLRenderer",mi),e=e||{};var F=void 0!==e.canvas?e.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),B=void 0!==e.context?e.context:null,z=void 0!==e.alpha&&e.alpha,G=void 0===e.depth||e.depth,H=void 0===e.stencil||e.stencil,V=void 0!==e.antialias&&e.antialias,q=void 0===e.premultipliedAlpha||e.premultipliedAlpha,Q=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,J=[],$=[],ee=-1,ne=[],re=-1,ae=new Float32Array(8),se=[],ue=[];this.domElement=F,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=ho,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var ce=this,le=null,pe=null,he=null,fe=-1,me="",ve=null,ye=new o,ge=null,_e=new o,be=0,we=new X(0),xe=0,Me=F.width,Ee=F.height,Oe=1,Pe=new o(0,0,Me,Ee),Te=!1,Se=new o(0,0,Me,Ee),Le=new ie,Fe=new st,Be=!1,ze=!1,Ge=new te,He=new l,Ve=new c,We={hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],shadows:[]},Xe={calls:0,vertices:0,faces:0,points:0};this.info={render:Xe,memory:{geometries:0,textures:0},programs:null};var qe;try{var Ye={alpha:z,depth:G,stencil:H,antialias:V,premultipliedAlpha:q,preserveDrawingBuffer:Q};if(null===(qe=B||F.getContext("webgl",Ye)||F.getContext("experimental-webgl",Ye)))throw null!==F.getContext("webgl")?"Error creating WebGL context with your selected attributes.":"Error creating WebGL context.";void 0===qe.getShaderPrecisionFormat&&(qe.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}}),F.addEventListener("webglcontextlost",a,!1)}catch(e){console.error("THREE.WebGLRenderer: "+e)}var Ze=new at(qe);Ze.get("WEBGL_depth_texture"),Ze.get("OES_texture_float"),Ze.get("OES_texture_float_linear"),Ze.get("OES_texture_half_float"),Ze.get("OES_texture_half_float_linear"),Ze.get("OES_standard_derivatives"),Ze.get("ANGLE_instanced_arrays"),Ze.get("OES_element_index_uint")&&(Ce.MaxIndex=4294967296);var Qe=new ot(qe,Ze,e),Je=new it(qe,Ze,U),Ke=new rt,et=new nt(qe,Ze,Je,Ke,Qe,U,this.info),ut=new tt(qe,Ke,this.info),ct=new $e(this,Qe),lt=new Ue;this.info.programs=ct.programs;var pt=new Ne(qe,Ze,Xe),ht=new ke(qe,Ze,Xe),ft=new Ie(-1,1,1,-1,0,1),dt=new De,mt=new Re(new je(2,2),new de({depthTest:!1,depthWrite:!1,fog:!1})),vt=ka.cube,yt=new Re(new Ae(5,5,5),new K({uniforms:vt.uniforms,vertexShader:vt.vertexShader,fragmentShader:vt.fragmentShader,side:Ei,depthTest:!1,depthWrite:!1,fog:!1}));r(),this.context=qe,this.capabilities=Qe,this.extensions=Ze,this.properties=Ke,this.state=Je;var gt=new oe(this,We,ut,Qe);this.shadowMap=gt;var _t=new Z(this,se),bt=new Y(this,ue);this.getContext=function(){return qe},this.getContextAttributes=function(){return qe.getContextAttributes()},this.forceContextLoss=function(){Ze.get("WEBGL_lose_context").loseContext()},this.getMaxAnisotropy=function(){return Qe.getMaxAnisotropy()},this.getPrecision=function(){return Qe.precision},this.getPixelRatio=function(){return Oe},this.setPixelRatio=function(e){void 0!==e&&(Oe=e,this.setSize(Se.z,Se.w,!1))},this.getSize=function(){return{width:Me,height:Ee}},this.setSize=function(e,t,n){Me=e,Ee=t,F.width=e*Oe,F.height=t*Oe,n!==!1&&(F.style.width=e+"px",F.style.height=t+"px"),this.setViewport(0,0,e,t)},this.setViewport=function(e,t,n,r){Je.viewport(Se.set(e,t,n,r))},this.setScissor=function(e,t,n,r){Je.scissor(Pe.set(e,t,n,r))},this.setScissorTest=function(e){Je.setScissorTest(Te=e)},this.getClearColor=function(){return we},this.setClearColor=function(e,t){we.set(e),xe=void 0!==t?t:1,n(we.r,we.g,we.b,xe)},this.getClearAlpha=function(){return xe},this.setClearAlpha=function(e){xe=e,n(we.r,we.g,we.b,xe)},this.clear=function(e,t,n){var r=0;(void 0===e||e)&&(r|=qe.COLOR_BUFFER_BIT),(void 0===t||t)&&(r|=qe.DEPTH_BUFFER_BIT),(void 0===n||n)&&(r|=qe.STENCIL_BUFFER_BIT),qe.clear(r)},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(e,t,n,r){this.setRenderTarget(e),this.clear(t,n,r)},this.resetGLState=i,this.dispose=function(){ne=[],re=-1,$=[],ee=-1,F.removeEventListener("webglcontextlost",a,!1)},this.renderBufferImmediate=function(e,t,n){Je.initAttributes();var r=Ke.get(e);e.hasPositions&&!r.position&&(r.position=qe.createBuffer()),e.hasNormals&&!r.normal&&(r.normal=qe.createBuffer()),e.hasUvs&&!r.uv&&(r.uv=qe.createBuffer()),e.hasColors&&!r.color&&(r.color=qe.createBuffer());var i=t.getAttributes();if(e.hasPositions&&(qe.bindBuffer(qe.ARRAY_BUFFER,r.position),qe.bufferData(qe.ARRAY_BUFFER,e.positionArray,qe.DYNAMIC_DRAW),Je.enableAttribute(i.position),qe.vertexAttribPointer(i.position,3,qe.FLOAT,!1,0,0)),e.hasNormals){if(qe.bindBuffer(qe.ARRAY_BUFFER,r.normal),!n.isMeshPhongMaterial&&!n.isMeshStandardMaterial&&n.shading===Pi)for(var o=0,a=3*e.count;o<a;o+=9){var s=e.normalArray,u=(s[o+0]+s[o+3]+s[o+6])/3,c=(s[o+1]+s[o+4]+s[o+7])/3,l=(s[o+2]+s[o+5]+s[o+8])/3;s[o+0]=u,s[o+1]=c,s[o+2]=l,s[o+3]=u,s[o+4]=c,s[o+5]=l,s[o+6]=u,s[o+7]=c,s[o+8]=l}qe.bufferData(qe.ARRAY_BUFFER,e.normalArray,qe.DYNAMIC_DRAW),Je.enableAttribute(i.normal),qe.vertexAttribPointer(i.normal,3,qe.FLOAT,!1,0,0)}e.hasUvs&&n.map&&(qe.bindBuffer(qe.ARRAY_BUFFER,r.uv),qe.bufferData(qe.ARRAY_BUFFER,e.uvArray,qe.DYNAMIC_DRAW),Je.enableAttribute(i.uv),qe.vertexAttribPointer(i.uv,2,qe.FLOAT,!1,0,0)),e.hasColors&&n.vertexColors!==Si&&(qe.bindBuffer(qe.ARRAY_BUFFER,r.color),qe.bufferData(qe.ARRAY_BUFFER,e.colorArray,qe.DYNAMIC_DRAW),Je.enableAttribute(i.color),qe.vertexAttribPointer(i.color,3,qe.FLOAT,!1,0,0)),Je.disableUnusedAttributes(),qe.drawArrays(qe.TRIANGLES,0,e.count),e.count=0},this.renderBufferDirect=function(e,n,r,i,o,a){M(i);var s=E(e,n,i,o),u=!1,c=r.id+"_"+s.id+"_"+i.wireframe;c!==me&&(me=c,u=!0);var l=o.morphTargetInfluences;if(void 0!==l){for(var p=[],d=0,m=l.length;d<m;d++){var v=l[d];p.push([v,d])}p.sort(f),p.length>8&&(p.length=8);for(var y=r.morphAttributes,d=0,m=p.length;d<m;d++){var v=p[d];if(ae[d]=v[0],0!==v[0]){var g=v[1];i.morphTargets===!0&&y.position&&r.addAttribute("morphTarget"+d,y.position[g]),i.morphNormals===!0&&y.normal&&r.addAttribute("morphNormal"+d,y.normal[g])}else i.morphTargets===!0&&r.removeAttribute("morphTarget"+d),i.morphNormals===!0&&r.removeAttribute("morphNormal"+d)}for(var d=p.length,_=ae.length;d<_;d++)ae[d]=0;s.getUniforms().setValue(qe,"morphTargetInfluences",ae),u=!0}var g=r.index,b=r.attributes.position,w=1;i.wireframe===!0&&(g=ut.getWireframeAttribute(r),w=2);var x;null!==g?(x=ht,x.setIndex(g)):x=pt,u&&(h(i,s,r),null!==g&&qe.bindBuffer(qe.ELEMENT_ARRAY_BUFFER,ut.getAttributeBuffer(g)));var O=0;null!==g?O=g.count:void 0!==b&&(O=b.count);var P=r.drawRange.start*w,T=r.drawRange.count*w,S=null!==a?a.start*w:0,C=null!==a?a.count*w:1/0,R=Math.max(P,S),A=Math.min(O,P+T,S+C)-1,j=Math.max(0,A-R+1);if(0!==j){if(o.isMesh)if(i.wireframe===!0)Je.setLineWidth(i.wireframeLinewidth*t()),x.setMode(qe.LINES);else switch(o.drawMode){case fa:x.setMode(qe.TRIANGLES);break;case da:x.setMode(qe.TRIANGLE_STRIP);break;case ma:x.setMode(qe.TRIANGLE_FAN)}else if(o.isLine){var L=i.linewidth;void 0===L&&(L=1),Je.setLineWidth(L*t()),o.isLineSegments?x.setMode(qe.LINES):x.setMode(qe.LINE_STRIP)}else o.isPoints&&x.setMode(qe.POINTS);r&&r.isInstancedBufferGeometry?r.maxInstancedCount>0&&x.renderInstances(r,R,j):x.render(R,j)}},this.render=function(e,t,r,i){if(void 0!==t&&t.isCamera!==!0)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");me="",fe=-1,ve=null,e.autoUpdate===!0&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),t.matrixWorldInverse.getInverse(t.matrixWorld),He.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),Le.setFromMatrix(He),J.length=0,ee=-1,re=-1,se.length=0,ue.length=0,ze=this.localClippingEnabled,Be=Fe.init(this.clippingPlanes,ze,t),b(e,t),$.length=ee+1,ne.length=re+1,ce.sortObjects===!0&&($.sort(d),ne.sort(m)),Be&&Fe.beginShadows(),I(J),gt.render(e,t),k(J,t),Be&&Fe.endShadows(),Xe.calls=0,Xe.vertices=0,Xe.faces=0,Xe.points=0,void 0===r&&(r=null),this.setRenderTarget(r);var o=e.background;if(null===o?n(we.r,we.g,we.b,xe):o&&o.isColor&&(n(o.r,o.g,o.b,1),i=!0),(this.autoClear||i)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil),o&&o.isCubeTexture?(dt.projectionMatrix.copy(t.projectionMatrix),dt.matrixWorld.extractRotation(t.matrixWorld),dt.matrixWorldInverse.getInverse(dt.matrixWorld),yt.material.uniforms.tCube.value=o,yt.modelViewMatrix.multiplyMatrices(dt.matrixWorldInverse,yt.matrixWorld),ut.update(yt),ce.renderBufferDirect(dt,null,yt.geometry,yt.material,yt,null)):o&&o.isTexture&&(mt.material.map=o,ut.update(mt),ce.renderBufferDirect(ft,null,mt.geometry,mt.material,mt,null)),e.overrideMaterial){var a=e.overrideMaterial;w($,e,t,a),w(ne,e,t,a)}else Je.setBlending(Ai),w($,e,t),w(ne,e,t);_t.render(e,t),bt.render(e,t,_e),r&&et.updateRenderTargetMipmap(r),Je.setDepthTest(!0),Je.setDepthWrite(!0),Je.setColorWrite(!0)},this.setFaceCulling=function(e,t){Je.setCullFace(e),Je.setFlipSided(t===bi)},this.allocTextureUnit=N,this.setTexture2D=function(){var e=!1;return function(t,n){t&&t.isWebGLRenderTarget&&(e||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),e=!0),t=t.texture),et.setTexture2D(t,n)}}(),this.setTexture=function(){var e=!1;return function(t,n){e||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),e=!0),et.setTexture2D(t,n)}}(),this.setTextureCube=function(){var e=!1;return function(t,n){t&&t.isWebGLRenderTargetCube&&(e||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),e=!0),t=t.texture),t&&t.isCubeTexture||Array.isArray(t.image)&&6===t.image.length?et.setTextureCube(t,n):et.setTextureCubeDynamic(t,n)}}(),this.getCurrentRenderTarget=function(){return pe},this.setRenderTarget=function(e){pe=e,e&&void 0===Ke.get(e).__webglFramebuffer&&et.setupRenderTarget(e);var t,n=e&&e.isWebGLRenderTargetCube;if(e){var r=Ke.get(e);t=n?r.__webglFramebuffer[e.activeCubeFace]:r.__webglFramebuffer,ye.copy(e.scissor),ge=e.scissorTest,_e.copy(e.viewport)}else t=null,ye.copy(Pe).multiplyScalar(Oe),ge=Te,_e.copy(Se).multiplyScalar(Oe);if(he!==t&&(qe.bindFramebuffer(qe.FRAMEBUFFER,t),he=t),Je.scissor(ye),Je.setScissorTest(ge),Je.viewport(_e),n){var i=Ke.get(e.texture);qe.framebufferTexture2D(qe.FRAMEBUFFER,qe.COLOR_ATTACHMENT0,qe.TEXTURE_CUBE_MAP_POSITIVE_X+e.activeCubeFace,i.__webglTexture,e.activeMipMapLevel)}},this.readRenderTargetPixels=function(e,t,n,r,i,o){if((e&&e.isWebGLRenderTarget)===!1)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");var a=Ke.get(e).__webglFramebuffer;if(a){var s=!1;a!==he&&(qe.bindFramebuffer(qe.FRAMEBUFFER,a),s=!0);try{var u=e.texture,c=u.format,l=u.type;if(c!==Qo&&U(c)!==qe.getParameter(qe.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(l===ko||U(l)===qe.getParameter(qe.IMPLEMENTATION_COLOR_READ_TYPE)||l===Go&&(Ze.get("OES_texture_float")||Ze.get("WEBGL_color_buffer_float"))||l===Ho&&Ze.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");qe.checkFramebufferStatus(qe.FRAMEBUFFER)===qe.FRAMEBUFFER_COMPLETE?t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&qe.readPixels(t,n,r,i,U(c),U(l),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&qe.bindFramebuffer(qe.FRAMEBUFFER,he)}}}}function ct(e,t){this.name="",this.color=new X(e),this.density=void 0!==t?t:25e-5}function lt(e,t,n){this.name="",this.color=new X(e),this.near=void 0!==t?t:1,this.far=void 0!==n?n:1e3}function pt(){ce.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function ht(e,t,n,r,i){ce.call(this),this.lensFlares=[],this.positionScreen=new c,this.customUpdateCallback=void 0,void 0!==e&&this.add(e,t,n,r,i)}function ft(e){Q.call(this),this.type="SpriteMaterial",this.color=new X(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(e)}function dt(e){ce.call(this),this.type="Sprite",this.material=void 0!==e?e:new ft}function mt(){ce.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function vt(e,t,n,i,o,a,s,u,c,l,p,h){r.call(this,null,a,s,u,c,l,i,o,p,h),this.image={data:e,width:t,height:n},this.magFilter=void 0!==c?c:Co,this.minFilter=void 0!==l?l:Co,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function yt(e,t,n){if(this.useVertexTexture=void 0===n||n,this.identityMatrix=new l,e=e||[],this.bones=e.slice(0),this.useVertexTexture){var r=Math.sqrt(4*this.bones.length);r=Oa.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 vt(this.boneMatrices,this.boneTextureWidth,this.boneTextureHeight,Qo,Go)}else this.boneMatrices=new Float32Array(16*this.bones.length);if(void 0===t)this.calculateInverses();else if(this.bones.length===t.length)this.boneInverses=t.slice(0);else{console.warn("THREE.Skeleton bonInverses is the wrong length."),this.boneInverses=[];for(var i=0,o=this.bones.length;i<o;i++)this.boneInverses.push(new l)}}function gt(e){ce.call(this),this.type="Bone",this.skin=e}function _t(e,t,n){Re.call(this,e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new l,this.bindMatrixInverse=new l;var r=[];if(this.geometry&&void 0!==this.geometry.bones){for(var i,o,a=0,s=this.geometry.bones.length;a<s;++a)o=this.geometry.bones[a],i=new gt(this),r.push(i),i.name=o.name,i.position.fromArray(o.pos),i.quaternion.fromArray(o.rotq),void 0!==o.scl&&i.scale.fromArray(o.scl);for(var a=0,s=this.geometry.bones.length;a<s;++a)o=this.geometry.bones[a],o.parent!==-1&&null!==o.parent&&void 0!==r[o.parent]?r[o.parent].add(r[a]):this.add(r[a])}this.normalizeSkinWeights(),this.updateMatrixWorld(!0),this.bind(new yt(r,void 0,n),this.matrixWorld)}function bt(e){Q.call(this),this.type="LineBasicMaterial",this.color=new X(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(e)}function wt(e,t,n){if(1===n)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new xt(e,t);ce.call(this),this.type="Line",this.geometry=void 0!==e?e:new Ce,this.material=void 0!==t?t:new bt({color:16777215*Math.random()})}function xt(e,t){wt.call(this,e,t),this.type="LineSegments"}function Mt(e){Q.call(this),this.type="PointsMaterial",this.color=new X(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=!1,this.setValues(e)}function Et(e,t){ce.call(this),this.type="Points",this.geometry=void 0!==e?e:new Ce,this.material=void 0!==t?t:new Mt({color:16777215*Math.random()})}function Ot(){ce.call(this),this.type="Group"}function Pt(e,t,n,i,o,a,s,u,c){function l(){requestAnimationFrame(l),e.readyState>=e.HAVE_CURRENT_DATA&&(p.needsUpdate=!0)}r.call(this,e,t,n,i,o,a,s,u,c),this.generateMipmaps=!1;var p=this;l()}function Tt(e,t,n,i,o,a,s,u,c,l,p,h){r.call(this,null,a,s,u,c,l,i,o,p,h),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}function St(e,t,n,i,o,a,s,u,c){r.call(this,e,t,n,i,o,a,s,u,c),this.needsUpdate=!0}function Ct(e,t,n,i,o,a,s,u,c,l){if((l=void 0!==l?l:ea)!==ea&&l!==ta)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");r.call(this,null,i,o,a,s,u,l,n,c),this.image={width:e,height:t},this.type=void 0!==n?n:Fo,this.magFilter=void 0!==s?s:Co,this.minFilter=void 0!==u?u:Co,this.flipY=!1,this.generateMipmaps=!1}function Rt(e){function t(e,t){return e-t}Ce.call(this);var n=[0,0],r={},i=["a","b","c"];if(e&&e.isGeometry){for(var o=e.vertices,a=e.faces,s=0,u=new Uint32Array(6*a.length),c=0,l=a.length;c<l;c++)for(var p=a[c],h=0;h<3;h++){n[0]=p[i[h]],n[1]=p[i[(h+1)%3]],n.sort(t);var f=n.toString();void 0===r[f]&&(u[2*s]=n[0],u[2*s+1]=n[1],r[f]=!0,s++)}for(var d=new Float32Array(2*s*3),c=0,l=s;c<l;c++)for(var h=0;h<2;h++){var m=o[u[2*c+h]],v=6*c+3*h;d[v+0]=m.x,d[v+1]=m.y,d[v+2]=m.z}this.addAttribute("position",new me(d,3))}else if(e&&e.isBufferGeometry)if(null!==e.index){var y=e.index.array,o=e.attributes.position,g=e.groups,s=0;0===g.length&&e.addGroup(0,y.length);for(var u=new Uint32Array(2*y.length),_=0,b=g.length;_<b;++_)for(var w=g[_],x=w.start,M=w.count,c=x,E=x+M;c<E;c+=3)for(var h=0;h<3;h++){n[0]=y[c+h],n[1]=y[c+(h+1)%3],n.sort(t);var f=n.toString();void 0===r[f]&&(u[2*s]=n[0],u[2*s+1]=n[1],r[f]=!0,s++)}for(var d=new Float32Array(2*s*3),c=0,l=s;c<l;c++)for(var h=0;h<2;h++){var v=6*c+3*h,O=u[2*c+h];d[v+0]=o.getX(O),d[v+1]=o.getY(O),d[v+2]=o.getZ(O)}this.addAttribute("position",new me(d,3))}else{for(var o=e.attributes.position.array,s=o.length/3,P=s/3,d=new Float32Array(2*s*3),c=0,l=P;c<l;c++)for(var h=0;h<3;h++){var v=18*c+6*h,T=9*c+3*h;d[v+0]=o[T],d[v+1]=o[T+1],d[v+2]=o[T+2];var O=9*c+(h+1)%3*3;d[v+3]=o[O],d[v+4]=o[O+1],d[v+5]=o[O+2]}this.addAttribute("position",new me(d,3))}}function At(e,t,n){Ce.call(this),this.type="ParametricBufferGeometry",this.parameters={func:e,slices:t,stacks:n};var r,i,o,a,s,u=[],c=[],l=t+1;for(r=0;r<=n;r++)for(s=r/n,i=0;i<=t;i++)a=i/t,o=e(a,s),u.push(o.x,o.y,o.z),c.push(a,s);var p,h,f,d,m=[];for(r=0;r<n;r++)for(i=0;i<t;i++)p=r*l+i,h=r*l+i+1,f=(r+1)*l+i+1,d=(r+1)*l+i,m.push(p,h,d),m.push(h,f,d);this.setIndex((m.length>65535?xe:be)(m,1)),this.addAttribute("position",Me(u,3)),this.addAttribute("uv",Me(c,2)),this.computeVertexNormals()}function jt(e,t,n){Pe.call(this),this.type="ParametricGeometry",this.parameters={func:e,slices:t,stacks:n},this.fromBufferGeometry(new At(e,t,n)),this.mergeVertices()}function Lt(e,t,r,i){function o(e,t,n,r){var i,o,a=Math.pow(2,r),u=[];for(i=0;i<=a;i++){u[i]=[];var c=e.clone().lerp(n,i/a),l=t.clone().lerp(n,i/a),p=a-i;for(o=0;o<=p;o++)u[i][o]=0===o&&i===a?c:c.clone().lerp(l,o/p)}for(i=0;i<a;i++)for(o=0;o<2*(a-i)-1;o++){var h=Math.floor(o/2);o%2==0?(s(u[i][h+1]),s(u[i+1][h]),s(u[i][h])):(s(u[i][h+1]),s(u[i+1][h+1]),s(u[i+1][h]))}}function a(){for(var e=0;e<m.length;e+=6){var t=m[e+0],n=m[e+2],r=m[e+4],i=Math.max(t,n,r),o=Math.min(t,n,r);i>.9&&o<.1&&(t<.2&&(m[e+0]+=1),n<.2&&(m[e+2]+=1),r<.2&&(m[e+4]+=1))}}function s(e){d.push(e.x,e.y,e.z)}function u(t,n){var r=3*t;n.x=e[r+0],n.y=e[r+1],n.z=e[r+2]}function l(){for(var e=new c,t=new c,r=new c,i=new c,o=new n,a=new n,s=new n,u=0,l=0;u<d.length;u+=9,l+=6){e.set(d[u+0],d[u+1],d[u+2]),t.set(d[u+3],d[u+4],d[u+5]),r.set(d[u+6],d[u+7],d[u+8]),o.set(m[l+0],m[l+1]),a.set(m[l+2],m[l+3]),s.set(m[l+4],m[l+5]),i.copy(e).add(t).add(r).divideScalar(3);var f=h(i);p(o,l+0,e,f),p(a,l+2,t,f),p(s,l+4,r,f)}}function p(e,t,n,r){r<0&&1===e.x&&(m[t]=e.x-1),0===n.x&&0===n.z&&(m[t]=r/2/Math.PI+.5)}function h(e){return Math.atan2(e.z,-e.x)}function f(e){return Math.atan2(-e.y,Math.sqrt(e.x*e.x+e.z*e.z))}Ce.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:e,indices:t,radius:r,detail:i},r=r||1,i=i||0;var d=[],m=[];!function(e){for(var n=new c,r=new c,i=new c,a=0;a<t.length;a+=3)u(t[a+0],n),u(t[a+1],r),u(t[a+2],i),o(n,r,i,e)}(i),function(e){for(var t=new c,n=0;n<d.length;n+=3)t.x=d[n+0],t.y=d[n+1],t.z=d[n+2],t.normalize().multiplyScalar(e),d[n+0]=t.x,d[n+1]=t.y,d[n+2]=t.z}(r),function(){for(var e=new c,t=0;t<d.length;t+=3){e.x=d[t+0],e.y=d[t+1],e.z=d[t+2];var n=h(e)/2/Math.PI+.5,r=f(e)/Math.PI+.5;m.push(n,1-r)}l(),a()}(),this.addAttribute("position",Me(d,3)),this.addAttribute("normal",Me(d.slice(),3)),this.addAttribute("uv",Me(m,2)),this.normalizeNormals(),this.boundingSphere=new te(new c,r)}function Dt(e,t){var n=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],r=[2,1,0,0,3,2,1,3,0,2,3,1];Lt.call(this,n,r,e,t),this.type="TetrahedronBufferGeometry",this.parameters={radius:e,detail:t}}function It(e,t){Pe.call(this),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Dt(e,t)),this.mergeVertices()}function kt(e,t){var n=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],r=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];Lt.call(this,n,r,e,t),this.type="OctahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Nt(e,t){Pe.call(this),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new kt(e,t)),this.mergeVertices()}function Ut(e,t){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],i=[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];Lt.call(this,r,i,e,t),this.type="IcosahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Ft(e,t){Pe.call(this),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Ut(e,t)),this.mergeVertices()}function Bt(e,t){var n=(1+Math.sqrt(5))/2,r=1/n,i=[-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,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r],o=[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];Lt.call(this,i,o,e,t),this.type="DodecahedronBufferGeometry",this.parameters={radius:e,detail:t}}function zt(e,t){Pe.call(this),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Bt(e,t)),this.mergeVertices()}function Gt(e,t,n,r){Pe.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r},this.fromBufferGeometry(new Lt(e,t,n,r)),this.mergeVertices()}function Ht(e,t,r,i,o){function a(n){var o=e.getPointAt(n/t),a=l.normals[n],s=l.binormals[n];for(h=0;h<=i;h++){var u=h/i*Math.PI*2,c=Math.sin(u),p=-Math.cos(u);d.x=p*a.x+c*s.x,d.y=p*a.y+c*s.y,d.z=p*a.z+c*s.z,d.normalize(),y.push(d.x,d.y,d.z),f.x=o.x+r*d.x,f.y=o.y+r*d.y,f.z=o.z+r*d.z,v.push(f.x,f.y,f.z)}}function s(){for(h=1;h<=t;h++)for(p=1;p<=i;p++){var e=(i+1)*(h-1)+(p-1),n=(i+1)*h+(p-1),r=(i+1)*h+p,o=(i+1)*(h-1)+p;_.push(e,n,o),_.push(n,r,o)}}function u(){for(p=0;p<=t;p++)for(h=0;h<=i;h++)m.x=p/t,m.y=h/i,g.push(m.x,m.y)}Ce.call(this),this.type="TubeBufferGeometry",this.parameters={path:e,tubularSegments:t,radius:r,radialSegments:i,closed:o},t=t||64,r=r||1,i=i||8,o=o||!1;var l=e.computeFrenetFrames(t,o);this.tangents=l.tangents,this.normals=l.normals,this.binormals=l.binormals;var p,h,f=new c,d=new c,m=new n,v=[],y=[],g=[],_=[];!function(){for(p=0;p<t;p++)a(p);a(o===!1?t:0),u(),s()}(),this.setIndex((_.length>65535?xe:be)(_,1)),this.addAttribute("position",Me(v,3)),this.addAttribute("normal",Me(y,3)),this.addAttribute("uv",Me(g,2))}function Vt(e,t,n,r,i,o){Pe.call(this),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed.");var a=new Ht(e,t,n,r,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals,this.fromBufferGeometry(a),this.mergeVertices()}function Wt(e,t,r,i,o,a){function s(e,t,n,r,i){var o=Math.cos(e),a=Math.sin(e),s=n/t*e,u=Math.cos(s);i.x=r*(2+u)*.5*o,i.y=r*(2+u)*a*.5,i.z=r*Math.sin(s)*.5}Ce.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:e,tube:t,tubularSegments:r,radialSegments:i,p:o,q:a},e=e||100,t=t||40,r=Math.floor(r)||64,i=Math.floor(i)||8,o=o||2,a=a||3;var u,l,p=(i+1)*(r+1),h=i*r*2*3,f=new me(new(h>65535?Uint32Array:Uint16Array)(h),1),d=new me(new Float32Array(3*p),3),m=new me(new Float32Array(3*p),3),v=new me(new Float32Array(2*p),2),y=0,g=0,_=new c,b=new c,w=new n,x=new c,M=new c,E=new c,O=new c,P=new c;for(u=0;u<=r;++u){var T=u/r*o*Math.PI*2;for(s(T,o,a,e,x),s(T+.01,o,a,e,M),O.subVectors(M,x),P.addVectors(M,x),E.crossVectors(O,P),P.crossVectors(E,O),E.normalize(),P.normalize(),l=0;l<=i;++l){var S=l/i*Math.PI*2,C=-t*Math.cos(S),R=t*Math.sin(S);_.x=x.x+(C*P.x+R*E.x),_.y=x.y+(C*P.y+R*E.y),_.z=x.z+(C*P.z+R*E.z),d.setXYZ(y,_.x,_.y,_.z),b.subVectors(_,x).normalize(),m.setXYZ(y,b.x,b.y,b.z),w.x=u/r,w.y=l/i,v.setXY(y,w.x,w.y),y++}}for(l=1;l<=r;l++)for(u=1;u<=i;u++){var A=(i+1)*(l-1)+(u-1),j=(i+1)*l+(u-1),L=(i+1)*l+u,D=(i+1)*(l-1)+u;f.setX(g,A),g++,f.setX(g,j),g++,f.setX(g,D),g++,f.setX(g,j),g++,f.setX(g,L),g++,f.setX(g,D),g++}this.setIndex(f),this.addAttribute("position",d),this.addAttribute("normal",m),this.addAttribute("uv",v)}function Xt(e,t,n,r,i,o,a){Pe.call(this),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:r,p:i,q:o},void 0!==a&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new Wt(e,t,n,r,i,o)),this.mergeVertices()}function qt(e,t,n,r,i){Ce.call(this),this.type="TorusBufferGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:r,arc:i},e=e||100,t=t||40,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;var o,a,s=(n+1)*(r+1),u=n*r*2*3,l=new(u>65535?Uint32Array:Uint16Array)(u),p=new Float32Array(3*s),h=new Float32Array(3*s),f=new Float32Array(2*s),d=0,m=0,v=0,y=new c,g=new c,_=new c;for(o=0;o<=n;o++)for(a=0;a<=r;a++){var b=a/r*i,w=o/n*Math.PI*2;g.x=(e+t*Math.cos(w))*Math.cos(b),g.y=(e+t*Math.cos(w))*Math.sin(b),g.z=t*Math.sin(w),p[d]=g.x,p[d+1]=g.y,p[d+2]=g.z,y.x=e*Math.cos(b),y.y=e*Math.sin(b),_.subVectors(g,y).normalize(),h[d]=_.x,h[d+1]=_.y,h[d+2]=_.z,f[m]=a/r,f[m+1]=o/n,d+=3,m+=2}for(o=1;o<=n;o++)for(a=1;a<=r;a++){var x=(r+1)*o+a-1,M=(r+1)*(o-1)+a-1,E=(r+1)*(o-1)+a,O=(r+1)*o+a;l[v]=x,l[v+1]=M,l[v+2]=O,l[v+3]=M,l[v+4]=E,l[v+5]=O,v+=6}this.setIndex(new me(l,1)),this.addAttribute("position",new me(p,3)),this.addAttribute("normal",new me(h,3)),this.addAttribute("uv",new me(f,2))}function Yt(e,t,n,r,i){Pe.call(this),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new qt(e,t,n,r,i))}function Zt(e,t){if(void 0===e)return void(e=[]);Pe.call(this),this.type="ExtrudeGeometry",e=Array.isArray(e)?e:[e],this.addShapeList(e,t),this.computeFaceNormals()}function Qt(e,t){t=t||{};var n=t.font;if((n&&n.isFont)===!1)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Pe;var r=n.generateShapes(e,t.size,t.curveSegments);t.amount=void 0!==t.height?t.height:50,void 0===t.bevelThickness&&(t.bevelThickness=10),void 0===t.bevelSize&&(t.bevelSize=8),void 0===t.bevelEnabled&&(t.bevelEnabled=!1),Zt.call(this,r,t),this.type="TextGeometry"}function Jt(e,t,n,r,i,o,a){Ce.call(this),this.type="SphereBufferGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},e=e||50,t=Math.max(3,Math.floor(t)||8),n=Math.max(2,Math.floor(n)||6),r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI,o=void 0!==o?o:0,a=void 0!==a?a:Math.PI;for(var s=o+a,u=(t+1)*(n+1),l=new me(new Float32Array(3*u),3),p=new me(new Float32Array(3*u),3),h=new me(new Float32Array(2*u),2),f=0,d=[],m=new c,v=0;v<=n;v++){for(var y=[],g=v/n,_=0;_<=t;_++){var b=_/t,w=-e*Math.cos(r+b*i)*Math.sin(o+g*a),x=e*Math.cos(o+g*a),M=e*Math.sin(r+b*i)*Math.sin(o+g*a);m.set(w,x,M).normalize(),l.setXYZ(f,w,x,M),p.setXYZ(f,m.x,m.y,m.z),h.setXY(f,b,1-g),y.push(f),f++}d.push(y)}for(var E=[],v=0;v<n;v++)for(var _=0;_<t;_++){var O=d[v][_+1],P=d[v][_],T=d[v+1][_],S=d[v+1][_+1];(0!==v||o>0)&&E.push(O,P,S),(v!==n-1||s<Math.PI)&&E.push(P,T,S)}this.setIndex(new(l.count>65535?xe:be)(E,1)),this.addAttribute("position",l),this.addAttribute("normal",p),this.addAttribute("uv",h),this.boundingSphere=new te(new c,e)}function Kt(e,t,n,r,i,o,a){Pe.call(this),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new Jt(e,t,n,r,i,o,a))}function $t(e,t,r,i,o,a){Ce.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:r,phiSegments:i,thetaStart:o,thetaLength:a},e=e||20,t=t||50,o=void 0!==o?o:0,a=void 0!==a?a:2*Math.PI,r=void 0!==r?Math.max(3,r):8,i=void 0!==i?Math.max(1,i):1;var s,u,l,p=(r+1)*(i+1),h=r*i*2*3,f=new me(new(h>65535?Uint32Array:Uint16Array)(h),1),d=new me(new Float32Array(3*p),3),m=new me(new Float32Array(3*p),3),v=new me(new Float32Array(2*p),2),y=0,g=0,_=e,b=(t-e)/i,w=new c,x=new n;for(u=0;u<=i;u++){for(l=0;l<=r;l++)s=o+l/r*a,w.x=_*Math.cos(s),w.y=_*Math.sin(s),d.setXYZ(y,w.x,w.y,w.z),m.setXYZ(y,0,0,1),x.x=(w.x/t+1)/2,x.y=(w.y/t+1)/2,v.setXY(y,x.x,x.y),y++;_+=b}for(u=0;u<i;u++){var M=u*(r+1);for(l=0;l<r;l++){s=l+M;var E=s,O=s+r+1,P=s+r+2,T=s+1;f.setX(g,E),g++,f.setX(g,O),g++,f.setX(g,P),g++,f.setX(g,E),g++,f.setX(g,P),g++,f.setX(g,T),g++}}this.setIndex(f),this.addAttribute("position",d),this.addAttribute("normal",m),this.addAttribute("uv",v)}function en(e,t,n,r,i,o){Pe.call(this),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},this.fromBufferGeometry(new $t(e,t,n,r,i,o))}function tn(e,t,n,r){Pe.call(this),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new je(e,t,n,r))}function nn(e,t,r,i){Ce.call(this),this.type="LatheBufferGeometry",this.parameters={points:e,segments:t,phiStart:r,phiLength:i},t=Math.floor(t)||12,r=r||0,i=i||2*Math.PI,i=Oa.clamp(i,0,2*Math.PI);var o,a,s,u=(t+1)*e.length,l=t*e.length*2*3,p=new me(new(l>65535?Uint32Array:Uint16Array)(l),1),h=new me(new Float32Array(3*u),3),f=new me(new Float32Array(2*u),2),d=0,m=0,v=1/t,y=new c,g=new n;for(a=0;a<=t;a++){var _=r+a*v*i,b=Math.sin(_),w=Math.cos(_);for(s=0;s<=e.length-1;s++)y.x=e[s].x*b,y.y=e[s].y,y.z=e[s].x*w,h.setXYZ(d,y.x,y.y,y.z),g.x=a/t,g.y=s/(e.length-1),f.setXY(d,g.x,g.y),d++}for(a=0;a<t;a++)for(s=0;s<e.length-1;s++){o=s+a*e.length;var x=o,M=o+e.length,E=o+e.length+1,O=o+1;p.setX(m,x),m++,p.setX(m,M),m++,p.setX(m,O),m++,p.setX(m,M),m++,p.setX(m,E),m++,p.setX(m,O),m++}if(this.setIndex(p),this.addAttribute("position",h),this.addAttribute("uv",f),this.computeVertexNormals(),i===2*Math.PI){var P=this.attributes.normal.array,T=new c,S=new c,C=new c;for(o=t*e.length*3,a=0,s=0;a<e.length;a++,s+=3)T.x=P[s+0],T.y=P[s+1],T.z=P[s+2],S.x=P[o+s+0],S.y=P[o+s+1],S.z=P[o+s+2],C.addVectors(T,S).normalize(),P[s+0]=P[o+s+0]=C.x,P[s+1]=P[o+s+1]=C.y,P[s+2]=P[o+s+2]=C.z}}function rn(e,t,n,r){Pe.call(this),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},this.fromBufferGeometry(new nn(e,t,n,r)),this.mergeVertices()}function on(e,t){Pe.call(this),this.type="ShapeGeometry",Array.isArray(e)===!1&&(e=[e]),this.addShapeList(e,t),this.computeFaceNormals()}function an(e,t){function n(e,t){return e-t}Ce.call(this),t=void 0!==t?t:1;var r,i=Math.cos(Oa.DEG2RAD*t),o=[0,0],a={},s=["a","b","c"];e&&e.isBufferGeometry?(r=new Pe,r.fromBufferGeometry(e)):r=e.clone(),r.mergeVertices(),r.computeFaceNormals();for(var u=r.vertices,c=r.faces,l=0,p=c.length;l<p;l++)for(var h=c[l],f=0;f<3;f++){o[0]=h[s[f]],o[1]=h[s[(f+1)%3]],o.sort(n);var d=o.toString();void 0===a[d]?a[d]={vert1:o[0],vert2:o[1],face1:l,face2:void 0}:a[d].face2=l}var m=[];for(var d in a){var v=a[d];if(void 0===v.face2||c[v.face1].normal.dot(c[v.face2].normal)<=i){var y=u[v.vert1];m.push(y.x),m.push(y.y),m.push(y.z),y=u[v.vert2],m.push(y.x),m.push(y.y),m.push(y.z)}}this.addAttribute("position",new me(new Float32Array(m),3))}function sn(e,t,r,i,o,a,s,u){function l(r){var o,a,l,h=new n,f=new c,d=0,w=r===!0?e:t,E=r===!0?1:-1;for(a=_,o=1;o<=i;o++)v.setXYZ(_,0,x*E,0),y.setXYZ(_,0,E,0),h.x=.5,h.y=.5,g.setXY(_,h.x,h.y),_++;for(l=_,o=0;o<=i;o++){var O=o/i,P=O*u+s,T=Math.cos(P),S=Math.sin(P);f.x=w*S,f.y=x*E,f.z=w*T,v.setXYZ(_,f.x,f.y,f.z),y.setXYZ(_,0,E,0),h.x=.5*T+.5,h.y=.5*S*E+.5,g.setXY(_,h.x,h.y),_++}for(o=0;o<i;o++){var C=a+o,R=l+o;r===!0?(m.setX(b,R),b++,m.setX(b,R+1),b++,m.setX(b,C),b++):(m.setX(b,R+1),b++,m.setX(b,R),b++,m.setX(b,C),b++),d+=3}p.addGroup(M,d,r===!0?1:2),M+=d}Ce.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:r,radialSegments:i,heightSegments:o,openEnded:a,thetaStart:s,thetaLength:u};var p=this;e=void 0!==e?e:20,t=void 0!==t?t:20,r=void 0!==r?r:100,i=Math.floor(i)||8,o=Math.floor(o)||1,a=void 0!==a&&a,s=void 0!==s?s:0,u=void 0!==u?u:2*Math.PI;var h=0;a===!1&&(e>0&&h++,t>0&&h++);var f=function(){var e=(i+1)*(o+1);return a===!1&&(e+=(i+1)*h+i*h),e}(),d=function(){var e=i*o*2*3;return a===!1&&(e+=i*h*3),e}(),m=new me(new(d>65535?Uint32Array:Uint16Array)(d),1),v=new me(new Float32Array(3*f),3),y=new me(new Float32Array(3*f),3),g=new me(new Float32Array(2*f),2),_=0,b=0,w=[],x=r/2,M=0;!function(){var n,a,l=new c,h=new c,f=0,d=(t-e)/r;for(a=0;a<=o;a++){var E=[],O=a/o,P=O*(t-e)+e;for(n=0;n<=i;n++){var T=n/i,S=T*u+s,C=Math.sin(S),R=Math.cos(S);h.x=P*C,h.y=-O*r+x,h.z=P*R,v.setXYZ(_,h.x,h.y,h.z),l.set(C,d,R).normalize(),y.setXYZ(_,l.x,l.y,l.z),g.setXY(_,T,1-O),E.push(_),_++}w.push(E)}for(n=0;n<i;n++)for(a=0;a<o;a++){var A=w[a][n],j=w[a+1][n],L=w[a+1][n+1],D=w[a][n+1];m.setX(b,A),b++,m.setX(b,j),b++,m.setX(b,D),b++,m.setX(b,j),b++,m.setX(b,L),b++,m.setX(b,D),b++,f+=6}p.addGroup(M,f,0),M+=f}(),a===!1&&(e>0&&l(!0),t>0&&l(!1)),this.setIndex(m),this.addAttribute("position",v),this.addAttribute("normal",y),this.addAttribute("uv",g)}function un(e,t,n,r,i,o,a,s){Pe.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new sn(e,t,n,r,i,o,a,s)),this.mergeVertices()}function cn(e,t,n,r,i,o,a){un.call(this,0,e,t,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function ln(e,t,n,r,i,o,a){sn.call(this,0,e,t,n,r,i,o,a),this.type="ConeBufferGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function pn(e,t,n,r){Ce.call(this),this.type="CircleBufferGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},e=e||50,t=void 0!==t?Math.max(3,t):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var i=t+2,o=new Float32Array(3*i),a=new Float32Array(3*i),s=new Float32Array(2*i);a[2]=1,s[0]=.5,s[1]=.5;for(var u=0,l=3,p=2;u<=t;u++,l+=3,p+=2){var h=n+u/t*r;o[l]=e*Math.cos(h),o[l+1]=e*Math.sin(h),a[l+2]=1,s[p]=(o[l]/e+1)/2,s[p+1]=(o[l+1]/e+1)/2}for(var f=[],l=1;l<=t;l++)f.push(l,l+1,0);this.setIndex(new me(new Uint16Array(f),1)),this.addAttribute("position",new me(o,3)),this.addAttribute("normal",new me(a,3)),this.addAttribute("uv",new me(s,2)),this.boundingSphere=new te(new c,e)}function hn(e,t,n,r){Pe.call(this),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new pn(e,t,n,r))}function fn(e,t,n,r,i,o){Pe.call(this),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:o},this.fromBufferGeometry(new Ae(e,t,n,r,i,o)),this.mergeVertices()}function dn(){K.call(this,{uniforms:ja.merge([Ia.lights,{opacity:{value:1}}]),vertexShader:La.shadow_vert,fragmentShader:La.shadow_frag}),this.lights=!0,this.transparent=!0,Object.defineProperties(this,{opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.opacity.value=e}}})}function mn(e){K.call(this,e),this.type="RawShaderMaterial"}function vn(e){this.uuid=Oa.generateUUID(),this.type="MultiMaterial",this.materials=e instanceof Array?e:[],this.visible=!0}function yn(e){Q.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new X(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 X(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new n(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(e)}function gn(e){yn.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(e)}function _n(e){Q.call(this),this.type="MeshPhongMaterial",this.color=new X(16777215),this.specular=new X(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new X(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new n(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=uo,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(e)}function bn(e){Q.call(this,e),this.type="MeshNormalMaterial",this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.morphTargets=!1,this.setValues(e)}function wn(e){Q.call(this),this.type="MeshLambertMaterial",this.color=new X(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new X(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=uo,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(e)}function xn(e){Q.call(this),this.type="LineDashedMaterial",this.color=new X(16777215),this.linewidth=1,this.scale=1,this.dashSize=3,this.gapSize=1,this.lights=!1,this.setValues(e)}function Mn(e,t,n){var r=this,i=!1,o=0,a=0;this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){a++,i===!1&&void 0!==r.onStart&&r.onStart(e,o,a),i=!0},this.itemEnd=function(e){o++,void 0!==r.onProgress&&r.onProgress(e,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)}}function En(e){this.manager=void 0!==e?e:Wa}function On(e){this.manager=void 0!==e?e:Wa,this._parser=null}function Pn(e){this.manager=void 0!==e?e:Wa,this._parser=null}function Tn(e){this.manager=void 0!==e?e:Wa}function Sn(e){this.manager=void 0!==e?e:Wa}function Cn(e){this.manager=void 0!==e?e:Wa}function Rn(e,t){ce.call(this),this.type="Light",this.color=new X(e),this.intensity=void 0!==t?t:1,this.receiveShadow=void 0}function An(e,t,n){Rn.call(this,e,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(ce.DefaultUp),this.updateMatrix(),this.groundColor=new X(t)}function jn(e){this.camera=e,this.bias=0,this.radius=1,this.mapSize=new n(512,512),this.map=null,this.matrix=new l}function Ln(){jn.call(this,new De(50,1,.5,500))}function Dn(e,t,n,r,i,o){Rn.call(this,e,t),this.type="SpotLight",this.position.copy(ce.DefaultUp),this.updateMatrix(),this.target=new ce,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(e){this.intensity=e/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new Ln}function In(e,t,n,r){Rn.call(this,e,t),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(e){this.intensity=e/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new jn(new De(90,1,.5,500))}function kn(e){jn.call(this,new Ie(-5,5,5,-5,.5,500))}function Nn(e,t){Rn.call(this,e,t),this.type="DirectionalLight",this.position.copy(ce.DefaultUp),this.updateMatrix(),this.target=new ce,this.shadow=new kn}function Un(e,t){Rn.call(this,e,t),this.type="AmbientLight",this.castShadow=void 0}function Fn(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new t.constructor(n),this.sampleValues=t,this.valueSize=n}function Bn(e,t,n,r){Fn.call(this,e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function zn(e,t,n,r){Fn.call(this,e,t,n,r)}function Gn(e,t,n,r){Fn.call(this,e,t,n,r)}function Hn(e,t,n,r){if(void 0===e)throw new Error("track name is undefined");if(void 0===t||0===t.length)throw new Error("no keyframes in track named "+e);this.name=e,this.times=qa.convertArray(t,this.TimeBufferType),this.values=qa.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation),this.validate(),this.optimize()}function Vn(e,t,n,r){Hn.call(this,e,t,n,r)}function Wn(e,t,n,r){Fn.call(this,e,t,n,r)}function Xn(e,t,n,r){Hn.call(this,e,t,n,r)}function qn(e,t,n,r){Hn.call(this,e,t,n,r)}function Yn(e,t,n,r){Hn.call(this,e,t,n,r)}function Zn(e,t,n){Hn.call(this,e,t,n)}function Qn(e,t,n,r){Hn.call(this,e,t,n,r)}function Jn(e,t,n,r){Hn.apply(this,arguments)}function Kn(e,t,n){this.name=e,this.tracks=n,this.duration=void 0!==t?t:-1,this.uuid=Oa.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function $n(e){this.manager=void 0!==e?e:Wa,this.textures={}}function er(e){this.manager=void 0!==e?e:Wa}function tr(){this.onLoadStart=function(){},this.onLoadProgress=function(){},this.onLoadComplete=function(){}}function nr(e){"boolean"==typeof e&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),e=void 0),this.manager=void 0!==e?e:Wa,this.withCredentials=!1}function rr(e){this.manager=void 0!==e?e:Wa,this.texturePath=""}function ir(){}function or(e,t){this.v1=e,this.v2=t}function ar(){this.curves=[],this.autoClose=!1}function sr(e,t,n,r,i,o,a,s){this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=o,this.aClockwise=a,this.aRotation=s||0}function ur(e){this.points=void 0===e?[]:e}function cr(e,t,n,r){this.v0=e,this.v1=t,this.v2=n,this.v3=r}function lr(e,t,n){this.v0=e,this.v1=t,this.v2=n}function pr(){hr.apply(this,arguments),this.holes=[]}function hr(e){ar.call(this),this.currentPoint=new n,e&&this.fromPoints(e)}function fr(){this.subPaths=[],this.currentPath=null}function dr(e){this.data=e}function mr(e){this.manager=void 0!==e?e:Wa}function vr(){return void 0===Ja&&(Ja=new(window.AudioContext||window.webkitAudioContext)),Ja}function yr(e){this.manager=void 0!==e?e:Wa}function gr(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new De,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new De,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function _r(e,t,n){ce.call(this),this.type="CubeCamera";var r=new De(90,1,e,t);r.up.set(0,-1,0),r.lookAt(new c(1,0,0)),this.add(r);var i=new De(90,1,e,t);i.up.set(0,-1,0),i.lookAt(new c(-1,0,0)),this.add(i);var o=new De(90,1,e,t);o.up.set(0,0,1),o.lookAt(new c(0,1,0)),this.add(o);var a=new De(90,1,e,t);a.up.set(0,0,-1),a.lookAt(new c(0,-1,0)),this.add(a);var u=new De(90,1,e,t);u.up.set(0,-1,0),u.lookAt(new c(0,0,1)),this.add(u);var l=new De(90,1,e,t);l.up.set(0,-1,0),l.lookAt(new c(0,0,-1)),this.add(l);var p={format:Zo,magFilter:jo,minFilter:jo};this.renderTarget=new s(n,n,p),this.updateCubeMap=function(e,t){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,s=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,n.activeCubeFace=0,e.render(t,r,n),n.activeCubeFace=1,e.render(t,i,n),n.activeCubeFace=2,e.render(t,o,n),n.activeCubeFace=3,e.render(t,a,n),n.activeCubeFace=4,e.render(t,u,n),n.texture.generateMipmaps=s,n.activeCubeFace=5,e.render(t,l,n),e.setRenderTarget(null)}}function br(){ce.call(this),this.type="AudioListener",this.context=vr(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function wr(e){ce.call(this),this.type="Audio",this.context=e.context,this.source=this.context.createBufferSource(),this.source.onended=this.onEnded.bind(this),this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.startTime=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function xr(e){wr.call(this,e),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function Mr(e,t){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=void 0!==t?t:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}function Er(e,t,n){this.binding=e,this.valueSize=n;var r,i=Float64Array;switch(t){case"quaternion":r=this._slerp;break;case"string":case"bool":i=Array,r=this._select;break;default:r=this._lerp}this.buffer=new i(4*n),this._mixBufferRegion=r,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}function Or(e,t,n){this.path=t,this.parsedPath=n||Or.parseTrackName(t),this.node=Or.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e}function Pr(e){this.uuid=Oa.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var n=0,r=arguments.length;n!==r;++n)t[arguments[n].uuid]=n;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var i=this;this.stats={objects:{get total(){return i._objects.length},get inUse(){return this.total-i.nCachedObjects_}},get bindingsPerObject(){return i._bindings.length}}}function Tr(e,t,n){this._mixer=e,this._clip=t,this._localRoot=n||null;for(var r=t.tracks,i=r.length,o=new Array(i),a={endingStart:ha,endingEnd:ha},s=0;s!==i;++s){var u=r[s].createInterpolant(null);o[s]=u,u.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=pa,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 Sr(e){this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Cr(e){"string"==typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e}function Rr(){Ce.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Ar(e,t,n,r){this.uuid=Oa.generateUUID(),this.data=e,this.itemSize=t,this.offset=n,this.normalized=r===!0}function jr(e,t){this.uuid=Oa.generateUUID(),this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Lr(e,t,n){jr.call(this,e,t),this.meshPerAttribute=n||1}function Dr(e,t,n){me.call(this,e,t),this.meshPerAttribute=n||1}function Ir(e,t,n,r){this.ray=new ae(e,t),this.near=n||0,this.far=r||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 kr(e,t){return e.distance-t.distance}function Nr(e,t,n,r){if(e.visible!==!1&&(e.raycast(t,n),r===!0))for(var i=e.children,o=0,a=i.length;o<a;o++)Nr(i[o],t,n,!0)}function Ur(e){this.autoStart=void 0===e||e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}function Fr(e){function t(e,t,n,r,i,o,a){var s=.5*(n-e),u=.5*(r-t);return(2*(t-n)+s+u)*a+(-3*(t-n)-2*s-u)*o+s*i+t}this.points=e;var n,r,i,o,a,s,u,l,p,h=[],f={x:0,y:0,z:0};this.initFromArray=function(e){this.points=[];for(var t=0;t<e.length;t++)this.points[t]={x:e[t][0],y:e[t][1],z:e[t][2]}},this.getPoint=function(e){return n=(this.points.length-1)*e,r=Math.floor(n),i=n-r,h[0]=0===r?r:r-1,h[1]=r,h[2]=r>this.points.length-2?this.points.length-1:r+1,h[3]=r>this.points.length-3?this.points.length-1:r+2,s=this.points[h[0]],u=this.points[h[1]],l=this.points[h[2]],p=this.points[h[3]],o=i*i,a=i*o,f.x=t(s.x,u.x,l.x,p.x,i,o,a),f.y=t(s.y,u.y,l.y,p.y,i,o,a),f.z=t(s.z,u.z,l.z,p.z,i,o,a),f},this.getControlPointsArray=function(){var e,t,n=this.points.length,r=[];for(e=0;e<n;e++)t=this.points[e],r[e]=[t.x,t.y,t.z];return r},this.getLength=function(e){var t,n,r,i,o=0,a=0,s=0,u=new c,l=new c,p=[],h=0;for(p[0]=0,e||(e=100),r=this.points.length*e,u.copy(this.points[0]),t=1;t<r;t++)n=t/r,i=this.getPoint(n),l.copy(i),h+=l.distanceTo(u),u.copy(i),o=(this.points.length-1)*n,(a=Math.floor(o))!==s&&(p[a]=h,s=a);return p[p.length]=h,{chunks:p,total:h}},this.reparametrizeByArcLength=function(e){var t,n,r,i,o,a,s,u,l=[],p=new c,h=this.getLength();for(l.push(p.copy(this.points[0]).clone()),t=1;t<this.points.length;t++){for(a=h.chunks[t]-h.chunks[t-1],s=Math.ceil(e*a/h.total),i=(t-1)/(this.points.length-1),o=t/(this.points.length-1),n=1;n<s-1;n++)r=i+n*(1/s)*(o-i),u=this.getPoint(r),l.push(p.copy(u).clone());l.push(p.copy(this.points[t]).clone())}this.points=l}}function Br(e,t,n){return this.radius=void 0!==e?e:1,this.phi=void 0!==t?t:0,this.theta=void 0!==n?n:0,this}function zr(e,t){Re.call(this,e,t),this.animationsMap={},this.animationsList=[];var n=this.geometry.morphTargets.length,r=n-1,i=n/1;this.createAnimation("__default",0,r,i),this.setAnimationWeight("__default",1)}function Gr(e){ce.call(this),this.material=e,this.render=function(e){}}function Hr(e,t,n,r){this.object=e,this.size=void 0!==t?t:1;var i=void 0!==n?n:16711680,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=3*s.faces.length:s&&s.isBufferGeometry&&(a=s.attributes.normal.count);var u=new Ce,c=new Me(2*a*3,3);u.addAttribute("position",c),xt.call(this,u,new bt({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function Vr(e){ce.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1;for(var t=new Ce,n=[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],r=0,i=1;r<32;r++,i++){var o=r/32*Math.PI*2,a=i/32*Math.PI*2;n.push(Math.cos(o),Math.sin(o),1,Math.cos(a),Math.sin(a),1)}t.addAttribute("position",new Me(n,3));var s=new bt({fog:!1});this.cone=new xt(t,s),this.add(this.cone),this.update()}function Wr(e){this.bones=this.getBoneList(e);for(var t=new Pe,n=0;n<this.bones.length;n++){var r=this.bones[n];r.parent&&r.parent.isBone&&(t.vertices.push(new c),t.vertices.push(new c),t.colors.push(new X(0,0,1)),t.colors.push(new X(0,1,0)))}t.dynamic=!0;var i=new bt({vertexColors:Ri,depthTest:!1,depthWrite:!1,transparent:!0});xt.call(this,t,i),this.root=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Xr(e,t){this.light=e,this.light.updateMatrixWorld();var n=new Jt(t,4,2),r=new de({wireframe:!0,fog:!1});r.color.copy(this.light.color).multiplyScalar(this.light.intensity),Re.call(this,n,r),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1}function qr(e,t){ce.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.colors=[new X,new X];var n=new Kt(t,4,2);n.rotateX(-Math.PI/2);for(var r=0;r<8;r++)n.faces[r].color=this.colors[r<4?0:1];var i=new de({vertexColors:Ci,wireframe:!0});this.lightSphere=new Re(n,i),this.add(this.lightSphere),this.update()}function Yr(e,t,n,r){t=t||1,n=new X(void 0!==n?n:4473924),r=new X(void 0!==r?r:8947848);for(var i=t/2,o=2*e/t,a=[],s=[],u=0,c=0,l=-e;u<=t;u++,l+=o){a.push(-e,0,l,e,0,l),a.push(l,0,-e,l,0,e);var p=u===i?n:r;p.toArray(s,c),c+=3,p.toArray(s,c),c+=3,p.toArray(s,c),c+=3,p.toArray(s,c),c+=3}var h=new Ce;h.addAttribute("position",new Me(a,3)),h.addAttribute("color",new Me(s,3));var f=new bt({vertexColors:Ri});xt.call(this,h,f)}function Zr(e,t,n,r){this.object=e,this.size=void 0!==t?t:1;var i=void 0!==n?n:16776960,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var u=new Ce,c=new Me(2*a*3,3);u.addAttribute("position",c),xt.call(this,u,new bt({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function Qr(e,t){ce.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,void 0===t&&(t=1);var n=new Ce;n.addAttribute("position",new Me([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));var r=new bt({fog:!1});this.add(new wt(n,r)),n=new Ce,n.addAttribute("position",new Me([0,0,0,0,0,1],3)),this.add(new wt(n,r)),this.update()}function Jr(e){function t(e,t,r){n(e,r),n(t,r)}function n(e,t){r.vertices.push(new c),r.colors.push(new X(t)),void 0===o[e]&&(o[e]=[]),o[e].push(r.vertices.length-1)}var r=new Pe,i=new bt({color:16777215,vertexColors:Ci}),o={};t("n1","n2",16755200),t("n2","n4",16755200),t("n4","n3",16755200),t("n3","n1",16755200),t("f1","f2",16755200),t("f2","f4",16755200),t("f4","f3",16755200),t("f3","f1",16755200),t("n1","f1",16755200),t("n2","f2",16755200),t("n3","f3",16755200),t("n4","f4",16755200),t("p","n1",16711680),t("p","n2",16711680),t("p","n3",16711680),t("p","n4",16711680),t("u1","u2",43775),t("u2","u3",43775),t("u3","u1",43775),t("c","t",16777215),t("p","c",3355443),t("cn1","cn2",3355443),t("cn3","cn4",3355443),t("cf1","cf2",3355443),t("cf3","cf4",3355443),xt.call(this,r,i),this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}function Kr(e,t){var n=void 0!==t?t:8947848;this.object=e,this.box=new ee,Re.call(this,new fn(1,1,1),new de({color:n,wireframe:!0}))}function $r(e,t){void 0===t&&(t=16776960);var n=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]),r=new Float32Array(24),i=new Ce;i.setIndex(new me(n,1)),i.addAttribute("position",new me(r,3)),xt.call(this,i,new bt({color:t})),void 0!==e&&this.update(e)}function ei(e,t,n,r,i,o){ce.call(this),void 0===r&&(r=16776960),void 0===n&&(n=1),void 0===i&&(i=.2*n),void 0===o&&(o=.2*i),this.position.copy(t),this.line=new wt(Ka,new bt({color:r})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Re($a,new de({color:r})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,i,o)}function ti(e){e=e||1;var t=new Float32Array([0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e]),n=new Float32Array([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1]),r=new Ce;r.addAttribute("position",new me(t,3)),r.addAttribute("color",new me(n,3));var i=new bt({vertexColors:Ri});xt.call(this,r,i)}function ni(e){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Please use THREE.CatmullRomCurve3."),es.call(this,e),this.type="catmullrom",this.closed=!0}function ri(e,t,n,r,i,o){sr.call(this,e,t,n,n,r,i,o)}function ii(e,t,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new fe(e,t,n,i,o,a)}function oi(e,t){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new Et(e,t)}function ai(e,t){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new Et(e,t)}function si(e){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Mt(e)}function ui(e){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Mt(e)}function ci(e){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Mt(e)}function li(e,t,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new c(e,t,n)}function pi(e,t){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new xt(new an(e.geometry),new bt({color:void 0!==t?t:16777215}))}function hi(e,t){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new xt(new Rt(e.geometry),new bt({color:void 0!==t?t:16777215}))}function fi(){console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js."),this.projectVector=function(e,t){console.warn("THREE.Projector: .projectVector() is now vector.project()."),e.project(t)},this.unprojectVector=function(e,t){console.warn("THREE.Projector: .unprojectVector() is now vector.unproject()."),e.unproject(t)},this.pickingRay=function(e,t){console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")}}function di(){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(e){return e<0?-1:e>0?1:+e}),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(e){if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t}}(),Object.assign(t.prototype,{addEventListener:function(e,t){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[e]&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)},hasEventListener:function(e,t){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[e]&&n[e].indexOf(t)!==-1},removeEventListener:function(e,t){if(void 0!==this._listeners){var n=this._listeners,r=n[e];if(void 0!==r){var i=r.indexOf(t);i!==-1&&r.splice(i,1)}}},dispatchEvent:function(e){if(void 0!==this._listeners){var t=this._listeners,n=t[e.type];if(void 0!==n){e.target=this;var r=[],i=0,o=n.length;for(i=0;i<o;i++)r[i]=n[i];for(i=0;i<o;i++)r[i].call(this,e)}}}});var mi="82",vi={LEFT:0,MIDDLE:1,RIGHT:2},yi=0,gi=1,_i=2,bi=0,wi=1,xi=2,Mi=0,Ei=1,Oi=2,Pi=1,Ti=2,Si=0,Ci=1,Ri=2,Ai=0,ji=1,Li=2,Di=3,Ii=4,ki=5,Ni={NoBlending:Ai,NormalBlending:ji,AdditiveBlending:Li,SubtractiveBlending:Di,MultiplyBlending:Ii,CustomBlending:ki},Ui=100,Fi=101,Bi=102,zi=103,Gi=104,Hi=200,Vi=201,Wi=202,Xi=203,qi=204,Yi=205,Zi=206,Qi=207,Ji=208,Ki=209,$i=210,eo=0,to=1,no=2,ro=3,io=4,oo=5,ao=6,so=7,uo=0,co=1,lo=2,po=0,ho=1,fo=2,mo=3,vo=4,yo=301,go=302,_o=303,bo=304,wo=305,xo=306,Mo=307,Eo={UVMapping:300,CubeReflectionMapping:yo,CubeRefractionMapping:go,EquirectangularReflectionMapping:_o,EquirectangularRefractionMapping:bo,SphericalReflectionMapping:wo,CubeUVReflectionMapping:xo,CubeUVRefractionMapping:Mo},Oo=1e3,Po=1001,To=1002,So={RepeatWrapping:Oo,ClampToEdgeWrapping:Po,MirroredRepeatWrapping:To},Co=1003,Ro=1004,Ao=1005,jo=1006,Lo=1007,Do=1008,Io={NearestFilter:Co,NearestMipMapNearestFilter:Ro,NearestMipMapLinearFilter:Ao,LinearFilter:jo,LinearMipMapNearestFilter:Lo,LinearMipMapLinearFilter:Do},ko=1009,No=1010,Uo=1011,Fo=1012,Bo=1013,zo=1014,Go=1015,Ho=1016,Vo=1017,Wo=1018,Xo=1019,qo=1020,Yo=1021,Zo=1022,Qo=1023,Jo=1024,Ko=1025,$o=Qo,ea=1026,ta=1027,na=2001,ra=2002,ia=2003,oa=2004,aa=2100,sa=2101,ua=2102,ca=2103,la=2151,pa=2201,ha=2400,fa=0,da=1,ma=2,va=3e3,ya=3001,ga=3007,_a=3002,ba=3004,wa=3005,xa=3006,Ma=3200,Ea=3201,Oa={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var e,t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),n=new Array(36),r=0;return function(){for(var i=0;i<36;i++)8===i||13===i||18===i||23===i?n[i]="-":14===i?n[i]="4":(r<=2&&(r=33554432+16777216*Math.random()|0),e=15&r,r>>=4,n[i]=t[19===i?3&e|8:e]);return n.join("")}}(),clamp:function(e,t,n){return Math.max(t,Math.min(n,e))},euclideanModulo:function(e,t){return(e%t+t)%t},mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},lerp:function(e,t,n){return(1-n)*e+n*t},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},random16:function(){return console.warn("THREE.Math.random16() has been deprecated. Use Math.random() instead."),Math.random()},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},degToRad:function(e){return e*Oa.DEG2RAD},radToDeg:function(e){return e*Oa.RAD2DEG},isPowerOfTwo:function(e){return 0==(e&e-1)&&0!==e},nearestPowerOfTwo:function(e){return Math.pow(2,Math.round(Math.log(e)/Math.LN2))},nextPowerOfTwo:function(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e}};n.prototype={constructor:n,isVector2:!0,get width(){return this.x},set width(e){this.x=e},get height(){return this.y},set height(e){this.y=e},set:function(e,t){return this.x=e,this.y=t,this},setScalar:function(e){return this.x=e,this.y=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(e){return this.x=e.x,this.y=e.y,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)},addScalar:function(e){return this.x+=e,this.y+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)},subScalar:function(e){return this.x-=e,this.y-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this},multiply:function(e){return this.x*=e.x,this.y*=e.y,this},multiplyScalar:function(e){return isFinite(e)?(this.x*=e,this.y*=e):(this.x=0,this.y=0),this},divide:function(e){return this.x/=e.x,this.y/=e.y,this},divideScalar:function(e){return this.multiplyScalar(1/e)},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this},clampScalar:function(){var e,t;return function(r,i){return void 0===e&&(e=new n,t=new n),e.set(r,r),t.set(i,i),this.clamp(e,t)}}(),clampLength:function(e,t){var n=this.length();return this.multiplyScalar(Math.max(e,Math.min(t,n))/n)},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(e){return this.x*e.x+this.y*e.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 e=Math.atan2(this.y,this.x);return e<0&&(e+=2*Math.PI),e},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},distanceToManhattan:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)},setLength:function(e){return this.multiplyScalar(e/this.length())},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e},fromAttribute:function(e,t,n){return void 0===n&&(n=0),t=t*e.itemSize+n,this.x=e.array[t],this.y=e.array[t+1],this},rotateAround:function(e,t){var n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,o=this.y-e.y;return this.x=i*n-o*r+e.x,this.y=i*r+o*n+e.y,this}},r.DEFAULT_IMAGE=void 0,r.DEFAULT_MAPPING=300,r.prototype={constructor:r,isTexture:!0,set needsUpdate(e){e===!0&&this.version++},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this},toJSON:function(e){if(void 0!==e.textures[this.uuid])return e.textures[this.uuid];var t={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 n=this.image;void 0===n.uuid&&(n.uuid=Oa.generateUUID()),void 0===e.images[n.uuid]&&(e.images[n.uuid]={uuid:n.uuid,url:function(e){var t;return void 0!==e.toDataURL?t=e:(t=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0,e.width,e.height)),t.width>2048||t.height>2048?t.toDataURL("image/jpeg",.6):t.toDataURL("image/png")}(n)}),t.image=n.uuid}return e.textures[this.uuid]=t,t},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(e){if(300===this.mapping){if(e.multiply(this.repeat),e.add(this.offset),e.x<0||e.x>1)switch(this.wrapS){case Oo:e.x=e.x-Math.floor(e.x);break;case Po:e.x=e.x<0?0:1;break;case To:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case Oo:e.y=e.y-Math.floor(e.y);break;case Po:e.y=e.y<0?0:1;break;case To:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}this.flipY&&(e.y=1-e.y)}}},Object.assign(r.prototype,t.prototype);var Pa=0;o.prototype={constructor:o,isVector4:!0,set:function(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this.w=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setW:function(e){return this.w=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){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: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this},multiplyScalar:function(e){return isFinite(e)?(this.x*=e,this.y*=e,this.z*=e,this.w*=e):(this.x=0,this.y=0,this.z=0,this.w=0),this},applyMatrix4:function(e){var t=this.x,n=this.y,r=this.z,i=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*t+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*t+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*t+o[7]*n+o[11]*r+o[15]*i,this},divideScalar:function(e){return this.multiplyScalar(1/e)},setAxisAngleFromQuaternion:function(e){this.w=2*Math.acos(e.w);var t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this},setAxisAngleFromRotationMatrix:function(e){var t,n,r,i,o=e.elements,a=o[0],s=o[4],u=o[8],c=o[1],l=o[5],p=o[9],h=o[2],f=o[6],d=o[10];if(Math.abs(s-c)<.01&&Math.abs(u-h)<.01&&Math.abs(p-f)<.01){if(Math.abs(s+c)<.1&&Math.abs(u+h)<.1&&Math.abs(p+f)<.1&&Math.abs(a+l+d-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;var m=(a+1)/2,v=(l+1)/2,y=(d+1)/2,g=(s+c)/4,_=(u+h)/4,b=(p+f)/4;return m>v&&m>y?m<.01?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(m),r=g/n,i=_/n):v>y?v<.01?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(v),n=g/r,i=b/r):y<.01?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(y),n=_/i,r=b/i),this.set(n,r,i,t),this}var w=Math.sqrt((f-p)*(f-p)+(u-h)*(u-h)+(c-s)*(c-s));return Math.abs(w)<.001&&(w=1),this.x=(f-p)/w,this.y=(u-h)/w,this.z=(c-s)/w,this.w=Math.acos((a+l+d-1)/2),this},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this},clampScalar:function(){var e,t;return function(n,r){return void 0===e&&(e=new o,t=new o),e.set(n,n,n,n),t.set(r,r,r,r),this.clamp(e,t)}}(),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(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.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(e){return this.multiplyScalar(e/this.length())},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e},fromAttribute:function(e,t,n){return void 0===n&&(n=0),t=t*e.itemSize+n,this.x=e.array[t],this.y=e.array[t+1],this.z=e.array[t+2],this.w=e.array[t+3],this}},Object.assign(a.prototype,t.prototype,{isWebGLRenderTarget:!0,setSize:function(e,t){this.width===e&&this.height===t||(this.width=e,this.height=t,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.width=e.width,this.height=e.height,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),s.prototype=Object.create(a.prototype),s.prototype.constructor=s,s.prototype.isWebGLRenderTargetCube=!0,u.prototype={constructor:u,get x(){return this._x},set x(e){this._x=e,this.onChangeCallback()},get y(){return this._y},set y(e){this._y=e,this.onChangeCallback()},get z(){return this._z},set z(e){this._z=e,this.onChangeCallback()},get w(){return this._w},set w(e){this._w=e,this.onChangeCallback()},set:function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this.onChangeCallback(),this},setFromEuler:function(e,t){if((e&&e.isEuler)===!1)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=Math.cos(e._x/2),r=Math.cos(e._y/2),i=Math.cos(e._z/2),o=Math.sin(e._x/2),a=Math.sin(e._y/2),s=Math.sin(e._z/2),u=e.order;return"XYZ"===u?(this._x=o*r*i+n*a*s,this._y=n*a*i-o*r*s,this._z=n*r*s+o*a*i,this._w=n*r*i-o*a*s):"YXZ"===u?(this._x=o*r*i+n*a*s,this._y=n*a*i-o*r*s,this._z=n*r*s-o*a*i,this._w=n*r*i+o*a*s):"ZXY"===u?(this._x=o*r*i-n*a*s,this._y=n*a*i+o*r*s,this._z=n*r*s+o*a*i,this._w=n*r*i-o*a*s):"ZYX"===u?(this._x=o*r*i-n*a*s,this._y=n*a*i+o*r*s,this._z=n*r*s-o*a*i,this._w=n*r*i+o*a*s):"YZX"===u?(this._x=o*r*i+n*a*s,this._y=n*a*i+o*r*s,this._z=n*r*s-o*a*i,this._w=n*r*i-o*a*s):"XZY"===u&&(this._x=o*r*i-n*a*s,this._y=n*a*i-o*r*s,this._z=n*r*s+o*a*i,this._w=n*r*i+o*a*s),t!==!1&&this.onChangeCallback(),this},setFromAxisAngle:function(e,t){var n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(e){var t,n=e.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],u=n[9],c=n[2],l=n[6],p=n[10],h=r+s+p;return h>0?(t=.5/Math.sqrt(h+1),this._w=.25/t,this._x=(l-u)*t,this._y=(o-c)*t,this._z=(a-i)*t):r>s&&r>p?(t=2*Math.sqrt(1+r-s-p),this._w=(l-u)/t,this._x=.25*t,this._y=(i+a)/t,this._z=(o+c)/t):s>p?(t=2*Math.sqrt(1+s-r-p),this._w=(o-c)/t,this._x=(i+a)/t,this._y=.25*t,this._z=(u+l)/t):(t=2*Math.sqrt(1+p-r-s),this._w=(a-i)/t,this._x=(o+c)/t,this._y=(u+l)/t,this._z=.25*t),this.onChangeCallback(),this},setFromUnitVectors:function(){var e,t;return function(n,r){return void 0===e&&(e=new c),t=n.dot(r)+1,t<1e-6?(t=0,Math.abs(n.x)>Math.abs(n.z)?e.set(-n.y,n.x,0):e.set(0,-n.z,n.y)):e.crossVectors(n,r),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,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(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._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 e=this.length();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.onChangeCallback(),this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)},premultiply:function(e){return this.multiplyQuaternions(e,this)},multiplyQuaternions:function(e,t){var n=e._x,r=e._y,i=e._z,o=e._w,a=t._x,s=t._y,u=t._z,c=t._w;return this._x=n*c+o*a+r*u-i*s,this._y=r*c+o*s+i*a-n*u,this._z=i*c+o*u+n*s-r*a,this._w=o*c-n*a-r*s-i*u,this.onChangeCallback(),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*e._w+n*e._x+r*e._y+i*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(n+this._x),this._y=.5*(r+this._y),this._z=.5*(i+this._z),this;var u=Math.atan2(s,a),c=Math.sin((1-t)*u)/s,l=Math.sin(t*u)/s;return this._w=o*c+this._w*l,this._x=n*c+this._x*l,this._y=r*c+this._y*l,this._z=i*c+this._z*l,this.onChangeCallback(),this},equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w},fromArray:function(e,t){return void 0===t&&(t=0),this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this.onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e},onChange:function(e){return this.onChangeCallback=e,this},onChangeCallback:function(){}},Object.assign(u,{slerp:function(e,t,n,r){return n.copy(e).slerp(t,r)},slerpFlat:function(e,t,n,r,i,o,a){var s=n[r+0],u=n[r+1],c=n[r+2],l=n[r+3],p=i[o+0],h=i[o+1],f=i[o+2],d=i[o+3];if(l!==d||s!==p||u!==h||c!==f){var m=1-a,v=s*p+u*h+c*f+l*d,y=v>=0?1:-1,g=1-v*v;if(g>Number.EPSILON){var _=Math.sqrt(g),b=Math.atan2(_,v*y);m=Math.sin(m*b)/_,a=Math.sin(a*b)/_}var w=a*y;if(s=s*m+p*w,u=u*m+h*w,c=c*m+f*w,l=l*m+d*w,m===1-a){var x=1/Math.sqrt(s*s+u*u+c*c+l*l);s*=x,u*=x,c*=x,l*=x}}e[t]=s,e[t+1]=u,e[t+2]=c,e[t+3]=l}}),c.prototype={constructor:c,isVector3:!0,set:function(e,t,n){return this.x=e,this.y=t,this.z=n,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)},multiplyScalar:function(e){return isFinite(e)?(this.x*=e,this.y*=e,this.z*=e):(this.x=0,this.y=0,this.z=0),this},multiplyVectors:function(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this},applyEuler:function(){var e;return function(t){return(t&&t.isEuler)===!1&&console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),void 0===e&&(e=new u),this.applyQuaternion(e.setFromEuler(t))}}(),applyAxisAngle:function(){var e;return function(t,n){return void 0===e&&(e=new u),this.applyQuaternion(e.setFromAxisAngle(t,n))}}(),applyMatrix3:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this},applyMatrix4:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r+i[12],this.y=i[1]*t+i[5]*n+i[9]*r+i[13],this.z=i[2]*t+i[6]*n+i[10]*r+i[14],this},applyProjection:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements,o=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*o,this},applyQuaternion:function(e){var t=this.x,n=this.y,r=this.z,i=e.x,o=e.y,a=e.z,s=e.w,u=s*t+o*r-a*n,c=s*n+a*t-i*r,l=s*r+i*n-o*t,p=-i*t-o*n-a*r;return this.x=u*s+p*-i+c*-a-l*-o,this.y=c*s+p*-o+l*-i-u*-a,this.z=l*s+p*-a+u*-o-c*-i,this},project:function(){var e;return function(t){return void 0===e&&(e=new l),e.multiplyMatrices(t.projectionMatrix,e.getInverse(t.matrixWorld)),this.applyProjection(e)}}(),unproject:function(){var e;return function(t){return void 0===e&&(e=new l),e.multiplyMatrices(t.matrixWorld,e.getInverse(t.projectionMatrix)),this.applyProjection(e)}}(),transformDirection:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()},divide:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},divideScalar:function(e){return this.multiplyScalar(1/e)},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this},clampScalar:function(){var e,t;return function(n,r){return void 0===e&&(e=new c,t=new c),e.set(n,n,n),t.set(r,r,r),this.clamp(e,t)}}(),clampLength:function(e,t){var n=this.length();return this.multiplyScalar(Math.max(e,Math.min(t,n))/n)},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(e){return this.x*e.x+this.y*e.y+this.z*e.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(e){return this.multiplyScalar(e/this.length())},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},cross:function(e,t){if(void 0!==t)return console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t);var n=this.x,r=this.y,i=this.z;return this.x=r*e.z-i*e.y,this.y=i*e.x-n*e.z,this.z=n*e.y-r*e.x,this},crossVectors:function(e,t){var n=e.x,r=e.y,i=e.z,o=t.x,a=t.y,s=t.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},projectOnVector:function(e){var t=e.dot(this)/e.lengthSq();return this.copy(e).multiplyScalar(t)},projectOnPlane:function(){var e;return function(t){return void 0===e&&(e=new c),e.copy(this).projectOnVector(t),this.sub(e)}}(),reflect:function(){var e;return function(t){return void 0===e&&(e=new c),this.sub(e.copy(t).multiplyScalar(2*this.dot(t)))}}(),angleTo:function(e){var t=this.dot(e)/Math.sqrt(this.lengthSq()*e.lengthSq());return Math.acos(Oa.clamp(t,-1,1))},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r},distanceToManhattan:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)},setFromSpherical:function(e){var t=Math.sin(e.phi)*e.radius;return this.x=t*Math.sin(e.theta),this.y=Math.cos(e.phi)*e.radius,this.z=t*Math.cos(e.theta),this},setFromMatrixPosition:function(e){return this.setFromMatrixColumn(e,3)},setFromMatrixScale:function(e){var t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this},setFromMatrixColumn:function(e,t){if("number"==typeof e){console.warn("THREE.Vector3: setFromMatrixColumn now expects ( matrix, index ).");var n=e;e=t,t=n}return this.fromArray(e.elements,4*t)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e},fromAttribute:function(e,t,n){return void 0===n&&(n=0),t=t*e.itemSize+n,this.x=e.array[t],this.y=e.array[t+1],this.z=e.array[t+2],this}},l.prototype={constructor:l,isMatrix4:!0,set:function(e,t,n,r,i,o,a,s,u,c,l,p,h,f,d,m){var v=this.elements;return v[0]=e,v[4]=t,v[8]=n,v[12]=r,v[1]=i,v[5]=o,v[9]=a,v[13]=s,v[2]=u,v[6]=c,v[10]=l,v[14]=p,v[3]=h,v[7]=f,v[11]=d,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 l).fromArray(this.elements)},copy:function(e){return this.elements.set(e.elements),this},copyPosition:function(e){var t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this},extractBasis:function(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this},extractRotation:function(){var e;return function(t){void 0===e&&(e=new c);var n=this.elements,r=t.elements,i=1/e.setFromMatrixColumn(t,0).length(),o=1/e.setFromMatrixColumn(t,1).length(),a=1/e.setFromMatrixColumn(t,2).length();return n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[4]=r[4]*o,n[5]=r[5]*o,n[6]=r[6]*o,n[8]=r[8]*a,n[9]=r[9]*a,n[10]=r[10]*a,this}}(),makeRotationFromEuler:function(e){(e&&e.isEuler)===!1&&console.error("THREE.Matrix: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var t=this.elements,n=e.x,r=e.y,i=e.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),u=Math.sin(r),c=Math.cos(i),l=Math.sin(i);if("XYZ"===e.order){var p=o*c,h=o*l,f=a*c,d=a*l;t[0]=s*c,t[4]=-s*l,t[8]=u,t[1]=h+f*u,t[5]=p-d*u,t[9]=-a*s,t[2]=d-p*u,t[6]=f+h*u,t[10]=o*s}else if("YXZ"===e.order){var m=s*c,v=s*l,y=u*c,g=u*l;t[0]=m+g*a,t[4]=y*a-v,t[8]=o*u,t[1]=o*l,t[5]=o*c,t[9]=-a,t[2]=v*a-y,t[6]=g+m*a,t[10]=o*s}else if("ZXY"===e.order){var m=s*c,v=s*l,y=u*c,g=u*l;t[0]=m-g*a,t[4]=-o*l,t[8]=y+v*a,t[1]=v+y*a,t[5]=o*c,t[9]=g-m*a,t[2]=-o*u,t[6]=a,t[10]=o*s}else if("ZYX"===e.order){var p=o*c,h=o*l,f=a*c,d=a*l;t[0]=s*c,t[4]=f*u-h,t[8]=p*u+d,t[1]=s*l,t[5]=d*u+p,t[9]=h*u-f,t[2]=-u,t[6]=a*s,t[10]=o*s}else if("YZX"===e.order){var _=o*s,b=o*u,w=a*s,x=a*u;t[0]=s*c,t[4]=x-_*l,t[8]=w*l+b,t[1]=l,t[5]=o*c,t[9]=-a*c,t[2]=-u*c,t[6]=b*l+w,t[10]=_-x*l}else if("XZY"===e.order){var _=o*s,b=o*u,w=a*s,x=a*u;t[0]=s*c,t[4]=-l,t[8]=u*c,t[1]=_*l+x,t[5]=o*c,t[9]=b*l-w,t[2]=w*l-b,t[6]=a*c,t[10]=x*l+_}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},makeRotationFromQuaternion:function(e){var t=this.elements,n=e.x,r=e.y,i=e.z,o=e.w,a=n+n,s=r+r,u=i+i,c=n*a,l=n*s,p=n*u,h=r*s,f=r*u,d=i*u,m=o*a,v=o*s,y=o*u;return t[0]=1-(h+d),t[4]=l-y,t[8]=p+v,t[1]=l+y,t[5]=1-(c+d),t[9]=f-m,t[2]=p-v,t[6]=f+m,t[10]=1-(c+h),t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},lookAt:function(){var e,t,n;return function(r,i,o){void 0===e&&(e=new c,t=new c,n=new c);var a=this.elements;return n.subVectors(r,i).normalize(),0===n.lengthSq()&&(n.z=1),e.crossVectors(o,n).normalize(),0===e.lengthSq()&&(n.z+=1e-4,e.crossVectors(o,n).normalize()),t.crossVectors(n,e),a[0]=e.x,a[4]=t.x,a[8]=n.x,a[1]=e.y,a[5]=t.y,a[9]=n.y,a[2]=e.z,a[6]=t.z,a[10]=n.z,this}}(),multiply:function(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)},premultiply:function(e){return this.multiplyMatrices(e,this)},multiplyMatrices:function(e,t){var n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[4],s=n[8],u=n[12],c=n[1],l=n[5],p=n[9],h=n[13],f=n[2],d=n[6],m=n[10],v=n[14],y=n[3],g=n[7],_=n[11],b=n[15],w=r[0],x=r[4],M=r[8],E=r[12],O=r[1],P=r[5],T=r[9],S=r[13],C=r[2],R=r[6],A=r[10],j=r[14],L=r[3],D=r[7],I=r[11],k=r[15];return i[0]=o*w+a*O+s*C+u*L,i[4]=o*x+a*P+s*R+u*D,i[8]=o*M+a*T+s*A+u*I,i[12]=o*E+a*S+s*j+u*k,i[1]=c*w+l*O+p*C+h*L,i[5]=c*x+l*P+p*R+h*D,i[9]=c*M+l*T+p*A+h*I,i[13]=c*E+l*S+p*j+h*k,i[2]=f*w+d*O+m*C+v*L,i[6]=f*x+d*P+m*R+v*D,i[10]=f*M+d*T+m*A+v*I,i[14]=f*E+d*S+m*j+v*k,i[3]=y*w+g*O+_*C+b*L,i[7]=y*x+g*P+_*R+b*D,i[11]=y*M+g*T+_*A+b*I,i[15]=y*E+g*S+_*j+b*k,this},multiplyToArray:function(e,t,n){var r=this.elements;return this.multiplyMatrices(e,t),n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],n[9]=r[9],n[10]=r[10],n[11]=r[11],n[12]=r[12],n[13]=r[13],n[14]=r[14],n[15]=r[15],this},multiplyScalar:function(e){var t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this},applyToVector3Array:function(){var e;return function(t,n,r){void 0===e&&(e=new c),void 0===n&&(n=0),void 0===r&&(r=t.length);for(var i=0,o=n;i<r;i+=3,o+=3)e.fromArray(t,o),e.applyMatrix4(this),e.toArray(t,o);return t}}(),applyToBuffer:function(){var e;return function(t,n,r){void 0===e&&(e=new c),void 0===n&&(n=0),void 0===r&&(r=t.length/t.itemSize);for(var i=0,o=n;i<r;i++,o++)e.x=t.getX(o),e.y=t.getY(o),e.z=t.getZ(o),e.applyMatrix4(this),t.setXYZ(o,e.x,e.y,e.z);return t}}(),determinant:function(){var e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],o=e[1],a=e[5],s=e[9],u=e[13],c=e[2],l=e[6],p=e[10],h=e[14];return e[3]*(+i*s*l-r*u*l-i*a*p+n*u*p+r*a*h-n*s*h)+e[7]*(+t*s*h-t*u*p+i*o*p-r*o*h+r*u*c-i*s*c)+e[11]*(+t*u*l-t*a*h-i*o*l+n*o*h+i*a*c-n*u*c)+e[15]*(-r*a*c-t*s*l+t*a*p+r*o*l-n*o*p+n*s*c)},transpose:function(){var e,t=this.elements;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this},flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset is deprecated - just use .toArray instead."),this.toArray(e,t)},getPosition:function(){var e;return function(){return void 0===e&&(e=new c),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),e.setFromMatrixColumn(this,3)}}(),setPosition:function(e){var t=this.elements;return t[12]=e.x,t[13]=e.y,t[14]=e.z,this},getInverse:function(e,t){var n=this.elements,r=e.elements,i=r[0],o=r[1],a=r[2],s=r[3],u=r[4],c=r[5],l=r[6],p=r[7],h=r[8],f=r[9],d=r[10],m=r[11],v=r[12],y=r[13],g=r[14],_=r[15],b=f*g*p-y*d*p+y*l*m-c*g*m-f*l*_+c*d*_,w=v*d*p-h*g*p-v*l*m+u*g*m+h*l*_-u*d*_,x=h*y*p-v*f*p+v*c*m-u*y*m-h*c*_+u*f*_,M=v*f*l-h*y*l-v*c*d+u*y*d+h*c*g-u*f*g,E=i*b+o*w+a*x+s*M;if(0===E){var O="THREE.Matrix4.getInverse(): can't invert matrix, determinant is 0";if(t===!0)throw new Error(O);return console.warn(O),this.identity()}var P=1/E;return n[0]=b*P,n[1]=(y*d*s-f*g*s-y*a*m+o*g*m+f*a*_-o*d*_)*P,n[2]=(c*g*s-y*l*s+y*a*p-o*g*p-c*a*_+o*l*_)*P,n[3]=(f*l*s-c*d*s-f*a*p+o*d*p+c*a*m-o*l*m)*P,n[4]=w*P,n[5]=(h*g*s-v*d*s+v*a*m-i*g*m-h*a*_+i*d*_)*P,n[6]=(v*l*s-u*g*s-v*a*p+i*g*p+u*a*_-i*l*_)*P,n[7]=(u*d*s-h*l*s+h*a*p-i*d*p-u*a*m+i*l*m)*P,n[8]=x*P,n[9]=(v*f*s-h*y*s-v*o*m+i*y*m+h*o*_-i*f*_)*P,n[10]=(u*y*s-v*c*s+v*o*p-i*y*p-u*o*_+i*c*_)*P,n[11]=(h*c*s-u*f*s-h*o*p+i*f*p+u*o*m-i*c*m)*P,n[12]=M*P,n[13]=(h*y*a-v*f*a+v*o*d-i*y*d-h*o*g+i*f*g)*P,n[14]=(v*c*a-u*y*a-v*o*l+i*y*l+u*o*g-i*c*g)*P,n[15]=(u*f*a-h*c*a+h*o*l-i*f*l-u*o*d+i*c*d)*P,this},scale:function(e){var t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this},getMaxScaleOnAxis:function(){var e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))},makeTranslation:function(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this},makeRotationX:function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this},makeRotationY:function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this},makeRotationZ:function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(e,t){var n=Math.cos(t),r=Math.sin(t),i=1-n,o=e.x,a=e.y,s=e.z,u=i*o,c=i*a;return this.set(u*o+n,u*a-r*s,u*s+r*a,0,u*a+r*s,c*a+n,c*s-r*o,0,u*s-r*a,c*s+r*o,i*s*s+n,0,0,0,0,1),this},makeScale:function(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this},compose:function(e,t,n){return this.makeRotationFromQuaternion(t),this.scale(n),this.setPosition(e),this},decompose:function(){var e,t;return function(n,r,i){void 0===e&&(e=new c,t=new l);var o=this.elements,a=e.set(o[0],o[1],o[2]).length(),s=e.set(o[4],o[5],o[6]).length(),u=e.set(o[8],o[9],o[10]).length();this.determinant()<0&&(a=-a),n.x=o[12],n.y=o[13],n.z=o[14],t.elements.set(this.elements);var p=1/a,h=1/s,f=1/u;return t.elements[0]*=p,t.elements[1]*=p,t.elements[2]*=p,t.elements[4]*=h,t.elements[5]*=h,t.elements[6]*=h,t.elements[8]*=f,t.elements[9]*=f,t.elements[10]*=f,r.setFromRotationMatrix(t),i.x=a,i.y=s,i.z=u,this}}(),makeFrustum:function(e,t,n,r,i,o){var a=this.elements,s=2*i/(t-e),u=2*i/(r-n),c=(t+e)/(t-e),l=(r+n)/(r-n),p=-(o+i)/(o-i),h=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=c,a[12]=0,a[1]=0,a[5]=u,a[9]=l,a[13]=0,a[2]=0,a[6]=0,a[10]=p,a[14]=h,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makePerspective:function(e,t,n,r){var i=n*Math.tan(Oa.DEG2RAD*e*.5),o=-i,a=o*t,s=i*t;return this.makeFrustum(a,s,o,i,n,r)},makeOrthographic:function(e,t,n,r,i,o){var a=this.elements,s=1/(t-e),u=1/(n-r),c=1/(o-i),l=(t+e)*s,p=(n+r)*u,h=(o+i)*c;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-l,a[1]=0,a[5]=2*u,a[9]=0,a[13]=-p,a[2]=0,a[6]=0,a[10]=-2*c,a[14]=-h,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(e){for(var t=this.elements,n=e.elements,r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0},fromArray:function(e,t){void 0===t&&(t=0);for(var n=0;n<16;n++)this.elements[n]=e[n+t];return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}},p.prototype=Object.create(r.prototype),p.prototype.constructor=p,p.prototype.isCubeTexture=!0,Object.defineProperty(p.prototype,"images",{get:function(){return this.image},set:function(e){this.image=e}});var Ta=new r,Sa=new p,Ca=[],Ra=[];G.prototype.setValue=function(e,t){for(var n=this.seq,r=0,i=n.length;r!==i;++r){var o=n[r];o.setValue(e,t[o.id])}};var Aa=/([\w\d_]+)(\])?(\[|\.)?/g;W.prototype.setValue=function(e,t,n){var r=this.map[t];void 0!==r&&r.setValue(e,n,this.renderer)},W.prototype.set=function(e,t,n){var r=this.map[n];void 0!==r&&r.setValue(e,t[n],this.renderer)},W.prototype.setOptional=function(e,t,n){var r=t[n];void 0!==r&&this.setValue(e,n,r)},W.upload=function(e,t,n,r){for(var i=0,o=t.length;i!==o;++i){var a=t[i],s=n[a.id];s.needsUpdate!==!1&&a.setValue(e,s.value,r)}},W.seqWithValue=function(e,t){for(var n=[],r=0,i=e.length;r!==i;++r){var o=e[r];o.id in t&&n.push(o)}return n};var ja={merge:function(e){for(var t={},n=0;n<e.length;n++){var r=this.clone(e[n]);for(var i in r)t[i]=r[i]}return t},clone:function(e){var t={};for(var n in e){t[n]={};for(var r in e[n]){var i=e[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?t[n][r]=i.clone():Array.isArray(i)?t[n][r]=i.slice():t[n][r]=i}}return t}},La={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif\n",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif\n",aomap_fragment:"#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",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"\nvec3 transformed = vec3( position );\n",beginnormal_vertex:"\nvec3 objectNormal = vec3( normal );\n",bsdfs:"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",bumpmap_pars_fragment:"#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",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; ++ i ) {\n\t\tvec4 plane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t\t\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; ++ i ) {\n\t\t\tvec4 plane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t\n\t#endif\n#endif\n",clipping_planes_pars_fragment:"#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",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvarying vec3 vViewPosition;\n#endif\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n",color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n",color_pars_vertex:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",common:"#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",cube_uv_reflection_fragment:"#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",defaultnormal_vertex:"#ifdef FLIP_SIDED\n\tobjectNormal = -objectNormal;\n#endif\nvec3 transformedNormal = normalMatrix * objectNormal;\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normal * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n",encodings_fragment:" gl_FragColor = linearToOutputTexel( gl_FragColor );\n",encodings_pars_fragment:"\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",envmap_fragment:"#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",envmap_pars_fragment:"#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",envmap_pars_vertex:"#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",envmap_vertex:"#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",fog_fragment:"#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",fog_pars_fragment:"#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",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"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",lights_pars:"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",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n",lights_phong_pars_fragment:"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",lights_physical_fragment:"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",lights_physical_pars_fragment:"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",lights_template:"\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",logdepthbuf_fragment:"#if defined(USE_LOGDEPTHBUF) && defined(USE_LOGDEPTHBUF_EXT)\n\tgl_FragDepthEXT = log2(vFragDepth) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\n\tuniform float logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n#endif\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n\tuniform float logDepthBufFC;\n#endif",logdepthbuf_vertex:"#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",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif\n",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n",map_particle_fragment:"#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",map_particle_pars_fragment:"#ifdef USE_MAP\n\tuniform vec4 offsetRepeat;\n\tuniform sampler2D map;\n#endif\n",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.r;\n#endif\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#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",morphtarget_pars_vertex:"#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",morphtarget_vertex:"#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",normal_flip:"#ifdef DOUBLE_SIDED\n\tfloat flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n#else\n\tfloat flipNormal = 1.0;\n#endif\n",normal_fragment:"#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",normalmap_pars_fragment:"#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",packing:"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",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif\n",project_vertex:"#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",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.r;\n#endif\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#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",shadowmap_pars_vertex:"#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",shadowmap_vertex:"#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",shadowmask_pars_fragment:"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",skinbase_vertex:"#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",skinning_pars_vertex:"#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",skinning_vertex:"#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",skinnormal_vertex:"#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",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif\n",tonemapping_pars_fragment:"#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",uv_pars_fragment:"#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",uv_pars_vertex:"#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",uv_vertex:"#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",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif",worldpos_vertex:"#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",cube_frag:"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",cube_vert:"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",depth_frag:"#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",depth_vert:"#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",distanceRGBA_frag:"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",distanceRGBA_vert:"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",equirect_frag:"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",equirect_vert:"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",linedashed_frag:"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",linedashed_vert:"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",meshbasic_frag:"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",meshbasic_vert:"#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",meshlambert_frag:"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",meshlambert_vert:"#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",meshphong_frag:"#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",meshphong_vert:"#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",meshphysical_frag:"#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",meshphysical_vert:"#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",normal_frag:"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",normal_vert:"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",points_frag:"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",points_vert:"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",shadow_frag:"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",shadow_vert:"#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"};X.prototype={constructor:X,isColor:!0,r:1,g:1,b:1,set:function(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this},setScalar:function(e){return this.r=e,this.g=e,this.b=e,this},setHex:function(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this},setRGB:function(e,t,n){return this.r=e,this.g=t,this.b=n,this},setHSL:function(){function e(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}return function(t,n,r){if(t=Oa.euclideanModulo(t,1),n=Oa.clamp(n,0,1),r=Oa.clamp(r,0,1),0===n)this.r=this.g=this.b=r;else{var i=r<=.5?r*(1+n):r+n-r*n,o=2*r-i;this.r=e(o,i,t+1/3),this.g=e(o,i,t),this.b=e(o,i,t-1/3)}return this}}(),setStyle:function(e){function t(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,i=n[1],o=n[2];switch(i){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,t(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,t(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 a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,u=parseInt(r[3],10)/100;return t(r[5]),this.setHSL(a,s,u)}}}else if(n=/^\#([A-Fa-f0-9]+)$/.exec(e)){var c=n[1],l=c.length;if(3===l)return this.r=parseInt(c.charAt(0)+c.charAt(0),16)/255,this.g=parseInt(c.charAt(1)+c.charAt(1),16)/255,this.b=parseInt(c.charAt(2)+c.charAt(2),16)/255,this;if(6===l)return this.r=parseInt(c.charAt(0)+c.charAt(1),16)/255,this.g=parseInt(c.charAt(2)+c.charAt(3),16)/255,this.b=parseInt(c.charAt(4)+c.charAt(5),16)/255,this}if(e&&e.length>0){var c=Da[e];void 0!==c?this.setHex(c):console.warn("THREE.Color: Unknown color "+e)}return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this},copyGammaToLinear:function(e,t){return void 0===t&&(t=2),this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this},copyLinearToGamma:function(e,t){void 0===t&&(t=2);var n=t>0?1/t:1;return this.r=Math.pow(e.r,n),this.g=Math.pow(e.g,n),this.b=Math.pow(e.b,n),this},convertGammaToLinear:function(){var e=this.r,t=this.g,n=this.b;return this.r=e*e,this.g=t*t,this.b=n*n,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(e){var t,n,r=e||{h:0,s:0,l:0},i=this.r,o=this.g,a=this.b,s=Math.max(i,o,a),u=Math.min(i,o,a),c=(u+s)/2;if(u===s)t=0,n=0;else{var l=s-u;switch(n=c<=.5?l/(s+u):l/(2-s-u),s){case i:t=(o-a)/l+(o<a?6:0);break;case o:t=(a-i)/l+2;break;case a:t=(i-o)/l+4}t/=6}return r.h=t,r.s=n,r.l=c,r},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(e,t,n){var r=this.getHSL();return r.h+=e,r.s+=t,r.l+=n,this.setHSL(r.h,r.s,r.l),this},add:function(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this},addColors:function(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this},addScalar:function(e){return this.r+=e,this.g+=e,this.b+=e,this},sub:function(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this},multiply:function(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this},multiplyScalar:function(e){return this.r*=e,this.g*=e,this.b*=e,this},lerp:function(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this},equals:function(e){return e.r===this.r&&e.g===this.g&&e.b===this.b},fromArray:function(e,t){return void 0===t&&(t=0),this.r=e[t],this.g=e[t+1],this.b=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e},toJSON:function(){return this.getHex()}};var Da={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},Ia={common:{diffuse:{value:new X(15658734)},opacity:{value:1},map:{value:null},offsetRepeat:{value:new o(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 n(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 X(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 X(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},offsetRepeat:{value:new o(0,0,1,1)}}},ka={basic:{uniforms:ja.merge([Ia.common,Ia.aomap,Ia.fog]),vertexShader:La.meshbasic_vert,fragmentShader:La.meshbasic_frag},lambert:{uniforms:ja.merge([Ia.common,Ia.aomap,Ia.lightmap,Ia.emissivemap,Ia.fog,Ia.lights,{emissive:{value:new X(0)}}]),vertexShader:La.meshlambert_vert,fragmentShader:La.meshlambert_frag},phong:{uniforms:ja.merge([Ia.common,Ia.aomap,Ia.lightmap,Ia.emissivemap,Ia.bumpmap,Ia.normalmap,Ia.displacementmap,Ia.fog,Ia.lights,{emissive:{value:new X(0)},specular:{value:new X(1118481)},shininess:{value:30}}]),vertexShader:La.meshphong_vert,fragmentShader:La.meshphong_frag},standard:{uniforms:ja.merge([Ia.common,Ia.aomap,Ia.lightmap,Ia.emissivemap,Ia.bumpmap,Ia.normalmap,Ia.displacementmap,Ia.roughnessmap,Ia.metalnessmap,Ia.fog,Ia.lights,{emissive:{value:new X(0)},roughness:{value:.5},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:La.meshphysical_vert,fragmentShader:La.meshphysical_frag},points:{uniforms:ja.merge([Ia.points,Ia.fog]),vertexShader:La.points_vert,fragmentShader:La.points_frag},dashed:{uniforms:ja.merge([Ia.common,Ia.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:La.linedashed_vert,fragmentShader:La.linedashed_frag},depth:{uniforms:ja.merge([Ia.common,Ia.displacementmap]),vertexShader:La.depth_vert,fragmentShader:La.depth_frag},normal:{uniforms:{opacity:{value:1}},vertexShader:La.normal_vert,fragmentShader:La.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:La.cube_vert,fragmentShader:La.cube_frag},equirect:{uniforms:{tEquirect:{value:null},tFlip:{value:-1}},vertexShader:La.equirect_vert,fragmentShader:La.equirect_frag},distanceRGBA:{uniforms:{lightPos:{value:new c}},vertexShader:La.distanceRGBA_vert,fragmentShader:La.distanceRGBA_frag}};ka.physical={uniforms:ja.merge([ka.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:La.meshphysical_vert,fragmentShader:La.meshphysical_frag},q.prototype={constructor:q,set:function(e,t){return this.min.copy(e),this.max.copy(t),this},setFromPoints:function(e){this.makeEmpty();for(var t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this},setFromCenterAndSize:function(){var e=new n;return function(t,n){var r=e.copy(n).multiplyScalar(.5);return this.min.copy(t).sub(r),this.max.copy(t).add(r),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.min.copy(e.min),this.max.copy(e.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},getCenter:function(e){var t=e||new n;return this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(e){var t=e||new n;return this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)},expandByPoint:function(e){return this.min.min(e),this.max.max(e),this},expandByVector:function(e){return this.min.sub(e),this.max.add(e),this},expandByScalar:function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},containsPoint:function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y},getParameter:function(e,t){return(t||new n).set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)},clampPoint:function(e,t){return(t||new n).copy(e).clamp(this.min,this.max)},distanceToPoint:function(){var e=new n;return function(t){return e.copy(t).clamp(this.min,this.max).sub(t).length()}}(),intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}},Q.prototype={constructor:Q,isMaterial:!0,get needsUpdate(){return this._needsUpdate},set needsUpdate(e){e===!0&&this.update(),this._needsUpdate=e},setValues:function(e){if(void 0!==e)for(var t in e){var n=e[t];if(void 0!==n){var r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]="overdraw"===t?Number(n):n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}else console.warn("THREE.Material: '"+t+"' parameter is undefined.")}},toJSON:function(e){function t(e){var t=[];for(var n in e){var r=e[n];delete r.metadata,t.push(r)}return t}var n=void 0===e;n&&(e={textures:{},images:{}});var r={metadata:{version:4.4,type:"Material",generator:"Material.toJSON"}};if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),void 0!==this.roughness&&(r.roughness=this.roughness),void 0!==this.metalness&&(r.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),void 0!==this.shininess&&(r.shininess=this.shininess),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(e).uuid),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(e).uuid,r.reflectivity=this.reflectivity),void 0!==this.size&&(r.size=this.size),void 0!==this.sizeAttenuation&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==ji&&(r.blending=this.blending),this.shading!==Ti&&(r.shading=this.shading),this.side!==Mi&&(r.side=this.side),this.vertexColors!==Si&&(r.vertexColors=this.vertexColors),this.opacity<1&&(r.opacity=this.opacity),this.transparent===!0&&(r.transparent=this.transparent),r.depthFunc=this.depthFunc,r.depthTest=this.depthTest,r.depthWrite=this.depthWrite,this.alphaTest>0&&(r.alphaTest=this.alphaTest),this.premultipliedAlpha===!0&&(r.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(r.wireframe=this.wireframe),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(r.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(r.wireframeLinejoin=this.wireframeLinejoin),r.skinning=this.skinning,r.morphTargets=this.morphTargets,n){var i=t(e.textures),o=t(e.images);i.length>0&&(r.textures=i),o.length>0&&(r.images=o)}return r},clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.name=e.name,this.fog=e.fog,this.lights=e.lights,this.blending=e.blending,this.side=e.side,this.shading=e.shading,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.alphaTest=e.alphaTest,this.premultipliedAlpha=e.premultipliedAlpha,this.overdraw=e.overdraw,this.visible=e.visible,this.clipShadows=e.clipShadows,this.clipIntersection=e.clipIntersection;var t=e.clippingPlanes,n=null;if(null!==t){var r=t.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=t[i].clone()}return this.clippingPlanes=n,this},update:function(){this.dispatchEvent({type:"update"})},dispose:function(){this.dispatchEvent({type:"dispose"})}},Object.assign(Q.prototype,t.prototype);var Na=0;K.prototype=Object.create(Q.prototype),K.prototype.constructor=K,K.prototype.isShaderMaterial=!0,K.prototype.copy=function(e){return Q.prototype.copy.call(this,e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=ja.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(e){var t=Q.prototype.toJSON.call(this,e);return t.uniforms=this.uniforms,t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t},$.prototype=Object.create(Q.prototype),$.prototype.constructor=$,$.prototype.isMeshDepthMaterial=!0,$.prototype.copy=function(e){return Q.prototype.copy.call(this,e),this.depthPacking=e.depthPacking,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this},ee.prototype={constructor:ee,isBox3:!0,set:function(e,t){return this.min.copy(e),this.max.copy(t),this},setFromArray:function(e){for(var t=+(1/0),n=+(1/0),r=+(1/0),i=-(1/0),o=-(1/0),a=-(1/0),s=0,u=e.length;s<u;s+=3){var c=e[s],l=e[s+1],p=e[s+2];c<t&&(t=c),l<n&&(n=l),p<r&&(r=p),c>i&&(i=c),l>o&&(o=l),p>a&&(a=p)}this.min.set(t,n,r),this.max.set(i,o,a)},setFromPoints:function(e){this.makeEmpty();for(var t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this},setFromCenterAndSize:function(){var e=new c;return function(t,n){var r=e.copy(n).multiplyScalar(.5);return this.min.copy(t).sub(r),this.max.copy(t).add(r),this}}(),setFromObject:function(){var e=new c;return function(t){var n=this;return t.updateMatrixWorld(!0),this.makeEmpty(),t.traverse(function(t){var r=t.geometry;if(void 0!==r)if(r&&r.isGeometry)for(var i=r.vertices,o=0,a=i.length;o<a;o++)e.copy(i[o]),e.applyMatrix4(t.matrixWorld),n.expandByPoint(e);else if(r&&r.isBufferGeometry){var s=r.attributes.position;if(void 0!==s){var u,c,l;s&&s.isInterleavedBufferAttribute?(u=s.data.array,c=s.offset,l=s.data.stride):(u=s.array,c=0,l=3);for(var o=c,a=u.length;o<a;o+=l)e.fromArray(u,o),e.applyMatrix4(t.matrixWorld),n.expandByPoint(e)}}}),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.min.copy(e.min),this.max.copy(e.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},getCenter:function(e){var t=e||new c;return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(e){var t=e||new c;return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)},expandByPoint:function(e){return this.min.min(e),this.max.max(e),this},expandByVector:function(e){return this.min.sub(e),this.max.add(e),this},expandByScalar:function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},containsPoint:function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z},getParameter:function(e,t){return(t||new c).set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)},intersectsSphere:function(){var e;return function(t){return void 0===e&&(e=new c),this.clampPoint(t.center,e),e.distanceToSquared(t.center)<=t.radius*t.radius}}(),intersectsPlane:function(e){var t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=e.constant&&n>=e.constant},clampPoint:function(e,t){return(t||new c).copy(e).clamp(this.min,this.max)},distanceToPoint:function(){var e=new c;return function(t){return e.copy(t).clamp(this.min,this.max).sub(t).length()}}(),getBoundingSphere:function(){var e=new c;return function(t){var n=t||new te;return this.getCenter(n.center),n.radius=.5*this.getSize(e).length(),n}}(),intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},applyMatrix4:function(){var e=[new c,new c,new c,new c,new c,new c,new c,new c];return function(t){return this.isEmpty()?this:(e[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),e[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),e[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),e[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),e[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),e[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),e[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),e[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(e),this)}}(),translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}},te.prototype={constructor:te,set:function(e,t){return this.center.copy(e),this.radius=t,this},setFromPoints:function(){var e=new ee;return function(t,n){var r=this.center;void 0!==n?r.copy(n):e.setFromPoints(t).getCenter(r);for(var i=0,o=0,a=t.length;o<a;o++)i=Math.max(i,r.distanceToSquared(t[o]));return this.radius=Math.sqrt(i),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.center.copy(e.center),this.radius=e.radius,this},empty:function(){return this.radius<=0},containsPoint:function(e){return e.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(e){return e.distanceTo(this.center)-this.radius},intersectsSphere:function(e){var t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t},intersectsBox:function(e){return e.intersectsSphere(this)},intersectsPlane:function(e){return Math.abs(this.center.dot(e.normal)-e.constant)<=this.radius},clampPoint:function(e,t){var n=this.center.distanceToSquared(e),r=t||new c;return r.copy(e),n>this.radius*this.radius&&(r.sub(this.center).normalize(),r.multiplyScalar(this.radius).add(this.center)),r},getBoundingBox:function(e){var t=e||new ee;return t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this},translate:function(e){return this.center.add(e),this},equals:function(e){return e.center.equals(this.center)&&e.radius===this.radius}},ne.prototype={constructor:ne,isMatrix3:!0,set:function(e,t,n,r,i,o,a,s,u){var c=this.elements;return c[0]=e,c[1]=r,c[2]=a,c[3]=t,c[4]=i,c[5]=s,c[6]=n,c[7]=o,c[8]=u,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(e){var t=e.elements;return this.set(t[0],t[3],t[6],t[1],t[4],t[7],t[2],t[5],t[8]),this},setFromMatrix4:function(e){var t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},applyToVector3Array:function(){var e;return function(t,n,r){void 0===e&&(e=new c),void 0===n&&(n=0),void 0===r&&(r=t.length);for(var i=0,o=n;i<r;i+=3,o+=3)e.fromArray(t,o),e.applyMatrix3(this),e.toArray(t,o);return t}}(),applyToBuffer:function(){var e;return function(t,n,r){void 0===e&&(e=new c),void 0===n&&(n=0),void 0===r&&(r=t.length/t.itemSize);for(var i=0,o=n;i<r;i++,o++)e.x=t.getX(o),e.y=t.getY(o),e.z=t.getZ(o),e.applyMatrix3(this),t.setXYZ(o,e.x,e.y,e.z);return t}}(),multiplyScalar:function(e){var t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this},determinant:function(){var e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],u=e[7],c=e[8];return t*o*c-t*a*u-n*i*c+n*a*s+r*i*u-r*o*s},getInverse:function(e,t){e&&e.isMatrix4&&console.error("THREE.Matrix3.getInverse no longer takes a Matrix4 argument.");var n=e.elements,r=this.elements,i=n[0],o=n[1],a=n[2],s=n[3],u=n[4],c=n[5],l=n[6],p=n[7],h=n[8],f=h*u-c*p,d=c*l-h*s,m=p*s-u*l,v=i*f+o*d+a*m;if(0===v){var y="THREE.Matrix3.getInverse(): can't invert matrix, determinant is 0";if(t===!0)throw new Error(y);return console.warn(y),this.identity()}var g=1/v;return r[0]=f*g,r[1]=(a*p-h*o)*g,r[2]=(c*o-a*u)*g,r[3]=d*g,r[4]=(h*i-a*l)*g,r[5]=(a*s-c*i)*g,r[6]=m*g,r[7]=(o*l-p*i)*g,r[8]=(u*i-o*s)*g,this},transpose:function(){var e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this},flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset is deprecated - just use .toArray instead."),this.toArray(e,t)},getNormalMatrix:function(e){return this.setFromMatrix4(e).getInverse(this).transpose()},transposeIntoArray:function(e){var t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this},fromArray:function(e,t){void 0===t&&(t=0);for(var n=0;n<9;n++)this.elements[n]=e[n+t];return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}},re.prototype={constructor:re,set:function(e,t){return this.normal.copy(e),this.constant=t,this},setComponents:function(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this},setFromCoplanarPoints:function(){var e=new c,t=new c;return function(n,r,i){var o=e.subVectors(i,r).cross(t.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,n),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.normal.copy(e.normal),this.constant=e.constant,this},normalize:function(){var e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(e){return this.normal.dot(e)+this.constant},distanceToSphere:function(e){return this.distanceToPoint(e.center)-e.radius},projectPoint:function(e,t){return this.orthoPoint(e,t).sub(e).negate()},orthoPoint:function(e,t){var n=this.distanceToPoint(e);return(t||new c).copy(this.normal).multiplyScalar(n)},intersectLine:function(){var e=new c;return function(t,n){var r=n||new c,i=t.delta(e),o=this.normal.dot(i);if(0!==o){var a=-(t.start.dot(this.normal)+this.constant)/o;if(!(a<0||a>1))return r.copy(i).multiplyScalar(a).add(t.start)}else if(0===this.distanceToPoint(t.start))return r.copy(t.start)}}(),intersectsLine:function(e){var t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0},intersectsBox:function(e){return e.intersectsPlane(this)},intersectsSphere:function(e){return e.intersectsPlane(this)},coplanarPoint:function(e){return(e||new c).copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var e=new c,t=new ne;return function(n,r){var i=this.coplanarPoint(e).applyMatrix4(n),o=r||t.getNormalMatrix(n),a=this.normal.applyMatrix3(o).normalize();return this.constant=-i.dot(a),this}}(),translate:function(e){return this.constant=this.constant-e.dot(this.normal),this},equals:function(e){return e.normal.equals(this.normal)&&e.constant===this.constant}},ie.prototype={constructor:ie,set:function(e,t,n,r,i,o){var a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){for(var t=this.planes,n=0;n<6;n++)t[n].copy(e.planes[n]);return this},setFromMatrix:function(e){var t=this.planes,n=e.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],c=n[6],l=n[7],p=n[8],h=n[9],f=n[10],d=n[11],m=n[12],v=n[13],y=n[14],g=n[15];return t[0].setComponents(a-r,l-s,d-p,g-m).normalize(),t[1].setComponents(a+r,l+s,d+p,g+m).normalize(),t[2].setComponents(a+i,l+u,d+h,g+v).normalize(),t[3].setComponents(a-i,l-u,d-h,g-v).normalize(),t[4].setComponents(a-o,l-c,d-f,g-y).normalize(),t[5].setComponents(a+o,l+c,d+f,g+y).normalize(),this},intersectsObject:function(){var e=new te;return function(t){var n=t.geometry;return null===n.boundingSphere&&n.computeBoundingSphere(),e.copy(n.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(e)}}(),intersectsSprite:function(){var e=new te;return function(t){return e.center.set(0,0,0),e.radius=.7071067811865476,e.applyMatrix4(t.matrixWorld),this.intersectsSphere(e)}}(),intersectsSphere:function(e){for(var t=this.planes,n=e.center,r=-e.radius,i=0;i<6;i++){if(t[i].distanceToPoint(n)<r)return!1}return!0},intersectsBox:function(){var e=new c,t=new c;return function(n){for(var r=this.planes,i=0;i<6;i++){var o=r[i];e.x=o.normal.x>0?n.min.x:n.max.x,t.x=o.normal.x>0?n.max.x:n.min.x,e.y=o.normal.y>0?n.min.y:n.max.y,t.y=o.normal.y>0?n.max.y:n.min.y,e.z=o.normal.z>0?n.min.z:n.max.z,t.z=o.normal.z>0?n.max.z:n.min.z;var a=o.distanceToPoint(e),s=o.distanceToPoint(t);if(a<0&&s<0)return!1}return!0}}(),containsPoint:function(e){for(var t=this.planes,n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}},ae.prototype={constructor:ae,set:function(e,t){return this.origin.copy(e),this.direction.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this},at:function(e,t){return(t||new c).copy(this.direction).multiplyScalar(e).add(this.origin)},lookAt:function(e){return this.direction.copy(e).sub(this.origin).normalize(),this},recast:function(){var e=new c;return function(t){return this.origin.copy(this.at(t,e)),this}}(),closestPointToPoint:function(e,t){var n=t||new c;n.subVectors(e,this.origin);var r=n.dot(this.direction);return r<0?n.copy(this.origin):n.copy(this.direction).multiplyScalar(r).add(this.origin)},distanceToPoint:function(e){return Math.sqrt(this.distanceSqToPoint(e))},distanceSqToPoint:function(){var e=new c;return function(t){var n=e.subVectors(t,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(t):(e.copy(this.direction).multiplyScalar(n).add(this.origin),e.distanceToSquared(t))}}(),distanceSqToSegment:function(){var e=new c,t=new c,n=new c;return function(r,i,o,a){e.copy(r).add(i).multiplyScalar(.5),t.copy(i).sub(r).normalize(),n.copy(this.origin).sub(e);var s,u,c,l,p=.5*r.distanceTo(i),h=-this.direction.dot(t),f=n.dot(this.direction),d=-n.dot(t),m=n.lengthSq(),v=Math.abs(1-h*h);if(v>0)if(s=h*d-f,u=h*f-d,l=p*v,s>=0)if(u>=-l)if(u<=l){var y=1/v;s*=y,u*=y,c=s*(s+h*u+2*f)+u*(h*s+u+2*d)+m}else u=p,s=Math.max(0,-(h*u+f)),c=-s*s+u*(u+2*d)+m;else u=-p,s=Math.max(0,-(h*u+f)),c=-s*s+u*(u+2*d)+m;else u<=-l?(s=Math.max(0,-(-h*p+f)),u=s>0?-p:Math.min(Math.max(-p,-d),p),c=-s*s+u*(u+2*d)+m):u<=l?(s=0,u=Math.min(Math.max(-p,-d),p),c=u*(u+2*d)+m):(s=Math.max(0,-(h*p+f)),u=s>0?p:Math.min(Math.max(-p,-d),p),c=-s*s+u*(u+2*d)+m);else u=h>0?-p:p,s=Math.max(0,-(h*u+f)),c=-s*s+u*(u+2*d)+m;return o&&o.copy(this.direction).multiplyScalar(s).add(this.origin),a&&a.copy(t).multiplyScalar(u).add(e),c}}(),intersectSphere:function(){var e=new c;return function(t,n){e.subVectors(t.center,this.origin);var r=e.dot(this.direction),i=e.dot(e)-r*r,o=t.radius*t.radius;if(i>o)return null;var a=Math.sqrt(o-i),s=r-a,u=r+a;return s<0&&u<0?null:s<0?this.at(u,n):this.at(s,n)}}(),intersectsSphere:function(e){return this.distanceToPoint(e.center)<=e.radius},distanceToPlane:function(e){var t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null},intersectPlane:function(e,t){var n=this.distanceToPlane(e);return null===n?null:this.at(n,t)},intersectsPlane:function(e){var t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0},intersectBox:function(e,t){var n,r,i,o,a,s,u=1/this.direction.x,c=1/this.direction.y,l=1/this.direction.z,p=this.origin;return u>=0?(n=(e.min.x-p.x)*u,r=(e.max.x-p.x)*u):(n=(e.max.x-p.x)*u,r=(e.min.x-p.x)*u),c>=0?(i=(e.min.y-p.y)*c,o=(e.max.y-p.y)*c):(i=(e.max.y-p.y)*c,o=(e.min.y-p.y)*c),n>o||i>r?null:((i>n||n!==n)&&(n=i),(o<r||r!==r)&&(r=o),l>=0?(a=(e.min.z-p.z)*l,s=(e.max.z-p.z)*l):(a=(e.max.z-p.z)*l,s=(e.min.z-p.z)*l),n>s||a>r?null:((a>n||n!==n)&&(n=a),(s<r||r!==r)&&(r=s),r<0?null:this.at(n>=0?n:r,t)))},intersectsBox:function(){var e=new c;return function(t){return null!==this.intersectBox(t,e)}}(),intersectTriangle:function(){var e=new c,t=new c,n=new c,r=new c;return function(i,o,a,s,u){t.subVectors(o,i),n.subVectors(a,i),r.crossVectors(t,n);var c,l=this.direction.dot(r);if(l>0){if(s)return null;c=1}else{if(!(l<0))return null;c=-1,l=-l}e.subVectors(this.origin,i);var p=c*this.direction.dot(n.crossVectors(e,n));if(p<0)return null;var h=c*this.direction.dot(t.cross(e));if(h<0)return null;if(p+h>l)return null;var f=-c*e.dot(r);return f<0?null:this.at(f/l,u)}}(),applyMatrix4:function(e){return this.direction.add(this.origin).applyMatrix4(e),this.origin.applyMatrix4(e),this.direction.sub(this.origin),this.direction.normalize(),this},equals:function(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}},se.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],se.DefaultOrder="XYZ",se.prototype={constructor:se,isEuler:!0,get x(){return this._x},set x(e){this._x=e,this.onChangeCallback()},get y(){return this._y},set y(e){this._y=e,this.onChangeCallback()},get z(){return this._z},set z(e){this._z=e,this.onChangeCallback()},get order(){return this._order},set order(e){this._order=e,this.onChangeCallback()},set:function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this.onChangeCallback(),this},setFromRotationMatrix:function(e,t,n){var r=Oa.clamp,i=e.elements,o=i[0],a=i[4],s=i[8],u=i[1],c=i[5],l=i[9],p=i[2],h=i[6],f=i[10];return t=t||this._order,"XYZ"===t?(this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-l,f),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(h,c),this._z=0)):"YXZ"===t?(this._x=Math.asin(-r(l,-1,1)),Math.abs(l)<.99999?(this._y=Math.atan2(s,f),this._z=Math.atan2(u,c)):(this._y=Math.atan2(-p,o),this._z=0)):"ZXY"===t?(this._x=Math.asin(r(h,-1,1)),Math.abs(h)<.99999?(this._y=Math.atan2(-p,f),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(u,o))):"ZYX"===t?(this._y=Math.asin(-r(p,-1,1)),Math.abs(p)<.99999?(this._x=Math.atan2(h,f),this._z=Math.atan2(u,o)):(this._x=0,this._z=Math.atan2(-a,c))):"YZX"===t?(this._z=Math.asin(r(u,-1,1)),Math.abs(u)<.99999?(this._x=Math.atan2(-l,c),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(s,f))):"XZY"===t?(this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(h,c),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-l,f),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+t),this._order=t,n!==!1&&this.onChangeCallback(),this},setFromQuaternion:function(){var e;return function(t,n,r){return void 0===e&&(e=new l),e.makeRotationFromQuaternion(t),this.setFromRotationMatrix(e,n,r)}}(),setFromVector3:function(e,t){return this.set(e.x,e.y,e.z,t||this._order)},reorder:function(){var e=new u;return function(t){return e.setFromEuler(this),this.setFromQuaternion(e,t)}}(),equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order},fromArray:function(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this.onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e},toVector3:function(e){return e?e.set(this._x,this._y,this._z):new c(this._x,this._y,this._z)},onChange:function(e){return this.onChangeCallback=e,this},onChangeCallback:function(){}},ue.prototype={constructor:ue,set:function(e){this.mask=1<<e},enable:function(e){this.mask|=1<<e},toggle:function(e){this.mask^=1<<e},disable:function(e){this.mask&=~(1<<e)},test:function(e){return 0!=(this.mask&e.mask)}},ce.DefaultUp=new c(0,1,0),ce.DefaultMatrixAutoUpdate=!0,Object.assign(ce.prototype,t.prototype,{isObject3D:!0,applyMatrix:function(e){this.matrix.multiplyMatrices(e,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},setRotationFromAxisAngle:function(e,t){this.quaternion.setFromAxisAngle(e,t)},setRotationFromEuler:function(e){this.quaternion.setFromEuler(e,!0)},setRotationFromMatrix:function(e){this.quaternion.setFromRotationMatrix(e)},setRotationFromQuaternion:function(e){this.quaternion.copy(e)},rotateOnAxis:function(){var e=new u;return function(t,n){return e.setFromAxisAngle(t,n),this.quaternion.multiply(e),this}}(),rotateX:function(){var e=new c(1,0,0);return function(t){return this.rotateOnAxis(e,t)}}(),rotateY:function(){var e=new c(0,1,0);return function(t){return this.rotateOnAxis(e,t)}}(),rotateZ:function(){var e=new c(0,0,1);return function(t){return this.rotateOnAxis(e,t)}}(),translateOnAxis:function(){var e=new c;return function(t,n){return e.copy(t).applyQuaternion(this.quaternion),this.position.add(e.multiplyScalar(n)),this}}(),translateX:function(){var e=new c(1,0,0);return function(t){return this.translateOnAxis(e,t)}}(),translateY:function(){var e=new c(0,1,0);return function(t){return this.translateOnAxis(e,t)}}(),translateZ:function(){var e=new c(0,0,1);return function(t){return this.translateOnAxis(e,t)}}(),localToWorld:function(e){return e.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var e=new l;return function(t){return t.applyMatrix4(e.getInverse(this.matrixWorld))}}(),lookAt:function(){var e=new l;return function(t){e.lookAt(t,this.position,this.up),this.quaternion.setFromRotationMatrix(e)}}(),add:function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,e.dispatchEvent({type:"added"}),this.children.push(e)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)},remove:function(e){if(arguments.length>1)for(var t=0;t<arguments.length;t++)this.remove(arguments[t]);var n=this.children.indexOf(e);n!==-1&&(e.parent=null,e.dispatchEvent({type:"removed"}),this.children.splice(n,1))},getObjectById:function(e){return this.getObjectByProperty("id",e)},getObjectByName:function(e){return this.getObjectByProperty("name",e)},getObjectByProperty:function(e,t){if(this[e]===t)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n],o=i.getObjectByProperty(e,t);if(void 0!==o)return o}},getWorldPosition:function(e){var t=e||new c;return this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var e=new c,t=new c;return function(n){var r=n||new u;return this.updateMatrixWorld(!0),this.matrixWorld.decompose(e,r,t),r}}(),getWorldRotation:function(){var e=new u;return function(t){var n=t||new se;return this.getWorldQuaternion(e),n.setFromQuaternion(e,this.rotation.order,!1)}}(),getWorldScale:function(){var e=new c,t=new u;return function(n){var r=n||new c;return this.updateMatrixWorld(!0),this.matrixWorld.decompose(e,t,r),r}}(),getWorldDirection:function(){var e=new u;return function(t){var n=t||new c;return this.getWorldQuaternion(e),n.set(0,0,1).applyQuaternion(e)}}(),raycast:function(){},traverse:function(e){e(this);for(var t=this.children,n=0,r=t.length;n<r;n++)t[n].traverse(e)},traverseVisible:function(e){if(this.visible!==!1){e(this);for(var t=this.children,n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}},traverseAncestors:function(e){var t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(e){this.matrixAutoUpdate===!0&&this.updateMatrix(),this.matrixWorldNeedsUpdate!==!0&&e!==!0||(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);for(var t=this.children,n=0,r=t.length;n<r;n++)t[n].updateMatrixWorld(e)},toJSON:function(e){function t(e){var t=[];for(var n in e){var r=e[n];delete r.metadata,t.push(r)}return t}var n=void 0===e||""===e,r={};n&&(e={geometries:{},materials:{},textures:{},images:{}},r.metadata={version:4.4,type:"Object",generator:"Object3D.toJSON"});var i={};if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),"{}"!==JSON.stringify(this.userData)&&(i.userData=this.userData),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),i.matrix=this.matrix.toArray(),void 0!==this.geometry&&(void 0===e.geometries[this.geometry.uuid]&&(e.geometries[this.geometry.uuid]=this.geometry.toJSON(e)),i.geometry=this.geometry.uuid),void 0!==this.material&&(void 0===e.materials[this.material.uuid]&&(e.materials[this.material.uuid]=this.material.toJSON(e)),i.material=this.material.uuid),this.children.length>0){i.children=[];for(var o=0;o<this.children.length;o++)i.children.push(this.children[o].toJSON(e).object)}if(n){var a=t(e.geometries),s=t(e.materials),u=t(e.textures),c=t(e.images);a.length>0&&(r.geometries=a),s.length>0&&(r.materials=s),u.length>0&&(r.textures=u),c.length>0&&(r.images=c)}return r.object=i,r},clone:function(e){return(new this.constructor).copy(this,e)},copy:function(e,t){if(void 0===t&&(t=!0),this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(var n=0;n<e.children.length;n++){var r=e.children[n];this.add(r.clone())}return this}});var Ua=0;pe.prototype={constructor:pe,set:function(e,t){return this.start.copy(e),this.end.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.start.copy(e.start),this.end.copy(e.end),this},getCenter:function(e){return(e||new c).addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(e){return(e||new c).subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(e,t){var n=t||new c;return this.delta(n).multiplyScalar(e).add(this.start)},closestPointToPointParameter:function(){var e=new c,t=new c;return function(n,r){e.subVectors(n,this.start),t.subVectors(this.end,this.start);var i=t.dot(t),o=t.dot(e),a=o/i;return r&&(a=Oa.clamp(a,0,1)),a}}(),closestPointToPoint:function(e,t,n){var r=this.closestPointToPointParameter(e,t),i=n||new c;return this.delta(i).multiplyScalar(r).add(this.start)},applyMatrix4:function(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this},equals:function(e){return e.start.equals(this.start)&&e.end.equals(this.end)}},he.normal=function(){var e=new c;return function(t,n,r,i){var o=i||new c;o.subVectors(r,n),e.subVectors(t,n),o.cross(e);var a=o.lengthSq();return a>0?o.multiplyScalar(1/Math.sqrt(a)):o.set(0,0,0)}}(),he.barycoordFromPoint=function(){var e=new c,t=new c,n=new c;return function(r,i,o,a,s){e.subVectors(a,i),t.subVectors(o,i),n.subVectors(r,i);var u=e.dot(e),l=e.dot(t),p=e.dot(n),h=t.dot(t),f=t.dot(n),d=u*h-l*l,m=s||new c;if(0===d)return m.set(-2,-1,-1);var v=1/d,y=(h*p-l*f)*v,g=(u*f-l*p)*v;return m.set(1-y-g,g,y)}}(),he.containsPoint=function(){var e=new c;return function(t,n,r,i){var o=he.barycoordFromPoint(t,n,r,i,e);return o.x>=0&&o.y>=0&&o.x+o.y<=1}}(),he.prototype={constructor:he,set:function(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this},setFromPointsAndIndices:function(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this},area:function(){var e=new c,t=new c;return function(){return e.subVectors(this.c,this.b),t.subVectors(this.a,this.b),.5*e.cross(t).length()}}(),midpoint:function(e){return(e||new c).addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},normal:function(e){return he.normal(this.a,this.b,this.c,e)},plane:function(e){return(e||new re).setFromCoplanarPoints(this.a,this.b,this.c)},barycoordFromPoint:function(e,t){return he.barycoordFromPoint(e,this.a,this.b,this.c,t)},containsPoint:function(e){return he.containsPoint(e,this.a,this.b,this.c)},closestPointToPoint:function(){var e,t,n,r;return function(i,o){void 0===e&&(e=new re,t=[new pe,new pe,new pe],n=new c,r=new c);var a=o||new c,s=1/0;if(e.setFromCoplanarPoints(this.a,this.b,this.c),e.projectPoint(i,n),this.containsPoint(n)===!0)a.copy(n);else{t[0].set(this.a,this.b),t[1].set(this.b,this.c),t[2].set(this.c,this.a);for(var u=0;u<t.length;u++){t[u].closestPointToPoint(n,!0,r);var l=n.distanceToSquared(r);l<s&&(s=l,a.copy(r))}}return a}}(),equals:function(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},fe.prototype={constructor:fe,clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.a=e.a,this.b=e.b,this.c=e.c,this.normal.copy(e.normal),this.color.copy(e.color),this.materialIndex=e.materialIndex;for(var t=0,n=e.vertexNormals.length;t<n;t++)this.vertexNormals[t]=e.vertexNormals[t].clone();for(var t=0,n=e.vertexColors.length;t<n;t++)this.vertexColors[t]=e.vertexColors[t].clone();return this}},de.prototype=Object.create(Q.prototype),de.prototype.constructor=de,de.prototype.isMeshBasicMaterial=!0,de.prototype.copy=function(e){return Q.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this},me.prototype={constructor:me,isBufferAttribute:!0,set needsUpdate(e){e===!0&&this.version++},setArray:function(e){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.count=void 0!==e?e.length/this.itemSize:0,this.array=e},setDynamic:function(e){return this.dynamic=e,this},copy:function(e){return this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.dynamic=e.dynamic,this},copyAt:function(e,t,n){e*=this.itemSize,n*=t.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this},copyArray:function(e){return this.array.set(e),this},copyColorsArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new X),t[n++]=o.r,t[n++]=o.g,t[n++]=o.b}return this},copyIndicesArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];t[n++]=o.a,t[n++]=o.b,t[n++]=o.c}return this},copyVector2sArray:function(e){for(var t=this.array,r=0,i=0,o=e.length;i<o;i++){var a=e[i];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",i),a=new n),t[r++]=a.x,t[r++]=a.y}return this},copyVector3sArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new c),t[n++]=o.x,t[n++]=o.y,t[n++]=o.z}return this},copyVector4sArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var a=e[r];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),a=new o),t[n++]=a.x,t[n++]=a.y,t[n++]=a.z,t[n++]=a.w}return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},getX:function(e){return this.array[e*this.itemSize]},setX:function(e,t){return this.array[e*this.itemSize]=t,this},getY:function(e){return this.array[e*this.itemSize+1]},setY:function(e,t){return this.array[e*this.itemSize+1]=t,this},getZ:function(e){return this.array[e*this.itemSize+2]},setZ:function(e,t){return this.array[e*this.itemSize+2]=t,this},getW:function(e){return this.array[e*this.itemSize+3]},setW:function(e,t){return this.array[e*this.itemSize+3]=t,this},setXY:function(e,t,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this},setXYZ:function(e,t,n,r){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this},setXYZW:function(e,t,n,r,i){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this},clone:function(){return(new this.constructor).copy(this)}},Object.assign(Pe.prototype,t.prototype,{isGeometry:!0,applyMatrix:function(e){for(var t=(new ne).getNormalMatrix(e),n=0,r=this.vertices.length;n<r;n++){this.vertices[n].applyMatrix4(e)}for(var n=0,r=this.faces.length;n<r;n++){var i=this.faces[n];i.normal.applyMatrix3(t).normalize();for(var o=0,a=i.vertexNormals.length;o<a;o++)i.vertexNormals[o].applyMatrix3(t).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var e;return function(t){return void 0===e&&(e=new l),e.makeRotationX(t),this.applyMatrix(e),this}}(),rotateY:function(){var e;return function(t){return void 0===e&&(e=new l),e.makeRotationY(t),this.applyMatrix(e),this}}(),rotateZ:function(){var e;return function(t){return void 0===e&&(e=new l),e.makeRotationZ(t),this.applyMatrix(e),this}}(),translate:function(){var e;return function(t,n,r){return void 0===e&&(e=new l),e.makeTranslation(t,n,r),this.applyMatrix(e),this}}(),scale:function(){var e;return function(t,n,r){return void 0===e&&(e=new l),e.makeScale(t,n,r),this.applyMatrix(e),this}}(),lookAt:function(){var e;return function(t){void 0===e&&(e=new ce),e.lookAt(t),e.updateMatrix(),this.applyMatrix(e.matrix)}}(),fromBufferGeometry:function(e){function t(e,t,n,i){var o=void 0!==s?[h[e].clone(),h[t].clone(),h[n].clone()]:[],a=void 0!==u?[r.colors[e].clone(),r.colors[t].clone(),r.colors[n].clone()]:[],c=new fe(e,t,n,o,a,i);r.faces.push(c),void 0!==l&&r.faceVertexUvs[0].push([f[e].clone(),f[t].clone(),f[n].clone()]),void 0!==p&&r.faceVertexUvs[1].push([d[e].clone(),d[t].clone(),d[n].clone()])}var r=this,i=null!==e.index?e.index.array:void 0,o=e.attributes,a=o.position.array,s=void 0!==o.normal?o.normal.array:void 0,u=void 0!==o.color?o.color.array:void 0,l=void 0!==o.uv?o.uv.array:void 0,p=void 0!==o.uv2?o.uv2.array:void 0;void 0!==p&&(this.faceVertexUvs[1]=[]);for(var h=[],f=[],d=[],m=0,v=0;m<a.length;m+=3,v+=2)r.vertices.push(new c(a[m],a[m+1],a[m+2])),void 0!==s&&h.push(new c(s[m],s[m+1],s[m+2])),void 0!==u&&r.colors.push(new X(u[m],u[m+1],u[m+2])),void 0!==l&&f.push(new n(l[v],l[v+1])),void 0!==p&&d.push(new n(p[v],p[v+1]));if(void 0!==i){var y=e.groups;if(y.length>0)for(var m=0;m<y.length;m++)for(var g=y[m],_=g.start,b=g.count,v=_,w=_+b;v<w;v+=3)t(i[v],i[v+1],i[v+2],g.materialIndex);else for(var m=0;m<i.length;m+=3)t(i[m],i[m+1],i[m+2])}else for(var m=0;m<a.length/3;m+=3)t(m,m+1,m+2);return this.computeFaceNormals(),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this},center:function(){this.computeBoundingBox();var e=this.boundingBox.getCenter().negate();return this.translate(e.x,e.y,e.z),e},normalize:function(){this.computeBoundingSphere();var e=this.boundingSphere.center,t=this.boundingSphere.radius,n=0===t?1:1/t,r=new l;return r.set(n,0,0,-n*e.x,0,n,0,-n*e.y,0,0,n,-n*e.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var e=new c,t=new c,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],o=this.vertices[i.a],a=this.vertices[i.b],s=this.vertices[i.c];e.subVectors(s,a),t.subVectors(o,a),e.cross(t),e.normalize(),i.normal.copy(e)}},computeVertexNormals:function(e){void 0===e&&(e=!0);var t,n,r,i,o,a;for(a=new Array(this.vertices.length),t=0,n=this.vertices.length;t<n;t++)a[t]=new c;if(e){var s,u,l,p=new c,h=new c;for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],s=this.vertices[o.a],u=this.vertices[o.b],l=this.vertices[o.c],p.subVectors(l,u),h.subVectors(s,u),p.cross(h),a[o.a].add(p),a[o.b].add(p),a[o.c].add(p)}else for(this.computeFaceNormals(),r=0,i=this.faces.length;r<i;r++)o=this.faces[r],a[o.a].add(o.normal),a[o.b].add(o.normal),a[o.c].add(o.normal);for(t=0,n=this.vertices.length;t<n;t++)a[t].normalize();for(r=0,i=this.faces.length;r<i;r++){o=this.faces[r];var f=o.vertexNormals;3===f.length?(f[0].copy(a[o.a]),f[1].copy(a[o.b]),f[2].copy(a[o.c])):(f[0]=a[o.a].clone(),f[1]=a[o.b].clone(),f[2]=a[o.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var e,t,n;for(this.computeFaceNormals(),e=0,t=this.faces.length;e<t;e++){n=this.faces[e];var r=n.vertexNormals;3===r.length?(r[0].copy(n.normal),r[1].copy(n.normal),r[2].copy(n.normal)):(r[0]=n.normal.clone(),r[1]=n.normal.clone(),r[2]=n.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var e,t,n,r,i;for(n=0,r=this.faces.length;n<r;n++)for(i=this.faces[n],i.__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]),e=0,t=i.vertexNormals.length;e<t;e++)i.__originalVertexNormals[e]?i.__originalVertexNormals[e].copy(i.vertexNormals[e]):i.__originalVertexNormals[e]=i.vertexNormals[e].clone();var o=new Pe;for(o.faces=this.faces,e=0,t=this.morphTargets.length;e<t;e++){if(!this.morphNormals[e]){this.morphNormals[e]={},this.morphNormals[e].faceNormals=[],this.morphNormals[e].vertexNormals=[];var a,s,u=this.morphNormals[e].faceNormals,l=this.morphNormals[e].vertexNormals;for(n=0,r=this.faces.length;n<r;n++)a=new c,s={a:new c,b:new c,c:new c},u.push(a),l.push(s)}var p=this.morphNormals[e];o.vertices=this.morphTargets[e].vertices,o.computeFaceNormals(),o.computeVertexNormals();var a,s;for(n=0,r=this.faces.length;n<r;n++)i=this.faces[n],a=p.faceNormals[n],s=p.vertexNormals[n],a.copy(i.normal),s.a.copy(i.vertexNormals[0]),s.b.copy(i.vertexNormals[1]),s.c.copy(i.vertexNormals[2])}for(n=0,r=this.faces.length;n<r;n++)i=this.faces[n],i.normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeTangents:function(){console.warn("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){for(var e=0,t=this.vertices,n=0,r=t.length;n<r;n++)n>0&&(e+=t[n].distanceTo(t[n-1])),this.lineDistances[n]=e},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new ee),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new te),this.boundingSphere.setFromPoints(this.vertices)},merge:function(e,t,n){if((e&&e.isGeometry)===!1)return void console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",e);var r,i=this.vertices.length,o=this.vertices,a=e.vertices,s=this.faces,u=e.faces,c=this.faceVertexUvs[0],l=e.faceVertexUvs[0],p=this.colors,h=e.colors;void 0===n&&(n=0),void 0!==t&&(r=(new ne).getNormalMatrix(t));for(var f=0,d=a.length;f<d;f++){var m=a[f],v=m.clone();void 0!==t&&v.applyMatrix4(t),o.push(v)}for(var f=0,d=h.length;f<d;f++)p.push(h[f].clone());for(f=0,d=u.length;f<d;f++){var y,g,_,b=u[f],w=b.vertexNormals,x=b.vertexColors;y=new fe(b.a+i,b.b+i,b.c+i),y.normal.copy(b.normal),void 0!==r&&y.normal.applyMatrix3(r).normalize();for(var M=0,E=w.length;M<E;M++)g=w[M].clone(),void 0!==r&&g.applyMatrix3(r).normalize(),y.vertexNormals.push(g);y.color.copy(b.color);for(var M=0,E=x.length;M<E;M++)_=x[M],y.vertexColors.push(_.clone());y.materialIndex=b.materialIndex+n,s.push(y)}for(f=0,d=l.length;f<d;f++){var O=l[f],P=[];if(void 0!==O){for(var M=0,E=O.length;M<E;M++)P.push(O[M].clone());c.push(P)}}},mergeMesh:function(e){if((e&&e.isMesh)===!1)return void console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",e);e.matrixAutoUpdate&&e.updateMatrix(),this.merge(e.geometry,e.matrix)},mergeVertices:function(){var e,t,n,r,i,o,a,s,u={},c=[],l=[],p=Math.pow(10,4);for(n=0,r=this.vertices.length;n<r;n++)e=this.vertices[n],t=Math.round(e.x*p)+"_"+Math.round(e.y*p)+"_"+Math.round(e.z*p),void 0===u[t]?(u[t]=n,c.push(this.vertices[n]),l[n]=c.length-1):l[n]=l[u[t]];var h=[];for(n=0,r=this.faces.length;n<r;n++){i=this.faces[n],i.a=l[i.a],i.b=l[i.b],i.c=l[i.c],o=[i.a,i.b,i.c];for(var f=0;f<3;f++)if(o[f]===o[(f+1)%3]){f,h.push(n);break}}for(n=h.length-1;n>=0;n--){var d=h[n];for(this.faces.splice(d,1),a=0,s=this.faceVertexUvs.length;a<s;a++)this.faceVertexUvs[a].splice(d,1)}var m=this.vertices.length-c.length;return this.vertices=c,m},sortFacesByMaterialIndex:function(){function e(e,t){return e.materialIndex-t.materialIndex}for(var t=this.faces,n=t.length,r=0;r<n;r++)t[r]._id=r;t.sort(e);var i,o,a=this.faceVertexUvs[0],s=this.faceVertexUvs[1];a&&a.length===n&&(i=[]),s&&s.length===n&&(o=[]);for(var r=0;r<n;r++){var u=t[r]._id;i&&i.push(a[u]),o&&o.push(s[u])}i&&(this.faceVertexUvs[0]=i),o&&(this.faceVertexUvs[1]=o)},toJSON:function(){function e(e,t,n){return n?e|1<<t:e&~(1<<t)}function t(e){var t=e.x.toString()+e.y.toString()+e.z.toString();return void 0!==h[t]?h[t]:(h[t]=p.length/3,p.push(e.x,e.y,e.z),h[t])}function n(e){var t=e.r.toString()+e.g.toString()+e.b.toString();return void 0!==d[t]?d[t]:(d[t]=f.length,f.push(e.getHex()),d[t])}function r(e){var t=e.x.toString()+e.y.toString();return void 0!==v[t]?v[t]:(v[t]=m.length/2,m.push(e.x,e.y),v[t])}var i={metadata:{version:4.4,type:"Geometry",generator:"Geometry.toJSON"}};if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),void 0!==this.parameters){var o=this.parameters;for(var a in o)void 0!==o[a]&&(i[a]=o[a]);return i}for(var s=[],u=0;u<this.vertices.length;u++){var c=this.vertices[u];s.push(c.x,c.y,c.z)}for(var l=[],p=[],h={},f=[],d={},m=[],v={},u=0;u<this.faces.length;u++){var y=this.faces[u],g=void 0!==this.faceVertexUvs[0][u],_=y.normal.length()>0,b=y.vertexNormals.length>0,w=1!==y.color.r||1!==y.color.g||1!==y.color.b,x=y.vertexColors.length>0,M=0;if(M=e(M,0,0),M=e(M,1,!0),M=e(M,2,!1),M=e(M,3,g),M=e(M,4,_),M=e(M,5,b),M=e(M,6,w),M=e(M,7,x),l.push(M),l.push(y.a,y.b,y.c),l.push(y.materialIndex),g){var E=this.faceVertexUvs[0][u];l.push(r(E[0]),r(E[1]),r(E[2]))}if(_&&l.push(t(y.normal)),b){var O=y.vertexNormals;l.push(t(O[0]),t(O[1]),t(O[2]))}if(w&&l.push(n(y.color)),x){var P=y.vertexColors;l.push(n(P[0]),n(P[1]),n(P[2]))}}return i.data={},i.data.vertices=s,i.data.normals=p,f.length>0&&(i.data.colors=f),m.length>0&&(i.data.uvs=[m]),i.data.faces=l,i},clone:function(){return(new Pe).copy(this)},copy:function(e){this.vertices=[],this.faces=[],this.faceVertexUvs=[[]],this.colors=[];for(var t=e.vertices,n=0,r=t.length;n<r;n++)this.vertices.push(t[n].clone());for(var i=e.colors,n=0,r=i.length;n<r;n++)this.colors.push(i[n].clone());for(var o=e.faces,n=0,r=o.length;n<r;n++)this.faces.push(o[n].clone());for(var n=0,r=e.faceVertexUvs.length;n<r;n++){var a=e.faceVertexUvs[n];void 0===this.faceVertexUvs[n]&&(this.faceVertexUvs[n]=[]);for(var s=0,u=a.length;s<u;s++){for(var c=a[s],l=[],p=0,h=c.length;p<h;p++){var f=c[p];l.push(f.clone())}this.faceVertexUvs[n].push(l)}}return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});var Fa=0;Object.assign(Se.prototype,t.prototype,{computeBoundingBox:Pe.prototype.computeBoundingBox,computeBoundingSphere:Pe.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(e){for(var t,n,r=[],i=e.faces,o=0;o<i.length;o++){var a=i[o];a.materialIndex!==n&&(n=a.materialIndex,void 0!==t&&(t.count=3*o-t.start,r.push(t)),t={start:3*o,materialIndex:n})}void 0!==t&&(t.count=3*o-t.start,r.push(t)),this.groups=r},fromGeometry:function(e){var t,r=e.faces,i=e.vertices,o=e.faceVertexUvs,a=o[0]&&o[0].length>0,s=o[1]&&o[1].length>0,u=e.morphTargets,c=u.length;if(c>0){t=[];for(var l=0;l<c;l++)t[l]=[];this.morphTargets.position=t}var p,h=e.morphNormals,f=h.length;if(f>0){p=[];for(var l=0;l<f;l++)p[l]=[];this.morphTargets.normal=p}for(var d=e.skinIndices,m=e.skinWeights,v=d.length===i.length,y=m.length===i.length,l=0;l<r.length;l++){var g=r[l];this.vertices.push(i[g.a],i[g.b],i[g.c]);var _=g.vertexNormals;if(3===_.length)this.normals.push(_[0],_[1],_[2]);else{var b=g.normal;this.normals.push(b,b,b)}var w=g.vertexColors;if(3===w.length)this.colors.push(w[0],w[1],w[2]);else{var x=g.color;this.colors.push(x,x,x)}if(a===!0){var M=o[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 n,new n,new n))}if(s===!0){var M=o[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 n,new n,new n))}for(var E=0;E<c;E++){var O=u[E].vertices;t[E].push(O[g.a],O[g.b],O[g.c])}for(var E=0;E<f;E++){var P=h[E].vertexNormals[l];p[E].push(P.a,P.b,P.c)}v&&this.skinIndices.push(d[g.a],d[g.b],d[g.c]),y&&this.skinWeights.push(m[g.a],m[g.b],m[g.c])}return this.computeGroups(e),this.verticesNeedUpdate=e.verticesNeedUpdate,this.normalsNeedUpdate=e.normalsNeedUpdate,this.colorsNeedUpdate=e.colorsNeedUpdate,this.uvsNeedUpdate=e.uvsNeedUpdate,this.groupsNeedUpdate=e.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.assign(Ce.prototype,t.prototype,{isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(e){this.index=e},addAttribute:function(e,t){return(t&&t.isBufferAttribute)===!1&&(t&&t.isInterleavedBufferAttribute)===!1?(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(e,new me(arguments[1],arguments[2]))):"index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(t)):(this.attributes[e]=t,this)},getAttribute:function(e){return this.attributes[e]},removeAttribute:function(e){return delete this.attributes[e],this},addGroup:function(e,t,n){this.groups.push({start:e,count:t,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(e,t){this.drawRange.start=e,this.drawRange.count=t},applyMatrix:function(e){var t=this.attributes.position;void 0!==t&&(e.applyToVector3Array(t.array),t.needsUpdate=!0);var n=this.attributes.normal;if(void 0!==n){(new ne).getNormalMatrix(e).applyToVector3Array(n.array),n.needsUpdate=!0}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var e;return function(t){return void 0===e&&(e=new l),e.makeRotationX(t),this.applyMatrix(e),this}}(),rotateY:function(){var e;return function(t){return void 0===e&&(e=new l),e.makeRotationY(t),this.applyMatrix(e),this}}(),rotateZ:function(){var e;return function(t){return void 0===e&&(e=new l),e.makeRotationZ(t),this.applyMatrix(e),this}}(),translate:function(){var e;return function(t,n,r){return void 0===e&&(e=new l),e.makeTranslation(t,n,r),this.applyMatrix(e),this}}(),scale:function(){var e;return function(t,n,r){return void 0===e&&(e=new l),e.makeScale(t,n,r),this.applyMatrix(e),this}}(),lookAt:function(){var e;return function(t){void 0===e&&(e=new ce),e.lookAt(t),e.updateMatrix(),this.applyMatrix(e.matrix)}}(),center:function(){this.computeBoundingBox();var e=this.boundingBox.getCenter().negate();return this.translate(e.x,e.y,e.z),e},setFromObject:function(e){var t=e.geometry;if(e&&e.isPoints||e&&e.isLine){var n=new Me(3*t.vertices.length,3),r=new Me(3*t.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(t.vertices)),this.addAttribute("color",r.copyColorsArray(t.colors)),t.lineDistances&&t.lineDistances.length===t.vertices.length){var i=new Me(t.lineDistances.length,1);this.addAttribute("lineDistance",i.copyArray(t.lineDistances))}null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone())}else e&&e.isMesh&&t&&t.isGeometry&&this.fromGeometry(t);return this},updateFromObject:function(e){var t=e.geometry;if(e&&e.isMesh){var n=t.__directGeometry;if(t.elementsNeedUpdate===!0&&(n=void 0,t.elementsNeedUpdate=!1),void 0===n)return this.fromGeometry(t);n.verticesNeedUpdate=t.verticesNeedUpdate,n.normalsNeedUpdate=t.normalsNeedUpdate,n.colorsNeedUpdate=t.colorsNeedUpdate,n.uvsNeedUpdate=t.uvsNeedUpdate,n.groupsNeedUpdate=t.groupsNeedUpdate,t.verticesNeedUpdate=!1,t.normalsNeedUpdate=!1,t.colorsNeedUpdate=!1,t.uvsNeedUpdate=!1,t.groupsNeedUpdate=!1,t=n}var r;return t.verticesNeedUpdate===!0&&(r=this.attributes.position,void 0!==r&&(r.copyVector3sArray(t.vertices),r.needsUpdate=!0),t.verticesNeedUpdate=!1),t.normalsNeedUpdate===!0&&(r=this.attributes.normal,void 0!==r&&(r.copyVector3sArray(t.normals),r.needsUpdate=!0),t.normalsNeedUpdate=!1),t.colorsNeedUpdate===!0&&(r=this.attributes.color,void 0!==r&&(r.copyColorsArray(t.colors),r.needsUpdate=!0),t.colorsNeedUpdate=!1),t.uvsNeedUpdate&&(r=this.attributes.uv,void 0!==r&&(r.copyVector2sArray(t.uvs),r.needsUpdate=!0),t.uvsNeedUpdate=!1),t.lineDistancesNeedUpdate&&(r=this.attributes.lineDistance,void 0!==r&&(r.copyArray(t.lineDistances),r.needsUpdate=!0),t.lineDistancesNeedUpdate=!1),t.groupsNeedUpdate&&(t.computeGroups(e.geometry),this.groups=t.groups,t.groupsNeedUpdate=!1),this},fromGeometry:function(e){return e.__directGeometry=(new Se).fromGeometry(e),this.fromDirectGeometry(e.__directGeometry)},fromDirectGeometry:function(e){var t=new Float32Array(3*e.vertices.length);if(this.addAttribute("position",new me(t,3).copyVector3sArray(e.vertices)),e.normals.length>0){var n=new Float32Array(3*e.normals.length);this.addAttribute("normal",new me(n,3).copyVector3sArray(e.normals))}if(e.colors.length>0){var r=new Float32Array(3*e.colors.length);this.addAttribute("color",new me(r,3).copyColorsArray(e.colors))}if(e.uvs.length>0){var i=new Float32Array(2*e.uvs.length);this.addAttribute("uv",new me(i,2).copyVector2sArray(e.uvs))}if(e.uvs2.length>0){var o=new Float32Array(2*e.uvs2.length);this.addAttribute("uv2",new me(o,2).copyVector2sArray(e.uvs2))}if(e.indices.length>0){var a=e.vertices.length>65535?Uint32Array:Uint16Array,s=new a(3*e.indices.length);this.setIndex(new me(s,1).copyIndicesArray(e.indices))}this.groups=e.groups;for(var u in e.morphTargets){for(var c=[],l=e.morphTargets[u],p=0,h=l.length;p<h;p++){var f=l[p],d=new Me(3*f.length,3);c.push(d.copyVector3sArray(f))}this.morphAttributes[u]=c}if(e.skinIndices.length>0){var m=new Me(4*e.skinIndices.length,4);this.addAttribute("skinIndex",m.copyVector4sArray(e.skinIndices))}if(e.skinWeights.length>0){var v=new Me(4*e.skinWeights.length,4);this.addAttribute("skinWeight",v.copyVector4sArray(e.skinWeights))}return null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new ee);var e=this.attributes.position.array;void 0!==e?this.boundingBox.setFromArray(e):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 e=new ee,t=new c;return function(){null===this.boundingSphere&&(this.boundingSphere=new te);var n=this.attributes.position;if(n){var r=n.array,i=this.boundingSphere.center;e.setFromArray(r),e.getCenter(i);for(var o=0,a=0,s=r.length;a<s;a+=3)t.fromArray(r,a),o=Math.max(o,i.distanceToSquared(t));this.boundingSphere.radius=Math.sqrt(o),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 e=this.index,t=this.attributes,n=this.groups;if(t.position){var r=t.position.array;if(void 0===t.normal)this.addAttribute("normal",new me(new Float32Array(r.length),3));else for(var i=t.normal.array,o=0,a=i.length;o<a;o++)i[o]=0;var s,u,l,p=t.normal.array,h=new c,f=new c,d=new c,m=new c,v=new c;if(e){var y=e.array;0===n.length&&this.addGroup(0,y.length);for(var g=0,_=n.length;g<_;++g)for(var b=n[g],w=b.start,x=b.count,o=w,a=w+x;o<a;o+=3)s=3*y[o+0],u=3*y[o+1],l=3*y[o+2],h.fromArray(r,s),f.fromArray(r,u),d.fromArray(r,l),m.subVectors(d,f),v.subVectors(h,f),m.cross(v),p[s]+=m.x,p[s+1]+=m.y,p[s+2]+=m.z,p[u]+=m.x,p[u+1]+=m.y,p[u+2]+=m.z,p[l]+=m.x,p[l+1]+=m.y,p[l+2]+=m.z}else for(var o=0,a=r.length;o<a;o+=9)h.fromArray(r,o),f.fromArray(r,o+3),d.fromArray(r,o+6),m.subVectors(d,f),v.subVectors(h,f),m.cross(v),p[o]=m.x,p[o+1]=m.y,p[o+2]=m.z,p[o+3]=m.x,p[o+4]=m.y,p[o+5]=m.z,p[o+6]=m.x,p[o+7]=m.y,p[o+8]=m.z;this.normalizeNormals(),t.normal.needsUpdate=!0}},merge:function(e,t){if((e&&e.isBufferGeometry)===!1)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e);void 0===t&&(t=0);var n=this.attributes;for(var r in n)if(void 0!==e.attributes[r])for(var i=n[r],o=i.array,a=e.attributes[r],s=a.array,u=a.itemSize,c=0,l=u*t;c<s.length;c++,l++)o[l]=s[c];return this},normalizeNormals:function(){for(var e,t,n,r,i=this.attributes.normal.array,o=0,a=i.length;o<a;o+=3)e=i[o],t=i[o+1],n=i[o+2],r=1/Math.sqrt(e*e+t*t+n*n),i[o]*=r,i[o+1]*=r,i[o+2]*=r},toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var e=new Ce,t=this.index.array,n=this.attributes;for(var r in n){for(var i=n[r],o=i.array,a=i.itemSize,s=new o.constructor(t.length*a),u=0,c=0,l=0,p=t.length;l<p;l++){u=t[l]*a;for(var h=0;h<a;h++)s[c++]=o[u++]}e.addAttribute(r,new me(s,a))}return e},toJSON:function(){var e={metadata:{version:4.4,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),void 0!==this.parameters){var t=this.parameters;for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};var r=this.index;if(null!==r){var i=Array.prototype.slice.call(r.array);e.data.index={type:r.array.constructor.name,array:i}}var o=this.attributes;for(var n in o){var a=o[n],i=Array.prototype.slice.call(a.array);e.data.attributes[n]={itemSize:a.itemSize,type:a.array.constructor.name,array:i,normalized:a.normalized}}var s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));var u=this.boundingSphere;return null!==u&&(e.data.boundingSphere={center:u.center.toArray(),radius:u.radius}),e},clone:function(){return(new Ce).copy(this)},copy:function(e){var t=e.index;null!==t&&this.setIndex(t.clone());var n=e.attributes;for(var r in n){var i=n[r];this.addAttribute(r,i.clone())}for(var o=e.groups,a=0,s=o.length;a<s;a++){var u=o[a];this.addGroup(u.start,u.count,u.materialIndex)}return this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Ce.MaxIndex=65535,Re.prototype=Object.assign(Object.create(ce.prototype),{constructor:Re,isMesh:!0,setDrawMode:function(e){this.drawMode=e},copy:function(e){return ce.prototype.copy.call(this,e),this.drawMode=e.drawMode,this},updateMorphTargets:function(){var e=this.geometry.morphTargets;if(void 0!==e&&e.length>0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var t=0,n=e.length;t<n;t++)this.morphTargetInfluences.push(0),this.morphTargetDictionary[e[t].name]=t}},raycast:function(){function e(e,t,n,r,i,o,a){return he.barycoordFromPoint(e,t,n,r,g),i.multiplyScalar(g.x),o.multiplyScalar(g.y),a.multiplyScalar(g.z),i.add(o).add(a),i.clone()}function t(e,t,n,r,i,o,a){var s=e.material;if(null===(s.side===Ei?n.intersectTriangle(o,i,r,!0,a):n.intersectTriangle(r,i,o,s.side!==Oi,a)))return null;b.copy(a),b.applyMatrix4(e.matrixWorld);var u=t.ray.origin.distanceTo(b);return u<t.near||u>t.far?null:{distance:u,point:b.clone(),object:e}}function r(n,r,i,o,a,c,l,h){s.fromArray(o,3*c),u.fromArray(o,3*l),p.fromArray(o,3*h);var f=t(n,r,i,s,u,p,_);return f&&(a&&(m.fromArray(a,2*c),v.fromArray(a,2*l),y.fromArray(a,2*h),f.uv=e(_,s,u,p,m,v,y)),f.face=new fe(c,l,h,he.normal(s,u,p)),f.faceIndex=c),f}var i=new l,o=new ae,a=new te,s=new c,u=new c,p=new c,h=new c,f=new c,d=new c,m=new n,v=new n,y=new n,g=new c,_=new c,b=new c;return function(n,c){var l=this.geometry,g=this.material,b=this.matrixWorld;if(void 0!==g&&(null===l.boundingSphere&&l.computeBoundingSphere(),a.copy(l.boundingSphere),a.applyMatrix4(b),n.ray.intersectsSphere(a)!==!1&&(i.getInverse(b),o.copy(n.ray).applyMatrix4(i),null===l.boundingBox||o.intersectsBox(l.boundingBox)!==!1))){var w,x;if(l&&l.isBufferGeometry){var M,E,O,P=l.index,T=l.attributes,S=T.position.array;if(void 0!==T.uv&&(w=T.uv.array),null!==P)for(var C=P.array,R=0,A=C.length;R<A;R+=3)M=C[R],E=C[R+1],O=C[R+2],(x=r(this,n,o,S,w,M,E,O))&&(x.faceIndex=Math.floor(R/3),c.push(x));else for(var R=0,A=S.length;R<A;R+=9)M=R/3,E=M+1,O=M+2,(x=r(this,n,o,S,w,M,E,O))&&(x.index=M,c.push(x))}else if(l&&l.isGeometry){var j,L,D,I=g&&g.isMultiMaterial,k=I===!0?g.materials:null,N=l.vertices,U=l.faces,F=l.faceVertexUvs[0];F.length>0&&(w=F);for(var B=0,z=U.length;B<z;B++){var G=U[B],H=I===!0?k[G.materialIndex]:g;if(void 0!==H){if(j=N[G.a],L=N[G.b],D=N[G.c],H.morphTargets===!0){var V=l.morphTargets,W=this.morphTargetInfluences;s.set(0,0,0),u.set(0,0,0),p.set(0,0,0);for(var X=0,q=V.length;X<q;X++){var Y=W[X];if(0!==Y){var Z=V[X].vertices;s.addScaledVector(h.subVectors(Z[G.a],j),Y),u.addScaledVector(f.subVectors(Z[G.b],L),Y),p.addScaledVector(d.subVectors(Z[G.c],D),Y)}}s.add(j),u.add(L),p.add(D),j=s,L=u,D=p}if(x=t(this,n,o,j,L,D,_)){if(w){var Q=w[B];m.copy(Q[0]),v.copy(Q[1]),y.copy(Q[2]),x.uv=e(_,j,L,D,m,v,y)}x.face=G,x.faceIndex=B,c.push(x)}}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Ae.prototype=Object.create(Ce.prototype),Ae.prototype.constructor=Ae,je.prototype=Object.create(Ce.prototype),je.prototype.constructor=je,Le.prototype=Object.create(ce.prototype),Le.prototype.constructor=Le,Le.prototype.isCamera=!0,Le.prototype.getWorldDirection=function(){var e=new u;return function(t){var n=t||new c;return this.getWorldQuaternion(e),n.set(0,0,-1).applyQuaternion(e)}}(),Le.prototype.lookAt=function(){var e=new l;return function(t){e.lookAt(this.position,t,this.up),this.quaternion.setFromRotationMatrix(e)}}(),Le.prototype.clone=function(){return(new this.constructor).copy(this)},Le.prototype.copy=function(e){return ce.prototype.copy.call(this,e),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this},De.prototype=Object.assign(Object.create(Le.prototype),{constructor:De,isPerspectiveCamera:!0,copy:function(e){return Le.prototype.copy.call(this,e),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this},setFocalLength:function(e){var t=.5*this.getFilmHeight()/e;this.fov=2*Oa.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var e=Math.tan(.5*Oa.DEG2RAD*this.fov);return.5*this.getFilmHeight()/e},getEffectiveFOV:function(){return 2*Oa.RAD2DEG*Math.atan(Math.tan(.5*Oa.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(e,t,n,r,i,o){this.aspect=e/t,this.view={fullWidth:e,fullHeight:t,offsetX:n,offsetY:r,width:i,height:o},this.updateProjectionMatrix()},clearViewOffset:function(){this.view=null,this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=this.near,t=e*Math.tan(.5*Oa.DEG2RAD*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==o){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,t-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var u=this.filmOffset;0!==u&&(i+=e*u/this.getFilmWidth()),this.projectionMatrix.makeFrustum(i,i+r,t-n,t,e,this.far)},toJSON:function(e){var t=ce.prototype.toJSON.call(this,e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}),Ie.prototype=Object.assign(Object.create(Le.prototype),{constructor:Ie,isOrthographicCamera:!0,copy:function(e){return Le.prototype.copy.call(this,e),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this},setViewOffset:function(e,t,n,r,i,o){this.view={fullWidth:e,fullHeight:t,offsetX:n,offsetY:r,width:i,height:o},this.updateProjectionMatrix()},clearViewOffset:function(){this.view=null,this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-e,o=n+e,a=r+t,s=r-t;if(null!==this.view){var u=this.zoom/(this.view.width/this.view.fullWidth),c=this.zoom/(this.view.height/this.view.fullHeight),l=(this.right-this.left)/this.view.width,p=(this.top-this.bottom)/this.view.height;i+=l*(this.view.offsetX/u),o=i+l*(this.view.width/u),a-=p*(this.view.offsetY/c),s=a-p*(this.view.height/c)}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far)},toJSON:function(e){var t=ce.prototype.toJSON.call(this,e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}});var Ba=0;ct.prototype.isFogExp2=!0,ct.prototype.clone=function(){return new ct(this.color.getHex(),this.density)},ct.prototype.toJSON=function(e){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},lt.prototype.isFog=!0,lt.prototype.clone=function(){return new lt(this.color.getHex(),this.near,this.far)},lt.prototype.toJSON=function(e){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},pt.prototype=Object.create(ce.prototype),pt.prototype.constructor=pt,pt.prototype.copy=function(e,t){return ce.prototype.copy.call(this,e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.fog&&(this.fog=e.fog.clone()),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this},pt.prototype.toJSON=function(e){var t=ce.prototype.toJSON.call(this,e);return null!==this.background&&(t.object.background=this.background.toJSON(e)),null!==this.fog&&(t.object.fog=this.fog.toJSON()),t},ht.prototype=Object.assign(Object.create(ce.prototype),{constructor:ht,isLensFlare:!0,copy:function(e){ce.prototype.copy.call(this,e),this.positionScreen.copy(e.positionScreen),this.customUpdateCallback=e.customUpdateCallback;for(var t=0,n=e.lensFlares.length;t<n;t++)this.lensFlares.push(e.lensFlares[t]);return this},add:function(e,t,n,r,i,o){void 0===t&&(t=-1),void 0===n&&(n=0),void 0===o&&(o=1),void 0===i&&(i=new X(16777215)),void 0===r&&(r=ji),n=Math.min(n,Math.max(0,n)),this.lensFlares.push({texture:e,size:t,distance:n,x:0,y:0,z:0,scale:1,rotation:0,opacity:o,color:i,blending:r})},updateLensFlares:function(){var e,t,n=this.lensFlares.length,r=2*-this.positionScreen.x,i=2*-this.positionScreen.y;for(e=0;e<n;e++)t=this.lensFlares[e],t.x=this.positionScreen.x+r*t.distance,t.y=this.positionScreen.y+i*t.distance,t.wantedRotation=t.x*Math.PI*.25,t.rotation+=.25*(t.wantedRotation-t.rotation)}}),ft.prototype=Object.create(Q.prototype),ft.prototype.constructor=ft,ft.prototype.copy=function(e){return Q.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.rotation=e.rotation,this},dt.prototype=Object.assign(Object.create(ce.prototype),{constructor:dt,isSprite:!0,raycast:function(){var e=new c;return function(t,n){e.setFromMatrixPosition(this.matrixWorld);var r=t.ray.distanceSqToPoint(e);r>this.scale.x*this.scale.y/4||n.push({distance:Math.sqrt(r),point:this.position,face:null,object:this})}}(),clone:function(){return new this.constructor(this.material).copy(this)}}),mt.prototype=Object.assign(Object.create(ce.prototype),{constructor:mt,copy:function(e){ce.prototype.copy.call(this,e,!1);for(var t=e.levels,n=0,r=t.length;n<r;n++){var i=t[n];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(e,t){void 0===t&&(t=0),t=Math.abs(t);for(var n=this.levels,r=0;r<n.length&&!(t<n[r].distance);r++);n.splice(r,0,{distance:t,object:e}),this.add(e)},getObjectForDistance:function(e){for(var t=this.levels,n=1,r=t.length;n<r&&!(e<t[n].distance);n++);return t[n-1].object},raycast:function(){var e=new c;return function(t,n){e.setFromMatrixPosition(this.matrixWorld);var r=t.ray.origin.distanceTo(e);this.getObjectForDistance(r).raycast(t,n)}}(),update:function(){var e=new c,t=new c;return function(n){var r=this.levels;if(r.length>1){e.setFromMatrixPosition(n.matrixWorld),t.setFromMatrixPosition(this.matrixWorld);var i=e.distanceTo(t);r[0].object.visible=!0;for(var o=1,a=r.length;o<a&&i>=r[o].distance;o++)r[o-1].object.visible=!1,r[o].object.visible=!0;for(;o<a;o++)r[o].object.visible=!1}}}(),toJSON:function(e){var t=ce.prototype.toJSON.call(this,e);t.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];t.object.levels.push({object:o.object.uuid,distance:o.distance})}return t}}),vt.prototype=Object.create(r.prototype),vt.prototype.constructor=vt,vt.prototype.isDataTexture=!0,Object.assign(yt.prototype,{calculateInverses:function(){this.boneInverses=[];for(var e=0,t=this.bones.length;e<t;e++){var n=new l;this.bones[e]&&n.getInverse(this.bones[e].matrixWorld),this.boneInverses.push(n)}},pose:function(){for(var e,t=0,n=this.bones.length;t<n;t++)(e=this.bones[t])&&e.matrixWorld.getInverse(this.boneInverses[t]);for(var t=0,n=this.bones.length;t<n;t++)(e=this.bones[t])&&(e.parent&&e.parent.isBone?(e.matrix.getInverse(e.parent.matrixWorld),e.matrix.multiply(e.matrixWorld)):e.matrix.copy(e.matrixWorld),e.matrix.decompose(e.position,e.quaternion,e.scale))},update:function(){var e=new l;return function(){for(var t=0,n=this.bones.length;t<n;t++){var r=this.bones[t]?this.bones[t].matrixWorld:this.identityMatrix;e.multiplyMatrices(r,this.boneInverses[t]),e.toArray(this.boneMatrices,16*t)}this.useVertexTexture&&(this.boneTexture.needsUpdate=!0)}}(),clone:function(){return new yt(this.bones,this.boneInverses,this.useVertexTexture)}}),gt.prototype=Object.assign(Object.create(ce.prototype),{constructor:gt,isBone:!0,copy:function(e){return ce.prototype.copy.call(this,e),this.skin=e.skin,this}}),_t.prototype=Object.assign(Object.create(Re.prototype),{constructor:_t,isSkinnedMesh:!0,bind:function(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.getInverse(t)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){if(this.geometry&&this.geometry.isGeometry)for(var e=0;e<this.geometry.skinWeights.length;e++){var t=this.geometry.skinWeights[e],n=1/t.lengthManhattan();n!==1/0?t.multiplyScalar(n):t.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry)for(var r=new o,i=this.geometry.attributes.skinWeight,e=0;e<i.count;e++){r.x=i.getX(e),r.y=i.getY(e),r.z=i.getZ(e),r.w=i.getW(e);var n=1/r.lengthManhattan();n!==1/0?r.multiplyScalar(n):r.set(1,0,0,0),i.setXYZW(e,r.x,r.y,r.z,r.w)}},updateMatrixWorld:function(e){Re.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)}}),bt.prototype=Object.create(Q.prototype),bt.prototype.constructor=bt,bt.prototype.isLineBasicMaterial=!0,bt.prototype.copy=function(e){return Q.prototype.copy.call(this,e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this},wt.prototype=Object.assign(Object.create(ce.prototype),{constructor:wt,isLine:!0,raycast:function(){var e=new l,t=new ae,n=new te;return function(r,i){var o=r.linePrecision,a=o*o,s=this.geometry,u=this.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(u),r.ray.intersectsSphere(n)!==!1){e.getInverse(u),t.copy(r.ray).applyMatrix4(e);var l=new c,p=new c,h=new c,f=new c,d=this&&this.isLineSegments?2:1;if(s&&s.isBufferGeometry){var m=s.index,v=s.attributes,y=v.position.array;if(null!==m)for(var g=m.array,_=0,b=g.length-1;_<b;_+=d){var w=g[_],x=g[_+1];l.fromArray(y,3*w),p.fromArray(y,3*x);var M=t.distanceSqToSegment(l,p,f,h);if(!(M>a)){f.applyMatrix4(this.matrixWorld);var E=r.ray.origin.distanceTo(f);E<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:_,face:null,faceIndex:null,object:this})}}else for(var _=0,b=y.length/3-1;_<b;_+=d){l.fromArray(y,3*_),p.fromArray(y,3*_+3);var M=t.distanceSqToSegment(l,p,f,h);if(!(M>a)){f.applyMatrix4(this.matrixWorld);var E=r.ray.origin.distanceTo(f);E<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:_,face:null,faceIndex:null,object:this})}}}else if(s&&s.isGeometry)for(var O=s.vertices,P=O.length,_=0;_<P-1;_+=d){var M=t.distanceSqToSegment(O[_],O[_+1],f,h);if(!(M>a)){f.applyMatrix4(this.matrixWorld);var E=r.ray.origin.distanceTo(f);E<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:_,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),xt.prototype=Object.assign(Object.create(wt.prototype),{constructor:xt,isLineSegments:!0}),Mt.prototype=Object.create(Q.prototype),Mt.prototype.constructor=Mt,Mt.prototype.isPointsMaterial=!0,Mt.prototype.copy=function(e){return Q.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this},Et.prototype=Object.assign(Object.create(ce.prototype),{constructor:Et,isPoints:!0,raycast:function(){var e=new l,t=new ae,n=new te;return function(r,i){function o(e,n){var o=t.distanceSqToPoint(e);if(o<h){var s=t.closestPointToPoint(e);s.applyMatrix4(u);var c=r.ray.origin.distanceTo(s);if(c<r.near||c>r.far)return;i.push({distance:c,distanceToRay:Math.sqrt(o),point:s.clone(),index:n,face:null,object:a})}}var a=this,s=this.geometry,u=this.matrixWorld,l=r.params.Points.threshold;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(u),r.ray.intersectsSphere(n)!==!1){e.getInverse(u),t.copy(r.ray).applyMatrix4(e);var p=l/((this.scale.x+this.scale.y+this.scale.z)/3),h=p*p,f=new c;if(s&&s.isBufferGeometry){var d=s.index,m=s.attributes,v=m.position.array;if(null!==d)for(var y=d.array,g=0,_=y.length;g<_;g++){var b=y[g];f.fromArray(v,3*b),o(f,b)}else for(var g=0,w=v.length/3;g<w;g++)f.fromArray(v,3*g),o(f,g)}else for(var x=s.vertices,g=0,w=x.length;g<w;g++)o(x[g],g)}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Ot.prototype=Object.assign(Object.create(ce.prototype),{constructor:Ot}),Pt.prototype=Object.create(r.prototype),Pt.prototype.constructor=Pt,Tt.prototype=Object.create(r.prototype),Tt.prototype.constructor=Tt,Tt.prototype.isCompressedTexture=!0,St.prototype=Object.create(r.prototype),St.prototype.constructor=St,Ct.prototype=Object.create(r.prototype),Ct.prototype.constructor=Ct,Ct.prototype.isDepthTexture=!0,Rt.prototype=Object.create(Ce.prototype),Rt.prototype.constructor=Rt,At.prototype=Object.create(Ce.prototype),At.prototype.constructor=At,jt.prototype=Object.create(Pe.prototype),jt.prototype.constructor=jt,Lt.prototype=Object.create(Ce.prototype),Lt.prototype.constructor=Lt,Dt.prototype=Object.create(Lt.prototype),Dt.prototype.constructor=Dt,It.prototype=Object.create(Pe.prototype),It.prototype.constructor=It,kt.prototype=Object.create(Lt.prototype),kt.prototype.constructor=kt,Nt.prototype=Object.create(Pe.prototype),Nt.prototype.constructor=Nt,Ut.prototype=Object.create(Lt.prototype),Ut.prototype.constructor=Ut,Ft.prototype=Object.create(Pe.prototype),Ft.prototype.constructor=Ft,Bt.prototype=Object.create(Lt.prototype),Bt.prototype.constructor=Bt,zt.prototype=Object.create(Pe.prototype),zt.prototype.constructor=zt,Gt.prototype=Object.create(Pe.prototype),Gt.prototype.constructor=Gt,Ht.prototype=Object.create(Ce.prototype),Ht.prototype.constructor=Ht,Vt.prototype=Object.create(Pe.prototype),Vt.prototype.constructor=Vt,Wt.prototype=Object.create(Ce.prototype),Wt.prototype.constructor=Wt,Xt.prototype=Object.create(Pe.prototype),Xt.prototype.constructor=Xt,qt.prototype=Object.create(Ce.prototype),qt.prototype.constructor=qt,Yt.prototype=Object.create(Pe.prototype),Yt.prototype.constructor=Yt;var za={area:function(e){for(var t=e.length,n=0,r=t-1,i=0;i<t;r=i++)n+=e[r].x*e[i].y-e[i].x*e[r].y;return.5*n},triangulate:function(){function e(e,t,n,r,i,o){var a,s,u,c,l,p,h,f,d;if(s=e[o[t]].x,u=e[o[t]].y,c=e[o[n]].x,l=e[o[n]].y,p=e[o[r]].x,h=e[o[r]].y,(c-s)*(h-u)-(l-u)*(p-s)<=0)return!1;var m,v,y,g,_,b,w,x,M,E,O,P,T,S,C;for(m=p-c,v=h-l,y=s-p,g=u-h,_=c-s,b=l-u,a=0;a<i;a++)if(f=e[o[a]].x,d=e[o[a]].y,!(f===s&&d===u||f===c&&d===l||f===p&&d===h)&&(w=f-s,x=d-u,M=f-c,E=d-l,O=f-p,P=d-h,C=m*E-v*M,T=_*x-b*w,S=y*P-g*O,C>=-Number.EPSILON&&S>=-Number.EPSILON&&T>=-Number.EPSILON))return!1;return!0}return function(t,n){var r=t.length;if(r<3)return null;var i,o,a,s=[],u=[],c=[];if(za.area(t)>0)for(o=0;o<r;o++)u[o]=o;else for(o=0;o<r;o++)u[o]=r-1-o;var l=r,p=2*l;for(o=l-1;l>2;){if(p--<=0)return console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()"),n?c:s;if(i=o,l<=i&&(i=0),o=i+1,l<=o&&(o=0),a=o+1,l<=a&&(a=0),e(t,i,o,a,l,u)){var h,f,d,m,v;for(h=u[i],f=u[o],d=u[a],s.push([t[h],t[f],t[d]]),c.push([u[i],u[o],u[a]]),m=o,v=o+1;v<l;m++,v++)u[m]=u[v];l--,p=2*l}}return n?c:s}}(),triangulateShape:function(e,t){function n(e){var t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function r(e,t,n){return e.x!==t.x?e.x<t.x?e.x<=n.x&&n.x<=t.x:t.x<=n.x&&n.x<=e.x:e.y<t.y?e.y<=n.y&&n.y<=t.y:t.y<=n.y&&n.y<=e.y}function i(e,t,n,i,o){var a=t.x-e.x,s=t.y-e.y,u=i.x-n.x,c=i.y-n.y,l=e.x-n.x,p=e.y-n.y,h=s*u-a*c,f=s*l-a*p;if(Math.abs(h)>Number.EPSILON){var d;if(h>0){if(f<0||f>h)return[];if((d=c*l-u*p)<0||d>h)return[]}else{if(f>0||f<h)return[];if((d=c*l-u*p)>0||d<h)return[]}if(0===d)return!o||0!==f&&f!==h?[e]:[];if(d===h)return!o||0!==f&&f!==h?[t]:[];if(0===f)return[n];if(f===h)return[i];var m=d/h;return[{x:e.x+m*a,y:e.y+m*s}]}if(0!==f||c*l!=u*p)return[];var v=0===a&&0===s,y=0===u&&0===c;if(v&&y)return e.x!==n.x||e.y!==n.y?[]:[e];if(v)return r(n,i,e)?[e]:[];if(y)return r(e,t,n)?[n]:[];var g,_,b,w,x,M,E,O;return 0!==a?(e.x<t.x?(g=e,b=e.x,_=t,w=t.x):(g=t,b=t.x,_=e,w=e.x),n.x<i.x?(x=n,E=n.x,M=i,O=i.x):(x=i,E=i.x,M=n,O=n.x)):(e.y<t.y?(g=e,b=e.y,_=t,w=t.y):(g=t,b=t.y,_=e,w=e.y),n.y<i.y?(x=n,E=n.y,M=i,O=i.y):(x=i,E=i.y,M=n,O=n.y)),b<=E?w<E?[]:w===E?o?[]:[x]:w<=O?[x,_]:[x,M]:b>O?[]:b===O?o?[]:[g]:w<=O?[g,_]:[g,M]}function o(e,t,n,r){var i=t.x-e.x,o=t.y-e.y,a=n.x-e.x,s=n.y-e.y,u=r.x-e.x,c=r.y-e.y,l=i*s-o*a,p=i*c-o*u;if(Math.abs(l)>Number.EPSILON){var h=u*s-c*a;return l>0?p>=0&&h>=0:p>=0||h>=0}return p>0}n(e),t.forEach(n);for(var a,s,u,c,l,p,h={},f=e.concat(),d=0,m=t.length;d<m;d++)Array.prototype.push.apply(f,t[d]);for(a=0,s=f.length;a<s;a++)l=f[a].x+":"+f[a].y,void 0!==h[l]&&console.warn("THREE.ShapeUtils: Duplicate point",l,a),h[l]=a;var v=function(e,t){for(var n,r,a,s,u,c,l,p,h,f,d,m=e.concat(),v=[],y=[],g=0,_=t.length;g<_;g++)v.push(g);for(var b=0,w=2*v.length;v.length>0;){if(--w<0){console.log("Infinite Loop! Holes left:"+v.length+", Probably Hole outside Shape!");break}for(a=b;a<m.length;a++){s=m[a],r=-1;for(var g=0;g<v.length;g++)if(c=v[g],l=s.x+":"+s.y+":"+c,void 0===y[l]){n=t[c];for(var x=0;x<n.length;x++)if(u=n[x],function(e,t){var r=m.length-1,i=e-1;i<0&&(i=r);var a=e+1;a>r&&(a=0);var s=o(m[e],m[i],m[a],n[t]);if(!s)return!1;var u=n.length-1,c=t-1;c<0&&(c=u);var l=t+1;return l>u&&(l=0),!!(s=o(n[t],n[c],n[l],m[e]))}(a,x)&&!function(e,t){var n,r,o;for(n=0;n<m.length;n++)if(r=n+1,r%=m.length,o=i(e,t,m[n],m[r],!0),o.length>0)return!0;return!1}(s,u)&&!function(e,n){var r,o,a,s,u;for(r=0;r<v.length;r++)for(o=t[v[r]],a=0;a<o.length;a++)if(s=a+1,s%=o.length,u=i(e,n,o[a],o[s],!0),u.length>0)return!0;return!1}(s,u)){r=x,v.splice(g,1),p=m.slice(0,a+1),h=m.slice(a),f=n.slice(r),d=n.slice(0,r+1),m=p.concat(f).concat(d).concat(h),b=a;break}if(r>=0)break;y[l]=!0}if(r>=0)break}}return m}(e,t),y=za.triangulate(v,!1);for(a=0,s=y.length;a<s;a++)for(c=y[a],u=0;u<3;u++)l=c[u].x+":"+c[u].y,void 0!==(p=h[l])&&(c[u]=p);return y.concat()},isClockWise:function(e){return za.area(e)<0},b2:function(){function e(e,t){var n=1-e;return n*n*t}function t(e,t){return 2*(1-e)*e*t}function n(e,t){return e*e*t}return function(r,i,o,a){return e(r,i)+t(r,o)+n(r,a)}}(),b3:function(){function e(e,t){var n=1-e;return n*n*n*t}function t(e,t){var n=1-e;return 3*n*n*e*t}function n(e,t){return 3*(1-e)*e*e*t}function r(e,t){return e*e*e*t}return function(i,o,a,s,u){return e(i,o)+t(i,a)+n(i,s)+r(i,u)}}()};Zt.prototype=Object.create(Pe.prototype),Zt.prototype.constructor=Zt,Zt.prototype.addShapeList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];this.addShape(i,t)}},Zt.prototype.addShape=function(e,t){function r(e,t,n){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(n).add(e)}function i(e,t,r){var i,o,a=1,s=e.x-t.x,u=e.y-t.y,c=r.x-e.x,l=r.y-e.y,p=s*s+u*u,h=s*l-u*c;if(Math.abs(h)>Number.EPSILON){var f=Math.sqrt(p),d=Math.sqrt(c*c+l*l),m=t.x-u/f,v=t.y+s/f,y=r.x-l/d,g=r.y+c/d,_=((y-m)*l-(g-v)*c)/(s*l-u*c);i=m+s*_-e.x,o=v+u*_-e.y;var b=i*i+o*o;if(b<=2)return new n(i,o);a=Math.sqrt(b/2)}else{var w=!1;s>Number.EPSILON?c>Number.EPSILON&&(w=!0):s<-Number.EPSILON?c<-Number.EPSILON&&(w=!0):Math.sign(u)===Math.sign(l)&&(w=!0),w?(i=-u,o=s,a=Math.sqrt(p)):(i=s,o=u,a=Math.sqrt(p/2))}return new n(i/a,o/a)}function o(e,t){var n,r;for(W=e.length;--W>=0;){n=W,r=W-1,r<0&&(r=e.length-1);var i=0,o=w+2*g;for(i=0;i<o;i++){var a=G*i,s=G*(i+1);u(t+n+a,t+r+a,t+r+s,t+n+s,e,i,o,n,r)}}}function a(e,t,n){S.vertices.push(new c(e,t,n))}function s(e,t,n){e+=C,t+=C,n+=C,S.faces.push(new fe(e,t,n,null,null,0));var r=E.generateTopUV(S,e,t,n);S.faceVertexUvs[0].push(r)}function u(e,t,n,r,i,o,a,s,u){e+=C,t+=C,n+=C,r+=C,S.faces.push(new fe(e,t,r,null,null,1)),S.faces.push(new fe(t,n,r,null,null,1));var c=E.generateSideWallUV(S,e,t,n,r);S.faceVertexUvs[0].push([c[0],c[1],c[3]]),S.faceVertexUvs[0].push([c[1],c[2],c[3]])}var l,p,h,f,d,m=void 0!==t.amount?t.amount:100,v=void 0!==t.bevelThickness?t.bevelThickness:6,y=void 0!==t.bevelSize?t.bevelSize:v-2,g=void 0!==t.bevelSegments?t.bevelSegments:3,_=void 0===t.bevelEnabled||t.bevelEnabled,b=void 0!==t.curveSegments?t.curveSegments:12,w=void 0!==t.steps?t.steps:1,x=t.extrudePath,M=!1,E=void 0!==t.UVGenerator?t.UVGenerator:Zt.WorldUVGenerator;x&&(l=x.getSpacedPoints(w),M=!0,_=!1,p=void 0!==t.frames?t.frames:x.computeFrenetFrames(w,!1),h=new c,f=new c,d=new c),_||(g=0,v=0,y=0);var O,P,T,S=this,C=this.vertices.length,R=e.extractPoints(b),A=R.shape,j=R.holes,L=!za.isClockWise(A);if(L){for(A=A.reverse(),P=0,T=j.length;P<T;P++)O=j[P],za.isClockWise(O)&&(j[P]=O.reverse());L=!1}var D=za.triangulateShape(A,j),I=A;for(P=0,T=j.length;P<T;P++)O=j[P],A=A.concat(O);for(var k,N,U,F,B,z,G=A.length,H=D.length,V=[],W=0,X=I.length,q=X-1,Y=W+1;W<X;W++,q++,Y++)q===X&&(q=0),Y===X&&(Y=0),V[W]=i(I[W],I[q],I[Y]);var Z,Q=[],J=V.concat();for(P=0,T=j.length;P<T;P++){for(O=j[P],Z=[],W=0,X=O.length,q=X-1,Y=W+1;W<X;W++,q++,Y++)q===X&&(q=0),Y===X&&(Y=0),Z[W]=i(O[W],O[q],O[Y]);Q.push(Z),J=J.concat(Z)}for(k=0;k<g;k++){for(U=k/g,F=v*Math.cos(U*Math.PI/2),N=y*Math.sin(U*Math.PI/2),W=0,X=I.length;W<X;W++)B=r(I[W],V[W],N),a(B.x,B.y,-F);for(P=0,T=j.length;P<T;P++)for(O=j[P],Z=Q[P],W=0,X=O.length;W<X;W++)B=r(O[W],Z[W],N),a(B.x,B.y,-F)}for(N=y,W=0;W<G;W++)B=_?r(A[W],J[W],N):A[W],M?(f.copy(p.normals[0]).multiplyScalar(B.x),h.copy(p.binormals[0]).multiplyScalar(B.y),d.copy(l[0]).add(f).add(h),a(d.x,d.y,d.z)):a(B.x,B.y,0);var K;for(K=1;K<=w;K++)for(W=0;W<G;W++)B=_?r(A[W],J[W],N):A[W],M?(f.copy(p.normals[K]).multiplyScalar(B.x),h.copy(p.binormals[K]).multiplyScalar(B.y),d.copy(l[K]).add(f).add(h),a(d.x,d.y,d.z)):a(B.x,B.y,m/w*K);for(k=g-1;k>=0;k--){for(U=k/g,F=v*Math.cos(U*Math.PI/2),N=y*Math.sin(U*Math.PI/2),W=0,X=I.length;W<X;W++)B=r(I[W],V[W],N),a(B.x,B.y,m+F);for(P=0,T=j.length;P<T;P++)for(O=j[P],Z=Q[P],W=0,X=O.length;W<X;W++)B=r(O[W],Z[W],N),M?a(B.x,B.y+l[w-1].y,l[w-1].x+F):a(B.x,B.y,m+F)}!function(){if(_){var e=0,t=G*e;for(W=0;W<H;W++)z=D[W],s(z[2]+t,z[1]+t,z[0]+t);for(e=w+2*g,t=G*e,W=0;W<H;W++)z=D[W],s(z[0]+t,z[1]+t,z[2]+t)}else{for(W=0;W<H;W++)z=D[W],s(z[2],z[1],z[0]);for(W=0;W<H;W++)z=D[W],s(z[0]+G*w,z[1]+G*w,z[2]+G*w)}}(),function(){var e=0;for(o(I,e),e+=I.length,P=0,T=j.length;P<T;P++)O=j[P],o(O,e),e+=O.length}()},Zt.WorldUVGenerator={generateTopUV:function(e,t,r,i){var o=e.vertices,a=o[t],s=o[r],u=o[i];return[new n(a.x,a.y),new n(s.x,s.y),new n(u.x,u.y)]},generateSideWallUV:function(e,t,r,i,o){var a=e.vertices,s=a[t],u=a[r],c=a[i],l=a[o];return Math.abs(s.y-u.y)<.01?[new n(s.x,1-s.z),new n(u.x,1-u.z),new n(c.x,1-c.z),new n(l.x,1-l.z)]:[new n(s.y,1-s.z),new n(u.y,1-u.z),new n(c.y,1-c.z),new n(l.y,1-l.z)]}},Qt.prototype=Object.create(Zt.prototype),Qt.prototype.constructor=Qt,Jt.prototype=Object.create(Ce.prototype),Jt.prototype.constructor=Jt,Kt.prototype=Object.create(Pe.prototype),Kt.prototype.constructor=Kt,$t.prototype=Object.create(Ce.prototype),$t.prototype.constructor=$t,en.prototype=Object.create(Pe.prototype),en.prototype.constructor=en,tn.prototype=Object.create(Pe.prototype),tn.prototype.constructor=tn,nn.prototype=Object.create(Ce.prototype),nn.prototype.constructor=nn,rn.prototype=Object.create(Pe.prototype),rn.prototype.constructor=rn,on.prototype=Object.create(Pe.prototype),on.prototype.constructor=on,on.prototype.addShapeList=function(e,t){for(var n=0,r=e.length;n<r;n++)this.addShape(e[n],t);return this},on.prototype.addShape=function(e,t){void 0===t&&(t={});var n,r,i,o=void 0!==t.curveSegments?t.curveSegments:12,a=t.material,s=void 0===t.UVGenerator?Zt.WorldUVGenerator:t.UVGenerator,u=this.vertices.length,l=e.extractPoints(o),p=l.shape,h=l.holes,f=!za.isClockWise(p);if(f){for(p=p.reverse(),n=0,r=h.length;n<r;n++)i=h[n],za.isClockWise(i)&&(h[n]=i.reverse());f=!1}var d=za.triangulateShape(p,h);for(n=0,r=h.length;n<r;n++)i=h[n],p=p.concat(i);var m,v,y=p.length,g=d.length;for(n=0;n<y;n++)m=p[n],this.vertices.push(new c(m.x,m.y,0));for(n=0;n<g;n++){v=d[n];var _=v[0]+u,b=v[1]+u,w=v[2]+u;this.faces.push(new fe(_,b,w,null,null,a)),this.faceVertexUvs[0].push(s.generateTopUV(this,_,b,w))}},an.prototype=Object.create(Ce.prototype),an.prototype.constructor=an,sn.prototype=Object.create(Ce.prototype),sn.prototype.constructor=sn,un.prototype=Object.create(Pe.prototype),un.prototype.constructor=un,cn.prototype=Object.create(un.prototype),cn.prototype.constructor=cn,ln.prototype=Object.create(sn.prototype),ln.prototype.constructor=ln,pn.prototype=Object.create(Ce.prototype),pn.prototype.constructor=pn,hn.prototype=Object.create(Pe.prototype),hn.prototype.constructor=hn,fn.prototype=Object.create(Pe.prototype),fn.prototype.constructor=fn;var Ga=Object.freeze({WireframeGeometry:Rt,ParametricGeometry:jt,ParametricBufferGeometry:At,TetrahedronGeometry:It,TetrahedronBufferGeometry:Dt,OctahedronGeometry:Nt,OctahedronBufferGeometry:kt,IcosahedronGeometry:Ft,IcosahedronBufferGeometry:Ut,DodecahedronGeometry:zt,DodecahedronBufferGeometry:Bt,PolyhedronGeometry:Gt,PolyhedronBufferGeometry:Lt,TubeGeometry:Vt,TubeBufferGeometry:Ht,TorusKnotGeometry:Xt,TorusKnotBufferGeometry:Wt,TorusGeometry:Yt,TorusBufferGeometry:qt,TextGeometry:Qt,SphereBufferGeometry:Jt,SphereGeometry:Kt,RingGeometry:en,RingBufferGeometry:$t,PlaneBufferGeometry:je,PlaneGeometry:tn,LatheGeometry:rn,LatheBufferGeometry:nn,ShapeGeometry:on,ExtrudeGeometry:Zt,EdgesGeometry:an,ConeGeometry:cn,ConeBufferGeometry:ln,CylinderGeometry:un,CylinderBufferGeometry:sn,CircleBufferGeometry:pn,CircleGeometry:hn,BoxBufferGeometry:Ae,BoxGeometry:fn});dn.prototype=Object.create(K.prototype),dn.prototype.constructor=dn,dn.prototype.isShadowMaterial=!0,mn.prototype=Object.create(K.prototype),mn.prototype.constructor=mn,mn.prototype.isRawShaderMaterial=!0,vn.prototype={constructor:vn,isMultiMaterial:!0,toJSON:function(e){for(var t={metadata:{version:4.2,type:"material",generator:"MaterialExporter"},uuid:this.uuid,type:this.type,materials:[]},n=this.materials,r=0,i=n.length;r<i;r++){var o=n[r].toJSON(e);delete o.metadata,t.materials.push(o)}return t.visible=this.visible,t},clone:function(){for(var e=new this.constructor,t=0;t<this.materials.length;t++)e.materials.push(this.materials[t].clone());return e.visible=this.visible,e}},yn.prototype=Object.create(Q.prototype),yn.prototype.constructor=yn,yn.prototype.isMeshStandardMaterial=!0,yn.prototype.copy=function(e){return Q.prototype.copy.call(this,e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},gn.prototype=Object.create(yn.prototype),gn.prototype.constructor=gn,gn.prototype.isMeshPhysicalMaterial=!0,gn.prototype.copy=function(e){return yn.prototype.copy.call(this,e),this.defines={PHYSICAL:""},this.reflectivity=e.reflectivity,this.clearCoat=e.clearCoat,this.clearCoatRoughness=e.clearCoatRoughness,this},_n.prototype=Object.create(Q.prototype),_n.prototype.constructor=_n,_n.prototype.isMeshPhongMaterial=!0,_n.prototype.copy=function(e){return Q.prototype.copy.call(this,e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},bn.prototype=Object.create(Q.prototype),bn.prototype.constructor=bn,bn.prototype.isMeshNormalMaterial=!0,bn.prototype.copy=function(e){return Q.prototype.copy.call(this,e),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this},wn.prototype=Object.create(Q.prototype),wn.prototype.constructor=wn,wn.prototype.isMeshLambertMaterial=!0,wn.prototype.copy=function(e){return Q.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},xn.prototype=Object.create(Q.prototype),xn.prototype.constructor=xn,xn.prototype.isLineDashedMaterial=!0,xn.prototype.copy=function(e){return Q.prototype.copy.call(this,e),this.color.copy(e.color),this.linewidth=e.linewidth,this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this};var Ha=Object.freeze({ShadowMaterial:dn,SpriteMaterial:ft,RawShaderMaterial:mn,ShaderMaterial:K,PointsMaterial:Mt,MultiMaterial:vn,MeshPhysicalMaterial:gn,MeshStandardMaterial:yn,MeshPhongMaterial:_n,MeshNormalMaterial:bn,MeshLambertMaterial:wn,MeshDepthMaterial:$,MeshBasicMaterial:de,LineDashedMaterial:xn,LineBasicMaterial:bt,Material:Q}),Va={enabled:!1,files:{},add:function(e,t){this.enabled!==!1&&(this.files[e]=t)},get:function(e){if(this.enabled!==!1)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}},Wa=new Mn;Object.assign(En.prototype,{load:function(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e);var i=this,o=Va.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout(function(){t&&t(o),i.manager.itemEnd(e)},0),o;var a=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(a){var s=a[1],u=!!a[2],c=a[3];c=window.decodeURIComponent(c),u&&(c=window.atob(c));try{var l,p=(this.responseType||"").toLowerCase();switch(p){case"arraybuffer":case"blob":l=new ArrayBuffer(c.length);for(var h=new Uint8Array(l),f=0;f<c.length;f++)h[f]=c.charCodeAt(f);"blob"===p&&(l=new Blob([l],{type:s}));break;case"document":var d=new DOMParser;l=d.parseFromString(c,s);break;case"json":l=JSON.parse(c);break;default:l=c}window.setTimeout(function(){t&&t(l),i.manager.itemEnd(e)},0)}catch(t){window.setTimeout(function(){r&&r(t),i.manager.itemError(e)},0)}}else{var m=new XMLHttpRequest;m.open("GET",e,!0),m.addEventListener("load",function(n){var o=n.target.response;Va.add(e,o),200===this.status?(t&&t(o),i.manager.itemEnd(e)):0===this.status?(console.warn("THREE.XHRLoader: HTTP Status 0 received."),t&&t(o),i.manager.itemEnd(e)):(r&&r(n),i.manager.itemError(e))},!1),void 0!==n&&m.addEventListener("progress",function(e){n(e)},!1),m.addEventListener("error",function(t){r&&r(t),i.manager.itemError(e)},!1),void 0!==this.responseType&&(m.responseType=this.responseType),void 0!==this.withCredentials&&(m.withCredentials=this.withCredentials),m.overrideMimeType&&m.overrideMimeType("text/plain"),m.send(null)}return i.manager.itemStart(e),m},setPath:function(e){return this.path=e,this},setResponseType:function(e){return this.responseType=e,this},setWithCredentials:function(e){return this.withCredentials=e,this}}),Object.assign(On.prototype,{load:function(e,t,n,r){var i=this,o=[],a=new Tt;a.image=o;var s=new En(this.manager);if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(e))for(var u=0,c=0,l=e.length;c<l;++c)!function(c){s.load(e[c],function(e){var n=i._parser(e,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(u+=1)&&(1===n.mipmapCount&&(a.minFilter=jo),a.format=n.format,a.needsUpdate=!0,t&&t(a))},n,r)}(c);else s.load(e,function(e){var n=i._parser(e,!0);if(n.isCubemap)for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var u=0;u<n.mipmapCount;u++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+u]),o[s].format=n.format,o[s].width=n.width,o[s].height=n.height}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=jo),a.format=n.format,a.needsUpdate=!0,t&&t(a)},n,r);return a},setPath:function(e){return this.path=e,this}});var Xa=Pn;Object.assign(Pn.prototype,{load:function(e,t,n,r){var i=this,o=new vt,a=new En(this.manager);return a.setResponseType("arraybuffer"),a.load(e,function(e){var n=i._parser(e);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:Po,o.wrapT=void 0!==n.wrapT?n.wrapT:Po,o.magFilter=void 0!==n.magFilter?n.magFilter:jo,o.minFilter=void 0!==n.minFilter?n.minFilter:Do,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps),1===n.mipmapCount&&(o.minFilter=jo),o.needsUpdate=!0,t&&t(o,n))},n,r),o}}),Object.assign(Tn.prototype,{load:function(e,t,n,r){var i=this,o=document.createElementNS("http://www.w3.org/1999/xhtml","img");if(o.onload=function(){o.onload=null,URL.revokeObjectURL(o.src),t&&t(o),i.manager.itemEnd(e)},o.onerror=r,0===e.indexOf("data:"))o.src=e;else{var a=new En;a.setPath(this.path),a.setResponseType("blob"),a.setWithCredentials(this.withCredentials),a.load(e,function(e){o.src=URL.createObjectURL(e)},n,r)}return i.manager.itemStart(e),o},setCrossOrigin:function(e){return this.crossOrigin=e,this},setWithCredentials:function(e){return this.withCredentials=e,this},setPath:function(e){return this.path=e,this}}),Object.assign(Sn.prototype,{load:function(e,t,n,r){var i=new p,o=new Tn(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);for(var a=0,s=0;s<e.length;++s)!function(n){o.load(e[n],function(e){i.images[n]=e,6==++a&&(i.needsUpdate=!0,t&&t(i))},void 0,r)}(s);return i},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this}}),Object.assign(Cn.prototype,{load:function(e,t,n,i){var o=new r,a=new Tn(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setWithCredentials(this.withCredentials),a.setPath(this.path),a.load(e,function(n){var r=e.search(/\.(jpg|jpeg)$/)>0||0===e.search(/^data\:image\/jpeg/);o.format=r?Zo:Qo,o.image=n,o.needsUpdate=!0,void 0!==t&&t(o)},n,i),o},setCrossOrigin:function(e){return this.crossOrigin=e,this},setWithCredentials:function(e){return this.withCredentials=e,this},setPath:function(e){return this.path=e,this}}),Rn.prototype=Object.assign(Object.create(ce.prototype),{constructor:Rn,isLight:!0,copy:function(e){return ce.prototype.copy.call(this,e),this.color.copy(e.color),this.intensity=e.intensity,this},toJSON:function(e){var t=ce.prototype.toJSON.call(this,e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}),An.prototype=Object.assign(Object.create(Rn.prototype),{constructor:An,isHemisphereLight:!0,copy:function(e){return Rn.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}),Object.assign(jn.prototype,{copy:function(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var e={};return 0!==this.bias&&(e.bias=this.bias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}),Ln.prototype=Object.assign(Object.create(jn.prototype),{constructor:Ln,isSpotLightShadow:!0,update:function(e){var t=2*Oa.RAD2DEG*e.angle,n=this.mapSize.width/this.mapSize.height,r=e.distance||500,i=this.camera;t===i.fov&&n===i.aspect&&r===i.far||(i.fov=t,i.aspect=n,i.far=r,i.updateProjectionMatrix())}}),Dn.prototype=Object.assign(Object.create(Rn.prototype),{constructor:Dn,isSpotLight:!0,copy:function(e){return Rn.prototype.copy.call(this,e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),In.prototype=Object.assign(Object.create(Rn.prototype),{constructor:In,isPointLight:!0,copy:function(e){return Rn.prototype.copy.call(this,e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}),kn.prototype=Object.assign(Object.create(jn.prototype),{constructor:kn}),Nn.prototype=Object.assign(Object.create(Rn.prototype),{constructor:Nn,isDirectionalLight:!0,copy:function(e){return Rn.prototype.copy.call(this,e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),Un.prototype=Object.assign(Object.create(Rn.prototype),{constructor:Un,isAmbientLight:!0});var qa={arraySlice:function(e,t,n){return qa.isTypedArray(e)?new e.constructor(e.subarray(t,n)):e.slice(t,n)},convertArray:function(e,t,n){return!e||!n&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(e){function t(t,n){return e[t]-e[n]}for(var n=e.length,r=new Array(n),i=0;i!==n;++i)r[i]=i;return r.sort(t),r},sortedArray:function(e,t,n){for(var r=e.length,i=new e.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*t,u=0;u!==t;++u)i[a++]=e[s+u];return i},flattenJSON:function(e,t,n,r){for(var i=1,o=e[0];void 0!==o&&void 0===o[r];)o=e[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a))do{a=o[r],void 0!==a&&(t.push(o.time),n.push.apply(n,a)),o=e[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{a=o[r],void 0!==a&&(t.push(o.time),a.toArray(n,n.length)),o=e[i++]}while(void 0!==o);else do{a=o[r],void 0!==a&&(t.push(o.time),n.push(a)),o=e[i++]}while(void 0!==o)}}};Fn.prototype={constructor:Fn,evaluate:function(e){var t=this.parameterPositions,n=this._cachedIndex,r=t[n],i=t[n-1];e:{t:{var o;n:{r:if(!(e<r)){for(var a=n+2;;){if(void 0===r){if(e<i)break r;return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,e,i)}if(n===a)break;if(i=r,r=t[++n],e<r)break t}o=t.length;break n}{if(e>=i)break e;var s=t[1];e<s&&(n=2,i=s);for(var a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(n===a)break;if(r=i,i=t[--n-1],e>=i)break t}o=n,n=0}}for(;n<o;){var u=n+o>>>1;e<t[u]?o=u:n=u+1}if(r=t[n],void 0===(i=t[n-1]))return this._cachedIndex=0,this.beforeStart_(0,e,r);if(void 0===r)return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,i,e)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,e,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(e){for(var t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r,o=0;o!==r;++o)t[o]=n[i+o];return t},interpolate_:function(e,t,n,r){throw new Error("call to abstract method")},intervalChanged_:function(e,t,n){}},Object.assign(Fn.prototype,{beforeStart_:Fn.prototype.copySampleValue_,afterEnd_:Fn.prototype.copySampleValue_}),Bn.prototype=Object.assign(Object.create(Fn.prototype),{constructor:Bn,DefaultSettings_:{endingStart:ha,endingEnd:ha},intervalChanged_:function(e,t,n){var r=this.parameterPositions,i=e-2,o=e+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case 2401:i=e,a=2*t-n;break;case 2402:i=r.length-2,a=t+r[i]-r[i+1];break;default:i=e,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case 2401:o=e,s=2*n-t;break;case 2402:o=1,s=n+r[1]-r[0];break;default:o=e-1,s=t}var u=.5*(n-t),c=this.valueSize;this._weightPrev=u/(t-a),this._weightNext=u/(s-n),this._offsetPrev=i*c,this._offsetNext=o*c},interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,u=s-a,c=this._offsetPrev,l=this._offsetNext,p=this._weightPrev,h=this._weightNext,f=(n-t)/(r-t),d=f*f,m=d*f,v=-p*m+2*p*d-p*f,y=(1+p)*m+(-1.5-2*p)*d+(-.5+p)*f+1,g=(-1-h)*m+(1.5+h)*d+.5*f,_=h*m-h*d,b=0;b!==a;++b)i[b]=v*o[c+b]+y*o[u+b]+g*o[s+b]+_*o[l+b];return i}}),zn.prototype=Object.assign(Object.create(Fn.prototype),{constructor:zn,interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,u=s-a,c=(n-t)/(r-t),l=1-c,p=0;p!==a;++p)i[p]=o[u+p]*l+o[s+p]*c;return i}}),Gn.prototype=Object.assign(Object.create(Fn.prototype),{constructor:Gn,interpolate_:function(e,t,n,r){return this.copySampleValue_(e-1)}});var Ya;Ya={TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(e){return new Gn(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodLinear:function(e){return new zn(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:function(e){return new Bn(this.times,this.values,this.getValueSize(),e)},setInterpolation:function(e){var t;switch(e){case 2300:t=this.InterpolantFactoryMethodDiscrete;break;case 2301:t=this.InterpolantFactoryMethodLinear;break;case 2302:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}return void console.warn(n)}this.createInterpolant=t},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(e){if(0!==e)for(var t=this.times,n=0,r=t.length;n!==r;++n)t[n]+=e;return this},scale:function(e){if(1!==e)for(var t=this.times,n=0,r=t.length;n!==r;++n)t[n]*=e;return this},trim:function(e,t){for(var n=this.times,r=n.length,i=0,o=r-1;i!==r&&n[i]<e;)++i;for(;o!==-1&&n[o]>t;)--o;if(++o,0!==i||o!==r){i>=o&&(o=Math.max(o,1),i=o-1);var a=this.getValueSize();this.times=qa.arraySlice(n,i,o),this.values=qa.arraySlice(this.values,i*a,o*a)}return this},validate:function(){var e=!0,t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("invalid value size in track",this),e=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("track is empty",this),e=!1);for(var o=null,a=0;a!==i;a++){var s=n[a];if("number"==typeof s&&isNaN(s)){console.error("time is not a valid number",this,a,s),e=!1;break}if(null!==o&&o>s){console.error("out of order keys",this,a,s,o),e=!1;break}o=s}if(void 0!==r&&qa.isTypedArray(r))for(var a=0,u=r.length;a!==u;++a){var c=r[a];if(isNaN(c)){console.error("value is not a valid number",this,a,c),e=!1;break}}return e},optimize:function(){for(var e=this.times,t=this.values,n=this.getValueSize(),r=2302===this.getInterpolation(),i=1,o=e.length-1,a=1;a<o;++a){var s=!1,u=e[a];if(u!==e[a+1]&&(1!==a||u!==u[0]))if(r)s=!0;else for(var c=a*n,l=c-n,p=c+n,h=0;h!==n;++h){var f=t[c+h];if(f!==t[l+h]||f!==t[p+h]){s=!0;break}}if(s){if(a!==i){e[i]=e[a];for(var d=a*n,m=i*n,h=0;h!==n;++h)t[m+h]=t[d+h]}++i}}if(o>0){e[i]=e[o];for(var d=o*n,m=i*n,h=0;h!==n;++h)t[m+h]=t[d+h];++i}return i!==e.length&&(this.times=qa.arraySlice(e,0,i),this.values=qa.arraySlice(t,0,i*n)),this}},Vn.prototype=Object.assign(Object.create(Ya),{constructor:Vn,ValueTypeName:"vector"}),Wn.prototype=Object.assign(Object.create(Fn.prototype),{constructor:Wn,interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,c=(n-t)/(r-t),l=s+a;s!==l;s+=4)u.slerpFlat(i,0,o,s-a,o,s,c);return i}}),Xn.prototype=Object.assign(Object.create(Ya),{constructor:Xn,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(e){return new Wn(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:void 0}),qn.prototype=Object.assign(Object.create(Ya),{constructor:qn,ValueTypeName:"number"}),Yn.prototype=Object.assign(Object.create(Ya),{constructor:Yn,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Zn.prototype=Object.assign(Object.create(Ya),{constructor:Zn,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Qn.prototype=Object.assign(Object.create(Ya),{constructor:Qn,ValueTypeName:"color"}),Jn.prototype=Ya,Ya.constructor=Jn,Object.assign(Jn,{parse:function(e){if(void 0===e.type)throw new Error("track type undefined, can not parse");var t=Jn._getTrackTypeForValueTypeName(e.type);if(void 0===e.times){var n=[],r=[];qa.flattenJSON(e.keys,n,r,"value"),e.times=n,e.values=r}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)},toJSON:function(e){var t,n=e.constructor;if(void 0!==n.toJSON)t=n.toJSON(e);else{t={name:e.name,times:qa.convertArray(e.times,Array),values:qa.convertArray(e.values,Array)};var r=e.getInterpolation();r!==e.DefaultInterpolation&&(t.interpolation=r)}return t.type=e.ValueTypeName,t},_getTrackTypeForValueTypeName:function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return qn;case"vector":case"vector2":case"vector3":case"vector4":return Vn;case"color":return Qn;case"quaternion":return Xn;case"bool":case"boolean":return Zn;case"string":return Yn}throw new Error("Unsupported typeName: "+e)}}),Kn.prototype={constructor:Kn,resetDuration:function(){for(var e=this.tracks,t=0,n=0,r=e.length;n!==r;++n){var i=this.tracks[n];t=Math.max(t,i.times[i.times.length-1])}this.duration=t},trim:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this},optimize:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}},Object.assign(Kn,{parse:function(e){for(var t=[],n=e.tracks,r=1/(e.fps||1),i=0,o=n.length;i!==o;++i)t.push(Jn.parse(n[i]).scale(r));return new Kn(e.name,e.duration,t)},toJSON:function(e){for(var t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t},i=0,o=n.length;i!==o;++i)t.push(Jn.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(e,t,n,r){for(var i=t.length,o=[],a=0;a<i;a++){var s=[],u=[];s.push((a+i-1)%i,a,(a+1)%i),u.push(0,1,0);var c=qa.getKeyframeOrder(s);s=qa.sortedArray(s,1,c),u=qa.sortedArray(u,1,c),r||0!==s[0]||(s.push(i),u.push(u[0])),o.push(new qn(".morphTargetInfluences["+t[a].name+"]",s,u).scale(1/n))}return new Kn(e,-1,o)},findByName:function(e,t){var n=e;if(!Array.isArray(e)){var r=e;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===t)return n[i];return null},CreateClipsFromMorphTargetSequences:function(e,t,n){for(var r={},i=0,o=e.length;i<o;i++){var a=e[i],s=a.name.match(/^([\w-]*?)([\d]+)$/);if(s&&s.length>1){var u=s[1],c=r[u];c||(r[u]=c=[]),c.push(a)}}var l=[];for(var u in r)l.push(Kn.CreateFromMorphTargetSequence(u,r[u],t,n));return l},parseAnimation:function(e,t){if(!e)return console.error(" no animation in JSONLoader data"),null;for(var n=function(e,t,n,r,i){if(0!==n.length){var o=[],a=[];qa.flattenJSON(n,o,a,r),0!==o.length&&i.push(new e(t,o,a))}},r=[],i=e.name||"default",o=e.length||-1,a=e.fps||30,s=e.hierarchy||[],u=0;u<s.length;u++){var c=s[u].keys;if(c&&0!==c.length)if(c[0].morphTargets){for(var l={},p=0;p<c.length;p++)if(c[p].morphTargets)for(var h=0;h<c[p].morphTargets.length;h++)l[c[p].morphTargets[h]]=-1;for(var f in l){for(var d=[],m=[],h=0;h!==c[p].morphTargets.length;++h){var v=c[p];d.push(v.time),m.push(v.morphTarget===f?1:0)}r.push(new qn(".morphTargetInfluence["+f+"]",d,m))}o=l.length*(a||1)}else{var y=".bones["+t[u].name+"]";n(Vn,y+".position",c,"pos",r),n(Xn,y+".quaternion",c,"rot",r),n(Vn,y+".scale",c,"scl",r)}}return 0===r.length?null:new Kn(i,o,r)}}),Object.assign($n.prototype,{load:function(e,t,n,r){var i=this;new En(i.manager).load(e,function(e){t(i.parse(JSON.parse(e)))},n,r)},setTextures:function(e){this.textures=e},parse:function(e){function t(e){return void 0===r[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),r[e]}var r=this.textures,i=new Ha[e.type];if(void 0!==e.uuid&&(i.uuid=e.uuid),void 0!==e.name&&(i.name=e.name),void 0!==e.color&&i.color.setHex(e.color),void 0!==e.roughness&&(i.roughness=e.roughness),void 0!==e.metalness&&(i.metalness=e.metalness),void 0!==e.emissive&&i.emissive.setHex(e.emissive),void 0!==e.specular&&i.specular.setHex(e.specular),void 0!==e.shininess&&(i.shininess=e.shininess),void 0!==e.uniforms&&(i.uniforms=e.uniforms),void 0!==e.vertexShader&&(i.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(i.fragmentShader=e.fragmentShader),void 0!==e.vertexColors&&(i.vertexColors=e.vertexColors),void 0!==e.fog&&(i.fog=e.fog),void 0!==e.shading&&(i.shading=e.shading),void 0!==e.blending&&(i.blending=e.blending),void 0!==e.side&&(i.side=e.side),void 0!==e.opacity&&(i.opacity=e.opacity),void 0!==e.transparent&&(i.transparent=e.transparent),void 0!==e.alphaTest&&(i.alphaTest=e.alphaTest),void 0!==e.depthTest&&(i.depthTest=e.depthTest),void 0!==e.depthWrite&&(i.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(i.colorWrite=e.colorWrite),void 0!==e.wireframe&&(i.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(i.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(i.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(i.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.skinning&&(i.skinning=e.skinning),void 0!==e.morphTargets&&(i.morphTargets=e.morphTargets),void 0!==e.size&&(i.size=e.size),void 0!==e.sizeAttenuation&&(i.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(i.map=t(e.map)),void 0!==e.alphaMap&&(i.alphaMap=t(e.alphaMap),i.transparent=!0),void 0!==e.bumpMap&&(i.bumpMap=t(e.bumpMap)),void 0!==e.bumpScale&&(i.bumpScale=e.bumpScale),void 0!==e.normalMap&&(i.normalMap=t(e.normalMap)),void 0!==e.normalScale){var o=e.normalScale;Array.isArray(o)===!1&&(o=[o,o]),i.normalScale=(new n).fromArray(o)}if(void 0!==e.displacementMap&&(i.displacementMap=t(e.displacementMap)),void 0!==e.displacementScale&&(i.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(i.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(i.roughnessMap=t(e.roughnessMap)),void 0!==e.metalnessMap&&(i.metalnessMap=t(e.metalnessMap)),void 0!==e.emissiveMap&&(i.emissiveMap=t(e.emissiveMap)),void 0!==e.emissiveIntensity&&(i.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(i.specularMap=t(e.specularMap)),void 0!==e.envMap&&(i.envMap=t(e.envMap)),void 0!==e.reflectivity&&(i.reflectivity=e.reflectivity),void 0!==e.lightMap&&(i.lightMap=t(e.lightMap)),void 0!==e.lightMapIntensity&&(i.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(i.aoMap=t(e.aoMap)),void 0!==e.aoMapIntensity&&(i.aoMapIntensity=e.aoMapIntensity),void 0!==e.materials)for(var a=0,s=e.materials.length;a<s;a++)i.materials.push(this.parse(e.materials[a]));return i}}),Object.assign(er.prototype,{load:function(e,t,n,r){var i=this;new En(i.manager).load(e,function(e){t(i.parse(JSON.parse(e)))},n,r)},parse:function(e){var t=new Ce,n=e.data.index,r={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};if(void 0!==n){var i=new r[n.type](n.array);t.setIndex(new me(i,1))}var o=e.data.attributes;for(var a in o){var s=o[a],i=new r[s.type](s.array);t.addAttribute(a,new me(i,s.itemSize,s.normalized))}var u=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==u)for(var l=0,p=u.length;l!==p;++l){var h=u[l];t.addGroup(h.start,h.count,h.materialIndex)}var f=e.data.boundingSphere;if(void 0!==f){var d=new c;void 0!==f.center&&d.fromArray(f.center),t.boundingSphere=new te(d,f.radius)}return t}}),tr.prototype={constructor:tr,crossOrigin:void 0,extractUrlBase:function(e){var t=e.split("/");return 1===t.length?"./":(t.pop(),t.join("/")+"/")},initMaterials:function(e,t,n){for(var r=[],i=0;i<e.length;++i)r[i]=this.createMaterial(e[i],t,n);return r},createMaterial:function(){var e,t,n;return function(r,i,o){function a(e,n,r,a,u){var c,l=i+e,p=tr.Handlers.get(l);null!==p?c=p.load(l):(t.setCrossOrigin(o),c=t.load(l)),void 0!==n&&(c.repeat.fromArray(n),1!==n[0]&&(c.wrapS=Oo),1!==n[1]&&(c.wrapT=Oo)),void 0!==r&&c.offset.fromArray(r),void 0!==a&&("repeat"===a[0]&&(c.wrapS=Oo),"mirror"===a[0]&&(c.wrapS=To),"repeat"===a[1]&&(c.wrapT=Oo),"mirror"===a[1]&&(c.wrapT=To)),void 0!==u&&(c.anisotropy=u);var h=Oa.generateUUID();return s[h]=c,h}void 0===e&&(e=new X),void 0===t&&(t=new Cn),void 0===n&&(n=new $n);var s={},u={uuid:Oa.generateUUID(),type:"MeshLambertMaterial"};for(var c in r){var l=r[c];switch(c){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":u.name=l;break;case"blending":u.blending=Ni[l];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",c,"is no longer supported.");break;case"colorDiffuse":u.color=e.fromArray(l).getHex();break;case"colorSpecular":u.specular=e.fromArray(l).getHex();break;case"colorEmissive":u.emissive=e.fromArray(l).getHex();break;case"specularCoef":u.shininess=l;break;case"shading":"basic"===l.toLowerCase()&&(u.type="MeshBasicMaterial"),"phong"===l.toLowerCase()&&(u.type="MeshPhongMaterial"),"standard"===l.toLowerCase()&&(u.type="MeshStandardMaterial");break;case"mapDiffuse":u.map=a(l,r.mapDiffuseRepeat,r.mapDiffuseOffset,r.mapDiffuseWrap,r.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":u.emissiveMap=a(l,r.mapEmissiveRepeat,r.mapEmissiveOffset,r.mapEmissiveWrap,r.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":u.lightMap=a(l,r.mapLightRepeat,r.mapLightOffset,r.mapLightWrap,r.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":u.aoMap=a(l,r.mapAORepeat,r.mapAOOffset,r.mapAOWrap,r.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":u.bumpMap=a(l,r.mapBumpRepeat,r.mapBumpOffset,r.mapBumpWrap,r.mapBumpAnisotropy);break;case"mapBumpScale":u.bumpScale=l;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":u.normalMap=a(l,r.mapNormalRepeat,r.mapNormalOffset,r.mapNormalWrap,r.mapNormalAnisotropy);break;case"mapNormalFactor":u.normalScale=[l,l];break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":u.specularMap=a(l,r.mapSpecularRepeat,r.mapSpecularOffset,r.mapSpecularWrap,r.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":u.metalnessMap=a(l,r.mapMetalnessRepeat,r.mapMetalnessOffset,r.mapMetalnessWrap,r.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":u.roughnessMap=a(l,r.mapRoughnessRepeat,r.mapRoughnessOffset,r.mapRoughnessWrap,r.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":u.alphaMap=a(l,r.mapAlphaRepeat,r.mapAlphaOffset,r.mapAlphaWrap,r.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":u.side=Ei;break;case"doubleSided":u.side=Oi;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),u.opacity=l;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":u[c]=l;break;case"vertexColors":l===!0&&(u.vertexColors=Ri),"face"===l&&(u.vertexColors=Ci);break;default:console.error("THREE.Loader.createMaterial: Unsupported",c,l)}}return"MeshBasicMaterial"===u.type&&delete u.emissive,"MeshPhongMaterial"!==u.type&&delete u.specular,u.opacity<1&&(u.transparent=!0),n.setTextures(s),n.parse(u)}}()},tr.Handlers={handlers:[],add:function(e,t){this.handlers.push(e,t)},get:function(e){for(var t=this.handlers,n=0,r=t.length;n<r;n+=2){var i=t[n],o=t[n+1];if(i.test(e))return o}return null}},Object.assign(nr.prototype,{load:function(e,t,n,r){var i=this,o=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:tr.prototype.extractUrlBase(e),a=new En(this.manager);a.setWithCredentials(this.withCredentials),a.load(e,function(n){var r=JSON.parse(n),a=r.metadata;if(void 0!==a){var s=a.type;if(void 0!==s){if("object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+e+" should be loaded with THREE.ObjectLoader instead.");if("scene"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+e+" should be loaded with THREE.SceneLoader instead.")}}var u=i.parse(r,o);t(u.geometry,u.materials)},n,r)},setTexturePath:function(e){this.texturePath=e},parse:function(e,t){var r=new Pe,i=void 0!==e.scale?1/e.scale:1;if(function(t){function i(e,t){return e&1<<t}var o,a,s,u,l,p,h,f,d,m,v,y,g,_,b,w,x,M,E,O,P,T,S,C,R,A,j,L=e.faces,D=e.vertices,I=e.normals,k=e.colors,N=0;if(void 0!==e.uvs){for(o=0;o<e.uvs.length;o++)e.uvs[o].length&&N++;for(o=0;o<N;o++)r.faceVertexUvs[o]=[]}for(u=0,l=D.length;u<l;)M=new c,M.x=D[u++]*t,M.y=D[u++]*t,M.z=D[u++]*t,r.vertices.push(M);for(u=0,l=L.length;u<l;)if(m=L[u++],v=i(m,0),y=i(m,1),g=i(m,3),_=i(m,4),b=i(m,5),w=i(m,6),x=i(m,7),v){if(O=new fe,O.a=L[u],O.b=L[u+1],O.c=L[u+3],P=new fe,P.a=L[u+1],P.b=L[u+2],P.c=L[u+3],u+=4,y&&(d=L[u++],O.materialIndex=d,P.materialIndex=d),s=r.faces.length,g)for(o=0;o<N;o++)for(C=e.uvs[o],r.faceVertexUvs[o][s]=[],r.faceVertexUvs[o][s+1]=[],a=0;a<4;a++)f=L[u++],A=C[2*f],j=C[2*f+1],R=new n(A,j),2!==a&&r.faceVertexUvs[o][s].push(R),0!==a&&r.faceVertexUvs[o][s+1].push(R);if(_&&(h=3*L[u++],O.normal.set(I[h++],I[h++],I[h]),P.normal.copy(O.normal)),b)for(o=0;o<4;o++)h=3*L[u++],S=new c(I[h++],I[h++],I[h]),2!==o&&O.vertexNormals.push(S),0!==o&&P.vertexNormals.push(S);if(w&&(p=L[u++],T=k[p],O.color.setHex(T),P.color.setHex(T)),x)for(o=0;o<4;o++)p=L[u++],T=k[p],2!==o&&O.vertexColors.push(new X(T)),0!==o&&P.vertexColors.push(new X(T));r.faces.push(O),r.faces.push(P)}else{if(E=new fe,E.a=L[u++],E.b=L[u++],E.c=L[u++],y&&(d=L[u++],E.materialIndex=d),s=r.faces.length,g)for(o=0;o<N;o++)for(C=e.uvs[o],r.faceVertexUvs[o][s]=[],a=0;a<3;a++)f=L[u++],A=C[2*f],j=C[2*f+1],R=new n(A,j),r.faceVertexUvs[o][s].push(R);if(_&&(h=3*L[u++],E.normal.set(I[h++],I[h++],I[h])),b)for(o=0;o<3;o++)h=3*L[u++],S=new c(I[h++],I[h++],I[h]),E.vertexNormals.push(S);if(w&&(p=L[u++],E.color.setHex(k[p])),x)for(o=0;o<3;o++)p=L[u++],E.vertexColors.push(new X(k[p]));r.faces.push(E)}}(i),function(){var t=void 0!==e.influencesPerVertex?e.influencesPerVertex:2;if(e.skinWeights)for(var n=0,i=e.skinWeights.length;n<i;n+=t){var a=e.skinWeights[n],s=t>1?e.skinWeights[n+1]:0,u=t>2?e.skinWeights[n+2]:0,c=t>3?e.skinWeights[n+3]:0;r.skinWeights.push(new o(a,s,u,c))}if(e.skinIndices)for(var n=0,i=e.skinIndices.length;n<i;n+=t){var l=e.skinIndices[n],p=t>1?e.skinIndices[n+1]:0,h=t>2?e.skinIndices[n+2]:0,f=t>3?e.skinIndices[n+3]:0;r.skinIndices.push(new o(l,p,h,f))}r.bones=e.bones,r.bones&&r.bones.length>0&&(r.skinWeights.length!==r.skinIndices.length||r.skinIndices.length!==r.vertices.length)&&console.warn("When skinning, number of vertices ("+r.vertices.length+"), skinIndices ("+r.skinIndices.length+"), and skinWeights ("+r.skinWeights.length+") should match.")}(),function(t){if(void 0!==e.morphTargets)for(var n=0,i=e.morphTargets.length;n<i;n++){r.morphTargets[n]={},r.morphTargets[n].name=e.morphTargets[n].name,r.morphTargets[n].vertices=[];for(var o=r.morphTargets[n].vertices,a=e.morphTargets[n].vertices,s=0,u=a.length;s<u;s+=3){var l=new c;l.x=a[s]*t,l.y=a[s+1]*t,l.z=a[s+2]*t,o.push(l)}}if(void 0!==e.morphColors&&e.morphColors.length>0){console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.');for(var p=r.faces,h=e.morphColors[0].colors,n=0,i=p.length;n<i;n++)p[n].color.fromArray(h,3*n)}}(i),function(){var t=[],n=[];void 0!==e.animation&&n.push(e.animation),void 0!==e.animations&&(e.animations.length?n=n.concat(e.animations):n.push(e.animations));for(var i=0;i<n.length;i++){var o=Kn.parseAnimation(n[i],r.bones);o&&t.push(o)}if(r.morphTargets){var a=Kn.CreateClipsFromMorphTargetSequences(r.morphTargets,10);t=t.concat(a)}t.length>0&&(r.animations=t)}(),r.computeFaceNormals(),r.computeBoundingSphere(),void 0===e.materials||0===e.materials.length)return{geometry:r};var a=tr.prototype.initMaterials(e.materials,t,this.crossOrigin);return{geometry:r,materials:a}}}),Object.assign(rr.prototype,{load:function(e,t,n,r){""===this.texturePath&&(this.texturePath=e.substring(0,e.lastIndexOf("/")+1));var i=this;new En(i.manager).load(e,function(e){i.parse(JSON.parse(e),t)},n,r)},setTexturePath:function(e){this.texturePath=e},setCrossOrigin:function(e){this.crossOrigin=e},parse:function(e,t){var n=this.parseGeometries(e.geometries),r=this.parseImages(e.images,function(){void 0!==t&&t(a)}),i=this.parseTextures(e.textures,r),o=this.parseMaterials(e.materials,i),a=this.parseObject(e.object,n,o);return e.animations&&(a.animations=this.parseAnimations(e.animations)),void 0!==e.images&&0!==e.images.length||void 0!==t&&t(a),a},parseGeometries:function(e){var t={};if(void 0!==e)for(var n=new nr,r=new er,i=0,o=e.length;i<o;i++){var a,s=e[i];switch(s.type){case"PlaneGeometry":case"PlaneBufferGeometry":a=new Ga[s.type](s.width,s.height,s.widthSegments,s.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":a=new Ga[s.type](s.width,s.height,s.depth,s.widthSegments,s.heightSegments,s.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":a=new Ga[s.type](s.radius,s.segments,s.thetaStart,s.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":a=new Ga[s.type](s.radiusTop,s.radiusBottom,s.height,s.radialSegments,s.heightSegments,s.openEnded,s.thetaStart,s.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":a=new Ga[s.type](s.radius,s.height,s.radialSegments,s.heightSegments,s.openEnded,s.thetaStart,s.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":a=new Ga[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":a=new Ga[s.type](s.radius,s.detail);break;case"RingGeometry":case"RingBufferGeometry":a=new Ga[s.type](s.innerRadius,s.outerRadius,s.thetaSegments,s.phiSegments,s.thetaStart,s.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":a=new Ga[s.type](s.radius,s.tube,s.radialSegments,s.tubularSegments,s.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":a=new Ga[s.type](s.radius,s.tube,s.tubularSegments,s.radialSegments,s.p,s.q);break;case"LatheGeometry":case"LatheBufferGeometry":a=new Ga[s.type](s.points,s.segments,s.phiStart,s.phiLength);break;case"BufferGeometry":a=r.parse(s);break;case"Geometry":a=n.parse(s.data,this.texturePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+s.type+'"');continue}a.uuid=s.uuid,void 0!==s.name&&(a.name=s.name),t[s.uuid]=a}return t},parseMaterials:function(e,t){var n={};if(void 0!==e){var r=new $n;r.setTextures(t);for(var i=0,o=e.length;i<o;i++){var a=r.parse(e[i]);n[a.uuid]=a}}return n},parseAnimations:function(e){for(var t=[],n=0;n<e.length;n++){var r=Kn.parse(e[n]);t.push(r)}return t},parseImages:function(e,t){var n=this,r={};if(void 0!==e&&e.length>0){var i=new Mn(t),o=new Tn(i);o.setCrossOrigin(this.crossOrigin);for(var a=0,s=e.length;a<s;a++){var u=e[a],c=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(u.url)?u.url:n.texturePath+u.url;r[u.uuid]=function(e){return n.manager.itemStart(e),o.load(e,function(){n.manager.itemEnd(e)},void 0,function(){n.manager.itemError(e)})}(c)}}return r},parseTextures:function(e,t){function n(e,t){return"number"==typeof e?e:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",e),t[e])}var i={};if(void 0!==e)for(var o=0,a=e.length;o<a;o++){var s=e[o];void 0===s.image&&console.warn('THREE.ObjectLoader: No "image" specified for',s.uuid),void 0===t[s.image]&&console.warn("THREE.ObjectLoader: Undefined image",s.image);var u=new r(t[s.image]);u.needsUpdate=!0,u.uuid=s.uuid,void 0!==s.name&&(u.name=s.name),void 0!==s.mapping&&(u.mapping=n(s.mapping,Eo)),void 0!==s.offset&&u.offset.fromArray(s.offset),void 0!==s.repeat&&u.repeat.fromArray(s.repeat),void 0!==s.wrap&&(u.wrapS=n(s.wrap[0],So),u.wrapT=n(s.wrap[1],So)),void 0!==s.minFilter&&(u.minFilter=n(s.minFilter,Io)),void 0!==s.magFilter&&(u.magFilter=n(s.magFilter,Io)),void 0!==s.anisotropy&&(u.anisotropy=s.anisotropy),void 0!==s.flipY&&(u.flipY=s.flipY),i[s.uuid]=u}return i},parseObject:function(){var e=new l;return function(t,n,r){function i(e){return void 0===n[e]&&console.warn("THREE.ObjectLoader: Undefined geometry",e),n[e]}function o(e){if(void 0!==e)return void 0===r[e]&&console.warn("THREE.ObjectLoader: Undefined material",e),r[e]}var a;switch(t.type){case"Scene":a=new pt,void 0!==t.background&&Number.isInteger(t.background)&&(a.background=new X(t.background)),void 0!==t.fog&&("Fog"===t.fog.type?a.fog=new lt(t.fog.color,t.fog.near,t.fog.far):"FogExp2"===t.fog.type&&(a.fog=new ct(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":a=new De(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(a.focus=t.focus),void 0!==t.zoom&&(a.zoom=t.zoom),void 0!==t.filmGauge&&(a.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(a.filmOffset=t.filmOffset),void 0!==t.view&&(a.view=Object.assign({},t.view));break;case"OrthographicCamera":a=new Ie(t.left,t.right,t.top,t.bottom,t.near,t.far);break;case"AmbientLight":a=new Un(t.color,t.intensity);break;case"DirectionalLight":a=new Nn(t.color,t.intensity);break;case"PointLight":a=new In(t.color,t.intensity,t.distance,t.decay);break;case"SpotLight":a=new Dn(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":a=new An(t.color,t.groundColor,t.intensity);break;case"Mesh":var s=i(t.geometry),u=o(t.material);a=s.bones&&s.bones.length>0?new _t(s,u):new Re(s,u);break;case"LOD":a=new mt;break;case"Line":a=new wt(i(t.geometry),o(t.material),t.mode);break;case"LineSegments":a=new xt(i(t.geometry),o(t.material));break;case"PointCloud":case"Points":a=new Et(i(t.geometry),o(t.material));break;case"Sprite":a=new dt(o(t.material));break;case"Group":a=new Ot;break;default:a=new ce}if(a.uuid=t.uuid,void 0!==t.name&&(a.name=t.name),void 0!==t.matrix?(e.fromArray(t.matrix),e.decompose(a.position,a.quaternion,a.scale)):(void 0!==t.position&&a.position.fromArray(t.position),void 0!==t.rotation&&a.rotation.fromArray(t.rotation),void 0!==t.quaternion&&a.quaternion.fromArray(t.quaternion),void 0!==t.scale&&a.scale.fromArray(t.scale)),void 0!==t.castShadow&&(a.castShadow=t.castShadow),void 0!==t.receiveShadow&&(a.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(a.shadow.bias=t.shadow.bias),void 0!==t.shadow.radius&&(a.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&a.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(a.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(a.visible=t.visible),void 0!==t.userData&&(a.userData=t.userData),void 0!==t.children)for(var c in t.children)a.add(this.parseObject(t.children[c],n,r));if("LOD"===t.type)for(var l=t.levels,p=0;p<l.length;p++){var h=l[p],c=a.getObjectByProperty("uuid",h.object);void 0!==c&&a.addLevel(c,h.distance)}return a}}()}),ir.prototype={constructor:ir,getPoint:function(e){return console.warn("THREE.Curve: Warning, getPoint() not implemented!"),null},getPointAt:function(e){var t=this.getUtoTmapping(e);return this.getPoint(t)},getPoints:function(e){e||(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPoint(n/e));return t},getSpacedPoints:function(e){e||(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t},getLength:function(){var e=this.getLengths();return e[e.length-1]},getLengths:function(e){if(e||(e=this.__arcLengthDivisions?this.__arcLengthDivisions:200),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,n,r=[],i=this.getPoint(0),o=0;for(r.push(0),n=1;n<=e;n++)t=this.getPoint(n/e),o+=t.distanceTo(i),r.push(o),i=t;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(e,t){var n,r=this.getLengths(),i=0,o=r.length;n=t||e*r[o-1];for(var a,s=0,u=o-1;s<=u;)if(i=Math.floor(s+(u-s)/2),(a=r[i]-n)<0)s=i+1;else{if(!(a>0)){u=i;break}u=i-1}if(i=u,r[i]===n){var c=i/(o-1);return c}var l=r[i],p=r[i+1],h=p-l,f=(n-l)/h,c=(i+f)/(o-1);return c},getTangent:function(e){var t=e-1e-4,n=e+1e-4;t<0&&(t=0),n>1&&(n=1);var r=this.getPoint(t);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(e){var t=this.getUtoTmapping(e);return this.getTangent(t)},computeFrenetFrames:function(e,t){var n,r,i,o=new c,a=[],s=[],u=[],p=new c,h=new l;for(n=0;n<=e;n++)r=n/e,a[n]=this.getTangentAt(r),a[n].normalize();s[0]=new c,u[0]=new c;var f=Number.MAX_VALUE,d=Math.abs(a[0].x),m=Math.abs(a[0].y),v=Math.abs(a[0].z);for(d<=f&&(f=d,o.set(1,0,0)),m<=f&&(f=m,o.set(0,1,0)),v<=f&&o.set(0,0,1),p.crossVectors(a[0],o).normalize(),s[0].crossVectors(a[0],p),u[0].crossVectors(a[0],s[0]),n=1;n<=e;n++)s[n]=s[n-1].clone(),u[n]=u[n-1].clone(),p.crossVectors(a[n-1],a[n]),p.length()>Number.EPSILON&&(p.normalize(),i=Math.acos(Oa.clamp(a[n-1].dot(a[n]),-1,1)),s[n].applyMatrix4(h.makeRotationAxis(p,i))),u[n].crossVectors(a[n],s[n]);if(t===!0)for(i=Math.acos(Oa.clamp(s[0].dot(s[e]),-1,1)),i/=e,a[0].dot(p.crossVectors(s[0],s[e]))>0&&(i=-i),n=1;n<=e;n++)s[n].applyMatrix4(h.makeRotationAxis(a[n],i*n)),u[n].crossVectors(a[n],s[n]);return{tangents:a,normals:s,binormals:u}}},ir.create=function(e,t){return e.prototype=Object.create(ir.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},or.prototype=Object.create(ir.prototype),or.prototype.constructor=or,or.prototype.isLineCurve=!0,or.prototype.getPoint=function(e){if(1===e)return this.v2.clone();var t=this.v2.clone().sub(this.v1);return t.multiplyScalar(e).add(this.v1),t},or.prototype.getPointAt=function(e){return this.getPoint(e)},or.prototype.getTangent=function(e){return this.v2.clone().sub(this.v1).normalize()},ar.prototype=Object.assign(Object.create(ir.prototype),{constructor:ar,add:function(e){this.curves.push(e)},closePath:function(){var e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new or(t,e))},getPoint:function(e){for(var t=e*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=t){var i=n[r]-t,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var e=this.getCurveLengths();return e[e.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 e=[],t=0,n=0,r=this.curves.length;n<r;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e},getSpacedPoints:function(e){e||(e=40);for(var t=[],n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t},getPoints:function(e){e=e||12;for(var t,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*e:o&&o.isLineCurve?1:o&&o.isSplineCurve?e*o.points.length:e,s=o.getPoints(a),u=0;u<s.length;u++){var c=s[u];t&&t.equals(c)||(n.push(c),t=c)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},createPointsGeometry:function(e){var t=this.getPoints(e);return this.createGeometry(t)},createSpacedPointsGeometry:function(e){var t=this.getSpacedPoints(e);return this.createGeometry(t)},createGeometry:function(e){for(var t=new Pe,n=0,r=e.length;n<r;n++){var i=e[n];t.vertices.push(new c(i.x,i.y,i.z||0))}return t}}),sr.prototype=Object.create(ir.prototype),sr.prototype.constructor=sr,sr.prototype.isEllipseCurve=!0,sr.prototype.getPoint=function(e){for(var t=2*Math.PI,r=this.aEndAngle-this.aStartAngle,i=Math.abs(r)<Number.EPSILON;r<0;)r+=t;for(;r>t;)r-=t;r<Number.EPSILON&&(r=i?0:t),this.aClockwise!==!0||i||(r===t?r=-t:r-=t);var o=this.aStartAngle+e*r,a=this.aX+this.xRadius*Math.cos(o),s=this.aY+this.yRadius*Math.sin(o);if(0!==this.aRotation){var u=Math.cos(this.aRotation),c=Math.sin(this.aRotation),l=a-this.aX,p=s-this.aY;a=l*u-p*c+this.aX,s=l*c+p*u+this.aY}return new n(a,s)};var Za={tangentQuadraticBezier:function(e,t,n,r){return 2*(1-e)*(n-t)+2*e*(r-n)},tangentCubicBezier:function(e,t,n,r,i){return-3*t*(1-e)*(1-e)+3*n*(1-e)*(1-e)-6*e*n*(1-e)+6*e*r*(1-e)-3*e*e*r+3*e*e*i},tangentSpline:function(e,t,n,r,i){return 6*e*e-6*e+(3*e*e-4*e+1)+(-6*e*e+6*e)+(3*e*e-2*e)},interpolate:function(e,t,n,r,i){var o=.5*(n-e),a=.5*(r-t),s=i*i;return(2*t-2*n+o+a)*(i*s)+(-3*t+3*n-2*o-a)*s+o*i+t}};ur.prototype=Object.create(ir.prototype),ur.prototype.constructor=ur,ur.prototype.isSplineCurve=!0,ur.prototype.getPoint=function(e){var t=this.points,r=(t.length-1)*e,i=Math.floor(r),o=r-i,a=t[0===i?i:i-1],s=t[i],u=t[i>t.length-2?t.length-1:i+1],c=t[i>t.length-3?t.length-1:i+2],l=Za.interpolate;return new n(l(a.x,s.x,u.x,c.x,o),l(a.y,s.y,u.y,c.y,o))},cr.prototype=Object.create(ir.prototype),cr.prototype.constructor=cr,cr.prototype.getPoint=function(e){var t=za.b3;return new n(t(e,this.v0.x,this.v1.x,this.v2.x,this.v3.x),t(e,this.v0.y,this.v1.y,this.v2.y,this.v3.y))},cr.prototype.getTangent=function(e){var t=Za.tangentCubicBezier;return new n(t(e,this.v0.x,this.v1.x,this.v2.x,this.v3.x),t(e,this.v0.y,this.v1.y,this.v2.y,this.v3.y)).normalize()},lr.prototype=Object.create(ir.prototype),lr.prototype.constructor=lr,lr.prototype.getPoint=function(e){var t=za.b2;return new n(t(e,this.v0.x,this.v1.x,this.v2.x),t(e,this.v0.y,this.v1.y,this.v2.y))},lr.prototype.getTangent=function(e){var t=Za.tangentQuadraticBezier;return new n(t(e,this.v0.x,this.v1.x,this.v2.x),t(e,this.v0.y,this.v1.y,this.v2.y)).normalize()};var Qa=Object.assign(Object.create(ar.prototype),{fromPoints:function(e){this.moveTo(e[0].x,e[0].y);for(var t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y)},moveTo:function(e,t){this.currentPoint.set(e,t)},lineTo:function(e,t){var r=new or(this.currentPoint.clone(),new n(e,t));this.curves.push(r),this.currentPoint.set(e,t)},quadraticCurveTo:function(e,t,r,i){var o=new lr(this.currentPoint.clone(),new n(e,t),new n(r,i));this.curves.push(o),this.currentPoint.set(r,i)},bezierCurveTo:function(e,t,r,i,o,a){var s=new cr(this.currentPoint.clone(),new n(e,t),new n(r,i),new n(o,a));this.curves.push(s),this.currentPoint.set(o,a)},splineThru:function(e){var t=[this.currentPoint.clone()].concat(e),n=new ur(t);this.curves.push(n),this.currentPoint.copy(e[e.length-1])},arc:function(e,t,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;this.absarc(e+a,t+s,n,r,i,o)},absarc:function(e,t,n,r,i,o){this.absellipse(e,t,n,n,r,i,o)},ellipse:function(e,t,n,r,i,o,a,s){var u=this.currentPoint.x,c=this.currentPoint.y;this.absellipse(e+u,t+c,n,r,i,o,a,s)},absellipse:function(e,t,n,r,i,o,a,s){var u=new sr(e,t,n,r,i,o,a,s);if(this.curves.length>0){var c=u.getPoint(0);c.equals(this.currentPoint)||this.lineTo(c.x,c.y)}this.curves.push(u);var l=u.getPoint(1);this.currentPoint.copy(l)}});pr.prototype=Object.assign(Object.create(Qa),{constructor:pr,getPointsHoles:function(e){for(var t=[],n=0,r=this.holes.length;n<r;n++)t[n]=this.holes[n].getPoints(e);return t},extractAllPoints:function(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}},extractPoints:function(e){return this.extractAllPoints(e)}}),hr.prototype=Qa,Qa.constructor=hr,fr.prototype={moveTo:function(e,t){this.currentPath=new hr,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t)},lineTo:function(e,t){this.currentPath.lineTo(e,t)},quadraticCurveTo:function(e,t,n,r){this.currentPath.quadraticCurveTo(e,t,n,r)},bezierCurveTo:function(e,t,n,r,i,o){this.currentPath.bezierCurveTo(e,t,n,r,i,o)},splineThru:function(e){this.currentPath.splineThru(e)},toShapes:function(e,t){function n(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e[n],o=new pr;o.curves=i.curves,t.push(o)}return t}var r=za.isClockWise,i=this.subPaths;if(0===i.length)return[];if(t===!0)return n(i);var o,a,s,u=[];if(1===i.length)return a=i[0],s=new pr,s.curves=a.curves,u.push(s),u;var c=!r(i[0].getPoints());c=e?!c:c;var l,p=[],h=[],f=[],d=0;h[d]=void 0,f[d]=[];for(var m=0,v=i.length;m<v;m++)a=i[m],l=a.getPoints(),o=r(l),o=e?!o:o,o?(!c&&h[d]&&d++,h[d]={s:new pr,p:l},h[d].s.curves=a.curves,c&&d++,f[d]=[]):f[d].push({h:a,p:l[0]});if(!h[0])return n(i);if(h.length>1){for(var y=!1,g=[],_=0,b=h.length;_<b;_++)p[_]=[];for(var _=0,b=h.length;_<b;_++)for(var w=f[_],x=0;x<w.length;x++){for(var M=w[x],E=!0,O=0;O<h.length;O++)(function(e,t){for(var n=t.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=t[i],s=t[o],u=s.x-a.x,c=s.y-a.y;if(Math.abs(c)>Number.EPSILON){if(c<0&&(a=t[o],u=-u,s=t[i],c=-c),e.y<a.y||e.y>s.y)continue;if(e.y===a.y){if(e.x===a.x)return!0}else{var l=c*(e.x-a.x)-u*(e.y-a.y);if(0===l)return!0;if(l<0)continue;r=!r}}else{if(e.y!==a.y)continue;if(s.x<=e.x&&e.x<=a.x||a.x<=e.x&&e.x<=s.x)return!0}}return r})(M.p,h[O].p)&&(_!==O&&g.push({froms:_,tos:O,hole:x}),E?(E=!1,p[O].push(M)):y=!0);E&&p[_].push(M)}g.length>0&&(y||(f=p))}for(var P,m=0,T=h.length;m<T;m++){s=h[m].s,u.push(s),P=f[m];for(var S=0,C=P.length;S<C;S++)s.holes.push(P[S].h)}return u}},Object.assign(dr.prototype,{isFont:!0,generateShapes:function(e,t,n){function r(e,t,r){var o=i.glyphs[e]||i.glyphs["?"];if(o){var a,s,u,c,l,p,h,f,d,m,v,y=new fr,g=[],_=za.b2,b=za.b3;if(o.o)for(var w=o._cachedOutline||(o._cachedOutline=o.o.split(" ")),x=0,M=w.length;x<M;){var E=w[x++];switch(E){case"m":a=w[x++]*t+r,s=w[x++]*t,y.moveTo(a,s);break;case"l":a=w[x++]*t+r,s=w[x++]*t,y.lineTo(a,s);break;case"q":if(u=w[x++]*t+r,c=w[x++]*t,h=w[x++]*t+r,f=w[x++]*t,y.quadraticCurveTo(h,f,u,c),v=g[g.length-1]){l=v.x,p=v.y;for(var O=1;O<=n;O++){var P=O/n;_(P,l,h,u),_(P,p,f,c)}}break;case"b":if(u=w[x++]*t+r,c=w[x++]*t,h=w[x++]*t+r,f=w[x++]*t,d=w[x++]*t+r,m=w[x++]*t,y.bezierCurveTo(h,f,d,m,u,c),v=g[g.length-1]){l=v.x,p=v.y;for(var O=1;O<=n;O++){var P=O/n;b(P,l,h,d,u),b(P,p,f,m,c)}}}}return{offset:o.ha*t,path:y}}}void 0===t&&(t=100),void 0===n&&(n=4);for(var i=this.data,o=function(e){for(var n=String(e).split(""),o=t/i.resolution,a=0,s=[],u=0;u<n.length;u++){var c=r(n[u],o,a);a+=c.offset,s.push(c.path)}return s}(e),a=[],s=0,u=o.length;s<u;s++)Array.prototype.push.apply(a,o[s].toShapes());return a}}),Object.assign(mr.prototype,{load:function(e,t,n,r){var i=this;new En(this.manager).load(e,function(e){var n;try{n=JSON.parse(e)}catch(t){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(e.substring(65,e.length-2))}var r=i.parse(n);t&&t(r)},n,r)},parse:function(e){return new dr(e)}});var Ja;Object.assign(yr.prototype,{load:function(e,t,n,r){var i=new En(this.manager);i.setResponseType("arraybuffer"),i.load(e,function(e){vr().decodeAudioData(e,function(e){t(e)})},n,r)}}),Object.assign(gr.prototype,{update:function(){var e,t,n,r,i,o,a,s=new l,u=new l;return function(c){if(e!==this||t!==c.focus||n!==c.fov||r!==c.aspect*this.aspect||i!==c.near||o!==c.far||a!==c.zoom){e=this,t=c.focus,n=c.fov,r=c.aspect*this.aspect,i=c.near,o=c.far,a=c.zoom;var l,p,h=c.projectionMatrix.clone(),f=this.eyeSep/2,d=f*i/t,m=i*Math.tan(Oa.DEG2RAD*n*.5)/a;u.elements[12]=-f,s.elements[12]=f,l=-m*r+d,p=m*r+d,h.elements[0]=2*i/(p-l),h.elements[8]=(p+l)/(p-l),this.cameraL.projectionMatrix.copy(h),l=-m*r-d,p=m*r-d,h.elements[0]=2*i/(p-l),h.elements[8]=(p+l)/(p-l),this.cameraR.projectionMatrix.copy(h)}this.cameraL.matrixWorld.copy(c.matrixWorld).multiply(u),this.cameraR.matrixWorld.copy(c.matrixWorld).multiply(s)}}()}),_r.prototype=Object.create(ce.prototype),_r.prototype.constructor=_r,br.prototype=Object.assign(Object.create(ce.prototype),{constructor:br,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(e){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(e){this.gain.gain.value=e},updateMatrixWorld:function(){var e=new c,t=new u,n=new c,r=new c;return function(i){ce.prototype.updateMatrixWorld.call(this,i);var o=this.context.listener,a=this.up;this.matrixWorld.decompose(e,t,n),r.set(0,0,-1).applyQuaternion(t),o.setPosition(e.x,e.y,e.z),o.setOrientation(r.x,r.y,r.z,a.x,a.y,a.z)}}()}),wr.prototype=Object.assign(Object.create(ce.prototype),{constructor:wr,getOutput:function(){return this.gain},setNodeSource:function(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this},setBuffer:function(e){return this.source.buffer=e,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 e=this.context.createBufferSource();return e.buffer=this.source.buffer,e.loop=this.source.loop,e.onended=this.source.onended,e.start(0,this.startTime),e.playbackRate.value=this.playbackRate,this.isPlaying=!0,this.source=e,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 e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);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 e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(e){return e||(e=[]),this.isPlaying===!0?(this.disconnect(),this.filters=e,this.connect()):this.filters=e,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(e){return this.setFilters(e?[e]:[])},setPlaybackRate:function(e){return this.hasPlaybackControl===!1?void console.warn("THREE.Audio: this Audio has no playback control."):(this.playbackRate=e,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(e){if(this.hasPlaybackControl===!1)return void console.warn("THREE.Audio: this Audio has no playback control.");this.source.loop=e},getVolume:function(){return this.gain.gain.value},setVolume:function(e){return this.gain.gain.value=e,this}}),xr.prototype=Object.assign(Object.create(wr.prototype),{constructor:xr,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(e){this.panner.refDistance=e},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(e){this.panner.rolloffFactor=e},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(e){this.panner.distanceModel=e},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(e){this.panner.maxDistance=e},updateMatrixWorld:function(){var e=new c;return function(t){ce.prototype.updateMatrixWorld.call(this,t),e.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(e.x,e.y,e.z)}}()}),Object.assign(Mr.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var e=0,t=this.getFrequencyData(),n=0;n<t.length;n++)e+=t[n];return e/t.length}}),Er.prototype={constructor:Er,accumulate:function(e,t){var n=this.buffer,r=this.valueSize,i=e*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=t}else{o+=t;var s=t/o;this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},apply:function(e){var t=this.valueSize,n=this.buffer,r=e*t+t,i=this.cumulativeWeight,o=this.binding;if(this.cumulativeWeight=0,i<1){var a=3*t;this._mixBufferRegion(n,r,a,1-i,t)}for(var s=t,u=t+t;s!==u;++s)if(n[s]!==n[s+t]){o.setValue(n,r);break}},saveOriginalState:function(){var e=this.binding,t=this.buffer,n=this.valueSize,r=3*n;e.getValue(t,r);for(var i=n,o=r;i!==o;++i)t[i]=t[r+i%n];this.cumulativeWeight=0},restoreOriginalState:function(){var e=3*this.valueSize;this.binding.setValue(this.buffer,e)},_select:function(e,t,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)e[t+o]=e[n+o]},_slerp:function(e,t,n,r,i){u.slerpFlat(e,t,e,t,e,n,r)},_lerp:function(e,t,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=t+a;e[s]=e[s]*o+e[n+a]*r}}},Or.prototype={constructor:Or,getValue:function(e,t){this.bind(),this.getValue(e,t)},setValue:function(e,t){this.bind(),this.setValue(e,t)},bind:function(){var e=this.node,t=this.parsedPath,n=t.objectName,r=t.propertyName,i=t.propertyIndex;if(e||(e=Or.findNode(this.rootNode,t.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void console.error(" trying to update node for track: "+this.path+" but it wasn't found.");if(n){var o=t.objectIndex;switch(n){case"materials":if(!e.material)return void console.error(" can not bind to material as node does not have a material",this);if(!e.material.materials)return void console.error(" can not bind to material.materials as node.material does not have a materials array",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error(" can not bind to bones as node does not have a skeleton",this);e=e.skeleton.bones;for(var a=0;a<e.length;a++)if(e[a].name===o){o=a;break}break;default:if(void 0===e[n])return void console.error(" can not bind to objectName of node, undefined",this);e=e[n]}if(void 0!==o){if(void 0===e[o])return void console.error(" trying to bind to objectIndex of objectName, but is undefined:",this,e);e=e[o]}}var s=e[r];if(void 0===s){var u=t.nodeName;return void console.error(" trying to update property for track: "+u+"."+r+" but it wasn't found.",e)}var c=this.Versioning.None;void 0!==e.needsUpdate?(c=this.Versioning.NeedsUpdate,this.targetObject=e):void 0!==e.matrixWorldNeedsUpdate&&(c=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=e);var l=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!e.geometry)return void console.error(" can not bind to morphTargetInfluences becasuse node does not have a geometry",this);if(!e.geometry.morphTargets)return void console.error(" can not bind to morphTargetInfluences becasuse node does not have a geometry.morphTargets",this);for(var a=0;a<this.node.geometry.morphTargets.length;a++)if(e.geometry.morphTargets[a].name===i){i=a;break}}l=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}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=r;this.getValue=this.GetterByBindingType[l],this.setValue=this.SetterByBindingTypeAndVersioning[l][c]},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}},Object.assign(Or.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},_getValue_unbound:Or.prototype.getValue,_setValue_unbound:Or.prototype.setValue,BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(e,t){e[t]=this.node[this.propertyName]},function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)e[t++]=n[r]},function(e,t){e[t]=this.resolvedProperty[this.propertyIndex]},function(e,t){this.resolvedProperty.toArray(e,t)}],SetterByBindingTypeAndVersioning:[[function(e,t){this.node[this.propertyName]=e[t]},function(e,t){this.node[this.propertyName]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.node[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++]},function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0},function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty[this.propertyIndex]=e[t]},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty.fromArray(e,t)},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}]]}),Or.Composite=function(e,t,n){var r=n||Or.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)},Or.Composite.prototype={constructor:Or.Composite,getValue:function(e,t){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(e,t)},setValue:function(e,t){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)},bind:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()},unbind:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},Or.create=function(e,t,n){return e&&e.isAnimationObjectGroup?new Or.Composite(e,t,n):new Or(e,t,n)},Or.parseTrackName=function(e){var t=/^((?:\w+[\/:])*)(\w+)?(?:\.(\w+)(?:\[(.+)\])?)?\.(\w+)(?:\[(.+)\])?$/,n=t.exec(e);if(!n)throw new Error("cannot parse trackName at all: "+e);var r={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]};if(null===r.propertyName||0===r.propertyName.length)throw new Error("can not parse propertyName from trackName: "+e);return r},Or.findNode=function(e,t){if(!t||""===t||"root"===t||"."===t||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){var n=function(e){for(var n=0;n<e.bones.length;n++){var r=e.bones[n];if(r.name===t)return r}return null}(e.skeleton);if(n)return n}if(e.children){var r=function(e){for(var n=0;n<e.length;n++){var i=e[n];if(i.name===t||i.uuid===t)return i;var o=r(i.children);if(o)return o}return null},i=r(e.children);if(i)return i}return null},Pr.prototype={constructor:Pr,isAnimationObjectGroup:!0,add:function(e){for(var t=this._objects,n=t.length,r=this.nCachedObjects_,i=this._indicesByUUID,o=this._paths,a=this._parsedPaths,s=this._bindings,u=s.length,c=0,l=arguments.length;c!==l;++c){var p=arguments[c],h=p.uuid,f=i[h];if(void 0===f){f=n++,i[h]=f,t.push(p);for(var d=0,m=u;d!==m;++d)s[d].push(new Or(p,o[d],a[d]))}else if(f<r){var v=t[f],y=--r,g=t[y];i[g.uuid]=f,t[f]=g,i[h]=y,t[y]=p;for(var d=0,m=u;d!==m;++d){var _=s[d],b=_[y],w=_[f];_[f]=b,void 0===w&&(w=new Or(p,o[d],a[d])),_[y]=w}}else t[f]!==v&&console.error("Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes...")}this.nCachedObjects_=r},remove:function(e){for(var t=this._objects,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,o=i.length,a=0,s=arguments.length;a!==s;++a){var u=arguments[a],c=u.uuid,l=r[c];if(void 0!==l&&l>=n){var p=n++,h=t[p];r[h.uuid]=l,t[l]=h,r[c]=p,t[p]=u;for(var f=0,d=o;f!==d;++f){var m=i[f],v=m[p],y=m[l];m[l]=v,m[p]=y}}}this.nCachedObjects_=n},uncache:function(e){for(var t=this._objects,n=t.length,r=this.nCachedObjects_,i=this._indicesByUUID,o=this._bindings,a=o.length,s=0,u=arguments.length;s!==u;++s){var c=arguments[s],l=c.uuid,p=i[l];if(void 0!==p)if(delete i[l],p<r){var h=--r,f=t[h],d=--n,m=t[d];i[f.uuid]=p,t[p]=f,i[m.uuid]=h,t[h]=m,t.pop();for(var v=0,y=a;v!==y;++v){var g=o[v],_=g[h],b=g[d];g[p]=_,g[h]=b,g.pop()}}else{var d=--n,m=t[d];i[m.uuid]=p,t[p]=m,t.pop();for(var v=0,y=a;v!==y;++v){var g=o[v];g[p]=g[d],g.pop()}}}this.nCachedObjects_=r},subscribe_:function(e,t){var n=this._bindingsIndicesByPath,r=n[e],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,u=s.length,c=this.nCachedObjects_,l=new Array(u);r=i.length,n[e]=r,o.push(e),a.push(t),i.push(l);for(var p=c,h=s.length;p!==h;++p){var f=s[p];l[p]=new Or(f,e,t)}return l},unsubscribe_:function(e){var t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];t[e[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}},Tr.prototype={constructor:Tr,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(e){return this._startTime=e,this},setLoop:function(e,t){return this.loop=e,this.repetitions=t,this},setEffectiveWeight:function(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(e){return this._scheduleFading(e,0,1)},fadeOut:function(e){return this._scheduleFading(e,1,0)},crossFadeFrom:function(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){var r=this._clip.duration,i=e._clip.duration,o=i/r,a=r/i;e.warp(1,o,t),this.warp(a,1,t)}return this},crossFadeTo:function(e,t,n){return e.crossFadeFrom(this,t,n)},stopFading:function(){var e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},setEffectiveTimeScale:function(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(e){return this.timeScale=this._clip.duration/e,this.stopWarping()},syncWith:function(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()},halt:function(e){return this.warp(this._effectiveTimeScale,0,e)},warp:function(e,t,n){var r=this._mixer,i=r.time,o=this._timeScaleInterpolant,a=this.timeScale;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);var s=o.parameterPositions,u=o.sampleValues;return s[0]=i,s[1]=i+n,u[0]=e/a,u[1]=t/a,this},stopWarping:function(){var e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(e,t,n,r){var i=this._startTime;if(null!==i){var o=(e-i)*n;if(o<0||0===n)return;this._startTime=null,t=n*o}t*=this._updateTimeScale(e);var a=this._updateTime(t),s=this._updateWeight(e);if(s>0)for(var u=this._interpolants,c=this._propertyBindings,l=0,p=u.length;l!==p;++l)u[l].evaluate(a),c[l].accumulate(r,s)},_updateWeight:function(e){var t=0;if(this.enabled){t=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t},_updateTimeScale:function(e){var t=0;if(!this.paused){t=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n){t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t},_updateTime:function(e){var t=this.time+e;if(0===e)return t;var n=this._clip.duration,r=this.loop,i=this._loopCount;if(2200===r){i===-1&&(this.loopCount=0,this._setEndings(!0,!0,!1));e:{if(t>=n)t=n;else{if(!(t<0))break e;t=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{var o=2202===r;if(i===-1&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),t>=n||t<0){var a=Math.floor(t/n);t-=n*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,t=e>0?n:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(0===s){var u=e<0;this._setEndings(u,!u,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}if(o&&1==(1&i))return this.time=t,n-t}return this.time=t,t},_setEndings:function(e,t,n){var r=this._interpolantSettings;n?(r.endingStart=2401,r.endingEnd=2401):(r.endingStart=e?this.zeroSlopeAtStart?2401:ha:2402,r.endingEnd=t?this.zeroSlopeAtEnd?2401:ha:2402)},_scheduleFading:function(e,t,n){var r=this._mixer,i=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=t,a[1]=i+e,s[1]=n,this}},Object.assign(Sr.prototype,t.prototype,{clipAction:function(e,t){var n=t||this._root,r=n.uuid,i="string"==typeof e?Kn.findByName(n,e):e,o=null!==i?i.uuid:e,a=this._actionsByClip[o],s=null;if(void 0!==a){var u=a.actionByRoot[r];if(void 0!==u)return u;s=a.knownActions[0],null===i&&(i=s._clip)}if(null===i)return null;var c=new Tr(this,i,t);return this._bindAction(c,s),this._addInactiveAction(c,o,r),c},existingAction:function(e,t){var n=t||this._root,r=n.uuid,i="string"==typeof e?Kn.findByName(n,e):e,o=i?i.uuid:e,a=this._actionsByClip[o];return void 0!==a?a.actionByRoot[r]||null:null},stopAllAction:function(){var e=this._actions,t=this._nActiveActions,n=this._bindings,r=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var i=0;i!==t;++i)e[i].reset();for(var i=0;i!==r;++i)n[i].useCount=0;return this},update:function(e){e*=this.timeScale;for(var t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),o=this._accuIndex^=1,a=0;a!==n;++a){var s=t[a];s.enabled&&s._update(r,e,i,o)}for(var u=this._bindings,c=this._nActiveBindings,a=0;a!==c;++a)u[a].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(e){var t=this._actions,n=e.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){for(var o=i.knownActions,a=0,s=o.length;a!==s;++a){var u=o[a];this._deactivateAction(u);var c=u._cacheIndex,l=t[t.length-1];u._cacheIndex=null,u._byClipCacheIndex=null,l._cacheIndex=c,t[c]=l,t.pop(),this._removeInactiveBindingsForAction(u)}delete r[n]}},uncacheRoot:function(e){var t=e.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot,o=i[t];void 0!==o&&(this._deactivateAction(o),this._removeInactiveAction(o))}var a=this._bindingsByRootAndName,s=a[t];if(void 0!==s)for(var u in s){var c=s[u];c.restoreOriginalState(),this._removeInactiveBinding(c)}},uncacheAction:function(e,t){var n=this.existingAction(e,t);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}),Object.assign(Sr.prototype,{_bindAction:function(e,t){var n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,o=e._propertyBindings,a=e._interpolants,s=n.uuid,u=this._bindingsByRootAndName,c=u[s];void 0===c&&(c={},u[s]=c);for(var l=0;l!==i;++l){var p=r[l],h=p.name,f=c[h];if(void 0!==f)o[l]=f;else{if(void 0!==(f=o[l])){null===f._cacheIndex&&(++f.referenceCount,this._addInactiveBinding(f,s,h));continue}var d=t&&t._propertyBindings[l].binding.parsedPath;f=new Er(Or.create(n,h,d),p.ValueTypeName,p.getValueSize()),++f.referenceCount,this._addInactiveBinding(f,s,h),o[l]=f}a[l].resultBuffer=f.buffer}},_activateAction:function(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){var t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}for(var i=e._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}},_deactivateAction:function(e){if(this._isActiveAction(e)){for(var t=e._propertyBindings,n=0,r=t.length;n!==r;++n){var i=t[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(e)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}},_isActiveAction:function(e){var t=e._cacheIndex;return null!==t&&t<this._nActiveActions},_addInactiveAction:function(e,t,n){var r=this._actions,i=this._actionsByClip,o=i[t];if(void 0===o)o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,i[t]=o;else{var a=o.knownActions;e._byClipCacheIndex=a.length,a.push(e)}e._cacheIndex=r.length,r.push(e),o.actionByRoot[n]=e},_removeInactiveAction:function(e){var t=this._actions,n=t[t.length-1],r=e._cacheIndex;n._cacheIndex=r,t[r]=n,t.pop(),e._cacheIndex=null;var i=e._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,u=s[s.length-1],c=e._byClipCacheIndex;u._byClipCacheIndex=c,s[c]=u,s.pop(),e._byClipCacheIndex=null,delete a.actionByRoot[(t._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(e)},_removeInactiveBindingsForAction:function(e){for(var t=e._propertyBindings,n=0,r=t.length;n!==r;++n){var i=t[n];0==--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(e){var t=this._actions,n=e._cacheIndex,r=this._nActiveActions++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_takeBackAction:function(e){var t=this._actions,n=e._cacheIndex,r=--this._nActiveActions,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_addInactiveBinding:function(e,t,n){var r=this._bindingsByRootAndName,i=r[t],o=this._bindings;void 0===i&&(i={},r[t]=i),i[n]=e,e._cacheIndex=o.length,o.push(e)},_removeInactiveBinding:function(e){var t=this._bindings,n=e.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=t[t.length-1],u=e._cacheIndex;s._cacheIndex=u,t[u]=s,t.pop(),delete a[i];e:{for(var c in a)break e;delete o[r]}},_lendBinding:function(e){var t=this._bindings,n=e._cacheIndex,r=this._nActiveBindings++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_takeBackBinding:function(e){var t=this._bindings,n=e._cacheIndex,r=--this._nActiveBindings,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_lendControlInterpolant:function(){var e=this._controlInterpolants,t=this._nActiveControlInterpolants++,n=e[t];return void 0===n&&(n=new zn(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),n.__cacheIndex=t,e[t]=n),n},_takeBackControlInterpolant:function(e){var t=this._controlInterpolants,n=e.__cacheIndex,r=--this._nActiveControlInterpolants,i=t[r];e.__cacheIndex=r,t[r]=e,i.__cacheIndex=n,t[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1)}),Rr.prototype=Object.create(Ce.prototype),Rr.prototype.constructor=Rr,Rr.prototype.isInstancedBufferGeometry=!0,Rr.prototype.addGroup=function(e,t,n){this.groups.push({start:e,count:t,materialIndex:n})},Rr.prototype.copy=function(e){var t=e.index;null!==t&&this.setIndex(t.clone());var n=e.attributes;for(var r in n){var i=n[r];this.addAttribute(r,i.clone())}for(var o=e.groups,a=0,s=o.length;a<s;a++){var u=o[a];this.addGroup(u.start,u.count,u.materialIndex)}return this},Ar.prototype={constructor:Ar,isInterleavedBufferAttribute:!0,get count(){return this.data.count},get array(){return this.data.array},setX:function(e,t){return this.data.array[e*this.data.stride+this.offset]=t,this},setY:function(e,t){return this.data.array[e*this.data.stride+this.offset+1]=t,this},setZ:function(e,t){return this.data.array[e*this.data.stride+this.offset+2]=t,this},setW:function(e,t){return this.data.array[e*this.data.stride+this.offset+3]=t,this},getX:function(e){return this.data.array[e*this.data.stride+this.offset]},getY:function(e){return this.data.array[e*this.data.stride+this.offset+1]},getZ:function(e){return this.data.array[e*this.data.stride+this.offset+2]},getW:function(e){return this.data.array[e*this.data.stride+this.offset+3]},setXY:function(e,t,n){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this},setXYZ:function(e,t,n,r){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this},setXYZW:function(e,t,n,r,i){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this.data.array[e+3]=i,this}},jr.prototype={constructor:jr,isInterleavedBuffer:!0,set needsUpdate(e){e===!0&&this.version++},setArray:function(e){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.count=void 0!==e?e.length/this.stride:0,this.array=e},setDynamic:function(e){return this.dynamic=e,this},copy:function(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.dynamic=e.dynamic,this},copyAt:function(e,t,n){e*=this.stride,n*=t.stride;for(var r=0,i=this.stride;r<i;r++)this.array[e+r]=t.array[n+r];return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},clone:function(){return(new this.constructor).copy(this)}},Lr.prototype=Object.create(jr.prototype),Lr.prototype.constructor=Lr,Lr.prototype.isInstancedInterleavedBuffer=!0,Lr.prototype.copy=function(e){return jr.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this},Dr.prototype=Object.create(me.prototype),Dr.prototype.constructor=Dr,Dr.prototype.isInstancedBufferAttribute=!0,Dr.prototype.copy=function(e){return me.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this},Ir.prototype={constructor:Ir,linePrecision:1,set:function(e,t){this.ray.set(e,t)},setFromCamera:function(e,t){t&&t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize()):t&&t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(e,t){var n=[];return Nr(e,this,n,t),n.sort(kr),n},intersectObjects:function(e,t){var n=[];if(Array.isArray(e)===!1)return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),n;for(var r=0,i=e.length;r<i;r++)Nr(e[r],this,n,t);return n.sort(kr),n}},Ur.prototype={constructor:Ur,start:function(){this.startTime=(performance||Date).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var e=0;if(this.autoStart&&!this.running&&this.start(),this.running){var t=(performance||Date).now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}},Br.prototype={constructor:Br,set:function(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,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(Oa.clamp(e.y/this.radius,-1,1))),this}},zr.prototype=Object.create(Re.prototype),zr.prototype.constructor=zr,zr.prototype.createAnimation=function(e,t,n,r){var i={start:t,end:n,length:n-t+1,fps:r,duration:(n-t)/r,lastFrame:0,currentFrame:0,active:!1,time:0,direction:1,weight:1,directionBackwards:!1,mirroredLoop:!1};this.animationsMap[e]=i,this.animationsList.push(i)},zr.prototype.autoCreateAnimations=function(e){for(var t,n={},r=this.geometry,i=0,o=r.morphTargets.length;i<o;i++){var a=r.morphTargets[i],s=a.name.match(/([a-z]+)_?(\d+)/i);if(s&&s.length>1){var u=s[1];n[u]||(n[u]={start:1/0,end:-(1/0)});var c=n[u];i<c.start&&(c.start=i),i>c.end&&(c.end=i),t||(t=u)}}for(var u in n){var c=n[u];this.createAnimation(u,c.start,c.end,e)}this.firstAnimation=t},zr.prototype.setAnimationDirectionForward=function(e){var t=this.animationsMap[e];t&&(t.direction=1,t.directionBackwards=!1)},zr.prototype.setAnimationDirectionBackward=function(e){var t=this.animationsMap[e];t&&(t.direction=-1,t.directionBackwards=!0)},zr.prototype.setAnimationFPS=function(e,t){var n=this.animationsMap[e];n&&(n.fps=t,n.duration=(n.end-n.start)/n.fps)},zr.prototype.setAnimationDuration=function(e,t){var n=this.animationsMap[e];n&&(n.duration=t,n.fps=(n.end-n.start)/n.duration)},zr.prototype.setAnimationWeight=function(e,t){var n=this.animationsMap[e];n&&(n.weight=t)},zr.prototype.setAnimationTime=function(e,t){var n=this.animationsMap[e];n&&(n.time=t)},zr.prototype.getAnimationTime=function(e){var t=0,n=this.animationsMap[e];return n&&(t=n.time),t},zr.prototype.getAnimationDuration=function(e){var t=-1,n=this.animationsMap[e];return n&&(t=n.duration),t},zr.prototype.playAnimation=function(e){var t=this.animationsMap[e];t?(t.time=0,t.active=!0):console.warn("THREE.MorphBlendMesh: animation["+e+"] undefined in .playAnimation()")},zr.prototype.stopAnimation=function(e){var t=this.animationsMap[e];t&&(t.active=!1)},zr.prototype.update=function(e){for(var t=0,n=this.animationsList.length;t<n;t++){var r=this.animationsList[t];if(r.active){var i=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+Oa.clamp(Math.floor(r.time/i),0,r.length-1),a=r.weight;o!==r.currentFrame&&(this.morphTargetInfluences[r.lastFrame]=0,this.morphTargetInfluences[r.currentFrame]=1*a,this.morphTargetInfluences[o]=0,r.lastFrame=r.currentFrame,r.currentFrame=o);var s=r.time%i/i;r.directionBackwards&&(s=1-s),r.currentFrame!==r.lastFrame?(this.morphTargetInfluences[r.currentFrame]=s*a,this.morphTargetInfluences[r.lastFrame]=(1-s)*a):this.morphTargetInfluences[r.currentFrame]=a}}},Gr.prototype=Object.create(ce.prototype),Gr.prototype.constructor=Gr,Gr.prototype.isImmediateRenderObject=!0,Hr.prototype=Object.create(xt.prototype),Hr.prototype.constructor=Hr,Hr.prototype.update=function(){var e=new c,t=new c,n=new ne;return function(){var r=["a","b","c"];this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);var i=this.object.matrixWorld,o=this.geometry.attributes.position,a=this.object.geometry;if(a&&a.isGeometry)for(var s=a.vertices,u=a.faces,c=0,l=0,p=u.length;l<p;l++)for(var h=u[l],f=0,d=h.vertexNormals.length;f<d;f++){var m=s[h[r[f]]],v=h.vertexNormals[f];e.copy(m).applyMatrix4(i),t.copy(v).applyMatrix3(n).normalize().multiplyScalar(this.size).add(e),o.setXYZ(c,e.x,e.y,e.z),c+=1,o.setXYZ(c,t.x,t.y,t.z),c+=1}else if(a&&a.isBufferGeometry)for(var y=a.attributes.position,g=a.attributes.normal,c=0,f=0,d=y.count;f<d;f++)e.set(y.getX(f),y.getY(f),y.getZ(f)).applyMatrix4(i),t.set(g.getX(f),g.getY(f),g.getZ(f)),t.applyMatrix3(n).normalize().multiplyScalar(this.size).add(e),o.setXYZ(c,e.x,e.y,e.z),c+=1,o.setXYZ(c,t.x,t.y,t.z),c+=1;return o.needsUpdate=!0,this}}(),Vr.prototype=Object.create(ce.prototype),Vr.prototype.constructor=Vr,Vr.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Vr.prototype.update=function(){var e=new c,t=new c;return function(){var n=this.light.distance?this.light.distance:1e3,r=n*Math.tan(this.light.angle);this.cone.scale.set(r,r,n),e.setFromMatrixPosition(this.light.matrixWorld),t.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(t.sub(e)),this.cone.material.color.copy(this.light.color).multiplyScalar(this.light.intensity)}}(),Wr.prototype=Object.create(xt.prototype),Wr.prototype.constructor=Wr,Wr.prototype.getBoneList=function(e){var t=[];e&&e.isBone&&t.push(e);for(var n=0;n<e.children.length;n++)t.push.apply(t,this.getBoneList(e.children[n]));return t},Wr.prototype.update=function(){for(var e=this.geometry,t=(new l).getInverse(this.root.matrixWorld),n=new l,r=0,i=0;i<this.bones.length;i++){var o=this.bones[i];o.parent&&o.parent.isBone&&(n.multiplyMatrices(t,o.matrixWorld),e.vertices[r].setFromMatrixPosition(n),n.multiplyMatrices(t,o.parent.matrixWorld),e.vertices[r+1].setFromMatrixPosition(n),r+=2)}e.verticesNeedUpdate=!0,e.computeBoundingSphere()},Xr.prototype=Object.create(Re.prototype),Xr.prototype.constructor=Xr,Xr.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Xr.prototype.update=function(){this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity)},qr.prototype=Object.create(ce.prototype),qr.prototype.constructor=qr,qr.prototype.dispose=function(){this.lightSphere.geometry.dispose(),this.lightSphere.material.dispose()},qr.prototype.update=function(){var e=new c;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(e.setFromMatrixPosition(this.light.matrixWorld).negate()),this.lightSphere.geometry.colorsNeedUpdate=!0}}(),Yr.prototype=Object.create(xt.prototype),Yr.prototype.constructor=Yr,Yr.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Zr.prototype=Object.create(xt.prototype),Zr.prototype.constructor=Zr,Zr.prototype.update=function(){var e=new c,t=new c,n=new ne;return function(){this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);for(var r=this.object.matrixWorld,i=this.geometry.attributes.position,o=this.object.geometry,a=o.vertices,s=o.faces,u=0,c=0,l=s.length;c<l;c++){var p=s[c],h=p.normal;e.copy(a[p.a]).add(a[p.b]).add(a[p.c]).divideScalar(3).applyMatrix4(r),t.copy(h).applyMatrix3(n).normalize().multiplyScalar(this.size).add(e),i.setXYZ(u,e.x,e.y,e.z),u+=1,i.setXYZ(u,t.x,t.y,t.z),u+=1}return i.needsUpdate=!0,this}}(),Qr.prototype=Object.create(ce.prototype),Qr.prototype.constructor=Qr,Qr.prototype.dispose=function(){var e=this.children[0],t=this.children[1];e.geometry.dispose(),e.material.dispose(),t.geometry.dispose(),t.material.dispose()},Qr.prototype.update=function(){var e=new c,t=new c,n=new c;return function(){e.setFromMatrixPosition(this.light.matrixWorld),t.setFromMatrixPosition(this.light.target.matrixWorld),n.subVectors(t,e);var r=this.children[0],i=this.children[1];r.lookAt(n),r.material.color.copy(this.light.color).multiplyScalar(this.light.intensity),i.lookAt(n),i.scale.z=n.length()}}(),Jr.prototype=Object.create(xt.prototype),Jr.prototype.constructor=Jr,Jr.prototype.update=function(){function e(e,o,a,s){r.set(o,a,s).unproject(i);var u=n[e];if(void 0!==u)for(var c=0,l=u.length;c<l;c++)t.vertices[u[c]].copy(r)}var t,n,r=new c,i=new Le;return function(){t=this.geometry,n=this.pointMap;i.projectionMatrix.copy(this.camera.projectionMatrix),e("c",0,0,-1),e("t",0,0,1),e("n1",-1,-1,-1),e("n2",1,-1,-1),e("n3",-1,1,-1),e("n4",1,1,-1),e("f1",-1,-1,1),e("f2",1,-1,1),e("f3",-1,1,1),e("f4",1,1,1),e("u1",.7,1.1,-1),e("u2",-.7,1.1,-1),e("u3",0,2,-1),e("cf1",-1,0,1),e("cf2",1,0,1),e("cf3",0,-1,1),e("cf4",0,1,1),e("cn1",-1,0,-1),e("cn2",1,0,-1),e("cn3",0,-1,-1),e("cn4",0,1,-1),t.verticesNeedUpdate=!0}}(),Kr.prototype=Object.create(Re.prototype),Kr.prototype.constructor=Kr,Kr.prototype.update=function(){this.box.setFromObject(this.object),this.box.getSize(this.scale),this.box.getCenter(this.position)},$r.prototype=Object.create(xt.prototype),$r.prototype.constructor=$r,$r.prototype.update=function(){var e=new ee;return function(t){if(t&&t.isBox3?e.copy(t):e.setFromObject(t),!e.isEmpty()){var n=e.min,r=e.max,i=this.geometry.attributes.position,o=i.array;o[0]=r.x,o[1]=r.y,o[2]=r.z,o[3]=n.x,o[4]=r.y,o[5]=r.z,o[6]=n.x,o[7]=n.y,o[8]=r.z,o[9]=r.x,o[10]=n.y,o[11]=r.z,o[12]=r.x,o[13]=r.y,o[14]=n.z,o[15]=n.x,o[16]=r.y,o[17]=n.z,o[18]=n.x,o[19]=n.y,o[20]=n.z,o[21]=r.x,o[22]=n.y,o[23]=n.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}();var Ka=new Ce;Ka.addAttribute("position",new Me([0,0,0,0,1,0],3));var $a=new sn(0,.5,1,5,1);$a.translate(0,-.5,0),ei.prototype=Object.create(ce.prototype),ei.prototype.constructor=ei,ei.prototype.setDirection=function(){var e,t=new c;return function(n){n.y>.99999?this.quaternion.set(0,0,0,1):n.y<-.99999?this.quaternion.set(1,0,0,0):(t.set(n.z,0,-n.x).normalize(),e=Math.acos(n.y),this.quaternion.setFromAxisAngle(t,e))}}(),ei.prototype.setLength=function(e,t,n){void 0===t&&(t=.2*e),void 0===n&&(n=.2*t),this.line.scale.set(1,Math.max(0,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()},ei.prototype.setColor=function(e){this.line.material.color.copy(e),this.cone.material.color.copy(e)},ti.prototype=Object.create(xt.prototype),ti.prototype.constructor=ti;var es=function(){function e(){}var t=new c,n=new e,r=new e,i=new e;return e.prototype.init=function(e,t,n,r){this.c0=e,this.c1=n,this.c2=-3*e+3*t-2*n-r,this.c3=2*e-2*t+n+r},e.prototype.initNonuniformCatmullRom=function(e,t,n,r,i,o,a){var s=(t-e)/i-(n-e)/(i+o)+(n-t)/o,u=(n-t)/o-(r-t)/(o+a)+(r-n)/a;s*=o,u*=o,this.init(t,n,s,u)},e.prototype.initCatmullRom=function(e,t,n,r,i){this.init(t,n,i*(n-e),i*(r-t))},e.prototype.calc=function(e){var t=e*e,n=t*e;return this.c0+this.c1*e+this.c2*t+this.c3*n},ir.create(function(e){this.points=e||[],this.closed=!1},function(e){var o,a,s,u,l=this.points;u=l.length,u<2&&console.log("duh, you need at least 2 points"),o=(u-(this.closed?0:1))*e,a=Math.floor(o),s=o-a,this.closed?a+=a>0?0:(Math.floor(Math.abs(a)/l.length)+1)*l.length:0===s&&a===u-1&&(a=u-2,s=1);var p,h,f,d;if(this.closed||a>0?p=l[(a-1)%u]:(t.subVectors(l[0],l[1]).add(l[0]),p=t),h=l[a%u],f=l[(a+1)%u],this.closed||a+2<u?d=l[(a+2)%u]:(t.subVectors(l[u-1],l[u-2]).add(l[u-1]),d=t),void 0===this.type||"centripetal"===this.type||"chordal"===this.type){var m="chordal"===this.type?.5:.25,v=Math.pow(p.distanceToSquared(h),m),y=Math.pow(h.distanceToSquared(f),m),g=Math.pow(f.distanceToSquared(d),m);y<1e-4&&(y=1),v<1e-4&&(v=y),g<1e-4&&(g=y),n.initNonuniformCatmullRom(p.x,h.x,f.x,d.x,v,y,g),r.initNonuniformCatmullRom(p.y,h.y,f.y,d.y,v,y,g),i.initNonuniformCatmullRom(p.z,h.z,f.z,d.z,v,y,g)}else if("catmullrom"===this.type){var _=void 0!==this.tension?this.tension:.5;n.initCatmullRom(p.x,h.x,f.x,d.x,_),r.initCatmullRom(p.y,h.y,f.y,d.y,_),i.initCatmullRom(p.z,h.z,f.z,d.z,_)}return new c(n.calc(s),r.calc(s),i.calc(s))})}();ni.prototype=Object.create(es.prototype);var ts=ir.create(function(e){console.warn("THREE.SplineCurve3 will be deprecated. Please use THREE.CatmullRomCurve3"),this.points=void 0===e?[]:e},function(e){var t=this.points,n=(t.length-1)*e,r=Math.floor(n),i=n-r,o=t[0==r?r:r-1],a=t[r],s=t[r>t.length-2?t.length-1:r+1],u=t[r>t.length-3?t.length-1:r+2],l=Za.interpolate;return new c(l(o.x,a.x,s.x,u.x,i),l(o.y,a.y,s.y,u.y,i),l(o.z,a.z,s.z,u.z,i))}),ns=ir.create(function(e,t,n,r){this.v0=e,this.v1=t,this.v2=n,this.v3=r},function(e){var t=za.b3;return new c(t(e,this.v0.x,this.v1.x,this.v2.x,this.v3.x),t(e,this.v0.y,this.v1.y,this.v2.y,this.v3.y),t(e,this.v0.z,this.v1.z,this.v2.z,this.v3.z))}),rs=ir.create(function(e,t,n){this.v0=e,this.v1=t,this.v2=n},function(e){var t=za.b2;return new c(t(e,this.v0.x,this.v1.x,this.v2.x),t(e,this.v0.y,this.v1.y,this.v2.y),t(e,this.v0.z,this.v1.z,this.v2.z))}),is=ir.create(function(e,t){this.v1=e,this.v2=t},function(e){if(1===e)return this.v2.clone();var t=new c;return t.subVectors(this.v2,this.v1),t.multiplyScalar(e),t.add(this.v1),t});ri.prototype=Object.create(sr.prototype),ri.prototype.constructor=ri;var os={createMultiMaterialObject:function(e,t){for(var n=new Ot,r=0,i=t.length;r<i;r++)n.add(new Re(e,t[r]));return n},detach:function(e,t,n){e.applyMatrix(t.matrixWorld),t.remove(e),n.add(e)},attach:function(e,t,n){var r=new l;r.getInverse(n.matrixWorld),e.applyMatrix(r),t.remove(e),n.add(e)}};Object.assign(q.prototype,{center:function(e){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(e)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},size:function(e){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(e)}}),Object.assign(ee.prototype,{center:function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},isIntersectionSphere:function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},size:function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)}}),Object.assign(pe.prototype,{center:function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)}}),Object.assign(ne.prototype,{multiplyVector3:function(e){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},multiplyVector3Array:function(e){return console.warn("THREE.Matrix3: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead."),this.applyToVector3Array(e)}}),Object.assign(l.prototype,{extractPosition:function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)},setRotationFromQuaternion:function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)},multiplyVector3:function(e){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) or vector.applyProjection( matrix ) instead."),e.applyProjection(this)},multiplyVector4:function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},multiplyVector3Array:function(e){return console.warn("THREE.Matrix4: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead."),this.applyToVector3Array(e)},rotateAxis:function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)},crossVector:function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},translate:function(e){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(e){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(e){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(e){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(e,t){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")}}),Object.assign(re.prototype,{isIntersectionLine:function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)}}),Object.assign(u.prototype,{multiplyVector3:function(e){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)}}),Object.assign(ae.prototype,{isIntersectionBox:function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},isIntersectionPlane:function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)},isIntersectionSphere:function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)}}),Object.assign(pr.prototype,{extrude:function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Zt(this,e)},makeGeometry:function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new on(this,e)}}),Object.assign(c.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(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)},getScaleFromMatrix:function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)},getColumnFromMatrix:function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)}}),Object.assign(ce.prototype,{getChildByName:function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)},renderDepth:function(e){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)}}),Object.defineProperties(ce.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(e){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=e}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(e){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(mt.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),De.prototype.setLens=function(e,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==t&&(this.filmGauge=t),this.setFocalLength(e)},Object.defineProperties(Rn.prototype,{onlyShadow:{set:function(e){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(e){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=e}},shadowCameraLeft:{set:function(e){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=e}},shadowCameraRight:{set:function(e){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=e}},shadowCameraTop:{set:function(e){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=e}},shadowCameraBottom:{set:function(e){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=e}},shadowCameraNear:{set:function(e){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=e}},shadowCameraFar:{set:function(e){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=e}},shadowCameraVisible:{set:function(e){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(e){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=e}},shadowDarkness:{set:function(e){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(e){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=e}},shadowMapHeight:{set:function(e){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=e}}}),Object.defineProperties(me.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Please use .count."),this.array.length}}}),Object.assign(Ce.prototype,{addIndex:function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)},addDrawCall:function(e,t,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(e,t)},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(Ce.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(Q.prototype,{wrapAround:{get:function(){console.warn("THREE."+this.type+": .wrapAround has been removed.")},set:function(e){console.warn("THREE."+this.type+": .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE."+this.type+": .wrapRGB has been removed."),new X}}}),Object.defineProperties(_n.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(e){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(e){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=e}}}),t.prototype=Object.assign(Object.create({constructor:t,apply:function(e){console.warn("THREE.EventDispatcher: .apply is deprecated, just inherit or Object.assign the prototype to mix-in."),Object.assign(e,this)}}),t.prototype),Object.defineProperties(Cr.prototype,{dynamic:{set:function(e){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.assign(ut.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(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)},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(ut.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=e}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=e}},shadowMapCullFace:{get:function(){return this.shadowMap.cullFace},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace."),this.shadowMap.cullFace=e}}}),Object.defineProperties(oe.prototype,{cullFace:{get:function(){return this.renderReverseSided?_i:gi},set:function(e){var t=e!==gi;console.warn("WebGLRenderer: .shadowMap.cullFace is deprecated. Set .shadowMap.renderReverseSided to "+t+"."),this.renderReverseSided=t}}}),Object.defineProperties(a.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=e}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=e}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=e}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=e}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(e){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=e}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(e){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=e}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(e){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=e}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(e){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=e}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(e){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=e}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(e){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=e}}}),Object.assign(wr.prototype,{load:function(e){console.warn("THREE.Audio: .load has been deprecated. Please use THREE.AudioLoader.");var t=this;return(new yr).load(e,function(e){t.setBuffer(e)}),this}}),Object.assign(Mr.prototype,{getData:function(e){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()}});var as={merge:function(e,t,n){console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.");var r;t.isMesh&&(t.matrixAutoUpdate&&t.updateMatrix(),r=t.matrix,t=t.geometry),e.merge(t,r,n)},center:function(e){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),e.center()}},ss={crossOrigin:void 0,loadTexture:function(e,t,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new Cn;i.setCrossOrigin(this.crossOrigin);var o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},loadTextureCube:function(e,t,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new Sn;i.setCrossOrigin(this.crossOrigin);var o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},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.")}};e.WebGLRenderTargetCube=s,e.WebGLRenderTarget=a,e.WebGLRenderer=ut,e.ShaderLib=ka,e.UniformsLib=Ia,e.UniformsUtils=ja,e.ShaderChunk=La,e.FogExp2=ct,e.Fog=lt,e.Scene=pt,e.LensFlare=ht,e.Sprite=dt,e.LOD=mt,e.SkinnedMesh=_t,e.Skeleton=yt,e.Bone=gt,e.Mesh=Re,e.LineSegments=xt,e.Line=wt,e.Points=Et,e.Group=Ot,e.VideoTexture=Pt,e.DataTexture=vt,e.CompressedTexture=Tt,e.CubeTexture=p,e.CanvasTexture=St,e.DepthTexture=Ct,e.TextureIdCount=i,e.Texture=r,e.MaterialIdCount=J,e.CompressedTextureLoader=On,e.BinaryTextureLoader=Pn,e.DataTextureLoader=Xa,e.CubeTextureLoader=Sn,e.TextureLoader=Cn,e.ObjectLoader=rr,e.MaterialLoader=$n,e.BufferGeometryLoader=er,e.DefaultLoadingManager=Wa,e.LoadingManager=Mn,e.JSONLoader=nr,e.ImageLoader=Tn,e.FontLoader=mr,e.XHRLoader=En,e.Loader=tr,e.Cache=Va,e.AudioLoader=yr,e.SpotLightShadow=Ln,e.SpotLight=Dn,e.PointLight=In,e.HemisphereLight=An,e.DirectionalLightShadow=kn,e.DirectionalLight=Nn,e.AmbientLight=Un,e.LightShadow=jn,e.Light=Rn,e.StereoCamera=gr,e.PerspectiveCamera=De,e.OrthographicCamera=Ie,e.CubeCamera=_r,e.Camera=Le,e.AudioListener=br,e.PositionalAudio=xr,e.getAudioContext=vr,e.AudioAnalyser=Mr,e.Audio=wr,e.VectorKeyframeTrack=Vn,e.StringKeyframeTrack=Yn,e.QuaternionKeyframeTrack=Xn,e.NumberKeyframeTrack=qn,e.ColorKeyframeTrack=Qn,e.BooleanKeyframeTrack=Zn,e.PropertyMixer=Er,e.PropertyBinding=Or,e.KeyframeTrack=Jn,e.AnimationUtils=qa,e.AnimationObjectGroup=Pr,e.AnimationMixer=Sr,e.AnimationClip=Kn,e.Uniform=Cr,e.InstancedBufferGeometry=Rr,e.BufferGeometry=Ce,e.GeometryIdCount=Te,e.Geometry=Pe,e.InterleavedBufferAttribute=Ar,e.InstancedInterleavedBuffer=Lr,e.InterleavedBuffer=jr,e.InstancedBufferAttribute=Dr,e.DynamicBufferAttribute=Oe,e.Float64Attribute=Ee,e.Float32Attribute=Me,e.Uint32Attribute=xe,e.Int32Attribute=we,e.Uint16Attribute=be,e.Int16Attribute=_e,e.Uint8ClampedAttribute=ge,e.Uint8Attribute=ye,e.Int8Attribute=ve,e.BufferAttribute=me,e.Face3=fe,e.Object3DIdCount=le,e.Object3D=ce,e.Raycaster=Ir,e.Layers=ue,e.EventDispatcher=t,e.Clock=Ur,e.QuaternionLinearInterpolant=Wn,e.LinearInterpolant=zn,e.DiscreteInterpolant=Gn,e.CubicInterpolant=Bn,e.Interpolant=Fn,e.Triangle=he,e.Spline=Fr,e.Math=Oa,e.Spherical=Br,e.Plane=re,e.Frustum=ie,e.Sphere=te,e.Ray=ae,e.Matrix4=l,e.Matrix3=ne,e.Box3=ee,e.Box2=q,e.Line3=pe,e.Euler=se,e.Vector4=o,e.Vector3=c,e.Vector2=n,e.Quaternion=u,e.ColorKeywords=Da,e.Color=X,e.MorphBlendMesh=zr,e.ImmediateRenderObject=Gr,e.VertexNormalsHelper=Hr,e.SpotLightHelper=Vr,e.SkeletonHelper=Wr,e.PointLightHelper=Xr,e.HemisphereLightHelper=qr,e.GridHelper=Yr,e.FaceNormalsHelper=Zr,e.DirectionalLightHelper=Qr,e.CameraHelper=Jr,e.BoundingBoxHelper=Kr,e.BoxHelper=$r,e.ArrowHelper=ei,e.AxisHelper=ti,e.ClosedSplineCurve3=ni,e.CatmullRomCurve3=es,e.SplineCurve3=ts,e.CubicBezierCurve3=ns,e.QuadraticBezierCurve3=rs,e.LineCurve3=is,e.ArcCurve=ri,e.EllipseCurve=sr,e.SplineCurve=ur,e.CubicBezierCurve=cr,e.QuadraticBezierCurve=lr,e.LineCurve=or,e.Shape=pr,e.ShapePath=fr,e.Path=hr,e.Font=dr,e.CurvePath=ar,e.Curve=ir,e.ShapeUtils=za,e.SceneUtils=os,e.CurveUtils=Za,e.WireframeGeometry=Rt,e.ParametricGeometry=jt,e.ParametricBufferGeometry=At,e.TetrahedronGeometry=It,e.TetrahedronBufferGeometry=Dt,e.OctahedronGeometry=Nt,e.OctahedronBufferGeometry=kt,e.IcosahedronGeometry=Ft,e.IcosahedronBufferGeometry=Ut,e.DodecahedronGeometry=zt,e.DodecahedronBufferGeometry=Bt,e.PolyhedronGeometry=Gt,e.PolyhedronBufferGeometry=Lt,e.TubeGeometry=Vt,e.TubeBufferGeometry=Ht,e.TorusKnotGeometry=Xt,e.TorusKnotBufferGeometry=Wt,e.TorusGeometry=Yt,e.TorusBufferGeometry=qt,e.TextGeometry=Qt,e.SphereBufferGeometry=Jt,e.SphereGeometry=Kt,e.RingGeometry=en,e.RingBufferGeometry=$t,e.PlaneBufferGeometry=je,e.PlaneGeometry=tn,e.LatheGeometry=rn,e.LatheBufferGeometry=nn,e.ShapeGeometry=on,e.ExtrudeGeometry=Zt,e.EdgesGeometry=an,e.ConeGeometry=cn,e.ConeBufferGeometry=ln;e.CylinderGeometry=un,e.CylinderBufferGeometry=sn,e.CircleBufferGeometry=pn,e.CircleGeometry=hn,e.BoxBufferGeometry=Ae,e.BoxGeometry=fn,e.ShadowMaterial=dn,e.SpriteMaterial=ft,e.RawShaderMaterial=mn,e.ShaderMaterial=K,e.PointsMaterial=Mt,e.MultiMaterial=vn,e.MeshPhysicalMaterial=gn,e.MeshStandardMaterial=yn,e.MeshPhongMaterial=_n,e.MeshNormalMaterial=bn,e.MeshLambertMaterial=wn,e.MeshDepthMaterial=$,e.MeshBasicMaterial=de,e.LineDashedMaterial=xn,e.LineBasicMaterial=bt,e.Material=Q,e.REVISION=mi,e.MOUSE=vi,e.CullFaceNone=yi,e.CullFaceBack=gi,e.CullFaceFront=_i,e.CullFaceFrontBack=3,e.FrontFaceDirectionCW=bi,e.FrontFaceDirectionCCW=1,e.BasicShadowMap=0,e.PCFShadowMap=wi,e.PCFSoftShadowMap=xi,e.FrontSide=Mi,e.BackSide=Ei,e.DoubleSide=Oi,e.FlatShading=Pi,e.SmoothShading=Ti,e.NoColors=Si,e.FaceColors=Ci,e.VertexColors=Ri,e.NoBlending=Ai,e.NormalBlending=ji,e.AdditiveBlending=Li,e.SubtractiveBlending=Di,e.MultiplyBlending=Ii,e.CustomBlending=ki,e.BlendingMode=Ni,e.AddEquation=Ui,e.SubtractEquation=Fi,e.ReverseSubtractEquation=Bi,e.MinEquation=zi,e.MaxEquation=Gi,e.ZeroFactor=Hi,e.OneFactor=Vi,e.SrcColorFactor=Wi,e.OneMinusSrcColorFactor=Xi,e.SrcAlphaFactor=qi,e.OneMinusSrcAlphaFactor=Yi,e.DstAlphaFactor=Zi,e.OneMinusDstAlphaFactor=Qi,e.DstColorFactor=Ji,e.OneMinusDstColorFactor=Ki,e.SrcAlphaSaturateFactor=$i,e.NeverDepth=eo,e.AlwaysDepth=to,e.LessDepth=no,e.LessEqualDepth=ro,e.EqualDepth=io,e.GreaterEqualDepth=oo,e.GreaterDepth=ao,e.NotEqualDepth=so,e.MultiplyOperation=uo,e.MixOperation=co,e.AddOperation=lo,e.NoToneMapping=po,e.LinearToneMapping=ho,e.ReinhardToneMapping=fo,e.Uncharted2ToneMapping=mo,e.CineonToneMapping=vo,e.UVMapping=300,e.CubeReflectionMapping=yo,e.CubeRefractionMapping=go,e.EquirectangularReflectionMapping=_o,e.EquirectangularRefractionMapping=bo,e.SphericalReflectionMapping=wo,e.CubeUVReflectionMapping=xo,e.CubeUVRefractionMapping=Mo,e.TextureMapping=Eo,e.RepeatWrapping=Oo,e.ClampToEdgeWrapping=Po,e.MirroredRepeatWrapping=To,e.TextureWrapping=So,e.NearestFilter=Co,e.NearestMipMapNearestFilter=Ro,e.NearestMipMapLinearFilter=Ao,e.LinearFilter=jo,e.LinearMipMapNearestFilter=Lo,e.LinearMipMapLinearFilter=Do,e.TextureFilter=Io,e.UnsignedByteType=ko,e.ByteType=No,e.ShortType=Uo,e.UnsignedShortType=Fo,e.IntType=Bo,e.UnsignedIntType=zo,e.FloatType=Go,e.HalfFloatType=Ho,e.UnsignedShort4444Type=Vo,e.UnsignedShort5551Type=Wo,e.UnsignedShort565Type=Xo,e.UnsignedInt248Type=qo,e.AlphaFormat=Yo,e.RGBFormat=Zo,e.RGBAFormat=Qo,e.LuminanceFormat=Jo,e.LuminanceAlphaFormat=Ko,e.RGBEFormat=$o,e.DepthFormat=ea,e.DepthStencilFormat=ta,e.RGB_S3TC_DXT1_Format=na,e.RGBA_S3TC_DXT1_Format=ra,e.RGBA_S3TC_DXT3_Format=ia,e.RGBA_S3TC_DXT5_Format=oa,e.RGB_PVRTC_4BPPV1_Format=aa,e.RGB_PVRTC_2BPPV1_Format=sa,e.RGBA_PVRTC_4BPPV1_Format=ua,e.RGBA_PVRTC_2BPPV1_Format=ca,e.RGB_ETC1_Format=la,e.LoopOnce=2200,e.LoopRepeat=pa,e.LoopPingPong=2202,e.InterpolateDiscrete=2300,e.InterpolateLinear=2301,e.InterpolateSmooth=2302,e.ZeroCurvatureEnding=ha,e.ZeroSlopeEnding=2401,e.WrapAroundEnding=2402,e.TrianglesDrawMode=fa,e.TriangleStripDrawMode=da,e.TriangleFanDrawMode=ma,e.LinearEncoding=va,e.sRGBEncoding=ya,e.GammaEncoding=ga,e.RGBEEncoding=_a,e.LogLuvEncoding=3003,e.RGBM7Encoding=ba,e.RGBM16Encoding=wa,e.RGBDEncoding=xa,e.BasicDepthPacking=Ma,e.RGBADepthPacking=Ea,e.CubeGeometry=fn,e.Face4=ii,e.LineStrip=0,e.LinePieces=1,e.MeshFaceMaterial=vn,e.PointCloud=oi,e.Particle=dt,e.ParticleSystem=ai,e.PointCloudMaterial=si,e.ParticleBasicMaterial=ui,e.ParticleSystemMaterial=ci,e.Vertex=li,e.EdgesHelper=pi,e.WireframeHelper=hi,e.GeometryUtils=as,e.ImageUtils=ss,e.Projector=fi,e.CanvasRenderer=di,Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AudioContext",{get:function(){return e.getAudioContext()}})})},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}function i(e){this.message=e,this.stack=""}function o(e){function t(t,n,r,o,a,s,u){o=o||M,s=s||r;if(null==n[r]){var c=_[a];return t?new i(null===n[r]?"The "+c+" `"+s+"` is marked as required in `"+o+"`, but its value is `null`.":"The "+c+" `"+s+"` is marked as required in `"+o+"`, but its value is `undefined`."):null}return e(n,r,o,a,s)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function a(e){function t(t,n,r,o,a,s){var u=t[n];if(m(u)!==e)return new i("Invalid "+_[o]+" `"+a+"` of type `"+v(u)+"` supplied to `"+r+"`, expected `"+e+"`.");return null}return o(t)}function s(e){function t(t,n,r,o,a){if("function"!=typeof e)return new i("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){return new i("Invalid "+_[o]+" `"+a+"` of type `"+m(s)+"` supplied to `"+r+"`, expected an array.")}for(var u=0;u<s.length;u++){var c=e(s,u,r,o,a+"["+u+"]",b);if(c instanceof Error)return c}return null}return o(t)}function u(e){function t(t,n,r,o,a){if(!(t[n]instanceof e)){var s=_[o],u=e.name||M;return new i("Invalid "+s+" `"+a+"` of type `"+y(t[n])+"` supplied to `"+r+"`, expected instance of `"+u+"`.")}return null}return o(t)}function c(e){function t(t,n,o,a,s){for(var u=t[n],c=0;c<e.length;c++)if(r(u,e[c]))return null;return new i("Invalid "+_[a]+" `"+s+"` of value `"+u+"` supplied to `"+o+"`, expected one of "+JSON.stringify(e)+".")}return Array.isArray(e)?o(t):w.thatReturnsNull}function l(e){function t(t,n,r,o,a){if("function"!=typeof e)return new i("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var s=t[n],u=m(s);if("object"!==u){return new i("Invalid "+_[o]+" `"+a+"` of type `"+u+"` supplied to `"+r+"`, expected an object.")}for(var c in s)if(s.hasOwnProperty(c)){var l=e(s,c,r,o,a+"."+c,b);if(l instanceof Error)return l}return null}return o(t)}function p(e){function t(t,n,r,o,a){for(var s=0;s<e.length;s++){if(null==(0,e[s])(t,n,r,o,a,b))return null}return new i("Invalid "+_[o]+" `"+a+"` supplied to `"+r+"`.")}return Array.isArray(e)?o(t):w.thatReturnsNull}function h(e){function t(t,n,r,o,a){var s=t[n],u=m(s);if("object"!==u){return new i("Invalid "+_[o]+" `"+a+"` of type `"+u+"` supplied to `"+r+"`, expected `object`.")}for(var c in e){var l=e[c];if(l){var p=l(s,c,r,o,a+"."+c,b);if(p)return p}}return null}return o(t)}function f(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(f);if(null===e||g.isValidElement(e))return!0;var t=x(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!f(n.value))return!1}else for(;!(n=r.next()).done;){var i=n.value;if(i&&!f(i[1]))return!1}return!0;default:return!1}}function d(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function m(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":d(t,e)?"symbol":t}function v(e){var t=m(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(e){return e.constructor&&e.constructor.name?e.constructor.name:M}var g=n(15),_=n(26),b=n(65),w=n(23),x=n(67),M=(n(4),"<<anonymous>>"),E={array:a("array"),bool:a("boolean"),func:a("function"),number:a("number"),object:a("object"),string:a("string"),symbol:a("symbol"),any:function(){return o(w.thatReturns(null))}(),arrayOf:s,element:function(){function e(e,t,n,r,o){var a=e[t];if(!g.isValidElement(a)){return new i("Invalid "+_[r]+" `"+o+"` of type `"+m(a)+"` supplied to `"+n+"`, expected a single ReactElement.")}return null}return o(e)}(),instanceOf:u,node:function(){function e(e,t,n,r,o){if(!f(e[t])){return new i("Invalid "+_[r]+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")}return null}return o(e)}(),objectOf:l,oneOf:c,oneOfType:p,shape:h};i.prototype=Error.prototype,e.exports=E},function(e,t,n){"use strict";function r(e,t,n,r,i,o,a,s){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,a,s],l=0;u=new Error(t.replace(/%s/g,function(){return c[l++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}}e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r,o,a,s,u){if(i(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,s,u],p=0;c=new Error(t.replace(/%s/g,function(){return l[p++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var i=function(e){};e.exports=r},function(e,t,n){"use strict";var r=n(23),i=r;e.exports=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return e.constructor&&(e.constructor.name||e.constructor.displayName)?e.constructor.name||e.constructor.displayName:f}function o(e){function t(t,n,r,i,o,a){var s=i||f,u=a||r;if(void 0===n[r]){var c=l.default[o];return t?new h.default("The "+c+" `"+u+"` is marked as required in `"+s+"`, but its value is `undefined`."):null}for(var p=arguments.length,d=Array(p>6?p-6:0),m=6;m<p;m++)d[m-6]=arguments[m];return e.apply(void 0,[n,r,s,o,u].concat(d))}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function a(e){function t(t,r,o,a,s){for(var u=arguments.length,c=Array(u>5?u-5:0),p=5;p<u;p++)c[p-5]=arguments[p];var d=n.apply(void 0,[t,r,o,a,s].concat(c));if(null!==d){var m=l.default[a],v=e.name||e.displayName||f,y=i(t[r]);return new h.default("Invalid "+m+" `"+s+"` of type `"+y+"` supplied to `"+o+"`, expected instance of `"+v+"`.")}return d}var n=u.default.instanceOf(e),r=o(t),a=""+(e.displayName||e.name||e._type||e);return r.toString=function(){return"``` "+a+" ```"},r.isRequired.toString=function(){return r.toString()+" *``` required ```*"},r.displayName=a,r.isRequired.displayName=a,r}var s=n(1),u=r(s),c=n(26),l=r(c),p=n(83),h=r(p),f="<<anonymous>>";e.exports=a},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var i=new Error(n);throw i.name="Invariant Violation",i.framesToPop=1,i}e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s,u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},p=n(0),h=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(p),f=n(2),d=r(f),m=n(1),v=r(m),y=n(8),g=r(y),_=n(36),b=r(_),w=n(5),x=r(w),M=(0,b.default)(s=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasName(),n.hasProp("vertices",{type:v.default.arrayOf((0,x.default)(h.Vector3)),update:function(e,t,n){n&&e.vertices!==t&&(e.vertices=t,e.verticesNeedUpdate=!0)},updateInitial:!0,default:[]}),n.hasProp("colors",{type:v.default.arrayOf((0,x.default)(h.Color)),update:function(e,t,n){n&&e.colors!==t&&(e.colors=t,e.colorsNeedUpdate=!0)},updateInitial:!0,default:[]}),n.hasProp("faceVertexUvs",{type:v.default.arrayOf(v.default.arrayOf(v.default.arrayOf(h.Vector2))),update:function(e,t,n){n&&e.faceVertexUvs!==t&&(e.faceVertexUvs=t,e.uvsNeedUpdate=!0)},updateInitial:!0,default:[]}),n.hasProp("faces",{type:v.default.arrayOf((0,x.default)(h.Face3)),update:function(e,t,n){n&&e.faces!==t&&(e.faces=t,e.verticesNeedUpdate=!0,e.elementsNeedUpdate=!0)},updateInitial:!0,default:[]}),n.hasProp("dynamic",{type:v.default.bool,update:function(e,t){e.dynamic=!!t},default:!1}),n}return a(t,e),c(t,[{key:"setParent",value:function(e,n){(0,d.default)(n instanceof h.Mesh||n instanceof h.Points||n instanceof h.Line,"Parent is not a mesh"),(0,d.default)(void 0===n.geometry,"Parent already has a geometry"),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setParent",this).call(this,e,n),n.geometry=e}},{key:"applyInitialProps",value:function(e,n){e.userData=u({},e.userData),n.hasOwnProperty("dynamic")&&(e.dynamic=!!n.dynamic),e.userData._remountAfterPropsUpdate=!1,l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n)}},{key:"unmount",value:function(e){var n=e.userData.markup.parentMarkup.threeObject;(n instanceof h.Mesh||n instanceof h.Points)&&n.geometry===e&&(n.geometry=void 0),e.dispose(),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"unmount",this).call(this,e)}},{key:"highlight",value:function(e){var t=e.userData.markup.parentMarkup.threeObject;e.userData.events.emit("highlight",{uuid:e.uuid,boundingBoxFunc:function(){var e=new h.Box3;return e.setFromObject(t),[e]}})}},{key:"getBoundingBoxes",value:function(e){var t=e.userData.markup.parentMarkup.threeObject,n=new h.Box3;return n.setFromObject(t),[n]}},{key:"hideHighlight",value:function(e){e.userData.events.emit("hideHighlight")}}]),t}(g.default))||s;e.exports=M},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(2),u=r(s),c=n(13),l=r(c),p=n(88),h=r(p),f=n(1),d=r(f),m=n(126),v=(r(m),n(73)),y=(r(v),h.default.EventEmitter),g=function(){function e(t){i(this,e),this.react3RendererInstance=t,this.propUpdates={},this.propDeletes={},this.propDefaults={},this._initialOnly={},this._updateInitial=[],this._simpleProperties=[],this.propTypes={},this._hasName=!1}return a(e,[{key:"hasEvent",value:function(e){this._hasEvents=!0,this.hasProp(e,{type:d.default.func,updateInitial:!0,update:function(t,n){t.userData._eventCallbacks[e]=n},default:null})}},{key:"removeProp",value:function(e){(0,u.default)(this.propTypes.hasOwnProperty(e),"The property %s has not been defined",e);var t=this._simpleProperties.indexOf(e);t!==-1&&this._simpleProperties.splice(t,1),delete this.propTypes[e],delete this.propDeletes[e],delete this.propUpdates[e],delete this.propDefaults[e];var n=this._updateInitial.indexOf(e);n!==-1&&this._updateInitial.splice(n,1),delete this._initialOnly[e]}},{key:"hasProp",value:function(e,t){var n=this;if((0,u.default)(t.hasOwnProperty("type"),"The information should include a `type` property"),(0,u.default)(!this.propTypes.hasOwnProperty(e)||t.override,"The property %s has already been defined",e),t.override){var r=this._simpleProperties.indexOf(e);r!==-1&&this._simpleProperties.splice(r,1)}this.propTypes[e]=t.type,t.hasOwnProperty("simple")?(this.registerSimpleProperties([e]),t.hasOwnProperty("default")&&(this.propDeletes[e]=function(r){n.propUpdates[e](r,t.default,!0)},this.propDefaults[e]=t.default)):(t.hasOwnProperty("update")&&(this.propUpdates[e]=t.update),t.hasOwnProperty("default")?((0,u.default)(t.hasOwnProperty("update"),"The information should include a `update` property if it has a `default` property"),this.propDeletes[e]=function(e){t.update(e,t.default,!0)},this.propDefaults[e]=t.default):(0,u.default)(t.update===this.triggerRemount,"The type information for "+this.constructor.name+"."+e+" should include a `default` property if it's not going to trigger remount"),t.hasOwnProperty("remove")&&(0,u.default)(!1,"Bad 'remove' info for "+this.constructor.name+"."+e),t.hasOwnProperty("updateInitial")&&((0,u.default)(t.hasOwnProperty("update"),"The information should include a `update` property if it has a`updateInitial` property"),this._updateInitial.indexOf(e)===-1&&this._updateInitial.push(e)),t.initialOnly&&(0,u.default)(t.hasOwnProperty("updateInitial"),"The information should include a `updateInitial` property if it has an `initialOnly` property"),this._initialOnly[e]=t.initialOnly)}},{key:"hasName",value:function(){var e=this;this._hasName=!0,this.hasProp("name",{type:d.default.string,update:function(t,n){e._updateName(t,n)},default:""})}},{key:"_updateName",value:function(e,t){var n=e.name;e.name=t,e.userData.events.emit("rename",{oldName:n,nextName:t});var r=e.userData.markup;r._rootInstance&&r._rootInstance.objectRenamed(e,n,t)}},{key:"placeRemountTrigger",value:function(e,t){e.userData._triggerRemount=t}},{key:"applyInitialProps",value:function(e,t){var n=this,r=new y;this._hasName&&t.name&&(e.name=t.name),this._hasEvents&&(e.userData._eventCallbacks={}),r.on("resource.added",function(t){var n=e.userData.markup.childrenMarkup,r=o({},t,{distance:t.distance+1});n.forEach(function(e){return e.threeObject.userData.events.emit("resource.added",r)})}),r.on("resource.removed",function(t){var n=e.userData.markup.childrenMarkup,r=o({},t,{distance:t.distance+1});n.forEach(function(e){return e.threeObject.userData.events.emit("resource.removed",r)})}),e.userData.events=r,e.userData._descriptor=this,this._updateInitial.forEach(function(r){if(t.hasOwnProperty(r))n.propUpdates[r](e,t[r],!0);else{var i=void 0;n.propDefaults.hasOwnProperty(r)&&(i=n.propDefaults[r]),n.propUpdates[r](e,i,!1)}}),this._simpleProperties.forEach(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})}},{key:"construct",value:function(e){(0,u.default)(!1,"Missing constructor!")}},{key:"addChildren",value:function(e,t){(0,u.default)(!1,"Cannot add children to "+this.constructor.name+"!")}},{key:"addChild",value:function(e,t,n){(0,u.default)(!1,"Cannot add child to "+this.constructor.name+"!")}},{key:"moveChild",value:function(){(0,u.default)(!1,"Cannot move children in "+this.constructor.name+"!")}},{key:"removeChild",value:function(e,t){(0,u.default)(!1,"Cannot remove children in "+this.constructor.name+"!")}},{key:"setParent",value:function(e,t){var n=t.userData.markup;n&&n._rootInstance&&n._rootInstance.objectMounted(e)}},{key:"componentWillUnmount",value:function(e){}},{key:"unmount",value:function(e){var t=e.userData.markup;t._rootInstance&&t._rootInstance.objectRemoved(e),this._hasEvents&&delete e.userData._eventCallbacks,e.userData.events.emit("dispose",{object:e}),e.userData.events.removeAllListeners()}},{key:"removedFromParent",value:function(e){delete e.userData.events}},{key:"deleteProperty",value:function(e,t){this.propDeletes[t]&&this.propDeletes[t](e)}},{key:"updateProperty",value:function(e,t,n){this._initialOnly[t]?this.triggerRemount(e):this.propUpdates[t]?this.propUpdates[t](e,n,!0):((0,l.default)(!1,"updating prop "+t+" ( "+n+" ) for "+this.constructor.name),this.triggerRemount(e))}},{key:"highlight",value:function(e){}},{key:"hideHighlight",value:function(e){}},{key:"useSimpleUpdates",value:function(e){for(var t=0;t<e.length;++t){var n=e[t];this.propUpdates[n]=this._updateSimple.bind(this,n)}}},{key:"_updateSimple",value:function(e,t,n){t[e]=n}},{key:"registerSimpleProperties",value:function(e){var t=this;e.forEach(function(e){t._simpleProperties.indexOf(e)===-1&&t._simpleProperties.push(e)}),this.useSimpleUpdates(e)}},{key:"getBoundingBoxes",value:function(e){return[]}},{key:"triggerRemount",value:function(e){e.userData._triggerRemount&&(e.userData._triggerRemount(),delete e.userData._triggerRemount)}},{key:"beginPropertyUpdates",value:function(e){}},{key:"completePropertyUpdates",value:function(e){}},{key:"beginChildUpdates",value:function(e){}},{key:"completeChildUpdates",value:function(e){}}]),e}();e.exports=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t,n){e.splice(n,0,e.splice(t,1)[0])}var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},l=n(0),p=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(l),h=n(2),f=(r(h),n(13)),d=(r(f),n(1)),m=r(d),v=n(8),y=r(v),g=n(5),_=r(g),b=function(e){function t(e){function n(e){return function(t,n){t[e].copy(n)}}i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.hasName(),r.hasProp("position",{type:(0,_.default)(p.Vector3),update:function(e,t){e.position.copy(t),e.userData._lookAt&&e.lookAt(e.userData._lookAt)},default:new p.Vector3}),r.hasProp("rotation",{type:(0,_.default)(p.Euler),update:function(e,t){e.rotation.copy(t)},default:new p.Euler}),r.hasProp("quaternion",{type:(0,_.default)(p.Quaternion),update:n("quaternion"),default:new p.Quaternion}),r.hasProp("scale",{type:(0,_.default)(p.Vector3),update:n("scale"),default:new p.Vector3(1,1,1)}),r.hasProp("lookAt",{type:(0,_.default)(p.Vector3),update:function(e,t){e.userData._lookAt=t,t&&e.lookAt(t)},default:void 0}),r.hasProp("matrix",{type:(0,_.default)(p.Matrix4),update:function(e,t){e.matrix.copy(t),e.matrix.decompose(e.position,e.quaternion,e.scale)},default:new p.Matrix4}),["frustumCulled","visible"].forEach(function(e){r.hasProp(e,{type:m.default.bool,simple:!0,default:!0})}),r.hasProp("renderOrder",{type:m.default.number,simple:!0}),r.hasProp("castShadow",{type:m.default.bool,simple:!0,default:!1}),r.hasProp("receiveShadow",{type:m.default.bool,updateInitial:!0,update:function(e,t){e.receiveShadow=t,e.material&&(e.material.needsUpdate=!0)},default:!1}),r}return a(t,e),u(t,[{key:"beginPropertyUpdates",value:function(e,t){}},{key:"construct",value:function(){return new p.Object3D}},{key:"applyInitialProps",value:function(e,n){c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n),n.matrix?e.applyMatrix(n.matrix):(n.position&&e.position.copy(n.position),n.scale&&e.scale.copy(n.scale),n.rotation&&e.rotation.copy(n.rotation),n.quaternion&&e.quaternion.copy(n.quaternion),n.lookAt&&e.lookAt(n.lookAt)),n.lookAt&&(e.userData._lookAt=n.lookAt)}},{key:"addChildren",value:function(e,t){t.forEach(function(t){e.add(t)})}},{key:"addChild",value:function(e,t,n){e.add(t),this.moveChild(e,t,n,e.children.length-1)}},{key:"removeChild",value:function(e,t){e.remove(t)}},{key:"moveChild",value:function(e,t,n,r){s(e.children,e.children.indexOf(t),n)}},{key:"highlight",value:function(e){var t=this;e.userData.events.emit("highlight",{uuid:e.uuid,boundingBoxFunc:function(){return t.getBoundingBoxes(e)}})}},{key:"getBoundingBoxes",value:function(e){var t=new p.Box3;return t.setFromObject(e),[t]}},{key:"hideHighlight",value:function(e){e.userData.events.emit("hideHighlight")}}]),t}(y.default);e.exports=b},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}/* | |
| object-assign | |
| (c) Sindre Sorhus | |
| @license MIT | |
| */ | |
| var i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){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={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=r(e),c=1;c<arguments.length;c++){n=Object(arguments[c]);for(var l in n)o.call(n,l)&&(u[l]=n[l]);if(i){s=i(n);for(var p=0;p<s.length;p++)a.call(n,s[p])&&(u[s[p]]=n[s[p]])}}return u}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s,u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},p=n(0),h=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(p),f=n(2),d=r(f),m=n(13),v=r(m),y=n(1),g=r(y),_=n(8),b=r(_),w=n(36),x=r(w),M=n(22),E=r(M),O=n(5),P=r(O),T=(0,x.default)(s=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n._invalidChild=function(e){return n.invalidChildInternal(e)},n.hasProp("slot",{type:g.default.string,updateInitial:!0,update:function(e,t,n){e.userData._materialSlot=n?t:"material"},default:"material"}),n.hasProp("transparent",{type:g.default.bool,simple:!0}),n.hasProp("alphaTest",{type:g.default.number,updateInitial:!0,update:function(e,t){e.alphaTest=t,e.needsUpdate=!0},default:0}),n.hasProp("side",{type:g.default.oneOf([h.FrontSide,h.BackSide,h.DoubleSide]),updateInitial:!0,update:function(e,t){e.side=t},default:h.FrontSide}),n.hasProp("depthTest",{type:g.default.bool,simple:!0,default:!0}),n.hasProp("depthWrite",{type:g.default.bool,simple:!0,default:!0}),n.hasProp("blending",{type:g.default.oneOf([h.NoBlending,h.NormalBlending,h.AdditiveBlending,h.SubtractiveBlending,h.MultiplyBlending,h.CustomBlending]),simple:!0,default:h.NormalBlending}),n.hasProp("depthFunc",{type:g.default.oneOf([h.NeverDepth,h.AlwaysDepth,h.LessDepth,h.LessEqualDepth,h.EqualDepth,h.GreaterEqualDepth,h.GreaterDepth,h.NotEqualDepth]),simple:!0,default:h.LessEqualDepth}),n.hasProp("opacity",{type:g.default.number,simple:!0}),n.hasProp("visible",{type:g.default.bool,simple:!0,default:!0}),n.hasProp("vertexColors",{type:g.default.oneOf([h.NoColors,h.FaceColors,h.VertexColors]),simple:!0,default:h.NoColors}),n._colors=[],n._supportedMaps={},n}return a(t,e),c(t,[{key:"hasMap",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"map";this._supportedMaps[e]=!0,this.hasProp(e,{type:(0,P.default)(h.Texture),update:function(t,n){if(t.userData["_"+e+"}Property"]=n,t.userData["_has"+e+"}TextureChild"]){var r="texture";"map"!==e&&(r+="with a '"+e+"' slot"),(0,v.default)(null===n,"The material already has a "+r+" assigned to it as a child; therefore the '"+e+"' property will have no effect")}else t[e]!==n&&(t.needsUpdate=!0),t[e]=n},updateInitial:!0,default:null})}},{key:"getMaterialDescription",value:function(e){var t={};return this._colors.forEach(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),e.hasOwnProperty("side")&&(t.side=e.side),t}},{key:"hasColor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"color",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16777215;this._colors.push(e),this.hasProp(e,{type:g.default.oneOfType([(0,P.default)(h.Color),g.default.number,g.default.string]),update:function(t,n){t[e].set(n)},default:t})}},{key:"hasWireframe",value:function(){this.hasProp("wireframe",{type:g.default.bool,simple:!0,default:!1}),this.hasProp("wireframeLinewidth",{type:g.default.number,simple:!0,default:1})}},{key:"construct",value:function(){return new h.Material({})}},{key:"applyInitialProps",value:function(e,n){e.userData=u({},e.userData,{_hasTextureChild:!1}),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n)}},{key:"setParent",value:function(e,n){(0,d.default)(n instanceof h.Mesh||n instanceof h.Points||n instanceof h.Sprite||n instanceof h.Line,"Parent is not a mesh"),(0,d.default)(void 0===n[e.userData._materialSlot]||null===n[e.userData._materialSlot],"Parent already has a "+e.userData._materialSlot+" defined"),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setParent",this).call(this,e,n),n[e.userData._materialSlot]=e}},{key:"unmount",value:function(e){var n=e.userData.markup.parentMarkup.threeObject;if(n instanceof h.Mesh||n instanceof h.Sprite||n instanceof h.Line||n instanceof h.Points){var r=e.userData._materialSlot;n[r]===e&&(n[r]=void 0)}e.dispose(),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"unmount",this).call(this,e)}},{key:"highlight",value:function(e){var t=e.userData.markup.parentMarkup.threeObject;e.userData.events.emit("highlight",{uuid:e.uuid,boundingBoxFunc:function(){var e=new h.Box3;return t&&t.geometry&&t.geometry.computeBoundingBox&&t.geometry.computeBoundingBox(),e.setFromObject(t),[e]}})}},{key:"getBoundingBoxes",value:function(e){var t=new h.Box3,n=e.userData.markup.parentMarkup.threeObject;return n&&n.geometry&&n.geometry.computeBoundingBox&&n.geometry.computeBoundingBox(),t.setFromObject(n),[t]}},{key:"hideHighlight",value:function(e){e.userData.events.emit("hideHighlight")}},{key:"addChildren",value:function(e,t){(0,d.default)(0===t.filter(this._invalidChild).length,"Material children can only be textures or texture resource references!")}},{key:"addChild",value:function(e,t){this.addChildren(e,[t])}},{key:"moveChild",value:function(){}},{key:"removeChild",value:function(){}},{key:"invalidChildInternal",value:function(e){return!(e instanceof h.Texture||e instanceof E.default)}}]),t}(b.default))||s;e.exports=T},function(e,t,n){"use strict";var r={current:null};e.exports=r},function(e,t,n){"use strict";var r=n(85),i=r;e.exports=i},function(e,t,n){"use strict";var r=null;e.exports={debugTool:r}},function(e,t,n){"use strict";function r(e){return void 0!==e.ref}function i(e){return void 0!==e.key}var o=n(10),a=n(12),s=(n(4),n(66),Object.prototype.hasOwnProperty),u=n(64),c={key:!0,ref:!0,__self:!0,__source:!0},l=function(e,t,n,r,i,o,a){var s={$$typeof:u,type:e,key:t,ref:n,props:a,_owner:o};return s};l.createElement=function(e,t,n){var o,u={},p=null,h=null;if(null!=t){r(t)&&(h=t.ref),i(t)&&(p=""+t.key),void 0===t.__self?null:t.__self,void 0===t.__source?null:t.__source;for(o in t)s.call(t,o)&&!c.hasOwnProperty(o)&&(u[o]=t[o])}var f=arguments.length-2;if(1===f)u.children=n;else if(f>1){for(var d=Array(f),m=0;m<f;m++)d[m]=arguments[m+2];u.children=d}if(e&&e.defaultProps){var v=e.defaultProps;for(o in v)void 0===u[o]&&(u[o]=v[o])}return l(e,p,h,0,0,a.current,u)},l.createFactory=function(e){var t=l.createElement.bind(null,e);return t.type=e,t},l.cloneAndReplaceKey=function(e,t){return l(e.type,t,e.ref,e._self,e._source,e._owner,e.props)},l.cloneElement=function(e,t,n){var u,p=o({},e.props),h=e.key,f=e.ref,d=(e._self,e._source,e._owner);if(null!=t){r(t)&&(f=t.ref,d=a.current),i(t)&&(h=""+t.key);var m;e.type&&e.type.defaultProps&&(m=e.type.defaultProps);for(u in t)s.call(t,u)&&!c.hasOwnProperty(u)&&(void 0===t[u]&&void 0!==m?p[u]=m[u]:p[u]=t[u])}var v=arguments.length-2;if(1===v)p.children=n;else if(v>1){for(var y=Array(v),g=0;g<v;g++)y[g]=arguments[g+2];p.children=y}return l(e.type,h,f,0,0,d,p)},l.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===u},e.exports=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(o),s=function(){function e(){r(this,e),this.uuid=a.Math.generateUUID(),this.userData={}}return i(e,[{key:"performAction",value:function(e){}}]),e}();e.exports=s},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function o(e){if(p===clearTimeout)return clearTimeout(e);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function a(){m&&f&&(m=!1,f.length?d=f.concat(d):v=-1,d.length&&s())}function s(){if(!m){var e=i(a);m=!0;for(var t=d.length;t;){for(f=d,d=[];++v<t;)f&&f[v].run();v=-1,t=d.length}f=null,m=!1,o(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var l,p,h=e.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(e){l=n}try{p="function"==typeof clearTimeout?clearTimeout:r}catch(e){p=r}}();var f,d=[],m=!1,v=-1;h.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];d.push(new u(e,t)),1!==d.length||m||i(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var i=new Error(n);throw i.name="Invariant Violation",i.framesToPop=1,i}e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(2),h=r(p),f=n(8),d=r(f),m=n(75),v=r(m),y=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"setParent",value:function(e,n){(0,h.default)(n instanceof l.Path||n instanceof v.default,"Shape action commands (%s) can only be added to shapes, paths or holes.",this.constructor.name),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setParent",this).call(this,e,n)}},{key:"highlight",value:function(e){var t=e.userData.markup.parentMarkup.threeObject;t.userData._descriptor.highlight(t)}},{key:"getBoundingBoxes",value:function(e){var t=e.userData.markup.parentMarkup.threeObject;return t.userData._descriptor.getBoundingBoxes(t)}}]),t}(d.default);e.exports=y},function(e,t,n){"use strict";function r(){i.attachRefs(this,this._currentElement)}var i=n(62),o=(n(14),n(4),{mountComponent:function(e,t,n,i,o,a){var s=e.mountComponent(t,n,i,o,a);return e._currentElement&&null!=e._currentElement.ref&&t.getReactMountReady().enqueue(r,e),s},getHostNode:function(e){return e.getHostNode()},unmountComponent:function(e,t){i.detachRefs(e,e._currentElement),e.unmountComponent(t)},receiveComponent:function(e,t,n,o){var a=e._currentElement;if(t!==a||o!==e._context){var s=i.shouldUpdateRefs(a,t);s&&i.detachRefs(e,a),e.receiveComponent(t,n,o),s&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t,n){e._updateBatchNumber===n&&e.performUpdateIfNecessary(t)}});e.exports=o},function(e,t,n){"use strict";function r(e){var t=Function.prototype.toString,n=Object.prototype.hasOwnProperty,r=RegExp("^"+t.call(n).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");try{var i=t.call(e);return r.test(i)}catch(e){return!1}}function i(e){var t=f(e);if(t){var n=t.childIDs;d(e),n.forEach(i)}}function o(e,t,n){return"\n in "+(e||"Unknown")+(t?" (at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+")":n?" (created by "+n+")":"")}function a(e){return null==e?"#empty":"string"==typeof e||"number"==typeof e?"#text":"string"==typeof e.type?e.type:e.type.displayName||e.type.name||"Unknown"}function s(e){var t,n=E.getDisplayName(e),r=E.getElement(e),i=E.getOwnerID(e);return i&&(t=E.getDisplayName(i)),o(n,r&&r._source,t)}var u=n(18),c=n(12);n(3),n(4);if("function"==typeof Array.from&&"function"==typeof Map&&r(Map)&&null!=Map.prototype&&"function"==typeof Map.prototype.keys&&r(Map.prototype.keys)&&"function"==typeof Set&&r(Set)&&null!=Set.prototype&&"function"==typeof Set.prototype.keys&&r(Set.prototype.keys))var l=new Map,p=new Set,h=function(e,t){l.set(e,t)},f=function(e){return l.get(e)},d=function(e){l.delete(e)},m=function(){return Array.from(l.keys())},v=function(e){p.add(e)},y=function(e){p.delete(e)},g=function(){return Array.from(p.keys())};else var _={},b={},w=function(e){return"."+e},x=function(e){return parseInt(e.substr(1),10)},h=function(e,t){var n=w(e);_[n]=t},f=function(e){var t=w(e);return _[t]},d=function(e){var t=w(e);delete _[t]},m=function(){return Object.keys(_).map(x)},v=function(e){var t=w(e);b[t]=!0},y=function(e){var t=w(e);delete b[t]},g=function(){return Object.keys(b).map(x)};var M=[],E={onSetChildren:function(e,t){var n=f(e);n||u("144"),n.childIDs=t;for(var r=0;r<t.length;r++){var i=t[r],o=f(i);o||u("140"),null==o.childIDs&&"object"==typeof o.element&&null!=o.element&&u("141"),o.isMounted||u("71"),null==o.parentID&&(o.parentID=e),o.parentID!==e&&u("142",i,o.parentID,e)}},onBeforeMountComponent:function(e,t,n){h(e,{element:t,parentID:n,text:null,childIDs:[],isMounted:!1,updateCount:0})},onBeforeUpdateComponent:function(e,t){var n=f(e);n&&n.isMounted&&(n.element=t)},onMountComponent:function(e){var t=f(e);t||u("144"),t.isMounted=!0,0===t.parentID&&v(e)},onUpdateComponent:function(e){var t=f(e);t&&t.isMounted&&t.updateCount++},onUnmountComponent:function(e){var t=f(e);if(t){t.isMounted=!1;0===t.parentID&&y(e)}M.push(e)},purgeUnmountedComponents:function(){if(!E._preventPurging){for(var e=0;e<M.length;e++){i(M[e])}M.length=0}},isMounted:function(e){var t=f(e);return!!t&&t.isMounted},getCurrentStackAddendum:function(e){var t="";if(e){var n=a(e),r=e._owner;t+=o(n,e._source,r&&r.getName())}var i=c.current,s=i&&i._debugID;return t+=E.getStackAddendumByID(s)},getStackAddendumByID:function(e){for(var t="";e;)t+=s(e),e=E.getParentID(e);return t},getChildIDs:function(e){var t=f(e);return t?t.childIDs:[]},getDisplayName:function(e){var t=E.getElement(e);return t?a(t):null},getElement:function(e){var t=f(e);return t?t.element:null},getOwnerID:function(e){var t=E.getElement(e);return t&&t._owner?t._owner._debugID:null},getParentID:function(e){var t=f(e);return t?t.parentID:null},getSource:function(e){var t=f(e),n=t?t.element:null;return null!=n?n._source:null},getText:function(e){var t=E.getElement(e);return"string"==typeof t?t:"number"==typeof t?""+t:null},getUpdateCount:function(e){var t=f(e);return t?t.updateCount:0},getRootIDs:g,getRegisteredIDs:m};e.exports=E},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(0),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(i),a=function e(t){r(this,e),this.uuid=o.Math.generateUUID(),this.resourceId=t,this.userData={}};e.exports=a},function(e,t,n){"use strict";function r(e){return function(){return e}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(e){return e},e.exports=i},function(e,t,n){"use strict";var r={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};e.exports=r},function(e,t,n){"use strict";function r(){T.ReactReconcileTransaction&&w||l("123")}function i(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=h.getPooled(),this.reconcileTransaction=T.ReactReconcileTransaction.getPooled(!0)}function o(e,t,n,i,o,a){return r(),w.batchedUpdates(e,t,n,i,o,a)}function a(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;t!==y.length&&l("124",t,y.length),y.sort(a),g++;for(var n=0;n<t;n++){var r=y[n],i=r._pendingCallbacks;r._pendingCallbacks=null;var o;if(d.logTopLevelRenders){var s=r;r._currentElement.type.isReactTopLevelWrapper&&(s=r._renderedComponent),o="React update: "+s.getName(),console.time(o)}if(m.performUpdateIfNecessary(r,e.reconcileTransaction,g),o&&console.timeEnd(o),i)for(var u=0;u<i.length;u++)e.callbackQueue.enqueue(i[u],r.getPublicInstance())}}function u(e){if(r(),!w.isBatchingUpdates)return void w.batchedUpdates(u,e);y.push(e),null==e._updateBatchNumber&&(e._updateBatchNumber=g+1)}function c(e,t){w.isBatchingUpdates||l("125"),_.enqueue(e,t),b=!0}var l=n(6),p=n(10),h=n(53),f=n(39),d=n(101),m=n(20),v=n(42),y=(n(3),[]),g=0,_=h.getPooled(),b=!1,w=null,x={initialize:function(){this.dirtyComponentsLength=y.length},close:function(){this.dirtyComponentsLength!==y.length?(y.splice(0,this.dirtyComponentsLength),O()):y.length=0}},M={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},E=[x,M];p(i.prototype,v,{getTransactionWrappers:function(){return E},destructor:function(){this.dirtyComponentsLength=null,h.release(this.callbackQueue),this.callbackQueue=null,T.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return v.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),f.addPoolingTo(i);var O=function(){for(;y.length||b;){if(y.length){var e=i.getPooled();e.perform(s,null,e),i.release(e)}if(b){b=!1;var t=_;_=h.getPooled(),t.notifyAll(),h.release(t)}}},P={injectReconcileTransaction:function(e){e||l("126"),T.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){e||l("127"),"function"!=typeof e.batchedUpdates&&l("128"),"boolean"!=typeof e.isBatchingUpdates&&l("129"),w=e}},T={ReactReconcileTransaction:null,batchedUpdates:o,enqueueUpdate:u,flushBatchedUpdates:O,injection:P,asap:c};e.exports=T},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s,u,c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},p=n(0),h=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(p),f=n(1),d=r(f),m=n(13),v=(r(m),n(9)),y=r(v),g=n(5),_=r(g),b=function(){var e=new h.Vector3,t=new h.Vector3;return function(n){n.updateMatrixWorld(),e.setFromMatrixPosition(n.matrixWorld),n.target.position.copy(t.set(0,0,1).applyQuaternion(n.quaternion).add(e)),n.target.updateMatrixWorld()}}(),w=(u=s=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.removeProp("receiveShadow"),n._hasDirection=!1,n.hasProp("updatesRefreshAllMaterials",{type:d.default.bool,updateInitial:!0,update:function(e,t){e.userData._updatesRefreshAllMaterials=t},default:!1}),n.hasProp("shadowBias",{type:d.default.number,updateInitial:!0,update:function(e,t,n){n&&(e.shadow.bias=t)},default:t.defaultShadowBias}),n.hasProp("shadowDarkness",{type:d.default.number,simple:!0,default:.5}),n.hasProp("shadowMapWidth",{type:d.default.number,updateInitial:!0,update:function(e,t,n){n&&(e.shadow.mapSize.x=t)},default:512}),n.hasProp("shadowMapHeight",{type:d.default.number,updateInitial:!0,update:function(e,t,n){n&&(e.shadow.mapSize.y=t)},default:512}),n.hasProp("shadowCameraNear",{type:d.default.number,updateInitial:!0,update:function(e,t,n){n&&(e.shadow.camera.near=t)},default:t.defaultShadowCameraNear}),n.hasProp("shadowCameraFar",{type:d.default.number,updateInitial:!0,update:function(e,t,n){n&&(e.shadow.camera.far=t)},default:t.defaultShadowCameraFar}),n.hasProp("castShadow",{override:!0,type:d.default.bool,update:n.triggerRemount,default:!1}),n}return a(t,e),c(t,[{key:"hasDirection",value:function(){this._hasDirection=!0,this.removeProp("position"),this.removeProp("rotation"),this.removeProp("quaternion"),this.removeProp("lookAt"),this.removeProp("matrix"),this.hasProp("position",{type:(0,_.default)(h.Vector3),update:function(e,t){e.position.copy(t),e.userData._lookAt&&e.lookAt(e.userData._lookAt),e.userData._needsDirectionUpdate=!0},default:new h.Vector3}),this.hasProp("rotation",{type:(0,_.default)(h.Euler),update:function(e,t){e.rotation.copy(t),e.userData._needsDirectionUpdate=!0},default:new h.Euler}),this.hasProp("quaternion",{type:(0,_.default)(h.Quaternion),update:function(e,t){e.quaternion.copy(t),e.userData._needsDirectionUpdate=!0},default:new h.Quaternion}),this.hasProp("matrix",{type:(0,_.default)(h.Matrix4),update:function(e,t){e.matrix.copy(t),e.matrix.decompose(e.position,e.quaternion,e.scale),e.userData._needsDirectionUpdate=!0},default:new h.Matrix4}),this.hasProp("lookAt",{type:(0,_.default)(h.Vector3),update:function(e,t){e.userData._lookAt=t,t&&(e.lookAt(t),e.userData._needsDirectionUpdate=!0)},default:void 0})}},{key:"completePropertyUpdates",value:function(e){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"completePropertyUpdates",this).call(this,e),e.userData._needsDirectionUpdate&&(e.userData._needsDirectionUpdate=!1,b(e))}},{key:"hasColor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"color",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16777215;this.hasProp(e,{type:d.default.oneOfType([(0,_.default)(h.Color),d.default.number,d.default.string]),update:function(e,t){e.color.set(t)},default:t})}},{key:"applyInitialProps",value:function(e,n){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n),n.hasOwnProperty("castShadow")&&(e.castShadow=n.castShadow),this._hasDirection&&(e.userData._needsDirectionUpdate=!1,(n.position||n.lookAt||n.rotation||n.quaternion)&&b(e))}},{key:"unmount",value:function(e){this.updateAllMaterials(e),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"unmount",this).call(this,e)}},{key:"setParent",value:function(e,n){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setParent",this).call(this,e,n),this.updateAllMaterials(e)}},{key:"updateAllMaterials",value:function(e){var t=e.userData.markup._rootInstance;if(t&&!t._willUnmount){t.allMaterialsNeedUpdate()}}}]),t}(y.default),s.defaultShadowCameraNear=.5,s.defaultShadowCameraFar=500,s.defaultShadowBias=0,u);e.exports=w},function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=i},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=a,this.updater=n||o}var i=n(18),o=n(47),a=(n(66),n(29));n(3),n(4);r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&i("85"),this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t,"setState")},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e,"forceUpdate")};e.exports=r},function(e,t,n){"use strict";(function(t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t,n){L.default.unmountComponent(e,n)}function u(e){return e&&e[le.default]||""}function c(e){return e?e.userData&&e.userData.markup&&e.userData.markup.childrenMarkup[0]||null:null}function l(e){return"function"==typeof e&&void 0!==e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}var p,h,f,d,m="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},v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=n(0),g=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(y),_=n(15),b=r(_),w=n(12),x=(r(w),n(30)),M=r(x),E=n(45),O=(r(E),n(86)),P=r(O),T=n(2),S=r(T),C=n(13),R=(r(C),n(24)),A=r(R),j=n(20),L=r(j),D=n(25),I=r(D),k=n(63),N=r(k),U=n(102),F=r(U),B=n(106),z=r(B),G=n(98),H=r(G),V=n(44),W=r(V),X=n(111),q=r(X),Y=n(43),Z=r(Y),Q=n(14),J=(r(Q),n(135)),K=r(J),$=n(215),ee=r($),te=n(134),ne=r(te),re=n(71),ie=r(re),oe=n(133),ae=r(oe),se=n(72),ue=r(se),ce=n(51),le=r(ce),pe=n(84),he=(r(pe),void 0),fe=(h=p=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),v(t,[{key:"render",value:function(){return this.props.child}}]),t}(M.default),p.isReactComponent={},p.isReactTopLevelWrapper=!0,h),de=(d=f=function(){function e(){var n=this;if(i(this,e),this.instantiateChild=function(e,t,r,i){var o=void 0===e[r];null!==t&&o&&(e[r]=n.instantiateReactComponent(t,!0))},this.findNodeHandle=function(e){var t=ie.default.getRenderedHostOrTextFromComponent(e);if(!t||!t._threeObject)return null;var r=ie.default.getMarkupFromInstance(t);return n._highlightCache=r,n._highlightElement},this.nativeTagToRootNodeID=function(){return 0},this.hostTagToRootNodeID=function(){return 0},this.batchedMountComponentIntoNode=function(e,t,r,i){var o=I.default.ReactReconcileTransaction.getPooled(!r);o.perform(n.mountComponentIntoNode,null,e,t,o,r,i),I.default.ReactReconcileTransaction.release(o)},this.mountComponentIntoNode=function(e,t,r,i,o){var a=L.default.mountComponent(e,r,null,(0,K.default)(e,t),o,0);e._renderedComponent._topLevelWrapper=e,n._mountImageIntoNode(a,t,e,i,r)},this._instancesByReactRootID={},this.nextMountID=1,this.globalIdCounter=1,this.nextReactRootIndex=0,this.threeElementDescriptors=new ae.default(this).descriptors,this._highlightElement=document.createElement("div"),this._highlightCache=null,"true"===t.env.ENABLE_REACT_ADDON_HOOKS&&(this._agent=null,this._onHideHighlightFromInspector=function(){if(n._highlightCache&&n._highlightCache.threeObject.userData.react3internalComponent){n._highlightCache.threeObject.userData.react3internalComponent.hideHighlight(),n._highlightCache=null}},this._onHighlightFromInspector=function(e){if(e.node===n._highlightElement&&n._highlightCache&&n._highlightCache.threeObject.userData.react3internalComponent){n._highlightCache.threeObject.userData.react3internalComponent.highlightComponent()}},this._hookAgent=function(e){n._agent=e,e.on("highlight",n._onHighlightFromInspector),e.on("hideHighlight",n._onHideHighlightFromInspector)},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject)){this._devToolsRendererDefinition={ComponentTree:{getClosestInstanceFromNode:function(e){return ie.default.getClosestInstanceFromMarkup(e)},getNodeFromInstance:function(e){for(var t=e;t._renderedComponent;)t=t._renderedComponent;return t?ie.default.getMarkupFromInstance(t):null}},Mount:this,Reconciler:L.default,TextComponent:ne.default};var r=function(e){n._reactDevtoolsRendererId=e.id,n._rendererListenerCleanup(),delete n._rendererListenerCleanup};if(this._rendererListenerCleanup=__REACT_DEVTOOLS_GLOBAL_HOOK__.sub("renderer",r),__REACT_DEVTOOLS_GLOBAL_HOOK__.inject(this._devToolsRendererDefinition),void 0!==__REACT_DEVTOOLS_GLOBAL_HOOK__.reactDevtoolsAgent&&__REACT_DEVTOOLS_GLOBAL_HOOK__.reactDevtoolsAgent){var o=__REACT_DEVTOOLS_GLOBAL_HOOK__.reactDevtoolsAgent;this._hookAgent(o)}else this._devtoolsCallbackCleanup=__REACT_DEVTOOLS_GLOBAL_HOOK__.sub("react-devtools",function(e){n._devtoolsCallbackCleanup(),n._hookAgent(e)})}}return v(e,[{key:"updateChildren",value:function(e,t,n,r,i,o,a,s,u){if(!t&&!e)return null;if(t)for(var c=Object.keys(t),l=0;l<c.length;++l){var p=c[l],h=e&&e[p],f=h&&h._currentElement,d=t[p];if(null!==h&&void 0!==h&&(0,Z.default)(f,d))if(L.default.receiveComponent(h,d,i,s),h._forceRemountOfComponent){r[p]=h.getHostMarkup(),L.default.unmountComponent(h,!1);var m=this.instantiateReactComponent(d,!0);t[p]=m;var v=L.default.mountComponent(m,i,o,a,s,u);n.push(v)}else t[p]=h;else{h&&(r[p]=h.getHostMarkup(),L.default.unmountComponent(h,!1));var y=this.instantiateReactComponent(d,!0);t[p]=y;var g=L.default.mountComponent(y,i,o,a,s,u);n.push(g)}}if(e)for(var _=Object.keys(e),b=0;b<_.length;++b){var w=_[b];if(!t||!t.hasOwnProperty(w)){var x=e[w];r[w]=x.getHostMarkup(),L.default.unmountComponent(x,!1)}}return t}},{key:"getElementDescriptor",value:function(e){return this.threeElementDescriptors[e]}}],[{key:"findTHREEObject",value:function(e){if(null===e)return null;if(e instanceof g.Object3D||e instanceof HTMLCanvasElement)return e;if(A.default.has(e)){var t=A.default.get(e);return t=(0,q.default)(t),t?ie.default.getMarkupFromInstance(t).threeObject:null}return null!==e.render&&"function"==typeof e.render&&(0,S.default)(!1),(0,S.default)(!1),null}}]),v(e,[{key:"instantiateChildren",value:function(e,t,n,r){if(null===e)return null;var i={};return(0,W.default)(e,this.instantiateChild,i),i}},{key:"containsChild",value:function(e,t){for(var n=e.userData.markup.childrenMarkup,r=0;r<n.length;r++)if(n[r]===t)return!0;return!1}},{key:"_mountImageIntoNode",value:function(e,t,n,r,i){t.userData||((0,S.default)(t instanceof HTMLCanvasElement,"The root container can only be a THREE.js object (with an userData property) or HTMLCanvasElement."),t.userData={_createdByReact3:!0});var o=e,a={threeObject:t,parentMarkup:null,childrenMarkup:[o],toJSON:function(){return"---MARKUP---"}};Object.assign(t.userData,{object3D:t,toJSON:function(){return"---USERDATA---"},markup:a}),o.parentMarkup=a,this.threeElementDescriptors[o.elementType].setParent(o.threeObject,a.threeObject),o.threeObject.mountedIntoRoot();var s=t.userData.markup.childrenMarkup[0];ie.default.precacheMarkup(n,s)}},{key:"render",value:function(e,t,n){return this._renderSubtreeIntoContainer(null,e,t,n)}},{key:"getHostRootInstanceInContainer",value:function(e){var t=c(e),n=t&&ie.default.getInstanceFromMarkup(t);return n&&!n._hostParent?n:null}},{key:"getTopLevelWrapperInContainer",value:function(e){var t=this.getHostRootInstanceInContainer(e);return t&&(0,S.default)(!!t._hostContainerInfo,"Root should have native container info %s"," but it does not"),t?t._hostContainerInfo._topLevelWrapper:null}},{key:"_renderSubtreeIntoContainer",value:function(e,t,n,r){var i=this;b.default.isValidElement(t)||(0,S.default)(!1);var o=b.default.createElement(fe,{child:t}),a=void 0;if(e){var s=A.default.get(e);a=s._processChildContext(s._context)}else a=P.default;var l=this.getTopLevelWrapperInContainer(n);if(l){var p=l._currentElement,h=p.props.child;if((0,Z.default)(h,t)){var f=function(){var e=l._renderedComponent.getPublicInstance(),t=r&&function(){r.call(e)};return i._updateRootComponent(l,o,a,n,t),{v:e}}();if("object"===(void 0===f?"undefined":m(f)))return f.v}this.unmountComponentAtNode(n)}var d=c(n),v=d&&!!u(d),y=v&&!l,g=this._renderNewRootComponent(o,n,y,a)._renderedComponent.getPublicInstance();return r&&r.call(g),g}},{key:"dispose",value:function(){for(var e=Object.keys(this._instancesByReactRootID),n=0;n<e.length;++n)this.unmountComponentAtNode(this._instancesByReactRootID[e[n]].getHostMarkup().parentMarkup.threeObject);delete this._instancesByReactRootID,delete this._highlightElement,this.nextMountID=1,this.nextReactRootIndex=0,"true"===t.env.ENABLE_REACT_ADDON_HOOKS&&(this._devtoolsCallbackCleanup&&(this._devtoolsCallbackCleanup(),delete this._devtoolsCallbackCleanup),this._rendererListenerCleanup&&(this._rendererListenerCleanup(),delete this._rendererListenerCleanup),this._devToolsRendererDefinition&&(this._agent&&(this._agent.onUnmounted(this._devToolsRendererDefinition),this._agent.removeListener("highlight",this._onHighlightFromInspector),this._agent.removeListener("hideHighlight",this._onHideHighlightFromInspector)),this._reactDevtoolsRendererId&&(delete __REACT_DEVTOOLS_GLOBAL_HOOK__._renderers[this._reactDevtoolsRendererId],delete this._reactDevtoolsRendererId),delete this._devToolsRendererDefinition,delete this._agent),delete this._onHighlightFromInspector,delete this._onHideHighlightFromInspector,delete this._hookAgent)}},{key:"_updateRootComponent",value:function(e,t,n,r,i){return N.default.enqueueElementInternal(e,t,n),i&&N.default.enqueueCallbackInternal(e,i),e}},{key:"hasNonRootReactChild",value:function(e){var t=c(e);if(t){var n=ie.default.getInstanceFromMarkup(t);return!(!n||!n._hostParent)}return!1}},{key:"unmountComponentAtNode",value:function(e){var t=this.getTopLevelWrapperInContainer(e);if(!t){this.hasNonRootReactChild(e),e&&e.userData&&e.userData.markup&&e.userData.markup[le.default];return!1}return delete this._instancesByReactRootID[t._instance.rootID],I.default.batchedUpdates(s,t,e,!1),e&&e.userData&&e.userData._createdByReact3&&delete e.userData,!0}},{key:"getReactRootID",value:function(e){var t=c(e);return t&&this.getID(t)}},{key:"instantiateReactComponent",value:function(e,t){var n=void 0,r=e;if(null===r||r===!1)n=new ne.default(b.default.createElement("object3D",{visible:!1}),this);else if("object"===(void 0===r?"undefined":m(r))){var i=r;if((!i||"function"!=typeof i.type&&"string"!=typeof i.type)&&(null==i.type?(0,S.default)(i.type,he(i._owner)):(0,S.default)(m(i.type),he(i._owner))),"string"==typeof i.type)n=new ne.default(i,this);else if(l(i.type)){var o=i.type;n=new o(i),n.getHostNode||(n.getHostNode=n.getNativeNode)}else n=new ue.default(i,this)}else(0,S.default)(!1);n._mountIndex=0,n._mountImage=null;return n}},{key:"_renderNewRootComponent",value:function(e,t,n,r){var i=this.instantiateReactComponent(e,!1);I.default.ReactReconcileTransaction||(F.default.Updates.injectReconcileTransaction(z.default),F.default.Updates.injectBatchingStrategy(H.default));I.default.batchedUpdates(this.batchedMountComponentIntoNode,i,t,n,r);var o=i._instance.rootID;return this._instancesByReactRootID[o]=i,i}},{key:"createReactRootID",value:function(){return this.nextReactRootIndex++}},{key:"getID",value:function(e){return u(e)}}]),e}(),f.eventDispatcher=new ee.default,d);e.exports=de}).call(t,n(17))},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(o),s=function(){function e(){r(this,e),this.userData={},this.name=null,this.value=null,this.type=null,this.uuid=a.Math.generateUUID()}return i(e,[{key:"setValue",value:function(e){this.value=e,this.userData.events.emit("valueChanged",e)}}]),e}();e.exports=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(1),u=r(s),c=n(7),l=r(c),p=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["radius","detail"].forEach(function(e){n.hasProp(e,{type:u.default.number.isRequired,update:n.triggerRemount,default:void 0})}),n}return a(t,e),t}(l.default);e.exports=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(2),h=r(p),f=n(22),d=r(f),m=n(9),v=r(m),y=function(e){function t(){var e,n,r,a;i(this,t);for(var s=arguments.length,u=Array(s),c=0;c<s;c++)u[c]=arguments[c];return n=r=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r._invalidChild=function(e){return!(e instanceof l.Material||e instanceof d.default||e instanceof l.Geometry||e instanceof l.BufferGeometry)},a=n,o(r,a)}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.hasOwnProperty("geometry")?e.geometry:void 0,n=e.hasOwnProperty("material")?e.material:void 0,r=new l.Mesh(t,n);return t||(r.geometry.dispose(),r.geometry=void 0),n||(r.material.dispose(),r.material=void 0),r}},{key:"addChildren",value:function(e,t){(0,h.default)(0===t.filter(this._invalidChild).length,!1)}},{key:"addChild",value:function(e,t){this.addChildren(e,[t])}},{key:"moveChild",value:function(){}},{key:"getBoundingBoxes",value:function(e){return e.geometry&&e.geometry.computeBoundingBox&&e.geometry.computeBoundingBox(),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getBoundingBoxes",this).call(this,e)}}]),t}(v.default);e.exports=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(2),l=r(c),p=n(1),h=r(p),f=n(8),d=r(f),m=n(22),v=r(m),y=n(31),g=(r(y),function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n._addedIntoRoot=function(e){for(var t=e.userData.markup.parentMarkup,r=0;t;){var i=t.threeObject.userData._resources;if(i){var o=e.resourceId,a=i.resourceMap[o];a&&n._addResource(e,{id:o,distance:r,resource:a})}r++,t=t.threeObject.userData.markup.parentMarkup}n._updateResource(e)},n.hasProp("resourceId",{type:h.default.string.isRequired,update:n.triggerRemount,default:""}),n}return a(t,e),s(t,[{key:"construct",value:function(e){return(0,l.default)(e.hasOwnProperty("resourceId"),'A resource type must have a property named "resourceId"!'),new v.default(e.resourceId)}},{key:"applyInitialProps",value:function(e,n){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n),e.userData.resourceMap=[],e.userData._eventCleanupQueue=[],e.userData._chosenResource=void 0,e.userData._debug=n.debug||!1,e.userData.events.once("addedIntoRoot",this._addedIntoRoot)}},{key:"unmount",value:function(e){e.userData._eventCleanupQueue.forEach(function(e){e()}),delete e.userData._eventCleanupQueue,delete e.userData.resourceMap,this.updateChosenResource(e,null),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"unmount",this).call(this,e)}},{key:"updateChosenResource",value:function(e,t){var n=e.userData._chosenResource;n!==t&&(e.userData._chosenResource=t,this.resourceUpdated(e,t,n))}},{key:"setParent",value:function(e,n){var r=n[e.userData._propertySlot];(0,l.default)(void 0===r||null===r,"Parent already has a "+e.userData._propertySlot+" defined"),(0,l.default)(0===e.userData._eventCleanupQueue.length,"Changing parents?"),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setParent",this).call(this,e,n);var i=n.userData.markup,o=this._onResourceAdded.bind(this,e),a=this._onResourceRemoved.bind(this,e),s=i.threeObject.userData.events;s.on("resource.added",o),s.on("resource.removed",a),e.userData._eventCleanupQueue.push(function(){s.removeListener("resource.added",o),s.removeListener("resource.removed",a)})}},{key:"_onResourceAdded",value:function(e,t){e.resourceId===t.id&&(this._addResource(e,t),this._updateResource(e))}},{key:"_addResource",value:function(e,t){var n=e.userData.resourceMap,r=void 0;for(r=0;r<n.length;++r){if(n[r].distance===t.distance)return void(n[r].resource!==t.resource&&(n[r].resource=t.resource));if(n[r].distance>t.distance)break}n.splice(r,0,{distance:t.distance,resource:t.resource})}},{key:"_onResourceRemoved",value:function(e,t){if(e.resourceId===t.id){for(var n=e.userData.resourceMap,r=0;r<n.length;++r)if(n[r].distance===t.distance)return void(n[r].resource===t.resource&&(n.splice(r,1),this._updateResource(e)));(0,l.default)(!1,"This resource was not in this map?")}}},{key:"applyToSlot",value:function(e,t,n){t[e.userData._propertySlot]=n}},{key:"resourceUpdated",value:function(e,t,n){var r=e.userData.markup.parentMarkup&&e.userData.markup.parentMarkup.threeObject||void 0;if(r&&(this.applyToSlot(e,r,t),null===t||t.userData._references.push(r),n)){var i=n.userData._references.indexOf(r);(0,l.default)(i!==-1,"Bad reference count for resource"),n.userData._references.splice(i,1)}}},{key:"_updateResource",value:function(e){var t=e.userData.resourceMap,n=null;t.length>0&&(n=t[0].resource),this.updateChosenResource(e,n)}},{key:"highlight",value:function(e){var t=e.userData.markup.parentMarkup.threeObject;t.userData._descriptor.highlight(t)}},{key:"hideHighlight",value:function(e){var t=e.userData.markup.parentMarkup.threeObject;t.userData._descriptor.hideHighlight(t)}}]),t}(d.default));e.exports=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){var t,n;return n=t=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.isResource=!0,n.hasProp("resourceId",{type:d.default.string,updateInitial:!0,initialOnly:!0,update:function(e,t,n){n&&(e.userData._resourceId=t,e.userData._hasReferences||(e.userData._hasReferences=!0,e.userData._references=[]))},default:""}),n}return a(t,e),u(t,[{key:"applyInitialProps",value:function(e,n){c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n)}},{key:"setParent",value:function(e,n){n instanceof v.default?((0,p.default)(!!e.userData._resourceId),g.default.prototype.setParent.call(this,e,n)):c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setParent",this).call(this,e,n)}},{key:"highlight",value:function(e){var n=void 0;return e.userData._resourceId?e.userData.events.emit("highlight",{uuid:e.uuid,boundingBoxFunc:function(){return e.userData._references.reduce(function(e,t){var n=t.userData._descriptor.getBoundingBoxes(t);return(0,p.default)(n.length>0),e.concat(n)},[])}}):n=c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"highlight",this).call(this,e),n}},{key:"hideHighlight",value:function(e){var n=void 0;return e.userData._resourceId?e.userData.events.emit("hideHighlight"):n=c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"hideHighlight",this).call(this,e),n}}]),t}(e),t.displayName=""+(e.displayName||e.name),n}var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},l=n(2),p=r(l),h=n(13),f=(r(h),n(1)),d=r(f),m=n(48),v=r(m),y=n(8),g=r(y);e.exports=s},function(e,t,n){"use strict";function r(){if(s)for(var e in u){var t=u[e],n=s.indexOf(e);if(n>-1||a("96",e),!c.plugins[n]){t.extractEvents||a("97",e),c.plugins[n]=t;var r=t.eventTypes;for(var o in r)i(r[o],t,o)||a("98",o,e)}}}function i(e,t,n){c.eventNameDispatchConfigs.hasOwnProperty(n)&&a("99",n),c.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];o(s,t,n)}return!0}return!!e.registrationName&&(o(e.registrationName,t,n),!0)}function o(e,t,n){c.registrationNameModules[e]&&a("100",e),c.registrationNameModules[e]=t,c.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(6),s=(n(3),null),u={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){s&&a("101"),s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];u.hasOwnProperty(n)&&u[n]===i||(u[n]&&a("102",n),u[n]=i,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return c.registrationNameModules[t.registrationName]||null;if(void 0!==t.phasedRegistrationNames){var n=t.phasedRegistrationNames;for(var r in n)if(n.hasOwnProperty(r)){var i=c.registrationNameModules[n[r]];if(i)return i}}return null},_resetEventPlugins:function(){s=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];c.plugins.length=0;var t=c.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=c.registrationNameModules;for(var i in r)r.hasOwnProperty(i)&&delete r[i]}};e.exports=c},function(e,t,n){"use strict";function r(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}function i(e){var t={"=0":"=","=2":":"};return(""+("."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1))).replace(/(=0|=2)/g,function(e){return t[e]})}var o={escape:r,unescape:i};e.exports=o},function(e,t,n){"use strict";var r=n(6),i=(n(3),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),o=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},a=function(e,t,n){var r=this;if(r.instancePool.length){var i=r.instancePool.pop();return r.call(i,e,t,n),i}return new r(e,t,n)},s=function(e,t,n,r){var i=this;if(i.instancePool.length){var o=i.instancePool.pop();return i.call(o,e,t,n,r),o}return new i(e,t,n,r)},u=function(e,t,n,r,i){var o=this;if(o.instancePool.length){var a=o.instancePool.pop();return o.call(a,e,t,n,r,i),a}return new o(e,t,n,r,i)},c=function(e){var t=this;e instanceof t||r("25"),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},l=i,p=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||l,n.poolSize||(n.poolSize=10),n.release=c,n},h={addPoolingTo:p,oneArgumentPooler:i,twoArgumentPooler:o,threeArgumentPooler:a,fourArgumentPooler:s,fiveArgumentPooler:u};e.exports=h},function(e,t,n){"use strict";var r=n(6),i=(n(3),!1),o={replaceNodeWithMarkup:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){i&&r("104"),o.replaceNodeWithMarkup=e.replaceNodeWithMarkup,o.processChildrenUpdates=e.processChildrenUpdates,i=!0}}};e.exports=o},function(e,t,n){"use strict";function r(e,t,n){try{t(n)}catch(e){null===i&&(i=e)}}var i=null,o={invokeGuardedCallback:r,invokeGuardedCallbackWithCatch:r,rethrowCaughtError:function(){if(i){var e=i;throw i=null,e}}};e.exports=o},function(e,t,n){"use strict";var r=n(6),i=(n(3),{}),o={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(e,t,n,i,o,a,s,u){this.isInTransaction()&&r("27");var c,l;try{this._isInTransaction=!0,c=!0,this.initializeAll(0),l=e.call(t,n,i,o,a,s,u),c=!1}finally{try{if(c)try{this.closeAll(0)}catch(e){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return l},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var r=t[n];try{this.wrapperInitData[n]=i,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===i)try{this.initializeAll(n+1)}catch(e){}}}},closeAll:function(e){this.isInTransaction()||r("28");for(var t=this.transactionWrappers,n=e;n<t.length;n++){var o,a=t[n],s=this.wrapperInitData[n];try{o=!0,s!==i&&a.close&&a.close.call(this,s),o=!1}finally{if(o)try{this.closeAll(n+1)}catch(e){}}}this.wrapperInitData.length=0}};e.exports=o},function(e,t,n){"use strict";function r(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var i=typeof e,o=typeof t;return"string"===i||"number"===i?"string"===o||"number"===o:"object"===o&&e.type===t.type&&e.key===t.key}e.exports=r},function(e,t,n){"use strict";function r(e,t){return e&&"object"==typeof e&&null!=e.key?c.escape(e.key):t.toString(36)}function i(e,t,n,o){var h=typeof e;if("undefined"!==h&&"boolean"!==h||(e=null),null===e||"string"===h||"number"===h||"object"===h&&e.$$typeof===s)return n(o,e,""===t?l+r(e,0):t),1;var f,d,m=0,v=""===t?l:t+p;if(Array.isArray(e))for(var y=0;y<e.length;y++)f=e[y],d=v+r(f,y),m+=i(f,d,n,o);else{var g=u(e);if(g){var _,b=g.call(e);if(g!==e.entries)for(var w=0;!(_=b.next()).done;)f=_.value,d=v+r(f,w++),m+=i(f,d,n,o);else for(;!(_=b.next()).done;){var x=_.value;x&&(f=x[1],d=v+c.escape(x[0])+p+r(f,0),m+=i(f,d,n,o))}}else if("object"===h){var M="",E=String(e);a("31","[object Object]"===E?"object with keys {"+Object.keys(e).join(", ")+"}":E,M)}}return m}function o(e,t,n){return null==e?0:i(e,"",t,n)}var a=n(6),s=(n(12),n(99)),u=n(112),c=(n(3),n(38)),l=(n(4),"."),p=":";e.exports=o},function(e,t,n){"use strict";function r(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}function i(e){var t={"=0":"=","=2":":"};return(""+("."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1))).replace(/(=0|=2)/g,function(e){return t[e]})}var o={escape:r,unescape:i};e.exports=o},function(e,t,n){"use strict";var r=n(10),i=n(120),o=n(30),a=n(124),s=n(121),u=n(123),c=n(15),l=n(1),p=n(125),h=n(128),f=(n(4),c.createElement),d=c.createFactory,m=c.cloneElement,v=r,y={Children:{map:i.map,forEach:i.forEach,count:i.count,toArray:i.toArray,only:h},Component:o,PureComponent:a,createElement:f,cloneElement:m,isValidElement:c.isValidElement,PropTypes:l,createClass:s.createClass,createFactory:d,createMixin:function(e){return e},DOM:u,version:p,__spread:v};e.exports=y},function(e,t,n){"use strict";var r=(n(4),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){},enqueueReplaceState:function(e,t){},enqueueSetState:function(e,t){}});e.exports=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(a),u=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.visible=!1,e.resourceMap={},e.resourceIds=[],e}return o(t,e),t}(s.Object3D);e.exports=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(0),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(i),a=function e(){r(this,e),this.userData={},this.uniforms={},this.uuid=o.Math.generateUUID()};e.exports=a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(7),l=function(e){return e&&e.__esModule?e:{default:e}}(c),p=function(e){function t(){var e,n,o,a;r(this,t);for(var s=arguments.length,u=Array(s),c=0;c<s;c++)u[c]=arguments[c];return n=o=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),o.updateCacheAndReplace=function(e,t,n){t.userData._propsCache[e]=n,t.userData._wantPropertyOverwrite=!0},a=n,i(o,a)}return o(t,e),s(t,[{key:"beginPropertyUpdates",value:function(e){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"beginPropertyUpdates",this).call(this,e),e.userData._wantPropertyOverwrite=!1}},{key:"completePropertyUpdates",value:function(e){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"completePropertyUpdates",this).call(this,e),e.userData._wantPropertyOverwrite&&(e.userData._wantPropertyOverwrite=!1,e.copy(this.construct(e.userData._propsCache)))}},{key:"applyInitialProps",value:function(e,n){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n),e.userData._propsCache=a({},n)}}]),t}(l.default);e.exports=p},function(e,t,n){"use strict";e.exports="data-reactid"},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!==e&&t!==t}function i(e,t){if(r(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var a=0;a<n.length;a++)if(!o.call(t,n[a])||!r(e[n[a]],t[n[a]]))return!1;return!0}var o=Object.prototype.hasOwnProperty;e.exports=i},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(6),o=n(39),a=(n(3),function(){function e(t){r(this,e),this._callbacks=null,this._contexts=null,this._arg=t}return e.prototype.enqueue=function(e,t){this._callbacks=this._callbacks||[],this._callbacks.push(e),this._contexts=this._contexts||[],this._contexts.push(t)},e.prototype.notifyAll=function(){var e=this._callbacks,t=this._contexts,n=this._arg;if(e&&t){e.length!==t.length&&i("24"),this._callbacks=null,this._contexts=null;for(var r=0;r<e.length;r++)e[r].call(t[r],n);e.length=0,t.length=0}},e.prototype.checkpoint=function(){return this._callbacks?this._callbacks.length:0},e.prototype.rollback=function(e){this._callbacks&&this._contexts&&(this._callbacks.length=e,this._contexts.length=e)},e.prototype.reset=function(){this._callbacks=null,this._contexts=null},e.prototype.destructor=function(){this.reset()},e}());e.exports=o.addPoolingTo(a)},function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var i=n(6),o=(n(3),{MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,injectDOMPropertyConfig:function(e){var t=o,n=e.Properties||{},a=e.DOMAttributeNamespaces||{},u=e.DOMAttributeNames||{},c=e.DOMPropertyNames||{},l=e.DOMMutationMethods||{};e.isCustomAttribute&&s._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var p in n){s.properties.hasOwnProperty(p)&&i("48",p);var h=p.toLowerCase(),f=n[p],d={attributeName:h,attributeNamespace:null,propertyName:p,mutationMethod:null,mustUseProperty:r(f,t.MUST_USE_PROPERTY),hasBooleanValue:r(f,t.HAS_BOOLEAN_VALUE),hasNumericValue:r(f,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(f,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(f,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(d.hasBooleanValue+d.hasNumericValue+d.hasOverloadedBooleanValue<=1||i("50",p),u.hasOwnProperty(p)){var m=u[p];d.attributeName=m}a.hasOwnProperty(p)&&(d.attributeNamespace=a[p]),c.hasOwnProperty(p)&&(d.propertyName=c[p]),l.hasOwnProperty(p)&&(d.mutationMethod=l[p]),s.properties[p]=d}}}),a=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",s={ID_ATTRIBUTE_NAME:"data-reactid",ROOT_ATTRIBUTE_NAME:"data-reactroot",ATTRIBUTE_NAME_START_CHAR:a,ATTRIBUTE_NAME_CHAR:a+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<s._isCustomAttributeFunctions.length;t++){if((0,s._isCustomAttributeFunctions[t])(e))return!0}return!1},injection:o};e.exports=s},function(e,t,n){"use strict";var r=n(6),i=n(37),o=n(56),a=n(41),s=n(108),u=n(110),c=(n(3),{}),l=null,p=function(e,t){e&&(o.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},h=function(e){return p(e,!0)},f=function(e){return p(e,!1)},d=function(e){return"."+e._rootNodeID},m={injection:{injectEventPluginOrder:i.injectEventPluginOrder,injectEventPluginsByName:i.injectEventPluginsByName},putListener:function(e,t,n){"function"!=typeof n&&r("94",t,typeof n);var o=d(e);(c[t]||(c[t]={}))[o]=n;var a=i.registrationNameModules[t];a&&a.didPutListener&&a.didPutListener(e,t,n)},getListener:function(e,t){var n=c[t],r=d(e);return n&&n[r]},deleteListener:function(e,t){var n=i.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var r=c[t];if(r){delete r[d(e)]}},deleteAllListeners:function(e){var t=d(e);for(var n in c)if(c.hasOwnProperty(n)&&c[n][t]){var r=i.registrationNameModules[n];r&&r.willDeleteListener&&r.willDeleteListener(e,n),delete c[n][t]}},extractEvents:function(e,t,n,r){for(var o,a=i.plugins,u=0;u<a.length;u++){var c=a[u];if(c){var l=c.extractEvents(e,t,n,r);l&&(o=s(o,l))}}return o},enqueueEvents:function(e){e&&(l=s(l,e))},processEventQueue:function(e){var t=l;l=null,e?u(t,h):u(t,f),l&&r("95"),a.rethrowCaughtError()},__purge:function(){c={}},__getListenerBank:function(){return c}};e.exports=m},function(e,t,n){"use strict";function r(e){return"topMouseUp"===e||"topTouchEnd"===e||"topTouchCancel"===e}function i(e){return"topMouseMove"===e||"topTouchMove"===e}function o(e){return"topMouseDown"===e||"topTouchStart"===e}function a(e,t,n,r){var i=e.type||"unknown-event";e.currentTarget=y.getNodeFromInstance(r),t?m.invokeGuardedCallbackWithCatch(i,n,e):m.invokeGuardedCallback(i,n,e),e.currentTarget=null}function s(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var i=0;i<n.length&&!e.isPropagationStopped();i++)a(e,t,n[i],r[i]);else n&&a(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null}function u(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t)){for(var r=0;r<t.length&&!e.isPropagationStopped();r++)if(t[r](e,n[r]))return n[r]}else if(t&&t(e,n))return n;return null}function c(e){var t=u(e);return e._dispatchInstances=null,e._dispatchListeners=null,t}function l(e){var t=e._dispatchListeners,n=e._dispatchInstances;Array.isArray(t)&&d("103"),e.currentTarget=t?y.getNodeFromInstance(n):null;var r=t?t(e):null;return e.currentTarget=null,e._dispatchListeners=null,e._dispatchInstances=null,r}function p(e){return!!e._dispatchListeners}var h,f,d=n(6),m=n(41),v=(n(3),n(4),{injectComponentTree:function(e){h=e},injectTreeTraversal:function(e){f=e}}),y={isEndish:r,isMoveish:i,isStartish:o,executeDirectDispatch:l,executeDispatchesInOrder:s,executeDispatchesInOrderStopAtTrue:c,hasDispatches:p,getInstanceFromNode:function(e){return h.getInstanceFromNode(e)},getNodeFromInstance:function(e){return h.getNodeFromInstance(e)},isAncestor:function(e,t){return f.isAncestor(e,t)},getLowestCommonAncestor:function(e,t){return f.getLowestCommonAncestor(e,t)},getParentInstance:function(e){return f.getParentInstance(e)},traverseTwoPhase:function(e,t,n){return f.traverseTwoPhase(e,t,n)},traverseEnterLeave:function(e,t,n,r,i){return f.traverseEnterLeave(e,t,n,r,i)},injection:v};e.exports=y},function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,m)||(e[m]=f++,p[e[m]]={}),p[e[m]]}var i,o=n(10),a=n(37),s=n(100),u=n(107),c=n(116),l=n(118),p={},h=!1,f=0,d={topAbort:"abort",topAnimationEnd:c("animationend")||"animationend",topAnimationIteration:c("animationiteration")||"animationiteration",topAnimationStart:c("animationstart")||"animationstart",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:c("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},m="_reactListenersID"+String(Math.random()).slice(2),v=o({},s,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(v.handleTopLevel),v.ReactEventListener=e}},setEnabled:function(e){v.ReactEventListener&&v.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!v.ReactEventListener||!v.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,i=r(n),o=a.registrationNameDependencies[e],s=0;s<o.length;s++){var u=o[s];i.hasOwnProperty(u)&&i[u]||("topWheel"===u?l("wheel")?v.ReactEventListener.trapBubbledEvent("topWheel","wheel",n):l("mousewheel")?v.ReactEventListener.trapBubbledEvent("topWheel","mousewheel",n):v.ReactEventListener.trapBubbledEvent("topWheel","DOMMouseScroll",n):"topScroll"===u?l("scroll",!0)?v.ReactEventListener.trapCapturedEvent("topScroll","scroll",n):v.ReactEventListener.trapBubbledEvent("topScroll","scroll",v.ReactEventListener.WINDOW_HANDLE):"topFocus"===u||"topBlur"===u?(l("focus",!0)?(v.ReactEventListener.trapCapturedEvent("topFocus","focus",n),v.ReactEventListener.trapCapturedEvent("topBlur","blur",n)):l("focusin")&&(v.ReactEventListener.trapBubbledEvent("topFocus","focusin",n),v.ReactEventListener.trapBubbledEvent("topBlur","focusout",n)),i.topBlur=!0,i.topFocus=!0):d.hasOwnProperty(u)&&v.ReactEventListener.trapBubbledEvent(u,d[u],n),i[u]=!0)}},trapBubbledEvent:function(e,t,n){return v.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return v.ReactEventListener.trapCapturedEvent(e,t,n)},supportsEventPageXY:function(){if(!document.createEvent)return!1;var e=document.createEvent("MouseEvent");return null!=e&&"pageX"in e},ensureScrollValueMonitoring:function(){if(void 0===i&&(i=v.supportsEventPageXY()),!i&&!h){var e=u.refreshScrollValues;v.ReactEventListener.monitorScrollValue(e),h=!0}}});e.exports=v},function(e,t,n){"use strict";function r(e){}function i(e){return!(!e.prototype||!e.prototype.isReactComponent)}function o(e){return!(!e.prototype||!e.prototype.isPureReactComponent)}var a=n(6),s=n(10),u=n(46),c=n(40),l=n(12),p=n(41),h=n(24),f=(n(14),n(61)),d=n(20),m=n(29),v=(n(3),n(52)),y=n(43),g=(n(4),{ImpureClass:0,PureClass:1,StatelessFunctional:2});r.prototype.render=function(){var e=h.get(this)._currentElement.type,t=e(this.props,this.context,this.updater);return t};var _=1,b={construct:function(e){this._currentElement=e,this._rootNodeID=0,this._compositeType=null,this._instance=null,this._hostParent=null,this._hostContainerInfo=null,this._updateBatchNumber=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedNodeType=null,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null,this._calledComponentWillUnmount=!1},mountComponent:function(e,t,n,s){this._context=s,this._mountOrder=_++,this._hostParent=t,this._hostContainerInfo=n;var c,l=this._currentElement.props,p=this._processContext(s),f=this._currentElement.type,d=e.getUpdateQueue(),v=i(f),y=this._constructComponent(v,l,p,d);v||null!=y&&null!=y.render?o(f)?this._compositeType=g.PureClass:this._compositeType=g.ImpureClass:(c=y,null===y||y===!1||u.isValidElement(y)||a("105",f.displayName||f.name||"Component"),y=new r(f),this._compositeType=g.StatelessFunctional);y.props=l,y.context=p,y.refs=m,y.updater=d,this._instance=y,h.set(y,this);var b=y.state;void 0===b&&(y.state=b=null),("object"!=typeof b||Array.isArray(b))&&a("106",this.getName()||"ReactCompositeComponent"),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var w;return w=y.unstable_handleError?this.performInitialMountWithErrorHandling(c,t,n,e,s):this.performInitialMount(c,t,n,e,s),y.componentDidMount&&e.getReactMountReady().enqueue(y.componentDidMount,y),w},_constructComponent:function(e,t,n,r){return this._constructComponentWithoutOwner(e,t,n,r)},_constructComponentWithoutOwner:function(e,t,n,r){var i=this._currentElement.type;return e?new i(t,n,r):i(t,n,r)},performInitialMountWithErrorHandling:function(e,t,n,r,i){var o,a=r.checkpoint();try{o=this.performInitialMount(e,t,n,r,i)}catch(s){r.rollback(a),this._instance.unstable_handleError(s),this._pendingStateQueue&&(this._instance.state=this._processPendingState(this._instance.props,this._instance.context)),a=r.checkpoint(),this._renderedComponent.unmountComponent(!0),r.rollback(a),o=this.performInitialMount(e,t,n,r,i)}return o},performInitialMount:function(e,t,n,r,i){var o=this._instance,a=0;o.componentWillMount&&(o.componentWillMount(),this._pendingStateQueue&&(o.state=this._processPendingState(o.props,o.context))),void 0===e&&(e=this._renderValidatedComponent());var s=f.getType(e);this._renderedNodeType=s;var u=this._instantiateReactComponent(e,s!==f.EMPTY);this._renderedComponent=u;var c=d.mountComponent(u,r,t,n,this._processChildContext(i),a);return c},getHostNode:function(){return d.getHostNode(this._renderedComponent)},unmountComponent:function(e){if(this._renderedComponent){var t=this._instance;if(t.componentWillUnmount&&!t._calledComponentWillUnmount)if(t._calledComponentWillUnmount=!0,e){var n=this.getName()+".componentWillUnmount()";p.invokeGuardedCallback(n,t.componentWillUnmount.bind(t))}else t.componentWillUnmount();this._renderedComponent&&(d.unmountComponent(this._renderedComponent,e),this._renderedNodeType=null,this._renderedComponent=null,this._instance=null),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=0,this._topLevelWrapper=null,h.remove(t)}},_maskContext:function(e){var t=this._currentElement.type,n=t.contextTypes;if(!n)return m;var r={};for(var i in n)r[i]=e[i];return r},_processContext:function(e){var t=this._maskContext(e);return t},_processChildContext:function(e){var t,n=this._currentElement.type,r=this._instance;if(r.getChildContext&&(t=r.getChildContext()),t){"object"!=typeof n.childContextTypes&&a("107",this.getName()||"ReactCompositeComponent");for(var i in t)i in n.childContextTypes||a("108",this.getName()||"ReactCompositeComponent",i);return s({},e,t)}return e},_checkContextTypes:function(e,t,n){},receiveComponent:function(e,t,n){var r=this._currentElement,i=this._context;this._pendingElement=null,this.updateComponent(t,r,e,i,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement?d.receiveComponent(this,this._pendingElement,e,this._context):null!==this._pendingStateQueue||this._pendingForceUpdate?this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context):this._updateBatchNumber=null},updateComponent:function(e,t,n,r,i){var o=this._instance;null==o&&a("136",this.getName()||"ReactCompositeComponent");var s,u=!1;this._context===i?s=o.context:(s=this._processContext(i),u=!0);var c=t.props,l=n.props;t!==n&&(u=!0),u&&o.componentWillReceiveProps&&o.componentWillReceiveProps(l,s);var p=this._processPendingState(l,s),h=!0;this._pendingForceUpdate||(o.shouldComponentUpdate?h=o.shouldComponentUpdate(l,p,s):this._compositeType===g.PureClass&&(h=!v(c,l)||!v(o.state,p))),this._updateBatchNumber=null,h?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,l,p,s,e,i)):(this._currentElement=n,this._context=i,o.props=l,o.state=p,o.context=s)},_processPendingState:function(e,t){var n=this._instance,r=this._pendingStateQueue,i=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(i&&1===r.length)return r[0];for(var o=s({},i?r[0]:n.state),a=i?1:0;a<r.length;a++){var u=r[a];s(o,"function"==typeof u?u.call(n,o,e,t):u)}return o},_performComponentUpdate:function(e,t,n,r,i,o){var a,s,u,c=this._instance,l=Boolean(c.componentDidUpdate);l&&(a=c.props,s=c.state,u=c.context),c.componentWillUpdate&&c.componentWillUpdate(t,n,r),this._currentElement=e,this._context=o,c.props=t,c.state=n,c.context=r,this._updateRenderedComponent(i,o),l&&i.getReactMountReady().enqueue(c.componentDidUpdate.bind(c,a,s,u),c)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,r=n._currentElement,i=this._renderValidatedComponent(),o=0;if(y(r,i))d.receiveComponent(n,i,e,this._processChildContext(t));else{var a=d.getHostNode(n);d.unmountComponent(n,!1);var s=f.getType(i);this._renderedNodeType=s;var u=this._instantiateReactComponent(i,s!==f.EMPTY);this._renderedComponent=u;var c=d.mountComponent(u,e,this._hostParent,this._hostContainerInfo,this._processChildContext(t),o);this._replaceNodeWithMarkup(a,c,n)}},_replaceNodeWithMarkup:function(e,t,n){c.replaceNodeWithMarkup(e,t,n)},_renderValidatedComponentWithoutOwnerOrContext:function(){var e=this._instance;return e.render()},_renderValidatedComponent:function(){var e;if(this._compositeType!==g.StatelessFunctional){l.current=this;try{e=this._renderValidatedComponentWithoutOwnerOrContext()}finally{l.current=null}}else e=this._renderValidatedComponentWithoutOwnerOrContext();return null===e||e===!1||u.isValidElement(e)||a("109",this.getName()||"ReactCompositeComponent"),e},attachRef:function(e,t){var n=this.getPublicInstance();null==n&&a("110");var r=t.getPublicInstance();(n.refs===m?n.refs={}:n.refs)[e]=r},detachRef:function(e){delete this.getPublicInstance().refs[e]},getName:function(){var e=this._currentElement.type,t=this._instance&&this._instance.constructor;return e.displayName||t&&t.displayName||e.name||t&&t.name||null},getPublicInstance:function(){var e=this._instance;return this._compositeType===g.StatelessFunctional?null:e},_instantiateReactComponent:null};e.exports=b},function(e,t,n){"use strict";var r,i={injectEmptyComponentFactory:function(e){r=e}},o={create:function(e){return r(e)}};o.injection=i,e.exports=o},function(e,t,n){"use strict";function r(e){return u||a("111",e.type),new u(e)}function i(e){return new l(e)}function o(e){return e instanceof l}var a=n(6),s=n(10),u=(n(3),null),c={},l=null,p={injectGenericComponentClass:function(e){u=e},injectTextComponentClass:function(e){l=e},injectComponentClasses:function(e){s(c,e)}},h={createInternalComponent:r,createInstanceForText:i,isTextComponent:o,injection:p};e.exports=h},function(e,t,n){"use strict";var r=n(6),i=n(46),o=(n(3),{HOST:0,COMPOSITE:1,EMPTY:2,getType:function(e){return null===e||e===!1?o.EMPTY:i.isValidElement(e)?"function"==typeof e.type?o.COMPOSITE:o.HOST:void r("26",e)}});e.exports=o},function(e,t,n){"use strict";function r(e,t,n){"function"==typeof e?e(t.getPublicInstance()):o.addComponentAsRefTo(t,e,n)}function i(e,t,n){"function"==typeof e?e(null):o.removeComponentAsRefFrom(t,e,n)}var o=n(105),a={};a.attachRefs=function(e,t){if(null!==t&&"object"==typeof t){var n=t.ref;null!=n&&r(n,e,t._owner)}},a.shouldUpdateRefs=function(e,t){var n=null,r=null;null!==e&&"object"==typeof e&&(n=e.ref,r=e._owner);var i=null,o=null;return null!==t&&"object"==typeof t&&(i=t.ref,o=t._owner),n!==i||"string"==typeof i&&o!==r},a.detachRefs=function(e,t){if(null!==t&&"object"==typeof t){var n=t.ref;null!=n&&i(n,e,t._owner)}},e.exports=a},function(e,t,n){"use strict";function r(e){u.enqueueUpdate(e)}function i(e){var t=typeof e;if("object"!==t)return t;var n=e.constructor&&e.constructor.name||t,r=Object.keys(e);return r.length>0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function o(e,t){var n=s.get(e);if(!n){return null}return n}var a=n(6),s=(n(12),n(24)),u=(n(14),n(25)),c=(n(3),n(4),{isMounted:function(e){var t=s.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){c.validateCallback(t,n);var i=o(e);if(!i)return null;i._pendingCallbacks?i._pendingCallbacks.push(t):i._pendingCallbacks=[t],r(i)},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=o(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=o(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=o(e,"setState");if(n){(n._pendingStateQueue||(n._pendingStateQueue=[])).push(t),r(n)}},enqueueElementInternal:function(e,t,n){e._pendingElement=t,e._context=n,r(e)},validateCallback:function(e,t){e&&"function"!=typeof e&&a("122",t,i(e))}});e.exports=c},function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=r},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";var r=!1;e.exports=r},function(e,t,n){"use strict";function r(e){var t=e&&(i&&e[i]||e[o]);if("function"==typeof t)return t}var i="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";e.exports=r},function(e,t,n){"use strict";function r(e,t){return e&&"object"==typeof e&&null!=e.key?c.escape(e.key):t.toString(36)}function i(e,t,n,o){var h=typeof e;if("undefined"!==h&&"boolean"!==h||(e=null),null===e||"string"===h||"number"===h||"object"===h&&e.$$typeof===s)return n(o,e,""===t?l+r(e,0):t),1;var f,d,m=0,v=""===t?l:t+p;if(Array.isArray(e))for(var y=0;y<e.length;y++)f=e[y],d=v+r(f,y),m+=i(f,d,n,o);else{var g=u(e);if(g){var _,b=g.call(e);if(g!==e.entries)for(var w=0;!(_=b.next()).done;)f=_.value,d=v+r(f,w++),m+=i(f,d,n,o);else for(;!(_=b.next()).done;){var x=_.value;x&&(f=x[1],d=v+c.escape(x[0])+p+r(f,0),m+=i(f,d,n,o))}}else if("object"===h){var M="",E=String(e);a("31","[object Object]"===E?"object with keys {"+Object.keys(e).join(", ")+"}":E,M)}}return m}function o(e,t,n){return null==e?0:i(e,"",t,n)}var a=n(18),s=(n(12),n(64)),u=n(67),c=(n(3),n(45)),l=(n(4),"."),p=":";e.exports=o},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(o),s=function(){function e(){r(this,e),this.userData={},this.uuid=a.Math.generateUUID()}return i(e,[{key:"setup",value:function(e){}},{key:"update",value:function(){}},{key:"dispose",value:function(){}}]),e}();e.exports=s},function(e,t,n){"use strict";var r={hasCachedChildMarkups:1};e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){for(var t=e,n=t._renderedComponent;n;)t=n,n=t._renderedComponent;return t}function o(e,t){(0,h.default)(!!t,"Markup is null!");var n=i(e);n._hostMarkup=t,t[y]=n}function a(e){var t=e._hostMarkup;t&&(delete t[y],e._hostMarkup=null)}function s(e,t){if(0==(e._flags&d.default.hasCachedChildMarkups)){var n=e._renderedChildren,r=Object.keys(n),a=t.childrenMarkup;e:for(var s=0;s<r.length;++s){var u=r[s],c=n[u],l=i(c)._hostID;if(0!==l){for(var p=0;p<a.length;++p){var f=a[p];if(f[v.default]===l){o(c,f);continue e}}(0,h.default)(!1)}}e._flags|=d.default.hasCachedChildMarkups}}function u(e){if(e[y])return e[y];for(var t=e,n=[];!t[y];){if(n.push(t),!t.parentMarkup)return null;t=t.parentMarkup}for(var r=void 0,i=t[y];i&&(r=i,n.length);)s(i,t),t=n.pop(),i=t[y];return r}function c(e){var t=u(e);return null!==t&&t._hostMarkup===e?t:null}function l(e){if((0,h.default)(void 0!==e._hostMarkup),e._hostMarkup)return e._hostMarkup;for(var t=e,n=[];!t._hostMarkup;)n.push(t),(0,h.default)(t._hostParent,"React3 tree root should always have a node reference."),t=t._hostParent;for(;n.length;t=n.pop())s(t,t._hostMarkup);return t._hostMarkup}var p=n(2),h=r(p),f=n(70),d=r(f),m=n(51),v=r(m),y="__react3InternalInstance$"+Math.random().toString(36).slice(2);e.exports={getMarkupFromInstance:l,getInstanceFromMarkup:c,precacheMarkup:o,uncacheMarkup:a,precacheChildMarkups:s,getClosestInstanceFromMarkup:u,getRenderedHostOrTextFromComponent:i}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e){return!!e.prototype&&e.prototype.isReactComponent}function u(e){return!(!e.prototype||!e.prototype.isPureReactComponent)}var c="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},l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=n(15),d=r(f),m=n(12),v=(r(m),n(2)),y=r(v),g=n(86),_=r(g),b=n(13),w=(r(b),n(58)),x=r(w),M=n(24),E=r(M),O=n(14),P=(r(O),n(84)),T=(r(P),function e(){a(this,e)});T.prototype=h({},T.prototype,x.default);var S={ImpureClass:0,PureClass:1,StatelessFunctional:2},C=function(){function e(){a(this,e)}return p(e,[{key:"render",value:function(){var e=E.default.get(this)._currentElement.type,t=e(this.props,this.context,this.updater);return t}}]),e}(),R=function(e){function t(e,n){a(this,t);var r=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._react3RendererInstance=n,r.construct(e),r}return o(t,e),p(t,[{key:"getHostMarkup",value:function(){return l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getHostNode",this).call(this)}},{key:"construct",value:function(e){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"construct",this).call(this,e),this._threeObject=null}},{key:"_updateRenderedComponent",value:function(e,n){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_updateRenderedComponent",this).call(this,e,n),this._threeObject=this._renderedComponent._threeObject}},{key:"_instantiateReactComponent",value:function(e,t){return this._react3RendererInstance.instantiateReactComponent(e,t)}},{key:"_replaceNodeWithMarkup",value:function(e,t){var n=e.parentMarkup,r=n.childrenMarkup,i=r.indexOf(e);(0,y.default)(i!==-1);var o=n.threeObject.userData.react3internalComponent,a=e.threeObject.userData.react3internalComponent;o.removeChild(a,e);var s=t.threeObject.userData.react3internalComponent;s._mountIndex=i,o.createChild(s,null,t)}},{key:"mountComponent",value:function(e,t,n,r){this._context=r,this._mountOrder=this._react3RendererInstance.nextMountID++,this._hostParent=t,this._hostContainerInfo=n;var i=this._currentElement.props,o=this._processContext(r),a=this._currentElement.type,l=e.getUpdateQueue(),p=s(a),h=this._constructComponent(p,i,o,l),f=void 0;p||null!=h&&null!=h.render?u(a)?this._compositeType=S.PureClass:this._compositeType=S.ImpureClass:(f=h,(0,y.default)(null===h||h===!1||d.default.isValidElement(h),"%s(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.",a.displayName||a.name||"Component"),h=new C(a),this._compositeType=S.StatelessFunctional);h.props=i,h.context=o,h.refs=_.default,h.updater=l,this._instance=h,E.default.set(h,this);var m=h.state;void 0===m&&(h.state=m=null),("object"!==(void 0===m?"undefined":c(m))||Array.isArray(m))&&(0,y.default)(!1),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var v=this.performInitialMount(f,t,n,e,r);return h.componentDidMount&&e.getReactMountReady().enqueue(h.componentDidMount,h),v}},{key:"_constructComponent",value:function(e,t,n,r){return this._constructComponentWithoutOwner(e,t,n,r)}},{key:"_constructComponentWithoutOwner",value:function(e,t,n,r){var i=this._currentElement.type;return e?new i(t,n,r):i(t,n,r)}},{key:"attachRef",value:function(e,t){var n=this.getPublicInstance();(n.refs===_.default?n.refs={}:n.refs)[e]=t.getPublicInstance()}}]),t}(T);e.exports=R},function(e,t,n){"use strict";(function(t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o,a,s,u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(0),p=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(l),h=n(2),f=r(h),d=n(13),m=(r(d),n(25)),v=r(m),y=n(76),g=r(y),_=n(69),b=r(_),w=n(31),x=(r(w),n(48)),M=r(x),E=n(82),O=r(E),P=n(216),T=r(P),S=["gammaInput","gammaOutput"],C=(a=o=function(){function e(n,r){var o=this;i(this,e),s.call(this);var a=n.mainCamera,c=n.onAnimate,l=n.onRecreateCanvas,h=n.onRendererUpdated,f=n.onManualRenderTriggerCreated,d=n.forceManualRender;this._parameters=u({},n),this._rendererInstance=r,this._mounted=!1,this._willUnmount=!1,this._scene=null,this._mainCameraName=a,this._viewports=[],this._modules=[],this._resourceContainers=[],this._recreateCanvasCallback=l,this._rendererUpdatedCallback=h,this._manualRenderTriggerCallback=f,this._forceManualRender=d,this._warnedAboutManualRendering=!1,this._canvas=null,this._onAnimate=c,this._objectsByUUID={},this._materials=[],this._geometries=[],this._textures=[],this._objectsByName={},this._lastRenderMode=null,this._renderTrigger=function(e){e?o._render():null===o._renderRequest&&(o._renderRequest=requestAnimationFrame(o._render))},this.uuid=p.Math.generateUUID(),this.userData={},"true"===t.env.ENABLE_REACT_ADDON_HOOKS&&(this._highlightScene=new p.Scene,this._highlightGeometry=new p.BoxGeometry(1,1,1),this._highlightMaterial=new p.MeshBasicMaterial({color:255,transparent:!0,opacity:.4}),this._highlightObjectId=null,this._getHighlightBoundingBox=null,this._hideHighlight=function(){o._highlightObjectId=null,o._getHighlightBoundingBox=null},this._objectHighlighted=function(e){var t=e.uuid,n=e.boundingBoxFunc,r=void 0;o._highlightObjectId&&(r=o._objectsByUUID[o._highlightObjectId],r.userData.events.removeListener("hideHighlight",o._hideHighlight)),o._highlightObjectId=t,o._getHighlightBoundingBox=n,r=o._objectsByUUID[t],r.userData.events.once("hideHighlight",o._hideHighlight)})}return c(e,[{key:"_createRenderer",value:function(){if(this._canvas){var e=this._parameters,t={canvas:this._canvas,precision:e.precision,alpha:e.alpha,premultipliedAlpha:e.premultipliedAlpha,antialias:e.antialias,stencil:e.stencil,preserveDrawingBuffer:e.preserveDrawingBuffer,depth:e.depth,logarithmicDepthBuffer:e.logarithmicDepthBuffer};this._parameters.customRenderer?this._renderer=this._parameters.customRenderer(t):this._renderer=(0,T.default)()?new p.WebGLRenderer(t):new p.CanvasRenderer(t),this._rendererUpdatedCallback&&this._rendererUpdatedCallback(this._renderer);var n=this._renderer;e.hasOwnProperty("pixelRatio")&&n.setPixelRatio(e.pixelRatio),e.hasOwnProperty("sortObjects")&&(n.sortObjects=e.sortObjects);var r=e.hasOwnProperty("clearColor"),i=e.hasOwnProperty("clearAlpha");if(r||i){var o=void 0;o=r?e.clearColor:new p.Color(0),i?n.setClearColor(o,e.clearAlpha):n.setClearColor(o)}e.hasOwnProperty("shadowMapEnabled")&&(n.shadowMap.enabled=e.shadowMapEnabled),e.hasOwnProperty("shadowMapType")&&(n.shadowMap.type=e.shadowMapType),e.hasOwnProperty("shadowMapCullFace")&&(n.shadowMap.cullFace=e.shadowMapCullFace),e.hasOwnProperty("shadowMapDebug")&&(n.shadowMap.debug=e.shadowMapDebug),S.forEach(function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n.setSize(e.width,e.height)}}},{key:"initialize",value:function(){this.userData.events.on("animate",this._callOnAnimate),this._forceManualRender?this._renderRequest=null:this._renderRequest=requestAnimationFrame(this._render),this._manualRenderTriggerCallback&&this._manualRenderTriggerCallback(this._renderTrigger)}},{key:"getObjectsByName",value:function(e){var t=this._objectsByName[e],n=void 0;return t?function(){var e=t.values;n=Object.keys(e).map(function(t){return e[t]})}():n=[],n}},{key:"addAnimateListener",value:function(e){this.userData.events.on("animate",e)}},{key:"removeAnimateListener",value:function(e){this.userData.events.removeListener("animate",e)}},{key:"addBeforeRenderListener",value:function(e){this.userData.events.on("preRender",e)}},{key:"removeBeforeRenderListener",value:function(e){this.userData.events.removeListener("preRender",e)}},{key:"addChildren",value:function(e){for(var t=0;t<e.length;++t){var n=e[t];n instanceof p.Scene?this.setScene(n):n instanceof g.default?this.addViewport(n):n instanceof b.default?this.addModule(n):n instanceof M.default?this.addResourceContainer(n):(0,f.default)(!1,"The react3 component should only contain <viewport/>s or <scene/>s or <resources/>.")}}},{key:"removeChild",value:function(e){e instanceof p.Scene?this._scene===e&&this.setScene(null):e instanceof g.default?this.removeViewport(e):e instanceof b.default?this.removeModule(e):e instanceof M.default?this.removeResourceContainer(e):(0,f.default)(!1,"The react3 component should only contain <viewport/>s or <scene/>s, <module/>s or <resources/>.")}},{key:"_renderScene",value:function(e){if(this._renderer.render(this._scene,e),"true"===t.env.ENABLE_REACT_ADDON_HOOKS&&null!==this._highlightObjectId){var n=this._getHighlightBoundingBox(),r=this._highlightScene,i=r.children.length-n.length;if(i>0)for(var o=0;o<i;o++)r.remove(r.children[0]);else if(i<0)for(var a=0;a<-i;a++)r.add(new p.Mesh(this._highlightGeometry,this._highlightMaterial));for(var s=0;s<n.length;++s){var u=n[s],c=u.min.clone().add(u.max).multiplyScalar(.5),l=u.max.clone().sub(u.min),h=r.children[s];h.position.copy(c),h.scale.copy(l)}var f=this._renderer.autoClear;this._renderer.autoClear=!1,this._renderer.render(r,e),this._renderer.autoClear=f}}},{key:"setScene",value:function(e){this._scene=e}},{key:"addViewport",value:function(e){this._viewports.push(e)}},{key:"removeViewport",value:function(e){var t=this._viewports.indexOf(e);this._viewports.splice(t,1)}},{key:"addResourceContainer",value:function(e){this._resourceContainers.push(e)}},{key:"removeResourceContainer",value:function(e){var t=this._resourceContainers.indexOf(e);this._resourceContainers.splice(t,1)}},{key:"addModule",value:function(e){this._modules.push(e)}},{key:"removeModule",value:function(e){var t=this._modules.indexOf(e);this._modules.splice(t,1)}},{key:"updateWidth",value:function(e){this._parameters.width=e,this._renderer&&this._renderer.setSize(this._parameters.width,this._parameters.height)}},{key:"updateOnRecreateCanvas",value:function(e,t){this._recreateCanvasCallback=t}},{key:"updateOnRendererUpdated",value:function(e){this._rendererUpdatedCallback=e}},{key:"updateOnManualRenderTriggerCreated",value:function(e){this._manualRenderTriggerCallback=e,e&&this._manualRenderTriggerCallback(this._renderTrigger)}},{key:"updateForceManualRender",value:function(e){this._forceManualRender!==e&&(this._forceManualRender=e,e?(cancelAnimationFrame(this._renderRequest),this._renderRequest=null):this._renderRequest=requestAnimationFrame(this._render))}},{key:"updateHeight",value:function(e){this._parameters.height=e,this._renderer&&this._renderer.setSize(this._parameters.width,this._parameters.height)}},{key:"updatePixelRatio",value:function(e){this._parameters.pixelRatio=e,this._renderer&&(this._renderer.setPixelRatio(e),this._renderer.setSize(this._parameters.width,this._parameters.height))}},{key:"updateSortObjects",value:function(e){this._parameters.sortObjects=e,this._renderer&&(this._renderer.sortObjects=e)}},{key:"updateAntialias",value:function(e){this._parameters.antialias=e,this._renderer&&this.refreshRenderer()}},{key:"updatePrecision",value:function(e){this._parameters.precision=e,this._renderer&&this.refreshRenderer()}},{key:"updateAlpha",value:function(e){this._parameters.alpha=e,this._renderer&&this.refreshRenderer()}},{key:"updatePremultipliedAlpha",value:function(e){this._parameters.premultipliedAlpha=e,this._renderer&&this.refreshRenderer()}},{key:"updateStencil",value:function(e){this._parameters.stencil=e,this._renderer&&this.refreshRenderer()}},{key:"updatePreserveDrawingBuffer",value:function(e){this._parameters.preserveDrawingBuffer=e,this._renderer&&this.refreshRenderer()}},{key:"updateDepth",value:function(e){this._parameters.depth=e,this._renderer&&this.refreshRenderer()}},{key:"updateLogarithmicDepthBuffer",value:function(e){this._parameters.logarithmicDepthBuffer=e,this._renderer&&this.refreshRenderer()}},{key:"updateShadowMapEnabled",value:function(e){this._parameters.shadowMapEnabled=e,this._renderer&&(this._renderer.shadowMap.enabled=e,this.allMaterialsNeedUpdate(!0))}},{key:"updateShadowMapType",value:function(e){this._parameters.shadowMapType=e,this._renderer&&(this._renderer.shadowMap.type=e,this.allMaterialsNeedUpdate(!0))}},{key:"updateShadowMapCullFace",value:function(e){this._parameters.shadowMapCullFace=e,this._renderer&&(this._renderer.shadowMap.cullFace=e,this.allMaterialsNeedUpdate(!0))}},{key:"updateShadowMapDebug",value:function(e){this._parameters.shadowMapDebug=e,this._renderer&&(this._renderer.shadowMap.debug=e,this.allMaterialsNeedUpdate(!0))}},{key:"updateCanvas",value:function(e){if(this._canvas=e,this._renderer){this.disposeResourcesAndRenderer();var t=this._renderer.extensions.get("WEBGL_lose_context");t&&t.loseContext()}this._createRenderer()}},{key:"updateGammaInput",value:function(e){this._parameters.gammaInput=e,this._renderer&&(this._renderer.gammaInput=e,this.allMaterialsNeedUpdate(!0))}},{key:"updateGammaOutput",value:function(e){this._parameters.gammaOutput=e,this._renderer&&(this._renderer.gammaOutput=e,this.allMaterialsNeedUpdate(!0))}},{key:"updateContext",value:function(e){this._parameters.context=e}},{key:"updateMainCamera",value:function(e){this._parameters.mainCamera=e,this._mainCameraName=e}},{key:"updateCustomRenderer",value:function(e){this._parameters.customRenderer=e,this._renderer&&this.refreshRenderer()}},{key:"updateOnAnimate",value:function(e){this._parameters.onAnimate=e,this._onAnimate=e}},{key:"updateClearColor",value:function(e){this._parameters.clearColor=e,this._renderer&&(this._parameters.hasOwnProperty("clearAlpha")?this._renderer.setClearColor(e,this._parameters.clearAlpha):this._renderer.setClearColor(e))}},{key:"updateClearAlpha",value:function(e){var t=this._parameters;if(void 0===e?delete t.clearAlpha:t.clearAlpha=e,this._renderer){var n=void 0;n=t.hasOwnProperty("clearColor")?t.clearColor:new p.Color(0),void 0!==e?this._renderer.setClearColor(n,e):this._renderer.setClearColor(n)}}},{key:"refreshRenderer",value:function(){this.disposeResourcesAndRenderer();var e=this._renderer.extensions.get("WEBGL_lose_context");delete this._renderer,this._rendererUpdatedCallback&&this._rendererUpdatedCallback(null),this.userData.events.removeListener("animate",this._callOnAnimate),this.userData.events.removeAllListeners(),null!==this._renderRequest&&(cancelAnimationFrame(this._renderRequest),this._renderRequest=null),e&&this._canvas?(e.loseContext(),this._recreateCanvasCallback()):this._recreateCanvasCallback()}},{key:"disposeResourcesAndRenderer",value:function(){for(var e=0;e<this._materials.length;++e){this._materials[e].dispose()}for(var t=0;t<this._geometries.length;++t){this._geometries[t].dispose()}for(var n=0;n<this._textures.length;++n){this._textures[n].dispose()}this._renderer.dispose()}},{key:"willUnmount",value:function(){this._willUnmount=!0}},{key:"unmount",value:function(){if(this._mounted=!1,null!==this._renderRequest&&(cancelAnimationFrame(this._renderRequest),this._renderRequest=null),this.userData.events.removeListener("animate",this._callOnAnimate),this.userData.events.removeAllListeners(),delete this._rendererInstance,this._renderer){var e=this._renderer.extensions.get("WEBGL_lose_context");e&&e.loseContext(),this.disposeResourcesAndRenderer(),delete this._renderer,this._rendererUpdatedCallback&&this._rendererUpdatedCallback(null)}delete this._parameters,(0,f.default)(0===Object.keys(this._objectsByUUID).length,"Failed to cleanup some child objects for React3DInstance"),delete this._objectsByUUID,delete this._viewports,delete this._scene,"true"===t.env.ENABLE_REACT_ADDON_HOOKS&&(delete this._highlightScene,delete this._highlightObjectId,delete this._getHighlightBoundingBox)}},{key:"objectMounted",value:function(e){(0,f.default)(!this._objectsByUUID[e.uuid],"There already is an object with this uuid in the react 3d instance."),this._objectsByUUID[e.uuid]=e,e.userData.markup._rootInstance=this,this._addObjectWithName(e.name,e),"true"===t.env.ENABLE_REACT_ADDON_HOOKS&&e.userData.events.on("highlight",this._objectHighlighted),e.userData.events.emit("addedIntoRoot",e);var n=e,r=n.userData.markup.childrenMarkup;e instanceof p.Material&&this._materials.push(e),(e instanceof p.Geometry||e instanceof p.BufferGeometry)&&this._geometries.push(e),e instanceof p.Texture&&this._textures.push(e);for(var i=0;i<r.length;++i){var o=r[i];this.objectMounted(o.threeObject)}}},{key:"allMaterialsNeedUpdate",value:function(e){this._materials.forEach(function(t){e?t.dispose():t.needsUpdate=!0})}},{key:"objectRenamed",value:function(e,t,n){this._removeObjectWithName(t,e),this._addObjectWithName(n,e)}},{key:"_addObjectWithName",value:function(e,t){this._objectsByName[e]||(this._objectsByName[e]={count:0,values:{}}),this._objectsByName[e].values[t.uuid]=t,this._objectsByName[e].count++}},{key:"_removeObjectWithName",value:function(e,t){(0,f.default)(this._objectsByName[e]&&this._objectsByName[e].values[t.uuid]===t,"The object's name changed somehow?'"),delete this._objectsByName[e].values[t.uuid],0===--this._objectsByName[e].count&&delete this._objectsByName[e]}},{key:"objectRemoved",value:function(e){(0,f.default)(this._objectsByUUID[e.uuid]===e,"The removed object does not belong here!?"),"true"===t.env.ENABLE_REACT_ADDON_HOOKS&&(this._highlightObjectId===e.uuid&&(this._highlightObjectId=null),e.userData.events.removeListener("highlight",this._objectHighlighted),e.userData.events.removeListener("hideHighlight",this._hideHighlight)),delete this._objectsByUUID[e.uuid],e instanceof p.Material&&this._materials.splice(this._materials.indexOf(e),1),(e instanceof p.Geometry||e instanceof p.BufferGeometry)&&this._geometries.splice(this._geometries.indexOf(e),1),e instanceof p.Texture&&this._textures.splice(this._textures.indexOf(e),1),this._removeObjectWithName(e.name,e),delete e.userData.markup._rootInstance}},{key:"mountedIntoRoot",value:function(){this._mounted=!0,this.objectMounted(this)}}]),e}(),s=function(){var e=this;this._callOnAnimate=function(){e._onAnimate&&v.default.batchedUpdates(e._onAnimate)},this._render=function(){for(var t=0;t<e._modules.length;++t)e._modules[t].update();if(e._forceManualRender?e._renderRequest=null:e._renderRequest=requestAnimationFrame(e._render),e.userData.events.emit("animate"),e._scene&&e._mounted&&e._renderer){var n=null;if(e._mainCameraName){var r=e._objectsByName[e._mainCameraName];if(r&&r.count>0){var i=r.values;n=i[Object.keys(i)[0]]}}n?("camera"!==e._lastRenderMode&&(e._renderer.autoClear=!0,e._renderer.setViewport(0,0,e._parameters.width,e._parameters.height),e._lastRenderMode="camera"),O.default.current=n,e.userData.events.emit("preRender"),e._renderScene(n),O.default.current=null):e._viewports.length>0&&("viewport"!==e._lastRenderMode&&(e._renderer.autoClear=!1,e._lastRenderMode="viewport"),e._renderer.clear(),e._viewports.forEach(function(t){var n=null;if(t.cameraName){var r=e._objectsByName[t.cameraName];if(r&&r.count>0){var i=r.values;n=i[Object.keys(i)[0]]}}n&&(t.onBeforeRender&&v.default.batchedUpdates(t.onBeforeRender),e._renderer.setViewport(t.x,t.y,t.width,t.height),O.default.current=n,e.userData.events.emit("preRender"),e._renderScene(n),O.default.current=null)}))}}},a);e.exports=C}).call(t,n(17))},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(22),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),t}(s.default);e.exports=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(s),c=n(16),l=function(e){return e&&e.__esModule?e:{default:e}}(c),p=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.path=new u.Path,e}return o(t,e),a(t,[{key:"performAction",value:function(e){e.holes.push(this.path)}}]),t}(l.default);e.exports=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(0),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(i),a=function e(t){r(this,e),this.userData={},this.uuid=o.Math.generateUUID(),this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this.cameraName=t.cameraName,this.onBeforeRender=t.onBeforeRender};e.exports=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(1),h=r(p),f=n(2),d=r(f),m=n(7),v=r(m),y=n(74),g=r(y),_=n(5),b=r(_),w=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n._invalidChild=function(e){return!(e instanceof l.Shape||e instanceof g.default)},n.hasProp("shapes",{type:h.default.arrayOf((0,b.default)(l.Shape)),updateInitial:!0,update:function(e,t){e.userData._shapesFromProps=t||[],e.userData._needsToRefreshGeometry=!0},default:[]});var r=["curveSegments","material","UVGenerator"],a=[h.default.number,h.default.number,h.default.shape({generateTopUV:h.default.func,generateSideWallUV:h.default.func})];return r.forEach(function(e,t){n.hasProp(e,{type:a[t],update:function(t,n){void 0===n?delete t.userData._options[e]:t.userData._options[e]=n,t.userData._needsToRefreshGeometry=!0},default:void 0})}),n}return a(t,e),s(t,[{key:"completePropertyUpdates",value:function(e){e.userData._needsToRefreshGeometry&&(this.refreshGeometry(e),e.userData._needsToRefreshGeometry=!1)}},{key:"construct",value:function(){return new l.BufferGeometry}},{key:"getOptions",value:function(e){var t={};return["curveSegments","material","UVGenerator"].forEach(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}},{key:"applyInitialProps",value:function(e,n){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n),e.userData._shapeCache=[],e.userData._options=this.getOptions(n),e.userData._resourceListenerCleanupFunctions=[],e.userData._needsToRefreshGeometry=!1,n.children||this.refreshGeometry(e)}},{key:"addChildren",value:function(e,t){var n=this;(0,d.default)(0===t.filter(this._invalidChild).length,!1);var r=[];t.forEach(function(t){t instanceof g.default?function(){var i=r.length,o=function(t){e.userData._shapeCache[i]=t,n.refreshGeometry(e)};o.target=t;var a=function n(){t.userData.events.removeListener("resource.set",o),e.userData._resourceListenerCleanupFunctions.splice(e.userData._resourceListenerCleanupFunctions.indexOf(n),1)};e.userData._resourceListenerCleanupFunctions.push(a),t.userData.events.on("resource.set",o),t.userData.events.once("dispose",function(){a()}),r.push(null)}():r.push(t)}),e.userData._shapeCache=r,this.refreshGeometry(e)}},{key:"addChild",value:function(e){this.triggerRemount(e)}},{key:"moveChild",value:function(e){this.triggerRemount(e)}},{key:"removeChild",value:function(e){this.triggerRemount(e)}},{key:"unmount",value:function(e){return e.userData._resourceListenerCleanupFunctions.forEach(function(e){e()}),delete e.userData._options,delete e.userData._resourceListenerCleanupFunctions,delete e.userData._shapesFromProps,u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"unmount",this).call(this,e)}}]),t}(v.default);e.exports=w},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},l=n(0),p=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(l),h=n(2),f=r(h),d=n(1),m=r(d),v=n(8),y=r(v),g=n(16),_=r(g),b=n(5),w=r(b),x=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n._invalidChild=function(e){return!(e instanceof _.default)},n.hasProp("points",{type:m.default.arrayOf((0,w.default)(p.Vector2)),update:n.triggerRemount,default:[]}),n}return a(t,e),u(t,[{key:"applyInitialProps",value:function(e,n){return e.userData=s({},e.userData),e.uuid=p.Math.generateUUID(),c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n)}},{key:"addChildren",value:function(e,t){var n=this;(0,f.default)(0===t.filter(this._invalidChild).length,!1),t.forEach(function(t){n.performChildAction(e,t)})}},{key:"performChildAction",value:function(e,t){t.performAction(e)}},{key:"addChild",value:function(e){this.triggerRemount(e)}},{key:"moveChild",value:function(e){this.triggerRemount(e)}},{key:"removeChild",value:function(e){this.triggerRemount(e)}},{key:"highlight",value:function(e){var t=e.userData.markup.parentMarkup.threeObject;t.userData._descriptor.highlight(t)}},{key:"getBoundingBoxes",value:function(e){var t=e.userData.markup.parentMarkup.threeObject;return t.userData._descriptor.getBoundingBoxes(t)}}]),t}(y.default);e.exports=x},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(1),h=r(p),f=n(11),d=r(f),m=n(49),v=r(m),y=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["vertexShader","fragmentShader"].forEach(function(e){n.hasProp(e,{type:h.default.string,update:n.triggerRemount})}),n.hasProp("uniforms",{type:h.default.any,simple:!0,default:void 0}),n.hasWireframe(),n}return a(t,e),s(t,[{key:"getMaterialDescription",value:function(e){var n=u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getMaterialDescription",this).call(this,e);return e.hasOwnProperty("uniforms")&&(n.uniforms=e.uniforms),e.hasOwnProperty("vertexShader")&&(n.vertexShader=e.vertexShader),e.hasOwnProperty("fragmentShader")&&(n.fragmentShader=e.fragmentShader),n}},{key:"construct",value:function(e){var t=this.getMaterialDescription(e);return new l.ShaderMaterial(t)}},{key:"invalidChildInternal",value:function(e){return!(e instanceof v.default||u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"invalidChildInternal",this).call(this,e))}},{key:"applyInitialProps",value:function(e,n){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n),n.hasOwnProperty("uniforms")||(e.uniforms={})}}]),t}(d.default);e.exports=y},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},u=n(0),c=(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);t.default=e,t}(u),n(9)),l=function(e){return e&&e.__esModule?e:{default:e}}(c),p=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),a(t,[{key:"applyInitialProps",value:function(e,n){s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n)}},{key:"setParent",value:function(e,n){s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setParent",this).call(this,e,n)}},{key:"unmount",value:function(e){s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"unmount",this).call(this,e)}},{key:"beginPropertyUpdates",value:function(e){s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"beginPropertyUpdates",this).call(this,e),e.userData._needsProjectionMatrixUpdate=!1}},{key:"completePropertyUpdates",value:function(e){s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"completePropertyUpdates",this).call(this,e),e.userData._needsProjectionMatrixUpdate&&(e.userData._needsProjectionMatrixUpdate=!1,e.updateProjectionMatrix(),e.userData.events.emit("updateProjectionMatrix"))}}]),t}(l.default);e.exports=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(2),h=r(p),f=n(35),d=r(f),m=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"applyInitialProps",value:function(e,n){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n),e.userData._propertySlot="geometry"}},{key:"setParent",value:function(e,n){(0,h.default)(n instanceof l.Mesh||n instanceof l.Points||n instanceof l.Line,"Parent is not a mesh"),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setParent",this).call(this,e,n)}}]),t}(d.default);e.exports=m},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i,o,a=n(0),s=(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);t.default=e,t}(a),o=i=function e(){r(this,e)},i.current=null,o);e.exports=s},function(e,t,n){"use strict";function r(e){this.message=e,this.stack=""}r.prototype=Error.prototype,e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return!p&&(a.default.debugTool.removeHook(u.default),a.default.debugTool.removeHook(l.default),p=!0,!0)}var o=n(14),a=r(o),s=n(97),u=r(s),c=n(95),l=r(c),p=!1;i.restore=function(){p=!1,a.default.debugTool.addHook(u.default),a.default.debugTool.addHook(l.default)},e.exports=i},function(e,t,n){"use strict";function r(e){return function(){return e}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(e){return e},e.exports=i},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s,u,c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(130),h=r(p),f=n(122),d=r(f),m=n(0),v=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(m),y=n(31),g=r(y),_=n(5),b=r(_),w=h.default.PropTypes,x=(u=s=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.shouldComponentUpdate=d.default.shouldComponentUpdate,r._onRecreateCanvas=function(){r.setState({canvasKey:r.state.canvasKey+1})},r._canvasRef=function(e){r._canvas=e,r.props.canvasRef&&r.props.canvasRef(e)},r.state={canvasKey:0},r}return a(t,e),l(t,[{key:"componentDidMount",value:function(){this.react3Renderer=new g.default,this._render()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props;t.canvasRef!==e.canvasRef&&(t.canvasRef&&t.canvasRef(null),e.canvasRef&&e.canvasRef(this._canvas))}},{key:"componentDidUpdate",value:function(){this._render()}},{key:"componentWillUnmount",value:function(){this.react3Renderer.dispose(),delete this.react3Renderer}},{key:"_render",value:function(){var e=this._canvas,t=c({},this.props);delete t.canvasStyle,delete t.canvasRef,this.react3Renderer.render(h.default.createElement("react3",c({},t,{onRecreateCanvas:this._onRecreateCanvas}),this.props.children),e)}},{key:"render",value:function(){var e=this.state.canvasKey;return h.default.createElement("canvas",{ref:this._canvasRef,key:e,width:this.props.width,height:this.props.height,style:c({},this.props.canvasStyle,{width:this.props.width,height:this.props.height})})}}]),t}(h.default.Component),s.propTypes={context:w.string,width:w.number.isRequired,height:w.number.isRequired,children:w.node,canvasStyle:w.any,customRenderer:w.func,gammaInput:w.bool,gammaOutput:w.bool,sortObjects:w.bool,mainCamera:w.string,onAnimate:w.func,clearColor:w.oneOfType([(0,b.default)(v.Color),w.number,w.string]),shadowMapEnabled:w.bool,shadowMapType:w.oneOf([v.BasicShadowMap,v.PCFShadowMap,v.PCFSoftShadowMap]),shadowMapCullFace:w.oneOf([v.CullFaceNone,v.CullFaceBack,v.CullFaceFront,v.CullFaceFrontBack]),shadowMapDebug:w.bool,pixelRatio:w.number,antialias:w.oneOfType([w.bool,w.number]),canvasRef:w.func},s.defaultProps={context:"3d"},s.findTHREEObject=g.default.findTHREEObject,s.eventDispatcher=g.default.eventDispatcher,u);e.exports=x},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function i(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,i,s,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(n=this._events[e],a(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(o(n))for(s=Array.prototype.slice.call(arguments,1),c=n.slice(),i=c.length,u=0;u<i;u++)c[u].apply(this,s);return!0},n.prototype.addListener=function(e,t){var i;if(!r(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(i=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&i>0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,i,a,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],a=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(s=a;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e===t||!i(e)&&(i(t)?r(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var i=n(93);e.exports=r},function(e,t,n){"use strict";function r(e){try{e.focus()}catch(e){}}e.exports=r},function(e,t,n){"use strict";(function(t){function n(e){if(void 0===(e=e||t.document))return null;try{return e.activeElement||e.body}catch(t){return e.body}}e.exports=n}).call(t,n(131))},function(e,t,n){"use strict";function r(e){var t=e?e.ownerDocument||e:document,n=t.defaultView||window;return!(!e||!("function"==typeof n.Node?e instanceof n.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=r},function(e,t,n){"use strict";function r(e){return i(e)&&3==e.nodeType}var i=n(92);e.exports=r},function(e,t,n){"use strict";(function(t){function r(e,t,n,r){var i=void 0===e[n];null!=t&&i&&(e[n]=o(t,!0))}var i=n(20),o=n(117),a=(n(38),n(43)),s=n(44);n(4);void 0!==t&&t.env;var u={instantiateChildren:function(e,t,n,i){if(null==e)return null;var o={};return s(e,r,o),o},updateChildren:function(e,t,n,r,s,u,c,l,p){if(t||e){var h,f;for(h in t)if(t.hasOwnProperty(h)){f=e&&e[h];var d=f&&f._currentElement,m=t[h];if(null!=f&&a(d,m))i.receiveComponent(f,m,s,l),t[h]=f;else{f&&(r[h]=i.getHostNode(f),i.unmountComponent(f,!1));var v=o(m,!0);t[h]=v;var y=i.mountComponent(v,s,u,c,l,p);n.push(y)}}for(h in e)!e.hasOwnProperty(h)||t&&t.hasOwnProperty(h)||(f=e[h],r[h]=i.getHostNode(f),i.unmountComponent(f,!1))}},unmountChildren:function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];i.unmountComponent(r,t)}}};e.exports=u}).call(t,n(17))},function(e,t,n){"use strict";function r(e,t){null!=t&&("input"!==t.type&&"textarea"!==t.type&&"select"!==t.type||null==t.props||null!==t.props.value||i||(i=!0))}var i=(n(21),n(4),!1),o={onBeforeMountComponent:function(e,t){r(e,t)},onBeforeUpdateComponent:function(e,t){r(e,t)}};e.exports=o},function(e,t,n){"use strict";function r(e,t,n,r){return e===n&&t===r}function i(e){var t=document.selection,n=t.createRange(),r=n.text.length,i=n.duplicate();i.moveToElementText(e),i.setEndPoint("EndToStart",n);var o=i.text.length;return{start:o,end:o+r}}function o(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var n=t.anchorNode,i=t.anchorOffset,o=t.focusNode,a=t.focusOffset,s=t.getRangeAt(0);try{s.startContainer.nodeType,s.endContainer.nodeType}catch(e){return null}var u=r(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),c=u?0:s.toString().length,l=s.cloneRange();l.selectNodeContents(e),l.setEnd(s.startContainer,s.startOffset);var p=r(l.startContainer,l.startOffset,l.endContainer,l.endOffset),h=p?0:l.toString().length,f=h+c,d=document.createRange();d.setStart(n,i),d.setEnd(o,a);var m=d.collapsed;return{start:m?f:h,end:m?h:f}}function a(e,t){var n,r,i=document.selection.createRange().duplicate();void 0===t.end?(n=t.start,r=n):t.start>t.end?(n=t.end,r=t.start):(n=t.start,r=t.end),i.moveToElementText(e),i.moveStart("character",n),i.setEndPoint("EndToStart",i),i.moveEnd("character",r-n),i.select()}function s(e,t){if(window.getSelection){var n=window.getSelection(),r=e[l()].length,i=Math.min(t.start,r),o=void 0===t.end?i:Math.min(t.end,r);if(!n.extend&&i>o){var a=o;o=i,i=a}var s=c(e,i),u=c(e,o);if(s&&u){var p=document.createRange();p.setStart(s.node,s.offset),n.removeAllRanges(),i>o?(n.addRange(p),n.extend(u.node,u.offset)):(p.setEnd(u.node,u.offset),n.addRange(p))}}}var u=n(28),c=n(114),l=n(115),p=u.canUseDOM&&"selection"in document&&!("getSelection"in window),h={getOffsets:p?i:o,setOffsets:p?a:s};e.exports=h},function(e,t,n){"use strict";function r(e,t){null!=t&&"string"==typeof t.type&&(t.type.indexOf("-")>=0||t.props.is||o(e,t))}var i,o=(n(54),n(37),n(21),n(4),function(e,t){var n=[];for(var r in t.props){i(t.type,r,e)||n.push(r)}n.map(function(e){return"`"+e+"`"}).join(", ");1===n.length||n.length}),a={onBeforeMountComponent:function(e,t){r(e,t)},onBeforeUpdateComponent:function(e,t){r(e,t)}};e.exports=a},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var i=n(10),o=n(25),a=n(42),s=n(23),u={initialize:s,close:function(){h.isBatchingUpdates=!1}},c={initialize:s,close:o.flushBatchedUpdates.bind(o)},l=[c,u];i(r.prototype,a,{getTransactionWrappers:function(){return l}});var p=new r,h={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,i,o){var a=h.isBatchingUpdates;return h.isBatchingUpdates=!0,a?e(t,n,r,i,o):p.perform(e,null,t,n,r,i,o)}};e.exports=h},function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=r},function(e,t,n){"use strict";function r(e){i.enqueueEvents(e),i.processEventQueue(!1)}var i=n(55),o={handleTopLevel:function(e,t,n,o){r(i.extractEvents(e,t,n,o))}};e.exports=o},function(e,t,n){"use strict";var r={logTopLevelRenders:!1};e.exports=r},function(e,t,n){"use strict";var r=n(54),i=n(55),o=n(56),a=n(40),s=n(59),u=n(57),c=n(60),l=n(25),p={Component:a.injection,DOMProperty:r.injection,EmptyComponent:s.injection,EventPluginHub:i.injection,EventPluginUtils:o.injection,EventEmitter:u.injection,HostComponent:c.injection,Updates:l.injection};e.exports=p},function(e,t,n){"use strict";function r(e){return o(document.documentElement,e)}var i=n(96),o=n(89),a=n(90),s=n(91),u={hasSelectionCapabilities:function(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)},getSelectionInformation:function(){var e=s();return{focusedElem:e,selectionRange:u.hasSelectionCapabilities(e)?u.getSelection(e):null}},restoreSelection:function(e){var t=s(),n=e.focusedElem,i=e.selectionRange;t!==n&&r(n)&&(u.hasSelectionCapabilities(n)&&u.setSelection(n,i),a(n))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=i.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,r=t.end;if(void 0===r&&(r=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length);else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var o=e.createTextRange();o.collapse(!0),o.moveStart("character",n),o.moveEnd("character",r-n),o.select()}else i.setOffsets(e,t)}};e.exports=u},function(e,t,n){"use strict";function r(e,t,n){return{type:"INSERT_MARKUP",content:e,fromIndex:null,fromNode:null,toIndex:n,afterNode:t}}function i(e,t,n){return{type:"MOVE_EXISTING",content:null,fromIndex:e._mountIndex,fromNode:h.getHostNode(e),toIndex:n,afterNode:t}}function o(e,t){return{type:"REMOVE_NODE",content:null,fromIndex:e._mountIndex,fromNode:t,toIndex:null,afterNode:null}}function a(e){return{type:"SET_MARKUP",content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function s(e){return{type:"TEXT_CONTENT",content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function u(e,t){return t&&(e=e||[],e.push(t)),e}function c(e,t){p.processChildrenUpdates(e,t)}var l=n(6),p=n(40),h=(n(24),n(14),n(12),n(20)),f=n(94),d=(n(23),n(109)),m=(n(3),{Mixin:{_reconcilerInstantiateChildren:function(e,t,n){return f.instantiateChildren(e,t,n)},_reconcilerUpdateChildren:function(e,t,n,r,i,o){var a,s=0;return a=d(t,s),f.updateChildren(e,a,n,r,i,this,this._hostContainerInfo,o,s),a},mountChildren:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var i=[],o=0;for(var a in r)if(r.hasOwnProperty(a)){var s=r[a],u=0,c=h.mountComponent(s,t,this,this._hostContainerInfo,n,u);s._mountIndex=o++,i.push(c)}return i},updateTextContent:function(e){var t=this._renderedChildren;f.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&l("118");c(this,[s(e)])},updateMarkup:function(e){var t=this._renderedChildren;f.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&l("118");c(this,[a(e)])},updateChildren:function(e,t,n){this._updateChildren(e,t,n)},_updateChildren:function(e,t,n){var r=this._renderedChildren,i={},o=[],a=this._reconcilerUpdateChildren(r,e,o,i,t,n);if(a||r){var s,l=null,p=0,f=0,d=0,m=null;for(s in a)if(a.hasOwnProperty(s)){var v=r&&r[s],y=a[s];v===y?(l=u(l,this.moveChild(v,m,p,f)),f=Math.max(v._mountIndex,f),v._mountIndex=p):(v&&(f=Math.max(v._mountIndex,f)),l=u(l,this._mountChildAtIndex(y,o[d],m,p,t,n)),d++),p++,m=h.getHostNode(y)}for(s in i)i.hasOwnProperty(s)&&(l=u(l,this._unmountChild(r[s],i[s])));l&&c(this,l),this._renderedChildren=a}},unmountChildren:function(e){var t=this._renderedChildren;f.unmountChildren(t,e),this._renderedChildren=null},moveChild:function(e,t,n,r){if(e._mountIndex<r)return i(e,t,n)},createChild:function(e,t,n){return r(n,t,e._mountIndex)},removeChild:function(e,t){return o(e,t)},_mountChildAtIndex:function(e,t,n,r,i,o){return e._mountIndex=r,this.createChild(e,n,t)},_unmountChild:function(e,t){var n=this.removeChild(e,t);return e._mountIndex=null,n}}});e.exports=m},function(e,t,n){"use strict";function r(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)}var i=n(6),o=(n(3),{addComponentAsRefTo:function(e,t,n){r(n)||i("119"),n.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,n){r(n)||i("120");var o=n.getPublicInstance();o&&o.refs[t]===e.getPublicInstance()&&n.detachRef(t)}});e.exports=o},function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=o.getPooled(null),this.useCreateElement=e}var i=n(10),o=n(53),a=n(39),s=n(57),u=n(103),c=(n(14),n(42)),l=n(63),p={initialize:u.getSelectionInformation,close:u.restoreSelection},h={initialize:function(){var e=s.isEnabled();return s.setEnabled(!1),e},close:function(e){s.setEnabled(e)}},f={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},d=[p,h,f],m={getTransactionWrappers:function(){return d},getReactMountReady:function(){return this.reactMountReady},getUpdateQueue:function(){return l},checkpoint:function(){return this.reactMountReady.checkpoint()},rollback:function(e){this.reactMountReady.rollback(e)},destructor:function(){o.release(this.reactMountReady),this.reactMountReady=null}};i(r.prototype,c,m),a.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";var r={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){r.currentScrollLeft=e.x,r.currentScrollTop=e.y}};e.exports=r},function(e,t,n){"use strict";function r(e,t){return null==t&&i("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}var i=n(6);n(3);e.exports=r},function(e,t,n){"use strict";(function(t){function r(e,t,n,r){if(e&&"object"==typeof e){var i=e,o=void 0===i[n];o&&null!=t&&(i[n]=t)}}function i(e,t){if(null==e)return e;var n={};return o(e,r,n),n}var o=(n(38),n(44));n(4);void 0!==t&&t.env,e.exports=i}).call(t,n(17))},function(e,t,n){"use strict";function r(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}e.exports=r},function(e,t,n){"use strict";function r(e){for(var t;(t=e._renderedNodeType)===i.COMPOSITE;)e=e._renderedComponent;return t===i.HOST?e._renderedComponent:t===i.EMPTY?null:void 0}var i=n(61);e.exports=r},function(e,t,n){"use strict";function r(e){var t=e&&(i&&e[i]||e[o]);if("function"==typeof t)return t}var i="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";e.exports=r},function(e,t,n){"use strict";function r(){return i++}var i=1;e.exports=r},function(e,t,n){"use strict";function r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function i(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function o(e,t){for(var n=r(e),o=0,a=0;n;){if(3===n.nodeType){if(a=o+n.textContent.length,o<=t&&a>=t)return{node:n,offset:t-o};o=a}n=r(i(n))}}e.exports=o},function(e,t,n){"use strict";function r(){return!o&&i.canUseDOM&&(o="textContent"in document.documentElement?"textContent":"innerText"),o}var i=n(28),o=null;e.exports=r},function(e,t,n){"use strict";function r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function i(e){if(s[e])return s[e];if(!a[e])return e;var t=a[e];for(var n in t)if(t.hasOwnProperty(n)&&n in u)return s[e]=t[n];return""}var o=n(28),a={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},s={},u={};o.canUseDOM&&(u=document.createElement("div").style,"AnimationEvent"in window||(delete a.animationend.animation,delete a.animationiteration.animation,delete a.animationstart.animation),"TransitionEvent"in window||delete a.transitionend.transition),e.exports=i},function(e,t,n){"use strict";function r(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}function i(e){return"function"==typeof e&&void 0!==e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function o(e,t){var n;if(null===e||e===!1)n=c.create(o);else if("object"==typeof e){var s=e;(!s||"function"!=typeof s.type&&"string"!=typeof s.type)&&a("130",null==s.type?s.type:typeof s.type,r(s._owner)),"string"==typeof s.type?n=l.createInternalComponent(s):i(s.type)?(n=new s.type(s),n.getHostNode||(n.getHostNode=n.getNativeNode)):n=new p(s)}else"string"==typeof e||"number"==typeof e?n=l.createInstanceForText(e):a("131",typeof e);return n._mountIndex=0,n._mountImage=null,n}var a=n(6),s=n(10),u=n(58),c=n(59),l=n(60),p=(n(113),n(3),n(4),function(e){this.construct(e)});s(p.prototype,u,{_instantiateReactComponent:o}),e.exports=o},function(e,t,n){"use strict";/** | |
| * Checks if an event is supported in the current execution environment. | |
| * | |
| * NOTE: This will not work correctly for non-generic events such as `change`, | |
| * `reset`, `load`, `error`, and `select`. | |
| * | |
| * Borrows from Modernizr. | |
| * | |
| * @param {string} eventNameSuffix Event name, e.g. "click". | |
| * @param {?boolean} capture Check if the capture phase is supported. | |
| * @return {boolean} True if the event is supported. | |
| * @internal | |
| * @license Modernizr 3.0.0pre (Custom Build) | MIT | |
| */ | |
| function r(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&i&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var i,o=n(28);o.canUseDOM&&(i=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=r},function(e,t,n){"use strict";var r=n(18),i=(n(3),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),o=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},a=function(e,t,n){var r=this;if(r.instancePool.length){var i=r.instancePool.pop();return r.call(i,e,t,n),i}return new r(e,t,n)},s=function(e,t,n,r){var i=this;if(i.instancePool.length){var o=i.instancePool.pop();return i.call(o,e,t,n,r),o}return new i(e,t,n,r)},u=function(e,t,n,r,i){var o=this;if(o.instancePool.length){var a=o.instancePool.pop();return o.call(a,e,t,n,r,i),a}return new o(e,t,n,r,i)},c=function(e){var t=this;e instanceof t||r("25"),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},l=i,p=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||l,n.poolSize||(n.poolSize=10),n.release=c,n},h={addPoolingTo:p,oneArgumentPooler:i,twoArgumentPooler:o,threeArgumentPooler:a,fourArgumentPooler:s,fiveArgumentPooler:u};e.exports=h},function(e,t,n){"use strict";function r(e){return(""+e).replace(b,"$&/")}function i(e,t){this.func=e,this.context=t,this.count=0}function o(e,t,n){var r=e.func,i=e.context;r.call(i,t,e.count++)}function a(e,t,n){if(null==e)return e;var r=i.getPooled(t,n);y(e,o,r),i.release(r)}function s(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function u(e,t,n){var i=e.result,o=e.keyPrefix,a=e.func,s=e.context,u=a.call(s,t,e.count++);Array.isArray(u)?c(u,i,n,v.thatReturnsArgument):null!=u&&(m.isValidElement(u)&&(u=m.cloneAndReplaceKey(u,o+(!u.key||t&&t.key===u.key?"":r(u.key)+"/")+n)),i.push(u))}function c(e,t,n,i,o){var a="";null!=n&&(a=r(n)+"/");var c=s.getPooled(t,a,i,o);y(e,u,c),s.release(c)}function l(e,t,n){if(null==e)return e;var r=[];return c(e,r,null,t,n),r}function p(e,t,n){return null}function h(e,t){return y(e,p,null)}function f(e){var t=[];return c(e,t,null,v.thatReturnsArgument),t}var d=n(119),m=n(15),v=n(23),y=n(68),g=d.twoArgumentPooler,_=d.fourArgumentPooler,b=/\/+/g;i.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},d.addPoolingTo(i,g),s.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},d.addPoolingTo(s,_);var w={forEach:a,map:l,mapIntoWithKeyPrefixInternal:c,count:h,toArray:f};e.exports=w},function(e,t,n){"use strict";function r(e){return e}function i(e,t){var n=b.hasOwnProperty(t)?b[t]:null;x.hasOwnProperty(t)&&"OVERRIDE_BASE"!==n&&h("73",t),e&&"DEFINE_MANY"!==n&&"DEFINE_MANY_MERGED"!==n&&h("74",t)}function o(e,t){if(t){"function"==typeof t&&h("75"),m.isValidElement(t)&&h("76");var n=e.prototype,r=n.__reactAutoBindPairs;t.hasOwnProperty(g)&&w.mixins(e,t.mixins);for(var o in t)if(t.hasOwnProperty(o)&&o!==g){var a=t[o],s=n.hasOwnProperty(o);if(i(s,o),w.hasOwnProperty(o))w[o](e,a);else{var l=b.hasOwnProperty(o),p="function"==typeof a,f=p&&!l&&!s&&t.autobind!==!1;if(f)r.push(o,a),n[o]=a;else if(s){var d=b[o];(!l||"DEFINE_MANY_MERGED"!==d&&"DEFINE_MANY"!==d)&&h("77",d,o),"DEFINE_MANY_MERGED"===d?n[o]=u(n[o],a):"DEFINE_MANY"===d&&(n[o]=c(n[o],a))}else n[o]=a}}}else;}function a(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var i=n in w;i&&h("78",n);var o=n in e;o&&h("79",n),e[n]=r}}}function s(e,t){e&&t&&"object"==typeof e&&"object"==typeof t||h("80");for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]&&h("81",n),e[n]=t[n]);return e}function u(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return s(i,n),s(i,r),i}}function c(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function l(e,t){var n=t.bind(e);return n}function p(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],i=t[n+1];e[r]=l(e,i)}}var h=n(18),f=n(10),d=n(30),m=n(15),v=(n(26),n(47)),y=n(29),g=(n(3),n(4),"mixins"),_=[],b={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},w={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)o(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=f({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=f({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=u(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=f({},e.propTypes,t)},statics:function(e,t){a(e,t)},autobind:function(){}},x={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e),t&&this.updater.enqueueCallback(this,t,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},M=function(){};f(M.prototype,d.prototype,x);var E={createClass:function(e){var t=r(function(e,n,r){this.__reactAutoBindPairs.length&&p(this),this.props=e,this.context=n,this.refs=y,this.updater=r||v,this.state=null;var i=this.getInitialState?this.getInitialState():null;("object"!=typeof i||Array.isArray(i))&&h("82",t.displayName||"ReactCompositeComponent"),this.state=i});t.prototype=new M,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],_.forEach(o.bind(null,t)),o(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),t.prototype.render||h("83");for(var n in b)t.prototype[n]||(t.prototype[n]=null);return t},injection:{injectMixin:function(e){_.push(e)}}};e.exports=E},function(e,t,n){"use strict";var r=n(129),i={shouldComponentUpdate:function(e,t){return r(this,e,t)}};e.exports=i},function(e,t,n){"use strict";var r=n(15),i=r.createFactory,o={a:i("a"),abbr:i("abbr"),address:i("address"),area:i("area"),article:i("article"),aside:i("aside"),audio:i("audio"),b:i("b"),base:i("base"),bdi:i("bdi"),bdo:i("bdo"),big:i("big"),blockquote:i("blockquote"),body:i("body"),br:i("br"),button:i("button"),canvas:i("canvas"),caption:i("caption"),cite:i("cite"),code:i("code"),col:i("col"),colgroup:i("colgroup"),data:i("data"),datalist:i("datalist"),dd:i("dd"),del:i("del"),details:i("details"),dfn:i("dfn"),dialog:i("dialog"),div:i("div"),dl:i("dl"),dt:i("dt"),em:i("em"),embed:i("embed"),fieldset:i("fieldset"),figcaption:i("figcaption"),figure:i("figure"),footer:i("footer"),form:i("form"),h1:i("h1"),h2:i("h2"),h3:i("h3"),h4:i("h4"),h5:i("h5"),h6:i("h6"),head:i("head"),header:i("header"),hgroup:i("hgroup"),hr:i("hr"),html:i("html"),i:i("i"),iframe:i("iframe"),img:i("img"),input:i("input"),ins:i("ins"),kbd:i("kbd"),keygen:i("keygen"),label:i("label"),legend:i("legend"),li:i("li"),link:i("link"),main:i("main"),map:i("map"),mark:i("mark"),menu:i("menu"),menuitem:i("menuitem"),meta:i("meta"),meter:i("meter"),nav:i("nav"),noscript:i("noscript"),object:i("object"),ol:i("ol"),optgroup:i("optgroup"),option:i("option"),output:i("output"),p:i("p"),param:i("param"),picture:i("picture"),pre:i("pre"),progress:i("progress"),q:i("q"),rp:i("rp"),rt:i("rt"),ruby:i("ruby"),s:i("s"),samp:i("samp"),script:i("script"),section:i("section"),select:i("select"),small:i("small"),source:i("source"),span:i("span"),strong:i("strong"),style:i("style"),sub:i("sub"),summary:i("summary"),sup:i("sup"),table:i("table"),tbody:i("tbody"),td:i("td"),textarea:i("textarea"),tfoot:i("tfoot"),th:i("th"),thead:i("thead"),time:i("time"),title:i("title"),tr:i("tr"),track:i("track"),u:i("u"),ul:i("ul"),var:i("var"),video:i("video"),wbr:i("wbr"),circle:i("circle"),clipPath:i("clipPath"),defs:i("defs"),ellipse:i("ellipse"),g:i("g"),image:i("image"),line:i("line"),linearGradient:i("linearGradient"),mask:i("mask"),path:i("path"),pattern:i("pattern"),polygon:i("polygon"),polyline:i("polyline"),radialGradient:i("radialGradient"),rect:i("rect"),stop:i("stop"),svg:i("svg"),text:i("text"),tspan:i("tspan")};e.exports=o},function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=u,this.updater=n||s}function i(){}var o=n(10),a=n(30),s=n(47),u=n(29);i.prototype=a.prototype,r.prototype=new i,r.prototype.constructor=r,o(r.prototype,a.prototype),r.prototype.isPureReactComponent=!0,e.exports=r},function(e,t,n){"use strict";e.exports="15.4.0"},function(e,t,n){"use strict";(function(t){function r(e,t,n,r,u,c){for(var l in e)if(e.hasOwnProperty(l)){var p;try{"function"!=typeof e[l]&&i("84",r||"React class",o[n],l),p=e[l](t,l,r,n,null,a)}catch(e){p=e}if(p instanceof Error&&!(p.message in s)){s[p.message]=!0}}}var i=n(18),o=n(26),a=n(65);n(3),n(4);void 0!==t&&t.env;var s={};e.exports=r}).call(t,n(17))},function(e,t,n){"use strict";(function(t){function r(e,t,n,r){if(e&&"object"==typeof e){var i=e,o=void 0===i[n];o&&null!=t&&(i[n]=t)}}function i(e,t){if(null==e)return e;var n={};return o(e,r,n),n}var o=(n(45),n(68));n(4);void 0!==t&&t.env,e.exports=i}).call(t,n(17))},function(e,t,n){"use strict";function r(e){return o.isValidElement(e)||i("143"),e}var i=n(18),o=n(15);n(3);e.exports=r},function(e,t,n){"use strict";function r(e,t,n){return!i(e.props,t)||!i(e.state,n)}var i=n(52);e.exports=r},function(e,t,n){"use strict";e.exports=n(46)},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){window.deps={react3:n(87)},window.React3=window.deps.react3},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=n(208),a=r(o),s=n(194),u=r(s),c=n(214),l=r(c),p=n(206),h=r(p),f=n(9),d=r(f),m=n(198),v=r(m),y=n(196),g=r(y),_=n(197),b=r(_),w=n(195),x=r(w),M=n(34),E=r(M),O=n(203),P=r(O),T=n(204),S=r(T),C=n(205),R=r(C),A=n(207),j=r(A),L=n(175),D=r(L),I=n(176),k=r(I),N=n(179),U=r(N),F=n(178),B=r(F),z=n(177),G=r(z),H=n(210),V=r(H),W=n(81),X=r(W),q=n(211),Y=r(q),Z=n(213),Q=r(Z),J=n(212),K=r(J),$=n(150),ee=r($),te=n(144),ne=r(te),re=n(143),ie=r(re),oe=n(169),ae=r(oe),se=n(154),ue=r(se),ce=n(155),le=r(ce),pe=n(156),he=r(pe),fe=n(157),de=r(fe),me=n(151),ve=r(me),ye=n(153),ge=r(ye),_e=n(170),be=r(_e),we=n(146),xe=r(we),Me=n(145),Ee=r(Me),Oe=n(158),Pe=r(Oe),Te=n(147),Se=r(Te),Ce=n(152),Re=r(Ce),Ae=n(172),je=r(Ae),Le=n(173),De=r(Le),Ie=n(149),ke=r(Ie),Ne=n(174),Ue=r(Ne),Fe=n(148),Be=r(Fe),ze=n(171),Ge=r(ze),He=n(159),Ve=r(He),We=n(167),Xe=r(We),qe=n(165),Ye=r(qe),Ze=n(164),Qe=r(Ze),Je=n(162),Ke=r(Je),$e=n(166),et=r($e),tt=n(160),nt=r(tt),rt=n(161),it=r(rt),ot=n(163),at=r(ot),st=n(168),ut=r(st),ct=n(188),lt=r(ct),pt=n(182),ht=r(pt),ft=n(186),dt=r(ft),mt=n(184),vt=r(mt),yt=n(187),gt=r(yt),_t=n(79),bt=r(_t),wt=n(189),xt=r(wt),Mt=n(191),Et=r(Mt),Ot=n(209),Pt=r(Ot),Tt=n(193),St=r(Tt),Ct=n(192),Rt=r(Ct),At=n(180),jt=r(At),Lt=n(181),Dt=r(Lt),It=n(183),kt=r(It),Nt=n(185),Ut=r(Nt),Ft=n(190),Bt=r(Ft),zt=n(201),Gt=r(zt),Ht=n(200),Vt=r(Ht),Wt=n(199),Xt=r(Wt),qt=n(202),Yt=r(qt),Zt=function e(t){i(this,e),this.react3RendererInstance=t,this.descriptors={react3:new a.default(t),module:new u.default(t),viewport:new l.default(t),scene:new h.default(t),object3D:new d.default(t),group:new v.default(t),orthographicCamera:new g.default(t),perspectiveCamera:new b.default(t),cubeCamera:new x.default(t),mesh:new E.default(t),line:new P.default(t),lineSegments:new S.default(t),points:new R.default(t),sprite:new j.default(t),meshBasicMaterial:new ht.default(t),meshPhongMaterial:new dt.default(t),meshLambertMaterial:new vt.default(t),meshStandardMaterial:new gt.default(t),pointsMaterial:new lt.default(t),shaderMaterial:new bt.default(t),rawShaderMaterial:new xt.default(t),lineBasicMaterial:new jt.default(t),lineDashedMaterial:new Dt.default(t),meshDepthMaterial:new kt.default(t),meshNormalMaterial:new Ut.default(t),spriteMaterial:new Bt.default(t),texture:new Et.default(t),geometry:new ee.default(t),bufferGeometry:new ne.default(t),boxGeometry:new ie.default(t),sphereGeometry:new ae.default(t),parametricGeometry:new ue.default(t),planeBufferGeometry:new le.default(t),planeGeometry:new he.default(t),polyhedronGeometry:new de.default(t),icosahedronGeometry:new ve.default(t),octahedronGeometry:new ge.default(t),tetrahedronGeometry:new be.default(t),circleGeometry:new xe.default(t),circleBufferGeometry:new Ee.default(t),ringGeometry:new Pe.default(t),cylinderGeometry:new Se.default(t),latheGeometry:new Re.default(t),torusGeometry:new je.default(t),torusKnotGeometry:new De.default(t),extrudeGeometry:new ke.default(t),tubeGeometry:new Ue.default(t),dodecahedronGeometry:new Be.default(t),textGeometry:new Ge.default(t),shapeGeometry:new Ve.default(t),shape:new Xe.default(t),moveTo:new Ye.default(t),lineTo:new Qe.default(t),bezierCurveTo:new Ke.default(t),quadraticCurveTo:new et.default(t),absArc:new nt.default(t),absEllipse:new it.default(t),hole:new at.default(t),splineThru:new ut.default(t),ambientLight:new D.default(t),directionalLight:new k.default(t),spotLight:new U.default(t),pointLight:new B.default(t),hemisphereLight:new G.default(t),resources:new V.default(t),materialResource:new Pt.default(t),geometryResource:new X.default(t),shapeGeometryResource:new Y.default(t),textureResource:new Q.default(t),shapeResource:new K.default(t),uniforms:new St.default(t),uniform:new Rt.default(t),cameraHelper:new Gt.default(t),axisHelper:new Vt.default(t),arrowHelper:new Xt.default(t),gridHelper:new Yt.default(t)}};e.exports=Zt},function(e,t,n){"use strict";(function(t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){return e}function s(e,t){console.log("deleteListener",e,t)}function u(e,t,n,r){console.log("enqueuePutListener",e,t,n,r)}function c(e,t,n){e.splice(n,0,e.splice(t,1)[0])}var l,p,h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(2),d=r(f),m=n(85),v=r(m),y=n(127),g=r(y),_=n(12),b=(r(_),n(15)),w=r(b),x=n(14),M=(r(x),n(20)),E=r(M),O=n(104),P=r(O),T=n(62),S=r(T),C=n(70),R=r(C),A=n(51),j=r(A),L=n(72),D=r(L),I=n(71),k=r(I),N=function e(){var t=this;o(this,e),this.wantRemount=!1,this.onTrigger=function(){},this.trigger=function(){t.wantRemount=!0,t.onTrigger()}},U={},F=(v.default,v.default,function(e){return e.threeObject}),B=P.default.Mixin,z=(p=l=function(){function e(n,r){var i=this;o(this,e),this.updateChildren=B.updateChildren.bind(this),this._mountChildAtIndex=B._mountChildAtIndex.bind(this),this._unmountChild=B._unmountChild.bind(this),this.unmountChildren=B.unmountChildren.bind(this),this._currentElement=n,this._react3RendererInstance=r,this._elementType=n.type,this._renderedChildren=[],this._hostMarkup=null,this._hostParent=null,this._rootNodeID=0,this._hostID=0,this._hostContainerInfo=null,this._threeObject=null,this._topLevelWrapper=null,this._markup=null,this._nodeWithLegacyProperties=null,this._forceRemountOfComponent=!1,this._flags=0,this.threeElementDescriptor=r.threeElementDescriptors[n.type],this.threeElementDescriptor||(0,d.default)(!1),"true"===t.env.ENABLE_REACT_ADDON_HOOKS&&(this.highlightComponent=function(){i.threeElementDescriptor.highlight(i._threeObject)},this.hideHighlight=function(){i.threeElementDescriptor.hideHighlight(i._threeObject)}),this.remountTrigger=new N,this.remountTrigger.onTrigger=function(){i._forceRemountOfComponent=!0}}return h(e,[{key:"getHostMarkup",value:function(){return this._markup}},{key:"getHostNode",value:function(){return this._markup}},{key:"mountComponent",value:function(e,t,n,r){var o;this._rootNodeID=this._react3RendererInstance.globalIdCounter++,this._hostID=n._idCounter++,this._hostParent=t,this._hostContainerInfo=n;var a=this._currentElement;this._threeObject=this.threeElementDescriptor.construct(a.props),this.threeElementDescriptor.applyInitialProps(this._threeObject,a.props),this.threeElementDescriptor.placeRemountTrigger(this._threeObject,this.remountTrigger.trigger);var s=a.props.children,u=void 0;u=s?this.mountChildren(s,e,r):[];var c=(o={},i(o,j.default,this._hostID),i(o,"_rootInstance",null),i(o,"elementType",a.type),i(o,"threeObject",this._threeObject),i(o,"parentMarkup",null),i(o,"childrenMarkup",u),i(o,"toJSON",function(){return"---MARKUP---"}),o);(0,d.default)(!!this._threeObject.userData),Object.assign(this._threeObject.userData,{object3D:this._threeObject,react3internalComponent:this,toJSON:function(){return"---USERDATA---"},markup:c});var l=this._react3RendererInstance.threeElementDescriptors;if(u&&u.length>0){this.threeElementDescriptor.addChildren(this._threeObject,u.map(F));for(var p=0;p<u.length;++p){var h=u[p],f=l[h.elementType];h.parentMarkup=c,f.setParent(h.threeObject,this._threeObject)}}return this._markup=c,k.default.precacheMarkup(this,this._markup),this._flags|=R.default.hasCachedChildMarkups,c}},{key:"_reconcilerInstantiateChildren",value:function(e,t,n){return this._react3RendererInstance.instantiateChildren(e,t,n,0)}},{key:"_reconcilerUpdateChildren",value:function(e,t,n,r,i,o){var a=void 0,s=0;return a=(0,g.default)(t,s),this._react3RendererInstance.updateChildren(e,a,n,r,i,this,this._hostContainerInfo,o,s),a}},{key:"mountChildren",value:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var i=[],o=0;if(r)for(var a=Object.keys(r),s=0;s<a.length;++s){var u=a[s],c=r[u],l=0,p=E.default.mountComponent(c,t,this,this._hostContainerInfo,n,l);c._mountIndex=o,i.push(p),o++}return i}},{key:"moveChild",value:function(e,t,n){if(e._mountIndex!==t){this.threeElementDescriptor.moveChild(this._threeObject,e._threeObject,t,e._mountIndex);c(this._markup.childrenMarkup,n,t)}}},{key:"receiveComponent",value:function(e,t,n){var r=this._currentElement;this._currentElement=e,this.updateComponent(t,r,e,n),this._forceRemountOfComponent&&(this._currentElement=null)}},{key:"updateComponent",value:function(e,t,n,r){var i=t.props,o=this._currentElement.props;t.type!==n.type&&(0,d.default)(!1),this._updateObjectProperties(i,o,e,r),this._forceRemountOfComponent||this._updateChildrenObjects(o,e,a(r))}},{key:"_updateChildrenObjects",value:function(e,t,n){var r=e.children||null;this.updateChildren(r,t,n)}},{key:"_updateObjectProperties",value:function(e,t,n){var r=this.remountTrigger;r.wantRemount=!1,this.threeElementDescriptor.beginPropertyUpdates(this._threeObject,t);for(var i=Object.keys(e),o=0;o<i.length;++o){var a=i[o];if(!t.hasOwnProperty(a)&&"children"!==a){if(r.wantRemount)break;U.hasOwnProperty(a)?e[a]&&s(this._rootNodeID,a):this.threeElementDescriptor.deleteProperty(this._threeObject,a)}}for(var c=Object.keys(t),l=0;l<c.length;++l){var p=c[l];if("children"!==p){if(r.wantRemount)break;var h=t[p],f=e[p];h!==f&&(U.hasOwnProperty(p)?h?u(this._rootNodeID,p,h,n):f&&s(this._rootNodeID,p):this.threeElementDescriptor.updateProperty(this._threeObject,p,h))}}this.threeElementDescriptor.completePropertyUpdates(this._threeObject)}},{key:"_removeAllChildRefs",value:function(){var e=this._renderedChildren;if(e)for(var t=Object.keys(e),n=0;n<t.length;++n){var r=t[n],i=e[r];i&&i._currentElement&&i._currentElement.ref&&(S.default.detachRefs(i,i._currentElement),i._currentElement=w.default.cloneElement(i._currentElement,{ref:null})),i._removeAllChildRefs()}}},{key:"unmountComponent",value:function(e){if(null!==this._threeObject&&this.threeElementDescriptor.componentWillUnmount(this._threeObject),this._forceRemountOfComponent&&this._removeAllChildRefs(),this.unmountChildren(e),k.default.uncacheMarkup(this),null!==this._threeObject&&this.threeElementDescriptor.unmount(this._threeObject),this._markup=null,this._rootNodeID=0,this._nodeWithLegacyProperties){this._nodeWithLegacyProperties._reactInternalComponent=null,this._nodeWithLegacyProperties=null}}},{key:"emptyJson",value:function(){return"..."}},{key:"getPublicInstance",value:function(){return this._markup.threeObject}},{key:"_updateChildren",value:function(e,t,n){var r=this._renderedChildren,i={},o=[],a=this._reconcilerUpdateChildren(r,e,o,i,t,n);if(a||r){var s=this.remountTrigger;s.wantRemount=!1,this.threeElementDescriptor.beginChildUpdates(this._threeObject);var u=0,c=0,l=0;if(a)for(var p=Object.keys(a),h=0;h<p.length;++h){var f=p[h];if(!s.wantRemount){var m=r&&r[f],v=a[f];if(m===v)this.moveChild(m,u,c),c=Math.max(m._mountIndex,c),m._mountIndex=u;else{if(m){c=Math.max(m._mountIndex,c);var y=i[f];(0,d.default)(!!y,"Removed markup map should contain this child"),delete i[f],this._unmountChild(m,y)}s.wantRemount||(this._mountChildAtIndex(v,o[l],null,u,t,n),l++)}u++}}for(var g=Object.keys(i),_=0;_<g.length;++_){var b=g[_];this._unmountChild(r[b],i[b])}this._renderedChildren=a,this.threeElementDescriptor.completeChildUpdates(this._threeObject)}}},{key:"createChild",value:function(e,t,n){var r=e._mountIndex;this._markup.childrenMarkup.splice(r,0,n),n.parentMarkup=this._markup,this.threeElementDescriptor.addChild(this._threeObject,n.threeObject,r),this._react3RendererInstance.threeElementDescriptors[n.elementType].setParent(n.threeObject,this._threeObject)}},{key:"removeChild",value:function(t,n){this.threeElementDescriptor.removeChild(this._threeObject,n.threeObject),t instanceof e?t.threeElementDescriptor.removedFromParent(n.threeObject):t instanceof D.default?n.threeObject.userData.react3internalComponent.threeElementDescriptor.removedFromParent(n.threeObject):(0,d.default)(!1);for(var r=this._markup.childrenMarkup,i=0;i<r.length;i++){var o=r[i];if(o.threeObject===n.threeObject)return r.splice(i,1),void delete o.parentMarkup}(0,d.default)(!1)}}]),e}(),l.displayName="React3Component",p);e.exports=z}).call(t,n(17))},function(e,t,n){"use strict";function r(e,t){return{_topLevelWrapper:e,_idCounter:1}}e.exports=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),u=(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);t.default=e,t}(s),n(16)),c=function(e){return e&&e.__esModule?e:{default:e}}(u),l=function(e){function t(e,n,o,a,s,u){r(this,t);var c=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return c.x=e,c.y=n,c.radius=o,c.startAngle=a,c.endAngle=s,c.clockwise=u,c}return o(t,e),a(t,[{key:"performAction",value:function(e){e.absarc(this.x,this.y,this.radius,this.startAngle,this.endAngle,this.clockwise)}}]),t}(c.default);e.exports=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),u=(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);t.default=e,t}(s),n(16)),c=function(e){return e&&e.__esModule?e:{default:e}}(u),l=function(e){function t(e,n,o,a,s,u,c,l){r(this,t);var p=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return p.x=e,p.y=n,p.xRadius=o,p.yRadius=a,p.startAngle=s,p.endAngle=u,p.clockwise=c,p.rotation=l,p}return o(t,e),a(t,[{key:"performAction",value:function(e){e.absellipse(this.x,this.y,this.xRadius,this.yRadius,this.startAngle,this.endAngle,this.clockwise,this.rotation)}}]),t}(c.default);e.exports=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),u=(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);t.default=e,t}(s),n(16)),c=function(e){return e&&e.__esModule?e:{default:e}}(u),l=function(e){function t(e,n,o,a,s,u){r(this,t);var c=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return c.cp1X=e,c.cp1Y=n,c.cp2X=o,c.cp2Y=a,c.aX=s,c.aY=u,c}return o(t,e),a(t,[{key:"performAction",value:function(e){e.bezierCurveTo(this.cp1X,this.cp1Y,this.cp2X,this.cp2Y,this.aX,this.aY)}}]),t}(c.default);e.exports=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),u=(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);t.default=e,t}(s),n(16)),c=function(e){return e&&e.__esModule?e:{default:e}}(u),l=function(e){function t(e,n){r(this,t);var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.x=e,o.y=n,o}return o(t,e),a(t,[{key:"performAction",value:function(e){e.lineTo(this.x,this.y)}}]),t}(c.default);e.exports=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),u=(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);t.default=e,t}(s),n(16)),c=function(e){return e&&e.__esModule?e:{default:e}}(u),l=function(e){function t(e,n){r(this,t);var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.x=e,o.y=n,o}return o(t,e),a(t,[{key:"performAction",value:function(e){e.moveTo(this.x,this.y)}}]),t}(c.default);e.exports=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),u=(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);t.default=e,t}(s),n(16)),c=function(e){return e&&e.__esModule?e:{default:e}}(u),l=function(e){function t(e,n,o,a){r(this,t);var s=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return s.cpX=e,s.cpY=n,s.x=o,s.y=a,s}return o(t,e),a(t,[{key:"performAction",value:function(e){e.quadraticCurveTo(this.cpX,this.cpY,this.x,this.y)}}]),t}(c.default);e.exports=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),u=(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);t.default=e,t}(s),n(16)),c=function(e){return e&&e.__esModule?e:{default:e}}(u),l=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.points=e,n}return o(t,e),a(t,[{key:"performAction",value:function(e){e.splineThru(this.points)}}]),t}(c.default);e.exports=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(7),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["width","height","depth"].forEach(function(e){n.hasProp(e,{type:p.default.number.isRequired,update:n.triggerRemount,default:1})}),["widthSegments","heightSegments","depthSegments"].forEach(function(e){n.hasProp(e,{type:p.default.number,update:n.triggerRemount,default:1})}),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.width,n=e.height,r=e.depth,i=e.widthSegments,o=e.heightSegments,a=e.depthSegments;return new c.BoxGeometry(t,n,r,i,o,a)}}]),t}(f.default);e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(7),f=r(h),d=n(5),m=r(d),v=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["vertices","colors","faceVertexUvs","faces","dynamic"].forEach(function(e){n.removeProp(e)}),["position","normal","color"].forEach(function(e){n.hasProp(e,{type:p.default.oneOfType([(0,m.default)(c.BufferAttribute),(0,m.default)(c.InterleavedBufferAttribute)]),update:function(t,n){n?t.addAttribute(e,n):t.removeAttribute(e)},updateInitial:!0,default:void 0})}),n.hasProp("index",{type:p.default.oneOfType([(0,m.default)(c.BufferAttribute),(0,m.default)(c.InterleavedBufferAttribute)]),update:function(e,t){e.setIndex(t)},updateInitial:!0,default:void 0}),n}return a(t,e),s(t,[{key:"construct",value:function(){return new c.BufferGeometry}}]),t}(f.default);e.exports=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(50),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["radius","segments","thetaStart","thetaLength"].forEach(function(e){n.hasProp(e,{type:p.default.number,update:n.updateCacheAndReplace.bind(n,e),default:void 0})}),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.radius,n=e.segments,r=e.thetaStart,i=e.thetaLength;return new c.CircleBufferGeometry(t,n,r,i)}}]),t}(f.default);e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(7),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["radius","segments","thetaStart","thetaLength"].forEach(function(e){n.hasProp(e,{type:p.default.number,update:n.triggerRemount,default:void 0})}),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.radius,n=e.segments,r=e.thetaStart,i=e.thetaLength;return new c.CircleGeometry(t,n,r,i)}}]),t}(f.default);e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(7),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["radiusTop","radiusBottom","height","radialSegments","heightSegments","openEnded","thetaStart","thetaLength"].forEach(function(e){n.hasProp(e,{type:p.default.number,update:n.triggerRemount,default:void 0})}),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.radiusTop,n=e.radiusBottom,r=e.height,i=e.radialSegments,o=e.heightSegments,a=e.openEnded,s=e.thetaStart,u=e.thetaLength;return new c.CylinderGeometry(t,n,r,i,o,a,s,u)}}]),t}(f.default);e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(7),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasProp("radius",{type:p.default.number,update:n.triggerRemount,default:1}),n.hasProp("detail",{type:p.default.number,update:n.triggerRemount,default:0}),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.radius,n=e.detail;return new c.DodecahedronGeometry(t,n)}}]),t}(f.default);e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},l=n(0),p=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(l),h=n(1),f=r(h),d=n(77),m=r(d),v=n(5),y=r(v),g=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.hasProp("settings",{type:f.default.any,update:function(e,t){e.userData._settings=t},updateInitial:!0,default:void 0}),["steps","amount","bevelThickness","bevelSize","bevelSegments","extrudeMaterial"].forEach(function(e){n.hasProp(e,{type:f.default.number,update:function(t,n){void 0===n?delete t.userData._options[e]:t.userData._options[e]=n,t.userData._needsToRefreshGeometry=!0},default:void 0})});var r=["bevelEnabled","extrudePath","frames"],a=[f.default.bool,(0,y.default)(p.CurvePath),f.default.shape({tangents:f.default.arrayOf((0,y.default)(p.Vector3)),normals:f.default.arrayOf((0,y.default)(p.Vector3)),binormals:f.default.arrayOf((0,y.default)(p.Vector3))})];return r.forEach(function(e,t){n.hasProp(e,{type:a[t],update:function(t,n){void 0===n?delete t.userData._options[e]:t.userData._options[e]=n,t.userData._needsToRefreshGeometry=!0},default:void 0})}),n}return a(t,e),u(t,[{key:"refreshGeometry",value:function(e){var t=e.userData._shapeCache.filter(function(e){return!!e}).concat(e.userData._shapesFromProps);e.fromGeometry(new p.ExtrudeGeometry(t,s({},e.userData._options,e.userData._settings)))}},{key:"getOptions",value:function(e){var n=c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getOptions",this).call(this,e);return["steps","amount","bevelEnabled","bevelThickness","bevelSize","bevelSegments","extrudePath","frames","extrudeMaterial"].forEach(function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n}}]),t}(m.default);e.exports=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(7),f=r(h),d=n(5),m=r(d),v=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasProp("vertices",{override:!0,type:p.default.arrayOf((0,m.default)(c.Vector3)).isRequired,update:function(e,t){e.vertices!==t&&(e.vertices=t,e.verticesNeedUpdate=!0)},updateInitial:!0,default:[]}),n}return a(t,e),s(t,[{key:"construct",value:function(){return new c.Geometry}}]),t}(f.default);e.exports=v},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(s),c=n(33),l=function(e){return e&&e.__esModule?e:{default:e}}(c),p=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),a(t,[{key:"construct",value:function(e){var t=e.radius,n=e.detail;return new u.IcosahedronGeometry(t,n)}}]),t}(l.default);e.exports=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(7),f=r(h),d=n(5),m=r(d),v=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["segments","phiStart","phiLength"].forEach(function(e){n.hasProp(e,{type:p.default.number,update:n.triggerRemount,default:void 0})}),n.hasProp("points",{type:p.default.arrayOf((0,m.default)(c.Vector2)).isRequired,update:n.triggerRemount,default:void 0}),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.points,n=e.segments,r=e.phiStart,i=e.phiLength;return new c.LatheGeometry(t,n,r,i)}}]),t}(f.default);e.exports=v},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(s),c=n(33),l=function(e){return e&&e.__esModule?e:{default:e}}(c),p=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),a(t,[{key:"construct",value:function(e){var t=e.radius,n=e.detail;return new u.OctahedronGeometry(t,n)}}]),t}(l.default);e.exports=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(7),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["slices","stacks"].forEach(function(e){n.hasProp(e,{type:p.default.number.isRequired,update:n.triggerRemount,default:void 0})}),n.hasProp("parametricFunction",{type:p.default.func.isRequired,update:n.triggerRemount,default:void 0}),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.parametricFunction,n=e.slices,r=e.stacks;return new c.ParametricGeometry(t,n,r)}}]),t}(f.default);e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(50),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["width","height"].forEach(function(e){n.hasProp(e,{type:p.default.number.isRequired,update:n.updateCacheAndReplace.bind(n,e),default:1})}),["widthSegments","heightSegments"].forEach(function(e){n.hasProp(e,{type:p.default.number,update:n.triggerRemount,default:1})}),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.width,n=e.height,r=e.widthSegments,i=e.heightSegments;return new c.PlaneBufferGeometry(t,n,r,i)}}]),t}(f.default);e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(7),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["width","height"].forEach(function(e){n.hasProp(e,{type:p.default.number.isRequired,update:n.triggerRemount,default:void 0})}),["widthSegments","heightSegments"].forEach(function(e){n.hasProp(e,{type:p.default.number,update:n.triggerRemount,default:1})}),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.width,n=e.height,r=e.widthSegments,i=e.heightSegments;return new c.PlaneGeometry(t,n,r,i)}}]),t}(f.default);e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(33),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasProp("vertices",{override:!0,type:p.default.arrayOf(p.default.number).isRequired,update:n.triggerRemount,default:void 0}),n.hasProp("indices",{type:p.default.arrayOf(p.default.number).isRequired,update:n.triggerRemount,default:void 0}),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.vertices,n=e.indices,r=e.radius,i=e.detail;return new c.PolyhedronGeometry(t,n,r,i)}}]),t}(f.default);e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(7),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["innerRadius","outerRadius","thetaSegments","phiSegments","thetaStart","thetaLength"].forEach(function(e){n.hasProp(e,{type:p.default.number,update:n.triggerRemount,default:void 0})}),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.innerRadius,n=e.outerRadius,r=e.thetaSegments,i=e.phiSegments,o=e.thetaStart,a=e.thetaLength;return new c.RingGeometry(t,n,r,i,o,a)}}]),t}(f.default);e.exports=d},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(77),p=function(e){return e&&e.__esModule?e:{default:e}}(l),h=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,[{key:"refreshGeometry",value:function(e){var t=e.userData._shapeCache.filter(function(e){return!!e}).concat(e.userData._shapesFromProps);e.fromGeometry(new c.ShapeGeometry(t,a({},e.userData._options)))}}]),t}(p.default);e.exports=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),c=r(u),l=n(19),p=r(l),h=n(136),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["x","y","radius","startAngle","endAngle"].forEach(function(e){n.hasProp(e,{type:c.default.number.isRequired,update:n.triggerRemount,default:0})}),n.hasProp("clockwise",{type:c.default.bool.isRequired,update:n.triggerRemount,default:!1}),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.x,n=e.y,r=e.radius,i=e.startAngle,o=e.endAngle,a=e.clockwise;return new f.default(t,n,r,i,o,a)}}]),t}(p.default);e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),c=r(u),l=n(19),p=r(l),h=n(137),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["x","y","xRadius","yRadius","startAngle","endAngle"].forEach(function(e){n.hasProp(e,{type:c.default.number.isRequired,update:n.triggerRemount,default:0})}),n.hasProp("clockwise",{type:c.default.bool,update:n.triggerRemount,default:!1}),n.hasProp("rotation",{type:c.default.number,update:n.triggerRemount,default:0}),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.x,n=e.y,r=e.xRadius,i=e.yRadius,o=e.startAngle,a=e.endAngle,s=e.clockwise,u=e.rotation;return new f.default(t,n,r,i,o,a,s,u)}}]),t}(p.default);e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),c=r(u),l=n(19),p=r(l),h=n(138),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["cp1X","cp1Y","cp2X","cp2Y","aX","aY"].forEach(function(e){n.hasProp(e,{type:c.default.number.isRequired,update:n.triggerRemount,default:0})}),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.cp1X,n=e.cp1Y,r=e.cp2X,i=e.cp2Y,o=e.aX,a=e.aY;return new f.default(t,n,r,i,o,a)}}]),t}(p.default);e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(2),h=r(p),f=n(78),d=r(f),m=n(75),v=r(m),y=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"construct",value:function(){return new v.default}},{key:"performChildAction",value:function(e,t){t.performAction(e.path)}},{key:"setParent",value:function(e,n){return(0,h.default)(n instanceof l.Shape,"Holes can only be added to shapes."),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setParent",this).call(this,e,n)}}]),t}(d.default);e.exports=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),c=r(u),l=n(19),p=r(l),h=n(139),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["x","y"].forEach(function(e){n.hasProp(e,{type:c.default.number.isRequired,update:n.triggerRemount,default:0})}),n}return a(t,e),s(t,[{key:"construct",value:function(e){return new f.default(e.x,e.y)}}]),t}(p.default);e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),c=r(u),l=n(19),p=r(l),h=n(140),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["x","y"].forEach(function(e){n.hasProp(e,{type:c.default.number.isRequired,update:n.triggerRemount,default:0})}),n}return a(t,e),s(t,[{key:"construct",value:function(e){return new f.default(e.x,e.y)}}]),t}(p.default);e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),c=r(u),l=n(19),p=r(l),h=n(141),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["cpX","cpY","x","y"].forEach(function(e){n.hasProp(e,{type:c.default.number.isRequired,update:n.triggerRemount,default:0})}),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.cpX,n=e.cpY,r=e.x,i=e.y;return new f.default(t,n,r,i)}}]),t}(p.default);e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(78),h=r(p),f=n(36),d=r(f),m=(0,d.default)(s=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),u(t,[{key:"construct",value:function(e){return e.hasOwnProperty("points")?new l.Shape(e.points):new l.Shape}}]),t}(h.default))||s;e.exports=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(19),f=r(h),d=n(142),m=r(d),v=n(5),y=r(v),g=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasProp("points",{type:p.default.arrayOf((0,y.default)(c.Vector2)).isRequired,update:n.triggerRemount,default:[]}),n}return a(t,e),s(t,[{key:"construct",value:function(e){return new m.default(e.points)}}]),t}(f.default);e.exports=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(50),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasProp("radius",{type:p.default.number,update:n.updateCacheAndReplace.bind(n,"radius"),default:void 0}),["widthSegments","heightSegments"].forEach(function(e){n.hasProp(e,{type:p.default.number,update:n.triggerRemount,default:void 0})}),["phiStart","phiLength","thetaStart","thetaLength"].forEach(function(e){n.hasProp(e,{type:p.default.number,update:n.updateCacheAndReplace.bind(n,e),default:void 0})}),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.radius,n=e.widthSegments,r=e.heightSegments,i=e.phiStart,o=e.phiLength,a=e.thetaStart,s=e.thetaLength;return new c.SphereBufferGeometry(t,n,r,i,o,a,s)}}]),t}(f.default);e.exports=d},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(s),c=n(33),l=function(e){return e&&e.__esModule?e:{default:e}}(c),p=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),a(t,[{key:"construct",value:function(e){var t=e.radius,n=e.detail;return new u.TetrahedronGeometry(t,n)}}]),t}(l.default);e.exports=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(7),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasProp("text",{type:p.default.string.isRequired,update:n.triggerRemount,default:"TEXT MISSING"}),n.hasProp("font",{type:p.default.instanceOf(c.Font).isRequired,update:n.triggerRemount}),n.hasProp("size",{type:p.default.number.isRequired,update:n.triggerRemount}),n.hasProp("height",{type:p.default.number,update:n.triggerRemount,default:50}),n.hasProp("curveSegments",{type:p.default.number,update:n.triggerRemount,default:12}),n.hasProp("bevelEnabled",{type:p.default.bool,update:n.triggerRemount,default:!1}),n.hasProp("bevelThickness",{type:p.default.number,update:n.triggerRemount,default:10}),n.hasProp("bevelSize",{type:p.default.number,update:n.triggerRemount,default:8}),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.text,n=e.font,r=e.size,i=e.height,o=e.curveSegments,a=e.bevelEnabled,s=e.bevelThickness,u=e.bevelSize;return new c.TextGeometry(t,{font:n,size:r,height:i,curveSegments:o,bevelEnabled:a,bevelThickness:s,bevelSize:u})}}]),t}(f.default);e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(7),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["radius","tube","radialSegments","tubularSegments","arc"].forEach(function(e){n.hasProp(e,{type:p.default.number,update:n.triggerRemount,default:void 0})}),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.radius,n=e.tube,r=e.radialSegments,i=e.tubularSegments,o=e.arc;return new c.TorusGeometry(t,n,r,i,o)}}]),t}(f.default);e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(7),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["radius","tube","tubularSegments","radialSegments","p","q","heightScale"].forEach(function(e){n.hasProp(e,{type:p.default.number,update:n.triggerRemount,default:void 0})}),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.radius,n=e.tube,r=e.tubularSegments,i=e.radialSegments,o=e.p,a=e.q,s=e.heightScale;return new c.TorusKnotGeometry(t,n,r,i,o,a,s)}}]),t}(f.default);e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(7),f=r(h),d=n(5),m=r(d),v=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasProp("path",{type:(0,m.default)(c.Curve).isRequired,update:n.triggerRemount}),n.hasProp("segments",{type:p.default.number,update:n.triggerRemount,default:64}),n.hasProp("radius",{type:p.default.number,update:n.triggerRemount,default:1}),n.hasProp("radiusSegments",{type:p.default.number,update:n.triggerRemount,default:8}),n.hasProp("closed",{type:p.default.bool,update:n.triggerRemount,default:!1}),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.path,n=e.segments,r=e.radius,i=e.radiusSegments,o=e.closed;return new c.TubeGeometry(t,n,r,i,o)}}]),t}(f.default);e.exports=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(27),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasProp("intensity",{type:p.default.number,simple:!0,default:1}),n.hasColor(),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.color,n=e.intensity;return new c.AmbientLight(t,n)}}]),t}(f.default);e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s,u,c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},p=n(0),h=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(p),f=n(1),d=r(f),m=n(27),v=r(m),y=(u=s=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasProp("intensity",{type:d.default.number,simple:!0,default:1}),n.hasProp("shadowCameraLeft",{type:d.default.number,updateInitial:!0,update:function(e,t,n){n&&(e.shadow.camera.left=t)},default:t.defaultShadowCameraLeft}),n.hasProp("shadowCameraBottom",{type:d.default.number,updateInitial:!0,update:function(e,t,n){n&&(e.shadow.camera.bottom=t)},default:t.defaultShadowCameraBottom}),n.hasProp("shadowCameraRight",{type:d.default.number,updateInitial:!0,update:function(e,t,n){n&&(e.shadow.camera.right=t)},default:t.defaultShadowCameraRight}),n.hasProp("shadowCameraTop",{type:d.default.number,updateInitial:!0,update:function(e,t,n){n&&(e.shadow.camera.top=t)},default:t.defaultShadowCameraTop}),n.hasColor(),n.hasDirection(),n}return a(t,e),c(t,[{key:"construct",value:function(e){var t=e.color,n=e.intensity,r=new h.DirectionalLight(t,n);return r.position.set(0,0,0),r}},{key:"unmount",value:function(e){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"unmount",this).call(this,e)}}]),t}(v.default),s.defaultShadowCameraLeft=-5,s.defaultShadowCameraRight=5,s.defaultShadowCameraTop=5,s.defaultShadowCameraBottom=-5,u);e.exports=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(27),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasColor("skyColor"),n.hasColor("groundColor",13421772),n.hasProp("intensity",{type:p.default.number,simple:!0,default:1}),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.skyColor,n=e.groundColor,r=e.intensity;return new c.HemisphereLight(t,n,r)}}]),t}(f.default);e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s,u,c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(0),p=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(l),h=n(1),f=r(h),d=n(27),m=r(d),v=(u=s=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasColor(),["intensity","decay"].forEach(function(e){n.hasProp(e,{type:f.default.number,simple:!0,default:1})}),n.hasProp("distance",{type:f.default.number,simple:!0,default:0}),n.hasProp("shadowCameraFov",{type:f.default.number,updateInitial:!0,update:function(e,t,n){n&&(e.shadow.camera.fov=t)},default:t.defaultShadowCameraFov}),n.hasProp("shadowCameraAspect",{type:f.default.number,updateInitial:!0,update:function(e,t,n){n&&(e.shadow.camera.aspect=t)},default:t.defaultShadowCameraAspect}),n.removeProp("lookAt"),n.removeProp("rotation"),n.removeProp("quaternion"),n}return a(t,e),c(t,[{key:"construct",value:function(e){var t=e.color,n=e.intensity,r=e.distance,i=e.decay;return new p.PointLight(t,n,r,i)}}]),t}(m.default),s.defaultShadowCameraFov=90,s.defaultShadowCameraAspect=1,u);e.exports=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(27),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=[1,0,Math.PI/3,10,1,0];return["intensity","distance","angle","exponent","decay","penumbra"].forEach(function(e,t){n.hasProp(e,{type:p.default.number,simple:!0,default:r[t]})}),n.hasProp("shadowCameraFov",{type:p.default.number,updateInitial:!0,update:function(e,t,n){n&&(e.shadow.camera.fov=t)},default:50}),n.hasColor(),n.hasDirection(),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.color,n=e.intensity,r=e.distance,i=e.angle,o=e.exponent,a=e.decay;return new c.SpotLight(t,n,r,i,o,a)}}]),t}(f.default);e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(11),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasColor(),n.hasProp("linewidth",{type:p.default.number,simple:!0,default:1}),["linecap","linejoin"].forEach(function(e){n.hasProp(e,{type:p.default.oneOf(["round"]),simple:!0,default:"round"})}),n.hasProp("fog",{type:p.default.bool,update:function(e,t,n){n&&(e.fog=t),e.needsUpdate=!0},updateInitial:!0,default:!0}),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=this.getMaterialDescription(e);return new c.LineBasicMaterial(t)}}]),t}(f.default);e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(11),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasColor(),["linewidth","scale","gapSize"].forEach(function(e){n.hasProp(e,{type:p.default.number,simple:!0,default:1})}),n.hasProp("dashSize",{type:p.default.number,simple:!0,default:3}),["linecap","linejoin"].forEach(function(e){n.hasProp(e,{type:p.default.oneOf(["round"]),simple:!0,default:"round"})}),n.hasProp("fog",{type:p.default.bool,update:function(e,t,n){n&&(e.fog=t),e.needsUpdate=!0},updateInitial:!0,default:!0}),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=this.getMaterialDescription(e);return new c.LineDashedMaterial(t)}}]),t}(f.default);e.exports=d},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(s),c=n(11),l=function(e){return e&&e.__esModule?e:{default:e}}(c),p=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasColor(),n.hasWireframe(),n.hasMap(),n.hasMap("aoMap"),n.hasMap("specularMap"),n.hasMap("alphaMap"),n.hasMap("envMap"),n}return o(t,e),a(t,[{key:"construct",value:function(e){var t=this.getMaterialDescription(e);return new u.MeshBasicMaterial(t)}}]),t}(l.default);e.exports=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(s),c=n(11),l=function(e){return e&&e.__esModule?e:{default:e}}(c),p=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasWireframe(),n.hasMap(),n.hasMap("alphaMap"),n.hasMap("displacementMap"),n}return o(t,e),a(t,[{key:"construct",value:function(e){var t=this.getMaterialDescription(e);return new u.MeshDepthMaterial(t)}}]),t}(l.default);e.exports=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(11),p=function(e){return e&&e.__esModule?e:{default:e}}(l),h=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasColor(),n.hasColor("emissive",0),n.hasWireframe(),n.hasMap(),n.hasMap("lightMap"),n.hasMap("aoMap"),n.hasMap("emissiveMap"),n.hasMap("specularMap"),n.hasMap("alphaMap"),n.hasMap("envMap"),n}return o(t,e),a(t,[{key:"construct",value:function(e){var t=this.getMaterialDescription(e);return new c.MeshLambertMaterial(t)}},{key:"getMaterialDescription",value:function(e){var n=s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getMaterialDescription",this).call(this,e);return e.hasOwnProperty("shininess")&&(n.shininess=e.shininess),e.hasOwnProperty("map")&&(n.map=e.map),n}},{key:"applyInitialProps",value:function(e,n){s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n),n.hasOwnProperty("map")||(e.map=null)}}]),t}(p.default);e.exports=h},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(s),c=n(11),l=function(e){return e&&e.__esModule?e:{default:e}}(c),p=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasWireframe(),n}return o(t,e),a(t,[{key:"construct",value:function(e){var t=this.getMaterialDescription(e);return new u.MeshNormalMaterial(t)}}]),t}(l.default);e.exports=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(1),h=r(p),f=n(11),d=r(f),m=n(5),v=r(m),y=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasColor(),n.hasColor("specular",1118481),n.hasColor("emissive",0),n.hasWireframe(),n.hasProp("shininess",{type:h.default.number,simple:!0,default:30}),n.hasProp("metal",{type:h.default.bool,update:function(e,t){e.metal=t,e.needsUpdate=!0},default:!1}),["lightMapIntensity","aoMapIntensity","emissiveIntensity","bumpScale","displacementScale","reflectivity"].forEach(function(e){n.hasProp(e,{type:h.default.number,update:function(t,n){t[e]=n,t.needsUpdate=!0},default:1})}),["displacementBias"].forEach(function(e){n.hasProp(e,{type:h.default.number,update:function(t,n){t[e]=n,t.needsUpdate=!0},default:0})}),["refractionRatio"].forEach(function(e){n.hasProp(e,{type:h.default.number,update:function(t,n){t[e]=n,t.needsUpdate=!0},default:.98})}),n.hasProp("normalScale",{type:(0,v.default)(l.Vector2),update:function(e,t){e.normalScale.copy(t),e.needsUpdate=!0},default:new l.Vector2(1,1)}),n.hasProp("shading",{type:h.default.oneOf([l.FlatShading,l.SmoothShading]),update:function(e,t){e.shading=t,e.needsUpdate=!0},default:l.SmoothShading}),["skinning","morphTargets","morphNormals"].forEach(function(e){n.hasProp(e,{type:h.default.bool,update:function(t,n){t[e]=n,t.needsUpdate=!0},default:!1})}),n.hasMap(),n.hasMap("lightMap"),n.hasMap("aoMap"),n.hasMap("emissiveMap"),n.hasMap("bumpMap"),n.hasMap("normalMap"),n.hasMap("displacementMap"),n.hasMap("specularMap"),n.hasMap("alphaMap"),n.hasMap("envMap"),n}return a(t,e),s(t,[{key:"getMaterialDescription",value:function(e){var n=u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getMaterialDescription",this).call(this,e);return["shininess","lightMapIntensity","aoMapIntensity","emissiveIntensity","bumpScale","displacementScale","reflectivity","displacementBias","refractionRatio","normalScale","shading","skinning","morphTargets","morphNormals"].forEach(function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n}},{key:"construct",value:function(e){var t=this.getMaterialDescription(e);return new l.MeshPhongMaterial(t)}}]),t}(d.default);e.exports=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(1),h=r(p),f=n(11),d=r(f),m=n(5),v=r(m),y=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasColor(),n.hasColor("emissive",0),n.hasWireframe(),["roughness","metalness"].forEach(function(e){n.hasProp(e,{type:h.default.number,simple:!0,default:.5})}),["lightMapIntensity","aoMapIntensity","emissiveIntensity","bumpScale","displacementScale"].forEach(function(e){n.hasProp(e,{type:h.default.number,update:function(t,n){t[e]=n,t.needsUpdate=!0},default:1})}),["displacementBias"].forEach(function(e){n.hasProp(e,{type:h.default.number,update:function(t,n){t[e]=n,t.needsUpdate=!0},default:0})}),["refractionRatio"].forEach(function(e){n.hasProp(e,{type:h.default.number,update:function(t,n){t[e]=n,t.needsUpdate=!0},default:.98})}),n.hasProp("normalScale",{type:(0,v.default)(l.Vector2),update:function(e,t){e.normalScale.copy(t),e.needsUpdate=!0},default:new l.Vector2(1,1)}),n.hasProp("shading",{type:h.default.oneOf([l.FlatShading,l.SmoothShading]),update:function(e,t){e.shading=t,e.needsUpdate=!0},default:l.SmoothShading}),["skinning","morphTargets","morphNormals"].forEach(function(e){n.hasProp(e,{type:h.default.bool,update:function(t,n){t[e]=n,t.needsUpdate=!0},default:!1})}),n.hasMap(),n.hasMap("lightMap"),n.hasMap("aoMap"),n.hasMap("emissiveMap"),n.hasMap("bumpMap"),n.hasMap("normalMap"),n.hasMap("displacementMap"),n.hasMap("roughnessMap"),n.hasMap("metalnessMap"),n.hasMap("alphaMap"),n.hasMap("envMap"),n}return a(t,e),s(t,[{key:"getMaterialDescription",value:function(e){var n=u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getMaterialDescription",this).call(this,e);return["roughness","metalness","lightMapIntensity","aoMapIntensity","emissiveIntensity","bumpScale","displacementScale","displacementBias","refractionRatio","normalScale","shading","skinning","morphTargets","morphNormals"].forEach(function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n}},{key:"construct",value:function(e){var t=this.getMaterialDescription(e);return new l.MeshStandardMaterial(t)}}]),t}(d.default);e.exports=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(11),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasColor(),n.hasProp("size",{type:p.default.number,simple:!0,default:1}),n.hasProp("sizeAttenuation",{type:p.default.bool,update:function(e,t,n){n&&(e.sizeAttenuation=t),e.needsUpdate=!0},updateInitial:!0,default:!0}),n.hasProp("fog",{type:p.default.bool,update:function(e,t,n){n&&(e.fog=t),e.needsUpdate=!0},updateInitial:!0,default:!0}),n.hasMap(),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=this.getMaterialDescription(e);return new c.PointsMaterial(t)}}]),t}(f.default);e.exports=d},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(s),c=n(79),l=function(e){return e&&e.__esModule?e:{default:e}}(c),p=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["alphaTest"].forEach(function(e){n.removeProp(e)}),n}return o(t,e),a(t,[{key:"construct",value:function(e){var t=this.getMaterialDescription(e);return new u.RawShaderMaterial(t)}}]),t}(l.default);e.exports=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(1),p=r(l),h=n(11),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasColor(),n.hasProp("rotation",{type:p.default.number,simple:!0,default:0}),n.hasProp("fog",{type:p.default.bool,update:function(e,t,n){n&&(e.fog=t),e.needsUpdate=!0},updateInitial:!0,default:!1}),n.hasMap(),n}return a(t,e),s(t,[{key:"construct",value:function(e){var t=this.getMaterialDescription(e);return new c.SpriteMaterial(t)}}]),t}(f.default);e.exports=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s,u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},p=n(0),h=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(p),f=n(2),d=r(f),m=n(13),v=r(m),y=n(1),g=r(y),_=n(36),b=r(_),w=n(8),x=r(w),M=n(32),E=r(M),O=n(31),P=(r(O),n(5)),T=r(P),S=(0,b.default)(s=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasProp("slot",{type:g.default.oneOf(["map","specularMap","lightMap","aoMap","emissiveMap","bumpMap","normalMap","displacementMap","roughnessMap","metalnessMap","alphaMap","envMap"]),updateInitial:!0,update:function(e,t){var r=e.userData._materialSlot;if(e.userData._materialSlot=t,e.userData.markup){var i=e.userData.markup.parentMarkup;if(i){var o=i.threeObject;o instanceof h.Material&&(n.removeFromSlotOfMaterial(o,r,e),n.addToSlotOfMaterial(o,t,e))}}},default:"map"}),n.hasProp("repeat",{type:(0,T.default)(h.Vector2),updateInitial:!0,update:function(e,t){t?e.repeat.copy(t):e.repeat.set(1,1)},default:new h.Vector2(1,1)}),n.hasProp("offset",{type:(0,T.default)(h.Vector2),updateInitial:!0,update:function(e,t){t?e.offset.copy(t):e.offset.set(0,0)},default:new h.Vector2(0,0)}),["wrapS","wrapT"].forEach(function(e){n.hasProp(e,{type:g.default.oneOf([h.RepeatWrapping,h.ClampToEdgeWrapping,h.MirroredRepeatWrapping]),updateInitial:!0,update:function(t,n){t[e]=n,t.image&&(t.needsUpdate=!0)},default:h.ClampToEdgeWrapping})}),n.hasProp("anisotropy",{type:g.default.number,updateInitial:!0,update:function(e,t){e.anisotropy=t,e.image&&(e.needsUpdate=!0)},default:1}),n.hasProp("url",{type:g.default.string.isRequired,update:n.triggerRemount,default:""}),n.hasProp("crossOrigin",{type:g.default.string,update:n.triggerRemount,default:void 0}),["onLoad","onProgress","onError"].forEach(function(e){n.hasProp(e,{type:g.default.func,update:function(){},default:void 0})}),n.hasProp("magFilter",{type:g.default.oneOf([h.LinearFilter,h.NearestFilter]),update:function(e,t){e.magFilter=t,e.image&&(e.needsUpdate=!0)},default:h.LinearFilter}),n.hasProp("minFilter",{type:g.default.oneOf([h.LinearMipMapLinearFilter,h.NearestFilter,h.NearestMipMapNearestFilter,h.NearestMipMapLinearFilter,h.LinearFilter,h.LinearMipMapNearestFilter]),update:function(e,t){e.magFilter=t,e.image&&(e.needsUpdate=!0)},default:h.LinearMipMapLinearFilter}),n}return a(t,e),c(t,[{key:"construct",value:function(e){var t=void 0;if(e.hasOwnProperty("url")){var n=new h.TextureLoader;e.hasOwnProperty("crossOrigin")&&(n.crossOrigin=e.crossOrigin);var r=void 0,i=void 0,o=void 0;e.hasOwnProperty("onLoad")&&(r=e.onLoad),e.hasOwnProperty("onProgress")&&(i=e.onProgress),e.hasOwnProperty("onError")&&(o=e.onError),t=n.load(e.url,r,i,o)}else(0,d.default)(!1,"The texture needs a url property.");return t}},{key:"setParent",value:function(e,n){if(n instanceof h.Material){var r=e.userData._materialSlot;this.addToSlotOfMaterial(n,r,e)}else n instanceof E.default?n.setValue(e):(0,d.default)(!1,"Parent of a texture is not a material nor a uniform, it needs to be one of them.");l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setParent",this).call(this,e,n)}},{key:"applyInitialProps",value:function(e,n){e.userData=u({},e.userData),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n)}},{key:"unmount",value:function(e){var n=e.userData.markup.parentMarkup.threeObject,r=e.userData._materialSlot;n instanceof h.Material?this.removeFromSlotOfMaterial(n,r,e):n instanceof E.default&&n.value===e&&n.setValue(null),e.dispose(),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"unmount",this).call(this,e)}},{key:"removeFromSlotOfMaterial",value:function(e,t,n){e[t]===n&&(e.userData["_has"+t+"}TextureChild"]=!1,e.userData["_"+t+"}Property"]?e[t]=e.userData["_"+t+"}Property"]:e[t]=null,e.needsUpdate=!0)}},{key:"addToSlotOfMaterial",value:function(e,t,n){if(e.userData["_has"+t+"}TextureChild"]=!0,e.userData["_"+t+"}Property"]){var r="texture";"map"!==t&&(r+="with a '"+t+"' slot"),(0,v.default)(!1,"The material already has a '"+t+"' property but a "+r+" is being added as a child. The child will override the property.")}e[t]!==n&&(e[t]=n)}},{key:"validateParentSlot",value:function(e,t){var n=e.userData.react3internalComponent;if(n){var r=n.threeElementDescriptor;r&&!r._supportedMaps[t]&&(0,v.default)(!1,"A texture cannot be assigned as a '"+t+"' to '"+e.type+"'")}}},{key:"highlight",value:function(e){var t=e.userData.markup.parentMarkup.threeObject;t.userData._descriptor.highlight(t)}},{key:"hideHighlight",value:function(e){var t=e.userData.markup.parentMarkup.threeObject;t.userData._descriptor.hideHighlight(t)}}]),t}(x.default))||s;e.exports=S},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(2),h=r(p),f=n(1),d=r(f),m=n(32),v=r(m),y=n(49),g=r(y),_=n(22),b=r(_),w=n(8),x=r(w),M=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n._invalidChild=function(e){return n.invalidChildInternal(e)},n.hasProp("type",{type:d.default.string.isRequired,simple:!0}),n.hasProp("value",{type:d.default.any,update:function(e,t){e.setValue(t)},default:null}),n.hasProp("name",{type:d.default.string.isRequired,update:n.triggerRemount}),n}return a(t,e),s(t,[{key:"construct",value:function(){return new v.default}},{key:"applyInitialProps",value:function(e,n){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n),(0,h.default)(n.hasOwnProperty("name"),"The <uniform/> should have a 'name' property"),e.name=n.name,e.value=n.value}},{key:"setParent",value:function(e,n){(0,h.default)(n instanceof g.default,"Parent is not a Uniform Container (<uniforms/>)");var r=e.name;u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setParent",this).call(this,e,n),n.uniforms[r]={type:e.type,value:e.value},e.userData._onValueChanged=function(e){n.uniforms[r].value=e},e.userData.events.on("valueChanged",e.userData._onValueChanged)}},{key:"addChildren",value:function(e,t){(0,h.default)(0===t.filter(this._invalidChild).length,"Uniform children can only be textures or resource references")}},{key:"addChild",value:function(e,t){this.addChildren(e,[t])}},{key:"removeChild",value:function(){}},{key:"invalidChildInternal",value:function(e){return!(e instanceof l.Texture||e instanceof b.default)}},{key:"unmount",value:function(e){e.userData.events.removeListener("valueChanged",e.userData._onValueChanged),delete e.userData._onValueChanged,u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"unmount",this).call(this,e)}},{key:"highlight",value:function(e){var t=e.userData.markup.parentMarkup.threeObject;t.userData._descriptor.highlight(t)}},{key:"getBoundingBoxes",value:function(e){var t=e.userData.markup.parentMarkup.threeObject;return t.userData._descriptor.getBoundingBoxes(t)}},{key:"hideHighlight",value:function(e){var t=e.userData.markup.parentMarkup.threeObject;t.userData._descriptor.hideHighlight(t)}}]),t}(x.default);e.exports=M},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(2),h=r(p),f=n(8),d=r(f),m=n(49),v=r(m),y=n(32),g=r(y),_=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"construct",value:function(){return new v.default}},{key:"setParent",value:function(e,n){(0,h.default)(n instanceof l.ShaderMaterial,"Parent of <uniforms/> is not a shader material"),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setParent",this).call(this,e,n),n.uniforms=e.uniforms}},{key:"addChildren",value:function(e,t){t.forEach(function(e){(0,h.default)(e instanceof g.default,"The <uniforms/> component can only have <uniform/> elements as children.")})}},{key:"highlight",value:function(e){var t=e.userData.markup.parentMarkup.threeObject;t.userData._descriptor.highlight(t)}},{key:"getBoundingBoxes",value:function(e){var t=e.userData.markup.parentMarkup.threeObject;return t.userData._descriptor.getBoundingBoxes(t)}},{key:"hideHighlight",value:function(e){var t=e.userData.markup.parentMarkup.threeObject;t.userData._descriptor.hideHighlight(t)}}]),t}(d.default);e.exports=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return e.constructor&&e.constructor.name?e.constructor.name:"<<anonymous>>"}var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},l=n(26),p=r(l),h=n(8),f=r(h),d=n(69),m=r(d),v=n(83),y=r(v),g=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=function(e,t,n,r,i){var o=p.default[r];if(!e[t])return new y.default("The "+o+" `"+i+"` is marked as required in `"+n+"`, but its value is `undefined`.");if(!(e[t].prototype instanceof m.default)){var a=s(e[t]);return new y.default("Invalid "+o+" `"+i+"` of type `"+a+"` supplied to `"+n+"`, expected subclass of `Module`.")}};return r.toString=function(){return"``` subclass of ReactThreeRenderer.Module ``` *``` required ```*"},n.hasProp("descriptor",{type:r,update:n.triggerRemount,default:void 0}),n}return a(t,e),u(t,[{key:"construct",value:function(e){return new(0,e.descriptor)}},{key:"applyInitialProps",value:function(e,n){c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n),e.setup(this.react3RendererInstance)}},{key:"unmount",value:function(e){e.dispose(),c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"unmount",this).call(this,e)}}]),t}(f.default);e.exports=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(1),h=r(p),f=n(9),d=r(f),m=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.propTypes=s({},n.propTypes,{near:h.default.number,far:h.default.number,cubeResolution:h.default.number.isRequired}),n}return a(t,e),u(t,[{key:"construct",value:function(e){return new l.CubeCamera(e.near,e.far,e.cubeResolution)}}]),t}(d.default);e.exports=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(1),h=r(p),f=n(80),d=r(f),m=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.propTypes=s({},n.propTypes,{left:h.default.number.isRequired,right:h.default.number.isRequired,top:h.default.number.isRequired,bottom:h.default.number.isRequired,near:h.default.number,far:h.default.number}),n.propUpdates=s({},n.propUpdates,{left:n._updateAndRefreshProjection.bind(n,"left"),right:n._updateAndRefreshProjection.bind(n,"right"),top:n._updateAndRefreshProjection.bind(n,"top"),bottom:n._updateAndRefreshProjection.bind(n,"bottom"),fov:n._updateFov,far:n._updateFar}),n}return a(t,e),u(t,[{key:"_updateFov",value:function(e,t){e.fov=t,e.userData._needsProjectionMatrixUpdate=!0}},{key:"_updateFar",value:function(e,t){e.far=t,e.userData._needsProjectionMatrixUpdate=!0}},{key:"construct",value:function(e){return new l.OrthographicCamera(e.left,e.right,e.top,e.bottom,e.near,e.far)}},{key:"_updateAndRefreshProjection",value:function(e,t,n){t[e]=n,t.userData._needsProjectionMatrixUpdate=!0}}]),t}(d.default);e.exports=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(1),h=r(p),f=n(80),d=r(f),m=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.propTypes=s({},n.propTypes,{fov:h.default.number,aspect:h.default.number,near:h.default.number,far:h.default.number}),n.propUpdates=s({},n.propUpdates,{aspect:n._updateAspect,fov:n._updateFov,far:n._updateFar,near:n._updateNear}),n}return a(t,e),u(t,[{key:"construct",value:function(e){return new l.PerspectiveCamera(e.fov,e.aspect,e.near,e.far)}},{key:"_updateFov",value:function(e,t){e.fov=t,e.userData._needsProjectionMatrixUpdate=!0}},{key:"_updateNear",value:function(e,t){e.near=t,e.userData._needsProjectionMatrixUpdate=!0}},{key:"_updateFar",value:function(e,t){e.far=t,e.userData._needsProjectionMatrixUpdate=!0}},{key:"_updateAspect",value:function(e,t){e.aspect=t,e.userData._needsProjectionMatrixUpdate=!0}}]),t}(d.default);e.exports=m},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(s),c=n(9),l=function(e){return e&&e.__esModule?e:{default:e}}(c),p=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),a(t,[{key:"construct",value:function(){return new u.Group}}]),t}(l.default);e.exports=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(1),h=r(p),f=n(9),d=r(f),m=n(5),v=r(m),y=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasProp("origin",{type:(0,v.default)(l.Vector3).isRequired,update:function(e,t){e.position.copy(t)},default:void 0}),n.hasProp("dir",{type:(0,v.default)(l.Vector3).isRequired,update:function(e,t){e.setDirection(t)},default:void 0}),n.hasProp("color",{type:h.default.oneOfType([(0,v.default)(l.Color),h.default.number,h.default.string]),update:function(e,t){e.setColor(t)},default:16776960}),n.hasProp("length",{type:h.default.number,update:function(e,t){e.userData.lengthProps.length=t,e.userData.lengthsChanged=!0},default:1}),n.hasProp("headLength",{type:h.default.number,update:function(e,t){e.userData.lengthProps.headLength=t,e.userData.lengthsChanged=!0},default:void 0}),n.hasProp("headWidth",{type:h.default.number,update:function(e,t){e.userData.lengthProps.headWidth=t,e.userData.lengthsChanged=!0},default:void 0}),n}return a(t,e),s(t,[{key:"beginPropertyUpdates",value:function(e){e.userData.lengthsChanged=!1}},{key:"completePropertyUpdates",value:function(e){if(e.userData.lengthsChanged){e.userData.lengthsChanged=!1;var t=e.userData.lengthProps.length,n=e.userData.lengthProps,r=n.headLength,i=n.headWidth;void 0===r&&(r=.2*t),void 0===i&&(i=.2*r),e.setLength(t,r,i)}}},{key:"applyInitialProps",value:function(e,n){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n);var r=n.length,i=n.headLength,o=n.headWidth;e.userData.lengthProps={length:r,headLength:i,headWidth:o}}},{key:"construct",value:function(e){var t=e.dir,n=e.origin,r=e.length,i=e.color,o=e.headLength,a=e.headWidth;return new l.ArrowHelper(t,n,r,i,o,a)}},{key:"unmount",value:function(e){e.line&&(e.line.geometry.dispose(),e.line.material.dispose()),e.cone&&(e.cone.geometry.dispose(),e.cone.material.dispose()),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"unmount",this).call(this,e)}}]),t}(d.default);e.exports=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(1),h=r(p),f=n(9),d=r(f),m=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasProp("size",{type:h.default.number,update:n.triggerRemount,default:1}),n}return a(t,e),s(t,[{key:"applyInitialProps",value:function(e,n){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n)}},{key:"construct",value:function(e){var t=e.size;return new l.AxisHelper(t)}},{key:"unmount",value:function(e){e.geometry.dispose(),e.material.dispose(),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"unmount",this).call(this,e)}}]),t}(d.default);e.exports=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(1),h=r(p),f=n(9),d=r(f),m=n(82),v=r(m),y=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasProp("visible",{type:h.default.bool,override:!0,update:function(e,t){e.userData._visible=t,e.visible=e.userData._hasCamera&&t},updateInitial:!0,default:!0}),n.hasProp("cameraName",{type:h.default.string.isRequired,update:function(e,t){n._clearCameraEvents(e),e.userData._cameraName=t,n._startCameraFinder(e)},default:void 0}),n}return a(t,e),s(t,[{key:"construct",value:function(){return new l.CameraHelper(new l.PerspectiveCamera)}},{key:"applyInitialProps",value:function(e,n){var r=this;u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n),e.userData._onCameraProjectionUpdate=function(){e.update()},e.userData._onCameraDispose=function(){r._startCameraFinder(e)},e.userData._onCameraRename=function(t){t.oldName===e.userData._cameraName&&r._startCameraFinder(e)},e.userData._onBeforeRender=function(){e.visible=e.userData._hasCamera&&e.userData._visible&&v.default.current!==e.userData._camera},e.userData._cameraName=n.cameraName,e.userData._visible=!n.hasOwnProperty("visible")||n.visible,e.userData.events.once("addedIntoRoot",function(){e.userData.markup._rootInstance.addBeforeRenderListener(e.userData._onBeforeRender),r._startCameraFinder(e)})}},{key:"unmount",value:function(e){return this._clearCameraEvents(e),delete e.userData._onCameraProjectionUpdate,u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"unmount",this).call(this,e)}},{key:"_getCamera",value:function(e,t){var n=null;if(t){var r=e.getObjectsByName(t).filter(function(e){return e instanceof l.Camera});r.length>0&&(n=r[0])}return n}},{key:"_clearCameraEvents",value:function(e){e.userData._hasCamera&&(e.userData._camera.userData.events.removeListener("updateProjectionMatrix",e.userData._onCameraProjectionUpdate),e.userData._camera.userData.events.removeListener("dispose",e.userData._onCameraDispose),e.userData._camera.userData.events.removeListener("rename",e.userData._onCameraRename))}},{key:"_setCamera",value:function(e,t){var n=e.userData;if(n._camera!==t){this._clearCameraEvents(e),n._hasCamera=!0,n._camera=t,e.camera=t,e.matrix=t.matrixWorld,e.update(),e.visible=n._visible;var r=e.userData._camera.userData.events;r.on("rename",n._onCameraRename),r.on("updateProjectionMatrix",n._onCameraProjectionUpdate),r.once("dispose",n._onCameraDispose)}}},{key:"_startCameraFinder",value:function(e){var t=this;this._clearCameraEvents(e);var n=e.userData.markup&&e.userData.markup._rootInstance;if(n){e.userData._hasCamera=!1,e.userData._camera=null,e.camera=new l.PerspectiveCamera,e.visible=!1;var r=this._getCamera(n,e.userData._cameraName);r?this._setCamera(e,r):function(){var r=function r(){var i=t._getCamera(n,e.userData._cameraName);i&&(n.removeAnimateListener(r),t._setCamera(e,i))};n.addAnimateListener(r)}()}}}]),t}(d.default);e.exports=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(1),h=r(p),f=n(9),d=r(f),m=n(5),v=r(m),y=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasProp("size",{type:h.default.number.isRequired,update:n.triggerRemount,default:1}),n.hasProp("step",{type:h.default.number,update:n.triggerRemount,default:1}),n.hasProp("colorCenterLine",{type:h.default.oneOfType([(0,v.default)(l.Color),h.default.number,h.default.string]),update:n.triggerRemount,default:4473924}),n.hasProp("colorGrid",{type:h.default.oneOfType([(0,v.default)(l.Color),h.default.number,h.default.string]),update:n.triggerRemount,default:8947848}),n}return a(t,e),s(t,[{key:"applyInitialProps",value:function(e,n){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n)}},{key:"construct",value:function(e){var t=e.size,n=e.step;return new l.GridHelper(t,n)}},{key:"unmount",value:function(e){e.geometry.dispose(),e.material.dispose(),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"unmount",this).call(this,e)}}]),t}(d.default);e.exports=y},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(s),c=n(34),l=function(e){return e&&e.__esModule?e:{default:e}}(c),p=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),a(t,[{key:"construct",value:function(e){var t=e.hasOwnProperty("geometry")?e.geometry:void 0,n=e.hasOwnProperty("material")?e.material:void 0,r=new u.Line(t,n);return t||(r.geometry.dispose(),r.geometry=void 0),n||(r.material.dispose(),r.material=void 0),r}}]),t}(l.default);e.exports=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(s),c=n(34),l=function(e){return e&&e.__esModule?e:{default:e}}(c),p=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),a(t,[{key:"construct",value:function(e){var t=e.hasOwnProperty("geometry")?e.geometry:void 0,n=e.hasOwnProperty("material")?e.material:void 0,r=new u.LineSegments(t,n);return t||(r.geometry.dispose(),r.geometry=void 0),n||(r.material.dispose(),r.material=void 0),r}}]),t}(l.default);e.exports=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(s),c=n(34),l=function(e){return e&&e.__esModule?e:{default:e}}(c),p=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),a(t,[{key:"construct",value:function(){var e=new u.Points;return e.geometry.dispose(),e.material.dispose(),e.geometry=void 0,e.material=void 0,e}}]),t}(l.default);e.exports=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(9),h=r(p),f=n(5),d=r(f),m=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasProp("fog",{type:(0,d.default)(l.Fog),simple:!0,default:void 0}),n}return a(t,e),s(t,[{key:"applyInitialProps",value:function(e,n){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n)}},{key:"construct",value:function(){return new l.Scene}}]),t}(h.default);e.exports=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),l=n(2),p=r(l),h=n(9),f=r(h),d=n(22),m=r(d),v=function(e){function t(){var e,n,r,a;i(this,t);for(var s=arguments.length,u=Array(s),l=0;l<s;l++)u[l]=arguments[l];return n=r=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r._invalidChild=function(e){return!(e instanceof c.SpriteMaterial||e instanceof m.default)},a=n,o(r,a)}return a(t,e),s(t,[{key:"construct",value:function(e){var t=e.hasOwnProperty("material")?e.material:void 0,n=new c.Sprite(t);return t||(n.material.dispose(),n.material=void 0),n}},{key:"addChildren",value:function(e,t){(0,p.default)(0===t.filter(this._invalidChild).length,!1)}},{key:"addChild",value:function(e,t){this.addChildren(e,[t])}},{key:"moveChild",value:function(){}}]),t}(f.default);e.exports=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(1),h=r(p),f=n(13),d=(r(f),n(2)),m=r(d),v=n(8),y=r(v),g=n(73),_=r(g),b=n(5),w=r(b),x={gammaInput:{type:h.default.bool,default:!1},gammaOutput:{type:h.default.bool,default:!1},sortObjects:{type:h.default.bool,default:!0},context:{type:h.default.oneOf(["2d","3d"]).isRequired,default:"3d"},mainCamera:{type:h.default.string,default:void 0},onAnimate:{type:h.default.func,default:void 0},clearColor:{type:h.default.oneOfType([(0,w.default)(l.Color),h.default.number,h.default.string]),default:0},clearAlpha:{type:h.default.number,default:void 0},alpha:{type:h.default.bool,default:!1},shadowMapEnabled:{type:h.default.bool,default:!1},shadowMapType:{type:h.default.oneOf([l.BasicShadowMap,l.PCFShadowMap,l.PCFSoftShadowMap]),default:l.PCFShadowMap},shadowMapCullFace:{type:h.default.oneOf([l.CullFaceNone,l.CullFaceBack,l.CullFaceFront,l.CullFaceFrontBack]),default:l.CullFaceFront},shadowMapDebug:{type:h.default.bool,default:!1},onRecreateCanvas:{type:h.default.func.isRequired,default:void 0},pixelRatio:{type:h.default.number,default:1},width:{type:h.default.number.isRequired,default:1},height:{type:h.default.number.isRequired,default:1},precision:{type:h.default.oneOf(["highp","mediump","lowp"]),default:"highp"},premultipliedAlpha:{type:h.default.bool,default:!0},antialias:{type:h.default.oneOfType([h.default.bool,h.default.number]),default:!1},stencil:{type:h.default.bool,default:!0},preserveDrawingBuffer:{type:h.default.bool,default:!1},depth:{type:h.default.bool,default:!0},logarithmicDepthBuffer:{type:h.default.bool,default:!1},onRendererUpdated:{type:h.default.func,default:void 0},forceManualRender:{type:h.default.bool,default:!1},onManualRenderTriggerCreated:{type:h.default.func,default:void 0},customRenderer:{type:h.default.func,default:void 0}},M=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return Object.keys(x).forEach(function(e){var t=x[e],r=e[0].toUpperCase()+e.substr(1),i="update"+r,o={type:t.type,update:function(e,t){e[i](t)}};t.hasOwnProperty("default")&&(o.default=t.default),n.hasProp(e,o)}),n}return a(t,e),s(t,[{key:"completePropertyUpdates",value:function(e){}},{key:"setParent",value:function(e,n){(0,m.default)(n instanceof HTMLCanvasElement,"The `react3` element can only be rendered into a canvas."),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setParent",this).call(this,e,n),e.updateCanvas(n)}},{key:"construct",value:function(e){return new _.default(e,this.react3RendererInstance)}},{key:"applyInitialProps",value:function(e,n){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n),e.initialize()}},{key:"addChildren",value:function(e,t){e.addChildren(t)}},{key:"addChild",value:function(e,t){e.addChildren([t])}},{key:"moveChild",value:function(){}},{key:"removeChild",value:function(e,t){e.removeChild(t)}},{key:"_updateOnRecreateCanvas",value:function(e,t){e.updateOnRecreateCanvas(t)}},{key:"_updateHeight",value:function(e,t){e.updateHeight(t)}},{key:"unmount",value:function(e){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"unmount",this).call(this,e),e.unmount()}},{key:"componentWillUnmount",value:function(e){return e.willUnmount(),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillUnmount",this).call(this,e)}}]),t}(y.default);e.exports=M},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(2),h=r(p),f=n(35),d=r(f),m=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"applyInitialProps",value:function(e,n){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n),n.hasOwnProperty("slot")?e.userData._propertySlot=n.slot:e.userData._propertySlot="material"}},{key:"setParent",value:function(e,n){(0,h.default)(n instanceof l.Mesh||n instanceof l.Points||n instanceof l.Line,"Parent is not a mesh"),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setParent",this).call(this,e,n)}}]),t}(d.default);e.exports=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(2),h=r(p),f=n(8),d=r(f),m=n(48),v=r(m),y=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"construct",value:function(){return new v.default}},{key:"unmount",value:function(e){var n=e.userData.markup.parentMarkup,r=n.threeObject.userData.events;e.resourceIds.forEach(function(t){r.emit("resource.removed",{id:t,distance:0,resource:e.resourceMap[t]})}),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"unmount",this).call(this,e)}},{key:"addChildren",value:function(e,t){t.forEach(function(t){var n=t.userData._resourceId;(0,h.default)(!!n),e.resourceIds.push(n),e.resourceMap[n]=t;var r=e.userData.markup.parentMarkup;r&&r.threeObject.userData.events.emit("resource.added",{id:n,distance:0,resource:t})})}},{key:"addChild",value:function(e,t){this.addChildren(e,[t])}},{key:"removeChild",value:function(e,t){var n=t.userData._resourceId;delete e.resourceIds[n];var r=e.userData.markup.parentMarkup;r&&r.threeObject.userData.events.emit("resource.removed",{id:n,distance:0,resource:t})}},{key:"setParent",value:function(e,n){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setParent",this).call(this,e,n);var r=n.userData.events;n.userData._resources=e,e.resourceIds.forEach(function(t){r.emit("resource.added",{id:t,distance:0,resource:e.resourceMap[t]})})}},{key:"highlight",value:function(e){var t=e.userData.markup.parentMarkup.threeObject;t.updateMatrixWorld&&t.traverse&&e.userData.events.emit("highlight",{uuid:e.uuid,boundingBoxFunc:function(){var e=new l.Box3;return e.setFromObject(t),[e]}})}},{key:"hideHighlight",value:function(e){e.userData.events.emit("hideHighlight")}},{key:"moveChild",value:function(){}}]),t}(d.default);e.exports=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(1),l=r(c),p=n(0),h=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(p),f=n(81),d=r(f),m=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasProp("type",{type:l.default.oneOf(["points","spacedPoints","shape"]).isRequired,update:n.triggerRemount,default:""}),n.hasProp("divisions",{type:l.default.number,update:n.triggerRemount,default:5}),n}return a(t,e),s(t,[{key:"applyInitialProps",value:function(e,n){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n),e.userData._divisions=n.divisions,e.userData._type=n.type}},{key:"applyToSlot",value:function(e,n,r){if(!r)return u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyToSlot",this).call(this,e,n,null);var i=void 0;switch(e.userData._type){case"points":i=r.createPointsGeometry();break;case"spacedPoints":i=r.createSpacedPointsGeometry(e.userData._divisions);break;case"shape":i=new h.ShapeGeometry(r)}return u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyToSlot",this).call(this,e,n,i)}}]),t}(d.default);e.exports=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(2),h=r(p),f=n(35),d=r(f),m=n(74),v=r(m),y=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"applyInitialProps",value:function(e,n){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n),e.userData._remountOnUpdate=!0}},{key:"construct",value:function(e){return new v.default(e.resourceId)}},{key:"setParent",value:function(e,n){(0,h.default)(n instanceof l.ExtrudeGeometry||n instanceof l.BufferGeometry,"Parent is not an extrude geometry"),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setParent",this).call(this,e,n)}},{key:"applyToSlot",value:function(e,t,n){e.userData.events.emit("resource.set",n)}}]),t}(d.default);e.exports=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(0),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),p=n(2),h=r(p),f=n(35),d=r(f),m=n(32),v=r(m),y=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"applyInitialProps",value:function(e,n){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyInitialProps",this).call(this,e,n),e.userData._propertySlot="map"}},{key:"applyToSlot",value:function(e,n,r){n instanceof l.Material?(u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"applyToSlot",this).call(this,e,n,r),n.dispose()):n instanceof v.default?n.setValue(r):(0,h.default)(!1,"Parent is not a material or a uniform")}},{key:"setParent",value:function(e,n){n instanceof l.Material?u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setParent",this).call(this,e,n):n instanceof v.default?(e.userData._propertySlot="value",u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setParent",this).call(this,e,n)):(0,h.default)(!1,"Parent is not a material or a uniform")}}]),t}(d.default);e.exports=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),c=r(u),l=n(76),p=r(l),h=n(8),f=r(h),d=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["x","y","width","height"].forEach(function(e){n.hasProp(e,{type:c.default.number.isRequired,simple:!0})}),n.hasProp("cameraName",{type:c.default.string.isRequired,simple:!0}),n}return a(t,e),s(t,[{key:"construct",value:function(e){return new p.default(e)}}]),t}(f.default);e.exports=d},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(){r(this,e)}return i(e,[{key:"dispatchEvent",value:function(e,t){var n=e.userData._eventCallbacks,r=n&&n[t];if(r){for(var i=arguments.length,o=Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];r.apply(void 0,o)}}}]),e}();e.exports=o},function(e,t,n){"use strict";e.exports=function(){try{var e=document.createElement("canvas");return!(!window.WebGLRenderingContext||!e.getContext("webgl")&&!e.getContext("experimental-webgl"))}catch(e){return!1}}}]); | |
| //# sourceMappingURL=bundle.js.map |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment