自动化立体仓库 - WMS系统
#
lsh
2024-12-10 dad49ebf53f8c11042f4de06157af7e3dd6e3c3e
1
2
/*! For license information please see main.js.LICENSE.txt */
!function(){var e={26981:function(e,t,n){"use strict";n(11983);var r,i=(r=n(40115))&&r.__esModule?r:{default:r};i.default._babelPolyfill&&"undefined"!=typeof console&&console.warn&&console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning."),i.default._babelPolyfill=!0},11983:function(e,t,n){"use strict";n(16266),n(10990),n(70911),n(14160),n(6197),n(96728),n(54039),n(93568),n(78051),n(38250),n(15434),n(54952),n(96337),n(35666)},67084:function(e,t,n){"use strict";var r=n(90887);t.Z={updateVelocity:function(e,t,n){r.vec3.scale(t,t,1/n),r.vec3.add(e,e,t)},applyFriction:function(e,t,n){var i=[0,0,0];r.vec3.scale(i,e,-1),r.vec3.normalize(i,i),r.vec3.scale(i,i,t),r.vec3.add(e,e,i)},applyDrag:function(e,t){var n=[0,0,0];r.vec3.scale(n,e,-1),r.vec3.normalize(n,n),r.vec3.scale(n,n,r.vec3.length(e)*t),r.vec3.add(e,e,n)},applyHook:function(e,t,n,i,o){var a=[0,0,0];r.vec3.sub(a,e,n);var s=r.vec3.length(a)-i;r.vec3.normalize(a,a),r.vec3.scale(a,a,-1*o*s),r.vec3.add(t,t,a)}}},97355:function(e,t,n){"use strict";function r(e){return(r="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})(e)}function i(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)}}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,{Z:function(){return l}});var c=n(2212),u=n(67084).Z,l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(f,e);var t,n,r,c,l=(r=f,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=s(r);if(c){var n=s(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function f(e,t,n,r){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(i=l.call(this,e,t,n,r)).k=.02,i.d=.2,i.velocity=[0,0,0],i.acceleration=[0,0,0],i.anchor=[0,0,0],i.lookK=.02,i.lookD=.2,i.lookVelocity=[0,0,0],i.lookAcceleration=[0,0,0],i.lookAnchor=[0,0,0],i}return t=f,(n=[{key:"updatePosition",value:function(){u.applyHook(this.velocity,this.acceleration,this.anchor,0,this.k),u.applyDrag(this.acceleration,this.d),u.updateVelocity(this.velocity,this.acceleration,1)}},{key:"updateLook",value:function(){u.applyHook(this.lookVelocity,this.lookAcceleration,this.lookAnchor,0,this.lookK),u.applyDrag(this.lookAcceleration,this.lookD),u.updateVelocity(this.lookVelocity,this.lookAcceleration,1)}},{key:"render",value:function(){this.updatePosition(),this.updateLook(),this.position.set(this.velocity[0],this.velocity[1],this.velocity[2]),this.lookAt(this.lookVelocity[0],this.lookVelocity[1],this.lookVelocity[2])}}])&&i(t.prototype,n),f}(c.PerspectiveCamera)},46365:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(t,n,r,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.side=0,this.aScene=new i.Scene,this.vScene=new i.Scene,this.camera=new i.PerspectiveCamera(45,1,1,1e3),this.option={type:i.FloatType,minFilter:i.LinearFilter,magFilter:i.NearestFilter},this.acceleration=[new i.WebGLRenderTarget(0,0,this.option),new i.WebGLRenderTarget(0,0,this.option)],this.velocity=[new i.WebGLRenderTarget(0,0,this.option),new i.WebGLRenderTarget(0,0,this.option)],this.aUniforms={resolution:{type:"v2",value:new i.Vector2(document.body.clientWidth,window.innerHeight)},velocity:{type:"t",value:null},acceleration:{type:"t",value:null},time:{type:"f",value:0}},this.vUniforms={resolution:{type:"v2",value:new i.Vector2(document.body.clientWidth,window.innerHeight)},side:{type:"f",value:0},velocityInit:{type:"t",value:null},velocity:{type:"t",value:null},acceleration:{type:"t",value:null},time:{type:"f",value:0}},this.accelerationMesh=this.createMesh(this.aUniforms,t,n),this.velocityMesh=this.createMesh(this.vUniforms,r,o),this.uvs=[],this.targetIndex=0}var t,o;return t=e,(o=[{key:"init",value:function(e,t,r,o){this.side=Math.ceil(Math.sqrt(t.length/3)),this.vUniforms.side.value=this.side;for(var a=[],s=0;s<3*Math.pow(this.side,2);s+=3)null!=t[s]?(a[s+0]=t[s+0],a[s+1]=t[s+1],a[s+2]=t[s+2],this.uvs[s/3*2+0]=s/3%this.side/(this.side-1),this.uvs[s/3*2+1]=Math.floor(s/3/this.side)/(this.side-1)):(a[s+0]=0,a[s+1]=0,a[s+2]=0);if(r){var c=Object.keys(r);if(c.length)for(s=0;s<c.length;s++){for(var u=r[c[s]],l=u.array.length;l<a.length/3*u.itemSize;l++)u.array.push(0);this.accelerationMesh.geometry.setAttribute(c[s],new i.BufferAttribute(new Float32Array(u.array),u.itemSize))}}if(o){var f=Object.keys(o);if(f.length)for(s=0;s<f.length;s++){var h=o[f[s]];for(l=h.array.length;l<a.length/3*h.itemSize;l++)h.array.push(0);this.velocityMesh.geometry.setAttribute(f[s],new i.BufferAttribute(new Float32Array(h.array),h.itemSize))}}this.vUniforms.velocityInit.value=new i.DataTexture(new Float32Array(a),this.side,this.side,i.RGBFormat,i.FloatType),this.vUniforms.velocityInit.value.needsUpdate=!0;var v=new i.Mesh(new i.PlaneGeometry(2,2),new i.ShaderMaterial({uniforms:{velocity:{type:"t",value:this.vUniforms.velocityInit.value}},vertexShader:n(58679).Z,fragmentShader:n(4575).Z}));for(s=0;s<2;s++)this.acceleration[s].setSize(this.side,this.side),this.velocity[s].setSize(this.side,this.side);this.vScene.add(this.camera),this.vScene.add(v),e.setRenderTarget(this.velocity[0]),e.render(this.vScene,this.camera),e.setRenderTarget(this.velocity[1]),e.render(this.vScene,this.camera),this.vScene.remove(v),this.vScene.add(this.velocityMesh),this.aScene.add(this.accelerationMesh)}},{key:"createMesh",value:function(e,t,n){return new i.Mesh(new i.PlaneGeometry(2,2),new i.ShaderMaterial({uniforms:e,vertexShader:t,fragmentShader:n}))}},{key:"render",value:function(e,t){var n=Math.abs(this.targetIndex-1),r=this.targetIndex;this.aUniforms.acceleration.value=this.acceleration[n].texture,this.aUniforms.velocity.value=this.velocity[r].texture,e.setRenderTarget(this.acceleration[r]),e.render(this.aScene,this.camera),this.vUniforms.acceleration.value=this.acceleration[r].texture,this.vUniforms.velocity.value=this.velocity[r].texture,e.setRenderTarget(this.velocity[n]),e.render(this.vScene,this.camera),this.targetIndex=n,this.aUniforms.time.value+=t,this.vUniforms.time.value+=t}},{key:"getBufferAttributeUv",value:function(){return new i.BufferAttribute(new Float32Array(this.uvs),2)}},{key:"getCurrentVelocity",value:function(){return this.velocity[Math.abs(this.targetIndex-1)].texture}},{key:"getCurrentAcceleration",value:function(){return this.acceleration[Math.abs(this.targetIndex-1)].texture}},{key:"mergeAUniforms",value:function(e){this.aUniforms=Object.assign(this.aUniforms,e)}},{key:"mergeVUniforms",value:function(e){this.vUniforms=Object.assign(this.vUniforms,e)}},{key:"resize",value:function(e){this.aUniforms.resolution.value.set(document.body.clientWidth,window.clientHeight),this.vUniforms.resolution.value.set(document.body.clientWidth,window.clientHeight)}}])&&r(t.prototype,o),e}()},59170:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(2212),i=new r.TextureLoader;function o(e,t){var n=Object.keys(e).length,o={},a=0,s=function(){var s=c;e.hasOwnProperty(s)&&i.load(e[s],(function(e){e.repeat=r.RepeatWrapping,o[s]=e,++a>=n&&t(o)}))};for(var c in e)s()}},89813:function(e,t,n){"use strict";function r(e){e.x=e.x/document.body.clientWidth*2-1,e.y=-e.y/window.innerHeight*2+1}n.d(t,{Z:function(){return r}})},60287:function(e,t,n){"use strict";function r(){for(var e=decodeURIComponent(location.search.substring(1)).split("&"),t=0;t<e.length;t++)if(!(e[t].indexOf("sketch_id")<0)){var n=e[t].replace("sketch_id=","");switch(n=parseInt(n,10)){case 9:location.href="/sketch-threejs/sketch/attract.html";break;case 8:location.href="/sketch-threejs/sketch/hole.html";break;case 7:location.href="/sketch-threejs/sketch/metal_cube.html";break;case 6:location.href="/sketch-threejs/sketch/distort.html";break;case 5:location.href="/sketch-threejs/sketch/image_data.html";break;case 4:location.href="/sketch-threejs/sketch/gallery.html";break;case 3:location.href="/sketch-threejs/sketch/comet.html";break;case 2:location.href="/sketch-threejs/sketch/hyper_space.html";break;case 1:location.href="/sketch-threejs/sketch/fire_ball.html"}}}n.d(t,{Z:function(){return r}})},79268:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=(n(17393),function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},rotate:{type:"f",value:10*Math.random()}},this.obj=this.createObj(),this.obj.position.set(t,n,r)}var t,o;return t=e,(o=[{key:"createObj",value:function(){return new i.Mesh(new i.BoxGeometry(100,100,100),new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(38577).Z,fragmentShader:n(85458).Z,transparent:!0,wireframe:!0}))}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&r(t.prototype,o),e}())},14908:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}});var i=n(2212),o=n(17393),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0}},this.obj=this.createObj(),this.obj.position.set(0,-200,0),this.obj.rotation.set(o.radians(-90),0,0)}var t,a;return t=e,(a=[{key:"createObj",value:function(){return new i.Mesh(new i.PlaneGeometry(1024,1024,32,32),new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(72406).Z,fragmentShader:n(5860).Z,transparent:!0,wireframe:!0}))}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&r(t.prototype,a),e}()},49115:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},resolution:{type:"v2",value:new i.Vector2(document.body.clientWidth,window.innerHeight)},texture:{type:"t",value:t}},this.obj=this.createObj(t),this.time=1}var t,o;return t=e,(o=[{key:"createObj",value:function(){return new i.Mesh(new i.PlaneGeometry(2,2),new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(47925).Z,fragmentShader:n(6595).Z}))}},{key:"render",value:function(e){this.uniforms.time.value+=e*this.time}},{key:"resize",value:function(){this.uniforms.resolution.value.set(document.body.clientWidth,window.innerHeight)}}])&&r(t.prototype,o),e}()},98899:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}});var i=n(2212),o=function(e,t,n){var r=[],i=[t[0]-e[0],t[1]-e[1],t[2]-e[2]],o=[n[0]-e[0],n[1]-e[1],n[2]-e[2]];r[0]=i[1]*o[2]-i[2]*o[1],r[1]=i[2]*o[0]-i[0]*o[2],r[2]=i[0]*o[1]-i[1]*o[0];for(var a=Math.sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2],2),s=0;s<r.length;s++)r[s]=r[s]/a;return r},a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0}},this.obj=this.createObj()}var t,a;return t=e,(a=[{key:"createObj",value:function(){for(var e=new i.OctahedronGeometry(90,20),t=e.attributes.position.array,r=[],a=[],s=[],c=0;c<t.length;c+=9){var u=o([t[c+0],t[c+1],t[c+2]],[t[c+3],t[c+4],t[c+5]],[t[c+6],t[c+7],t[c+8]]);r.push(u[0],u[1],u[2],u[0],u[1],u[2],u[0],u[1],u[2]);var l=[(t[c+0]+t[c+3]+t[c+6])/3,(t[c+1]+t[c+4]+t[c+7])/3,(t[c+2]+t[c+5]+t[c+8])/3],f=.5*Math.random();a.push(l[0],l[1],l[2],l[0],l[1],l[2],l[0],l[1],l[2]),s.push(f,f,f)}var h=new Float32Array(r),v=new Float32Array(a),d=new Float32Array(s);return e.setAttribute("faceNormal",new i.BufferAttribute(h,3)),e.setAttribute("center",new i.BufferAttribute(v,3)),e.setAttribute("delay",new i.BufferAttribute(d,1)),new i.Mesh(e,new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(33821).Z,fragmentShader:n(1483).Z,transparent:!0,side:i.DoubleSide}))}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&r(t.prototype,a),e}()},68396:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0}},this.obj=this.createObj()}var t,o;return t=e,(o=[{key:"createObj",value:function(){var e=new i.OctahedronGeometry(150,20);return new i.Mesh(e,new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(14595).Z,fragmentShader:n(99133).Z,transparent:!0,side:i.DoubleSide,depthWrite:!1}))}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&r(t.prototype,o),e}()},77583:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},resolution:{type:"v2",value:new i.Vector2},texture:{type:"t",value:null}},this.obj,this.isLoaded=!1}var t,o;return t=e,(o=[{key:"loadTexture",value:function(e){var t=this;(new i.TextureLoader).load("/sketch-threejs/img/index/tex_title.png",(function(n){n.magFilter=i.NearestFilter,n.minFilter=i.NearestFilter,t.uniforms.texture.value=n,t.obj=t.createObj(),t.isLoaded=!0,e()}))}},{key:"createObj",value:function(){return new i.Mesh(new i.PlaneGeometry(256,64,40,10),new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(47807).Z,fragmentShader:n(47272).Z,transparent:!0}))}},{key:"render",value:function(e){this.isLoaded&&(this.uniforms.time.value+=e)}}])&&r(t.prototype,o),e}()},78948:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(2212),i=n(38314),o=n(93604).Z,a=n(77583).Z,s=n(98899).Z,c=n(68396).Z,u=n(14908).Z,l=n(79268).Z,f=n(49115).Z;function h(){var e=new o,t=document.getElementById("canvas-webgl"),n=new r.WebGL1Renderer({antialias:!1,canvas:t}),h=new r.WebGLRenderTarget(document.body.clientWidth,window.innerHeight),v=new r.Scene,d=new r.Scene,p=new r.OrthographicCamera(-1,1,1,-1,0,1),m=new r.PerspectiveCamera(45,document.body.clientWidth/window.innerHeight,1,1e4),y=new r.Clock,g=new a,x=new s,b=new c,w=new u,M=[new l(400,-500,200),new l(-350,-600,-50),new l(-150,-700,-150),new l(-500,-900,0),new l(100,-1100,250),new l(-100,-1200,-300),new l(150,-1500,-100)],_=new f(h.texture),S=document.getElementsByClassName("js-transition-intro"),P=function(){t.width=document.body.clientWidth,t.height=window.innerHeight,m.aspect=document.body.clientWidth/window.innerHeight,m.updateProjectionMatrix(),h.setSize(document.body.clientWidth,window.innerHeight),n.setSize(document.body.clientWidth,window.innerHeight),_.resize()};n.setSize(document.body.clientWidth,window.innerHeight),n.setClearColor(1118481,1),m.position.z=800,v.add(_.obj),g.loadTexture((function(){d.add(g.obj),d.add(x.obj),d.add(b.obj),d.add(w.obj);for(var e=0;e<M.length;e++)d.add(M[e].obj);!function(){for(var e=0;e<S.length;e++)S[e].classList.add("is-shown")}()})),y.start(),window.addEventListener("resize",i((function(){P()})),1e3),e.renderNext=function(){e.isValidSmooth()?m.position.y=.6*e.hookes.contents.velocity[1]:m.position.y=-1*e.scrollTop},P(),function e(){!function(){var e=y.getDelta();g.render(e),x.render(e),b.render(e),w.render(e);for(var t=0;t<M.length;t++)M[t].render(e);n.setRenderTarget(h),n.render(d,m),_.render(e),n.setRenderTarget(null),n.render(v,p)}(),requestAnimationFrame(e)}(),e.start()}},12390:function(e,t,n){var r,i=n(2212);n(45695),e.exports=((r=function(){this.velocity=new i.Vector2,this.acceleration=new i.Vector2,this.anchor=new i.Vector2,this.mass=1}).prototype.updateVelocity=function(){this.acceleration.divideScalar(this.mass),this.velocity.add(this.acceleration)},r.prototype.applyForce=function(e){this.acceleration.add(e)},r.prototype.applyFriction=function(e,t){var n=this.acceleration.clone();t||(t=1),n.multiplyScalar(-1),n.normalize(),n.multiplyScalar(e),this.applyForce(n)},r.prototype.applyDrag=function(e){var t=this.acceleration.clone();t.multiplyScalar(-1),t.normalize(),t.multiplyScalar(this.acceleration.length()*e),this.applyForce(t)},r.prototype.applyHook=function(e,t){var n=this.velocity.clone().sub(this.anchor),r=n.length()-e;n.normalize(),n.multiplyScalar(-1*t*r),this.applyForce(n)},r)},69338:function(e,t,n){var r,i=n(2212);n(45695),e.exports=((r=function(){this.velocity=new i.Vector3,this.acceleration=new i.Vector3,this.anchor=new i.Vector3,this.mass=1}).prototype.updateVelocity=function(){this.acceleration.divideScalar(this.mass),this.velocity.add(this.acceleration)},r.prototype.applyForce=function(e){this.acceleration.add(e)},r.prototype.applyFriction=function(e,t){var n=this.acceleration.clone();t||(t=1),n.multiplyScalar(-1),n.normalize(),n.multiplyScalar(e),this.applyForce(n)},r.prototype.applyDrag=function(e){var t=this.acceleration.clone();t.multiplyScalar(-1),t.normalize(),t.multiplyScalar(this.acceleration.length()*e),this.applyForce(t)},r.prototype.applyHook=function(e,t){var n=this.velocity.clone().sub(this.anchor),r=n.length()-e;n.normalize(),n.multiplyScalar(-1*t*r),this.applyForce(n)},r)},97719:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(2212),i=n(45695),o=n.n(i),a=n(69338),s=n.n(a);function c(e){return(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})(e)}function u(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)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(c,e);var t,n,r,i,a=(r=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(r);if(i){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return f(this,e)});function c(e,t,n,r){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(i=a.call(this,e,t,n,r)).force={position:new(s()),look:new(s())},i.up.set(0,1,0),i}return t=c,(n=[{key:"updatePosition",value:function(){this.position.copy(this.force.position.velocity)}},{key:"updateLook",value:function(){this.lookAt(this.force.look.velocity.x,this.force.look.velocity.y,this.force.look.velocity.z)}},{key:"reset",value:function(){this.setPolarCoord(),this.lookAtCenter()}},{key:"resize",value:function(e,t){this.aspect=e/t,this.updateProjectionMatrix()}},{key:"setPolarCoord",value:function(e,t,n){this.force.position.anchor.copy(o().getPolarCoord(e,t,n))}},{key:"lookAtCenter",value:function(){this.lookAt(0,0,0)}}])&&u(t.prototype,n),c}(r.PerspectiveCamera)},5097:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(2212),i=n(45695),o=n.n(i),a=n(69338),s=n.n(a);function c(e){return(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})(e)}function u(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)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(c,e);var t,n,r,i,a=(r=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(r);if(i){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return f(this,e)});function c(e,t,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(r=a.call(this,e,t,n)).force=new(s()),r}return t=c,(n=[{key:"updatePosition",value:function(){this.position.copy(this.force.velocity)}},{key:"setPolarCoord",value:function(e,t,n){this.position.copy(o().getPolarCoord(e,t,n))}}])&&u(t.prototype,n),c}(r.HemisphereLight)},42935:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(2212),i=n(45695),o=n.n(i),a=n(69338),s=n.n(a);function c(e){return(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})(e)}function u(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)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(c,e);var t,n,r,i,a=(r=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(r);if(i){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return f(this,e)});function c(e,t,n,r){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(i=a.call(this,e,t,n,r)).force=new(s()),i}return t=c,(n=[{key:"updatePosition",value:function(){this.position.copy(this.force.velocity)}},{key:"setPolarCoord",value:function(e,t,n){this.position.copy(o().getPolarCoord(e,t,n))}}])&&u(t.prototype,n),c}(r.PointLight)},33286:function(e,t,n){n(2212),n(45695);var r,i=n(69338);e.exports=(((r=function(){this.size=0,this.time=0,this.is_active=!1,i.call(this)}).prototype=Object.create(i.prototype)).constructor=r,r.prototype.init=function(e){this.velocity=e.clone(),this.anchor=e.clone(),this.acceleration.set(0,0,0),this.time=0},r.prototype.activate=function(){this.is_active=!0},r.prototype.inactivate=function(){this.is_active=!1},r)},7318:function(e,t,n){var r,i=n(2212),o=(n(45695),n(69338));e.exports=(((r=function(){this.geometry=new i.BufferGeometry,this.material=null,this.obj,o.call(this)}).prototype=Object.create(o.prototype)).constructor=r,r.prototype.init=function(e){this.material=new i.ShaderMaterial({uniforms:{color:{type:"c",value:new i.Color(16777215)},texture:{type:"t",value:e.texture}},vertexShader:e.vs,fragmentShader:e.fs,transparent:!0,depthWrite:!1,blending:e.blending}),this.geometry.setAttribute("position",new i.BufferAttribute(e.positions,3)),this.geometry.setAttribute("customColor",new i.BufferAttribute(e.colors,3)),this.geometry.setAttribute("vertexOpacity",new i.BufferAttribute(e.opacities,1)),this.geometry.setAttribute("size",new i.BufferAttribute(e.sizes,1)),this.obj=new i.Points(this.geometry,this.material),e.scene.add(this.obj)},r.prototype.updatePoints=function(){this.obj.position.copy(this.velocity),this.obj.geometry.attributes.position.needsUpdate=!0,this.obj.geometry.attributes.vertexOpacity.needsUpdate=!0,this.obj.geometry.attributes.size.needsUpdate=!0,this.obj.geometry.attributes.customColor.needsUpdate=!0},r)},45695:function(e,t,n){var r=n(2212);e.exports={getRandomInt:function(e,t){return Math.floor(Math.random()*(t-e))+e},getDegree:function(e){return e/Math.PI*180},getRadian:function(e){return e*Math.PI/180},getPolarCoord:function(e,t,n){var i=Math.cos(e)*Math.cos(t)*n,o=Math.cos(e)*Math.sin(t)*n,a=Math.sin(e)*n;return new r.Vector3(i,a,o)}}},22732:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(2212),i=n(38314),o=n.n(i),a=n(89813),s=n(46365),c=n(97719),u=n(45695),l=n.n(u);function f(){var e,t,i,u,f,h,v=document.getElementById("canvas-webgl"),d=new r.WebGL1Renderer({antialias:!0,canvas:v}),p=new r.Scene,m=new c.Z(35,window.innerWidth/window.innerHeight,1,1e4),y=(new r.Clock,1e3),g=null,x=function(){for(var e=new r.BufferGeometry,t=[],i=[],o=[],a=[],s=0;s<Math.pow(y,2);s++)t.push(0,0,0),i.push(s%y*(1/999),Math.floor(s/y)*(1/999)),o.push(l().getRandomInt(0,120)/360,.8,1),a.push(l().getRandomInt(1,100));var c=new Float32Array(t);e.setAttribute("position",new r.BufferAttribute(c,3));var u=new Float32Array(i);e.setAttribute("uv2",new r.BufferAttribute(u,2));var f=new Float32Array(o);e.setAttribute("color",new r.BufferAttribute(f,3));var h=new Float32Array(a);e.setAttribute("mass",new r.BufferAttribute(h,1));var v=new r.ShaderMaterial({uniforms:{time:{type:"f",value:0},velocity:{type:"t",value:new r.Texture},acceleration:{type:"t",value:new r.Texture}},vertexShader:n(33524).Z,fragmentShader:n(46663).Z,transparent:!0,depthWrite:!1,blending:r.AdditiveBlending});return new r.Points(e,v)}(),b=function(){v.width=window.innerWidth,v.height=window.innerHeight,m.aspect=window.innerWidth/window.innerHeight,m.updateProjectionMatrix(),d.setSize(window.innerWidth,window.innerHeight)};d.setSize(window.innerWidth,window.innerHeight),d.setClearColor(1118481,1),m.position.set(1e3,1e3,1e3),m.lookAt(new r.Vector3),e=new r.Vector2,t=new r.Vector2,i=new r.Vector2,u=function(t,n,r){e.set(t,n),(0,a.Z)(e)},f=function(e,n,r){t.set(e,n),(0,a.Z)(t),g.accelerationMesh.material.uniforms.anchor.value.copy(t)},h=function(e,t,n){i.set(e,t)},window.addEventListener("resize",o()((function(){b()})),1e3),v.addEventListener("mousedown",(function(e){e.preventDefault(),u(e.clientX,e.clientY)})),v.addEventListener("mousemove",(function(e){e.preventDefault(),f(e.clientX,e.clientY)})),v.addEventListener("mouseup",(function(e){e.preventDefault(),h(e.clientX,e.clientY)})),v.addEventListener("touchstart",(function(e){e.preventDefault(),u(e.touches[0].clientX,e.touches[0].clientY)})),v.addEventListener("touchmove",(function(e){e.preventDefault(),f(e.touches[0].clientX,e.touches[0].clientY)})),v.addEventListener("touchend",(function(e){e.preventDefault(),h(e.changedTouches[0].clientX,e.changedTouches[0].clientY)})),window.addEventListener("mouseout",(function(){event.preventDefault(),i.set(0,0),g.accelerationMesh.material.uniforms.anchor.value.set(0,0,0)})),(g=new s.Z(n(47347).Z,n(64928).Z,n(40354).Z,n(95669).Z)).init(d,function(){for(var e=[],t=0;t<Math.pow(y,2);t++){var n=l().getPolarCoord(l().getRadian(l().getRandomInt(0,360)),l().getRadian(l().getRandomInt(0,360)),l().getRandomInt(10,1e3));e.push(n.x,n.y/10,n.z)}return e}()),g.accelerationMesh.material.uniforms.anchor={type:"v2",value:new r.Vector2},p.add(x),m.force.position.anchor.set(0,15,600),m.force.look.anchor.set(0,0,0),b(),function e(){g.render(d),x.material.uniforms.time.value++,x.material.uniforms.velocity.value=g.getCurrentVelocity(),x.material.uniforms.acceleration.value=g.getCurrentAcceleration(),m.force.position.applyHook(0,.025),m.force.position.applyDrag(.2),m.force.position.updateVelocity(),m.updatePosition(),m.force.look.applyHook(0,.2),m.force.look.applyDrag(.4),m.force.look.updateVelocity(),m.updateLook(),d.setRenderTarget(null),d.render(p,m),requestAnimationFrame(e)}()}},88811:function(e,t,n){"use strict";n.d(t,{Z:function(){return ae}});var r=n(2212),i=n(38314),o=n.n(i);function a(e){return(a="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})(e)}function s(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)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(f,e);var t,n,i,o,a=(i=f,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=l(i);if(o){var n=l(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return u(this,e)});function f(e,t,n,r){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(i=a.call(this,e,t,n,r)).time=0,i.isActive=!1,i}return t=f,(n=[{key:"start",value:function(){this.aspect=1.5,this.far=1e3,this.setFocalLength(50),this.position.set(0,14,45),this.lookAt(new r.Vector3(0,-1,0)),this.isActive=!0}},{key:"update",value:function(e){!1!==this.isActive&&(this.time+=e)}},{key:"resize",value:function(e){this.aspect=e.x/e.y,this.updateProjectionMatrix()}}])&&s(t.prototype,n),f}(r.PerspectiveCamera),h=n(17393),v=n.n(h);function d(e){return(d="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})(e)}function p(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)}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=g(i);if(o){var n=g(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return y(this,e)});function s(e,t,n,r){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(i=a.call(this,e,t,n,r)).distance=0,i}return t=s,(n=[{key:"start",value:function(){this.aspect=1,this.far=1e3,this.setFocalLength(50),this.distance=30*Math.abs(2*Math.tan(v().radians(this.fov)/2))}},{key:"update",value:function(e){this.position.copy(e.position).normalize().multiplyScalar(this.distance),this.lookAt(new r.Vector3)}}])&&p(t.prototype,n),s}(r.PerspectiveCamera);function b(e){return(b="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})(e)}function w(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)}}function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e,t){return!t||"object"!==b(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var P=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&M(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=S(i);if(o){var n=S(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return _(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.TorusKnotGeometry(2,.5,60,4),n=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0},alpha:{type:"f",value:0},renderOutline:{type:"f",value:0}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform float time;\nuniform float renderOutline;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position + normal * renderOutline * 0.3, 1.0);\n\n  vPosition = mPosition.xyz;\n  vUv = uv;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"#extension GL_OES_standard_derivatives : enable\nprecision highp float;\n#define GLSLIFY 1\n\nuniform float alpha;\nuniform float renderOutline;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  // Flat Shading\n  vec3 light = normalize(vec3(-1.0, 1.0, -1.0));\n  vec3 normal = normalize(cross(dFdx(vPosition), dFdy(vPosition)));\n  float diff = dot(normal, light) * 0.5;\n\n  vec3 hsv = vec3(0.5 + alpha + diff * 0.8, 0.4, 0.8);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  vec3 color = (rgb + diff) * (1.0 - renderOutline);\n  vec3 colorOutline = vec3(1.0) * renderOutline;\n\n  gl_FragColor = vec4(color + colorOutline, 1.0);\n}\n"});return(e=a.call(this,t,n)).name="TorusKnot",e.isActive=!1,e}return t=s,(n=[{key:"start",value:function(e){this.isActive=!0,this.rotation.set(v().radians(360*Math.random()),v().radians(360*Math.random()),v().radians(360*Math.random())),this.material.uniforms.alpha.value=e}},{key:"update",value:function(e,t){!1!==this.isActive&&(this.rotation.set(this.rotation.x+e,this.rotation.y+e,this.rotation.z),this.material.uniforms.time.value+=e)}}])&&w(t.prototype,n),s}(r.Mesh);function T(e){return(T="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})(e)}function R(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)}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function z(e,t){return!t||"object"!==T(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function L(e){return(L=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=L(i);if(o){var n=L(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return z(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.PlaneGeometry(15,15),n=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0},alpha:{type:"f",value:0},outlineTex:{type:"t",value:null},noiseTex:{type:"t",value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  vPosition = position;\n  vUv = uv;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform float alpha;\nuniform sampler2D outlineTex;\nuniform sampler2D noiseTex;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nconst float blurIteration = 8.0;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  // calculate blur mask.\n  vec4 destColor = vec4(0.0);\n  for (float i = 0.0; i < blurIteration; i++) {\n    for (float j = 0.0; j < blurIteration; j++) {\n      vec2 p = (vec2(i, j) / blurIteration * 2.0 - 1.0) / 512.0 * 60.0;\n      destColor += texture2D(outlineTex, vUv + p) / pow(blurIteration, 2.0);\n    }\n  }\n  float blurMask = smoothstep(0.0, 0.8, destColor.r) * (1.0 - smoothstep(0.5, 1.0, destColor.r));\n\n  float noise1 = texture2D(noiseTex, vUv + vec2(0.0, time * 0.1 + alpha)).r;\n  float noise2 = texture2D(noiseTex, vUv * 2.0 - vec2(0.0, time * 0.4 + alpha)).g;\n  float noise3 = texture2D(noiseTex, vUv * 3.0 + vec2(0.0, time * 0.8 + alpha)).b;\n  float noise = noise1 * 0.65 + noise2 * 0.3 + noise3 * 0.05;\n\n  float mask = blurMask * pow(smoothstep(0.2, 1.0, noise), 3.0) * 15.0;\n\n  vec3 hsv = vec3(1.0 + mask * 0.5 + alpha, 0.8 - mask * 0.6, 0.5 + mask * 0.5);\n\n  gl_FragColor = vec4(convertHsvToRgb(hsv), mask);\n}\n",transparent:!0});return(e=a.call(this,t,n)).name="Aura",e.isActive=!1,e}return t=s,(n=[{key:"start",value:function(e,t,n){this.isActive=!0,this.material.uniforms.alpha.value=e,this.material.uniforms.outlineTex.value=t,this.material.uniforms.noiseTex.value=n}},{key:"update",value:function(e,t){!1!==this.isActive&&(this.rotation.copy(t.rotation),this.material.uniforms.time.value+=e)}}])&&R(t.prototype,n),s}(r.Mesh);function A(e){return(A="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})(e)}function O(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)}}function D(e,t){return(D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e,t){return!t||"object"!==A(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var F=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&D(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=k(i);if(o){var n=k(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return I(this,e)});function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this)).name="AuraObject",t.obj=new P,t.aura=new C,t.add(t.aura),t.add(t.obj),t.renderTarget=new r.WebGLRenderTarget(512,512),t.alpha=e,t.radian=v().radians(360*e),t.time=0,t.isActive=!1,t}return t=s,(n=[{key:"start",value:function(e){this.obj.start(this.alpha),this.aura.start(this.alpha,this.renderTarget.texture,e),this.isActive=!0}},{key:"update",value:function(e,t,n,r,i){!1!==this.isActive&&(this.time+=e,this.radian+=e,this.obj.update(e,r),this.aura.update(e,r),t.setRenderTarget(this.renderTarget),n.add(this.obj),this.obj.material.uniforms.renderOutline.value=1,t.render(n,i),t.setRenderTarget(null),n.remove(this.obj),this.add(this.obj),this.obj.material.uniforms.renderOutline.value=0,this.position.set(11*Math.cos(this.radian),0,11*Math.sin(this.radian)))}},{key:"resize",value:function(e){}}])&&O(t.prototype,n),s}(r.Group);function j(e){return(j="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})(e)}function U(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)}}function B(e,t){return(B=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function G(e,t){return!t||"object"!==j(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function N(e){return(N=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var H,V=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&B(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=N(i);if(o){var n=N(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return G(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.SphereGeometry(100,12,12),n=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0},hex:{type:"f",value:0}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  vUv = uv;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform float hex;\n\nvarying vec2 vUv;\nvarying vec3 vColor;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec3 rgb = mix(\n    convertHsvToRgb(vec3(0.5, 0.8, 0.05)),\n    convertHsvToRgb(vec3(0.0, 0.4, 0.4)),\n    vUv.y * 4.0 - 1.15\n    );\n\n  gl_FragColor = vec4(rgb, 1.0);\n}\n",side:r.BackSide});return(e=a.call(this,t,n)).name="Background",e}return t=s,(n=[{key:"start",value:function(){}},{key:"update",value:function(){}}])&&U(t.prototype,n),s}(r.Mesh);function W(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function Z(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)}}for(var q=new r.Scene,Y=new f,X=new r.Clock({autoStart:!1}),K=new r.Scene,Q=new x,J=new Array(7),$=0;$<J.length;$++){var ee=$/J.length;J[$]=new F(ee)}var te=new V,ne=new r.TextureLoader,re=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i,o;return t=e,(n=[{key:"start",value:(i=regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(H=new r.WebGL1Renderer({alpha:!0,antialias:!0,canvas:t})).setPixelRatio(window.devicePixelRatio),H.setClearColor(0,1),e.next=5,Promise.all([ne.loadAsync("/sketch-threejs/img/sketch/splash/noise.png")]).then((function(e){var t=e[0];t.wrapS=r.RepeatWrapping,t.wrapT=r.RepeatWrapping,Y.start(),Q.start();for(var n=0;n<J.length;n++)J[n].start(t),q.add(J[n]);te.start(),q.add(te)}));case 5:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=i.apply(e,t);function a(e){W(o,n,r,a,s,"next",e)}function s(e){W(o,n,r,a,s,"throw",e)}a(void 0)}))},function(e){return o.apply(this,arguments)})},{key:"play",value:function(){X.start(),this.update()}},{key:"pause",value:function(){X.stop()}},{key:"update",value:function(){if(!1!==X.running){var e=X.getDelta();Y.update(e),Q.update(Y);for(var t=0;t<J.length;t++)J[t].update(e,H,K,Y,Q);H.render(q,Y)}}},{key:"resize",value:function(e){Y.resize(e);for(var t=0;t<J.length;t++)J[t].resize(Y);H.setSize(e.x,e.y)}}])&&Z(t.prototype,n),e}();function ie(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function oe(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){ie(o,r,i,a,s,"next",e)}function s(e){ie(o,r,i,a,s,"throw",e)}a(void 0)}))}}function ae(){return se.apply(this,arguments)}function se(){return(se=oe(regeneratorRuntime.mark((function e(){var t,n,i,a,s,c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new re,n=new r.Vector2,i=document.getElementById("canvas-webgl"),a=document.querySelector(".p-preloader"),s=function(){n.set(document.body.clientWidth,window.innerHeight),i.width=n.x,i.height=n.y,t.resize(n)},c=function(){window.addEventListener("blur",(function(){t.pause()})),window.addEventListener("focus",(function(){t.play()})),window.addEventListener("resize",o()(s,100))},u=function e(){t.update(),requestAnimationFrame(e)},e.next=9,t.start(i);case 9:c(),s(),a.classList.add("is-hidden"),t.play(),u();case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},24491:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}});var i=n(2212),o=n(17393),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0}},this.instances=500,this.obj}var t,a;return t=e,(a=[{key:"createObj",value:function(){var e=new i.InstancedBufferGeometry,t=new i.BoxGeometry(1,1e3,1,2,128);e.copy(t);for(var r=new i.InstancedBufferAttribute(new Float32Array(3*this.instances),3),a=new i.InstancedBufferAttribute(new Float32Array(this.instances),1),s=new i.InstancedBufferAttribute(new Float32Array(this.instances),1),c=0,u=this.instances;c<u;c++)r.setXYZ(c,300*((Math.random()+Math.random()+Math.random())/3*2-1),0,150*((Math.random()+Math.random()+Math.random())/3*2-1)),a.setXYZ(c,90*(2*o.randomInt(0,1)-1)+60*(2*Math.random()-1)),s.setXYZ(c,2*Math.random());e.setAttribute("instancePosition",r),e.setAttribute("rotate",a),e.setAttribute("delay",s);var l=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(61915).Z,fragmentShader:n(71883).Z,depthWrite:!1,transparent:!0,side:i.DoubleSide,blending:i.AdditiveBlending});this.obj=new i.InstancedMesh(e,l,this.instances)}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&r(t.prototype,a),e}()},45032:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(2212),i=n(38314),o=n(24491).Z;function a(){var e=new r.Vector2,t=document.getElementById("canvas-webgl"),n=new r.WebGL1Renderer({antialias:!0,canvas:t}),a=new r.Scene,s=new r.PerspectiveCamera(120,1,1,1e4),c=new r.Clock,u=new r.Vector2,l=new r.Vector2,f=new r.Vector2,h=new o,v=function(){e.set(document.body.clientWidth,window.innerHeight),t.width=e.x,t.height=e.y,s.aspect=e.x/e.y,s.updateProjectionMatrix(),n.setSize(e.x,e.y)};window.addEventListener("resize",i(v,1e3)),t.addEventListener("mousedown",(function(e){e.preventDefault(),u.set(e.clientX,e.clientY)})),document.addEventListener("mousemove",(function(e){e.preventDefault(),l.set(e.clientX,e.clientY)})),document.addEventListener("mouseup",(function(e){e.preventDefault(),f.set(e.clientX,e.clientY)})),t.addEventListener("touchstart",(function(e){e.preventDefault(),u.set(e.touches[0].clientX,e.touches[0].clientY)})),t.addEventListener("touchmove",(function(e){e.preventDefault(),l.set(e.touches[0].clientX,e.touches[0].clientY)})),t.addEventListener("touchend",(function(e){e.preventDefault(),f.set(e.changedTouches[0].clientX,e.changedTouches[0].clientY)})),v(),h.createObj(),a.add(h.obj),n.setClearColor(921102,1),s.position.set(0,0,100),s.lookAt(new r.Vector3(0,0,0)),function e(){var t;t=c.getDelta(),h.render(t),n.render(a,s),requestAnimationFrame(e)}()}},53739:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0}},this.obj}var t,o;return t=e,(o=[{key:"createObj",value:function(){for(var e=new i.BufferGeometry,t=[],r=50,o=0;o<r;o++)for(var a=0;a<r;a++)for(var s=0;s<r;s++){var c=70*(s/r*2-1),u=70*(a/r*2-1),l=70*(o/r*2-1);t.push(c,u,l)}var f=new i.BufferAttribute(new Float32Array(t),3);e.setAttribute("position",f);var h=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(61765).Z,fragmentShader:n(7401).Z,transparent:!0,depthWrite:!1});this.obj=new i.Points(e,h)}},{key:"render",value:function(e){this.uniforms.time.value+=e,this.obj.rotation.set(.005*this.uniforms.time.value,.02*this.uniforms.time.value,.004*this.uniforms.time.value)}}])&&r(t.prototype,o),e}()},75255:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(2212),i=n(38314),o=n(53739).Z;function a(){var e=new r.Vector2,t=document.getElementById("canvas-webgl"),n=new r.WebGL1Renderer({antialias:!1,canvas:t}),a=new r.Scene,s=new r.PerspectiveCamera(90,1,1,1e4),c=new r.Clock,u=new r.Vector2,l=new r.Vector2,f=new r.Vector2,h=new o,v=function(){e.set(document.body.clientWidth,window.innerHeight),t.width=e.x,t.height=e.y,s.aspect=e.x/e.y,s.updateProjectionMatrix(),n.setSize(e.x,e.y)};window.addEventListener("resize",i(v,1e3)),t.addEventListener("mousedown",(function(e){e.preventDefault(),u.set(e.clientX,e.clientY)})),document.addEventListener("mousemove",(function(e){e.preventDefault(),l.set(e.clientX,e.clientY)})),document.addEventListener("mouseup",(function(e){e.preventDefault(),f.set(e.clientX,e.clientY)})),t.addEventListener("touchstart",(function(e){e.preventDefault(),u.set(e.touches[0].clientX,e.touches[0].clientY)})),t.addEventListener("touchmove",(function(e){e.preventDefault(),l.set(e.touches[0].clientX,e.touches[0].clientY)})),t.addEventListener("touchend",(function(e){e.preventDefault(),f.set(e.changedTouches[0].clientX,e.changedTouches[0].clientY)})),v(),h.createObj(),a.add(h.obj),n.setClearColor(15329769,1),s.position.set(10,10,50),s.lookAt(new r.Vector3),function e(){var t;t=c.getDelta(),h.render(t),n.render(a,s),requestAnimationFrame(e)}()}},54614:function(e,t,n){"use strict";n.d(t,{Z:function(){return H}});var r=n(2212),i=n(38314),o=n.n(i),a=n(29130),s=n.n(a),c=n(17393),u=n.n(c);function l(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function f(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)}}var h=new(n(48840).L),v=new r.TextureLoader,d=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},tex:{type:"t",value:null}},this.obj}var t,i,o,a;return t=e,(i=[{key:"createObj",value:(o=regeneratorRuntime.mark((function e(){var t,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.loadAsync("/sketch-threejs/model/buddha/buddha_head.obj");case 2:return t=e.sent,e.next=5,v.loadAsync("/sketch-threejs/model/buddha/buddha_ao.jpg");case 5:this.uniforms.tex.value=e.sent,i=new r.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(11530).Z,fragmentShader:n(34566).Z}),this.obj=new r.Mesh(t.children[0].geometry,i),this.obj.position.y=16,this.obj.scale.set(7,7,7);case 10:case"end":return e.stop()}}),e,this)})),a=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=o.apply(e,t);function a(e){l(i,n,r,a,s,"next",e)}function s(e){l(i,n,r,a,s,"throw",e)}a(void 0)}))},function(){return a.apply(this,arguments)})},{key:"render",value:function(e,t,n){this.uniforms.time.value+=e,this.obj.rotation.set(u().radians(t-15),u().radians(n+15-5*this.uniforms.time.value),u().radians(-20))}}])&&f(t.prototype,i),e}();function p(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function m(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)}}var y=new r.TextureLoader,g=void 0,x=void 0,b=void 0,w=void 0,M=void 0,_=void 0,S=void 0,P=0,T=0,R=0,E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},texHannyaShingyo:{type:"t",value:void 0},unitUv:{type:"f",value:0},duration:{type:"f",value:4}},this.obj}var t,i,o,a;return t=e,(i=[{key:"createObj",value:(o=regeneratorRuntime.mark((function e(){var t,i,o,a,s,c,l,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t="観自在菩薩行深般若波羅蜜多時照見五蘊皆空度一切苦厄舎利子色不異空空不異色色即是空空即是色受想行識亦復如是舎利子是諸法空相不生不滅不垢不浄不増不減是故空中無色無受想行識無眼耳鼻舌身意無色声香味触法無眼界乃至無意識界無無明亦無無明尽乃至無老死亦無老死尽無苦集滅道無智亦無得以無所得故菩提薩埵依般若波羅蜜多故心無罣礙無罣礙故無有恐怖遠離一切顛倒夢想究竟涅槃三世諸仏依般若波羅蜜多故得阿耨多羅三藐三菩提故知般若波羅蜜多是大神呪是大明呪是無上呪是無等等呪能除一切苦真実不虚故説般若波羅蜜多呪即説呪日羯諦羯諦波羅羯諦波羅僧羯諦菩提薩婆訶般若心経",i=Math.ceil(Math.sqrt(t.length)),o=new r.InstancedBufferGeometry,a=new r.PlaneGeometry(6,6),o.copy(a),P=t.length,g=new r.InstancedBufferAttribute(new Float32Array(3*P),3),x=new r.InstancedBufferAttribute(new Float32Array(2*P),2),b=new r.InstancedBufferAttribute(new Float32Array(P),1),w=new r.InstancedBufferAttribute(new Float32Array(P),1),M=new r.InstancedBufferAttribute(new Float32Array(P),1),_=new r.InstancedBufferAttribute(new Float32Array(P),1),S=new r.InstancedBufferAttribute(new Float32Array(P),1),s=0;s<i;s++)for(c=0;c<i;c++)l=s*i+c,u().radians(360*Math.random()),Math.random(),x.setXY(l,c/i,(i-s-1)/i),b.setX(l,l);return o.setAttribute("iPosition",g),o.setAttribute("iUv",x),o.setAttribute("iId",b),o.setAttribute("iTime",w),o.setAttribute("iIsAnimated",M),o.setAttribute("iScale",_),o.setAttribute("iMove",S),f=new r.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(46301).Z,fragmentShader:n(83257).Z,transparent:!0,depthWrite:!1}),e.next=26,y.loadAsync("/sketch-threejs/img/sketch/buddha/hannya_text.png");case 26:this.uniforms.texHannyaShingyo.value=e.sent,this.uniforms.unitUv.value=1/i,this.obj=new r.InstancedMesh(o,f,i*i),this.obj.position.y=0,this.obj.frustumCulled=!1;case 31:case"end":return e.stop()}}),e,this)})),a=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=o.apply(e,t);function a(e){p(i,n,r,a,s,"next",e)}function s(e){p(i,n,r,a,s,"throw",e)}a(void 0)}))},function(){return a.apply(this,arguments)})},{key:"render",value:function(e){if(this.uniforms.time.value+=e,(R+=e)>.5){var t=u().radians(270*Math.random()-45),n=12*Math.random()+12;g.setXYZ(T,Math.cos(t)*n,0,Math.sin(t)*n),M.setX(T,1),_.setX(T,.1*(Math.random()+Math.random()-1)+1),S.setX(T,5*(Math.random()+Math.random()-1)+30),g.needsUpdate=!0,M.needsUpdate=!0,_.needsUpdate=!0,S.needsUpdate=!0,R=0,T=T>=P-1?0:T+1}for(var r=0;r<P;r++)if(0!==M.getX(r)){var i=w.getX(r);i>4?(M.setX(r,0),w.setX(r,0)):w.setX(r,i+e)}M.needsUpdate=!0,w.needsUpdate=!0}}])&&m(t.prototype,i),e}();function z(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)}}var L=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0}},this.obj}var t,i;return t=e,(i=[{key:"createObj",value:function(){var e=new r.PlaneGeometry(70,70,512,512),t=new r.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(67467).Z,fragmentShader:n(76100).Z,transparent:!0});this.obj=new r.Mesh(e,t),this.obj.rotation.set(u().radians(-90),0,0)}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&z(t.prototype,i),e}();function C(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)}}var A=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0}},this.obj}var t,i;return t=e,(i=[{key:"createObj",value:function(){for(var e=new r.BufferGeometry,t=[],i=[],o=[],a=0;a<1800;a+=3){var s=Math.random()*Math.random()*60+20,c=u().radians(360*Math.random());t[a+0]=Math.cos(c)*s,t[a+1]=0,t[a+2]=Math.sin(c)*s,i[a/3]=120*Math.random(),o[a/3]=120*Math.random()}var l=new r.BufferAttribute(new Float32Array(t),3),f=new r.BufferAttribute(new Float32Array(i),1),h=new r.BufferAttribute(new Float32Array(o),1);e.setAttribute("position",l),e.setAttribute("delay1",f),e.setAttribute("delay2",h);var v=new r.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(47869).Z,fragmentShader:n(29808).Z,transparent:!0,depthWrite:!1,blending:r.AdditiveBlending});this.obj=new r.Points(e,v)}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&C(t.prototype,i),e}();function O(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)}}var D=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0}},this.obj}var t,i;return t=e,(i=[{key:"createObj",value:function(){var e=new r.PlaneGeometry(60,60,512,512),t=new r.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(42832).Z,fragmentShader:n(29608).Z,transparent:!0});this.obj=new r.Mesh(e,t),this.obj.position.y=16,this.obj.position.z=-30}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&O(t.prototype,i),e}();function I(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)}}var k=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0}},this.obj}var t,i;return t=e,(i=[{key:"createObj",value:function(){var e=new r.SphereGeometry(100,128,128),t=new r.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(6834).Z,fragmentShader:n(51261).Z,side:r.BackSide});this.obj=new r.Mesh(e,t),this.obj.position.y=16}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&I(t.prototype,i),e}();function F(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)}}var j=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},texture:{type:"t",value:t},resolution:{type:"v2",value:new r.Vector2}},this.obj}var t,i;return t=e,(i=[{key:"createObj",value:function(){var e=new r.PlaneGeometry(2,2),t=new r.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(59933).Z,fragmentShader:n(16918).Z});this.obj=new r.Mesh(e,t)}},{key:"resize",value:function(e,t){this.uniforms.resolution.value.set(e,t)}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&F(t.prototype,i),e}();function U(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)}}var B=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolution=t,this.vTouchStart=new r.Vector2,this.vPrev=new r.Vector2,this.v=new r.Vector2,this.a=new r.Vector2,this.anchor=new r.Vector2,this.isTouched=!1}var t,n;return t=e,(n=[{key:"touchStart",value:function(e){e.touches||e.preventDefault(),this.vPrev.copy(this.v),this.a.set(0,0),this.vTouchStart.set(e.touches?e.touches[0].clientX:e.clientX,e.touches?e.touches[0].clientY:e.clientY),this.isTouched=!0}},{key:"touchMove",value:function(e){e.touches&&e.preventDefault();var t=e.touches?e.touches[0].clientX:e.clientX,n=e.touches?e.touches[0].clientY:e.clientY;!1!==this.isTouched&&this.anchor.set((t-this.vTouchStart.x)/(this.resolution.x/200)+this.vPrev.x,u().clamp((n-this.vTouchStart.y)/(this.resolution.y/200)+this.vPrev.y,-90,90))}},{key:"touchEnd",value:function(e){this.isTouched=!1}},{key:"render",value:function(){this.a.set((this.anchor.x-this.v.x)/10,(this.anchor.y-this.v.y)/10),this.v.add(this.a)}}])&&U(t.prototype,n),e}();function G(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function N(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){G(o,r,i,a,s,"next",e)}function s(e){G(o,r,i,a,s,"throw",e)}a(void 0)}))}}function H(){return V.apply(this,arguments)}function V(){return(V=N(regeneratorRuntime.mark((function e(){var t,n,i,a,c,u,l,f,h,v,p,m,y,g,x,b,w,M,_,S,P,T,R;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new r.Vector2,n=document.getElementById("canvas-webgl"),i=new r.WebGL1Renderer({alpha:!0,antialias:!0,canvas:n}),a=new r.Scene,c=new r.PerspectiveCamera,u=new r.Clock({autoStart:!1}),l=new r.WebGLRenderTarget,f=new r.Scene,h=new r.OrthographicCamera(-1,1,1,-1,1,2),v=document.querySelector(".p-preloader"),p=new d,m=new E,y=new L,g=new A,x=new D,b=new k,w=new B(t),(M=new j(l.texture)).createObj(),f.add(M.obj),_=function(){var e=u.getDelta();w.render(t),p.render(e,w.v.y,w.v.x),m.render(e),y.render(e),g.render(e),x.render(e),i.setRenderTarget(l),i.render(a,c),M.render(e),i.setRenderTarget(null),i.render(f,h)},S=function e(){_(),requestAnimationFrame(e)},P=function(){c.setFocalLength(35*Math.min(t.x/1200,1)+15),c.setViewOffset(1200,800,(t.x-1200)/-2,(t.y-800)/-2,t.x,t.y),c.updateProjectionMatrix()},T=function(){t.set(document.body.clientWidth,window.innerHeight),n.width=t.x,n.height=t.y,P(),i.setSize(t.x,t.y),l.setSize(t.x,t.y),M.resize(t.x,t.y)},R=function(){var e=function(e){w.touchStart(e)},t=function(e){w.touchMove(e)},r=function(e){w.touchEnd(e)};n.addEventListener("mousedown",e,{passive:!1}),window.addEventListener("mousemove",t,{passive:!1}),window.addEventListener("mouseup",r),n.addEventListener("touchstart",e,{passive:!1}),window.addEventListener("touchmove",t,{passive:!1}),window.addEventListener("touchend",r),window.addEventListener("resize",o()(T,100))},i.setClearColor(592137,1),c.aspect=1.5,c.far=1e3,c.position.set(0,12,85),c.lookAt(new r.Vector3(0,14,0)),e.next=32,p.createObj();case 32:return e.next=34,m.createObj();case 34:return y.createObj(),g.createObj(),x.createObj(),b.createObj(),m.obj.renderOrder=10,a.add(p.obj),a.add(m.obj),a.add(y.obj),a.add(g.obj),a.add(x.obj),a.add(b.obj),R(),T(),v.classList.add("is-hidden"),e.next=50,s()(200);case 50:u.start(),S();case 52:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},97018:function(e,t,n){"use strict";n.d(t,{Z:function(){return K}});var r=n(2212),i=n(38314),o=n.n(i);function a(e){return(a="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})(e)}function s(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)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(f,e);var t,n,i,o,a=(i=f,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=l(i);if(o){var n=l(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return u(this,e)});function f(e,t,n,i){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(o=a.call(this,e,t,n,i)).cameraResolution=new r.Vector2,o}return t=f,(n=[{key:"start",value:function(){this.aspect=1.5,this.far=1e3,this.setFocalLength(50),this.position.set(0,0,50),this.lookAt(new r.Vector3)}},{key:"update",value:function(e){}},{key:"resize",value:function(e){this.aspect=e.x/e.y,this.updateProjectionMatrix()}}])&&s(t.prototype,n),f}(r.PerspectiveCamera),h=n(31430),v=n(17393),d=n.n(v);function p(e){return(p="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})(e)}function m(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)}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function x(e){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=x(i);if(o){var n=x(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return g(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.PlaneGeometry(1,1,64,64),n=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0},easeTransition:{type:"f",value:0},noiseTex:{type:"t",value:null},imgPrevTex:{type:"t",value:null},imgNextTex:{type:"t",value:null},imgRatio:{type:"v2",value:new r.Vector2}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform float time;\nuniform float easeTransition;\nuniform vec2 imgRatio;\nuniform sampler2D noiseTex;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying vec2 vUpdateUv;\nvarying float vTime;\n\nvoid main(void) {\n  vec2 updateUv = uv * imgRatio + vec2(\n    (1.0 - imgRatio.x) * 0.5,\n    (1.0 - imgRatio.y) * 0.5\n    );\n\n  float noiseR = texture2D(noiseTex, updateUv + vec2(time * 0.1, 0.0)).r;\n  float noiseG = texture2D(noiseTex, updateUv + vec2(time * 0.2, 0.0)).g;\n  float slide = texture2D(noiseTex, uv * vec2(0.998) + 0.001).b;\n\n  float mask = easeTransition * 1.6 - slide;\n  float maskPrev = smoothstep(0.0, 0.3, mask);\n  float maskNext = 1.0 - smoothstep(0.3, 0.6, mask);\n  float height = maskPrev * maskNext * 4.0;\n\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position + vec3(0.0, 0.0, height), 1.0);\n\n  vPosition = position;\n  vUv = uv;\n  vUpdateUv = updateUv;\n  vTime = easeTransition;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform float easeTransition;\nuniform vec2 imgRatio;\nuniform sampler2D noiseTex;\nuniform sampler2D imgPrevTex;\nuniform sampler2D imgNextTex;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying vec2 vUpdateUv;\nvarying float vTime;\n\nvoid main() {\n  vec2 ratio = vec2(\n    min(imgRatio.x / imgRatio.y / 3.0 * 2.0, 1.0),\n    min(imgRatio.y / imgRatio.x / 2.0 * 3.0, 1.0) / 3.0 * 2.0\n  );\n  vec2 imgUv = vec2(\n    vUv.x * ratio.x + (1.0 - ratio.x) * 0.5,\n    vUv.y * ratio.y  + (1.0 - ratio.y) * 0.5\n  );\n\n  float noiseR = texture2D(noiseTex, vUpdateUv + vec2(time * 0.1, 0.0)).r;\n  float noiseG = texture2D(noiseTex, vUpdateUv + vec2(time * 0.2, 0.0)).g;\n  float slide = texture2D(noiseTex, vUv * vec2(0.998) + 0.001).b;\n\n  float mask = vTime * 1.24 - (slide * 0.6 + noiseR * 0.2 + noiseG * 0.2);\n  float maskPrev = 1.0 - smoothstep(0.12, 0.16, mask);\n  float maskNext = smoothstep(0.16, 0.2, mask);\n  float maskEdge = smoothstep(0.04, 0.12, mask) * (1.0 - smoothstep(0.2, 0.28, mask));\n\n  vec4 imgPrev = texture2D(imgPrevTex, imgUv * (0.95 - 0.05 * easeTransition) + 0.025 + 0.025 * easeTransition);\n  vec4 imgNext = texture2D(imgNextTex, imgUv * (1.0 - 0.05 * easeTransition) + 0.025 * easeTransition);\n\n  // 0.9 - 0.8\n  // 1.0 - 0.9\n\n  vec3 color1 = imgPrev.rgb * maskPrev;\n  vec3 color2 = imgNext.rgb * maskNext;\n  vec3 color3 = vec3(0.0, 0.2, 1.0) * maskEdge;\n\n  gl_FragColor = vec4(color1 + color2 - color3, 1.0);\n}\n"});return(e=a.call(this,t,n)).name="Image",e.imgIndexPrev=0,e.imgIndexNext=1,e}return t=s,(n=[{key:"start",value:function(e,t){this.imgTexes=t,this.material.uniforms.noiseTex.value=e,this.material.uniforms.imgPrevTex.value=this.imgTexes[this.imgIndexPrev],this.material.uniforms.imgNextTex.value=this.imgTexes[this.imgIndexNext]}},{key:"update",value:function(e,t){this.material.uniforms.time.value+=e,this.material.uniforms.easeTransition.value=t}},{key:"resize",value:function(e){this.material.uniforms.imgRatio.value.set(Math.min(1,e.x/e.y),Math.min(1,e.y/e.x)),this.scale.copy(e)}},{key:"changeTex",value:function(){this.imgIndexPrev=this.imgIndexNext,this.imgIndexNext=this.imgIndexNext+1>=this.imgTexes.length?0:this.imgIndexNext+1,this.material.uniforms.imgPrevTex.value=this.imgTexes[this.imgIndexPrev],this.material.uniforms.imgNextTex.value=this.imgTexes[this.imgIndexNext]}}])&&m(t.prototype,n),s}(r.Mesh);function w(e){return(w="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})(e)}function M(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)}}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e,t){return!t||"object"!==w(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function P(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=P(i);if(o){var n=P(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return S(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.PlaneGeometry(1,1,128,128),n=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0},easeTransition:{type:"f",value:0},noiseTex:{type:"t",value:null},imgRatio:{type:"v2",value:new r.Vector2}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform float time;\nuniform float easeTransition;\nuniform vec2 imgRatio;\nuniform sampler2D noiseTex;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying float vOpacity;\nvarying float vTime;\n\nvoid main(void) {\n  vec2 p = uv * 2.0 - 1.0;\n  float edge = abs(p.x);\n\n  vec2 updateUv = uv * imgRatio + vec2(\n    (1.0 - imgRatio.x) * 0.5,\n    (1.0 - imgRatio.y) * 0.5\n    );\n\n  float noiseR = texture2D(noiseTex, updateUv + vec2(time * 0.1, 0.0)).r;\n  float noiseG = texture2D(noiseTex, updateUv + vec2(time * 0.2, 0.0)).g;\n  float slide = texture2D(noiseTex, uv * vec2(0.998) + 0.001).b;\n\n  float mask = easeTransition * 1.24 - (slide * 0.6 + noiseR * 0.2 + noiseG * 0.2);\n  float h1 = (1.0 - smoothstep(0.14, 0.24, mask)) * 12.0;\n\n  float mask2 = easeTransition * 1.6 - slide;\n  float maskPrev = smoothstep(0.0, 0.3, mask2);\n  float maskNext = 1.0 - smoothstep(0.3, 0.6, mask2);\n  float h2 = maskPrev * maskNext * 8.0;\n\n  float h = h1 + h2;\n\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position + vec3(slide * 0.2, slide * 0.2 + h * 0.006, h), 1.0);\n\n  float opacity = smoothstep(0.0, 2.0, h1) * (1.0 - smoothstep(8.0, 12.0, h1)) * (1.0 - pow(edge, 2.0));\n\n  vPosition = mPosition.xyz;\n  vUv = uv;\n  vOpacity = opacity;\n  vTime = easeTransition;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform float duration;\nuniform vec2 imgRatio;\nuniform sampler2D noiseTex;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying float vOpacity;\nvarying float vTime;\n\nvoid main() {\n  vec2 updateUv = vUv * imgRatio + vec2(\n    (1.0 - imgRatio.x) * 0.5,\n    (1.0 - imgRatio.y) * 0.5\n    );\n\n  float noiseR = texture2D(noiseTex, updateUv + vec2(time * 0.1, 0.0)).r;\n  float noiseG = texture2D(noiseTex, updateUv + vec2(time * 0.2, 0.0)).g;\n\n  gl_FragColor = vec4(1.0, 0.38, 0.0, vOpacity * smoothstep(0.4, 0.6, noiseR));\n}\n",transparent:!0,blending:r.AdditiveBlending});return(e=a.call(this,t,n)).name="ImageFire",e}return t=s,(n=[{key:"start",value:function(e){this.material.uniforms.noiseTex.value=e}},{key:"update",value:function(e,t){this.material.uniforms.time.value+=e,this.material.uniforms.easeTransition.value=t}},{key:"resize",value:function(e){this.material.uniforms.imgRatio.value.set(Math.min(1,e.x/e.y),Math.min(1,e.y/e.x)),this.scale.copy(e)}}])&&M(t.prototype,n),s}(r.Mesh);function R(e){return(R="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})(e)}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)}}function z(e,t){return(z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function L(e,t){return!t||"object"!==R(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function C(e){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var A=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&z(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=C(i);if(o){var n=C(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return L(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.PlaneGeometry(1,1,32,32),n=new r.BufferGeometry;n.setAttribute("position",t.attributes.position),n.setAttribute("uv",t.attributes.uv);var i=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0},easeTransition:{type:"f",value:0},noiseTex:{type:"t",value:null},imgRatio:{type:"v2",value:new r.Vector2},pixelRatio:{type:"f",value:window.devicePixelRatio}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform float time;\nuniform float easeTransition;\nuniform vec2 imgRatio;\nuniform sampler2D noiseTex;\nuniform float pixelRatio;\n\nvarying float vOpacity;\n\nvoid main(void) {\n  vec2 updateUv = uv * imgRatio + vec2(\n    (1.0 - imgRatio.x) * 0.5,\n    (1.0 - imgRatio.y) * 0.5\n    );\n\n  float noiseR = texture2D(noiseTex, updateUv + vec2(time * 0.1, 0.0)).r;\n  float noiseG = texture2D(noiseTex, updateUv + vec2(time * 0.2, 0.0)).g;\n  float slide = texture2D(noiseTex, uv * vec2(0.99) + 0.005).b;\n\n  float mask = easeTransition * 1.24 - (slide * 0.6 + noiseR * 0.2 + noiseG * 0.2);\n  float h = (easeTransition - slide) * 30.0;\n\n  float opacity = smoothstep(0.3, 0.5, easeTransition * 2.0 - slide) * (1.0 - smoothstep(0.8, 1.0, easeTransition * 2.0 - slide)) * 0.8;\n\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position + vec3(\n    cos(radians(noiseR * 360.0 + time * 200.0)) * 0.1,\n    sin(radians(noiseG * 360.0 + time * 200.0)) * 0.1,\n    h\n    ), 1.0);\n\n  float distanceFromCamera = length((viewMatrix * mPosition).xyz);\n  float pointSize = pixelRatio * 50.0 / distanceFromCamera * 4.0;\n\n  vOpacity = opacity;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n  gl_PointSize = pointSize;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nvarying float vOpacity;\n\nvoid main() {\n  // Convert PointCoord to the other vec2 has a range from -1.0 to 1.0.\n  vec2 p = gl_PointCoord * 2.0 - 1.0;\n\n  // Draw circle\n  float radius = length(p);\n  float opacity = (1.0 - smoothstep(0.5, 1.0, radius));\n\n  // Define Colors\n  vec3 color = vec3(1.0, 0.38, 0.0);\n\n  gl_FragColor = vec4(color, opacity * vOpacity);\n}\n",transparent:!0,blending:r.AdditiveBlending});return(e=a.call(this,n,i)).name="ImagePoints",e}return t=s,(n=[{key:"start",value:function(e){this.material.uniforms.noiseTex.value=e}},{key:"update",value:function(e,t){this.material.uniforms.time.value+=e,this.material.uniforms.easeTransition.value=t}},{key:"resize",value:function(e){this.material.uniforms.imgRatio.value.set(Math.min(1,e.x/e.y),Math.min(1,e.y/e.x)),this.scale.copy(e)}}])&&E(t.prototype,n),s}(r.Points);function O(e){return(O="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})(e)}function D(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)}}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function k(e,t){return!t||"object"!==O(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function F(e){return(F=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var j,U=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&I(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=F(i);if(o){var n=F(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return k(this,e)});function s(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(e=a.call(this)).name="ImageGroup",e.size=new r.Vector3,e.margin=new r.Vector2,e.timeTransition=0,e}return t=s,(n=[{key:"start",value:function(e,t){var n=new b,r=new T,i=new A;n.start(e,t),r.start(e),i.start(e),r.renderOrder=10,i.position.z=5,this.add(n),this.add(r),this.add(i)}},{key:"update",value:function(e){if(this.timeTransition+=e,this.timeTransition/3>=1)this.timeTransition=0,this.children[0].changeTex(),this.children[0].update(e,0),this.children[1].update(e,0),this.children[2].update(e,0);else{var t=(0,h.easeInOutQuad)(Math.min(this.timeTransition/3,1));this.children[0].update(e,t),this.children[1].update(e,t),this.children[2].update(e,t)}}},{key:"resize",value:function(e,t){var n=Math.abs((e.position.z-this.position.z)*Math.tan(d().radians(e.fov)/2)*2),r=n*e.aspect;this.margin.set(t.x>t.y?.2*t.y:.1*t.x,t.x>t.y?.2*t.y:.333*t.y),this.size.set(r*(t.x-this.margin.x)/t.x,n*(t.y-this.margin.y)/t.y,1),this.children[0].resize(this.size),this.children[1].resize(this.size),this.children[2].resize(this.size)}}])&&D(t.prototype,n),s}(r.Group);function B(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function G(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)}}var N=new r.Scene,H=new f,V=new r.Clock({autoStart:!1}),W=new r.TextureLoader,Z=new U,q=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i,o;return t=e,(n=[{key:"start",value:(i=regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(j=new r.WebGL1Renderer({alpha:!0,antialias:!0,canvas:t})).setPixelRatio(window.devicePixelRatio),j.setClearColor(921102,1),e.next=5,Promise.all([W.loadAsync("/sketch-threejs/img/sketch/burn/noise.png"),W.loadAsync("/sketch-threejs/img/sketch/burn/image01.jpg"),W.loadAsync("/sketch-threejs/img/sketch/burn/image02.jpg"),W.loadAsync("/sketch-threejs/img/sketch/burn/image03.jpg")]).then((function(e){var t=e[0],n=e.slice(1);t.wrapS=r.RepeatWrapping,t.wrapT=r.RepeatWrapping,Z.start(t,n),N.add(Z)}));case 5:H.start();case 6:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=i.apply(e,t);function a(e){B(o,n,r,a,s,"next",e)}function s(e){B(o,n,r,a,s,"throw",e)}a(void 0)}))},function(e){return o.apply(this,arguments)})},{key:"play",value:function(){V.start(),this.update()}},{key:"pause",value:function(){V.stop()}},{key:"update",value:function(){if(!1!==V.running){var e=V.getDelta();H.update(e),Z.update(e),j.render(N,H)}}},{key:"resize",value:function(e){H.resize(e),j.setSize(e.x,e.y),Z.resize(H,e)}}])&&G(t.prototype,n),e}();function Y(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function X(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Y(o,r,i,a,s,"next",e)}function s(e){Y(o,r,i,a,s,"throw",e)}a(void 0)}))}}function K(){return Q.apply(this,arguments)}function Q(){return(Q=X(regeneratorRuntime.mark((function e(){var t,n,i,a,s,c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new q,n=new r.Vector2,i=document.getElementById("canvas-webgl"),a=document.querySelector(".p-preloader"),s=function(){n.set(document.body.clientWidth,window.innerHeight),i.width=n.x,i.height=n.y,t.resize(n)},c=function(){window.addEventListener("blur",(function(){t.pause()})),window.addEventListener("focus",(function(){t.play()})),window.addEventListener("resize",o()(s,100))},u=function e(){t.update(),requestAnimationFrame(e)},e.next=9,t.start(i);case 9:c(),s(),a.classList.add("is-hidden"),t.play(),u();case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},94429:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={index:{type:"f",value:t},time:{type:"f",value:0},size:{type:"f",value:280},texture:{type:"t",value:n},colorH:{type:"f",value:Math.random()}},this.obj=this.createObj(),this.obj.renderOrder=10}var t,o;return t=e,(o=[{key:"createObj",value:function(){var e=new i.PlaneGeometry(280,140,24,12),t=new i.Mesh(e,new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(72648).Z,fragmentShader:n(34326).Z,side:i.DoubleSide,transparent:!0}));return t.position.y=140+280*(2*Math.random()-1)*.1,t.rotation.set(-45*Math.PI/180,0,0),t}},{key:"render",value:function(e,t){this.uniforms.time.value+=t,this.obj.position.z-=4,this.obj.position.z<-900&&(this.obj.position.x=280*(2*Math.random()-1),this.obj.position.z=900,this.uniforms.colorH.value=Math.random())}}])&&r(t.prototype,o),e}()},65722:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}});var i=n(2212),o=n(78934).Z,a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mirrorCamera=new i.PerspectiveCamera(30,t.x/t.y,1,15e3),this.mirrorRender=new i.WebGLRenderTarget(t.x,t.y),this.textureMatrix=new i.Matrix4,this.uniforms={time:{type:"f",value:0},texture:{type:"t",value:this.mirrorRender.texture},textureMatrix:{type:"m4",value:this.textureMatrix}},this.renderBack1=new i.WebGLRenderTarget(t.x,t.y),this.renderBack2=new i.WebGLRenderTarget(t.x,t.y),this.postEffectBlurX=new o(this.renderBack1.texture,1,0,4),this.postEffectBlurY=new o(this.renderBack2.texture,0,1,4),this.mirrorCamera.up.set(0,-1,0),this.obj=this.createObj()}var t,a;return t=e,(a=[{key:"add",value:function(e,t){t.add(this.obj),e.add(this.postEffectBlurX.obj),e.add(this.postEffectBlurY.obj)}},{key:"createObj",value:function(){var e=new i.Mesh(new i.PlaneGeometry(1e3,2e3),new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(440).Z,fragmentShader:n(3410).Z,transparent:!0}));return e.rotation.set(-.5*Math.PI,0,0),e}},{key:"updateTextureMatrix",value:function(){this.textureMatrix.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1),this.textureMatrix.multiply(this.mirrorCamera.projectionMatrix),this.textureMatrix.multiply(this.mirrorCamera.matrixWorldInverse)}},{key:"render",value:function(e,t,n,r,i){this.uniforms.time.value+=i,this.updateTextureMatrix(),this.obj.visible=!1,e.setRenderTarget(this.renderBack1),e.render(n,this.mirrorCamera),this.obj.visible=!0,this.postEffectBlurX.render(e,t,r,this.renderBack2),this.postEffectBlurY.render(e,t,r,this.mirrorRender)}},{key:"resize",value:function(e){this.mirrorCamera.aspect=e.x/e.y,this.mirrorCamera.updateProjectionMatrix(),this.mirrorRender.setSize(e.x,e.y),this.renderBack1.setSize(e.x,e.y),this.renderBack2.setSize(e.x,e.y),this.postEffectBlurX.resize(e),this.postEffectBlurY.resize(e)}}])&&r(t.prototype,a),e}()},87344:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}});var i=n(2212),o=n(17393),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.interval=4,this.attr={position:new i.BufferAttribute(new Float32Array(3*t),3),colorH:new i.BufferAttribute(new Float32Array(t),1),index:new i.BufferAttribute(new Float32Array(t),1),valid:new i.BufferAttribute(new Float32Array(t),1)},this.geometry=new i.BufferGeometry,this.uniforms={size:{type:"f",value:t},interval:{type:"f",value:this.interval},time:{type:"f",value:0}},this.butterflies=null,this.butterfliesLengh=0,this.obj=this.createObj(),this.obj.renderOrder=20}var t,a;return t=e,(a=[{key:"createObj",value:function(){for(var e=0;e<this.uniforms.size.value;e++)this.attr.index.setX(e,e);return this.geometry.setAttribute("position",this.attr.position),this.geometry.setAttribute("colorH",this.attr.colorH),this.geometry.setAttribute("i",this.attr.index),this.geometry.setAttribute("valid",this.attr.valid),new i.Points(this.geometry,new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(13677).Z,fragmentShader:n(13190).Z,depthWrite:!1,transparent:!0}))}},{key:"addButterflies",value:function(e){this.butterflies=e,this.butterfliesLengh=e.length}},{key:"render",value:function(e){this.uniforms.time.value+=e;for(var t=0;t<this.uniforms.size.value;t++){var n=(this.uniforms.time.value+this.attr.index.getX(t)/this.uniforms.size.value*this.interval)%this.interval,r=this.attr.valid.getX(t);if(n>=.9*this.interval&&1==r)this.attr.valid.setX(t,0);else if(n<=.9*this.interval&&0==r){var i=Math.floor(Math.random()*this.butterfliesLengh),a=this.butterflies[i],s=(-90*Math.random()-90)*Math.PI/180,c=-180*Math.random()*Math.PI/180,u=Math.random()*a.uniforms.size.value/4+a.uniforms.size.value/8,l=o.spherical(s,c,u);this.attr.position.setXYZ(t,l[0]+a.obj.position.x,.2*l[1]+a.obj.position.y+20*Math.sin(a.uniforms.time.value),.5*l[2]+a.obj.position.z),this.attr.colorH.setX(t,a.uniforms.colorH.value),this.attr.valid.setX(t,1)}}this.attr.position.needsUpdate=!0,this.attr.colorH.needsUpdate=!0}}])&&r(t.prototype,a),e}()},9406:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={texture1:{type:"t",value:t},texture2:{type:"t",value:n}},this.obj=this.createObj(),this.obj.visible=!1}var t,o;return t=e,(o=[{key:"createObj",value:function(){return new i.Mesh(new i.PlaneGeometry(2,2),new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(56500).Z,fragmentShader:n(50413).Z}))}},{key:"render",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.obj.visible=!0,e.setRenderTarget(r),e.render(t,n),this.obj.visible=!1}}])&&r(t.prototype,o),e}()},78934:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(t,n,r,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={resolution:{type:"v2",value:new i.Vector2},direction:{type:"v2",value:new i.Vector2(n,r)},radius:{type:"f",value:o},texture:{type:"t",value:t}},this.obj=this.createObj(),this.obj.visible=!1}var t,o;return t=e,(o=[{key:"createObj",value:function(){return new i.Mesh(new i.PlaneGeometry(2,2),new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(56500).Z,fragmentShader:n(92586).Z}))}},{key:"resize",value:function(e){this.uniforms.resolution.value.set(e.x,e.y)}},{key:"render",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.obj.visible=!0,e.setRenderTarget(r),e.render(t,n),this.obj.visible=!1}}])&&r(t.prototype,o),e}()},22607:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={minBright:{type:"f",value:.3},texture:{type:"t",value:t}},this.obj=this.createObj(),this.obj.visible=!1}var t,o;return t=e,(o=[{key:"createObj",value:function(){return new i.Mesh(new i.PlaneGeometry(2,2),new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(56500).Z,fragmentShader:n(38913).Z}))}},{key:"render",value:function(e,t,n,r){this.obj.visible=!0,e.setRenderTarget(r),e.render(t,n),this.obj.visible=!1}}])&&r(t.prototype,o),e}()},58238:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(2212),i=n(38314),o=n(89813).Z,a=n(94429).Z,s=n(87344).Z,c=n(65722).Z,u=n(22607).Z,l=n(78934).Z,f=n(9406).Z;function h(){var e={x:0,y:0},t=document.getElementById("canvas-webgl"),n=new r.WebGL1Renderer({antialias:!1,canvas:t,alpha:!0}),h=new r.WebGLRenderTarget(0,0),v=new r.WebGLRenderTarget(0,0),d=new r.WebGLRenderTarget(0,0),p=new r.Scene,m=new r.Scene,y=new r.OrthographicCamera(-1,1,1,-1,0,1),g=new r.PerspectiveCamera(30,1,1,15e3),x=new r.Clock,b=new r.TextureLoader,w=new r.Vector2,M=new r.Vector2,_=new r.Vector2,S=[],P=new s(720),T=new c(e),R=new u(h.texture),E=new l(v.texture,1,0,1),z=new l(d.texture,0,1,1),L=new f(h.texture,v.texture),C=function(){e.x=document.body.clientWidth,e.y=window.innerHeight,t.width=e.x,t.height=e.y,g.aspect=e.x/e.y,g.updateProjectionMatrix(),T.resize(e),E.resize(e),z.resize(e),h.setSize(e.x,e.y),v.setSize(e.x,e.y),d.setSize(e.x,e.y),n.setSize(e.x,e.y)},A=function e(){!function(){for(var e=x.getDelta(),t=0;t<S.length;t++)S[t].render(n,e);P.render(e),T.render(n,p,m,y,e),n.setRenderTarget(h),n.render(m,g),R.render(n,p,y,v),E.render(n,p,y,d),z.render(n,p,y,v),L.render(n,p,y)}(),requestAnimationFrame(e)};C(),window.addEventListener("resize",i(C,1e3)),t.addEventListener("mousedown",(function(e){e.preventDefault(),w.set(e.clientX,e.clientY),o(w)})),t.addEventListener("mousemove",(function(e){e.preventDefault(),M.set(e.clientX,e.clientY),o(M)})),t.addEventListener("mouseup",(function(e){e.preventDefault(),_.set(e.clientX,e.clientY),o(_)})),t.addEventListener("touchstart",(function(e){e.preventDefault(),w.set(e.touches[0].clientX,e.touches[0].clientY),o(w),e.touches[0].clientX,e.touches[0].clientY})),t.addEventListener("touchmove",(function(e){e.preventDefault(),M.set(e.touches[0].clientX,e.touches[0].clientY),o(M)})),t.addEventListener("touchend",(function(e){e.preventDefault(),_.set(e.changedTouches[0].clientX,e.changedTouches[0].clientY),o(_)})),window.addEventListener("mouseout",(function(){event.preventDefault(),_.set(0,0)})),n.setClearColor(15658734,1),g.position.set(400,500,800),T.mirrorCamera.position.set(g.position.x,-1*g.position.y,g.position.z),g.lookAt(new r.Vector3(0,100,0)),T.mirrorCamera.lookAt(new r.Vector3(0,-100,0)),b.load("/sketch-threejs/img/sketch/butterfly/tex.png",(function(e){e.magFilter=r.NearestFilter,e.minFilter=r.NearestFilter;for(var t=0;t<12;t++)S[t]=new a(t,e),S[t].obj.position.x=280*(2*Math.random()-1),S[t].obj.position.z=150*t,m.add(S[t].obj);P.addButterflies(S),m.add(P.obj),T.add(p,m),p.add(R.obj),p.add(E.obj),p.add(z.obj),p.add(L.obj),A()}))}},87848:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var r=n(2212),i=n(38314),o=n.n(i),a=n(89813),s=n(12390),c=n.n(s),u=n(97719),l=n(42935),f=n(5097),h=n(33286),v=n.n(h),d=n(7318),p=n.n(d),m=n(45695),y=n.n(m);function g(){var e,t,i,s,h,d,m=document.getElementById("canvas-webgl"),g=new r.WebGL1Renderer({antialias:!0,canvas:m}),x=new r.Scene,b=new u.Z(35,window.innerWidth/window.innerHeight,1,1e4),w=1e4,M=[],_=2,S=new(p()),P=null,T=null,R=null,E=new Float32Array(3e4),z=new Float32Array(3e4),L=new Float32Array(w),C=new Float32Array(w),A=null,O=new(c()),D=null,I=Date.now(),k=Date.now(),F=Date.now(),j=Date.now(),U=0,B=!1,G=!1,N=!0,H=function(){var e=document.createElement("canvas"),t=e.getContext("2d"),n=null,i=null;return e.width=200,e.height=200,(n=t.createRadialGradient(100,100,20,100,100,100)).addColorStop(.9,"rgba(255, 255, 255, 1)"),n.addColorStop(1,"rgba(255, 255, 255, 0)"),t.fillStyle=n,t.arc(100,100,100,0,Math.PI/180,!0),t.fill(),(i=new r.Texture(e)).minFilter=r.NearestFilter,i.needsUpdate=!0,i},V=function(){m.width=window.innerWidth,m.height=window.innerHeight,b.aspect=window.innerWidth/window.innerHeight,b.updateProjectionMatrix(),g.setSize(window.innerWidth,window.innerHeight)};g.setSize(window.innerWidth,window.innerHeight),g.setClearColor(0,1),b.position.set(1e3,1e3,1e3),b.lookAt(new r.Vector3),e=new r.Vector2,t=new r.Vector2,i=new r.Vector2,s=function(t,n,r){e.set(t,n),(0,a.Z)(e),B=!0,j=Date.now()},h=function(e,n,r){t.set(e,n),(0,a.Z)(t)},d=function(e,t,n){i.set(e,t),B=!1,Date.now()-j<100&&(!0===N?(b.force.position.anchor.set(1200,1200,0),b.force.look.anchor.set(0,0,0),N=!1):N=!0)},window.addEventListener("resize",o()((function(){V()})),1e3),m.addEventListener("mousedown",(function(e){e.preventDefault(),s(e.clientX,e.clientY)})),m.addEventListener("mousemove",(function(e){e.preventDefault(),h(e.clientX,e.clientY)})),m.addEventListener("mouseup",(function(e){e.preventDefault(),d(e.clientX,e.clientY)})),m.addEventListener("touchstart",(function(e){e.preventDefault(),s(e.touches[0].clientX,e.touches[0].clientY)})),m.addEventListener("touchmove",(function(e){e.preventDefault(),h(e.touches[0].clientX,e.touches[0].clientY)})),m.addEventListener("touchend",(function(e){e.preventDefault(),d(e.changedTouches[0].clientX,e.changedTouches[0].clientY)})),window.addEventListener("mouseout",(function(){event.preventDefault(),i.set(0,0),B=!1,Date.now()-j<100&&(!0===N?(b.force.position.anchor.set(1200,1200,0),b.force.look.anchor.set(0,0,0),N=!1):N=!0)})),function(){var e,t;e=new r.OctahedronGeometry(30,2),t=new r.MeshPhongMaterial({color:new r.Color("hsl(140, 100%, 100%)"),flatShading:!0}),A=new r.Mesh(e,t),x.add(A),D=function(){var e=new r.OctahedronGeometry(250,4),t=new r.MeshPhongMaterial({color:2236962,flatShading:!0});return new r.Mesh(e,t)}(),x.add(D);for(var i=0;i<w;i++){var o=new(v()),a=y().getRandomInt(95,185),s=y().getRandomInt(60,80);o.init(new r.Vector3(y().getRandomInt(-100,100),0,0)),o.color=new r.Color("hsl("+a+", "+s+"%, 70%)"),M.push(o),E[3*i+0]=o.velocity.x,E[3*i+1]=o.velocity.y,E[3*i+2]=o.velocity.z,z[3*i+0]=o.color.r,z[3*i+1]=o.color.g,z[3*i+2]=o.color.b,L[i]=o.a,C[i]=o.size}S.init({scene:x,vs:n(99173).Z,fs:n(77911).Z,positions:E,colors:z,opacities:L,sizes:C,texture:H(),blending:r.NormalBlending}),S.rad1=0,S.rad1_base=0,S.rad2=0,S.rad3=0,P=new f.Z(new r.Color("hsl(95, 50%, 60%)").getHex(),new r.Color("hsl(185, 50%, 60%)").getHex(),1),x.add(P),T=new l.Z("hsl(95, 60%, 50%)",1,500,1),x.add(T),R=new l.Z("hsl(95, 60%, 50%)",1,500,1),x.add(R),b.anchor=new r.Vector3(1500,0,0)}(),V(),function e(){B&&U<200?U+=1:U>0&&(U-=1),S.velocity=(A.rotation.x+=.03+U/1e3,A.rotation.y+=.01+U/1e3,A.rotation.z+=.01+U/1e3,S.rad1_base+=y().getRadian(.6),S.rad1=y().getRadian(45*Math.sin(S.rad1_base)+U/100),S.rad2+=y().getRadian(.8+U/100),S.rad3+=.01,y().getPolarCoord(S.rad1,S.rad2,350)),!0===N&&(b.force.position.anchor.copy(S.velocity.clone().add(S.velocity.clone().sub(S.obj.position).normalize().multiplyScalar(-400))),b.force.position.anchor.y+=2*S.velocity.y,b.force.look.anchor.copy(S.velocity)),S.updatePoints(),A.position.copy(S.velocity),P.color.setHSL((95-U/1.5)/360,.5,.6),P.groundColor.setHSL((185-U/1.5)/360,.5,.6),T.position.copy(S.velocity),T.color.setHSL((95-U/1.5)/360,.5,.6),R.position.copy(S.velocity),R.color.setHSL((185-U/1.5)/360,.5,.6),function(){var e=0;if(Date.now()-I>10){for(var t=0;t<M.length;t++){var n=M[t];if(!n.is_active){var r=y().getRadian(y().getRandomInt(0,360)),i=y().getRadian(y().getRandomInt(0,360)),o=y().getRandomInt(1,30),a=y().getPolarCoord(r,i,o),s=y().getPolarCoord(r,i,o/20),c=y().getRandomInt(95,185)-U/1.5,u=y().getRandomInt(60,80);if(a.add(S.velocity),n.activate(),n.init(a),n.color.setHSL(c/360,u/100,.7),n.applyForce(s),n.a=1,n.size=25,++e>=_)break}}I=Date.now()}}(),function(){for(var e=0;e<M.length;e++){var t=M[e];t.is_active&&(t.time++,t.applyDrag(.1),t.updateVelocity(),t.time>10&&(t.size-=2),t.size<=0&&(t.init(new r.Vector3(0,0,0)),t.time=0,t.a=0,t.inactivate())),E[3*e+0]=t.velocity.x-S.velocity.x,E[3*e+1]=t.velocity.y-S.velocity.y,E[3*e+2]=t.velocity.z-S.velocity.z,z[3*e+0]=t.color.r,z[3*e+1]=t.color.g,z[3*e+2]=t.color.b,L[e]=t.a,C[e]=t.size}S.updatePoints()}(),b.force.position.applyHook(0,.025),b.force.position.applyDrag(.2),b.force.position.updateVelocity(),b.updatePosition(),b.force.look.applyHook(0,.2),b.force.look.applyDrag(.4),b.force.look.updateVelocity(),b.updateLook(),T.position.copy(y().getPolarCoord(y().getRadian(0),y().getRadian(0),24).add(S.velocity)),R.position.copy(y().getPolarCoord(y().getRadian(180),y().getRadian(0),24).add(S.velocity)),Date.now()-F>1e3-3*U&&(O.applyForce(new r.Vector2(.08+U/5e3,0)),F=Date.now(),G=!0,k=Date.now()),_=G&&Date.now()-k<500?6+Math.floor(U/40):1+Math.floor(U/40),O.applyHook(0,.1),O.applyDrag(.12),O.updateVelocity(),A.scale.set(1+O.velocity.x,1+O.velocity.x,1+O.velocity.x),g.render(x,b),requestAnimationFrame(e)}()}},44428:function(e,t,n){"use strict";n.d(t,{Z:function(){return Ie}});var r=n(2212),i=n(38314),o=n.n(i),a=n(17393),s=n.n(a),c=n(48840);function u(e){return(u="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})(e)}function l(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)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e,t,n){t.multiplyScalar(1/n),e.add(t)},p=function(e,t,n){n.copy(e.clone().multiplyScalar(-1)).normalize().multiplyScalar(e.length()*t),e.add(n)},m=function(e,t,n,r,i,o){o.copy(e.clone().sub(n));var a=o.length()-r;o.normalize().multiplyScalar(-1*i*a),t.add(o)},y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=v(i);if(o){var n=v(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return h(this,e)});function s(e,t,n,i){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(o=a.call(this,e,t,n,i)).cameraResolution=new r.Vector2,o.drag=new r.Vector3,o.hook=new r.Vector3,o.k=.02,o.d=.3,o.velocity=new r.Vector3,o.acceleration=new r.Vector3,o.anchor=new r.Vector3,o.lookK=.02,o.lookD=.3,o.lookVelocity=new r.Vector3,o.lookAcceleration=new r.Vector3,o.lookAnchor=new r.Vector3,o}return t=s,(n=[{key:"start",value:function(){this.aspect=1.5,this.far=1e3,this.setFocalLength(50),this.position.set(0,0,50),this.lookAt(new r.Vector3)}},{key:"update",value:function(){m(this.velocity,this.acceleration,this.anchor,0,this.k,this.hook),p(this.acceleration,this.d,this.drag),d(this.velocity,this.acceleration,1),m(this.lookVelocity,this.lookAcceleration,this.lookAnchor,0,this.lookK,this.hook),p(this.lookAcceleration,this.lookD,this.drag),d(this.lookVelocity,this.lookAcceleration,1),this.position.copy(this.velocity),this.lookAt(this.lookVelocity)}},{key:"resize",value:function(e){e.x>e.y?this.cameraResolution.set(e.x>=1200?1200:e.x,e.x>=1200?800:.66*e.x):this.cameraResolution.set(.6*(e.y>=1200?800:.66*e.y),.6*(e.y>=1200?1200:e.y)),this.setViewOffset(this.cameraResolution.x,this.cameraResolution.y,(e.x-this.cameraResolution.x)/-2,(e.y-this.cameraResolution.y)/-2,e.x,e.y),this.updateProjectionMatrix()}}])&&l(t.prototype,n),s}(r.PerspectiveCamera);function g(e){return(g="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})(e)}function x(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)}}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(e,t){return!t||"object"!==g(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function M(e){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(c,e);var t,n,i,o,a=(i=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=M(i);if(o){var n=M(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return w(this,e)});function c(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);var n=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0},hsv:{type:"v3",value:new r.Vector3},normalMap:{type:"t",value:null},surfaceTex:{type:"t",value:null},fogTex:{type:"t",value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  vPosition = mPosition.xyz;\n  vUv = uv;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"#extension GL_OES_standard_derivatives : enable\nprecision highp float;\n#define GLSLIFY 1\n\nuniform vec3 hsv;\nuniform float time;\nuniform sampler2D normalMap;\nuniform sampler2D surfaceTex;\nuniform sampler2D fogTex;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  // Get normal vector from the normal map.\n  vec3 n = texture2D(normalMap, vUv).xyz;\n\n  // Flat Shading\n  vec3 light = normalize(vec3(-1.0, 1.0, -1.0));\n  vec3 normal = normalize(cross(dFdx(vPosition), dFdy(vPosition)));\n  float diff = (dot(normal + n, light) + 1.0) / 2.0;\n\n  // the pointyness color\n  vec3 surface = texture2D(surfaceTex, vUv).rgb;\n  vec4 fog1 = texture2D(fogTex, vUv + vec2(0.0, time * 0.06));\n  vec4 fog2 = texture2D(fogTex, vUv + vec2(0.0, time * -0.03));\n  vec4 fog3 = texture2D(fogTex, vUv + vec2(0.0, time * 0.03));\n  vec4 fog4 = texture2D(fogTex, vUv + vec2(0.0, time * -0.06));\n\n  vec3 rgb = convertHsvToRgb(hsv + vec3((fog3.r + fog4.r - 1.0) * 0.16, (1.0 - surface.r) * 0.05, surface.r + (fog1.r + fog2.g - 1.0) + 0.5));\n  vec3 color = rgb;\n\n  gl_FragColor = vec4(color, 1.0);\n}\n"});return(t=a.call(this,e,n)).name="Mesh",t.rotation.set(s().radians(30*(2*Math.random()-1)),0,s().radians(30*(2*Math.random()-1))),t.axisBodyRotate=(new r.Vector3).copy(t.up).applyEuler(t.rotation),t.quaternionPrev=new r.Quaternion,t}return t=c,(n=[{key:"start",value:function(e,t,n,r){this.material.uniforms.hsv.value.set(e,.65,0),this.material.uniforms.normalMap.value=t,this.material.uniforms.surfaceTex.value=n,this.material.uniforms.fogTex.value=r}},{key:"update",value:function(e){this.material.uniforms.time.value+=e,this.quaternionPrev.copy(this.quaternion),this.quaternion.setFromAxisAngle(this.axisBodyRotate,.1*e).multiply(this.quaternionPrev)}}])&&x(t.prototype,n),c}(r.Mesh);function S(e){return(S="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})(e)}function P(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)}}function T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function R(e,t){return!t||"object"!==S(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&T(e,t)}(c,e);var t,n,i,o,a=(i=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=E(i);if(o){var n=E(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return R(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=new r.BufferGeometry,n=new r.BufferAttribute(new Float32Array(1500),3),i=new r.BufferAttribute(new Float32Array(500),1,1),o=new r.BufferAttribute(new Float32Array(500),1,1),u=0;u<500;u++){var l=s().radians(s().randomArbitrary(0,150)-75),f=s().radians(s().randomArbitrary(0,360)),h=Math.random()*Math.random()*4+2,v=s().spherical(l,f,h);n.setXYZ(u,v[0],v[1],v[2]),i.setXYZ(u,Math.random()),o.setXYZ(u,s().randomArbitrary(1,10)*(2*s().randomInt(0,1)-1))}t.setAttribute("position",n),t.setAttribute("delay",i),t.setAttribute("speed",o);var d=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0},pixelRatio:{type:"f",value:window.devicePixelRatio},hex:{type:"f",value:0}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute float delay;\nattribute float speed;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\nuniform float pixelRatio;\nuniform float hex;\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nmat4 calcRotateMat4X(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Y(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4(vec3 radian) {\n  return calcRotateMat4X(radian.x) * calcRotateMat4Y(radian.y) * calcRotateMat4Z(radian.z);\n}\n\nconst float duration = 3.0;\n\nvoid main() {\n  // calculate interval time from 0 to 1\n  float interval = mod(time + delay * duration, duration) / duration;\n\n  // update position and size\n  float size = 3.0 * sin(interval * 4.0);\n  float blink = max(\n    (sin(interval * 4.0) + cos(interval * 27.0) * 0.3 + cos(interval * 36.0) * 0.2) / 1.5 * 2.0 - 1.0,\n    0.0\n    );\n  mat4 rotateMat = calcRotateMat4(vec3(\n    radians(time * speed * 0.3),\n    radians(time * speed),\n    radians(time * speed * 0.3)\n    ));\n\n  // calculate colors\n  vec3 hsv = vec3(hex, 0.6, 1.0);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  // coordinate transformation\n  vec4 mvPosition = modelViewMatrix * rotateMat * vec4(position, 1.0);\n  float distanceFromCamera = 35.0 / length(mvPosition.xyz);\n\n  vColor = rgb;\n  vOpacity = blink * clamp(distanceFromCamera, 0.5, 1.0);\n\n  gl_Position = projectionMatrix * mvPosition;\n  gl_PointSize = distanceFromCamera * pixelRatio * size;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\nvoid main() {\n  // convert PointCoord to range from -1.0 to 1.0\n  vec2 p = gl_PointCoord * 2.0 - 1.0;\n\n  // draw double circle\n  float r = (1.0 - smoothstep(0.95, 1.0, length(p)));\n\n  gl_FragColor = vec4(vColor * r, vOpacity);\n}\n",transparent:!0,depthWrite:!1,blending:r.AdditiveBlending});return(e=a.call(this,t,d)).name="CrystalSparkle",e}return t=c,(n=[{key:"start",value:function(e){this.material.uniforms.hex.value=e}},{key:"update",value:function(e){this.material.uniforms.time.value+=e}}])&&P(t.prototype,n),c}(r.Points);function L(e){return(L="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})(e)}function C(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)}}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(e,t){return!t||"object"!==L(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function D(e){return(D=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var I=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&A(e,t)}(c,e);var t,n,i,o,a=(i=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=D(i);if(o){var n=D(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return O(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);var t=new r.PlaneGeometry(55,55),n=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0},hex:{type:"f",value:0},fogTex:{type:"t",value:null},maskTex:{type:"t",value:null},direction:{type:"v2",value:new r.Vector2}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  vPosition = position;\n  vUv = uv;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform float hex;\nuniform sampler2D fogTex;\nuniform vec2 direction;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec2 p = vUv * 2.0 - 1.0;\n\n  vec4 fog1 = texture2D(fogTex, vUv - direction * time * 0.05);\n  vec4 fog2 = texture2D(\n    fogTex,\n    vUv\n    + direction * time * 0.025\n    + vec2(\n      cos(radians(fog1.g * 360.0)) * 0.01 * cos(radians(fog1.b * 360.0)),\n      sin(radians(fog1.g * 360.0)) * 0.01 * cos(radians(fog1.b * 360.0))\n    )\n  );\n  float opacity = (pow(fog2.r, 2.0) - smoothstep(0.5, 1.0, abs(p.x)) - smoothstep(0.25, 1.0, abs(p.y)));\n\n  vec3 hsv = vec3(hex + fog2.b * 0.16, 0.9, 0.24);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  gl_FragColor = vec4(rgb, opacity);\n}\n",transparent:!0,blending:r.AdditiveBlending,depthWrite:!1});(e=a.call(this,t,n)).name="Fog";var i=s().radians(360*Math.random());return e.material.uniforms.direction.value.set(Math.cos(i),Math.sin(i)),e}return t=c,(n=[{key:"start",value:function(e,t,n){this.material.uniforms.hex.value=e,this.material.uniforms.fogTex.value=t,this.material.uniforms.maskTex.value=n}},{key:"update",value:function(e){this.material.uniforms.time.value+=e}}])&&C(t.prototype,n),c}(r.Mesh);function k(e){return(k="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})(e)}function F(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)}}function j(e,t){return(j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function U(e,t){return!t||"object"!==k(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var G=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&j(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=B(i);if(o){var n=B(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return U(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.SphereGeometry(100,12,12),n=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0},hex:{type:"f",value:0}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  vUv = uv;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform float hex;\n\nvarying vec2 vUv;\nvarying vec3 vColor;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec3 rgb = mix(\n    convertHsvToRgb(vec3(hex, 0.6, 0.6)),\n    convertHsvToRgb(vec3(hex, 0.4, 0.2)),\n    vUv.y * 4.0 - 1.0\n    );\n\n  gl_FragColor = vec4(rgb, 1.0);\n}\n",side:r.BackSide,depthTest:!1});return(e=a.call(this,t,n)).name="Background",e}return t=s,(n=[{key:"start",value:function(){}},{key:"update",value:function(e,t){this.material.uniforms.time.value+=e,this.material.uniforms.hex.value=t}}])&&F(t.prototype,n),s}(r.Mesh),N="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vUv = uv;\n\n  gl_Position = vec4(position, 1.0);\n}\n";function H(e){return(H="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})(e)}function V(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)}}function W(e,t){return(W=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Z(e,t){return!t||"object"!==H(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function q(e){return(q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&W(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=q(i);if(o){var n=q(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Z(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.PlaneGeometry(2,2),n=new r.RawShaderMaterial({uniforms:{minBright:{type:"f",value:.5},texture:{type:"t",value:null}},vertexShader:N,fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float minBright;\nuniform sampler2D texture;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vec4 bright = max(vec4(0.0), (texture2D(texture, vUv) - minBright));\n  gl_FragColor = bright;\n}\n"});return(e=a.call(this,t,n)).name="PostEffectBright",e}return t=s,(n=[{key:"start",value:function(e){this.material.uniforms.texture.value=e}}])&&V(t.prototype,n),s}(r.Mesh);function X(e){return(X="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})(e)}function K(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)}}function Q(e,t){return(Q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function J(e,t){return!t||"object"!==X(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $(e){return($=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ee=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Q(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=$(i);if(o){var n=$(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return J(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.PlaneGeometry(2,2),n=new r.RawShaderMaterial({uniforms:{resolution:{type:"v2",value:new r.Vector2},direction:{type:"v2",value:new r.Vector2},texture:{type:"t",value:null}},vertexShader:N,fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform vec2 resolution;\nuniform vec2 direction;\nuniform sampler2D texture;\n\nvarying vec2 vUv;\n\nvec4 gaussianBlur(sampler2D texture, vec2 uv, float radius, vec2 resolution, vec2 direction) {\n  vec4 color = vec4(0.0);\n  vec2 step = radius / resolution * direction;\n  color += texture2D(texture, uv - 4.0 * step) * 0.02699548325659403;\n  color += texture2D(texture, uv - 3.0 * step) * 0.06475879783294587;\n  color += texture2D(texture, uv - 2.0 * step) * 0.12098536225957168;\n  color += texture2D(texture, uv - 1.0 * step) * 0.17603266338214976;\n  color += texture2D(texture, uv) * 0.19947114020071635;\n  color += texture2D(texture, uv + 1.0 * step) * 0.17603266338214976;\n  color += texture2D(texture, uv + 2.0 * step) * 0.12098536225957168;\n  color += texture2D(texture, uv + 3.0 * step) * 0.06475879783294587;\n  color += texture2D(texture, uv + 4.0 * step) * 0.02699548325659403;\n  return color;\n}\n\nvoid main() {\n  vec4 color = gaussianBlur(texture, vUv, 1.0, resolution, direction);\n  gl_FragColor = color;\n}\n"});return(e=a.call(this,t,n)).name="PostEffectBlur",e}return t=s,(n=[{key:"start",value:function(e,t,n){this.material.uniforms.texture.value=e,this.material.uniforms.direction.value.set(t,n)}},{key:"resize",value:function(e,t){this.material.uniforms.resolution.value.set(e,t)}}])&&K(t.prototype,n),s}(r.Mesh);function te(e){return(te="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})(e)}function ne(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)}}function re(e,t){return(re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ie(e,t){return!t||"object"!==te(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function oe(e){return(oe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ae,se=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&re(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=oe(i);if(o){var n=oe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ie(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.PlaneGeometry(2,2),n=new r.RawShaderMaterial({uniforms:{texture1:{type:"t",value:null},texture2:{type:"t",value:null}},vertexShader:N,fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture1;\nuniform sampler2D texture2;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vec4 color1 = texture2D(texture1, vUv);\n  vec4 color2 = texture2D(texture2, vUv);\n  gl_FragColor = color1 + color2;\n}\n"});return(e=a.call(this,t,n)).name="PostEffectBloom",e}return t=s,(n=[{key:"start",value:function(e,t){this.material.uniforms.texture1.value=e,this.material.uniforms.texture2.value=t}}])&&ne(t.prototype,n),s}(r.Mesh);function ce(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function ue(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)}}var le=new r.Scene,fe=new y,he=new r.Clock({autoStart:!1}),ve=new c.L,de=new r.TextureLoader,pe=new r.WebGLRenderTarget,me=new r.WebGLRenderTarget,ye=new r.WebGLRenderTarget,ge=new r.Scene,xe=new r.OrthographicCamera(-1,1,1,-1,1,2),be=[],we=[],Me=[],_e=new r.Vector3,Se=new r.Vector3,Pe=new G,Te=new Y,Re=new ee,Ee=new ee,ze=new se,Le=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i,o;return t=e,(n=[{key:"start",value:(i=regeneratorRuntime.mark((function e(t){var n,i,o,a,c,u,l,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(ae=new r.WebGL1Renderer({alpha:!0,antialias:!0,canvas:t})).setPixelRatio(window.devicePixelRatio),ae.setClearColor(921102,1),fe.start(),Te.start(pe.texture),Re.start(me.texture,1,0),Ee.start(ye.texture,0,1),ze.start(pe.texture,me.texture),e.next=10,Promise.all([ve.loadAsync("/sketch-threejs/model/crystal/crystal.obj"),de.loadAsync("/sketch-threejs/img/sketch/crystal/normal.jpg"),de.loadAsync("/sketch-threejs/img/sketch/crystal/surface.jpg"),de.loadAsync("/sketch-threejs/img/sketch/crystal/fog.jpg")]).then((function(e){n=e[0].children.map((function(e){return e.geometry})),i=e[1],o=e[2],(a=e[3]).wrapS=r.RepeatWrapping,a.wrapT=r.RepeatWrapping})).catch((function(e){console.log(e)}));case 10:for(c=0;c<20;c++)u=s().radians(c/20*360),be[c]=new _(n[c%3]),be[c].position.set(35*Math.cos(u),0,35*Math.sin(u)),be[c].start(c/20,i,o,a),le.add(be[c]),we[c]=new z,we[c].position.copy(be[c].position),we[c].start(c/20),le.add(we[c]);for(c=0;c<40;c++)l=s().radians(c/40*360),f=s().radians(c/40*-360-90),Me[c]=new I,Me[c].position.set(100*Math.cos(l),-18-8*Math.sin(s().radians(c/40*360*8)),100*Math.sin(l)),Me[c].rotation.set(0,f,0),Me[c].start(c/40,a),le.add(Me[c]);le.add(Pe),_e.copy(be[0].position);case 14:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=i.apply(e,t);function a(e){ce(o,n,r,a,s,"next",e)}function s(e){ce(o,n,r,a,s,"throw",e)}a(void 0)}))},function(e){return o.apply(this,arguments)})},{key:"stop",value:function(){this.pause()}},{key:"play",value:function(e){he.start(),this.update(e)}},{key:"pause",value:function(){he.stop()}},{key:"update",value:function(e){if(!1!==he.running){for(var t=he.getDelta(),n=0;n<be.length;n++)be[n].update(t),we[n].update(t);for(n=0;n<Me.length;n++)Me[n].update(t);Pe.update(t,Math.atan2(fe.lookVelocity.z,fe.lookVelocity.x)/s().radians(360)),_e.set(Math.cos(s().radians(.6*-e.anchor.x)),0,Math.sin(s().radians(.6*-e.anchor.x))),fe.lookAnchor.copy(_e.clone().add(Se.clone().applyQuaternion(fe.quaternion))),fe.update(),ae.setRenderTarget(pe),ae.render(le,fe),ge.add(Te),ae.setRenderTarget(me),ae.render(ge,xe),ge.remove(Te),ge.add(Re),ae.setRenderTarget(ye),ae.render(ge,xe),ge.remove(Re),ge.add(Ee),ae.setRenderTarget(me),ae.render(ge,xe),ge.remove(Ee),ge.add(ze),ae.setRenderTarget(null),ae.render(ge,xe),ge.remove(ze)}}},{key:"resize",value:function(e){fe.resize(e),ae.setSize(e.x,e.y),pe.setSize(e.x*ae.getPixelRatio(),e.y*ae.getPixelRatio()),me.setSize(e.x*ae.getPixelRatio(),e.y*ae.getPixelRatio()),ye.setSize(e.x*ae.getPixelRatio(),e.y*ae.getPixelRatio()),Ee.resize(e.x/3,e.y/3),Re.resize(e.x/3,e.y/3)}},{key:"pan",value:function(e){Se.copy(e)}}])&&ue(t.prototype,n),e}();function Ce(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)}}var Ae=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolution=t,this.vTouchStart=new r.Vector2,this.vPrev=new r.Vector2,this.v=new r.Vector2,this.a=new r.Vector2,this.anchor=new r.Vector2,this.isTouched=!1}var t,n;return t=e,(n=[{key:"update",value:function(){this.a.set((this.anchor.x-this.v.x)/10,(this.anchor.y-this.v.y)/10),this.v.add(this.a)}},{key:"touchStart",value:function(e){e.touches||e.preventDefault(),this.vPrev.copy(this.v),this.a.set(0,0),this.vTouchStart.set(e.touches?e.touches[0].clientX:e.clientX,e.touches?e.touches[0].clientY:e.clientY),this.isTouched=!0}},{key:"touchMove",value:function(e){e.preventDefault();var t=e.touches?e.touches[0].clientX:e.clientX,n=e.touches?e.touches[0].clientY:e.clientY;!1!==this.isTouched&&this.anchor.set((t-this.vTouchStart.x)/(this.resolution.x/200)+this.vPrev.x,s().clamp((n-this.vTouchStart.y)/(this.resolution.y/200)+this.vPrev.y,-90,90))}},{key:"touchEnd",value:function(e){this.isTouched=!1}}])&&Ce(t.prototype,n),e}();function Oe(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function De(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Oe(o,r,i,a,s,"next",e)}function s(e){Oe(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Ie(){return ke.apply(this,arguments)}function ke(){return(ke=De(regeneratorRuntime.mark((function e(){var t,n,i,a,s,c,u,l,f,h,v,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new Le,n=new r.Vector2,i=new r.Vector3,a=document.getElementById("canvas-webgl"),s=document.querySelector(".p-preloader"),c=new Ae(n),u=function(){n.set(document.body.clientWidth,window.innerHeight),a.width=n.x,a.height=n.y,t.resize(n)},l=function(e){c.touchStart(e)},f=function(e){c.touchMove(e)},h=function(e){c.touchEnd(e)},v=function(){a.addEventListener("mousedown",l,{passive:!1}),window.addEventListener("mousemove",(function(e){f(e),i.set(.1*(e.clientX/n.x*2-1),.1*(-e.clientY/n.y*2+1),0),t.pan(i)})),document.addEventListener("mouseleave",(function(e){i.set(0,0,0),t.pan(i)})),window.addEventListener("mouseup",h),a.addEventListener("touchstart",l,{passive:!1}),window.addEventListener("touchmove",f,{passive:!1}),window.addEventListener("touchend",h),window.addEventListener("resize",o()(u,100))},d=function e(){c.update(n),t.update(c),requestAnimationFrame(e)},e.next=14,t.start(a);case 14:v(),u(),s.classList.add("is-hidden"),t.play(c),d();case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},12700:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}});var i=n(2212),o=n(17393),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0}},this.instances=2e3,this.obj}var t,a;return t=e,(a=[{key:"createObj",value:function(){var e=new i.InstancedBufferGeometry,t=new i.BoxGeometry(100,4e3,2,2,2);e.copy(t);for(var r=new i.InstancedBufferAttribute(new Float32Array(3*this.instances),3),a=new i.InstancedBufferAttribute(new Float32Array(this.instances),1),s=new i.InstancedBufferAttribute(new Float32Array(this.instances),1),c=0,u=this.instances;c<u;c++)r.setXYZ(c,o.randomArbitrary(-5e3,5e3),0,o.randomArbitrary(-500,500)+700*(2*o.randomInt(0,1)-1)),a.setXYZ(c,2*Math.random()),s.setXYZ(c,.3*Math.random());e.setAttribute("instancePosition",r),e.setAttribute("delay",a),e.setAttribute("h",s);var l=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(75923).Z,fragmentShader:n(83528).Z,depthWrite:!1,transparent:!0,side:i.DoubleSide,blending:i.AdditiveBlending});this.obj=new i.InstancedMesh(e,l,this.instances)}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&r(t.prototype,a),e}()},30131:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=(n(17393),function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0}},this.isShown=!1,this.obj}var t,o;return t=e,(o=[{key:"createObj",value:function(){var e=new i.SphereGeometry(1e4,32,32),t=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(97550).Z,fragmentShader:n(63819).Z,side:i.BackSide});this.obj=new i.Mesh(e,t)}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&r(t.prototype,o),e}())},2925:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=(n(17393),function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},wave1:{type:"f",value:0},wave2:{type:"f",value:0},wave3:{type:"f",value:0},wave4:{type:"f",value:0}},this.obj}var t,o;return t=e,(o=[{key:"createObj",value:function(e,t,r,o,a){var s=new i.SphereGeometry(e,64,64),c=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(21750).Z,fragmentShader:n(57139).Z,transparent:!0,depthWrite:!1,side:i.BackSide,blending:i.AdditiveBlending});this.uniforms.wave1.value=t,this.uniforms.wave2.value=r,this.uniforms.wave3.value=o,this.uniforms.wave4.value=a,this.obj=new i.Mesh(s,c)}},{key:"render",value:function(e,t,n,r){this.uniforms.time.value+=e,this.obj.rotation.set(t,this.uniforms.time.value*n,r)}}])&&r(t.prototype,o),e}())},67735:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}}),n(2212);var i=n(90887),o=(n(17393),function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.camera=t,this.anchorTilt=[0,0,0]}var t,n;return t=e,(n=[{key:"init",value:function(e,t){for(var n=0;n<e.length;n++)this.camera.anchor[n]=this.camera.velocity[n]=e[n],this.camera.lookAnchor[n]=this.camera.lookVelocity[n]=t[n]}},{key:"tilt",value:function(e){this.anchorTilt=[-50*e.x,25*e.y,0]}},{key:"move",value:function(e,t,n){for(var r=0;r<e.length;r++)this.camera.anchor[r]=e[r],this.camera.lookAnchor[r]=t[r];n>0&&this.focalLength.next!==n&&(this.focalLength.prev=this.focalLength.next,this.focalLength.next=n,this.focalLength.time=0)}},{key:"render",value:function(e,t){this.tilt(t),i.vec3.add(this.camera.velocity,this.camera.velocity,this.anchorTilt),this.camera.render()}}])&&r(t.prototype,n),e}())},40602:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}});var i=n(2212),o=n(17393),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0}},this.num=2e3,this.obj}var t,a;return t=e,(a=[{key:"createObj",value:function(){for(var e=new i.BufferGeometry,t=new i.BufferAttribute(new Float32Array(3*this.num),3,1),r=new i.BufferAttribute(new Float32Array(this.num),1,1),a=new i.BufferAttribute(new Float32Array(this.num),1,1),s=0,c=this.num;s<c;s++){var u=o.radians(o.randomArbitrary(0,150)-75),l=o.radians(o.randomArbitrary(0,360)),f=o.randomArbitrary(600,2500),h=o.spherical(u,l,f);t.setXYZ(s,h[0],h[1],h[2]),r.setXYZ(s,Math.random()),a.setXYZ(s,o.randomArbitrary(5,10)*(2*o.randomInt(0,1)-1))}e.setAttribute("position",t),e.setAttribute("delay",r),e.setAttribute("speed",a);var v=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(51263).Z,fragmentShader:n(80261).Z,transparent:!0,depthWrite:!1,blending:i.AdditiveBlending});this.obj=new i.Points(e,v)}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&r(t.prototype,a),e}()},15642:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=(n(17393),function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},texture1:{type:"t",value:null},texture2:{type:"t",value:null},texture3:{type:"t",value:null}},this.num=6,this.obj}var t,o;return t=e,(o=[{key:"createObj",value:function(e){var t=new i.InstancedBufferGeometry,r=new i.PlaneGeometry(1200,1200,2,2);t.copy(r);for(var o=new i.InstancedBufferAttribute(new Float32Array(3*this.num),3),a=new i.InstancedBufferAttribute(new Float32Array(this.num),1),s=new i.InstancedBufferAttribute(new Float32Array(this.num),1),c=new i.InstancedBufferAttribute(new Float32Array(this.num),1),u=new i.InstancedBufferAttribute(new Float32Array(this.num),1),l=0,f=this.num;l<f;l++)o.setXYZ(l,0,0,-150*(this.num-l)),a.setXYZ(l,2*Math.random()-1),s.setXYZ(l,2*Math.random()-1),c.setXYZ(l,2*Math.random()-1),u.setXYZ(l,.15*(2*Math.random()-1));t.setAttribute("instancePosition",o),t.setAttribute("rotate1",a),t.setAttribute("rotate2",s),t.setAttribute("rotate3",c),t.setAttribute("h",u);var h=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(40233).Z,fragmentShader:n(54691).Z,transparent:!0,blending:i.AdditiveBlending});this.uniforms.texture1.value=e[0],this.uniforms.texture2.value=e[1],this.uniforms.texture3.value=e[2],this.obj=new i.InstancedMesh(t,h,this.num)}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&r(t.prototype,o),e}())},58525:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}});var i=n(2212),o=n(17393),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0}},this.obj,this.objWire=null,this.objPoints=null}var t,a;return t=e,(a=[{key:"createObj",value:function(){var e=new i.RingGeometry(1550,1600,36,2,o.radians(135),o.radians(270)),t=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(85345).Z,fragmentShader:n(45943).Z,depthWrite:!1,transparent:!0,blending:i.AdditiveBlending}),r=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(85345).Z,fragmentShader:n(2766).Z,depthWrite:!1,transparent:!0,blending:i.AdditiveBlending,wireframe:!0}),a=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(4798).Z,fragmentShader:n(97125).Z,depthWrite:!1,transparent:!0,blending:i.AdditiveBlending});this.obj=new i.Mesh(e,t),this.objWire=new i.Mesh(e,r),this.objPoints=new i.Points(e,a),this.obj.position.set(0,0,-1200),this.objWire.position.set(0,0,-1200),this.objPoints.position.set(0,0,-1200)}},{key:"render",value:function(e){this.uniforms.time.value+=e;var t=[o.radians(20*Math.sin(.1*this.uniforms.time.value)+90),o.radians(20*Math.sin(.05*this.uniforms.time.value)),0];this.obj.rotation.set(t[0],t[1],t[2]),this.objWire.rotation.set(t[0],t[1],t[2]),this.objPoints.rotation.set(t[0],t[1],t[2])}}])&&r(t.prototype,a),e}()},57262:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(2212),i=n(38314),o=n(17393),a=n(4679),s=n(71243),c=n(97355).Z,u=n(59170).Z,l=n(67735).Z,f=n(15642).Z,h=n(12700).Z,v=n(58525).Z,d=n(40602).Z,p=n(30131).Z,m=n(2925).Z;function y(){var e=new r.Vector2,t=new r.Vector2,n=document.getElementById("canvas-webgl"),y=new r.WebGL1Renderer({alpha:!0,antialias:!0,canvas:n}),g=new r.Scene,x=new c,b=new l(x),w=new r.Clock;x.far=5e4,x.setFocalLength(24);var M=new f,_=new h,S=new v,P=new d,T=new p,R=new m,E=new m,z=function e(){var n;n=w.getDelta(),M.render(n),_.render(n),S.render(n),P.render(n),T.render(n),R.render(n,.1,.1,.3),E.render(n,-.2,.02,-.8),b.render(n,t),y.render(g,x),requestAnimationFrame(e)},L=function(){e.set(document.body.clientWidth,window.innerHeight),n.width=e.x,n.height=e.y,x.aspect=e.x/e.y,x.updateProjectionMatrix(),y.setSize(e.x,e.y)};u({gui1:"img/cyberspace/tex_gui01.png",gui2:"img/cyberspace/tex_gui02.png",gui3:"img/cyberspace/tex_gui03.png"},(function(n){M.createObj([n.gui1,n.gui2,n.gui3]),_.createObj(),S.createObj(),P.createObj(),T.createObj(),R.createObj(1200,284.1,398.6,601.2,828.4),E.createObj(2400,222.6,412.4,683.9,961.2),g.add(M.obj),g.add(_.obj),g.add(S.obj),g.add(S.objWire),g.add(S.objPoints),g.add(P.obj),g.add(T.obj),g.add(R.obj),g.add(E.obj),T.obj.position.set(0,0,-2e3),y.setClearColor(0,1),b.init([0,0,1e3],[0,0,0]),w.start(),window.addEventListener("resize",i(L,1e3)),a()||s()?window.addEventListener("deviceorientation",(function(n){e.x/e.y<1?t.set(n.gamma/60,o.clamp(Math.abs(n.beta)-90,-90,90)/-30):t.set(0,0)})):(window.addEventListener("mousemove",(function(n){t.set(n.clientX/e.x*2-1,-(n.clientY/e.y*2-1))})),window.addEventListener("mouseout",(function(e){t.set(0,0)}))),L(),z()}))}},37175:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(2212),i=n(38314),o=n.n(i),a=n(29130),s=n.n(a);function c(e){return(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})(e)}function u(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)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(c,e);var t,i,o,a,s=(o=c,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(o);if(a){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return f(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);var t=new r.PlaneGeometry(2,2),i=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0},interval:{type:"f",value:5},duration:{type:"f",value:3},resolution:{type:"v2",value:new r.Vector2},imageResolution:{type:"v2",value:new r.Vector2(2048,1356)},textures:{type:"f",value:0}},vertexShader:n(54312).Z,fragmentShader:n(88940).Z});return(e=s.call(this,t,i)).name="Mesh",e}return t=c,(i=[{key:"start",value:function(e,t){this.resize(e);for(var n=0;n<t.length;n++)t[n].magFilter=r.NearestFilter,t[n].minFilter=r.NearestFilter;this.material.uniforms.textures.value=t}},{key:"update",value:function(e){this.material.uniforms.time.value+=e}},{key:"resize",value:function(e){this.material.uniforms.resolution.value.copy(e)}}])&&u(t.prototype,i),c}(r.Mesh);function d(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){d(o,r,i,a,s,"next",e)}function s(e){d(o,r,i,a,s,"throw",e)}a(void 0)}))}}var m=new r.TextureLoader;function y(){return g.apply(this,arguments)}function g(){return(g=p(regeneratorRuntime.mark((function e(){var t,n,i,a,c,u,l,f,h,d,p,y,g;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new r.Vector2,n=document.getElementById("canvas-webgl"),i=new r.WebGL1Renderer({alpha:!0,antialias:!0,canvas:n}),a=new r.Scene,c=new r.PerspectiveCamera,u=new r.Clock({autoStart:!1}),l=document.querySelector(".p-preloader"),f=new v,h=function(){var e=u.getDelta();f.update(e),i.render(a,c)},d=function e(){h(),requestAnimationFrame(e)},p=function(){c.setViewOffset(1200,800,(t.x-1200)/-2,(t.y-800)/-2,t.x,t.y),c.updateProjectionMatrix()},y=function(){t.set(document.body.clientWidth,window.innerHeight),n.width=t.x,n.height=t.y,p(),f.resize(t),i.setSize(t.x,t.y)},g=function(){window.addEventListener("resize",o()(y,1e3))},i.setClearColor(15658734,1),c.aspect=1.5,c.far=1e3,c.setFocalLength(50),c.position.set(0,0,300),c.lookAt(new r.Vector3),g(),y(),e.next=23,Promise.all([m.loadAsync("/sketch-threejs/img/sketch/dissolve/osaka01.jpg"),m.loadAsync("/sketch-threejs/img/sketch/dissolve/osaka02.jpg"),m.loadAsync("/sketch-threejs/img/sketch/dissolve/osaka03.jpg"),m.loadAsync("/sketch-threejs/img/sketch/dissolve/osaka04.jpg"),m.loadAsync("/sketch-threejs/img/sketch/dissolve/osaka05.jpg")]).then((function(e){f.start(t,e)}));case 23:return a.add(f),l.classList.add("is-hidden"),e.next=27,s()(200);case 27:u.start(),d();case 29:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},19963:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(2212),i=n(38314),o=n.n(i),a=n(89813),s=n(12390),c=n.n(s),u=n(97719);function l(){var e,t,i,s,l,f,h,v,d=document.getElementById("canvas-webgl"),p=new r.WebGL1Renderer({antialias:!0,canvas:d}),m=new r.Scene,y=new u.Z(35,window.innerWidth/window.innerHeight,1,1e4),g=(new r.Clock,null),x=null,b=new r.HemisphereLight(16777215,6710886,1),w=new r.Scene,M=new u.Z(45,window.innerWidth/window.innerHeight,1,1e4),_=new r.HemisphereLight(16777215,6710886,1),S=new(c()),P=1,T=new r.WebGLRenderTarget(window.innerWidth,window.innerHeight,{magFilter:r.NearestFilter,minFilter:r.NearestFilter,wrapS:r.ClampToEdgeWrapping,wrapT:r.ClampToEdgeWrapping}),R=null,E=function(){d.width=window.innerWidth,d.height=window.innerHeight,y.aspect=window.innerWidth/window.innerHeight,y.updateProjectionMatrix(),p.setSize(window.innerWidth,window.innerHeight),T.setSize(window.innerWidth,window.innerHeight),M.resize(window.innerWidth,window.innerHeight),R.material.uniforms.resolution.value.set(window.innerWidth,window.innerHeight)};p.setSize(window.innerWidth,window.innerHeight),p.setClearColor(15658734,1),y.position.set(1e3,1e3,1e3),y.lookAt(new r.Vector3),i=new r.Vector2,s=new r.Vector2,l=new r.Vector2,f=function(e,t,n){i.set(e,t),(0,a.Z)(i),S.anchor.x<3?(S.k+=.005,S.d-=.02,S.anchor.x+=.8,P+=.4):(S.k=.05,S.d=.16,S.anchor.x=1,P=1)},h=function(e,t,n){s.set(e,t),(0,a.Z)(s)},v=function(e,t,n){l.set(e,t)},window.addEventListener("resize",o()((function(){E()})),1e3),d.addEventListener("mousedown",(function(e){e.preventDefault(),f(e.clientX,e.clientY)})),d.addEventListener("mousemove",(function(e){e.preventDefault(),h(e.clientX,e.clientY)})),d.addEventListener("mouseup",(function(e){e.preventDefault(),v(e.clientX,e.clientY)})),d.addEventListener("touchstart",(function(e){e.preventDefault(),f(e.touches[0].clientX,e.touches[0].clientY)})),d.addEventListener("touchmove",(function(e){e.preventDefault(),h(e.touches[0].clientX,e.touches[0].clientY)})),d.addEventListener("touchend",(function(e){e.preventDefault(),v(e.changedTouches[0].clientX,e.changedTouches[0].clientY)})),window.addEventListener("mouseout",(function(){event.preventDefault(),l.set(0,0)})),document.body.className="bg-white",e=new r.OctahedronGeometry(200,16),t=new r.ShaderMaterial({uniforms:r.UniformsUtils.merge([r.UniformsLib.lights,{time:{type:"f",value:0},radius:{type:"f",value:1},distort:{type:"f",value:.4}}]),vertexShader:n(67112).Z,fragmentShader:n(61786).Z,lights:!0}),g=new r.Mesh(e,t),w.add(g),x=function(){var e=new r.SphereGeometry(1800),t=new r.MeshPhongMaterial({side:r.BackSide});return new r.Mesh(e,t)}(),w.add(x),w.add(_),M.force.position.anchor.set(1800,1800,0),M.force.look.anchor.set(0,0,0),R=function(){var e=new r.PlaneGeometry(2,2),t=new r.ShaderMaterial({uniforms:{time:{type:"f",value:0},resolution:{type:"v2",value:new r.Vector2(window.innerWidth,window.innerHeight)},acceleration:{type:"f",value:0},texture:{type:"t",value:T.texture}},vertexShader:n(11697).Z,fragmentShader:n(19820).Z});return new r.Mesh(e,t)}(),m.add(R),m.add(b),y.force.position.anchor.set(1800,1800,0),y.force.look.anchor.set(0,0,0),S.anchor.set(1,0),S.anchor.set(1,0),S.velocity.set(1,0),S.k=.045,S.d=.16,E(),function e(){S.applyHook(0,S.k),S.applyDrag(S.d),S.updateVelocity(),g.material.uniforms.time.value+=P,g.material.uniforms.radius.value=S.velocity.x,g.material.uniforms.distort.value=S.velocity.x/2-.1,M.force.position.applyHook(0,.025),M.force.position.applyDrag(.2),M.force.position.updateVelocity(),M.updatePosition(),M.force.look.applyHook(0,.2),M.force.look.applyDrag(.4),M.force.look.updateVelocity(),M.updateLook(),R.material.uniforms.time.value+=P,R.material.uniforms.acceleration.value=S.acceleration.length(),y.force.position.applyHook(0,.025),y.force.position.applyDrag(.2),y.force.position.updateVelocity(),y.updatePosition(),y.force.look.applyHook(0,.2),y.force.look.applyDrag(.4),y.force.look.updateVelocity(),y.lookAt(y.force.look.velocity),p.setRenderTarget(T),p.render(w,M),p.setRenderTarget(null),p.render(m,y),requestAnimationFrame(e)}()}},67687:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var r=n(2212),i=n(38314),o=n.n(i),a=n(29130),s=n.n(a),c=n(17393),u=n.n(c);function l(e){return(l="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})(e)}function f(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)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(c,e);var t,i,o,a,s=(o=c,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=d(o);if(a){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return v(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=new r.BufferGeometry,i=6e3,o=12e3,a=new r.BufferAttribute(new Float32Array(36e3),3),l=new r.BufferAttribute(new Float32Array(o),1),f=new r.BufferAttribute(new Float32Array(o),1),h=new r.BufferAttribute(new Float32Array(o),1),v=0;v<i;v++){var d=Math.random(),p={x:(2*Math.random()-1)*d*6,y:(2*Math.random()-1)*d*6,z:(2*Math.random()-1)*d*6};a.setXYZ(v,150*(v/i*2-1)+p.x,p.y,p.z),l.setX(v,u().radians(v/i*900+v%2*180)),f.setX(v,18),h.setX(v,u().radians(360*Math.random()))}for(var m=0;m<60;m++)for(var y=u().radians(m/60*900),g=0;g<100;g++){var x=100*m+g+i,b=Math.random(),w={x:(2*Math.random()-1)*b*1,y:(2*Math.random()-1)*b*1,z:(2*Math.random()-1)*b*1};a.setXYZ(x,150*(m/60*2-1)+w.x,w.y,w.z),l.setX(x,y),f.setX(x,18*(g/100*2-1)),h.setX(x,u().radians(360*Math.random()))}t.setAttribute("position",a),t.setAttribute("radian",l),t.setAttribute("radius",f),t.setAttribute("delay",h);var M=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0}},vertexShader:n(29277).Z,fragmentShader:n(90217).Z,transparent:!0,blending:r.AdditiveBlending,depthWrite:!1});return(e=s.call(this,t,M)).name="DNA Herix",e}return t=c,(i=[{key:"render",value:function(e){this.material.uniforms.time.value+=e}}])&&f(t.prototype,i),c}(r.Points);function m(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)}}var y=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},texture:{type:"t",value:t},resolution:{type:"v2",value:new r.Vector2}},this.obj}var t,i;return t=e,(i=[{key:"createObj",value:function(){var e=new r.PlaneGeometry(2,2),t=new r.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(60125).Z,fragmentShader:n(59339).Z});this.obj=new r.Mesh(e,t),this.obj.name="PostEffect"}},{key:"resize",value:function(e,t){this.uniforms.resolution.value.set(e,t)}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&m(t.prototype,i),e}();function g(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function x(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){g(o,r,i,a,s,"next",e)}function s(e){g(o,r,i,a,s,"throw",e)}a(void 0)}))}}function b(){return w.apply(this,arguments)}function w(){return(w=x(regeneratorRuntime.mark((function e(){var t,n,i,a,c,u,l,f,h,v,d,m,g,x,b,w,M;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new r.Vector2,n=document.getElementById("canvas-webgl"),i=new r.WebGL1Renderer({alpha:!0,antialias:!0,canvas:n}),a=new r.Scene,c=new r.PerspectiveCamera,u=new r.Clock({autoStart:!1}),l=new r.WebGLRenderTarget,f=new r.Scene,h=new r.OrthographicCamera(-1,1,1,-1,1,2),v=document.querySelector(".p-preloader"),d=new p,(m=new y(l.texture)).createObj(),f.add(m.obj),g=function(){var e=u.getDelta();d.render(e),i.setRenderTarget(l),i.render(a,c),m.render(e),i.setRenderTarget(null),i.render(f,h)},x=function e(){g(),requestAnimationFrame(e)},b=function(){c.setFocalLength(50),c.setViewOffset(1200,800,(t.x-1200)/-2,(t.y-800)/-2,t.x,t.y),c.updateProjectionMatrix()},w=function(){t.set(document.body.clientWidth,window.innerHeight),n.width=t.x,n.height=t.y,b(),i.setSize(t.x,t.y),l.setSize(t.x,t.y),m.resize(t.x,t.y)},M=function(){window.addEventListener("blur",(function(){u.stop()})),window.addEventListener("focus",(function(){u.start()})),window.addEventListener("resize",o()(w,1e3))},i.setClearColor(0,1),c.aspect=1.5,c.far=1e3,c.position.set(-110,-75,45),c.lookAt(new r.Vector3(0,0,0)),a.add(d),M(),w(),v.classList.add("is-hidden"),e.next=30,s()(200);case 30:u.start(),x();case 32:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},61954:function(e,t,n){"use strict";n.d(t,{Z:function(){return L}});var r=n(2212),i=n(38314),o=n.n(i),a=n(29130),s=n.n(a),c=n(17393),u=n.n(c);function l(e){return(l="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})(e)}function f(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)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=d(i);if(o){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return v(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.PlaneGeometry(20,10),n=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0},texture:{type:"t",value:null},textureNoise:{type:"t",value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  vPosition = position;\n  vUv = uv;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D texture;\nuniform sampler2D textureNoise;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nfloat random(vec2 c){\n  return fract(sin(dot(c.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\nvec4 getGlitchColor(vec2 uv, float force) {\n  vec2 r = vec2(\n    random(vec2(ceil(time * 20.0), 0.0)) * 2.0 - 1.0,\n    random(vec2(0.0, ceil(time * 20.0))) * 2.0 - 1.0\n  );\n  vec2 noiseUv = uv + r * 0.001;\n  float mask = smoothstep(\n    length(vec3(1.0)) - force * 0.004,\n    length(vec3(1.0)),\n    length(texture2D(textureNoise, uv * vec2(0.2, 0.4) * r).rgb)\n    );\n  vec4 texColor = texture2D(texture, noiseUv + r * 0.01 * force) * (1.0 - mask);\n  vec4 texColorDiff = texture2D(texture, noiseUv + r * force) * mask;\n  return texColor + texColorDiff;\n}\n\nvoid main() {\n  float shake = random(vec2(time));\n  float force = smoothstep(0.5, 1.0, sin(time * 4.0) * 0.8 + sin(time * 5.0) + 0.2);\n\n  vec2 uvR = vUv + vec2(-0.008 - shake * 0.002, 0.0);\n  vec2 uvG = vUv + vec2( 0.0, 0.0);\n  vec2 uvB = vUv + vec2( 0.008 + shake * 0.002, 0.0);\n\n  vec4 r = getGlitchColor(uvR, force) * vec4(1.0, 0.0, 0.0, 1.0);\n  vec4 g = getGlitchColor(uvG, force) * vec4(0.0, 1.0, 0.0, 1.0);\n  vec4 b = getGlitchColor(uvB, force) * vec4(0.0, 0.0, 1.0, 1.0);\n  vec4 color = r + g + b;\n\n  if (color.a < 0.1) discard;\n\n  gl_FragColor = color;\n}\n",transparent:!0,blending:r.AdditiveBlending});return(e=a.call(this,t,n)).name="Typo",e}return t=s,(n=[{key:"start",value:function(e,t){this.material.uniforms.texture.value=e,this.material.uniforms.textureNoise.value=t}},{key:"update",value:function(e){this.material.uniforms.time.value+=e}}])&&f(t.prototype,n),s}(r.Mesh);function m(e){return(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})(e)}function y(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)}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function x(e,t){return!t||"object"!==m(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=b(i);if(o){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return x(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.InstancedBufferGeometry,n=new r.OctahedronGeometry(2,0);t.copy(n);for(var i=new r.InstancedBufferAttribute(new Float32Array(90),3),o=new r.InstancedBufferAttribute(new Float32Array(30),1),c=(new r.Vector3,0);c<30;c++)i.setXYZ(c,3*c+15,0,0),o.setXYZ(c,c);t.setAttribute("iPosition",i),t.setAttribute("iIds",o);var l=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\nattribute vec3 iPosition;\nattribute float iIds;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform float time;\n\nvarying vec3 vPosition;\n\nmat4 calcRotateMat4X(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Y(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4(vec3 radian) {\n  return calcRotateMat4X(radian.x) * calcRotateMat4Y(radian.y) * calcRotateMat4Z(radian.z);\n}\n\nvoid main(void) {\n  // coordinate transformation\n  mat4 rotateMat = calcRotateMat4(vec3(radians(iIds * 20.0 + time * 4.0)));\n  vec3 rotatePosition = (rotateMat * vec4(position, 1.0)).xyz;\n  mat4 rotateMatWorld = calcRotateMat4Y(radians(iIds * 56.0 + time * 0.5));\n  vec4 mPosition = modelMatrix * rotateMatWorld * vec4(iPosition + rotatePosition, 1.0);\n\n  vPosition = mPosition.xyz;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"#extension GL_OES_standard_derivatives : enable\nprecision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vPosition;\n\nvoid main() {\n  vec3 light = normalize(vec3(1.0, 1.0, 1.0));\n  vec3 normal = normalize(cross(dFdx(vPosition), dFdy(vPosition)));\n  float diff = pow((dot(normal, light) + 1.0) / 2.0, 3.0);\n\n  vec3 rgb = vec3(10.0 / 255.0, 20.0 / 255.0, 38.0 / 255.0);\n\n  gl_FragColor = vec4(rgb + diff * 0.2, 1.0);\n}\n"});return(e=a.call(this,t,l,30)).rotation.set(0,u().radians(40),u().radians(30)),e.name="Debris",e}return t=s,(n=[{key:"start",value:function(){}},{key:"update",value:function(e){this.material.uniforms.time.value+=e}}])&&y(t.prototype,n),s}(r.InstancedMesh);function M(e){return(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})(e)}function _(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)}}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function P(e,t){return!t||"object"!==M(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var R=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&S(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=T(i);if(o){var n=T(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return P(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.SphereGeometry(100,12,12),n=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  vUv = uv;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\n\nvarying vec2 vUv;\nvarying vec3 vColor;\n\nfloat random(vec2 c){\n  return fract(sin(dot(c.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\nconst vec3 rgb1 = vec3(0.0 / 255.0, 0.0 / 255.0, 0.0 / 255.0);\nconst vec3 rgb2 = vec3(44.0 / 255.0, 58.0 / 255.0, 83.0 / 255.0);\n\nvoid main() {\n  vec3 rgb = mix(rgb1, rgb2, vUv.y * 4.0 - 1.0);\n  float noise = random(vUv + vec2(0.0, time * 0.01)) * 0.04;\n\n  gl_FragColor = vec4(rgb + noise, 1.0);\n}\n",side:r.BackSide});return(e=a.call(this,t,n)).name="Background",e}return t=s,(n=[{key:"start",value:function(){}},{key:"update",value:function(e){this.material.uniforms.time.value+=e}}])&&_(t.prototype,n),s}(r.Mesh);function E(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function z(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){E(o,r,i,a,s,"next",e)}function s(e){E(o,r,i,a,s,"throw",e)}a(void 0)}))}}function L(){return C.apply(this,arguments)}function C(){return(C=z(regeneratorRuntime.mark((function e(){var t,n,i,a,c,u,l,f,h,v,d,m,y,g,x,b,M,_;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new r.Vector2,n=document.getElementById("canvas-webgl"),i=new r.WebGL1Renderer({alpha:!0,antialias:!0,canvas:n}),a=new r.Scene,c=new r.PerspectiveCamera,u=new r.Vector2,l=new r.Clock({autoStart:!1}),f=new r.TextureLoader,h=document.querySelector(".p-preloader"),v=new p,d=new w,m=new R,g=function(){var e=l.getDelta();v.update(e),d.update(e),m.update(e),i.render(a,c)},x=function e(){g(),requestAnimationFrame(e)},b=function(){t.x>t.y?u.set(t.x>=1200?1200:t.x,t.x>=1200?800:.66*t.x):u.set(.6*(t.y>=1200?800:.66*t.y),.6*(t.y>=1200?1200:t.y)),c.setViewOffset(u.x,u.y,(t.x-u.x)/-2,(t.y-u.y)/-2,t.x,t.y),c.updateProjectionMatrix()},M=function(){t.set(document.body.clientWidth,window.innerHeight),n.width=t.x,n.height=t.y,b(),i.setSize(t.x,t.y)},_=function(){window.addEventListener("blur",(function(){l.stop()})),window.addEventListener("focus",(function(){l.start()})),window.addEventListener("resize",o()(M,100))},i.setClearColor(1118481,1),c.aspect=1.5,c.far=1e3,c.setFocalLength(50),c.position.set(0,0,50),c.lookAt(new r.Vector3),e.next=25,Promise.all([f.loadAsync("../img/sketch/easy_glitch/typo.png"),f.loadAsync("../img/sketch/easy_glitch/noise.png")]).then((function(e){y=e}));case 25:return y&&(y[0].wrapS=r.RepeatWrapping,y[0].wrapT=r.RepeatWrapping,y[1].wrapS=r.RepeatWrapping,y[1].wrapT=r.RepeatWrapping,y[1].minFilter=r.NearestFilter,y[1].magFilter=r.NearestFilter,v.start(y[0],y[1]),a.add(v)),d.start(),m.start(),a.add(d),a.add(m),_(),M(),h.classList.add("is-hidden"),e.next=35,s()(200);case 35:l.start(),x();case 37:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},99729:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},noiseRange:{type:"f",value:3*Math.random()},speed:{type:"f",value:.08},circleOutStepMin:{type:"f",value:.1},circleOutStepMax:{type:"f",value:1},circleInStepMin:{type:"f",value:0},circleInStepMax:{type:"f",value:.3},noisePosition:{type:"f",value:.8},noiseSize:{type:"f",value:.5}},this.obj=this.createObj()}var t,o;return t=e,(o=[{key:"createObj",value:function(){var e=new i.Mesh(new i.PlaneGeometry(640,640),new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(28914).Z,fragmentShader:n(24678).Z,transparent:!0}));return e.position.set(80,0,0),e}},{key:"render",value:function(e){this.obj.visible&&(this.uniforms.time.value+=e)}}])&&r(t.prototype,o),e}()},59895:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(2212),i=n(38314),o=n(99729).Z;function a(){var e={x:0,y:0},t=document.getElementById("canvas-webgl"),n=new r.WebGL1Renderer({antialias:!1,canvas:t}),a=new r.Scene,s=new r.OrthographicCamera(-1,1,1,-1,1,1e4),c=new r.Clock,u=new r.Vector2,l=new r.Vector2,f=new r.Vector2,h=new o,v=function(){var r,i;e.x=document.body.clientWidth,e.y=window.innerHeight,t.width=e.x,t.height=e.y,r=640*Math.min(e.x/e.y/(640/480),1),i=480*Math.min(e.y/e.x/.75,1),s.left=-.5*r,s.right=.5*r,s.top=.5*i,s.bottom=-.5*i,s.updateProjectionMatrix(),n.setSize(e.x,e.y)};window.addEventListener("resize",i(v,1e3)),t.addEventListener("mousedown",(function(e){e.preventDefault(),u.set(e.clientX,e.clientY)})),document.addEventListener("mousemove",(function(e){e.preventDefault(),l.set(e.clientX,e.clientY)})),document.addEventListener("mouseup",(function(e){e.preventDefault(),f.set(e.clientX,e.clientY)})),t.addEventListener("touchstart",(function(e){e.preventDefault(),u.set(e.touches[0].clientX,e.touches[0].clientY)})),t.addEventListener("touchmove",(function(e){e.preventDefault(),l.set(e.touches[0].clientX,e.touches[0].clientY)})),t.addEventListener("touchend",(function(e){e.preventDefault(),f.set(e.changedTouches[0].clientX,e.changedTouches[0].clientY)})),v(),n.setClearColor(16711406,1),s.position.set(0,0,100),s.lookAt(new r.Vector3),a.add(h.obj),function e(){var t;t=c.getDelta(),h.render(t),n.render(a,s),requestAnimationFrame(e)}()}},56160:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(2212),i=n(38314),o=n.n(i),a=n(89813),s=n(97719),c=n(42935),u=n(33286),l=n.n(u),f=n(7318),h=n.n(f),v=n(45695),d=n.n(v);function p(){var e,t,i,u,f,v,p=document.getElementById("canvas-webgl"),m=new r.WebGL1Renderer({antialias:!0,canvas:p}),y=new r.Scene,g=new s.Z(35,window.innerWidth/window.innerHeight,1,1e4),x=(new r.Clock,1e4),b=[],w=new(h()),M=new c.Z(16737792,1,1800,1),_=new Float32Array(3e4),S=new Float32Array(3e4),P=new Float32Array(x),T=new Float32Array(x),R=new r.Vector3(0,.1,0),E=null,z=Date.now(),L=!1,C=function(e){var t=e.y*window.innerHeight/3,n=e.x*window.innerWidth/-3;w.anchor.y=t,w.anchor.z=n,M.force.anchor.y=t,M.force.anchor.z=n},A=function(){var e=document.createElement("canvas"),t=e.getContext("2d"),n=null,i=null;return e.width=200,e.height=200,(n=t.createRadialGradient(100,100,20,100,100,100)).addColorStop(.2,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.3)"),n.addColorStop(1,"rgba(255, 255, 255, 0)"),t.fillStyle=n,t.arc(100,100,100,0,Math.PI/180,!0),t.fill(),(i=new r.Texture(e)).minFilter=r.NearestFilter,i.needsUpdate=!0,i},O=function(){p.width=window.innerWidth,p.height=window.innerHeight,g.aspect=window.innerWidth/window.innerHeight,g.updateProjectionMatrix(),m.setSize(window.innerWidth,window.innerHeight)};m.setSize(window.innerWidth,window.innerHeight),m.setClearColor(0,1),g.position.set(1e3,1e3,1e3),g.lookAt(new r.Vector3),e=new r.Vector2,t=new r.Vector2,i=new r.Vector2,u=function(t,n,r){e.set(t,n),(0,a.Z)(e),C(e),L=!0},f=function(e,n,r){t.set(e,n),(0,a.Z)(t),L&&C(t)},v=function(e,t,n){i.set(e,t),L=!1,w.anchor.set(0,0,0),M.force.anchor.set(0,0,0)},window.addEventListener("resize",o()((function(){O()})),1e3),p.addEventListener("mousedown",(function(e){e.preventDefault(),u(e.clientX,e.clientY)})),p.addEventListener("mousemove",(function(e){e.preventDefault(),f(e.clientX,e.clientY)})),p.addEventListener("mouseup",(function(e){e.preventDefault(),v(e.clientX,e.clientY)})),p.addEventListener("touchstart",(function(e){e.preventDefault(),u(e.touches[0].clientX,e.touches[0].clientY)})),p.addEventListener("touchmove",(function(e){e.preventDefault(),f(e.touches[0].clientX,e.touches[0].clientY)})),p.addEventListener("touchend",(function(e){e.preventDefault(),v(e.changedTouches[0].clientX,e.changedTouches[0].clientY)})),window.addEventListener("mouseout",(function(){event.preventDefault(),i.set(0,0),L=!1,w.anchor.set(0,0,0),M.force.anchor.set(0,0,0)})),function(){for(var e=0;e<x;e++){var t=new(l()),i=d().getRandomInt(0,45),o=d().getRandomInt(60,90),a=new r.Color("hsl("+i+", "+o+"%, 50%)");t.init(new r.Vector3(d().getRandomInt(-100,100),0,0)),b.push(t),_[3*e+0]=t.velocity.x,_[3*e+1]=t.velocity.y,_[3*e+2]=t.velocity.z,a.toArray(S,3*e),P[e]=t.a,T[e]=t.size}var s,c;w.init({scene:y,vs:n(99173).Z,fs:n(77911).Z,positions:_,colors:S,opacities:P,sizes:T,texture:A(),blending:r.AdditiveBlending}),y.add(M),s=new r.OctahedronGeometry(1500,3),c=new r.MeshPhongMaterial({color:16777215,flatShading:!0,side:r.BackSide}),E=new r.Mesh(s,c),y.add(E),g.setPolarCoord(d().getRadian(25),0,1e3),M.setPolarCoord(d().getRadian(25),0,200)}(),O(),function e(){w.applyHook(0,.08),w.applyDrag(.2),w.updateVelocity(),M.force.applyHook(0,.08),M.force.applyDrag(.2),M.force.updateVelocity(),M.updatePosition(),function(){var e=0;if(Date.now()-z>10){for(var t=0;t<b.length;t++){var n=b[t];if(!n.is_active){var i=d().getRadian(Math.log(d().getRandomInt(0,256))/Math.log(256)*260),o=d().getRadian(d().getRandomInt(0,360)),a=12*(1-Math.log(d().getRandomInt(32,256))/Math.log(256)),s=new r.Vector3,c=d().getPolarCoord(i,o,a);if(s.add(w.velocity),n.activate(),n.init(s),n.applyForce(c),n.a=.2,n.size=Math.pow(12-a,2)*d().getRandomInt(1,24)/10,++e>=6)break}}z=Date.now()}}(),function(){for(var e=0;e<b.length;e++){var t=b[e];t.is_active&&(t.time++,t.applyForce(R),t.applyDrag(.01),t.updateVelocity(),t.time>50&&(t.size-=.7,t.a-=.009),t.a<=0&&(t.init(new r.Vector3(0,0,0)),t.time=0,t.a=0,t.inactivate())),_[3*e+0]=t.velocity.x-w.velocity.x,_[3*e+1]=t.velocity.y-w.velocity.y,_[3*e+2]=t.velocity.z-w.velocity.z,P[e]=t.a,T[e]=t.size}w.updatePoints()}(),g.force.position.applyHook(0,.004),g.force.position.applyDrag(.1),g.force.position.updateVelocity(),g.updatePosition(),g.lookAtCenter(),m.render(y,g),requestAnimationFrame(e)}()}},14449:function(e,t,n){"use strict";n.d(t,{Z:function(){return We}});var r=n(2212),i=n(38314),o=n.n(i),a=n(17393),s=n.n(a);function c(e){return(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})(e)}function u(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)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(i);if(o){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return f(this,e)});function s(e,t,n,i){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(o=a.call(this,e,t,n,i)).cameraResolution=new r.Vector2,o.time=0,o}return t=s,(n=[{key:"start",value:function(){this.far=5e3,this.setFocalLength(50),this.position.set(0,0,130),this.lookAt(new r.Vector3)}},{key:"update",value:function(e){this.time+=e}},{key:"resize",value:function(e){this.aspect=e.x/e.y,this.updateProjectionMatrix(),this.position.z=this.aspect<1?150:120}}])&&u(t.prototype,n),s}(r.PerspectiveCamera);function d(e){return(d="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})(e)}function p(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)}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=g(i);if(o){var n=g(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return y(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.OctahedronGeometry(10,6),n=new r.RawShaderMaterial({uniforms:{time:{value:0},noiseTex:{value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform vec3 cameraPosition;\n\nvarying vec2 vUv;\nvarying float vEdge;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  float angleToCamera = acos(dot(normalize(cameraPosition), normal));\n\n  vUv = uv;\n  vEdge = smoothstep(0.4, 1.0, abs(sin(angleToCamera)));\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D noiseTex;\n\nvarying vec2 vUv;\nvarying float vEdge;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec2 p = vUv * 2.0 - 1.0;\n\n  float noise1 = texture2D(noiseTex, vUv + vec2(time * 0.1, 0.0)).r;\n  float noise2 = texture2D(noiseTex, vUv + vec2(time * -0.1, 0.0)).g;\n  vec3 hsv = vec3(\n    (noise1 + noise2) * 0.35 + time * 0.1,\n    1.0 - vEdge,\n    0.02 + vEdge * 0.98\n  );\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  gl_FragColor = vec4(rgb, 1.0);\n}\n"});return(e=a.call(this,t,n)).name="Core",e.acceleration=new r.Vector3,e.anchor=new r.Vector3,e}return t=s,(n=[{key:"start",value:function(e){this.material.uniforms.noiseTex.value=e}},{key:"update",value:function(e,t){this.material.uniforms.time.value+=e,this.applyHook(0,.2),this.applyDrag(.6),this.position.add(this.acceleration),this.lookAt(t.position)}},{key:"applyDrag",value:function(e){var t=this.acceleration.clone();t.multiplyScalar(-1),t.normalize(),t.multiplyScalar(this.acceleration.length()*e),this.acceleration.add(t)}},{key:"applyHook",value:function(e,t){var n=this.position.clone().sub(this.anchor),r=n.length()-e;n.normalize(),n.multiplyScalar(-1*t*r),this.acceleration.add(n)}}])&&p(t.prototype,n),s}(r.Mesh);function b(e){return(b="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})(e)}function w(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)}}function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e,t){return!t||"object"!==b(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var P=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&M(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=S(i);if(o){var n=S(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return _(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.PlaneGeometry(30,30),n=new r.RawShaderMaterial({uniforms:{time:{value:0},noiseTex:{value:null},acceleration:{value:new r.Vector3}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform vec3 cameraPosition;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  vUv = uv;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D noiseTex;\n\nvarying vec2 vUv;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec2 p = vUv * 2.0 - 1.0;\n\n  float noise1 = texture2D(noiseTex, vUv * 0.25 + vec2(time * 0.1, 0.0)).r;\n  float noise2 = texture2D(noiseTex, vUv * 0.25 + vec2(time * -0.1, 0.0)).g;\n  float noise = (noise1 + noise2) / 2.0;\n  vec3 hsv = vec3(\n    noise * 0.5 + time * 0.1,\n    0.7,\n    0.7\n  );\n  vec3 rgb = convertHsvToRgb(hsv) * (1.0 - smoothstep(0.4, 1.0, length(p))) + (1.0 - smoothstep(0.67, 0.74, length(p)));\n  float opacity = 1.0 - smoothstep(0.9, 1.0, length(p));\n\n  if (opacity < 0.01) discard;\n\n  gl_FragColor = vec4(rgb, opacity);\n}\n",transparent:!0,blending:r.AdditiveBlending});return(e=a.call(this,t,n)).name="CoreLight",e}return t=s,(n=[{key:"start",value:function(e){this.material.uniforms.noiseTex.value=e}},{key:"update",value:function(e,t){var n=this.material.uniforms;n.time.value+=e,n.acceleration.value.copy(t.acceleration),this.position.copy(t.position)}}])&&w(t.prototype,n),s}(r.Mesh);function T(e){return(T="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})(e)}function R(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)}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function z(e,t){return!t||"object"!==T(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function L(e){return(L=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=L(i);if(o){var n=L(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return z(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.OctahedronGeometry(10.1,10),n=new r.RawShaderMaterial({uniforms:{time:{value:0},noiseTex:{value:null},acceleration:{value:new r.Vector3}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nuniform float time;\nuniform sampler2D noiseTex;\nuniform vec3 acceleration;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  float noise1 = texture2D(noiseTex, uv * 0.25 + vec2(0.1, -0.1) * time).r;\n  float noise2 = texture2D(noiseTex, uv * 0.25 + vec2(-0.1, -0.1) * time).g;\n  float noise = (noise1 + noise2) * 0.5 * (1.0 - min(length(acceleration) / 5.0, 1.0));\n\n  vec3 transformed = vec3(position + normalize(position) * smoothstep(0.2, 1.0, noise) * 15.0);\n\n  vec4 mPosition = modelMatrix * vec4(transformed, 1.0);\n\n  vUv = uv;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D noiseTex;\nuniform vec3 acceleration;\n\nvarying vec2 vUv;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  float noise1 = texture2D(noiseTex, vUv * vec2(1.0, 0.5) + vec2(0.4, -0.3) * time).r;\n  float noise2 = texture2D(noiseTex, vUv * vec2(1.0, 0.5) + vec2(-0.4, -0.6) * time).g;\n  float noise3 = texture2D(noiseTex, vUv * vec2(1.0, 0.5) + vec2(0.0, -0.6) * time).b;\n  float noise = (noise1 + noise2) / 2.0 * smoothstep(0.0, 0.15, vUv.y) * (1.0 - smoothstep(0.9, 1.0, vUv.y));\n  noise = smoothstep(0.5 - min(length(acceleration) / 5.0, 1.0) * 0.15, 1.0, noise);\n  vec3 hsv = vec3(\n    noise * 0.5 + time * 0.1 + noise3 * 0.4,\n    0.7 - noise * 3.0,\n    0.6 + noise * 0.6\n  );\n  vec3 rgb = convertHsvToRgb(hsv);\n  float opacity = noise;\n\n  if (opacity < 0.01) discard;\n\n  gl_FragColor = vec4(rgb, opacity);\n}\n",side:r.DoubleSide});return(e=a.call(this,t,n)).name="Aura",e}return t=s,(n=[{key:"start",value:function(e){this.material.uniforms.noiseTex.value=e}},{key:"update",value:function(e,t){var n=this.material.uniforms;n.time.value+=e,n.acceleration.value.copy(t.acceleration),this.position.copy(t.position)}}])&&R(t.prototype,n),s}(r.Mesh);function A(e){return(A="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})(e)}function O(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)}}function D(e,t){return(D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e,t){return!t||"object"!==A(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var F=400,j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&D(e,t)}(c,e);var t,n,i,o,a=(i=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=k(i);if(o){var n=k(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return I(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);var t=new r.InstancedBufferGeometry,n=new r.PlaneGeometry(1,1);t.copy(n);for(var i=new r.InstancedBufferAttribute(new Float32Array(1200),3),o=new r.InstancedBufferAttribute(new Float32Array(1200),3),u=new r.InstancedBufferAttribute(new Float32Array(F),1),l=new r.InstancedBufferAttribute(new Float32Array(F),1),f=new r.InstancedBufferAttribute(new Float32Array(F),1),h=new r.InstancedBufferAttribute(new Float32Array(F),1),v=new r.InstancedBufferAttribute(new Float32Array(1200),3),d=new r.InstancedBufferAttribute(new Float32Array(800),2),p=0;p<400;p++){var m=s().radians(75*(2*Math.random()-1)),y=s().radians(360*Math.random()),g=s().spherical(m,y,1);i.setXYZ(p,5*g[0],5*g[1],5*g[2]),o.setXYZ(p,g[0],g[1],g[2]),u.setXYZ(p,0-5*Math.random()),l.setXYZ(p,2+4*Math.random()),f.setXYZ(p,20+15*Math.random()),h.setXYZ(p,1+1*Math.random()),v.setXYZ(p,2*Math.random()-1,2*Math.random()-1,2*Math.random()-1),d.setXYZ(p,2*Math.random()-1,2*Math.random()-1)}t.setAttribute("iPosition",i),t.setAttribute("iDirection",o),t.setAttribute("iTime",u),t.setAttribute("iDuration",l),t.setAttribute("iDistance",f),t.setAttribute("iScale",h),t.setAttribute("iRotate",v),t.setAttribute("iUvDiff",d);var x=new r.RawShaderMaterial({uniforms:{time:{value:0},noiseTex:{value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\nattribute vec3 iPosition;\nattribute vec3 iDirection;\nattribute float iTime;\nattribute float iDuration;\nattribute float iDistance;\nattribute float iScale;\nattribute vec3 iRotate;\nattribute vec2 iUvDiff;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform float time;\n\nvarying vec2 vUv;\nvarying vec2 vUvDiff;\nvarying float vOpacity;\nvarying float vStep;\n\nmat4 calcRotateMat4X(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Y(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4(vec3 radian) {\n  return calcRotateMat4X(radian.x) * calcRotateMat4Y(radian.y) * calcRotateMat4Z(radian.z);\n}\n\nmat4 calcScaleMat4(vec3 scale) {\n  return mat4(\n    scale.x, 0.0, 0.0, 0.0,\n    0.0, scale.y, 0.0, 0.0,\n    0.0, 0.0, scale.z, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nvoid main(void) {\n  float stp = iTime / iDuration;\n\n  mat4 rotateMat = calcRotateMat4(iRotate * time * 2.0);\n  mat4 scaleMat = calcScaleMat4(vec3(iScale));\n  vec3 transformed = position + vec3(cos(time * 3.0) * 6.0 * stp, 0.0, sin(time * 3.0) * 6.0 * stp);\n  transformed = (rotateMat * scaleMat * vec4(transformed, 1.0)).xyz;\n  transformed = transformed + iPosition + iDirection * iDistance * stp;\n  vec4 mPosition = modelMatrix * vec4(transformed, 1.0);\n\n  vUv = uv;\n  vUvDiff = iUvDiff;\n  vOpacity = step(0.0, iTime);\n  vStep = stp;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D noiseTex;\n\nvarying vec2 vUv;\nvarying vec2 vUvDiff;\nvarying float vOpacity;\nvarying float vStep;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec2 p = vUv * 2.0 - 1.0;\n\n  float noise = texture2D(noiseTex, (vUv + vUvDiff) * 0.25 + time * 0.1).r * 2.0 - 1.0;\n  float stp = smoothstep(0.25, 1.0, vStep);\n  noise = smoothstep(0.0 + stp, 0.2 + stp, noise * (1.0 - length(p)));\n  float noise2 = texture2D(noiseTex, (vUv + vUvDiff) * 0.125 + time * 0.1).g;\n\n  vec3 hsv = vec3(\n    noise2 * 0.5 + time * 0.1,\n    0.4 - stp * 5.0,\n    0.95\n  );\n  vec3 rgb = convertHsvToRgb(hsv);\n  float opacity = noise * vOpacity;\n\n  gl_FragColor = vec4(rgb, opacity);\n}\n",transparent:!0,side:r.DoubleSide,depthWrite:!1});return(e=a.call(this,t,x,F)).name="Sparks",e.frustumCulled=!1,e}return t=c,(n=[{key:"start",value:function(e){this.material.uniforms.noiseTex.value=e}},{key:"update",value:function(e,t){var n=this.geometry.attributes,r=n.iPosition,i=n.iDirection,o=n.iTime,a=n.iDuration;this.material.uniforms.time.value+=e;for(var s=0;s<o.count;s++){var c=a.getX(s),u=o.getX(s);(u>c||u<0&&u+e>0)&&(u%=c,r.setXYZ(s,5*i.getX(s)+t.position.x,5*i.getY(s)+t.position.y,5*i.getZ(s)+t.position.z)),o.setX(s,u+e)}r.needsUpdate=!0,o.needsUpdate=!0}}])&&O(t.prototype,n),c}(r.InstancedMesh);function U(e){return(U="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})(e)}function B(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)}}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(e,t){return!t||"object"!==U(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function H(e){return(H=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var V=function(e,t){var n=e.clone();n.multiplyScalar(-1),n.normalize(),n.multiplyScalar(e.length()*t),e.add(n)},W=function(e,t,n,r,i){var o=e.clone().sub(n),a=o.length()-r;o.normalize(),o.multiplyScalar(-1*i*a),t.add(o)},Z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&G(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=H(i);if(o){var n=H(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return N(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=[],n=new r.CylinderGeometry(5,10,40,24,60,!0),i=n.attributes.position,o=new r.Vector3,c=[],u=[],l=[],f=new r.Bone,h=0;h<i.count;h++){o.fromBufferAttribute(i,h);var v=o.y+20,d=Math.floor(v/2),p=v%2/2;c.push(d,d+1,0,0),u.push(1-p,p,0,0)}for(var m=0;m<=20;m++){if(0===m)f.position.y=-20,l.push(f);else{var y=new r.Bone;y.position.y=2,l.push(y),f.add(y),f=y}t.push({velocity:new r.Vector3,acceleration:new r.Vector3})}n.setAttribute("skinIndex",new r.Uint16BufferAttribute(c,4)),n.setAttribute("skinWeight",new r.Float32BufferAttribute(u,4));var g=new r.RawShaderMaterial({uniforms:{time:{value:0},noiseTex:{value:null},acceleration:{value:new r.Vector3}},vertexShader:"precision highp float;\n#define GLSLIFY 1\n\n#define MAX_BONES 1024\n\nattribute vec3 position;\nattribute vec2 uv;\nattribute vec4 skinIndex;\nattribute vec4 skinWeight;\n\nuniform mat4 modelMatrix;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\n\nuniform mat4 bindMatrix;\nuniform mat4 bindMatrixInverse;\nuniform highp sampler2D boneTexture;\nuniform int boneTextureSize;\n\nuniform float time;\nuniform sampler2D noiseTex;\nuniform vec3 acceleration;\n\nmat4 getBoneMatrix(const in float i) {\n  float j = i * 4.0;\n  float x = mod(j, float(boneTextureSize));\n  float y = floor(j / float(boneTextureSize));\n  float dx = 1.0 / float(boneTextureSize);\n  float dy = 1.0 / float(boneTextureSize);\n\n  y = dy * (y + 0.5);\n\n  vec4 v1 = texture2D(boneTexture, vec2(dx * (x + 0.5), y));\n  vec4 v2 = texture2D(boneTexture, vec2(dx * (x + 1.5), y));\n  vec4 v3 = texture2D(boneTexture, vec2(dx * (x + 2.5), y));\n  vec4 v4 = texture2D(boneTexture, vec2(dx * (x + 3.5), y));\n  mat4 bone = mat4(v1, v2, v3, v4);\n\n  return bone;\n}\n\nvarying vec2 vUv;\n\nvoid main() {\n  float noise1 = texture2D(noiseTex, uv + vec2(0.4, -0.8) * time).r;\n  float noise2 = texture2D(noiseTex, uv + vec2(-0.4, -1.4) * time).g;\n  float noise = ((noise1 + noise2) - 1.0) * (uv.y * 0.9 + 0.1) * min(length(acceleration) / 3.0, 1.0);\n\n  vec3 transformed = vec3(position + normalize(position) * vec3(1.0, 0.0, 1.0) * noise * 40.0);\n\n  mat4 boneMatX = getBoneMatrix(skinIndex.x);\n  mat4 boneMatY = getBoneMatrix(skinIndex.y);\n  mat4 boneMatZ = getBoneMatrix(skinIndex.z);\n  mat4 boneMatW = getBoneMatrix(skinIndex.w);\n  vec4 skinVertex = bindMatrix * vec4(transformed, 1.0);\n  vec4 skinned = vec4(0.0);\n\n  skinned += boneMatX * skinVertex * skinWeight.x;\n  skinned += boneMatY * skinVertex * skinWeight.y;\n  skinned += boneMatZ * skinVertex * skinWeight.z;\n  skinned += boneMatW * skinVertex * skinWeight.w;\n  transformed = (bindMatrixInverse * skinned).xyz;\n\n  vec4 mvPosition = modelViewMatrix * vec4(transformed, 1.0);\n\n  vUv = uv;\n\n  gl_Position = projectionMatrix * mvPosition;\n}",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D noiseTex;\n\nvarying vec2 vUv;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  float noise1 = texture2D(noiseTex, vUv + vec2(0.4, -1.6) * time).r;\n  float noise2 = texture2D(noiseTex, vUv + vec2(-0.4, -2.4) * time).g;\n  float noise3 = texture2D(noiseTex, vUv + vec2(0.0, -0.6) * time).b;\n  float noise = (noise1 + noise2) / 2.0 * (1.0 - vUv.y) * smoothstep(0.0, 0.05, vUv.y);\n  noise = smoothstep(0.3, 1.0, noise);\n  vec3 hsv = vec3(\n    noise * 0.5 + time * 0.1 + noise3 * 0.4,\n    0.7 - noise * 3.0,\n    0.6 + noise * 0.6\n  );\n  vec3 rgb = convertHsvToRgb(hsv);\n  float opacity = noise;\n\n  if (opacity < 0.01) discard;\n\n  gl_FragColor = vec4(rgb, opacity);\n}\n",skinning:!0,side:r.DoubleSide}),x=new r.Skeleton(l);return(e=a.call(this,n,g)).top=new r.Vector3(0,1,0),e.hookes=t,e.time=0,e.add(l[0]),e.bind(x),e}return t=s,(n=[{key:"start",value:function(e){this.material.uniforms.noiseTex.value=e}},{key:"update",value:function(e,t){var n=this.material.uniforms,i=this.skeleton.bones,o=new r.Quaternion,a=new r.Quaternion;this.time+=e,n.time.value+=e;for(var s=0;s<this.hookes.length;s++){var c=this.hookes[s],u=c.velocity,l=c.acceleration;if(0===s)u.copy(t.position);else{var f=this.hookes[s-1].velocity;W(u,l,f,0,1),V(l,.7),u.add(l)}}n.acceleration.value.copy(t.acceleration);for(var h=0;h<i.length;h++){var v=i[h],d=this.hookes[h].velocity;if(0===h){var p=this.hookes[h+1].velocity.clone().sub(d).normalize(),m=(new r.Vector3).crossVectors(this.top,p).normalize(),y=Math.acos(this.top.clone().dot(p));o.setFromAxisAngle(m,y),v.rotation.setFromQuaternion(o),v.position.copy(t.position)}else if(h<i.length-1){var g=this.hookes[h-1].velocity,x=d.clone().sub(g).normalize(),b=(new r.Vector3).crossVectors(this.top,x).normalize(),w=Math.acos(this.top.clone().dot(x)),M=this.hookes[h+1].velocity.clone().sub(d).normalize(),_=(new r.Vector3).crossVectors(this.top,M).normalize(),S=Math.acos(this.top.clone().dot(M));o.setFromAxisAngle(b,w),a.setFromAxisAngle(_,S),o.conjugate().multiply(a),v.rotation.setFromQuaternion(o),v.position.y=d.distanceTo(g)}}}}])&&B(t.prototype,n),s}(r.SkinnedMesh);function q(e){return(q="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})(e)}function Y(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)}}function X(e,t){return(X=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function K(e,t){return!t||"object"!==q(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Q(e){return(Q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var J=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&X(e,t)}(c,e);var t,n,i,o,a=(i=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Q(i);if(o){var n=Q(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return K(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);var t=new r.PlaneGeometry(1,1),n=new r.RawShaderMaterial({uniforms:{time:{value:0},resolution:{value:new r.Vector2},noiseTex:{value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec2 vUv;\n\nvoid main() {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  vUv = uv;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform vec2 resolution;\nuniform sampler2D noiseTex;\n\nvarying vec2 vUv;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec2 updateUv = vec2(\n    vUv.x * min(resolution.x / resolution.y, 1.0) + max(1.0 - resolution.x / resolution.y, 0.0) / 2.0,\n    vUv.y * min(resolution.y / resolution.x, 1.0) + max(1.0 - resolution.y / resolution.x, 0.0) / 2.0\n  );\n  vec2 p = updateUv * 2.0 - 1.0;\n  vec4 texColor1 = texture2D(noiseTex, updateUv + vec2(0.0, time * 0.01));\n  vec4 texColor2 = texture2D(noiseTex, updateUv - vec2(0.0, time * 0.02));\n  vec3 hsv1 = vec3(0.5 + time * 0.1 + vUv.y * 0.2, 0.4, 0.05);\n  vec3 hsv2 = vec3(0.0 + time * 0.1 + vUv.y * 0.2, 0.4, 0.4);\n  float hsvAlpha = pow((texColor1.r + texColor2.g) / 2.0, 3.0) * 2.0;\n  vec3 color = convertHsvToRgb(mix(hsv1, hsv2, hsvAlpha) - (1.0 - smoothstep(0.0, 1.0, length(p))) * 0.3);\n\n  gl_FragColor = vec4(color, 1.0);\n}\n"});return(e=a.call(this,t,n)).name="Background",e.position.z=-1e3,e}return t=c,(n=[{key:"start",value:function(e){this.material.uniforms.noiseTex.value=e}},{key:"update",value:function(e){this.material.uniforms.time.value+=e}},{key:"resize",value:function(e,t){var n=this.material.uniforms,r=Math.abs((e.position.z-this.position.z)*Math.tan(s().radians(e.fov)/2)*2),i=r*e.aspect;this.scale.set(i,r,1),n.resolution.value.copy(t)}}])&&Y(t.prototype,n),c}(r.Mesh),$="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vUv = uv;\n\n  gl_Position = vec4(position, 1.0);\n}\n";function ee(e){return(ee="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})(e)}function te(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)}}function ne(e,t){return(ne=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function re(e,t){return!t||"object"!==ee(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ie(e){return(ie=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var oe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ne(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ie(i);if(o){var n=ie(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return re(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.PlaneGeometry(2,2),n=new r.RawShaderMaterial({uniforms:{minBright:{value:.5},texture:{value:null}},vertexShader:$,fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float minBright;\nuniform sampler2D texture;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vec4 bright = max(vec4(0.0), (texture2D(texture, vUv) - minBright));\n  gl_FragColor = bright;\n}\n"});return(e=a.call(this,t,n)).name="PostEffectBright",e}return t=s,(n=[{key:"start",value:function(e){this.material.uniforms.texture.value=e}}])&&te(t.prototype,n),s}(r.Mesh);function ae(e){return(ae="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})(e)}function se(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)}}function ce(e,t){return(ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ue(e,t){return!t||"object"!==ae(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function le(e){return(le=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var fe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ce(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=le(i);if(o){var n=le(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ue(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.PlaneGeometry(2,2),n=new r.RawShaderMaterial({uniforms:{resolution:{value:new r.Vector2},direction:{value:new r.Vector2},texture:{value:null}},vertexShader:$,fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform vec2 resolution;\nuniform vec2 direction;\nuniform sampler2D texture;\n\nvarying vec2 vUv;\n\nvec4 gaussianBlur(sampler2D texture, vec2 uv, float radius, vec2 resolution, vec2 direction) {\n  vec4 color = vec4(0.0);\n  vec2 step = radius / resolution * direction;\n  color += texture2D(texture, uv - 4.0 * step) * 0.02699548325659403;\n  color += texture2D(texture, uv - 3.0 * step) * 0.06475879783294587;\n  color += texture2D(texture, uv - 2.0 * step) * 0.12098536225957168;\n  color += texture2D(texture, uv - 1.0 * step) * 0.17603266338214976;\n  color += texture2D(texture, uv) * 0.19947114020071635;\n  color += texture2D(texture, uv + 1.0 * step) * 0.17603266338214976;\n  color += texture2D(texture, uv + 2.0 * step) * 0.12098536225957168;\n  color += texture2D(texture, uv + 3.0 * step) * 0.06475879783294587;\n  color += texture2D(texture, uv + 4.0 * step) * 0.02699548325659403;\n  return color;\n}\n\nvoid main() {\n  vec4 color = gaussianBlur(texture, vUv, 1.0, resolution, direction);\n  gl_FragColor = color;\n}\n"});return(e=a.call(this,t,n)).name="PostEffectBlur",e}return t=s,(n=[{key:"start",value:function(e,t,n){this.material.uniforms.texture.value=e,this.material.uniforms.direction.value.set(t,n)}},{key:"resize",value:function(e,t){this.material.uniforms.resolution.value.set(e,t)}}])&&se(t.prototype,n),s}(r.Mesh);function he(e){return(he="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})(e)}function ve(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)}}function de(e,t){return(de=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pe(e,t){return!t||"object"!==he(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function me(e){return(me=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ye,ge=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&de(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=me(i);if(o){var n=me(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return pe(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.PlaneGeometry(2,2),n=new r.RawShaderMaterial({uniforms:{texture1:{value:null},texture2:{value:null}},vertexShader:$,fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture1;\nuniform sampler2D texture2;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vec4 color1 = texture2D(texture1, vUv);\n  vec4 color2 = texture2D(texture2, vUv);\n  gl_FragColor = color1 + color2;\n}\n"});return(e=a.call(this,t,n)).name="PostEffectBloom",e}return t=s,(n=[{key:"start",value:function(e,t){this.material.uniforms.texture1.value=e,this.material.uniforms.texture2.value=t}}])&&ve(t.prototype,n),s}(r.Mesh);function xe(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function be(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)}}var we=new r.Scene,Me=new v,_e=new r.Clock({autoStart:!1}),Se=new r.WebGLRenderTarget,Pe=new r.WebGLRenderTarget,Te=new r.WebGLRenderTarget,Re=new r.Scene,Ee=new r.OrthographicCamera(-1,1,1,-1,1,2),ze=new x,Le=new P,Ce=new C,Ae=new j,Oe=new Z,De=new J,Ie=new r.TextureLoader,ke=new r.Vector2,Fe=!1,je=new oe,Ue=new fe,Be=new fe,Ge=new ge,Ne=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i,o;return t=e,(n=[{key:"start",value:(i=regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(ye=new r.WebGL1Renderer({alpha:!0,antialias:!0,canvas:t})).setPixelRatio(window.devicePixelRatio),ye.setClearColor(921102,1),e.next=5,Promise.all([Ie.loadAsync("/sketch-threejs/img/sketch/flow_field/noise.jpg")]).then((function(e){var t=e[0];t.wrapS=r.RepeatWrapping,t.wrapT=r.RepeatWrapping,t.format=r.RGBFormat,t.type=r.FloatType,t.minFilter=r.NearestFilter,t.magFilter=r.NearestFilter,ze.start(t),Le.start(t),Ce.start(t),Ae.start(t),Oe.start(t),De.start(t)}));case 5:we.add(ze),we.add(Le),we.add(Ce),we.add(Ae),we.add(Oe),we.add(De),Me.start(),je.start(Se.texture),Ue.start(Pe.texture,1,0),Be.start(Te.texture,0,1),Ge.start(Se.texture,Pe.texture);case 16:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=i.apply(e,t);function a(e){xe(o,n,r,a,s,"next",e)}function s(e){xe(o,n,r,a,s,"throw",e)}a(void 0)}))},function(e){return o.apply(this,arguments)})},{key:"play",value:function(){_e.start(),this.update()}},{key:"pause",value:function(){_e.stop()}},{key:"update",value:function(){if(!1!==_e.running){var e=_e.getDelta();Me.update(e),ze.update(e,Me),Le.update(e,ze),Ce.update(e,ze),Ae.update(e,ze),Oe.update(e,ze),De.update(e),ye.setRenderTarget(Se),ye.render(we,Me),Re.add(je),ye.setRenderTarget(Pe),ye.render(Re,Ee),Re.remove(je),Re.add(Ue),ye.setRenderTarget(Te),ye.render(Re,Ee),Re.remove(Ue),Re.add(Be),ye.setRenderTarget(Pe),ye.render(Re,Ee),Re.remove(Be),Re.add(Ge),ye.setRenderTarget(null),ye.render(Re,Ee),Re.remove(Ge)}}},{key:"resize",value:function(e){Me.resize(e),De.resize(Me,e),ye.setSize(e.x,e.y),Se.setSize(e.x*ye.getPixelRatio(),e.y*ye.getPixelRatio()),Pe.setSize(e.x*ye.getPixelRatio(),e.y*ye.getPixelRatio()),Te.setSize(e.x*ye.getPixelRatio(),e.y*ye.getPixelRatio()),Be.resize(e.x/4,e.y/4),Ue.resize(e.x/4,e.y/4)}},{key:"setCoreAnchor",value:function(e){var t=70*(ke.y/e.y*2-1),n=Math.abs((Me.position.z-t)*Math.tan(s().radians(Me.fov)/2)*2),r=n*Me.aspect;ze.anchor.set((ke.x/e.x-.5)*r,-(ke.y/e.y-.5)*n,t)}},{key:"touchStart",value:function(e,t){e.touches||e.preventDefault(),ke.set(e.touches?e.touches[0].clientX:e.clientX,e.touches?e.touches[0].clientY:e.clientY),Fe=!0,this.setCoreAnchor(t)}},{key:"touchMove",value:function(e,t){e.touches||e.preventDefault(),!0===Fe&&(ke.set(e.touches?e.touches[0].clientX:e.clientX,e.touches?e.touches[0].clientY:e.clientY),this.setCoreAnchor(t))}},{key:"touchEnd",value:function(){Fe=!1}}])&&be(t.prototype,n),e}();function He(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function Ve(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){He(o,r,i,a,s,"next",e)}function s(e){He(o,r,i,a,s,"throw",e)}a(void 0)}))}}function We(){return Ze.apply(this,arguments)}function Ze(){return(Ze=Ve(regeneratorRuntime.mark((function e(){var t,n,i,a,s,c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new Ne,n=new r.Vector2,i=document.getElementById("canvas-webgl"),a=document.querySelector(".p-preloader"),s=function(){n.set(document.body.clientWidth,window.innerHeight),i.width=n.x,i.height=n.y,t.resize(n)},c=function(){var e=function(e){t.touchStart(e,n)},r=function(e){t.touchMove(e,n)},a=function(){t.touchEnd()};i.addEventListener("mousedown",e,{passive:!1}),window.addEventListener("mousemove",r,{passive:!1}),window.addEventListener("mouseup",a),i.addEventListener("touchstart",e,{passive:!1}),window.addEventListener("touchmove",r,{passive:!1}),window.addEventListener("touchend",a),window.addEventListener("blur",(function(){t.pause()})),window.addEventListener("focus",(function(){t.play()})),window.addEventListener("resize",o()(s,100))},u=function e(){t.update(),requestAnimationFrame(e)},e.next=9,t.start(i);case 9:c(),s(),a.classList.add("is-hidden"),t.play(),u();case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},18081:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=(n(17393),function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0}},this.obj}var t,o;return t=e,(o=[{key:"createObj",value:function(){var e=new i.SphereGeometry(1e4,128,128),t=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(44873).Z,fragmentShader:n(33274).Z,side:i.BackSide});this.obj=new i.Mesh(e,t)}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&r(t.prototype,o),e}())},56027:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}}),n(2212);var i=n(90887),o=(n(17393),function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.camera=t,this.anchorTilt=[0,0,0]}var t,n;return t=e,(n=[{key:"init",value:function(e,t){for(var n=0;n<e.length;n++)this.camera.anchor[n]=this.camera.velocity[n]=e[n],this.camera.lookAnchor[n]=this.camera.lookVelocity[n]=t[n]}},{key:"tilt",value:function(e){this.anchorTilt=[-200*e.x,200*e.y,0]}},{key:"move",value:function(e,t,n){for(var r=0;r<e.length;r++)this.camera.anchor[r]=e[r],this.camera.lookAnchor[r]=t[r];n>0&&this.focalLength.next!==n&&(this.focalLength.prev=this.focalLength.next,this.focalLength.next=n,this.focalLength.time=0)}},{key:"render",value:function(e,t){this.tilt(t),i.vec3.add(this.camera.velocity,this.camera.velocity,this.anchorTilt),this.camera.render()}}])&&r(t.prototype,n),e}())},41208:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=(n(17393),function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0}},this.obj}var t,o;return t=e,(o=[{key:"createObj",value:function(){var e=new i.OctahedronGeometry(450,10),t=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(92665).Z,fragmentShader:n(97459).Z});this.obj=new i.Mesh(e,t)}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&r(t.prototype,o),e}())},22215:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=(n(17393),function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0}},this.obj}var t,o;return t=e,(o=[{key:"createObj",value:function(){var e=new i.PlaneGeometry(1e3,3e3,128,128),t=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(44202).Z,fragmentShader:n(4653).Z,transparent:!0,depthWrite:!1,side:i.DoubleSide,blending:i.AdditiveBlending});this.obj=new i.Mesh(e,t)}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&r(t.prototype,o),e}())},55536:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}});var i=n(2212),o=n(17393),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0}},this.num=5e3,this.obj}var t,a;return t=e,(a=[{key:"createObj",value:function(){var e=new i.InstancedBufferGeometry,t=new i.BoxGeometry(16,800,200);e.copy(t);for(var r=new i.InstancedBufferAttribute(new Float32Array(3*this.num),3),a=new i.InstancedBufferAttribute(new Float32Array(this.num),1),s=new i.InstancedBufferAttribute(new Float32Array(this.num),1),c=new i.InstancedBufferAttribute(new Float32Array(this.num),1),u=0,l=this.num;u<l;u++){o.radians(o.randomArbitrary(0,360));var f=o.randomArbitrary(1e3,7e3),h=(7e3-f)/7e3*.75+.25,v=o.randomArbitrary(.1,.4);r.setXYZ(u,f,o.randomArbitrary(-1e4,-100),0),a.setXYZ(u,h),s.setXYZ(u,u),c.setXYZ(u,v)}e.setAttribute("instancePosition",r),e.setAttribute("scale",a),e.setAttribute("rotate",s),e.setAttribute("speed",c);var d=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(25746).Z,fragmentShader:n(13292).Z});this.obj=new i.InstancedMesh(e,d,this.num)}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&r(t.prototype,a),e}()},86918:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(2212),i=n(38314),o=n(17393),a=n(4679),s=n(71243),c=n(97355).Z,u=n(56027).Z,l=n(41208).Z,f=n(22215).Z,h=n(55536).Z,v=n(18081).Z;function d(){var e=new r.Vector2,t=new r.Vector2,n=document.getElementById("canvas-webgl"),d=new r.WebGL1Renderer({alpha:!0,antialias:!0,canvas:n}),p=new r.Scene,m=new c,y=new u(m),g=new r.Clock;m.far=5e4,m.setFocalLength(35);var x=new l,b=new f,w=new h,M=new v,_=function(){e.set(document.body.clientWidth,window.innerHeight),n.width=e.x,n.height=e.y,m.aspect=e.x/e.y,m.updateProjectionMatrix(),d.setSize(e.x,e.y)};x.createObj(),b.createObj(),w.createObj(),M.createObj(),p.add(x.obj),p.add(b.obj),p.add(w.obj),p.add(M.obj),d.setClearColor(0,1),y.init([0,1500,3e3],[0,-100,0]),g.start(),window.addEventListener("resize",i(_,1e3)),a()||s()?window.addEventListener("deviceorientation",(function(n){e.x/e.y<1?t.set(n.gamma/60,-.02*o.clamp(Math.abs(n.beta)-90,-90,90)):t.set(0,0)})):(window.addEventListener("mousemove",(function(n){t.set(n.clientX/e.x*2-1,-(n.clientY/e.y*2-1))})),window.addEventListener("mouseout",(function(e){t.set(0,0)}))),_(),function e(){var n;n=g.getDelta(),x.render(n),b.render(n),w.render(n),M.render(n),y.render(n,t),d.render(p,m),requestAnimationFrame(e)}()}},95185:function(e,t,n){"use strict";n.d(t,{Z:function(){return Q}});var r=n(2212),i=n(38314),o=n.n(i),a=n(52886);function s(e){return(s="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})(e)}function c(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)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(i);if(o){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return l(this,e)});function s(e,t,n,i){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(o=a.call(this,e,t,n,i)).cameraResolution=new r.Vector2,o.time=0,o}return t=s,(n=[{key:"start",value:function(){this.far=1e3,this.setFocalLength(50),this.position.set(0,0,90),this.lookAt(new r.Vector3)}},{key:"update",value:function(e){this.time+=e}},{key:"resize",value:function(e){this.aspect=e.x/e.y,this.updateProjectionMatrix()}}])&&c(t.prototype,n),s}(r.PerspectiveCamera);function v(e){return(v="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})(e)}function d(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)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(i);if(o){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return m(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=new r.BufferGeometry,n=new r.BufferAttribute(new Float32Array(3*Math.pow(32,3)),3),i=new r.BufferAttribute(new Float32Array(3*Math.pow(32,3)),3),o=new r.BufferAttribute(new Float32Array(Math.pow(32,3)),1),c=0;c<16;c++)for(var u=c/15,l=30*(2*u-1),f=0;f<16;f++)for(var h=f/15,v=30*(2*h-1),d=0;d<16;d++){var p=2*(c*Math.pow(16,2)+16*f+d),m=d/15,y=30*(2*m-1);n.setXYZ(p,l,v,y),n.setXYZ(p+1,l,v,y),i.setXYZ(p,u,h,m),i.setXYZ(p+1,u,h,m),o.setXYZ(p,0),o.setXYZ(p+1,1)}t.setAttribute("position",n),t.setAttribute("uv",i),t.setAttribute("movable",o);var g=new r.RawShaderMaterial({uniforms:{time:{value:0},resolution:{value:new r.Vector2},pixelRatio:{value:window.devicePixelRatio},noiseTex:{value:null},multiTime:{value:new r.Vector2}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 uv;\nattribute float movable;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform float time;\nuniform vec2 resolution;\nuniform float pixelRatio;\nuniform sampler2D noiseTex;\nuniform vec2 multiTime;\n\nvarying vec3 vColor;\n\nvoid main() {\n  // Coordinate transformation\n  vec3 v = position;\n  float texColorR = texture2D(noiseTex, (v.yz + v.x + time * multiTime * 14.0) * 0.01).r;\n  float texColorG = texture2D(noiseTex, (v.zx + v.y + time * multiTime * 14.0) * 0.01).g;\n  float texColorB = texture2D(noiseTex, (v.xy + v.z + time * multiTime * 14.0) * 0.01).b;\n  vec3 noise = vec3(\n    texColorR,\n    texColorG * 2.0 - 1.0,\n    texColorB * 2.0 - 1.0\n  );\n  vec4 mvPosition = viewMatrix * modelMatrix * vec4(position + noise * movable * 2.0, 1.0);\n  float distanceFromCamera = length(mvPosition.xyz);\n\n  vColor = vec3(texColorR, texColorG, texColorB);\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vColor;\n\nvoid main() {\n  gl_FragColor = vec4(vColor, 0.2);\n}\n",transparent:!0,depthWrite:!1,blending:r.AdditiveBlending});return(e=a.call(this,t,g)).name="Points",e}return t=s,(n=[{key:"start",value:function(e,t){var n=this.material.uniforms;n.noiseTex.value=e,n.multiTime.value.copy(t)}},{key:"update",value:function(e){this.material.uniforms.time.value+=e}},{key:"resize",value:function(e){this.material.uniforms.resolution.value.copy(e)}}])&&d(t.prototype,n),s}(r.LineSegments),x=n(17393),b=n.n(x),w="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n",M="precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D initData;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  gl_FragColor = texture2D(initData, vUv);\n}\n";function _(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)}}var S=function(e,t,n){return new r.Mesh(new r.PlaneGeometry(2,2),new r.RawShaderMaterial({uniforms:e,vertexShader:t,fragmentShader:n}))},P=function(){function e(t,n,i,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var a={type:/(iPad|iPhone|iPod)/g.test(navigator.userAgent)?r.HalfFloatType:r.FloatType,minFilter:r.NearestFilter,magFilter:r.NearestFilter};this.side=0,this.aScene=new r.Scene,this.vScene=new r.Scene,this.camera=new r.OrthographicCamera,this.acceleration=[new r.WebGLRenderTarget(0,0,a),new r.WebGLRenderTarget(0,0,a)],this.velocity=[new r.WebGLRenderTarget(0,0,a),new r.WebGLRenderTarget(0,0,a)],this.aUniforms={velocity:{value:null},acceleration:{value:null},time:{value:0}},this.vUniforms={side:{value:0},velocity:{value:null},acceleration:{value:null},time:{value:0}},this.aMesh=S(this.aUniforms,t,n),this.vMesh=S(this.vUniforms,i,o),this.uvs=[],this.targetIndex=0}var t,n;return t=e,(n=[{key:"start",value:function(e,t,n,i,o){this.side=this.vUniforms.side.value=Math.ceil(Math.sqrt(n.length/3)),this.camera.top=.5*this.side,this.camera.bottom=-.5*this.side,this.camera.right=.5*this.side,this.camera.left=-.5*this.side,this.camera.position.z=10;for(var a=[],s=[],c=0;c<3*Math.pow(this.side,2);c+=3)t&&null!=t[c]?(a[c+0]=t[c+0],a[c+1]=t[c+1],a[c+2]=t[c+2]):(a[c+0]=0,a[c+1]=0,a[c+2]=0),n&&null!=n[c]?(s[c+0]=n[c+0],s[c+1]=n[c+1],s[c+2]=n[c+2]):(s[c+0]=0,s[c+1]=0,s[c+2]=0),this.uvs[c/3*2+0]=c/3%this.side/(this.side-1),this.uvs[c/3*2+1]=Math.floor(c/3/this.side)/(this.side-1);if(i){var u=Object.keys(i);if(u.length)for(c=0;c<u.length;c++){for(var l=i[u[c]],f=l.array.length;f<s.length/3*l.itemSize;f++)l.array.push(0);this.aMesh.geometry.setAttribute(u[c],new r.BufferAttribute(new Float32Array(l.array),l.itemSize))}}if(o){var h=Object.keys(o);if(h.length)for(c=0;c<h.length;c++){var v=o[h[c]];for(f=v.array.length;f<s.length/3*v.itemSize;f++)v.array.push(0);this.vMesh.geometry.setAttribute(h[c],new r.BufferAttribute(new Float32Array(v.array),v.itemSize))}}for(c=0;c<2;c++)this.acceleration[c].setSize(this.side,this.side),this.velocity[c].setSize(this.side,this.side);var d=new r.DataTexture(new Float32Array(a),this.side,this.side,r.RGBFormat,r.FloatType);d.format=r.RGBFormat,d.type=r.FloatType,d.magFilter=r.NearestFilter,d.minFilter=r.NearestFilter,d.needsUpdate=!0;var p=new r.Mesh(new r.PlaneGeometry(2,2),new r.RawShaderMaterial({uniforms:{initData:{value:d}},vertexShader:w,fragmentShader:M}));this.aScene.add(this.camera),this.aScene.add(p),e.setRenderTarget(this.acceleration[Math.abs(this.targetIndex-1)]),e.render(this.aScene,this.camera),this.aScene.remove(p),this.aScene.add(this.aMesh);var m=new r.DataTexture(new Float32Array(s),this.side,this.side);m.format=r.RGBFormat,m.type=r.FloatType,m.magFilter=r.NearestFilter,m.minFilter=r.NearestFilter,m.needsUpdate=!0;var y=new r.Mesh(new r.PlaneGeometry(2,2),new r.RawShaderMaterial({uniforms:{initData:{value:m}},vertexShader:w,fragmentShader:M}));this.vScene.add(this.camera),this.vScene.add(y),e.setRenderTarget(this.velocity[this.targetIndex]),e.render(this.vScene,this.camera),this.vScene.remove(y),this.vScene.add(this.vMesh)}},{key:"update",value:function(e,t){var n=Math.abs(this.targetIndex-1),r=this.targetIndex;this.aUniforms.acceleration.value=this.acceleration[n].texture,this.aUniforms.velocity.value=this.velocity[r].texture,e.setRenderTarget(this.acceleration[r]),e.render(this.aScene,this.camera),this.vUniforms.acceleration.value=this.acceleration[r].texture,this.vUniforms.velocity.value=this.velocity[r].texture,e.setRenderTarget(this.velocity[n]),e.render(this.vScene,this.camera),this.targetIndex=n,this.aUniforms.time.value+=t,this.vUniforms.time.value+=t}},{key:"getBufferAttributeUv",value:function(){return new r.BufferAttribute(new Float32Array(this.uvs),2)}},{key:"getCurrentVelocity",value:function(){return this.velocity[Math.abs(this.targetIndex-1)].texture}},{key:"getCurrentAcceleration",value:function(){return this.acceleration[Math.abs(this.targetIndex-1)].texture}},{key:"mergeAUniforms",value:function(e){this.aUniforms=Object.assign(this.aUniforms,e)}},{key:"mergeVUniforms",value:function(e){this.vUniforms=Object.assign(this.vUniforms,e)}},{key:"createDataTexture",value:function(e){for(var t=[],n=0;n<3*Math.pow(this.side,2);n+=3)null!=e[n]?(t[n+0]=e[n+0],t[n+1]=e[n+1],t[n+2]=e[n+2]):(t[n+0]=0,t[n+1]=0,t[n+2]=0);return new r.DataTexture(new Float32Array(t),this.side,this.side,r.RGBFormat,r.FloatType)}}])&&_(t.prototype,n),e}();function T(e){return(T="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})(e)}function R(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)}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function z(e,t){return!t||"object"!==T(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function L(e){return(L=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=L(i);if(o){var n=L(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return z(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=new r.BufferGeometry,n=new r.BufferAttribute(new Float32Array(45e4),3),i=0;i<15e4;i++)n.setXYZ(i,0,0,0);t.setAttribute("position",n);var o=new r.RawShaderMaterial({uniforms:{time:{value:0},resolution:{value:new r.Vector2},pixelRatio:{value:window.devicePixelRatio},acceleration:{value:null},velocity:{value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uvVelocity;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float time;\nuniform vec2 resolution;\nuniform float pixelRatio;\nuniform sampler2D acceleration;\nuniform sampler2D velocity;\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\nvoid main() {\n  vec3 a = texture2D(acceleration, uvVelocity).xyz;\n  vec3 v = texture2D(velocity, uvVelocity).xyz;\n  vec4 mvPosition = modelViewMatrix * vec4(v, 1.0);\n\n  // Define the point size.\n  float distanceFromCamera = length(mvPosition.xyz);\n  float pointSize = 4.0 * resolution.y / 1024.0 * pixelRatio * 50.0 / distanceFromCamera;\n\n  vColor = a * 0.4 + 0.4;\n  vOpacity = length(a);\n\n  gl_PointSize = pointSize;\n  gl_Position = projectionMatrix * mvPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\nvoid main() {\n  vec2 p = gl_PointCoord * 2.0 - 1.0;\n  float radius = length(p);\n  float opacity = 1.0 - smoothstep(0.5, 1.0, radius);\n\n  if (opacity <= 0.0) discard;\n\n  gl_FragColor = vec4(vColor, vOpacity * opacity);\n}\n",transparent:!0,depthWrite:!1,blending:r.AdditiveBlending});return(e=a.call(this,t,o)).name="Mover",e.frustumCulled=!1,e.physicsRenderer,e.multiTime=new r.Vector2(2*Math.random()-1,2*Math.random()-1),e}return t=s,(n=[{key:"start",value:function(e,t){for(var n=this.material.uniforms,r=this.geometry.attributes.position.array,i=[],o=[],a=[],s=[],c=0;c<r.length;c+=3){var u=b().radians(360*Math.random()),l=1*Math.random()+2;i[c+0]=-29.99,i[c+1]=Math.cos(u)*l,i[c+2]=Math.sin(u)*l,o[c+0]=i[c+0],o[c+1]=i[c+1],o[c+2]=i[c+2],a[c+0]=10*Math.random(),a[c+1]=0,a[c+2]=0,s[c+0]=Math.random(),s[c+1]=0,s[c+2]=0}this.physicsRenderer=new P("#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n","precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D velocity;\nuniform sampler2D acceleration;\nuniform sampler2D noiseTex;\nuniform sampler2D delay;\nuniform sampler2D mass;\nuniform vec2 multiTime;\n\nvarying vec2 vUv;\n\n#ifndef PRECISION\n#define PRECISION 0.000001\n#endif\n\nvec3 drag(vec3 a, float value) {\n  return normalize(a * -1.0 + PRECISION) * length(a) * value;\n}\n\nvoid main(void) {\n  vec3 v = texture2D(velocity, vUv).xyz;\n  vec3 a = texture2D(acceleration, vUv).xyz;\n  float dl = texture2D(delay, vUv).x;\n  float mass = texture2D(mass, vUv).x;\n  vec3 d = drag(a, 0.01 + mass * 0.01);\n\n  float texColorR = texture2D(noiseTex, (v.yz + v.x + time * multiTime * 14.0) * 0.01).r;\n  float texColorG = texture2D(noiseTex, (v.zx + v.y + time * multiTime * 14.0) * 0.01).g;\n  float texColorB = texture2D(noiseTex, (v.xy + v.z + time * multiTime * 14.0) * 0.01).b;\n  vec3 noise = vec3(\n    texColorR,\n    texColorG * 2.0 - 1.0,\n    texColorB * 2.0 - 1.0\n  );\n  vec3 f = noise * 0.008 * step(dl, time);\n\n  float init = clamp(step(30.0, abs(v.x)) + step(30.0, abs(v.y)) + step(30.0, abs(v.z)), 0.0, 1.0);\n  vec3 ff = (f + a + d) * (1.0 - init) + vec3(0.0) * init;\n\n  gl_FragColor = vec4(ff, 1.0);\n}\n","#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n","precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D acceleration;\nuniform sampler2D velocity;\nuniform sampler2D velocityFirst;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vec3 a = texture2D(acceleration, vUv).xyz;\n  vec3 v = texture2D(velocity, vUv).xyz;\n  vec3 vf = texture2D(velocityFirst, vUv).xyz;\n\n  float init = clamp(step(30.0, abs(v.x)) + step(30.0, abs(v.y)) + step(30.0, abs(v.z)), 0.0, 1.0);\n  v = (a + v) * (1.0 - init) + vf * init;\n\n  gl_FragColor = vec4(v, 1.0);\n}\n"),this.physicsRenderer.start(e,[],i),this.physicsRenderer.mergeAUniforms({noiseTex:{value:t},delay:{value:this.physicsRenderer.createDataTexture(a)},mass:{value:this.physicsRenderer.createDataTexture(s)},multiTime:{value:this.multiTime}}),this.physicsRenderer.mergeVUniforms({velocityFirst:{value:this.physicsRenderer.createDataTexture(o)}}),n.acceleration.value=this.physicsRenderer.getCurrentAcceleration(),n.velocity.value=this.physicsRenderer.getCurrentVelocity(),this.geometry.setAttribute("uvVelocity",this.physicsRenderer.getBufferAttributeUv())}},{key:"update",value:function(e,t){var n=this.material.uniforms;this.physicsRenderer.update(e,t),n.acceleration.value=this.physicsRenderer.getCurrentAcceleration(),n.velocity.value=this.physicsRenderer.getCurrentVelocity(),n.time.value+=t}},{key:"resize",value:function(e){this.material.uniforms.resolution.value.copy(e)}}])&&R(t.prototype,n),s}(r.Points);function A(e){return(A="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})(e)}function O(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)}}function D(e,t){return(D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e,t){return!t||"object"!==A(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var F,j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&D(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=k(i);if(o){var n=k(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return I(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=new r.BufferGeometry,n=16,i=new r.BufferAttribute(new Float32Array(3*Math.pow(n,3)),3),o=new r.BufferAttribute(new Float32Array(3*Math.pow(n,3)),3),c=0;c<n;c++)for(var u=c/15,l=30*(2*u-1),f=0;f<n;f++)for(var h=f/15,v=30*(2*h-1),d=0;d<n;d++){var p=c*Math.pow(n,2)+f*n+d,m=d/15,y=30*(2*m-1);i.setXYZ(p,l,v,y),o.setXYZ(p,u,h,m)}t.setAttribute("position",i),t.setAttribute("uv",o);var g=new r.RawShaderMaterial({uniforms:{time:{value:0},resolution:{value:new r.Vector2},pixelRatio:{value:window.devicePixelRatio},noiseTex:{value:null},multiTime:{value:new r.Vector2}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform float time;\nuniform vec2 resolution;\nuniform float pixelRatio;\nuniform sampler2D noiseTex;\nuniform vec2 multiTime;\n\nvarying vec3 vColor;\n\nvoid main() {\n  // Coordinate transformation\n  vec3 v = position;\n  float texColorR = texture2D(noiseTex, (v.yz + v.x + time * multiTime * 14.0) * 0.01).r;\n  float texColorG = texture2D(noiseTex, (v.zx + v.y + time * multiTime * 14.0) * 0.01).g;\n  float texColorB = texture2D(noiseTex, (v.xy + v.z + time * multiTime * 14.0) * 0.01).b;\n  vec3 noise = vec3(\n    texColorR,\n    texColorG * 2.0 - 1.0,\n    texColorB * 2.0 - 1.0\n  );\n  vec4 mvPosition = viewMatrix * modelMatrix * vec4(position + noise * 2.0, 1.0);\n  float distanceFromCamera = length(mvPosition.xyz);\n\n  // Define the point size.\n  float pointSize = 3.0 * resolution.y / 1024.0 * pixelRatio * 50.0 / distanceFromCamera;\n\n  vColor = vec3(texColorR, texColorG, texColorB);\n\n  gl_Position = projectionMatrix * mvPosition;\n  gl_PointSize = pointSize;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vColor;\n\nvoid main() {\n  gl_FragColor = vec4(vColor, 0.2);\n}\n",transparent:!0,depthWrite:!1,blending:r.AdditiveBlending});return(e=a.call(this,t,g)).name="Points",e}return t=s,(n=[{key:"start",value:function(e,t){var n=this.material.uniforms;n.noiseTex.value=e,n.multiTime.value.copy(t)}},{key:"update",value:function(e){this.material.uniforms.time.value+=e}},{key:"resize",value:function(e){this.material.uniforms.resolution.value.copy(e)}}])&&O(t.prototype,n),s}(r.Points);function U(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function B(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)}}var G=new r.Scene,N=new h,H=new r.Clock({autoStart:!1}),V=new g,W=new C,Z=new j,q=new r.TextureLoader,Y=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i,o;return t=e,(n=[{key:"start",value:(i=regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(F=new r.WebGLRenderer({alpha:!0,antialias:!0,canvas:t})).setPixelRatio(window.devicePixelRatio),F.setClearColor(921102,1),new a.z(N,F.domElement),e.next=6,Promise.all([q.loadAsync("/sketch-threejs/img/sketch/flow_field/noise.jpg")]).then((function(e){var t=e[0];t.wrapS=r.RepeatWrapping,t.wrapT=r.RepeatWrapping,t.format=r.RGBFormat,t.type=r.FloatType,t.minFilter=r.NearestFilter,t.magFilter=r.NearestFilter,W.start(F,t),V.start(t,W.multiTime),Z.start(t,W.multiTime)}));case 6:G.add(V),G.add(W),G.add(Z),N.start();case 10:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=i.apply(e,t);function a(e){U(o,n,r,a,s,"next",e)}function s(e){U(o,n,r,a,s,"throw",e)}a(void 0)}))},function(e){return o.apply(this,arguments)})},{key:"play",value:function(){H.start(),this.update()}},{key:"pause",value:function(){H.stop()}},{key:"update",value:function(){if(!1!==H.running){var e=H.getDelta();N.update(e),V.update(e),W.update(F,e),Z.update(e),F.setRenderTarget(null),F.render(G,N)}}},{key:"resize",value:function(e){N.resize(e),V.resize(e),W.resize(e),Z.resize(e),F.setSize(e.x,e.y)}}])&&B(t.prototype,n),e}();function X(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function K(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){X(o,r,i,a,s,"next",e)}function s(e){X(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Q(){return J.apply(this,arguments)}function J(){return(J=K(regeneratorRuntime.mark((function e(){var t,n,i,a,s,c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new Y,n=new r.Vector2,i=document.getElementById("canvas-webgl"),a=document.querySelector(".p-preloader"),s=function(){n.set(document.body.clientWidth,window.innerHeight),i.width=n.x,i.height=n.y,t.resize(n)},c=function(){window.addEventListener("blur",(function(){t.pause()})),window.addEventListener("focus",(function(){t.play()})),window.addEventListener("resize",o()(s,100))},u=function e(){t.update(),requestAnimationFrame(e)},e.next=9,t.start(i);case 9:c(),s(),a.classList.add("is-hidden"),t.play(),u();case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},86139:function(e,t,n){"use strict";n.d(t,{Z:function(){return F}});var r=n(2212),i=n(38314),o=n.n(i),a=n(52886);function s(e){return(s="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})(e)}function c(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)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(i);if(o){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return l(this,e)});function s(e,t,n,i){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(o=a.call(this,e,t,n,i)).cameraResolution=new r.Vector2,o.time=0,o}return t=s,(n=[{key:"start",value:function(){this.far=1e3,this.setFocalLength(50),this.position.set(80,0,0),this.lookAt(new r.Vector3)}},{key:"update",value:function(e){this.time+=e}},{key:"resize",value:function(e){this.aspect=e.x/e.y,this.updateProjectionMatrix()}}])&&c(t.prototype,n),s}(r.PerspectiveCamera),v=n(17393),d=n.n(v),p="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n",m="precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D initData;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  gl_FragColor = texture2D(initData, vUv);\n}\n";function y(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)}}var g=function(e,t,n){return new r.Mesh(new r.PlaneGeometry(2,2),new r.RawShaderMaterial({uniforms:e,vertexShader:t,fragmentShader:n}))},x=function(){function e(t,n,i,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var a={type:/(iPad|iPhone|iPod)/g.test(navigator.userAgent)?r.HalfFloatType:r.FloatType,minFilter:r.NearestFilter,magFilter:r.NearestFilter};this.side=0,this.aScene=new r.Scene,this.vScene=new r.Scene,this.camera=new r.OrthographicCamera,this.acceleration=[new r.WebGLRenderTarget(0,0,a),new r.WebGLRenderTarget(0,0,a)],this.velocity=[new r.WebGLRenderTarget(0,0,a),new r.WebGLRenderTarget(0,0,a)],this.aUniforms={velocity:{value:null},acceleration:{value:null},time:{value:0}},this.vUniforms={side:{value:0},velocity:{value:null},acceleration:{value:null},time:{value:0}},this.aMesh=g(this.aUniforms,t,n),this.vMesh=g(this.vUniforms,i,o),this.uvs=[],this.targetIndex=0}var t,n;return t=e,(n=[{key:"start",value:function(e,t,n,i,o){this.side=this.vUniforms.side.value=Math.ceil(Math.sqrt(n.length/3)),this.camera.top=.5*this.side,this.camera.bottom=-.5*this.side,this.camera.right=.5*this.side,this.camera.left=-.5*this.side,this.camera.position.z=10;for(var a=[],s=[],c=0;c<3*Math.pow(this.side,2);c+=3)t&&null!=t[c]?(a[c+0]=t[c+0],a[c+1]=t[c+1],a[c+2]=t[c+2]):(a[c+0]=0,a[c+1]=0,a[c+2]=0),n&&null!=n[c]?(s[c+0]=n[c+0],s[c+1]=n[c+1],s[c+2]=n[c+2]):(s[c+0]=0,s[c+1]=0,s[c+2]=0),this.uvs[c/3*2+0]=c/3%this.side/(this.side-1),this.uvs[c/3*2+1]=Math.floor(c/3/this.side)/(this.side-1);if(i){var u=Object.keys(i);if(u.length)for(c=0;c<u.length;c++){for(var l=i[u[c]],f=l.array.length;f<s.length/3*l.itemSize;f++)l.array.push(0);this.aMesh.geometry.setAttribute(u[c],new r.BufferAttribute(new Float32Array(l.array),l.itemSize))}}if(o){var h=Object.keys(o);if(h.length)for(c=0;c<h.length;c++){var v=o[h[c]];for(f=v.array.length;f<s.length/3*v.itemSize;f++)v.array.push(0);this.vMesh.geometry.setAttribute(h[c],new r.BufferAttribute(new Float32Array(v.array),v.itemSize))}}for(c=0;c<2;c++)this.acceleration[c].setSize(this.side,this.side),this.velocity[c].setSize(this.side,this.side);var d=new r.DataTexture(new Float32Array(a),this.side,this.side,r.RGBFormat,r.FloatType);d.format=r.RGBFormat,d.type=r.FloatType,d.magFilter=r.NearestFilter,d.minFilter=r.NearestFilter,d.needsUpdate=!0;var y=new r.Mesh(new r.PlaneGeometry(2,2),new r.RawShaderMaterial({uniforms:{initData:{value:d}},vertexShader:p,fragmentShader:m}));this.aScene.add(this.camera),this.aScene.add(y),e.setRenderTarget(this.acceleration[Math.abs(this.targetIndex-1)]),e.render(this.aScene,this.camera),this.aScene.remove(y),this.aScene.add(this.aMesh);var g=new r.DataTexture(new Float32Array(s),this.side,this.side);g.format=r.RGBFormat,g.type=r.FloatType,g.magFilter=r.NearestFilter,g.minFilter=r.NearestFilter,g.needsUpdate=!0;var x=new r.Mesh(new r.PlaneGeometry(2,2),new r.RawShaderMaterial({uniforms:{initData:{value:g}},vertexShader:p,fragmentShader:m}));this.vScene.add(this.camera),this.vScene.add(x),e.setRenderTarget(this.velocity[this.targetIndex]),e.render(this.vScene,this.camera),this.vScene.remove(x),this.vScene.add(this.vMesh)}},{key:"update",value:function(e,t){var n=Math.abs(this.targetIndex-1),r=this.targetIndex;this.aUniforms.acceleration.value=this.acceleration[n].texture,this.aUniforms.velocity.value=this.velocity[r].texture,e.setRenderTarget(this.acceleration[r]),e.render(this.aScene,this.camera),this.vUniforms.acceleration.value=this.acceleration[r].texture,this.vUniforms.velocity.value=this.velocity[r].texture,e.setRenderTarget(this.velocity[n]),e.render(this.vScene,this.camera),this.targetIndex=n,this.aUniforms.time.value+=t,this.vUniforms.time.value+=t}},{key:"getBufferAttributeUv",value:function(e){var t=e.instanced;return void 0!==t&&t?new r.InstancedBufferAttribute(new Float32Array(this.uvs),2):new r.BufferAttribute(new Float32Array(this.uvs),2)}},{key:"getCurrentVelocity",value:function(){return this.velocity[Math.abs(this.targetIndex-1)].texture}},{key:"getCurrentAcceleration",value:function(){return this.acceleration[Math.abs(this.targetIndex-1)].texture}},{key:"mergeAUniforms",value:function(e){this.aUniforms=Object.assign(this.aUniforms,e)}},{key:"mergeVUniforms",value:function(e){this.vUniforms=Object.assign(this.vUniforms,e)}},{key:"createDataTexture",value:function(e){for(var t=[],n=0;n<3*Math.pow(this.side,2);n+=3)null!=e[n]?(t[n+0]=e[n+0],t[n+1]=e[n+1],t[n+2]=e[n+2]):(t[n+0]=0,t[n+1]=0,t[n+2]=0);return new r.DataTexture(new Float32Array(t),this.side,this.side,r.RGBFormat,r.FloatType)}}])&&y(t.prototype,n),e}();function b(e){return(b="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})(e)}function w(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)}}function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e,t){return!t||"object"!==b(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var P,T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&M(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=S(i);if(o){var n=S(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return _(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.InstancedBufferGeometry,n=new r.ConeGeometry(.1,2,5);t.copy(n);var i=new r.RawShaderMaterial({uniforms:{time:{value:0},acceleration:{value:null},velocity:{value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uvVelocity;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float time;\nuniform vec2 resolution;\nuniform float pixelRatio;\nuniform sampler2D acceleration;\nuniform sampler2D velocity;\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\nmat4 calcTranslateMat4(vec3 v) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    v.x, v.y, v.z, 1.0\n  );\n}\n\nmat4 calcScaleMat4(vec3 scale) {\n  return mat4(\n    scale.x, 0.0, 0.0, 0.0,\n    0.0, scale.y, 0.0, 0.0,\n    0.0, 0.0, scale.z, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nstruct Quaternion {\n  float x;\n  float y;\n  float z;\n  float w;\n};\n\n// https://qiita.com/aa_debdeb/items/c34a3088b2d8d3731813\nQuaternion axisAngle(vec3 axis, float radian) {\n  vec3 naxis = normalize(axis);\n  float h = 0.5 * radian;\n  float s = sin(h);\n  return Quaternion(naxis.x * s, naxis.y * s, naxis.z * s, cos(h));\n}\n\nQuaternion conjugate(Quaternion q) {\n  return Quaternion(-q.x, -q.y, -q.z, q.w);\n}\n\nQuaternion mul(Quaternion q, float f) {\n  return Quaternion(f * q.x, f * q.y, f * q.z, f * q.w);\n}\n\nQuaternion mul(Quaternion q1, Quaternion q2) {\n  return Quaternion(\n    q2.w * q1.x - q2.z * q1.y + q2.y * q1.z + q2.x * q1.w,\n    q2.z * q1.x + q2.w * q1.y - q2.x * q1.z + q2.y * q1.w,\n    -q2.y * q1.x + q2.x * q1.y + q2.w * q1.z + q2.z * q1.w,\n    -q2.x * q1.x - q2.y * q1.y - q2.z * q1.z + q2.w * q1.w\n  );\n}\n\nvec3 rotate(vec3 v, Quaternion q) {\n  // norm of q must be 1.\n  Quaternion vq = Quaternion(v.x, v.y, v.z, 0.0);\n  Quaternion cq = conjugate(q);\n  Quaternion mq = mul(mul(cq, vq), q);\n  return vec3(mq.x, mq.y, mq.z);\n}\n\nvoid main() {\n  vec3 a = texture2D(acceleration, uvVelocity).xyz;\n  vec3 v = texture2D(velocity, uvVelocity).xyz;\n  float alpha = texture2D(velocity, uvVelocity).w;\n\n  // for scale.\n  mat4 scaleMat = calcScaleMat4(vec3(1.0, length(a) * 3.0 + 0.1, 1.0));\n  vec3 scaledPosition = (scaleMat * vec4(position, 1.0)).xyz;\n\n  // for rotation.\n  vec3 top = vec3(0.0, 1.0, 0.0);\n  vec3 dir = normalize(a);\n  vec3 axis = cross(top, dir);\n  float angle = acos(dot(top, dir));\n  Quaternion q = axisAngle(axis, angle);\n  vec3 rotatedPosition = rotate(scaledPosition, q);\n  \n  vec4 mvPosition = modelViewMatrix * calcTranslateMat4(v) * vec4(rotatedPosition, 1.0);\n\n  // Define the point size.\n  float distanceFromCamera = length(mvPosition.xyz);\n\n  vColor = convertHsvToRgb(\n    vec3(\n      degrees(angle) / 180.0,\n      0.45,\n      0.8\n    )\n  );\n  vOpacity = alpha;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\nvoid main() {\n  if (vOpacity <= 0.01) discard;\n\n  gl_FragColor = vec4(vColor, vOpacity);\n}\n",transparent:!0});return(e=a.call(this,t,i,3e4)).name="Mover",e.frustumCulled=!1,e.physicsRenderer,e.multiTime=new r.Vector2(2*Math.random()-1,2*Math.random()-1),e}return t=s,(n=[{key:"start",value:function(e,t){for(var n=this.material.uniforms,r=[],i=[],o=[],a=[],s=[],c=[],u=0;u<3*this.count;u+=3){var l=d().radians(360*Math.random()),f=d().radians(360*Math.random()),h=d().spherical(l,f,5);r[u+0]=.02*h[0],r[u+1]=.02*h[1],r[u+2]=.02*h[2],i[u+0]=h[0],i[u+1]=h[1],i[u+2]=h[2],o[u+0]=.3*r[u+0],o[u+1]=.3*r[u+1],o[u+2]=.3*r[u+2],a[u+0]=i[u+0],a[u+1]=i[u+1],a[u+2]=i[u+2],s[u+0]=0,s[u+1]=0,s[u+2]=0,c[u+0]=Math.random(),c[u+1]=0,c[u+2]=0}this.physicsRenderer=new x("#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n","precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D velocity;\nuniform sampler2D acceleration;\nuniform sampler2D accelerationFirst;\nuniform sampler2D noiseTex;\nuniform sampler2D delay;\nuniform sampler2D mass;\nuniform vec2 multiTime;\n\nvarying vec2 vUv;\n\n#ifndef PRECISION\n#define PRECISION 0.000001\n#endif\n\nvec3 drag(vec3 a, float value) {\n  return normalize(a * -1.0 + PRECISION) * length(a) * value;\n}\n\nvoid main(void) {\n  vec3 v = texture2D(velocity, vUv).xyz;\n  vec3 a = texture2D(acceleration, vUv).xyz;\n  vec3 af = texture2D(accelerationFirst, vUv).xyz;\n  float dl = texture2D(delay, vUv).x;\n  float mass = texture2D(mass, vUv).x;\n  vec3 d = drag(a, 0.012 + mass * 0.004);\n\n  float texColorR = texture2D(noiseTex, (v.yz + vec2(v.x, 0.0) + time * multiTime * 12.0) * 0.006).r;\n  float texColorG = texture2D(noiseTex, (v.zx + vec2(v.y, 0.0) + time * multiTime * 12.0) * 0.006).g;\n  float texColorB = texture2D(noiseTex, (v.xy + vec2(v.z, 0.0) + time * multiTime * 12.0) * 0.006).b;\n  vec3 noise = vec3(\n    texColorR * 2.0 - 1.0,\n    texColorG * 2.0 - 1.0,\n    texColorB * 2.0 - 1.0\n  );\n  vec3 f = noise * 0.014 * step(dl, time);\n\n  float init = step(100.0, length(v));\n  vec3 f2 = (f + a + d + af * 0.003) * (1.0 - init) + af * init;\n\n  gl_FragColor = vec4(f2, 1.0);\n}\n","#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n","precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D acceleration;\nuniform sampler2D velocity;\nuniform sampler2D velocityFirst;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vec3 a = texture2D(acceleration, vUv).xyz;\n  vec3 v = texture2D(velocity, vUv).xyz;\n  vec3 vf = texture2D(velocityFirst, vUv).xyz;\n\n  float init = step(100.0, length(v));\n  v = (a + v) * (1.0 - init) + vf * init;\n\n  gl_FragColor = vec4(v, (1.0 - init));\n}\n"),this.physicsRenderer.start(e,r,i),this.physicsRenderer.mergeAUniforms({noiseTex:{value:t},accelerationFirst:{value:this.physicsRenderer.createDataTexture(o)},delay:{value:this.physicsRenderer.createDataTexture(s)},mass:{value:this.physicsRenderer.createDataTexture(c)},multiTime:{value:this.multiTime}}),this.physicsRenderer.mergeVUniforms({velocityFirst:{value:this.physicsRenderer.createDataTexture(a)}}),n.acceleration.value=this.physicsRenderer.getCurrentAcceleration(),n.velocity.value=this.physicsRenderer.getCurrentVelocity(),this.geometry.setAttribute("uvVelocity",this.physicsRenderer.getBufferAttributeUv({instanced:!0}))}},{key:"update",value:function(e,t){var n=this.material.uniforms;this.physicsRenderer.update(e,t),n.acceleration.value=this.physicsRenderer.getCurrentAcceleration(),n.velocity.value=this.physicsRenderer.getCurrentVelocity(),n.time.value+=t}}])&&w(t.prototype,n),s}(r.InstancedMesh);function R(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}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)}}var z=new r.Scene,L=new h,C=new r.Clock({autoStart:!1}),A=new T,O=new r.TextureLoader,D=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i,o;return t=e,(n=[{key:"start",value:(i=regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(P=new r.WebGLRenderer({alpha:!0,antialias:!0,canvas:t})).setPixelRatio(window.devicePixelRatio),P.setClearColor(921102,1),new a.z(L,P.domElement),e.next=6,Promise.all([O.loadAsync("/sketch-threejs/img/sketch/flow_field/noise.jpg")]).then((function(e){var t=e[0];t.wrapS=r.RepeatWrapping,t.wrapT=r.RepeatWrapping,t.format=r.RGBFormat,t.type=r.FloatType,t.minFilter=r.NearestFilter,t.magFilter=r.NearestFilter,A.start(P,t)}));case 6:z.add(A),L.start();case 8:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=i.apply(e,t);function a(e){R(o,n,r,a,s,"next",e)}function s(e){R(o,n,r,a,s,"throw",e)}a(void 0)}))},function(e){return o.apply(this,arguments)})},{key:"play",value:function(){C.start(),this.update()}},{key:"pause",value:function(){C.stop()}},{key:"update",value:function(){if(!1!==C.running){var e=C.getDelta();L.update(e),A.update(P,e),P.setRenderTarget(null),P.render(z,L)}}},{key:"resize",value:function(e){L.resize(e),P.setSize(e.x,e.y)}}])&&E(t.prototype,n),e}();function I(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function k(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){I(o,r,i,a,s,"next",e)}function s(e){I(o,r,i,a,s,"throw",e)}a(void 0)}))}}function F(){return j.apply(this,arguments)}function j(){return(j=k(regeneratorRuntime.mark((function e(){var t,n,i,a,s,c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new D,n=new r.Vector2,i=document.getElementById("canvas-webgl"),a=document.querySelector(".p-preloader"),s=function(){n.set(document.body.clientWidth,window.innerHeight),i.width=n.x,i.height=n.y,t.resize(n)},c=function(){window.addEventListener("blur",(function(){t.pause()})),window.addEventListener("focus",(function(){t.play()})),window.addEventListener("resize",o()(s,100))},u=function e(){t.update(),requestAnimationFrame(e)},e.next=9,t.start(i);case 9:c(),s(),a.classList.add("is-hidden"),t.play(),u();case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},76837:function(e,t,n){"use strict";n.d(t,{Z:function(){return F}});var r=n(2212),i=n(38314),o=n.n(i),a=n(52886);function s(e){return(s="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})(e)}function c(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)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(i);if(o){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return l(this,e)});function s(e,t,n,i){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(o=a.call(this,e,t,n,i)).cameraResolution=new r.Vector2,o.time=0,o}return t=s,(n=[{key:"start",value:function(){this.far=1e3,this.setFocalLength(50),this.position.set(80,0,0),this.lookAt(new r.Vector3)}},{key:"update",value:function(e){this.time+=e}},{key:"resize",value:function(e){this.aspect=e.x/e.y,this.updateProjectionMatrix()}}])&&c(t.prototype,n),s}(r.PerspectiveCamera),v=n(17393),d=n.n(v),p="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n",m="precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D initData;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  gl_FragColor = texture2D(initData, vUv);\n}\n";function y(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)}}var g=function(e,t,n){return new r.Mesh(new r.PlaneGeometry(2,2),new r.RawShaderMaterial({uniforms:e,vertexShader:t,fragmentShader:n}))},x=function(){function e(t,n,i,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var a={type:/(iPad|iPhone|iPod)/g.test(navigator.userAgent)?r.HalfFloatType:r.FloatType,minFilter:r.NearestFilter,magFilter:r.NearestFilter};this.side=0,this.aScene=new r.Scene,this.vScene=new r.Scene,this.camera=new r.OrthographicCamera,this.acceleration=[new r.WebGLRenderTarget(0,0,a),new r.WebGLRenderTarget(0,0,a)],this.velocity=[new r.WebGLRenderTarget(0,0,a),new r.WebGLRenderTarget(0,0,a)],this.aUniforms={velocity:{value:null},acceleration:{value:null},time:{value:0}},this.vUniforms={side:{value:0},velocity:{value:null},acceleration:{value:null},time:{value:0}},this.aMesh=g(this.aUniforms,t,n),this.vMesh=g(this.vUniforms,i,o),this.uvs=[],this.targetIndex=0}var t,n;return t=e,(n=[{key:"start",value:function(e,t,n,i,o){this.side=this.vUniforms.side.value=Math.ceil(Math.sqrt(n.length/3)),this.camera.top=.5*this.side,this.camera.bottom=-.5*this.side,this.camera.right=.5*this.side,this.camera.left=-.5*this.side,this.camera.position.z=10;for(var a=[],s=[],c=0;c<3*Math.pow(this.side,2);c+=3)t&&null!=t[c]?(a[c+0]=t[c+0],a[c+1]=t[c+1],a[c+2]=t[c+2]):(a[c+0]=0,a[c+1]=0,a[c+2]=0),n&&null!=n[c]?(s[c+0]=n[c+0],s[c+1]=n[c+1],s[c+2]=n[c+2]):(s[c+0]=0,s[c+1]=0,s[c+2]=0),this.uvs[c/3*2+0]=c/3%this.side/(this.side-1),this.uvs[c/3*2+1]=Math.floor(c/3/this.side)/(this.side-1);if(i){var u=Object.keys(i);if(u.length)for(var l=0;l<u.length;l++){for(var f=i[u[l]],h=f.array.length;h<s.length/3*f.itemSize;h++)f.array.push(0);this.aMesh.geometry.setAttribute(u[l],new r.BufferAttribute(new Float32Array(f.array),f.itemSize))}}if(o){var v=Object.keys(o);if(v.length)for(var d=0;d<v.length;d++){for(var y=o[v[d]],g=y.array.length;g<s.length/3*y.itemSize;g++)y.array.push(0);this.vMesh.geometry.setAttribute(v[d],new r.BufferAttribute(new Float32Array(y.array),y.itemSize))}}for(var x=0;x<2;x++)this.acceleration[x].setSize(this.side,this.side),this.velocity[x].setSize(this.side,this.side);var b=new r.DataTexture(new Float32Array(a),this.side,this.side,r.RGBFormat,r.FloatType);b.format=r.RGBFormat,b.type=r.FloatType,b.magFilter=r.NearestFilter,b.minFilter=r.NearestFilter,b.needsUpdate=!0;var w=new r.Mesh(new r.PlaneGeometry(2,2),new r.RawShaderMaterial({uniforms:{initData:{value:b}},vertexShader:p,fragmentShader:m}));this.aScene.add(this.camera),this.aScene.add(w),e.setRenderTarget(this.acceleration[Math.abs(this.targetIndex-1)]),e.render(this.aScene,this.camera),this.aScene.remove(w),this.aScene.add(this.aMesh);var M=new r.DataTexture(new Float32Array(s),this.side,this.side);M.format=r.RGBFormat,M.type=r.FloatType,M.magFilter=r.NearestFilter,M.minFilter=r.NearestFilter,M.needsUpdate=!0;var _=new r.Mesh(new r.PlaneGeometry(2,2),new r.RawShaderMaterial({uniforms:{initData:{value:M}},vertexShader:p,fragmentShader:m}));this.vScene.add(this.camera),this.vScene.add(_),e.setRenderTarget(this.velocity[this.targetIndex]),e.render(this.vScene,this.camera),this.vScene.remove(_),this.vScene.add(this.vMesh)}},{key:"update",value:function(e,t){var n=Math.abs(this.targetIndex-1),r=this.targetIndex;this.aUniforms.acceleration.value=this.acceleration[n].texture,this.aUniforms.velocity.value=this.velocity[r].texture,e.setRenderTarget(this.acceleration[r]),e.render(this.aScene,this.camera),this.vUniforms.acceleration.value=this.acceleration[r].texture,this.vUniforms.velocity.value=this.velocity[r].texture,e.setRenderTarget(this.velocity[n]),e.render(this.vScene,this.camera),e.setRenderTarget(null),this.targetIndex=n,this.aUniforms.time.value+=t,this.vUniforms.time.value+=t}},{key:"getBufferAttributeUv",value:function(e){var t=e.instanced;return void 0!==t&&t?new r.InstancedBufferAttribute(new Float32Array(this.uvs),2):new r.BufferAttribute(new Float32Array(this.uvs),2)}},{key:"getCurrentVelocity",value:function(){return this.velocity[Math.abs(this.targetIndex-1)].texture}},{key:"getCurrentAcceleration",value:function(){return this.acceleration[Math.abs(this.targetIndex-1)].texture}},{key:"mergeAUniforms",value:function(e){this.aUniforms=Object.assign(this.aUniforms,e)}},{key:"mergeVUniforms",value:function(e){this.vUniforms=Object.assign(this.vUniforms,e)}},{key:"createDataTexture",value:function(e){for(var t=[],n=0;n<3*Math.pow(this.side,2);n+=3)null!=e[n]?(t[n+0]=e[n+0],t[n+1]=e[n+1],t[n+2]=e[n+2]):(t[n+0]=0,t[n+1]=0,t[n+2]=0);return new r.DataTexture(new Float32Array(t),this.side,this.side,r.RGBFormat,r.FloatType)}}])&&y(t.prototype,n),e}();function b(e){return(b="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})(e)}function w(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)}}function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e,t){return!t||"object"!==b(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var P,T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&M(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=S(i);if(o){var n=S(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return _(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.InstancedBufferGeometry,n=new r.BoxGeometry(.25,.5,.25,1,10,1);t.copy(n);var i=new r.RawShaderMaterial({uniforms:{acceleration:{value:null},velocity:{value:null},time:{value:0}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\nattribute vec2 uvVelocity;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float time;\nuniform sampler2D acceleration;\nuniform sampler2D velocity;\nuniform sampler2D velocity1;\nuniform sampler2D velocity2;\nuniform sampler2D velocity3;\nuniform sampler2D velocity4;\nuniform sampler2D velocity5;\nuniform sampler2D velocity6;\nuniform sampler2D velocity7;\nuniform sampler2D velocity8;\nuniform sampler2D velocity9;\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\nmat4 calcTranslateMat4(vec3 v) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    v.x, v.y, v.z, 1.0\n  );\n}\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nstruct Quaternion {\n  float x;\n  float y;\n  float z;\n  float w;\n};\n\n// https://qiita.com/aa_debdeb/items/c34a3088b2d8d3731813\nQuaternion axisAngle(vec3 axis, float radian) {\n  vec3 naxis = normalize(axis);\n  float h = 0.5 * radian;\n  float s = sin(h);\n  return Quaternion(naxis.x * s, naxis.y * s, naxis.z * s, cos(h));\n}\n\nQuaternion conjugate(Quaternion q) {\n  return Quaternion(-q.x, -q.y, -q.z, q.w);\n}\n\nQuaternion mul(Quaternion q, float f) {\n  return Quaternion(f * q.x, f * q.y, f * q.z, f * q.w);\n}\n\nQuaternion mul(Quaternion q1, Quaternion q2) {\n  return Quaternion(\n    q2.w * q1.x - q2.z * q1.y + q2.y * q1.z + q2.x * q1.w,\n    q2.z * q1.x + q2.w * q1.y - q2.x * q1.z + q2.y * q1.w,\n    -q2.y * q1.x + q2.x * q1.y + q2.w * q1.z + q2.z * q1.w,\n    -q2.x * q1.x - q2.y * q1.y - q2.z * q1.z + q2.w * q1.w\n  );\n}\n\nvec3 rotate(vec3 v, Quaternion q) {\n  // norm of q must be 1.\n  Quaternion vq = Quaternion(v.x, v.y, v.z, 0.0);\n  Quaternion cq = conjugate(q);\n  Quaternion mq = mul(mul(cq, vq), q);\n  return vec3(mq.x, mq.y, mq.z);\n}\n\nvoid main() {\n  float y = position.y + 0.5;\n  vec3 a = texture2D(acceleration, uvVelocity).xyz;\n  vec3 v0 = texture2D(velocity, uvVelocity).xyz;\n  vec3 v1 = texture2D(velocity1, uvVelocity).xyz;\n  vec3 v2 = texture2D(velocity2, uvVelocity).xyz;\n  vec3 v3 = texture2D(velocity3, uvVelocity).xyz;\n  vec3 v4 = texture2D(velocity4, uvVelocity).xyz;\n  vec3 v5 = texture2D(velocity5, uvVelocity).xyz;\n  vec3 v6 = texture2D(velocity6, uvVelocity).xyz;\n  vec3 v7 = texture2D(velocity7, uvVelocity).xyz;\n  vec3 v8 = texture2D(velocity8, uvVelocity).xyz;\n  vec3 v9 = texture2D(velocity9, uvVelocity).xyz;\n  vec3 v =\n    v0 * step(0.0, y) * (1.0 - step(1.0 / 10.0, y)) +\n    v1 * step(1.0 / 10.0, y) * (1.0 - step(2.0 / 10.0, y)) +\n    v2 * step(2.0 / 10.0, y) * (1.0 - step(3.0 / 10.0, y)) +\n    v3 * step(3.0 / 10.0, y) * (1.0 - step(4.0 / 10.0, y)) +\n    v4 * step(4.0 / 10.0, y) * (1.0 - step(5.0 / 10.0, y)) +\n    v5 * step(5.0 / 10.0, y) * (1.0 - step(6.0 / 10.0, y)) +\n    v6 * step(6.0 / 10.0, y) * (1.0 - step(7.0 / 10.0, y)) +\n    v7 * step(7.0 / 10.0, y) * (1.0 - step(8.0 / 10.0, y)) +\n    v8 * step(8.0 / 10.0, y) * (1.0 - step(9.0 / 10.0, y)) +\n    v9 * step(9.0 / 10.0, y);\n  vec3 pv =\n    (v + a) * (1.0 - step(1.0 / 10.0, y)) +\n    v0 * step(1.0 / 10.0, y) * (1.0 - step(2.0 / 10.0, y)) +\n    v1 * step(2.0 / 10.0, y) * (1.0 - step(3.0 / 10.0, y)) +\n    v2 * step(3.0 / 10.0, y) * (1.0 - step(4.0 / 10.0, y)) +\n    v3 * step(4.0 / 10.0, y) * (1.0 - step(5.0 / 10.0, y)) +\n    v4 * step(5.0 / 10.0, y) * (1.0 - step(6.0 / 10.0, y)) +\n    v5 * step(6.0 / 10.0, y) * (1.0 - step(7.0 / 10.0, y)) +\n    v6 * step(7.0 / 10.0, y) * (1.0 - step(8.0 / 10.0, y)) +\n    v7 * step(8.0 / 10.0, y) * (1.0 - step(9.0 / 10.0, y)) +\n    v8 * step(9.0 / 10.0, y);\n  float alpha = texture2D(velocity, uvVelocity).w;\n\n  // for rotation.\n  vec3 top = vec3(0.0, 1.0, 0.0);\n  vec3 dir = normalize(pv - v);\n  vec3 axis = cross(top, dir);\n  float angle = acos(dot(top, dir));\n  Quaternion q = axisAngle(axis, angle);\n  vec3 rotatedPosition = rotate(position, q);\n  \n  vec4 mvPosition = modelViewMatrix * calcTranslateMat4(v) * vec4(rotatedPosition, 1.0);\n\n  // Define the point size.\n  float distanceFromCamera = length(mvPosition.xyz);\n\n  vColor = convertHsvToRgb(\n    vec3(\n      degrees(angle) / 180.0,\n      0.45,\n      0.8\n    )\n  );\n  vOpacity = alpha;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\nvoid main() {\n  if (vOpacity <= 0.01) discard;\n\n  gl_FragColor = vec4(vColor, vOpacity);\n}\n"});return(e=a.call(this,t,i,5e3)).name="Mover",e.frustumCulled=!1,e.physicsRenderers=[],e.multiTime=new r.Vector2(2*Math.random()-1,2*Math.random()-1),e}return t=s,(n=[{key:"start",value:function(e,t){for(var n=this.material.uniforms,r=[],i=[],o=[],a=[],s=[],c=0;c<3*this.count;c+=3){var u=d().radians(360*Math.random()),l=d().radians(360*Math.random()),f=d().spherical(u,l,5);r[c+0]=.02*f[0],r[c+1]=.02*f[1],r[c+2]=.02*f[2],i[c+0]=f[0],i[c+1]=f[1],i[c+2]=f[2],o[c+0]=.3*r[c+0],o[c+1]=.3*r[c+1],o[c+2]=.3*r[c+2],a[c+0]=i[c+0],a[c+1]=i[c+1],a[c+2]=i[c+2],s[c+0]=Math.random(),s[c+1]=0,s[c+2]=0}for(var h=0;h<10;h++)0===h?(this.physicsRenderers[h]=new x("#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n","precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D velocity;\nuniform sampler2D acceleration;\nuniform sampler2D accelerationFirst;\nuniform sampler2D noiseTex;\nuniform sampler2D mass;\nuniform vec2 multiTime;\n\nvarying vec2 vUv;\n\n#ifndef PRECISION\n#define PRECISION 0.000001\n#endif\n\nvec3 drag(vec3 a, float value) {\n  return normalize(a * -1.0 + PRECISION) * length(a) * value;\n}\n\nvoid main(void) {\n  vec3 v = texture2D(velocity, vUv).xyz;\n  vec3 a = texture2D(acceleration, vUv).xyz;\n  vec3 af = texture2D(accelerationFirst, vUv).xyz;\n  float mass = texture2D(mass, vUv).x;\n  vec3 d = drag(a, 0.012 + mass * 0.004);\n\n  float texColorR = texture2D(noiseTex, (v.yz + vec2(v.x, 0.0) + time * multiTime * 6.0) * 0.0045).r;\n  float texColorG = texture2D(noiseTex, (v.zx + vec2(v.y, 0.0) + time * multiTime * 6.0) * 0.0045).g;\n  float texColorB = texture2D(noiseTex, (v.xy + vec2(v.z, 0.0) + time * multiTime * 6.0) * 0.0045).b;\n  vec3 noise = vec3(\n    texColorR * 2.0 - 1.0,\n    texColorG * 2.0 - 1.0,\n    texColorB * 2.0 - 1.0\n  );\n  vec3 f = noise * 0.016;\n\n  float init = step(200.0, length(v));\n  vec3 f2 = (f + a + d + af * 0.003) * (1.0 - init) + af * init;\n\n  gl_FragColor = vec4(f2, 1.0);\n}\n","#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n","precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D acceleration;\nuniform sampler2D velocity;\nuniform sampler2D velocityFirst;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vec3 a = texture2D(acceleration, vUv).xyz;\n  vec3 v = texture2D(velocity, vUv).xyz;\n  vec3 vf = texture2D(velocityFirst, vUv).xyz;\n\n  float init = step(200.0, length(v));\n  v = (a + v) * (1.0 - init) + vf * init;\n\n  gl_FragColor = vec4(v, (1.0 - init));\n}\n"),this.physicsRenderers[h].start(e,r,i),this.physicsRenderers[h].mergeAUniforms({noiseTex:{value:t},accelerationFirst:{value:this.physicsRenderers[h].createDataTexture(o)},mass:{value:this.physicsRenderers[h].createDataTexture(s)},multiTime:{value:this.multiTime}}),this.physicsRenderers[h].mergeVUniforms({velocityFirst:{value:this.physicsRenderers[h].createDataTexture(a)}})):(this.physicsRenderers[h]=new x("#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n","precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D prevVelocity;\nuniform sampler2D headVelocity;\nuniform sampler2D velocity;\nuniform sampler2D acceleration;\nuniform sampler2D noiseTex;\nuniform sampler2D delay;\nuniform sampler2D mass;\n\nvarying vec2 vUv;\n\n#ifndef PRECISION\n#define PRECISION 0.000001\n#endif\n\nvec3 drag(vec3 a, float value) {\n  return normalize(a * -1.0 + PRECISION) * length(a) * value;\n}\n\n#ifndef PRECISION\n#define PRECISION 0.000001\n#endif\n\nvec3 hook(vec3 velocity, vec3 anchor, float restLength, float k) {\n  return normalize(velocity - anchor + PRECISION) * (-1.0 * k * (length(velocity - anchor) - restLength));\n}\n\nvoid main(void) {\n  vec3 pv = texture2D(prevVelocity, vUv).xyz;\n  vec3 hv = texture2D(headVelocity, vUv).xyz;\n  vec3 v = texture2D(velocity, vUv).xyz;\n  vec3 a = texture2D(acceleration, vUv).xyz;\n  float mass = texture2D(mass, vUv).x;\n  vec3 d = drag(a, 0.6);\n  vec3 h = hook(v, pv, 0.8, 0.12);\n\n  float init = step(200.0, length(hv));\n  vec3 f = (a + d + h) * (1.0 - init) + vec3(0.0) * init;\n\n  gl_FragColor = vec4(f, 1.0);\n}\n","#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n","precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D acceleration;\nuniform sampler2D velocity;\nuniform sampler2D velocityFirst;\nuniform sampler2D headVelocity;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vec3 a = texture2D(acceleration, vUv).xyz;\n  vec3 v = texture2D(velocity, vUv).xyz;\n  vec3 vf = texture2D(velocityFirst, vUv).xyz;\n  vec3 hv = texture2D(headVelocity, vUv).xyz;\n\n  float init = step(200.0, length(hv));\n  v = (a + v) * (1.0 - init) + vf * init;\n\n  gl_FragColor = vec4(v, 1.0);\n}\n"),this.physicsRenderers[h].start(e,null,i),this.physicsRenderers[h].mergeAUniforms({mass:{value:this.physicsRenderers[h].createDataTexture(s)},prevVelocity:{value:this.physicsRenderers[h-1].getCurrentVelocity()},headVelocity:{value:this.physicsRenderers[0].getCurrentVelocity()}}),this.physicsRenderers[h].mergeVUniforms({velocityFirst:{value:this.physicsRenderers[h].createDataTexture(a)},headVelocity:{value:this.physicsRenderers[0].getCurrentVelocity()}}),n["velocity".concat(h)]={value:this.physicsRenderers[h].getCurrentVelocity()});n.acceleration.value=this.physicsRenderers[0].getCurrentAcceleration(),n.velocity.value=this.physicsRenderers[0].getCurrentVelocity(),this.geometry.setAttribute("uvVelocity",this.physicsRenderers[0].getBufferAttributeUv({instanced:!0}))}},{key:"update",value:function(e,t){for(var n=this.material.uniforms,r=0;r<this.physicsRenderers.length;r++){var i=this.physicsRenderers[r];0!==r&&(i.aUniforms.prevVelocity.value=this.physicsRenderers[r-1].getCurrentVelocity(),i.aUniforms.headVelocity.value=this.physicsRenderers[0].getCurrentVelocity(),i.vUniforms.headVelocity.value=this.physicsRenderers[0].getCurrentVelocity()),i.update(e,t),0===r?(n.acceleration.value=i.getCurrentAcceleration(),n.velocity.value=i.getCurrentVelocity()):n["velocity".concat(r)].value=i.getCurrentVelocity()}n.time.value+=t}}])&&w(t.prototype,n),s}(r.InstancedMesh);function R(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}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)}}var z=new r.Scene,L=new h,C=new r.Clock({autoStart:!1}),A=new T,O=new r.TextureLoader,D=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i,o;return t=e,(n=[{key:"start",value:(i=regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(P=new r.WebGLRenderer({alpha:!0,antialias:!0,canvas:t})).setPixelRatio(window.devicePixelRatio),P.setClearColor(921102,1),new a.z(L,P.domElement),e.next=6,Promise.all([O.loadAsync("/sketch-threejs/img/sketch/flow_field/noise.jpg")]).then((function(e){var t=e[0];t.wrapS=r.RepeatWrapping,t.wrapT=r.RepeatWrapping,t.format=r.RGBFormat,t.type=r.FloatType,t.minFilter=r.NearestFilter,t.magFilter=r.NearestFilter,A.start(P,t)}));case 6:z.add(A),L.start();case 8:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=i.apply(e,t);function a(e){R(o,n,r,a,s,"next",e)}function s(e){R(o,n,r,a,s,"throw",e)}a(void 0)}))},function(e){return o.apply(this,arguments)})},{key:"play",value:function(){C.start(),this.update()}},{key:"pause",value:function(){C.stop()}},{key:"update",value:function(){if(!1!==C.running){var e=C.getDelta();L.update(e),A.update(P,e),P.setRenderTarget(null),P.render(z,L)}}},{key:"resize",value:function(e){L.resize(e),P.setSize(e.x,e.y)}}])&&E(t.prototype,n),e}();function I(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function k(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){I(o,r,i,a,s,"next",e)}function s(e){I(o,r,i,a,s,"throw",e)}a(void 0)}))}}function F(){return j.apply(this,arguments)}function j(){return(j=k(regeneratorRuntime.mark((function e(){var t,n,i,a,s,c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new D,n=new r.Vector2,i=document.getElementById("canvas-webgl"),a=document.querySelector(".p-preloader"),s=function(){n.set(document.body.clientWidth,window.innerHeight),i.width=n.x,i.height=n.y,t.resize(n)},c=function(){window.addEventListener("blur",(function(){t.pause()})),window.addEventListener("focus",(function(){t.play()})),window.addEventListener("resize",o()(s,100))},u=function e(){t.update(),requestAnimationFrame(e)},e.next=9,t.start(i);case 9:c(),s(),a.classList.add("is-hidden"),t.play(),u();case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},87389:function(e,t,n){"use strict";n.d(t,{Z:function(){return X}});var r=n(2212),i=n(38314),o=n.n(i),a=n(52886);function s(e){return(s="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})(e)}function c(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)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(i);if(o){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return l(this,e)});function s(e,t,n,i){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(o=a.call(this,e,t,n,i)).cameraResolution=new r.Vector2,o.time=0,o}return t=s,(n=[{key:"start",value:function(){this.far=5e3,this.setFocalLength(35),this.position.set(80,0,0),this.lookAt(new r.Vector3)}},{key:"update",value:function(e){this.time+=e}},{key:"resize",value:function(e){this.aspect=e.x/e.y,this.updateProjectionMatrix()}}])&&c(t.prototype,n),s}(r.PerspectiveCamera),v=n(17393),d=n.n(v);function p(e){return(p="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})(e)}function m(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)}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function x(e){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=x(i);if(o){var n=x(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return g(this,e)});function s(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var n=new r.InstancedBufferGeometry,i=new r.PlaneGeometry(8,8);n.copy(i);var o=new r.RawShaderMaterial({uniforms:{time:{value:0},acceleration:{value:null},velocity:{value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\nattribute vec2 uvVelocity;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform vec3 cameraPosition;\nuniform float time;\nuniform vec2 resolution;\nuniform float pixelRatio;\nuniform sampler2D acceleration;\nuniform sampler2D velocity;\n\nvarying vec2 vUv;\nvarying vec3 vColor;\nvarying float vOpacity;\n\nmat4 calcTranslateMat4(vec3 v) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    v.x, v.y, v.z, 1.0\n  );\n}\n\nmat4 calcScaleMat4(vec3 scale) {\n  return mat4(\n    scale.x, 0.0, 0.0, 0.0,\n    0.0, scale.y, 0.0, 0.0,\n    0.0, 0.0, scale.z, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nstruct Quaternion {\n  float x;\n  float y;\n  float z;\n  float w;\n};\n\n// https://qiita.com/aa_debdeb/items/c34a3088b2d8d3731813\nQuaternion axisAngle(vec3 axis, float radian) {\n  vec3 naxis = normalize(axis);\n  float h = 0.5 * radian;\n  float s = sin(h);\n  return Quaternion(naxis.x * s, naxis.y * s, naxis.z * s, cos(h));\n}\n\nQuaternion conjugate(Quaternion q) {\n  return Quaternion(-q.x, -q.y, -q.z, q.w);\n}\n\nQuaternion mul(Quaternion q, float f) {\n  return Quaternion(f * q.x, f * q.y, f * q.z, f * q.w);\n}\n\nQuaternion mul(Quaternion q1, Quaternion q2) {\n  return Quaternion(\n    q2.w * q1.x - q2.z * q1.y + q2.y * q1.z + q2.x * q1.w,\n    q2.z * q1.x + q2.w * q1.y - q2.x * q1.z + q2.y * q1.w,\n    -q2.y * q1.x + q2.x * q1.y + q2.w * q1.z + q2.z * q1.w,\n    -q2.x * q1.x - q2.y * q1.y - q2.z * q1.z + q2.w * q1.w\n  );\n}\n\nvec3 rotate(vec3 v, Quaternion q) {\n  // norm of q must be 1.\n  Quaternion vq = Quaternion(v.x, v.y, v.z, 0.0);\n  Quaternion cq = conjugate(q);\n  Quaternion mq = mul(mul(cq, vq), q);\n  return vec3(mq.x, mq.y, mq.z);\n}\n\nvoid main() {\n  vec3 a = texture2D(acceleration, uvVelocity).xyz;\n  vec3 v = texture2D(velocity, uvVelocity).xyz;\n  float alpha = texture2D(velocity, uvVelocity).w;\n\n  // for rotation.\n  vec3 top = vec3(0.0, 0.0, 1.0);\n  vec3 dir = normalize(cameraPosition - v);\n  vec3 axis = cross(top, dir);\n  float angle = acos(dot(top, dir));\n  Quaternion q = axisAngle(axis, angle);\n  vec3 rotatedPosition = rotate(position, q);\n  vec4 mvPosition = modelViewMatrix * calcTranslateMat4(v) * vec4(rotatedPosition, 1.0);\n\n  vec3 top2 = vec3(0.0, 1.0, 0.0);\n  vec3 dir2 = normalize(a);\n  float angle2 = acos(dot(top2, dir2));\n\n  vUv = uv;\n  vColor = vec3(\n    degrees(angle2) / 90.0,\n    0.55,\n    0.3\n  );\n  vOpacity = alpha;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nvarying vec2 vUv;\nvarying vec3 vColor;\nvarying float vOpacity;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec2 p = vUv * 2.0 - 1.0;\n  vec3 color = convertHsvToRgb(\n    vColor +\n    vec3(\n      0.0,\n      (1.0 - smoothstep(0.2, 0.6, length(p))) * -0.5,\n      (1.0 - smoothstep(0.2, 0.6, length(p))) * 0.4\n    )\n  );\n  float opacity = (1.0 - smoothstep(0.6, 1.0, length(p))) * vOpacity;\n\n  if (opacity <= 0.01) discard;\n\n  gl_FragColor = vec4(color, opacity);\n}\n",transparent:!0,depthWrite:!1,blending:r.AdditiveBlending});return(t=a.call(this,n,o,e)).name="MoverCore",t.frustumCulled=!1,t.renderOrder=2,t}return t=s,(n=[{key:"start",value:function(e){var t=this.material.uniforms;t.acceleration.value=e.getCurrentAcceleration(),t.velocity.value=e.getCurrentVelocity(),this.geometry.setAttribute("uvVelocity",e.getBufferAttributeUv({instanced:!0}))}},{key:"update",value:function(e,t){var n=this.material.uniforms;n.acceleration.value=e.getCurrentAcceleration(),n.velocity.value=e.getCurrentVelocity(),n.time.value+=t}}])&&m(t.prototype,n),s}(r.InstancedMesh);function w(e){return(w="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})(e)}function M(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)}}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e,t){return!t||"object"!==w(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function P(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=P(i);if(o){var n=P(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return S(this,e)});function s(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var i=new r.InstancedBufferGeometry,o=new r.CylinderGeometry(0,2.5,2,6,t,!0);i.copy(o);var c=new r.RawShaderMaterial({uniforms:{acceleration:{value:null},velocity:{value:null},time:{value:0}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\nattribute vec2 uvVelocity;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float time;\nuniform sampler2D acceleration;\nuniform sampler2D velocity;\nuniform sampler2D velocity1;\nuniform sampler2D velocity2;\nuniform sampler2D velocity3;\nuniform sampler2D velocity4;\nuniform sampler2D velocity5;\nuniform sampler2D velocity6;\nuniform sampler2D velocity7;\nuniform sampler2D velocity8;\nuniform sampler2D velocity9;\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\nmat4 calcTranslateMat4(vec3 v) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    v.x, v.y, v.z, 1.0\n  );\n}\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nstruct Quaternion {\n  float x;\n  float y;\n  float z;\n  float w;\n};\n\n// https://qiita.com/aa_debdeb/items/c34a3088b2d8d3731813\nQuaternion axisAngle(vec3 axis, float radian) {\n  vec3 naxis = normalize(axis);\n  float h = 0.5 * radian;\n  float s = sin(h);\n  return Quaternion(naxis.x * s, naxis.y * s, naxis.z * s, cos(h));\n}\n\nQuaternion conjugate(Quaternion q) {\n  return Quaternion(-q.x, -q.y, -q.z, q.w);\n}\n\nQuaternion mul(Quaternion q, float f) {\n  return Quaternion(f * q.x, f * q.y, f * q.z, f * q.w);\n}\n\nQuaternion mul(Quaternion q1, Quaternion q2) {\n  return Quaternion(\n    q2.w * q1.x - q2.z * q1.y + q2.y * q1.z + q2.x * q1.w,\n    q2.z * q1.x + q2.w * q1.y - q2.x * q1.z + q2.y * q1.w,\n    -q2.y * q1.x + q2.x * q1.y + q2.w * q1.z + q2.z * q1.w,\n    -q2.x * q1.x - q2.y * q1.y - q2.z * q1.z + q2.w * q1.w\n  );\n}\n\nvec3 rotate(vec3 v, Quaternion q) {\n  // norm of q must be 1.\n  Quaternion vq = Quaternion(v.x, v.y, v.z, 0.0);\n  Quaternion cq = conjugate(q);\n  Quaternion mq = mul(mul(cq, vq), q);\n  return vec3(mq.x, mq.y, mq.z);\n}\n\nvoid main() {\n  float y = uv.y;\n  vec3 a = texture2D(acceleration, uvVelocity).xyz;\n  vec3 v0 = texture2D(velocity, uvVelocity).xyz;\n  vec3 v1 = texture2D(velocity1, uvVelocity).xyz;\n  vec3 v2 = texture2D(velocity2, uvVelocity).xyz;\n  vec3 v3 = texture2D(velocity3, uvVelocity).xyz;\n  vec3 v4 = texture2D(velocity4, uvVelocity).xyz;\n  vec3 v =\n    v0 * (1.0 - step(1.0 / 5.0, y)) +\n    v1 * step(1.0 / 5.0, y) * (1.0 - step(2.0 / 5.0, y)) +\n    v2 * step(2.0 / 5.0, y) * (1.0 - step(3.0 / 5.0, y)) +\n    v3 * step(3.0 / 5.0, y) * (1.0 - step(4.0 / 5.0, y)) +\n    v4 * step(4.0 / 5.0, y);\n  vec3 pv =\n    (v + a) * (1.0 - step(1.0 / 5.0, y)) +\n    v0 * step(1.0 / 5.0, y) * (1.0 - step(2.0 / 5.0, y)) +\n    v1 * step(2.0 / 5.0, y) * (1.0 - step(3.0 / 5.0, y)) +\n    v2 * step(3.0 / 5.0, y) * (1.0 - step(4.0 / 5.0, y)) +\n    v3 * step(4.0 / 5.0, y);\n  float alpha = 1.0 - smoothstep(450.0, 490.0, abs(v.x));\n\n  // for rotation.\n  vec3 top = vec3(0.0, 1.0, 0.0);\n  vec3 dir = normalize(pv - v);\n  vec3 axis = cross(top, dir);\n  float angle = acos(dot(top, dir));\n  Quaternion q = axisAngle(axis, angle);\n  vec3 rotatedPosition = rotate(position, q);\n  \n  vec4 mvPosition = modelViewMatrix * calcTranslateMat4(v) * vec4(rotatedPosition, 1.0);\n\n  // Define the point size.\n  float distanceFromCamera = length(mvPosition.xyz);\n\n  vColor = convertHsvToRgb(\n    vec3(\n      degrees(angle) / 90.0,\n      0.55,\n      0.3\n    )\n  );\n  vOpacity = (1.0 - y) * alpha;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\nvoid main() {\n  if (vOpacity <= 0.01) discard;\n\n  gl_FragColor = vec4(vColor, vOpacity);\n}\n",transparent:!0,depthWrite:!1,blending:r.AdditiveBlending,side:r.DoubleSide});return(n=a.call(this,i,c,e)).name="MoverTrail",n.frustumCulled=!1,n.multiTime=new r.Vector2(2*Math.random()-1,2*Math.random()-1),n}return t=s,(n=[{key:"start",value:function(e){for(var t=this.material.uniforms,n=0;n<e.length;n++)n>0&&(t["velocity".concat(n)]={value:e[n].getCurrentVelocity()});t.acceleration.value=e[0].getCurrentAcceleration(),t.velocity.value=e[0].getCurrentVelocity(),this.geometry.setAttribute("uvVelocity",e[0].getBufferAttributeUv({instanced:!0}))}},{key:"update",value:function(e,t){for(var n=this.material.uniforms,r=0;r<e.length;r++){var i=e[r];0===r?(n.acceleration.value=i.getCurrentAcceleration(),n.velocity.value=i.getCurrentVelocity()):n["velocity".concat(r)].value=i.getCurrentVelocity()}n.time.value+=t}}])&&M(t.prototype,n),s}(r.InstancedMesh),R="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n",E="precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D initData;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  gl_FragColor = texture2D(initData, vUv);\n}\n";function z(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)}}var L=function(e,t,n){return new r.Mesh(new r.PlaneGeometry(2,2),new r.RawShaderMaterial({uniforms:e,vertexShader:t,fragmentShader:n}))},C=function(){function e(t,n,i,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var a={type:/(iPad|iPhone|iPod)/g.test(navigator.userAgent)?r.HalfFloatType:r.FloatType,minFilter:r.NearestFilter,magFilter:r.NearestFilter};this.side=0,this.aScene=new r.Scene,this.vScene=new r.Scene,this.camera=new r.OrthographicCamera,this.acceleration=[new r.WebGLRenderTarget(0,0,a),new r.WebGLRenderTarget(0,0,a)],this.velocity=[new r.WebGLRenderTarget(0,0,a),new r.WebGLRenderTarget(0,0,a)],this.aUniforms={velocity:{value:null},acceleration:{value:null},time:{value:0}},this.vUniforms={side:{value:0},velocity:{value:null},acceleration:{value:null},time:{value:0}},this.aMesh=L(this.aUniforms,t,n),this.vMesh=L(this.vUniforms,i,o),this.uvs=[],this.targetIndex=0}var t,n;return t=e,(n=[{key:"start",value:function(e,t,n,i,o){this.side=this.vUniforms.side.value=Math.ceil(Math.sqrt(n.length/3)),this.camera.top=.5*this.side,this.camera.bottom=-.5*this.side,this.camera.right=.5*this.side,this.camera.left=-.5*this.side,this.camera.position.z=10;for(var a=[],s=[],c=0;c<3*Math.pow(this.side,2);c+=3)t&&null!=t[c]?(a[c+0]=t[c+0],a[c+1]=t[c+1],a[c+2]=t[c+2]):(a[c+0]=0,a[c+1]=0,a[c+2]=0),n&&null!=n[c]?(s[c+0]=n[c+0],s[c+1]=n[c+1],s[c+2]=n[c+2]):(s[c+0]=0,s[c+1]=0,s[c+2]=0),this.uvs[c/3*2+0]=c/3%this.side/(this.side-1),this.uvs[c/3*2+1]=Math.floor(c/3/this.side)/(this.side-1);if(i){var u=Object.keys(i);if(u.length)for(c=0;c<u.length;c++){for(var l=i[u[c]],f=l.array.length;f<s.length/3*l.itemSize;f++)l.array.push(0);this.aMesh.geometry.setAttribute(u[c],new r.BufferAttribute(new Float32Array(l.array),l.itemSize))}}if(o){var h=Object.keys(o);if(h.length)for(c=0;c<h.length;c++){var v=o[h[c]];for(f=v.array.length;f<s.length/3*v.itemSize;f++)v.array.push(0);this.vMesh.geometry.setAttribute(h[c],new r.BufferAttribute(new Float32Array(v.array),v.itemSize))}}for(c=0;c<2;c++)this.acceleration[c].setSize(this.side,this.side),this.velocity[c].setSize(this.side,this.side);var d=new r.DataTexture(new Float32Array(a),this.side,this.side,r.RGBFormat,r.FloatType);d.format=r.RGBFormat,d.type=r.FloatType,d.magFilter=r.NearestFilter,d.minFilter=r.NearestFilter,d.needsUpdate=!0;var p=new r.Mesh(new r.PlaneGeometry(2,2),new r.RawShaderMaterial({uniforms:{initData:{value:d}},vertexShader:R,fragmentShader:E}));this.aScene.add(this.camera),this.aScene.add(p),e.setRenderTarget(this.acceleration[Math.abs(this.targetIndex-1)]),e.render(this.aScene,this.camera),this.aScene.remove(p),this.aScene.add(this.aMesh);var m=new r.DataTexture(new Float32Array(s),this.side,this.side);m.format=r.RGBFormat,m.type=r.FloatType,m.magFilter=r.NearestFilter,m.minFilter=r.NearestFilter,m.needsUpdate=!0;var y=new r.Mesh(new r.PlaneGeometry(2,2),new r.RawShaderMaterial({uniforms:{initData:{value:m}},vertexShader:R,fragmentShader:E}));this.vScene.add(this.camera),this.vScene.add(y),e.setRenderTarget(this.velocity[this.targetIndex]),e.render(this.vScene,this.camera),this.vScene.remove(y),this.vScene.add(this.vMesh),e.setRenderTarget(null)}},{key:"update",value:function(e,t){var n=Math.abs(this.targetIndex-1),r=this.targetIndex;this.aUniforms.acceleration.value=this.acceleration[n].texture,this.aUniforms.velocity.value=this.velocity[r].texture,e.setRenderTarget(this.acceleration[r]),e.render(this.aScene,this.camera),this.vUniforms.acceleration.value=this.acceleration[r].texture,this.vUniforms.velocity.value=this.velocity[r].texture,e.setRenderTarget(this.velocity[n]),e.render(this.vScene,this.camera),this.targetIndex=n,this.aUniforms.time.value+=t,this.vUniforms.time.value+=t}},{key:"getBufferAttributeUv",value:function(e){var t=e.instanced;return void 0!==t&&t?new r.InstancedBufferAttribute(new Float32Array(this.uvs),2):new r.BufferAttribute(new Float32Array(this.uvs),2)}},{key:"getCurrentVelocity",value:function(){return this.velocity[Math.abs(this.targetIndex-1)].texture}},{key:"getCurrentAcceleration",value:function(){return this.acceleration[Math.abs(this.targetIndex-1)].texture}},{key:"mergeAUniforms",value:function(e){this.aUniforms=Object.assign(this.aUniforms,e)}},{key:"mergeVUniforms",value:function(e){this.vUniforms=Object.assign(this.vUniforms,e)}},{key:"createDataTexture",value:function(e){for(var t=[],n=0;n<3*Math.pow(this.side,2);n+=3)null!=e[n]?(t[n+0]=e[n+0],t[n+1]=e[n+1],t[n+2]=e[n+2]):(t[n+0]=0,t[n+1]=0,t[n+2]=0);return new r.DataTexture(new Float32Array(t),this.side,this.side,r.RGBFormat,r.FloatType)}}])&&z(t.prototype,n),e}();function A(e){return(A="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})(e)}function O(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)}}function D(e,t){return(D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e,t){return!t||"object"!==A(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var F,j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&D(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=k(i);if(o){var n=k(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return I(this,e)});function s(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(e=a.call(this)).name="Mover",e.core=new b(5e3),e.trail=new T(5e3,5),e.physicsRenderers=[],e.multiTime=new r.Vector2(2*Math.random()-1,2*Math.random()-1),e}return t=s,(n=[{key:"start",value:function(e,t){for(var n=[],r=[],i=[],o=[],a=[],s=[],c=0;c<15e3;c+=3){var u=d().radians(360*Math.random());n[c+0]=3,n[c+1]=5*Math.cos(u),n[c+2]=5*Math.sin(u),r[c+0]=-499.99,r[c+1]=30*Math.cos(u),r[c+2]=30*Math.sin(u),i[c+0]=n[c+0],i[c+1]=n[c+1],i[c+2]=n[c+2],o[c+0]=r[c+0],o[c+1]=r[c+1],o[c+2]=r[c+2],a[c+0]=5*Math.random(),a[c+1]=0,a[c+2]=0,s[c+0]=Math.random(),s[c+1]=0,s[c+2]=0}for(var l=0;l<5;l++)0===l?(this.physicsRenderers[l]=new C("#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n","precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D velocity;\nuniform sampler2D acceleration;\nuniform sampler2D accelerationFirst;\nuniform sampler2D noiseTex;\nuniform sampler2D delay;\nuniform sampler2D mass;\nuniform vec2 multiTime;\n\nvarying vec2 vUv;\n\n#ifndef PRECISION\n#define PRECISION 0.000001\n#endif\n\nvec3 drag(vec3 a, float value) {\n  return normalize(a * -1.0 + PRECISION) * length(a) * value;\n}\n\nvoid main(void) {\n  vec3 v = texture2D(velocity, vUv).xyz;\n  vec3 a = texture2D(acceleration, vUv).xyz;\n  vec3 af = texture2D(accelerationFirst, vUv).xyz;\n  float dl = texture2D(delay, vUv).x;\n  float mass = texture2D(mass, vUv).x;\n  vec3 d = drag(a, 0.032 + mass * 0.006);\n\n  float texColorR = texture2D(noiseTex, (v.yz + vec2(sin(v.x * 0.1), 0.0) + time * multiTime * 12.0) * 0.002).r;\n  float texColorG = texture2D(noiseTex, (v.zx + vec2(sin(v.y * 0.1), 0.0) + time * multiTime * 12.0) * 0.002).g;\n  float texColorB = texture2D(noiseTex, (v.xy + vec2(sin(v.z * 0.1), 0.0) + time * multiTime * 12.0) * 0.002).b;\n  vec3 noise = vec3(\n    texColorR,\n    texColorG * 2.0 - 1.0,\n    texColorB * 2.0 - 1.0\n  );\n  vec3 f = noise * 0.2;\n\n  float init = clamp(step(500.0, v.x), 0.0, 1.0);\n  vec3 f2 = (a + (f + d) * step(dl, time)) * (1.0 - init) + af * init;\n\n  gl_FragColor = vec4(f2, 1.0);\n}\n","#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n","precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D acceleration;\nuniform sampler2D velocity;\nuniform sampler2D velocityFirst;\nuniform sampler2D delay;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vec3 a = texture2D(acceleration, vUv).xyz;\n  vec3 v = texture2D(velocity, vUv).xyz;\n  vec3 vf = texture2D(velocityFirst, vUv).xyz;\n  float dl = texture2D(delay, vUv).x;\n\n  float init = clamp(step(500.0, v.x), 0.0, 1.0);\n  v = (a * step(dl, time) + v) * (1.0 - init) + vf * init;\n\n  float alpha = 1.0 - smoothstep(450.0, 500.0, abs(v.x));\n\n  gl_FragColor = vec4(v, alpha);\n}\n"),this.physicsRenderers[l].start(e,n,r),this.physicsRenderers[l].mergeAUniforms({noiseTex:{value:t},accelerationFirst:{value:this.physicsRenderers[l].createDataTexture(i)},delay:{value:this.physicsRenderers[l].createDataTexture(a)},mass:{value:this.physicsRenderers[l].createDataTexture(s)},multiTime:{value:this.multiTime}}),this.physicsRenderers[l].mergeVUniforms({delay:{value:this.physicsRenderers[l].createDataTexture(a)},velocityFirst:{value:this.physicsRenderers[l].createDataTexture(o)}})):(this.physicsRenderers[l]=new C("#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n","precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D prevVelocity;\nuniform sampler2D headVelocity;\nuniform sampler2D velocity;\nuniform sampler2D acceleration;\nuniform sampler2D noiseTex;\nuniform sampler2D delay;\nuniform sampler2D mass;\n\nvarying vec2 vUv;\n\n#ifndef PRECISION\n#define PRECISION 0.000001\n#endif\n\nvec3 drag(vec3 a, float value) {\n  return normalize(a * -1.0 + PRECISION) * length(a) * value;\n}\n\n#ifndef PRECISION\n#define PRECISION 0.000001\n#endif\n\nvec3 hook(vec3 velocity, vec3 anchor, float restLength, float k) {\n  return normalize(velocity - anchor + PRECISION) * (-1.0 * k * (length(velocity - anchor) - restLength));\n}\n\nvoid main(void) {\n  vec3 pv = texture2D(prevVelocity, vUv).xyz;\n  vec3 hv = texture2D(headVelocity, vUv).xyz;\n  vec3 v = texture2D(velocity, vUv).xyz;\n  vec3 a = texture2D(acceleration, vUv).xyz;\n  float mass = texture2D(mass, vUv).x;\n  vec3 d = drag(a, 0.28);\n  vec3 h = hook(v, pv, 1.0, 0.12);\n\n  float init = clamp(step(500.0, hv.x), 0.0, 1.0);\n  vec3 f = (a + d + h) * (1.0 - init) + vec3(0.0) * init;\n\n  gl_FragColor = vec4(f, 1.0);\n}\n","#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n","precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D acceleration;\nuniform sampler2D velocity;\nuniform sampler2D velocityFirst;\nuniform sampler2D headVelocity;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vec3 a = texture2D(acceleration, vUv).xyz;\n  vec3 v = texture2D(velocity, vUv).xyz;\n  vec3 vf = texture2D(velocityFirst, vUv).xyz;\n  vec3 hv = texture2D(headVelocity, vUv).xyz;\n\n  float init = clamp(step(500.0, hv.x), 0.0, 1.0);\n  v = (a + v) * (1.0 - init) + vf * init;\n\n  gl_FragColor = vec4(v, 1.0);\n}\n"),this.physicsRenderers[l].start(e,null,r),this.physicsRenderers[l].mergeAUniforms({mass:{value:this.physicsRenderers[l].createDataTexture(s)},prevVelocity:{value:this.physicsRenderers[l-1].getCurrentVelocity()},headVelocity:{value:this.physicsRenderers[0].getCurrentVelocity()}}),this.physicsRenderers[l].mergeVUniforms({velocityFirst:{value:this.physicsRenderers[l].createDataTexture(o)},headVelocity:{value:this.physicsRenderers[0].getCurrentVelocity()}}));this.core.start(this.physicsRenderers[0]),this.trail.start(this.physicsRenderers),this.add(this.core),this.add(this.trail)}},{key:"update",value:function(e,t){for(var n=0;n<this.physicsRenderers.length;n++){var r=this.physicsRenderers[n];0!==n&&(r.aUniforms.prevVelocity.value=this.physicsRenderers[n-1].getCurrentVelocity(),r.aUniforms.headVelocity.value=this.physicsRenderers[0].getCurrentVelocity(),r.vUniforms.headVelocity.value=this.physicsRenderers[0].getCurrentVelocity()),r.update(e,t)}this.core.update(this.physicsRenderers[0],t),this.trail.update(this.physicsRenderers,t)}}])&&O(t.prototype,n),s}(r.Group);function U(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function B(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)}}var G=new r.Scene,N=new h,H=new r.Clock({autoStart:!1}),V=new j,W=new r.TextureLoader,Z=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i,o;return t=e,(n=[{key:"start",value:(i=regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(F=new r.WebGLRenderer({alpha:!0,antialias:!0,canvas:t})).setPixelRatio(window.devicePixelRatio),F.setClearColor(921102,1),new a.z(N,F.domElement),e.next=6,Promise.all([W.loadAsync("/sketch-threejs/img/sketch/flow_field/noise.jpg")]).then((function(e){var t=e[0];t.wrapS=r.RepeatWrapping,t.wrapT=r.RepeatWrapping,t.format=r.RGBFormat,t.type=r.FloatType,t.minFilter=r.NearestFilter,t.magFilter=r.NearestFilter,V.start(F,t)}));case 6:G.add(V),N.start();case 8:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=i.apply(e,t);function a(e){U(o,n,r,a,s,"next",e)}function s(e){U(o,n,r,a,s,"throw",e)}a(void 0)}))},function(e){return o.apply(this,arguments)})},{key:"play",value:function(){H.start(),this.update()}},{key:"pause",value:function(){H.stop()}},{key:"update",value:function(){if(!1!==H.running){var e=H.getDelta();N.update(e),V.update(F,e),F.setRenderTarget(null),F.render(G,N)}}},{key:"resize",value:function(e){N.resize(e),F.setSize(e.x,e.y)}}])&&B(t.prototype,n),e}();function q(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function Y(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){q(o,r,i,a,s,"next",e)}function s(e){q(o,r,i,a,s,"throw",e)}a(void 0)}))}}function X(){return K.apply(this,arguments)}function K(){return(K=Y(regeneratorRuntime.mark((function e(){var t,n,i,a,s,c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new Z,n=new r.Vector2,i=document.getElementById("canvas-webgl"),a=document.querySelector(".p-preloader"),s=function(){n.set(document.body.clientWidth,window.innerHeight),i.width=n.x,i.height=n.y,t.resize(n)},c=function(){window.addEventListener("blur",(function(){t.pause()})),window.addEventListener("focus",(function(){t.play()})),window.addEventListener("resize",o()(s,100))},u=function e(){t.update(),requestAnimationFrame(e)},e.next=9,t.start(i);case 9:c(),s(),a.classList.add("is-hidden"),t.play(),u();case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},53312:function(e,t,n){"use strict";n.d(t,{Z:function(){return le}});var r=n(2212),i=n(38314),o=n.n(i),a=n(17393),s=n.n(a);function c(e){return(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})(e)}function u(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)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(i);if(o){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return f(this,e)});function s(e,t,n,i){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(o=a.call(this,e,t,n,i)).cameraResolution=new r.Vector2,o.time=0,o}return t=s,(n=[{key:"start",value:function(){this.far=5e3,this.setFocalLength(35),this.position.set(0,0,250),this.lookAt(new r.Vector3)}},{key:"update",value:function(e){this.time+=e}},{key:"resize",value:function(e){this.aspect=e.x/e.y,this.updateProjectionMatrix()}}])&&u(t.prototype,n),s}(r.PerspectiveCamera);function d(e){return(d="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})(e)}function p(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)}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=g(i);if(o){var n=g(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return y(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.OctahedronGeometry(30,6),n=new r.RawShaderMaterial({uniforms:{time:{value:0},noiseTex:{value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform vec3 cameraPosition;\n\nvarying vec2 vUv;\nvarying float vEdge;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  float angleToCamera = acos(dot(normalize(cameraPosition), normal));\n\n  vUv = uv;\n  vEdge = smoothstep(0.4, 1.0, abs(sin(angleToCamera)));\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D noiseTex;\n\nvarying vec2 vUv;\nvarying float vEdge;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec2 p = vUv * 2.0 - 1.0;\n\n  float noise1 = texture2D(noiseTex, vUv + vec2(time * 0.1, 0.0)).r;\n  float noise2 = texture2D(noiseTex, vUv + vec2(time * -0.1, 0.0)).g;\n  vec3 hsv = vec3(\n    (noise1 + noise2) * 0.35 + time * 0.1,\n    1.0 - vEdge,\n    0.02 + vEdge * 0.98\n  );\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  gl_FragColor = vec4(rgb, 1.0);\n}\n"});return(e=a.call(this,t,n)).name="Core",e.acceleration=new r.Vector3,e.anchor=new r.Vector3,e}return t=s,(n=[{key:"start",value:function(e){this.material.uniforms.noiseTex.value=e}},{key:"update",value:function(e,t){this.material.uniforms.time.value+=e,this.applyHook(0,.2),this.applyDrag(.6),this.position.add(this.acceleration),this.lookAt(t.position)}},{key:"applyDrag",value:function(e){var t=this.acceleration.clone();t.multiplyScalar(-1),t.normalize(),t.multiplyScalar(this.acceleration.length()*e),this.acceleration.add(t)}},{key:"applyHook",value:function(e,t){var n=this.position.clone().sub(this.anchor),r=n.length()-e;n.normalize(),n.multiplyScalar(-1*t*r),this.acceleration.add(n)}}])&&p(t.prototype,n),s}(r.Mesh);function b(e){return(b="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})(e)}function w(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)}}function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e,t){return!t||"object"!==b(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var P=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&M(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=S(i);if(o){var n=S(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return _(this,e)});function s(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var n=new r.InstancedBufferGeometry,i=new r.PlaneGeometry(2,2);n.copy(i);var o=new r.RawShaderMaterial({uniforms:{time:{value:0},acceleration:{value:null},velocity:{value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\nattribute vec2 uvVelocity;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform vec3 cameraPosition;\nuniform float time;\nuniform sampler2D acceleration;\nuniform sampler2D velocity;\n\nvarying vec2 vUv;\nvarying vec3 vColor;\nvarying float vOpacity;\n\nmat4 calcTranslateMat4(vec3 v) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    v.x, v.y, v.z, 1.0\n  );\n}\n\nmat4 calcScaleMat4(vec3 scale) {\n  return mat4(\n    scale.x, 0.0, 0.0, 0.0,\n    0.0, scale.y, 0.0, 0.0,\n    0.0, 0.0, scale.z, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nstruct Quaternion {\n  float x;\n  float y;\n  float z;\n  float w;\n};\n\n// https://qiita.com/aa_debdeb/items/c34a3088b2d8d3731813\nQuaternion axisAngle(vec3 axis, float radian) {\n  vec3 naxis = normalize(axis);\n  float h = 0.5 * radian;\n  float s = sin(h);\n  return Quaternion(naxis.x * s, naxis.y * s, naxis.z * s, cos(h));\n}\n\nQuaternion conjugate(Quaternion q) {\n  return Quaternion(-q.x, -q.y, -q.z, q.w);\n}\n\nQuaternion mul(Quaternion q, float f) {\n  return Quaternion(f * q.x, f * q.y, f * q.z, f * q.w);\n}\n\nQuaternion mul(Quaternion q1, Quaternion q2) {\n  return Quaternion(\n    q2.w * q1.x - q2.z * q1.y + q2.y * q1.z + q2.x * q1.w,\n    q2.z * q1.x + q2.w * q1.y - q2.x * q1.z + q2.y * q1.w,\n    -q2.y * q1.x + q2.x * q1.y + q2.w * q1.z + q2.z * q1.w,\n    -q2.x * q1.x - q2.y * q1.y - q2.z * q1.z + q2.w * q1.w\n  );\n}\n\nvec3 rotate(vec3 v, Quaternion q) {\n  // norm of q must be 1.\n  Quaternion vq = Quaternion(v.x, v.y, v.z, 0.0);\n  Quaternion cq = conjugate(q);\n  Quaternion mq = mul(mul(cq, vq), q);\n  return vec3(mq.x, mq.y, mq.z);\n}\n\nvoid main() {\n  vec3 a = texture2D(acceleration, uvVelocity).xyz;\n  vec3 v = texture2D(velocity, uvVelocity).xyz;\n\n  // for rotation.\n  vec3 top = vec3(0.0, 0.0, 1.0);\n  vec3 dir = normalize(cameraPosition - v);\n  vec3 axis = cross(top, dir);\n  float angle = acos(dot(top, dir));\n  Quaternion q = axisAngle(axis, angle);\n  vec3 rotatedPosition = rotate(position, q);\n  vec4 mvPosition = modelViewMatrix * calcTranslateMat4(v) * vec4(rotatedPosition, 1.0);\n\n  vec3 top2 = vec3(0.0, 1.0, 0.0);\n  vec3 dir2 = normalize(a);\n  float angle2 = acos(dot(top2, dir2));\n\n  vUv = uv;\n  vColor = vec3(\n    degrees(angle2) / 90.0 * 0.35 + time * 0.1,\n    0.7,\n    0.4\n  );\n  vOpacity = 0.2;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nvarying vec2 vUv;\nvarying vec3 vColor;\nvarying float vOpacity;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec2 p = vUv * 2.0 - 1.0;\n  vec3 color = convertHsvToRgb(\n    vColor +\n    vec3(\n      0.0,\n      (1.0 - smoothstep(0.2, 0.6, length(p))) * -0.5,\n      (1.0 - smoothstep(0.2, 0.6, length(p))) * 0.4\n    )\n  );\n  float opacity = (1.0 - smoothstep(0.95, 1.0, length(p))) * vOpacity;\n\n  if (opacity <= 0.01) discard;\n\n  gl_FragColor = vec4(color, opacity);\n}\n",transparent:!0,depthWrite:!1,blending:r.AdditiveBlending});return(t=a.call(this,n,o,e)).name="MoverCore",t.renderOrder=2,t}return t=s,(n=[{key:"start",value:function(e){var t=this.material.uniforms;t.acceleration.value=e.getCurrentAcceleration(),t.velocity.value=e.getCurrentVelocity(),this.geometry.setAttribute("uvVelocity",e.getBufferAttributeUv({instanced:!0}))}},{key:"update",value:function(e,t){var n=this.material.uniforms;n.acceleration.value=e.getCurrentAcceleration(),n.velocity.value=e.getCurrentVelocity(),n.time.value+=t}}])&&w(t.prototype,n),s}(r.InstancedMesh);function T(e){return(T="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})(e)}function R(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)}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function z(e,t){return!t||"object"!==T(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function L(e){return(L=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=L(i);if(o){var n=L(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return z(this,e)});function s(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var i=new r.InstancedBufferGeometry,o=new r.CylinderGeometry(0,.8,2,3,t,!0);i.copy(o);var c=new r.RawShaderMaterial({uniforms:{acceleration:{value:null},velocity:{value:null},time:{value:0}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\nattribute vec2 uvVelocity;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float time;\nuniform sampler2D acceleration;\nuniform sampler2D velocity;\nuniform sampler2D velocity1;\nuniform sampler2D velocity2;\nuniform sampler2D velocity3;\nuniform sampler2D velocity4;\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\nmat4 calcTranslateMat4(vec3 v) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    v.x, v.y, v.z, 1.0\n  );\n}\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nstruct Quaternion {\n  float x;\n  float y;\n  float z;\n  float w;\n};\n\n// https://qiita.com/aa_debdeb/items/c34a3088b2d8d3731813\nQuaternion axisAngle(vec3 axis, float radian) {\n  vec3 naxis = normalize(axis);\n  float h = 0.5 * radian;\n  float s = sin(h);\n  return Quaternion(naxis.x * s, naxis.y * s, naxis.z * s, cos(h));\n}\n\nQuaternion conjugate(Quaternion q) {\n  return Quaternion(-q.x, -q.y, -q.z, q.w);\n}\n\nQuaternion mul(Quaternion q, float f) {\n  return Quaternion(f * q.x, f * q.y, f * q.z, f * q.w);\n}\n\nQuaternion mul(Quaternion q1, Quaternion q2) {\n  return Quaternion(\n    q2.w * q1.x - q2.z * q1.y + q2.y * q1.z + q2.x * q1.w,\n    q2.z * q1.x + q2.w * q1.y - q2.x * q1.z + q2.y * q1.w,\n    -q2.y * q1.x + q2.x * q1.y + q2.w * q1.z + q2.z * q1.w,\n    -q2.x * q1.x - q2.y * q1.y - q2.z * q1.z + q2.w * q1.w\n  );\n}\n\nvec3 rotate(vec3 v, Quaternion q) {\n  // norm of q must be 1.\n  Quaternion vq = Quaternion(v.x, v.y, v.z, 0.0);\n  Quaternion cq = conjugate(q);\n  Quaternion mq = mul(mul(cq, vq), q);\n  return vec3(mq.x, mq.y, mq.z);\n}\n\nvoid main() {\n  float y = uv.y;\n  vec3 a = texture2D(acceleration, uvVelocity).xyz;\n  vec3 v0 = texture2D(velocity, uvVelocity).xyz;\n  vec3 v1 = texture2D(velocity1, uvVelocity).xyz;\n  vec3 v2 = texture2D(velocity2, uvVelocity).xyz;\n  vec3 v3 = texture2D(velocity3, uvVelocity).xyz;\n  vec3 v4 = texture2D(velocity4, uvVelocity).xyz;\n  vec3 v =\n    v0 * (1.0 - step(1.0 / 5.0, y)) +\n    v1 * step(1.0 / 5.0, y) * (1.0 - step(2.0 / 5.0, y)) +\n    v2 * step(2.0 / 5.0, y) * (1.0 - step(3.0 / 5.0, y)) +\n    v3 * step(3.0 / 5.0, y) * (1.0 - step(4.0 / 5.0, y)) +\n    v4 * step(4.0 / 5.0, y);\n  vec3 pv =\n    (v + a) * (1.0 - step(1.0 / 5.0, y)) +\n    v0 * step(1.0 / 5.0, y) * (1.0 - step(2.0 / 5.0, y)) +\n    v1 * step(2.0 / 5.0, y) * (1.0 - step(3.0 / 5.0, y)) +\n    v2 * step(3.0 / 5.0, y) * (1.0 - step(4.0 / 5.0, y)) +\n    v3 * step(4.0 / 5.0, y);\n\n  // for rotation.\n  vec3 top = vec3(0.0, 1.0, 0.0);\n  vec3 dir = normalize(pv - v);\n  vec3 axis = cross(top, dir);\n  float angle = acos(dot(top, dir));\n  Quaternion q = axisAngle(axis, angle);\n  vec3 rotatedPosition = rotate(position, q);\n  \n  vec4 mvPosition = modelViewMatrix * calcTranslateMat4(v) * vec4(rotatedPosition, 1.0);\n\n  // Define the point size.\n  float distanceFromCamera = length(mvPosition.xyz);\n\n  vColor = convertHsvToRgb(\n    vec3(\n      degrees(angle) / 90.0 * 0.35 + time * 0.1,\n      0.65,\n      0.24\n    )\n  );\n  vOpacity = (1.0 - y) * 0.2;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\nvoid main() {\n  if (vOpacity <= 0.01) discard;\n\n  gl_FragColor = vec4(vColor, vOpacity);\n}\n",transparent:!0,depthWrite:!1,blending:r.AdditiveBlending,side:r.DoubleSide});return(n=a.call(this,i,c,e)).name="MoverTrail",n}return t=s,(n=[{key:"start",value:function(e){for(var t=this.material.uniforms,n=0;n<e.length;n++)n>0&&(t["velocity".concat(n)]={value:e[n].getCurrentVelocity()});t.acceleration.value=e[0].getCurrentAcceleration(),t.velocity.value=e[0].getCurrentVelocity(),this.geometry.setAttribute("uvVelocity",e[0].getBufferAttributeUv({instanced:!0}))}},{key:"update",value:function(e,t){for(var n=this.material.uniforms,r=0;r<e.length;r++){var i=e[r];0===r?(n.acceleration.value=i.getCurrentAcceleration(),n.velocity.value=i.getCurrentVelocity()):n["velocity".concat(r)].value=i.getCurrentVelocity()}n.time.value+=t}}])&&R(t.prototype,n),s}(r.InstancedMesh),A="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n",O="precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D initData;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  gl_FragColor = texture2D(initData, vUv);\n}\n";function D(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)}}var I=function(e,t,n){return new r.Mesh(new r.PlaneGeometry(2,2),new r.RawShaderMaterial({uniforms:e,vertexShader:t,fragmentShader:n}))},k=function(){function e(t,n,i,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var a={type:/(iPad|iPhone|iPod)/g.test(navigator.userAgent)?r.HalfFloatType:r.FloatType,minFilter:r.NearestFilter,magFilter:r.NearestFilter};this.side=0,this.aScene=new r.Scene,this.vScene=new r.Scene,this.camera=new r.OrthographicCamera,this.acceleration=[new r.WebGLRenderTarget(0,0,a),new r.WebGLRenderTarget(0,0,a)],this.velocity=[new r.WebGLRenderTarget(0,0,a),new r.WebGLRenderTarget(0,0,a)],this.aUniforms={velocity:{value:null},acceleration:{value:null},time:{value:0}},this.vUniforms={side:{value:0},velocity:{value:null},acceleration:{value:null},time:{value:0}},this.aMesh=I(this.aUniforms,t,n),this.vMesh=I(this.vUniforms,i,o),this.uvs=[],this.targetIndex=0}var t,n;return t=e,(n=[{key:"start",value:function(e,t,n,i,o){this.side=this.vUniforms.side.value=Math.ceil(Math.sqrt(n.length/3)),this.camera.top=.5*this.side,this.camera.bottom=-.5*this.side,this.camera.right=.5*this.side,this.camera.left=-.5*this.side,this.camera.position.z=10;for(var a=[],s=[],c=0;c<3*Math.pow(this.side,2);c+=3)t&&null!=t[c]?(a[c+0]=t[c+0],a[c+1]=t[c+1],a[c+2]=t[c+2]):(a[c+0]=0,a[c+1]=0,a[c+2]=0),n&&null!=n[c]?(s[c+0]=n[c+0],s[c+1]=n[c+1],s[c+2]=n[c+2]):(s[c+0]=0,s[c+1]=0,s[c+2]=0),this.uvs[c/3*2+0]=c/3%this.side/(this.side-1),this.uvs[c/3*2+1]=Math.floor(c/3/this.side)/(this.side-1);if(i){var u=Object.keys(i);if(u.length)for(c=0;c<u.length;c++){for(var l=i[u[c]],f=l.array.length;f<s.length/3*l.itemSize;f++)l.array.push(0);this.aMesh.geometry.setAttribute(u[c],new r.BufferAttribute(new Float32Array(l.array),l.itemSize))}}if(o){var h=Object.keys(o);if(h.length)for(c=0;c<h.length;c++){var v=o[h[c]];for(f=v.array.length;f<s.length/3*v.itemSize;f++)v.array.push(0);this.vMesh.geometry.setAttribute(h[c],new r.BufferAttribute(new Float32Array(v.array),v.itemSize))}}for(c=0;c<2;c++)this.acceleration[c].setSize(this.side,this.side),this.velocity[c].setSize(this.side,this.side);var d=new r.DataTexture(new Float32Array(a),this.side,this.side,r.RGBFormat,r.FloatType);d.magFilter=r.NearestFilter,d.minFilter=r.NearestFilter;var p=new r.Mesh(new r.PlaneGeometry(2,2),new r.RawShaderMaterial({uniforms:{initData:{value:d}},vertexShader:A,fragmentShader:O}));this.aScene.add(this.camera),this.aScene.add(p),e.setRenderTarget(this.acceleration[Math.abs(this.targetIndex-1)]),e.render(this.aScene,this.camera),this.aScene.remove(p),this.aScene.add(this.aMesh);var m=new r.DataTexture(new Float32Array(s),this.side,this.side,r.RGBFormat,r.FloatType);m.magFilter=r.NearestFilter,m.minFilter=r.NearestFilter;var y=new r.Mesh(new r.PlaneGeometry(2,2),new r.RawShaderMaterial({uniforms:{initData:{value:m}},vertexShader:A,fragmentShader:O}));this.vScene.add(this.camera),this.vScene.add(y),e.setRenderTarget(this.velocity[this.targetIndex]),e.render(this.vScene,this.camera),this.vScene.remove(y),this.vScene.add(this.vMesh),e.setRenderTarget(null)}},{key:"update",value:function(e,t){var n=Math.abs(this.targetIndex-1),r=this.targetIndex;this.aUniforms.acceleration.value=this.acceleration[n].texture,this.aUniforms.velocity.value=this.velocity[r].texture,e.setRenderTarget(this.acceleration[r]),e.render(this.aScene,this.camera),this.vUniforms.acceleration.value=this.acceleration[r].texture,this.vUniforms.velocity.value=this.velocity[r].texture,e.setRenderTarget(this.velocity[n]),e.render(this.vScene,this.camera),e.setRenderTarget(null),this.targetIndex=n,this.aUniforms.time.value+=t,this.vUniforms.time.value+=t}},{key:"getBufferAttributeUv",value:function(e){var t=e.instanced;return void 0!==t&&t?new r.InstancedBufferAttribute(new Float32Array(this.uvs),2):new r.BufferAttribute(new Float32Array(this.uvs),2)}},{key:"getCurrentVelocity",value:function(){return this.velocity[Math.abs(this.targetIndex-1)].texture}},{key:"getCurrentAcceleration",value:function(){return this.acceleration[Math.abs(this.targetIndex-1)].texture}},{key:"mergeAUniforms",value:function(e){this.aUniforms=Object.assign(this.aUniforms,e)}},{key:"mergeVUniforms",value:function(e){this.vUniforms=Object.assign(this.vUniforms,e)}},{key:"createDataTexture",value:function(e){for(var t=[],n=0;n<3*Math.pow(this.side,2);n+=3)null!=e[n]?(t[n+0]=e[n+0],t[n+1]=e[n+1],t[n+2]=e[n+2]):(t[n+0]=0,t[n+1]=0,t[n+2]=0);return new r.DataTexture(new Float32Array(t),this.side,this.side,r.RGBFormat,r.FloatType)}}])&&D(t.prototype,n),e}();function F(e){return(F="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})(e)}function j(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)}}function U(e,t){return(U=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function B(e,t){return!t||"object"!==F(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function G(e){return(G=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var N=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&U(e,t)}(c,e);var t,n,i,o,a=(i=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=G(i);if(o){var n=G(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return B(this,e)});function c(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(e=a.call(this)).name="Mover",e.core=new P(5e3),e.trail=new C(5e3,5),e.physicsRenderers=[],e.multiTime=new r.Vector2(2*Math.random()-1,2*Math.random()-1),e}return t=c,(n=[{key:"start",value:function(e,t){for(var n=[],i=[],o=[],a=0;a<15e3;a+=3){var c=s().radians(360*Math.random());i[a+0]=300*Math.cos(c),i[a+1]=300*Math.sin(c),i[a+2]=2*Math.random()-1,o[a+0]=.02*Math.random()+.08,o[a+1]=.01*Math.random()+.02,o[a+2]=0}for(var u=0;u<5;u++)0===u?(this.physicsRenderers[u]=new k("#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n","precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D velocity;\nuniform sampler2D acceleration;\nuniform sampler2D noiseTex;\nuniform vec2 multiTime;\nuniform vec3 anchor;\nuniform sampler2D hookOptions;\n\nvarying vec2 vUv;\n\n#ifndef PRECISION\n#define PRECISION 0.000001\n#endif\n\nvec3 drag(vec3 a, float value) {\n  return normalize(a * -1.0 + PRECISION) * length(a) * value;\n}\n\n#ifndef PRECISION\n#define PRECISION 0.000001\n#endif\n\nvec3 hook(vec3 velocity, vec3 anchor, float restLength, float k) {\n  return normalize(velocity - anchor + PRECISION) * (-1.0 * k * (length(velocity - anchor) - restLength));\n}\n\nvoid main(void) {\n  vec3 v = texture2D(velocity, vUv).xyz;\n  vec3 a = texture2D(acceleration, vUv).xyz;\n  vec3 hopt = texture2D(hookOptions, vUv).xyz;\n  vec3 d = drag(a, hopt.r);\n  vec3 h = hook(v, anchor, 50.0, hopt.g);\n\n  float texColorR = texture2D(noiseTex, v.zy * 0.0025 + step(vUv.x, 0.333) * 0.333 + step(vUv.x, 0.666) * 0.333 + time * 0.04 + multiTime).r;\n  float texColorG = texture2D(noiseTex, v.xz * 0.0025 + step(vUv.x, 0.333) * 0.333 + step(vUv.x, 0.666) * 0.333 - time * 0.04 + multiTime).g;\n  float texColorB = texture2D(noiseTex, v.yx * 0.0025 + step(vUv.x, 0.333) * 0.333 + step(vUv.x, 0.666) * 0.333 + time * 0.04 - multiTime).b;\n  vec3 noise = vec3(\n    texColorR * 2.0 - 1.0,\n    texColorG * 2.0 - 1.0,\n    texColorB * 2.0 - 1.0\n  );\n  vec3 f = noise * 0.85;\n\n  vec3 f2 = a + d + f + h;\n\n  gl_FragColor = vec4(f2, 1.0);\n}\n","#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n","precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D acceleration;\nuniform sampler2D velocity;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vec3 a = texture2D(acceleration, vUv).xyz;\n  vec3 v = texture2D(velocity, vUv).xyz;\n  vec3 v2 = a + v;\n\n  gl_FragColor = vec4(v2, 1.0);\n}\n"),this.physicsRenderers[u].start(e,n,i),this.physicsRenderers[u].mergeAUniforms({noiseTex:{value:t},multiTime:{value:this.multiTime},anchor:{value:new r.Vector3},hookOptions:{value:this.physicsRenderers[0].createDataTexture(o)}})):(this.physicsRenderers[u]=new k("#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n","precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D prevVelocity;\nuniform sampler2D velocity;\nuniform sampler2D acceleration;\nuniform sampler2D noiseTex;\n\nvarying vec2 vUv;\n\n#ifndef PRECISION\n#define PRECISION 0.000001\n#endif\n\nvec3 drag(vec3 a, float value) {\n  return normalize(a * -1.0 + PRECISION) * length(a) * value;\n}\n\n#ifndef PRECISION\n#define PRECISION 0.000001\n#endif\n\nvec3 hook(vec3 velocity, vec3 anchor, float restLength, float k) {\n  return normalize(velocity - anchor + PRECISION) * (-1.0 * k * (length(velocity - anchor) - restLength));\n}\n\nvoid main(void) {\n  vec3 pv = texture2D(prevVelocity, vUv).xyz;\n  vec3 v = texture2D(velocity, vUv).xyz;\n  vec3 a = texture2D(acceleration, vUv).xyz;\n  vec3 d = drag(a, 0.4);\n  vec3 h = hook(v, pv, 1.0, 0.14);\n\n  vec3 f = a + d + h;\n\n  gl_FragColor = vec4(f, 1.0);\n}\n","#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n","precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D acceleration;\nuniform sampler2D velocity;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vec3 a = texture2D(acceleration, vUv).xyz;\n  vec3 v = texture2D(velocity, vUv).xyz;\n\n  gl_FragColor = vec4(a + v, 1.0);\n}\n"),this.physicsRenderers[u].start(e,null,i),this.physicsRenderers[u].mergeAUniforms({prevVelocity:{value:this.physicsRenderers[u-1].getCurrentVelocity()}}));this.core.start(this.physicsRenderers[0]),this.trail.start(this.physicsRenderers),this.add(this.core),this.add(this.trail)}},{key:"update",value:function(e,t,n){for(var r=0;r<this.physicsRenderers.length;r++){var i=this.physicsRenderers[r];0===r?i.aUniforms.anchor.value.copy(n.position):i.aUniforms.prevVelocity.value=this.physicsRenderers[r-1].getCurrentVelocity(),i.update(e,t)}this.core.update(this.physicsRenderers[0],t),this.trail.update(this.physicsRenderers,t)}}])&&j(t.prototype,n),c}(r.Group);function H(e){return(H="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})(e)}function V(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)}}function W(e,t){return(W=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Z(e,t){return!t||"object"!==H(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function q(e){return(q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Y,X=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&W(e,t)}(c,e);var t,n,i,o,a=(i=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=q(i);if(o){var n=q(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Z(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);var t=new r.PlaneGeometry(1,1),n=new r.RawShaderMaterial({uniforms:{time:{value:0},resolution:{value:new r.Vector2},noiseTex:{value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec2 vUv;\n\nvoid main() {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  vUv = uv;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform vec2 resolution;\nuniform sampler2D noiseTex;\n\nvarying vec2 vUv;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec2 updateUv = vec2(\n    vUv.x * min(resolution.x / resolution.y, 1.0) + max(1.0 - resolution.x / resolution.y, 0.0) / 2.0,\n    vUv.y * min(resolution.y / resolution.x, 1.0) + max(1.0 - resolution.y / resolution.x, 0.0) / 2.0\n  );\n  vec2 p = updateUv * 2.0 - 1.0;\n  vec4 texColor1 = texture2D(noiseTex, updateUv + vec2(0.0, time * 0.01));\n  vec4 texColor2 = texture2D(noiseTex, updateUv - vec2(0.0, time * 0.02));\n  vec3 hsv1 = vec3(0.5 + time * 0.1 + vUv.y * 0.5, 0.4, 0.05);\n  vec3 hsv2 = vec3(1.2 + time * 0.1 + vUv.y * 0.5, 0.4, 0.4);\n  float hsvAlpha = pow((texColor1.r + texColor2.g) / 2.0, 3.0) * 2.0;\n  vec3 color = convertHsvToRgb(mix(hsv1, hsv2, hsvAlpha) - (1.0 - smoothstep(0.0, 1.0, length(p))) * 0.3);\n\n  gl_FragColor = vec4(color, 1.0);\n}\n"});return(e=a.call(this,t,n)).name="Background",e.position.z=-1e3,e}return t=c,(n=[{key:"start",value:function(e){this.material.uniforms.noiseTex.value=e}},{key:"update",value:function(e){this.material.uniforms.time.value+=e}},{key:"resize",value:function(e,t){var n=this.material.uniforms,r=Math.abs((e.position.z-this.position.z)*Math.tan(s().radians(e.fov)/2)*2),i=r*e.aspect;this.scale.set(i,r,1),n.resolution.value.copy(t)}}])&&V(t.prototype,n),c}(r.Mesh);function K(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function Q(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)}}var J=new r.Scene,$=new v,ee=new r.Clock({autoStart:!1}),te=new x,ne=new N,re=new X,ie=new r.TextureLoader,oe=new r.Vector2,ae=!1,se=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i,o;return t=e,(n=[{key:"start",value:(i=regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(Y=new r.WebGLRenderer({alpha:!0,antialias:!0,canvas:t})).setPixelRatio(window.devicePixelRatio),Y.setClearColor(921102,1),e.next=5,Promise.all([ie.loadAsync("/sketch-threejs/img/sketch/flow_field/noise.jpg")]).then((function(e){var t=e[0];t.wrapS=r.RepeatWrapping,t.wrapT=r.RepeatWrapping,t.format=r.RGBFormat,t.type=r.FloatType,t.minFilter=r.NearestFilter,t.magFilter=r.NearestFilter,te.start(t),ne.start(Y,t),re.start(t)}));case 5:J.add(te),J.add(ne),J.add(re),$.start();case 9:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=i.apply(e,t);function a(e){K(o,n,r,a,s,"next",e)}function s(e){K(o,n,r,a,s,"throw",e)}a(void 0)}))},function(e){return o.apply(this,arguments)})},{key:"play",value:function(){ee.start(),this.update()}},{key:"pause",value:function(){ee.stop()}},{key:"update",value:function(){if(!1!==ee.running){var e=ee.getDelta();$.update(e),te.update(e,$),ne.update(Y,e,te),re.update(e),Y.setRenderTarget(null),Y.render(J,$)}}},{key:"resize",value:function(e){$.resize(e),re.resize($,e),Y.setSize(e.x,e.y)}},{key:"setCoreAnchor",value:function(e){var t=150*(oe.x/e.x*2-1)+150*(oe.y/e.y*2-1),n=Math.abs(($.position.z-t)*Math.tan(s().radians($.fov)/2)*2),r=n*$.aspect;te.anchor.set((oe.x/e.x-.5)*r,-(oe.y/e.y-.5)*n,t)}},{key:"touchStart",value:function(e,t){e.touches||e.preventDefault(),oe.set(e.touches?e.touches[0].clientX:e.clientX,e.touches?e.touches[0].clientY:e.clientY),ae=!0,this.setCoreAnchor(t)}},{key:"touchMove",value:function(e,t){e.touches||e.preventDefault(),!0===ae&&(oe.set(e.touches?e.touches[0].clientX:e.clientX,e.touches?e.touches[0].clientY:e.clientY),this.setCoreAnchor(t))}},{key:"touchEnd",value:function(){te.anchor.set(0,0,0),ae=!1}}])&&Q(t.prototype,n),e}();function ce(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function ue(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){ce(o,r,i,a,s,"next",e)}function s(e){ce(o,r,i,a,s,"throw",e)}a(void 0)}))}}function le(){return fe.apply(this,arguments)}function fe(){return(fe=ue(regeneratorRuntime.mark((function e(){var t,n,i,a,s,c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new se,n=new r.Vector2,i=document.getElementById("canvas-webgl"),a=document.querySelector(".p-preloader"),s=function(){n.set(document.body.clientWidth,window.innerHeight),i.width=n.x,i.height=n.y,t.resize(n)},c=function(){var e=function(e){t.touchStart(e,n)},r=function(e){t.touchMove(e,n)},a=function(){t.touchEnd()};i.addEventListener("mousedown",e,{passive:!1}),window.addEventListener("mousemove",r,{passive:!1}),window.addEventListener("mouseup",a),i.addEventListener("touchstart",e,{passive:!1}),window.addEventListener("touchmove",r,{passive:!1}),window.addEventListener("touchend",a),window.addEventListener("blur",(function(){t.pause()})),window.addEventListener("focus",(function(){t.play()})),window.addEventListener("resize",o()(s,100))},u=function e(){t.update(),requestAnimationFrame(e)},e.next=9,t.start(i);case 9:c(),s(),a.classList.add("is-hidden"),t.play(),u();case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},30401:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=(n(17393),function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},tex:{type:"t",value:null}},this.num=200,this.obj}var t,o;return t=e,(o=[{key:"createObj",value:function(e){var t=new i.InstancedBufferGeometry,r=new i.PlaneGeometry(1100,1100,20,20);t.copy(r);for(var o=new i.InstancedBufferAttribute(new Float32Array(3*this.num),3),a=new i.InstancedBufferAttribute(new Float32Array(this.num),1),s=new i.InstancedBufferAttribute(new Float32Array(this.num),1),c=0,u=this.num;c<u;c++)o.setXYZ(c,850*(2*Math.random()-1),0,300*(2*Math.random()-1)),a.setXYZ(c,Math.random()),s.setXYZ(c,2*Math.random()+1);t.setAttribute("instancePosition",o),t.setAttribute("delay",a),t.setAttribute("rotate",s);var l=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(94053).Z,fragmentShader:n(68773).Z,transparent:!0,depthWrite:!1,blending:i.AdditiveBlending});this.uniforms.tex.value=e,this.obj=new i.InstancedMesh(t,l,this.num)}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&r(t.prototype,o),e}())},27751:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(2212),i=n(38314),o=n(59170).Z,a=n(30401).Z;function s(){var e=new r.Vector2,t=document.getElementById("canvas-webgl"),n=new r.WebGL1Renderer({alpha:!0,antialias:!0,canvas:t}),s=new r.Scene,c=new r.PerspectiveCamera,u=new r.Clock;c.far=5e4,c.setFocalLength(24);var l=new a,f=function e(){var t;t=u.getDelta(),l.render(t),n.render(s,c),requestAnimationFrame(e)},h=function(){e.set(document.body.clientWidth,window.innerHeight),t.width=e.x,t.height=e.y,c.aspect=e.x/e.y,c.updateProjectionMatrix(),n.setSize(e.x,e.y)};o({fog:"../img/sketch/fog/fog.png"},(function(e){l.createObj(e.fog),s.add(l.obj),n.setClearColor(1118481,1),c.position.set(0,0,1e3),c.lookAt(new r.Vector3),u.start(),window.addEventListener("resize",i(h,1e3)),h(),f()}))}},95432:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(2212),i=n(38314),o=n.n(i),a=n(89813),s=n(69338),c=n.n(s),u=n(97719),l=n(5097),f=n(45695),h=n.n(f);function v(){var e=document.getElementById("canvas-webgl"),t=new r.WebGL1Renderer({antialias:!0,canvas:e}),n=new r.Scene,i=new u.Z(35,window.innerWidth/window.innerHeight,1,1e4),s=[],f=null,v=new r.Raycaster,d=-1,p=-1,m=!1,y=!1,g=!1,x=function(){this.rad=0,this.obj,this.is_entered=!1,c().call(this)},b=new r.PlaneGeometry(100,100);(x.prototype=Object.create(c().prototype)).constructor=x,x.prototype.init=function(e){var t=new r.MeshPhongMaterial({side:r.DoubleSide,map:(new r.TextureLoader).load("../img/sketch/gallery/image0"+h().getRandomInt(1,9)+".jpg")});this.obj=new r.Mesh(b,t),this.velocity=e.clone(),this.anchor=e.clone(),this.acceleration.set(0,0,0)};var w,M,_,S,P,T,R=function(e){var t;g||(v.setFromCamera(e,i),(t=v.intersectObjects(n.children)).length>0&&0==y?(document.body.classList.add("is-pointed"),d=t[0].object.id):z())},E=function(e,t){g=!0,e.force.position.anchor.set(780*Math.cos(t.rad),t.obj.position.y,780*Math.sin(t.rad)),e.force.look.anchor.copy(t.obj.position),z()},z=function(){document.body.classList.remove("is-pointed"),d=-1},L=function(){e.width=window.innerWidth,e.height=window.innerHeight,i.aspect=window.innerWidth/window.innerHeight,i.updateProjectionMatrix(),t.setSize(window.innerWidth,window.innerHeight)};t.setSize(window.innerWidth,window.innerHeight),t.setClearColor(1118481,1),i.position.set(1e3,1e3,1e3),i.lookAt(new r.Vector3),w=new r.Vector2,M=new r.Vector2,_=new r.Vector2,S=function(e,t,n){w.set(e,t),(0,a.Z)(w),R(w),m=!0},P=function(e,t,r){M.set(e,t),(0,a.Z)(M),R(n),m&&w.clone().sub(M).length()>.01&&(m=!1,y=!0),1==y&&0==g&&(i.rotate_rad1=i.rotate_rad1_base+h().getRadian(50*(w.y-M.y)),i.rotate_rad2=i.rotate_rad2_base+h().getRadian(50*(w.x-M.x)),i.rotate_rad1<h().getRadian(-50)&&(i.rotate_rad1=h().getRadian(-50)),i.rotate_rad1>h().getRadian(50)&&(i.rotate_rad1=h().getRadian(50)))},T=function(e,t,n){_.set(e,t),z(),g?(i.force.position.anchor.set(0,0,0),p=-1,g=!1):m&&p>-1?E(i,s[p]):y&&(i.rotate_rad1_base=i.rotate_rad1,i.rotate_rad2_base=i.rotate_rad2),m=!1,y=!1},window.addEventListener("resize",o()((function(){L()})),1e3),e.addEventListener("mousedown",(function(e){e.preventDefault(),S(e.clientX,e.clientY)})),e.addEventListener("mousemove",(function(e){e.preventDefault(),P(e.clientX,e.clientY)})),e.addEventListener("mouseup",(function(e){e.preventDefault(),T(e.clientX,e.clientY)})),e.addEventListener("touchstart",(function(e){e.preventDefault(),S(e.touches[0].clientX,e.touches[0].clientY)})),e.addEventListener("touchmove",(function(e){e.preventDefault(),P(e.touches[0].clientX,e.touches[0].clientY)})),e.addEventListener("touchend",(function(e){e.preventDefault(),T(e.changedTouches[0].clientX,e.changedTouches[0].clientY)})),window.addEventListener("mouseout",(function(){event.preventDefault(),_.set(0,0),z(),g?(i.force.position.anchor.set(0,0,0),p=-1,g=!1):m&&p>-1?E(i,s[p]):y&&(i.rotate_rad1_base=i.rotate_rad1,i.rotate_rad2_base=i.rotate_rad2),m=!1,y=!1})),function(e){for(var t=0;t<300;t++){var n=null,i=h().getRadian(t%45*8+180),o=1e3*Math.cos(i),a=5*t-750,c=1e3*Math.sin(i),u=new r.Vector3(o,a,c);(n=new x).init(new r.Vector3),n.rad=i,n.obj.position.copy(u),e.add(n.obj),s.push(n)}}(n),f=new l.Z(16777215,16777215,1),n.add(f),i.force.position.anchor.set(0,0,0),i.rotate_rad1=h().getRadian(-35),i.rotate_rad1_base=i.rotate_rad1,i.rotate_rad2=h().getRadian(180),i.rotate_rad2_base=i.rotate_rad2,L(),function e(){!function(){for(var e=0;e<300;e++)s[e].applyHook(0,.14),s[e].applyDrag(.4),s[e].updateVelocity(),s[e].obj.lookAt(0,s[e].obj.position.y,0),s[e].obj.id==d&&0==y&&0==g?1==m?p=e:s[e].obj.material.color.set(11184810):s[e].obj.material.color.set(16777215);i.force.position.applyHook(0,.08),i.force.position.applyDrag(.4),i.force.position.updateVelocity(),i.updatePosition(),!1===g&&i.force.look.anchor.copy(h().getPolarCoord(i.rotate_rad1,i.rotate_rad2,1e3)),i.force.look.applyHook(0,.08),i.force.look.applyDrag(.4),i.force.look.updateVelocity(),i.updateLook(),t.render(n,i)}(),requestAnimationFrame(e)}()}},77010:function(e,t,n){"use strict";n.d(t,{Z:function(){return G}});var r=n(2212),i=n(38314),o=n.n(i),a=n(48840),s=n(52886);function c(e){return(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})(e)}function u(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)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(i);if(o){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return f(this,e)});function s(e,t,n,i){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(o=a.call(this,e,t,n,i)).cameraResolution=new r.Vector2,o.time=0,o.isActive=!1,o}return t=s,(n=[{key:"start",value:function(){this.far=1e3,this.setFocalLength(50),this.position.set(0,0,11),this.lookAt(new r.Vector3),this.isActive=!0}},{key:"update",value:function(e){!1!==this.isActive&&(this.time+=e)}},{key:"resize",value:function(e){this.aspect=e.x/e.y,this.updateProjectionMatrix()}}])&&u(t.prototype,n),s}(r.PerspectiveCamera);function d(e){return(d="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})(e)}function p(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)}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=g(i);if(o){var n=g(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return y(this,e)});function s(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var n=new r.RawShaderMaterial({uniforms:{time:{value:0},resolution:{value:new r.Vector2},tScene:{value:null},tRoughness:{value:null},tNoise:{value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\nattribute vec3 normal;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform vec3 cameraPosition;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying vec3 vNormal;\nvarying float vEdge;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n  float angleToCamera = acos(dot(normalize(cameraPosition), (modelMatrix * vec4(normal, 1.0)).xyz));\n\n  vPosition = mPosition.xyz;\n  vUv = uv;\n  vNormal = (viewMatrix * modelMatrix * vec4(normal, 1.0)).xyz;\n  vEdge = pow(smoothstep(0.3, 1.0, abs(sin(angleToCamera))), 3.0);\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform vec2 resolution;\nuniform sampler2D tScene;\nuniform sampler2D tRoughness;\nuniform sampler2D tNoise;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying vec3 vNormal;\nvarying float vEdge;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec2 uv = abs(gl_FragCoord.xy / resolution - vec2(0.0, 1.0));\n  vec4 tSceneColor = texture2D(tScene, uv + vNormal.xy * (0.1 + vEdge * 0.9));\n  vec4 tRoughnessColor = texture2D(tRoughness, vUv);\n  vec4 tNoiseColor = texture2D(tNoise, vUv);\n  float str =\n    length(tRoughnessColor.r) * 0.8 +\n    vEdge * 0.5;\n  vec3 hsv = vec3(\n    0.45 + sin(radians(tNoiseColor.r * 360.0) + time) * 0.08 + cos(radians(tNoiseColor.g * 360.0) + time * 2.0) * 0.08,\n    0.35 - str * 0.34,\n    0.2 + str * 0.8\n  );\n  vec3 rgb = convertHsvToRgb(hsv);\n  vec3 color = rgb + tSceneColor.rgb * tSceneColor.rgb * tSceneColor.rgb * 0.6 + 0.05;\n\n  gl_FragColor = vec4(color, 1.0);\n}\n",transparent:!0});return(t=a.call(this,e,n)).name="Glass",t.isActive=!1,t}return t=s,(n=[{key:"start",value:function(e,t,n){var r=this.material.uniforms;r.tScene.value=e,r.tRoughness.value=t,r.tNoise.value=n,this.isActive=!0}},{key:"update",value:function(e){!1!==this.isActive&&(this.material.uniforms.time.value+=e)}},{key:"resize",value:function(e){this.material.uniforms.resolution.value.copy(e)}}])&&p(t.prototype,n),s}(r.Mesh);function b(e){return(b="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})(e)}function w(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)}}function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e,t){return!t||"object"!==b(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var P,T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&M(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=S(i);if(o){var n=S(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return _(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.SphereGeometry(100,64,64),n=new r.RawShaderMaterial({uniforms:{texture:{value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec2 vUv;\n\nvoid main() {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  vUv = uv;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\n\nvarying vec2 vUv;\n\nvoid main() {\n  gl_FragColor = texture2D(texture, vUv);\n}\n",side:r.BackSide});return(e=a.call(this,t,n)).name="Background",e}return t=s,(n=[{key:"start",value:function(e){this.material.uniforms.texture.value=e}}])&&w(t.prototype,n),s}(r.Mesh);function R(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}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)}}var z,L,C=new r.Scene,A=new v,O=new r.Clock({autoStart:!1}),D=new a.L,I=new r.TextureLoader,k=new T,F=new r.WebGLRenderTarget,j=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i,o;return t=e,(n=[{key:"start",value:(i=regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(P=new r.WebGL1Renderer({alpha:!0,antialias:!0,canvas:t})).setPixelRatio(window.devicePixelRatio),P.setClearColor(921102,1),(L=new s.z(A,P.domElement)).dampingFactor=.1,L.enableDamping=!0,L.enablePan=!1,L.enableZoom=!1,e.next=10,Promise.all([D.loadAsync("/sketch-threejs/model/glass/glass.obj"),I.loadAsync("/sketch-threejs/img/sketch/glass/landscape.jpg"),I.loadAsync("/sketch-threejs/img/sketch/glass/roughness.jpg"),I.loadAsync("/sketch-threejs/img/sketch/glass/noise.jpg")]).then((function(e){e[2].wrapT=e[2].wrapS=r.RepeatWrapping,e[3].wrapT=e[3].wrapS=r.RepeatWrapping,(z=new x(e[0].children[0].geometry)).start(F.texture,e[2],e[3]),k.start(e[1])}));case 10:C.add(z),C.add(k),A.start();case 13:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=i.apply(e,t);function a(e){R(o,n,r,a,s,"next",e)}function s(e){R(o,n,r,a,s,"throw",e)}a(void 0)}))},function(e){return o.apply(this,arguments)})},{key:"play",value:function(){O.start(),this.update()}},{key:"pause",value:function(){O.stop()}},{key:"update",value:function(){if(!1!==O.running){var e=O.getDelta();A.update(e),z.update(e),z.visible=!1,P.setRenderTarget(F),P.render(C,A),z.visible=!0,P.setRenderTarget(null),P.render(C,A),L.update()}}},{key:"resize",value:function(e){A.resize(e),z.resize(e),P.setSize(e.x,e.y),F.setSize(e.x,e.y)}}])&&E(t.prototype,n),e}();function U(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function B(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){U(o,r,i,a,s,"next",e)}function s(e){U(o,r,i,a,s,"throw",e)}a(void 0)}))}}function G(){return N.apply(this,arguments)}function N(){return(N=B(regeneratorRuntime.mark((function e(){var t,n,i,a,s,c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new j,n=new r.Vector2,i=document.getElementById("canvas-webgl"),a=document.querySelector(".p-preloader"),s=function(){n.set(document.body.clientWidth,window.innerHeight),i.width=n.x,i.height=n.y,t.resize(n)},c=function(){window.addEventListener("blur",(function(){t.pause()})),window.addEventListener("focus",(function(){t.play()})),window.addEventListener("resize",o()(s,100))},u=function e(){t.update(),requestAnimationFrame(e)},e.next=9,t.start(i);case 9:c(),s(),a.classList.add("is-hidden"),t.play(),u();case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},61962:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={resolution:{type:"v2",value:new i.Vector2(document.body.clientWidth,window.innerHeight)},imageResolution:{type:"v2",value:new i.Vector2(2048,1356)},texture:{type:"t",value:null}},this.obj}var t,o;return t=e,(o=[{key:"init",value:function(e){var t=this;(new i.TextureLoader).load("/sketch-threejs/img/sketch/glitch/osaka.jpg",(function(n){n.magFilter=i.NearestFilter,n.minFilter=i.NearestFilter,t.uniforms.texture.value=n,t.obj=t.createObj(),e()}))}},{key:"createObj",value:function(){return new i.Mesh(new i.PlaneGeometry(2,2),new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(2670).Z,fragmentShader:n(91481).Z}))}},{key:"resize",value:function(){this.uniforms.resolution.value.set(document.body.clientWidth,window.innerHeight)}}])&&r(t.prototype,o),e}()},35854:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},resolution:{type:"v2",value:new i.Vector2(document.body.clientWidth,window.innerHeight)},texture:{type:"t",value:t}},this.obj=this.createObj()}var t,o;return t=e,(o=[{key:"createObj",value:function(){return new i.Mesh(new i.PlaneGeometry(2,2),new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(79541).Z,fragmentShader:n(56521).Z}))}},{key:"render",value:function(e){this.uniforms.time.value+=e}},{key:"resize",value:function(){this.uniforms.resolution.value.set(document.body.clientWidth,window.innerHeight)}}])&&r(t.prototype,o),e}()},49275:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(2212),i=n(38314),o=n(89813).Z,a=n(61962).Z,s=n(35854).Z;function c(){var e=document.getElementById("canvas-webgl"),t=new r.WebGL1Renderer({antialias:!1,canvas:e}),n=new r.WebGLRenderTarget(document.body.clientWidth,window.innerHeight),c=new r.Scene,u=new r.Scene,l=new r.OrthographicCamera(-1,1,1,-1,0,1),f=new r.PerspectiveCamera(45,document.body.clientWidth/window.innerHeight,1,2),h=new r.Clock,v=new r.Vector2,d=new r.Vector2,p=new r.Vector2,m=new a,y=new s(n.texture),g=function(){e.width=document.body.clientWidth,e.height=window.innerHeight,f.aspect=document.body.clientWidth/window.innerHeight,f.updateProjectionMatrix(),m.resize(),y.resize(),n.setSize(document.body.clientWidth,window.innerHeight),t.setSize(document.body.clientWidth,window.innerHeight)};t.setSize(document.body.clientWidth,window.innerHeight),t.setClearColor(5592405,1),m.init((function(){u.add(m.obj),c.add(y.obj)})),window.addEventListener("resize",i((function(){g()})),1e3),e.addEventListener("mousedown",(function(e){e.preventDefault(),v.set(e.clientX,e.clientY),o(v)})),document.addEventListener("mousemove",(function(e){e.preventDefault(),d.set(e.clientX,e.clientY),o(d)})),document.addEventListener("mouseup",(function(e){e.preventDefault(),p.set(e.clientX,e.clientY),o(p)})),e.addEventListener("touchstart",(function(e){e.preventDefault(),v.set(e.touches[0].clientX,e.touches[0].clientY),o(v),e.touches[0].clientX,e.touches[0].clientY})),e.addEventListener("touchmove",(function(e){e.preventDefault(),d.set(e.touches[0].clientX,e.touches[0].clientY),o(d)})),e.addEventListener("touchend",(function(e){e.preventDefault(),p.set(e.changedTouches[0].clientX,e.changedTouches[0].clientY),o(p)})),g(),function e(){var r;r=h.getDelta(),t.setRenderTarget(n),t.render(u,f),y.render(r),t.setRenderTarget(null),t.render(c,l),requestAnimationFrame(e)}()}},97531:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(2212),i=n(38314),o=n.n(i),a=n(89813),s=n(12390),c=n.n(s),u=n(97719),l=n(45695),f=n.n(l);function h(){var e,t,i,s,l,h,v,d,p=document.getElementById("canvas-webgl"),m=new r.WebGL1Renderer({antialias:!0,canvas:p}),y=new r.Scene,g=new u.Z(35,window.innerWidth/window.innerHeight,1,1e4),x=(new r.Clock,null),b=null,w=null,M=null,_=new r.DirectionalLight(16777215,1),S=new r.Scene,P=new u.Z(45,1,1,1e4),T=new r.WebGLRenderTarget(1200,1200),R=null,E=new r.Scene,z=new u.Z(45,1,1,1e4),L=new r.HemisphereLight(268435455,13421772,1),C=new r.WebGLRenderTarget(1200,1200),A=null,O=null,D=new(c()),I=function(){p.width=window.innerWidth,p.height=window.innerHeight,g.aspect=window.innerWidth/window.innerHeight,g.updateProjectionMatrix(),m.setSize(window.innerWidth,window.innerHeight),x.material.uniforms.resolution.value.set(window.innerWidth,window.innerHeight),R.material.uniforms.resolution.value.set(window.innerWidth,window.innerHeight)};m.setSize(window.innerWidth,window.innerHeight),m.setClearColor(15658734,0),g.position.set(1e3,1e3,1e3),g.lookAt(new r.Vector3),i=new r.Vector2,s=new r.Vector2,l=new r.Vector2,h=function(e,t,n){i.set(e,t),(0,a.Z)(i),D.anchor.set(2,30)},v=function(e,t,n){s.set(e,t),(0,a.Z)(s)},d=function(e,t,n){l.set(e,t),D.anchor.set(1,0)},window.addEventListener("resize",o()((function(){I()})),1e3),p.addEventListener("mousedown",(function(e){e.preventDefault(),h(e.clientX,e.clientY)})),p.addEventListener("mousemove",(function(e){e.preventDefault(),v(e.clientX,e.clientY)})),p.addEventListener("mouseup",(function(e){e.preventDefault(),d(e.clientX,e.clientY)})),p.addEventListener("touchstart",(function(e){e.preventDefault(),h(e.touches[0].clientX,e.touches[0].clientY)})),p.addEventListener("touchmove",(function(e){e.preventDefault(),v(e.touches[0].clientX,e.touches[0].clientY)})),p.addEventListener("touchend",(function(e){e.preventDefault(),d(e.changedTouches[0].clientX,e.changedTouches[0].clientY)})),window.addEventListener("mouseout",(function(){event.preventDefault(),l.set(0,0),D.anchor.set(1,0)})),D.anchor.set(1,0),z.force.position.anchor.set(1e3,300,0),z.force.look.anchor.set(0,0,0),e=new r.SphereGeometry(1e3,128,128),t=new r.ShaderMaterial({uniforms:{time:{type:"f",value:0}},vertexShader:n(19160).Z,fragmentShader:n(53944).Z,side:r.BackSide}),A=new r.Mesh(e,t),O=function(){for(var e=new r.BufferGeometry,t=[],i=0;i<2e3;i++)t.push(f().getRadian(f().getRandomInt(0,120)+120),f().getRadian(f().getRandomInt(0,3600)/10),f().getRandomInt(200,1e3));var o=new Float32Array(t);e.setAttribute("position",new r.BufferAttribute(o,3));var a=new r.ShaderMaterial({uniforms:{time:{type:"f",value:0}},vertexShader:n(14623).Z,fragmentShader:n(77644).Z});return new r.Points(e,a)}(),E.add(A),E.add(O),E.add(L),x=function(){for(var e=new r.BufferGeometry,t=[],i=[],o=0;o<32;o++){t.push(0,0,0);var a=f().getRadian(f().getRandomInt(0,360)),s=f().getRadian(f().getRandomInt(0,360)),c=f().getRadian(f().getRandomInt(0,360));i.push(a,s,c)}var u=new Float32Array(t);e.setAttribute("position",new r.BufferAttribute(u,3));var l=new Float32Array(i);e.setAttribute("radian",new r.BufferAttribute(l,3));var h=new r.ShaderMaterial({uniforms:{time:{type:"f",value:0},resolution:{type:"v2",value:new r.Vector2(window.innerWidth,window.innerHeight)},size:{type:"f",value:28},force:{type:"v2",value:D.velocity}},vertexShader:n(12978).Z,fragmentShader:n(28408).Z,transparent:!0,depthWrite:!1,blending:r.AdditiveBlending});return new r.Points(e,h)}(),S.add(x),P.position.set(0,0,3e3),P.force.look.anchor.set(0,0,0),R=function(){var e=new r.PlaneGeometry(1e3,1e3),t=new r.ShaderMaterial({uniforms:{time:{type:"f",value:0},resolution:{type:"v2",value:new r.Vector2(window.innerWidth,window.innerHeight)},texture:{type:"t",value:T.texture},texture2:{type:"t",value:C.texture}},vertexShader:n(8820).Z,fragmentShader:n(61187).Z,transparent:!0});return new r.Mesh(e,t)}(),y.add(R),b=function(){var e=new r.SphereGeometry(1200,64,64),t=new r.ShaderMaterial({uniforms:{time:{type:"f",value:0}},vertexShader:n(45582).Z,fragmentShader:n(27444).Z,side:r.BackSide});return new r.Mesh(e,t)}(),y.add(b),w=function(){var e=new r.SphereGeometry(1100,64,64),t=new r.MeshBasicMaterial({color:14540253,wireframe:!0});return new r.Mesh(e,t)}(),y.add(w),M=function(){for(var e=new r.SphereGeometry(2,4,4),t=e.attributes,i=new r.BufferGeometry,o=[],a=[],s=[],c=[],u=[],l=function(n){for(y=f().getRandomInt(300,1e3),v=f().getRadian(f().getRandomInt(0,3600)/10),d=f().getRandomInt(60,120)/100,p=0;p<t.position.array.length;p+=3)o.push(t.position.array[p+0],t.position.array[p+1],t.position.array[p+2]),a.push(y),s.push(v),c.push(d);e.index.array.map((function(e){u.push(e+n*t.position.array.length/3)}))},h=0;h<16;h++){var v,d,p;l(h)}var m=new Float32Array(o);i.setAttribute("position",new r.BufferAttribute(m,3));var y=new Float32Array(a);i.setAttribute("radius",new r.BufferAttribute(y,1));var g=new Float32Array(s);i.setAttribute("radian",new r.BufferAttribute(g,1));var x=new Float32Array(c);i.setAttribute("scale",new r.BufferAttribute(x,1));var b=new Uint32Array(u);i.setIndex(new r.BufferAttribute(b,1));var w=new r.ShaderMaterial({uniforms:r.UniformsUtils.merge([r.UniformsLib.lights,{time:{type:"f",value:0}}]),vertexShader:n(33176).Z,fragmentShader:n(5402).Z,lights:!0});return new r.Mesh(i,w)}(),y.add(M),_.position.set(0,1,0),y.add(_),g.force.position.anchor.set(1e3,300,0),g.force.look.anchor.set(0,0,0),I(),function e(){x.material.uniforms.time.value++,R.lookAt(g.position),R.material.uniforms.time.value++,A.material.uniforms.time.value++,O.material.uniforms.time.value++,w.rotation.y=x.material.uniforms.time.value/1e3,M.material.uniforms.time.value++,D.applyHook(0,.12),D.applyDrag(.18),D.updateVelocity(),g.force.position.applyHook(0,.025),g.force.position.applyDrag(.2),g.force.position.updateVelocity(),g.updatePosition(),g.force.look.anchor.y=100*Math.sin(x.material.uniforms.time.value/100),g.force.look.applyHook(0,.2),g.force.look.applyDrag(.4),g.updateLook(),z.force.position.applyHook(0,.1),z.force.position.applyDrag(.2),z.force.position.updateVelocity(),z.updatePosition(),z.force.look.applyHook(0,.2),z.force.look.applyDrag(.4),z.force.look.updateVelocity(),z.updateLook(),m.setRenderTarget(C),m.render(E,z),m.setRenderTarget(T),m.render(S,P),m.setRenderTarget(null),m.render(y,g),requestAnimationFrame(e)}()}},4625:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(89813),i=n(97719),o=n(33286),a=n.n(o),s=n(7318),c=n.n(s),u=n(45695),l=n.n(u),f=n(2212),h=n(38314);function v(){var e,t,o,s,u,v,d=document.getElementById("canvas-webgl"),p=new f.WebGL1Renderer({antialias:!0,canvas:d}),m=new f.Scene,y=new i.Z(35,window.innerWidth/window.innerHeight,1,1e4),g=(new f.Clock,2e4),x=[],b=new(c()),w=new Float32Array(6e4),M=new Float32Array(6e4),_=new Float32Array(g),S=new Float32Array(g),P=new f.Vector3(1.5,0,0),T=Date.now(),R=!1,E=function(){var e=document.createElement("canvas"),t=e.getContext("2d"),n=null,r=null;return e.width=256,e.height=256,(n=t.createRadialGradient(128,128,20,128,128,128)).addColorStop(.2,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.3)"),n.addColorStop(1,"rgba(255, 255, 255, 0)"),t.fillStyle=n,t.arc(128,128,128,0,Math.PI/180,!0),t.fill(),(r=new f.Texture(e)).needsUpdate=!0,r},z=function(){d.width=window.innerWidth,d.height=window.innerHeight,y.aspect=window.innerWidth/window.innerHeight,y.updateProjectionMatrix(),p.setSize(window.innerWidth,window.innerHeight)};p.setSize(window.innerWidth,window.innerHeight),p.setClearColor(0,1),y.position.set(1e3,1e3,1e3),y.lookAt(new f.Vector3),e=new f.Vector2,t=new f.Vector2,o=new f.Vector2,s=function(t,n,i){e.set(t,n),(0,r.Z)(e),R=!0},u=function(e,n,i){t.set(e,n),(0,r.Z)(t),y.force.position.anchor.z=120*t.x,y.force.position.anchor.y=-120*t.y},v=function(e,t,n){o.set(e,t),y.force.position.anchor.z=0,y.force.position.anchor.y=0,R=!1},window.addEventListener("resize",h((function(){z()})),1e3),d.addEventListener("mousedown",(function(e){e.preventDefault(),s(e.clientX,e.clientY)})),d.addEventListener("mousemove",(function(e){e.preventDefault(),u(e.clientX,e.clientY)})),d.addEventListener("mouseup",(function(e){e.preventDefault(),v(e.clientX,e.clientY)})),d.addEventListener("touchstart",(function(e){e.preventDefault(),s(e.touches[0].clientX,e.touches[0].clientY)})),d.addEventListener("touchmove",(function(e){e.preventDefault(),u(e.touches[0].clientX,e.touches[0].clientY)})),d.addEventListener("touchend",(function(e){e.preventDefault(),v(e.changedTouches[0].clientX,e.changedTouches[0].clientY)})),window.addEventListener("mouseout",(function(){event.preventDefault(),o.set(0,0),y.force.position.anchor.z=0,y.force.position.anchor.y=0})),function(){for(var e=0;e<g;e++){var t=new(a()),r=l().getRandomInt(60,210),i=l().getRandomInt(30,90),o=new f.Color("hsl("+r+", "+i+"%, 50%)");t.init(new f.Vector3(l().getRandomInt(-100,100),0,0)),x.push(t),w[3*e+0]=t.velocity.x,w[3*e+1]=t.velocity.y,w[3*e+2]=t.velocity.z,o.toArray(M,3*e),_[e]=t.a,S[e]=t.size}b.init({scene:m,vs:n(99173).Z,fs:n(77911).Z,positions:w,colors:M,opacities:_,sizes:S,texture:E(),blending:f.AdditiveBlending}),y.force.position.anchor.set(800,0,0)}(),z(),function e(){R?P.x<6&&(P.x+=.02):P.x>1.5&&(P.x-=.1),function(){var e=0;if(Date.now()-T>16*P.x){for(var t=0;t<x.length;t++){var n=x[t];if(!n.is_active){var r=l().getRadian(3*l().getRandomInt(0,120)),i=Math.log(l().getRandomInt(2,128))/Math.log(128)*160+60,o=Math.sin(r)*i,a=Math.cos(r)*i,s=new f.Vector3(-1e3,o,a);if(s.add(b.velocity),n.activate(),n.init(s),n.a=0,n.size=l().getRandomInt(5,60),++e>=Math.pow(3*P.x,.4*P.x))break}}T=Date.now()}}(),function(){for(var e=0;e<x.length;e++){var t=x[e];t.is_active&&(t.time++,t.applyForce(P),t.applyDrag(.1),t.updateVelocity(),t.a<.8&&(t.a+=.02),t.velocity.x>1e3&&(t.init(new f.Vector3(0,0,0)),t.time=0,t.a=0,t.inactivate())),w[3*e+0]=t.velocity.x,w[3*e+1]=t.velocity.y,w[3*e+2]=t.velocity.z,_[e]=t.a,S[e]=t.size}b.updatePoints()}(),y.force.position.applyHook(0,.008),y.force.position.applyDrag(.1),y.force.position.updateVelocity(),y.updatePosition(),y.lookAtCenter(),p.render(m,y),requestAnimationFrame(e)}()}},91614:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(2212),i=n(38314),o=n.n(i),a=n(89813),s=n(33286),c=n.n(s),u=n(7318),l=n.n(u),f=n(97719),h=n(45695),v=n.n(h);function d(){var e,t,i,s,u,h,d,p=document.getElementById("canvas-webgl"),m=new r.WebGL1Renderer({antialias:!0,canvas:p}),y=new r.Scene,g=new f.Z(35,window.innerWidth/window.innerHeight,1,1e4),x=(new r.Clock,new Image),b=[],w=[],M=null,_=null,S=null,P=null,T=400,R=new(l()),E=!1,z=function(){var e=document.createElement("canvas"),t=e.getContext("2d"),n=null,i=null;return e.width=200,e.height=200,(n=t.createRadialGradient(100,100,20,100,100,100)).addColorStop(.2,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.3)"),n.addColorStop(1,"rgba(255, 255, 255, 0)"),t.fillStyle=n,t.arc(100,100,100,0,Math.PI/180,!0),t.fill(),(i=new r.Texture(e)).minFilter=r.NearestFilter,i.needsUpdate=!0,i},L=function(){p.width=window.innerWidth,p.height=window.innerHeight,g.aspect=window.innerWidth/window.innerHeight,g.updateProjectionMatrix(),m.setSize(window.innerWidth,window.innerHeight)};m.setSize(window.innerWidth,window.innerHeight),m.setClearColor(1118481,1),g.position.set(1e3,1e3,1e3),g.lookAt(new r.Vector3),t=new r.Vector2,i=new r.Vector2,s=new r.Vector2,u=function(e,n,r){t.set(e,n),(0,a.Z)(t),function(){for(var e=0;e<w.length;e++){var t=w[e],n=v().getRadian(v().getRandomInt(0,360)),r=v().getRadian(v().getRandomInt(0,360)),i=v().getRandomInt(40,80);t.is_activate=!1,t.applyForce(v().getPolarCoord(n,r,i))}}()},h=function(e,t,n){i.set(e,t),(0,a.Z)(i),g.force.position.anchor.z=1e3*i.x,g.force.position.anchor.y=-1e3*i.y},d=function(e,t,n){s.set(e,t),g.force.position.anchor.z=0,g.force.position.anchor.y=0},window.addEventListener("resize",o()((function(){L()})),1e3),p.addEventListener("mousedown",(function(e){e.preventDefault(),u(e.clientX,e.clientY)})),p.addEventListener("mousemove",(function(e){e.preventDefault(),h(e.clientX,e.clientY)})),p.addEventListener("mouseup",(function(e){e.preventDefault(),d(e.clientX,e.clientY)})),p.addEventListener("touchstart",(function(e){e.preventDefault(),u(e.touches[0].clientX,e.touches[0].clientY)})),p.addEventListener("touchmove",(function(e){e.preventDefault(),h(e.touches[0].clientX,e.touches[0].clientY)})),p.addEventListener("touchend",(function(e){e.preventDefault(),d(e.changedTouches[0].clientX,e.changedTouches[0].clientY)})),window.addEventListener("mouseout",(function(){event.preventDefault(),s.set(0,0),g.force.position.anchor.z=0,g.force.position.anchor.y=0})),e=function(){!function(){var e=document.createElement("canvas"),t=e.getContext("2d");e.width=T,e.height=T,t.drawImage(x,0,0);for(var n=t.getImageData(0,0,T,T),r=0;r<T;r++)if(!(r%3>0))for(var i=0;i<T;i++)i%3>0||n.data[4*(i+r*T)]>0&&b.push(0,-1*(r-200),-1*(i-200))}(),function(e){M=new Float32Array(b),_=new Float32Array(b.length),S=new Float32Array(b.length/3),P=new Float32Array(b.length/3);for(var t=0;t<b.length/3;t++){var i=new(c()),o=new r.Color("hsl("+(b[3*t+2]+b[3*t+1]+T)/5+", 60%, 80%)");i.init(new r.Vector3(b[3*t],b[3*t+1],b[3*t+2])),i.is_activate=!0,w.push(i),o.toArray(_,3*t),S[t]=1,P[t]=12}R.init({scene:e,vs:n(99173).Z,fs:n(77911).Z,positions:M,colors:_,opacities:S,sizes:P,texture:z(),blending:r.NormalBlending}),E=!0}(y)},x.src="../img/sketch/image_data/elephant.png",x.onload=function(){e()},g.setPolarCoord(0,0,1400),L(),function e(){E&&(function(){for(var e=0;e<w.length;e++){var t=w[e];t.time++,t.acceleration.length()<1&&(t.is_activate=!0),t.is_activate?(t.applyHook(0,.18),t.applyDrag(.26)):t.applyDrag(.035),t.updateVelocity(),t.velocity.sub(R.velocity),M[3*e+0]=t.velocity.x-R.velocity.x,M[3*e+1]=t.velocity.y-R.velocity.x,M[3*e+2]=t.velocity.z-R.velocity.x,t.size=Math.log(v().getRandomInt(1,128))/Math.log(128)*Math.sqrt(document.body.clientWidth),P[e]=t.size}R.updatePoints()}(),R.updatePoints()),g.force.position.applyHook(0,.025),g.force.position.applyDrag(.2),g.force.position.updateVelocity(),g.updatePosition(),g.lookAtCenter(),m.render(y,g),requestAnimationFrame(e)}()}},60439:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}}),n(2212);var i=n(90887),o=n(17393),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.camera=t,this.radian1=0,this.radian1Base=0,this.radian2=0,this.radian2Base=0,this.radius=2500,this.isZoom=!1}var t,n;return t=e,(n=[{key:"rotate",value:function(e,t){!0===this.isZoom&&(this.isZoom=!1),this.radian1=o.clamp(this.radian1Base+t,o.radians(-75),o.radians(75)),this.radian2=this.radian2Base-2*e}},{key:"zoom",value:function(e){e&&(!1===this.isZoom&&(this.isZoom=!0),this.radius,this.radius-=e/Math.abs(e)*200,this.radius=o.clamp(this.radius,700,8e3),this.radius)}},{key:"touchEnd",value:function(){this.radian1Base=this.radian1,this.radian2Base=this.radian2}},{key:"render",value:function(){this.camera.anchor=o.spherical(this.radian1,this.radian2,this.radius),this.camera.render()}},{key:"computeZoomLength",value:function(){return this.isZoom?.05*i.vec3.length(this.camera.acceleration):0}},{key:"computeAcceleration",value:function(){return.05*i.vec3.length(this.camera.acceleration)}}])&&r(t.prototype,n),e}()},90036:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}});var i=n(2212),o=n(17393),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},cubeTex:{type:"t",value:null}},this.instances=1e3,this.obj}var t,a;return t=e,(a=[{key:"init",value:function(e){this.uniforms.cubeTex.value=e,this.obj=this.createObj()}},{key:"createObj",value:function(){var e=new i.InstancedBufferGeometry,t=new i.BoxGeometry(10,10,10);e.copy(t);for(var r=new i.InstancedBufferAttribute(new Float32Array(3*this.instances),3),a=new i.InstancedBufferAttribute(new Float32Array(this.instances),1),s=new i.InstancedBufferAttribute(new Float32Array(3*this.instances),3),c=0,u=a.count;c<u;c++){var l=o.spherical(2*Math.random()*Math.PI,2*Math.random()*Math.PI,3e3*Math.random()+100);r.setXYZ(c,l[0],l[1],l[2]),a.setXYZ(c,100*Math.random()),s.setXYZ(c,Math.random()-.5,Math.random()-.5,Math.random()-.5)}return e.setAttribute("translate",r),e.setAttribute("offset",a),e.setAttribute("rotate",s),new i.InstancedMesh(e,new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(58702).Z,fragmentShader:n(7034).Z,transparent:!0,side:i.DoubleSide}),this.instances)}},{key:"render",value:function(e){this.uniforms.time.value+=e,this.obj&&(this.obj.instanceMatrix.needsUpdate=!0)}}])&&r(t.prototype,a),e}()},41442:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},resolution:{type:"v2",value:new i.Vector2(document.body.clientWidth,window.innerHeight)},texture:{type:"t",value:t},strengthZoom:{type:"f",value:0},strengthGlitch:{type:"f",value:0}},this.obj=this.createObj()}var t,o;return t=e,(o=[{key:"createObj",value:function(){return new i.Mesh(new i.PlaneGeometry(2,2),new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(4998).Z,fragmentShader:n(64529).Z}))}},{key:"render",value:function(e){this.uniforms.time.value+=e}},{key:"resize",value:function(){this.uniforms.resolution.value.set(document.body.clientWidth,window.innerHeight)}}])&&r(t.prototype,o),e}()},22668:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},cubeTex:{type:"t",value:null}},this.obj}var t,o;return t=e,(o=[{key:"init",value:function(e){this.uniforms.cubeTex.value=e,this.obj=this.createObj()}},{key:"createObj",value:function(){return new i.Mesh(new i.BoxGeometry(3e4,3e4,3e4,1,1,1),new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(70301).Z,fragmentShader:n(67965).Z,side:i.BackSide}))}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&r(t.prototype,o),e}()},15758:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(2212),i=n(38314),o=n(89813).Z,a=n(97355).Z,s=n(60439).Z,c=n(90036).Z,u=n(22668).Z,l=n(41442).Z;function f(){var e=document.getElementById("canvas-webgl"),t=new r.WebGL1Renderer({antialias:!1,canvas:e,alpha:!0}),n=new r.WebGLRenderTarget(document.body.clientWidth,window.innerHeight),f=new r.Scene,h=new r.Scene,v=new r.OrthographicCamera(-1,1,1,-1,0,1),d=new a(45,document.body.clientWidth/window.innerHeight,1,1e5),p=new s(d),m=new r.Clock,y=new r.Vector2,g=new r.Vector2,x=new r.Vector2,b=!1,w=new r.CubeTextureLoader,M=new c,_=new u,S=new l(n.texture),P=function(){e.width=document.body.clientWidth,e.height=window.innerHeight,d.aspect=document.body.clientWidth/window.innerHeight,d.updateProjectionMatrix(),S.resize(),t.setSize(document.body.clientWidth,window.innerHeight),n.setSize(document.body.clientWidth,window.innerHeight)},T=function(e){b=!0},R=function(e){b&&p.rotate(y.x-g.x,y.y-g.y)},E=function(e){b=!1,p.touchEnd()};t.setSize(document.body.clientWidth,window.innerHeight),t.setClearColor(15658734,1),w.setPath("../static/image/instancing/").load(["cubemap_px.png","cubemap_nx.png","cubemap_py.png","cubemap_ny.png","cubemap_pz.png","cubemap_nz.png"],(function(e){M.init(e),_.init(e),f.add(S.obj),h.add(M.obj),h.add(_.obj)})),window.addEventListener("resize",i((function(){P()})),1e3),e.addEventListener("mousedown",(function(e){e.preventDefault(),y.set(e.clientX,e.clientY),o(y),T()})),document.addEventListener("mousemove",(function(e){e.preventDefault(),g.set(e.clientX,e.clientY),o(g),R()})),document.addEventListener("mouseup",(function(e){e.preventDefault(),x.set(e.clientX,e.clientY),o(x),E()})),e.addEventListener("wheel",(function(e){e.preventDefault(),function(e){p.zoom(e.deltaY)}(e)})),e.addEventListener("touchstart",(function(e){e.preventDefault(),y.set(e.touches[0].clientX,e.touches[0].clientY),o(y),T(e.touches[0].clientX,e.touches[0].clientY)})),e.addEventListener("touchmove",(function(e){e.preventDefault(),g.set(e.touches[0].clientX,e.touches[0].clientY),o(g),R()})),e.addEventListener("touchend",(function(e){e.preventDefault(),x.set(e.changedTouches[0].clientX,e.changedTouches[0].clientY),o(x),E()})),P(),function e(){var r;r=m.getDelta(),p.render(),M.render(r),_.render(r),S.render(r),S.uniforms.strengthZoom.value=p.computeZoomLength(),S.uniforms.strengthGlitch.value=p.computeAcceleration(),t.setRenderTarget(n),t.render(h,d),t.setRenderTarget(null),t.render(f,v),requestAnimationFrame(e)}()}},48501:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.vTouchStart=new i.Vector2,this.vPrev=new i.Vector2,this.v=new i.Vector2,this.a=new i.Vector2,this.anchor=new i.Vector2,this.isTouched=!1}var t,n;return t=e,(n=[{key:"touchStart",value:function(e){e.touches||e.preventDefault(),this.vPrev.copy(this.v),this.a.set(0,0),this.vTouchStart.set(e.touches?e.touches[0].clientX:e.clientX,e.touches?e.touches[0].clientY:e.clientY),this.isTouched=!0}},{key:"touchMove",value:function(e){var t=e.touches?e.touches[0].clientX:e.clientX,n=e.touches?e.touches[0].clientY:e.clientY;!1!==this.isTouched&&(this.anchor.set((t-this.vTouchStart.x)/10+this.vPrev.x,(n-this.vTouchStart.y)/10+this.vPrev.y),e.touches&&e.preventDefault())}},{key:"touchEnd",value:function(e){this.isTouched=!1,this.isDraging=!1}},{key:"render",value:function(){this.a.set((this.anchor.x-this.v.x)/10,(this.anchor.y-this.v.y)/10),this.v.add(this.a)}}])&&r(t.prototype,n),e}()},13490:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return s}});var i=n(2212),o=n(17393),a=n(91685),s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},addH1:{type:"f",value:t-.5},addH2:{type:"f",value:t}},this.obj}var t,s;return t=e,(s=[{key:"createObj",value:function(){for(var e=new a(Math.random),t=new i.BoxGeometry(100,5,100,60,1,60),r=0;r<t.attributes.position.count;r++){var s=t.attributes.position.getX(r),c=t.attributes.position.getY(r),u=t.attributes.position.getZ(r),l=48*(.75*e.noise4D(s/80,c/80,u/80,1)+.25)+18*e.noise4D(s/48,c/32,u/32,1)+1.2*e.noise4D(s/6,c/6,u/6,1)+.6*e.noise4D(s/2,c/2,u/2,1),f=function(e,t,n){var r=o.clamp((n-0)/5,0,1);return r*r*(3-2*r)}(0,0,l),h=function(e,t){return t>=0?1:0}(0,c);t.attributes.position.setY(r,(c+l*f)*h)}var v=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(31382).Z,fragmentShader:n(72413).Z});this.obj=new i.Mesh(t,v)}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&r(t.prototype,s),e}()},8189:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}});var i=n(2212),o=n(17393),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},addH:{type:"f",value:t-.5}},this.obj}var t,a;return t=e,(a=[{key:"createObj",value:function(){var e=new i.PlaneGeometry(100,100,60,60),t=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(40557).Z,fragmentShader:n(53822).Z,transparent:!0});this.obj=new i.Mesh(e,t),this.obj.translateY(8),this.obj.rotation.set(o.radians(-90),0,0)}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&r(t.prototype,a),e}()},1867:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(2212),i=n(38314),o=n(17393),a=n(13490).Z,s=n(8189).Z,c=n(48501).Z;function u(){var e=new r.Vector2,t=document.getElementById("canvas-webgl"),n=new r.WebGL1Renderer({alpha:!0,antialias:!0,canvas:t}),u=new r.Scene,l=new r.PerspectiveCamera,f=new r.Clock({autoStart:!1});l.far=1e3,l.setFocalLength(50);var h,v,d,p=Math.random(),m=new a(p),y=new s(p),g=new r.Group,x=new c,b=function(){e.set(document.body.clientWidth,window.innerHeight),t.width=e.x,t.height=e.y,l.aspect=e.x/e.y,l.updateProjectionMatrix(),n.setSize(e.x,e.y)};n.setClearColor(15658734,1),l.position.set(0,0,300),l.lookAt(new r.Vector3(0,0,0)),m.createObj(),y.createObj(),g.add(m.obj),g.add(y.obj),u.add(g),h=function(e){x.touchStart(e)},v=function(e){x.touchMove(e)},d=function(e){x.touchEnd(e)},t.addEventListener("mousedown",h,{passive:!1}),window.addEventListener("mousemove",v,{passive:!1}),window.addEventListener("mouseup",d),t.addEventListener("touchstart",h,{passive:!1}),window.addEventListener("touchmove",v,{passive:!1}),window.addEventListener("touchend",d),window.addEventListener("resize",i(b,1e3)),b(),f.start(),function t(){var r;r=f.getDelta(),x.render(e),g.rotation.set(o.radians(x.v.y/e.x*1e3+45),o.radians(x.v.x/e.y*1e3-30),0),m.render(r),y.render(r),n.render(u,l),requestAnimationFrame(t)}()}},73262:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(2212),i=n(38314),o=n.n(i),a=n(89813),s=n(69338),c=n.n(s),u=n(97719),l=n(45695),f=n.n(l);function h(){var e=document.getElementById("canvas-webgl"),t=new r.WebGL1Renderer({antialias:!0,canvas:e}),i=new r.Scene,s=new u.Z(35,window.innerWidth/window.innerHeight,1,1e4),l=(new r.Clock,new r.Raycaster),h=null,v=new(c()),d=new(c()),p=null;v.mass=1.4;var m,y,g,x,b,w,M,_,S,P=(m=new r.PlaneGeometry(6,6),y=new r.ShaderMaterial({uniforms:{time:{type:"f",value:0},time2:{type:"f",value:0},acceleration:{type:"f",value:0},resolution:{type:"v2",value:new r.Vector2(window.innerWidth,window.innerHeight)}},vertexShader:n(30755).Z,fragmentShader:n(73845).Z,transparent:!0}),(g=new r.Mesh(m,y)).name="MetalCube",g),T=function(){var e=new r.OctahedronGeometry(30,4),t=new r.ShaderMaterial({uniforms:{time:{type:"f",value:0},acceleration:{type:"f",value:0}},vertexShader:n(30958).Z,fragmentShader:n(12294).Z,side:r.BackSide}),i=new r.Mesh(e,t);return i.name="Background",i}(),R=function(){e.width=window.innerWidth,e.height=window.innerHeight,s.aspect=window.innerWidth/window.innerHeight,s.updateProjectionMatrix(),t.setSize(window.innerWidth,window.innerHeight),P.material.uniforms.resolution.value.set(window.innerWidth,window.innerHeight)};t.setSize(window.innerWidth,window.innerHeight),t.setClearColor(15658734,1),s.position.set(1e3,1e3,1e3),s.lookAt(new r.Vector3),x=new r.Vector2,b=new r.Vector2,w=new r.Vector2,M=function(e,t,n){x.set(e,t),(0,a.Z)(x)},_=function(e,t,n){b.set(e,t),(0,a.Z)(b),p=b},S=function(e,t,n){w.set(e,t)},window.addEventListener("resize",o()((function(){R()})),1e3),e.addEventListener("mousedown",(function(e){e.preventDefault(),M(e.clientX,e.clientY)})),e.addEventListener("mousemove",(function(e){e.preventDefault(),_(e.clientX,e.clientY)})),e.addEventListener("mouseup",(function(e){e.preventDefault(),S(e.clientX,e.clientY)})),e.addEventListener("touchstart",(function(e){e.preventDefault(),M(e.touches[0].clientX,e.touches[0].clientY)})),e.addEventListener("touchmove",(function(e){e.preventDefault(),_(e.touches[0].clientX,e.touches[0].clientY)})),e.addEventListener("touchend",(function(e){e.preventDefault(),S(e.changedTouches[0].clientX,e.changedTouches[0].clientY)})),window.addEventListener("mouseout",(function(){event.preventDefault(),w.set(0,0)})),i.add(P),i.add(T),s.setPolarCoord(0,f().getRadian(90),24),R(),function e(){!function(e,t,n){v.acceleration.length()>.1||!n||(l.setFromCamera(n,t),(h=l.intersectObjects(e.children)[0])&&"MetalCube"==h.object.name&&(v.anchor.copy(f().getPolarCoord(f().getRadian(f().getRandomInt(-20,20)),f().getRadian(f().getRandomInt(0,360)),f().getRandomInt(30,90)/10)),d.applyForce(new r.Vector3(1,0,0))))}(i,s,p),v.applyHook(0,.12),v.applyDrag(.01),v.updateVelocity(),d.applyHook(0,.005),d.applyDrag(.2),d.updateVelocity(),P.position.copy(v.velocity),P.material.uniforms.time.value++,P.material.uniforms.time2.value+=1+Math.floor(4*v.acceleration.length()),P.material.uniforms.acceleration.value=v.acceleration.length(),T.material.uniforms.time.value++,T.material.uniforms.acceleration.value=d.velocity.length(),s.force.position.applyHook(0,.025),s.force.position.applyDrag(.2),s.force.position.updateVelocity(),s.updatePosition(),s.lookAtCenter(),t.render(i,s),requestAnimationFrame(e)}()}},56600:function(e,t,n){"use strict";n.d(t,{Z:function(){return Q}});var r=n(2212),i=n(48840),o=n(42238),a=n.n(o),s=n(38314),c=n.n(s),u=n(29130),l=n.n(u),f=n(17393),h=n.n(f);function v(e){return(v="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})(e)}function d(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)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(c,e);var t,i,o,a,s=(o=c,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(o);if(a){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return m(this,e)});function c(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);var i=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:-2},drawBrightOnly:{type:"f",value:0},dissolveEdge:{type:"f",value:0}},vertexShader:n(30673).Z,fragmentShader:n(32450).Z,transparent:!0});return(t=s.call(this,e,i)).v=new r.Vector3(0,0,0),t.a=new r.Vector3,t.anchor=new r.Vector3(0,0,0),t.sv=new r.Vector3(0,0,0),t.sa=new r.Vector3,t.sanchor=new r.Vector3(0,0,0),t.isOvered=!1,t.isCoolDowned=!1,t}return t=c,(i=[{key:"rotate",value:function(e,t){this.anchor.set(e,t,0)}},{key:"render",value:function(e,t){this.material.uniforms.time.value+=e,this.material.uniforms.dissolveEdge.value=.0055*t,this.a.copy(this.anchor).sub(this.v).divideScalar(10),this.v.add(this.a),this.rotation.setFromVector3(this.v),this.sa.copy(this.sanchor).sub(this.sv).divideScalar(10),!1===this.isOvered&&this.sa.addScalar(.2*t),this.sv.add(this.sa);var n=.005*(this.sv.length()+1),r=5e-4*this.sv.length()+1;!1===this.isCoolDowned&&(this.scale.set(r,r,r),this.position.set((2*Math.random()-1)*n,(2*Math.random()-1)*n,(2*Math.random()-1)*n))}},{key:"over",value:function(){this.isOvered=!0}},{key:"coolDown",value:function(){this.isOvered=!1,this.isCoolDowned=!0}},{key:"returnFirstState",value:function(){this.sv.set(0,0,0),this.sa.set(0,0,0),this.isCoolDowned=!1}}])&&d(t.prototype,i),c}(r.Mesh);function x(e){return(x="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})(e)}function b(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function w(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)}}function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e,t){return!t||"object"!==x(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var P=new r.TextureLoader,T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&M(e,t)}(l,e);var t,i,o,a,s,c,u=(s=l,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=S(s);if(c){var n=S(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return _(this,e)});function l(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l);var t=new r.PlaneGeometry(36,36),i=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0},time2:{type:"f",value:0},tex:{type:"t",value:null},drawBrightOnly:{type:"f",value:0}},vertexShader:n(59751).Z,fragmentShader:n(71949).Z,transparent:!0});return(e=u.call(this,t,i)).position.z=40,e.isOver=!1,e}return t=l,(i=[{key:"loadTexture",value:(o=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P.loadAsync("/sketch-threejs/img/sketch/newyear2019/typo.png");case 2:this.material.uniforms.tex.value=e.sent;case 3:case"end":return e.stop()}}),e,this)})),a=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=o.apply(e,t);function a(e){b(i,n,r,a,s,"next",e)}function s(e){b(i,n,r,a,s,"throw",e)}a(void 0)}))},function(){return a.apply(this,arguments)})},{key:"render",value:function(e){this.material.uniforms.time.value+=e,!0===this.isOver&&(this.material.uniforms.time2.value+=e)}},{key:"over",value:function(e){this.material.uniforms.time2.value=0,this.isOver=!0}},{key:"coolDown",value:function(){this.isOver=!1}}])&&w(t.prototype,i),l}(r.Mesh);function R(e){return(R="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})(e)}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)}}function z(e,t){return(z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function L(e,t){return!t||"object"!==R(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function C(e){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var A=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&z(e,t)}(c,e);var t,i,o,a,s=(o=c,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=C(o);if(a){var n=C(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return L(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);var t=new r.InstancedBufferGeometry,i=new r.PlaneGeometry(1.2,1.2);t.copy(i);for(var o=new r.InstancedBufferAttribute(new Float32Array(1800),3),a=new r.InstancedBufferAttribute(new Float32Array(1800),3),u=new r.InstancedBufferAttribute(new Float32Array(1800),3),l=new r.InstancedBufferAttribute(new Float32Array(600),1),f=0;f<600;f++){var v=h().radians(360*Math.random()),d=50*Math.random()+25;o.setXYZ(f,Math.cos(v)*d,Math.sin(v)*d,250*Math.random()-150),f%2==1?a.setXYZ(f,.8,.1,.1):a.setXYZ(f,1,1,1),u.setXYZ(f,h().radians(360*Math.random()),h().radians(360*Math.random()),h().radians(360*Math.random())),l.setXYZ(f,Math.random())}t.setAttribute("iPosition",o),t.setAttribute("iColor",a),t.setAttribute("iRotate",u),t.setAttribute("iDelay",l);var p=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0}},vertexShader:n(58259).Z,fragmentShader:n(94914).Z,side:r.DoubleSide,transparent:!0});return(e=s.call(this,t,p,600)).name="InstanceMesh",e.frustumCulled=!1,e.isOver=!1,e}return t=c,(i=[{key:"render",value:function(e){!0===this.isOver&&(this.material.uniforms.time.value+=e)}},{key:"over",value:function(e){this.material.uniforms.time.value=0,this.isOver=!0}},{key:"coolDown",value:function(){this.isOver=!1}}])&&E(t.prototype,i),c}(r.InstancedMesh);function O(e){return(O="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})(e)}function D(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)}}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function k(e,t){return!t||"object"!==O(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function F(e){return(F=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&I(e,t)}(c,e);var t,i,o,a,s=(o=c,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=F(o);if(a){var n=F(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return k(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);var t=new r.SphereGeometry(100,128,128),i=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0}},vertexShader:n(37581).Z,fragmentShader:n(9628).Z,side:r.BackSide,depthWrite:!1});return(e=s.call(this,t,i)).position.y=16,e.isOvered=!1,e}return t=c,(i=[{key:"render",value:function(e){!0===this.isOvered?this.material.uniforms.time.value+=e:this.material.uniforms.time.value-=e,this.material.uniforms.time.value=h().clamp(this.material.uniforms.time.value,0,.8)}},{key:"over",value:function(){this.material.uniforms.time.value=0,this.isOvered=!0}},{key:"coolDown",value:function(){this.material.uniforms.time.value=.2,this.isOvered=!1}}])&&D(t.prototype,i),c}(r.Mesh);function U(e){return(U="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})(e)}function B(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)}}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(e,t){return!t||"object"!==U(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function H(e){return(H=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var V=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&G(e,t)}(c,e);var t,i,o,a,s=(o=c,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=H(o);if(a){var n=H(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return N(this,e)});function c(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);var i=new r.PlaneGeometry(2,2),o=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0},texture1:{type:"t",value:e},texture2:{type:"t",value:t},resolution:{type:"v2",value:new r.Vector2}},vertexShader:n(7799).Z,fragmentShader:n(35382).Z});return s.call(this,i,o)}return t=c,(i=[{key:"resize",value:function(e,t){this.material.uniforms.resolution.value.set(e,t)}},{key:"render",value:function(e){this.material.uniforms.time.value+=e}}])&&B(t.prototype,i),c}(r.Mesh);function W(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function Z(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)}}var q=document.querySelector(".l-page"),Y=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.os=t,this.btn=document.querySelector(".p-hold-button"),this.progress=document.querySelector(".p-hold-button__progress-in"),this.v=0,this.a=0,this.cv=new r.Vector2,this.ca=new r.Vector2,this.timeOver=0,this.state=0,this.isHolding=!1,this.isEnabled=!1}var t,n,i,o;return t=e,(n=[{key:"start",value:function(e){this.isEnabled=!0,"iOS"===this.os||"Android"===this.os?this.btn.classList.add("is-enabled","is-shown","is-smartphone"):(this.cv.set(e.x/2,e.y),this.btn.classList.add("is-pc"))}},{key:"on",value:function(e,t){var n=this;"iOS"===this.os||"Android"===this.os?(this.btn.addEventListener("touchstart",(function(e){e.preventDefault(),0===n.state&&(n.btn.classList.add("is-pressed"),n.btn.classList.remove("is-released"),n.isHolding=!0)}),{capture:!0}),this.btn.addEventListener("touchend",(function(e){e.preventDefault(),n.a=0,n.btn.classList.remove("is-pressed"),n.btn.classList.add("is-released"),n.isHolding=!1}),{capture:!0})):(e.addEventListener("mousedown",(function(t){t.preventDefault(),0===n.state&&(e.style="cursor: grabbing;",n.btn.classList.add("is-pressed"),n.btn.classList.remove("is-released"),n.isHolding=!0)}),{capture:!0}),window.addEventListener("mousemove",(function(r){!1===n.isHolding&&(e.style="cursor: grab;"),t.set(r.clientX,r.clientY)})),window.addEventListener("mouseup",(function(e){e.preventDefault(),n.a=0,n.btn.classList.remove("is-pressed"),n.btn.classList.add("is-released"),n.isHolding=!1}),{capture:!0}),e.addEventListener("mouseenter",(function(){n.btn.classList.add("is-shown"),n.btn.classList.remove("is-hidden")})),q.addEventListener("mouseleave",(function(){n.a=0,n.btn.classList.remove("is-shown","is-pressed","is-released"),n.btn.classList.add("is-hidden"),n.isHolding=!1})))}},{key:"render",value:(i=regeneratorRuntime.mark((function e(t,n){var r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==this.isEnabled){e.next=2;break}return e.abrupt("return");case 2:"iOS"!==this.os&&"Android"!==this.os&&(r=n.clone().sub(this.cv),this.ca.add(r.divideScalar(12)),i=this.ca.clone().multiplyScalar(-1).normalize().multiplyScalar(.28*this.ca.length()),this.ca.add(i),this.cv.add(this.ca),this.btn.style="transform: translate3d(".concat(this.cv.x+8,"px, ").concat(this.cv.y+8,"px, 0)")),0!==this.state&&2!==this.state||(!0===this.isHolding?this.a=(1.4*this.v+1)*t:this.a=-3*this.v*t,this.v+=this.a,this.v=h().clamp(this.v,0,100),this.progress.style="transform: skewX(-45deg) translateX(".concat(50-this.v,"%);")),e.t0=this.state,e.next=0===e.t0?7:1===e.t0?17:2===e.t0?25:33;break;case 7:if(!(this.v<100)){e.next=11;break}return e.abrupt("return",0);case 11:return this.state=1,this.a=0,this.btn.classList.remove("is-pressed"),this.btn.classList.add("is-released"),this.isHolding=!1,e.abrupt("return",1);case 17:if(this.timeOver+=t,!(this.timeOver<5)){e.next=22;break}return e.abrupt("return",2);case 22:return this.timeOver=0,this.state=2,e.abrupt("return",3);case 25:if(!(this.v>.5)){e.next=29;break}return e.abrupt("return",4);case 29:return this.state=0,this.v=0,this.a=0,e.abrupt("return",5);case 33:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=i.apply(e,t);function a(e){W(o,n,r,a,s,"next",e)}function s(e){W(o,n,r,a,s,"throw",e)}a(void 0)}))},function(e,t){return o.apply(this,arguments)})}])&&Z(t.prototype,n),e}();function X(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function K(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){X(o,r,i,a,s,"next",e)}function s(e){X(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Q(){return J.apply(this,arguments)}function J(){return(J=K(regeneratorRuntime.mark((function e(){var t,n,o,s,u,f,v,d,p,m,y,x,b,w,M,_,S,P,R,E,z,L,C,O,D,I,k,F;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new(a()),n=t.getOS().name,o=new r.Vector2,s=new r.Vector2,u=document.getElementById("canvas-webgl"),f=new r.WebGL1Renderer({alpha:!0,antialias:!0,canvas:u}),v=new r.Scene,d=new r.PerspectiveCamera,p=new r.Clock({autoStart:!1}),m=new i.L,y=new r.WebGLRenderTarget,x=new r.WebGLRenderTarget,b=new r.Scene,w=new r.OrthographicCamera(-1,1,1,-1,1,2),M=document.querySelector(".p-preloader"),_=null,S=new T,P=new A,R=new j,E=new V(y.texture,x.texture),z=new Y(n),L=function(){if(!1!==p.running){var e=p.getDelta();z.render(e,s).then((function(e){switch(e){case 1:_.over(),S.over(),P.over(),R.over();break;case 3:_.coolDown(),R.coolDown();break;case 5:_.returnFirstState(),S.coolDown(),P.coolDown()}})),_.render(e,z.v),S.render(e),P.render(e),R.render(e),_.material.uniforms.drawBrightOnly.value=0,S.material.uniforms.drawBrightOnly.value=0,P.visible=!0,R.visible=!0,f.setRenderTarget(y),f.render(v,d),_.material.uniforms.drawBrightOnly.value=1,S.material.uniforms.drawBrightOnly.value=1,P.visible=!1,R.visible=!1,f.setRenderTarget(x),f.render(v,d),E.render(e),f.setRenderTarget(null),f.render(b,w)}},C=function e(){L(),requestAnimationFrame(e)},O=function(){d.setFocalLength(50*Math.min(o.x/1200,1)*h().step(1,o.x/o.y)+50*Math.min(o.x/818,1)*h().step(1,o.y/o.x)),d.setViewOffset(1200,800,(o.x-1200)/-2,(o.y-800)/-2,o.x,o.y),d.updateProjectionMatrix()},D=function(){o.set(document.body.clientWidth,window.innerHeight),u.width=o.x,u.height=o.y,O(),f.setSize(o.x,o.y),y.setSize(o.x,o.y),x.setSize(o.x,o.y),E.resize(o.x,o.y)},I=function(){window.addEventListener("blur",(function(){p.stop(),z.isEnabled=!1})),window.addEventListener("focus",(function(){p.start(),z.isEnabled=!0})),window.addEventListener("resize",c()(D,100)),"iOS"===n||"Android"===n?window.addEventListener("deviceorientation",(function(e){var t=h().radians(.3*(90-e.beta)),n=h().radians(e.gamma)*Math.cos(h().radians(e.beta));_.rotate(t,n)})):(window.addEventListener("mousemove",(function(e){_.rotate(h().radians(-20*-(e.clientY/o.y*2-1)),h().radians(20*(e.clientX/o.x*2-1)))})),window.addEventListener("mouseout",(function(e){_.rotate(0,0)}))),z.on(u,s)},f.setClearColor(0,1),d.aspect=1.5,d.far=1e3,d.position.z=140,d.lookAt(new r.Vector3),e.next=33,m.loadAsync("/sketch-threejs/model/newyear2019/boar_head.obj");case 33:return k=e.sent,F=k.children[0].geometry,_=new g(F),e.next=38,S.loadTexture();case 38:return v.add(_),v.add(S),v.add(P),v.add(R),b.add(E),I(),D(),s.set(o.x/2,1.5*o.y),M.classList.add("is-hidden"),e.next=49,l()(200);case 49:z.start(o),p.start(),C();case 52:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},87420:function(e,t,n){"use strict";n.d(t,{Z:function(){return U}});var r=n(2212),i=n(38314),o=n.n(i),a=(n(29130),n(17393)),s=n.n(a);function c(e){return(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})(e)}function u(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)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=new r.Vector2,d=new r.Vector3,p=new r.Vector3,m=function(e){var t=e.fov*Math.PI/180,n=Math.abs(e.position.z*Math.tan(t/2)*2);v.set(n*e.aspect,n)},y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(c,e);var t,n,i,o,a=(i=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(i);if(o){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return f(this,e)});function c(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);var n=new r.BufferGeometry,i=new r.BufferAttribute(new Float32Array(300),3),o=new r.BufferAttribute(new Float32Array(300),3),u=new r.BufferAttribute(new Float32Array(100),1);m(e);for(var l=0;l<100;l++){i.setXYZ(l,v.x*(Math.random()-.5),v.y*(Math.random()-.5),0);var f=6*Math.random()+1,h=s().radians(360*Math.random());o.setXYZ(l,Math.cos(h)*(.1-.01*f),Math.sin(h)*(.1-.01*f),0),u.setX(l,f)}n.setAttribute("position",i),n.setAttribute("acceralation",o),n.setAttribute("size",u);var d=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute float size;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvoid main() {\n  // coordinate transformation\n  vec4 mvPosition = viewMatrix * modelMatrix * vec4(position, 1.0);\n\n  gl_Position = projectionMatrix * mvPosition;\n  gl_PointSize = 5.0 + size;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nvoid main() {\n  // Convert PointCoord to the other vec2 has a range from -1.0 to 1.0.\n  vec2 p = gl_PointCoord * 2.0 - 1.0;\n\n  // Draw circle\n  float radius = length(p);\n  float opacity = (1.0 - smoothstep(0.9, 1.0, radius));\n\n  vec3 color = vec3(0.1);\n\n  gl_FragColor = vec4(color, opacity);\n}\n",transparent:!0,depthTest:!1});return(t=a.call(this,n,d)).name="NodePoints",t}return t=c,(n=[{key:"start",value:function(){}},{key:"update",value:function(e,t){m(t);for(var n=0;n<100;n++)d.set(this.geometry.attributes.position.getX(n),this.geometry.attributes.position.getY(n),this.geometry.attributes.position.getZ(n)),p.set(this.geometry.attributes.acceralation.getX(n),this.geometry.attributes.acceralation.getY(n),this.geometry.attributes.acceralation.getZ(n)),d.add(p),d.x>=.6*v.x?d.x=.6*-v.x:d.x<-.6*v.x&&(d.x=.6*v.x),d.y>=.6*v.y?d.y=.6*-v.y:d.y<-.6*v.y&&(d.y=.6*v.y),this.geometry.attributes.position.setXYZ(n,d.x,d.y,d.z),this.geometry.attributes.acceralation.setXYZ(n,p.x,p.y,p.z);this.geometry.attributes.position.needsUpdate=!0,this.geometry.attributes.acceralation.needsUpdate=!0}}])&&u(t.prototype,n),c}(r.Points);function g(e){return(g="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})(e)}function x(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)}}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(e,t){return!t||"object"!==g(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function M(e){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _=new r.Vector2,S=new r.Vector3,P=new r.Vector3,T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=M(i);if(o){var n=M(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return w(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=new r.BufferGeometry,n=new r.BufferAttribute(new Float32Array(6e3),3),i=new r.BufferAttribute(new Float32Array(2e3),1),o=[],c=0;c<2e3;c++)o.push(c);t.setAttribute("position",n),t.setAttribute("opacity",i),t.setIndex(new r.BufferAttribute(new Uint16Array(o),1));var u=new r.RawShaderMaterial({vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute float opacity;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying float vOpacity;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  vOpacity = opacity;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nvarying float vOpacity;\n\nvoid main() {\n  vec3 color = vec3(0.1);\n\n  gl_FragColor = vec4(color, vOpacity);\n}\n",transparent:!0,depthTest:!1,linewidth:1});return(e=a.call(this,t,u)).name="NodeLine",e}return t=s,(n=[{key:"start",value:function(){}},{key:"update",value:function(e,t){!function(e){var t=e.fov*Math.PI/180,n=Math.abs(e.position.z*Math.tan(t/2)*2);_.set(n*e.aspect,n)}(t);for(var n=0,r=0;r<e.geometry.attributes.position.count;r++)for(var i=r+1;i<e.geometry.attributes.position.count;i++){S.set(e.geometry.attributes.position.getX(r),e.geometry.attributes.position.getY(r),e.geometry.attributes.position.getZ(r)),P.set(e.geometry.attributes.position.getX(i),e.geometry.attributes.position.getY(i),e.geometry.attributes.position.getZ(i));var o=S.distanceTo(P);o<.15*_.y&&(this.geometry.attributes.position.setXYZ(2*n,S.x,S.y,S.z),this.geometry.attributes.position.setXYZ(2*n+1,P.x,P.y,P.z),this.geometry.attributes.opacity.setXYZ(2*n,3-o),this.geometry.attributes.opacity.setXYZ(2*n+1,3-o),n++)}for(var a=2*(n+1);a<this.geometry.attributes.position.count;a++)this.geometry.attributes.position.setXYZ(a,0,0,0);this.geometry.attributes.position.needsUpdate=!0,this.geometry.attributes.opacity.needsUpdate=!0}}])&&x(t.prototype,n),s}(r.LineSegments);function R(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}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)}}var z,L,C=document.getElementById("canvas-webgl"),A=new r.WebGL1Renderer({alpha:!0,antialias:!0,canvas:C}),O=new r.Scene,D=new r.PerspectiveCamera,I=(new r.Vector2,new r.Clock({autoStart:!1})),k=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i,o;return t=e,(n=[{key:"init",value:(i=regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:A.setClearColor(16762368,1),D.aspect=1.5,D.far=1e3,D.setFocalLength(50),D.position.set(0,0,50),D.lookAt(new r.Vector3),z=new y(D),L=new T,O.add(z),O.add(L),this.resize(t);case 11:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=i.apply(e,t);function a(e){R(o,n,r,a,s,"next",e)}function s(e){R(o,n,r,a,s,"throw",e)}a(void 0)}))},function(e){return o.apply(this,arguments)})},{key:"start",value:function(){this.play()}},{key:"stop",value:function(){this.pause()}},{key:"play",value:function(){I.start()}},{key:"pause",value:function(){I.stop()}},{key:"update",value:function(){if(!1!==I.running){var e=I.getDelta();z.update(e,D),L.update(z,D),A.render(O,D)}}},{key:"resize",value:function(e){C.width=e.x,C.height=e.y,function(e){D.aspect=e.x/e.y,D.updateProjectionMatrix()}(e),A.setSize(e.x,e.y)}}])&&E(t.prototype,n),e}();function F(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function j(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){F(o,r,i,a,s,"next",e)}function s(e){F(o,r,i,a,s,"throw",e)}a(void 0)}))}}function U(){return B.apply(this,arguments)}function B(){return(B=j(regeneratorRuntime.mark((function e(){var t,n,i,a,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new k,n=new r.Vector2,i=document.querySelector(".p-preloader"),a=function(){n.set(document.body.clientWidth,window.innerHeight),t.resize(n)},s=function e(){t.update(),requestAnimationFrame(e)},window.addEventListener("resize",o()(a,100)),a(),e.next=10,t.init(n);case 10:i.classList.add("is-hidden"),t.start(),s();case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},90339:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=(n(17393),function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0}},this.obj}var t,o;return t=e,(o=[{key:"createObj",value:function(){var e=new i.SphereGeometry(1e4,128,128),t=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(67127).Z,fragmentShader:n(17203).Z,side:i.BackSide});this.obj=new i.Mesh(e,t)}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&r(t.prototype,o),e}())},46384:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}});var i=n(2212),o=n(17393),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.durationTransform=.8,this.uniforms={time:{type:"f",value:0},timeTransform:{type:"f",value:this.durationTransform},durationTransform:{type:"f",value:this.durationTransform},prevIndex:{type:"f",value:1},nextIndex:{type:"f",value:0}},this.isTransform=!1,this.obj,this.objWire=null,this.objPoints=null}var t,a;return t=e,(a=[{key:"createObj",value:function(e){var t={font:e,size:300,height:0,curveSegments:1},r=[new i.TextGeometry("HELLO",t),new i.TextGeometry("WORLD",t)],o=new i.BufferGeometry,a=0;r.map((function(e,t){e.center(),e.attributes.position.count>a&&(a=e.attributes.position.count)})),r.map((function(e,t){var n=t>0?t+1:"";if(e.attributes.position.count<a){for(var r=e.attributes.position.array,s=[],c=[],u=0;u<3*a;u+=3)if(u<(3*a-r.length)/2)s[u]=700*(2*Math.random()-1),s[u+1]=250*(2*Math.random()-1),s[u+2]=250*(2*Math.random()-1),c[u/3]=0;else if(u>=r.length+(3*a-r.length)/2)s[u]=700*(2*Math.random()-1),s[u+1]=250*(2*Math.random()-1),s[u+2]=250*(2*Math.random()-1),c[u/3]=0;else{var l=u-(3*a-r.length)/2;s[u]=e.attributes.position.array[l],s[u+1]=e.attributes.position.array[l+1],s[u+2]=e.attributes.position.array[l+2],c[u/3]=1}o.setAttribute("position".concat(n),new i.Float32BufferAttribute(s,3,1)),o.setAttribute("opacity".concat(n),new i.Float32BufferAttribute(c,1,1))}else{var f=[];for(u=0;u<a;u++)f[u]=1;o.setAttribute("position".concat(n),e.attributes.position),o.setAttribute("opacity".concat(n),new i.Float32BufferAttribute(f,1,1)),o.setAttribute("normal",e.attributes.normal),o.setAttribute("uv",e.attributes.uv),o.setIndex(e.index)}}));var s=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(58764).Z,fragmentShader:n(55643).Z,depthWrite:!1,transparent:!0}),c=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(58764).Z,fragmentShader:n(85530).Z,depthWrite:!1,transparent:!0,wireframe:!0}),u=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(99886).Z,fragmentShader:n(37094).Z,depthWrite:!1,transparent:!0});this.obj=new i.Mesh(o,s),this.objWire=new i.Mesh(o,c),this.objPoints=new i.Points(o,u)}},{key:"transform",value:function(){this.isTransform=!0,this.uniforms.timeTransform.value=0,this.uniforms.prevIndex.value=this.uniforms.prevIndex.value<1?this.uniforms.prevIndex.value+1:0,this.uniforms.nextIndex.value=this.uniforms.nextIndex.value<1?this.uniforms.nextIndex.value+1:0}},{key:"render",value:function(e){this.uniforms.time.value+=e,this.isTransform&&(this.uniforms.timeTransform.value=o.clamp(this.uniforms.timeTransform.value+e,0,this.durationTransform)),this.uniforms.timeTransform.value===this.durationTransform&&(this.isTransform=!1)}}])&&r(t.prototype,a),e}()},49363:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(2212),i=n(38314),o=n(46384).Z,a=n(90339).Z;function s(){var e=new r.Vector2,t=document.getElementById("canvas-webgl"),n=new r.WebGL1Renderer({alpha:!0,antialias:!0,canvas:t}),s=new r.Scene,c=new r.PerspectiveCamera,u=new r.Clock,l=new r.FontLoader;c.far=5e4,c.setFocalLength(24);var f=new o,h=new a,v=function e(){var t;t=u.getDelta(),f.render(t),n.render(s,c),requestAnimationFrame(e)},d=function(){e.set(document.body.clientWidth,window.innerHeight),t.width=e.x,t.height=e.y,c.aspect=e.x/e.y,c.updateProjectionMatrix(),n.setSize(e.x,e.y)};l.load("https://threejs.org/examples/fonts/helvetiker_bold.typeface.json",(function(e){f.createObj(e),h.createObj(),s.add(f.objWire),s.add(f.objPoints),s.add(h.obj),n.setClearColor(1118481,1),c.position.set(0,0,1e3),c.lookAt(new r.Vector3),u.start(),window.addEventListener("resize",i(d,1e3)),window.addEventListener("click",(function(){f.transform()})),d(),v()}))}},52262:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}});var i=n(2212),o=n(46365).Z,a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},velocity:{type:"t",value:null},acceleration:{type:"t",value:null}},this.physicsRenderer=null,this.vectorTouchMove=new i.Vector2(0,0),this.vectorTouchMoveDiff=new i.Vector2(0,0),this.obj}var t,a;return t=e,(a=[{key:"init",value:function(e){this.obj=this.createObj(e)}},{key:"createObj",value:function(e){for(var t=window.innerWidth>768?200:150,r=new i.OctahedronGeometry(100,t),a=r.attributes.position.array,s=[],c=0;c<a.length;c+=3)s[c+0]=a[c+0]+10*(2*Math.random()-1),s[c+1]=a[c+1]+10*(2*Math.random()-1),s[c+2]=a[c+2]+10*(2*Math.random()-1);return this.physicsRenderer=new o(n(30231).Z,n(31180).Z,n(50474).Z,n(60791).Z),this.physicsRenderer.init(e,s),this.physicsRenderer.mergeAUniforms({vTouchMove:{type:"v2",value:this.vectorTouchMoveDiff}}),this.uniforms.velocity.value=this.physicsRenderer.getCurrentVelocity(),this.uniforms.acceleration.value=this.physicsRenderer.getCurrentAcceleration(),r.setAttribute("uvVelocity",this.physicsRenderer.getBufferAttributeUv()),new i.Points(r,new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(8924).Z,fragmentShader:n(79511).Z,transparent:!0,depthWrite:!1,blending:i.AdditiveBlending}))}},{key:"render",value:function(e,t){this.physicsRenderer.render(e,t),this.uniforms.time.value+=t}},{key:"touchStart",value:function(e){this.vectorTouchMove.copy(e)}},{key:"touchMove",value:function(e){this.vectorTouchMoveDiff.set(e.x-this.vectorTouchMove.x,e.y-this.vectorTouchMove.y),this.vectorTouchMove.copy(e)}},{key:"touchEnd",value:function(){this.vectorTouchMove.set(0,0),this.vectorTouchMoveDiff.set(0,0)}},{key:"resize",value:function(){this.physicsRenderer&&this.physicsRenderer.resize()}}])&&r(t.prototype,a),e}()},8642:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={texture1:{type:"t",value:t},texture2:{type:"t",value:n}},this.obj=this.createObj()}var t,o;return t=e,(o=[{key:"createObj",value:function(){return new i.Mesh(new i.PlaneGeometry(2,2),new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(98640).Z,fragmentShader:n(58113).Z}))}}])&&r(t.prototype,o),e}()},86649:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={resolution:{type:"v2",value:new i.Vector2(document.body.clientWidth,window.innerHeight)},direction:{type:"v2",value:new i.Vector2(n,r)},texture:{type:"t",value:t}},this.obj=this.createObj()}var t,o;return t=e,(o=[{key:"createObj",value:function(){return new i.Mesh(new i.PlaneGeometry(2,2),new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(98640).Z,fragmentShader:n(143).Z}))}},{key:"resize",value:function(e,t){this.uniforms.resolution.value.set(e,t)}}])&&r(t.prototype,o),e}()},14683:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={minBright:{type:"f",value:.3},texture:{type:"t",value:t}},this.obj=this.createObj()}var t,o;return t=e,(o=[{key:"createObj",value:function(){return new i.Mesh(new i.PlaneGeometry(2,2),new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(98640).Z,fragmentShader:n(29336).Z}))}}])&&r(t.prototype,o),e}()},73552:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(2212),i=n(38314),o=n(89813).Z,a=n(14683).Z,s=n(86649).Z,c=n(8642).Z,u=n(52262).Z;function l(){var e=document.getElementById("canvas-webgl"),t=new r.WebGL1Renderer({antialias:!1,canvas:e}),n=new r.WebGLRenderTarget(document.body.clientWidth,window.innerHeight),l=new r.WebGLRenderTarget(document.body.clientWidth,window.innerHeight),f=new r.WebGLRenderTarget(document.body.clientWidth,window.innerHeight),h=new r.Scene,v=new r.Scene,d=new r.OrthographicCamera(-1,1,1,-1,0,1),p=new r.PerspectiveCamera(45,document.body.clientWidth/window.innerHeight,1,1e4),m=new r.Clock,y=new r.Vector2,g=new r.Vector2,x=new r.Vector2,b=!1,w=new u,M=new a(n.texture),_=new s(l.texture,1,0),S=new s(f.texture,0,1),P=new c(n.texture,l.texture);w.init(t);var T=function(){var r=document.body.clientWidth,i=window.innerHeight;e.width=r,e.height=i,p.aspect=r/i,p.updateProjectionMatrix(),_.resize(r,i),S.resize(r,i),n.setSize(r,i),l.setSize(r,i),f.setSize(r,i),t.setSize(r,i)},R=function(e){b=!0,w.touchStart(y)},E=function(e){b&&w.touchMove(g)},z=function(e){b=!1,w.touchEnd()};t.setSize(document.body.clientWidth,window.innerHeight),t.setClearColor(1118481,1),p.position.set(0,0,1e3),p.lookAt(new r.Vector3),v.add(w.obj),window.addEventListener("resize",i((function(){T()})),1e3),e.addEventListener("mousedown",(function(e){e.preventDefault(),y.set(e.clientX,e.clientY),o(y),R()})),e.addEventListener("mousemove",(function(e){e.preventDefault(),g.set(e.clientX,e.clientY),o(g),E()})),e.addEventListener("mouseup",(function(e){e.preventDefault(),x.set(e.clientX,e.clientY),o(x),z()})),e.addEventListener("touchstart",(function(e){e.preventDefault(),y.set(e.touches[0].clientX,e.touches[0].clientY),o(y),R(e.touches[0].clientX,e.touches[0].clientY)})),e.addEventListener("touchmove",(function(e){e.preventDefault(),g.set(e.touches[0].clientX,e.touches[0].clientY),o(g),E()})),e.addEventListener("touchend",(function(e){e.preventDefault(),o(x),x.set(e.changedTouches[0].clientX,e.changedTouches[0].clientY),z()})),window.addEventListener("mouseout",(function(){event.preventDefault(),x.set(0,0),b=!1,w.touchEnd()})),T(),function e(){var r;r=m.getDelta(),w.render(t,r),t.setRenderTarget(n),t.render(v,p),h.add(M.obj),t.setRenderTarget(l),t.render(h,p),h.remove(M.obj),h.add(_.obj),t.setRenderTarget(f),t.render(h,p),h.remove(_.obj),h.add(S.obj),t.setRenderTarget(l),t.render(h,p),h.remove(S.obj),h.add(P.obj),t.setRenderTarget(null),t.render(h,d),h.remove(P.obj),requestAnimationFrame(e)}()}},99063:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=(n(17393),function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},addH:{type:"f",value:t+.3}},this.obj}var t,o;return t=e,(o=[{key:"createObj",value:function(){var e=new i.SphereGeometry(200,128,128),t=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(74766).Z,fragmentShader:n(48448).Z,side:i.BackSide});this.obj=new i.Mesh(e,t)}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&r(t.prototype,o),e}())},71773:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}});var i=n(2212),o=n(17393),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0}},this.obj}var t,a;return t=e,(a=[{key:"createObj",value:function(){var e=new i.InstancedBufferGeometry,t=new i.BoxGeometry(2,2,20,2,2,6);e.copy(t);for(var r=new i.InstancedBufferAttribute(new Float32Array(120),3),a=new i.InstancedBufferAttribute(new Float32Array(120),3),s=new i.InstancedBufferAttribute(new Float32Array(120),3),c=new i.InstancedBufferAttribute(new Float32Array(40),1),u=0;u<40;u++){var l=o.radians(30*(2*Math.random()-1)),f=o.radians(180*(2*Math.random()-1)),h=o.spherical(l,f,12*Math.random()+65);r.setXYZ(u,h[0],h[1],h[2]),a.setXYZ(u,0,f,-l),s.setXYZ(u,1,.2*Math.random()+1,.4*Math.random()+.8),c.setXYZ(u,.05*Math.random()+.01)}e.setAttribute("instancePosition",r),e.setAttribute("instanceRotate",a),e.setAttribute("instanceScale",s),e.setAttribute("speed",c);var v=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(23234).Z,fragmentShader:n(82636).Z});this.obj=new i.InstancedMesh(e,v,40),this.obj.frustumCulled=!1}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&r(t.prototype,a),e}()},89555:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}});var i=n(2212),o=n(17393),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolution=t,this.vTouchStart=new i.Vector2,this.vPrev=new i.Vector2,this.v=new i.Vector2,this.a=new i.Vector2,this.anchor=new i.Vector2,this.isTouched=!1}var t,n;return t=e,(n=[{key:"touchStart",value:function(e){e.touches||e.preventDefault(),this.vPrev.copy(this.v),this.a.set(0,0),this.vTouchStart.set(e.touches?e.touches[0].clientX:e.clientX,e.touches?e.touches[0].clientY:e.clientY),this.isTouched=!0}},{key:"touchMove",value:function(e){e.preventDefault();var t=e.touches?e.touches[0].clientX:e.clientX,n=e.touches?e.touches[0].clientY:e.clientY;!1!==this.isTouched&&this.anchor.set((t-this.vTouchStart.x)/(this.resolution.x/200)+this.vPrev.x,o.clamp((n-this.vTouchStart.y)/(this.resolution.y/200)+this.vPrev.y,-90,90))}},{key:"touchEnd",value:function(e){this.isTouched=!1}},{key:"render",value:function(){this.a.set((this.anchor.x-this.v.x)/10,(this.anchor.y-this.v.y)/10),this.v.add(this.a)}}])&&r(t.prototype,n),e}()},60137:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return s}});var i=n(2212),o=n(17393),a=n(91685),s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},addH1:{type:"f",value:t},addH2:{type:"f",value:t-.5}},this.obj}var t,s;return t=e,(s=[{key:"createObj",value:function(){for(var e=new a(Math.random),t=new i.OctahedronGeometry(50,30),r=0;r<t.attributes.position.count;r++){var s=new i.Vector3(t.attributes.position.getX(r),t.attributes.position.getY(r),t.attributes.position.getZ(r)),c=e.noise4D(s.x/72,s.y/64,s.z/72,1),u=e.noise4D(s.x/28,s.y/24,s.z/28,1),l=e.noise4D(s.x/4,s.y/4,s.z/4,1),f=(2*o.smoothstep(-.05,.05,c+u)-1)*(2+2*o.smoothstep(.1,.2,Math.pow(c+u,2))+6*o.smoothstep(.6,.7,Math.pow(c+u,2))+.2*l);s.add(s.clone().normalize().multiplyScalar(f)),t.attributes.position.setXYZ(r,s.x,s.y,s.z)}var h=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(59870).Z,fragmentShader:n(64557).Z});this.obj=new i.Mesh(t,h)}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&r(t.prototype,s),e}()},53165:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=(n(17393),function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},addH:{type:"f",value:t}},this.obj}var t,o;return t=e,(o=[{key:"createObj",value:function(){var e=new i.OctahedronGeometry(50,30),t=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(78081).Z,fragmentShader:n(76161).Z,transparent:!0});this.obj=new i.Mesh(e,t)}},{key:"render",value:function(e){this.uniforms.time.value+=e}}])&&r(t.prototype,o),e}())},13532:function(e,t,n){"use strict";function r(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,c,"next",e)}function c(e){r(a,i,o,s,c,"throw",e)}s(void 0)}))}}n.d(t,{Z:function(){return v}});var o=n(2212),a=n(38314),s=n(17393),c=n(60137).Z,u=n(53165).Z,l=n(71773).Z,f=n(99063).Z,h=n(89555).Z;function v(){return d.apply(this,arguments)}function d(){return(d=i(regeneratorRuntime.mark((function e(){var t,n,r,i,v,d,p,m,y,g,x,b,w,M,_,S,P;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new o.Vector2,n=document.getElementById("canvas-webgl"),r=new o.WebGL1Renderer({alpha:!0,antialias:!0,canvas:n}),i=new o.Scene,v=new o.PerspectiveCamera,d=new o.Clock({autoStart:!1}),p=Math.random(),m=new c(p),y=new u(p),g=new l,x=new f(p),b=new o.Group,w=new h(t),M=function(){var e=d.getDelta();w.render(t),b.rotation.set(s.radians(w.v.y),s.radians(w.v.x),0),m.render(e),y.render(e),g.render(e),x.render(e),r.render(i,v)},_=function e(){M(),requestAnimationFrame(e)},S=function(){v.aspect=t.x/t.y,v.updateProjectionMatrix(),v.setFocalLength(15*s.step(1,t.y/t.x)+35)},P=function(){t.set(document.body.clientWidth,window.innerHeight),n.width=t.x,n.height=t.y,S(),r.setSize(t.x,t.y)},T=void 0,R=void 0,E=void 0,T=function(e){w.touchStart(e)},R=function(e){w.touchMove(e)},E=function(e){w.touchEnd(e)},n.addEventListener("mousedown",T,{passive:!1}),window.addEventListener("mousemove",R,{passive:!1}),window.addEventListener("mouseup",E),n.addEventListener("touchstart",T,{passive:!1}),window.addEventListener("touchmove",R,{passive:!1}),window.addEventListener("touchend",E),window.addEventListener("resize",a(P,1e3)),P(),r.setClearColor(15658734,1),v.far=1e3,v.setFocalLength(15*s.step(1,t.y/t.x)+35),v.position.set(0,0,300),v.lookAt(new o.Vector3(0,0,0)),m.createObj(),y.createObj(),g.createObj(),x.createObj(),b.add(m.obj),b.add(y.obj),b.add(g.obj),i.add(b),i.add(x.obj),d.start(),_(),e.abrupt("return");case 37:case"end":return e.stop()}var T,R,E}),e)})))).apply(this,arguments)}},65331:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},colorH:{type:"f",value:0},noiseRange:{type:"f",value:0}},this.obj=this.createObj(),this.obj.visible=!1}var t,o;return t=e,(o=[{key:"createObj",value:function(){return new i.Mesh(new i.PlaneGeometry(1500,1500),new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(52402).Z,fragmentShader:n(29014).Z,transparent:!0}))}},{key:"show",value:function(e){this.uniforms.time.value=0,this.uniforms.colorH.value=Math.random(),this.uniforms.noiseRange.value=3*Math.random(),this.obj.visible=!0,this.obj.position.set((2*Math.random()-1)*window.innerWidth,(2*Math.random()-1)*window.innerHeight,0)}},{key:"render",value:function(e){this.obj.visible&&(this.uniforms.time.value+=e,this.obj.position.z-=3)}}])&&r(t.prototype,o),e}()},18388:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(2212),i=n(38314),o=n(89813).Z,a=n(65331).Z;function s(){for(var e=document.getElementById("canvas-webgl"),t=new r.WebGL1Renderer({antialias:!1,canvas:e,alpha:!0}),n=new r.Scene,s=new r.PerspectiveCamera(90,document.body.clientWidth/window.innerHeight,1,1e4),c=new r.Clock,u=new r.Vector2,l=new r.Vector2,f=new r.Vector2,h=0,v=0,d=[],p=0;p<20;p++)d[p]=new a,n.add(d[p].obj);var m=function(){e.width=document.body.clientWidth,e.height=window.innerHeight,s.aspect=document.body.clientWidth/window.innerHeight,s.updateProjectionMatrix(),t.setSize(document.body.clientWidth,window.innerHeight)};t.setSize(document.body.clientWidth,window.innerHeight),t.setClearColor(15856113,1),s.position.set(0,0,1e3),s.lookAt(new r.Vector3),window.addEventListener("resize",i((function(){m()})),1e3),e.addEventListener("mousedown",(function(e){e.preventDefault(),u.set(e.clientX,e.clientY),o(u)})),document.addEventListener("mousemove",(function(e){e.preventDefault(),l.set(e.clientX,e.clientY),o(l)})),document.addEventListener("mouseup",(function(e){e.preventDefault(),f.set(e.clientX,e.clientY),o(f)})),e.addEventListener("touchstart",(function(e){e.preventDefault(),u.set(e.touches[0].clientX,e.touches[0].clientY),o(u),e.touches[0].clientX,e.touches[0].clientY})),e.addEventListener("touchmove",(function(e){e.preventDefault(),l.set(e.touches[0].clientX,e.touches[0].clientY),o(l)})),e.addEventListener("touchend",(function(e){e.preventDefault(),f.set(e.changedTouches[0].clientX,e.changedTouches[0].clientY),o(f)})),m(),function e(){(function(){var e=c.getDelta();!function(e){(v+=e)>1&&(d[h].show(),h=h+1>=d.length-1?0:h+1,v=0)}(e);for(var r=0;r<d.length;r++)d[r].render(e);t.render(n,s)})(),requestAnimationFrame(e)}()}},66327:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return s}});var i=n(67084).Z,o=n(84544).Z,a=n(80767).Z,s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.velocity=[0,0,0],this.acceleration=[0,0,0],this.anchor=[0,0,0],this.instances=36,this.core=new o(this.instances),this.wire=new a(this.instances)}var t,n;return t=e,(n=[{key:"updateRotation",value:function(){i.applyHook(this.velocity,this.acceleration,this.anchor,0,.02),i.applyDrag(this.acceleration,.3),i.updateVelocity(this.velocity,this.acceleration,1),this.core.uniforms.rotate.value=this.velocity[0],this.wire.uniforms.rotate.value=this.velocity[0]}},{key:"rotate",value:function(e){e&&(this.anchor[0]-=.05*e)}},{key:"picked",value:function(e){this.core.uniforms.pickedId.value=e,this.wire.uniforms.pickedId.value=e,e<this.instances&&e>-1?document.body.classList.add("is-picked"):document.body.classList.remove("is-picked")}},{key:"render",value:function(e){this.core.uniforms.time.value+=e,this.wire.render(e),this.updateRotation()}}])&&r(t.prototype,n),e}()},84544:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}});var i=n(2212),o=n(17393),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},rotate:{type:"f",value:0},pickedId:{type:"f",value:-1}},this.instances=t,this.obj=this.createObj()}var t,a;return t=e,(a=[{key:"createObj",value:function(){var e=new i.InstancedBufferGeometry,t=new i.OctahedronGeometry(30,4);e.copy(t);for(var r=new i.InstancedBufferAttribute(new Float32Array(this.instances),1),a=new i.InstancedBufferAttribute(new Float32Array(3*this.instances),3),s=new i.InstancedBufferAttribute(new Float32Array(this.instances),1),c=new i.InstancedBufferAttribute(new Float32Array(this.instances),1),u=0;u<this.instances;u++)r.setXYZ(u,o.radians(u/this.instances*360)),a.setXYZ(u,u/this.instances-.25,.2,.9),s.setXYZ(u,Math.random()),c.setXYZ(u,.5*(Math.random()+1));return e.setAttribute("radian",r),e.setAttribute("hsv",a),e.setAttribute("noiseDiff",s),e.setAttribute("speed",c),new i.InstancedMesh(e,new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(58754).Z,fragmentShader:n(54864).Z,transparent:!0}),this.instances)}}])&&r(t.prototype,a),e}()},75363:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mirrorCamera=new i.PerspectiveCamera(24,document.body.clientWidth/window.innerHeight,1,15e3),this.mirrorRender=new i.WebGLRenderTarget(document.body.clientWidth,window.innerHeight),this.textureMatrix=new i.Matrix4,this.uniforms={time:{type:"f",value:0},texture:{type:"t",value:this.mirrorRender.texture},textureMatrix:{type:"m4",value:this.textureMatrix},mirrorPosition:{type:"v3",value:this.mirrorCamera.position}},this.mirrorCamera.up.set(0,-1,0),this.obj=this.createObj()}var t,o;return t=e,(o=[{key:"createObj",value:function(){return new i.Mesh(new i.PlaneGeometry(4e3,4e3),new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(84450).Z,fragmentShader:n(71955).Z,transparent:!0}))}},{key:"updateTextureMatrix",value:function(){this.textureMatrix.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1),this.textureMatrix.multiply(this.mirrorCamera.projectionMatrix),this.textureMatrix.multiply(this.mirrorCamera.matrixWorldInverse)}},{key:"render",value:function(e,t,n){this.uniforms.time.value+=n,this.updateTextureMatrix(),this.obj.visible=!1,e.setRenderTarget(this.mirrorRender),e.render(t,this.mirrorCamera),this.obj.visible=!0}},{key:"resize",value:function(){this.mirrorCamera.aspect=document.body.clientWidth/window.innerHeight,this.mirrorCamera.updateProjectionMatrix(),this.mirrorRender.setSize(document.body.clientWidth,window.innerHeight)}}])&&r(t.prototype,o),e}()},47960:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var t=new i.WebGLCubeRenderTarget(128);this.cubeCamera=new i.CubeCamera(1,15e3,t),this.instances=6,this.uniforms={time:{type:"f",value:0}},this.obj=this.createObj(),this.obj.rotation.set(0,.3*Math.PI,0)}var t,o;return t=e,(o=[{key:"createObj",value:function(){var e=new i.InstancedBufferGeometry,t=new i.BoxGeometry(40,1,10);e.copy(t);for(var r=new i.InstancedBufferAttribute(new Float32Array(this.instances),1),o=new i.InstancedBufferAttribute(new Float32Array(this.instances),1),a=0,s=this.instances;a<s;a++)r.setXYZ(a,150*(a+1)+200),o.setXYZ(a,120*(a-(this.instances-1)/2));return e.setAttribute("height",r),e.setAttribute("offsetX",o),new i.InstancedMesh(e,new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(8757).Z,fragmentShader:n(69805).Z}),this.instances)}},{key:"render",value:function(e,t,n){this.uniforms.time.value+=n,this.obj.visible=!1,this.cubeCamera.update(e,t),this.obj.visible=!0}}])&&r(t.prototype,o),e}()},80767:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}});var i=n(2212),o=n(17393),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.size=120,this.baseGeometry=new i.BoxGeometry(this.size,this.size,this.size),this.uniforms={time:{type:"f",value:0},rotate:{type:"f",value:0},pickedId:{type:"f",value:-1}},this.instances=t,this.obj=this.createObj(),this.objPicked=this.createObjPicked()}var t,a;return t=e,(a=[{key:"createObj",value:function(){var e=new i.InstancedBufferGeometry;e.copy(this.baseGeometry);for(var t=new i.InstancedBufferAttribute(new Float32Array(this.instances),1),r=new i.InstancedBufferAttribute(new Float32Array(3*this.instances),3),a=new i.InstancedBufferAttribute(new Float32Array(this.instances),1),s=0;s<this.instances;s++)t.setXYZ(s,o.radians(s/this.instances*360)),r.setXYZ(s,s/this.instances-.25,.2,1),a.setXYZ(s,0);return e.setAttribute("radian",t),e.setAttribute("hsv",r),e.setAttribute("timeHover",a),new i.InstancedMesh(e,new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(24192).Z,fragmentShader:n(46060).Z,depthWrite:!1,transparent:!0,side:i.DoubleSide}),this.instances)}},{key:"createObjPicked",value:function(){var e=new i.InstancedBufferGeometry;e.copy(this.baseGeometry);for(var t=new i.InstancedBufferAttribute(new Float32Array(this.instances),1),r=new i.InstancedBufferAttribute(new Float32Array(3*this.instances),3),a=new i.Color,s=new i.InstancedBufferAttribute(new Float32Array(this.instances),1),c=0;c<this.instances;c++)t.setXYZ(c,o.radians(c/this.instances*360)),a.setHex(c),r.setXYZ(c,a.r,a.g,a.b),s.setXYZ(c,0);return e.setAttribute("radian",t),e.setAttribute("pickedColor",r),e.setAttribute("timeHover",s),new i.InstancedMesh(e,new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(22984).Z,fragmentShader:n(66977).Z}),this.instances)}},{key:"render",value:function(e){var t=this.obj.geometry.attributes.timeHover,n=this.objPicked.geometry.attributes.timeHover;this.uniforms.time.value+=e;for(var r=0;r<t.array.length;r++)this.uniforms.pickedId.value==r?(t.array[r]=Math.min(t.array[r]+e,.3),n.array[r]=Math.min(n.array[r]+e,.3)):(t.array[r]=Math.max(t.array[r]-e,0),n.array[r]=Math.max(n.array[r]-e,0));t.needsUpdate=!0,n.needsUpdate=!0}}])&&r(t.prototype,a),e}()},39990:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(2212),i=n(38314),o=n(66327).Z,a=n(75363).Z,s=n(47960).Z;function c(){var e=document.getElementById("canvas-webgl"),t=new r.WebGL1Renderer({antialias:!0,canvas:e}),n=new r.WebGLRenderTarget(document.body.clientWidth,window.innerHeight),c=new r.Scene,u=new r.Scene,l=new r.PerspectiveCamera(24,document.body.clientWidth/window.innerHeight,1,15e3),f=new r.Clock,h=new r.Vector2,v=new r.Vector2,d=new r.Vector2,p=new r.Vector2,m=new Uint8Array(4),y=!1,g=new o,x=new a,b=new s,w=function(){e.width=document.body.clientWidth,e.height=window.innerHeight,l.aspect=document.body.clientWidth/window.innerHeight,l.updateProjectionMatrix(),t.setSize(document.body.clientWidth,window.innerHeight),n.setSize(document.body.clientWidth,window.innerHeight),x.resize()},M=function(){y=!0},_=function(e){y?e&&g.rotate(2*(v.x-d.x)):(t.setClearColor(16777215,1),t.setRenderTarget(n),t.render(u,l),t.setRenderTarget(null),t.readRenderTargetPixels(n,v.x,n.height-v.y,1,1,m),g.picked(m[0]<<16|m[1]<<8|m[2]))},S=function(){y=!1};t.setSize(document.body.clientWidth,window.innerHeight),l.position.set(0,400,-3e3),l.lookAt(new r.Vector3(0,0,0)),x.mirrorCamera.position.set(0,-400,-3e3),x.mirrorCamera.lookAt(new r.Vector3(0,0,0)),g.core.obj.position.set(0,80,0),g.wire.obj.position.set(0,80,0),g.wire.objPicked.position.set(0,80,0),x.obj.rotation.set(-.5*Math.PI,0,0),c.add(g.core.obj),c.add(g.wire.obj),c.add(x.obj),c.add(b.obj),c.add(b.cubeCamera),u.add(g.wire.objPicked),window.addEventListener("resize",i((function(){w()})),1e3),e.addEventListener("mousedown",(function(e){e.preventDefault(),h.set(e.clientX,e.clientY),M()})),document.addEventListener("mousemove",(function(e){e.preventDefault(),v.set(e.clientX,e.clientY),_(!1)})),document.addEventListener("mouseup",(function(e){e.preventDefault(),p.set(e.clientX,e.clientY),S()})),e.addEventListener("wheel",(function(e){e.preventDefault(),function(e){g.rotate(e.deltaY)}(e)})),e.addEventListener("touchstart",(function(e){e.preventDefault(),h.set(e.touches[0].clientX,e.touches[0].clientY),v.set(e.touches[0].clientX,e.touches[0].clientY),d.set(e.touches[0].clientX,e.touches[0].clientY),M(e.touches[0].clientX,e.touches[0].clientY)})),e.addEventListener("touchmove",(function(e){e.preventDefault(),v.set(e.touches[0].clientX,e.touches[0].clientY),_(!0),d.set(e.touches[0].clientX,e.touches[0].clientY)})),e.addEventListener("touchend",(function(e){e.preventDefault(),p.set(e.changedTouches[0].clientX,e.changedTouches[0].clientY),S()})),w(),function e(){var n;n=f.getDelta(),t.setClearColor(15856113,1),g.render(n),x.render(t,c,n),b.render(t,c,n),t.setRenderTarget(null),t.render(c,l),requestAnimationFrame(e)}()}},43051:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=(n(17393),function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},tex:{type:"t",value:null},mouse:{type:"v3",value:new i.Vector3}},this.obj}var t,o;return t=e,(o=[{key:"createObj",value:function(e){var t=new i.PlaneGeometry(800,800,200,200),r=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(78615).Z,fragmentShader:n(80170).Z,transparent:!0});this.uniforms.tex.value=e,this.obj=new i.Points(t,r)}},{key:"render",value:function(e,t,n){this.uniforms.time.value+=e;var r=new i.Vector3;r.set(n.x,n.y,-1),r.unproject(t);var o=r.sub(t.position).normalize(),a=-t.position.z/o.z,s=t.position.clone().add(o.multiplyScalar(a));this.uniforms.mouse.value.copy(s)}}])&&r(t.prototype,o),e}())},8141:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(2212),i=n(38314),o=n(59170).Z,a=n(43051).Z;function s(){var e=new r.Vector2,t=new r.Vector2,n=document.getElementById("canvas-webgl"),s=new r.WebGL1Renderer({alpha:!0,antialias:!0,canvas:n}),c=new r.Scene,u=new r.PerspectiveCamera,l=new r.Clock;u.far=5e4,u.setFocalLength(24);var f=new a,h=function e(){var n;n=l.getDelta(),f.render(n,u,t),s.render(c,u),requestAnimationFrame(e)},v=function(){e.set(document.body.clientWidth,window.innerHeight),n.width=e.x,n.height=e.y,u.aspect=e.x/e.y,u.updateProjectionMatrix(),s.setSize(e.x,e.y)},d=function(n){t.set(n.clientX/e.x*2-1,-n.clientY/e.y*2+1)};o({points:"../img/sketch/image_data/elephant.png"},(function(e){s.setClearColor(8037324,1),u.position.set(0,0,1e3),u.lookAt(0,0,0),l.start(),f.createObj(e.points),c.add(f.obj),window.addEventListener("resize",i(v,1e3)),window.addEventListener("mousemove",d),v(),h()}))}},68993:function(e,t,n){"use strict";n.d(t,{Z:function(){return K}});var r=n(2212),i=n(38314),o=n.n(i);function a(e){return(a="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})(e)}function s(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)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(29130);var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(f,e);var t,n,i,o,a=(i=f,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=l(i);if(o){var n=l(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return u(this,e)});function f(e,t,n,i){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(o=a.call(this,e,t,n,i)).cameraResolution=new r.Vector2,o}return t=f,(n=[{key:"start",value:function(){this.aspect=1.5,this.far=1e3,this.setFocalLength(50),this.position.set(0,6,50),this.lookAt(new r.Vector3(0,6,0))}},{key:"update",value:function(e){}},{key:"resize",value:function(e){e.x>e.y?this.cameraResolution.set(e.x>=1200?1200:e.x,e.x>=1200?800:.66*e.x):this.cameraResolution.set(.6*(e.y>=1200?800:.66*e.y),.6*(e.y>=1200?1200:e.y)),this.setViewOffset(this.cameraResolution.x,this.cameraResolution.y,(e.x-this.cameraResolution.x)/-2,(e.y-this.cameraResolution.y)/-2,e.x,e.y),this.updateProjectionMatrix()}}])&&s(t.prototype,n),f}(r.PerspectiveCamera),h=n(17393),v=n.n(h);function d(e){return(d="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})(e)}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(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)}}function x(e,t){return(x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&x(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=w(i);if(o){var n=w(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return b(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.TorusKnotGeometry(2.4,.8,200,32),n=new r.RawShaderMaterial({uniforms:m(m({},r.UniformsLib.lights),{},{time:{type:"f",value:0}}),vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec3 vPosition;\nvarying vec3 vNormal;\nvarying vec2 vUv;\nvarying vec3 vColor;\nvarying mat4 invertMatrix;\n\nfloat inverse(float m) {\n  return 1.0 / m;\n}\n\nmat2 inverse(mat2 m) {\n  return mat2(m[1][1],-m[0][1],\n             -m[1][0], m[0][0]) / (m[0][0]*m[1][1] - m[0][1]*m[1][0]);\n}\n\nmat3 inverse(mat3 m) {\n  float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2];\n  float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2];\n  float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2];\n\n  float b01 = a22 * a11 - a12 * a21;\n  float b11 = -a22 * a10 + a12 * a20;\n  float b21 = a21 * a10 - a11 * a20;\n\n  float det = a00 * b01 + a01 * b11 + a02 * b21;\n\n  return mat3(b01, (-a22 * a01 + a02 * a21), (a12 * a01 - a02 * a11),\n              b11, (a22 * a00 - a02 * a20), (-a12 * a00 + a02 * a10),\n              b21, (-a21 * a00 + a01 * a20), (a11 * a00 - a01 * a10)) / det;\n}\n\nmat4 inverse(mat4 m) {\n  float\n      a00 = m[0][0], a01 = m[0][1], a02 = m[0][2], a03 = m[0][3],\n      a10 = m[1][0], a11 = m[1][1], a12 = m[1][2], a13 = m[1][3],\n      a20 = m[2][0], a21 = m[2][1], a22 = m[2][2], a23 = m[2][3],\n      a30 = m[3][0], a31 = m[3][1], a32 = m[3][2], a33 = m[3][3],\n\n      b00 = a00 * a11 - a01 * a10,\n      b01 = a00 * a12 - a02 * a10,\n      b02 = a00 * a13 - a03 * a10,\n      b03 = a01 * a12 - a02 * a11,\n      b04 = a01 * a13 - a03 * a11,\n      b05 = a02 * a13 - a03 * a12,\n      b06 = a20 * a31 - a21 * a30,\n      b07 = a20 * a32 - a22 * a30,\n      b08 = a20 * a33 - a23 * a30,\n      b09 = a21 * a32 - a22 * a31,\n      b10 = a21 * a33 - a23 * a31,\n      b11 = a22 * a33 - a23 * a32,\n\n      det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n  return mat4(\n      a11 * b11 - a12 * b10 + a13 * b09,\n      a02 * b10 - a01 * b11 - a03 * b09,\n      a31 * b05 - a32 * b04 + a33 * b03,\n      a22 * b04 - a21 * b05 - a23 * b03,\n      a12 * b08 - a10 * b11 - a13 * b07,\n      a00 * b11 - a02 * b08 + a03 * b07,\n      a32 * b02 - a30 * b05 - a33 * b01,\n      a20 * b05 - a22 * b02 + a23 * b01,\n      a10 * b10 - a11 * b08 + a13 * b06,\n      a01 * b08 - a00 * b10 - a03 * b06,\n      a30 * b04 - a31 * b02 + a33 * b00,\n      a21 * b02 - a20 * b04 - a23 * b00,\n      a11 * b07 - a10 * b09 - a12 * b06,\n      a00 * b09 - a01 * b07 + a02 * b06,\n      a31 * b01 - a30 * b03 - a32 * b00,\n      a20 * b03 - a21 * b01 + a22 * b00) / det;\n}\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  vPosition = position;\n  vNormal = normal;\n  vUv = uv;\n  vColor = vec3(1.0, 0.0, 0.0);\n  invertMatrix = inverse(modelMatrix);\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 cameraPosition;\n\n#if NUM_DIR_LIGHTS > 0\n  struct DirectionalLight {\n    vec3 direction;\n    vec3 color;\n  };\n  uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n#endif\n\nvarying vec3 vPosition;\nvarying vec3 vNormal;\nvarying vec2 vUv;\nvarying vec3 vColor;\nvarying mat4 invertMatrix;\n\nvoid main() {\n  // Phong Shading\n  vec3 diff;\n  vec3 specular;\n  vec3 invLight;\n  vec3 invEye;\n  vec3 halfLE;\n\n  #if NUM_DIR_LIGHT_SHADOWS > 0\n    #pragma unroll_loop\n    for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n      invLight = normalize(invertMatrix * vec4(directionalLights[ i ].direction, 0.0)).xyz;\n      invEye = normalize(invertMatrix * vec4(cameraPosition, 0.0)).xyz;\n      diff += clamp(dot(vNormal, invLight), 0.0, 1.0);\n\n      halfLE = normalize(invLight + invEye);\n      specular += directionalLights[ i ].color * pow(max(dot(vNormal, halfLE), 0.0), 30.0);\n    }\n  #endif\n\n  vec4 destColor = vec4(vColor * diff + specular, 1.0);\n\n  gl_FragColor    = destColor;\n}\n",lights:!0});return(e=a.call(this,t,n)).name="Blob",e.position.set(0,8,0),e.castShadow=!0,e.receiveShadow=!1,e}return t=s,(n=[{key:"start",value:function(){}},{key:"update",value:function(e){this.material.uniforms.time.value+=e,this.rotation.set(this.material.uniforms.time.value,this.material.uniforms.time.value,0)}}])&&g(t.prototype,n),s}(r.Mesh);function _(e){return(_="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})(e)}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(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)}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function z(e,t){return!t||"object"!==_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function L(e){return(L=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=L(i);if(o){var n=L(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return z(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.PlaneGeometry(30,30,128,128),n=new r.RawShaderMaterial({uniforms:P(P({},r.UniformsLib.lights),{},{time:{type:"f",value:0}}),vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform mat4 directionalShadowMatrix[NUM_DIR_LIGHT_SHADOWS];\nuniform float time;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying vec4 vDirectionalShadowCoord[NUM_DIR_LIGHT_SHADOWS];\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position + sin((uv.x + uv.y) * 10.0 + time) * 0.5, 1.0);\n\n  vPosition = mPosition.xyz;\n  vUv = uv;\n\n  #if NUM_DIR_LIGHT_SHADOWS > 0\n    #pragma unroll_loop\n    for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n      vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * mPosition;\n    }\n  #endif\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"#extension GL_OES_standard_derivatives : enable\nprecision highp float;\n#define GLSLIFY 1\n\n#if NUM_DIR_LIGHTS > 0\n  struct DirectionalLight {\n    vec3 direction;\n    vec3 color;\n  };\n  uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n#endif\n\nuniform sampler2D directionalShadowMap[NUM_DIR_LIGHT_SHADOWS];\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying vec4 vDirectionalShadowCoord[NUM_DIR_LIGHT_SHADOWS];\n\nvoid main() {\n  // Phong Shading\n  vec3 normal;\n  vec3 diff;\n  vec3 lightColor;\n\n  #if NUM_DIR_LIGHT_SHADOWS > 0\n    #pragma unroll_loop\n    for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n      normal = normalize(cross(dFdx(vPosition), dFdy(vPosition)));\n      diff += (dot(normal, directionalLights[ i ].direction) + 1.0) / 2.0;\n      lightColor += directionalLights[ i ].color;\n    }\n  #endif\n\n  vec4 shadow;\n\n  #if NUM_DIR_LIGHT_SHADOWS > 0\n    #pragma unroll_loop\n    for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n      shadow += texture2DProj(directionalShadowMap[ i ], vDirectionalShadowCoord[ i ]);\n    }\n  #endif\n\n  gl_FragColor = vec4(lightColor * diff, 1.0) * shadow;\n}\n"});return(e=a.call(this,t,n)).name="Floor",e.rotation.set(v().radians(-90),0,0),e.receiveShadow=!0,e}return t=s,(n=[{key:"start",value:function(){console.log(this.material.uniforms)}},{key:"update",value:function(e){this.material.uniforms.time.value+=e}}])&&R(t.prototype,n),s}(r.Mesh);function A(e){return(A="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})(e)}function O(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)}}function D(e,t){return(D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e,t){return!t||"object"!==A(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var F,j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&D(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=k(r);if(i){var n=k(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return I(this,e)});function a(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(e=o.call(this,16776960,.5)).name="Light",e.castShadow=!0,e.shadow.camera.left=e.shadow.camera.bottom=-10,e.shadow.camera.right=e.shadow.camera.top=10,e.time=0,e.isActive=!1,e}return t=a,(n=[{key:"start",value:function(){this.isActive=!0}},{key:"update",value:function(e){!1!==this.isActive&&(this.time+=e)}}])&&O(t.prototype,n),a}(r.DirectionalLight);function U(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)}}var B=new r.Scene,G=new f,N=new r.Clock({autoStart:!1}),H=new M,V=new C,W=new j,Z=new j,q=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,(n=[{key:"start",value:function(e){(F=new r.WebGL1Renderer({alpha:!0,antialias:!0,canvas:e})).setPixelRatio(window.devicePixelRatio),F.setClearColor(921102,1),F.shadowMap.enabled=!0,F.shadowMap.type=r.PCFSoftShadowMap,H.start(),V.start(),W.position.set(-10,16,10),Z.position.set(10,16,-10),B.add(H),B.add(V),B.add(W),B.add(Z),G.start()}},{key:"play",value:function(){N.start(),this.update()}},{key:"pause",value:function(){N.stop()}},{key:"update",value:function(){if(!1!==N.running){var e=N.getDelta();G.update(e),H.update(e),V.update(e),W.update(e),Z.update(e),F.render(B,G)}}},{key:"resize",value:function(e){G.resize(e),F.setSize(e.x,e.y)}}])&&U(t.prototype,n),e}();function Y(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function X(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Y(o,r,i,a,s,"next",e)}function s(e){Y(o,r,i,a,s,"throw",e)}a(void 0)}))}}function K(){return Q.apply(this,arguments)}function Q(){return(Q=X(regeneratorRuntime.mark((function e(){var t,n,i,a,s,c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new q,n=new r.Vector2,i=document.getElementById("canvas-webgl"),a=document.querySelector(".p-preloader"),s=function(){n.set(document.body.clientWidth,window.innerHeight),i.width=n.x,i.height=n.y,t.resize(n)},c=function(){window.addEventListener("blur",(function(){t.pause()})),window.addEventListener("focus",(function(){t.play()})),window.addEventListener("resize",o()(s,100))},u=function e(){t.update(),requestAnimationFrame(e)},e.next=9,t.start(i);case 9:c(),s(),a.classList.add("is-hidden"),t.play(),u();case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},29355:function(e,t,n){"use strict";n.d(t,{Z:function(){return we}});var r=n(2212),i=n(38314),o=n.n(i),a=n(48840);function s(e){return(s="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})(e)}function c(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)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(i);if(o){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return l(this,e)});function s(e,t,n,r){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(i=a.call(this,e,t,n,r)).time=0,i.isActive=!1,i}return t=s,(n=[{key:"start",value:function(){this.aspect=1.5,this.far=1e3,this.setFocalLength(50),this.position.set(0,10,40),this.lookAt(new r.Vector3(0,0,0)),this.isActive=!0}},{key:"update",value:function(e){!1!==this.isActive&&(this.time+=e)}},{key:"resize",value:function(e){this.aspect=e.x/e.y,this.updateProjectionMatrix()}}])&&c(t.prototype,n),s}(r.PerspectiveCamera),v=n(17393),d=n.n(v);function p(e){return(p="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})(e)}function m(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)}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function x(e){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=x(i);if(o){var n=x(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return g(this,e)});function s(e,t,n,r){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(i=a.call(this,e,t,n,r)).distance=0,i}return t=s,(n=[{key:"start",value:function(){this.aspect=1,this.far=1e3,this.setFocalLength(50),this.distance=20*Math.abs(2*Math.tan(d().radians(this.fov)/2))*2}},{key:"update",value:function(e){this.position.copy(e.position).normalize().multiplyScalar(this.distance),this.lookAt(new r.Vector3)}}])&&m(t.prototype,n),s}(r.PerspectiveCamera);function w(e){return(w="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})(e)}function M(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)}}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e,t){return!t||"object"!==w(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function P(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=P(i);if(o){var n=P(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return S(this,e)});function s(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=a.call(this)).material=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0},renderOutline:{type:"f",value:0},noiseTex:{type:"t",value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform vec3 cameraPosition;\nuniform float time;\nuniform float renderOutline;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying vec3 vColor;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position + normal * renderOutline * 0.5, 1.0);\n\n  float angleToCamera = acos(dot(normalize(cameraPosition), normalize(mPosition.xyz)));\n\n  vPosition = mPosition.xyz;\n  vUv = uv;\n  vColor = vec3(smoothstep(0.8, 1.0, abs(sin(angleToCamera))));\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"#extension GL_OES_standard_derivatives : enable\nprecision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform float renderOutline;\nuniform sampler2D noiseTex;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying vec3 vColor;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  // Flat Shading\n  vec3 light = normalize(vec3(-1.0, 1.0, 0.2));\n  vec3 normal = normalize(cross(dFdx(vPosition), dFdy(vPosition)));\n  float diff = dot(normal, light);\n\n  float noiseR = texture2D(\n    noiseTex,\n    normal.yz * 0.2 + vec2(time * 0.02, 0.0)\n    ).r * 2.0 - 1.0;\n  float noiseG = texture2D(\n    noiseTex,\n    normal.zx * 0.2 + vec2(0.0, time * 0.02)\n    ).g * 2.0 - 1.0;\n  float noiseB = texture2D(\n    noiseTex,\n    normal.xy * 0.2 - time * 0.02\n    ).b * 2.0 - 1.0;\n  float noise = length(vec3(noiseR, noiseG, noiseB));\n\n  vec3 hsvNoise = vec3(noise * 0.1, noise * 0.1, -noise * 0.1);\n  vec3 hsv1 = vec3(0.55, 0.55, 0.8) + hsvNoise;\n  vec3 hsv2 = vec3(0.88, 0.55, 1.0) + hsvNoise;\n  vec3 rgb = mix(convertHsvToRgb(hsv1), convertHsvToRgb(hsv2), diff);\n\n  vec3 hsv3 = vec3(0.55, 0.05, 0.95);\n  vec3 color = (rgb * (1.0 - vColor) + convertHsvToRgb(hsv3) * vColor) * (1.0 - renderOutline);\n  vec3 colorOutline = vec3(1.0) * renderOutline;\n\n  gl_FragColor = vec4(color + colorOutline, 1.0);\n}\n"}),n.head=new r.Mesh(e,n.material),n.jaw=new r.Mesh(t,n.material),n.add(n.head),n.add(n.jaw),n.name="Skull",n.isActive=!1,n}return t=s,(n=[{key:"start",value:function(e){this.isActive=!0,this.material.uniforms.noiseTex.value=e}},{key:"update",value:function(e,t){!1!==this.isActive&&(this.material.uniforms.time.value+=e,this.head.rotation.set(d().radians(8*-(.7*Math.sin(this.material.uniforms.time.value)+.7)),0,0),this.jaw.rotation.set(d().radians(8*(.7*Math.sin(this.material.uniforms.time.value)+.7)),0,0))}}])&&M(t.prototype,n),s}(r.Group);function R(e){return(R="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})(e)}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)}}function z(e,t){return(z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function L(e,t){return!t||"object"!==R(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function C(e){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var A=n(2212),O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&z(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=C(r);if(i){var n=C(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return L(this,e)});function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);var t=new A.PlaneGeometry(2,2),n=new A.RawShaderMaterial({uniforms:{resolution:{type:"v2",value:new A.Vector2(512,512)},direction:{type:"v2",value:new A.Vector2(0,0)},radius:{type:"f",value:1},texture:{type:"t",value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vUv = uv;\n  gl_Position = vec4(position, 1.0);\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform vec2 resolution;\nuniform vec2 direction;\nuniform float radius;\nuniform sampler2D texture;\n\nvarying vec2 vUv;\n\nvec4 gaussianBlur(sampler2D texture, vec2 uv, float radius, vec2 resolution, vec2 direction) {\n  vec4 color = vec4(0.0);\n  vec2 step = radius / resolution * direction;\n  color += texture2D(texture, uv + -30.0 * step) * 0.000044463576696752694;\n  color += texture2D(texture, uv + -29.0 * step) * 0.00007045416494915056;\n  color += texture2D(texture, uv + -28.0 * step) * 0.0001099096126906708;\n  color += texture2D(texture, uv + -27.0 * step) * 0.00016880723998699519;\n  color += texture2D(texture, uv + -26.0 * step) * 0.00025525396029412817;\n  color += texture2D(texture, uv + -25.0 * step) * 0.0003799964739478872;\n  color += texture2D(texture, uv + -24.0 * step) * 0.0005569445069582366;\n  color += texture2D(texture, uv + -23.0 * step) * 0.0008036541345232365;\n  color += texture2D(texture, uv + -22.0 * step) * 0.0011416972770451463;\n  color += texture2D(texture, uv + -21.0 * step) * 0.001596823459247415;\n  color += texture2D(texture, uv + -20.0 * step) * 0.002198804676697693;\n  color += texture2D(texture, uv + -19.0 * step) * 0.0029808483791945177;\n  color += texture2D(texture, uv + -18.0 * step) * 0.003978472126807061;\n  color += texture2D(texture, uv + -17.0 * step) * 0.005227760816555183;\n  color += texture2D(texture, uv + -16.0 * step) * 0.006762976274064666;\n  color += texture2D(texture, uv + -15.0 * step) * 0.008613559380852844;\n  color += texture2D(texture, uv + -14.0 * step) * 0.010800652851120281;\n  color += texture2D(texture, uv + -13.0 * step) * 0.013333369986564198;\n  color += texture2D(texture, uv + -12.0 * step) * 0.016205128746770582;\n  color += texture2D(texture, uv + -11.0 * step) * 0.01939044575559005;\n  color += texture2D(texture, uv + -10.0 * step) * 0.022842624955526088;\n  color += texture2D(texture, uv + -9.0 * step) * 0.02649276597348318;\n  color += texture2D(texture, uv + -8.0 * step) * 0.030250448423666733;\n  color += texture2D(texture, uv + -7.0 * step) * 0.03400631888443281;\n  color += texture2D(texture, uv + -6.0 * step) * 0.037636625557126956;\n  color += texture2D(texture, uv + -5.0 * step) * 0.0410095302098648;\n  color += texture2D(texture, uv + -4.0 * step) * 0.04399280495100364;\n  color += texture2D(texture, uv + -3.0 * step) * 0.04646232452009806;\n  color += texture2D(texture, uv + -2.0 * step) * 0.048310624731385546;\n  color += texture2D(texture, uv + -1.0 * step) * 0.04945474015528432;\n  color += texture2D(texture, uv + 0.0 * step) * 0.049842336475142184;\n  color += texture2D(texture, uv + 1.0 * step) * 0.04945474015528432;\n  color += texture2D(texture, uv + 2.0 * step) * 0.048310624731385546;\n  color += texture2D(texture, uv + 3.0 * step) * 0.04646232452009806;\n  color += texture2D(texture, uv + 4.0 * step) * 0.04399280495100364;\n  color += texture2D(texture, uv + 5.0 * step) * 0.0410095302098648;\n  color += texture2D(texture, uv + 6.0 * step) * 0.037636625557126956;\n  color += texture2D(texture, uv + 7.0 * step) * 0.03400631888443281;\n  color += texture2D(texture, uv + 8.0 * step) * 0.030250448423666733;\n  color += texture2D(texture, uv + 9.0 * step) * 0.02649276597348318;\n  color += texture2D(texture, uv + 10.0 * step) * 0.022842624955526088;\n  color += texture2D(texture, uv + 11.0 * step) * 0.01939044575559005;\n  color += texture2D(texture, uv + 12.0 * step) * 0.016205128746770582;\n  color += texture2D(texture, uv + 13.0 * step) * 0.013333369986564198;\n  color += texture2D(texture, uv + 14.0 * step) * 0.010800652851120281;\n  color += texture2D(texture, uv + 15.0 * step) * 0.008613559380852844;\n  color += texture2D(texture, uv + 16.0 * step) * 0.006762976274064666;\n  color += texture2D(texture, uv + 17.0 * step) * 0.005227760816555183;\n  color += texture2D(texture, uv + 18.0 * step) * 0.003978472126807061;\n  color += texture2D(texture, uv + 19.0 * step) * 0.0029808483791945177;\n  color += texture2D(texture, uv + 20.0 * step) * 0.002198804676697693;\n  color += texture2D(texture, uv + 21.0 * step) * 0.001596823459247415;\n  color += texture2D(texture, uv + 22.0 * step) * 0.0011416972770451463;\n  color += texture2D(texture, uv + 23.0 * step) * 0.0008036541345232365;\n  color += texture2D(texture, uv + 24.0 * step) * 0.0005569445069582366;\n  color += texture2D(texture, uv + 25.0 * step) * 0.0003799964739478872;\n  color += texture2D(texture, uv + 26.0 * step) * 0.00025525396029412817;\n  color += texture2D(texture, uv + 27.0 * step) * 0.00016880723998699519;\n  color += texture2D(texture, uv + 28.0 * step) * 0.0001099096126906708;\n  color += texture2D(texture, uv + 29.0 * step) * 0.00007045416494915056;\n  color += texture2D(texture, uv + 30.0 * step) * 0.000044463576696752694;\n  return color;\n}\n\nvoid main() {\n  vec4 color = gaussianBlur(texture, vUv, radius, resolution, direction);\n  gl_FragColor = color;\n}\n"});return(e=o.call(this,t,n)).name="AuraPostEffect",e}return t=a,(n=[{key:"setDirection",value:function(e,t){this.material.uniforms.direction.value.set(e,t)}},{key:"setTexture",value:function(e){this.material.uniforms.texture.value=e}},{key:"update",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.obj.visible=!0,e.setRenderTarget(r),e.render(t,n),this.obj.visible=!1}}])&&E(t.prototype,n),a}(A.Mesh);function D(e){return(D="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})(e)}function I(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)}}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function F(e,t){return!t||"object"!==D(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var U=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=j(i);if(o){var n=j(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return F(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.PlaneGeometry(20,20),n=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0},postEffectTex:{type:"t",value:null},noiseTex:{type:"t",value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  vPosition = position;\n  vUv = uv;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform vec2 direction;\nuniform vec2 resolution;\nuniform float radius;\nuniform sampler2D postEffectTex;\nuniform sampler2D noiseTex;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nconst float blurIteration = 12.0;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec4 texColor1 = texture2D(postEffectTex, vUv * 1.05 - 0.025);\n  vec4 texColor2 = texture2D(postEffectTex, vUv * vec2(0.8, 0.75) + vec2(0.1, 0.075));\n  vec4 texColor3 = texture2D(postEffectTex, vUv * vec2(0.6, 0.55) + vec2(0.2, 0.175));\n\n  float noise1 = texture2D(noiseTex, vUv - vec2(0.0, time * 0.6)).r;\n  float noise2 = texture2D(noiseTex, vUv * 2.0 - vec2(0.0, time * 0.7)).g;\n  float noise3 = texture2D(noiseTex, vUv * 3.0 + vec2(0.0, time * 0.8)).b;\n  float noise = (noise1 * 0.65 + noise2 * 0.3 + noise3 * 0.05);\n\n  float mask1 = (texColor1.r + noise) / 2.0;\n  float mask2 = (texColor2.r + (noise * 2.0 - 1.0)) * (1.0 - mask1);\n  float mask3 = smoothstep(0.5, 1.0, texColor3.r + noise * 0.5);\n  float mask = (mask1 * 2.0 + mask2) / 3.0 * mask3;\n\n  float strength = smoothstep(0.05, 0.17, pow(mask, 3.0));\n  vec3 hsv1 = vec3(0.84, 0.4, 0.85);\n  vec3 hsv2 = vec3(0.55, 0.05, 0.95);\n  vec3 rgb = convertHsvToRgb(mix(hsv1, hsv2, strength));\n\n  float opacity = smoothstep(0.05, 0.055, pow(mask, 3.0));\n\n  if (opacity < 0.01) {\n    discard;\n  }\n\n  gl_FragColor = vec4(rgb, opacity);\n}\n",transparent:!0});return(e=a.call(this,t,n)).name="Aura",e.isActive=!1,e}return t=s,(n=[{key:"start",value:function(e,t){this.isActive=!0,this.material.uniforms.postEffectTex.value=e,this.material.uniforms.noiseTex.value=t}},{key:"update",value:function(e,t){!1!==this.isActive&&(this.rotation.copy(t.rotation),this.material.uniforms.time.value+=e)}}])&&I(t.prototype,n),s}(r.Mesh);function B(e){return(B="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})(e)}function G(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)}}function N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function H(e,t){return!t||"object"!==B(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function V(e){return(V=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var W=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&N(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=V(i);if(o){var n=V(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return H(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=new r.BufferGeometry,n=new r.BufferAttribute(new Float32Array(1080),3),i=new r.BufferAttribute(new Float32Array(360),1),o=0;o<360;o++){var c=d().radians(360*Math.random()),u=4*Math.random()+1;n.setXYZ(o,Math.cos(c)*u,0,Math.sin(c)*u),i.setX(o,4*Math.random())}t.setAttribute("position",n),t.setAttribute("delay",i);var l=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0},duration:{type:"f",value:4},resolution:{type:"v2",value:new r.Vector2},pixelRatio:{type:"f",value:window.devicePixelRatio},noiseTex:{type:"t",value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute float delay;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform float time;\nuniform float duration;\nuniform vec2 resolution;\nuniform float pixelRatio;\nuniform sampler2D noiseTex;\n\nvarying vec3 vColor;\nvarying float vAlpha;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  // Coordinate transformation\n  float alpha = mod(time - delay, duration) / duration;\n  vec3 risePosition = vec3(0.0, alpha * 10.0 - 4.0, 0.0);\n\n  float noiseR = texture2D(\n    noiseTex,\n    position.yz * 0.4 + vec2(time * 0.02, 0.0)\n    ).r * 2.0 - 1.0;\n  float noiseG = texture2D(\n    noiseTex,\n    position.zx * 0.4 + vec2(0.0, time * 0.02)\n    ).g * 2.0 - 1.0;\n  float noiseB = texture2D(\n    noiseTex,\n    position.xy * 0.4 - time * 0.02\n    ).b * 2.0 - 1.0;\n  vec3 noisePosition = vec3(noiseR, noiseG, noiseB) * alpha * 12.0;\n\n  vec4 mvPosition = viewMatrix * modelMatrix * vec4(position + noisePosition + risePosition, 1.0);\n  float distanceFromCamera = length(mvPosition.xyz);\n\n  // Define the point size.\n  float pointSize = 7.0 * pixelRatio * 40.0 / distanceFromCamera * resolution.y / 1024.0;\n\n  vColor = convertHsvToRgb(\n    vec3(\n      0.55 + delay * 0.33,\n      0.8,\n      0.4\n      )\n    );\n  vAlpha = alpha;\n\n  gl_Position = projectionMatrix * mvPosition;\n  gl_PointSize = pointSize;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float alpha;\n\nvarying vec3 vColor;\nvarying float vAlpha;\n\nvoid main() {\n  // Convert PointCoord to the other vec2 has a range from -1.0 to 1.0.\n  vec2 p = gl_PointCoord * 2.0 - 1.0;\n\n  // Draw circle\n  float radius = length(p);\n  float opacity = smoothstep(0.0, 0.2, vAlpha)\n    * (1.0 - smoothstep(0.8, 1.0, vAlpha))\n    * (1.0 - smoothstep(0.5, 1.0, radius))\n    * 0.6;\n\n  // Define Colors\n  vec3 color = vColor;\n\n  gl_FragColor = vec4(color, opacity);\n}\n",transparent:!0,blending:r.AdditiveBlending,depthWrite:!1});return(e=a.call(this,t,l)).name="Points",e}return t=s,(n=[{key:"start",value:function(e){this.material.uniforms.noiseTex.value=e}},{key:"update",value:function(e){this.material.uniforms.time.value+=e,this.rotation.set(0,.2*this.material.uniforms.time.value,0)}},{key:"resize",value:function(e){this.material.uniforms.resolution.value.copy(e)}}])&&G(t.prototype,n),s}(r.Points);function Z(e){return(Z="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})(e)}function q(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)}}function Y(e,t){return(Y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function X(e,t){return!t||"object"!==Z(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Q=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Y(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=K(i);if(o){var n=K(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return X(this,e)});function s(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(e=a.call(this)).name="AuraSkull",e.skull,e.auraPostEffect,e.aura,e.points,e.renderTarget1=new r.WebGLRenderTarget(256,256),e.renderTarget2=new r.WebGLRenderTarget(256,256),e.time=0,e.isActive=!1,e}return t=s,(n=[{key:"start",value:function(e,t,n){this.skull=new T(e,t),this.auraPostEffect=new O,this.aura=new U,this.points=new W,this.add(this.skull),this.add(this.aura),this.add(this.points),this.skull.start(n),this.aura.start(this.renderTarget1.texture,n),this.points.start(n),this.isActive=!0}},{key:"update",value:function(e,t,n,r,i,o){!1!==this.isActive&&(this.time+=e,this.radian+=e,o&&this.skull.rotation.set(d().radians(o.v.y-15),d().radians(o.v.x+15),d().radians(-20)),this.skull.update(e,n),this.aura.update(e,n),this.points.update(e),t.setRenderTarget(this.renderTarget1),r.add(this.skull),this.skull.material.uniforms.renderOutline.value=1,t.render(r,i),t.setRenderTarget(this.renderTarget2),r.remove(this.skull),r.add(this.auraPostEffect),this.auraPostEffect.setDirection(1,0),this.auraPostEffect.setTexture(this.renderTarget1.texture),t.render(r,i),t.setRenderTarget(this.renderTarget1),this.auraPostEffect.setDirection(0,1),this.auraPostEffect.setTexture(this.renderTarget2.texture),t.render(r,i),t.setRenderTarget(null),r.remove(this.auraPostEffect),this.add(this.skull),this.skull.material.uniforms.renderOutline.value=0)}},{key:"resize",value:function(e){this.points.resize(e)}}])&&q(t.prototype,n),s}(r.Group);function J(e){return(J="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})(e)}function $(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)}}function ee(e,t){return(ee=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function te(e,t){return!t||"object"!==J(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ne(e){return(ne=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var re,ie=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ee(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ne(i);if(o){var n=ne(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return te(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.SphereGeometry(100,12,12),n=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0},hex:{type:"f",value:0}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  vUv = uv;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform float hex;\n\nvarying vec2 vUv;\nvarying vec3 vColor;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec3 rgb = mix(\n    convertHsvToRgb(vec3(0.5, 0.8, 0.7)),\n    convertHsvToRgb(vec3(0.0, 0.2, 0.95)),\n    vUv.y * 4.0 - 1.15\n    );\n\n  gl_FragColor = vec4(rgb, 1.0);\n}\n",side:r.BackSide});return(e=a.call(this,t,n)).name="Background",e}return t=s,(n=[{key:"start",value:function(){}},{key:"update",value:function(){}}])&&$(t.prototype,n),s}(r.Mesh);function oe(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function ae(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)}}var se=new r.Scene,ce=new h,ue=new r.Clock({autoStart:!1}),le=new r.Scene,fe=new b,he=new a.L,ve=new r.TextureLoader,de=new Q,pe=new ie,me=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i,o;return t=e,(n=[{key:"start",value:(i=regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(re=new r.WebGL1Renderer({alpha:!0,antialias:!0,canvas:t})).setPixelRatio(window.devicePixelRatio),re.setClearColor(0,1),e.next=5,Promise.all([he.loadAsync("/sketch-threejs/model/skull/SkullHead.obj"),ve.loadAsync("/sketch-threejs/img/sketch/splash/noise.png")]).then((function(e){var t=e[0].children[1].geometry,n=e[0].children[0].geometry,i=e[1];i.wrapS=r.RepeatWrapping,i.wrapT=r.RepeatWrapping,ce.start(),fe.start(),de.start(t,n,i),pe.start(),se.add(de),se.add(pe)}));case 5:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=i.apply(e,t);function a(e){oe(o,n,r,a,s,"next",e)}function s(e){oe(o,n,r,a,s,"throw",e)}a(void 0)}))},function(e){return o.apply(this,arguments)})},{key:"play",value:function(){ue.start(),this.update()}},{key:"pause",value:function(){ue.stop()}},{key:"update",value:function(e){if(!1!==ue.running){var t=ue.getDelta();ce.update(t),fe.update(ce),de.update(t,re,ce,le,fe,e),re.render(se,ce)}}},{key:"resize",value:function(e){ce.resize(e),de.resize(e),re.setSize(e.x,e.y)}}])&&ae(t.prototype,n),e}();function ye(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)}}var ge=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolution=t,this.vTouchStart=new r.Vector2,this.vPrev=new r.Vector2,this.v=new r.Vector2,this.a=new r.Vector2,this.anchor=new r.Vector2,this.isTouched=!1}var t,n;return t=e,(n=[{key:"touchStart",value:function(e){e.touches||e.preventDefault(),this.vPrev.copy(this.v),this.a.set(0,0),this.vTouchStart.set(e.touches?e.touches[0].clientX:e.clientX,e.touches?e.touches[0].clientY:e.clientY),this.isTouched=!0}},{key:"touchMove",value:function(e){e.touches&&e.preventDefault();var t=e.touches?e.touches[0].clientX:e.clientX,n=e.touches?e.touches[0].clientY:e.clientY;!1!==this.isTouched&&this.anchor.set((t-this.vTouchStart.x)/(this.resolution.x/200)+this.vPrev.x,d().clamp((n-this.vTouchStart.y)/(this.resolution.y/200)+this.vPrev.y,-90,90))}},{key:"touchEnd",value:function(e){this.isTouched=!1}},{key:"update",value:function(){this.a.set((this.anchor.x-this.v.x)/10,(this.anchor.y-this.v.y)/10),this.v.add(this.a)}}])&&ye(t.prototype,n),e}();function xe(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function be(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){xe(o,r,i,a,s,"next",e)}function s(e){xe(o,r,i,a,s,"throw",e)}a(void 0)}))}}function we(){return Me.apply(this,arguments)}function Me(){return(Me=be(regeneratorRuntime.mark((function e(){var t,n,i,a,s,c,u,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new me,n=new r.Vector2,i=document.getElementById("canvas-webgl"),a=document.querySelector(".p-preloader"),s=new ge(n),c=function(){n.set(document.body.clientWidth,window.innerHeight),i.width=n.x,i.height=n.y,t.resize(n)},u=function(){var e=function(e){s.touchStart(e)},n=function(e){s.touchMove(e)},r=function(e){s.touchEnd(e)};i.addEventListener("mousedown",e,{passive:!1}),window.addEventListener("mousemove",n,{passive:!1}),window.addEventListener("mouseup",r),i.addEventListener("touchstart",e,{passive:!1}),window.addEventListener("touchmove",n,{passive:!1}),window.addEventListener("touchend",r),window.addEventListener("blur",(function(){t.pause()})),window.addEventListener("focus",(function(){t.play()})),window.addEventListener("resize",o()(c,100))},l=function e(){s.update(n),t.update(s),requestAnimationFrame(e)},e.next=10,t.start(i);case 10:u(),c(),a.classList.add("is-hidden"),t.play(),l();case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},17194:function(e,t,n){"use strict";n.d(t,{Z:function(){return C}});var r=n(2212),i=n(38314),o=n.n(i);function a(e){return(a="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})(e)}function s(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)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(f,e);var t,n,i,o,a=(i=f,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=l(i);if(o){var n=l(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return u(this,e)});function f(e,t,n,i){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(o=a.call(this,e,t,n,i)).cameraResolution=new r.Vector2,o}return t=f,(n=[{key:"start",value:function(){this.aspect=1.5,this.far=1e3,this.setFocalLength(50),this.position.set(0,0,50),this.lookAt(new r.Vector3)}},{key:"update",value:function(e){}},{key:"resize",value:function(e){e.x>e.y?this.cameraResolution.set(e.x>=1200?1200:e.x,e.x>=1200?800:.66*e.x):this.cameraResolution.set(.6*(e.y>=1200?800:.66*e.y),.6*(e.y>=1200?1200:e.y)),this.setViewOffset(this.cameraResolution.x,this.cameraResolution.y,(e.x-this.cameraResolution.x)/-2,(e.y-this.cameraResolution.y)/-2,e.x,e.y),this.updateProjectionMatrix()}}])&&s(t.prototype,n),f}(r.PerspectiveCamera);function h(e){return(h="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})(e)}function v(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)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(17393);var y,g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=m(i);if(o){var n=m(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return p(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.IcosahedronGeometry(1,100),n=new r.RawShaderMaterial({uniforms:{time:{value:0},alpha:{value:0},pixelRatio:{value:window.devicePixelRatio},noiseTex:{value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform float time;\nuniform float alpha;\nuniform float pixelRatio;\nuniform sampler2D noiseTex;\n\nvarying vec3 vColor;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  // Coordinate transformation\n  float noiseR = texture2D(\n    noiseTex,\n    position.yz * 0.4 + vec2(time * 0.1, 0.0)\n    ).r * 2.0 - 1.0;\n  float noiseG = texture2D(\n    noiseTex,\n    position.zx * 0.4 + vec2(0.0, time * 0.1)\n    ).g * 2.0 - 1.0;\n  float noiseB = texture2D(\n    noiseTex,\n    position.xy * 0.4 - time * 0.1\n    ).b * 2.0 - 1.0;\n  vec3 noisePosition = vec3(noiseR, noiseG, noiseB) * (alpha * 0.6 + 0.6);\n  vec4 mvPosition = viewMatrix * modelMatrix * vec4(position + noisePosition, 1.0);\n  float distanceFromCamera = length(mvPosition.xyz);\n\n  // Define the point size.\n  float pointSize = pixelRatio * 240.0 / distanceFromCamera;\n\n  vColor = convertHsvToRgb(\n    vec3(\n      (noiseR + noiseG + noiseB) * 0.2 + time * 0.1,\n      0.8,\n      0.4\n      )\n    );\n\n  gl_Position = projectionMatrix * mvPosition;\n  gl_PointSize = pointSize;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float alpha;\n\nvarying vec3 vColor;\n\nvoid main() {\n  // Convert PointCoord to the other vec2 has a range from -1.0 to 1.0.\n  vec2 p = gl_PointCoord * 2.0 - 1.0;\n\n  // Draw circle\n  float radius = length(p);\n  float opacity =\n    (\n      (1.0 - smoothstep(0.1, 0.2, radius)) * 0.2\n      + (1.0 - smoothstep(0.2, 1.0, radius)) * 0.1\n    )\n    * smoothstep(0.0, 0.1, alpha)\n    * (1.0 - smoothstep(0.1, 1.0, alpha));\n\n  // Define Colors\n  vec3 color = vColor;\n\n  gl_FragColor = vec4(color, opacity);\n}\n",transparent:!0,blending:r.AdditiveBlending,depthWrite:!1});return(e=a.call(this,t,n)).name="Points",e.time=0,e.scale.set(10,10,10),e}return t=s,(n=[{key:"start",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.time=-4*t,this.material.uniforms.noiseTex.value=e}},{key:"update",value:function(e){this.time+=e;var t=this.time%4/4,n=30*t;this.scale.set(n,n,n),this.material.uniforms.time.value+=e,this.material.uniforms.alpha.value=t}}])&&v(t.prototype,n),s}(r.Points);function x(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function b(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)}}var w=new r.Scene,M=new f,_=new r.Clock({autoStart:!1}),S=new r.TextureLoader,P=new g,T=new g,R=new g,E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i,o;return t=e,(n=[{key:"start",value:(i=regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(y=new r.WebGL1Renderer({alpha:!0,antialias:!0,canvas:t})).setPixelRatio(window.devicePixelRatio),y.setClearColor(921102,1),e.next=5,Promise.all([S.loadAsync("/sketch-threejs/img/sketch/splash/noise.png")]).then((function(e){var t=e[0];t.wrapS=r.RepeatWrapping,t.wrapT=r.RepeatWrapping,P.start(t),T.start(t,.33),R.start(t,.66),w.add(P),w.add(T),w.add(R)}));case 5:M.start();case 6:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=i.apply(e,t);function a(e){x(o,n,r,a,s,"next",e)}function s(e){x(o,n,r,a,s,"throw",e)}a(void 0)}))},function(e){return o.apply(this,arguments)})},{key:"play",value:function(){_.start(),this.update()}},{key:"pause",value:function(){_.stop()}},{key:"update",value:function(){if(!1!==_.running){var e=_.getDelta();M.update(e),P.update(e),T.update(e),R.update(e),y.render(w,M)}}},{key:"resize",value:function(e){M.resize(e),y.setSize(e.x,e.y)}}])&&b(t.prototype,n),e}();function z(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function L(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){z(o,r,i,a,s,"next",e)}function s(e){z(o,r,i,a,s,"throw",e)}a(void 0)}))}}function C(){return A.apply(this,arguments)}function A(){return(A=L(regeneratorRuntime.mark((function e(){var t,n,i,a,s,c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new E,n=new r.Vector2,i=document.getElementById("canvas-webgl"),a=document.querySelector(".p-preloader"),s=function(){n.set(document.body.clientWidth,window.innerHeight),i.width=n.x,i.height=n.y,t.resize(n)},c=function(){window.addEventListener("resize",o()(s,100))},u=function e(){t.update(),requestAnimationFrame(e)},e.next=9,t.start(i);case 9:c(),s(),a.classList.add("is-hidden"),t.play(),u();case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},4055:function(e,t,n){"use strict";n.d(t,{Z:function(){return X}});var r=n(2212),i=n(38314),o=n.n(i),a=n(29130),s=n.n(a),c=n(17393),u=n.n(c);function l(e){return(l="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})(e)}function f(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)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=d(r);if(i){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return v(this,e)});function a(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(e=o.call(this)).time=0,e.name="Sun",e}return t=a,(n=[{key:"start",value:function(){}},{key:"update",value:function(e){this.time+=e,this.rotation.set(0,u().radians(8*this.time),0)}}])&&f(t.prototype,n),a}(r.Group);function m(e){return(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})(e)}function y(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)}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function x(e,t){return!t||"object"!==m(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=b(i);if(o){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return x(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.SphereGeometry(6,32,32),n=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0},texture:{type:"t",value:null},textureNormal:{type:"t",value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform vec3 cameraPosition;\nuniform float time;\n\nvarying vec2 vUv;\nvarying vec3 vColor;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  float angleToCamera = acos(dot(normalize(cameraPosition), normalize(mPosition.xyz)));\n\n  vUv = uv;\n  vColor = vec3(smoothstep(0.7, 1.0, abs(sin(angleToCamera)))) * 0.9;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D texture;\nuniform sampler2D textureNormal;\n\nvarying vec2 vUv;\nvarying vec3 vColor;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec2 p = vUv * 2.0 - 1.0;\n\n  vec2 normal = texture2D(textureNormal, vUv + vec2(0.5, 0.0)).xy;\n  vec2 updateUv = vUv + vec2(\n    cos(radians(normal.x * 360.0 + time * 60.0)) * 0.006,\n    sin(radians(normal.y * 360.0 + time * 60.0)) * 0.006\n    );\n\n  vec4 texColor = texture2D(texture, updateUv);\n  vec3 hsv = vec3(\n    texColor.r * 0.14 + 0.03,\n    0.95 - texColor.r * 0.7,\n    texColor.r * 0.4 + 0.8\n    );\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  gl_FragColor = vec4(rgb + vColor, 1.0);\n}\n"});return(e=a.call(this,t,n)).name="Core",e}return t=s,(n=[{key:"start",value:function(e,t){this.material.uniforms.texture.value=e,this.material.uniforms.textureNormal.value=t}},{key:"update",value:function(e){this.material.uniforms.time.value+=e}}])&&y(t.prototype,n),s}(r.Mesh);function M(e){return(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})(e)}function _(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)}}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function P(e,t){return!t||"object"!==M(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var R=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&S(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=T(i);if(o){var n=T(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return P(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.SphereGeometry(7.5,128,128),n=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0},texture:{type:"t",value:null},textureNormal:{type:"t",value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform vec3 cameraPosition;\nuniform float time;\n\nvarying vec2 vUv;\nvarying float vOpacity;\n\nvoid main(void) {\n  float wave1 = sin((position.x + position.y) * 0.8 + time * 0.4);\n  float wave2 = sin((position.z - position.x) * 0.6 + time * 0.2);\n  float wave = wave1 * 0.4 + wave2 * 0.6;\n  vec3 wavePosition = normalize(position) * wave * 2.2;\n\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position + wavePosition, 1.0);\n\n  float angleToCamera = acos(dot(normalize(cameraPosition), normalize(mPosition.xyz)));\n\n  vUv = uv + vec2(0.5, 0.0);\n  vOpacity = smoothstep(0.1, 0.6, abs(sin(angleToCamera)));\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D texture;\nuniform sampler2D textureNormal;\n\nvarying vec2 vUv;\nvarying float vOpacity;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec2 p = vUv * 2.0 - 1.0;\n\n  vec2 normal = texture2D(textureNormal, vUv + vec2(0.5, 0.0)).xy;\n  vec2 updateUv = vUv + vec2(\n    cos(radians(normal.x * 360.0 + time * 60.0)) * 0.018,\n    sin(radians(normal.y * 360.0 + time * 60.0)) * 0.018\n    );\n\n  vec4 texColor = texture2D(texture, updateUv);\n  float opacity = texColor.r * vOpacity;\n  vec3 hsv = vec3(\n    opacity * 0.1 + 0.03,\n    0.95 - opacity * 0.7,\n    opacity * 0.4 + 0.8\n    );\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  gl_FragColor = vec4(rgb, smoothstep(0.3, 0.9, opacity) * 0.9);\n}\n",transparent:!0,depthWrite:!1,side:r.DoubleSide});return(e=a.call(this,t,n)).name="Shell",e}return t=s,(n=[{key:"start",value:function(e,t){this.material.uniforms.texture.value=e,this.material.uniforms.textureNormal.value=t}},{key:"update",value:function(e){this.material.uniforms.time.value+=e}}])&&_(t.prototype,n),s}(r.Mesh);function E(e){return(E="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})(e)}function z(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)}}function L(e,t){return(L=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function C(e,t){return!t||"object"!==E(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&L(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=A(i);if(o){var n=A(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return C(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=new r.BufferGeometry,n=new r.BufferAttribute(new Float32Array(3600),3),i=new r.BufferAttribute(new Float32Array(1200),1,1),o=new r.BufferAttribute(new Float32Array(1200),1,1),c=0;c<1200;c++){var l=u().radians(u().randomArbitrary(0,150)-75),f=u().radians(u().randomArbitrary(0,360)),h=Math.random()*Math.random()*8+6,v=u().spherical(l,f,h);n.setXYZ(c,v[0],v[1],v[2]),i.setXYZ(c,Math.random()),o.setXYZ(c,u().randomArbitrary(5,10)*(2*u().randomInt(0,1)-1))}t.setAttribute("position",n),t.setAttribute("delay",i),t.setAttribute("speed",o);var d=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute float delay;\nattribute float speed;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nmat4 calcRotateMat4X(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Y(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4(vec3 radian) {\n  return calcRotateMat4X(radian.x) * calcRotateMat4Y(radian.y) * calcRotateMat4Z(radian.z);\n}\n\nconst float duration = 3.0;\n\nvoid main() {\n  // calculate interval time from 0 to 1\n  float interval = mod(time + delay * duration, duration) / duration;\n\n  // update position and size\n  float size = 10.0 * sin(interval * 4.0);\n  float blink = max(sin(interval * 4.0) * 2.0 - 1.0, 0.0);\n  mat4 rotateMat = calcRotateMat4(vec3(\n    radians(time * speed * 0.3),\n    radians(time * speed),\n    radians(time * speed * 0.3)\n    ));\n\n  // calculate colors\n  vec3 hsv = vec3(0.1 + sin(delay + time) * 0.05, 0.6, 1.0);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  // coordinate transformation\n  vec4 mvPosition = modelViewMatrix * rotateMat * vec4(position, 1.0);\n  float distanceFromCamera = 20.0 / length(mvPosition.xyz);\n\n  vColor = rgb;\n  vOpacity = blink * clamp(distanceFromCamera, 0.1, 0.3);\n\n  gl_Position = projectionMatrix * mvPosition;\n  gl_PointSize = distanceFromCamera * size;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\nvoid main() {\n  // convert PointCoord to range from -1.0 to 1.0\n  vec2 p = gl_PointCoord * 2.0 - 1.0;\n\n  // draw double circle\n  float r = (1.0 - smoothstep(0.95, 1.0, length(p)));\n\n  gl_FragColor = vec4(vColor * r, vOpacity);\n}\n",transparent:!0,depthWrite:!1,blending:r.AdditiveBlending});return(e=a.call(this,t,d)).name="Points",e}return t=s,(n=[{key:"start",value:function(){}},{key:"update",value:function(e){this.material.uniforms.time.value+=e}}])&&z(t.prototype,n),s}(r.Points);function D(e){return(D="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})(e)}function I(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)}}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function F(e,t){return!t||"object"!==D(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var U=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=j(i);if(o){var n=j(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return F(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.RingGeometry(4,24,64),n=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0},texture:{type:"t",value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  vPosition = position;\n  vUv = uv;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D texture;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nmat3 calcRotateMat3(float radian) {\n  return mat3(\n    cos(radian), -sin(radian), 0.0,\n    sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 1.0\n  );\n}\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec2 p = vUv * 2.0 - 1.0;\n  vec2 rotateUv = (calcRotateMat3(time * 0.04) * vec3(p, 1.0)).xy * 0.5 + 0.5;\n  vec4 texColor = texture2D(texture, rotateUv);\n\n  float l = length(vPosition);\n  vec2 rotateMask = (calcRotateMat3(time * -0.02) * vec3(p, 1.0)).xy;\n  float opacityIn = pow(1.0 - smoothstep(6.0, 10.0, l), 2.0);\n  float opacityOut = 1.0 - smoothstep(8.0, 24.0, l);\n  float opacityRay = sin(acos(dot(normalize(rotateMask), vec2(1.0, 0.0))) * 2.4 + time) * 0.4 + 0.6;\n  float opacity = opacityIn * 0.7 + opacityOut * 0.1 + opacityRay * texColor.r;\n\n  vec3 hsv = vec3(\n    opacity * 0.12 + 0.98,\n    1.0 - opacity * 0.8,\n    opacity * 0.4 + 0.8\n    );\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  gl_FragColor = vec4(rgb, opacity);\n}\n",transparent:!0});return(e=a.call(this,t,n)).position.z=-5,e.name="SunShine",e}return t=s,(n=[{key:"start",value:function(e){this.material.uniforms.texture.value=e}},{key:"update",value:function(e){this.material.uniforms.time.value+=e}}])&&I(t.prototype,n),s}(r.Mesh);function B(e){return(B="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})(e)}function G(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)}}function N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function H(e,t){return!t||"object"!==B(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function V(e){return(V=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var W=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&N(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=V(i);if(o){var n=V(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return H(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.SphereGeometry(50,12,12),n=new r.RawShaderMaterial({uniforms:{time:{type:"f",value:0}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  vUv = uv;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\n\nvarying vec2 vUv;\nvarying vec3 vColor;\n\nfloat random(vec2 c){\n  return fract(sin(dot(c.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\nconst vec3 rgb1 = vec3(24.0 / 255.0, 32.0 / 255.0, 76.0 / 255.0);\nconst vec3 rgb2 = vec3(5.0 / 255.0, 6.0 / 255.0, 15.0 / 255.0);\n\nvoid main() {\n  vec3 rgb = mix(rgb1, rgb2, vUv.y * 4.0 - 1.0);\n  float noise = random(vUv + vec2(0.0, time * 0.01)) * 0.04;\n\n  gl_FragColor = vec4(rgb + noise, 1.0);\n}\n",side:r.BackSide});return(e=a.call(this,t,n)).name="Background",e}return t=s,(n=[{key:"start",value:function(){}},{key:"update",value:function(e){this.material.uniforms.time.value+=e}}])&&G(t.prototype,n),s}(r.Mesh);function Z(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function q(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Z(o,r,i,a,s,"next",e)}function s(e){Z(o,r,i,a,s,"throw",e)}a(void 0)}))}}var Y=new r.TextureLoader;function X(){return K.apply(this,arguments)}function K(){return(K=q(regeneratorRuntime.mark((function e(){var t,n,i,a,c,u,l,f,h,v,d,m,y,g,x,b,M,_,S,P;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new r.Vector2,n=document.getElementById("canvas-webgl"),(i=new r.WebGL1Renderer({alpha:!0,antialias:!0,canvas:n})).setPixelRatio(window.devicePixelRatio),a=new r.Scene,c=new r.PerspectiveCamera,u=new r.Vector2,l=new r.Clock({autoStart:!1}),f=document.querySelector(".p-preloader"),h=new p,v=new w,d=new R,m=new O,y=new U,g=new W,b=function(){var e=l.getDelta();h.update(e),v.update(e),d.update(e),m.update(e),y.update(e),i.render(a,c)},M=function e(){b(),requestAnimationFrame(e)},_=function(){t.x>t.y?u.set(t.x>=1200?1200:t.x,t.x>=1200?800:.66*t.x):u.set(.6*(t.y>=1200?800:.66*t.y),.6*(t.y>=1200?1200:t.y)),c.setViewOffset(u.x,u.y,(t.x-u.x)/-2,(t.y-u.y)/-2,t.x,t.y),c.updateProjectionMatrix()},S=function(){t.set(document.body.clientWidth,window.innerHeight),n.width=t.x,n.height=t.y,_(),i.setSize(t.x,t.y)},P=function(){window.addEventListener("blur",(function(){l.stop()})),window.addEventListener("focus",(function(){l.start()})),window.addEventListener("resize",o()(S,100))},i.setClearColor(15658734,1),c.aspect=1.5,c.far=1e3,c.setFocalLength(50),c.position.set(0,0,50),c.lookAt(new r.Vector3),P(),S(),e.next=30,Promise.all([Y.loadAsync("../img/sketch/sun/core.png"),Y.loadAsync("../img/sketch/sun/core_normal.png"),Y.loadAsync("../img/sketch/sun/sunshine.png")]).then((function(e){x=e}));case 30:return x&&(x[0].wrapS=r.RepeatWrapping,x[0].wrapT=r.RepeatWrapping,x[1].wrapS=r.RepeatWrapping,x[1].wrapT=r.RepeatWrapping,v.start(x[0],x[1]),d.start(x[0],x[1]),y.start(x[2])),h.add(v),h.add(d),a.add(h),a.add(m),a.add(y),a.add(g),f.classList.add("is-hidden"),e.next=40,s()(200);case 40:l.start(),M();case 42:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},84269:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.size=280,this.interval=1.2,this.uniforms={index:{type:"f",value:t},time:{type:"f",value:0},timeTransform:{type:"f",value:0},interval:{type:"f",value:this.interval},size:{type:"f",value:this.size},texButterfly:{type:"t",value:n},texPicture:{type:"t",value:r},colorH:{type:"f",value:.08}},this.obj,this.isTransform=!1,this.createObj()}var t,o;return t=e,(o=[{key:"createObj",value:function(){var e=new i.PlaneGeometry(this.size,this.size/2,64,32),t=new i.SphereGeometry(.1*this.size,64,32,-.5*Math.PI,2*Math.PI),r=new i.PlaneGeometry(1.1*this.size,.55*this.size,64,32);e.setAttribute("spherePosition",t.attributes.position),e.setAttribute("squarePosition",r.attributes.position);var o=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(70124).Z,fragmentShader:n(75473).Z,side:i.DoubleSide,transparent:!0});this.obj=new i.Mesh(e,o),this.obj.position.y=.3*this.size,this.obj.renderOrder=10}},{key:"render",value:function(e,t){this.uniforms.time.value+=t,this.uniforms.timeTransform.value<this.interval&&!0===this.isTransform?this.uniforms.timeTransform.value=Math.min(this.uniforms.timeTransform.value+t,this.interval):this.uniforms.timeTransform.value>0&&!1===this.isTransform&&(this.uniforms.timeTransform.value=Math.max(this.uniforms.timeTransform.value-t,0))}}])&&r(t.prototype,o),e}()},76947:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}});var i=n(2212),o=n(41588).Z,a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mirrorCamera=new i.PerspectiveCamera(30,t.x/t.y,1,15e3),this.mirrorRender=new i.WebGLRenderTarget(t.x,t.y),this.textureMatrix=new i.Matrix4,this.uniforms={time:{type:"f",value:0},texture:{type:"t",value:this.mirrorRender.texture},textureMatrix:{type:"m4",value:this.textureMatrix}},this.renderBack1=new i.WebGLRenderTarget(t.x,t.y),this.renderBack2=new i.WebGLRenderTarget(t.x,t.y),this.postEffectBlurX=new o(this.renderBack1.texture,1,0,4),this.postEffectBlurY=new o(this.renderBack2.texture,0,1,4),this.mirrorCamera.up.set(0,-1,0),this.obj,this.createObj()}var t,a;return t=e,(a=[{key:"add",value:function(e,t){t.add(this.obj),e.add(this.postEffectBlurX.obj),e.add(this.postEffectBlurY.obj)}},{key:"createObj",value:function(){var e=new i.PlaneGeometry(4e3,4e3),t=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(47741).Z,fragmentShader:n(41639).Z,transparent:!0});this.obj=new i.Mesh(e,t),this.obj.rotation.set(-.5*Math.PI,0,0)}},{key:"updateTextureMatrix",value:function(){this.textureMatrix.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1),this.textureMatrix.multiply(this.mirrorCamera.projectionMatrix),this.textureMatrix.multiply(this.mirrorCamera.matrixWorldInverse)}},{key:"render",value:function(e,t,n,r,i){this.uniforms.time.value+=i,this.updateTextureMatrix(),this.obj.visible=!1,e.setRenderTarget(this.renderBack1),e.render(n,this.mirrorCamera),this.obj.visible=!0,this.postEffectBlurX.render(e,t,r,this.renderBack2),this.postEffectBlurY.render(e,t,r,this.mirrorRender)}},{key:"resize",value:function(e){this.mirrorCamera.aspect=e.x/e.y,this.mirrorCamera.updateProjectionMatrix(),this.mirrorRender.setSize(e.x,e.y),this.renderBack1.setSize(e.x,e.y),this.renderBack2.setSize(e.x,e.y),this.postEffectBlurX.resize(e),this.postEffectBlurY.resize(e)}}])&&r(t.prototype,a),e}()},5721:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}});var i=n(2212),o=n(17393),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.interval=4,this.attr={position:new i.BufferAttribute(new Float32Array(3*t),3),colorH:new i.BufferAttribute(new Float32Array(t),1),index:new i.BufferAttribute(new Float32Array(t),1),opacity:new i.BufferAttribute(new Float32Array(t),1),valid:new i.BufferAttribute(new Float32Array(t),1)},this.uniforms={size:{type:"f",value:t},interval:{type:"f",value:this.interval},time:{type:"f",value:0}},this.butterflies=null,this.butterfliesLengh=0,this.obj,this.createObj()}var t,a;return t=e,(a=[{key:"createObj",value:function(){for(var e=new i.BufferGeometry,t=0;t<this.uniforms.size.value;t++)this.attr.index.setX(t,t);e.setAttribute("position",this.attr.position),e.setAttribute("colorH",this.attr.colorH),e.setAttribute("i",this.attr.index),e.setAttribute("opacity",this.attr.opacity),e.setAttribute("valid",this.attr.valid);var r=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(8467).Z,fragmentShader:n(27558).Z,depthWrite:!1,transparent:!0});this.obj=new i.Points(e,r),this.obj.renderOrder=20}},{key:"addButterflies",value:function(e){this.butterflies=e,this.butterfliesLengh=e.length}},{key:"render",value:function(e){this.uniforms.time.value+=e;for(var t=0;t<this.uniforms.size.value;t++){var n=(this.uniforms.time.value+this.attr.index.getX(t)/this.uniforms.size.value*this.interval)%this.interval,r=this.attr.valid.getX(t);if(n>=.9*this.interval&&1==r)this.attr.valid.setX(t,0);else if(n<=.9*this.interval&&0==r){var i=Math.floor(Math.random()*this.butterfliesLengh),a=this.butterflies[i],s=(-90*Math.random()-90)*Math.PI/180,c=-180*Math.random()*Math.PI/180,u=Math.random()*a.uniforms.size.value/4+a.uniforms.size.value/8,l=o.spherical(s,c,u),f=a.uniforms.timeTransform.value>0?0:1;this.attr.position.setXYZ(t,l[0]+a.obj.position.x,.2*l[1]+a.obj.position.y+20*Math.sin(a.uniforms.time.value),.5*l[2]+a.obj.position.z),this.attr.colorH.setX(t,a.uniforms.colorH.value),this.attr.opacity.setX(t,f),this.attr.valid.setX(t,1)}}this.attr.position.needsUpdate=!0,this.attr.colorH.needsUpdate=!0,this.attr.opacity.needsUpdate=!0,this.attr.valid.needsUpdate=!0}}])&&r(t.prototype,a),e}()},67283:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={brightMin:{type:"f",value:t},texture1:{type:"t",value:n},texture2:{type:"t",value:r}},this.obj,this.createObj()}var t,o;return t=e,(o=[{key:"createObj",value:function(){var e=new i.PlaneGeometry(2,2),t=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(86169).Z,fragmentShader:n(45014).Z});this.obj=new i.Mesh(e,t),this.obj.visible=!1}},{key:"render",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.obj.visible=!0,e.setRenderTarget(r),e.render(t,n),this.obj.visible=!1}}])&&r(t.prototype,o),e}()},41588:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(t,n,r,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={resolution:{type:"v2",value:new i.Vector2},direction:{type:"v2",value:new i.Vector2(n,r)},radius:{type:"f",value:o},texture:{type:"t",value:t}},this.obj,this.createObj()}var t,o;return t=e,(o=[{key:"createObj",value:function(){var e=new i.PlaneGeometry(2,2),t=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(86169).Z,fragmentShader:n(60479).Z});this.obj=new i.Mesh(e,t),this.obj.visible=!1}},{key:"resize",value:function(e){this.uniforms.resolution.value.set(e.x,e.y)}},{key:"render",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.obj.visible=!0,e.setRenderTarget(r),e.render(t,n),this.obj.visible=!1}}])&&r(t.prototype,o),e}()},68131:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={brightMin:{type:"f",value:t},texture:{type:"t",value:n}},this.obj,this.createObj()}var t,o;return t=e,(o=[{key:"createObj",value:function(){var e=new i.PlaneGeometry(2,2),t=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(86169).Z,fragmentShader:n(46045).Z});this.obj=new i.Mesh(e,t),this.obj.visible=!1}},{key:"render",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.obj.visible=!0,e.setRenderTarget(r),e.render(t,n),this.obj.visible=!1}}])&&r(t.prototype,o),e}()},82158:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(2212),i=n(38314),o=n(89813).Z,a=n(84269).Z,s=n(5721).Z,c=n(76947).Z,u=n(68131).Z,l=n(41588).Z,f=n(67283).Z;function h(){var e={x:0,y:0},t=document.getElementById("canvas-webgl"),n=new r.WebGL1Renderer({antialias:!0,canvas:t,alpha:!0}),h=new r.WebGLRenderTarget(0,0),v=new r.WebGLRenderTarget(0,0),d=new r.WebGLRenderTarget(0,0),p=new r.Scene,m=new r.Scene,y=new r.OrthographicCamera(-1,1,1,-1,0,1),g=new r.PerspectiveCamera(30,1,1,15e3),x=new r.Clock,b=new r.TextureLoader,w=new r.Vector2,M=new r.Vector2,_=new r.Vector2,S=[],P=new s(32),T=new c(e),R=new u(.7,h.texture),E=new l(v.texture,1,0,1),z=new l(d.texture,0,1,1),L=new f(.7,h.texture,v.texture),C=["/sketch-threejs/img/sketch/transform/tex.png","/sketch-threejs/img/sketch/transform/flower.jpg"],A=[],O=function(){e.x=document.body.clientWidth,e.y=window.innerHeight,t.width=e.x,t.height=e.y,g.aspect=e.x/e.y,g.updateProjectionMatrix(),T.resize(e),E.resize(e),z.resize(e),h.setSize(e.x,e.y),v.setSize(e.x,e.y),d.setSize(e.x,e.y),n.setSize(e.x,e.y)},D=function e(){!function(){for(var e=x.getDelta(),t=0;t<S.length;t++)S[t].render(n,e);P.render(e),T.render(n,p,m,y,e),n.setRenderTarget(h),n.render(m,g),R.render(n,p,y,v),E.render(n,p,y,d),z.render(n,p,y,v),L.render(n,p,y)}(),requestAnimationFrame(e)},I=function(e){S[0].isTransform=!S[0].isTransform};!function(){O(),window.addEventListener("resize",i(O),1e3),t.addEventListener("mousedown",(function(e){e.preventDefault(),w.set(e.clientX,e.clientY),o(w),I()})),t.addEventListener("mousemove",(function(e){e.preventDefault(),M.set(e.clientX,e.clientY),o(M)})),t.addEventListener("mouseup",(function(e){e.preventDefault(),_.set(e.clientX,e.clientY),o(_)})),t.addEventListener("touchstart",(function(e){e.preventDefault(),w.set(e.touches[0].clientX,e.touches[0].clientY),o(w),I(e.touches[0].clientX,e.touches[0].clientY)})),t.addEventListener("touchmove",(function(e){e.preventDefault(),M.set(e.touches[0].clientX,e.touches[0].clientY),o(M)})),t.addEventListener("touchend",(function(e){e.preventDefault(),_.set(e.changedTouches[0].clientX,e.changedTouches[0].clientY),o(_)})),window.addEventListener("mouseout",(function(){event.preventDefault(),_.set(0,0)})),n.setClearColor(16382457,1),g.position.set(400.1,60,-400),T.mirrorCamera.position.set(g.position.x,-1*g.position.y,g.position.z),g.lookAt(new r.Vector3(0,60,0)),T.mirrorCamera.lookAt(new r.Vector3(0,-60,0));for(var e=0,s=function(){var t=c;b.load(C[c],(function(n){if(n.magFilter=r.NearestFilter,n.minFilter=r.NearestFilter,n.repeat=r.RepeatWrapping,A[t]=n,++e>=C.length){for(var i=0;i<1;i++)S[i]=new a(i,A[0],A[1]),m.add(S[i].obj);P.addButterflies(S),m.add(P.obj),T.add(p,m),p.add(R.obj),p.add(E.obj),p.add(z.obj),p.add(L.obj),D()}}))},c=0;c<C.length;c++)s()}()}},31547:function(e,t,n){"use strict";n.d(t,{Z:function(){return Z}});var r=n(2212),i=n(38314),o=n.n(i),a=n(52886);function s(e){return(s="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})(e)}function c(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)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(i);if(o){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return l(this,e)});function s(e,t,n,i){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(o=a.call(this,e,t,n,i)).cameraResolution=new r.Vector2,o.time=0,o}return t=s,(n=[{key:"start",value:function(){this.far=1e3,this.setFocalLength(50),this.position.set(0,50,0),this.lookAt(new r.Vector3)}},{key:"update",value:function(e){this.time+=e}},{key:"resize",value:function(e){this.aspect=e.x/e.y,this.updateProjectionMatrix()}}])&&c(t.prototype,n),s}(r.PerspectiveCamera);function v(e){return(v="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})(e)}function d(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)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(i);if(o){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return m(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.PlaneGeometry(80,80),n=new r.RawShaderMaterial({uniforms:{time:{value:0},resolution:{value:new r.Vector2},tScene:{value:null},tNormal:{value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nvoid main(void) {\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  vPosition = mPosition.xyz;\n  vUv = uv;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform mat4 modelMatrix;\nuniform vec3 cameraPosition;\nuniform float time;\nuniform vec2 resolution;\nuniform sampler2D tScene;\nuniform sampler2D tNormal;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec2 p = vUv * 2.0 - 1.0;\n  vec3 light = normalize(vec3(0.0, 1.0, 0.0));\n\n  vec3 normal1 = texture2D(tNormal, (vUv + vec2(0.0, 0.2)) + vec2( time,  time) * 0.02).xyz * 2.0 - 1.0;\n  vec3 normal2 = texture2D(tNormal, (vUv + vec2(0.0, 0.4)) + vec2( time, -time) * 0.02).xyz * 2.0 - 1.0;\n  vec3 normal3 = texture2D(tNormal, (vUv + vec2(0.0, 0.6)) + vec2(-time,  time) * 0.02).xyz * 2.0 - 1.0;\n  vec3 normal4 = texture2D(tNormal, (vUv + vec2(0.0, 0.8)) + vec2(-time, -time) * 0.02).xyz * 2.0 - 1.0;\n  vec3 normal = normalize(normal1 + normal2 + normal3 + normal4);\n\n  float angleToCamera = acos(dot(normalize(vPosition - cameraPosition), normal));\n  float diffuse = clamp(dot(normal, light), 0.0, 1.0);\n\n  vec3 hsv = vec3(0.52, 1.0, 0.0);\n  vec3 rgb = convertHsvToRgb(hsv);\n  float edgeGradual = (1.0 - smoothstep(0.5, 1.0, length(p)));\n\n  vec2 uv = gl_FragCoord.xy / resolution;\n  vec4 tSceneColor = texture2D(tScene, uv + normal.xy * 0.1);\n\n  gl_FragColor = vec4((rgb + diffuse) * edgeGradual + tSceneColor.rgb, 1.0);\n}\n"});return(e=a.call(this,t,n)).name="Water",e.rotation.x=Math.PI/180*-90,e}return t=s,(n=[{key:"start",value:function(e,t){var n=this.material.uniforms;n.tScene.value=e,n.tNormal.value=t}},{key:"update",value:function(e){this.material.uniforms.time.value+=e}},{key:"resize",value:function(e){this.material.uniforms.resolution.value.copy(e)}}])&&d(t.prototype,n),s}(r.Mesh);function x(e){return(x="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})(e)}function b(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)}}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function M(e,t){return!t||"object"!==x(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_(i);if(o){var n=_(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return M(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.PlaneGeometry(30,30),n=new r.RawShaderMaterial({uniforms:{time:{value:0},tImage:{value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  vPosition = mPosition.xyz;\n  vUv = uv;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D tImage;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vec3 tImageColor = texture2D(tImage, vUv).xyz;\n  gl_FragColor = vec4(tImageColor, 1.0);\n}\n"});return(e=a.call(this,t,n)).name="Image",e.rotation.x=Math.PI/180*-90,e.position.y=-5,e}return t=s,(n=[{key:"start",value:function(e){this.material.uniforms.tImage.value=e}}])&&b(t.prototype,n),s}(r.Mesh);function P(e){return(P="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})(e)}function T(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)}}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e,t){return!t||"object"!==P(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function z(e){return(z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var L,C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&R(e,t)}(s,e);var t,n,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=z(i);if(o){var n=z(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return E(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=new r.SphereGeometry(100,64,64),n=new r.RawShaderMaterial({uniforms:{texture:{value:null}},vertexShader:"#define GLSLIFY 1\nattribute vec3 position;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec3 vPosition;\n\nvoid main() {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  vPosition = mPosition.xyz;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n",fragmentShader:"precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vPosition;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  float alpha = vPosition.z / 100.0 * 0.5 + 0.5;\n  vec3 hsv1 = vec3(0.49, 0.5, 0.7);\n  vec3 hsv2 = vec3(1.1, 0.1, 0.9);\n  vec3 rgb = mix(convertHsvToRgb(hsv1), convertHsvToRgb(hsv2), alpha);\n\n  gl_FragColor = vec4(rgb, 1.0);\n}\n",side:r.BackSide});return(e=a.call(this,t,n)).name="Background",e}return t=s,(n=[{key:"start",value:function(e){this.material.uniforms.texture.value=e}}])&&T(t.prototype,n),s}(r.Mesh);function A(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function O(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)}}var D,I=new r.Scene,k=new h,F=new r.Clock({autoStart:!1}),j=new r.TextureLoader,U=new g,B=new S,G=new C,N=new r.WebGLRenderTarget,H=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i,o;return t=e,(n=[{key:"start",value:(i=regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(L=new r.WebGLRenderer({alpha:!0,antialias:!0,canvas:t})).setPixelRatio(window.devicePixelRatio),L.setClearColor(16382457,1),(D=new a.z(k,L.domElement)).dampingFactor=.1,D.enableDamping=!0,D.enablePan=!1,D.enableZoom=!1,D.maxPolarAngle=Math.PI/180*80,e.next=11,Promise.all([j.loadAsync("/sketch-threejs/img/sketch/water/normal.jpg"),j.loadAsync("/sketch-threejs/img/sketch/water/image.jpg")]).then((function(e){e[0].wrapT=e[0].wrapS=r.RepeatWrapping,U.start(N.texture,e[0]),B.start(e[1])}));case 11:k.start(),I.add(B),I.add(U),I.add(G);case 15:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=i.apply(e,t);function a(e){A(o,n,r,a,s,"next",e)}function s(e){A(o,n,r,a,s,"throw",e)}a(void 0)}))},function(e){return o.apply(this,arguments)})},{key:"play",value:function(){F.start(),this.update()}},{key:"pause",value:function(){F.stop()}},{key:"update",value:function(){if(!1!==F.running){var e=F.getDelta();k.update(e),U.update(e),U.visible=!1,L.setRenderTarget(N),L.render(I,k),U.visible=!0,L.setRenderTarget(null),L.render(I,k),D.update()}}},{key:"resize",value:function(e){k.resize(e),U.resize(e),L.setSize(e.x,e.y),N.setSize(e.x,e.y)}}])&&O(t.prototype,n),e}();function V(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function W(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){V(o,r,i,a,s,"next",e)}function s(e){V(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Z(){return q.apply(this,arguments)}function q(){return(q=W(regeneratorRuntime.mark((function e(){var t,n,i,a,s,c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new H,n=new r.Vector2,i=document.getElementById("canvas-webgl"),a=document.querySelector(".p-preloader"),s=function(){n.set(document.body.clientWidth,window.innerHeight),i.width=n.x,i.height=n.y,t.resize(n)},c=function(){window.addEventListener("blur",(function(){t.pause()})),window.addEventListener("focus",(function(){t.play()})),window.addEventListener("resize",o()(s,100))},u=function e(){t.update(),requestAnimationFrame(e)},e.next=9,t.start(i);case 9:c(),s(),a.classList.add("is-hidden"),t.play(),u();case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},68154:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}});var i=n(2212),o=n(17393),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},force:{type:"f",value:0}},this.obj}var t,a;return t=e,(a=[{key:"createObj",value:function(){var e=new i.SphereGeometry(150,128,128,0,6.3,0,1.6),t=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(33491).Z,fragmentShader:n(77855).Z,side:i.BackSide});this.obj=new i.Mesh(e,t),this.obj.rotation.set(o.radians(-90),0,0)}},{key:"render",value:function(e,t){this.uniforms.force.value=t,this.uniforms.time.value+=e*(1.2*t)}}])&&r(t.prototype,a),e}()},87006:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=(n(17393),function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.positions=void 0,this.uniforms={time:{type:"f",value:0}},this.obj}var t,o;return t=e,(o=[{key:"createObj",value:function(){var e=new i.BufferGeometry;this.positions=new i.BufferAttribute(new Float32Array(204),3),e.setAttribute("position",this.positions);var t=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(6214).Z,fragmentShader:n(90984).Z,transparent:!0,depthWrite:!1,blending:i.AdditiveBlending});this.obj=new i.Points(e,t)}},{key:"setPositions",value:function(e,t,n){var r="user"===n.facingMode?-1:1;if(this.obj.visible=t>=.3,!1!==e){for(var i=0;i<this.positions.count;i++)this.positions.setXYZ(i,25*(e[i][0]/n.resolution.x*2-1)*r,-25*(e[i][1]/n.resolution.y*2-1),10);this.positions.needsUpdate=!0}}},{key:"render",value:function(e,t,n,r){this.uniforms.time.value+=e*(1.2*r.force.v),this.setPositions(t,n,r)}}])&&r(t.prototype,o),e}())},19309:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(2212),o=(n(17393),function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},texVideo:{type:"t",value:null},facing:{type:"f",value:0},resolution:{type:"v2",value:new i.Vector2},force:{type:"f",value:0}},this.obj}var t,o;return t=e,(o=[{key:"createObj",value:function(e){var t=new i.PlaneGeometry(50,50,2,2),r=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(3943).Z,fragmentShader:n(86607).Z,transparent:!0}),o=new i.VideoTexture(e.video);o.minFilter=i.LinearFilter,o.magFilter=i.LinearFilter,o.format=i.RGBFormat,this.uniforms.texVideo.value=o,this.uniforms.facing.value="user"===e.facingMode?1:0,this.uniforms.resolution.value.set(e.resolution.x,e.resolution.y),this.obj=new i.Mesh(t,r)}},{key:"resize",value:function(e){this.uniforms.resolution.value.set(e.resolution.x,e.resolution.y)}},{key:"render",value:function(e,t){var n=.008*t+1;this.uniforms.force.value=t,this.uniforms.time.value+=e*(1.2*t),this.obj.scale.set(n,n,n)}}])&&r(t.prototype,o),e}())},47067:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}});var i=n(2212),o=n(17393),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},force:{type:"f",value:0}},this.obj}var t,a;return t=e,(a=[{key:"createObj",value:function(){for(var e=new i.BufferGeometry,t=[],r=[],a=0;a<600;a+=3){var s=Math.random()*Math.random()*60+20,c=o.radians(360*Math.random());t[a+0]=Math.cos(c)*s,t[a+1]=Math.sin(c)*s,t[a+2]=0,r[a/3]=8*Math.random()}var u=new i.BufferAttribute(new Float32Array(t),3),l=new i.BufferAttribute(new Float32Array(r),1);e.setAttribute("position",u),e.setAttribute("delay",l);var f=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(60121).Z,fragmentShader:n(99907).Z,transparent:!0,depthWrite:!1});this.obj=new i.Points(e,f)}},{key:"render",value:function(e,t){this.uniforms.force.value=t,this.uniforms.time.value+=e*(1.2*t)}}])&&r(t.prototype,a),e}()},86711:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}});var i=n(2212),o=n(17393),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uniforms={time:{type:"f",value:0},force:{type:"f",value:0}},this.obj}var t,a;return t=e,(a=[{key:"createObj",value:function(){var e=new i.InstancedBufferGeometry,t=new i.BoxGeometry(1.2,1.2,18);e.copy(t);for(var r=new i.InstancedBufferAttribute(new Float32Array(360),3),a=new i.InstancedBufferAttribute(new Float32Array(120),1),s=0;s<120;s++){var c=Math.random()*Math.random()*40+40,u=o.radians(360*Math.random());r.setXYZ(s,Math.cos(u)*c,Math.sin(u)*c,0),a.setX(s,8*Math.random())}e.setAttribute("iPosition",r),e.setAttribute("iDelay",a);var l=new i.RawShaderMaterial({uniforms:this.uniforms,vertexShader:n(15337).Z,fragmentShader:n(19326).Z,transparent:!0,depthWrite:!1});this.obj=new i.InstancedMesh(e,l,120),this.obj.frustumCulled=!1}},{key:"render",value:function(e,t){this.uniforms.force.value=t,this.uniforms.time.value+=e*(1.2*t)}}])&&r(t.prototype,a),e}()},10988:function(e,t,n){"use strict";function r(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function i(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)}}n.d(t,{Z:function(){return s}});var o=n(2212),a=n(29130),s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.video=document.createElement("video"),this.facingMode=void 0,this.resolution={x:0,y:0},this.mouth=[new o.Vector2,new o.Vector2,new o.Vector2,new o.Vector2],this.force={a:0,v:1}}var t,n,s,c;return t=e,(n=[{key:"init",value:(s=regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(navigator.mediaDevices){e.next=2;break}return e.abrupt("return");case 2:return this.facingMode="user",e.next=5,navigator.mediaDevices.getUserMedia({audio:!1,video:{facingMode:this.facingMode}}).then((function(e){t.video.srcObject=e})).catch((function(e){window.alert("It wasn't allowed to use WebCam.")}));case 5:return this.video.setAttribute("playsinline",!0),this.video.setAttribute("controls",!0),this.video.play(),e.next=10,a(1e3);case 10:return this.resolution.x=this.video.width=this.video.videoWidth,this.resolution.y=this.video.height=this.video.videoHeight,e.abrupt("return");case 13:case"end":return e.stop()}}),e,this)})),c=function(){var e=this,t=arguments;return new Promise((function(n,i){var o=s.apply(e,t);function a(e){r(o,n,i,a,c,"next",e)}function c(e){r(o,n,i,a,c,"throw",e)}a(void 0)}))},function(){return c.apply(this,arguments)})},{key:"render",value:function(e,t){var n=0;if(t>=.3&&!1!==e){this.mouth[0].set(e[47][0],e[47][1]),this.mouth[1].set(e[60][0],e[60][1]),this.mouth[2].set(e[57][0],e[57][1]),this.mouth[3].set(e[53][0],e[53][1]);var r=this.mouth[0].distanceTo(this.mouth[1]),i=this.mouth[1].distanceTo(this.mouth[2]),o=this.mouth[2].distanceTo(this.mouth[3]);n=Math.max(i/(r+o)-1,0)}var a=.01*(1-this.force.v),s=.16*-this.force.a,c=.1*n;this.force.a+=a+s+c,this.force.v=this.force.v+this.force.a}}])&&i(t.prototype,n),e}()},89643:function(e,t,n){"use strict";function r(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,c,"next",e)}function c(e){r(a,i,o,s,c,"throw",e)}s(void 0)}))}}n.d(t,{Z:function(){return d}});var o=n(2212),a=n(38314),s=n(17393),c=n(10988).Z,u=n(19309).Z,l=n(47067).Z,f=n(86711).Z,h=n(87006).Z,v=n(68154).Z;function d(){return p.apply(this,arguments)}function p(){return(p=i(regeneratorRuntime.mark((function e(){var t,n,r,d,p,m,y,g,x,b,w,M,_,S,P,T,R,E;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new o.Vector2,n=document.getElementById("canvas-webgl"),r=new o.WebGL1Renderer({alpha:!0,antialias:!0,canvas:n}),d=new o.Scene,p=new o.PerspectiveCamera,m=new o.Clock({autoStart:!1}),y=new c,g=new u,x=new l,b=new f,w=new h,M=new v(0),_=new clm.tracker,S=function(){var e=i(regeneratorRuntime.mark((function e(){var t,n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=m.getDelta(),n=_.getCurrentPosition(),i=_.getScore(),y.render(n,i),g.render(t,y.force.v),x.render(t,y.force.v),b.render(t,y.force.v),w.render(t,n,i,y),M.render(t,y.force.v),r.render(d,p),e.abrupt("return");case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=function(){var e=i(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,S();case 2:return requestAnimationFrame(P),e.abrupt("return");case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),T=function(){p.aspect=t.x/t.y,p.updateProjectionMatrix(),p.setFocalLength(15*s.step(1,t.y/t.x)+35)},R=function(){var e=i(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.set(document.body.clientWidth,window.innerHeight),n.width=t.x,n.height=t.y,T(),r.setSize(t.x,t.y),e.next=7,y.init();case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),E=function(){window.addEventListener("resize",a((function(){R().then((function(){g.resize(y)}))}),500))},r.setClearColor(15658734,1),p.far=1e3,p.position.set(0,0,100),p.lookAt(new o.Vector3),m.start(),E(),e.next=26,R();case 26:g.createObj(y),x.createObj(),b.createObj(),w.createObj(),M.createObj(),g.obj.renderOrder=10,x.obj.renderOrder=2,b.obj.renderOrder=1,w.obj.renderOrder=20,d.add(g.obj),d.add(x.obj),d.add(b.obj),d.add(w.obj),d.add(M.obj),_.init(pModel),_.start(y.video),P();case 43:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},63424:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return o}});var i=n(67084).Z,o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.velocity=[0,0,0],this.acceleration=[0,0,0],this.anchor=[0,0,0],this.k=t&&void 0!==t.k?t.k:.3,this.d=t&&void 0!==t.d?t.d:.7,this.m=t&&void 0!==t.m?t.m:1}var t,n;return t=e,(n=[{key:"render",value:function(){i.applyHook(this.velocity,this.acceleration,this.anchor,0,this.k),i.applyDrag(this.acceleration,this.d),i.updateVelocity(this.velocity,this.acceleration,this.m)}}])&&r(t.prototype,n),e}()},95070:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return a}});var i=n(17393),o=n(5833),a=function(){function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scrollManager=n,this.hookes=r,this.elm=t,this.height=0,this.top=0,this.rangeX=i&&i.rangeX?i.rangeX:1e4,this.ratioX=i&&i.ratioX?i.ratioX:0,this.unitX=i&&i.unitX?i.unitX:"px",this.rangeY=i&&i.rangeY?i.rangeY:10,this.ratioY=i&&i.ratioY?i.ratioY:.012,this.unitY=i&&i.unitY?i.unitY:"%"}var t,n;return t=e,(n=[{key:"init",value:function(e){this.elm.style.transform="";var t=this.elm.getBoundingClientRect();this.height=t.height,this.top=e+t.top,this.elm.style.backfaceVisibility="hidden",this.render()}},{key:"render",value:function(e){var t=e?i.clamp(this.hookes.velocity[0]*this.ratioX,-1*this.rangeX,this.rangeX):0,n=e?i.clamp((this.hookes.velocity[1]-(this.top+.5*this.height))*this.ratioY,-1*this.rangeY,this.rangeY):0;this.elm.style.transform=o()?"translate(".concat(t).concat(this.unitX,", ").concat(n).concat(this.unitY,")"):"translate3D(".concat(t).concat(this.unitX,", ").concat(n).concat(this.unitY,", 0)")}}])&&r(t.prototype,n),e}()},39378:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return i}});var i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.elm=t,this.elmChildren=t.querySelectorAll(".js-scroll-item-child"),this.top=0,this.bottom=0}var t,n;return t=e,(n=[{key:"init",value:function(e){var t=this.elm.getBoundingClientRect();this.top=e+t.top,this.bottom=this.top+t.height}},{key:"show",value:function(e,t){if(e>this.top&&t<this.bottom){this.elm.classList.add("is-shown");for(var n=0;n<this.elmChildren.length;n++)this.elmChildren[n].classList.add("is-shown")}}}])&&r(t.prototype,n),e}()},12908:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return s}});var i=n(39378).Z,o=n(32579).Z,a=n(95070).Z,s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scrollManager=t,this.scrollItems=[],this.smoothItems=[],this.parallaxItems=[]}var t,n;return t=e,(n=[{key:"init",value:function(){var e=document.querySelectorAll(".js-scroll-item"),t=document.querySelectorAll(".js-smooth-item"),n=document.querySelectorAll(".js-parallax-item");this.scrollItems=[],this.smoothItems=[],this.parallaxItems=[];for(var r=0;r<e.length;r++)this.scrollItems[r]=new i(e[r],this.scrollManager);for(r=0;r<t.length;r++)this.smoothItems[r]=new o(t[r],this.scrollManager,this.scrollManager.hookes.smooth,t[r].dataset);for(r=0;r<n.length;r++)this.parallaxItems[r]=new a(n[r],this.scrollManager,this.scrollManager.hookes.parallax,n[r].dataset)}},{key:"scroll",value:function(){for(var e=0;e<this.scrollItems.length;e++)this.scrollItems[e].show(this.scrollManager.scrollTop+this.scrollManager.resolution.y,this.scrollManager.scrollTop)}},{key:"resize",value:function(){for(var e=0;e<this.scrollItems.length;e++)this.scrollItems[e].init(this.scrollManager.scrollTop);for(e=0;e<this.smoothItems.length;e++)this.smoothItems[e].init(this.scrollManager.scrollTop);for(e=0;e<this.parallaxItems.length;e++)this.parallaxItems[e].init(this.scrollManager.scrollTop)}},{key:"render",value:function(e){for(var t=0;t<this.smoothItems.length;t++)this.smoothItems[t].render(e);for(t=0;t<this.parallaxItems.length;t++)this.parallaxItems[t].render(e)}}])&&r(t.prototype,n),e}()},32579:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return i}});var i=function(){function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scrollManager=n,this.hookes=r,this.elm=t,this.height=0,this.top=0,this.max=i&&i.max?i.max:null,this.min=i&&i.min?i.min:null,this.ratio=i&&i.ratio?i.ratio:.1,this.unit=i&&i.unit?i.unit:"px"}var t,n;return t=e,(n=[{key:"init",value:function(e){var t=this.elm.getBoundingClientRect();this.height=t.height,this.top=e+t.top,this.elm.style.backfaceVisibility="hidden"}},{key:"render",value:function(e){var t=0;e&&(t=this.hookes.velocity[1]*this.ratio,Math.abs(this.hookes.acceleration[1])<.01&&(this.hookes.velocity[1]=this.hookes.anchor[1]),this.min&&(t=Math.max(t,this.min)),this.max&&(t=Math.min(t,this.max))),this.elm.style.transform="translate3D(0, ".concat(t).concat(this.unit,", 0)")}}])&&r(t.prototype,n),e}()},93604:function(e,t,n){"use strict";function r(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)}}n.d(t,{Z:function(){return f}});var i=n(38314),o=n(4679),a=n(71243),s=n(63424).Z,c=n(12908).Z,u=document.querySelector(".js-contents"),l=document.querySelector(".js-dummy-scroll"),f=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scrollItems=new c(this),this.scrollTop=0,this.scrollFrame=0,this.scrollTopPause=0,this.resolution={x:0,y:0},this.bodyResolution={x:0,y:0},this.X_SWITCH_SMOOTH=1024,this.hookes={},this.scrollPrev=null,this.scrollNext=null,this.resizeReset=null,this.resizePrev=null,this.resizeNext=null,this.renderPrev=null,this.renderNext=null,this.isWorking=!1,this.isWorkingSmooth=!1,this.isAlreadyAddEvent=!1}var t,n;return t=e,(n=[{key:"start",value:function(e){var t=this;setTimeout((function(){t.scrollTop=window.pageYOffset,t.initHookes(),t.scrollItems.init();var n=location.hash,r=n?document.querySelector(n):null;if(r){var i=r.getBoundingClientRect();t.scrollTop,i.top}t.resize((function(){t.scroll(),t.isWorkingSmooth=!0,t.renderLoop(),t.on(),e&&e()}))}),100)}},{key:"pause",value:function(){this.isWorking=!1,u.style.position="fixed",this.hookes.contents.velocity[1]=this.hookes.contents.anchor[1]=-1*this.scrollTop,this.scrollTopPause=this.scrollTop,window.scrollTo(0,this.scrollTop)}},{key:"play",value:function(){u.style.position="",this.scrollTop=this.scrollTopPause,this.resolution.x<=this.X_SWITCH_SMOOTH&&(this.hookes.contents.velocity[1]=this.hookes.contents.anchor[1]=0),window.scrollTo(0,this.scrollTop),this.isWorking=!0}},{key:"initDummyScroll",value:function(){this.resolution.x<=this.X_SWITCH_SMOOTH?(u.style.transform="",u.classList.remove("is-fixed"),l.style.height="0"):(u.classList.add("is-fixed"),l.style.height="".concat(u.clientHeight,"px")),this.render()}},{key:"initHookes",value:function(){this.hookes={contents:new s({k:.575,d:.8}),smooth:new s({k:.18,d:.75}),parallax:new s({k:.28,d:.7})}}},{key:"scrollBasis",value:function(){this.resolution.x>this.X_SWITCH_SMOOTH&&(this.hookes.contents.anchor[1]=-1*this.scrollTop,this.hookes.smooth.velocity[1]+=this.scrollFrame,this.hookes.parallax.anchor[1]=this.scrollTop+.5*this.resolution.y),this.scrollItems.scroll()}},{key:"scroll",value:function(e){if(!1!==this.isWorking){var t=window.pageYOffset;this.scrollFrame=t-this.scrollTop,this.scrollTop=t,this.scrollPrev&&this.scrollPrev(),this.scrollBasis(),this.scrollNext&&this.scrollNext()}}},{key:"tilt",value:function(e){!1!==this.isWorking&&this.resolution.x>this.X_SWITCH_SMOOTH&&(this.hookes.parallax.anchor[0]=-100*(e.clientX/this.resolution.x*2-1))}},{key:"resizeBasis",value:function(){this.scrollItems.resize()}},{key:"resize",value:function(e){if(this.isWorking=!1,this.resizeReset&&this.resizeReset(),this.scrollTop=window.pageYOffset,this.resolution.x=window.innerWidth,this.resolution.y=window.innerHeight,this.bodyResolution.x=document.body.clientWidth,this.bodyResolution.y=document.body.clientHeight,this.resolution.x>this.X_SWITCH_SMOOTH)this.hookes.contents.velocity[1]=this.hookes.contents.anchor[1]=-this.scrollTop,this.hookes.parallax.velocity[1]=this.hookes.parallax.anchor[1]=this.scrollTop+.5*this.resolution.y;else for(var t in this.hookes)switch(t){case"contents":case"parallax":this.hookes[t].anchor[1]=this.hookes[t].velocity[1]=0;break;default:this.hookes[t].velocity[1]=0}this.resizePrev&&this.resizePrev(),this.initDummyScroll(),this.render(),window.scrollTo(0,this.scrollTop),this.resizeBasis(),this.resizeNext&&this.resizeNext(),this.isWorking=!0,e&&e()}},{key:"render",value:function(){this.renderPrev&&this.renderPrev();var e=Math.floor(1e3*this.hookes.contents.velocity[1])/1e3;for(var t in u.style.transform="translate3D(0, ".concat(e,"px, 0)"),this.hookes)this.hookes[t].render();this.scrollItems.render(this.isValidSmooth()),this.renderNext&&this.renderNext()}},{key:"renderLoop",value:function(){var e=this;this.render(),this.isWorkingSmooth&&requestAnimationFrame((function(){e.renderLoop()}))}},{key:"on",value:function(){var e=this;if(!this.isAlreadyAddEvent){var t=o()||a()?"orientationchange":"resize";window.addEventListener("scroll",(function(t){e.scroll(t)}),!1),window.addEventListener("mousemove",(function(t){e.tilt(t)}),!1),window.addEventListener(t,i((function(t){e.resize()}),400),!1),this.isAlreadyAddEvent=!0}}},{key:"off",value:function(){this.scrollPrev=null,this.scrollNext=null,this.resizeReset=null,this.resizePrev=null,this.resizeNext=null,this.renderPrev=null,this.renderNext=null}},{key:"isValidSmooth",value:function(){return this.isWorkingSmooth&&this.resolution.x>this.X_SWITCH_SMOOTH}}])&&r(t.prototype,n),e}()},91685:function(e,t,n){var r;!function(){"use strict";var i=.5*(Math.sqrt(3)-1),o=(3-Math.sqrt(3))/6,a=1/6,s=(Math.sqrt(5)-1)/4,c=(5-Math.sqrt(5))/20;function u(e){var t;t="function"==typeof e?e:e?function(){var e=0,t=0,n=0,r=1,i=f();e=i(" "),t=i(" "),n=i(" ");for(var o=0;o<arguments.length;o++)(e-=i(arguments[o]))<0&&(e+=1),(t-=i(arguments[o]))<0&&(t+=1),(n-=i(arguments[o]))<0&&(n+=1);return i=null,function(){var i=2091639*e+2.3283064365386963e-10*r;return e=t,t=n,n=i-(r=0|i)}}(e):Math.random,this.p=l(t),this.perm=new Uint8Array(512),this.permMod12=new Uint8Array(512);for(var n=0;n<512;n++)this.perm[n]=this.p[255&n],this.permMod12[n]=this.perm[n]%12}function l(e){var t,n=new Uint8Array(256);for(t=0;t<256;t++)n[t]=t;for(t=0;t<255;t++){var r=t+~~(e()*(256-t)),i=n[t];n[t]=n[r],n[r]=i}return n}function f(){var e=4022871197;return function(t){t=t.toString();for(var n=0;n<t.length;n++){var r=.02519603282416938*(e+=t.charCodeAt(n));r-=e=r>>>0,e=(r*=e)>>>0,e+=4294967296*(r-=e)}return 2.3283064365386963e-10*(e>>>0)}}u.prototype={grad3:new Float32Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0,1,0,1,-1,0,1,1,0,-1,-1,0,-1,0,1,1,0,-1,1,0,1,-1,0,-1,-1]),grad4:new Float32Array([0,1,1,1,0,1,1,-1,0,1,-1,1,0,1,-1,-1,0,-1,1,1,0,-1,1,-1,0,-1,-1,1,0,-1,-1,-1,1,0,1,1,1,0,1,-1,1,0,-1,1,1,0,-1,-1,-1,0,1,1,-1,0,1,-1,-1,0,-1,1,-1,0,-1,-1,1,1,0,1,1,1,0,-1,1,-1,0,1,1,-1,0,-1,-1,1,0,1,-1,1,0,-1,-1,-1,0,1,-1,-1,0,-1,1,1,1,0,1,1,-1,0,1,-1,1,0,1,-1,-1,0,-1,1,1,0,-1,1,-1,0,-1,-1,1,0,-1,-1,-1,0]),noise2D:function(e,t){var n,r,a=this.permMod12,s=this.perm,c=this.grad3,u=0,l=0,f=0,h=(e+t)*i,v=Math.floor(e+h),d=Math.floor(t+h),p=(v+d)*o,m=e-(v-p),y=t-(d-p);m>y?(n=1,r=0):(n=0,r=1);var g=m-n+o,x=y-r+o,b=m-1+2*o,w=y-1+2*o,M=255&v,_=255&d,S=.5-m*m-y*y;if(S>=0){var P=3*a[M+s[_]];u=(S*=S)*S*(c[P]*m+c[P+1]*y)}var T=.5-g*g-x*x;if(T>=0){var R=3*a[M+n+s[_+r]];l=(T*=T)*T*(c[R]*g+c[R+1]*x)}var E=.5-b*b-w*w;if(E>=0){var z=3*a[M+1+s[_+1]];f=(E*=E)*E*(c[z]*b+c[z+1]*w)}return 70*(u+l+f)},noise3D:function(e,t,n){var r,i,o,s,c,u,l,f,h,v,d=this.permMod12,p=this.perm,m=this.grad3,y=.3333333333333333*(e+t+n),g=Math.floor(e+y),x=Math.floor(t+y),b=Math.floor(n+y),w=(g+x+b)*a,M=e-(g-w),_=t-(x-w),S=n-(b-w);M>=_?_>=S?(c=1,u=0,l=0,f=1,h=1,v=0):M>=S?(c=1,u=0,l=0,f=1,h=0,v=1):(c=0,u=0,l=1,f=1,h=0,v=1):_<S?(c=0,u=0,l=1,f=0,h=1,v=1):M<S?(c=0,u=1,l=0,f=0,h=1,v=1):(c=0,u=1,l=0,f=1,h=1,v=0);var P=M-c+a,T=_-u+a,R=S-l+a,E=M-f+2*a,z=_-h+2*a,L=S-v+2*a,C=M-1+.5,A=_-1+.5,O=S-1+.5,D=255&g,I=255&x,k=255&b,F=.6-M*M-_*_-S*S;if(F<0)r=0;else{var j=3*d[D+p[I+p[k]]];r=(F*=F)*F*(m[j]*M+m[j+1]*_+m[j+2]*S)}var U=.6-P*P-T*T-R*R;if(U<0)i=0;else{var B=3*d[D+c+p[I+u+p[k+l]]];i=(U*=U)*U*(m[B]*P+m[B+1]*T+m[B+2]*R)}var G=.6-E*E-z*z-L*L;if(G<0)o=0;else{var N=3*d[D+f+p[I+h+p[k+v]]];o=(G*=G)*G*(m[N]*E+m[N+1]*z+m[N+2]*L)}var H=.6-C*C-A*A-O*O;if(H<0)s=0;else{var V=3*d[D+1+p[I+1+p[k+1]]];s=(H*=H)*H*(m[V]*C+m[V+1]*A+m[V+2]*O)}return 32*(r+i+o+s)},noise4D:function(e,t,n,r){var i,o,a,u,l,f,h,v,d,p,m,y,g,x,b,w,M,_=this.perm,S=this.grad4,P=(e+t+n+r)*s,T=Math.floor(e+P),R=Math.floor(t+P),E=Math.floor(n+P),z=Math.floor(r+P),L=(T+R+E+z)*c,C=e-(T-L),A=t-(R-L),O=n-(E-L),D=r-(z-L),I=0,k=0,F=0,j=0;C>A?I++:k++,C>O?I++:F++,C>D?I++:j++,A>O?k++:F++,A>D?k++:j++,O>D?F++:j++;var U=C-(f=I>=3?1:0)+c,B=A-(h=k>=3?1:0)+c,G=O-(v=F>=3?1:0)+c,N=D-(d=j>=3?1:0)+c,H=C-(p=I>=2?1:0)+2*c,V=A-(m=k>=2?1:0)+2*c,W=O-(y=F>=2?1:0)+2*c,Z=D-(g=j>=2?1:0)+2*c,q=C-(x=I>=1?1:0)+3*c,Y=A-(b=k>=1?1:0)+3*c,X=O-(w=F>=1?1:0)+3*c,K=D-(M=j>=1?1:0)+3*c,Q=C-1+4*c,J=A-1+4*c,$=O-1+4*c,ee=D-1+4*c,te=255&T,ne=255&R,re=255&E,ie=255&z,oe=.6-C*C-A*A-O*O-D*D;if(oe<0)i=0;else{var ae=_[te+_[ne+_[re+_[ie]]]]%32*4;i=(oe*=oe)*oe*(S[ae]*C+S[ae+1]*A+S[ae+2]*O+S[ae+3]*D)}var se=.6-U*U-B*B-G*G-N*N;if(se<0)o=0;else{var ce=_[te+f+_[ne+h+_[re+v+_[ie+d]]]]%32*4;o=(se*=se)*se*(S[ce]*U+S[ce+1]*B+S[ce+2]*G+S[ce+3]*N)}var ue=.6-H*H-V*V-W*W-Z*Z;if(ue<0)a=0;else{var le=_[te+p+_[ne+m+_[re+y+_[ie+g]]]]%32*4;a=(ue*=ue)*ue*(S[le]*H+S[le+1]*V+S[le+2]*W+S[le+3]*Z)}var fe=.6-q*q-Y*Y-X*X-K*K;if(fe<0)u=0;else{var he=_[te+x+_[ne+b+_[re+w+_[ie+M]]]]%32*4;u=(fe*=fe)*fe*(S[he]*q+S[he+1]*Y+S[he+2]*X+S[he+3]*K)}var ve=.6-Q*Q-J*J-$*$-ee*ee;if(ve<0)l=0;else{var de=_[te+1+_[ne+1+_[re+1+_[ie+1]]]]%32*4;l=(ve*=ve)*ve*(S[de]*Q+S[de+1]*J+S[de+2]*$+S[de+3]*ee)}return 27*(i+o+a+u+l)}},u._buildPermutationTable=l,void 0===(r=function(){return u}.call(t,n,t,e))||(e.exports=r),t.SimplexNoise=u,e.exports=u}()},16266:function(e,t,n){n(95767),n(68132),n(48388),n(37470),n(94882),n(41520),n(27476),n(79622),n(89375),n(43533),n(84672),n(64157),n(35095),n(49892),n(75115),n(99176),n(68838),n(96253),n(39730),n(6059),n(48377),n(71084),n(64299),n(11246),n(30726),n(1901),n(75972),n(53403),n(92516),n(49371),n(86479),n(91736),n(51889),n(65177),n(81246),n(76503),n(66786),n(50932),n(57526),n(21591),n(9073),n(80347),n(30579),n(4669),n(67710),n(45789),n(33514),n(99978),n(58472),n(86946),n(35068),n(413),n(50191),n(98306),n(64564),n(39115),n(29539),n(96620),n(62850),n(10823),n(17732),n(40856),n(80703),n(91539),n(5292),n(45177),n(73694),n(37648),n(27795),n(4531),n(23605),n(6780),n(69937),n(10511),n(81822),n(19977),n(91031),n(46331),n(41560),n(20774),n(30522),n(58295),n(87842),n(50110),n(20075),n(24336),n(19371),n(98837),n(26773),n(15745),n(33057),n(3750),n(23369),n(99564),n(32e3),n(48977),n(52310),n(94899),n(31842),n(56997),n(83946),n(18269),n(66108),n(76774),n(21466),n(59357),n(76142),n(51876),n(40851),n(88416),n(98184),n(30147),n(59192),n(30142),n(1786),n(75368),n(46964),n(62152),n(74821),n(79103),n(81303),n(83318),n(70162),n(33834),n(21572),n(82139),n(10685),n(85535),n(17347),n(83049),n(96633),n(68989),n(78270),n(64510),n(73984),n(75769),n(50055),n(96014),e.exports=n(25645)},70911:function(e,t,n){n(1268),e.exports=n(25645).Array.flatMap},10990:function(e,t,n){n(62773),e.exports=n(25645).Array.includes},15434:function(e,t,n){n(83276),e.exports=n(25645).Object.entries},78051:function(e,t,n){n(98351),e.exports=n(25645).Object.getOwnPropertyDescriptors},38250:function(e,t,n){n(96409),e.exports=n(25645).Object.values},54952:function(e,t,n){"use strict";n(40851),n(9865),e.exports=n(25645).Promise.finally},6197:function(e,t,n){n(92770),e.exports=n(25645).String.padEnd},14160:function(e,t,n){n(41784),e.exports=n(25645).String.padStart},54039:function(e,t,n){n(94325),e.exports=n(25645).String.trimRight},96728:function(e,t,n){n(65869),e.exports=n(25645).String.trimLeft},93568:function(e,t,n){n(79665),e.exports=n(28787).f("asyncIterator")},40115:function(e,t,n){n(34579),e.exports=n(11327).global},85663:function(e){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},12159:function(e,t,n){var r=n(36727);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},11327:function(e){var t=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=t)},19216:function(e,t,n){var r=n(85663);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},89666:function(e,t,n){e.exports=!n(7929)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},97467:function(e,t,n){var r=n(36727),i=n(33938).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},83856:function(e,t,n){var r=n(33938),i=n(11327),o=n(19216),a=n(41818),s=n(27069),c=function(e,t,n){var u,l,f,h=e&c.F,v=e&c.G,d=e&c.S,p=e&c.P,m=e&c.B,y=e&c.W,g=v?i:i[t]||(i[t]={}),x=g.prototype,b=v?r:d?r[t]:(r[t]||{}).prototype;for(u in v&&(n=t),n)(l=!h&&b&&void 0!==b[u])&&s(g,u)||(f=l?b[u]:n[u],g[u]=v&&"function"!=typeof b[u]?n[u]:m&&l?o(f,r):y&&b[u]==f?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(f):p&&"function"==typeof f?o(Function.call,f):f,p&&((g.virtual||(g.virtual={}))[u]=f,e&c.R&&x&&!x[u]&&a(x,u,f)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},7929:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},33938:function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)},27069:function(e){var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},41818:function(e,t,n){var r=n(4743),i=n(83101);e.exports=n(89666)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},33758:function(e,t,n){e.exports=!n(89666)&&!n(7929)((function(){return 7!=Object.defineProperty(n(97467)("div"),"a",{get:function(){return 7}}).a}))},36727:function(e){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},4743:function(e,t,n){var r=n(12159),i=n(33758),o=n(33206),a=Object.defineProperty;t.f=n(89666)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},83101:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},33206:function(e,t,n){var r=n(36727);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},34579:function(e,t,n){var r=n(83856);r(r.G,{global:n(33938)})},24963:function(e){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},83365:function(e,t,n){var r=n(92032);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},17722:function(e,t,n){var r=n(86314)("unscopables"),i=Array.prototype;null==i[r]&&n(87728)(i,r,{}),e.exports=function(e){i[r][e]=!0}},76793:function(e,t,n){"use strict";var r=n(24496)(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},83328:function(e){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},27007:function(e,t,n){var r=n(55286);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},5216:function(e,t,n){"use strict";var r=n(20508),i=n(92337),o=n(10875);e.exports=[].copyWithin||function(e,t){var n=r(this),a=o(n.length),s=i(e,a),c=i(t,a),u=arguments.length>2?arguments[2]:void 0,l=Math.min((void 0===u?a:i(u,a))-c,a-s),f=1;for(c<s&&s<c+l&&(f=-1,c+=l-1,s+=l-1);l-- >0;)c in n?n[s]=n[c]:delete n[s],s+=f,c+=f;return n}},46852:function(e,t,n){"use strict";var r=n(20508),i=n(92337),o=n(10875);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,u=void 0===c?n:i(c,n);u>s;)t[s++]=e;return t}},79315:function(e,t,n){var r=n(22110),i=n(10875),o=n(92337);e.exports=function(e){return function(t,n,a){var s,c=r(t),u=i(c.length),l=o(a,u);if(e&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((e||l in c)&&c[l]===n)return e||l||0;return!e&&-1}}},10050:function(e,t,n){var r=n(741),i=n(49797),o=n(20508),a=n(10875),s=n(16886);e.exports=function(e,t){var n=1==e,c=2==e,u=3==e,l=4==e,f=6==e,h=5==e||f,v=t||s;return function(t,s,d){for(var p,m,y=o(t),g=i(y),x=r(s,d,3),b=a(g.length),w=0,M=n?v(t,b):c?v(t,0):void 0;b>w;w++)if((h||w in g)&&(m=x(p=g[w],w,y),e))if(n)M[w]=m;else if(m)switch(e){case 3:return!0;case 5:return p;case 6:return w;case 2:M.push(p)}else if(l)return!1;return f?-1:u||l?l:M}}},37628:function(e,t,n){var r=n(24963),i=n(20508),o=n(49797),a=n(10875);e.exports=function(e,t,n,s,c){r(t);var u=i(e),l=o(u),f=a(u.length),h=c?f-1:0,v=c?-1:1;if(n<2)for(;;){if(h in l){s=l[h],h+=v;break}if(h+=v,c?h<0:f<=h)throw TypeError("Reduce of empty array with no initial value")}for(;c?h>=0:f>h;h+=v)h in l&&(s=t(s,l[h],h,u));return s}},42736:function(e,t,n){var r=n(55286),i=n(4302),o=n(86314)("species");e.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&null===(t=t[o])&&(t=void 0)),void 0===t?Array:t}},16886:function(e,t,n){var r=n(42736);e.exports=function(e,t){return new(r(e))(t)}},34398:function(e,t,n){"use strict";var r=n(24963),i=n(55286),o=n(97242),a=[].slice,s={},c=function(e,t,n){if(!(t in s)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";s[t]=Function("F,a","return new F("+r.join(",")+")")}return s[t](e,n)};e.exports=Function.bind||function(e){var t=r(this),n=a.call(arguments,1),s=function(){var r=n.concat(a.call(arguments));return this instanceof s?c(t,r.length,r):o(t,r,e)};return i(t.prototype)&&(s.prototype=t.prototype),s}},41488:function(e,t,n){var r=n(92032),i=n(86314)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},92032:function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},9824:function(e,t,n){"use strict";var r=n(99275).f,i=n(42503),o=n(24408),a=n(741),s=n(83328),c=n(3531),u=n(42923),l=n(15436),f=n(2974),h=n(67057),v=n(84728).fastKey,d=n(1616),p=h?"_s":"size",m=function(e,t){var n,r=v(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,u){var l=e((function(e,r){s(e,l,t,"_i"),e._t=t,e._i=i(null),e._f=void 0,e._l=void 0,e[p]=0,null!=r&&c(r,n,e[u],e)}));return o(l.prototype,{clear:function(){for(var e=d(this,t),n=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];e._f=e._l=void 0,e[p]=0},delete:function(e){var n=d(this,t),r=m(n,e);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[p]--}return!!r},forEach:function(e){d(this,t);for(var n,r=a(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!m(d(this,t),e)}}),h&&r(l.prototype,"size",{get:function(){return d(this,t)[p]}}),l},def:function(e,t,n){var r,i,o=m(e,t);return o?o.v=n:(e._l=o={i:i=v(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=o),r&&(r.n=o),e[p]++,"F"!==i&&(e._i[i]=o)),e},getEntry:m,setStrong:function(e,t,n){u(e,t,(function(e,n){this._t=d(e,t),this._k=n,this._l=void 0}),(function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?l(0,"keys"==t?n.k:"values"==t?n.v:[n.k,n.v]):(e._t=void 0,l(1))}),n?"entries":"values",!n,!0),f(t)}}},23657:function(e,t,n){"use strict";var r=n(24408),i=n(84728).getWeak,o=n(27007),a=n(55286),s=n(83328),c=n(3531),u=n(10050),l=n(79181),f=n(1616),h=u(5),v=u(6),d=0,p=function(e){return e._l||(e._l=new m)},m=function(){this.a=[]},y=function(e,t){return h(e.a,(function(e){return e[0]===t}))};m.prototype={get:function(e){var t=y(this,e);if(t)return t[1]},has:function(e){return!!y(this,e)},set:function(e,t){var n=y(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=v(this.a,(function(t){return t[0]===e}));return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,o){var u=e((function(e,r){s(e,u,t,"_i"),e._t=t,e._i=d++,e._l=void 0,null!=r&&c(r,n,e[o],e)}));return r(u.prototype,{delete:function(e){if(!a(e))return!1;var n=i(e);return!0===n?p(f(this,t)).delete(e):n&&l(n,this._i)&&delete n[this._i]},has:function(e){if(!a(e))return!1;var n=i(e);return!0===n?p(f(this,t)).has(e):n&&l(n,this._i)}}),u},def:function(e,t,n){var r=i(o(t),!0);return!0===r?p(e).set(t,n):r[e._i]=n,e},ufstore:p}},45795:function(e,t,n){"use strict";var r=n(3816),i=n(42985),o=n(77234),a=n(24408),s=n(84728),c=n(3531),u=n(83328),l=n(55286),f=n(74253),h=n(7462),v=n(22943),d=n(40266);e.exports=function(e,t,n,p,m,y){var g=r[e],x=g,b=m?"set":"add",w=x&&x.prototype,M={},_=function(e){var t=w[e];o(w,e,"delete"==e||"has"==e?function(e){return!(y&&!l(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return y&&!l(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof x&&(y||w.forEach&&!f((function(){(new x).entries().next()})))){var S=new x,P=S[b](y?{}:-0,1)!=S,T=f((function(){S.has(1)})),R=h((function(e){new x(e)})),E=!y&&f((function(){for(var e=new x,t=5;t--;)e[b](t,t);return!e.has(-0)}));R||((x=t((function(t,n){u(t,x,e);var r=d(new g,t,x);return null!=n&&c(n,m,r[b],r),r}))).prototype=w,w.constructor=x),(T||E)&&(_("delete"),_("has"),m&&_("get")),(E||P)&&_(b),y&&w.clear&&delete w.clear}else x=p.getConstructor(t,e,m,b),a(x.prototype,n),s.NEED=!0;return v(x,e),M[e]=x,i(i.G+i.W+i.F*(x!=g),M),y||p.setStrong(x,e,m),x}},25645:function(e){var t=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=t)},92811:function(e,t,n){"use strict";var r=n(99275),i=n(90681);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},741:function(e,t,n){var r=n(24963);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},53537:function(e,t,n){"use strict";var r=n(74253),i=Date.prototype.getTime,o=Date.prototype.toISOString,a=function(e){return e>9?e:"0"+e};e.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-50000000000001))}))||!r((function(){o.call(new Date(NaN))}))?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+a(e.getUTCMonth()+1)+"-"+a(e.getUTCDate())+"T"+a(e.getUTCHours())+":"+a(e.getUTCMinutes())+":"+a(e.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:o},870:function(e,t,n){"use strict";var r=n(27007),i=n(21689),o="number";e.exports=function(e){if("string"!==e&&e!==o&&"default"!==e)throw TypeError("Incorrect hint");return i(r(this),e!=o)}},91355:function(e){e.exports=function(e){if(null==e)throw TypeError("Can't call method on  "+e);return e}},67057:function(e,t,n){e.exports=!n(74253)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},62457:function(e,t,n){var r=n(55286),i=n(3816).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},74430:function(e){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},5541:function(e,t,n){var r=n(47184),i=n(64548),o=n(14682);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var a,s=n(e),c=o.f,u=0;s.length>u;)c.call(e,a=s[u++])&&t.push(a);return t}},42985:function(e,t,n){var r=n(3816),i=n(25645),o=n(87728),a=n(77234),s=n(741),c=function(e,t,n){var u,l,f,h,v=e&c.F,d=e&c.G,p=e&c.S,m=e&c.P,y=e&c.B,g=d?r:p?r[t]||(r[t]={}):(r[t]||{}).prototype,x=d?i:i[t]||(i[t]={}),b=x.prototype||(x.prototype={});for(u in d&&(n=t),n)f=((l=!v&&g&&void 0!==g[u])?g:n)[u],h=y&&l?s(f,r):m&&"function"==typeof f?s(Function.call,f):f,g&&a(g,u,f,e&c.U),x[u]!=f&&o(x,u,h),m&&b[u]!=f&&(b[u]=f)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},8852:function(e,t,n){var r=n(86314)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(e){}}return!0}},74253:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},28082:function(e,t,n){"use strict";n(18269);var r=n(77234),i=n(87728),o=n(74253),a=n(91355),s=n(86314),c=n(21165),u=s("species"),l=!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),f=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var h=s(e),v=!o((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),d=v?!o((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[u]=function(){return n}),n[h](""),!t})):void 0;if(!v||!d||"replace"===e&&!l||"split"===e&&!f){var p=/./[h],m=n(a,h,""[e],(function(e,t,n,r,i){return t.exec===c?v&&!i?{done:!0,value:p.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),y=m[0],g=m[1];r(String.prototype,e,y),i(RegExp.prototype,h,2==t?function(e,t){return g.call(e,this,t)}:function(e){return g.call(e,this)})}}},53218:function(e,t,n){"use strict";var r=n(27007);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},13325:function(e,t,n){"use strict";var r=n(4302),i=n(55286),o=n(10875),a=n(741),s=n(86314)("isConcatSpreadable");e.exports=function e(t,n,c,u,l,f,h,v){for(var d,p,m=l,y=0,g=!!h&&a(h,v,3);y<u;){if(y in c){if(d=g?g(c[y],y,n):c[y],p=!1,i(d)&&(p=void 0!==(p=d[s])?!!p:r(d)),p&&f>0)m=e(t,n,d,o(d.length),m,f-1)-1;else{if(m>=9007199254740991)throw TypeError();t[m]=d}m++}y++}return m}},3531:function(e,t,n){var r=n(741),i=n(28851),o=n(86555),a=n(27007),s=n(10875),c=n(69002),u={},l={},f=e.exports=function(e,t,n,f,h){var v,d,p,m,y=h?function(){return e}:c(e),g=r(n,f,t?2:1),x=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(o(y)){for(v=s(e.length);v>x;x++)if((m=t?g(a(d=e[x])[0],d[1]):g(e[x]))===u||m===l)return m}else for(p=y.call(e);!(d=p.next()).done;)if((m=i(p,g,d.value,t))===u||m===l)return m};f.BREAK=u,f.RETURN=l},40018:function(e,t,n){e.exports=n(3825)("native-function-to-string",Function.toString)},3816:function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)},79181:function(e){var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},87728:function(e,t,n){var r=n(99275),i=n(90681);e.exports=n(67057)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},40639:function(e,t,n){var r=n(3816).document;e.exports=r&&r.documentElement},1734:function(e,t,n){e.exports=!n(67057)&&!n(74253)((function(){return 7!=Object.defineProperty(n(62457)("div"),"a",{get:function(){return 7}}).a}))},40266:function(e,t,n){var r=n(55286),i=n(27375).set;e.exports=function(e,t,n){var o,a=t.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(e,o),e}},97242:function(e){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},49797:function(e,t,n){var r=n(92032);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},86555:function(e,t,n){var r=n(87234),i=n(86314)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},4302:function(e,t,n){var r=n(92032);e.exports=Array.isArray||function(e){return"Array"==r(e)}},18367:function(e,t,n){var r=n(55286),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},55286:function(e){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},55364:function(e,t,n){var r=n(55286),i=n(92032),o=n(86314)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},28851:function(e,t,n){var r=n(27007);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},49988:function(e,t,n){"use strict";var r=n(42503),i=n(90681),o=n(22943),a={};n(87728)(a,n(86314)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},42923:function(e,t,n){"use strict";var r=n(4461),i=n(42985),o=n(77234),a=n(87728),s=n(87234),c=n(49988),u=n(22943),l=n(468),f=n(86314)("iterator"),h=!([].keys&&"next"in[].keys()),v="keys",d="values",p=function(){return this};e.exports=function(e,t,n,m,y,g,x){c(n,t,m);var b,w,M,_=function(e){if(!h&&e in R)return R[e];switch(e){case v:case d:return function(){return new n(this,e)}}return function(){return new n(this,e)}},S=t+" Iterator",P=y==d,T=!1,R=e.prototype,E=R[f]||R["@@iterator"]||y&&R[y],z=E||_(y),L=y?P?_("entries"):z:void 0,C="Array"==t&&R.entries||E;if(C&&(M=l(C.call(new e)))!==Object.prototype&&M.next&&(u(M,S,!0),r||"function"==typeof M[f]||a(M,f,p)),P&&E&&E.name!==d&&(T=!0,z=function(){return E.call(this)}),r&&!x||!h&&!T&&R[f]||a(R,f,z),s[t]=z,s[S]=p,y)if(b={values:P?z:_(d),keys:g?z:_(v),entries:L},x)for(w in b)w in R||o(R,w,b[w]);else i(i.P+i.F*(h||T),t,b);return b}},7462:function(e,t,n){var r=n(86314)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},e(o)}catch(e){}return n}},15436:function(e){e.exports=function(e,t){return{value:t,done:!!e}}},87234:function(e){e.exports={}},4461:function(e){e.exports=!1},13086:function(e){var t=Math.expm1;e.exports=!t||t(10)>22025.465794806718||t(10)<22025.465794806718||-2e-17!=t(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:t},34934:function(e,t,n){var r=n(61801),i=Math.pow,o=i(2,-52),a=i(2,-23),s=i(2,127)*(2-a),c=i(2,-126);e.exports=Math.fround||function(e){var t,n,i=Math.abs(e),u=r(e);return i<c?u*(i/c/a+1/o-1/o)*c*a:(n=(t=(1+a/o)*i)-(t-i))>s||n!=n?u*(1/0):u*n}},46206:function(e){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},61801:function(e){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},84728:function(e,t,n){var r=n(93953)("meta"),i=n(55286),o=n(79181),a=n(99275).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(74253)((function(){return c(Object.preventExtensions({}))})),l=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},f=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!c(e))return"F";if(!t)return"E";l(e)}return e[r].i},getWeak:function(e,t){if(!o(e,r)){if(!c(e))return!0;if(!t)return!1;l(e)}return e[r].w},onFreeze:function(e){return u&&f.NEED&&c(e)&&!o(e,r)&&l(e),e}}},14351:function(e,t,n){var r=n(3816),i=n(74193).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,c="process"==n(92032)(a);e.exports=function(){var e,t,n,u=function(){var r,i;for(c&&(r=a.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(u)};else if(!o||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var l=s.resolve(void 0);n=function(){l.then(u)}}else n=function(){i.call(r,u)};else{var f=!0,h=document.createTextNode("");new o(u).observe(h,{characterData:!0}),n=function(){h.data=f=!f}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},43499:function(e,t,n){"use strict";var r=n(24963);function i(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new i(e)}},35345:function(e,t,n){"use strict";var r=n(67057),i=n(47184),o=n(64548),a=n(14682),s=n(20508),c=n(49797),u=Object.assign;e.exports=!u||n(74253)((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r}))?function(e,t){for(var n=s(e),u=arguments.length,l=1,f=o.f,h=a.f;u>l;)for(var v,d=c(arguments[l++]),p=f?i(d).concat(f(d)):i(d),m=p.length,y=0;m>y;)v=p[y++],r&&!h.call(d,v)||(n[v]=d[v]);return n}:u},42503:function(e,t,n){var r=n(27007),i=n(35588),o=n(74430),a=n(69335)("IE_PROTO"),s=function(){},c=function(){var e,t=n(62457)("iframe"),r=o.length;for(t.style.display="none",n(40639).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;r--;)delete c.prototype[o[r]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[a]=e):n=c(),void 0===t?n:i(n,t)}},99275:function(e,t,n){var r=n(27007),i=n(1734),o=n(21689),a=Object.defineProperty;t.f=n(67057)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},35588:function(e,t,n){var r=n(99275),i=n(27007),o=n(47184);e.exports=n(67057)?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),s=a.length,c=0;s>c;)r.f(e,n=a[c++],t[n]);return e}},18693:function(e,t,n){var r=n(14682),i=n(90681),o=n(22110),a=n(21689),s=n(79181),c=n(1734),u=Object.getOwnPropertyDescriptor;t.f=n(67057)?u:function(e,t){if(e=o(e),t=a(t,!0),c)try{return u(e,t)}catch(e){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},39327:function(e,t,n){var r=n(22110),i=n(20616).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(r(e))}},20616:function(e,t,n){var r=n(60189),i=n(74430).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},64548:function(e,t){t.f=Object.getOwnPropertySymbols},468:function(e,t,n){var r=n(79181),i=n(20508),o=n(69335)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},60189:function(e,t,n){var r=n(79181),i=n(22110),o=n(79315)(!1),a=n(69335)("IE_PROTO");e.exports=function(e,t){var n,s=i(e),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;t.length>c;)r(s,n=t[c++])&&(~o(u,n)||u.push(n));return u}},47184:function(e,t,n){var r=n(60189),i=n(74430);e.exports=Object.keys||function(e){return r(e,i)}},14682:function(e,t){t.f={}.propertyIsEnumerable},33160:function(e,t,n){var r=n(42985),i=n(25645),o=n(74253);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*o((function(){n(1)})),"Object",a)}},51131:function(e,t,n){var r=n(67057),i=n(47184),o=n(22110),a=n(14682).f;e.exports=function(e){return function(t){for(var n,s=o(t),c=i(s),u=c.length,l=0,f=[];u>l;)n=c[l++],r&&!a.call(s,n)||f.push(e?[n,s[n]]:s[n]);return f}}},57643:function(e,t,n){var r=n(20616),i=n(64548),o=n(27007),a=n(3816).Reflect;e.exports=a&&a.ownKeys||function(e){var t=r.f(o(e)),n=i.f;return n?t.concat(n(e)):t}},47743:function(e,t,n){var r=n(3816).parseFloat,i=n(29599).trim;e.exports=1/r(n(84644)+"-0")!=-1/0?function(e){var t=i(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},55960:function(e,t,n){var r=n(3816).parseInt,i=n(29599).trim,o=n(84644),a=/^[-+]?0[xX]/;e.exports=8!==r(o+"08")||22!==r(o+"0x16")?function(e,t){var n=i(String(e),3);return r(n,t>>>0||(a.test(n)?16:10))}:r},10188:function(e){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},50094:function(e,t,n){var r=n(27007),i=n(55286),o=n(43499);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},90681:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},24408:function(e,t,n){var r=n(77234);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},77234:function(e,t,n){var r=n(3816),i=n(87728),o=n(79181),a=n(93953)("src"),s=n(40018),c="toString",u=(""+s).split(c);n(25645).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var c="function"==typeof n;c&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(c&&(o(n,a)||i(n,a,e[t]?""+e[t]:u.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,c,(function(){return"function"==typeof this&&this[a]||s.call(this)}))},27787:function(e,t,n){"use strict";var r=n(41488),i=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},21165:function(e,t,n){"use strict";var r,i,o=n(53218),a=RegExp.prototype.exec,s=String.prototype.replace,c=a,u=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),l=void 0!==/()??/.exec("")[1];(u||l)&&(c=function(e){var t,n,r,i,c=this;return l&&(n=new RegExp("^"+c.source+"$(?!\\s)",o.call(c))),u&&(t=c.lastIndex),r=a.call(c,e),u&&r&&(c.lastIndex=c.global?r.index+r[0].length:t),l&&r&&r.length>1&&s.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),e.exports=c},27195:function(e){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},27375:function(e,t,n){var r=n(55286),i=n(27007),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(741)(Function.call,n(18693).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},2974:function(e,t,n){"use strict";var r=n(3816),i=n(99275),o=n(67057),a=n(86314)("species");e.exports=function(e){var t=r[e];o&&t&&!t[a]&&i.f(t,a,{configurable:!0,get:function(){return this}})}},22943:function(e,t,n){var r=n(99275).f,i=n(79181),o=n(86314)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},69335:function(e,t,n){var r=n(3825)("keys"),i=n(93953);e.exports=function(e){return r[e]||(r[e]=i(e))}},3825:function(e,t,n){var r=n(25645),i=n(3816),o="__core-js_shared__",a=i[o]||(i[o]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(4461)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},58364:function(e,t,n){var r=n(27007),i=n(24963),o=n(86314)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},77717:function(e,t,n){"use strict";var r=n(74253);e.exports=function(e,t){return!!e&&r((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},24496:function(e,t,n){var r=n(81467),i=n(91355);e.exports=function(e){return function(t,n){var o,a,s=String(i(t)),c=r(n),u=s.length;return c<0||c>=u?e?"":void 0:(o=s.charCodeAt(c))<55296||o>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?e?s.charAt(c):o:e?s.slice(c,c+2):a-56320+(o-55296<<10)+65536}}},42094:function(e,t,n){var r=n(55364),i=n(91355);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(e))}},29395:function(e,t,n){var r=n(42985),i=n(74253),o=n(91355),a=/"/g,s=function(e,t,n,r){var i=String(o(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,"&quot;")+'"'),s+">"+i+"</"+t+">"};e.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*i((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})),"String",n)}},75442:function(e,t,n){var r=n(10875),i=n(68595),o=n(91355);e.exports=function(e,t,n,a){var s=String(o(e)),c=s.length,u=void 0===n?" ":String(n),l=r(t);if(l<=c||""==u)return s;var f=l-c,h=i.call(u,Math.ceil(f/u.length));return h.length>f&&(h=h.slice(0,f)),a?h+s:s+h}},68595:function(e,t,n){"use strict";var r=n(81467),i=n(91355);e.exports=function(e){var t=String(i(this)),n="",o=r(e);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},29599:function(e,t,n){var r=n(42985),i=n(91355),o=n(74253),a=n(84644),s="["+a+"]",c=RegExp("^"+s+s+"*"),u=RegExp(s+s+"*$"),l=function(e,t,n){var i={},s=o((function(){return!!a[e]()||"​…"!="​…"[e]()})),c=i[e]=s?t(f):a[e];n&&(i[n]=c),r(r.P+r.F*s,"String",i)},f=l.trim=function(e,t){return e=String(i(e)),1&t&&(e=e.replace(c,"")),2&t&&(e=e.replace(u,"")),e};e.exports=l},84644:function(e){e.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},74193:function(e,t,n){var r,i,o,a=n(741),s=n(97242),c=n(40639),u=n(62457),l=n(3816),f=l.process,h=l.setImmediate,v=l.clearImmediate,d=l.MessageChannel,p=l.Dispatch,m=0,y={},g=function(){var e=+this;if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},x=function(e){g.call(e.data)};h&&v||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return y[++m]=function(){s("function"==typeof e?e:Function(e),t)},r(m),m},v=function(e){delete y[e]},"process"==n(92032)(f)?r=function(e){f.nextTick(a(g,e,1))}:p&&p.now?r=function(e){p.now(a(g,e,1))}:d?(o=(i=new d).port2,i.port1.onmessage=x,r=a(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(e){l.postMessage(e+"","*")},l.addEventListener("message",x,!1)):r="onreadystatechange"in u("script")?function(e){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),g.call(e)}}:function(e){setTimeout(a(g,e,1),0)}),e.exports={set:h,clear:v}},92337:function(e,t,n){var r=n(81467),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):o(e,t)}},94843:function(e,t,n){var r=n(81467),i=n(10875);e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=i(t);if(t!==n)throw RangeError("Wrong length!");return n}},81467:function(e){var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},22110:function(e,t,n){var r=n(49797),i=n(91355);e.exports=function(e){return r(i(e))}},10875:function(e,t,n){var r=n(81467),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},20508:function(e,t,n){var r=n(91355);e.exports=function(e){return Object(r(e))}},21689:function(e,t,n){var r=n(55286);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},78440:function(e,t,n){"use strict";if(n(67057)){var r=n(4461),i=n(3816),o=n(74253),a=n(42985),s=n(89383),c=n(91125),u=n(741),l=n(83328),f=n(90681),h=n(87728),v=n(24408),d=n(81467),p=n(10875),m=n(94843),y=n(92337),g=n(21689),x=n(79181),b=n(41488),w=n(55286),M=n(20508),_=n(86555),S=n(42503),P=n(468),T=n(20616).f,R=n(69002),E=n(93953),z=n(86314),L=n(10050),C=n(79315),A=n(58364),O=n(56997),D=n(87234),I=n(7462),k=n(2974),F=n(46852),j=n(5216),U=n(99275),B=n(18693),G=U.f,N=B.f,H=i.RangeError,V=i.TypeError,W=i.Uint8Array,Z="ArrayBuffer",q="SharedArrayBuffer",Y="BYTES_PER_ELEMENT",X=Array.prototype,K=c.ArrayBuffer,Q=c.DataView,J=L(0),$=L(2),ee=L(3),te=L(4),ne=L(5),re=L(6),ie=C(!0),oe=C(!1),ae=O.values,se=O.keys,ce=O.entries,ue=X.lastIndexOf,le=X.reduce,fe=X.reduceRight,he=X.join,ve=X.sort,de=X.slice,pe=X.toString,me=X.toLocaleString,ye=z("iterator"),ge=z("toStringTag"),xe=E("typed_constructor"),be=E("def_constructor"),we=s.CONSTR,Me=s.TYPED,_e=s.VIEW,Se="Wrong length!",Pe=L(1,(function(e,t){return Le(A(e,e[be]),t)})),Te=o((function(){return 1===new W(new Uint16Array([1]).buffer)[0]})),Re=!!W&&!!W.prototype.set&&o((function(){new W(1).set({})})),Ee=function(e,t){var n=d(e);if(n<0||n%t)throw H("Wrong offset!");return n},ze=function(e){if(w(e)&&Me in e)return e;throw V(e+" is not a typed array!")},Le=function(e,t){if(!w(e)||!(xe in e))throw V("It is not a typed array constructor!");return new e(t)},Ce=function(e,t){return Ae(A(e,e[be]),t)},Ae=function(e,t){for(var n=0,r=t.length,i=Le(e,r);r>n;)i[n]=t[n++];return i},Oe=function(e,t,n){G(e,t,{get:function(){return this._d[n]}})},De=function(e){var t,n,r,i,o,a,s=M(e),c=arguments.length,l=c>1?arguments[1]:void 0,f=void 0!==l,h=R(s);if(null!=h&&!_(h)){for(a=h.call(s),r=[],t=0;!(o=a.next()).done;t++)r.push(o.value);s=r}for(f&&c>2&&(l=u(l,arguments[2],2)),t=0,n=p(s.length),i=Le(this,n);n>t;t++)i[t]=f?l(s[t],t):s[t];return i},Ie=function(){for(var e=0,t=arguments.length,n=Le(this,t);t>e;)n[e]=arguments[e++];return n},ke=!!W&&o((function(){me.call(new W(1))})),Fe=function(){return me.apply(ke?de.call(ze(this)):ze(this),arguments)},je={copyWithin:function(e,t){return j.call(ze(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return te(ze(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return F.apply(ze(this),arguments)},filter:function(e){return Ce(this,$(ze(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return ne(ze(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return re(ze(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){J(ze(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return oe(ze(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return ie(ze(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return he.apply(ze(this),arguments)},lastIndexOf:function(e){return ue.apply(ze(this),arguments)},map:function(e){return Pe(ze(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return le.apply(ze(this),arguments)},reduceRight:function(e){return fe.apply(ze(this),arguments)},reverse:function(){for(var e,t=this,n=ze(t).length,r=Math.floor(n/2),i=0;i<r;)e=t[i],t[i++]=t[--n],t[n]=e;return t},some:function(e){return ee(ze(this),e,arguments.length>1?arguments[1]:void 0)},sort:function(e){return ve.call(ze(this),e)},subarray:function(e,t){var n=ze(this),r=n.length,i=y(e,r);return new(A(n,n[be]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,p((void 0===t?r:y(t,r))-i))}},Ue=function(e,t){return Ce(this,de.call(ze(this),e,t))},Be=function(e){ze(this);var t=Ee(arguments[1],1),n=this.length,r=M(e),i=p(r.length),o=0;if(i+t>n)throw H(Se);for(;o<i;)this[t+o]=r[o++]},Ge={entries:function(){return ce.call(ze(this))},keys:function(){return se.call(ze(this))},values:function(){return ae.call(ze(this))}},Ne=function(e,t){return w(e)&&e[Me]&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},He=function(e,t){return Ne(e,t=g(t,!0))?f(2,e[t]):N(e,t)},Ve=function(e,t,n){return!(Ne(e,t=g(t,!0))&&w(n)&&x(n,"value"))||x(n,"get")||x(n,"set")||n.configurable||x(n,"writable")&&!n.writable||x(n,"enumerable")&&!n.enumerable?G(e,t,n):(e[t]=n.value,e)};we||(B.f=He,U.f=Ve),a(a.S+a.F*!we,"Object",{getOwnPropertyDescriptor:He,defineProperty:Ve}),o((function(){pe.call({})}))&&(pe=me=function(){return he.call(this)});var We=v({},je);v(We,Ge),h(We,ye,Ge.values),v(We,{slice:Ue,set:Be,constructor:function(){},toString:pe,toLocaleString:Fe}),Oe(We,"buffer","b"),Oe(We,"byteOffset","o"),Oe(We,"byteLength","l"),Oe(We,"length","e"),G(We,ge,{get:function(){return this[Me]}}),e.exports=function(e,t,n,c){var u=e+((c=!!c)?"Clamped":"")+"Array",f="get"+e,v="set"+e,d=i[u],y=d||{},g=d&&P(d),x=!d||!s.ABV,M={},_=d&&d.prototype,R=function(e,n){G(e,n,{get:function(){return function(e,n){var r=e._d;return r.v[f](n*t+r.o,Te)}(this,n)},set:function(e){return function(e,n,r){var i=e._d;c&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),i.v[v](n*t+i.o,r,Te)}(this,n,e)},enumerable:!0})};x?(d=n((function(e,n,r,i){l(e,d,u,"_d");var o,a,s,c,f=0,v=0;if(w(n)){if(!(n instanceof K||(c=b(n))==Z||c==q))return Me in n?Ae(d,n):De.call(d,n);o=n,v=Ee(r,t);var y=n.byteLength;if(void 0===i){if(y%t)throw H(Se);if((a=y-v)<0)throw H(Se)}else if((a=p(i)*t)+v>y)throw H(Se);s=a/t}else s=m(n),o=new K(a=s*t);for(h(e,"_d",{b:o,o:v,l:a,e:s,v:new Q(o)});f<s;)R(e,f++)})),_=d.prototype=S(We),h(_,"constructor",d)):o((function(){d(1)}))&&o((function(){new d(-1)}))&&I((function(e){new d,new d(null),new d(1.5),new d(e)}),!0)||(d=n((function(e,n,r,i){var o;return l(e,d,u),w(n)?n instanceof K||(o=b(n))==Z||o==q?void 0!==i?new y(n,Ee(r,t),i):void 0!==r?new y(n,Ee(r,t)):new y(n):Me in n?Ae(d,n):De.call(d,n):new y(m(n))})),J(g!==Function.prototype?T(y).concat(T(g)):T(y),(function(e){e in d||h(d,e,y[e])})),d.prototype=_,r||(_.constructor=d));var E=_[ye],z=!!E&&("values"==E.name||null==E.name),L=Ge.values;h(d,xe,!0),h(_,Me,u),h(_,_e,!0),h(_,be,d),(c?new d(1)[ge]==u:ge in _)||G(_,ge,{get:function(){return u}}),M[u]=d,a(a.G+a.W+a.F*(d!=y),M),a(a.S,u,{BYTES_PER_ELEMENT:t}),a(a.S+a.F*o((function(){y.of.call(d,1)})),u,{from:De,of:Ie}),Y in _||h(_,Y,t),a(a.P,u,je),k(u),a(a.P+a.F*Re,u,{set:Be}),a(a.P+a.F*!z,u,Ge),r||_.toString==pe||(_.toString=pe),a(a.P+a.F*o((function(){new d(1).slice()})),u,{slice:Ue}),a(a.P+a.F*(o((function(){return[1,2].toLocaleString()!=new d([1,2]).toLocaleString()}))||!o((function(){_.toLocaleString.call([1,2])}))),u,{toLocaleString:Fe}),D[u]=z?E:L,r||z||h(_,ye,L)}}else e.exports=function(){}},91125:function(e,t,n){"use strict";var r=n(3816),i=n(67057),o=n(4461),a=n(89383),s=n(87728),c=n(24408),u=n(74253),l=n(83328),f=n(81467),h=n(10875),v=n(94843),d=n(20616).f,p=n(99275).f,m=n(46852),y=n(22943),g="ArrayBuffer",x="DataView",b="Wrong index!",w=r.ArrayBuffer,M=r.DataView,_=r.Math,S=r.RangeError,P=r.Infinity,T=w,R=_.abs,E=_.pow,z=_.floor,L=_.log,C=_.LN2,A="buffer",O="byteLength",D="byteOffset",I=i?"_b":A,k=i?"_l":O,F=i?"_o":D;function j(e,t,n){var r,i,o,a=new Array(n),s=8*n-t-1,c=(1<<s)-1,u=c>>1,l=23===t?E(2,-24)-E(2,-77):0,f=0,h=e<0||0===e&&1/e<0?1:0;for((e=R(e))!=e||e===P?(i=e!=e?1:0,r=c):(r=z(L(e)/C),e*(o=E(2,-r))<1&&(r--,o*=2),(e+=r+u>=1?l/o:l*E(2,1-u))*o>=2&&(r++,o/=2),r+u>=c?(i=0,r=c):r+u>=1?(i=(e*o-1)*E(2,t),r+=u):(i=e*E(2,u-1)*E(2,t),r=0));t>=8;a[f++]=255&i,i/=256,t-=8);for(r=r<<t|i,s+=t;s>0;a[f++]=255&r,r/=256,s-=8);return a[--f]|=128*h,a}function U(e,t,n){var r,i=8*n-t-1,o=(1<<i)-1,a=o>>1,s=i-7,c=n-1,u=e[c--],l=127&u;for(u>>=7;s>0;l=256*l+e[c],c--,s-=8);for(r=l&(1<<-s)-1,l>>=-s,s+=t;s>0;r=256*r+e[c],c--,s-=8);if(0===l)l=1-a;else{if(l===o)return r?NaN:u?-P:P;r+=E(2,t),l-=a}return(u?-1:1)*r*E(2,l-t)}function B(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function G(e){return[255&e]}function N(e){return[255&e,e>>8&255]}function H(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function V(e){return j(e,52,8)}function W(e){return j(e,23,4)}function Z(e,t,n){p(e.prototype,t,{get:function(){return this[n]}})}function q(e,t,n,r){var i=v(+n);if(i+t>e[k])throw S(b);var o=e[I]._b,a=i+e[F],s=o.slice(a,a+t);return r?s:s.reverse()}function Y(e,t,n,r,i,o){var a=v(+n);if(a+t>e[k])throw S(b);for(var s=e[I]._b,c=a+e[F],u=r(+i),l=0;l<t;l++)s[c+l]=u[o?l:t-l-1]}if(a.ABV){if(!u((function(){w(1)}))||!u((function(){new w(-1)}))||u((function(){return new w,new w(1.5),new w(NaN),w.name!=g}))){for(var X,K=(w=function(e){return l(this,w),new T(v(e))}).prototype=T.prototype,Q=d(T),J=0;Q.length>J;)(X=Q[J++])in w||s(w,X,T[X]);o||(K.constructor=w)}var $=new M(new w(2)),ee=M.prototype.setInt8;$.setInt8(0,2147483648),$.setInt8(1,2147483649),!$.getInt8(0)&&$.getInt8(1)||c(M.prototype,{setInt8:function(e,t){ee.call(this,e,t<<24>>24)},setUint8:function(e,t){ee.call(this,e,t<<24>>24)}},!0)}else w=function(e){l(this,w,g);var t=v(e);this._b=m.call(new Array(t),0),this[k]=t},M=function(e,t,n){l(this,M,x),l(e,w,x);var r=e[k],i=f(t);if(i<0||i>r)throw S("Wrong offset!");if(i+(n=void 0===n?r-i:h(n))>r)throw S("Wrong length!");this[I]=e,this[F]=i,this[k]=n},i&&(Z(w,O,"_l"),Z(M,A,"_b"),Z(M,O,"_l"),Z(M,D,"_o")),c(M.prototype,{getInt8:function(e){return q(this,1,e)[0]<<24>>24},getUint8:function(e){return q(this,1,e)[0]},getInt16:function(e){var t=q(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=q(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return B(q(this,4,e,arguments[1]))},getUint32:function(e){return B(q(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return U(q(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return U(q(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){Y(this,1,e,G,t)},setUint8:function(e,t){Y(this,1,e,G,t)},setInt16:function(e,t){Y(this,2,e,N,t,arguments[2])},setUint16:function(e,t){Y(this,2,e,N,t,arguments[2])},setInt32:function(e,t){Y(this,4,e,H,t,arguments[2])},setUint32:function(e,t){Y(this,4,e,H,t,arguments[2])},setFloat32:function(e,t){Y(this,4,e,W,t,arguments[2])},setFloat64:function(e,t){Y(this,8,e,V,t,arguments[2])}});y(w,g),y(M,x),s(M.prototype,a.VIEW,!0),t.ArrayBuffer=w,t.DataView=M},89383:function(e,t,n){for(var r,i=n(3816),o=n(87728),a=n(93953),s=a("typed_array"),c=a("view"),u=!(!i.ArrayBuffer||!i.DataView),l=u,f=0,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");f<9;)(r=i[h[f++]])?(o(r.prototype,s,!0),o(r.prototype,c,!0)):l=!1;e.exports={ABV:u,CONSTR:l,TYPED:s,VIEW:c}},93953:function(e){var t=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++t+n).toString(36))}},30575:function(e,t,n){var r=n(3816).navigator;e.exports=r&&r.userAgent||""},1616:function(e,t,n){var r=n(55286);e.exports=function(e,t){if(!r(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},36074:function(e,t,n){var r=n(3816),i=n(25645),o=n(4461),a=n(28787),s=n(99275).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},28787:function(e,t,n){t.f=n(86314)},86314:function(e,t,n){var r=n(3825)("wks"),i=n(93953),o=n(3816).Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},69002:function(e,t,n){var r=n(41488),i=n(86314)("iterator"),o=n(87234);e.exports=n(25645).getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},32e3:function(e,t,n){var r=n(42985);r(r.P,"Array",{copyWithin:n(5216)}),n(17722)("copyWithin")},15745:function(e,t,n){"use strict";var r=n(42985),i=n(10050)(4);r(r.P+r.F*!n(77717)([].every,!0),"Array",{every:function(e){return i(this,e,arguments[1])}})},48977:function(e,t,n){var r=n(42985);r(r.P,"Array",{fill:n(46852)}),n(17722)("fill")},98837:function(e,t,n){"use strict";var r=n(42985),i=n(10050)(2);r(r.P+r.F*!n(77717)([].filter,!0),"Array",{filter:function(e){return i(this,e,arguments[1])}})},94899:function(e,t,n){"use strict";var r=n(42985),i=n(10050)(6),o="findIndex",a=!0;o in[]&&Array(1)[o]((function(){a=!1})),r(r.P+r.F*a,"Array",{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(17722)(o)},52310:function(e,t,n){"use strict";var r=n(42985),i=n(10050)(5),o="find",a=!0;o in[]&&Array(1).find((function(){a=!1})),r(r.P+r.F*a,"Array",{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(17722)(o)},24336:function(e,t,n){"use strict";var r=n(42985),i=n(10050)(0),o=n(77717)([].forEach,!0);r(r.P+r.F*!o,"Array",{forEach:function(e){return i(this,e,arguments[1])}})},30522:function(e,t,n){"use strict";var r=n(741),i=n(42985),o=n(20508),a=n(28851),s=n(86555),c=n(10875),u=n(92811),l=n(69002);i(i.S+i.F*!n(7462)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,i,f,h=o(e),v="function"==typeof this?this:Array,d=arguments.length,p=d>1?arguments[1]:void 0,m=void 0!==p,y=0,g=l(h);if(m&&(p=r(p,d>2?arguments[2]:void 0,2)),null==g||v==Array&&s(g))for(n=new v(t=c(h.length));t>y;y++)u(n,y,m?p(h[y],y):h[y]);else for(f=g.call(h),n=new v;!(i=f.next()).done;y++)u(n,y,m?a(f,p,[i.value,y],!0):i.value);return n.length=y,n}})},23369:function(e,t,n){"use strict";var r=n(42985),i=n(79315)(!1),o=[].indexOf,a=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(77717)(o)),"Array",{indexOf:function(e){return a?o.apply(this,arguments)||0:i(this,e,arguments[1])}})},20774:function(e,t,n){var r=n(42985);r(r.S,"Array",{isArray:n(4302)})},56997:function(e,t,n){"use strict";var r=n(17722),i=n(15436),o=n(87234),a=n(22110);e.exports=n(42923)(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},87842:function(e,t,n){"use strict";var r=n(42985),i=n(22110),o=[].join;r(r.P+r.F*(n(49797)!=Object||!n(77717)(o)),"Array",{join:function(e){return o.call(i(this),void 0===e?",":e)}})},99564:function(e,t,n){"use strict";var r=n(42985),i=n(22110),o=n(81467),a=n(10875),s=[].lastIndexOf,c=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(c||!n(77717)(s)),"Array",{lastIndexOf:function(e){if(c)return s.apply(this,arguments)||0;var t=i(this),n=a(t.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},19371:function(e,t,n){"use strict";var r=n(42985),i=n(10050)(1);r(r.P+r.F*!n(77717)([].map,!0),"Array",{map:function(e){return i(this,e,arguments[1])}})},58295:function(e,t,n){"use strict";var r=n(42985),i=n(92811);r(r.S+r.F*n(74253)((function(){function e(){}return!(Array.of.call(e)instanceof e)})),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},3750:function(e,t,n){"use strict";var r=n(42985),i=n(37628);r(r.P+r.F*!n(77717)([].reduceRight,!0),"Array",{reduceRight:function(e){return i(this,e,arguments.length,arguments[1],!0)}})},33057:function(e,t,n){"use strict";var r=n(42985),i=n(37628);r(r.P+r.F*!n(77717)([].reduce,!0),"Array",{reduce:function(e){return i(this,e,arguments.length,arguments[1],!1)}})},50110:function(e,t,n){"use strict";var r=n(42985),i=n(40639),o=n(92032),a=n(92337),s=n(10875),c=[].slice;r(r.P+r.F*n(74253)((function(){i&&c.call(i)})),"Array",{slice:function(e,t){var n=s(this.length),r=o(this);if(t=void 0===t?n:t,"Array"==r)return c.call(this,e,t);for(var i=a(e,n),u=a(t,n),l=s(u-i),f=new Array(l),h=0;h<l;h++)f[h]="String"==r?this.charAt(i+h):this[i+h];return f}})},26773:function(e,t,n){"use strict";var r=n(42985),i=n(10050)(3);r(r.P+r.F*!n(77717)([].some,!0),"Array",{some:function(e){return i(this,e,arguments[1])}})},20075:function(e,t,n){"use strict";var r=n(42985),i=n(24963),o=n(20508),a=n(74253),s=[].sort,c=[1,2,3];r(r.P+r.F*(a((function(){c.sort(void 0)}))||!a((function(){c.sort(null)}))||!n(77717)(s)),"Array",{sort:function(e){return void 0===e?s.call(o(this)):s.call(o(this),i(e))}})},31842:function(e,t,n){n(2974)("Array")},81822:function(e,t,n){var r=n(42985);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},91031:function(e,t,n){var r=n(42985),i=n(53537);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},19977:function(e,t,n){"use strict";var r=n(42985),i=n(20508),o=n(21689);r(r.P+r.F*n(74253)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(e){var t=i(this),n=o(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},41560:function(e,t,n){var r=n(86314)("toPrimitive"),i=Date.prototype;r in i||n(87728)(i,r,n(870))},46331:function(e,t,n){var r=Date.prototype,i="Invalid Date",o=r.toString,a=r.getTime;new Date(NaN)+""!=i&&n(77234)(r,"toString",(function(){var e=a.call(this);return e==e?o.call(this):i}))},39730:function(e,t,n){var r=n(42985);r(r.P,"Function",{bind:n(34398)})},48377:function(e,t,n){"use strict";var r=n(55286),i=n(468),o=n(86314)("hasInstance"),a=Function.prototype;o in a||n(99275).f(a,o,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=i(e);)if(this.prototype===e)return!0;return!1}})},6059:function(e,t,n){var r=n(99275).f,i=Function.prototype,o=/^\s*function ([^ (]*)/,a="name";a in i||n(67057)&&r(i,a,{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(e){return""}}})},88416:function(e,t,n){"use strict";var r=n(9824),i=n(1616),o="Map";e.exports=n(45795)(o,(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(e){var t=r.getEntry(i(this,o),e);return t&&t.v},set:function(e,t){return r.def(i(this,o),0===e?0:e,t)}},r,!0)},76503:function(e,t,n){var r=n(42985),i=n(46206),o=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:i(e-1+o(e-1)*o(e+1))}})},66786:function(e,t,n){var r=n(42985),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Math.log(t+Math.sqrt(t*t+1)):t}})},50932:function(e,t,n){var r=n(42985),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},57526:function(e,t,n){var r=n(42985),i=n(61801);r(r.S,"Math",{cbrt:function(e){return i(e=+e)*Math.pow(Math.abs(e),1/3)}})},21591:function(e,t,n){var r=n(42985);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},9073:function(e,t,n){var r=n(42985),i=Math.exp;r(r.S,"Math",{cosh:function(e){return(i(e=+e)+i(-e))/2}})},80347:function(e,t,n){var r=n(42985),i=n(13086);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},30579:function(e,t,n){var r=n(42985);r(r.S,"Math",{fround:n(34934)})},4669:function(e,t,n){var r=n(42985),i=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,o=0,a=0,s=arguments.length,c=0;a<s;)c<(n=i(arguments[a++]))?(o=o*(r=c/n)*r+1,c=n):o+=n>0?(r=n/c)*r:n;return c===1/0?1/0:c*Math.sqrt(o)}})},67710:function(e,t,n){var r=n(42985),i=Math.imul;r(r.S+r.F*n(74253)((function(){return-5!=i(4294967295,5)||2!=i.length})),"Math",{imul:function(e,t){var n=65535,r=+e,i=+t,o=n&r,a=n&i;return 0|o*a+((n&r>>>16)*a+o*(n&i>>>16)<<16>>>0)}})},45789:function(e,t,n){var r=n(42985);r(r.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},33514:function(e,t,n){var r=n(42985);r(r.S,"Math",{log1p:n(46206)})},99978:function(e,t,n){var r=n(42985);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},58472:function(e,t,n){var r=n(42985);r(r.S,"Math",{sign:n(61801)})},86946:function(e,t,n){var r=n(42985),i=n(13086),o=Math.exp;r(r.S+r.F*n(74253)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(i(e)-i(-e))/2:(o(e-1)-o(-e-1))*(Math.E/2)}})},35068:function(e,t,n){var r=n(42985),i=n(13086),o=Math.exp;r(r.S,"Math",{tanh:function(e){var t=i(e=+e),n=i(-e);return t==1/0?1:n==1/0?-1:(t-n)/(o(e)+o(-e))}})},413:function(e,t,n){var r=n(42985);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},11246:function(e,t,n){"use strict";var r=n(3816),i=n(79181),o=n(92032),a=n(40266),s=n(21689),c=n(74253),u=n(20616).f,l=n(18693).f,f=n(99275).f,h=n(29599).trim,v="Number",d=r.Number,p=d,m=d.prototype,y=o(n(42503)(m))==v,g="trim"in String.prototype,x=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){var n,r,i,o=(t=g?t.trim():h(t,3)).charCodeAt(0);if(43===o||45===o){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===o){switch(t.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+t}for(var a,c=t.slice(2),u=0,l=c.length;u<l;u++)if((a=c.charCodeAt(u))<48||a>i)return NaN;return parseInt(c,r)}}return+t};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof d&&(y?c((function(){m.valueOf.call(n)})):o(n)!=v)?a(new p(x(t)),n,d):x(t)};for(var b,w=n(67057)?u(p):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),M=0;w.length>M;M++)i(p,b=w[M])&&!i(d,b)&&f(d,b,l(p,b));d.prototype=m,m.constructor=d,n(77234)(r,v,d)}},75972:function(e,t,n){var r=n(42985);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},53403:function(e,t,n){var r=n(42985),i=n(3816).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&i(e)}})},92516:function(e,t,n){var r=n(42985);r(r.S,"Number",{isInteger:n(18367)})},49371:function(e,t,n){var r=n(42985);r(r.S,"Number",{isNaN:function(e){return e!=e}})},86479:function(e,t,n){var r=n(42985),i=n(18367),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return i(e)&&o(e)<=9007199254740991}})},91736:function(e,t,n){var r=n(42985);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},51889:function(e,t,n){var r=n(42985);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},65177:function(e,t,n){var r=n(42985),i=n(47743);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},81246:function(e,t,n){var r=n(42985),i=n(55960);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},30726:function(e,t,n){"use strict";var r=n(42985),i=n(81467),o=n(83365),a=n(68595),s=1..toFixed,c=Math.floor,u=[0,0,0,0,0,0],l="Number.toFixed: incorrect invocation!",f="0",h=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*u[n],u[n]=r%1e7,r=c(r/1e7)},v=function(e){for(var t=6,n=0;--t>=0;)n+=u[t],u[t]=c(n/e),n=n%e*1e7},d=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==u[e]){var n=String(u[e]);t=""===t?n:t+a.call(f,7-n.length)+n}return t},p=function(e,t,n){return 0===t?n:t%2==1?p(e,t-1,n*e):p(e*e,t/2,n)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(74253)((function(){s.call({})}))),"Number",{toFixed:function(e){var t,n,r,s,c=o(this,l),u=i(e),m="",y=f;if(u<0||u>20)throw RangeError(l);if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(m="-",c=-c),c>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(c*p(2,69,1))-69)<0?c*p(2,-t,1):c/p(2,t,1),n*=4503599627370496,(t=52-t)>0){for(h(0,n),r=u;r>=7;)h(1e7,0),r-=7;for(h(p(10,r,1),0),r=t-1;r>=23;)v(1<<23),r-=23;v(1<<r),h(1,1),v(2),y=d()}else h(0,n),h(1<<-t,0),y=d()+a.call(f,u);return u>0?m+((s=y.length)<=u?"0."+a.call(f,u-s)+y:y.slice(0,s-u)+"."+y.slice(s-u)):m+y}})},1901:function(e,t,n){"use strict";var r=n(42985),i=n(74253),o=n(83365),a=1..toPrecision;r(r.P+r.F*(i((function(){return"1"!==a.call(1,void 0)}))||!i((function(){a.call({})}))),"Number",{toPrecision:function(e){var t=o(this,"Number#toPrecision: incorrect invocation!");return void 0===e?a.call(t):a.call(t,e)}})},75115:function(e,t,n){var r=n(42985);r(r.S+r.F,"Object",{assign:n(35345)})},68132:function(e,t,n){var r=n(42985);r(r.S,"Object",{create:n(42503)})},37470:function(e,t,n){var r=n(42985);r(r.S+r.F*!n(67057),"Object",{defineProperties:n(35588)})},48388:function(e,t,n){var r=n(42985);r(r.S+r.F*!n(67057),"Object",{defineProperty:n(99275).f})},89375:function(e,t,n){var r=n(55286),i=n(84728).onFreeze;n(33160)("freeze",(function(e){return function(t){return e&&r(t)?e(i(t)):t}}))},94882:function(e,t,n){var r=n(22110),i=n(18693).f;n(33160)("getOwnPropertyDescriptor",(function(){return function(e,t){return i(r(e),t)}}))},79622:function(e,t,n){n(33160)("getOwnPropertyNames",(function(){return n(39327).f}))},41520:function(e,t,n){var r=n(20508),i=n(468);n(33160)("getPrototypeOf",(function(){return function(e){return i(r(e))}}))},49892:function(e,t,n){var r=n(55286);n(33160)("isExtensible",(function(e){return function(t){return!!r(t)&&(!e||e(t))}}))},64157:function(e,t,n){var r=n(55286);n(33160)("isFrozen",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},35095:function(e,t,n){var r=n(55286);n(33160)("isSealed",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},99176:function(e,t,n){var r=n(42985);r(r.S,"Object",{is:n(27195)})},27476:function(e,t,n){var r=n(20508),i=n(47184);n(33160)("keys",(function(){return function(e){return i(r(e))}}))},84672:function(e,t,n){var r=n(55286),i=n(84728).onFreeze;n(33160)("preventExtensions",(function(e){return function(t){return e&&r(t)?e(i(t)):t}}))},43533:function(e,t,n){var r=n(55286),i=n(84728).onFreeze;n(33160)("seal",(function(e){return function(t){return e&&r(t)?e(i(t)):t}}))},68838:function(e,t,n){var r=n(42985);r(r.S,"Object",{setPrototypeOf:n(27375).set})},96253:function(e,t,n){"use strict";var r=n(41488),i={};i[n(86314)("toStringTag")]="z",i+""!="[object z]"&&n(77234)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},64299:function(e,t,n){var r=n(42985),i=n(47743);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},71084:function(e,t,n){var r=n(42985),i=n(55960);r(r.G+r.F*(parseInt!=i),{parseInt:i})},40851:function(e,t,n){"use strict";var r,i,o,a,s=n(4461),c=n(3816),u=n(741),l=n(41488),f=n(42985),h=n(55286),v=n(24963),d=n(83328),p=n(3531),m=n(58364),y=n(74193).set,g=n(14351)(),x=n(43499),b=n(10188),w=n(30575),M=n(50094),_="Promise",S=c.TypeError,P=c.process,T=P&&P.versions,R=T&&T.v8||"",E=c.Promise,z="process"==l(P),L=function(){},C=i=x.f,A=!!function(){try{var e=E.resolve(1),t=(e.constructor={})[n(86314)("species")]=function(e){e(L,L)};return(z||"function"==typeof PromiseRejectionEvent)&&e.then(L)instanceof t&&0!==R.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(e){}}(),O=function(e){var t;return!(!h(e)||"function"!=typeof(t=e.then))&&t},D=function(e,t){if(!e._n){e._n=!0;var n=e._c;g((function(){for(var r=e._v,i=1==e._s,o=0,a=function(t){var n,o,a,s=i?t.ok:t.fail,c=t.resolve,u=t.reject,l=t.domain;try{s?(i||(2==e._h&&F(e),e._h=1),!0===s?n=r:(l&&l.enter(),n=s(r),l&&(l.exit(),a=!0)),n===t.promise?u(S("Promise-chain cycle")):(o=O(n))?o.call(n,c,u):c(n)):u(r)}catch(e){l&&!a&&l.exit(),u(e)}};n.length>o;)a(n[o++]);e._c=[],e._n=!1,t&&!e._h&&I(e)}))}},I=function(e){y.call(c,(function(){var t,n,r,i=e._v,o=k(e);if(o&&(t=b((function(){z?P.emit("unhandledRejection",i,e):(n=c.onunhandledrejection)?n({promise:e,reason:i}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",i)})),e._h=z||k(e)?2:1),e._a=void 0,o&&t.e)throw t.v}))},k=function(e){return 1!==e._h&&0===(e._a||e._c).length},F=function(e){y.call(c,(function(){var t;z?P.emit("rejectionHandled",e):(t=c.onrejectionhandled)&&t({promise:e,reason:e._v})}))},j=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),D(t,!0))},U=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw S("Promise can't be resolved itself");(t=O(e))?g((function(){var r={_w:n,_d:!1};try{t.call(e,u(U,r,1),u(j,r,1))}catch(e){j.call(r,e)}})):(n._v=e,n._s=1,D(n,!1))}catch(e){j.call({_w:n,_d:!1},e)}}};A||(E=function(e){d(this,E,_,"_h"),v(e),r.call(this);try{e(u(U,this,1),u(j,this,1))}catch(e){j.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(24408)(E.prototype,{then:function(e,t){var n=C(m(this,E));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=z?P.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&D(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r;this.promise=e,this.resolve=u(U,e,1),this.reject=u(j,e,1)},x.f=C=function(e){return e===E||e===a?new o(e):i(e)}),f(f.G+f.W+f.F*!A,{Promise:E}),n(22943)(E,_),n(2974)(_),a=n(25645).Promise,f(f.S+f.F*!A,_,{reject:function(e){var t=C(this);return(0,t.reject)(e),t.promise}}),f(f.S+f.F*(s||!A),_,{resolve:function(e){return M(s&&this===a?E:this,e)}}),f(f.S+f.F*!(A&&n(7462)((function(e){E.all(e).catch(L)}))),_,{all:function(e){var t=this,n=C(t),r=n.resolve,i=n.reject,o=b((function(){var n=[],o=0,a=1;p(e,!1,(function(e){var s=o++,c=!1;n.push(void 0),a++,t.resolve(e).then((function(e){c||(c=!0,n[s]=e,--a||r(n))}),i)})),--a||r(n)}));return o.e&&i(o.v),n.promise},race:function(e){var t=this,n=C(t),r=n.reject,i=b((function(){p(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return i.e&&r(i.v),n.promise}})},21572:function(e,t,n){var r=n(42985),i=n(24963),o=n(27007),a=(n(3816).Reflect||{}).apply,s=Function.apply;r(r.S+r.F*!n(74253)((function(){a((function(){}))})),"Reflect",{apply:function(e,t,n){var r=i(e),c=o(n);return a?a(r,t,c):s.call(r,t,c)}})},82139:function(e,t,n){var r=n(42985),i=n(42503),o=n(24963),a=n(27007),s=n(55286),c=n(74253),u=n(34398),l=(n(3816).Reflect||{}).construct,f=c((function(){function e(){}return!(l((function(){}),[],e)instanceof e)})),h=!c((function(){l((function(){}))}));r(r.S+r.F*(f||h),"Reflect",{construct:function(e,t){o(e),a(t);var n=arguments.length<3?e:o(arguments[2]);if(h&&!f)return l(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(u.apply(e,r))}var c=n.prototype,v=i(s(c)?c:Object.prototype),d=Function.apply.call(e,v,t);return s(d)?d:v}})},10685:function(e,t,n){var r=n(99275),i=n(42985),o=n(27007),a=n(21689);i(i.S+i.F*n(74253)((function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})})),"Reflect",{defineProperty:function(e,t,n){o(e),t=a(t,!0),o(n);try{return r.f(e,t,n),!0}catch(e){return!1}}})},85535:function(e,t,n){var r=n(42985),i=n(18693).f,o=n(27007);r(r.S,"Reflect",{deleteProperty:function(e,t){var n=i(o(e),t);return!(n&&!n.configurable)&&delete e[t]}})},17347:function(e,t,n){"use strict";var r=n(42985),i=n(27007),o=function(e){this._t=i(e),this._i=0;var t,n=this._k=[];for(t in e)n.push(t)};n(49988)(o,"Object",(function(){var e,t=this,n=t._k;do{if(t._i>=n.length)return{value:void 0,done:!0}}while(!((e=n[t._i++])in t._t));return{value:e,done:!1}})),r(r.S,"Reflect",{enumerate:function(e){return new o(e)}})},96633:function(e,t,n){var r=n(18693),i=n(42985),o=n(27007);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(o(e),t)}})},68989:function(e,t,n){var r=n(42985),i=n(468),o=n(27007);r(r.S,"Reflect",{getPrototypeOf:function(e){return i(o(e))}})},83049:function(e,t,n){var r=n(18693),i=n(468),o=n(79181),a=n(42985),s=n(55286),c=n(27007);a(a.S,"Reflect",{get:function e(t,n){var a,u,l=arguments.length<3?t:arguments[2];return c(t)===l?t[n]:(a=r.f(t,n))?o(a,"value")?a.value:void 0!==a.get?a.get.call(l):void 0:s(u=i(t))?e(u,n,l):void 0}})},78270:function(e,t,n){var r=n(42985);r(r.S,"Reflect",{has:function(e,t){return t in e}})},64510:function(e,t,n){var r=n(42985),i=n(27007),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return i(e),!o||o(e)}})},73984:function(e,t,n){var r=n(42985);r(r.S,"Reflect",{ownKeys:n(57643)})},75769:function(e,t,n){var r=n(42985),i=n(27007),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){i(e);try{return o&&o(e),!0}catch(e){return!1}}})},96014:function(e,t,n){var r=n(42985),i=n(27375);i&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){i.check(e,t);try{return i.set(e,t),!0}catch(e){return!1}}})},50055:function(e,t,n){var r=n(99275),i=n(18693),o=n(468),a=n(79181),s=n(42985),c=n(90681),u=n(27007),l=n(55286);s(s.S,"Reflect",{set:function e(t,n,s){var f,h,v=arguments.length<4?t:arguments[3],d=i.f(u(t),n);if(!d){if(l(h=o(t)))return e(h,n,s,v);d=c(0)}if(a(d,"value")){if(!1===d.writable||!l(v))return!1;if(f=i.f(v,n)){if(f.get||f.set||!1===f.writable)return!1;f.value=s,r.f(v,n,f)}else r.f(v,n,c(0,s));return!0}return void 0!==d.set&&(d.set.call(v,s),!0)}})},83946:function(e,t,n){var r=n(3816),i=n(40266),o=n(99275).f,a=n(20616).f,s=n(55364),c=n(53218),u=r.RegExp,l=u,f=u.prototype,h=/a/g,v=/a/g,d=new u(h)!==h;if(n(67057)&&(!d||n(74253)((function(){return v[n(86314)("match")]=!1,u(h)!=h||u(v)==v||"/a/i"!=u(h,"i")})))){u=function(e,t){var n=this instanceof u,r=s(e),o=void 0===t;return!n&&r&&e.constructor===u&&o?e:i(d?new l(r&&!o?e.source:e,t):l((r=e instanceof u)?e.source:e,r&&o?c.call(e):t),n?this:f,u)};for(var p=function(e){e in u||o(u,e,{configurable:!0,get:function(){return l[e]},set:function(t){l[e]=t}})},m=a(l),y=0;m.length>y;)p(m[y++]);f.constructor=u,u.prototype=f,n(77234)(r,"RegExp",u)}n(2974)("RegExp")},18269:function(e,t,n){"use strict";var r=n(21165);n(42985)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},76774:function(e,t,n){n(67057)&&"g"!=/./g.flags&&n(99275).f(RegExp.prototype,"flags",{configurable:!0,get:n(53218)})},21466:function(e,t,n){"use strict";var r=n(27007),i=n(10875),o=n(76793),a=n(27787);n(28082)("match",1,(function(e,t,n,s){return[function(n){var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=s(n,e,this);if(t.done)return t.value;var c=r(e),u=String(this);if(!c.global)return a(c,u);var l=c.unicode;c.lastIndex=0;for(var f,h=[],v=0;null!==(f=a(c,u));){var d=String(f[0]);h[v]=d,""===d&&(c.lastIndex=o(u,i(c.lastIndex),l)),v++}return 0===v?null:h}]}))},59357:function(e,t,n){"use strict";var r=n(27007),i=n(20508),o=n(10875),a=n(81467),s=n(76793),c=n(27787),u=Math.max,l=Math.min,f=Math.floor,h=/\$([$&`']|\d\d?|<[^>]*>)/g,v=/\$([$&`']|\d\d?)/g;n(28082)("replace",2,(function(e,t,n,d){return[function(r,i){var o=e(this),a=null==r?void 0:r[t];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},function(e,t){var i=d(n,e,this,t);if(i.done)return i.value;var f=r(e),h=String(this),v="function"==typeof t;v||(t=String(t));var m=f.global;if(m){var y=f.unicode;f.lastIndex=0}for(var g=[];;){var x=c(f,h);if(null===x)break;if(g.push(x),!m)break;""===String(x[0])&&(f.lastIndex=s(h,o(f.lastIndex),y))}for(var b,w="",M=0,_=0;_<g.length;_++){x=g[_];for(var S=String(x[0]),P=u(l(a(x.index),h.length),0),T=[],R=1;R<x.length;R++)T.push(void 0===(b=x[R])?b:String(b));var E=x.groups;if(v){var z=[S].concat(T,P,h);void 0!==E&&z.push(E);var L=String(t.apply(void 0,z))}else L=p(S,h,P,T,E,t);P>=M&&(w+=h.slice(M,P)+L,M=P+S.length)}return w+h.slice(M)}];function p(e,t,r,o,a,s){var c=r+e.length,u=o.length,l=v;return void 0!==a&&(a=i(a),l=h),n.call(s,l,(function(n,i){var s;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(c);case"<":s=a[i.slice(1,-1)];break;default:var l=+i;if(0===l)return n;if(l>u){var h=f(l/10);return 0===h?n:h<=u?void 0===o[h-1]?i.charAt(1):o[h-1]+i.charAt(1):n}s=o[l-1]}return void 0===s?"":s}))}}))},76142:function(e,t,n){"use strict";var r=n(27007),i=n(27195),o=n(27787);n(28082)("search",1,(function(e,t,n,a){return[function(n){var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=a(n,e,this);if(t.done)return t.value;var s=r(e),c=String(this),u=s.lastIndex;i(u,0)||(s.lastIndex=0);var l=o(s,c);return i(s.lastIndex,u)||(s.lastIndex=u),null===l?-1:l.index}]}))},51876:function(e,t,n){"use strict";var r=n(55364),i=n(27007),o=n(58364),a=n(76793),s=n(10875),c=n(27787),u=n(21165),l=n(74253),f=Math.min,h=[].push,v=4294967295,d=!l((function(){RegExp(v,"y")}));n(28082)("split",2,(function(e,t,n,l){var p;return p="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,t){var i=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(i,e,t);for(var o,a,s,c=[],l=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),f=0,d=void 0===t?v:t>>>0,p=new RegExp(e.source,l+"g");(o=u.call(p,i))&&!((a=p.lastIndex)>f&&(c.push(i.slice(f,o.index)),o.length>1&&o.index<i.length&&h.apply(c,o.slice(1)),s=o[0].length,f=a,c.length>=d));)p.lastIndex===o.index&&p.lastIndex++;return f===i.length?!s&&p.test("")||c.push(""):c.push(i.slice(f)),c.length>d?c.slice(0,d):c}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var i=e(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,i,r):p.call(String(i),n,r)},function(e,t){var r=l(p,e,this,t,p!==n);if(r.done)return r.value;var u=i(e),h=String(this),m=o(u,RegExp),y=u.unicode,g=(u.ignoreCase?"i":"")+(u.multiline?"m":"")+(u.unicode?"u":"")+(d?"y":"g"),x=new m(d?u:"^(?:"+u.source+")",g),b=void 0===t?v:t>>>0;if(0===b)return[];if(0===h.length)return null===c(x,h)?[h]:[];for(var w=0,M=0,_=[];M<h.length;){x.lastIndex=d?M:0;var S,P=c(x,d?h:h.slice(M));if(null===P||(S=f(s(x.lastIndex+(d?0:M)),h.length))===w)M=a(h,M,y);else{if(_.push(h.slice(w,M)),_.length===b)return _;for(var T=1;T<=P.length-1;T++)if(_.push(P[T]),_.length===b)return _;M=w=S}}return _.push(h.slice(w)),_}]}))},66108:function(e,t,n){"use strict";n(76774);var r=n(27007),i=n(53218),o=n(67057),a="toString",s=/./.toString,c=function(e){n(77234)(RegExp.prototype,a,e,!0)};n(74253)((function(){return"/a/b"!=s.call({source:"a",flags:"b"})}))?c((function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!o&&e instanceof RegExp?i.call(e):void 0)})):s.name!=a&&c((function(){return s.call(this)}))},98184:function(e,t,n){"use strict";var r=n(9824),i=n(1616);e.exports=n(45795)("Set",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(i(this,"Set"),e=0===e?0:e,e)}},r)},40856:function(e,t,n){"use strict";n(29395)("anchor",(function(e){return function(t){return e(this,"a","name",t)}}))},80703:function(e,t,n){"use strict";n(29395)("big",(function(e){return function(){return e(this,"big","","")}}))},91539:function(e,t,n){"use strict";n(29395)("blink",(function(e){return function(){return e(this,"blink","","")}}))},5292:function(e,t,n){"use strict";n(29395)("bold",(function(e){return function(){return e(this,"b","","")}}))},29539:function(e,t,n){"use strict";var r=n(42985),i=n(24496)(!1);r(r.P,"String",{codePointAt:function(e){return i(this,e)}})},96620:function(e,t,n){"use strict";var r=n(42985),i=n(10875),o=n(42094),a="endsWith",s="".endsWith;r(r.P+r.F*n(8852)(a),"String",{endsWith:function(e){var t=o(this,e,a),n=arguments.length>1?arguments[1]:void 0,r=i(t.length),c=void 0===n?r:Math.min(i(n),r),u=String(e);return s?s.call(t,u,c):t.slice(c-u.length,c)===u}})},45177:function(e,t,n){"use strict";n(29395)("fixed",(function(e){return function(){return e(this,"tt","","")}}))},73694:function(e,t,n){"use strict";n(29395)("fontcolor",(function(e){return function(t){return e(this,"font","color",t)}}))},37648:function(e,t,n){"use strict";n(29395)("fontsize",(function(e){return function(t){return e(this,"font","size",t)}}))},50191:function(e,t,n){var r=n(42985),i=n(92337),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},62850:function(e,t,n){"use strict";var r=n(42985),i=n(42094),o="includes";r(r.P+r.F*n(8852)(o),"String",{includes:function(e){return!!~i(this,e,o).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},27795:function(e,t,n){"use strict";n(29395)("italics",(function(e){return function(){return e(this,"i","","")}}))},39115:function(e,t,n){"use strict";var r=n(24496)(!0);n(42923)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},4531:function(e,t,n){"use strict";n(29395)("link",(function(e){return function(t){return e(this,"a","href",t)}}))},98306:function(e,t,n){var r=n(42985),i=n(22110),o=n(10875);r(r.S,"String",{raw:function(e){for(var t=i(e.raw),n=o(t.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(t[s++])),s<r&&a.push(String(arguments[s]));return a.join("")}})},10823:function(e,t,n){var r=n(42985);r(r.P,"String",{repeat:n(68595)})},23605:function(e,t,n){"use strict";n(29395)("small",(function(e){return function(){return e(this,"small","","")}}))},17732:function(e,t,n){"use strict";var r=n(42985),i=n(10875),o=n(42094),a="startsWith",s="".startsWith;r(r.P+r.F*n(8852)(a),"String",{startsWith:function(e){var t=o(this,e,a),n=i(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return s?s.call(t,r,n):t.slice(n,n+r.length)===r}})},6780:function(e,t,n){"use strict";n(29395)("strike",(function(e){return function(){return e(this,"strike","","")}}))},69937:function(e,t,n){"use strict";n(29395)("sub",(function(e){return function(){return e(this,"sub","","")}}))},10511:function(e,t,n){"use strict";n(29395)("sup",(function(e){return function(){return e(this,"sup","","")}}))},64564:function(e,t,n){"use strict";n(29599)("trim",(function(e){return function(){return e(this,3)}}))},95767:function(e,t,n){"use strict";var r=n(3816),i=n(79181),o=n(67057),a=n(42985),s=n(77234),c=n(84728).KEY,u=n(74253),l=n(3825),f=n(22943),h=n(93953),v=n(86314),d=n(28787),p=n(36074),m=n(5541),y=n(4302),g=n(27007),x=n(55286),b=n(20508),w=n(22110),M=n(21689),_=n(90681),S=n(42503),P=n(39327),T=n(18693),R=n(64548),E=n(99275),z=n(47184),L=T.f,C=E.f,A=P.f,O=r.Symbol,D=r.JSON,I=D&&D.stringify,k=v("_hidden"),F=v("toPrimitive"),j={}.propertyIsEnumerable,U=l("symbol-registry"),B=l("symbols"),G=l("op-symbols"),N=Object.prototype,H="function"==typeof O&&!!R.f,V=r.QObject,W=!V||!V.prototype||!V.prototype.findChild,Z=o&&u((function(){return 7!=S(C({},"a",{get:function(){return C(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=L(N,t);r&&delete N[t],C(e,t,n),r&&e!==N&&C(N,t,r)}:C,q=function(e){var t=B[e]=S(O.prototype);return t._k=e,t},Y=H&&"symbol"==typeof O.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof O},X=function(e,t,n){return e===N&&X(G,t,n),g(e),t=M(t,!0),g(n),i(B,t)?(n.enumerable?(i(e,k)&&e[k][t]&&(e[k][t]=!1),n=S(n,{enumerable:_(0,!1)})):(i(e,k)||C(e,k,_(1,{})),e[k][t]=!0),Z(e,t,n)):C(e,t,n)},K=function(e,t){g(e);for(var n,r=m(t=w(t)),i=0,o=r.length;o>i;)X(e,n=r[i++],t[n]);return e},Q=function(e){var t=j.call(this,e=M(e,!0));return!(this===N&&i(B,e)&&!i(G,e))&&(!(t||!i(this,e)||!i(B,e)||i(this,k)&&this[k][e])||t)},J=function(e,t){if(e=w(e),t=M(t,!0),e!==N||!i(B,t)||i(G,t)){var n=L(e,t);return!n||!i(B,t)||i(e,k)&&e[k][t]||(n.enumerable=!0),n}},$=function(e){for(var t,n=A(w(e)),r=[],o=0;n.length>o;)i(B,t=n[o++])||t==k||t==c||r.push(t);return r},ee=function(e){for(var t,n=e===N,r=A(n?G:w(e)),o=[],a=0;r.length>a;)!i(B,t=r[a++])||n&&!i(N,t)||o.push(B[t]);return o};H||(s((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=h(arguments.length>0?arguments[0]:void 0),t=function(n){this===N&&t.call(G,n),i(this,k)&&i(this[k],e)&&(this[k][e]=!1),Z(this,e,_(1,n))};return o&&W&&Z(N,e,{configurable:!0,set:t}),q(e)}).prototype,"toString",(function(){return this._k})),T.f=J,E.f=X,n(20616).f=P.f=$,n(14682).f=Q,R.f=ee,o&&!n(4461)&&s(N,"propertyIsEnumerable",Q,!0),d.f=function(e){return q(v(e))}),a(a.G+a.W+a.F*!H,{Symbol:O});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)v(te[ne++]);for(var re=z(v.store),ie=0;re.length>ie;)p(re[ie++]);a(a.S+a.F*!H,"Symbol",{for:function(e){return i(U,e+="")?U[e]:U[e]=O(e)},keyFor:function(e){if(!Y(e))throw TypeError(e+" is not a symbol!");for(var t in U)if(U[t]===e)return t},useSetter:function(){W=!0},useSimple:function(){W=!1}}),a(a.S+a.F*!H,"Object",{create:function(e,t){return void 0===t?S(e):K(S(e),t)},defineProperty:X,defineProperties:K,getOwnPropertyDescriptor:J,getOwnPropertyNames:$,getOwnPropertySymbols:ee});var oe=u((function(){R.f(1)}));a(a.S+a.F*oe,"Object",{getOwnPropertySymbols:function(e){return R.f(b(e))}}),D&&a(a.S+a.F*(!H||u((function(){var e=O();return"[null]"!=I([e])||"{}"!=I({a:e})||"{}"!=I(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(x(t)||void 0!==e)&&!Y(e))return y(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!Y(t))return t}),r[1]=t,I.apply(D,r)}}),O.prototype[F]||n(87728)(O.prototype,F,O.prototype.valueOf),f(O,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},30142:function(e,t,n){"use strict";var r=n(42985),i=n(89383),o=n(91125),a=n(27007),s=n(92337),c=n(10875),u=n(55286),l=n(3816).ArrayBuffer,f=n(58364),h=o.ArrayBuffer,v=o.DataView,d=i.ABV&&l.isView,p=h.prototype.slice,m=i.VIEW,y="ArrayBuffer";r(r.G+r.W+r.F*(l!==h),{ArrayBuffer:h}),r(r.S+r.F*!i.CONSTR,y,{isView:function(e){return d&&d(e)||u(e)&&m in e}}),r(r.P+r.U+r.F*n(74253)((function(){return!new h(2).slice(1,void 0).byteLength})),y,{slice:function(e,t){if(void 0!==p&&void 0===t)return p.call(a(this),e);for(var n=a(this).byteLength,r=s(e,n),i=s(void 0===t?n:t,n),o=new(f(this,h))(c(i-r)),u=new v(this),l=new v(o),d=0;r<i;)l.setUint8(d++,u.getUint8(r++));return o}}),n(2974)(y)},1786:function(e,t,n){var r=n(42985);r(r.G+r.W+r.F*!n(89383).ABV,{DataView:n(91125).DataView})},70162:function(e,t,n){n(78440)("Float32",4,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},33834:function(e,t,n){n(78440)("Float64",8,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},74821:function(e,t,n){n(78440)("Int16",2,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},81303:function(e,t,n){n(78440)("Int32",4,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},75368:function(e,t,n){n(78440)("Int8",1,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},79103:function(e,t,n){n(78440)("Uint16",2,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},83318:function(e,t,n){n(78440)("Uint32",4,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},46964:function(e,t,n){n(78440)("Uint8",1,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},62152:function(e,t,n){n(78440)("Uint8",1,(function(e){return function(t,n,r){return e(this,t,n,r)}}),!0)},30147:function(e,t,n){"use strict";var r,i=n(3816),o=n(10050)(0),a=n(77234),s=n(84728),c=n(35345),u=n(23657),l=n(55286),f=n(1616),h=n(1616),v=!i.ActiveXObject&&"ActiveXObject"in i,d="WeakMap",p=s.getWeak,m=Object.isExtensible,y=u.ufstore,g=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},x={get:function(e){if(l(e)){var t=p(e);return!0===t?y(f(this,d)).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(f(this,d),e,t)}},b=e.exports=n(45795)(d,g,x,u,!0,!0);h&&v&&(c((r=u.getConstructor(g,d)).prototype,x),s.NEED=!0,o(["delete","has","get","set"],(function(e){var t=b.prototype,n=t[e];a(t,e,(function(t,i){if(l(t)&&!m(t)){this._f||(this._f=new r);var o=this._f[e](t,i);return"set"==e?this:o}return n.call(this,t,i)}))})))},59192:function(e,t,n){"use strict";var r=n(23657),i=n(1616),o="WeakSet";n(45795)(o,(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(i(this,o),e,!0)}},r,!1,!0)},1268:function(e,t,n){"use strict";var r=n(42985),i=n(13325),o=n(20508),a=n(10875),s=n(24963),c=n(16886);r(r.P,"Array",{flatMap:function(e){var t,n,r=o(this);return s(e),t=a(r.length),n=c(r,0),i(n,r,r,t,0,1,e,arguments[1]),n}}),n(17722)("flatMap")},62773:function(e,t,n){"use strict";var r=n(42985),i=n(79315)(!0);r(r.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(17722)("includes")},83276:function(e,t,n){var r=n(42985),i=n(51131)(!0);r(r.S,"Object",{entries:function(e){return i(e)}})},98351:function(e,t,n){var r=n(42985),i=n(57643),o=n(22110),a=n(18693),s=n(92811);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,r=o(e),c=a.f,u=i(r),l={},f=0;u.length>f;)void 0!==(n=c(r,t=u[f++]))&&s(l,t,n);return l}})},96409:function(e,t,n){var r=n(42985),i=n(51131)(!1);r(r.S,"Object",{values:function(e){return i(e)}})},9865:function(e,t,n){"use strict";var r=n(42985),i=n(25645),o=n(3816),a=n(58364),s=n(50094);r(r.P+r.R,"Promise",{finally:function(e){var t=a(this,i.Promise||o.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}})},92770:function(e,t,n){"use strict";var r=n(42985),i=n(75442),o=n(30575),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*a,"String",{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},41784:function(e,t,n){"use strict";var r=n(42985),i=n(75442),o=n(30575),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*a,"String",{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},65869:function(e,t,n){"use strict";n(29599)("trimLeft",(function(e){return function(){return e(this,1)}}),"trimStart")},94325:function(e,t,n){"use strict";n(29599)("trimRight",(function(e){return function(){return e(this,2)}}),"trimEnd")},79665:function(e,t,n){n(36074)("asyncIterator")},91181:function(e,t,n){for(var r=n(56997),i=n(47184),o=n(77234),a=n(3816),s=n(87728),c=n(87234),u=n(86314),l=u("iterator"),f=u("toStringTag"),h=c.Array,v={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},d=i(v),p=0;p<d.length;p++){var m,y=d[p],g=v[y],x=a[y],b=x&&x.prototype;if(b&&(b[l]||s(b,l,h),b[f]||s(b,f,y),c[y]=h,g))for(m in r)b[m]||o(b,m,r[m],!0)}},84633:function(e,t,n){var r=n(42985),i=n(74193);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},32564:function(e,t,n){var r=n(3816),i=n(42985),o=n(30575),a=[].slice,s=/MSIE .\./.test(o),c=function(e){return function(t,n){var r=arguments.length>2,i=!!r&&a.call(arguments,2);return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,i)}:t,n)}};i(i.G+i.B+i.F*s,{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},96337:function(e,t,n){n(32564),n(84633),n(91181),e.exports=n(25645)},31430:function(e,t,n){var r,i;void 0===(i="function"==typeof(r={easeInQuad:function(e){return Math.pow(e,2)},easeOutQuad:function(e){return-(Math.pow(e-1,2)-1)},easeInOutQuad:function(e){return(e/=.5)<1?.5*Math.pow(e,2):-.5*((e-=2)*e-2)},easeInCubic:function(e){return Math.pow(e,3)},easeOutCubic:function(e){return Math.pow(e-1,3)+1},easeInOutCubic:function(e){return(e/=.5)<1?.5*Math.pow(e,3):.5*(Math.pow(e-2,3)+2)},easeInQuart:function(e){return Math.pow(e,4)},easeOutQuart:function(e){return-(Math.pow(e-1,4)-1)},easeInOutQuart:function(e){return(e/=.5)<1?.5*Math.pow(e,4):-.5*((e-=2)*Math.pow(e,3)-2)},easeInQuint:function(e){return Math.pow(e,5)},easeOutQuint:function(e){return Math.pow(e-1,5)+1},easeInOutQuint:function(e){return(e/=.5)<1?.5*Math.pow(e,5):.5*(Math.pow(e-2,5)+2)},easeInSine:function(e){return 1-Math.cos(e*(Math.PI/2))},easeOutSine:function(e){return Math.sin(e*(Math.PI/2))},easeInOutSine:function(e){return-.5*(Math.cos(Math.PI*e)-1)},easeInExpo:function(e){return 0===e?0:Math.pow(2,10*(e-1))},easeOutExpo:function(e){return 1===e?1:1-Math.pow(2,-10*e)},easeInOutExpo:function(e){return 0===e?0:1===e?1:(e/=.5)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*--e))},easeInCirc:function(e){return-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-Math.pow(e-1,2))},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeOutBounce:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInBack:function(e){var t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},elastic:function(e){return-1*Math.pow(4,-8*e)*Math.sin((6*e-1)*(2*Math.PI)/2)+1},swingFromTo:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},swingFrom:function(e){var t=1.70158;return e*e*((t+1)*e-t)},swingTo:function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},bounce:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bouncePast:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?2-(7.5625*(e-=1.5/2.75)*e+.75):e<2.5/2.75?2-(7.5625*(e-=2.25/2.75)*e+.9375):2-(7.5625*(e-=2.625/2.75)*e+.984375)},easeFromTo:function(e){return(e/=.5)<1?.5*Math.pow(e,4):-.5*((e-=2)*Math.pow(e,3)-2)},easeFrom:function(e){return Math.pow(e,4)},easeTo:function(e){return Math.pow(e,.25)}})?r.call(t,n,t,e):r)||(e.exports=i)},90887:function(e,t,n){"use strict";n.r(t),n.d(t,{glMatrix:function(){return r},mat2:function(){return i},mat2d:function(){return o},mat3:function(){return a},mat4:function(){return s},quat:function(){return l},quat2:function(){return f},vec2:function(){return h},vec3:function(){return c},vec4:function(){return u}});var r={};n.r(r),n.d(r,{ARRAY_TYPE:function(){return d},EPSILON:function(){return v},RANDOM:function(){return p},equals:function(){return x},setMatrixArrayType:function(){return m},toRadian:function(){return g}});var i={};n.r(i),n.d(i,{LDU:function(){return F},add:function(){return j},adjoint:function(){return E},clone:function(){return w},copy:function(){return M},create:function(){return b},determinant:function(){return z},equals:function(){return G},exactEquals:function(){return B},frob:function(){return k},fromRotation:function(){return O},fromScaling:function(){return D},fromValues:function(){return S},identity:function(){return _},invert:function(){return R},mul:function(){return V},multiply:function(){return L},multiplyScalar:function(){return N},multiplyScalarAndAdd:function(){return H},rotate:function(){return C},scale:function(){return A},set:function(){return P},str:function(){return I},sub:function(){return W},subtract:function(){return U},transpose:function(){return T}});var o={};n.r(o),n.d(o,{add:function(){return ue},clone:function(){return q},copy:function(){return Y},create:function(){return Z},determinant:function(){return $},equals:function(){return de},exactEquals:function(){return ve},frob:function(){return ce},fromRotation:function(){return ie},fromScaling:function(){return oe},fromTranslation:function(){return ae},fromValues:function(){return K},identity:function(){return X},invert:function(){return J},mul:function(){return pe},multiply:function(){return ee},multiplyScalar:function(){return fe},multiplyScalarAndAdd:function(){return he},rotate:function(){return te},scale:function(){return ne},set:function(){return Q},str:function(){return se},sub:function(){return me},subtract:function(){return le},translate:function(){return re}});var a={};n.r(a),n.d(a,{add:function(){return Ge},adjoint:function(){return Te},clone:function(){return xe},copy:function(){return be},create:function(){return ye},determinant:function(){return Re},equals:function(){return Ze},exactEquals:function(){return We},frob:function(){return Be},fromMat2d:function(){return Ie},fromMat4:function(){return ge},fromQuat:function(){return ke},fromRotation:function(){return Oe},fromScaling:function(){return De},fromTranslation:function(){return Ae},fromValues:function(){return we},identity:function(){return _e},invert:function(){return Pe},mul:function(){return qe},multiply:function(){return Ee},multiplyScalar:function(){return He},multiplyScalarAndAdd:function(){return Ve},normalFromMat4:function(){return Fe},projection:function(){return je},rotate:function(){return Le},scale:function(){return Ce},set:function(){return Me},str:function(){return Ue},sub:function(){return Ye},subtract:function(){return Ne},translate:function(){return ze},transpose:function(){return Se}});var s={};n.r(s),n.d(s,{add:function(){return Dt},adjoint:function(){return rt},clone:function(){return Ke},copy:function(){return Qe},create:function(){return Xe},determinant:function(){return it},equals:function(){return Ut},exactEquals:function(){return jt},frob:function(){return Ot},fromQuat:function(){return Pt},fromQuat2:function(){return xt},fromRotation:function(){return dt},fromRotationTranslation:function(){return gt},fromRotationTranslationScale:function(){return _t},fromRotationTranslationScaleOrigin:function(){return St},fromScaling:function(){return vt},fromTranslation:function(){return ht},fromValues:function(){return Je},fromXRotation:function(){return pt},fromYRotation:function(){return mt},fromZRotation:function(){return yt},frustum:function(){return Tt},getRotation:function(){return Mt},getScaling:function(){return wt},getTranslation:function(){return bt},identity:function(){return et},invert:function(){return nt},lookAt:function(){return Lt},mul:function(){return Bt},multiply:function(){return ot},multiplyScalar:function(){return kt},multiplyScalarAndAdd:function(){return Ft},ortho:function(){return zt},perspective:function(){return Rt},perspectiveFromFieldOfView:function(){return Et},rotate:function(){return ct},rotateX:function(){return ut},rotateY:function(){return lt},rotateZ:function(){return ft},scale:function(){return st},set:function(){return $e},str:function(){return At},sub:function(){return Gt},subtract:function(){return It},targetTo:function(){return Ct},translate:function(){return at},transpose:function(){return tt}});var c={};n.r(c),n.d(c,{add:function(){return Yt},angle:function(){return Sn},bezier:function(){return mn},ceil:function(){return Jt},clone:function(){return Ht},copy:function(){return Zt},create:function(){return Nt},cross:function(){return vn},dist:function(){return On},distance:function(){return an},div:function(){return An},divide:function(){return Qt},dot:function(){return hn},equals:function(){return En},exactEquals:function(){return Rn},floor:function(){return $t},forEach:function(){return Fn},fromValues:function(){return Wt},hermite:function(){return pn},inverse:function(){return ln},len:function(){return In},length:function(){return Vt},lerp:function(){return dn},max:function(){return tn},min:function(){return en},mul:function(){return Cn},multiply:function(){return Kt},negate:function(){return un},normalize:function(){return fn},random:function(){return yn},rotateX:function(){return wn},rotateY:function(){return Mn},rotateZ:function(){return _n},round:function(){return nn},scale:function(){return rn},scaleAndAdd:function(){return on},set:function(){return qt},sqrDist:function(){return Dn},sqrLen:function(){return kn},squaredDistance:function(){return sn},squaredLength:function(){return cn},str:function(){return Tn},sub:function(){return Ln},subtract:function(){return Xt},transformMat3:function(){return xn},transformMat4:function(){return gn},transformQuat:function(){return bn},zero:function(){return Pn}});var u={};n.r(u),n.d(u,{add:function(){return Hn},ceil:function(){return qn},clone:function(){return Un},copy:function(){return Gn},create:function(){return jn},cross:function(){return cr},dist:function(){return br},distance:function(){return er},div:function(){return xr},divide:function(){return Zn},dot:function(){return sr},equals:function(){return mr},exactEquals:function(){return pr},floor:function(){return Yn},forEach:function(){return Sr},fromValues:function(){return Bn},inverse:function(){return or},len:function(){return Mr},length:function(){return nr},lerp:function(){return ur},max:function(){return Kn},min:function(){return Xn},mul:function(){return gr},multiply:function(){return Wn},negate:function(){return ir},normalize:function(){return ar},random:function(){return lr},round:function(){return Qn},scale:function(){return Jn},scaleAndAdd:function(){return $n},set:function(){return Nn},sqrDist:function(){return wr},sqrLen:function(){return _r},squaredDistance:function(){return tr},squaredLength:function(){return rr},str:function(){return dr},sub:function(){return yr},subtract:function(){return Vn},transformMat4:function(){return fr},transformQuat:function(){return hr},zero:function(){return vr}});var l={};n.r(l),n.d(l,{add:function(){return ti},calculateW:function(){return Dr},clone:function(){return Qr},conjugate:function(){return Gr},copy:function(){return $r},create:function(){return Pr},dot:function(){return ii},equals:function(){return hi},exactEquals:function(){return fi},exp:function(){return Ir},fromEuler:function(){return Hr},fromMat3:function(){return Nr},fromValues:function(){return Jr},getAngle:function(){return zr},getAxisAngle:function(){return Er},identity:function(){return Tr},invert:function(){return Br},len:function(){return si},length:function(){return ai},lerp:function(){return oi},ln:function(){return kr},mul:function(){return ni},multiply:function(){return Lr},normalize:function(){return li},pow:function(){return Fr},random:function(){return Ur},rotateX:function(){return Cr},rotateY:function(){return Ar},rotateZ:function(){return Or},rotationTo:function(){return vi},scale:function(){return ri},set:function(){return ei},setAxes:function(){return pi},setAxisAngle:function(){return Rr},slerp:function(){return jr},sqlerp:function(){return di},sqrLen:function(){return ui},squaredLength:function(){return ci},str:function(){return Vr}});var f={};n.r(f),n.d(f,{add:function(){return Ui},clone:function(){return yi},conjugate:function(){return Zi},copy:function(){return Si},create:function(){return mi},dot:function(){return Hi},equals:function(){return eo},exactEquals:function(){return $i},fromMat4:function(){return _i},fromRotation:function(){return Mi},fromRotationTranslation:function(){return bi},fromRotationTranslationValues:function(){return xi},fromTranslation:function(){return wi},fromValues:function(){return gi},getDual:function(){return Ei},getReal:function(){return Ri},getTranslation:function(){return Ci},identity:function(){return Pi},invert:function(){return Wi},len:function(){return Yi},length:function(){return qi},lerp:function(){return Vi},mul:function(){return Gi},multiply:function(){return Bi},normalize:function(){return Qi},rotateAroundAxis:function(){return ji},rotateByQuatAppend:function(){return ki},rotateByQuatPrepend:function(){return Fi},rotateX:function(){return Oi},rotateY:function(){return Di},rotateZ:function(){return Ii},scale:function(){return Ni},set:function(){return Ti},setDual:function(){return Li},setReal:function(){return zi},sqrLen:function(){return Ki},squaredLength:function(){return Xi},str:function(){return Ji},translate:function(){return Ai}});var h={};n.r(h),n.d(h,{add:function(){return ao},angle:function(){return Do},ceil:function(){return lo},clone:function(){return no},copy:function(){return io},create:function(){return to},cross:function(){return To},dist:function(){return Ho},distance:function(){return go},div:function(){return No},divide:function(){return uo},dot:function(){return Po},equals:function(){return jo},exactEquals:function(){return Fo},floor:function(){return fo},forEach:function(){return Zo},fromValues:function(){return ro},inverse:function(){return _o},len:function(){return Uo},length:function(){return bo},lerp:function(){return Ro},max:function(){return vo},min:function(){return ho},mul:function(){return Go},multiply:function(){return co},negate:function(){return Mo},normalize:function(){return So},random:function(){return Eo},rotate:function(){return Oo},round:function(){return po},scale:function(){return mo},scaleAndAdd:function(){return yo},set:function(){return oo},sqrDist:function(){return Vo},sqrLen:function(){return Wo},squaredDistance:function(){return xo},squaredLength:function(){return wo},str:function(){return ko},sub:function(){return Bo},subtract:function(){return so},transformMat2:function(){return zo},transformMat2d:function(){return Lo},transformMat3:function(){return Co},transformMat4:function(){return Ao},zero:function(){return Io}});var v=1e-6,d="undefined"!=typeof Float32Array?Float32Array:Array,p=Math.random;function m(e){d=e}var y=Math.PI/180;function g(e){return e*y}function x(e,t){return Math.abs(e-t)<=v*Math.max(1,Math.abs(e),Math.abs(t))}function b(){var e=new d(4);return d!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}function w(e){var t=new d(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function M(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function _(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e}function S(e,t,n,r){var i=new d(4);return i[0]=e,i[1]=t,i[2]=n,i[3]=r,i}function P(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function T(e,t){if(e===t){var n=t[1];e[1]=t[2],e[2]=n}else e[0]=t[0],e[1]=t[2],e[2]=t[1],e[3]=t[3];return e}function R(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n*o-i*r;return a?(a=1/a,e[0]=o*a,e[1]=-r*a,e[2]=-i*a,e[3]=n*a,e):null}function E(e,t){var n=t[0];return e[0]=t[3],e[1]=-t[1],e[2]=-t[2],e[3]=n,e}function z(e){return e[0]*e[3]-e[2]*e[1]}function L(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=n[0],c=n[1],u=n[2],l=n[3];return e[0]=r*s+o*c,e[1]=i*s+a*c,e[2]=r*u+o*l,e[3]=i*u+a*l,e}function C(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=Math.sin(n),c=Math.cos(n);return e[0]=r*c+o*s,e[1]=i*c+a*s,e[2]=r*-s+o*c,e[3]=i*-s+a*c,e}function A(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=n[0],c=n[1];return e[0]=r*s,e[1]=i*s,e[2]=o*c,e[3]=a*c,e}function O(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=-n,e[3]=r,e}function D(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e}function I(e){return"mat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function k(e){return Math.hypot(e[0],e[1],e[2],e[3])}function F(e,t,n,r){return e[2]=r[2]/r[0],n[0]=r[0],n[1]=r[1],n[3]=r[3]-e[2]*n[1],[e,t,n]}function j(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e}function U(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e}function B(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function G(e,t){var n=e[0],r=e[1],i=e[2],o=e[3],a=t[0],s=t[1],c=t[2],u=t[3];return Math.abs(n-a)<=v*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=v*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-c)<=v*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(o-u)<=v*Math.max(1,Math.abs(o),Math.abs(u))}function N(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e}function H(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var V=L,W=U;function Z(){var e=new d(6);return d!=Float32Array&&(e[1]=0,e[2]=0,e[4]=0,e[5]=0),e[0]=1,e[3]=1,e}function q(e){var t=new d(6);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function X(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function K(e,t,n,r,i,o){var a=new d(6);return a[0]=e,a[1]=t,a[2]=n,a[3]=r,a[4]=i,a[5]=o,a}function Q(e,t,n,r,i,o,a){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=a,e}function J(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],c=n*o-r*i;return c?(c=1/c,e[0]=o*c,e[1]=-r*c,e[2]=-i*c,e[3]=n*c,e[4]=(i*s-o*a)*c,e[5]=(r*a-n*s)*c,e):null}function $(e){return e[0]*e[3]-e[1]*e[2]}function ee(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],c=t[5],u=n[0],l=n[1],f=n[2],h=n[3],v=n[4],d=n[5];return e[0]=r*u+o*l,e[1]=i*u+a*l,e[2]=r*f+o*h,e[3]=i*f+a*h,e[4]=r*v+o*d+s,e[5]=i*v+a*d+c,e}function te(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],c=t[5],u=Math.sin(n),l=Math.cos(n);return e[0]=r*l+o*u,e[1]=i*l+a*u,e[2]=r*-u+o*l,e[3]=i*-u+a*l,e[4]=s,e[5]=c,e}function ne(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],c=t[5],u=n[0],l=n[1];return e[0]=r*u,e[1]=i*u,e[2]=o*l,e[3]=a*l,e[4]=s,e[5]=c,e}function re(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],c=t[5],u=n[0],l=n[1];return e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=r*u+o*l+s,e[5]=i*u+a*l+c,e}function ie(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=-n,e[3]=r,e[4]=0,e[5]=0,e}function oe(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e[4]=0,e[5]=0,e}function ae(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=t[0],e[5]=t[1],e}function se(e){return"mat2d("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+")"}function ce(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],1)}function ue(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e}function le(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e}function fe(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e}function he(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e}function ve(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]}function de(e,t){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],c=t[0],u=t[1],l=t[2],f=t[3],h=t[4],d=t[5];return Math.abs(n-c)<=v*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(r-u)<=v*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(i-l)<=v*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(o-f)<=v*Math.max(1,Math.abs(o),Math.abs(f))&&Math.abs(a-h)<=v*Math.max(1,Math.abs(a),Math.abs(h))&&Math.abs(s-d)<=v*Math.max(1,Math.abs(s),Math.abs(d))}var pe=ee,me=le;function ye(){var e=new d(9);return d!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function ge(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function xe(e){var t=new d(9);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function be(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function we(e,t,n,r,i,o,a,s,c){var u=new d(9);return u[0]=e,u[1]=t,u[2]=n,u[3]=r,u[4]=i,u[5]=o,u[6]=a,u[7]=s,u[8]=c,u}function Me(e,t,n,r,i,o,a,s,c,u){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=a,e[6]=s,e[7]=c,e[8]=u,e}function _e(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Se(e,t){if(e===t){var n=t[1],r=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=r,e[7]=i}else 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];return e}function Pe(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],c=t[6],u=t[7],l=t[8],f=l*a-s*u,h=-l*o+s*c,v=u*o-a*c,d=n*f+r*h+i*v;return d?(d=1/d,e[0]=f*d,e[1]=(-l*r+i*u)*d,e[2]=(s*r-i*a)*d,e[3]=h*d,e[4]=(l*n-i*c)*d,e[5]=(-s*n+i*o)*d,e[6]=v*d,e[7]=(-u*n+r*c)*d,e[8]=(a*n-r*o)*d,e):null}function Te(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],c=t[6],u=t[7],l=t[8];return e[0]=a*l-s*u,e[1]=i*u-r*l,e[2]=r*s-i*a,e[3]=s*c-o*l,e[4]=n*l-i*c,e[5]=i*o-n*s,e[6]=o*u-a*c,e[7]=r*c-n*u,e[8]=n*a-r*o,e}function Re(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],c=e[7],u=e[8];return t*(u*o-a*c)+n*(-u*i+a*s)+r*(c*i-o*s)}function Ee(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],c=t[5],u=t[6],l=t[7],f=t[8],h=n[0],v=n[1],d=n[2],p=n[3],m=n[4],y=n[5],g=n[6],x=n[7],b=n[8];return e[0]=h*r+v*a+d*u,e[1]=h*i+v*s+d*l,e[2]=h*o+v*c+d*f,e[3]=p*r+m*a+y*u,e[4]=p*i+m*s+y*l,e[5]=p*o+m*c+y*f,e[6]=g*r+x*a+b*u,e[7]=g*i+x*s+b*l,e[8]=g*o+x*c+b*f,e}function ze(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],c=t[5],u=t[6],l=t[7],f=t[8],h=n[0],v=n[1];return e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=c,e[6]=h*r+v*a+u,e[7]=h*i+v*s+l,e[8]=h*o+v*c+f,e}function Le(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],c=t[5],u=t[6],l=t[7],f=t[8],h=Math.sin(n),v=Math.cos(n);return e[0]=v*r+h*a,e[1]=v*i+h*s,e[2]=v*o+h*c,e[3]=v*a-h*r,e[4]=v*s-h*i,e[5]=v*c-h*o,e[6]=u,e[7]=l,e[8]=f,e}function Ce(e,t,n){var r=n[0],i=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function Ae(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e}function Oe(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=-n,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function De(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Ie(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e}function ke(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n+n,s=r+r,c=i+i,u=n*a,l=r*a,f=r*s,h=i*a,v=i*s,d=i*c,p=o*a,m=o*s,y=o*c;return e[0]=1-f-d,e[3]=l-y,e[6]=h+m,e[1]=l+y,e[4]=1-u-d,e[7]=v-p,e[2]=h-m,e[5]=v+p,e[8]=1-u-f,e}function Fe(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],c=t[6],u=t[7],l=t[8],f=t[9],h=t[10],v=t[11],d=t[12],p=t[13],m=t[14],y=t[15],g=n*s-r*a,x=n*c-i*a,b=n*u-o*a,w=r*c-i*s,M=r*u-o*s,_=i*u-o*c,S=l*p-f*d,P=l*m-h*d,T=l*y-v*d,R=f*m-h*p,E=f*y-v*p,z=h*y-v*m,L=g*z-x*E+b*R+w*T-M*P+_*S;return L?(L=1/L,e[0]=(s*z-c*E+u*R)*L,e[1]=(c*T-a*z-u*P)*L,e[2]=(a*E-s*T+u*S)*L,e[3]=(i*E-r*z-o*R)*L,e[4]=(n*z-i*T+o*P)*L,e[5]=(r*T-n*E-o*S)*L,e[6]=(p*_-m*M+y*w)*L,e[7]=(m*b-d*_-y*x)*L,e[8]=(d*M-p*b+y*g)*L,e):null}function je(e,t,n){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/n,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e}function Ue(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"}function Be(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])}function Ge(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e}function Ne(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e}function He(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e}function Ve(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e}function We(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]}function Ze(e,t){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],c=e[6],u=e[7],l=e[8],f=t[0],h=t[1],d=t[2],p=t[3],m=t[4],y=t[5],g=t[6],x=t[7],b=t[8];return Math.abs(n-f)<=v*Math.max(1,Math.abs(n),Math.abs(f))&&Math.abs(r-h)<=v*Math.max(1,Math.abs(r),Math.abs(h))&&Math.abs(i-d)<=v*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(o-p)<=v*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-m)<=v*Math.max(1,Math.abs(a),Math.abs(m))&&Math.abs(s-y)<=v*Math.max(1,Math.abs(s),Math.abs(y))&&Math.abs(c-g)<=v*Math.max(1,Math.abs(c),Math.abs(g))&&Math.abs(u-x)<=v*Math.max(1,Math.abs(u),Math.abs(x))&&Math.abs(l-b)<=v*Math.max(1,Math.abs(l),Math.abs(b))}var qe=Ee,Ye=Ne;function Xe(){var e=new d(16);return d!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function Ke(e){var t=new d(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function Qe(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Je(e,t,n,r,i,o,a,s,c,u,l,f,h,v,p,m){var y=new d(16);return y[0]=e,y[1]=t,y[2]=n,y[3]=r,y[4]=i,y[5]=o,y[6]=a,y[7]=s,y[8]=c,y[9]=u,y[10]=l,y[11]=f,y[12]=h,y[13]=v,y[14]=p,y[15]=m,y}function $e(e,t,n,r,i,o,a,s,c,u,l,f,h,v,d,p,m){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=a,e[6]=s,e[7]=c,e[8]=u,e[9]=l,e[10]=f,e[11]=h,e[12]=v,e[13]=d,e[14]=p,e[15]=m,e}function et(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function tt(e,t){if(e===t){var n=t[1],r=t[2],i=t[3],o=t[6],a=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=o,e[11]=t[14],e[12]=i,e[13]=a,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function nt(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],c=t[6],u=t[7],l=t[8],f=t[9],h=t[10],v=t[11],d=t[12],p=t[13],m=t[14],y=t[15],g=n*s-r*a,x=n*c-i*a,b=n*u-o*a,w=r*c-i*s,M=r*u-o*s,_=i*u-o*c,S=l*p-f*d,P=l*m-h*d,T=l*y-v*d,R=f*m-h*p,E=f*y-v*p,z=h*y-v*m,L=g*z-x*E+b*R+w*T-M*P+_*S;return L?(L=1/L,e[0]=(s*z-c*E+u*R)*L,e[1]=(i*E-r*z-o*R)*L,e[2]=(p*_-m*M+y*w)*L,e[3]=(h*M-f*_-v*w)*L,e[4]=(c*T-a*z-u*P)*L,e[5]=(n*z-i*T+o*P)*L,e[6]=(m*b-d*_-y*x)*L,e[7]=(l*_-h*b+v*x)*L,e[8]=(a*E-s*T+u*S)*L,e[9]=(r*T-n*E-o*S)*L,e[10]=(d*M-p*b+y*g)*L,e[11]=(f*b-l*M-v*g)*L,e[12]=(s*P-a*R-c*S)*L,e[13]=(n*R-r*P+i*S)*L,e[14]=(p*x-d*w-m*g)*L,e[15]=(l*w-f*x+h*g)*L,e):null}function rt(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],c=t[6],u=t[7],l=t[8],f=t[9],h=t[10],v=t[11],d=t[12],p=t[13],m=t[14],y=t[15];return e[0]=s*(h*y-v*m)-f*(c*y-u*m)+p*(c*v-u*h),e[1]=-(r*(h*y-v*m)-f*(i*y-o*m)+p*(i*v-o*h)),e[2]=r*(c*y-u*m)-s*(i*y-o*m)+p*(i*u-o*c),e[3]=-(r*(c*v-u*h)-s*(i*v-o*h)+f*(i*u-o*c)),e[4]=-(a*(h*y-v*m)-l*(c*y-u*m)+d*(c*v-u*h)),e[5]=n*(h*y-v*m)-l*(i*y-o*m)+d*(i*v-o*h),e[6]=-(n*(c*y-u*m)-a*(i*y-o*m)+d*(i*u-o*c)),e[7]=n*(c*v-u*h)-a*(i*v-o*h)+l*(i*u-o*c),e[8]=a*(f*y-v*p)-l*(s*y-u*p)+d*(s*v-u*f),e[9]=-(n*(f*y-v*p)-l*(r*y-o*p)+d*(r*v-o*f)),e[10]=n*(s*y-u*p)-a*(r*y-o*p)+d*(r*u-o*s),e[11]=-(n*(s*v-u*f)-a*(r*v-o*f)+l*(r*u-o*s)),e[12]=-(a*(f*m-h*p)-l*(s*m-c*p)+d*(s*h-c*f)),e[13]=n*(f*m-h*p)-l*(r*m-i*p)+d*(r*h-i*f),e[14]=-(n*(s*m-c*p)-a*(r*m-i*p)+d*(r*c-i*s)),e[15]=n*(s*h-c*f)-a*(r*h-i*f)+l*(r*c-i*s),e}function it(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],c=e[7],u=e[8],l=e[9],f=e[10],h=e[11],v=e[12],d=e[13],p=e[14],m=e[15];return(t*a-n*o)*(f*m-h*p)-(t*s-r*o)*(l*m-h*d)+(t*c-i*o)*(l*p-f*d)+(n*s-r*a)*(u*m-h*v)-(n*c-i*a)*(u*p-f*v)+(r*c-i*s)*(u*d-l*v)}function ot(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],c=t[5],u=t[6],l=t[7],f=t[8],h=t[9],v=t[10],d=t[11],p=t[12],m=t[13],y=t[14],g=t[15],x=n[0],b=n[1],w=n[2],M=n[3];return e[0]=x*r+b*s+w*f+M*p,e[1]=x*i+b*c+w*h+M*m,e[2]=x*o+b*u+w*v+M*y,e[3]=x*a+b*l+w*d+M*g,x=n[4],b=n[5],w=n[6],M=n[7],e[4]=x*r+b*s+w*f+M*p,e[5]=x*i+b*c+w*h+M*m,e[6]=x*o+b*u+w*v+M*y,e[7]=x*a+b*l+w*d+M*g,x=n[8],b=n[9],w=n[10],M=n[11],e[8]=x*r+b*s+w*f+M*p,e[9]=x*i+b*c+w*h+M*m,e[10]=x*o+b*u+w*v+M*y,e[11]=x*a+b*l+w*d+M*g,x=n[12],b=n[13],w=n[14],M=n[15],e[12]=x*r+b*s+w*f+M*p,e[13]=x*i+b*c+w*h+M*m,e[14]=x*o+b*u+w*v+M*y,e[15]=x*a+b*l+w*d+M*g,e}function at(e,t,n){var r,i,o,a,s,c,u,l,f,h,v,d,p=n[0],m=n[1],y=n[2];return t===e?(e[12]=t[0]*p+t[4]*m+t[8]*y+t[12],e[13]=t[1]*p+t[5]*m+t[9]*y+t[13],e[14]=t[2]*p+t[6]*m+t[10]*y+t[14],e[15]=t[3]*p+t[7]*m+t[11]*y+t[15]):(r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],c=t[5],u=t[6],l=t[7],f=t[8],h=t[9],v=t[10],d=t[11],e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=c,e[6]=u,e[7]=l,e[8]=f,e[9]=h,e[10]=v,e[11]=d,e[12]=r*p+s*m+f*y+t[12],e[13]=i*p+c*m+h*y+t[13],e[14]=o*p+u*m+v*y+t[14],e[15]=a*p+l*m+d*y+t[15]),e}function st(e,t,n){var r=n[0],i=n[1],o=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function ct(e,t,n,r){var i,o,a,s,c,u,l,f,h,d,p,m,y,g,x,b,w,M,_,S,P,T,R,E,z=r[0],L=r[1],C=r[2],A=Math.hypot(z,L,C);return A<v?null:(z*=A=1/A,L*=A,C*=A,i=Math.sin(n),a=1-(o=Math.cos(n)),s=t[0],c=t[1],u=t[2],l=t[3],f=t[4],h=t[5],d=t[6],p=t[7],m=t[8],y=t[9],g=t[10],x=t[11],b=z*z*a+o,w=L*z*a+C*i,M=C*z*a-L*i,_=z*L*a-C*i,S=L*L*a+o,P=C*L*a+z*i,T=z*C*a+L*i,R=L*C*a-z*i,E=C*C*a+o,e[0]=s*b+f*w+m*M,e[1]=c*b+h*w+y*M,e[2]=u*b+d*w+g*M,e[3]=l*b+p*w+x*M,e[4]=s*_+f*S+m*P,e[5]=c*_+h*S+y*P,e[6]=u*_+d*S+g*P,e[7]=l*_+p*S+x*P,e[8]=s*T+f*R+m*E,e[9]=c*T+h*R+y*E,e[10]=u*T+d*R+g*E,e[11]=l*T+p*R+x*E,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function ut(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[4],a=t[5],s=t[6],c=t[7],u=t[8],l=t[9],f=t[10],h=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=o*i+u*r,e[5]=a*i+l*r,e[6]=s*i+f*r,e[7]=c*i+h*r,e[8]=u*i-o*r,e[9]=l*i-a*r,e[10]=f*i-s*r,e[11]=h*i-c*r,e}function lt(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[0],a=t[1],s=t[2],c=t[3],u=t[8],l=t[9],f=t[10],h=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=o*i-u*r,e[1]=a*i-l*r,e[2]=s*i-f*r,e[3]=c*i-h*r,e[8]=o*r+u*i,e[9]=a*r+l*i,e[10]=s*r+f*i,e[11]=c*r+h*i,e}function ft(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[0],a=t[1],s=t[2],c=t[3],u=t[4],l=t[5],f=t[6],h=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=o*i+u*r,e[1]=a*i+l*r,e[2]=s*i+f*r,e[3]=c*i+h*r,e[4]=u*i-o*r,e[5]=l*i-a*r,e[6]=f*i-s*r,e[7]=h*i-c*r,e}function ht(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function vt(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function dt(e,t,n){var r,i,o,a=n[0],s=n[1],c=n[2],u=Math.hypot(a,s,c);return u<v?null:(a*=u=1/u,s*=u,c*=u,r=Math.sin(t),o=1-(i=Math.cos(t)),e[0]=a*a*o+i,e[1]=s*a*o+c*r,e[2]=c*a*o-s*r,e[3]=0,e[4]=a*s*o-c*r,e[5]=s*s*o+i,e[6]=c*s*o+a*r,e[7]=0,e[8]=a*c*o+s*r,e[9]=s*c*o-a*r,e[10]=c*c*o+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}function pt(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r,e[6]=n,e[7]=0,e[8]=0,e[9]=-n,e[10]=r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function mt(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=0,e[2]=-n,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=n,e[9]=0,e[10]=r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function yt(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=0,e[4]=-n,e[5]=r,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function gt(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=r+r,c=i+i,u=o+o,l=r*s,f=r*c,h=r*u,v=i*c,d=i*u,p=o*u,m=a*s,y=a*c,g=a*u;return e[0]=1-(v+p),e[1]=f+g,e[2]=h-y,e[3]=0,e[4]=f-g,e[5]=1-(l+p),e[6]=d+m,e[7]=0,e[8]=h+y,e[9]=d-m,e[10]=1-(l+v),e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}function xt(e,t){var n=new d(3),r=-t[0],i=-t[1],o=-t[2],a=t[3],s=t[4],c=t[5],u=t[6],l=t[7],f=r*r+i*i+o*o+a*a;return f>0?(n[0]=2*(s*a+l*r+c*o-u*i)/f,n[1]=2*(c*a+l*i+u*r-s*o)/f,n[2]=2*(u*a+l*o+s*i-c*r)/f):(n[0]=2*(s*a+l*r+c*o-u*i),n[1]=2*(c*a+l*i+u*r-s*o),n[2]=2*(u*a+l*o+s*i-c*r)),gt(e,t,n),e}function bt(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function wt(e,t){var n=t[0],r=t[1],i=t[2],o=t[4],a=t[5],s=t[6],c=t[8],u=t[9],l=t[10];return e[0]=Math.hypot(n,r,i),e[1]=Math.hypot(o,a,s),e[2]=Math.hypot(c,u,l),e}function Mt(e,t){var n=new d(3);wt(n,t);var r=1/n[0],i=1/n[1],o=1/n[2],a=t[0]*r,s=t[1]*i,c=t[2]*o,u=t[4]*r,l=t[5]*i,f=t[6]*o,h=t[8]*r,v=t[9]*i,p=t[10]*o,m=a+l+p,y=0;return m>0?(y=2*Math.sqrt(m+1),e[3]=.25*y,e[0]=(f-v)/y,e[1]=(h-c)/y,e[2]=(s-u)/y):a>l&&a>p?(y=2*Math.sqrt(1+a-l-p),e[3]=(f-v)/y,e[0]=.25*y,e[1]=(s+u)/y,e[2]=(h+c)/y):l>p?(y=2*Math.sqrt(1+l-a-p),e[3]=(h-c)/y,e[0]=(s+u)/y,e[1]=.25*y,e[2]=(f+v)/y):(y=2*Math.sqrt(1+p-a-l),e[3]=(s-u)/y,e[0]=(h+c)/y,e[1]=(f+v)/y,e[2]=.25*y),e}function _t(e,t,n,r){var i=t[0],o=t[1],a=t[2],s=t[3],c=i+i,u=o+o,l=a+a,f=i*c,h=i*u,v=i*l,d=o*u,p=o*l,m=a*l,y=s*c,g=s*u,x=s*l,b=r[0],w=r[1],M=r[2];return e[0]=(1-(d+m))*b,e[1]=(h+x)*b,e[2]=(v-g)*b,e[3]=0,e[4]=(h-x)*w,e[5]=(1-(f+m))*w,e[6]=(p+y)*w,e[7]=0,e[8]=(v+g)*M,e[9]=(p-y)*M,e[10]=(1-(f+d))*M,e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}function St(e,t,n,r,i){var o=t[0],a=t[1],s=t[2],c=t[3],u=o+o,l=a+a,f=s+s,h=o*u,v=o*l,d=o*f,p=a*l,m=a*f,y=s*f,g=c*u,x=c*l,b=c*f,w=r[0],M=r[1],_=r[2],S=i[0],P=i[1],T=i[2],R=(1-(p+y))*w,E=(v+b)*w,z=(d-x)*w,L=(v-b)*M,C=(1-(h+y))*M,A=(m+g)*M,O=(d+x)*_,D=(m-g)*_,I=(1-(h+p))*_;return e[0]=R,e[1]=E,e[2]=z,e[3]=0,e[4]=L,e[5]=C,e[6]=A,e[7]=0,e[8]=O,e[9]=D,e[10]=I,e[11]=0,e[12]=n[0]+S-(R*S+L*P+O*T),e[13]=n[1]+P-(E*S+C*P+D*T),e[14]=n[2]+T-(z*S+A*P+I*T),e[15]=1,e}function Pt(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n+n,s=r+r,c=i+i,u=n*a,l=r*a,f=r*s,h=i*a,v=i*s,d=i*c,p=o*a,m=o*s,y=o*c;return e[0]=1-f-d,e[1]=l+y,e[2]=h-m,e[3]=0,e[4]=l-y,e[5]=1-u-d,e[6]=v+p,e[7]=0,e[8]=h+m,e[9]=v-p,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Tt(e,t,n,r,i,o,a){var s=1/(n-t),c=1/(i-r),u=1/(o-a);return e[0]=2*o*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*o*c,e[6]=0,e[7]=0,e[8]=(n+t)*s,e[9]=(i+r)*c,e[10]=(a+o)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=a*o*2*u,e[15]=0,e}function Rt(e,t,n,r,i){var o,a=1/Math.tan(t/2);return e[0]=a/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(o=1/(r-i),e[10]=(i+r)*o,e[14]=2*i*r*o):(e[10]=-1,e[14]=-2*r),e}function Et(e,t,n,r){var i=Math.tan(t.upDegrees*Math.PI/180),o=Math.tan(t.downDegrees*Math.PI/180),a=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),c=2/(a+s),u=2/(i+o);return e[0]=c,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-(a-s)*c*.5,e[9]=(i-o)*u*.5,e[10]=r/(n-r),e[11]=-1,e[12]=0,e[13]=0,e[14]=r*n/(n-r),e[15]=0,e}function zt(e,t,n,r,i,o,a){var s=1/(t-n),c=1/(r-i),u=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*c,e[14]=(a+o)*u,e[15]=1,e}function Lt(e,t,n,r){var i,o,a,s,c,u,l,f,h,d,p=t[0],m=t[1],y=t[2],g=r[0],x=r[1],b=r[2],w=n[0],M=n[1],_=n[2];return Math.abs(p-w)<v&&Math.abs(m-M)<v&&Math.abs(y-_)<v?et(e):(l=p-w,f=m-M,h=y-_,i=x*(h*=d=1/Math.hypot(l,f,h))-b*(f*=d),o=b*(l*=d)-g*h,a=g*f-x*l,(d=Math.hypot(i,o,a))?(i*=d=1/d,o*=d,a*=d):(i=0,o=0,a=0),s=f*a-h*o,c=h*i-l*a,u=l*o-f*i,(d=Math.hypot(s,c,u))?(s*=d=1/d,c*=d,u*=d):(s=0,c=0,u=0),e[0]=i,e[1]=s,e[2]=l,e[3]=0,e[4]=o,e[5]=c,e[6]=f,e[7]=0,e[8]=a,e[9]=u,e[10]=h,e[11]=0,e[12]=-(i*p+o*m+a*y),e[13]=-(s*p+c*m+u*y),e[14]=-(l*p+f*m+h*y),e[15]=1,e)}function Ct(e,t,n,r){var i=t[0],o=t[1],a=t[2],s=r[0],c=r[1],u=r[2],l=i-n[0],f=o-n[1],h=a-n[2],v=l*l+f*f+h*h;v>0&&(l*=v=1/Math.sqrt(v),f*=v,h*=v);var d=c*h-u*f,p=u*l-s*h,m=s*f-c*l;return(v=d*d+p*p+m*m)>0&&(d*=v=1/Math.sqrt(v),p*=v,m*=v),e[0]=d,e[1]=p,e[2]=m,e[3]=0,e[4]=f*m-h*p,e[5]=h*d-l*m,e[6]=l*p-f*d,e[7]=0,e[8]=l,e[9]=f,e[10]=h,e[11]=0,e[12]=i,e[13]=o,e[14]=a,e[15]=1,e}function At(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}function Ot(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}function Dt(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e[9]=t[9]+n[9],e[10]=t[10]+n[10],e[11]=t[11]+n[11],e[12]=t[12]+n[12],e[13]=t[13]+n[13],e[14]=t[14]+n[14],e[15]=t[15]+n[15],e}function It(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e[9]=t[9]-n[9],e[10]=t[10]-n[10],e[11]=t[11]-n[11],e[12]=t[12]-n[12],e[13]=t[13]-n[13],e[14]=t[14]-n[14],e[15]=t[15]-n[15],e}function kt(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12]*n,e[13]=t[13]*n,e[14]=t[14]*n,e[15]=t[15]*n,e}function Ft(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e[9]=t[9]+n[9]*r,e[10]=t[10]+n[10]*r,e[11]=t[11]+n[11]*r,e[12]=t[12]+n[12]*r,e[13]=t[13]+n[13]*r,e[14]=t[14]+n[14]*r,e[15]=t[15]+n[15]*r,e}function jt(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function Ut(e,t){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],c=e[6],u=e[7],l=e[8],f=e[9],h=e[10],d=e[11],p=e[12],m=e[13],y=e[14],g=e[15],x=t[0],b=t[1],w=t[2],M=t[3],_=t[4],S=t[5],P=t[6],T=t[7],R=t[8],E=t[9],z=t[10],L=t[11],C=t[12],A=t[13],O=t[14],D=t[15];return Math.abs(n-x)<=v*Math.max(1,Math.abs(n),Math.abs(x))&&Math.abs(r-b)<=v*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(i-w)<=v*Math.max(1,Math.abs(i),Math.abs(w))&&Math.abs(o-M)<=v*Math.max(1,Math.abs(o),Math.abs(M))&&Math.abs(a-_)<=v*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(s-S)<=v*Math.max(1,Math.abs(s),Math.abs(S))&&Math.abs(c-P)<=v*Math.max(1,Math.abs(c),Math.abs(P))&&Math.abs(u-T)<=v*Math.max(1,Math.abs(u),Math.abs(T))&&Math.abs(l-R)<=v*Math.max(1,Math.abs(l),Math.abs(R))&&Math.abs(f-E)<=v*Math.max(1,Math.abs(f),Math.abs(E))&&Math.abs(h-z)<=v*Math.max(1,Math.abs(h),Math.abs(z))&&Math.abs(d-L)<=v*Math.max(1,Math.abs(d),Math.abs(L))&&Math.abs(p-C)<=v*Math.max(1,Math.abs(p),Math.abs(C))&&Math.abs(m-A)<=v*Math.max(1,Math.abs(m),Math.abs(A))&&Math.abs(y-O)<=v*Math.max(1,Math.abs(y),Math.abs(O))&&Math.abs(g-D)<=v*Math.max(1,Math.abs(g),Math.abs(D))}var Bt=ot,Gt=It;function Nt(){var e=new d(3);return d!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function Ht(e){var t=new d(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Vt(e){var t=e[0],n=e[1],r=e[2];return Math.hypot(t,n,r)}function Wt(e,t,n){var r=new d(3);return r[0]=e,r[1]=t,r[2]=n,r}function Zt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function qt(e,t,n,r){return e[0]=t,e[1]=n,e[2]=r,e}function Yt(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function Xt(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function Kt(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}function Qt(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}function Jt(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}function $t(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}function en(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e}function tn(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e}function nn(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}function rn(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function on(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e}function an(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return Math.hypot(n,r,i)}function sn(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return n*n+r*r+i*i}function cn(e){var t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r}function un(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function ln(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function fn(e,t){var n=t[0],r=t[1],i=t[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function hn(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function vn(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],c=n[2];return e[0]=i*c-o*s,e[1]=o*a-r*c,e[2]=r*s-i*a,e}function dn(e,t,n,r){var i=t[0],o=t[1],a=t[2];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e[2]=a+r*(n[2]-a),e}function pn(e,t,n,r,i,o){var a=o*o,s=a*(2*o-3)+1,c=a*(o-2)+o,u=a*(o-1),l=a*(3-2*o);return e[0]=t[0]*s+n[0]*c+r[0]*u+i[0]*l,e[1]=t[1]*s+n[1]*c+r[1]*u+i[1]*l,e[2]=t[2]*s+n[2]*c+r[2]*u+i[2]*l,e}function mn(e,t,n,r,i,o){var a=1-o,s=a*a,c=o*o,u=s*a,l=3*o*s,f=3*c*a,h=c*o;return e[0]=t[0]*u+n[0]*l+r[0]*f+i[0]*h,e[1]=t[1]*u+n[1]*l+r[1]*f+i[1]*h,e[2]=t[2]*u+n[2]*l+r[2]*f+i[2]*h,e}function yn(e,t){t=t||1;var n=2*p()*Math.PI,r=2*p()-1,i=Math.sqrt(1-r*r)*t;return e[0]=Math.cos(n)*i,e[1]=Math.sin(n)*i,e[2]=r*t,e}function gn(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,e[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,e[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,e[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,e}function xn(e,t,n){var r=t[0],i=t[1],o=t[2];return e[0]=r*n[0]+i*n[3]+o*n[6],e[1]=r*n[1]+i*n[4]+o*n[7],e[2]=r*n[2]+i*n[5]+o*n[8],e}function bn(e,t,n){var r=n[0],i=n[1],o=n[2],a=n[3],s=t[0],c=t[1],u=t[2],l=i*u-o*c,f=o*s-r*u,h=r*c-i*s,v=i*h-o*f,d=o*l-r*h,p=r*f-i*l,m=2*a;return l*=m,f*=m,h*=m,v*=2,d*=2,p*=2,e[0]=s+l+v,e[1]=c+f+d,e[2]=u+h+p,e}function wn(e,t,n,r){var i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e}function Mn(e,t,n,r){var i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e}function _n(e,t,n,r){var i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e}function Sn(e,t){var n=e[0],r=e[1],i=e[2],o=t[0],a=t[1],s=t[2],c=Math.sqrt(n*n+r*r+i*i)*Math.sqrt(o*o+a*a+s*s),u=c&&hn(e,t)/c;return Math.acos(Math.min(Math.max(u,-1),1))}function Pn(e){return e[0]=0,e[1]=0,e[2]=0,e}function Tn(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"}function Rn(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function En(e,t){var n=e[0],r=e[1],i=e[2],o=t[0],a=t[1],s=t[2];return Math.abs(n-o)<=v*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=v*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=v*Math.max(1,Math.abs(i),Math.abs(s))}var zn,Ln=Xt,Cn=Kt,An=Qt,On=an,Dn=sn,In=Vt,kn=cn,Fn=(zn=Nt(),function(e,t,n,r,i,o){var a,s;for(t||(t=3),n||(n=0),s=r?Math.min(r*t+n,e.length):e.length,a=n;a<s;a+=t)zn[0]=e[a],zn[1]=e[a+1],zn[2]=e[a+2],i(zn,zn,o),e[a]=zn[0],e[a+1]=zn[1],e[a+2]=zn[2];return e});function jn(){var e=new d(4);return d!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function Un(e){var t=new d(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Bn(e,t,n,r){var i=new d(4);return i[0]=e,i[1]=t,i[2]=n,i[3]=r,i}function Gn(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function Nn(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Hn(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e}function Vn(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e}function Wn(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e[3]=t[3]*n[3],e}function Zn(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e[3]=t[3]/n[3],e}function qn(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e}function Yn(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e}function Xn(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e[3]=Math.min(t[3],n[3]),e}function Kn(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e[3]=Math.max(t[3],n[3]),e}function Qn(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function Jn(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e}function $n(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e}function er(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2],o=t[3]-e[3];return Math.hypot(n,r,i,o)}function tr(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2],o=t[3]-e[3];return n*n+r*r+i*i+o*o}function nr(e){var t=e[0],n=e[1],r=e[2],i=e[3];return Math.hypot(t,n,r,i)}function rr(e){var t=e[0],n=e[1],r=e[2],i=e[3];return t*t+n*n+r*r+i*i}function ir(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}function or(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}function ar(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),e[0]=n*a,e[1]=r*a,e[2]=i*a,e[3]=o*a,e}function sr(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function cr(e,t,n,r){var i=n[0]*r[1]-n[1]*r[0],o=n[0]*r[2]-n[2]*r[0],a=n[0]*r[3]-n[3]*r[0],s=n[1]*r[2]-n[2]*r[1],c=n[1]*r[3]-n[3]*r[1],u=n[2]*r[3]-n[3]*r[2],l=t[0],f=t[1],h=t[2],v=t[3];return e[0]=f*u-h*c+v*s,e[1]=-l*u+h*a-v*o,e[2]=l*c-f*a+v*i,e[3]=-l*s+f*o-h*i,e}function ur(e,t,n,r){var i=t[0],o=t[1],a=t[2],s=t[3];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e[2]=a+r*(n[2]-a),e[3]=s+r*(n[3]-s),e}function lr(e,t){var n,r,i,o,a,s;t=t||1;do{a=(n=2*p()-1)*n+(r=2*p()-1)*r}while(a>=1);do{s=(i=2*p()-1)*i+(o=2*p()-1)*o}while(s>=1);var c=Math.sqrt((1-a)/s);return e[0]=t*n,e[1]=t*r,e[2]=t*i*c,e[3]=t*o*c,e}function fr(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3];return e[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,e[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,e[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,e[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,e}function hr(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],c=n[2],u=n[3],l=u*r+s*o-c*i,f=u*i+c*r-a*o,h=u*o+a*i-s*r,v=-a*r-s*i-c*o;return e[0]=l*u+v*-a+f*-c-h*-s,e[1]=f*u+v*-s+h*-a-l*-c,e[2]=h*u+v*-c+l*-s-f*-a,e[3]=t[3],e}function vr(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}function dr(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function pr(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function mr(e,t){var n=e[0],r=e[1],i=e[2],o=e[3],a=t[0],s=t[1],c=t[2],u=t[3];return Math.abs(n-a)<=v*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=v*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-c)<=v*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(o-u)<=v*Math.max(1,Math.abs(o),Math.abs(u))}var yr=Vn,gr=Wn,xr=Zn,br=er,wr=tr,Mr=nr,_r=rr,Sr=function(){var e=jn();return function(t,n,r,i,o,a){var s,c;for(n||(n=4),r||(r=0),c=i?Math.min(i*n+r,t.length):t.length,s=r;s<c;s+=n)e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],e[3]=t[s+3],o(e,e,a),t[s]=e[0],t[s+1]=e[1],t[s+2]=e[2],t[s+3]=e[3];return t}}();function Pr(){var e=new d(4);return d!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function Tr(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function Rr(e,t,n){n*=.5;var r=Math.sin(n);return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=Math.cos(n),e}function Er(e,t){var n=2*Math.acos(t[3]),r=Math.sin(n/2);return r>v?(e[0]=t[0]/r,e[1]=t[1]/r,e[2]=t[2]/r):(e[0]=1,e[1]=0,e[2]=0),n}function zr(e,t){var n=ii(e,t);return Math.acos(2*n*n-1)}function Lr(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=n[0],c=n[1],u=n[2],l=n[3];return e[0]=r*l+a*s+i*u-o*c,e[1]=i*l+a*c+o*s-r*u,e[2]=o*l+a*u+r*c-i*s,e[3]=a*l-r*s-i*c-o*u,e}function Cr(e,t,n){n*=.5;var r=t[0],i=t[1],o=t[2],a=t[3],s=Math.sin(n),c=Math.cos(n);return e[0]=r*c+a*s,e[1]=i*c+o*s,e[2]=o*c-i*s,e[3]=a*c-r*s,e}function Ar(e,t,n){n*=.5;var r=t[0],i=t[1],o=t[2],a=t[3],s=Math.sin(n),c=Math.cos(n);return e[0]=r*c-o*s,e[1]=i*c+a*s,e[2]=o*c+r*s,e[3]=a*c-i*s,e}function Or(e,t,n){n*=.5;var r=t[0],i=t[1],o=t[2],a=t[3],s=Math.sin(n),c=Math.cos(n);return e[0]=r*c+i*s,e[1]=i*c-r*s,e[2]=o*c+a*s,e[3]=a*c-o*s,e}function Dr(e,t){var n=t[0],r=t[1],i=t[2];return e[0]=n,e[1]=r,e[2]=i,e[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i)),e}function Ir(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=Math.sqrt(n*n+r*r+i*i),s=Math.exp(o),c=a>0?s*Math.sin(a)/a:0;return e[0]=n*c,e[1]=r*c,e[2]=i*c,e[3]=s*Math.cos(a),e}function kr(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=Math.sqrt(n*n+r*r+i*i),s=a>0?Math.atan2(a,o)/a:0;return e[0]=n*s,e[1]=r*s,e[2]=i*s,e[3]=.5*Math.log(n*n+r*r+i*i+o*o),e}function Fr(e,t,n){return kr(e,t),ri(e,e,n),Ir(e,e),e}function jr(e,t,n,r){var i,o,a,s,c,u=t[0],l=t[1],f=t[2],h=t[3],d=n[0],p=n[1],m=n[2],y=n[3];return(o=u*d+l*p+f*m+h*y)<0&&(o=-o,d=-d,p=-p,m=-m,y=-y),1-o>v?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-r)*i)/a,c=Math.sin(r*i)/a):(s=1-r,c=r),e[0]=s*u+c*d,e[1]=s*l+c*p,e[2]=s*f+c*m,e[3]=s*h+c*y,e}function Ur(e){var t=p(),n=p(),r=p(),i=Math.sqrt(1-t),o=Math.sqrt(t);return e[0]=i*Math.sin(2*Math.PI*n),e[1]=i*Math.cos(2*Math.PI*n),e[2]=o*Math.sin(2*Math.PI*r),e[3]=o*Math.cos(2*Math.PI*r),e}function Br(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n*n+r*r+i*i+o*o,s=a?1/a:0;return e[0]=-n*s,e[1]=-r*s,e[2]=-i*s,e[3]=o*s,e}function Gr(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function Nr(e,t){var n,r=t[0]+t[4]+t[8];if(r>0)n=Math.sqrt(r+1),e[3]=.5*n,n=.5/n,e[0]=(t[5]-t[7])*n,e[1]=(t[6]-t[2])*n,e[2]=(t[1]-t[3])*n;else{var i=0;t[4]>t[0]&&(i=1),t[8]>t[3*i+i]&&(i=2);var o=(i+1)%3,a=(i+2)%3;n=Math.sqrt(t[3*i+i]-t[3*o+o]-t[3*a+a]+1),e[i]=.5*n,n=.5/n,e[3]=(t[3*o+a]-t[3*a+o])*n,e[o]=(t[3*o+i]+t[3*i+o])*n,e[a]=(t[3*a+i]+t[3*i+a])*n}return e}function Hr(e,t,n,r){var i=.5*Math.PI/180;t*=i,n*=i,r*=i;var o=Math.sin(t),a=Math.cos(t),s=Math.sin(n),c=Math.cos(n),u=Math.sin(r),l=Math.cos(r);return e[0]=o*c*l-a*s*u,e[1]=a*s*l+o*c*u,e[2]=a*c*u-o*s*l,e[3]=a*c*l+o*s*u,e}function Vr(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}var Wr,Zr,qr,Yr,Xr,Kr,Qr=Un,Jr=Bn,$r=Gn,ei=Nn,ti=Hn,ni=Lr,ri=Jn,ii=sr,oi=ur,ai=nr,si=ai,ci=rr,ui=ci,li=ar,fi=pr,hi=mr,vi=(Wr=Nt(),Zr=Wt(1,0,0),qr=Wt(0,1,0),function(e,t,n){var r=hn(t,n);return r<-.999999?(vn(Wr,Zr,t),In(Wr)<1e-6&&vn(Wr,qr,t),fn(Wr,Wr),Rr(e,Wr,Math.PI),e):r>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):(vn(Wr,t,n),e[0]=Wr[0],e[1]=Wr[1],e[2]=Wr[2],e[3]=1+r,li(e,e))}),di=(Yr=Pr(),Xr=Pr(),function(e,t,n,r,i,o){return jr(Yr,t,i,o),jr(Xr,n,r,o),jr(e,Yr,Xr,2*o*(1-o)),e}),pi=(Kr=ye(),function(e,t,n,r){return Kr[0]=n[0],Kr[3]=n[1],Kr[6]=n[2],Kr[1]=r[0],Kr[4]=r[1],Kr[7]=r[2],Kr[2]=-t[0],Kr[5]=-t[1],Kr[8]=-t[2],li(e,Nr(e,Kr))});function mi(){var e=new d(8);return d!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[4]=0,e[5]=0,e[6]=0,e[7]=0),e[3]=1,e}function yi(e){var t=new d(8);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t}function gi(e,t,n,r,i,o,a,s){var c=new d(8);return c[0]=e,c[1]=t,c[2]=n,c[3]=r,c[4]=i,c[5]=o,c[6]=a,c[7]=s,c}function xi(e,t,n,r,i,o,a){var s=new d(8);s[0]=e,s[1]=t,s[2]=n,s[3]=r;var c=.5*i,u=.5*o,l=.5*a;return s[4]=c*r+u*n-l*t,s[5]=u*r+l*e-c*n,s[6]=l*r+c*t-u*e,s[7]=-c*e-u*t-l*n,s}function bi(e,t,n){var r=.5*n[0],i=.5*n[1],o=.5*n[2],a=t[0],s=t[1],c=t[2],u=t[3];return e[0]=a,e[1]=s,e[2]=c,e[3]=u,e[4]=r*u+i*c-o*s,e[5]=i*u+o*a-r*c,e[6]=o*u+r*s-i*a,e[7]=-r*a-i*s-o*c,e}function wi(e,t){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e[4]=.5*t[0],e[5]=.5*t[1],e[6]=.5*t[2],e[7]=0,e}function Mi(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=0,e[5]=0,e[6]=0,e[7]=0,e}function _i(e,t){var n=Pr();Mt(n,t);var r=new d(3);return bt(r,t),bi(e,n,r),e}function Si(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e}function Pi(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e[6]=0,e[7]=0,e}function Ti(e,t,n,r,i,o,a,s,c){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=a,e[6]=s,e[7]=c,e}var Ri=$r;function Ei(e,t){return e[0]=t[4],e[1]=t[5],e[2]=t[6],e[3]=t[7],e}var zi=$r;function Li(e,t){return e[4]=t[0],e[5]=t[1],e[6]=t[2],e[7]=t[3],e}function Ci(e,t){var n=t[4],r=t[5],i=t[6],o=t[7],a=-t[0],s=-t[1],c=-t[2],u=t[3];return e[0]=2*(n*u+o*a+r*c-i*s),e[1]=2*(r*u+o*s+i*a-n*c),e[2]=2*(i*u+o*c+n*s-r*a),e}function Ai(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=.5*n[0],c=.5*n[1],u=.5*n[2],l=t[4],f=t[5],h=t[6],v=t[7];return e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=a*s+i*u-o*c+l,e[5]=a*c+o*s-r*u+f,e[6]=a*u+r*c-i*s+h,e[7]=-r*s-i*c-o*u+v,e}function Oi(e,t,n){var r=-t[0],i=-t[1],o=-t[2],a=t[3],s=t[4],c=t[5],u=t[6],l=t[7],f=s*a+l*r+c*o-u*i,h=c*a+l*i+u*r-s*o,v=u*a+l*o+s*i-c*r,d=l*a-s*r-c*i-u*o;return Cr(e,t,n),r=e[0],i=e[1],o=e[2],a=e[3],e[4]=f*a+d*r+h*o-v*i,e[5]=h*a+d*i+v*r-f*o,e[6]=v*a+d*o+f*i-h*r,e[7]=d*a-f*r-h*i-v*o,e}function Di(e,t,n){var r=-t[0],i=-t[1],o=-t[2],a=t[3],s=t[4],c=t[5],u=t[6],l=t[7],f=s*a+l*r+c*o-u*i,h=c*a+l*i+u*r-s*o,v=u*a+l*o+s*i-c*r,d=l*a-s*r-c*i-u*o;return Ar(e,t,n),r=e[0],i=e[1],o=e[2],a=e[3],e[4]=f*a+d*r+h*o-v*i,e[5]=h*a+d*i+v*r-f*o,e[6]=v*a+d*o+f*i-h*r,e[7]=d*a-f*r-h*i-v*o,e}function Ii(e,t,n){var r=-t[0],i=-t[1],o=-t[2],a=t[3],s=t[4],c=t[5],u=t[6],l=t[7],f=s*a+l*r+c*o-u*i,h=c*a+l*i+u*r-s*o,v=u*a+l*o+s*i-c*r,d=l*a-s*r-c*i-u*o;return Or(e,t,n),r=e[0],i=e[1],o=e[2],a=e[3],e[4]=f*a+d*r+h*o-v*i,e[5]=h*a+d*i+v*r-f*o,e[6]=v*a+d*o+f*i-h*r,e[7]=d*a-f*r-h*i-v*o,e}function ki(e,t,n){var r=n[0],i=n[1],o=n[2],a=n[3],s=t[0],c=t[1],u=t[2],l=t[3];return e[0]=s*a+l*r+c*o-u*i,e[1]=c*a+l*i+u*r-s*o,e[2]=u*a+l*o+s*i-c*r,e[3]=l*a-s*r-c*i-u*o,s=t[4],c=t[5],u=t[6],l=t[7],e[4]=s*a+l*r+c*o-u*i,e[5]=c*a+l*i+u*r-s*o,e[6]=u*a+l*o+s*i-c*r,e[7]=l*a-s*r-c*i-u*o,e}function Fi(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=n[0],c=n[1],u=n[2],l=n[3];return e[0]=r*l+a*s+i*u-o*c,e[1]=i*l+a*c+o*s-r*u,e[2]=o*l+a*u+r*c-i*s,e[3]=a*l-r*s-i*c-o*u,s=n[4],c=n[5],u=n[6],l=n[7],e[4]=r*l+a*s+i*u-o*c,e[5]=i*l+a*c+o*s-r*u,e[6]=o*l+a*u+r*c-i*s,e[7]=a*l-r*s-i*c-o*u,e}function ji(e,t,n,r){if(Math.abs(r)<v)return Si(e,t);var i=Math.hypot(n[0],n[1],n[2]);r*=.5;var o=Math.sin(r),a=o*n[0]/i,s=o*n[1]/i,c=o*n[2]/i,u=Math.cos(r),l=t[0],f=t[1],h=t[2],d=t[3];e[0]=l*u+d*a+f*c-h*s,e[1]=f*u+d*s+h*a-l*c,e[2]=h*u+d*c+l*s-f*a,e[3]=d*u-l*a-f*s-h*c;var p=t[4],m=t[5],y=t[6],g=t[7];return e[4]=p*u+g*a+m*c-y*s,e[5]=m*u+g*s+y*a-p*c,e[6]=y*u+g*c+p*s-m*a,e[7]=g*u-p*a-m*s-y*c,e}function Ui(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e}function Bi(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=n[4],c=n[5],u=n[6],l=n[7],f=t[4],h=t[5],v=t[6],d=t[7],p=n[0],m=n[1],y=n[2],g=n[3];return e[0]=r*g+a*p+i*y-o*m,e[1]=i*g+a*m+o*p-r*y,e[2]=o*g+a*y+r*m-i*p,e[3]=a*g-r*p-i*m-o*y,e[4]=r*l+a*s+i*u-o*c+f*g+d*p+h*y-v*m,e[5]=i*l+a*c+o*s-r*u+h*g+d*m+v*p-f*y,e[6]=o*l+a*u+r*c-i*s+v*g+d*y+f*m-h*p,e[7]=a*l-r*s-i*c-o*u+d*g-f*p-h*m-v*y,e}var Gi=Bi;function Ni(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e}var Hi=ii;function Vi(e,t,n,r){var i=1-r;return Hi(t,n)<0&&(r=-r),e[0]=t[0]*i+n[0]*r,e[1]=t[1]*i+n[1]*r,e[2]=t[2]*i+n[2]*r,e[3]=t[3]*i+n[3]*r,e[4]=t[4]*i+n[4]*r,e[5]=t[5]*i+n[5]*r,e[6]=t[6]*i+n[6]*r,e[7]=t[7]*i+n[7]*r,e}function Wi(e,t){var n=Xi(t);return e[0]=-t[0]/n,e[1]=-t[1]/n,e[2]=-t[2]/n,e[3]=t[3]/n,e[4]=-t[4]/n,e[5]=-t[5]/n,e[6]=-t[6]/n,e[7]=t[7]/n,e}function Zi(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e[4]=-t[4],e[5]=-t[5],e[6]=-t[6],e[7]=t[7],e}var qi=ai,Yi=qi,Xi=ci,Ki=Xi;function Qi(e,t){var n=Xi(t);if(n>0){n=Math.sqrt(n);var r=t[0]/n,i=t[1]/n,o=t[2]/n,a=t[3]/n,s=t[4],c=t[5],u=t[6],l=t[7],f=r*s+i*c+o*u+a*l;e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=(s-r*f)/n,e[5]=(c-i*f)/n,e[6]=(u-o*f)/n,e[7]=(l-a*f)/n}return e}function Ji(e){return"quat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+")"}function $i(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]}function eo(e,t){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],c=e[6],u=e[7],l=t[0],f=t[1],h=t[2],d=t[3],p=t[4],m=t[5],y=t[6],g=t[7];return Math.abs(n-l)<=v*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(r-f)<=v*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(i-h)<=v*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(o-d)<=v*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(a-p)<=v*Math.max(1,Math.abs(a),Math.abs(p))&&Math.abs(s-m)<=v*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(c-y)<=v*Math.max(1,Math.abs(c),Math.abs(y))&&Math.abs(u-g)<=v*Math.max(1,Math.abs(u),Math.abs(g))}function to(){var e=new d(2);return d!=Float32Array&&(e[0]=0,e[1]=0),e}function no(e){var t=new d(2);return t[0]=e[0],t[1]=e[1],t}function ro(e,t){var n=new d(2);return n[0]=e,n[1]=t,n}function io(e,t){return e[0]=t[0],e[1]=t[1],e}function oo(e,t,n){return e[0]=t,e[1]=n,e}function ao(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function so(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function co(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e}function uo(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e}function lo(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e}function fo(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e}function ho(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function vo(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}function po(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e}function mo(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function yo(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e}function go(e,t){var n=t[0]-e[0],r=t[1]-e[1];return Math.hypot(n,r)}function xo(e,t){var n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function bo(e){var t=e[0],n=e[1];return Math.hypot(t,n)}function wo(e){var t=e[0],n=e[1];return t*t+n*n}function Mo(e,t){return e[0]=-t[0],e[1]=-t[1],e}function _o(e,t){return e[0]=1/t[0],e[1]=1/t[1],e}function So(e,t){var n=t[0],r=t[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i)),e[0]=t[0]*i,e[1]=t[1]*i,e}function Po(e,t){return e[0]*t[0]+e[1]*t[1]}function To(e,t,n){var r=t[0]*n[1]-t[1]*n[0];return e[0]=e[1]=0,e[2]=r,e}function Ro(e,t,n,r){var i=t[0],o=t[1];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e}function Eo(e,t){t=t||1;var n=2*p()*Math.PI;return e[0]=Math.cos(n)*t,e[1]=Math.sin(n)*t,e}function zo(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e}function Lo(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function Co(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[3]*i+n[6],e[1]=n[1]*r+n[4]*i+n[7],e}function Ao(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[4]*i+n[12],e[1]=n[1]*r+n[5]*i+n[13],e}function Oo(e,t,n,r){var i=t[0]-n[0],o=t[1]-n[1],a=Math.sin(r),s=Math.cos(r);return e[0]=i*s-o*a+n[0],e[1]=i*a+o*s+n[1],e}function Do(e,t){var n=e[0],r=e[1],i=t[0],o=t[1],a=Math.sqrt(n*n+r*r)*Math.sqrt(i*i+o*o),s=a&&(n*i+r*o)/a;return Math.acos(Math.min(Math.max(s,-1),1))}function Io(e){return e[0]=0,e[1]=0,e}function ko(e){return"vec2("+e[0]+", "+e[1]+")"}function Fo(e,t){return e[0]===t[0]&&e[1]===t[1]}function jo(e,t){var n=e[0],r=e[1],i=t[0],o=t[1];return Math.abs(n-i)<=v*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-o)<=v*Math.max(1,Math.abs(r),Math.abs(o))}var Uo=bo,Bo=so,Go=co,No=uo,Ho=go,Vo=xo,Wo=wo,Zo=function(){var e=to();return function(t,n,r,i,o,a){var s,c;for(n||(n=2),r||(r=0),c=i?Math.min(i*n+r,t.length):t.length,s=r;s<c;s+=n)e[0]=t[s],e[1]=t[s+1],o(e,e,a),t[s]=e[0],t[s+1]=e[1];return t}}()},58679:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = vec4(position, 1.0);\n}\n"},4575:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nuniform sampler2D velocity;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  gl_FragColor = texture2D(velocity, vUv);\n}\n"},85458:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec3 hsv = vec3(0.5 + time * 0.1, 0.4, 1.0);\n  vec3 rgb = convertHsvToRgb(hsv);\n  gl_FragColor = vec4(rgb, 0.25);\n}\n"},38577:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\nuniform float rotate;\n\nmat4 calcRotateMat4X(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Y(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4(vec3 radian) {\n  return calcRotateMat4X(radian.x) * calcRotateMat4Y(radian.y) * calcRotateMat4Z(radian.z);\n}\n\nvoid main(void) {\n  mat4 rotateMat = calcRotateMat4(vec3(time * 0.1 + rotate));\n  vec4 updatePosition = rotateMat * vec4(position, 1.0);\n  gl_Position = projectionMatrix * modelViewMatrix * updatePosition;\n}\n"},5860:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\n\nvarying vec3 vPosition;\n\nconst float duration = 8.0;\nconst float delay = 4.0;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  float now = clamp((time - delay) / duration, 0.0, 1.0);\n  float opacity = (1.0 - length(vPosition.xy / vec2(512.0))) * 0.6 * now;\n  vec3 v = normalize(vPosition);\n  vec3 rgb = convertHsvToRgb(vec3(0.5 + (v.x + v.y + v.x) / 40.0 + time * 0.1, 0.4, 1.0));\n  gl_FragColor = vec4(rgb, opacity);\n}\n"},72406:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float time;\n\nvarying vec3 vPosition;\n\nvoid main() {\n  float sin1 = sin((position.x + position.y) * 0.2 + time * 0.5);\n  float sin2 = sin((position.x - position.y) * 0.4 + time * 2.0);\n  float sin3 = sin((position.x + position.y) * -0.6 + time);\n  vec3 updatePosition = vec3(position.x, position.y, position.z + sin1 * 50.0 + sin2 * 10.0 + sin3 * 8.0);\n  vPosition = position;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(updatePosition, 1.0);\n}\n"},6595:function(e,t){"use strict";t.Z='precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform vec2 resolution;\nuniform sampler2D texture;\n\nvarying vec2 vUv;\n\nconst float duration = 8.0;\nconst float delay = 4.0;\n\n//\n// GLSL textureless classic 3D noise "cnoise",\n// with an RSL-style periodic variant "pnoise".\n// Author:  Stefan Gustavson (stefan.gustavson@liu.se)\n// Version: 2011-10-11\n//\n// Many thanks to Ian McEwan of Ashima Arts for the\n// ideas for permutation and gradient selection.\n//\n// Copyright (c) 2011 Stefan Gustavson. All rights reserved.\n// Distributed under the MIT license. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x)\n{\n  return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec3 fade(vec3 t) {\n  return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n\n// Classic Perlin noise\nfloat cnoise(vec3 P)\n{\n  vec3 Pi0 = floor(P); // Integer part for indexing\n  vec3 Pi1 = Pi0 + vec3(1.0); // Integer part + 1\n  Pi0 = mod289(Pi0);\n  Pi1 = mod289(Pi1);\n  vec3 Pf0 = fract(P); // Fractional part for interpolation\n  vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n  vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n  vec4 iy = vec4(Pi0.yy, Pi1.yy);\n  vec4 iz0 = Pi0.zzzz;\n  vec4 iz1 = Pi1.zzzz;\n\n  vec4 ixy = permute(permute(ix) + iy);\n  vec4 ixy0 = permute(ixy + iz0);\n  vec4 ixy1 = permute(ixy + iz1);\n\n  vec4 gx0 = ixy0 * (1.0 / 7.0);\n  vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n  gx0 = fract(gx0);\n  vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n  vec4 sz0 = step(gz0, vec4(0.0));\n  gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n  gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n\n  vec4 gx1 = ixy1 * (1.0 / 7.0);\n  vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n  gx1 = fract(gx1);\n  vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n  vec4 sz1 = step(gz1, vec4(0.0));\n  gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n  gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n\n  vec3 g000 = vec3(gx0.x,gy0.x,gz0.x);\n  vec3 g100 = vec3(gx0.y,gy0.y,gz0.y);\n  vec3 g010 = vec3(gx0.z,gy0.z,gz0.z);\n  vec3 g110 = vec3(gx0.w,gy0.w,gz0.w);\n  vec3 g001 = vec3(gx1.x,gy1.x,gz1.x);\n  vec3 g101 = vec3(gx1.y,gy1.y,gz1.y);\n  vec3 g011 = vec3(gx1.z,gy1.z,gz1.z);\n  vec3 g111 = vec3(gx1.w,gy1.w,gz1.w);\n\n  vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n  g000 *= norm0.x;\n  g010 *= norm0.y;\n  g100 *= norm0.z;\n  g110 *= norm0.w;\n  vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n  g001 *= norm1.x;\n  g011 *= norm1.y;\n  g101 *= norm1.z;\n  g111 *= norm1.w;\n\n  float n000 = dot(g000, Pf0);\n  float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n  float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n  float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n  float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n  float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n  float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n  float n111 = dot(g111, Pf1);\n\n  vec3 fade_xyz = fade(Pf0);\n  vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n  vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n  float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n  return 2.2 * n_xyz;\n}\n\nfloat random(vec2 c){\n  return fract(sin(dot(c.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  float now = clamp((time - delay) / duration, 0.0, 1.0);\n\n  // ホワイトノイズ\n  float whiteNoise = random(vUv.xy * time) * 0.1 - 0.1;\n\n  // モニターエフェクト\n  float monitor1 = abs(sin(vUv.y * resolution.y * 2.4 + time * 10.0)) * 0.04;\n  float monitor2 = abs(sin(vUv.y * resolution.y * 1.0 + time * 3.0)) * 0.04;\n  float monitor = monitor1 - monitor2;\n\n  // ヴィネット\n  float vignetteMask = smoothstep(0.8, 1.4, length(vUv * 2.0 - 1.0));\n  vec3 vignetteColor = convertHsvToRgb(vec3(0.5 + (vUv.x + vUv.y) / 40.0 + time * 0.1, 0.4, 1.0));\n  vec3 vignette = vignetteMask * vignetteColor * 0.1;\n\n  // RGBズレ\n  float r = texture2D(texture, vUv - vec2(2.0, 0.0) / resolution).r;\n  float g = texture2D(texture, vUv).g;\n  float b = texture2D(texture, vUv + vec2(2.0, 0.0) / resolution).b;\n\n  gl_FragColor = vec4((vec3(r, g, b) + whiteNoise) + monitor + vignette, 1.0);\n}\n'},47925:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vUv = uv;\n  gl_Position = vec4(position, 1.0);\n}\n"},1483:function(e,t){"use strict";t.Z="#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nuniform mat3 normalMatrix;\nuniform float time;\n\nvarying vec3 vPosition;\nvarying float vNoise;\nvarying float vNow;\n\nconst vec3 lightDirection = vec3(1.0, -1.0, -1.0);\nconst float duration = 2.0;\nconst float delayAll = 1.0;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  float now = clamp((time - delayAll - 1.5) / duration, 0.0, 1.0);\n  vec3 normal = normalize(cross(dFdx(vPosition), dFdy(vPosition)));\n  vec3 light = normalize(normalMatrix * lightDirection);\n  float diff = (dot(normal, light) + 1.0) / 2.0 * 0.2;\n  float opacity = smoothstep(0.1, 0.2, vNow);\n  vec3 v = normalize(vPosition);\n  vec3 rgb = (1.0 - now) * vec3(1.0) + convertHsvToRgb(vec3(0.5 + (v.x + v.y + v.x) / 40.0 + time * 0.1, 0.8, 0.4 + sin(time) * 0.05 + vNoise * 0.02));\n  gl_FragColor = vec4(rgb + diff, opacity);\n}\n"},33821:function(e,t){"use strict";t.Z='#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 faceNormal;\nattribute vec3 center;\nattribute float delay;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float time;\n\nvarying vec3 vPosition;\nvarying float vNoise;\nvarying float vNow;\n\nconst float duration = 2.0;\nconst float delayAll = 1.0;\n\nfloat exponentialOut(float t) {\n  return t == 1.0 ? t : 1.0 - pow(2.0, -10.0 * t);\n}\n\nmat4 calcTranslateMat4(vec3 v) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    v.x, v.y, v.z, 1.0\n  );\n}\n\nmat4 calcRotateMat4X(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Y(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4(vec3 radian) {\n  return calcRotateMat4X(radian.x) * calcRotateMat4Y(radian.y) * calcRotateMat4Z(radian.z);\n}\n\n//\n// GLSL textureless classic 3D noise "cnoise",\n// with an RSL-style periodic variant "pnoise".\n// Author:  Stefan Gustavson (stefan.gustavson@liu.se)\n// Version: 2011-10-11\n//\n// Many thanks to Ian McEwan of Ashima Arts for the\n// ideas for permutation and gradient selection.\n//\n// Copyright (c) 2011 Stefan Gustavson. All rights reserved.\n// Distributed under the MIT license. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x)\n{\n  return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec3 fade(vec3 t) {\n  return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n\n// Classic Perlin noise\nfloat cnoise(vec3 P)\n{\n  vec3 Pi0 = floor(P); // Integer part for indexing\n  vec3 Pi1 = Pi0 + vec3(1.0); // Integer part + 1\n  Pi0 = mod289(Pi0);\n  Pi1 = mod289(Pi1);\n  vec3 Pf0 = fract(P); // Fractional part for interpolation\n  vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n  vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n  vec4 iy = vec4(Pi0.yy, Pi1.yy);\n  vec4 iz0 = Pi0.zzzz;\n  vec4 iz1 = Pi1.zzzz;\n\n  vec4 ixy = permute(permute(ix) + iy);\n  vec4 ixy0 = permute(ixy + iz0);\n  vec4 ixy1 = permute(ixy + iz1);\n\n  vec4 gx0 = ixy0 * (1.0 / 7.0);\n  vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n  gx0 = fract(gx0);\n  vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n  vec4 sz0 = step(gz0, vec4(0.0));\n  gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n  gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n\n  vec4 gx1 = ixy1 * (1.0 / 7.0);\n  vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n  gx1 = fract(gx1);\n  vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n  vec4 sz1 = step(gz1, vec4(0.0));\n  gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n  gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n\n  vec3 g000 = vec3(gx0.x,gy0.x,gz0.x);\n  vec3 g100 = vec3(gx0.y,gy0.y,gz0.y);\n  vec3 g010 = vec3(gx0.z,gy0.z,gz0.z);\n  vec3 g110 = vec3(gx0.w,gy0.w,gz0.w);\n  vec3 g001 = vec3(gx1.x,gy1.x,gz1.x);\n  vec3 g101 = vec3(gx1.y,gy1.y,gz1.y);\n  vec3 g011 = vec3(gx1.z,gy1.z,gz1.z);\n  vec3 g111 = vec3(gx1.w,gy1.w,gz1.w);\n\n  vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n  g000 *= norm0.x;\n  g010 *= norm0.y;\n  g100 *= norm0.z;\n  g110 *= norm0.w;\n  vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n  g001 *= norm1.x;\n  g011 *= norm1.y;\n  g101 *= norm1.z;\n  g111 *= norm1.w;\n\n  float n000 = dot(g000, Pf0);\n  float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n  float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n  float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n  float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n  float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n  float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n  float n111 = dot(g111, Pf1);\n\n  vec3 fade_xyz = fade(Pf0);\n  vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n  vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n  float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n  return 2.2 * n_xyz;\n}\n\nvoid main() {\n  float now = exponentialOut(max((time - delayAll - delay - (faceNormal.x + 1.0) / 2.0 - (faceNormal.y + 1.0) / 2.0) / duration, 0.0));\n  mat4 translateMat = calcTranslateMat4(vec3(faceNormal) * 1200.0 * (1.0 - now) + vec3(0.0, sin(time) * 10.0 + 210.0, 0.0));\n  mat4 rotateMat = calcRotateMat4(vec3(0.0, radians((1.0 - now) * faceNormal.y * 4320.0), 0.0));\n  float rotateRadian = radians((time + faceNormal.x + faceNormal.y) * 1440.0);\n  mat4 rotateMatSelf = calcRotateMat4(vec3(rotateRadian, rotateRadian, 0.0));\n  float noise = smoothstep(-0.4, 0.4,\n    cnoise(vec3(position.x * 0.035 - time, position.y * 0.035 - time, position.z * 0.035 + time))\n  ) * 2.0 - 1.0;\n  vec3 updatePositionSelf = (rotateMatSelf * vec4(position - center, 1.0)).xyz * (1.0 - now) + position\n    + normalize(position) * noise ;\n  vec4 updatePosition = rotateMat * translateMat * vec4(updatePositionSelf, 1.0);\n  vPosition = updatePosition.xyz;\n  vNoise = noise;\n  vNow = now;\n  gl_Position = projectionMatrix * modelViewMatrix * updatePosition;\n}\n'},99133:function(e,t){"use strict";t.Z='precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\n\nvarying vec3 vPosition;\nvarying float vOpacity;\n\nconst float duration = 4.0;\nconst float delay = 3.0;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\n//\n// GLSL textureless classic 3D noise "cnoise",\n// with an RSL-style periodic variant "pnoise".\n// Author:  Stefan Gustavson (stefan.gustavson@liu.se)\n// Version: 2011-10-11\n//\n// Many thanks to Ian McEwan of Ashima Arts for the\n// ideas for permutation and gradient selection.\n//\n// Copyright (c) 2011 Stefan Gustavson. All rights reserved.\n// Distributed under the MIT license. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x)\n{\n  return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec3 fade(vec3 t) {\n  return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n\n// Classic Perlin noise\nfloat cnoise(vec3 P)\n{\n  vec3 Pi0 = floor(P); // Integer part for indexing\n  vec3 Pi1 = Pi0 + vec3(1.0); // Integer part + 1\n  Pi0 = mod289(Pi0);\n  Pi1 = mod289(Pi1);\n  vec3 Pf0 = fract(P); // Fractional part for interpolation\n  vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n  vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n  vec4 iy = vec4(Pi0.yy, Pi1.yy);\n  vec4 iz0 = Pi0.zzzz;\n  vec4 iz1 = Pi1.zzzz;\n\n  vec4 ixy = permute(permute(ix) + iy);\n  vec4 ixy0 = permute(ixy + iz0);\n  vec4 ixy1 = permute(ixy + iz1);\n\n  vec4 gx0 = ixy0 * (1.0 / 7.0);\n  vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n  gx0 = fract(gx0);\n  vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n  vec4 sz0 = step(gz0, vec4(0.0));\n  gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n  gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n\n  vec4 gx1 = ixy1 * (1.0 / 7.0);\n  vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n  gx1 = fract(gx1);\n  vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n  vec4 sz1 = step(gz1, vec4(0.0));\n  gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n  gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n\n  vec3 g000 = vec3(gx0.x,gy0.x,gz0.x);\n  vec3 g100 = vec3(gx0.y,gy0.y,gz0.y);\n  vec3 g010 = vec3(gx0.z,gy0.z,gz0.z);\n  vec3 g110 = vec3(gx0.w,gy0.w,gz0.w);\n  vec3 g001 = vec3(gx1.x,gy1.x,gz1.x);\n  vec3 g101 = vec3(gx1.y,gy1.y,gz1.y);\n  vec3 g011 = vec3(gx1.z,gy1.z,gz1.z);\n  vec3 g111 = vec3(gx1.w,gy1.w,gz1.w);\n\n  vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n  g000 *= norm0.x;\n  g010 *= norm0.y;\n  g100 *= norm0.z;\n  g110 *= norm0.w;\n  vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n  g001 *= norm1.x;\n  g011 *= norm1.y;\n  g101 *= norm1.z;\n  g111 *= norm1.w;\n\n  float n000 = dot(g000, Pf0);\n  float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n  float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n  float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n  float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n  float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n  float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n  float n111 = dot(g111, Pf1);\n\n  vec3 fade_xyz = fade(Pf0);\n  vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n  vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n  float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n  return 2.2 * n_xyz;\n}\n\nfloat random(vec2 c){\n  return fract(sin(dot(c.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\nvoid main() {\n  float now = clamp((time - delay) / duration, 0.0, 1.0);\n  float noise1 = cnoise(vec3((vPosition * vec3(0.4, 2.0, -0.6) * 2.0 + time))) * 7.0 - (1.0 + (1.0 - now) * 7.0);\n  float noise2 = cnoise(vec3((vPosition * 42.0 + time)));\n  float noise3 = cnoise(vec3((vPosition * 7.0 + time))) * 2.0;\n  float bright = smoothstep(-0.2, 1.0, (noise1 + noise2 + noise3) * now);\n  vec3 v = normalize(vPosition);\n  vec3 rgb = (1.0 - now) * vec3(1.0) + convertHsvToRgb(vec3(0.5 + (v.x + v.y + v.x) / 40.0 + time * 0.1, 0.4, 1.0));\n  float whiteNoise = random(vPosition.xy);\n  if (bright < 0.4) discard;\n  gl_FragColor = vec4(rgb * vec3(1.0 - bright + 0.6) + whiteNoise * 0.2, 0.4 + vOpacity * 0.5 + sin(time * 2.0) * 0.1);\n}\n'},14595:function(e,t){"use strict";t.Z='#define GLSLIFY 1\nattribute vec3 position;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float time;\n\nvarying vec3 vPosition;\nvarying float vOpacity;\n\nconst float duration = 4.0;\nconst float delay = 3.0;\n\nfloat exponentialOut(float t) {\n  return t == 1.0 ? t : 1.0 - pow(2.0, -10.0 * t);\n}\n\n//\n// GLSL textureless classic 3D noise "cnoise",\n// with an RSL-style periodic variant "pnoise".\n// Author:  Stefan Gustavson (stefan.gustavson@liu.se)\n// Version: 2011-10-11\n//\n// Many thanks to Ian McEwan of Ashima Arts for the\n// ideas for permutation and gradient selection.\n//\n// Copyright (c) 2011 Stefan Gustavson. All rights reserved.\n// Distributed under the MIT license. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x)\n{\n  return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec3 fade(vec3 t) {\n  return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n\n// Classic Perlin noise\nfloat cnoise(vec3 P)\n{\n  vec3 Pi0 = floor(P); // Integer part for indexing\n  vec3 Pi1 = Pi0 + vec3(1.0); // Integer part + 1\n  Pi0 = mod289(Pi0);\n  Pi1 = mod289(Pi1);\n  vec3 Pf0 = fract(P); // Fractional part for interpolation\n  vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n  vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n  vec4 iy = vec4(Pi0.yy, Pi1.yy);\n  vec4 iz0 = Pi0.zzzz;\n  vec4 iz1 = Pi1.zzzz;\n\n  vec4 ixy = permute(permute(ix) + iy);\n  vec4 ixy0 = permute(ixy + iz0);\n  vec4 ixy1 = permute(ixy + iz1);\n\n  vec4 gx0 = ixy0 * (1.0 / 7.0);\n  vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n  gx0 = fract(gx0);\n  vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n  vec4 sz0 = step(gz0, vec4(0.0));\n  gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n  gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n\n  vec4 gx1 = ixy1 * (1.0 / 7.0);\n  vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n  gx1 = fract(gx1);\n  vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n  vec4 sz1 = step(gz1, vec4(0.0));\n  gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n  gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n\n  vec3 g000 = vec3(gx0.x,gy0.x,gz0.x);\n  vec3 g100 = vec3(gx0.y,gy0.y,gz0.y);\n  vec3 g010 = vec3(gx0.z,gy0.z,gz0.z);\n  vec3 g110 = vec3(gx0.w,gy0.w,gz0.w);\n  vec3 g001 = vec3(gx1.x,gy1.x,gz1.x);\n  vec3 g101 = vec3(gx1.y,gy1.y,gz1.y);\n  vec3 g011 = vec3(gx1.z,gy1.z,gz1.z);\n  vec3 g111 = vec3(gx1.w,gy1.w,gz1.w);\n\n  vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n  g000 *= norm0.x;\n  g010 *= norm0.y;\n  g100 *= norm0.z;\n  g110 *= norm0.w;\n  vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n  g001 *= norm1.x;\n  g011 *= norm1.y;\n  g101 *= norm1.z;\n  g111 *= norm1.w;\n\n  float n000 = dot(g000, Pf0);\n  float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n  float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n  float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n  float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n  float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n  float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n  float n111 = dot(g111, Pf1);\n\n  vec3 fade_xyz = fade(Pf0);\n  vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n  vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n  float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n  return 2.2 * n_xyz;\n}\n\nmat4 calcTranslateMat4(vec3 v) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    v.x, v.y, v.z, 1.0\n  );\n}\n\nmat4 calcScaleMat4(vec3 scale) {\n  return mat4(\n    scale.x, 0.0, 0.0, 0.0,\n    0.0, scale.y, 0.0, 0.0,\n    0.0, 0.0, scale.z, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4X(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Y(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4(vec3 radian) {\n  return calcRotateMat4X(radian.x) * calcRotateMat4Y(radian.y) * calcRotateMat4Z(radian.z);\n}\n\nvoid main() {\n  float now = clamp((time - delay) / duration, 0.0, 1.0);\n  mat4 translateMat = calcTranslateMat4(vec3(0.0, sin(time) * 10.0 + 210.0, 0.0));\n  mat4 scaleMat = calcScaleMat4(vec3(exponentialOut(now) * 0.6 + 0.4 + sin(time * 2.0) * 0.04));\n  mat4 rotateMat = calcRotateMat4(vec3(radians(45.0), radians(time * 2.0), radians(-time * 2.0)));\n  float noise = smoothstep(-0.4, 0.4, cnoise(position * 0.035 - time)) * 2.0 - 1.0;\n  vec4 updatePosition = translateMat * rotateMat * scaleMat * vec4(position + normalize(position) * noise * 2.0, 1.0);\n  vPosition = normalize(position);\n  vOpacity = normalize(updatePosition).z;\n  gl_Position = projectionMatrix * modelViewMatrix * updatePosition;\n}\n'},47272:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D texture;\n\nvarying vec2 vUv;\n\nconst float interval = 3.0;\n\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex\n//               noise functions.\n//      Author : Ian McEwan, Ashima Arts.\n//  Maintainer : ijm\n//     Lastmod : 20110822 (ijm)\n//     License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n//               Distributed under the MIT License. See LICENSE file.\n//               https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x) {\n     return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nfloat snoise(vec3 v)\n  {\n  const vec2  C = vec2(1.0/6.0, 1.0/3.0) ;\n  const vec4  D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n  vec3 i  = floor(v + dot(v, C.yyy) );\n  vec3 x0 =   v - i + dot(i, C.xxx) ;\n\n// Other corners\n  vec3 g = step(x0.yzx, x0.xyz);\n  vec3 l = 1.0 - g;\n  vec3 i1 = min( g.xyz, l.zxy );\n  vec3 i2 = max( g.xyz, l.zxy );\n\n  //   x0 = x0 - 0.0 + 0.0 * C.xxx;\n  //   x1 = x0 - i1  + 1.0 * C.xxx;\n  //   x2 = x0 - i2  + 2.0 * C.xxx;\n  //   x3 = x0 - 1.0 + 3.0 * C.xxx;\n  vec3 x1 = x0 - i1 + C.xxx;\n  vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n  vec3 x3 = x0 - D.yyy;      // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n  i = mod289(i);\n  vec4 p = permute( permute( permute(\n             i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n           + i.y + vec4(0.0, i1.y, i2.y, 1.0 ))\n           + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n  float n_ = 0.142857142857; // 1.0/7.0\n  vec3  ns = n_ * D.wyz - D.xzx;\n\n  vec4 j = p - 49.0 * floor(p * ns.z * ns.z);  //  mod(p,7*7)\n\n  vec4 x_ = floor(j * ns.z);\n  vec4 y_ = floor(j - 7.0 * x_ );    // mod(j,N)\n\n  vec4 x = x_ *ns.x + ns.yyyy;\n  vec4 y = y_ *ns.x + ns.yyyy;\n  vec4 h = 1.0 - abs(x) - abs(y);\n\n  vec4 b0 = vec4( x.xy, y.xy );\n  vec4 b1 = vec4( x.zw, y.zw );\n\n  //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n  //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n  vec4 s0 = floor(b0)*2.0 + 1.0;\n  vec4 s1 = floor(b1)*2.0 + 1.0;\n  vec4 sh = -step(h, vec4(0.0));\n\n  vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n  vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n  vec3 p0 = vec3(a0.xy,h.x);\n  vec3 p1 = vec3(a0.zw,h.y);\n  vec3 p2 = vec3(a1.xy,h.z);\n  vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n  vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n  p0 *= norm.x;\n  p1 *= norm.y;\n  p2 *= norm.z;\n  p3 *= norm.w;\n\n// Mix final noise value\n  vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n  m = m * m;\n  return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),\n                                dot(p2,x2), dot(p3,x3) ) );\n  }\n\nfloat cubicOut(float t) {\n  float f = t - 1.0;\n  return f * f * f + 1.0;\n}\n\nvoid main() {\n  float now = cubicOut(min(time / interval, 1.0));\n  float noise = (snoise(vec3(vUv.x * 4.0, vUv.y * 4.0, 1.0)) + 1.0) / 2.0;\n  float opacity = smoothstep(0.4, 0.6, ((noise - 1.0) + now * interval) - vUv.x);\n  gl_FragColor = texture2D(texture, vUv) * vec4(vec3(1.0), opacity);\n}\n"},47807:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float time;\n\nvarying vec2 vUv;\n\nconst float interval = 3.0;\n\nfloat cubicOut(float t) {\n  float f = t - 1.0;\n  return f * f * f + 1.0;\n}\n\nvoid main() {\n  float now = cubicOut(min(time / interval, 1.0));\n  vec3 updatePosition = vec3(\n    position.x * (1.2 - now * 0.2),\n    position.y * (1.2 - now * 0.2),\n    position.z\n  );\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(updatePosition, 1.0);\n}\n"},77911:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nuniform vec3 color;\nuniform sampler2D texture;\n\nvarying vec3 vColor;\nvarying float fOpacity;\n\nvoid main() {\n  gl_FragColor = vec4(color * vColor, fOpacity);\n  gl_FragColor = gl_FragColor * texture2D(texture, gl_PointCoord);\n}\n"},99173:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 customColor;\nattribute float vertexOpacity;\nattribute float size;\n\nvarying vec3 vColor;\nvarying float fOpacity;\n\nvoid main() {\n  vColor = customColor;\n  fOpacity = vertexOpacity;\n  vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n  gl_PointSize = size * (300.0 / length(mvPosition.xyz));\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},64928:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nuniform vec2 resolution;\nuniform sampler2D velocity;\nuniform sampler2D acceleration;\nuniform vec2 anchor;\n\nvarying vec2 vUv;\n\n#define PRECISION 0.000001\n\n#ifndef PRECISION\n#define PRECISION 0.000001\n#endif\n\nvec3 drag(vec3 a, float value) {\n  return normalize(a * -1.0 + PRECISION) * length(a) * value;\n}\n\nvoid main(void) {\n  vec3 v = texture2D(velocity, vUv).xyz;\n  vec3 a = texture2D(acceleration, vUv).xyz;\n  vec3 a2 = a + normalize(vec3(\n    anchor.x * resolution.x / 6.0 + PRECISION,\n    0.0,\n    anchor.y * resolution.y / -2.0 + PRECISION\n  ) - v) / 2.0;\n  vec3 a3 = a2 + drag(a2, 0.003);\n  gl_FragColor = vec4(a3, 1.0);\n}\n"},47347:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = vec4(position, 1.0);\n}\n"},95669:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nuniform float time;\nuniform sampler2D velocity;\nuniform sampler2D acceleration;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  gl_FragColor = vec4(texture2D(acceleration, vUv).xyz + texture2D(velocity, vUv).xyz, 1.0);\n}\n"},40354:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = vec4(position, 1.0);\n}\n"},46663:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nvarying float vAcceleration;\nvarying vec3 vColor;\nvarying float vOpacity;\n\nuniform float time;\n\nvec3 hsv2rgb(vec3 c){\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main(void) {\n  vec3 n;\n  n.xy = gl_PointCoord * 2.0 - 1.0;\n  n.z = 1.0 - dot(n.xy, n.xy);\n  if (n.z < 0.0) discard;\n  gl_FragColor = vec4(hsv2rgb(vec3(vColor.x + time / 3600.0, vColor.y, vColor.z)), vOpacity);\n}\n"},33524:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec2 uv2;\nattribute vec3 color;\nattribute float mass;\n\nuniform sampler2D velocity;\nuniform sampler2D acceleration;\n\nvarying float vAcceleration;\nvarying vec3 vColor;\nvarying float vOpacity;\n\nvoid main(void) {\n  vec4 update_position = modelViewMatrix * texture2D(velocity, uv2);\n  vAcceleration = length(texture2D(acceleration, uv2).xyz) * mass;\n  vColor = color;\n  vOpacity = 0.6 * (300.0 / length(update_position.xyz));\n  gl_PointSize = 2.0 * (300.0 / length(update_position.xyz));\n  gl_Position = projectionMatrix * update_position;\n}\n"},71883:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying float vDelay;\nvarying vec3 vColor;\n\nconst float duration = 3.0;\n\nvoid main() {\n  float now = mod(time + vDelay * duration, duration) / duration;\n  float opacityBothEnds = smoothstep(-500.0, -400.0, vPosition.y) * (1.0 - smoothstep(400.0, 500.0, vPosition.y));\n  float opacity = smoothstep(0.95, 1.0, mod(vUv.y - now, 1.0));\n\n  gl_FragColor = vec4(vColor, opacity * opacityBothEnds * 0.9);\n}\n"},61915:function(e,t){"use strict";t.Z='#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\nattribute vec3 instancePosition;\nattribute float rotate;\nattribute float delay;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying float vDelay;\nvarying vec3 vColor;\n\nmat4 calcRotateMat4X(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Y(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4(vec3 radian) {\n  return calcRotateMat4X(radian.x) * calcRotateMat4Y(radian.y) * calcRotateMat4Z(radian.z);\n}\n\n//\n// GLSL textureless classic 3D noise "cnoise",\n// with an RSL-style periodic variant "pnoise".\n// Author:  Stefan Gustavson (stefan.gustavson@liu.se)\n// Version: 2011-10-11\n//\n// Many thanks to Ian McEwan of Ashima Arts for the\n// ideas for permutation and gradient selection.\n//\n// Copyright (c) 2011 Stefan Gustavson. All rights reserved.\n// Distributed under the MIT license. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x)\n{\n  return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec3 fade(vec3 t) {\n  return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n\n// Classic Perlin noise\nfloat cnoise(vec3 P)\n{\n  vec3 Pi0 = floor(P); // Integer part for indexing\n  vec3 Pi1 = Pi0 + vec3(1.0); // Integer part + 1\n  Pi0 = mod289(Pi0);\n  Pi1 = mod289(Pi1);\n  vec3 Pf0 = fract(P); // Fractional part for interpolation\n  vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n  vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n  vec4 iy = vec4(Pi0.yy, Pi1.yy);\n  vec4 iz0 = Pi0.zzzz;\n  vec4 iz1 = Pi1.zzzz;\n\n  vec4 ixy = permute(permute(ix) + iy);\n  vec4 ixy0 = permute(ixy + iz0);\n  vec4 ixy1 = permute(ixy + iz1);\n\n  vec4 gx0 = ixy0 * (1.0 / 7.0);\n  vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n  gx0 = fract(gx0);\n  vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n  vec4 sz0 = step(gz0, vec4(0.0));\n  gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n  gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n\n  vec4 gx1 = ixy1 * (1.0 / 7.0);\n  vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n  gx1 = fract(gx1);\n  vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n  vec4 sz1 = step(gz1, vec4(0.0));\n  gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n  gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n\n  vec3 g000 = vec3(gx0.x,gy0.x,gz0.x);\n  vec3 g100 = vec3(gx0.y,gy0.y,gz0.y);\n  vec3 g010 = vec3(gx0.z,gy0.z,gz0.z);\n  vec3 g110 = vec3(gx0.w,gy0.w,gz0.w);\n  vec3 g001 = vec3(gx1.x,gy1.x,gz1.x);\n  vec3 g101 = vec3(gx1.y,gy1.y,gz1.y);\n  vec3 g011 = vec3(gx1.z,gy1.z,gz1.z);\n  vec3 g111 = vec3(gx1.w,gy1.w,gz1.w);\n\n  vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n  g000 *= norm0.x;\n  g010 *= norm0.y;\n  g100 *= norm0.z;\n  g110 *= norm0.w;\n  vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n  g001 *= norm1.x;\n  g011 *= norm1.y;\n  g101 *= norm1.z;\n  g111 *= norm1.w;\n\n  float n000 = dot(g000, Pf0);\n  float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n  float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n  float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n  float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n  float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n  float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n  float n111 = dot(g111, Pf1);\n\n  vec3 fade_xyz = fade(Pf0);\n  vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n  vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n  float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n  return 2.2 * n_xyz;\n}\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main(void) {\n  // calculate posiitons of instances.\n  vec3 wavePosition = vec3(0.0, 0.0, sin(radians(position.y / 3.6) + time * 0.1 + delay * 9.0) * 50.0);\n  vec3 updatePosition = position + instancePosition + wavePosition;\n  mat4 rotateMat = calcRotateMat4(vec3(radians(90.0), 0.0, radians(rotate)));\n  vec4 mvPosition = modelViewMatrix * rotateMat * vec4(updatePosition, 1.0);\n\n  // calculate interval for uv animation and setting color.\n  float noise = cnoise(updatePosition / 100.0) * 0.5 + time * 0.1;\n  vec3 hsv = vec3(noise, 0.45, 1.0);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  vPosition = position;\n  vUv = uv;\n  vDelay = delay;\n  vColor = rgb;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n'},7401:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\nvoid main() {\n  // to round.\n  vec3 n;\n  n.xy = gl_PointCoord * 2.0 - 1.0;\n  n.z = 1.0 - dot(n.xy, n.xy);\n  if (n.z < 0.0) discard;\n\n  gl_FragColor = vec4(vColor, vOpacity);\n}\n"},61765:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\n\nuniform vec3 cameraPosition;\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform mat4 modelMatrix;\nuniform float time;\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex\n//               noise functions.\n//      Author : Ian McEwan, Ashima Arts.\n//  Maintainer : ijm\n//     Lastmod : 20110822 (ijm)\n//     License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n//               Distributed under the MIT License. See LICENSE file.\n//               https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x) {\n     return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nfloat snoise(vec3 v)\n  {\n  const vec2  C = vec2(1.0/6.0, 1.0/3.0) ;\n  const vec4  D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n  vec3 i  = floor(v + dot(v, C.yyy) );\n  vec3 x0 =   v - i + dot(i, C.xxx) ;\n\n// Other corners\n  vec3 g = step(x0.yzx, x0.xyz);\n  vec3 l = 1.0 - g;\n  vec3 i1 = min( g.xyz, l.zxy );\n  vec3 i2 = max( g.xyz, l.zxy );\n\n  //   x0 = x0 - 0.0 + 0.0 * C.xxx;\n  //   x1 = x0 - i1  + 1.0 * C.xxx;\n  //   x2 = x0 - i2  + 2.0 * C.xxx;\n  //   x3 = x0 - 1.0 + 3.0 * C.xxx;\n  vec3 x1 = x0 - i1 + C.xxx;\n  vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n  vec3 x3 = x0 - D.yyy;      // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n  i = mod289(i);\n  vec4 p = permute( permute( permute(\n             i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n           + i.y + vec4(0.0, i1.y, i2.y, 1.0 ))\n           + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n  float n_ = 0.142857142857; // 1.0/7.0\n  vec3  ns = n_ * D.wyz - D.xzx;\n\n  vec4 j = p - 49.0 * floor(p * ns.z * ns.z);  //  mod(p,7*7)\n\n  vec4 x_ = floor(j * ns.z);\n  vec4 y_ = floor(j - 7.0 * x_ );    // mod(j,N)\n\n  vec4 x = x_ *ns.x + ns.yyyy;\n  vec4 y = y_ *ns.x + ns.yyyy;\n  vec4 h = 1.0 - abs(x) - abs(y);\n\n  vec4 b0 = vec4( x.xy, y.xy );\n  vec4 b1 = vec4( x.zw, y.zw );\n\n  //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n  //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n  vec4 s0 = floor(b0)*2.0 + 1.0;\n  vec4 s1 = floor(b1)*2.0 + 1.0;\n  vec4 sh = -step(h, vec4(0.0));\n\n  vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n  vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n  vec3 p0 = vec3(a0.xy,h.x);\n  vec3 p1 = vec3(a0.zw,h.y);\n  vec3 p2 = vec3(a1.xy,h.z);\n  vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n  vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n  p0 *= norm.x;\n  p1 *= norm.y;\n  p2 *= norm.z;\n  p3 *= norm.w;\n\n// Mix final noise value\n  vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n  m = m * m;\n  return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),\n                                dot(p2,x2), dot(p3,x3) ) );\n  }\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n\n  float noise1 = snoise(mvPosition.xyz * 0.046 + vec3(-time, time, time) * 0.3);\n  float noise2 = snoise(mvPosition.xyz * 0.0012 + vec3(time, -time, time) * 0.01);\n\n  vec3 hsv = vec3(noise2 * 0.2 + time * 0.1, 1.0, 0.6);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  vColor = rgb;\n  vOpacity = pow(40.0 / length(mvPosition.xyz) * noise1, 2.0);\n\n  gl_Position = projectionMatrix * mvPosition;\n  gl_PointSize = 600.0 / length(mvPosition.xyz) * noise1;\n}\n"},29608:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying float vOpacity;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec3 hsv = vec3(0.13, 0.3, 1.0);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  gl_FragColor = vec4(rgb, vOpacity);\n}\n"},42832:function(e,t){"use strict";t.Z='#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform float time;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying float vOpacity;\n\nfloat quadraticOut(float t) {\n  return -t * (t - 2.0);\n}\n\n//\n// GLSL textureless classic 3D noise "cnoise",\n// with an RSL-style periodic variant "pnoise".\n// Author:  Stefan Gustavson (stefan.gustavson@liu.se)\n// Version: 2011-10-11\n//\n// Many thanks to Ian McEwan of Ashima Arts for the\n// ideas for permutation and gradient selection.\n//\n// Copyright (c) 2011 Stefan Gustavson. All rights reserved.\n// Distributed under the MIT license. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x)\n{\n  return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec3 fade(vec3 t) {\n  return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n\n// Classic Perlin noise\nfloat cnoise(vec3 P)\n{\n  vec3 Pi0 = floor(P); // Integer part for indexing\n  vec3 Pi1 = Pi0 + vec3(1.0); // Integer part + 1\n  Pi0 = mod289(Pi0);\n  Pi1 = mod289(Pi1);\n  vec3 Pf0 = fract(P); // Fractional part for interpolation\n  vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n  vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n  vec4 iy = vec4(Pi0.yy, Pi1.yy);\n  vec4 iz0 = Pi0.zzzz;\n  vec4 iz1 = Pi1.zzzz;\n\n  vec4 ixy = permute(permute(ix) + iy);\n  vec4 ixy0 = permute(ixy + iz0);\n  vec4 ixy1 = permute(ixy + iz1);\n\n  vec4 gx0 = ixy0 * (1.0 / 7.0);\n  vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n  gx0 = fract(gx0);\n  vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n  vec4 sz0 = step(gz0, vec4(0.0));\n  gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n  gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n\n  vec4 gx1 = ixy1 * (1.0 / 7.0);\n  vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n  gx1 = fract(gx1);\n  vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n  vec4 sz1 = step(gz1, vec4(0.0));\n  gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n  gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n\n  vec3 g000 = vec3(gx0.x,gy0.x,gz0.x);\n  vec3 g100 = vec3(gx0.y,gy0.y,gz0.y);\n  vec3 g010 = vec3(gx0.z,gy0.z,gz0.z);\n  vec3 g110 = vec3(gx0.w,gy0.w,gz0.w);\n  vec3 g001 = vec3(gx1.x,gy1.x,gz1.x);\n  vec3 g101 = vec3(gx1.y,gy1.y,gz1.y);\n  vec3 g011 = vec3(gx1.z,gy1.z,gz1.z);\n  vec3 g111 = vec3(gx1.w,gy1.w,gz1.w);\n\n  vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n  g000 *= norm0.x;\n  g010 *= norm0.y;\n  g100 *= norm0.z;\n  g110 *= norm0.w;\n  vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n  g001 *= norm1.x;\n  g011 *= norm1.y;\n  g101 *= norm1.z;\n  g111 *= norm1.w;\n\n  float n000 = dot(g000, Pf0);\n  float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n  float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n  float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n  float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n  float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n  float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n  float n111 = dot(g111, Pf1);\n\n  vec3 fade_xyz = fade(Pf0);\n  vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n  vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n  float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n  return 2.2 * n_xyz;\n}\n\nvoid main(void) {\n  vec2 p = uv * 2.0 - 1.0;\n\n  float circle = quadraticOut(clamp(1.0 - length(p), 0.0, 1.0));\n  float noise = cnoise(position * 0.05 + vec3(0.0, 0.0, time) * 0.1);\n  vec3 noisePosition = normalize(position) * noise * 0.0;\n\n  float noiseA = cnoise(vec3(p.x + cos(time), length(p) * 20.0, p.y + sin(time)));\n\n  // coordinate transformation\n  vec3 updatePosition = noisePosition + position;\n  vec4 mPosition = modelMatrix * vec4(updatePosition, 1.0);\n  vec4 mvPosition = viewMatrix * mPosition;\n\n  vPosition = updatePosition;\n  vUv = uv;\n  vOpacity = circle * noiseA * 2.0;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n'},51261:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vColor;\n\nvoid main() {\n  gl_FragColor = vec4(vColor, 1.0);\n}\n"},6834:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\n\nvarying vec3 vColor;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main(void) {\n  vec2 p = uv * 2.0 - 1.0;\n  // calculate gradation\n  vec3 hsv = vec3(0.13, 0.8, p.y * 0.8 + 0.04);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  // coordinate transformation\n  vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n\n  vColor = rgb;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},34566:function(e,t){"use strict";t.Z="#extension GL_OES_standard_derivatives : enable\nprecision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D tex;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  // Flat Shading\n  vec3 light = normalize(vec3(0.5, 0.5, 1.0));\n  vec3 normal = normalize(cross(dFdx(vPosition), dFdy(vPosition)));\n  float d = (dot(normal, light) + 1.0) / 2.0;\n  float glow = smoothstep(0.85, 1.0, d);\n  float shadow = d;\n\n  // define colors.\n  vec3 hsv = vec3(0.13, 1.0 - glow * 0.8, (shadow + glow * 6.0) / 8.0);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  vec4 texColor = texture2D(tex, vUv);\n  gl_FragColor = vec4(rgb, 1.0) * texColor;\n}\n"},11530:function(e,t){"use strict";t.Z='#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform mat3 normalMatrix;\nuniform float time;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\n//\n// GLSL textureless classic 3D noise "cnoise",\n// with an RSL-style periodic variant "pnoise".\n// Author:  Stefan Gustavson (stefan.gustavson@liu.se)\n// Version: 2011-10-11\n//\n// Many thanks to Ian McEwan of Ashima Arts for the\n// ideas for permutation and gradient selection.\n//\n// Copyright (c) 2011 Stefan Gustavson. All rights reserved.\n// Distributed under the MIT license. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x)\n{\n  return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec3 fade(vec3 t) {\n  return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n\n// Classic Perlin noise\nfloat cnoise(vec3 P)\n{\n  vec3 Pi0 = floor(P); // Integer part for indexing\n  vec3 Pi1 = Pi0 + vec3(1.0); // Integer part + 1\n  Pi0 = mod289(Pi0);\n  Pi1 = mod289(Pi1);\n  vec3 Pf0 = fract(P); // Fractional part for interpolation\n  vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n  vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n  vec4 iy = vec4(Pi0.yy, Pi1.yy);\n  vec4 iz0 = Pi0.zzzz;\n  vec4 iz1 = Pi1.zzzz;\n\n  vec4 ixy = permute(permute(ix) + iy);\n  vec4 ixy0 = permute(ixy + iz0);\n  vec4 ixy1 = permute(ixy + iz1);\n\n  vec4 gx0 = ixy0 * (1.0 / 7.0);\n  vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n  gx0 = fract(gx0);\n  vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n  vec4 sz0 = step(gz0, vec4(0.0));\n  gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n  gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n\n  vec4 gx1 = ixy1 * (1.0 / 7.0);\n  vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n  gx1 = fract(gx1);\n  vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n  vec4 sz1 = step(gz1, vec4(0.0));\n  gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n  gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n\n  vec3 g000 = vec3(gx0.x,gy0.x,gz0.x);\n  vec3 g100 = vec3(gx0.y,gy0.y,gz0.y);\n  vec3 g010 = vec3(gx0.z,gy0.z,gz0.z);\n  vec3 g110 = vec3(gx0.w,gy0.w,gz0.w);\n  vec3 g001 = vec3(gx1.x,gy1.x,gz1.x);\n  vec3 g101 = vec3(gx1.y,gy1.y,gz1.y);\n  vec3 g011 = vec3(gx1.z,gy1.z,gz1.z);\n  vec3 g111 = vec3(gx1.w,gy1.w,gz1.w);\n\n  vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n  g000 *= norm0.x;\n  g010 *= norm0.y;\n  g100 *= norm0.z;\n  g110 *= norm0.w;\n  vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n  g001 *= norm1.x;\n  g011 *= norm1.y;\n  g101 *= norm1.z;\n  g111 *= norm1.w;\n\n  float n000 = dot(g000, Pf0);\n  float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n  float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n  float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n  float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n  float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n  float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n  float n111 = dot(g111, Pf1);\n\n  vec3 fade_xyz = fade(Pf0);\n  vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n  vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n  float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n  return 2.2 * n_xyz;\n}\n\nvoid main(void) {\n  //\n  float noise = cnoise(position * 0.8 + time * 0.4) * (sin(position.y - time * 0.8) * 1.4 + sin(position.y - time * 2.0) * 0.6) / 2.0;\n  vec3 noisePosition = normalize(position * vec3(1.0, 0.0, 1.0)) * pow(noise, 2.0) * 0.8;\n\n  // coordinate transformation\n  vec4 mvPosition = viewMatrix * modelMatrix * vec4(position + noisePosition, 1.0);\n\n  vPosition = (modelMatrix * vec4(position + noisePosition, 0.0)).xyz;\n  vUv = uv;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n'},29808:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\nvoid main() {\n  // Convert PointCoord to a range from -1.0 to 1.0\n  vec2 p = gl_PointCoord * 2.0 - 1.0;\n\n  // Draw double circle\n  float radius = length(p);\n  float opacity = (1.0 - smoothstep(0.2, 1.0, radius)) * vOpacity;\n\n  gl_FragColor = vec4(vColor, opacity);\n}\n"},47869:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute float delay1;\nattribute float delay2;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nconst float duration = 120.0;\n\nvoid main() {\n  // Loop animation\n  float interval = mod(time + delay1, duration) / duration;\n  vec3 move = vec3(\n    cos(time * 0.5 + delay1) * 2.0,\n    interval * 100.0,\n    sin(time * 0.5 + delay2) * 2.0\n    );\n\n  // calculate gradation with position.y\n  vec3 hsv = vec3(0.14, 0.65, 0.85);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  // calculate opacity.\n  float fadeIn = smoothstep(0.0, 10.0, move.y);\n  float blink = sin(time * 0.1 + delay2);\n\n  // coordinate transformation\n  vec4 mvPosition = modelViewMatrix * vec4(position + move, 1.0);\n  float distanceFromCamera = 1000.0 / length(mvPosition.xyz);\n\n  vColor = rgb;\n  vOpacity = fadeIn * blink;\n\n  gl_Position = projectionMatrix * mvPosition;\n  gl_PointSize = distanceFromCamera;\n}\n"},16918:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D texture;\nuniform vec2 resolution;\n\nvarying vec2 vUv;\n\nconst float godrayIteration = 60.0;\nconst float godrayStrength = 20.0;\n\nfloat random2(vec2 c){\n  return fract(sin(dot(c.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\nfloat randomNoise(vec2 p) {\n  return (random2(p - vec2(sin(time))) * 2.0 - 1.0) * 0.04;\n}\n\nvoid main() {\n  // Convert uv to the other vec2 has a range from -1.0 to 1.0.\n  vec2 p = vUv * 2.0 - 1.0;\n  vec2 ratio = 1.0 / resolution;\n\n  // Random Noise\n  float rNoise = randomNoise(vUv);\n\n  // RGB Shift\n  float texColorR = texture2D(texture, vUv - vec2((2.0 * abs(p.x) + 1.0) * ratio.x, 0.0)).r;\n  float texColorG = texture2D(texture, vUv + vec2((2.0 * abs(p.x) + 1.0) * ratio.x, 0.0)).g;\n  float texColorB = texture2D(texture, vUv).b;\n\n  // godray\n  vec2 godrayCenter = vec2(0.5);\n  vec3 godrayDestColor = vec3(0.0);\n  float godrayTotalWeight = 0.0;\n\n  for (float i = 0.0; i < 60.0; i++) {\n    float alpha = i / godrayIteration; // step in loop [0, 1].\n    float weight = alpha - alpha * alpha; // conic curve [0, 0.25, 0].\n    vec2 shiftUv = vUv - (vUv - godrayCenter) * alpha * godrayStrength / godrayIteration; // define a range of to shift UV.\n    godrayDestColor += texture2D(texture, shiftUv).rgb * weight; // draw gradation.\n    godrayTotalWeight += weight;\n  }\n  vec3 godray = godrayDestColor / godrayTotalWeight;\n\n  // Sum total of colors.\n  vec3 color = vec3(texColorR, texColorG, texColorB) + rNoise + godray;\n\n  gl_FragColor = vec4(color, 1.0);\n}\n"},59933:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vUv = uv;\n\n  gl_Position = vec4(position, 1.0);\n}\n"},83257:function(e,t){"use strict";t.Z='precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D texHannyaShingyo;\n\nvarying vec3 vPositionNoise;\nvarying vec2 vUv;\nvarying vec2 vUvBase;\nvarying float vOpacity;\nvarying float vStep;\n\n//\n// GLSL textureless classic 3D noise "cnoise",\n// with an RSL-style periodic variant "pnoise".\n// Author:  Stefan Gustavson (stefan.gustavson@liu.se)\n// Version: 2011-10-11\n//\n// Many thanks to Ian McEwan of Ashima Arts for the\n// ideas for permutation and gradient selection.\n//\n// Copyright (c) 2011 Stefan Gustavson. All rights reserved.\n// Distributed under the MIT license. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x)\n{\n  return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec3 fade(vec3 t) {\n  return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n\n// Classic Perlin noise\nfloat cnoise(vec3 P)\n{\n  vec3 Pi0 = floor(P); // Integer part for indexing\n  vec3 Pi1 = Pi0 + vec3(1.0); // Integer part + 1\n  Pi0 = mod289(Pi0);\n  Pi1 = mod289(Pi1);\n  vec3 Pf0 = fract(P); // Fractional part for interpolation\n  vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n  vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n  vec4 iy = vec4(Pi0.yy, Pi1.yy);\n  vec4 iz0 = Pi0.zzzz;\n  vec4 iz1 = Pi1.zzzz;\n\n  vec4 ixy = permute(permute(ix) + iy);\n  vec4 ixy0 = permute(ixy + iz0);\n  vec4 ixy1 = permute(ixy + iz1);\n\n  vec4 gx0 = ixy0 * (1.0 / 7.0);\n  vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n  gx0 = fract(gx0);\n  vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n  vec4 sz0 = step(gz0, vec4(0.0));\n  gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n  gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n\n  vec4 gx1 = ixy1 * (1.0 / 7.0);\n  vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n  gx1 = fract(gx1);\n  vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n  vec4 sz1 = step(gz1, vec4(0.0));\n  gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n  gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n\n  vec3 g000 = vec3(gx0.x,gy0.x,gz0.x);\n  vec3 g100 = vec3(gx0.y,gy0.y,gz0.y);\n  vec3 g010 = vec3(gx0.z,gy0.z,gz0.z);\n  vec3 g110 = vec3(gx0.w,gy0.w,gz0.w);\n  vec3 g001 = vec3(gx1.x,gy1.x,gz1.x);\n  vec3 g101 = vec3(gx1.y,gy1.y,gz1.y);\n  vec3 g011 = vec3(gx1.z,gy1.z,gz1.z);\n  vec3 g111 = vec3(gx1.w,gy1.w,gz1.w);\n\n  vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n  g000 *= norm0.x;\n  g010 *= norm0.y;\n  g100 *= norm0.z;\n  g110 *= norm0.w;\n  vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n  g001 *= norm1.x;\n  g011 *= norm1.y;\n  g101 *= norm1.z;\n  g111 *= norm1.w;\n\n  float n000 = dot(g000, Pf0);\n  float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n  float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n  float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n  float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n  float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n  float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n  float n111 = dot(g111, Pf1);\n\n  vec3 fade_xyz = fade(Pf0);\n  vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n  vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n  float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n  return 2.2 * n_xyz;\n}\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  // coordinate tex color.\n  vec4 texColor = texture2D(texHannyaShingyo, vUv);\n\n  // coordinate cross fade alpha value with delay.\n  float dRange = 0.1;\n  float crossFadeDelay = vUvBase.y * dRange;\n  float crossFade = smoothstep(crossFadeDelay, crossFadeDelay + 0.3, vStep)\n    * (1.0 - smoothstep(crossFadeDelay + 0.7 - dRange, crossFadeDelay + 1.0 - dRange, vStep));\n\n  // dissolve effect.\n  float noise1 = cnoise(vec3(vPositionNoise * 0.7));\n  float noise2 = cnoise(vec3(vPositionNoise * 1.8));\n  float noiseAll = (noise1 * 2.0 + noise2 * 0.4) / 2.4;\n  float noise = (noiseAll * 0.5 + 0.5) + (crossFade * 2.0 - 1.0);\n  float disolveMask = smoothstep(0.28, 0.3, noise);\n  vec4 disolve = vec4(convertHsvToRgb(vec3(0.13, 0.9, 0.75)), 1.0) * disolveMask;\n  float disolveEdgeMask = smoothstep(0.0, 0.02, noise) * (1.0 - smoothstep(0.28, 0.3, noise));\n  vec4 disolveEdge = vec4(convertHsvToRgb(vec3(0.13, 0.4, 1.0)), 1.0) * disolveEdgeMask;\n\n  // glow\n  float glow = cnoise(vPositionNoise * 0.25 + time) * 0.5;\n\n  gl_FragColor = (disolve + disolveEdge + vec4(vec3(glow), 0.0)) * vOpacity * texColor.a;\n}\n'},46301:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\nattribute vec3 iPosition;\nattribute vec2 iUv;\nattribute float iId;\nattribute float iTime;\nattribute float iIsAnimated;\nattribute float iScale;\nattribute float iMove;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\nuniform float unitUv;\nuniform float duration;\n\nvarying vec3 vPositionNoise;\nvarying vec2 vUv;\nvarying vec2 vUvBase;\nvarying float vOpacity;\nvarying float vStep;\n\nmat4 calcScaleMat4(vec3 scale) {\n  return mat4(\n    scale.x, 0.0, 0.0, 0.0,\n    0.0, scale.y, 0.0, 0.0,\n    0.0, 0.0, scale.z, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4X(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Y(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4(vec3 radian) {\n  return calcRotateMat4X(radian.x) * calcRotateMat4Y(radian.y) * calcRotateMat4Z(radian.z);\n}\n\nvoid main(void) {\n  vec3 move = vec3(0.0, iTime / duration * iMove, 0.0);\n  mat4 scaleMat = calcScaleMat4(vec3(iScale));\n  mat4 rotateMat = calcRotateMat4(vec3(\n    radians(sin(time * 0.3 + iId * 30.0) * 30.0),\n    radians(cos(time * 0.3 + iId * 30.0) * 45.0),\n    radians(cos(time * 0.3 + iId * 30.0) * 30.0)\n  ));\n  vec3 updatePosition = (rotateMat * scaleMat * vec4(position, 1.0)).xyz;\n\n  // coordinate transformation\n  vec4 mvPosition = modelViewMatrix * vec4(iPosition + move + updatePosition, 1.0);\n\n  vPositionNoise = position + iId;\n  vUv = uv * unitUv + iUv;\n  vUvBase = uv;\n  vOpacity = iIsAnimated;\n  vStep = iTime / duration;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},76100:function(e,t){"use strict";t.Z="#extension GL_OES_standard_derivatives : enable\nprecision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying float vOpacity;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  // Flat Shading\n  vec3 light = normalize(vec3(0.5, 0.5, 1.0));\n  vec3 normal = normalize(cross(dFdx(vPosition), dFdy(vPosition)));\n  float diff = (dot(normal, light) + 1.0) / 2.0;\n  float glow = smoothstep(0.9, 1.0, diff);\n\n  vec3 hsv = vec3(0.13, 1.0 - glow * 0.8, 0.05 + glow * 0.95);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  gl_FragColor = vec4(rgb, vOpacity);\n}\n"},67467:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform mat3 normalMatrix;\nuniform float time;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying float vOpacity;\n\nvoid main(void) {\n  vec2 p = uv * 2.0 - 1.0;\n\n  // wave motion.\n  float force = pow(smoothstep(0.0, 0.5, length(p)) * (1.0 - smoothstep(0.5, 1.0, length(p))), 2.0) * 1.8;\n  vec3 wave = vec3(0.0, 0.0, (sin(-time * 4.0 + length(p.xy) * 24.0) * 0.5 + 0.5) * force);\n\n  // coordinate transformation\n  vec3 updatePosition = position + wave;\n  vec4 mvPosition = viewMatrix * modelMatrix * vec4(updatePosition, 1.0);\n\n  vPosition = updatePosition;\n  vUv = uv;\n  vOpacity = 1.0 - smoothstep(0.9, 1.0, length(p));\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},34326:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform float size;\nuniform sampler2D texture;\nuniform float colorH;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying float vOpacity;\n\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex\n//               noise functions.\n//      Author : Ian McEwan, Ashima Arts.\n//  Maintainer : ijm\n//     Lastmod : 20110822 (ijm)\n//     License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n//               Distributed under the MIT License. See LICENSE file.\n//               https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x) {\n     return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nfloat snoise(vec3 v)\n  {\n  const vec2  C = vec2(1.0/6.0, 1.0/3.0) ;\n  const vec4  D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n  vec3 i  = floor(v + dot(v, C.yyy) );\n  vec3 x0 =   v - i + dot(i, C.xxx) ;\n\n// Other corners\n  vec3 g = step(x0.yzx, x0.xyz);\n  vec3 l = 1.0 - g;\n  vec3 i1 = min( g.xyz, l.zxy );\n  vec3 i2 = max( g.xyz, l.zxy );\n\n  //   x0 = x0 - 0.0 + 0.0 * C.xxx;\n  //   x1 = x0 - i1  + 1.0 * C.xxx;\n  //   x2 = x0 - i2  + 2.0 * C.xxx;\n  //   x3 = x0 - 1.0 + 3.0 * C.xxx;\n  vec3 x1 = x0 - i1 + C.xxx;\n  vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n  vec3 x3 = x0 - D.yyy;      // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n  i = mod289(i);\n  vec4 p = permute( permute( permute(\n             i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n           + i.y + vec4(0.0, i1.y, i2.y, 1.0 ))\n           + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n  float n_ = 0.142857142857; // 1.0/7.0\n  vec3  ns = n_ * D.wyz - D.xzx;\n\n  vec4 j = p - 49.0 * floor(p * ns.z * ns.z);  //  mod(p,7*7)\n\n  vec4 x_ = floor(j * ns.z);\n  vec4 y_ = floor(j - 7.0 * x_ );    // mod(j,N)\n\n  vec4 x = x_ *ns.x + ns.yyyy;\n  vec4 y = y_ *ns.x + ns.yyyy;\n  vec4 h = 1.0 - abs(x) - abs(y);\n\n  vec4 b0 = vec4( x.xy, y.xy );\n  vec4 b1 = vec4( x.zw, y.zw );\n\n  //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n  //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n  vec4 s0 = floor(b0)*2.0 + 1.0;\n  vec4 s1 = floor(b1)*2.0 + 1.0;\n  vec4 sh = -step(h, vec4(0.0));\n\n  vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n  vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n  vec3 p0 = vec3(a0.xy,h.x);\n  vec3 p1 = vec3(a0.zw,h.y);\n  vec3 p2 = vec3(a1.xy,h.z);\n  vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n  vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n  p0 *= norm.x;\n  p1 *= norm.y;\n  p2 *= norm.z;\n  p3 *= norm.w;\n\n// Mix final noise value\n  vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n  m = m * m;\n  return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),\n                                dot(p2,x2), dot(p3,x3) ) );\n  }\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec4 texColor = texture2D(texture, vUv);\n\n  float noise = snoise(vPosition / vec3(size * 0.25) + vec3(0.0, 0.0, time));\n  vec3 hsv = vec3(colorH + noise * 0.2, 0.4, 1.0);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  if (texColor.a < 0.5) discard;\n\n  gl_FragColor = vec4(rgb, vOpacity) * texColor;\n}\n"},72648:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform float index;\nuniform float time;\nuniform float size;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying float vOpacity;\n\nvoid main() {\n  float flapTime = radians(sin(time * 4.0 - length(position.xy) / size * 2.0 + index * 2.0) * 45.0 + 30.0);\n  float hovering = cos(time * 2.0 + index * 3.0) * size / 16.0;\n  vec3 updatePosition = vec3(\n    cos(flapTime) * position.x,\n    position.y + hovering,\n    sin(flapTime) * abs(position.x) + hovering\n  );\n\n  vPosition = position;\n  vUv = uv;\n  vOpacity = (1.0 - smoothstep(0.75, 1.0, abs((modelMatrix * vec4(updatePosition, 1.0)).z) / 900.0)) * 0.85;\n\n  gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(updatePosition, 1.0);\n}\n"},3410:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\n\nvarying vec4 vUv;\n\nvoid main() {\n  vec4 projectorColor;\n  if (all(bvec4(vUv.x >= 0.0, vUv.y >= 0.0, vUv.x <= vUv.z, vUv.y <= vUv.z))) {\n    projectorColor = texture2DProj(texture, vUv);\n  }\n  gl_FragColor = vec4(vec3(1.0), 0.3) * projectorColor;\n}\n"},440:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform mat4 textureMatrix;\n\nvarying vec4 vUv;\n\nvoid main(void) {\n  vec4 worldPosition = modelMatrix * vec4(position, 1.0);\n  vUv = textureMatrix * worldPosition;\n  gl_Position = projectionMatrix * viewMatrix * worldPosition;\n}\n"},13190:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\nvoid main() {\n  // to round.\n  vec3 n;\n  n.xy = gl_PointCoord * 2.0 - 1.0;\n  n.z = 1.0 - dot(n.xy, n.xy);\n  if (n.z < 0.0) discard;\n\n  gl_FragColor = vec4(vColor, vOpacity * 0.5);\n}\n"},13677:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute float colorH;\nattribute float i;\nattribute float valid;\n\nuniform vec3 cameraPosition;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform float size;\nuniform float interval;\nuniform float time;\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  float thisTime = mod(time + i / size * interval, interval);\n\n  vec3 updatePosition = position + vec3(\n    cos(thisTime * 3.0 + i) * 3.0,\n    thisTime * -16.0,\n    sin(thisTime * 3.0 + i) * 3.0\n  );\n  vec4 mvPosition = viewMatrix * modelMatrix * vec4(updatePosition, 1.0);\n\n  vec3 hsv = vec3(colorH + sin(i) * 0.075, 0.8, 1.0);\n\n  vColor = convertHsvToRgb(hsv);\n  vOpacity = smoothstep(interval * 0.0, interval * 0.1, thisTime)\n    * (1.0 - smoothstep(interval * 0.2, interval * 0.9, thisTime));\n\n  gl_PointSize = 12000.0 / length(mvPosition.xyz);\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},56500:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vUv = uv;\n  gl_Position = vec4(position, 1.0);\n}\n"},50413:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture1;\nuniform sampler2D texture2;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vec4 color1 = texture2D(texture1, vUv);\n  vec4 color2 = texture2D(texture2, vUv);\n  gl_FragColor = color1 * 0.5 + color2;\n}\n"},92586:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform vec2 resolution;\nuniform vec2 direction;\nuniform float radius;\nuniform sampler2D texture;\n\nvarying vec2 vUv;\n\nvec4 gaussianBlur(sampler2D texture, vec2 uv, float radius, vec2 resolution, vec2 direction) {\n  vec4 color = vec4(0.0);\n  vec2 step = radius / resolution * direction;\n  color += texture2D(texture, uv - 4.0 * step) * 0.02699548325659403;\n  color += texture2D(texture, uv - 3.0 * step) * 0.06475879783294587;\n  color += texture2D(texture, uv - 2.0 * step) * 0.12098536225957168;\n  color += texture2D(texture, uv - 1.0 * step) * 0.17603266338214976;\n  color += texture2D(texture, uv) * 0.19947114020071635;\n  color += texture2D(texture, uv + 1.0 * step) * 0.17603266338214976;\n  color += texture2D(texture, uv + 2.0 * step) * 0.12098536225957168;\n  color += texture2D(texture, uv + 3.0 * step) * 0.06475879783294587;\n  color += texture2D(texture, uv + 4.0 * step) * 0.02699548325659403;\n  return color;\n}\n\nvoid main() {\n  vec4 color = gaussianBlur(texture, vUv, radius, resolution, direction);\n  gl_FragColor = color;\n}\n"},38913:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float minBright;\nuniform sampler2D texture;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vec4 bright = max(vec4(0.0), (texture2D(texture, vUv) - minBright));\n  gl_FragColor = bright;\n}\n"},83528:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying float vDelay;\nvarying vec3 vColor;\n\nconst float duration = 10.0;\n\nvoid main() {\n  // calculate interval time from 0 to 1\n  float now = mod(time + vDelay * duration, duration) / duration;\n\n  float opacityBothEnds = smoothstep(-2000.0, -1800.0, vPosition.y) * (1.0 - smoothstep(1800.0, 2000.0, vPosition.y));\n  float opacity = smoothstep(0.85, 1.0, mod(vUv.y - now, 1.0));\n\n  gl_FragColor = vec4(vColor, opacity * opacityBothEnds * 0.08);\n}\n"},75923:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\nattribute vec3 instancePosition;\nattribute float delay;\nattribute float h;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying float vDelay;\nvarying vec3 vColor;\n\nmat4 calcRotateMat4X(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Y(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4(vec3 radian) {\n  return calcRotateMat4X(radian.x) * calcRotateMat4Y(radian.y) * calcRotateMat4Z(radian.z);\n}\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main(void) {\n  // update positions\n  vec3 updatePosition = position + instancePosition;\n  mat4 rotateMat = calcRotateMat4(vec3(radians(90.0), 0.0, radians(180.0)));\n\n  // calculate colors\n  vec3 hsv = vec3(h + time * 0.1, 0.35, 0.6);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  // coordinate transformation\n  vec4 mvPosition = modelViewMatrix * rotateMat * vec4(updatePosition, 1.0);\n\n  vPosition = position;\n  vUv = uv;\n  vDelay = delay;\n  vColor = rgb;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},63819:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\n\nvarying vec3 vPosition;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  // calculate colors\n  vec3 hsv = vec3(time * 0.1 + 0.5, 1.0, (1.0 - abs(vPosition.y / 10000.0)) * 0.08);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  gl_FragColor = vec4(rgb, 1.0);\n}\n"},97550:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\n\nvarying vec3 vPosition;\n\nvoid main() {\n  // coordinate transformation\n  vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n\n  vPosition = position;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},57139:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform float wave1;\nuniform float wave2;\nuniform float wave3;\nuniform float wave4;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nvoid main() {\n  // draw lines\n  float v1 = sin(vUv.y * wave1 + time * 0.2);\n  float v2 = sin(vUv.y * wave2 + time * 0.2);\n  float v3 = sin(vUv.y * wave3 + time * 0.2);\n  float v4 = sin(vUv.y * wave4 + time * 0.2);\n  float v = smoothstep(0.65, 0.7, (v1 + v2 + v3 + v4) / 4.0);\n  vec3 color = vec3(v);\n\n  gl_FragColor = vec4(color, v * 0.08);\n}\n"},21750:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n\n  vPosition = position;\n  vUv = uv;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},80261:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\n\nvarying vec3 vColor1;\nvarying vec3 vColor2;\nvarying float vOpacity;\n\nvoid main() {\n  // convert PointCoord to range from -1.0 to 1.0\n  vec2 p = gl_PointCoord * 2.0 - 1.0;\n\n  // draw double circle\n  float radius = length(p);\n  float r1 = (1.0 - smoothstep(0.95, 1.0, radius));\n  float r2 = (1.0 - smoothstep(0.45, 0.5, radius));\n  vec3 color1 = vColor1 * (r1 - r2);\n  vec3 color2 = vColor2 * r2;\n  vec3 color = color1 + color2;\n  float opacity = ((r1 - r2) * 0.25 + r2 * 0.5) * vOpacity;\n\n  gl_FragColor = vec4(color, opacity);\n}\n"},51263:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute float delay;\nattribute float speed;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\n\nvarying vec3 vColor1;\nvarying vec3 vColor2;\nvarying float vOpacity;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nmat4 calcRotateMat4X(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Y(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4(vec3 radian) {\n  return calcRotateMat4X(radian.x) * calcRotateMat4Y(radian.y) * calcRotateMat4Z(radian.z);\n}\n\nconst float duration = 3.0;\n\nvoid main() {\n  // calculate interval time from 0 to 1\n  float interval = mod(time + delay * duration, duration) / duration;\n\n  // update position and size\n  float size = 10.0 * sin(interval * 4.0);\n  float blink = max(sin(interval * 4.0) * 2.0 - 1.0, 0.0);\n  mat4 rotateMat = calcRotateMat4(vec3(\n    radians(time * speed * 0.3),\n    radians(time * speed),\n    radians(time * speed * 0.3)\n    ));\n\n  // calculate colors\n  vec3 hsv1 = vec3(time * 0.1, 0.6, 1.0);\n  vec3 rgb1 = convertHsvToRgb(hsv1);\n  vec3 hsv2 = vec3(time * 0.1 + 0.2, 0.6, 1.0);\n  vec3 rgb2 = convertHsvToRgb(hsv2);\n\n  // coordinate transformation\n  vec4 mvPosition = modelViewMatrix * rotateMat * vec4(position, 1.0);\n  float distanceFromCamera = 1000.0 / length(mvPosition.xyz);\n\n  vColor1 = rgb1;\n  vColor2 = rgb2;\n  vOpacity = blink * clamp(distanceFromCamera, 0.1, 0.8);\n\n  gl_Position = projectionMatrix * mvPosition;\n  gl_PointSize = distanceFromCamera * size;\n}\n"},54691:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D texture1;\nuniform sampler2D texture2;\nuniform sampler2D texture3;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying vec3 vColor;\nvarying float vRotate1;\nvarying float vRotate2;\nvarying float vRotate3;\n\nmat3 rotateMat3(float radian) {\n  return mat3(\n    cos(radian), -sin(radian), 0.0,\n    sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 1.0\n  );\n}\n\nvoid main() {\n  // rotate textures\n  vec2 uv1 = ((vec3(vUv - 0.5, 1.0) * rotateMat3(time * vRotate1)).xy + 0.5);\n  vec2 uv2 = ((vec3(vUv - 0.5, 1.0) * rotateMat3(time * vRotate2)).xy + 0.5);\n  vec2 uv3 = ((vec3(vUv - 0.5, 1.0) * rotateMat3(time * vRotate3)).xy + 0.5);\n  vec4 texColor1 = texture2D(texture1, uv1);\n  vec4 texColor2 = texture2D(texture2, uv2);\n  vec4 texColor3 = texture2D(texture3, uv3);\n  vec4 color = texColor1 + texColor2 + texColor3;\n\n  // discard low alpha value\n  if (color.a <= 0.1) discard;\n\n  gl_FragColor = vec4(vColor, color.a * 0.35);\n}\n"},40233:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nattribute vec3 instancePosition;\nattribute float rotate1;\nattribute float rotate2;\nattribute float rotate3;\nattribute float h;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying vec3 vColor;\nvarying float vRotate1;\nvarying float vRotate2;\nvarying float vRotate3;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main(void) {\n  // calculate colors\n  vec3 hsv = vec3(h + time * 0.1 + 0.5, 0.4, 1.0);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  // coordinate transformation\n  vec4 mvPosition = modelViewMatrix * vec4(position + instancePosition, 1.0);\n\n  vPosition = position;\n  vUv = uv;\n  vColor = rgb;\n  vRotate1 = rotate1;\n  vRotate2 = rotate2;\n  vRotate3 = rotate3;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},45943:function(e,t){"use strict";t.Z="#extension GL_OES_standard_derivatives : enable\nprecision highp float;\n#define GLSLIFY 1\n\nuniform float time;\n\nvarying vec3 vPosition;\nvarying vec3 vColor;\n\nvoid main() {\n  // flat shading\n  vec3 light = normalize(vec3(0.0, 1.0, 1.0));\n  vec3 normal = normalize(cross(dFdx(vPosition), dFdy(vPosition)));\n  float diff = pow((dot(normal, light) + 1.0) / 2.0, 10.0);\n\n  gl_FragColor = vec4(vColor, diff * 0.4 + 0.03);\n}\n"},85345:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\nuniform float timeShow;\nuniform float durationShow;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nmat4 calcRotateMat4X(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Y(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4(vec3 radian) {\n  return calcRotateMat4X(radian.x) * calcRotateMat4Y(radian.y) * calcRotateMat4Z(radian.z);\n}\n\nvarying vec3 vPosition;\nvarying vec3 vColor;\nvarying float vOpacity;\n\nvoid main() {\n  // convert uv to range from -1.0 to 1.0\n  vec2 resolution = uv * 2.0 - 1.0;\n\n  // update rotation\n  float rotateX = resolution.x * 100.0 + time / 2.0;\n  float rotateY = resolution.y * 200.0 + time / 2.0;\n  float rotateZ = length(resolution.xy) * 150.0 + time / 2.0;\n  mat4 rotateMat = calcRotateMat4(vec3(rotateX, rotateY, rotateZ));\n  vec3 rotatePosition = (rotateMat * vec4(vec3(sin(time * 0.1 + resolution.x * 10.0) * 150.0), 1.0)).xyz;\n\n  // update position\n  vec3 wavePosition = vec3(0.0, 0.0, sin(time * 0.1 + (resolution.x + resolution.y) * 5.6) * 300.0);\n  vec3 updatePosition = position + rotatePosition + wavePosition;\n\n  // calculate colors\n  vec3 hsv = vec3(time * 0.1 + 0.5, 0.35, 0.6);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  // coordinate transformation\n  vec4 mvPosition = modelViewMatrix * vec4(updatePosition, 1.0);\n\n  vPosition = updatePosition;\n  vColor = rgb;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},97125:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vColor;\n\nvoid main() {\n  // make round\n  vec2 p = gl_PointCoord * 2.0 - 1.0;\n  float radius = length(p);\n  float r = 1.0 - smoothstep(0.95, 1.0, radius);\n\n  gl_FragColor = vec4(vColor, r * 0.1);\n}\n"},4798:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\nuniform float timeShow;\nuniform float durationShow;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nmat4 calcRotateMat4X(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Y(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4(vec3 radian) {\n  return calcRotateMat4X(radian.x) * calcRotateMat4Y(radian.y) * calcRotateMat4Z(radian.z);\n}\n\nvarying vec3 vPosition;\nvarying vec3 vColor;\n\nvoid main() {\n  // convert uv to range from -1.0 to 1.0\n  vec2 p = uv * 2.0 - 1.0;\n\n  // update rotation\n  float rotateX = p.x * 100.0 + time / 2.0;\n  float rotateY = p.y * 200.0 + time / 2.0;\n  float rotateZ = length(p.xy) * 150.0 + time / 2.0;\n  mat4 rotateMat = calcRotateMat4(vec3(rotateX, rotateY, rotateZ));\n  vec3 rotatePosition = (rotateMat * vec4(vec3(sin(time * 0.1 + p.x * 10.0) * 150.0), 1.0)).xyz;\n\n  // update position\n  vec3 wavePosition = vec3(0.0, 0.0, sin(time * 0.1 + (p.x + p.y) * 5.6) * 300.0);\n  vec3 updatePosition = position + rotatePosition + wavePosition;\n\n  // update size\n  float size = (pow(sin(rotateX * 10.0), 3.0) + 1.0) * 2.0 + 3.0;\n\n  // calculate colors\n  vec3 hsv = vec3(time * 0.1, 0.35, 0.6);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  // coordinate transformation\n  vec4 mvPosition = modelViewMatrix * vec4(updatePosition, 1.0);\n\n  vPosition = updatePosition;\n  vColor = rgb;\n\n  gl_Position = projectionMatrix * mvPosition;\n  gl_PointSize = size;\n}\n"},2766:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vColor;\n\nvoid main() {\n  gl_FragColor = vec4(vColor, 0.15);\n}\n"},88940:function(e,t){"use strict";t.Z='precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform float interval;\nuniform float duration;\nuniform sampler2D textures[5];\n\nvarying vec2 vUv;\n\nfloat cubicInOut(float t) {\n  return t < 0.5\n    ? 4.0 * t * t * t\n    : 0.5 * pow(2.0 * t - 2.0, 3.0) + 1.0;\n}\n\n//\n// GLSL textureless classic 3D noise "cnoise",\n// with an RSL-style periodic variant "pnoise".\n// Author:  Stefan Gustavson (stefan.gustavson@liu.se)\n// Version: 2011-10-11\n//\n// Many thanks to Ian McEwan of Ashima Arts for the\n// ideas for permutation and gradient selection.\n//\n// Copyright (c) 2011 Stefan Gustavson. All rights reserved.\n// Distributed under the MIT license. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x)\n{\n  return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec3 fade(vec3 t) {\n  return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n\n// Classic Perlin noise\nfloat cnoise(vec3 P)\n{\n  vec3 Pi0 = floor(P); // Integer part for indexing\n  vec3 Pi1 = Pi0 + vec3(1.0); // Integer part + 1\n  Pi0 = mod289(Pi0);\n  Pi1 = mod289(Pi1);\n  vec3 Pf0 = fract(P); // Fractional part for interpolation\n  vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n  vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n  vec4 iy = vec4(Pi0.yy, Pi1.yy);\n  vec4 iz0 = Pi0.zzzz;\n  vec4 iz1 = Pi1.zzzz;\n\n  vec4 ixy = permute(permute(ix) + iy);\n  vec4 ixy0 = permute(ixy + iz0);\n  vec4 ixy1 = permute(ixy + iz1);\n\n  vec4 gx0 = ixy0 * (1.0 / 7.0);\n  vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n  gx0 = fract(gx0);\n  vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n  vec4 sz0 = step(gz0, vec4(0.0));\n  gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n  gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n\n  vec4 gx1 = ixy1 * (1.0 / 7.0);\n  vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n  gx1 = fract(gx1);\n  vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n  vec4 sz1 = step(gz1, vec4(0.0));\n  gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n  gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n\n  vec3 g000 = vec3(gx0.x,gy0.x,gz0.x);\n  vec3 g100 = vec3(gx0.y,gy0.y,gz0.y);\n  vec3 g010 = vec3(gx0.z,gy0.z,gz0.z);\n  vec3 g110 = vec3(gx0.w,gy0.w,gz0.w);\n  vec3 g001 = vec3(gx1.x,gy1.x,gz1.x);\n  vec3 g101 = vec3(gx1.y,gy1.y,gz1.y);\n  vec3 g011 = vec3(gx1.z,gy1.z,gz1.z);\n  vec3 g111 = vec3(gx1.w,gy1.w,gz1.w);\n\n  vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n  g000 *= norm0.x;\n  g010 *= norm0.y;\n  g100 *= norm0.z;\n  g110 *= norm0.w;\n  vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n  g001 *= norm1.x;\n  g011 *= norm1.y;\n  g101 *= norm1.z;\n  g111 *= norm1.w;\n\n  float n000 = dot(g000, Pf0);\n  float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n  float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n  float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n  float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n  float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n  float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n  float n111 = dot(g111, Pf1);\n\n  vec3 fade_xyz = fade(Pf0);\n  vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n  vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n  float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n  return 2.2 * n_xyz;\n}\n\nvec4 getTexColor(float index, vec2 uv) {\n  vec4 color;\n  color += texture2D(textures[0], uv) * (1.0 - step(0.9, index));\n  color += texture2D(textures[1], uv) * step(1.0, index) * (1.0 - step(1.9, index));\n  color += texture2D(textures[2], uv) * step(2.0, index) * (1.0 - step(2.9, index));\n  color += texture2D(textures[3], uv) * step(3.0, index) * (1.0 - step(3.9, index));\n  color += texture2D(textures[4], uv) * step(4.0, index) * (1.0 - step(4.9, index));\n  return color;\n}\n\nvoid main(void) {\n  vec2 p = vUv * 2.0 - 1.0;\n\n  float alpha = cubicInOut(clamp(mod(time, interval) / duration - (interval / duration - 1.0), 0.0, 1.0));\n  float noise1 = cnoise(vec3(vUv * vec2(12.0), time * 0.1));\n  float noise2 = cnoise(vec3(vUv * vec2(12.0), time * 0.1 + 100.0));\n  float noise3 = cnoise(vec3(vUv * vec2(48.0), time * 0.3));\n  float noiseA = noise1 * 0.85 + noise3 * 0.15;\n  float noiseB = noise2 * 0.85 + noise3 * 0.15;\n\n  float mask = clamp(alpha * 2.0 - (noiseA * 0.5 + 0.5), 0.0, 1.0);\n  float mask1 = smoothstep(0.5, 1.0, mask);\n  float mask2 = smoothstep(0.0, 0.5, mask);\n\n  vec2 uvPrev = (vUv + p * 0.15 * alpha) + vec2(0.2) * vec2(noiseA, noiseB) * length(p) * alpha;\n  vec2 uvNext = (vUv - p * 0.15 * (1.0 - alpha)) + vec2(0.2) * vec2(noiseA, noiseB) * length(p) * (1.0 - alpha);\n\n  float indexPrev = floor(mod(time, interval * 5.0) / interval);\n  float indexNext = floor(mod(time + interval, interval * 5.0) / interval);\n\n  vec4 texColorPrev = getTexColor(indexPrev, uvPrev) * (1.0 - mask1);\n  vec4 texColorNext = getTexColor(indexNext, uvNext) * mask2;\n\n  gl_FragColor = texColorPrev + texColorNext;\n}\n'},54312:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform vec2 resolution;\nuniform vec2 imageResolution;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vec2 ratio = vec2(\n    min((resolution.x / resolution.y) / (imageResolution.x / imageResolution.y), 1.0),\n    min((resolution.y / resolution.x) / (imageResolution.y / imageResolution.x), 1.0)\n  );\n\n  vec2 updateUv = vec2(\n    uv.x * ratio.x + (1.0 - ratio.x) * 0.5,\n    uv.y * ratio.y + (1.0 - ratio.y) * 0.5\n  );\n\n  vUv = updateUv;\n  gl_Position = vec4(position, 1.0);\n}\n"},61786:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nvarying vec3 vColor;\nvarying vec3 vNormal;\n\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex\n//               noise functions.\n//      Author : Ian McEwan, Ashima Arts.\n//  Maintainer : ijm\n//     Lastmod : 20110822 (ijm)\n//     License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n//               Distributed under the MIT License. See LICENSE file.\n//               https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x) {\n     return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nfloat snoise(vec3 v)\n  {\n  const vec2  C = vec2(1.0/6.0, 1.0/3.0) ;\n  const vec4  D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n  vec3 i  = floor(v + dot(v, C.yyy) );\n  vec3 x0 =   v - i + dot(i, C.xxx) ;\n\n// Other corners\n  vec3 g = step(x0.yzx, x0.xyz);\n  vec3 l = 1.0 - g;\n  vec3 i1 = min( g.xyz, l.zxy );\n  vec3 i2 = max( g.xyz, l.zxy );\n\n  //   x0 = x0 - 0.0 + 0.0 * C.xxx;\n  //   x1 = x0 - i1  + 1.0 * C.xxx;\n  //   x2 = x0 - i2  + 2.0 * C.xxx;\n  //   x3 = x0 - 1.0 + 3.0 * C.xxx;\n  vec3 x1 = x0 - i1 + C.xxx;\n  vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n  vec3 x3 = x0 - D.yyy;      // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n  i = mod289(i);\n  vec4 p = permute( permute( permute(\n             i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n           + i.y + vec4(0.0, i1.y, i2.y, 1.0 ))\n           + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n  float n_ = 0.142857142857; // 1.0/7.0\n  vec3  ns = n_ * D.wyz - D.xzx;\n\n  vec4 j = p - 49.0 * floor(p * ns.z * ns.z);  //  mod(p,7*7)\n\n  vec4 x_ = floor(j * ns.z);\n  vec4 y_ = floor(j - 7.0 * x_ );    // mod(j,N)\n\n  vec4 x = x_ *ns.x + ns.yyyy;\n  vec4 y = y_ *ns.x + ns.yyyy;\n  vec4 h = 1.0 - abs(x) - abs(y);\n\n  vec4 b0 = vec4( x.xy, y.xy );\n  vec4 b1 = vec4( x.zw, y.zw );\n\n  //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n  //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n  vec4 s0 = floor(b0)*2.0 + 1.0;\n  vec4 s1 = floor(b1)*2.0 + 1.0;\n  vec4 sh = -step(h, vec4(0.0));\n\n  vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n  vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n  vec3 p0 = vec3(a0.xy,h.x);\n  vec3 p1 = vec3(a0.zw,h.y);\n  vec3 p2 = vec3(a1.xy,h.z);\n  vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n  vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n  p0 *= norm.x;\n  p1 *= norm.y;\n  p2 *= norm.z;\n  p3 *= norm.w;\n\n// Mix final noise value\n  vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n  m = m * m;\n  return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),\n                                dot(p2,x2), dot(p3,x3) ) );\n  }\n\nvec3 hsv2rgb(vec3 c){\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nstruct HemisphereLight {\n  vec3 direction;\n  vec3 groundColor;\n  vec3 skyColor;\n};\nuniform HemisphereLight hemisphereLights[NUM_HEMI_LIGHTS];\n\nvoid main() {\n  vec3 light = vec3(0.0);\n  light += (dot(hemisphereLights[0].direction, vNormal) + 1.0) * hemisphereLights[0].skyColor * 0.5;\n  light += (-dot(hemisphereLights[0].direction, vNormal) + 1.0) * hemisphereLights[0].groundColor * 0.5;\n  gl_FragColor = vec4(vColor * light, 1.0);\n}\n"},67112:function(e,t){"use strict";t.Z='#define GLSLIFY 1\nuniform float time;\nuniform float radius;\nuniform float distort;\n\nvarying vec3 vColor;\nvarying vec3 vNormal;\n\n//\n// GLSL textureless classic 3D noise "cnoise",\n// with an RSL-style periodic variant "pnoise".\n// Author:  Stefan Gustavson (stefan.gustavson@liu.se)\n// Version: 2011-10-11\n//\n// Many thanks to Ian McEwan of Ashima Arts for the\n// ideas for permutation and gradient selection.\n//\n// Copyright (c) 2011 Stefan Gustavson. All rights reserved.\n// Distributed under the MIT license. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x)\n{\n  return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec3 fade(vec3 t) {\n  return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n\n// Classic Perlin noise\nfloat cnoise(vec3 P)\n{\n  vec3 Pi0 = floor(P); // Integer part for indexing\n  vec3 Pi1 = Pi0 + vec3(1.0); // Integer part + 1\n  Pi0 = mod289(Pi0);\n  Pi1 = mod289(Pi1);\n  vec3 Pf0 = fract(P); // Fractional part for interpolation\n  vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n  vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n  vec4 iy = vec4(Pi0.yy, Pi1.yy);\n  vec4 iz0 = Pi0.zzzz;\n  vec4 iz1 = Pi1.zzzz;\n\n  vec4 ixy = permute(permute(ix) + iy);\n  vec4 ixy0 = permute(ixy + iz0);\n  vec4 ixy1 = permute(ixy + iz1);\n\n  vec4 gx0 = ixy0 * (1.0 / 7.0);\n  vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n  gx0 = fract(gx0);\n  vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n  vec4 sz0 = step(gz0, vec4(0.0));\n  gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n  gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n\n  vec4 gx1 = ixy1 * (1.0 / 7.0);\n  vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n  gx1 = fract(gx1);\n  vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n  vec4 sz1 = step(gz1, vec4(0.0));\n  gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n  gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n\n  vec3 g000 = vec3(gx0.x,gy0.x,gz0.x);\n  vec3 g100 = vec3(gx0.y,gy0.y,gz0.y);\n  vec3 g010 = vec3(gx0.z,gy0.z,gz0.z);\n  vec3 g110 = vec3(gx0.w,gy0.w,gz0.w);\n  vec3 g001 = vec3(gx1.x,gy1.x,gz1.x);\n  vec3 g101 = vec3(gx1.y,gy1.y,gz1.y);\n  vec3 g011 = vec3(gx1.z,gy1.z,gz1.z);\n  vec3 g111 = vec3(gx1.w,gy1.w,gz1.w);\n\n  vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n  g000 *= norm0.x;\n  g010 *= norm0.y;\n  g100 *= norm0.z;\n  g110 *= norm0.w;\n  vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n  g001 *= norm1.x;\n  g011 *= norm1.y;\n  g101 *= norm1.z;\n  g111 *= norm1.w;\n\n  float n000 = dot(g000, Pf0);\n  float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n  float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n  float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n  float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n  float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n  float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n  float n111 = dot(g111, Pf1);\n\n  vec3 fade_xyz = fade(Pf0);\n  vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n  vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n  float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n  return 2.2 * n_xyz;\n}\n\nvec3 hsv2rgb(vec3 c){\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  float updateTime = time / 1000.0;\n  float noise = cnoise(vec3(position / 200.1 + updateTime * 10.0));\n  vec4 mvPosition = modelViewMatrix * vec4(position * (noise * pow(distort, 2.0) + radius), 1.0);\n\n  vColor = hsv2rgb(vec3(noise * distort * 0.3 + updateTime, 0.2, 1.0));\n  vNormal = normal;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n'},19820:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nuniform float time;\nuniform vec2 resolution;\nuniform float acceleration;\nuniform sampler2D texture;\n\nconst float blur = 16.0;\n\nvarying vec2 vUv;\n\nfloat random2(vec2 c){\n    return fract(sin(dot(c.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\n//\n// Description : Array and textureless GLSL 2D simplex noise function.\n//      Author : Ian McEwan, Ashima Arts.\n//  Maintainer : ijm\n//     Lastmod : 20110822 (ijm)\n//     License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n//               Distributed under the MIT License. See LICENSE file.\n//               https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec2 mod289(vec2 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec3 permute(vec3 x) {\n  return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat snoise(vec2 v)\n  {\n  const vec4 C = vec4(0.211324865405187,  // (3.0-sqrt(3.0))/6.0\n                      0.366025403784439,  // 0.5*(sqrt(3.0)-1.0)\n                     -0.577350269189626,  // -1.0 + 2.0 * C.x\n                      0.024390243902439); // 1.0 / 41.0\n// First corner\n  vec2 i  = floor(v + dot(v, C.yy) );\n  vec2 x0 = v -   i + dot(i, C.xx);\n\n// Other corners\n  vec2 i1;\n  //i1.x = step( x0.y, x0.x ); // x0.x > x0.y ? 1.0 : 0.0\n  //i1.y = 1.0 - i1.x;\n  i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n  // x0 = x0 - 0.0 + 0.0 * C.xx ;\n  // x1 = x0 - i1 + 1.0 * C.xx ;\n  // x2 = x0 - 1.0 + 2.0 * C.xx ;\n  vec4 x12 = x0.xyxy + C.xxzz;\n  x12.xy -= i1;\n\n// Permutations\n  i = mod289(i); // Avoid truncation effects in permutation\n  vec3 p = permute( permute( i.y + vec3(0.0, i1.y, 1.0 ))\n    + i.x + vec3(0.0, i1.x, 1.0 ));\n\n  vec3 m = max(0.5 - vec3(dot(x0,x0), dot(x12.xy,x12.xy), dot(x12.zw,x12.zw)), 0.0);\n  m = m*m ;\n  m = m*m ;\n\n// Gradients: 41 points uniformly over a line, mapped onto a diamond.\n// The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287)\n\n  vec3 x = 2.0 * fract(p * C.www) - 1.0;\n  vec3 h = abs(x) - 0.5;\n  vec3 ox = floor(x + 0.5);\n  vec3 a0 = x - ox;\n\n// Normalise gradients implicitly by scaling m\n// Approximation of: m *= inversesqrt( a0*a0 + h*h );\n  m *= 1.79284291400159 - 0.85373472095314 * ( a0*a0 + h*h );\n\n// Compute final noise value at P\n  vec3 g;\n  g.x  = a0.x  * x0.x  + h.x  * x0.y;\n  g.yz = a0.yz * x12.xz + h.yz * x12.yw;\n  return 130.0 * dot(m, g);\n}\n\nvec2 diffUv(float v, float diff) {\n  return vUv + (vec2(v + snoise(vec2(gl_FragCoord.y + time) / 100.0), 0.0) * diff + vec2(v * 3.0, 0.0)) / resolution;\n}\n\nfloat randomNoise(vec2 p) {\n  return (random2(p - vec2(sin(time))) * 2.0 - 1.0) * max(length(acceleration), 0.08);\n}\n\nvoid main() {\n  float diff = 300.0 * length(acceleration);\n  vec2 uv_r = diffUv(0.0, diff);\n  vec2 uv_g = diffUv(1.0, diff);\n  vec2 uv_b = diffUv(-1.0, diff);\n  float r = texture2D(texture, uv_r).r + randomNoise(uv_r);\n  float g = texture2D(texture, uv_g).g + randomNoise(uv_g);\n  float b = texture2D(texture, uv_b).b + randomNoise(uv_b);\n  gl_FragColor = vec4(r, g, b, 1.0);\n}\n"},11697:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = vec4(position, 1.0);\n}\n"},90217:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vColor;\n\nvoid main() {\n  // Convert PointCoord to the other vec2 has a range from -1.0 to 1.0.\n  vec2 p = gl_PointCoord * 2.0 - 1.0;\n\n  // Draw circle\n  float radius = length(p);\n  float opacity1 = (1.0 - smoothstep(0.5, 0.7, radius));\n  float opacity2 = smoothstep(0.8, 1.0, radius) * (1.0 - smoothstep(1.0, 1.2, radius));\n\n  gl_FragColor = vec4(vColor, (opacity1 + opacity2) * 0.5);\n}\n"},29277:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute float radian;\nattribute float radius;\nattribute float delay;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform float time;\n\nvarying vec3 vColor;\n\nvoid main() {\n  // coordinate transformation\n  vec3 updatePosition = position\n    + vec3(\n      sin(time * 4.0 + delay),\n      sin(radian + time * 0.4) * (radius + sin(time * 4.0 + delay)),\n      cos(radian + time * 0.4) * (radius + sin(time * 4.0 + delay))\n      );\n  vec4 mvPosition = viewMatrix * modelMatrix * vec4(updatePosition, 1.0);\n  float distanceFromCamera = length(mvPosition.xyz);\n  float pointSize = 1000.0 / distanceFromCamera * 1.6;\n\n  vColor = vec3(0.8 - delay * 0.1, 0.6, 0.6);\n\n  gl_Position = projectionMatrix * mvPosition;\n  gl_PointSize = pointSize;\n}\n"},59339:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D texture;\nuniform vec2 resolution;\n\nvarying vec2 vUv;\n\nfloat random2(vec2 c){\n  return fract(sin(dot(c.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\nfloat randomNoise(vec2 p) {\n  return (random2(p - vec2(sin(time))) * 2.0 - 1.0) * 0.04;\n}\n\nvoid main() {\n  // Convert uv to the other vec2 has a range from -1.0 to 1.0.\n  vec2 p = vUv * 2.0 - 1.0;\n  vec2 ratio = 1.0 / resolution;\n\n  // Random Noise\n  float rNoise = randomNoise(vUv);\n\n  // RGB Shift\n  float texColorR = texture2D(texture, vUv - vec2((2.0 * abs(p.x) + 1.0) * ratio.x, 0.0)).r;\n  float texColorG = texture2D(texture, vUv + vec2((2.0 * abs(p.x) + 1.0) * ratio.x, 0.0)).g;\n  float texColorB = texture2D(texture, vUv).b;\n\n  // Sum total of colors.\n  vec3 color = vec3(texColorR, texColorG, texColorB) + rNoise;\n\n  gl_FragColor = vec4(vec3(texColorR, texColorG, texColorB) + rNoise, 1.0);\n}\n"},60125:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vUv = uv;\n\n  gl_Position = vec4(position, 1.0);\n}\n"},24678:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 cameraPosition;\nuniform float time;\nuniform float noiseRange;\nuniform sampler2D texEgg1;\nuniform sampler2D texEgg2;\nuniform sampler2D texDiffSpace;\n\nuniform float speed;\nuniform float circleOutStepMin;\nuniform float circleOutStepMax;\nuniform float circleInStepMin;\nuniform float circleInStepMax;\nuniform float noisePosition;\nuniform float noiseSize;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex\n//               noise functions.\n//      Author : Ian McEwan, Ashima Arts.\n//  Maintainer : ijm\n//     Lastmod : 20110822 (ijm)\n//     License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n//               Distributed under the MIT License. See LICENSE file.\n//               https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x) {\n     return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nfloat snoise(vec3 v)\n  {\n  const vec2  C = vec2(1.0/6.0, 1.0/3.0) ;\n  const vec4  D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n  vec3 i  = floor(v + dot(v, C.yyy) );\n  vec3 x0 =   v - i + dot(i, C.xxx) ;\n\n// Other corners\n  vec3 g = step(x0.yzx, x0.xyz);\n  vec3 l = 1.0 - g;\n  vec3 i1 = min( g.xyz, l.zxy );\n  vec3 i2 = max( g.xyz, l.zxy );\n\n  //   x0 = x0 - 0.0 + 0.0 * C.xxx;\n  //   x1 = x0 - i1  + 1.0 * C.xxx;\n  //   x2 = x0 - i2  + 2.0 * C.xxx;\n  //   x3 = x0 - 1.0 + 3.0 * C.xxx;\n  vec3 x1 = x0 - i1 + C.xxx;\n  vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n  vec3 x3 = x0 - D.yyy;      // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n  i = mod289(i);\n  vec4 p = permute( permute( permute(\n             i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n           + i.y + vec4(0.0, i1.y, i2.y, 1.0 ))\n           + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n  float n_ = 0.142857142857; // 1.0/7.0\n  vec3  ns = n_ * D.wyz - D.xzx;\n\n  vec4 j = p - 49.0 * floor(p * ns.z * ns.z);  //  mod(p,7*7)\n\n  vec4 x_ = floor(j * ns.z);\n  vec4 y_ = floor(j - 7.0 * x_ );    // mod(j,N)\n\n  vec4 x = x_ *ns.x + ns.yyyy;\n  vec4 y = y_ *ns.x + ns.yyyy;\n  vec4 h = 1.0 - abs(x) - abs(y);\n\n  vec4 b0 = vec4( x.xy, y.xy );\n  vec4 b1 = vec4( x.zw, y.zw );\n\n  //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n  //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n  vec4 s0 = floor(b0)*2.0 + 1.0;\n  vec4 s1 = floor(b1)*2.0 + 1.0;\n  vec4 sh = -step(h, vec4(0.0));\n\n  vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n  vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n  vec3 p0 = vec3(a0.xy,h.x);\n  vec3 p1 = vec3(a0.zw,h.y);\n  vec3 p2 = vec3(a1.xy,h.z);\n  vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n  vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n  p0 *= norm.x;\n  p1 *= norm.y;\n  p2 *= norm.z;\n  p3 *= norm.w;\n\n// Mix final noise value\n  vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n  m = m * m;\n  return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),\n                                dot(p2,x2), dot(p3,x3) ) );\n  }\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nfloat exponentialOut(float t) {\n  return t == 1.0 ? t : 1.0 - pow(2.0, -10.0 * t);\n}\n\nvoid main() {\n  float t1 = exponentialOut(min(time, 2.0) / 2.0);\n  float t2 = (1.0 - exponentialOut(min(time, 2.0) / 2.0)) * 3.0;\n  vec2 pos = vUv * 2.0 - vec2(1.0);\n\n  float circleOut = smoothstep(circleOutStepMin, circleOutStepMax, t1 - length(pos));\n  float circleIn = smoothstep(circleInStepMin, circleInStepMax, t1 * 0.5 - length(pos)) * 0.5;\n  float circleLight = smoothstep(0.0, 0.1, (t1 - t2) * 0.3 - length(pos)) * smoothstep(0.0, 0.1, (t1 - t2) * 0.2 - length(pos + vec2(0.2, -0.2)));\n\n  float noiseTime = time * speed + t2;\n  float noise = (\n    snoise(\n      vec3(pos * (noisePosition + noiseRange * 0.1) + vec2(sin(noiseTime),\n      cos(noiseTime)),\n      noiseTime + noiseRange * 100.0\n      )\n    ) + 1.0) / 2.0 * noiseSize;\n\n  float mask = circleOut * noise + circleIn;\n  float maskHighLight = circleLight * (noise + 0.12);\n  float mask0 = 1.0 - step(maskHighLight, 0.13);\n  float mask1 = (1.0 - step(mask, 0.6)) * step(maskHighLight, 0.13);\n  float mask2 = (1.0 - step(mask, 0.28)) * step(mask, 0.6) * step(maskHighLight, 0.23);\n  float mask3 = (1.0 - step(mask, 0.014)) * step(mask, 0.28);\n  float mask4 = (1.0 - step(mask, 0.01)) * step(mask, 0.014);\n\n  vec4 rgba0 = vec4(convertHsvToRgb(vec3(0.125, 0.2, 1.0)), 1.0) * mask0;\n  vec4 rgba1 = vec4(convertHsvToRgb(vec3(0.125, 0.76, 1.0)), 1.0) * mask1;\n  vec4 rgba2 = vec4(convertHsvToRgb(vec3(0.108, 0.91, 1.0)), 1.0) * mask2;\n  vec4 rgba3 = vec4(convertHsvToRgb(vec3(0.1, 0.02, 0.99)), 1.0) * mask3;\n  vec4 rgba4 = vec4(convertHsvToRgb(vec3(0.1, 0.2, 0.9)), 1.0) * mask4;\n\n  float patternNoise1 = step(0.0, snoise(vPosition * 0.015 + vec3(0.0, 0.0, time * 0.1))) * 0.05;\n  float patternNoise2 = step(0.2, snoise(vPosition * 0.025 + vec3(0.0, 1.0, time * 0.3))) * 0.03;\n  vec4 patternColor = vec4(vec3(patternNoise1), 1.0) * mask1 + vec4(vec3(patternNoise2), 1.0) * mask2;\n\n  vec4 eggColor = rgba0 + rgba1 + rgba2 + rgba3 + rgba4 + patternColor;\n\n  gl_FragColor = eggColor;\n}\n"},28914:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nvoid main() {\n  vPosition = position;\n  vUv = uv;\n  gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(position, 1.0);\n}\n"},33274:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D tex;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying vec3 vColor;\n\nfloat random(vec2 c){\n  return fract(sin(dot(c.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\nvoid main() {\n  float noise = random(vUv) * 0.08;\n\n  gl_FragColor = vec4(vColor + noise, 1.0);\n}\n"},44873:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying vec3 vColor;\n\nconst vec3 hsv1 = vec3(0.98, 0.9, 0.05);\nconst vec3 hsv2 = vec3(1.13, 0.9, 0.8);\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main(void) {\n  // calculate gradation with position.y\n  vec3 rgb = convertHsvToRgb(mix(hsv1, hsv2, (normalize(position).y + 1.0) / 2.0));\n\n  // coordinate transformation\n  vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n\n  vPosition = position;\n  vUv = uv;\n  vColor = rgb;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},97459:function(e,t){"use strict";t.Z="#extension GL_OES_standard_derivatives : enable\nprecision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nconst vec3 light = vec3(0.0, 1.0, 0.0);\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  // Flat Shading\n  vec3 normal = normalize(cross(dFdx(vPosition), dFdy(vPosition)));\n  float diff = (dot(normal, light) + 1.0) / 2.0;\n\n  vec3 hsv = vec3(0.88 + diff * 0.2, 1.0 - diff * 0.4, pow(diff, 3.0) * 0.88 + 0.12);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  gl_FragColor = vec4(rgb, 1.0);\n}\n"},92665:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nvoid main(void) {\n  vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n\n  vPosition = position;\n  vUv = uv;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},4653:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex\n//               noise functions.\n//      Author : Ian McEwan, Ashima Arts.\n//  Maintainer : ijm\n//     Lastmod : 20110822 (ijm)\n//     License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n//               Distributed under the MIT License. See LICENSE file.\n//               https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x) {\n     return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nfloat snoise(vec3 v)\n  {\n  const vec2  C = vec2(1.0/6.0, 1.0/3.0) ;\n  const vec4  D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n  vec3 i  = floor(v + dot(v, C.yyy) );\n  vec3 x0 =   v - i + dot(i, C.xxx) ;\n\n// Other corners\n  vec3 g = step(x0.yzx, x0.xyz);\n  vec3 l = 1.0 - g;\n  vec3 i1 = min( g.xyz, l.zxy );\n  vec3 i2 = max( g.xyz, l.zxy );\n\n  //   x0 = x0 - 0.0 + 0.0 * C.xxx;\n  //   x1 = x0 - i1  + 1.0 * C.xxx;\n  //   x2 = x0 - i2  + 2.0 * C.xxx;\n  //   x3 = x0 - 1.0 + 3.0 * C.xxx;\n  vec3 x1 = x0 - i1 + C.xxx;\n  vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n  vec3 x3 = x0 - D.yyy;      // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n  i = mod289(i);\n  vec4 p = permute( permute( permute(\n             i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n           + i.y + vec4(0.0, i1.y, i2.y, 1.0 ))\n           + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n  float n_ = 0.142857142857; // 1.0/7.0\n  vec3  ns = n_ * D.wyz - D.xzx;\n\n  vec4 j = p - 49.0 * floor(p * ns.z * ns.z);  //  mod(p,7*7)\n\n  vec4 x_ = floor(j * ns.z);\n  vec4 y_ = floor(j - 7.0 * x_ );    // mod(j,N)\n\n  vec4 x = x_ *ns.x + ns.yyyy;\n  vec4 y = y_ *ns.x + ns.yyyy;\n  vec4 h = 1.0 - abs(x) - abs(y);\n\n  vec4 b0 = vec4( x.xy, y.xy );\n  vec4 b1 = vec4( x.zw, y.zw );\n\n  //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n  //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n  vec4 s0 = floor(b0)*2.0 + 1.0;\n  vec4 s1 = floor(b1)*2.0 + 1.0;\n  vec4 sh = -step(h, vec4(0.0));\n\n  vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n  vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n  vec3 p0 = vec3(a0.xy,h.x);\n  vec3 p1 = vec3(a0.zw,h.y);\n  vec3 p2 = vec3(a1.xy,h.z);\n  vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n  vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n  p0 *= norm.x;\n  p1 *= norm.y;\n  p2 *= norm.z;\n  p3 *= norm.w;\n\n// Mix final noise value\n  vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n  m = m * m;\n  return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),\n                                dot(p2,x2), dot(p3,x3) ) );\n  }\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  float noise = snoise(\n    vPosition * vec3(0.005, 0.002, 0.004) + vec3(time * 2.6, -time * 3.6, time * 2.6)\n    );\n  float opacity = smoothstep(0.3, 0.8, (noise + 1.0) / 2.0 - (1.0 - smoothstep(0.0, 0.3, vUv.y) * (1.0 - smoothstep(0.3, 1.0, vUv.y))));\n  vec3 hsv = vec3(0.98 + opacity * 0.2, 1.0 - opacity * 0.6, 1.0);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  gl_FragColor = vec4(rgb, opacity);\n}\n"},44202:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex\n//               noise functions.\n//      Author : Ian McEwan, Ashima Arts.\n//  Maintainer : ijm\n//     Lastmod : 20110822 (ijm)\n//     License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n//               Distributed under the MIT License. See LICENSE file.\n//               https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x) {\n     return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nfloat snoise(vec3 v)\n  {\n  const vec2  C = vec2(1.0/6.0, 1.0/3.0) ;\n  const vec4  D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n  vec3 i  = floor(v + dot(v, C.yyy) );\n  vec3 x0 =   v - i + dot(i, C.xxx) ;\n\n// Other corners\n  vec3 g = step(x0.yzx, x0.xyz);\n  vec3 l = 1.0 - g;\n  vec3 i1 = min( g.xyz, l.zxy );\n  vec3 i2 = max( g.xyz, l.zxy );\n\n  //   x0 = x0 - 0.0 + 0.0 * C.xxx;\n  //   x1 = x0 - i1  + 1.0 * C.xxx;\n  //   x2 = x0 - i2  + 2.0 * C.xxx;\n  //   x3 = x0 - 1.0 + 3.0 * C.xxx;\n  vec3 x1 = x0 - i1 + C.xxx;\n  vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n  vec3 x3 = x0 - D.yyy;      // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n  i = mod289(i);\n  vec4 p = permute( permute( permute(\n             i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n           + i.y + vec4(0.0, i1.y, i2.y, 1.0 ))\n           + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n  float n_ = 0.142857142857; // 1.0/7.0\n  vec3  ns = n_ * D.wyz - D.xzx;\n\n  vec4 j = p - 49.0 * floor(p * ns.z * ns.z);  //  mod(p,7*7)\n\n  vec4 x_ = floor(j * ns.z);\n  vec4 y_ = floor(j - 7.0 * x_ );    // mod(j,N)\n\n  vec4 x = x_ *ns.x + ns.yyyy;\n  vec4 y = y_ *ns.x + ns.yyyy;\n  vec4 h = 1.0 - abs(x) - abs(y);\n\n  vec4 b0 = vec4( x.xy, y.xy );\n  vec4 b1 = vec4( x.zw, y.zw );\n\n  //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n  //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n  vec4 s0 = floor(b0)*2.0 + 1.0;\n  vec4 s1 = floor(b1)*2.0 + 1.0;\n  vec4 sh = -step(h, vec4(0.0));\n\n  vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n  vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n  vec3 p0 = vec3(a0.xy,h.x);\n  vec3 p1 = vec3(a0.zw,h.y);\n  vec3 p2 = vec3(a1.xy,h.z);\n  vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n  vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n  p0 *= norm.x;\n  p1 *= norm.y;\n  p2 *= norm.z;\n  p3 *= norm.w;\n\n// Mix final noise value\n  vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n  m = m * m;\n  return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),\n                                dot(p2,x2), dot(p3,x3) ) );\n  }\n\nvoid main(void) {\n  float roundRadius = (1.0 - smoothstep(0.1, 1.0, uv.y)* 1.2) * 480.0;\n  vec3 roundPosition = vec3(\n    sin(radians(uv.x * 360.0)) * roundRadius,\n    position.y + 900.0,\n    cos(radians(uv.x * 360.0)) * roundRadius\n    );\n\n  float noise = (snoise(roundPosition * vec3(0.01, 0.0001, 0.01) + time * 0.8) + 0.5);\n  float noiseRadius = noise * smoothstep(0.2, 0.3, uv.y) * 70.0;\n  vec3 noisePosition = vec3(\n    sin(radians(uv.x * 360.0)) * noiseRadius,\n    0.0,\n    cos(radians(uv.x * 360.0)) * noiseRadius\n    );\n\n  vec4 mvPosition = modelViewMatrix * vec4(roundPosition + noisePosition, 1.0);\n\n  vPosition = roundPosition;\n  vUv = uv;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},13292:function(e,t){"use strict";t.Z="#extension GL_OES_standard_derivatives : enable\nprecision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying float vDistance;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  // Flat Shading\n  vec3 light = normalize(-vPosition);\n  vec3 normal = normalize(cross(dFdx(vPosition), dFdy(vPosition)));\n  float diff = (dot(normal, light) + 1.0) / 2.0;\n\n  vec3 hsv = vec3(\n    0.86 + diff * 0.24,\n    1.0 - diff * 0.4,\n    (diff * 0.88 + 0.12) * vDistance\n    );\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  gl_FragColor = vec4(rgb, 1.0);\n}\n"},25746:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\nattribute vec3 instancePosition;\nattribute float scale;\nattribute float rotate;\nattribute float speed;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying float vDistance;\n\nmat4 calcRotateMat4X(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Y(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4(vec3 radian) {\n  return calcRotateMat4X(radian.x) * calcRotateMat4Y(radian.y) * calcRotateMat4Z(radian.z);\n}\n\nmat4 calcScaleMat4(vec3 scale) {\n  return mat4(\n    scale.x, 0.0, 0.0, 0.0,\n    0.0, scale.y, 0.0, 0.0,\n    0.0, 0.0, scale.z, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nvoid main(void) {\n  mat4 scaleMat = calcScaleMat4(vec3(scale));\n  mat4 rotateMatWorld = calcRotateMat4(vec3(0.0, rotate + time * speed * 0.2, 0.0));\n  vec3 updatePosition = (scaleMat * vec4(position, 1.0)).xyz;\n  vec4 mvPosition = modelViewMatrix * rotateMatWorld * vec4(updatePosition + instancePosition, 1.0);\n  float distanceFromCenter = 1.0 - clamp(length(instancePosition) / 6000.0, 0.0, 0.8);\n\n  vPosition = updatePosition + instancePosition;\n  vUv = uv;\n  vDistance = distanceFromCenter;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},68773:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D tex;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying vec3 vColor;\nvarying float vBlink;\n\nvoid main() {\n  vec2 p = vUv * 2.0 - 1.0;\n\n  vec4 texColor = texture2D(tex, vUv);\n  vec3 color = (texColor.rgb - vBlink * length(p) * 0.8) * vColor;\n  float opacity = texColor.a * 0.36;\n\n  gl_FragColor = vec4(color, opacity);\n}\n"},94053:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\nattribute vec3 instancePosition;\nattribute float delay;\nattribute float rotate;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying vec3 vColor;\nvarying float vBlink;\n\nconst float duration = 200.0;\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main(void) {\n  float now = mod(time + delay * duration, duration) / duration;\n\n  mat4 rotateMat = calcRotateMat4Z(radians(rotate * 360.0) + time * 0.1);\n  vec3 rotatePosition = (rotateMat * vec4(position, 1.0)).xyz;\n\n  vec3 moveRise = vec3(\n    (now * 2.0 - 1.0) * (2500.0 - (delay * 2.0 - 1.0) * 2000.0),\n    (now * 2.0 - 1.0) * 2000.0,\n    sin(radians(time * 50.0 + delay + length(position))) * 30.0\n    );\n  vec3 updatePosition = instancePosition + moveRise + rotatePosition;\n\n  vec3 hsv = vec3(time * 0.1 + delay * 0.2 + length(instancePosition) * 100.0, 0.5 , 0.8);\n  vec3 rgb = convertHsvToRgb(hsv);\n  float blink = (sin(radians(now * 360.0 * 20.0)) + 1.0) * 0.88;\n\n  // coordinate transformation\n  vec4 mvPosition = modelViewMatrix * vec4(updatePosition, 1.0);\n\n  vPosition = position;\n  vUv = uv;\n  vColor = rgb;\n  vBlink = blink;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},91481:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform vec2 resolution;\nuniform vec2 imageResolution;\nuniform sampler2D texture;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vec2 ratio = vec2(\n      min((resolution.x / resolution.y) / (imageResolution.x / imageResolution.y), 1.0),\n      min((resolution.y / resolution.x) / (imageResolution.y / imageResolution.x), 1.0)\n    );\n\n  vec2 uv = vec2(\n      vUv.x * ratio.x + (1.0 - ratio.x) * 0.5,\n      vUv.y * ratio.y + (1.0 - ratio.y) * 0.5\n    );\n  gl_FragColor = texture2D(texture, uv);\n}\n"},2670:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = vec4(position, 1.0);\n}\n"},56521:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform vec2 resolution;\nuniform sampler2D texture;\n\nvarying vec2 vUv;\n\nfloat random(vec2 c){\n  return fract(sin(dot(c.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex\n//               noise functions.\n//      Author : Ian McEwan, Ashima Arts.\n//  Maintainer : ijm\n//     Lastmod : 20110822 (ijm)\n//     License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n//               Distributed under the MIT License. See LICENSE file.\n//               https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x) {\n     return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nfloat snoise(vec3 v)\n  {\n  const vec2  C = vec2(1.0/6.0, 1.0/3.0) ;\n  const vec4  D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n  vec3 i  = floor(v + dot(v, C.yyy) );\n  vec3 x0 =   v - i + dot(i, C.xxx) ;\n\n// Other corners\n  vec3 g_0 = step(x0.yzx, x0.xyz);\n  vec3 l = 1.0 - g_0;\n  vec3 i1 = min( g_0.xyz, l.zxy );\n  vec3 i2 = max( g_0.xyz, l.zxy );\n\n  //   x0 = x0 - 0.0 + 0.0 * C.xxx;\n  //   x1 = x0 - i1  + 1.0 * C.xxx;\n  //   x2 = x0 - i2  + 2.0 * C.xxx;\n  //   x3 = x0 - 1.0 + 3.0 * C.xxx;\n  vec3 x1 = x0 - i1 + C.xxx;\n  vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n  vec3 x3 = x0 - D.yyy;      // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n  i = mod289(i);\n  vec4 p = permute( permute( permute(\n             i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n           + i.y + vec4(0.0, i1.y, i2.y, 1.0 ))\n           + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n  float n_ = 0.142857142857; // 1.0/7.0\n  vec3  ns = n_ * D.wyz - D.xzx;\n\n  vec4 j = p - 49.0 * floor(p * ns.z * ns.z);  //  mod(p,7*7)\n\n  vec4 x_ = floor(j * ns.z);\n  vec4 y_ = floor(j - 7.0 * x_ );    // mod(j,N)\n\n  vec4 x = x_ *ns.x + ns.yyyy;\n  vec4 y = y_ *ns.x + ns.yyyy;\n  vec4 h = 1.0 - abs(x) - abs(y);\n\n  vec4 b0 = vec4( x.xy, y.xy );\n  vec4 b1 = vec4( x.zw, y.zw );\n\n  //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n  //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n  vec4 s0 = floor(b0)*2.0 + 1.0;\n  vec4 s1 = floor(b1)*2.0 + 1.0;\n  vec4 sh = -step(h, vec4(0.0));\n\n  vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n  vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n  vec3 p0 = vec3(a0.xy,h.x);\n  vec3 p1 = vec3(a0.zw,h.y);\n  vec3 p2 = vec3(a1.xy,h.z);\n  vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n  vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n  p0 *= norm.x;\n  p1 *= norm.y;\n  p2 *= norm.z;\n  p3 *= norm.w;\n\n// Mix final noise value\n  vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n  m = m * m;\n  return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),\n                                dot(p2,x2), dot(p3,x3) ) );\n  }\n\nconst float interval = 3.0;\n\nvoid main(void){\n  float strength = smoothstep(interval * 0.5, interval, interval - mod(time, interval));\n  vec2 shake = vec2(strength * 8.0 + 0.5) * vec2(\n    random(vec2(time)) * 2.0 - 1.0,\n    random(vec2(time * 2.0)) * 2.0 - 1.0\n  ) / resolution;\n\n  float y = vUv.y * resolution.y;\n  float rgbWave = (\n      snoise(vec3(0.0, y * 0.01, time * 400.0)) * (2.0 + strength * 32.0)\n      * snoise(vec3(0.0, y * 0.02, time * 200.0)) * (1.0 + strength * 4.0)\n      + step(0.9995, sin(y * 0.005 + time * 1.6)) * 12.0\n      + step(0.9999, sin(y * 0.005 + time * 2.0)) * -18.0\n    ) / resolution.x;\n  float rgbDiff = (6.0 + sin(time * 500.0 + vUv.y * 40.0) * (20.0 * strength + 1.0)) / resolution.x;\n  float rgbUvX = vUv.x + rgbWave;\n  float r = texture2D(texture, vec2(rgbUvX + rgbDiff, vUv.y) + shake).r;\n  float g = texture2D(texture, vec2(rgbUvX, vUv.y) + shake).g;\n  float b = texture2D(texture, vec2(rgbUvX - rgbDiff, vUv.y) + shake).b;\n\n  float whiteNoise = (random(vUv + mod(time, 10.0)) * 2.0 - 1.0) * (0.15 + strength * 0.15);\n\n  float bnTime = floor(time * 20.0) * 200.0;\n  float noiseX = step((snoise(vec3(0.0, vUv.x * 3.0, bnTime)) + 1.0) / 2.0, 0.12 + strength * 0.3);\n  float noiseY = step((snoise(vec3(0.0, vUv.y * 3.0, bnTime)) + 1.0) / 2.0, 0.12 + strength * 0.3);\n  float bnMask = noiseX * noiseY;\n  float bnUvX = vUv.x + sin(bnTime) * 0.2 + rgbWave;\n  float bnR = texture2D(texture, vec2(bnUvX + rgbDiff, vUv.y)).r * bnMask;\n  float bnG = texture2D(texture, vec2(bnUvX, vUv.y)).g * bnMask;\n  float bnB = texture2D(texture, vec2(bnUvX - rgbDiff, vUv.y)).b * bnMask;\n  vec4 blockNoise = vec4(bnR, bnG, bnB, 1.0);\n\n  float bnTime2 = floor(time * 25.0) * 300.0;\n  float noiseX2 = step((snoise(vec3(0.0, vUv.x * 2.0, bnTime2)) + 1.0) / 2.0, 0.12 + strength * 0.5);\n  float noiseY2 = step((snoise(vec3(0.0, vUv.y * 8.0, bnTime2)) + 1.0) / 2.0, 0.12 + strength * 0.3);\n  float bnMask2 = noiseX2 * noiseY2;\n  float bnR2 = texture2D(texture, vec2(bnUvX + rgbDiff, vUv.y)).r * bnMask2;\n  float bnG2 = texture2D(texture, vec2(bnUvX, vUv.y)).g * bnMask2;\n  float bnB2 = texture2D(texture, vec2(bnUvX - rgbDiff, vUv.y)).b * bnMask2;\n  vec4 blockNoise2 = vec4(bnR2, bnG2, bnB2, 1.0);\n\n  float waveNoise = (sin(vUv.y * 1200.0) + 1.0) / 2.0 * (0.15 + strength * 0.2);\n\n  gl_FragColor = vec4(r, g, b, 1.0) * (1.0 - bnMask - bnMask2) + (whiteNoise + blockNoise + blockNoise2 - waveNoise);\n}\n"},79541:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vUv = uv;\n  gl_Position = vec4(position, 1.0);\n}\n"},27444:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nvarying vec3 vColor;\n\nvoid main() {\n  gl_FragColor = vec4(vColor, 1.0);\n}\n"},45582:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nuniform float time;\n\nvarying vec3 vColor;\n\nvoid main() {\n  vColor = vec3((position.y / 1000.0 + 1.0) * 0.12 + 0.88);\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"},61187:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nuniform float time;\nuniform vec2 resolution;\nuniform sampler2D texture;\nuniform sampler2D texture2;\n\nconst float blur = 20.0;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vec4 color = vec4(0.0);\n  for (float x = 0.0; x < blur; x++){\n    for (float y = 0.0; y < blur; y++){\n      color += texture2D(texture, vUv - (vec2(x, y) - vec2(blur / 2.0)) / resolution);\n    }\n  }\n  vec4 color2 = color / pow(blur, 2.0);\n  vec4 color3 = texture2D(texture2, vUv);\n  gl_FragColor = vec4(color3.rgb, floor(length(color2.rgb)));\n}\n"},8820:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"},53944:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nvarying vec3 vColor;\n\nvoid main() {\n  gl_FragColor = vec4(vColor, 1.0);\n}\n"},19160:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nuniform float time;\n\nvarying vec3 vColor;\n\nvec3 hsv2rgb(vec3 c){\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex\n//               noise functions.\n//      Author : Ian McEwan, Ashima Arts.\n//  Maintainer : ijm\n//     Lastmod : 20110822 (ijm)\n//     License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n//               Distributed under the MIT License. See LICENSE file.\n//               https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x) {\n     return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nfloat snoise(vec3 v)\n  {\n  const vec2  C = vec2(1.0/6.0, 1.0/3.0) ;\n  const vec4  D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n  vec3 i  = floor(v + dot(v, C.yyy) );\n  vec3 x0 =   v - i + dot(i, C.xxx) ;\n\n// Other corners\n  vec3 g = step(x0.yzx, x0.xyz);\n  vec3 l = 1.0 - g;\n  vec3 i1 = min( g.xyz, l.zxy );\n  vec3 i2 = max( g.xyz, l.zxy );\n\n  //   x0 = x0 - 0.0 + 0.0 * C.xxx;\n  //   x1 = x0 - i1  + 1.0 * C.xxx;\n  //   x2 = x0 - i2  + 2.0 * C.xxx;\n  //   x3 = x0 - 1.0 + 3.0 * C.xxx;\n  vec3 x1 = x0 - i1 + C.xxx;\n  vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n  vec3 x3 = x0 - D.yyy;      // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n  i = mod289(i);\n  vec4 p = permute( permute( permute(\n             i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n           + i.y + vec4(0.0, i1.y, i2.y, 1.0 ))\n           + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n  float n_ = 0.142857142857; // 1.0/7.0\n  vec3  ns = n_ * D.wyz - D.xzx;\n\n  vec4 j = p - 49.0 * floor(p * ns.z * ns.z);  //  mod(p,7*7)\n\n  vec4 x_ = floor(j * ns.z);\n  vec4 y_ = floor(j - 7.0 * x_ );    // mod(j,N)\n\n  vec4 x = x_ *ns.x + ns.yyyy;\n  vec4 y = y_ *ns.x + ns.yyyy;\n  vec4 h = 1.0 - abs(x) - abs(y);\n\n  vec4 b0 = vec4( x.xy, y.xy );\n  vec4 b1 = vec4( x.zw, y.zw );\n\n  //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n  //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n  vec4 s0 = floor(b0)*2.0 + 1.0;\n  vec4 s1 = floor(b1)*2.0 + 1.0;\n  vec4 sh = -step(h, vec4(0.0));\n\n  vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n  vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n  vec3 p0 = vec3(a0.xy,h.x);\n  vec3 p1 = vec3(a0.zw,h.y);\n  vec3 p2 = vec3(a1.xy,h.z);\n  vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n  vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n  p0 *= norm.x;\n  p1 *= norm.y;\n  p2 *= norm.z;\n  p3 *= norm.w;\n\n// Mix final noise value\n  vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n  m = m * m;\n  return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),\n                                dot(p2,x2), dot(p3,x3) ) );\n  }\n\nvoid main() {\n  float noise = snoise(\n    vec3(position.x + time * 10.0, position.y + cos(time / 20.0) * 100.0, position.z + time * 10.0) / 800.0\n  );\n  vColor = hsv2rgb(vec3(noise * 0.2 + 0.75, 0.4, noise * 0.3 + 0.5));\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"},77644:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nvoid main() {\n  vec3 n;\n  n.xy = gl_PointCoord.xy * 2.0 - 1.0;\n  n.z = 1.0 - dot(n.xy, n.xy);\n  if (n.z < 0.0) discard;\n  gl_FragColor = vec4(1.0);\n}\n"},14623:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nuniform float time;\n\nvec3 getPolarCoord(float rad1, float rad2, float r) {\n  return vec3(\n    cos(rad1) * cos(rad2) * r,\n    sin(rad1) * r,\n    cos(rad1) * sin(rad2) * r\n  );\n}\n\nvoid main() {\n  vec3 update_position = getPolarCoord(\n    position.x,\n    position.y + radians(time / 2.0),\n    position.z + sin(radians(time * 2.0) + position.x + position.y) * position.z / 4.0\n  );\n  vec4 mv_position = modelViewMatrix * vec4(update_position, 1.0);\n\n  gl_PointSize = 2.0 * (1000.0 / length(mv_position.xyz));\n  gl_Position = projectionMatrix * mv_position;\n}\n"},5402:function(e,t){"use strict";t.Z="#extension GL_OES_standard_derivatives : enable\n#define GLSLIFY 1\n\nstruct DirectionalLight {\n  vec3 color;\n  vec3 direction;\n};\nuniform DirectionalLight directionalLights[1];\n\nvarying vec3 vPosition;\nvarying mat4 vInvertMatrix;\n\nvoid main() {\n  vec3 normal = normalize(cross(dFdx(vPosition), dFdy(vPosition)));\n  vec3 inv_light = normalize(vInvertMatrix * vec4(directionalLights[0].direction, 1.0)).xyz;\n  float diff = (dot(normal, inv_light) + 1.0) / 2.0 * 0.25 + 0.75;\n  gl_FragColor = vec4(vec3(1.0) * diff, 1.0);\n}\n"},33176:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute float radius;\nattribute float radian;\nattribute float scale;\n\nuniform float time;\n\nvarying vec3 vPosition;\nvarying mat4 vInvertMatrix;\n\nfloat inverse(float m) {\n  return 1.0 / m;\n}\n\nmat2 inverse(mat2 m) {\n  return mat2(m[1][1],-m[0][1],\n             -m[1][0], m[0][0]) / (m[0][0]*m[1][1] - m[0][1]*m[1][0]);\n}\n\nmat3 inverse(mat3 m) {\n  float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2];\n  float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2];\n  float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2];\n\n  float b01 = a22 * a11 - a12 * a21;\n  float b11 = -a22 * a10 + a12 * a20;\n  float b21 = a21 * a10 - a11 * a20;\n\n  float det = a00 * b01 + a01 * b11 + a02 * b21;\n\n  return mat3(b01, (-a22 * a01 + a02 * a21), (a12 * a01 - a02 * a11),\n              b11, (a22 * a00 - a02 * a20), (-a12 * a00 + a02 * a10),\n              b21, (-a21 * a00 + a01 * a20), (a11 * a00 - a01 * a10)) / det;\n}\n\nmat4 inverse(mat4 m) {\n  float\n      a00 = m[0][0], a01 = m[0][1], a02 = m[0][2], a03 = m[0][3],\n      a10 = m[1][0], a11 = m[1][1], a12 = m[1][2], a13 = m[1][3],\n      a20 = m[2][0], a21 = m[2][1], a22 = m[2][2], a23 = m[2][3],\n      a30 = m[3][0], a31 = m[3][1], a32 = m[3][2], a33 = m[3][3],\n\n      b00 = a00 * a11 - a01 * a10,\n      b01 = a00 * a12 - a02 * a10,\n      b02 = a00 * a13 - a03 * a10,\n      b03 = a01 * a12 - a02 * a11,\n      b04 = a01 * a13 - a03 * a11,\n      b05 = a02 * a13 - a03 * a12,\n      b06 = a20 * a31 - a21 * a30,\n      b07 = a20 * a32 - a22 * a30,\n      b08 = a20 * a33 - a23 * a30,\n      b09 = a21 * a32 - a22 * a31,\n      b10 = a21 * a33 - a23 * a31,\n      b11 = a22 * a33 - a23 * a32,\n\n      det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n  return mat4(\n      a11 * b11 - a12 * b10 + a13 * b09,\n      a02 * b10 - a01 * b11 - a03 * b09,\n      a31 * b05 - a32 * b04 + a33 * b03,\n      a22 * b04 - a21 * b05 - a23 * b03,\n      a12 * b08 - a10 * b11 - a13 * b07,\n      a00 * b11 - a02 * b08 + a03 * b07,\n      a32 * b02 - a30 * b05 - a33 * b01,\n      a20 * b05 - a22 * b02 + a23 * b01,\n      a10 * b10 - a11 * b08 + a13 * b06,\n      a01 * b08 - a00 * b10 - a03 * b06,\n      a30 * b04 - a31 * b02 + a33 * b00,\n      a21 * b02 - a20 * b04 - a23 * b00,\n      a11 * b07 - a10 * b09 - a12 * b06,\n      a00 * b09 - a01 * b07 + a02 * b06,\n      a31 * b01 - a30 * b03 - a32 * b00,\n      a20 * b03 - a21 * b01 + a22 * b00) / det;\n}\n\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex\n//               noise functions.\n//      Author : Ian McEwan, Ashima Arts.\n//  Maintainer : ijm\n//     Lastmod : 20110822 (ijm)\n//     License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n//               Distributed under the MIT License. See LICENSE file.\n//               https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x) {\n     return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nfloat snoise(vec3 v)\n  {\n  const vec2  C = vec2(1.0/6.0, 1.0/3.0) ;\n  const vec4  D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n  vec3 i  = floor(v + dot(v, C.yyy) );\n  vec3 x0 =   v - i + dot(i, C.xxx) ;\n\n// Other corners\n  vec3 g = step(x0.yzx, x0.xyz);\n  vec3 l = 1.0 - g;\n  vec3 i1 = min( g.xyz, l.zxy );\n  vec3 i2 = max( g.xyz, l.zxy );\n\n  //   x0 = x0 - 0.0 + 0.0 * C.xxx;\n  //   x1 = x0 - i1  + 1.0 * C.xxx;\n  //   x2 = x0 - i2  + 2.0 * C.xxx;\n  //   x3 = x0 - 1.0 + 3.0 * C.xxx;\n  vec3 x1 = x0 - i1 + C.xxx;\n  vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n  vec3 x3 = x0 - D.yyy;      // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n  i = mod289(i);\n  vec4 p = permute( permute( permute(\n             i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n           + i.y + vec4(0.0, i1.y, i2.y, 1.0 ))\n           + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n  float n_ = 0.142857142857; // 1.0/7.0\n  vec3  ns = n_ * D.wyz - D.xzx;\n\n  vec4 j = p - 49.0 * floor(p * ns.z * ns.z);  //  mod(p,7*7)\n\n  vec4 x_ = floor(j * ns.z);\n  vec4 y_ = floor(j - 7.0 * x_ );    // mod(j,N)\n\n  vec4 x = x_ *ns.x + ns.yyyy;\n  vec4 y = y_ *ns.x + ns.yyyy;\n  vec4 h = 1.0 - abs(x) - abs(y);\n\n  vec4 b0 = vec4( x.xy, y.xy );\n  vec4 b1 = vec4( x.zw, y.zw );\n\n  //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n  //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n  vec4 s0 = floor(b0)*2.0 + 1.0;\n  vec4 s1 = floor(b1)*2.0 + 1.0;\n  vec4 sh = -step(h, vec4(0.0));\n\n  vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n  vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n  vec3 p0 = vec3(a0.xy,h.x);\n  vec3 p1 = vec3(a0.zw,h.y);\n  vec3 p2 = vec3(a1.xy,h.z);\n  vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n  vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n  p0 *= norm.x;\n  p1 *= norm.y;\n  p2 *= norm.z;\n  p3 *= norm.w;\n\n// Mix final noise value\n  vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n  m = m * m;\n  return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),\n                                dot(p2,x2), dot(p3,x3) ) );\n  }\n\nmat4 translateMatrix(vec3 v) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    v.x, v.y, v.z, 1.0\n  );\n}\n\nmat4 rotationMatrixX(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 rotationMatrixY(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 rotationMatrixZ(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 rotationMatrix(float radian_x, float radian_y, float radian_z) {\n  return rotationMatrixX(radian_x) * rotationMatrixY(radian_y) * rotationMatrixZ(radian_z);\n}\n\nmat4 scaleMatrix(vec3 scale) {\n  return mat4(\n    scale.x, 0.0, 0.0, 0.0,\n    0.0, scale.y, 0.0, 0.0,\n    0.0, 0.0, scale.z, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nvec4 move(vec3 position) {\n  return translateMatrix(\n    vec3(\n      cos(radians(time * 0.5) + radian) * radius,\n      sin(radians(time * 0.5) + radian * 10.0) * radius * 0.3,\n      sin(radians(time * 0.5) + radian) * radius\n    )\n  ) * rotationMatrix(\n    radians(time * radian) + radian, radians(time) + radian, radians(time) + radian\n  ) * scaleMatrix(\n    vec3(20.0 * scale) + vec3(10.0) * snoise((position + sin(radian)))\n  ) * vec4(position, 1.0);\n}\n\nvoid main() {\n  vec4 update_position = move(position);\n  vPosition = position;\n  vInvertMatrix = inverse(rotationMatrix(\n    radians(time * radian) + radian, radians(time) + radian, radians(time) + radian\n  ));\n  gl_Position = projectionMatrix * modelViewMatrix * update_position;\n}\n"},28408:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nuniform float size;\n\nvoid main() {\n  vec3 n;\n  n.xy = gl_PointCoord.xy * 2.0 - 1.0;\n  n.z = 1.0 - dot(n.xy, n.xy);\n  if (n.z < 0.0) discard;\n  gl_FragColor = vec4(1.0);\n}\n"},12978:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 radian;\n\nuniform float time;\nuniform vec2 resolution;\nuniform float size;\nuniform vec2 force;\n\nvoid main() {\n  float radius = 300.0;\n  float radian_base = radians(time * 2.0);\n  vec3 update_positon = position + vec3(\n    cos(radian_base + radian.x) * cos(radian_base + radian.y) * radius,\n    cos(radian_base + radian.x) * sin(radian_base + radian.y) * radius,\n    sin(radian_base + radian.x) * radius\n  ) * force.x;\n  vec4 mvPosition = modelViewMatrix * vec4(update_positon, 1.0);\n\n  gl_PointSize = (size + force.y) * (abs(sin(radian_base + radian.z))) * (size / length(mvPosition.xyz)) * 480.0;\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},7034:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 cameraPosition;\nuniform float time;\nuniform samplerCube cubeTex;\n\nvarying vec3 vPosition;\nvarying vec3 vNormal;\n\nvoid main() {\n  vec3 ref = reflect(vPosition - cameraPosition, vNormal);\n  vec4 envColor = textureCube(cubeTex, ref);\n  gl_FragColor = envColor * vec4(0.8, 1.0, 0.95, 0.7);\n}\n"},58702:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 translate;\nattribute float offset;\nattribute vec3 rotate;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform mat4 modelMatrix;\nuniform float time;\n\nvarying vec3 vPosition;\nvarying vec3 vNormal;\n\nmat4 calcTranslateMat4(vec3 v) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    v.x, v.y, v.z, 1.0\n  );\n}\n\nmat4 calcRotateMat4X(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Y(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4(vec3 radian) {\n  return calcRotateMat4X(radian.x) * calcRotateMat4Y(radian.y) * calcRotateMat4Z(radian.z);\n}\n\nvoid main(void) {\n  float radian = radians(time);\n  mat4 rotateWorld = calcRotateMat4(vec3(radian) * vec3(5.0, 20.0, 1.0) + rotate);\n  mat4 rotateSelf = calcRotateMat4(vec3(radian) * rotate * 100.0);\n  vec4 updatePosition =\n    rotateWorld\n    * calcTranslateMat4(translate)\n    * rotateSelf\n    * vec4(position + normalize(position) * offset, 1.0);\n  vPosition = (modelMatrix * updatePosition).xyz;\n  vNormal = (modelMatrix * rotateWorld * rotateSelf * vec4(normal, 0.0)).xyz;\n  gl_Position = projectionMatrix * modelViewMatrix * updatePosition;\n}\n"},64529:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform vec2 resolution;\nuniform sampler2D texture;\nuniform float strengthZoom;\nuniform float strengthGlitch;\n\nvarying vec2 vUv;\n\nfloat random(vec2 c){\n  return fract(sin(dot(c.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex\n//               noise functions.\n//      Author : Ian McEwan, Ashima Arts.\n//  Maintainer : ijm\n//     Lastmod : 20110822 (ijm)\n//     License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n//               Distributed under the MIT License. See LICENSE file.\n//               https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x) {\n     return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nfloat snoise(vec3 v)\n  {\n  const vec2  C = vec2(1.0/6.0, 1.0/3.0) ;\n  const vec4  D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n  vec3 i  = floor(v + dot(v, C.yyy) );\n  vec3 x0 =   v - i + dot(i, C.xxx) ;\n\n// Other corners\n  vec3 g = step(x0.yzx, x0.xyz);\n  vec3 l = 1.0 - g;\n  vec3 i1 = min( g.xyz, l.zxy );\n  vec3 i2 = max( g.xyz, l.zxy );\n\n  //   x0 = x0 - 0.0 + 0.0 * C.xxx;\n  //   x1 = x0 - i1  + 1.0 * C.xxx;\n  //   x2 = x0 - i2  + 2.0 * C.xxx;\n  //   x3 = x0 - 1.0 + 3.0 * C.xxx;\n  vec3 x1 = x0 - i1 + C.xxx;\n  vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n  vec3 x3 = x0 - D.yyy;      // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n  i = mod289(i);\n  vec4 p = permute( permute( permute(\n             i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n           + i.y + vec4(0.0, i1.y, i2.y, 1.0 ))\n           + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n  float n_ = 0.142857142857; // 1.0/7.0\n  vec3  ns = n_ * D.wyz - D.xzx;\n\n  vec4 j = p - 49.0 * floor(p * ns.z * ns.z);  //  mod(p,7*7)\n\n  vec4 x_ = floor(j * ns.z);\n  vec4 y_ = floor(j - 7.0 * x_ );    // mod(j,N)\n\n  vec4 x = x_ *ns.x + ns.yyyy;\n  vec4 y = y_ *ns.x + ns.yyyy;\n  vec4 h = 1.0 - abs(x) - abs(y);\n\n  vec4 b0 = vec4( x.xy, y.xy );\n  vec4 b1 = vec4( x.zw, y.zw );\n\n  //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n  //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n  vec4 s0 = floor(b0)*2.0 + 1.0;\n  vec4 s1 = floor(b1)*2.0 + 1.0;\n  vec4 sh = -step(h, vec4(0.0));\n\n  vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n  vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n  vec3 p0 = vec3(a0.xy,h.x);\n  vec3 p1 = vec3(a0.zw,h.y);\n  vec3 p2 = vec3(a1.xy,h.z);\n  vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n  vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n  p0 *= norm.x;\n  p1 *= norm.y;\n  p2 *= norm.z;\n  p3 *= norm.w;\n\n// Mix final noise value\n  vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n  m = m * m;\n  return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),\n                                dot(p2,x2), dot(p3,x3) ) );\n  }\n\nvoid main(void){\n  // zoom blur\n  vec2 tFrag = 1.0 / resolution;\n  float nFrag = 1.0 / 30.0;\n  vec2 centerOffset = resolution / 2.0;\n  vec3 destColor = vec3(0.0);\n  vec2 fcc = gl_FragCoord.xy - centerOffset;\n  float totalWeight = 0.0;\n\n  for(float i = 0.0; i <= 30.0; i++){\n    float percent = (i + random(gl_FragCoord.xy)) * nFrag;\n    float weight = percent - percent * percent;\n    vec2  t = gl_FragCoord.xy - fcc * percent * strengthZoom * nFrag;\n    destColor += texture2D(texture, t * tFrag).rgb * weight;\n    totalWeight += weight;\n  }\n  vec4 zoomColor = vec4(destColor / totalWeight, 1.0);\n\n  // glitch\n  float strengthWhiteNoise = min(strengthGlitch * 0.05, 0.1);\n  float whiteNoise = (random(gl_FragCoord.xy + time) * 2.0 - 1.0) * (0.05 + strengthWhiteNoise);\n\n  float strengthBlockNoise = min(strengthGlitch * 0.15, 1.2);\n  float noiseX = step((snoise(vec3(0.0, gl_FragCoord.x / resolution.x * 1.0, time * 600.0)) + 1.0) / 2.0, strengthBlockNoise * 0.6);\n  float noiseY = step((snoise(vec3(0.0, gl_FragCoord.y / resolution.y * 3.0, time * 200.0)) + 1.0) / 2.0, strengthBlockNoise * 0.3);\n  float blockNoiseMask = noiseX * noiseY;\n  vec4 blockNoise = texture2D(texture, 1.0 - vUv) * blockNoiseMask;\n\n  gl_FragColor = zoomColor + whiteNoise + blockNoise;\n}\n"},4998:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vUv = uv;\n  gl_Position = vec4(position, 1.0);\n}\n"},67965:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform samplerCube cubeTex;\n\nvarying vec3 vPosition;\n\nvoid main() {\n  vec3 normal = normalize(vPosition);\n  vec4 color = textureCube(cubeTex, normal);\n  gl_FragColor = color;\n}\n"},70301:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\n\nvarying vec3 vPosition;\n\nvoid main(void) {\n  vPosition = position;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"},72413:function(e,t){"use strict";t.Z="#extension GL_OES_standard_derivatives : enable\nprecision highp float;\n#define GLSLIFY 1\n\nuniform float addH1;\nuniform float addH2;\n\nvarying vec3 vPosition;\nvarying vec3 vMPosition;\nvarying vec2 vUv;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nconst float edge1 = 48.0;\nconst float edge2 = 24.0;\nconst float edge3 = 8.0;\nconst float range = 14.0;\n\nvoid main() {\n  // Flat Shading\n  vec3 light = normalize(vec3(-1.0, 1.0, 1.0));\n  vec3 normal = normalize(cross(dFdx(vMPosition), dFdy(vMPosition)));\n  float diff = (dot(normal, light) + 1.0) / 2.0;\n\n  float stepTop     = smoothstep(edge1, edge1 + range, vPosition.y);\n  float stepMiddle1 = smoothstep(edge2, edge2 + range, vPosition.y) * (1.0 - smoothstep(edge1, edge1 + range, vPosition.y));\n  float stepMiddle2 = smoothstep(edge3, edge3 + range, vPosition.y) * (1.0 - smoothstep(edge2, edge2 + range, vPosition.y));\n  float stepBottom  = 1.0 - smoothstep(edge3, edge3 + range, vPosition.y);\n\n  vec4 colorTop     = vec4(convertHsvToRgb(vec3( 0.1 + addH1, 0.1, 0.8)), 1.0) * stepTop;\n  vec4 colorMiddle1 = vec4(convertHsvToRgb(vec3(0.25 + addH2, 0.4, 0.6)), 1.0) * stepMiddle1;\n  vec4 colorMiddle2 = vec4(convertHsvToRgb(vec3(0.25 + addH2, 0.25, 0.8)), 1.0) * stepMiddle2;\n  vec4 colorBottom  = vec4(convertHsvToRgb(vec3( 0.1 + addH1, 0.4, 0.3)), 1.0) * stepBottom;\n\n  vec4 colorAll = (colorTop + colorMiddle1 + colorMiddle2 + colorBottom) * diff;\n\n  gl_FragColor = colorAll;\n}\n"},31382:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec3 vPosition;\nvarying vec3 vMPosition;\nvarying vec2 vUv;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  vPosition = position;\n  vMPosition = mPosition.xyz;\n  vUv = uv;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n"},53822:function(e,t){"use strict";t.Z="#extension GL_OES_standard_derivatives : enable\nprecision highp float;\n#define GLSLIFY 1\n\nuniform float addH;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying float vSinAll;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  // Flat Shading\n  vec3 light = normalize(vec3(-1.0, 1.0, 1.0));\n  vec3 normal = normalize(cross(dFdx(vPosition), dFdy(vPosition)));\n  float diff = dot(normal, light);\n\n  vec4 color = vec4(convertHsvToRgb(vec3(0.2 + vSinAll * 0.15 + addH, 0.2, 1.0)), 0.4);\n\n  gl_FragColor = color * vec4(vec3(diff), 1.0);\n}\n"},40557:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform float time;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying float vSinAll;\n\nmat4 calcTranslateMat4(vec3 v) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    v.x, v.y, v.z, 1.0\n  );\n}\n\nvoid main(void) {\n  float sin1 = sin(time + position.x / 16.0);\n  float sin2 = sin(time + position.y / 8.0);\n  float sin3 = sin(time - length(position.xy + 50.0) / 4.0);\n  float sinAll = (sin1 + sin2 * 0.5 + sin3 * 0.2) / 1.7;\n  mat4 waveMat = calcTranslateMat4(vec3(0.0, 0.0, sinAll * 1.5));\n\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * waveMat * vec4(position, 1.0);\n\n  vPosition = mPosition.xyz;\n  vUv = uv;\n  vSinAll = sinAll;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n"},12294:function(e,t){"use strict";t.Z="#extension GL_OES_standard_derivatives : enable\n#define GLSLIFY 1\n\nuniform float time;\nuniform float acceleration;\n\nvarying vec3 vPosition;\nvarying vec3 vColor;\nvarying mat4 invertMatrix;\n\nvoid main() {\n  vec3 normal = normalize(cross(dFdx(vPosition), dFdy(vPosition)));\n  vec3 inv_light = normalize(invertMatrix * vec4(0.7, -0.7, 0.7, 1.0)).xyz;\n  float diff = (dot(normal, inv_light) + 1.0) / 4.0 + 0.4;\n  gl_FragColor = vec4(vColor * diff, 1.0);\n}\n"},30958:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nuniform float time;\nuniform float acceleration;\n\nvarying vec3 vPosition;\nvarying vec3 vColor;\nvarying mat4 invertMatrix;\n\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex\n//               noise functions.\n//      Author : Ian McEwan, Ashima Arts.\n//  Maintainer : ijm\n//     Lastmod : 20110822 (ijm)\n//     License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n//               Distributed under the MIT License. See LICENSE file.\n//               https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x) {\n     return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nfloat snoise(vec3 v)\n  {\n  const vec2  C = vec2(1.0/6.0, 1.0/3.0) ;\n  const vec4  D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n  vec3 i  = floor(v + dot(v, C.yyy) );\n  vec3 x0 =   v - i + dot(i, C.xxx) ;\n\n// Other corners\n  vec3 g = step(x0.yzx, x0.xyz);\n  vec3 l = 1.0 - g;\n  vec3 i1 = min( g.xyz, l.zxy );\n  vec3 i2 = max( g.xyz, l.zxy );\n\n  //   x0 = x0 - 0.0 + 0.0 * C.xxx;\n  //   x1 = x0 - i1  + 1.0 * C.xxx;\n  //   x2 = x0 - i2  + 2.0 * C.xxx;\n  //   x3 = x0 - 1.0 + 3.0 * C.xxx;\n  vec3 x1 = x0 - i1 + C.xxx;\n  vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n  vec3 x3 = x0 - D.yyy;      // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n  i = mod289(i);\n  vec4 p = permute( permute( permute(\n             i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n           + i.y + vec4(0.0, i1.y, i2.y, 1.0 ))\n           + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n  float n_ = 0.142857142857; // 1.0/7.0\n  vec3  ns = n_ * D.wyz - D.xzx;\n\n  vec4 j = p - 49.0 * floor(p * ns.z * ns.z);  //  mod(p,7*7)\n\n  vec4 x_ = floor(j * ns.z);\n  vec4 y_ = floor(j - 7.0 * x_ );    // mod(j,N)\n\n  vec4 x = x_ *ns.x + ns.yyyy;\n  vec4 y = y_ *ns.x + ns.yyyy;\n  vec4 h = 1.0 - abs(x) - abs(y);\n\n  vec4 b0 = vec4( x.xy, y.xy );\n  vec4 b1 = vec4( x.zw, y.zw );\n\n  //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n  //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n  vec4 s0 = floor(b0)*2.0 + 1.0;\n  vec4 s1 = floor(b1)*2.0 + 1.0;\n  vec4 sh = -step(h, vec4(0.0));\n\n  vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n  vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n  vec3 p0 = vec3(a0.xy,h.x);\n  vec3 p1 = vec3(a0.zw,h.y);\n  vec3 p2 = vec3(a1.xy,h.z);\n  vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n  vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n  p0 *= norm.x;\n  p1 *= norm.y;\n  p2 *= norm.z;\n  p3 *= norm.w;\n\n// Mix final noise value\n  vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n  m = m * m;\n  return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),\n                                dot(p2,x2), dot(p3,x3) ) );\n  }\n\nvec3 hsv2rgb(vec3 c){\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nfloat inverse(float m) {\n  return 1.0 / m;\n}\n\nmat2 inverse(mat2 m) {\n  return mat2(m[1][1],-m[0][1],\n             -m[1][0], m[0][0]) / (m[0][0]*m[1][1] - m[0][1]*m[1][0]);\n}\n\nmat3 inverse(mat3 m) {\n  float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2];\n  float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2];\n  float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2];\n\n  float b01 = a22 * a11 - a12 * a21;\n  float b11 = -a22 * a10 + a12 * a20;\n  float b21 = a21 * a10 - a11 * a20;\n\n  float det = a00 * b01 + a01 * b11 + a02 * b21;\n\n  return mat3(b01, (-a22 * a01 + a02 * a21), (a12 * a01 - a02 * a11),\n              b11, (a22 * a00 - a02 * a20), (-a12 * a00 + a02 * a10),\n              b21, (-a21 * a00 + a01 * a20), (a11 * a00 - a01 * a10)) / det;\n}\n\nmat4 inverse(mat4 m) {\n  float\n      a00 = m[0][0], a01 = m[0][1], a02 = m[0][2], a03 = m[0][3],\n      a10 = m[1][0], a11 = m[1][1], a12 = m[1][2], a13 = m[1][3],\n      a20 = m[2][0], a21 = m[2][1], a22 = m[2][2], a23 = m[2][3],\n      a30 = m[3][0], a31 = m[3][1], a32 = m[3][2], a33 = m[3][3],\n\n      b00 = a00 * a11 - a01 * a10,\n      b01 = a00 * a12 - a02 * a10,\n      b02 = a00 * a13 - a03 * a10,\n      b03 = a01 * a12 - a02 * a11,\n      b04 = a01 * a13 - a03 * a11,\n      b05 = a02 * a13 - a03 * a12,\n      b06 = a20 * a31 - a21 * a30,\n      b07 = a20 * a32 - a22 * a30,\n      b08 = a20 * a33 - a23 * a30,\n      b09 = a21 * a32 - a22 * a31,\n      b10 = a21 * a33 - a23 * a31,\n      b11 = a22 * a33 - a23 * a32,\n\n      det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n  return mat4(\n      a11 * b11 - a12 * b10 + a13 * b09,\n      a02 * b10 - a01 * b11 - a03 * b09,\n      a31 * b05 - a32 * b04 + a33 * b03,\n      a22 * b04 - a21 * b05 - a23 * b03,\n      a12 * b08 - a10 * b11 - a13 * b07,\n      a00 * b11 - a02 * b08 + a03 * b07,\n      a32 * b02 - a30 * b05 - a33 * b01,\n      a20 * b05 - a22 * b02 + a23 * b01,\n      a10 * b10 - a11 * b08 + a13 * b06,\n      a01 * b08 - a00 * b10 - a03 * b06,\n      a30 * b04 - a31 * b02 + a33 * b00,\n      a21 * b02 - a20 * b04 - a23 * b00,\n      a11 * b07 - a10 * b09 - a12 * b06,\n      a00 * b09 - a01 * b07 + a02 * b06,\n      a31 * b01 - a30 * b03 - a32 * b00,\n      a20 * b03 - a21 * b01 + a22 * b00) / det;\n}\n\nvec3 rotate(vec3 p, float radian_x, float radian_y, float radian_z) {\n  mat3 mx = mat3(\n    1.0, 0.0, 0.0,\n    0.0, cos(radian_x), -sin(radian_x),\n    0.0, sin(radian_x), cos(radian_x)\n  );\n  mat3 my = mat3(\n    cos(radian_y), 0.0, sin(radian_y),\n    0.0, 1.0, 0.0,\n    -sin(radian_y), 0.0, cos(radian_y)\n  );\n  mat3 mz = mat3(\n    cos(radian_z), -sin(radian_z), 0.0,\n    sin(radian_z), cos(radian_z), 0.0,\n    0.0, 0.0, 1.0\n  );\n  return mx * my * mz * p;\n}\n\nvec3 getRotate(vec3 p) {\n  return rotate(p, radians(time / 6.0), radians(time / 7.0), radians(time / 8.0));\n}\n\nvoid main() {\n  float updateTime = time / 400.0;\n  vec3 p_rotate = getRotate(position);\n  float noise = snoise(vec3(p_rotate / 12.1 + updateTime * 0.5));\n  vec3 p_noise = p_rotate + p_rotate * noise / 20.0 * (min(acceleration, 6.0) + 1.0);\n\n  vPosition = p_noise;\n  vColor = hsv2rgb(vec3(updateTime + position.y / 400.0, 0.05 + min(acceleration / 10.0, 0.25), 1.0));\n  invertMatrix = inverse(modelMatrix);\n\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(p_noise, 1.0);\n}\n"},73845:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nuniform float time;\nuniform float time2;\nuniform float acceleration;\nuniform vec2 resolution;\n\nvarying mat4 m_matrix;\n\n// const vec3 cPos = vec3(0.0, 0.0, 10.0);\nconst float targetDepth = 3.5;\nconst vec3 lightDir = vec3(0.577, -0.577, 0.577);\n\nvec3 hsv2rgb(vec3 c){\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex\n//               noise functions.\n//      Author : Ian McEwan, Ashima Arts.\n//  Maintainer : ijm\n//     Lastmod : 20110822 (ijm)\n//     License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n//               Distributed under the MIT License. See LICENSE file.\n//               https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x) {\n     return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nfloat snoise(vec3 v)\n  {\n  const vec2  C = vec2(1.0/6.0, 1.0/3.0) ;\n  const vec4  D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n  vec3 i  = floor(v + dot(v, C.yyy) );\n  vec3 x0 =   v - i + dot(i, C.xxx) ;\n\n// Other corners\n  vec3 g = step(x0.yzx, x0.xyz);\n  vec3 l = 1.0 - g;\n  vec3 i1 = min( g.xyz, l.zxy );\n  vec3 i2 = max( g.xyz, l.zxy );\n\n  //   x0 = x0 - 0.0 + 0.0 * C.xxx;\n  //   x1 = x0 - i1  + 1.0 * C.xxx;\n  //   x2 = x0 - i2  + 2.0 * C.xxx;\n  //   x3 = x0 - 1.0 + 3.0 * C.xxx;\n  vec3 x1 = x0 - i1 + C.xxx;\n  vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n  vec3 x3 = x0 - D.yyy;      // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n  i = mod289(i);\n  vec4 p = permute( permute( permute(\n             i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n           + i.y + vec4(0.0, i1.y, i2.y, 1.0 ))\n           + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n  float n_ = 0.142857142857; // 1.0/7.0\n  vec3  ns = n_ * D.wyz - D.xzx;\n\n  vec4 j = p - 49.0 * floor(p * ns.z * ns.z);  //  mod(p,7*7)\n\n  vec4 x_ = floor(j * ns.z);\n  vec4 y_ = floor(j - 7.0 * x_ );    // mod(j,N)\n\n  vec4 x = x_ *ns.x + ns.yyyy;\n  vec4 y = y_ *ns.x + ns.yyyy;\n  vec4 h = 1.0 - abs(x) - abs(y);\n\n  vec4 b0 = vec4( x.xy, y.xy );\n  vec4 b1 = vec4( x.zw, y.zw );\n\n  //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n  //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n  vec4 s0 = floor(b0)*2.0 + 1.0;\n  vec4 s1 = floor(b1)*2.0 + 1.0;\n  vec4 sh = -step(h, vec4(0.0));\n\n  vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n  vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n  vec3 p0 = vec3(a0.xy,h.x);\n  vec3 p1 = vec3(a0.zw,h.y);\n  vec3 p2 = vec3(a1.xy,h.z);\n  vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n  vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n  p0 *= norm.x;\n  p1 *= norm.y;\n  p2 *= norm.z;\n  p3 *= norm.w;\n\n// Mix final noise value\n  vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n  m = m * m;\n  return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),\n                                dot(p2,x2), dot(p3,x3) ) );\n  }\n\nvec3 rotate(vec3 p, float radian_x, float radian_y, float radian_z) {\n  mat3 mx = mat3(\n    1.0, 0.0, 0.0,\n    0.0, cos(radian_x), -sin(radian_x),\n    0.0, sin(radian_x), cos(radian_x)\n  );\n  mat3 my = mat3(\n    cos(radian_y), 0.0, sin(radian_y),\n    0.0, 1.0, 0.0,\n    -sin(radian_y), 0.0, cos(radian_y)\n  );\n  mat3 mz = mat3(\n    cos(radian_z), -sin(radian_z), 0.0,\n    sin(radian_z), cos(radian_z), 0.0,\n    0.0, 0.0, 1.0\n  );\n  return mx * my * mz * p;\n}\n\nfloat dBox(vec3 p, vec3 size) {\n  return length(max(abs(p) - size, 0.0));\n}\n\nfloat getNoise(vec3 p) {\n  return snoise(p * (0.4 + acceleration * 0.1) + time / 100.0);\n}\n\nvec3 getRotate(vec3 p) {\n  return rotate(p, radians(time2), radians(time2 * 2.0), radians(time2));\n}\n\nfloat distanceFunc(vec3 p) {\n  vec4 p1 = m_matrix * vec4(p, 1.0);\n  float n1 = getNoise(p1.xyz);\n  vec3 p2 = getRotate(p1.xyz);\n  float d1 = dBox(p2, vec3(0.8 - min(acceleration, 0.8))) - 0.2;\n  float d2 = dBox(p2, vec3(1.0)) - n1;\n  float d3 = dBox(p2, vec3(0.5 + acceleration * 0.4)) - n1;\n  return min(max(d1, -d2), d3);\n}\n\nfloat distanceFuncForFill(vec3 p) {\n  vec4 p1 = m_matrix * vec4(p, 1.0);\n  float n = getNoise(p1.xyz);\n  vec3 p2 = getRotate(p1.xyz);\n  return dBox(p2, vec3(0.5 + acceleration * 0.4)) - n;\n}\n\nvec3 getNormal(vec3 p) {\n  const float d = 0.1;\n  return normalize(vec3(\n    distanceFunc(p + vec3(d, 0.0, 0.0)) - distanceFunc(p + vec3(-d, 0.0, 0.0)),\n    distanceFunc(p + vec3(0.0, d, 0.0)) - distanceFunc(p + vec3(0.0, -d, 0.0)),\n    distanceFunc(p + vec3(0.0, 0.0, d)) - distanceFunc(p + vec3(0.0, 0.0, -d))\n  ));\n}\n\nvoid main() {\n  vec2 p = (gl_FragCoord.xy * 2.0 - resolution) / min(resolution.x, resolution.y);\n\n  vec3 cDir = normalize(cameraPosition * -1.0);\n  vec3 cUp  = vec3(0.0, 1.0, 0.0);\n  vec3 cSide = cross(cDir, cUp);\n\n  vec3 ray = normalize(cSide * p.x + cUp * p.y + cDir * targetDepth);\n\n  float distance = 0.0;\n  float rLen = 0.0;\n  vec3 rPos = cameraPosition;\n  for(int i = 0; i < 64; i++){\n    distance = distanceFunc(rPos);\n    rLen += distance;\n    rPos = cameraPosition + ray * rLen * 0.2;\n  }\n\n  vec3 normal = getNormal(rPos);\n  if(abs(distance) < 0.5){\n    if (distanceFuncForFill(rPos) > 0.5) {\n      gl_FragColor = vec4(hsv2rgb(vec3(dot(normal, cUp) * 0.8 + time / 400.0, 0.2, dot(normal, cUp) * 0.8 + 0.1)), 1.0);\n    } else {\n      gl_FragColor = vec4(hsv2rgb(vec3(dot(normal, cUp) * 0.1 + time / 400.0, 0.8, dot(normal, cUp) * 0.2 + 0.8)), 1.0);\n    }\n  } else {\n    gl_FragColor = vec4(0.0);\n  }\n}\n"},30755:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nvarying mat4 m_matrix;\n\nfloat inverse(float m) {\n  return 1.0 / m;\n}\n\nmat2 inverse(mat2 m) {\n  return mat2(m[1][1],-m[0][1],\n             -m[1][0], m[0][0]) / (m[0][0]*m[1][1] - m[0][1]*m[1][0]);\n}\n\nmat3 inverse(mat3 m) {\n  float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2];\n  float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2];\n  float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2];\n\n  float b01 = a22 * a11 - a12 * a21;\n  float b11 = -a22 * a10 + a12 * a20;\n  float b21 = a21 * a10 - a11 * a20;\n\n  float det = a00 * b01 + a01 * b11 + a02 * b21;\n\n  return mat3(b01, (-a22 * a01 + a02 * a21), (a12 * a01 - a02 * a11),\n              b11, (a22 * a00 - a02 * a20), (-a12 * a00 + a02 * a10),\n              b21, (-a21 * a00 + a01 * a20), (a11 * a00 - a01 * a10)) / det;\n}\n\nmat4 inverse(mat4 m) {\n  float\n      a00 = m[0][0], a01 = m[0][1], a02 = m[0][2], a03 = m[0][3],\n      a10 = m[1][0], a11 = m[1][1], a12 = m[1][2], a13 = m[1][3],\n      a20 = m[2][0], a21 = m[2][1], a22 = m[2][2], a23 = m[2][3],\n      a30 = m[3][0], a31 = m[3][1], a32 = m[3][2], a33 = m[3][3],\n\n      b00 = a00 * a11 - a01 * a10,\n      b01 = a00 * a12 - a02 * a10,\n      b02 = a00 * a13 - a03 * a10,\n      b03 = a01 * a12 - a02 * a11,\n      b04 = a01 * a13 - a03 * a11,\n      b05 = a02 * a13 - a03 * a12,\n      b06 = a20 * a31 - a21 * a30,\n      b07 = a20 * a32 - a22 * a30,\n      b08 = a20 * a33 - a23 * a30,\n      b09 = a21 * a32 - a22 * a31,\n      b10 = a21 * a33 - a23 * a31,\n      b11 = a22 * a33 - a23 * a32,\n\n      det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n  return mat4(\n      a11 * b11 - a12 * b10 + a13 * b09,\n      a02 * b10 - a01 * b11 - a03 * b09,\n      a31 * b05 - a32 * b04 + a33 * b03,\n      a22 * b04 - a21 * b05 - a23 * b03,\n      a12 * b08 - a10 * b11 - a13 * b07,\n      a00 * b11 - a02 * b08 + a03 * b07,\n      a32 * b02 - a30 * b05 - a33 * b01,\n      a20 * b05 - a22 * b02 + a23 * b01,\n      a10 * b10 - a11 * b08 + a13 * b06,\n      a01 * b08 - a00 * b10 - a03 * b06,\n      a30 * b04 - a31 * b02 + a33 * b00,\n      a21 * b02 - a20 * b04 - a23 * b00,\n      a11 * b07 - a10 * b09 - a12 * b06,\n      a00 * b09 - a01 * b07 + a02 * b06,\n      a31 * b01 - a30 * b03 - a32 * b00,\n      a20 * b03 - a21 * b01 + a22 * b00) / det;\n}\n\nvoid main(void) {\n  m_matrix = inverse(modelMatrix);\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"},9628:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vColor;\n\nvoid main() {\n  gl_FragColor = vec4(vColor, 1.0);\n}\n"},37581:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\n\nvarying vec3 vColor;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nfloat exponentialOut(float t) {\n  return t == 1.0 ? t : 1.0 - pow(2.0, -10.0 * t);\n}\n\nvoid main(void) {\n  vec2 p = uv * 2.0 - 1.0;\n  float show = min(time, 0.2) / 0.2;\n\n  // calculate gradation\n  vec3 hsv = vec3(\n    p.y * 0.1 + 0.07,\n    1.0 - show * 0.2,\n    0.1 + show * 0.8\n  );\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  // coordinate transformation\n  vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n\n  vColor = rgb;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},32450:function(e,t){"use strict";t.Z='#extension GL_OES_standard_derivatives : enable\nprecision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform float drawBrightOnly;\nuniform float dissolveEdge;\n\nvarying vec3 vPosition;\nvarying vec3 vMPosition;\nvarying vec2 vUv;\n\n//\n// GLSL textureless classic 3D noise "cnoise",\n// with an RSL-style periodic variant "pnoise".\n// Author:  Stefan Gustavson (stefan.gustavson@liu.se)\n// Version: 2011-10-11\n//\n// Many thanks to Ian McEwan of Ashima Arts for the\n// ideas for permutation and gradient selection.\n//\n// Copyright (c) 2011 Stefan Gustavson. All rights reserved.\n// Distributed under the MIT license. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x)\n{\n  return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec3 fade(vec3 t) {\n  return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n\n// Classic Perlin noise\nfloat cnoise(vec3 P)\n{\n  vec3 Pi0 = floor(P); // Integer part for indexing\n  vec3 Pi1 = Pi0 + vec3(1.0); // Integer part + 1\n  Pi0 = mod289(Pi0);\n  Pi1 = mod289(Pi1);\n  vec3 Pf0 = fract(P); // Fractional part for interpolation\n  vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n  vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n  vec4 iy = vec4(Pi0.yy, Pi1.yy);\n  vec4 iz0 = Pi0.zzzz;\n  vec4 iz1 = Pi1.zzzz;\n\n  vec4 ixy = permute(permute(ix) + iy);\n  vec4 ixy0 = permute(ixy + iz0);\n  vec4 ixy1 = permute(ixy + iz1);\n\n  vec4 gx0 = ixy0 * (1.0 / 7.0);\n  vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n  gx0 = fract(gx0);\n  vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n  vec4 sz0 = step(gz0, vec4(0.0));\n  gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n  gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n\n  vec4 gx1 = ixy1 * (1.0 / 7.0);\n  vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n  gx1 = fract(gx1);\n  vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n  vec4 sz1 = step(gz1, vec4(0.0));\n  gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n  gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n\n  vec3 g000 = vec3(gx0.x,gy0.x,gz0.x);\n  vec3 g100 = vec3(gx0.y,gy0.y,gz0.y);\n  vec3 g010 = vec3(gx0.z,gy0.z,gz0.z);\n  vec3 g110 = vec3(gx0.w,gy0.w,gz0.w);\n  vec3 g001 = vec3(gx1.x,gy1.x,gz1.x);\n  vec3 g101 = vec3(gx1.y,gy1.y,gz1.y);\n  vec3 g011 = vec3(gx1.z,gy1.z,gz1.z);\n  vec3 g111 = vec3(gx1.w,gy1.w,gz1.w);\n\n  vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n  g000 *= norm0.x;\n  g010 *= norm0.y;\n  g100 *= norm0.z;\n  g110 *= norm0.w;\n  vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n  g001 *= norm1.x;\n  g011 *= norm1.y;\n  g101 *= norm1.z;\n  g111 *= norm1.w;\n\n  float n000 = dot(g000, Pf0);\n  float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n  float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n  float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n  float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n  float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n  float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n  float n111 = dot(g111, Pf1);\n\n  vec3 fade_xyz = fade(Pf0);\n  vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n  vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n  float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n  return 2.2 * n_xyz;\n}\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nfloat exponentialOut(float t) {\n  return t == 1.0 ? t : 1.0 - pow(2.0, -10.0 * t);\n}\n\nvoid main() {\n  // Flat Shading\n  vec3 normal = normalize(cross(dFdx(vMPosition), dFdy(vMPosition)));\n\n  vec3 light1 = normalize(vec3(0.0, 0.333, 1.0));\n  float d1 = (dot(normal, light1) + 1.0) / 2.0;\n  float glow1A = smoothstep(0.875, 1.0, d1);\n  float glow1B = smoothstep(0.75, 1.0, d1) * 0.8;\n\n  vec3 light2 = normalize(vec3(-0.0, -0.333, 1.0));\n  float d2 = (dot(normal, light2) + 1.0) / 2.0;\n  float glow2A = smoothstep(0.875, 1.0, d2);\n  float glow2B = smoothstep(0.75, 1.0, d2) * 0.8;\n\n  // dissolve\n  float show1 = exponentialOut(min(time - 1.0, 6.0) / 6.0);\n  float show2 = exponentialOut(clamp(time - 3.0, 0.0, 3.0) / 3.0);\n  float dissolveA = cnoise(\n    vec3(\n      vPosition.x * 0.06,\n      (vPosition.y - vPosition.x * 0.5 + vPosition.z * 0.5) * 0.18,\n      vPosition.z * 0.06\n    ) + time * 0.02\n  ) * 0.5 + 0.5;\n  float dissolveB = cnoise(\n    vec3(\n      vPosition.x * 0.4,\n      (vPosition.y - vPosition.x * 0.5 + vPosition.z * 0.5) * .9,\n      vPosition.z * 0.4\n    )\n  ) * 0.5 + 0.5;\n  float dissolve1 = smoothstep(\n    0.01 + show2 * 0.35 + dissolveEdge,\n    0.015 + show2 * 0.35 + dissolveEdge,\n    dissolveA * 0.8 + dissolveB * 0.2\n  );\n  float dissolve2 = smoothstep(\n    0.0 + show2 * 0.35 + dissolveEdge,\n    0.005 + show2 * 0.35 + dissolveEdge,\n    dissolveA * 0.8 + dissolveB * 0.2\n  );\n  float dissolve3 = smoothstep(\n    show1 - 0.05,\n    show1 - 0.04,\n    dissolveA * 0.8 + dissolveB * 0.2\n  );\n  float dissolve4 = smoothstep(\n    show1 - 0.01,\n    show1,\n    dissolveA * 0.8 + dissolveB * 0.2\n  );\n\n  // define colors.\n  float h = dissolveA * 0.2 - 0.02;\n  vec3 hsv1 = vec3(\n    h,\n    (glow1A + glow2A) * 0.8 + 0.2,\n    (glow1A + glow2A) * 0.25 + 0.05\n  );\n  vec3 rgb1 = convertHsvToRgb(hsv1);\n\n  // define colors.\n  vec3 hsv2 = vec3(\n    h + (glow1B + glow2B) * 0.1 - 0.05,\n    0.7,\n    (glow1B + glow2B) * 0.7 + 0.22\n  );\n  vec3 rgb2 = convertHsvToRgb(hsv2);\n\n  gl_FragColor = vec4(rgb1 * dissolve1 * (1.0 - dissolve3) * (1.0 - drawBrightOnly) + rgb2 * (1.0 - dissolve2) + rgb2 * dissolve3, 1.0 - dissolve4);\n}\n'},30673:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform mat3 normalMatrix;\nuniform float time;\n\nvarying vec3 vPosition;\nvarying vec3 vMPosition;\nvarying vec2 vUv;\n\nfloat exponentialOut(float t) {\n  return t == 1.0 ? t : 1.0 - pow(2.0, -10.0 * t);\n}\n\nmat4 calcScaleMat4(vec3 scale) {\n  return mat4(\n    scale.x, 0.0, 0.0, 0.0,\n    0.0, scale.y, 0.0, 0.0,\n    0.0, 0.0, scale.z, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nvoid main(void) {\n  float show = exponentialOut(min(time - 1.0, 4.0) / 4.0);\n\n  // coordinate transformation\n  mat4 scaleMat = calcScaleMat4(vec3(0.5 + show * 0.5));\n  vec4 mPosition = modelMatrix * scaleMat * vec4(position, 1.0);\n  vec4 mvPosition = viewMatrix *mPosition;\n\n  vPosition = position;\n  vMPosition = mPosition.xyz;\n  vUv = uv;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},94914:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying vec4 vColor;\n\nvoid main() {\n  gl_FragColor = vColor;\n}\n"},58259:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\nattribute vec3 iPosition;\nattribute vec3 iColor;\nattribute vec3 iRotate;\nattribute float iDelay;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform float time;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying vec4 vColor;\n\nmat4 calcRotateMat4X(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Y(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4(vec3 radian) {\n  return calcRotateMat4X(radian.x) * calcRotateMat4Y(radian.y) * calcRotateMat4Z(radian.z);\n}\n\nfloat exponentialOut(float t) {\n  return t == 1.0 ? t : 1.0 - pow(2.0, -10.0 * t);\n}\n\nconst float DURATION = 5.5;\n\nvoid main(void) {\n  float alpha = clamp(time, 0.0, DURATION) / DURATION;\n\n  // coordinate transformation\n  mat4 rotateMat1 = calcRotateMat4(iRotate);\n  mat4 rotateMat2 = calcRotateMat4(vec3(0.0, (time + iDelay) * 14.0, 0.0));\n  vec3 rotate = (rotateMat1 * rotateMat2 * vec4(position, 1.0)).xyz;\n  vec3 move = vec3(0.0, 0.0, exponentialOut(alpha) * 40.0 + time * 4.0);\n  vec4 mPosition = modelMatrix * vec4(iPosition + rotate + move, 1.0);\n\n  float opacity = smoothstep(0.0, 0.05, alpha) * (1.0 - smoothstep(0.9, 1.0, alpha));\n\n  vPosition = position;\n  vUv = uv;\n  vColor = vec4(iColor, opacity);\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n"},35382:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D texture1;\nuniform sampler2D texture2;\nuniform vec2 resolution;\n\nvarying vec2 vUv;\n\nconst float godrayIteration = 60.0;\nconst float godrayStrength = 24.0;\n\nfloat random2(vec2 c){\n  return fract(sin(dot(c.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\nfloat randomNoise(vec2 p) {\n  return (random2(p - vec2(sin(time))) * 2.0 - 1.0) * 0.02;\n}\n\nvoid main() {\n  // Convert uv to the other vec2 has a range from -1.0 to 1.0.\n  vec2 p = vUv * 2.0 - 1.0;\n  vec2 ratio = 1.0 / resolution;\n\n  // Random Noise\n  float rNoise = randomNoise(vUv);\n\n  // get texture color.\n  vec4 texColor = texture2D(texture1, vUv);\n\n  // godray\n  vec2 godrayCenter = vec2(0.5);\n  vec3 godrayDestColor = vec3(0.0);\n  float godrayTotalWeight = 0.0;\n\n  for (float i = 0.0; i < 60.0; i++) {\n    float alpha = i / godrayIteration; // step in loop [0, 1].\n    float weight = alpha - alpha * alpha; // conic curve [0, 0.25, 0].\n    vec2 shiftUv = vUv - (vUv - godrayCenter) * alpha * godrayStrength / godrayIteration; // define a range of to shift UV.\n    godrayDestColor += texture2D(texture2, shiftUv).rgb * weight; // draw gradation.\n    godrayTotalWeight += weight;\n  }\n  vec3 godray = godrayDestColor / godrayTotalWeight;\n\n  // Sum total of colors.\n  vec3 color = texColor.rgb + rNoise + godray * 0.5;\n\n  gl_FragColor = vec4(color, 1.0);\n}\n"},7799:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vUv = uv;\n\n  gl_Position = vec4(position, 1.0);\n}\n"},71949:function(e,t){"use strict";t.Z='precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D tex;\nuniform float drawBrightOnly;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying float vTime1;\nvarying float vTime2;\nvarying float vTime3;\nvarying float vTime4;\n\n//\n// GLSL textureless classic 3D noise "cnoise",\n// with an RSL-style periodic variant "pnoise".\n// Author:  Stefan Gustavson (stefan.gustavson@liu.se)\n// Version: 2011-10-11\n//\n// Many thanks to Ian McEwan of Ashima Arts for the\n// ideas for permutation and gradient selection.\n//\n// Copyright (c) 2011 Stefan Gustavson. All rights reserved.\n// Distributed under the MIT license. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x)\n{\n  return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec3 fade(vec3 t) {\n  return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n\n// Classic Perlin noise\nfloat cnoise(vec3 P)\n{\n  vec3 Pi0 = floor(P); // Integer part for indexing\n  vec3 Pi1 = Pi0 + vec3(1.0); // Integer part + 1\n  Pi0 = mod289(Pi0);\n  Pi1 = mod289(Pi1);\n  vec3 Pf0 = fract(P); // Fractional part for interpolation\n  vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n  vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n  vec4 iy = vec4(Pi0.yy, Pi1.yy);\n  vec4 iz0 = Pi0.zzzz;\n  vec4 iz1 = Pi1.zzzz;\n\n  vec4 ixy = permute(permute(ix) + iy);\n  vec4 ixy0 = permute(ixy + iz0);\n  vec4 ixy1 = permute(ixy + iz1);\n\n  vec4 gx0 = ixy0 * (1.0 / 7.0);\n  vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n  gx0 = fract(gx0);\n  vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n  vec4 sz0 = step(gz0, vec4(0.0));\n  gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n  gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n\n  vec4 gx1 = ixy1 * (1.0 / 7.0);\n  vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n  gx1 = fract(gx1);\n  vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n  vec4 sz1 = step(gz1, vec4(0.0));\n  gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n  gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n\n  vec3 g000 = vec3(gx0.x,gy0.x,gz0.x);\n  vec3 g100 = vec3(gx0.y,gy0.y,gz0.y);\n  vec3 g010 = vec3(gx0.z,gy0.z,gz0.z);\n  vec3 g110 = vec3(gx0.w,gy0.w,gz0.w);\n  vec3 g001 = vec3(gx1.x,gy1.x,gz1.x);\n  vec3 g101 = vec3(gx1.y,gy1.y,gz1.y);\n  vec3 g011 = vec3(gx1.z,gy1.z,gz1.z);\n  vec3 g111 = vec3(gx1.w,gy1.w,gz1.w);\n\n  vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n  g000 *= norm0.x;\n  g010 *= norm0.y;\n  g100 *= norm0.z;\n  g110 *= norm0.w;\n  vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n  g001 *= norm1.x;\n  g011 *= norm1.y;\n  g101 *= norm1.z;\n  g111 *= norm1.w;\n\n  float n000 = dot(g000, Pf0);\n  float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n  float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n  float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n  float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n  float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n  float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n  float n111 = dot(g111, Pf1);\n\n  vec3 fade_xyz = fade(Pf0);\n  vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n  vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n  float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n  return 2.2 * n_xyz;\n}\n\nvoid main() {\n  vec2 p = vUv * 2.0 - 1.0;\n  vec4 texColor = texture2D(tex, vUv);\n\n  float noise = cnoise(vPosition * vec3(1.6)) * 0.5 + 0.5;\n  float opacity1 = smoothstep(0.0, 0.01, (1.2 - length(p)) + noise * 0.8 + vTime1 * 2.0 - 2.0);\n  float opacity2 = smoothstep(0.0, 0.01, (1.2 - length(p)) + noise * 0.8 + vTime2 * 2.0 - 2.0);\n  float opacity3 = smoothstep(0.0, 0.01, (1.2 - length(p)) + noise * 0.8 + vTime3 * 2.0 - 2.0);\n  float opacity4 = smoothstep(0.0, 0.01, (1.2 - length(p)) + noise * 0.8 + vTime4 * 2.0 - 2.0);\n\n  vec4 color1 = vec4(vec3(1.0, 1.0, 0.9), 0.9) * (opacity1 - opacity2);\n  vec4 color2 = vec4(vec3(1.0, 1.0, 0.9), 0.05) * (opacity2 - opacity3);\n  vec4 color3 = vec4(vec3(0.7, 0.1, 0.1), 0.9) * (opacity3 - opacity4);\n  vec4 color4 = vec4(vec3(1.0, 1.0, 0.9), 0.05) * opacity4;\n\n  if (texColor.a < 0.5) discard;\n  gl_FragColor =\n    (\n      (color1 + color2 + color3 + color4) * (1.0 - drawBrightOnly)\n      + vec4(vec3(0.0), opacity3 - opacity4) * drawBrightOnly\n    )\n    * vec4(vec3(1.0), texColor.a);\n}\n'},59751:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform float time;\nuniform float time2;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying float vTime1;\nvarying float vTime2;\nvarying float vTime3;\nvarying float vTime4;\n\nfloat circularOut(float t) {\n  return sqrt((2.0 - t) * t);\n}\n\nvoid main(void) {\n  // Defined several timers.\n  float timeA = circularOut(clamp(time - 1.0, 0.0, 2.0) / 2.0);\n  float timeB = circularOut(clamp(time - 3.0, 0.0, 2.0) / 2.0);\n\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position + vec3(0.0, 0.0, (1.0 - timeA) * 20.0), 1.0);\n\n  vPosition = position;\n  vUv = uv;\n  vTime1 = timeA;\n  vTime2 = timeB;\n  vTime3 = circularOut(smoothstep(0.0, 0.8, time2));\n  vTime4 = circularOut(smoothstep(5.0, 7.0, time2));\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n"},17203:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D tex;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying vec3 vColor;\n\nfloat random(vec2 c){\n  return fract(sin(dot(c.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\nvoid main() {\n  float noise = random(vUv) * 0.08;\n\n  gl_FragColor = vec4(vColor + noise, 1.0);\n}\n"},67127:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying vec3 vColor;\n\nconst vec3 hsv1 = vec3(0.0, 0.6, 0.4);\nconst vec3 hsv2 = vec3(0.24, 0.6, 0.4);\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main(void) {\n  // calculate gradation with position.y\n  vec3 rgb = convertHsvToRgb(mix(hsv1, hsv2, (normalize(position).y + 1.0) / 2.0));\n\n  // coordinate transformation\n  vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n\n  vPosition = position;\n  vUv = uv;\n  vColor = rgb;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},55643:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying float vOpacity;\n\nvoid main() {\n  gl_FragColor = vec4(vec3(1.0), vOpacity);\n}\n"},58764:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 position2;\nattribute vec2 uv;\nattribute float opacity;\nattribute float opacity2;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\nuniform float timeTransform;\nuniform float durationTransform;\nuniform float prevIndex;\nuniform float nextIndex;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying float vOpacity;\n\nfloat exponentialOut(float t) {\n  return t == 1.0 ? t : 1.0 - pow(2.0, -10.0 * t);\n}\n\nmat4 calcRotateMat4X(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Y(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4(vec3 radian) {\n  return calcRotateMat4X(radian.x) * calcRotateMat4Y(radian.y) * calcRotateMat4Z(radian.z);\n}\n\nvoid main(void) {\n  // transform\n  vec3 prevPosition =\n    position * (1.0 - step(1.0, prevIndex))\n    + position2 * step(1.0, prevIndex) * (1.0 - step(2.0, prevIndex));\n  vec3 nextPosition =\n    position * (1.0 - step(1.0, nextIndex))\n    + position2 * step(1.0, nextIndex) * (1.0 - step(2.0, nextIndex));\n  float prevOpacity =\n    opacity * (1.0 - step(1.0, prevIndex))\n    + opacity2 * step(1.0, prevIndex) * (1.0 - step(2.0, prevIndex));\n  float nextOpacity =\n    opacity * (1.0 - step(1.0, nextIndex))\n    + opacity2 * step(1.0, nextIndex) * (1.0 - step(2.0, nextIndex));\n  float ease = exponentialOut(min(timeTransform / 1.0, durationTransform) / durationTransform);\n  vec3 mixPosition = mix(prevPosition, nextPosition, ease);\n  float mixOpacity = mix(prevOpacity, nextOpacity, ease);\n\n  // calculate shake moving.\n  float now = time * 10.0 + length(mixPosition);\n  mat4 rotateMat = calcRotateMat4(vec3(now));\n  vec3 shake = (rotateMat * vec4(vec3(0.0, sin(now) * 5.0, 0.0), 1.0)).xyz;\n\n  // coordinate transformation\n  vec4 mvPosition = modelViewMatrix * vec4(mixPosition + shake, 1.0);\n\n  vPosition = mixPosition;\n  vUv = uv;\n  vOpacity = mixOpacity;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},37094:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nvarying float vOpacity;\n\nvoid main() {\n  // Round the point\n  vec3 n;\n  n.xy = gl_PointCoord * 2.0 - 1.0;\n  n.z = 1.0 - dot(n.xy, n.xy);\n  if (n.z < 0.0) discard;\n\n  gl_FragColor = vec4(vec3(1.0), vOpacity);\n}\n"},99886:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 position2;\nattribute float opacity;\nattribute float opacity2;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\nuniform float timeTransform;\nuniform float durationTransform;\nuniform float prevIndex;\nuniform float nextIndex;\n\nvarying float vOpacity;\n\nfloat exponentialOut(float t) {\n  return t == 1.0 ? t : 1.0 - pow(2.0, -10.0 * t);\n}\n\nmat4 calcRotateMat4X(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Y(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4(vec3 radian) {\n  return calcRotateMat4X(radian.x) * calcRotateMat4Y(radian.y) * calcRotateMat4Z(radian.z);\n}\n\nvoid main() {\n  // transform\n  vec3 prevPosition =\n    position * (1.0 - step(1.0, prevIndex))\n    + position2 * step(1.0, prevIndex) * (1.0 - step(2.0, prevIndex));\n  vec3 nextPosition =\n    position * (1.0 - step(1.0, nextIndex))\n    + position2 * step(1.0, nextIndex) * (1.0 - step(2.0, nextIndex));\n  float prevOpacity =\n    opacity * (1.0 - step(1.0, prevIndex))\n    + opacity2 * step(1.0, prevIndex) * (1.0 - step(2.0, prevIndex));\n  float nextOpacity =\n    opacity * (1.0 - step(1.0, nextIndex))\n    + opacity2 * step(1.0, nextIndex) * (1.0 - step(2.0, nextIndex));\n  float ease = exponentialOut(min(timeTransform / 1.0, durationTransform) / durationTransform);\n  vec3 mixPosition = mix(prevPosition, nextPosition, ease);\n  float mixOpacity = mix(prevOpacity, nextOpacity, ease);\n\n  // calculate shake moving.\n  float now = time * 10.0 + length(mixPosition);\n  mat4 rotateMat = calcRotateMat4(vec3(now));\n  vec3 shake = (rotateMat * vec4(vec3(0.0, sin(now) * 5.0, 0.0), 1.0)).xyz;\n\n  // coordinate transformation\n  vec4 mvPosition = modelViewMatrix * vec4(mixPosition + shake, 1.0);\n\n  vOpacity = mixOpacity;\n\n  gl_Position = projectionMatrix * mvPosition;\n  gl_PointSize = 8.0;\n}\n"},85530:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying float vOpacity;\n\nvoid main() {\n  gl_FragColor = vec4(vec3(1.0), vOpacity);\n}\n"},31180:function(e,t){"use strict";t.Z='#define GLSLIFY 1\nuniform vec2 resolution;\nuniform sampler2D velocity;\nuniform sampler2D acceleration;\nuniform float time;\nuniform vec2 vTouchMove;\n\nvarying vec2 vUv;\n\n//\n// GLSL textureless classic 3D noise "cnoise",\n// with an RSL-style periodic variant "pnoise".\n// Author:  Stefan Gustavson (stefan.gustavson@liu.se)\n// Version: 2011-10-11\n//\n// Many thanks to Ian McEwan of Ashima Arts for the\n// ideas for permutation and gradient selection.\n//\n// Copyright (c) 2011 Stefan Gustavson. All rights reserved.\n// Distributed under the MIT license. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x)\n{\n  return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec3 fade(vec3 t) {\n  return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n\n// Classic Perlin noise\nfloat cnoise(vec3 P)\n{\n  vec3 Pi0 = floor(P); // Integer part for indexing\n  vec3 Pi1 = Pi0 + vec3(1.0); // Integer part + 1\n  Pi0 = mod289(Pi0);\n  Pi1 = mod289(Pi1);\n  vec3 Pf0 = fract(P); // Fractional part for interpolation\n  vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n  vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n  vec4 iy = vec4(Pi0.yy, Pi1.yy);\n  vec4 iz0 = Pi0.zzzz;\n  vec4 iz1 = Pi1.zzzz;\n\n  vec4 ixy = permute(permute(ix) + iy);\n  vec4 ixy0 = permute(ixy + iz0);\n  vec4 ixy1 = permute(ixy + iz1);\n\n  vec4 gx0 = ixy0 * (1.0 / 7.0);\n  vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n  gx0 = fract(gx0);\n  vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n  vec4 sz0 = step(gz0, vec4(0.0));\n  gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n  gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n\n  vec4 gx1 = ixy1 * (1.0 / 7.0);\n  vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n  gx1 = fract(gx1);\n  vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n  vec4 sz1 = step(gz1, vec4(0.0));\n  gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n  gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n\n  vec3 g000 = vec3(gx0.x,gy0.x,gz0.x);\n  vec3 g100 = vec3(gx0.y,gy0.y,gz0.y);\n  vec3 g010 = vec3(gx0.z,gy0.z,gz0.z);\n  vec3 g110 = vec3(gx0.w,gy0.w,gz0.w);\n  vec3 g001 = vec3(gx1.x,gy1.x,gz1.x);\n  vec3 g101 = vec3(gx1.y,gy1.y,gz1.y);\n  vec3 g011 = vec3(gx1.z,gy1.z,gz1.z);\n  vec3 g111 = vec3(gx1.w,gy1.w,gz1.w);\n\n  vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n  g000 *= norm0.x;\n  g010 *= norm0.y;\n  g100 *= norm0.z;\n  g110 *= norm0.w;\n  vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n  g001 *= norm1.x;\n  g011 *= norm1.y;\n  g101 *= norm1.z;\n  g111 *= norm1.w;\n\n  float n000 = dot(g000, Pf0);\n  float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n  float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n  float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n  float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n  float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n  float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n  float n111 = dot(g111, Pf1);\n\n  vec3 fade_xyz = fade(Pf0);\n  vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n  vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n  float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n  return 2.2 * n_xyz;\n}\n\n#ifndef PRECISION\n#define PRECISION 0.000001\n#endif\n\nvec3 drag(vec3 a, float value) {\n  return normalize(a * -1.0 + PRECISION) * length(a) * value;\n}\n\nvoid main(void) {\n  vec3 v = texture2D(velocity, vUv).xyz;\n  vec3 a = texture2D(acceleration, vUv).xyz;\n  float noise = sqrt(length(v)) * 10.0;\n  vec3 d = drag(a, 0.028);\n  float fx = cnoise(vec3(time * 0.1, v.y / noise, v.z / noise));\n  float fy = cnoise(vec3(v.x / noise, time * 0.1, v.z / noise));\n  float fz = cnoise(vec3(v.x / noise, v.y / noise, time * 0.1));\n  vec3 f1 = vec3(fx, fy, fz) * 0.24;\n  vec3 f2 = vec3(vTouchMove * 16.0 * (resolution / 640.0), 0.0);\n  vec3 f3 = a + f1 + f2 + d;\n  float vStep = 1.0 - step(1000.0, length(v + f3));\n  gl_FragColor = vec4(f3 * vStep, 1.0);\n}\n'},30231:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = vec4(position, 1.0);\n}\n"},60791:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nuniform sampler2D velocity;\nuniform sampler2D acceleration;\nuniform float time;\n\nvarying vec2 vUv;\n\nvec3 spherical(float radian1, float radian2, float radius) {\n  return vec3(\n    cos(radian1) * cos(radian2) * radius,\n    sin(radian1) * radius,\n    cos(radian1) * sin(radian2) * radius\n  );\n}\n\nconst float radius = 100.0;\n\nvoid main(void) {\n  vec3 a = texture2D(acceleration, vUv).xyz;\n  vec3 v = texture2D(velocity, vUv).xyz;\n  float vStep = step(0.000001, length(a));\n  gl_FragColor = vec4(\n    (a + v) * vStep + normalize(v + spherical(time, -time, 1.0)) * radius * (1.0 - vStep),\n    1.0\n  );\n}\n"},50474:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nvarying vec2 vUv;\n\nvoid main(void) {\n  vUv = uv;\n  gl_Position = vec4(position, 1.0);\n}\n"},79511:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\n\nvarying vec3 vAcceleration;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  float start = smoothstep(time, 0.0, 1.0);\n  vec3 n;\n  n.xy = gl_PointCoord * 2.0 - 1.0;\n  n.z = 1.0 - dot(n.xy, n.xy);\n  if (n.z < 0.0) discard;\n  float aLength = length(vAcceleration);\n  vec3 color = convertHsvToRgb(vec3(aLength * 0.08 + time * 0.05, 0.5, 0.8));\n  gl_FragColor = vec4(color, 0.15 * start);\n}\n"},8924:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uvVelocity;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float time;\nuniform sampler2D acceleration;\nuniform sampler2D velocity;\n\nvarying vec3 vAcceleration;\n\nvoid main() {\n  vec3 a = texture2D(acceleration, uvVelocity).xyz;\n  vec3 v = texture2D(velocity, uvVelocity).xyz;\n  vec4 mvPosition = modelViewMatrix * vec4(v, 1.0);\n  vAcceleration = a;\n  gl_PointSize = 500.0 / length(mvPosition.xyz);\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},98640:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vUv = uv;\n  gl_Position = vec4(position, 1.0);\n}\n"},58113:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture1;\nuniform sampler2D texture2;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vec4 color1 = texture2D(texture1, vUv);\n  vec4 color2 = texture2D(texture2, vUv);\n  gl_FragColor = color1 * 0.6 + color2;\n}\n"},143:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform vec2 resolution;\nuniform vec2 direction;\nuniform sampler2D texture;\n\nvarying vec2 vUv;\n\nvec4 gaussianBlur(sampler2D texture, vec2 uv, float radius, vec2 resolution, vec2 direction) {\n  vec4 color = vec4(0.0);\n  vec2 step = radius / resolution * direction;\n  color += texture2D(texture, uv - 4.0 * step) * 0.02699548325659403;\n  color += texture2D(texture, uv - 3.0 * step) * 0.06475879783294587;\n  color += texture2D(texture, uv - 2.0 * step) * 0.12098536225957168;\n  color += texture2D(texture, uv - 1.0 * step) * 0.17603266338214976;\n  color += texture2D(texture, uv) * 0.19947114020071635;\n  color += texture2D(texture, uv + 1.0 * step) * 0.17603266338214976;\n  color += texture2D(texture, uv + 2.0 * step) * 0.12098536225957168;\n  color += texture2D(texture, uv + 3.0 * step) * 0.06475879783294587;\n  color += texture2D(texture, uv + 4.0 * step) * 0.02699548325659403;\n  return color;\n}\n\nvoid main() {\n  vec4 color = gaussianBlur(texture, vUv, 1.0, resolution, direction);\n  gl_FragColor = color;\n}\n"},29336:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float minBright;\nuniform sampler2D texture;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vec4 bright = max(vec4(0.0), (texture2D(texture, vUv) - minBright));\n  gl_FragColor = bright;\n}\n"},48448:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D tex;\n\nvarying vec3 vColor;\n\nvoid main() {\n  gl_FragColor = vec4(vColor, 1.0);\n}\n"},74766:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float addH;\n\nvarying vec3 vColor;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main(void) {\n  // calculate gradation with position.y\n  vec3 hsv1 = vec3(addH + 0.22, 0.12, 0.96);\n  vec3 hsv2 = vec3(addH - 0.22, 0.12, 0.96);\n  vec3 rgb = convertHsvToRgb(mix(hsv1, hsv2, (normalize(position).y + 1.0) / 2.0));\n\n  // coordinate transformation\n  vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n\n  vColor = rgb;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},82636:function(e,t){"use strict";t.Z="#extension GL_OES_standard_derivatives : enable\nprecision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vPosition;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  // Flat Shading\n  vec3 light = normalize(vec3(-1.0, 1.0, 1.0));\n  vec3 normal = normalize(cross(dFdx(vPosition), dFdy(vPosition)));\n  float diff = (dot(normal, light) + 1.0) / 2.0;\n\n  vec3 hsv = vec3(0.0, 0.0, 0.8 + diff * 0.2);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  gl_FragColor = vec4(rgb, 1.0);\n}\n"},23234:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 instancePosition;\nattribute vec3 instanceRotate;\nattribute vec3 instanceScale;\nattribute float speed;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\n\nvarying vec3 vPosition;\n\nmat4 calcTranslateMat4(vec3 v) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    v.x, v.y, v.z, 1.0\n  );\n}\n\nmat4 calcRotateMat4X(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Y(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4(vec3 radian) {\n  return calcRotateMat4X(radian.x) * calcRotateMat4Y(radian.y) * calcRotateMat4Z(radian.z);\n}\n\nmat4 calcScaleMat4(vec3 scale) {\n  return mat4(\n    scale.x, 0.0, 0.0, 0.0,\n    0.0, scale.y, 0.0, 0.0,\n    0.0, 0.0, scale.z, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex\n//               noise functions.\n//      Author : Ian McEwan, Ashima Arts.\n//  Maintainer : ijm\n//     Lastmod : 20110822 (ijm)\n//     License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n//               Distributed under the MIT License. See LICENSE file.\n//               https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x) {\n     return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nfloat snoise(vec3 v)\n  {\n  const vec2  C = vec2(1.0/6.0, 1.0/3.0) ;\n  const vec4  D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n  vec3 i  = floor(v + dot(v, C.yyy) );\n  vec3 x0 =   v - i + dot(i, C.xxx) ;\n\n// Other corners\n  vec3 g = step(x0.yzx, x0.xyz);\n  vec3 l = 1.0 - g;\n  vec3 i1 = min( g.xyz, l.zxy );\n  vec3 i2 = max( g.xyz, l.zxy );\n\n  //   x0 = x0 - 0.0 + 0.0 * C.xxx;\n  //   x1 = x0 - i1  + 1.0 * C.xxx;\n  //   x2 = x0 - i2  + 2.0 * C.xxx;\n  //   x3 = x0 - 1.0 + 3.0 * C.xxx;\n  vec3 x1 = x0 - i1 + C.xxx;\n  vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n  vec3 x3 = x0 - D.yyy;      // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n  i = mod289(i);\n  vec4 p = permute( permute( permute(\n             i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n           + i.y + vec4(0.0, i1.y, i2.y, 1.0 ))\n           + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n  float n_ = 0.142857142857; // 1.0/7.0\n  vec3  ns = n_ * D.wyz - D.xzx;\n\n  vec4 j = p - 49.0 * floor(p * ns.z * ns.z);  //  mod(p,7*7)\n\n  vec4 x_ = floor(j * ns.z);\n  vec4 y_ = floor(j - 7.0 * x_ );    // mod(j,N)\n\n  vec4 x = x_ *ns.x + ns.yyyy;\n  vec4 y = y_ *ns.x + ns.yyyy;\n  vec4 h = 1.0 - abs(x) - abs(y);\n\n  vec4 b0 = vec4( x.xy, y.xy );\n  vec4 b1 = vec4( x.zw, y.zw );\n\n  //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n  //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n  vec4 s0 = floor(b0)*2.0 + 1.0;\n  vec4 s1 = floor(b1)*2.0 + 1.0;\n  vec4 sh = -step(h, vec4(0.0));\n\n  vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n  vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n  vec3 p0 = vec3(a0.xy,h.x);\n  vec3 p1 = vec3(a0.zw,h.y);\n  vec3 p2 = vec3(a1.xy,h.z);\n  vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n  vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n  p0 *= norm.x;\n  p1 *= norm.y;\n  p2 *= norm.z;\n  p3 *= norm.w;\n\n// Mix final noise value\n  vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n  m = m * m;\n  return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),\n                                dot(p2,x2), dot(p3,x3) ) );\n  }\n\nfloat exponentialOut(float t) {\n  return t == 1.0 ? t : 1.0 - pow(2.0, -10.0 * t);\n}\n\nvoid main(void) {\n  // added Noise to form like a cloud.\n  float noise = snoise(position + instancePosition);\n  vec3 noiseEasePos = normalize(vec3(position.x, position.y, 0.01)) * exponentialOut(1.0 - abs(position.z / 10.0)) * vec3(0.4, 1.0, 1.0);\n  vec3 noisePosition = (noise + 1.0) / 2.0 * noiseEasePos * 3.0 + noiseEasePos * 1.0;\n\n  // coordinate transformation\n  mat4 translateMat = calcTranslateMat4(instancePosition);\n  mat4 rotateMat = calcRotateMat4(instanceRotate);\n  mat4 scaleMat = calcScaleMat4(instanceScale);\n  mat4 worldRotateMat = calcRotateMat4(vec3(0.0, -time * speed, 0.0));\n  vec4 mvPosition = modelViewMatrix * worldRotateMat * translateMat * rotateMat * scaleMat * vec4(position + noisePosition, 1.0);\n\n  vPosition = mvPosition.xyz;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},64557:function(e,t){"use strict";t.Z="#extension GL_OES_standard_derivatives : enable\nprecision highp float;\n#define GLSLIFY 1\n\nuniform float addH1;\nuniform float addH2;\n\nvarying vec3 vMPosition;\nvarying float vHeight;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nconst float edge1 = 56.0;\nconst float edge2 = 52.0;\nconst float edge3 = 50.0;\nconst float range = 2.0;\n\nvoid main() {\n  // Flat Shading\n  vec3 light = normalize(vec3(-1.0, 1.0, 1.0));\n  vec3 normal = normalize(cross(dFdx(vMPosition), dFdy(vMPosition)));\n  float diff = (dot(normal, light) + 1.0) / 2.0;\n\n  float stepTop     = smoothstep(edge1, edge1 + range, vHeight);\n  float stepMiddle1 = smoothstep(edge2, edge2 + range, vHeight) * (1.0 - smoothstep(edge1, edge1 + range, vHeight));\n  float stepMiddle2 = smoothstep(edge3, edge3 + range, vHeight) * (1.0 - smoothstep(edge2, edge2 + range, vHeight));\n  float stepBottom  = 1.0 - smoothstep(edge3, edge3 + range, vHeight);\n\n  vec4 colorTop     = vec4(convertHsvToRgb(vec3(0.25 + addH1, 0.05, 1.0)), 1.0) * stepTop;\n  vec4 colorMiddle1 = vec4(convertHsvToRgb(vec3(0.25 + addH2, 0.05, 1.0)), 1.0) * stepMiddle1;\n  vec4 colorMiddle2 = vec4(convertHsvToRgb(vec3(0.25 + addH2, 0.1, 0.9)), 1.0) * stepMiddle2;\n  vec4 colorBottom  = vec4(convertHsvToRgb(vec3(0.25 + addH1, 0.1, 0.9)), 1.0) * stepBottom;\n\n  vec4 colorAll = (colorTop + colorMiddle1 + colorMiddle2 + colorBottom) * diff;\n\n  gl_FragColor = colorAll;\n}\n"},59870:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec3 vMPosition;\nvarying float vHeight;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n\n  vHeight = length(position);\n  vMPosition = mPosition.xyz;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n"},76161:function(e,t){"use strict";t.Z="#extension GL_OES_standard_derivatives : enable\nprecision highp float;\n#define GLSLIFY 1\n\nuniform float addH;\n\nvarying vec3 vPosition;\nvarying float vSinAll;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  // Flat Shading\n  vec3 light = normalize(vec3(-1.0, 1.0, 1.0));\n  vec3 normal = normalize(cross(dFdx(vPosition), dFdy(vPosition)));\n  float diff = (dot(normal, light) + 1.0) / 2.0;\n\n  vec4 color = vec4(convertHsvToRgb(vec3(0.2 + vSinAll * 0.08 + addH, 0.4, 1.0)), 0.8);\n\n  gl_FragColor = color * vec4(vec3(diff), 1.0);\n}\n"},78081:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform float time;\n\nvarying vec3 vPosition;\nvarying float vSinAll;\n\nmat4 calcTranslateMat4(vec3 v) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    v.x, v.y, v.z, 1.0\n  );\n}\n\nvoid main(void) {\n  float sin1 = sin(time + position.x / 16.0);\n  float sin2 = sin(time + position.y / 8.0);\n  float sin3 = sin(time - length(position.xy + 50.0) / 4.0);\n  float sinAll = (sin1 + sin2 * 0.5 + sin3 * 0.2) / 1.7;\n  mat4 waveMat = calcTranslateMat4(vec3(0.0, 0.0, sinAll * 1.5));\n\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * waveMat * vec4(position, 1.0);\n\n  vPosition = mPosition.xyz;\n  vSinAll = sinAll;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n}\n"},29014:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform float colorH;\nuniform float noiseRange;\n\nvarying vec2 vUv;\n\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex\n//               noise functions.\n//      Author : Ian McEwan, Ashima Arts.\n//  Maintainer : ijm\n//     Lastmod : 20110822 (ijm)\n//     License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n//               Distributed under the MIT License. See LICENSE file.\n//               https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x) {\n     return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nfloat snoise(vec3 v)\n  {\n  const vec2  C = vec2(1.0/6.0, 1.0/3.0) ;\n  const vec4  D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n  vec3 i  = floor(v + dot(v, C.yyy) );\n  vec3 x0 =   v - i + dot(i, C.xxx) ;\n\n// Other corners\n  vec3 g = step(x0.yzx, x0.xyz);\n  vec3 l = 1.0 - g;\n  vec3 i1 = min( g.xyz, l.zxy );\n  vec3 i2 = max( g.xyz, l.zxy );\n\n  //   x0 = x0 - 0.0 + 0.0 * C.xxx;\n  //   x1 = x0 - i1  + 1.0 * C.xxx;\n  //   x2 = x0 - i2  + 2.0 * C.xxx;\n  //   x3 = x0 - 1.0 + 3.0 * C.xxx;\n  vec3 x1 = x0 - i1 + C.xxx;\n  vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n  vec3 x3 = x0 - D.yyy;      // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n  i = mod289(i);\n  vec4 p = permute( permute( permute(\n             i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n           + i.y + vec4(0.0, i1.y, i2.y, 1.0 ))\n           + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n  float n_ = 0.142857142857; // 1.0/7.0\n  vec3  ns = n_ * D.wyz - D.xzx;\n\n  vec4 j = p - 49.0 * floor(p * ns.z * ns.z);  //  mod(p,7*7)\n\n  vec4 x_ = floor(j * ns.z);\n  vec4 y_ = floor(j - 7.0 * x_ );    // mod(j,N)\n\n  vec4 x = x_ *ns.x + ns.yyyy;\n  vec4 y = y_ *ns.x + ns.yyyy;\n  vec4 h = 1.0 - abs(x) - abs(y);\n\n  vec4 b0 = vec4( x.xy, y.xy );\n  vec4 b1 = vec4( x.zw, y.zw );\n\n  //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n  //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n  vec4 s0 = floor(b0)*2.0 + 1.0;\n  vec4 s1 = floor(b1)*2.0 + 1.0;\n  vec4 sh = -step(h, vec4(0.0));\n\n  vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n  vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n  vec3 p0 = vec3(a0.xy,h.x);\n  vec3 p1 = vec3(a0.zw,h.y);\n  vec3 p2 = vec3(a1.xy,h.z);\n  vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n  vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n  p0 *= norm.x;\n  p1 *= norm.y;\n  p2 *= norm.z;\n  p3 *= norm.w;\n\n// Mix final noise value\n  vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n  m = m * m;\n  return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),\n                                dot(p2,x2), dot(p3,x3) ) );\n  }\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nfloat exponentialOut(float t) {\n  return t == 1.0 ? t : 1.0 - pow(2.0, -10.0 * t);\n}\n\nvoid main() {\n  float t1 = exponentialOut(min(time, 1.0) / 1.0);\n  float t2 = exponentialOut(clamp(time - 14.0, 0.0, 1.0) / 1.0);\n  vec2 pos = vUv * 2.0 - vec2(1.0);\n  float circleOut = smoothstep(0.0, 0.5, t1 - t2 - length(pos));\n  float circleIn = smoothstep(0.0, 0.5, (t1 - t2) * 0.5 - length(pos));\n  float noise = (snoise(vec3(pos * (1.4 + noiseRange * 0.1) + vec2(sin(time), cos(time)), time + noiseRange * 100.0)) + 1.0) / 2.0;\n  float mask = circleOut * noise + circleIn;\n  float opacity = 1.0 - step(mask, 0.3);\n  float h1 = step(mask, 0.99) * 0.4 - time * 0.05;\n  float h2 = step(mask, 0.4) * 0.5;\n  vec3 hsv = vec3(h1 - h2 + colorH, 0.45, 0.8);\n  vec3 rgb = convertHsvToRgb(hsv);\n  gl_FragColor = vec4(rgb, opacity);\n}\n"},52402:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vUv = uv;\n  gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(position, 1.0);\n}\n"},54864:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform vec3 cameraPosition;\n\nvarying vec3 vPosition;\nvarying vec3 vNormal;\nvarying vec3 vColor;\n\nconst vec3 light = vec3(0.7);\n\nvoid main() {\n  float diff = (dot(vNormal, light) + 1.0) / 2.0 * 0.25 + 0.75;\n  float opacity = (1.0 - (vPosition.z / 1000.0)) * 0.8 + 0.2;\n  gl_FragColor = vec4(vColor * diff, opacity);\n}\n"},58754:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\nattribute float radian;\nattribute vec3 hsv;\nattribute float noiseDiff;\nattribute float speed;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\nuniform float rotate;\n\nvarying vec3 vPosition;\nvarying vec3 vNormal;\nvarying vec3 vColor;\n\nmat4 calcTranslateMat4(vec3 v) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    v.x, v.y, v.z, 1.0\n  );\n}\n\nmat4 calcRotateMat4X(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Y(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4(vec3 radian) {\n  return calcRotateMat4X(radian.x) * calcRotateMat4Y(radian.y) * calcRotateMat4Z(radian.z);\n}\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex\n//               noise functions.\n//      Author : Ian McEwan, Ashima Arts.\n//  Maintainer : ijm\n//     Lastmod : 20110822 (ijm)\n//     License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n//               Distributed under the MIT License. See LICENSE file.\n//               https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x) {\n     return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nfloat snoise(vec3 v)\n  {\n  const vec2  C = vec2(1.0/6.0, 1.0/3.0) ;\n  const vec4  D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n  vec3 i  = floor(v + dot(v, C.yyy) );\n  vec3 x0 =   v - i + dot(i, C.xxx) ;\n\n// Other corners\n  vec3 g = step(x0.yzx, x0.xyz);\n  vec3 l = 1.0 - g;\n  vec3 i1 = min( g.xyz, l.zxy );\n  vec3 i2 = max( g.xyz, l.zxy );\n\n  //   x0 = x0 - 0.0 + 0.0 * C.xxx;\n  //   x1 = x0 - i1  + 1.0 * C.xxx;\n  //   x2 = x0 - i2  + 2.0 * C.xxx;\n  //   x3 = x0 - 1.0 + 3.0 * C.xxx;\n  vec3 x1 = x0 - i1 + C.xxx;\n  vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n  vec3 x3 = x0 - D.yyy;      // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n  i = mod289(i);\n  vec4 p = permute( permute( permute(\n             i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n           + i.y + vec4(0.0, i1.y, i2.y, 1.0 ))\n           + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n  float n_ = 0.142857142857; // 1.0/7.0\n  vec3  ns = n_ * D.wyz - D.xzx;\n\n  vec4 j = p - 49.0 * floor(p * ns.z * ns.z);  //  mod(p,7*7)\n\n  vec4 x_ = floor(j * ns.z);\n  vec4 y_ = floor(j - 7.0 * x_ );    // mod(j,N)\n\n  vec4 x = x_ *ns.x + ns.yyyy;\n  vec4 y = y_ *ns.x + ns.yyyy;\n  vec4 h = 1.0 - abs(x) - abs(y);\n\n  vec4 b0 = vec4( x.xy, y.xy );\n  vec4 b1 = vec4( x.zw, y.zw );\n\n  //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n  //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n  vec4 s0 = floor(b0)*2.0 + 1.0;\n  vec4 s1 = floor(b1)*2.0 + 1.0;\n  vec4 sh = -step(h, vec4(0.0));\n\n  vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n  vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n  vec3 p0 = vec3(a0.xy,h.x);\n  vec3 p1 = vec3(a0.zw,h.y);\n  vec3 p2 = vec3(a1.xy,h.z);\n  vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n  vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n  p0 *= norm.x;\n  p1 *= norm.y;\n  p2 *= norm.z;\n  p3 *= norm.w;\n\n// Mix final noise value\n  vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n  m = m * m;\n  return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),\n                                dot(p2,x2), dot(p3,x3) ) );\n  }\n\nvoid main(void) {\n  float noise = snoise(position * 0.02 + time * speed + noiseDiff);\n  mat4 rotateMatWorld = calcRotateMat4(vec3(0.0, radian + radians(rotate), 0.0));\n  mat4 translateMat = calcTranslateMat4(vec3(1000.0, 0.0, 0.0));\n  vec4 updatePosition = rotateMatWorld * translateMat * vec4(\n    position + normalize(position) * noise * 5.0,\n    1.0\n    );\n  vPosition = updatePosition.xyz;\n  vNormal = normal;\n  vColor = convertHsvToRgb(hsv);\n  gl_Position = projectionMatrix * modelViewMatrix * updatePosition;\n}\n"},71955:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\n\nvarying vec3 vPosition;\nvarying vec3 vNormal;\nvarying vec4 vUv;\nvarying mat4 vInvertMatrix;\n\nvoid main() {\n  vec4 projectorColor;\n  if (all(bvec4(vUv.x >= 0.0, vUv.y >= 0.0, vUv.x <= vUv.z, vUv.y <= vUv.z))) {\n    projectorColor = texture2DProj(texture, vUv);\n  }\n  gl_FragColor = vec4(1.0, 1.0, 1.0, 0.35) * projectorColor;\n}\n"},84450:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform mat3 normalMatrix;\nuniform mat4 textureMatrix;\n\nvarying vec3 vPosition;\nvarying vec3 vNormal;\nvarying vec4 vUv;\nvarying mat4 vInvertMatrix;\n\nfloat inverse(float m) {\n  return 1.0 / m;\n}\n\nmat2 inverse(mat2 m) {\n  return mat2(m[1][1],-m[0][1],\n             -m[1][0], m[0][0]) / (m[0][0]*m[1][1] - m[0][1]*m[1][0]);\n}\n\nmat3 inverse(mat3 m) {\n  float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2];\n  float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2];\n  float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2];\n\n  float b01 = a22 * a11 - a12 * a21;\n  float b11 = -a22 * a10 + a12 * a20;\n  float b21 = a21 * a10 - a11 * a20;\n\n  float det = a00 * b01 + a01 * b11 + a02 * b21;\n\n  return mat3(b01, (-a22 * a01 + a02 * a21), (a12 * a01 - a02 * a11),\n              b11, (a22 * a00 - a02 * a20), (-a12 * a00 + a02 * a10),\n              b21, (-a21 * a00 + a01 * a20), (a11 * a00 - a01 * a10)) / det;\n}\n\nmat4 inverse(mat4 m) {\n  float\n      a00 = m[0][0], a01 = m[0][1], a02 = m[0][2], a03 = m[0][3],\n      a10 = m[1][0], a11 = m[1][1], a12 = m[1][2], a13 = m[1][3],\n      a20 = m[2][0], a21 = m[2][1], a22 = m[2][2], a23 = m[2][3],\n      a30 = m[3][0], a31 = m[3][1], a32 = m[3][2], a33 = m[3][3],\n\n      b00 = a00 * a11 - a01 * a10,\n      b01 = a00 * a12 - a02 * a10,\n      b02 = a00 * a13 - a03 * a10,\n      b03 = a01 * a12 - a02 * a11,\n      b04 = a01 * a13 - a03 * a11,\n      b05 = a02 * a13 - a03 * a12,\n      b06 = a20 * a31 - a21 * a30,\n      b07 = a20 * a32 - a22 * a30,\n      b08 = a20 * a33 - a23 * a30,\n      b09 = a21 * a32 - a22 * a31,\n      b10 = a21 * a33 - a23 * a31,\n      b11 = a22 * a33 - a23 * a32,\n\n      det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n  return mat4(\n      a11 * b11 - a12 * b10 + a13 * b09,\n      a02 * b10 - a01 * b11 - a03 * b09,\n      a31 * b05 - a32 * b04 + a33 * b03,\n      a22 * b04 - a21 * b05 - a23 * b03,\n      a12 * b08 - a10 * b11 - a13 * b07,\n      a00 * b11 - a02 * b08 + a03 * b07,\n      a32 * b02 - a30 * b05 - a33 * b01,\n      a20 * b05 - a22 * b02 + a23 * b01,\n      a10 * b10 - a11 * b08 + a13 * b06,\n      a01 * b08 - a00 * b10 - a03 * b06,\n      a30 * b04 - a31 * b02 + a33 * b00,\n      a21 * b02 - a20 * b04 - a23 * b00,\n      a11 * b07 - a10 * b09 - a12 * b06,\n      a00 * b09 - a01 * b07 + a02 * b06,\n      a31 * b01 - a30 * b03 - a32 * b00,\n      a20 * b03 - a21 * b01 + a22 * b00) / det;\n}\n\nvoid main(void) {\n  vec4 worldPosition = modelMatrix * vec4(position, 1.0);\n  vPosition = worldPosition.xyz;\n  vNormal = normal;\n  vUv = textureMatrix * worldPosition;\n  vInvertMatrix = inverse(modelMatrix);\n  gl_Position = projectionMatrix * viewMatrix * worldPosition;\n}\n"},69805:function(e,t){"use strict";t.Z="#extension GL_OES_standard_derivatives : enable\nprecision highp float;\n#define GLSLIFY 1\n\nuniform vec3 cameraPosition;\nuniform float time;\n\nvarying vec3 vPosition;\nvarying mat4 vInvertMatrix;\n\nvoid main() {\n  vec3 normal = normalize(cross(dFdx(vPosition), dFdy(vPosition)));\n  vec3 light = vec3(-0.7, 0.7, -0.7);\n  float diff = (dot(normal, light) + 1.0) / 2.0 * 0.2 + 0.8;\n  gl_FragColor = vec4(vec3(0.98) * diff, 1.0);\n}\n"},8757:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\nattribute float height;\nattribute float offsetX;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec3 vPosition;\nvarying mat4 vInvertMatrix;\n\nmat4 calcTranslateMat4(vec3 v) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    v.x, v.y, v.z, 1.0\n  );\n}\n\nmat4 calcScaleMat4(vec3 scale) {\n  return mat4(\n    scale.x, 0.0, 0.0, 0.0,\n    0.0, scale.y, 0.0, 0.0,\n    0.0, 0.0, scale.z, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nfloat inverse(float m) {\n  return 1.0 / m;\n}\n\nmat2 inverse(mat2 m) {\n  return mat2(m[1][1],-m[0][1],\n             -m[1][0], m[0][0]) / (m[0][0]*m[1][1] - m[0][1]*m[1][0]);\n}\n\nmat3 inverse(mat3 m) {\n  float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2];\n  float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2];\n  float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2];\n\n  float b01 = a22 * a11 - a12 * a21;\n  float b11 = -a22 * a10 + a12 * a20;\n  float b21 = a21 * a10 - a11 * a20;\n\n  float det = a00 * b01 + a01 * b11 + a02 * b21;\n\n  return mat3(b01, (-a22 * a01 + a02 * a21), (a12 * a01 - a02 * a11),\n              b11, (a22 * a00 - a02 * a20), (-a12 * a00 + a02 * a10),\n              b21, (-a21 * a00 + a01 * a20), (a11 * a00 - a01 * a10)) / det;\n}\n\nmat4 inverse(mat4 m) {\n  float\n      a00 = m[0][0], a01 = m[0][1], a02 = m[0][2], a03 = m[0][3],\n      a10 = m[1][0], a11 = m[1][1], a12 = m[1][2], a13 = m[1][3],\n      a20 = m[2][0], a21 = m[2][1], a22 = m[2][2], a23 = m[2][3],\n      a30 = m[3][0], a31 = m[3][1], a32 = m[3][2], a33 = m[3][3],\n\n      b00 = a00 * a11 - a01 * a10,\n      b01 = a00 * a12 - a02 * a10,\n      b02 = a00 * a13 - a03 * a10,\n      b03 = a01 * a12 - a02 * a11,\n      b04 = a01 * a13 - a03 * a11,\n      b05 = a02 * a13 - a03 * a12,\n      b06 = a20 * a31 - a21 * a30,\n      b07 = a20 * a32 - a22 * a30,\n      b08 = a20 * a33 - a23 * a30,\n      b09 = a21 * a32 - a22 * a31,\n      b10 = a21 * a33 - a23 * a31,\n      b11 = a22 * a33 - a23 * a32,\n\n      det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n  return mat4(\n      a11 * b11 - a12 * b10 + a13 * b09,\n      a02 * b10 - a01 * b11 - a03 * b09,\n      a31 * b05 - a32 * b04 + a33 * b03,\n      a22 * b04 - a21 * b05 - a23 * b03,\n      a12 * b08 - a10 * b11 - a13 * b07,\n      a00 * b11 - a02 * b08 + a03 * b07,\n      a32 * b02 - a30 * b05 - a33 * b01,\n      a20 * b05 - a22 * b02 + a23 * b01,\n      a10 * b10 - a11 * b08 + a13 * b06,\n      a01 * b08 - a00 * b10 - a03 * b06,\n      a30 * b04 - a31 * b02 + a33 * b00,\n      a21 * b02 - a20 * b04 - a23 * b00,\n      a11 * b07 - a10 * b09 - a12 * b06,\n      a00 * b09 - a01 * b07 + a02 * b06,\n      a31 * b01 - a30 * b03 - a32 * b00,\n      a20 * b03 - a21 * b01 + a22 * b00) / det;\n}\n\nvoid main(void) {\n  mat4 translateMat = calcTranslateMat4(vec3(offsetX, 0.0, 0.0));\n  mat4 scaleMat = calcScaleMat4(vec3(1.0, (position.y + 0.5) * height, 1.0));\n  vec4 updatePosition = scaleMat * translateMat * vec4(position, 1.0);\n  vPosition = (modelMatrix * updatePosition).xyz;\n  vInvertMatrix = inverse(modelMatrix);\n  gl_Position = projectionMatrix * modelViewMatrix * updatePosition;\n}\n"},46060:function(e,t){"use strict";t.Z="#extension GL_OES_standard_derivatives : enable\nprecision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform vec3 cameraPosition;\n\nvarying vec3 vPosition;\nvarying vec3 vColor;\nvarying mat4 vInvertMatrix;\n\nconst vec3 color = vec3(0.9);\n\nvoid main() {\n  vec3 normal = normalize(cross(dFdx(vPosition), dFdy(vPosition)));\n  if(!gl_FrontFacing) {\n      normal = -normal;\n  }\n  vec3 light = normalize(vInvertMatrix * vec4(vec3(-1000.0, 1000.0, -1000.0), 1.0)).xyz;\n  float diff = (dot(normal, light) + 1.0) / 2.0 * 0.2 + 0.8;\n  float opacity = (1.0 - (vPosition.z / 1000.0)) * 0.1 + 0.1;\n  gl_FragColor = vec4(color * diff * vColor, opacity);\n}\n"},24192:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\nattribute float radian;\nattribute vec3 hsv;\nattribute float timeHover;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\nuniform float rotate;\n\nvarying vec3 vPosition;\nvarying vec3 vNormal;\nvarying vec3 vColor;\nvarying mat4 vInvertMatrix;\n\nfloat inverse(float m) {\n  return 1.0 / m;\n}\n\nmat2 inverse(mat2 m) {\n  return mat2(m[1][1],-m[0][1],\n             -m[1][0], m[0][0]) / (m[0][0]*m[1][1] - m[0][1]*m[1][0]);\n}\n\nmat3 inverse(mat3 m) {\n  float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2];\n  float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2];\n  float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2];\n\n  float b01 = a22 * a11 - a12 * a21;\n  float b11 = -a22 * a10 + a12 * a20;\n  float b21 = a21 * a10 - a11 * a20;\n\n  float det = a00 * b01 + a01 * b11 + a02 * b21;\n\n  return mat3(b01, (-a22 * a01 + a02 * a21), (a12 * a01 - a02 * a11),\n              b11, (a22 * a00 - a02 * a20), (-a12 * a00 + a02 * a10),\n              b21, (-a21 * a00 + a01 * a20), (a11 * a00 - a01 * a10)) / det;\n}\n\nmat4 inverse(mat4 m) {\n  float\n      a00 = m[0][0], a01 = m[0][1], a02 = m[0][2], a03 = m[0][3],\n      a10 = m[1][0], a11 = m[1][1], a12 = m[1][2], a13 = m[1][3],\n      a20 = m[2][0], a21 = m[2][1], a22 = m[2][2], a23 = m[2][3],\n      a30 = m[3][0], a31 = m[3][1], a32 = m[3][2], a33 = m[3][3],\n\n      b00 = a00 * a11 - a01 * a10,\n      b01 = a00 * a12 - a02 * a10,\n      b02 = a00 * a13 - a03 * a10,\n      b03 = a01 * a12 - a02 * a11,\n      b04 = a01 * a13 - a03 * a11,\n      b05 = a02 * a13 - a03 * a12,\n      b06 = a20 * a31 - a21 * a30,\n      b07 = a20 * a32 - a22 * a30,\n      b08 = a20 * a33 - a23 * a30,\n      b09 = a21 * a32 - a22 * a31,\n      b10 = a21 * a33 - a23 * a31,\n      b11 = a22 * a33 - a23 * a32,\n\n      det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n  return mat4(\n      a11 * b11 - a12 * b10 + a13 * b09,\n      a02 * b10 - a01 * b11 - a03 * b09,\n      a31 * b05 - a32 * b04 + a33 * b03,\n      a22 * b04 - a21 * b05 - a23 * b03,\n      a12 * b08 - a10 * b11 - a13 * b07,\n      a00 * b11 - a02 * b08 + a03 * b07,\n      a32 * b02 - a30 * b05 - a33 * b01,\n      a20 * b05 - a22 * b02 + a23 * b01,\n      a10 * b10 - a11 * b08 + a13 * b06,\n      a01 * b08 - a00 * b10 - a03 * b06,\n      a30 * b04 - a31 * b02 + a33 * b00,\n      a21 * b02 - a20 * b04 - a23 * b00,\n      a11 * b07 - a10 * b09 - a12 * b06,\n      a00 * b09 - a01 * b07 + a02 * b06,\n      a31 * b01 - a30 * b03 - a32 * b00,\n      a20 * b03 - a21 * b01 + a22 * b00) / det;\n}\n\nfloat circularOut(float t) {\n  return sqrt((2.0 - t) * t);\n}\n\nmat4 calcTranslateMat4(vec3 v) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    v.x, v.y, v.z, 1.0\n  );\n}\n\nmat4 calcRotateMat4X(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Y(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4(vec3 radian) {\n  return calcRotateMat4X(radian.x) * calcRotateMat4Y(radian.y) * calcRotateMat4Z(radian.z);\n}\n\nmat4 calcScaleMat4(vec3 scale) {\n  return mat4(\n    scale.x, 0.0, 0.0, 0.0,\n    0.0, scale.y, 0.0, 0.0,\n    0.0, 0.0, scale.z, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main(void) {\n  float easeStep = circularOut(timeHover / 0.3);\n  mat4 rotateMatWorld = calcRotateMat4(vec3(0.0, radian + radians(rotate), 0.0));\n  mat4 scaleMat = calcScaleMat4(vec3(1.0 + easeStep * 0.2));\n  mat4 translateMat = calcTranslateMat4(vec3(1000.0, 0.0, 0.0));\n  vec4 updatePosition = rotateMatWorld * translateMat * scaleMat * vec4(position, 1.0);\n  vPosition = updatePosition.xyz;\n  vInvertMatrix = inverse(rotateMatWorld * translateMat);\n  vColor = convertHsvToRgb(hsv * vec3(1.0, 1.0 - easeStep, 1.0));\n  gl_Position = projectionMatrix * modelViewMatrix * updatePosition;\n}\n"},66977:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\n\nvarying vec3 vColor;\n\nvoid main() {\n  gl_FragColor = vec4(vColor, 1.0);\n}\n"},22984:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute float radian;\nattribute vec3 pickedColor;\nattribute float timeHover;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\nuniform float rotate;\n\nvarying vec3 vColor;\n\nfloat circularOut(float t) {\n  return sqrt((2.0 - t) * t);\n}\n\nmat4 calcTranslateMat4(vec3 v) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    v.x, v.y, v.z, 1.0\n  );\n}\n\nmat4 calcRotateMat4X(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Y(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4(vec3 radian) {\n  return calcRotateMat4X(radian.x) * calcRotateMat4Y(radian.y) * calcRotateMat4Z(radian.z);\n}\n\nmat4 calcScaleMat4(vec3 scale) {\n  return mat4(\n    scale.x, 0.0, 0.0, 0.0,\n    0.0, scale.y, 0.0, 0.0,\n    0.0, 0.0, scale.z, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nvoid main(void) {\n  float easeStep = circularOut(timeHover / 0.3);\n  mat4 rotateMatWorld = calcRotateMat4(vec3(0.0, radian + radians(rotate), 0.0));\n  mat4 scaleMat = calcScaleMat4(vec3(1.0 + easeStep * 0.2));\n  mat4 translateMat = calcTranslateMat4(vec3(1000.0, 0.0, 0.0));\n  vec4 updatePosition = rotateMatWorld * translateMat * scaleMat * vec4(position, 1.0);\n  vColor = pickedColor;\n  gl_Position = projectionMatrix * modelViewMatrix * updatePosition;\n}\n"},80170:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D tex;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vec4 texColor = texture2D(tex, vUv);\n  gl_FragColor = texColor;\n}\n"},78615:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform vec3 mouse;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\n\nvarying vec2 vUv;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  // coordinate transformation\n  vec4 mPosition = modelMatrix * vec4(position, 1.0);\n  vec3 subPosition = mouse - mPosition.xyz;\n  float force = (1000.0 - clamp(length(subPosition), 0.0, 1000.0)) / 4.0;\n  mPosition = vec4(mPosition.xyz + force * normalize(-subPosition), 1.0);\n\n  vUv = uv;\n\n  gl_Position = projectionMatrix * viewMatrix * mPosition;\n  gl_PointSize = 3.0;\n}\n"},75473:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform float size;\nuniform sampler2D texButterfly;\nuniform sampler2D texPicture;\nuniform float colorH;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying float vOpacity;\nvarying float vStep1;\nvarying float vStep2;\nvarying float vStep3;\n\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex\n//               noise functions.\n//      Author : Ian McEwan, Ashima Arts.\n//  Maintainer : ijm\n//     Lastmod : 20110822 (ijm)\n//     License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n//               Distributed under the MIT License. See LICENSE file.\n//               https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x) {\n     return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nfloat snoise(vec3 v)\n  {\n  const vec2  C = vec2(1.0/6.0, 1.0/3.0) ;\n  const vec4  D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n  vec3 i  = floor(v + dot(v, C.yyy) );\n  vec3 x0 =   v - i + dot(i, C.xxx) ;\n\n// Other corners\n  vec3 g = step(x0.yzx, x0.xyz);\n  vec3 l = 1.0 - g;\n  vec3 i1 = min( g.xyz, l.zxy );\n  vec3 i2 = max( g.xyz, l.zxy );\n\n  //   x0 = x0 - 0.0 + 0.0 * C.xxx;\n  //   x1 = x0 - i1  + 1.0 * C.xxx;\n  //   x2 = x0 - i2  + 2.0 * C.xxx;\n  //   x3 = x0 - 1.0 + 3.0 * C.xxx;\n  vec3 x1 = x0 - i1 + C.xxx;\n  vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n  vec3 x3 = x0 - D.yyy;      // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n  i = mod289(i);\n  vec4 p = permute( permute( permute(\n             i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n           + i.y + vec4(0.0, i1.y, i2.y, 1.0 ))\n           + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n  float n_ = 0.142857142857; // 1.0/7.0\n  vec3  ns = n_ * D.wyz - D.xzx;\n\n  vec4 j = p - 49.0 * floor(p * ns.z * ns.z);  //  mod(p,7*7)\n\n  vec4 x_ = floor(j * ns.z);\n  vec4 y_ = floor(j - 7.0 * x_ );    // mod(j,N)\n\n  vec4 x = x_ *ns.x + ns.yyyy;\n  vec4 y = y_ *ns.x + ns.yyyy;\n  vec4 h = 1.0 - abs(x) - abs(y);\n\n  vec4 b0 = vec4( x.xy, y.xy );\n  vec4 b1 = vec4( x.zw, y.zw );\n\n  //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n  //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n  vec4 s0 = floor(b0)*2.0 + 1.0;\n  vec4 s1 = floor(b1)*2.0 + 1.0;\n  vec4 sh = -step(h, vec4(0.0));\n\n  vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n  vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n  vec3 p0 = vec3(a0.xy,h.x);\n  vec3 p1 = vec3(a0.zw,h.y);\n  vec3 p2 = vec3(a1.xy,h.z);\n  vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n  vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n  p0 *= norm.x;\n  p1 *= norm.y;\n  p2 *= norm.z;\n  p3 *= norm.w;\n\n// Mix final noise value\n  vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n  m = m * m;\n  return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),\n                                dot(p2,x2), dot(p3,x3) ) );\n  }\n\nfloat random(vec2 c){\n  return fract(sin(dot(c.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nconst float rgbDiff = 0.01;\n\nvoid main() {\n  // Glitch Noise.\n  float bnStrength = sin(time) * 0.05;\n  float bnTime = floor(time * 18.0) * 200.0;\n  float noiseX = step(0.87 + bnStrength, (snoise(vec3(0.0, vUv.x * 1.8, bnTime)) + 1.0) / 2.0);\n  float noiseY = step(0.87 + bnStrength, (snoise(vec3(0.0, vUv.y * 4.2, bnTime)) + 1.0) / 2.0);\n  float bnMask = noiseX * noiseY;\n  float bnUvX = mod(vUv.x + sin(bnTime) + rgbDiff, 1.0);\n  vec4 bnDiff = (1.0 - texture2D(texPicture, vec2(bnUvX, vUv.y))) * bnMask;\n\n  // White Noise.\n  float whiteNoise = (random(vUv + mod(time, 10.0)) * 2.0 - 1.0) * 0.15;\n  vec4 wnColor = vec4(vec3(whiteNoise), 0.0);\n\n  // Color Noise for BUterfly.\n  float noise = snoise(vPosition / vec3(size * 0.25) + vec3(0.0, 0.0, time));\n  vec3 hsv = vec3(colorH + noise * 0.2, 0.4, 1.0);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  // Butterly Color.\n  vec4 texButterflyColor = texture2D(texButterfly, vUv);\n  vec4 color1 = vec4(rgb, 1.0) * texButterflyColor;\n\n  // Sphere color on transforming.\n  vec4 color2 = vec4(rgb, 1.0) * vec4((1.0 - texButterflyColor.rgb * 0.5), texButterflyColor.a) + wnColor;\n\n  // Picture Color.\n  vec2 pictUv = vUv * 1.1 - 0.05;\n  vec4 texPictureColor = texture2D(texPicture, pictUv);\n  float pictAlpha = step(0.0, pictUv.x) * (1.0 - step(1.0, pictUv.x)) * step(0.0, pictUv.y) * (1.0 - step(1.0, pictUv.y));\n  vec4 pictColor = texPictureColor * (1.0 - bnMask) * vec4(vec3(1.0), pictAlpha);\n  vec4 bnColor = vec4(bnDiff.rgb * 1.2, bnMask);\n  vec4 color3 = pictColor + bnColor + wnColor;\n\n  // total of colors.\n  vec4 color = (color1 * vStep1 + color2 * vStep2) + color3 * vStep3;\n\n  if (color.a < 0.5) discard;\n\n  gl_FragColor = color;\n}\n"},70124:function(e,t){"use strict";t.Z='#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\nattribute vec3 spherePosition;\nattribute vec3 squarePosition;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform float index;\nuniform float time;\nuniform float timeTransform;\nuniform float interval;\nuniform float size;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\nvarying float vOpacity;\nvarying float vStep1;\nvarying float vStep2;\nvarying float vStep3;\n\nfloat exponentialInOut(float t) {\n  return t == 0.0 || t == 1.0\n    ? t\n    : t < 0.5\n      ? +0.5 * pow(2.0, (20.0 * t) - 10.0)\n      : -0.5 * pow(2.0, 10.0 - (t * 20.0)) + 1.0;\n}\n\n//\n// GLSL textureless classic 3D noise "cnoise",\n// with an RSL-style periodic variant "pnoise".\n// Author:  Stefan Gustavson (stefan.gustavson@liu.se)\n// Version: 2011-10-11\n//\n// Many thanks to Ian McEwan of Ashima Arts for the\n// ideas for permutation and gradient selection.\n//\n// Copyright (c) 2011 Stefan Gustavson. All rights reserved.\n// Distributed under the MIT license. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x)\n{\n  return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec3 fade(vec3 t) {\n  return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n\n// Classic Perlin noise\nfloat cnoise(vec3 P)\n{\n  vec3 Pi0 = floor(P); // Integer part for indexing\n  vec3 Pi1 = Pi0 + vec3(1.0); // Integer part + 1\n  Pi0 = mod289(Pi0);\n  Pi1 = mod289(Pi1);\n  vec3 Pf0 = fract(P); // Fractional part for interpolation\n  vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n  vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n  vec4 iy = vec4(Pi0.yy, Pi1.yy);\n  vec4 iz0 = Pi0.zzzz;\n  vec4 iz1 = Pi1.zzzz;\n\n  vec4 ixy = permute(permute(ix) + iy);\n  vec4 ixy0 = permute(ixy + iz0);\n  vec4 ixy1 = permute(ixy + iz1);\n\n  vec4 gx0 = ixy0 * (1.0 / 7.0);\n  vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n  gx0 = fract(gx0);\n  vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n  vec4 sz0 = step(gz0, vec4(0.0));\n  gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n  gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n\n  vec4 gx1 = ixy1 * (1.0 / 7.0);\n  vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n  gx1 = fract(gx1);\n  vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n  vec4 sz1 = step(gz1, vec4(0.0));\n  gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n  gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n\n  vec3 g000 = vec3(gx0.x,gy0.x,gz0.x);\n  vec3 g100 = vec3(gx0.y,gy0.y,gz0.y);\n  vec3 g010 = vec3(gx0.z,gy0.z,gz0.z);\n  vec3 g110 = vec3(gx0.w,gy0.w,gz0.w);\n  vec3 g001 = vec3(gx1.x,gy1.x,gz1.x);\n  vec3 g101 = vec3(gx1.y,gy1.y,gz1.y);\n  vec3 g011 = vec3(gx1.z,gy1.z,gz1.z);\n  vec3 g111 = vec3(gx1.w,gy1.w,gz1.w);\n\n  vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n  g000 *= norm0.x;\n  g010 *= norm0.y;\n  g100 *= norm0.z;\n  g110 *= norm0.w;\n  vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n  g001 *= norm1.x;\n  g011 *= norm1.y;\n  g101 *= norm1.z;\n  g111 *= norm1.w;\n\n  float n000 = dot(g000, Pf0);\n  float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n  float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n  float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n  float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n  float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n  float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n  float n111 = dot(g111, Pf1);\n\n  vec3 fade_xyz = fade(Pf0);\n  vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n  vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n  float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n  return 2.2 * n_xyz;\n}\n\nmat4 calcRotateMat4X(float radian) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, cos(radian), -sin(radian), 0.0,\n    0.0, sin(radian), cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Y(float radian) {\n  return mat4(\n    cos(radian), 0.0, sin(radian), 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    -sin(radian), 0.0, cos(radian), 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4Z(float radian) {\n  return mat4(\n    cos(radian), -sin(radian), 0.0, 0.0,\n    sin(radian), cos(radian), 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    0.0, 0.0, 0.0, 1.0\n  );\n}\n\nmat4 calcRotateMat4(vec3 radian) {\n  return calcRotateMat4X(radian.x) * calcRotateMat4Y(radian.y) * calcRotateMat4Z(radian.z);\n}\n\nvoid main() {\n  // Calcurate time of tranforming\n  float t = timeTransform / interval;\n  float transformTime1 = max((1.0 - t) * 2.0 - 1.0, 0.0);\n  float transformTime2 = min((t) * 2.0, 1.0) * min((1.0 - t) * 2.0, 1.0);\n  float transformTime3 = max((t) * 2.0 - 1.0, 0.0);\n\n  // Position of Butterfly\n  float flapTime = radians(sin(time * 4.0 - length(position.xy) / size * 2.0 + index * 2.0) * 45.0 + 30.0);\n  vec3 flapPosition = vec3(\n    cos(flapTime) * position.x,\n    position.y + sin(time) * 10.0,\n    sin(flapTime) * abs(position.x) + sin(time) * 10.0\n  );\n  mat4 flapRotateMat = calcRotateMat4(vec3(radians(45.0), 0.0, 0.0));\n  vec3 position1 = (flapRotateMat * vec4(flapPosition, 1.0)).xyz;\n\n  // Position of Sphere on transforming\n  float sphereNoise = cnoise(spherePosition * 0.02 + time * 2.4);\n  vec3 sphereNoisePosition = normalize(spherePosition) * sphereNoise * 30.0;\n  mat4 sphereRotateMat = calcRotateMat4(vec3(t * 4.0, 0.0, 0.0));\n  vec3 position2 = (sphereRotateMat * vec4(spherePosition + sphereNoisePosition, 1.0)).xyz;\n\n  // Position of Picture\n  mat4 pictureRotateMat = calcRotateMat4(vec3(0.0, radians(45.0), 0.0));\n  vec3 position3 = (pictureRotateMat * vec4(squarePosition, 1.0)).xyz;;\n\n  // Total of All Position\n  vec3 updatePosition = position1 * exponentialInOut(transformTime1) + position2 * exponentialInOut(transformTime2) + position3 * exponentialInOut(transformTime3);\n\n  // varying\n  vPosition = updatePosition;\n  vUv = uv;\n  vStep1 = clamp((1.0 - t) * 6.0 - 2.0, 0.0, 1.0);\n  vStep2 = clamp((t) * 6.0 - 1.0, 0.0, 1.0) * clamp((1.0 - t) * 6.0 - 1.0, 0.0, 1.0);\n  vStep3 = clamp((t) * 6.0 - 3.0, 0.0, 1.0);\n\n  gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(updatePosition, 1.0);\n}\n'},41639:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 cameraPosition;\nuniform sampler2D texture;\n\nvarying vec3 vPosition;\nvarying vec4 vUv;\n\nconst float mirrorOpacity = 0.2;\n\nvoid main() {\n  float opacity = 1.0 - length(vPosition - cameraPosition) / 700.0;\n\n  vec4 mirrorColor = vec4(vec3(0.9), 1.0) * (1.0 - mirrorOpacity);\n\n  vec4 projectorColor = texture2DProj(texture, vUv) * mirrorOpacity;\n\n  gl_FragColor = (mirrorColor + projectorColor) * vec4(vec3(1.0), opacity);\n}\n"},47741:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform mat4 textureMatrix;\n\nvarying vec3 vPosition;\nvarying vec4 vUv;\n\nvoid main(void) {\n  vec4 worldPosition = modelMatrix * vec4(position, 1.0);\n\n  vPosition = worldPosition.xyz;\n  vUv = textureMatrix * worldPosition;\n\n  gl_Position = projectionMatrix * viewMatrix * worldPosition;\n}\n"},27558:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\nvoid main() {\n  // to round.\n  vec3 n;\n  n.xy = gl_PointCoord * 2.0 - 1.0;\n  n.z = 1.0 - dot(n.xy, n.xy);\n  if (n.z < 0.0) discard;\n\n  gl_FragColor = vec4(vColor, vOpacity * 0.5);\n}\n"},8467:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute float colorH;\nattribute float i;\nattribute float opacity;\nattribute float valid;\n\nuniform vec3 cameraPosition;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform float size;\nuniform float interval;\nuniform float time;\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex\n//               noise functions.\n//      Author : Ian McEwan, Ashima Arts.\n//  Maintainer : ijm\n//     Lastmod : 20110822 (ijm)\n//     License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n//               Distributed under the MIT License. See LICENSE file.\n//               https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x) {\n     return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nfloat snoise(vec3 v)\n  {\n  const vec2  C = vec2(1.0/6.0, 1.0/3.0) ;\n  const vec4  D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n  vec3 i  = floor(v + dot(v, C.yyy) );\n  vec3 x0 =   v - i + dot(i, C.xxx) ;\n\n// Other corners\n  vec3 g = step(x0.yzx, x0.xyz);\n  vec3 l = 1.0 - g;\n  vec3 i1 = min( g.xyz, l.zxy );\n  vec3 i2 = max( g.xyz, l.zxy );\n\n  //   x0 = x0 - 0.0 + 0.0 * C.xxx;\n  //   x1 = x0 - i1  + 1.0 * C.xxx;\n  //   x2 = x0 - i2  + 2.0 * C.xxx;\n  //   x3 = x0 - 1.0 + 3.0 * C.xxx;\n  vec3 x1 = x0 - i1 + C.xxx;\n  vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n  vec3 x3 = x0 - D.yyy;      // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n  i = mod289(i);\n  vec4 p = permute( permute( permute(\n             i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n           + i.y + vec4(0.0, i1.y, i2.y, 1.0 ))\n           + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n  float n_ = 0.142857142857; // 1.0/7.0\n  vec3  ns = n_ * D.wyz - D.xzx;\n\n  vec4 j = p - 49.0 * floor(p * ns.z * ns.z);  //  mod(p,7*7)\n\n  vec4 x_ = floor(j * ns.z);\n  vec4 y_ = floor(j - 7.0 * x_ );    // mod(j,N)\n\n  vec4 x = x_ *ns.x + ns.yyyy;\n  vec4 y = y_ *ns.x + ns.yyyy;\n  vec4 h = 1.0 - abs(x) - abs(y);\n\n  vec4 b0 = vec4( x.xy, y.xy );\n  vec4 b1 = vec4( x.zw, y.zw );\n\n  //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n  //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n  vec4 s0 = floor(b0)*2.0 + 1.0;\n  vec4 s1 = floor(b1)*2.0 + 1.0;\n  vec4 sh = -step(h, vec4(0.0));\n\n  vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n  vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n  vec3 p0 = vec3(a0.xy,h.x);\n  vec3 p1 = vec3(a0.zw,h.y);\n  vec3 p2 = vec3(a1.xy,h.z);\n  vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n  vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n  p0 *= norm.x;\n  p1 *= norm.y;\n  p2 *= norm.z;\n  p3 *= norm.w;\n\n// Mix final noise value\n  vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n  m = m * m;\n  return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),\n                                dot(p2,x2), dot(p3,x3) ) );\n  }\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  float thisTime = mod(time + i / size * interval, interval);\n\n  vec3 updatePosition = position + vec3(\n    cos(thisTime * 3.0 + i) * 3.0,\n    thisTime * -20.0,\n    sin(thisTime * 3.0 + i) * 3.0\n  );\n  vec4 mvPosition = viewMatrix * modelMatrix * vec4(updatePosition, 1.0);\n\n  vec3 hsv = vec3(colorH + sin(i) * 0.075, 0.8, 1.0);\n\n  vColor = convertHsvToRgb(hsv);\n  vOpacity = (\n    smoothstep(interval * 0.0, interval * 0.1, thisTime)\n    * (1.0 - smoothstep(interval * 0.2, interval * 0.9, thisTime))\n  ) * opacity;\n\n  gl_PointSize = 5000.0 / length(mvPosition.xyz);\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},86169:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vUv = uv;\n  gl_Position = vec4(position, 1.0);\n}\n"},45014:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float brightMin;\nuniform sampler2D texture1;\nuniform sampler2D texture2;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vec4 color1 = texture2D(texture1, vUv);\n  vec4 color2 = texture2D(texture2, vUv);\n  gl_FragColor = color1 * brightMin + color2;\n}\n"},60479:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform vec2 resolution;\nuniform vec2 direction;\nuniform float radius;\nuniform sampler2D texture;\n\nvarying vec2 vUv;\n\nvec4 gaussianBlur(sampler2D texture, vec2 uv, float radius, vec2 resolution, vec2 direction) {\n  vec4 color = vec4(0.0);\n  vec2 step = radius / resolution * direction;\n  color += texture2D(texture, uv - 4.0 * step) * 0.02699548325659403;\n  color += texture2D(texture, uv - 3.0 * step) * 0.06475879783294587;\n  color += texture2D(texture, uv - 2.0 * step) * 0.12098536225957168;\n  color += texture2D(texture, uv - 1.0 * step) * 0.17603266338214976;\n  color += texture2D(texture, uv) * 0.19947114020071635;\n  color += texture2D(texture, uv + 1.0 * step) * 0.17603266338214976;\n  color += texture2D(texture, uv + 2.0 * step) * 0.12098536225957168;\n  color += texture2D(texture, uv + 3.0 * step) * 0.06475879783294587;\n  color += texture2D(texture, uv + 4.0 * step) * 0.02699548325659403;\n  return color;\n}\n\nvoid main() {\n  vec4 color = gaussianBlur(texture, vUv, radius, resolution, direction);\n  gl_FragColor = color;\n}\n"},46045:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nuniform float brightMin;\nuniform sampler2D texture;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vec4 bright = max(vec4(0.0), (texture2D(texture, vUv) - brightMin));\n  gl_FragColor = bright;\n}\n"},77855:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vColor;\n\nvoid main() {\n  gl_FragColor = vec4(vColor, 1.0);\n}\n"},33491:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\nuniform float force;\n\nvarying vec3 vColor;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main(void) {\n  // calculate gradation\n  vec3 hsv = vec3(0.1 + sin(radians(uv.y * 180.0 * 4.0)) * 0.12 - time * 0.1, 0.12 + force * 0.03, 0.96 - force * 0.03);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  // coordinate transformation\n  vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n\n  vColor = rgb;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},90984:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vColor;\n\nvoid main() {\n  // convert PointCoord to range from -1.0 to 1.0\n  vec2 p = gl_PointCoord * 2.0 - 1.0;\n\n  float r = 1.0 - smoothstep(0.5, 1.0, length(p));\n\n  gl_FragColor = vec4(vColor, r);\n}\n"},6214:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\n\nvarying vec3 vColor;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nconst float duration = 3.0;\n\nvoid main() {\n  // calculate colors\n  vec3 hsv = vec3(0.45 + time * 0.1, 0.6, 1.0);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  // coordinate transformation\n  vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n\n  vColor = rgb;\n\n  gl_Position = projectionMatrix * mvPosition;\n  gl_PointSize = 7.0;\n}\n"},86607:function(e,t){"use strict";t.Z='precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform sampler2D texVideo;\nuniform float facing;\nuniform vec2 resolution;\nuniform float force;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\n//\n// GLSL textureless classic 3D noise "cnoise",\n// with an RSL-style periodic variant "pnoise".\n// Author:  Stefan Gustavson (stefan.gustavson@liu.se)\n// Version: 2011-10-11\n//\n// Many thanks to Ian McEwan of Ashima Arts for the\n// ideas for permutation and gradient selection.\n//\n// Copyright (c) 2011 Stefan Gustavson. All rights reserved.\n// Distributed under the MIT license. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n//\n\nvec3 mod289(vec3 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x)\n{\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x)\n{\n  return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec3 fade(vec3 t) {\n  return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n\n// Classic Perlin noise\nfloat cnoise(vec3 P)\n{\n  vec3 Pi0 = floor(P); // Integer part for indexing\n  vec3 Pi1 = Pi0 + vec3(1.0); // Integer part + 1\n  Pi0 = mod289(Pi0);\n  Pi1 = mod289(Pi1);\n  vec3 Pf0 = fract(P); // Fractional part for interpolation\n  vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n  vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n  vec4 iy = vec4(Pi0.yy, Pi1.yy);\n  vec4 iz0 = Pi0.zzzz;\n  vec4 iz1 = Pi1.zzzz;\n\n  vec4 ixy = permute(permute(ix) + iy);\n  vec4 ixy0 = permute(ixy + iz0);\n  vec4 ixy1 = permute(ixy + iz1);\n\n  vec4 gx0 = ixy0 * (1.0 / 7.0);\n  vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n  gx0 = fract(gx0);\n  vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n  vec4 sz0 = step(gz0, vec4(0.0));\n  gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n  gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n\n  vec4 gx1 = ixy1 * (1.0 / 7.0);\n  vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n  gx1 = fract(gx1);\n  vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n  vec4 sz1 = step(gz1, vec4(0.0));\n  gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n  gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n\n  vec3 g000 = vec3(gx0.x,gy0.x,gz0.x);\n  vec3 g100 = vec3(gx0.y,gy0.y,gz0.y);\n  vec3 g010 = vec3(gx0.z,gy0.z,gz0.z);\n  vec3 g110 = vec3(gx0.w,gy0.w,gz0.w);\n  vec3 g001 = vec3(gx1.x,gy1.x,gz1.x);\n  vec3 g101 = vec3(gx1.y,gy1.y,gz1.y);\n  vec3 g011 = vec3(gx1.z,gy1.z,gz1.z);\n  vec3 g111 = vec3(gx1.w,gy1.w,gz1.w);\n\n  vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n  g000 *= norm0.x;\n  g010 *= norm0.y;\n  g100 *= norm0.z;\n  g110 *= norm0.w;\n  vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n  g001 *= norm1.x;\n  g011 *= norm1.y;\n  g101 *= norm1.z;\n  g111 *= norm1.w;\n\n  float n000 = dot(g000, Pf0);\n  float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n  float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n  float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n  float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n  float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n  float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n  float n111 = dot(g111, Pf1);\n\n  vec3 fade_xyz = fade(Pf0);\n  vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n  vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n  float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n  return 2.2 * n_xyz;\n}\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec2 p = (vUv * 2.0 - 1.0);\n  float grad = 1.0 - smoothstep(0.5, 1.0, length(p));\n  float noise1 = cnoise(vec3(p * (1.4 + force * 0.5), time * 0.4)) * (0.15 + smoothstep(0.5, 0.75, length(p)) * (1.0 - smoothstep(0.75, 1.0, length(p))));\n  float noise2 = cnoise(vec3(p * (5.4 + force * 0.3), time * 0.4)) * (0.15 + smoothstep(0.3, 0.4, length(p)) * (1.0 - smoothstep(0.9, 1.0, length(p))));\n  float noiseSum = (noise1 + noise2) / 2.0;\n\n  vec2 adjustUv = vec2(\n    min(resolution.y / resolution.x, 1.0) * (1.0 + force * 0.03),\n    min(resolution.x / resolution.y, 1.0) * (1.0 + force * 0.03)\n    );\n  vec2 updateUv = vec2(\n    abs(vUv.x - facing) * adjustUv.x + (1.0 - adjustUv.x) * 0.5,\n                  vUv.y * adjustUv.y + (1.0 - adjustUv.y) * 0.5\n                  );\n  vec4 texColor1 = texture2D(texVideo, updateUv - vec2(noise1 * noise2 - abs(p.x) / 50.0));\n  vec4 texColor2 = texture2D(texVideo, updateUv - vec2(noise1 * noise2));\n  vec4 texColor3 = texture2D(texVideo, updateUv - vec2(noise1 * noise2 + abs(p.x) / 50.0));\n  vec3 texColorSum = vec3(texColor1.r, texColor2.g, texColor3.b);\n\n  vec3 addColor = convertHsvToRgb(vec3((grad + noiseSum + updateUv.x * 0.5) / 2.0 + time * 0.1, 0.8, 0.6));\n\n  float mask1 = smoothstep(0.19, 0.2, grad + noiseSum);\n  vec4 color1 = vec4(texColorSum * vec3(1.2) + addColor * 0.24, 1.0) * mask1;\n\n  float mask2 = smoothstep(0.15, 0.16, grad + noiseSum) * (1.0 - smoothstep(0.7, 0.71, grad + noiseSum));\n  vec4 color2 = vec4(texColorSum * 0.1 + addColor * 0.7, 1.0) * mask2;\n\n  gl_FragColor = color1 + color2;\n}\n'},3943:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\n\nvarying vec3 vPosition;\nvarying vec2 vUv;\n\nvoid main(void) {\n  // coordinate transformation\n  vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n\n  vPosition = position;\n  vUv = uv;\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},99907:function(e,t){"use strict";t.Z="precision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\nvoid main() {\n  // convert PointCoord to range from -1.0 to 1.0\n  vec2 p = gl_PointCoord * 2.0 - 1.0;\n\n  // draw double circle\n  float radius = length(p);\n  float opacity = (1.0 - smoothstep(0.9, 1.0, radius)) * vOpacity;\n\n  gl_FragColor = vec4(vColor, opacity);\n}\n"},60121:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute float delay;\n\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\nuniform float time;\nuniform float force;\n\nvarying vec3 vColor;\nvarying float vOpacity;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nconst float duration = 8.0;\n\nvoid main() {\n  // Loop animation\n  float interval = mod(time + delay, duration) / duration;\n  vec3 move = vec3(0.0, 0.0, (interval * 2.0 - 1.0) * 100.0);\n\n  // calculate gradation with position.y\n  vec3 hsv = vec3(0.3 + time * 0.1, 0.65 - force * 0.01, 0.85 + force * 0.01);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  // coordinate transformation\n  vec4 mvPosition = modelViewMatrix * vec4(position + move, 1.0);\n  float distanceFromCamera = 1000.0 / length(mvPosition.xyz);\n\n  vColor = rgb;\n  vOpacity = smoothstep(-100.0, 100.0, move.z);\n\n  gl_Position = projectionMatrix * mvPosition;\n  gl_PointSize = distanceFromCamera;\n}\n"},19326:function(e,t){"use strict";t.Z="#extension GL_OES_standard_derivatives : enable\nprecision highp float;\n#define GLSLIFY 1\n\nvarying vec3 vPosition;\nvarying vec3 vColor;\nvarying float vOpacity;\n\nvoid main() {\n  // Flat Shading\n  vec3 light = normalize(vec3(0.0, 1.0, 0.5));\n  vec3 normal = normalize(cross(dFdx(vPosition), dFdy(vPosition)));\n  float diff = (dot(normal, light) + 1.0) / 2.0;\n\n  vec3 color = vColor + diff * 0.1;\n\n  gl_FragColor = vec4(color, vOpacity);\n}\n"},15337:function(e,t){"use strict";t.Z="#define GLSLIFY 1\nattribute vec3 position;\nattribute vec2 uv;\nattribute vec3 iPosition;\nattribute float iDelay;\n\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 modelMatrix;\nuniform float time;\nuniform float force;\n\nvarying vec3 vPosition;\nvarying vec3 vColor;\nvarying float vOpacity;\n\nmat4 calcTranslateMat4(vec3 v) {\n  return mat4(\n    1.0, 0.0, 0.0, 0.0,\n    0.0, 1.0, 0.0, 0.0,\n    0.0, 0.0, 1.0, 0.0,\n    v.x, v.y, v.z, 1.0\n  );\n}\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nconst float duration = 8.0;\n\nvoid main(void) {\n  // Loop animation\n  float interval = mod(time + iDelay, duration) / duration;\n  vec3 move = vec3(0.0, 0.0, (interval * 2.0 - 1.0) * 100.0);\n\n  // calculate gradation with position.y\n  vec3 hsv = vec3(0.3 + time * 0.1, 0.3 - force * 0.01, 0.85 + force * 0.01);\n  vec3 rgb = convertHsvToRgb(hsv);\n\n  // coordinate transformation\n  mat4 translateMat = calcTranslateMat4(iPosition);\n  vec4 mPosition = modelMatrix * translateMat * vec4(position + move, 1.0);\n  vec4 mvPosition = viewMatrix * mPosition;\n\n  vPosition = mPosition.xyz;\n  vColor = rgb;\n  vOpacity = smoothstep(-100.0, 0.0, move.z);\n\n  gl_Position = projectionMatrix * mvPosition;\n}\n"},17393:function(e){e.exports={degrees:function(e){return e/Math.PI*180},radians:function(e){return e*Math.PI/180},clamp:function(e,t,n){return Math.min(Math.max(e,t),n)},mix:function(e,t,n){return e*(1-n)+t*n},step:function(e,t){return t>=e?1:0},smoothstep:function(e,t,n){if(!(e>=t)){var r=Math.min(Math.max((n-e)/(t-e),0),1);return r*r*(3-2*r)}},spherical:function(e,t,n){return[Math.cos(e)*Math.cos(t)*n,Math.sin(e)*n,Math.cos(e)*Math.sin(t)*n]},randomArbitrary:function(e,t){return Math.random()*(t-e)+e},randomInt:function(e,t){return Math.floor(Math.random()*(t-e+1))+e}}},38314:function(e){e.exports=function(e,t){var n;return function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)}}},71243:function(e){e.exports=function(){return navigator.userAgent.indexOf("Android")>=0}},5833:function(e){e.exports=function(){var e=navigator.userAgent;return e.indexOf("MSIE")>-1||e.indexOf("rv:11.0")>-1}},4679:function(e){e.exports=function(){var e=navigator.userAgent;return e.indexOf("iPhone")>=0||e.indexOf("iPod")>=0||e.indexOf("iPad")>=0}},29130:function(e){e.exports=function(e){return new Promise((function(t){setTimeout(t,e)}))}},35666:function(e){var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof m?t:m,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(e,t,n){var r=f;return function(i,o){if(r===v)throw new Error("Generator is already running");if(r===d){if("throw"===i)throw o;return L()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=P(a,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=v;var c=l(e,t,n);if("normal"===c.type){if(r=n.done?d:h,c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=d,n.method="throw",n.arg=c.arg)}}}(e,n,a),o}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f="suspendedStart",h="suspendedYield",v="executing",d="completed",p={};function m(){}function y(){}function g(){}var x={};x[o]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(z([])));w&&w!==n&&r.call(w,o)&&(x=w);var M=g.prototype=m.prototype=Object.create(x);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(i,o,a,s){var c=l(e[i],e,o);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(f).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var i;this._invoke=function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}}function P(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,P(e,n),"throw"===n.method))return p;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var i=l(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,p;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,p):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function z(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:L}}function L(){return{value:t,done:!0}}return y.prototype=M.constructor=g,g.constructor=y,y.displayName=c(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,s,"GeneratorFunction")),e.prototype=Object.create(M),e},e.awrap=function(e){return{__await:e}},_(S.prototype),S.prototype[a]=function(){return this},e.AsyncIterator=S,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new S(u(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(M),c(M,s,"Generator"),M[o]=function(){return this},M.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=z,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(R),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;R(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:z(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),p}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},2212:function(e,t,n){"use strict";n.r(t),n.d(t,{ACESFilmicToneMapping:function(){return ne},AddEquation:function(){return P},AddOperation:function(){return Q},AdditiveAnimationBlendMode:function(){return Zt},AdditiveBlending:function(){return w},AlphaFormat:function(){return ke},AlwaysDepth:function(){return N},AlwaysStencilFunc:function(){return Sn},AmbientLight:function(){return Af},AmbientLightProbe:function(){return eh},AnimationClip:function(){return Al},AnimationLoader:function(){return Bl},AnimationMixer:function(){return Ch},AnimationObjectGroup:function(){return zh},AnimationUtils:function(){return xl},ArcCurve:function(){return Yl},ArrayCamera:function(){return qs},ArrowHelper:function(){return wv},Audio:function(){return fh},AudioAnalyser:function(){return yh},AudioContext:function(){return Qf},AudioListener:function(){return lh},AudioLoader:function(){return Jf},AxesHelper:function(){return Mv},AxisHelper:function(){return xd},BackSide:function(){return p},BasicDepthPacking:function(){return on},BasicShadowMap:function(){return l},BinaryTextureLoader:function(){return Sd},Bone:function(){return Ac},BooleanKeyframeTrack:function(){return Pl},BoundingBoxHelper:function(){return bd},Box2:function(){return Gh},Box3:function(){return ur},Box3Helper:function(){return mv},BoxBufferGeometry:function(){return So},BoxGeometry:function(){return So},BoxHelper:function(){return pv},BufferAttribute:function(){return ki},BufferGeometry:function(){return ro},BufferGeometryLoader:function(){return Bf},ByteType:function(){return Pe},Cache:function(){return Dl},Camera:function(){return zo},CameraHelper:function(){return hv},CanvasRenderer:function(){return Td},CanvasTexture:function(){return su},CatmullRomCurve3:function(){return ef},CineonToneMapping:function(){return te},CircleBufferGeometry:function(){return uu},CircleGeometry:function(){return uu},ClampToEdgeWrapping:function(){return he},Clock:function(){return ih},Color:function(){return Ai},ColorKeyframeTrack:function(){return Tl},CompressedTexture:function(){return au},CompressedTextureLoader:function(){return Gl},ConeBufferGeometry:function(){return fu},ConeGeometry:function(){return fu},CubeCamera:function(){return Ao},CubeReflectionMapping:function(){return oe},CubeRefractionMapping:function(){return ae},CubeTexture:function(){return Oo},CubeTextureLoader:function(){return Hl},CubeUVReflectionMapping:function(){return ue},CubeUVRefractionMapping:function(){return le},CubicBezierCurve:function(){return of},CubicBezierCurve3:function(){return af},CubicInterpolant:function(){return wl},CullFaceBack:function(){return s},CullFaceFront:function(){return c},CullFaceFrontBack:function(){return u},CullFaceNone:function(){return a},Curve:function(){return Zl},CurvePath:function(){return vf},CustomBlending:function(){return S},CustomToneMapping:function(){return re},CylinderBufferGeometry:function(){return lu},CylinderGeometry:function(){return lu},Cylindrical:function(){return Uh},DataTexture:function(){return Io},DataTexture2DArray:function(){return oa},DataTexture3D:function(){return aa},DataTextureLoader:function(){return Vl},DataUtils:function(){return Pv},DecrementStencilOp:function(){return vn},DecrementWrapStencilOp:function(){return pn},DefaultLoadingManager:function(){return kl},DepthFormat:function(){return Ne},DepthStencilFormat:function(){return He},DepthTexture:function(){return cu},DirectionalLight:function(){return Cf},DirectionalLightHelper:function(){return uv},DiscreteInterpolant:function(){return _l},DodecahedronBufferGeometry:function(){return vu},DodecahedronGeometry:function(){return vu},DoubleSide:function(){return m},DstAlphaFactor:function(){return k},DstColorFactor:function(){return j},DynamicBufferAttribute:function(){return ud},DynamicCopyUsage:function(){return An},DynamicDrawUsage:function(){return Tn},DynamicReadUsage:function(){return zn},EdgesGeometry:function(){return gu},EdgesHelper:function(){return wd},EllipseCurve:function(){return ql},EqualDepth:function(){return W},EqualStencilFunc:function(){return xn},EquirectangularReflectionMapping:function(){return se},EquirectangularRefractionMapping:function(){return ce},Euler:function(){return qr},EventDispatcher:function(){return kn},ExtrudeBufferGeometry:function(){return Zu},ExtrudeGeometry:function(){return Zu},FaceColors:function(){return Jv},FileLoader:function(){return Ul},FlatShading:function(){return y},Float16BufferAttribute:function(){return Vi},Float32Attribute:function(){return yd},Float32BufferAttribute:function(){return Wi},Float64Attribute:function(){return gd},Float64BufferAttribute:function(){return Zi},FloatType:function(){return Le},Fog:function(){return nc},FogExp2:function(){return tc},Font:function(){return qf},FontLoader:function(){return Xf},FrontSide:function(){return d},Frustum:function(){return jo},GLBufferAttribute:function(){return Dh},GLSL1:function(){return Dn},GLSL3:function(){return In},GammaEncoding:function(){return Jt},GreaterDepth:function(){return q},GreaterEqualDepth:function(){return Z},GreaterEqualStencilFunc:function(){return _n},GreaterStencilFunc:function(){return wn},GridHelper:function(){return iv},Group:function(){return Ys},HalfFloatType:function(){return Ce},HemisphereLight:function(){return yf},HemisphereLightHelper:function(){return rv},HemisphereLightProbe:function(){return $f},IcosahedronBufferGeometry:function(){return Yu},IcosahedronGeometry:function(){return Yu},ImageBitmapLoader:function(){return Wf},ImageLoader:function(){return Nl},ImageUtils:function(){return Jn},ImmediateRenderObject:function(){return Wh},IncrementStencilOp:function(){return hn},IncrementWrapStencilOp:function(){return dn},InstancedBufferAttribute:function(){return Uf},InstancedBufferGeometry:function(){return jf},InstancedInterleavedBuffer:function(){return Oh},InstancedMesh:function(){return Bc},Int16Attribute:function(){return vd},Int16BufferAttribute:function(){return Bi},Int32Attribute:function(){return pd},Int32BufferAttribute:function(){return Ni},Int8Attribute:function(){return ld},Int8BufferAttribute:function(){return Fi},IntType:function(){return Ee},InterleavedBuffer:function(){return ic},InterleavedBufferAttribute:function(){return ac},Interpolant:function(){return bl},InterpolateDiscrete:function(){return Ut},InterpolateLinear:function(){return Bt},InterpolateSmooth:function(){return Gt},InvertStencilOp:function(){return mn},JSONLoader:function(){return Rd},KeepStencilOp:function(){return ln},KeyframeTrack:function(){return Sl},LOD:function(){return Pc},LatheBufferGeometry:function(){return Xu},LatheGeometry:function(){return Xu},Layers:function(){return Yr},LensFlare:function(){return zd},LessDepth:function(){return H},LessEqualDepth:function(){return V},LessEqualStencilFunc:function(){return bn},LessStencilFunc:function(){return gn},Light:function(){return mf},LightProbe:function(){return If},Line:function(){return qc},Line3:function(){return Vh},LineBasicMaterial:function(){return Gc},LineCurve:function(){return sf},LineCurve3:function(){return cf},LineDashedMaterial:function(){return yl},LineLoop:function(){return Qc},LinePieces:function(){return Kv},LineSegments:function(){return Kc},LineStrip:function(){return Xv},LinearEncoding:function(){return Kt},LinearFilter:function(){return xe},LinearInterpolant:function(){return Ml},LinearMipMapLinearFilter:function(){return _e},LinearMipMapNearestFilter:function(){return we},LinearMipmapLinearFilter:function(){return Me},LinearMipmapNearestFilter:function(){return be},LinearToneMapping:function(){return $},Loader:function(){return Fl},LoaderUtils:function(){return Ff},LoadingManager:function(){return Il},LogLuvEncoding:function(){return en},LoopOnce:function(){return kt},LoopPingPong:function(){return jt},LoopRepeat:function(){return Ft},LuminanceAlphaFormat:function(){return Be},LuminanceFormat:function(){return Ue},MOUSE:function(){return i},Material:function(){return Pi},MaterialLoader:function(){return kf},Math:function(){return Yn},MathUtils:function(){return Yn},Matrix3:function(){return Kn},Matrix4:function(){return Fr},MaxEquation:function(){return z},Mesh:function(){return Mo},MeshBasicMaterial:function(){return Oi},MeshDepthMaterial:function(){return Gs},MeshDistanceMaterial:function(){return Ns},MeshFaceMaterial:function(){return ed},MeshLambertMaterial:function(){return pl},MeshMatcapMaterial:function(){return ml},MeshNormalMaterial:function(){return dl},MeshPhongMaterial:function(){return hl},MeshPhysicalMaterial:function(){return fl},MeshStandardMaterial:function(){return ll},MeshToonMaterial:function(){return vl},MinEquation:function(){return E},MirroredRepeatWrapping:function(){return ve},MixOperation:function(){return K},MultiMaterial:function(){return td},MultiplyBlending:function(){return _},MultiplyOperation:function(){return X},NearestFilter:function(){return de},NearestMipMapLinearFilter:function(){return ge},NearestMipMapNearestFilter:function(){return me},NearestMipmapLinearFilter:function(){return ye},NearestMipmapNearestFilter:function(){return pe},NeverDepth:function(){return G},NeverStencilFunc:function(){return yn},NoBlending:function(){return x},NoColors:function(){return Qv},NoToneMapping:function(){return J},NormalAnimationBlendMode:function(){return Wt},NormalBlending:function(){return b},NotEqualDepth:function(){return Y},NotEqualStencilFunc:function(){return Mn},NumberKeyframeTrack:function(){return Rl},Object3D:function(){return ci},ObjectLoader:function(){return Gf},ObjectSpaceNormalMap:function(){return cn},OctahedronBufferGeometry:function(){return Ku},OctahedronGeometry:function(){return Ku},OneFactor:function(){return C},OneMinusDstAlphaFactor:function(){return F},OneMinusDstColorFactor:function(){return U},OneMinusSrcAlphaFactor:function(){return I},OneMinusSrcColorFactor:function(){return O},OrthographicCamera:function(){return zf},PCFShadowMap:function(){return f},PCFSoftShadowMap:function(){return h},PMREMGenerator:function(){return Nv},ParametricBufferGeometry:function(){return Qu},ParametricGeometry:function(){return Qu},Particle:function(){return rd},ParticleBasicMaterial:function(){return ad},ParticleSystem:function(){return id},ParticleSystemMaterial:function(){return sd},Path:function(){return df},PerspectiveCamera:function(){return Lo},Plane:function(){return hi},PlaneBufferGeometry:function(){return Go},PlaneGeometry:function(){return Go},PlaneHelper:function(){return yv},PointCloud:function(){return nd},PointCloudMaterial:function(){return od},PointLight:function(){return Ef},PointLightHelper:function(){return $h},Points:function(){return ru},PointsMaterial:function(){return Jc},PolarGridHelper:function(){return ov},PolyhedronBufferGeometry:function(){return hu},PolyhedronGeometry:function(){return hu},PositionalAudio:function(){return mh},PropertyBinding:function(){return Eh},PropertyMixer:function(){return gh},QuadraticBezierCurve:function(){return uf},QuadraticBezierCurve3:function(){return lf},Quaternion:function(){return or},QuaternionKeyframeTrack:function(){return zl},QuaternionLinearInterpolant:function(){return El},REVISION:function(){return r},RGBADepthPacking:function(){return an},RGBAFormat:function(){return je},RGBAIntegerFormat:function(){return Xe},RGBA_ASTC_10x10_Format:function(){return gt},RGBA_ASTC_10x5_Format:function(){return pt},RGBA_ASTC_10x6_Format:function(){return mt},RGBA_ASTC_10x8_Format:function(){return yt},RGBA_ASTC_12x10_Format:function(){return xt},RGBA_ASTC_12x12_Format:function(){return bt},RGBA_ASTC_4x4_Format:function(){return st},RGBA_ASTC_5x4_Format:function(){return ct},RGBA_ASTC_5x5_Format:function(){return ut},RGBA_ASTC_6x5_Format:function(){return lt},RGBA_ASTC_6x6_Format:function(){return ft},RGBA_ASTC_8x5_Format:function(){return ht},RGBA_ASTC_8x6_Format:function(){return vt},RGBA_ASTC_8x8_Format:function(){return dt},RGBA_BPTC_Format:function(){return wt},RGBA_ETC2_EAC_Format:function(){return at},RGBA_PVRTC_2BPPV1_Format:function(){return rt},RGBA_PVRTC_4BPPV1_Format:function(){return nt},RGBA_S3TC_DXT1_Format:function(){return Qe},RGBA_S3TC_DXT3_Format:function(){return Je},RGBA_S3TC_DXT5_Format:function(){return $e},RGBDEncoding:function(){return rn},RGBEEncoding:function(){return $t},RGBEFormat:function(){return Ge},RGBFormat:function(){return Fe},RGBIntegerFormat:function(){return Ye},RGBM16Encoding:function(){return nn},RGBM7Encoding:function(){return tn},RGB_ETC1_Format:function(){return it},RGB_ETC2_Format:function(){return ot},RGB_PVRTC_2BPPV1_Format:function(){return tt},RGB_PVRTC_4BPPV1_Format:function(){return et},RGB_S3TC_DXT1_Format:function(){return Ke},RGFormat:function(){return Ze},RGIntegerFormat:function(){return qe},RawShaderMaterial:function(){return ul},Ray:function(){return kr},Raycaster:function(){return Ih},RectAreaLight:function(){return Of},RedFormat:function(){return Ve},RedIntegerFormat:function(){return We},ReinhardToneMapping:function(){return ee},RepeatWrapping:function(){return fe},ReplaceStencilOp:function(){return fn},ReverseSubtractEquation:function(){return R},RingBufferGeometry:function(){return Ju},RingGeometry:function(){return Ju},SRGB8_ALPHA8_ASTC_10x10_Format:function(){return Ot},SRGB8_ALPHA8_ASTC_10x5_Format:function(){return Lt},SRGB8_ALPHA8_ASTC_10x6_Format:function(){return Ct},SRGB8_ALPHA8_ASTC_10x8_Format:function(){return At},SRGB8_ALPHA8_ASTC_12x10_Format:function(){return Dt},SRGB8_ALPHA8_ASTC_12x12_Format:function(){return It},SRGB8_ALPHA8_ASTC_4x4_Format:function(){return Mt},SRGB8_ALPHA8_ASTC_5x4_Format:function(){return _t},SRGB8_ALPHA8_ASTC_5x5_Format:function(){return St},SRGB8_ALPHA8_ASTC_6x5_Format:function(){return Pt},SRGB8_ALPHA8_ASTC_6x6_Format:function(){return Tt},SRGB8_ALPHA8_ASTC_8x5_Format:function(){return Rt},SRGB8_ALPHA8_ASTC_8x6_Format:function(){return Et},SRGB8_ALPHA8_ASTC_8x8_Format:function(){return zt},Scene:function(){return rc},SceneUtils:function(){return Ed},ShaderChunk:function(){return No},ShaderLib:function(){return Vo},ShaderMaterial:function(){return Eo},ShadowMaterial:function(){return cl},Shape:function(){return pf},ShapeBufferGeometry:function(){return $u},ShapeGeometry:function(){return $u},ShapePath:function(){return Zf},ShapeUtils:function(){return Hu},ShortType:function(){return Te},Skeleton:function(){return Ic},SkeletonHelper:function(){return Qh},SkinnedMesh:function(){return Cc},SmoothShading:function(){return g},Sphere:function(){return Er},SphereBufferGeometry:function(){return el},SphereGeometry:function(){return el},Spherical:function(){return jh},SphericalHarmonics3:function(){return Df},SplineCurve:function(){return ff},SpotLight:function(){return _f},SpotLightHelper:function(){return qh},Sprite:function(){return wc},SpriteMaterial:function(){return sc},SrcAlphaFactor:function(){return D},SrcAlphaSaturateFactor:function(){return B},SrcColorFactor:function(){return A},StaticCopyUsage:function(){return Cn},StaticDrawUsage:function(){return Pn},StaticReadUsage:function(){return En},StereoCamera:function(){return rh},StreamCopyUsage:function(){return On},StreamDrawUsage:function(){return Rn},StreamReadUsage:function(){return Ln},StringKeyframeTrack:function(){return Ll},SubtractEquation:function(){return T},SubtractiveBlending:function(){return M},TOUCH:function(){return o},TangentSpaceNormalMap:function(){return sn},TetrahedronBufferGeometry:function(){return tl},TetrahedronGeometry:function(){return tl},TextBufferGeometry:function(){return nl},TextGeometry:function(){return nl},Texture:function(){return er},TextureLoader:function(){return Wl},TorusBufferGeometry:function(){return rl},TorusGeometry:function(){return rl},TorusKnotBufferGeometry:function(){return il},TorusKnotGeometry:function(){return il},Triangle:function(){return _i},TriangleFanDrawMode:function(){return Xt},TriangleStripDrawMode:function(){return Yt},TrianglesDrawMode:function(){return qt},TubeBufferGeometry:function(){return ol},TubeGeometry:function(){return ol},UVMapping:function(){return ie},Uint16Attribute:function(){return dd},Uint16BufferAttribute:function(){return Gi},Uint32Attribute:function(){return md},Uint32BufferAttribute:function(){return Hi},Uint8Attribute:function(){return fd},Uint8BufferAttribute:function(){return ji},Uint8ClampedAttribute:function(){return hd},Uint8ClampedBufferAttribute:function(){return Ui},Uniform:function(){return Ah},UniformsLib:function(){return Ho},UniformsUtils:function(){return Ro},UnsignedByteType:function(){return Se},UnsignedInt248Type:function(){return Ie},UnsignedIntType:function(){return ze},UnsignedShort4444Type:function(){return Ae},UnsignedShort5551Type:function(){return Oe},UnsignedShort565Type:function(){return De},UnsignedShortType:function(){return Re},VSMShadowMap:function(){return v},Vector2:function(){return Xn},Vector3:function(){return ar},Vector4:function(){return nr},VectorKeyframeTrack:function(){return Cl},Vertex:function(){return cd},VertexColors:function(){return $v},VideoTexture:function(){return ou},WebGL1Renderer:function(){return ec},WebGLCubeRenderTarget:function(){return Do},WebGLMultisampleRenderTarget:function(){return ir},WebGLRenderTarget:function(){return rr},WebGLRenderTargetCube:function(){return Pd},WebGLRenderer:function(){return $s},WebGLUtils:function(){return Zs},WireframeGeometry:function(){return al},WireframeHelper:function(){return Md},WrapAroundEnding:function(){return Vt},XHRLoader:function(){return _d},ZeroCurvatureEnding:function(){return Nt},ZeroFactor:function(){return L},ZeroSlopeEnding:function(){return Ht},ZeroStencilOp:function(){return un},sRGBEncoding:function(){return Qt}});const r="128",i={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},o={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},a=0,s=1,c=2,u=3,l=0,f=1,h=2,v=3,d=0,p=1,m=2,y=1,g=2,x=0,b=1,w=2,M=3,_=4,S=5,P=100,T=101,R=102,E=103,z=104,L=200,C=201,A=202,O=203,D=204,I=205,k=206,F=207,j=208,U=209,B=210,G=0,N=1,H=2,V=3,W=4,Z=5,q=6,Y=7,X=0,K=1,Q=2,J=0,$=1,ee=2,te=3,ne=4,re=5,ie=300,oe=301,ae=302,se=303,ce=304,ue=306,le=307,fe=1e3,he=1001,ve=1002,de=1003,pe=1004,me=1004,ye=1005,ge=1005,xe=1006,be=1007,we=1007,Me=1008,_e=1008,Se=1009,Pe=1010,Te=1011,Re=1012,Ee=1013,ze=1014,Le=1015,Ce=1016,Ae=1017,Oe=1018,De=1019,Ie=1020,ke=1021,Fe=1022,je=1023,Ue=1024,Be=1025,Ge=je,Ne=1026,He=1027,Ve=1028,We=1029,Ze=1030,qe=1031,Ye=1032,Xe=1033,Ke=33776,Qe=33777,Je=33778,$e=33779,et=35840,tt=35841,nt=35842,rt=35843,it=36196,ot=37492,at=37496,st=37808,ct=37809,ut=37810,lt=37811,ft=37812,ht=37813,vt=37814,dt=37815,pt=37816,mt=37817,yt=37818,gt=37819,xt=37820,bt=37821,wt=36492,Mt=37840,_t=37841,St=37842,Pt=37843,Tt=37844,Rt=37845,Et=37846,zt=37847,Lt=37848,Ct=37849,At=37850,Ot=37851,Dt=37852,It=37853,kt=2200,Ft=2201,jt=2202,Ut=2300,Bt=2301,Gt=2302,Nt=2400,Ht=2401,Vt=2402,Wt=2500,Zt=2501,qt=0,Yt=1,Xt=2,Kt=3e3,Qt=3001,Jt=3007,$t=3002,en=3003,tn=3004,nn=3005,rn=3006,on=3200,an=3201,sn=0,cn=1,un=0,ln=7680,fn=7681,hn=7682,vn=7683,dn=34055,pn=34056,mn=5386,yn=512,gn=513,xn=514,bn=515,wn=516,Mn=517,_n=518,Sn=519,Pn=35044,Tn=35048,Rn=35040,En=35045,zn=35049,Ln=35041,Cn=35046,An=35050,On=35042,Dn="100",In="300 es";class kn{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,r=n.length;t<r;t++)n[t].call(this,e);e.target=null}}}const Fn=[];for(let e=0;e<256;e++)Fn[e]=(e<16?"0":"")+e.toString(16);let jn=1234567;const Un=Math.PI/180,Bn=180/Math.PI;function Gn(){const e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(Fn[255&e]+Fn[e>>8&255]+Fn[e>>16&255]+Fn[e>>24&255]+"-"+Fn[255&t]+Fn[t>>8&255]+"-"+Fn[t>>16&15|64]+Fn[t>>24&255]+"-"+Fn[63&n|128]+Fn[n>>8&255]+"-"+Fn[n>>16&255]+Fn[n>>24&255]+Fn[255&r]+Fn[r>>8&255]+Fn[r>>16&255]+Fn[r>>24&255]).toUpperCase()}function Nn(e,t,n){return Math.max(t,Math.min(n,e))}function Hn(e,t){return(e%t+t)%t}function Vn(e,t,n){return(1-n)*e+n*t}function Wn(e){return 0==(e&e-1)&&0!==e}function Zn(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function qn(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}var Yn=Object.freeze({__proto__:null,DEG2RAD:Un,RAD2DEG:Bn,generateUUID:Gn,clamp:Nn,euclideanModulo:Hn,mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:Vn,damp:function(e,t,n,r){return Vn(e,t,1-Math.exp(-n*r))},pingpong:function(e,t=1){return t-Math.abs(Hn(e,2*t)-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)},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())},seededRandom:function(e){return void 0!==e&&(jn=e%2147483647),jn=16807*jn%2147483647,(jn-1)/2147483646},degToRad:function(e){return e*Un},radToDeg:function(e){return e*Bn},isPowerOfTwo:Wn,ceilPowerOfTwo:Zn,floorPowerOfTwo:qn,setQuaternionFromProperEuler:function(e,t,n,r,i){const o=Math.cos,a=Math.sin,s=o(n/2),c=a(n/2),u=o((t+r)/2),l=a((t+r)/2),f=o((t-r)/2),h=a((t-r)/2),v=o((r-t)/2),d=a((r-t)/2);switch(i){case"XYX":e.set(s*l,c*f,c*h,s*u);break;case"YZY":e.set(c*h,s*l,c*f,s*u);break;case"ZXZ":e.set(c*f,c*h,s*l,s*u);break;case"XZX":e.set(s*l,c*d,c*v,s*u);break;case"YXY":e.set(c*v,s*l,c*d,s*u);break;case"ZYZ":e.set(c*d,c*v,s*l,s*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}});class Xn{constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(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(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(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(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(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(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(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(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){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(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const 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}random(){return this.x=Math.random(),this.y=Math.random(),this}}Xn.prototype.isVector2=!0;class Kn{constructor(){this.elements=[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.")}set(e,t,n,r,i,o,a,s,c){const u=this.elements;return u[0]=e,u[1]=r,u[2]=a,u[3]=t,u[4]=i,u[5]=s,u[6]=n,u[7]=o,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const 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}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[3],s=n[6],c=n[1],u=n[4],l=n[7],f=n[2],h=n[5],v=n[8],d=r[0],p=r[3],m=r[6],y=r[1],g=r[4],x=r[7],b=r[2],w=r[5],M=r[8];return i[0]=o*d+a*y+s*b,i[3]=o*p+a*g+s*w,i[6]=o*m+a*x+s*M,i[1]=c*d+u*y+l*b,i[4]=c*p+u*g+l*w,i[7]=c*m+u*x+l*M,i[2]=f*d+h*y+v*b,i[5]=f*p+h*g+v*w,i[8]=f*m+h*x+v*M,this}multiplyScalar(e){const 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(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],c=e[7],u=e[8];return t*o*u-t*a*c-n*i*u+n*a*s+r*i*c-r*o*s}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],c=e[7],u=e[8],l=u*o-a*c,f=a*s-u*i,h=c*i-o*s,v=t*l+n*f+r*h;if(0===v)return this.set(0,0,0,0,0,0,0,0,0);const d=1/v;return e[0]=l*d,e[1]=(r*c-u*n)*d,e[2]=(a*n-r*o)*d,e[3]=f*d,e[4]=(u*t-r*s)*d,e[5]=(r*i-a*t)*d,e[6]=h*d,e[7]=(n*s-c*t)*d,e[8]=(o*t-n*i)*d,this}transpose(){let e;const 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}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const 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}setUvTransform(e,t,n,r,i,o,a){const s=Math.cos(i),c=Math.sin(i);return this.set(n*s,n*c,-n*(s*o+c*a)+o+e,-r*c,r*s,-r*(-c*o+s*a)+a+t,0,0,1),this}scale(e,t){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this}rotate(e){const t=Math.cos(e),n=Math.sin(e),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],c=r[4],u=r[7];return r[0]=t*i+n*s,r[3]=t*o+n*c,r[6]=t*a+n*u,r[1]=-n*i+t*s,r[4]=-n*o+t*c,r[7]=-n*a+t*u,this}translate(e,t){const n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=t*n[2],n[4]+=t*n[5],n[7]+=t*n[8],this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const 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}clone(){return(new this.constructor).fromArray(this.elements)}}let Qn;Kn.prototype.isMatrix3=!0;class Jn{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===Qn&&(Qn=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),Qn.width=e.width,Qn.height=e.height;const n=Qn.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=Qn}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}}let $n=0;class er extends kn{constructor(e=er.DEFAULT_IMAGE,t=er.DEFAULT_MAPPING,n=he,r=he,i=xe,o=Me,a=je,s=Se,c=1,u=Kt){super(),Object.defineProperty(this,"id",{value:$n++}),this.uuid=Gn(),this.name="",this.image=e,this.mipmaps=[],this.mapping=t,this.wrapS=n,this.wrapT=r,this.magFilter=i,this.minFilter=o,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=s,this.offset=new Xn(0,0),this.repeat=new Xn(1,1),this.center=new Xn(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Kn,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=u,this.version=0,this.onUpdate=null}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(e){return this.name=e.name,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.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];const n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){const r=this.image;if(void 0===r.uuid&&(r.uuid=Gn()),!t&&void 0===e.images[r.uuid]){let t;if(Array.isArray(r)){t=[];for(let e=0,n=r.length;e<n;e++)r[e].isDataTexture?t.push(tr(r[e].image)):t.push(tr(r[e]))}else t=tr(r);e.images[r.uuid]={uuid:r.uuid,url:t}}n.image=r.uuid}return t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==ie)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case fe:e.x=e.x-Math.floor(e.x);break;case he:e.x=e.x<0?0:1;break;case ve: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 fe:e.y=e.y-Math.floor(e.y);break;case he:e.y=e.y<0?0:1;break;case ve:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&this.version++}}function tr(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?Jn.getDataURL(e):e.data?{data:Array.prototype.slice.call(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}er.DEFAULT_IMAGE=void 0,er.DEFAULT_MAPPING=ie,er.prototype.isTexture=!0;class nr{constructor(e=0,t=0,n=0,r=1){this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(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(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(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(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(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(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(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(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(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(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(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}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const 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(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const 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(e){let t,n,r,i;const o=.01,a=.1,s=e.elements,c=s[0],u=s[4],l=s[8],f=s[1],h=s[5],v=s[9],d=s[2],p=s[6],m=s[10];if(Math.abs(u-f)<o&&Math.abs(l-d)<o&&Math.abs(v-p)<o){if(Math.abs(u+f)<a&&Math.abs(l+d)<a&&Math.abs(v+p)<a&&Math.abs(c+h+m-3)<a)return this.set(1,0,0,0),this;t=Math.PI;const e=(c+1)/2,s=(h+1)/2,y=(m+1)/2,g=(u+f)/4,x=(l+d)/4,b=(v+p)/4;return e>s&&e>y?e<o?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(e),r=g/n,i=x/n):s>y?s<o?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(s),n=g/r,i=b/r):y<o?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(y),n=x/i,r=b/i),this.set(n,r,i,t),this}let y=Math.sqrt((p-v)*(p-v)+(l-d)*(l-d)+(f-u)*(f-u));return Math.abs(y)<.001&&(y=1),this.x=(p-v)/y,this.y=(l-d)/y,this.z=(f-u)/y,this.w=Math.acos((c+h+m-1)/2),this}min(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(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(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(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){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(){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(){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(){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(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(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(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}}nr.prototype.isVector4=!0;class rr extends kn{constructor(e,t,n){super(),this.width=e,this.height=t,this.depth=1,this.scissor=new nr(0,0,e,t),this.scissorTest=!1,this.viewport=new nr(0,0,e,t),n=n||{},this.texture=new er(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.image={},this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=1,this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:xe,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}setTexture(e){e.image={width:this.width,height:this.height,depth:this.depth},this.texture=e}setSize(e,t,n=1){this.width===e&&this.height===t&&this.depth===n||(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return(new this.constructor).copy(this)}copy(e){return this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}}rr.prototype.isWebGLRenderTarget=!0;class ir extends rr{constructor(e,t,n){super(e,t,n),this.samples=4}copy(e){return super.copy.call(this,e),this.samples=e.samples,this}}ir.prototype.isWebGLMultisampleRenderTarget=!0;class or{constructor(e=0,t=0,n=0,r=1){this._x=e,this._y=t,this._z=n,this._w=r}static slerp(e,t,n,r){return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."),n.slerpQuaternions(e,t,r)}static slerpFlat(e,t,n,r,i,o,a){let s=n[r+0],c=n[r+1],u=n[r+2],l=n[r+3];const f=i[o+0],h=i[o+1],v=i[o+2],d=i[o+3];if(0===a)return e[t+0]=s,e[t+1]=c,e[t+2]=u,void(e[t+3]=l);if(1===a)return e[t+0]=f,e[t+1]=h,e[t+2]=v,void(e[t+3]=d);if(l!==d||s!==f||c!==h||u!==v){let e=1-a;const t=s*f+c*h+u*v+l*d,n=t>=0?1:-1,r=1-t*t;if(r>Number.EPSILON){const i=Math.sqrt(r),o=Math.atan2(i,t*n);e=Math.sin(e*o)/i,a=Math.sin(a*o)/i}const i=a*n;if(s=s*e+f*i,c=c*e+h*i,u=u*e+v*i,l=l*e+d*i,e===1-a){const e=1/Math.sqrt(s*s+c*c+u*u+l*l);s*=e,c*=e,u*=e,l*=e}}e[t]=s,e[t+1]=c,e[t+2]=u,e[t+3]=l}static multiplyQuaternionsFlat(e,t,n,r,i,o){const a=n[r],s=n[r+1],c=n[r+2],u=n[r+3],l=i[o],f=i[o+1],h=i[o+2],v=i[o+3];return e[t]=a*v+u*l+s*h-c*f,e[t+1]=s*v+u*f+c*l-a*h,e[t+2]=c*v+u*h+a*f-s*l,e[t+3]=u*v-a*l-s*f-c*h,e}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(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");const n=e._x,r=e._y,i=e._z,o=e._order,a=Math.cos,s=Math.sin,c=a(n/2),u=a(r/2),l=a(i/2),f=s(n/2),h=s(r/2),v=s(i/2);switch(o){case"XYZ":this._x=f*u*l+c*h*v,this._y=c*h*l-f*u*v,this._z=c*u*v+f*h*l,this._w=c*u*l-f*h*v;break;case"YXZ":this._x=f*u*l+c*h*v,this._y=c*h*l-f*u*v,this._z=c*u*v-f*h*l,this._w=c*u*l+f*h*v;break;case"ZXY":this._x=f*u*l-c*h*v,this._y=c*h*l+f*u*v,this._z=c*u*v+f*h*l,this._w=c*u*l-f*h*v;break;case"ZYX":this._x=f*u*l-c*h*v,this._y=c*h*l+f*u*v,this._z=c*u*v-f*h*l,this._w=c*u*l+f*h*v;break;case"YZX":this._x=f*u*l+c*h*v,this._y=c*h*l+f*u*v,this._z=c*u*v-f*h*l,this._w=c*u*l-f*h*v;break;case"XZY":this._x=f*u*l-c*h*v,this._y=c*h*l-f*u*v,this._z=c*u*v+f*h*l,this._w=c*u*l+f*h*v;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const 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(e){const t=e.elements,n=t[0],r=t[4],i=t[8],o=t[1],a=t[5],s=t[9],c=t[2],u=t[6],l=t[10],f=n+a+l;if(f>0){const e=.5/Math.sqrt(f+1);this._w=.25/e,this._x=(u-s)*e,this._y=(i-c)*e,this._z=(o-r)*e}else if(n>a&&n>l){const e=2*Math.sqrt(1+n-a-l);this._w=(u-s)/e,this._x=.25*e,this._y=(r+o)/e,this._z=(i+c)/e}else if(a>l){const e=2*Math.sqrt(1+a-n-l);this._w=(i-c)/e,this._x=(r+o)/e,this._y=.25*e,this._z=(s+u)/e}else{const e=2*Math.sqrt(1+l-n-a);this._w=(o-r)/e,this._x=(i+c)/e,this._y=(s+u)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Nn(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let 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(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(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,r=e._y,i=e._z,o=e._w,a=t._x,s=t._y,c=t._z,u=t._w;return this._x=n*u+o*a+r*c-i*s,this._y=r*u+o*s+i*a-n*c,this._z=i*u+o*c+n*s-r*a,this._w=o*u-n*a-r*s-i*c,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const n=this._x,r=this._y,i=this._z,o=this._w;let 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;const s=1-a*a;if(s<=Number.EPSILON){const e=1-t;return this._w=e*o+t*this._w,this._x=e*n+t*this._x,this._y=e*r+t*this._y,this._z=e*i+t*this._z,this.normalize(),this._onChangeCallback(),this}const c=Math.sqrt(s),u=Math.atan2(c,a),l=Math.sin((1-t)*u)/c,f=Math.sin(t*u)/c;return this._w=o*l+this._w*f,this._x=n*l+this._x*f,this._y=r*l+this._y*f,this._z=i*l+this._z*f,this._onChangeCallback(),this}slerpQuaternions(e,t,n){this.copy(e).slerp(t,n)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}or.prototype.isQuaternion=!0;class ar{constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(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(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(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(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(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(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(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(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(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(cr.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(cr.setFromAxisAngle(e,t))}applyMatrix3(e){const 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}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const 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(e){const t=this.x,n=this.y,r=this.z,i=e.x,o=e.y,a=e.z,s=e.w,c=s*t+o*r-a*n,u=s*n+a*t-i*r,l=s*r+i*n-o*t,f=-i*t-o*n-a*r;return this.x=c*s+f*-i+u*-a-l*-o,this.y=u*s+f*-o+l*-i-c*-a,this.z=l*s+f*-a+c*-o-u*-i,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const 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(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(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(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(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(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){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(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(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(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)}crossVectors(e,t){const 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(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return sr.copy(this).projectOnVector(e),this.sub(sr)}reflect(e){return this.sub(sr.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(Nn(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const 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(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}}ar.prototype.isVector3=!0;const sr=new ar,cr=new or;class ur{constructor(e=new ar(1/0,1/0,1/0),t=new ar(-1/0,-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){let t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0;for(let s=0,c=e.length;s<c;s+=3){const c=e[s],u=e[s+1],l=e[s+2];c<t&&(t=c),u<n&&(n=u),l<r&&(r=l),c>i&&(i=c),u>o&&(o=u),l>a&&(a=l)}return this.min.set(t,n,r),this.max.set(i,o,a),this}setFromBufferAttribute(e){let t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0;for(let s=0,c=e.count;s<c;s++){const c=e.getX(s),u=e.getY(s),l=e.getZ(s);c<t&&(t=c),u<n&&(n=u),l<r&&(r=l),c>i&&(i=c),u>o&&(o=u),l>a&&(a=l)}return this.min.set(t,n,r),this.max.set(i,o,a),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=fr.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e){return this.makeEmpty(),this.expandByObject(e)}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){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(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return void 0===e&&(console.warn("THREE.Box3: .getCenter() target is now required"),e=new ar),this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return void 0===e&&(console.warn("THREE.Box3: .getSize() target is now required"),e=new ar),this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e){e.updateWorldMatrix(!1,!1);const t=e.geometry;void 0!==t&&(null===t.boundingBox&&t.computeBoundingBox(),hr.copy(t.boundingBox),hr.applyMatrix4(e.matrixWorld),this.union(hr));const n=e.children;for(let e=0,t=n.length;e<t;e++)this.expandByObject(n[e]);return this}containsPoint(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(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(e,t){return void 0===t&&(console.warn("THREE.Box3: .getParameter() target is now required"),t=new ar),t.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(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(e){return this.clampPoint(e.center,fr),fr.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let 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}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(xr),br.subVectors(this.max,xr),vr.subVectors(e.a,xr),dr.subVectors(e.b,xr),pr.subVectors(e.c,xr),mr.subVectors(dr,vr),yr.subVectors(pr,dr),gr.subVectors(vr,pr);let t=[0,-mr.z,mr.y,0,-yr.z,yr.y,0,-gr.z,gr.y,mr.z,0,-mr.x,yr.z,0,-yr.x,gr.z,0,-gr.x,-mr.y,mr.x,0,-yr.y,yr.x,0,-gr.y,gr.x,0];return!!_r(t,vr,dr,pr,br)&&(t=[1,0,0,0,1,0,0,0,1],!!_r(t,vr,dr,pr,br)&&(wr.crossVectors(mr,yr),t=[wr.x,wr.y,wr.z],_r(t,vr,dr,pr,br)))}clampPoint(e,t){return void 0===t&&(console.warn("THREE.Box3: .clampPoint() target is now required"),t=new ar),t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return fr.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return void 0===e&&console.error("THREE.Box3: .getBoundingSphere() target is now required"),this.getCenter(e.center),e.radius=.5*this.getSize(fr).length(),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(lr[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),lr[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),lr[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),lr[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),lr[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),lr[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),lr[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),lr[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(lr)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}ur.prototype.isBox3=!0;const lr=[new ar,new ar,new ar,new ar,new ar,new ar,new ar,new ar],fr=new ar,hr=new ur,vr=new ar,dr=new ar,pr=new ar,mr=new ar,yr=new ar,gr=new ar,xr=new ar,br=new ar,wr=new ar,Mr=new ar;function _r(e,t,n,r,i){for(let o=0,a=e.length-3;o<=a;o+=3){Mr.fromArray(e,o);const a=i.x*Math.abs(Mr.x)+i.y*Math.abs(Mr.y)+i.z*Math.abs(Mr.z),s=t.dot(Mr),c=n.dot(Mr),u=r.dot(Mr);if(Math.max(-Math.max(s,c,u),Math.min(s,c,u))>a)return!1}return!0}const Sr=new ur,Pr=new ar,Tr=new ar,Rr=new ar;class Er{constructor(e=new ar,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;void 0!==t?n.copy(t):Sr.setFromPoints(e).getCenter(n);let r=0;for(let t=0,i=e.length;t<i;t++)r=Math.max(r,n.distanceToSquared(e[t]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return void 0===t&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),t=new ar),t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return void 0===e&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),e=new ur),this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){Rr.subVectors(e,this.center);const t=Rr.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.add(Rr.multiplyScalar(n/e)),this.radius+=n}return this}union(e){return Tr.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint(Pr.copy(e.center).add(Tr)),this.expandByPoint(Pr.copy(e.center).sub(Tr)),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const zr=new ar,Lr=new ar,Cr=new ar,Ar=new ar,Or=new ar,Dr=new ar,Ir=new ar;class kr{constructor(e=new ar,t=new ar(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return void 0===t&&(console.warn("THREE.Ray: .at() target is now required"),t=new ar),t.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,zr)),this}closestPointToPoint(e,t){void 0===t&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),t=new ar),t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=zr.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(zr.copy(this.direction).multiplyScalar(t).add(this.origin),zr.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){Lr.copy(e).add(t).multiplyScalar(.5),Cr.copy(t).sub(e).normalize(),Ar.copy(this.origin).sub(Lr);const i=.5*e.distanceTo(t),o=-this.direction.dot(Cr),a=Ar.dot(this.direction),s=-Ar.dot(Cr),c=Ar.lengthSq(),u=Math.abs(1-o*o);let l,f,h,v;if(u>0)if(l=o*s-a,f=o*a-s,v=i*u,l>=0)if(f>=-v)if(f<=v){const e=1/u;l*=e,f*=e,h=l*(l+o*f+2*a)+f*(o*l+f+2*s)+c}else f=i,l=Math.max(0,-(o*f+a)),h=-l*l+f*(f+2*s)+c;else f=-i,l=Math.max(0,-(o*f+a)),h=-l*l+f*(f+2*s)+c;else f<=-v?(l=Math.max(0,-(-o*i+a)),f=l>0?-i:Math.min(Math.max(-i,-s),i),h=-l*l+f*(f+2*s)+c):f<=v?(l=0,f=Math.min(Math.max(-i,-s),i),h=f*(f+2*s)+c):(l=Math.max(0,-(o*i+a)),f=l>0?i:Math.min(Math.max(-i,-s),i),h=-l*l+f*(f+2*s)+c);else f=o>0?-i:i,l=Math.max(0,-(o*f+a)),h=-l*l+f*(f+2*s)+c;return n&&n.copy(this.direction).multiplyScalar(l).add(this.origin),r&&r.copy(Cr).multiplyScalar(f).add(Lr),h}intersectSphere(e,t){zr.subVectors(e.center,this.origin);const n=zr.dot(this.direction),r=zr.dot(zr)-n*n,i=e.radius*e.radius;if(r>i)return null;const o=Math.sqrt(i-r),a=n-o,s=n+o;return a<0&&s<0?null:a<0?this.at(s,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,o,a,s;const c=1/this.direction.x,u=1/this.direction.y,l=1/this.direction.z,f=this.origin;return c>=0?(n=(e.min.x-f.x)*c,r=(e.max.x-f.x)*c):(n=(e.max.x-f.x)*c,r=(e.min.x-f.x)*c),u>=0?(i=(e.min.y-f.y)*u,o=(e.max.y-f.y)*u):(i=(e.max.y-f.y)*u,o=(e.min.y-f.y)*u),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),l>=0?(a=(e.min.z-f.z)*l,s=(e.max.z-f.z)*l):(a=(e.max.z-f.z)*l,s=(e.min.z-f.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(e){return null!==this.intersectBox(e,zr)}intersectTriangle(e,t,n,r,i){Or.subVectors(t,e),Dr.subVectors(n,e),Ir.crossVectors(Or,Dr);let o,a=this.direction.dot(Ir);if(a>0){if(r)return null;o=1}else{if(!(a<0))return null;o=-1,a=-a}Ar.subVectors(this.origin,e);const s=o*this.direction.dot(Dr.crossVectors(Ar,Dr));if(s<0)return null;const c=o*this.direction.dot(Or.cross(Ar));if(c<0)return null;if(s+c>a)return null;const u=-o*Ar.dot(Ir);return u<0?null:this.at(u/a,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class Fr{constructor(){this.elements=[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.")}set(e,t,n,r,i,o,a,s,c,u,l,f,h,v,d,p){const m=this.elements;return m[0]=e,m[4]=t,m[8]=n,m[12]=r,m[1]=i,m[5]=o,m[9]=a,m[13]=s,m[2]=c,m[6]=u,m[10]=l,m[14]=f,m[3]=h,m[7]=v,m[11]=d,m[15]=p,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new Fr).fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(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(e){const t=this.elements,n=e.elements,r=1/jr.setFromMatrixColumn(e,0).length(),i=1/jr.setFromMatrixColumn(e,1).length(),o=1/jr.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");const t=this.elements,n=e.x,r=e.y,i=e.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),c=Math.sin(r),u=Math.cos(i),l=Math.sin(i);if("XYZ"===e.order){const e=o*u,n=o*l,r=a*u,i=a*l;t[0]=s*u,t[4]=-s*l,t[8]=c,t[1]=n+r*c,t[5]=e-i*c,t[9]=-a*s,t[2]=i-e*c,t[6]=r+n*c,t[10]=o*s}else if("YXZ"===e.order){const e=s*u,n=s*l,r=c*u,i=c*l;t[0]=e+i*a,t[4]=r*a-n,t[8]=o*c,t[1]=o*l,t[5]=o*u,t[9]=-a,t[2]=n*a-r,t[6]=i+e*a,t[10]=o*s}else if("ZXY"===e.order){const e=s*u,n=s*l,r=c*u,i=c*l;t[0]=e-i*a,t[4]=-o*l,t[8]=r+n*a,t[1]=n+r*a,t[5]=o*u,t[9]=i-e*a,t[2]=-o*c,t[6]=a,t[10]=o*s}else if("ZYX"===e.order){const e=o*u,n=o*l,r=a*u,i=a*l;t[0]=s*u,t[4]=r*c-n,t[8]=e*c+i,t[1]=s*l,t[5]=i*c+e,t[9]=n*c-r,t[2]=-c,t[6]=a*s,t[10]=o*s}else if("YZX"===e.order){const e=o*s,n=o*c,r=a*s,i=a*c;t[0]=s*u,t[4]=i-e*l,t[8]=r*l+n,t[1]=l,t[5]=o*u,t[9]=-a*u,t[2]=-c*u,t[6]=n*l+r,t[10]=e-i*l}else if("XZY"===e.order){const e=o*s,n=o*c,r=a*s,i=a*c;t[0]=s*u,t[4]=-l,t[8]=c*u,t[1]=e*l+i,t[5]=o*u,t[9]=n*l-r,t[2]=r*l-n,t[6]=a*u,t[10]=i*l+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Br,e,Gr)}lookAt(e,t,n){const r=this.elements;return Vr.subVectors(e,t),0===Vr.lengthSq()&&(Vr.z=1),Vr.normalize(),Nr.crossVectors(n,Vr),0===Nr.lengthSq()&&(1===Math.abs(n.z)?Vr.x+=1e-4:Vr.z+=1e-4,Vr.normalize(),Nr.crossVectors(n,Vr)),Nr.normalize(),Hr.crossVectors(Vr,Nr),r[0]=Nr.x,r[4]=Hr.x,r[8]=Vr.x,r[1]=Nr.y,r[5]=Hr.y,r[9]=Vr.y,r[2]=Nr.z,r[6]=Hr.z,r[10]=Vr.z,this}multiply(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(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[4],s=n[8],c=n[12],u=n[1],l=n[5],f=n[9],h=n[13],v=n[2],d=n[6],p=n[10],m=n[14],y=n[3],g=n[7],x=n[11],b=n[15],w=r[0],M=r[4],_=r[8],S=r[12],P=r[1],T=r[5],R=r[9],E=r[13],z=r[2],L=r[6],C=r[10],A=r[14],O=r[3],D=r[7],I=r[11],k=r[15];return i[0]=o*w+a*P+s*z+c*O,i[4]=o*M+a*T+s*L+c*D,i[8]=o*_+a*R+s*C+c*I,i[12]=o*S+a*E+s*A+c*k,i[1]=u*w+l*P+f*z+h*O,i[5]=u*M+l*T+f*L+h*D,i[9]=u*_+l*R+f*C+h*I,i[13]=u*S+l*E+f*A+h*k,i[2]=v*w+d*P+p*z+m*O,i[6]=v*M+d*T+p*L+m*D,i[10]=v*_+d*R+p*C+m*I,i[14]=v*S+d*E+p*A+m*k,i[3]=y*w+g*P+x*z+b*O,i[7]=y*M+g*T+x*L+b*D,i[11]=y*_+g*R+x*C+b*I,i[15]=y*S+g*E+x*A+b*k,this}multiplyScalar(e){const 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}determinant(){const e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],o=e[1],a=e[5],s=e[9],c=e[13],u=e[2],l=e[6],f=e[10],h=e[14];return e[3]*(+i*s*l-r*c*l-i*a*f+n*c*f+r*a*h-n*s*h)+e[7]*(+t*s*h-t*c*f+i*o*f-r*o*h+r*c*u-i*s*u)+e[11]*(+t*c*l-t*a*h-i*o*l+n*o*h+i*a*u-n*c*u)+e[15]*(-r*a*u-t*s*l+t*a*f+r*o*l-n*o*f+n*s*u)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],c=e[7],u=e[8],l=e[9],f=e[10],h=e[11],v=e[12],d=e[13],p=e[14],m=e[15],y=l*p*c-d*f*c+d*s*h-a*p*h-l*s*m+a*f*m,g=v*f*c-u*p*c-v*s*h+o*p*h+u*s*m-o*f*m,x=u*d*c-v*l*c+v*a*h-o*d*h-u*a*m+o*l*m,b=v*l*s-u*d*s-v*a*f+o*d*f+u*a*p-o*l*p,w=t*y+n*g+r*x+i*b;if(0===w)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const M=1/w;return e[0]=y*M,e[1]=(d*f*i-l*p*i-d*r*h+n*p*h+l*r*m-n*f*m)*M,e[2]=(a*p*i-d*s*i+d*r*c-n*p*c-a*r*m+n*s*m)*M,e[3]=(l*s*i-a*f*i-l*r*c+n*f*c+a*r*h-n*s*h)*M,e[4]=g*M,e[5]=(u*p*i-v*f*i+v*r*h-t*p*h-u*r*m+t*f*m)*M,e[6]=(v*s*i-o*p*i-v*r*c+t*p*c+o*r*m-t*s*m)*M,e[7]=(o*f*i-u*s*i+u*r*c-t*f*c-o*r*h+t*s*h)*M,e[8]=x*M,e[9]=(v*l*i-u*d*i-v*n*h+t*d*h+u*n*m-t*l*m)*M,e[10]=(o*d*i-v*a*i+v*n*c-t*d*c-o*n*m+t*a*m)*M,e[11]=(u*a*i-o*l*i-u*n*c+t*l*c+o*n*h-t*a*h)*M,e[12]=b*M,e[13]=(u*d*r-v*l*r+v*n*f-t*d*f-u*n*p+t*l*p)*M,e[14]=(v*a*r-o*d*r-v*n*s+t*d*s+o*n*p-t*a*p)*M,e[15]=(o*l*r-u*a*r+u*n*s-t*l*s-o*n*f+t*a*f)*M,this}scale(e){const 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(){const 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(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const 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(e){const 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(e){const 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(e,t){const n=Math.cos(t),r=Math.sin(t),i=1-n,o=e.x,a=e.y,s=e.z,c=i*o,u=i*a;return this.set(c*o+n,c*a-r*s,c*s+r*a,0,c*a+r*s,u*a+n,u*s-r*o,0,c*s-r*a,u*s+r*o,i*s*s+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n){return this.set(1,t,n,0,e,1,n,0,e,t,1,0,0,0,0,1),this}compose(e,t,n){const r=this.elements,i=t._x,o=t._y,a=t._z,s=t._w,c=i+i,u=o+o,l=a+a,f=i*c,h=i*u,v=i*l,d=o*u,p=o*l,m=a*l,y=s*c,g=s*u,x=s*l,b=n.x,w=n.y,M=n.z;return r[0]=(1-(d+m))*b,r[1]=(h+x)*b,r[2]=(v-g)*b,r[3]=0,r[4]=(h-x)*w,r[5]=(1-(f+m))*w,r[6]=(p+y)*w,r[7]=0,r[8]=(v+g)*M,r[9]=(p-y)*M,r[10]=(1-(f+d))*M,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){const r=this.elements;let i=jr.set(r[0],r[1],r[2]).length();const o=jr.set(r[4],r[5],r[6]).length(),a=jr.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],Ur.copy(this);const s=1/i,c=1/o,u=1/a;return Ur.elements[0]*=s,Ur.elements[1]*=s,Ur.elements[2]*=s,Ur.elements[4]*=c,Ur.elements[5]*=c,Ur.elements[6]*=c,Ur.elements[8]*=u,Ur.elements[9]*=u,Ur.elements[10]*=u,t.setFromRotationMatrix(Ur),n.x=i,n.y=o,n.z=a,this}makePerspective(e,t,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");const a=this.elements,s=2*i/(t-e),c=2*i/(n-r),u=(t+e)/(t-e),l=(n+r)/(n-r),f=-(o+i)/(o-i),h=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=l,a[13]=0,a[2]=0,a[6]=0,a[10]=f,a[14]=h,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,t,n,r,i,o){const a=this.elements,s=1/(t-e),c=1/(n-r),u=1/(o-i),l=(t+e)*s,f=(n+r)*c,h=(o+i)*u;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-l,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-f,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-h,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<16;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const 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}}Fr.prototype.isMatrix4=!0;const jr=new ar,Ur=new Fr,Br=new ar(0,0,0),Gr=new ar(1,1,1),Nr=new ar,Hr=new ar,Vr=new ar,Wr=new Fr,Zr=new or;class qr{constructor(e=0,t=0,n=0,r=qr.DefaultOrder){this._x=e,this._y=t,this._z=n,this._order=r}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(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._order=r||this._order,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t,n){const r=e.elements,i=r[0],o=r[4],a=r[8],s=r[1],c=r[5],u=r[9],l=r[2],f=r[6],h=r[10];switch(t=t||this._order){case"XYZ":this._y=Math.asin(Nn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,h),this._z=Math.atan2(-o,i)):(this._x=Math.atan2(f,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Nn(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,h),this._z=Math.atan2(s,c)):(this._y=Math.atan2(-l,i),this._z=0);break;case"ZXY":this._x=Math.asin(Nn(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-l,h),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(s,i));break;case"ZYX":this._y=Math.asin(-Nn(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(f,h),this._z=Math.atan2(s,i)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(Nn(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-l,i)):(this._x=0,this._y=Math.atan2(a,h));break;case"XZY":this._z=Math.asin(-Nn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(f,c),this._y=Math.atan2(a,i)):(this._x=Math.atan2(-u,h),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!1!==n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return Wr.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Wr,t,n)}setFromVector3(e,t){return this.set(e.x,e.y,e.z,t||this._order)}reorder(e){return Zr.setFromEuler(this),this.setFromQuaternion(Zr,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(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(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}toVector3(e){return e?e.set(this._x,this._y,this._z):new ar(this._x,this._y,this._z)}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}qr.prototype.isEuler=!0,qr.DefaultOrder="XYZ",qr.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class Yr{constructor(){this.mask=1}set(e){this.mask=1<<e|0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return 0!=(this.mask&e.mask)}}let Xr=0;const Kr=new ar,Qr=new or,Jr=new Fr,$r=new ar,ei=new ar,ti=new ar,ni=new or,ri=new ar(1,0,0),ii=new ar(0,1,0),oi=new ar(0,0,1),ai={type:"added"},si={type:"removed"};class ci extends kn{constructor(){super(),Object.defineProperty(this,"id",{value:Xr++}),this.uuid=Gn(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=ci.DefaultUp.clone();const e=new ar,t=new qr,n=new or,r=new ar(1,1,1);t._onChange((function(){n.setFromEuler(t,!1)})),n._onChange((function(){t.setFromQuaternion(n,void 0,!1)})),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new Fr},normalMatrix:{value:new Kn}}),this.matrix=new Fr,this.matrixWorld=new Fr,this.matrixAutoUpdate=ci.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new Yr,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return Qr.setFromAxisAngle(e,t),this.quaternion.multiply(Qr),this}rotateOnWorldAxis(e,t){return Qr.setFromAxisAngle(e,t),this.quaternion.premultiply(Qr),this}rotateX(e){return this.rotateOnAxis(ri,e)}rotateY(e){return this.rotateOnAxis(ii,e)}rotateZ(e){return this.rotateOnAxis(oi,e)}translateOnAxis(e,t){return Kr.copy(e).applyQuaternion(this.quaternion),this.position.add(Kr.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(ri,e)}translateY(e){return this.translateOnAxis(ii,e)}translateZ(e){return this.translateOnAxis(oi,e)}localToWorld(e){return e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return e.applyMatrix4(Jr.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?$r.copy(e):$r.set(e,t,n);const r=this.parent;this.updateWorldMatrix(!0,!1),ei.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Jr.lookAt(ei,$r,this.up):Jr.lookAt($r,ei,this.up),this.quaternion.setFromRotationMatrix(Jr),r&&(Jr.extractRotation(r.matrixWorld),Qr.setFromRotationMatrix(Jr),this.quaternion.premultiply(Qr.invert()))}add(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);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,this.children.push(e),e.dispatchEvent(ai)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}const t=this.children.indexOf(e);return-1!==t&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(si)),this}clear(){for(let e=0;e<this.children.length;e++){const t=this.children[e];t.parent=null,t.dispatchEvent(si)}return this.children.length=0,this}attach(e){return this.updateWorldMatrix(!0,!1),Jr.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),Jr.multiply(e.parent.matrixWorld)),e.applyMatrix4(Jr),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,r=this.children.length;n<r;n++){const r=this.children[n].getObjectByProperty(e,t);if(void 0!==r)return r}}getWorldPosition(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),e=new ar),this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),e=new or),this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ei,e,ti),e}getWorldScale(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),e=new ar),this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ei,ni,e),e}getWorldDirection(e){void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new ar),this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverse(e)}traverseVisible(e){if(!1===this.visible)return;e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){const n=this.parent;if(!0===e&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===t){const e=this.children;for(let t=0,n=e.length;t<n;t++)e[t].updateWorldMatrix(!1,!0)}}toJSON(e){const t=void 0===e||"string"==typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});const r={};function i(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t<r;t++){const r=n[t];i(e.shapes,r)}else i(e.shapes,n)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(i(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const t=[];for(let n=0,r=this.material.length;n<r;n++)t.push(i(e.materials,this.material[n]));r.material=t}else r.material=i(e.materials,this.material);if(this.children.length>0){r.children=[];for(let t=0;t<this.children.length;t++)r.children.push(this.children[t].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let t=0;t<this.animations.length;t++){const n=this.animations[t];r.animations.push(i(e.animations,n))}}if(t){const t=o(e.geometries),r=o(e.materials),i=o(e.textures),a=o(e.images),s=o(e.shapes),c=o(e.skeletons),u=o(e.animations);t.length>0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),a.length>0&&(n.images=a),s.length>0&&(n.shapes=s),c.length>0&&(n.skeletons=c),u.length>0&&(n.animations=u)}return n.object=r,n;function o(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,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.layers.mask=e.layers.mask,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)),!0===t)for(let t=0;t<e.children.length;t++){const n=e.children[t];this.add(n.clone())}return this}}ci.DefaultUp=new ar(0,1,0),ci.DefaultMatrixAutoUpdate=!0,ci.prototype.isObject3D=!0;const ui=new ar,li=new ar,fi=new Kn;class hi{constructor(e=new ar(1,0,0),t=0){this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const r=ui.subVectors(n,t).cross(li.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return void 0===t&&(console.warn("THREE.Plane: .projectPoint() target is now required"),t=new ar),t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}intersectLine(e,t){void 0===t&&(console.warn("THREE.Plane: .intersectLine() target is now required"),t=new ar);const n=e.delta(ui),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:t.copy(n).multiplyScalar(i).add(e.start)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return void 0===e&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),e=new ar),e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||fi.getNormalMatrix(e),r=this.coplanarPoint(ui).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}hi.prototype.isPlane=!0;const vi=new ar,di=new ar,pi=new ar,mi=new ar,yi=new ar,gi=new ar,xi=new ar,bi=new ar,wi=new ar,Mi=new ar;class _i{constructor(e=new ar,t=new ar,n=new ar){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){void 0===r&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new ar),r.subVectors(n,t),vi.subVectors(e,t),r.cross(vi);const i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){vi.subVectors(r,t),di.subVectors(n,t),pi.subVectors(e,t);const o=vi.dot(vi),a=vi.dot(di),s=vi.dot(pi),c=di.dot(di),u=di.dot(pi),l=o*c-a*a;if(void 0===i&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),i=new ar),0===l)return i.set(-2,-1,-1);const f=1/l,h=(c*s-a*u)*f,v=(o*u-a*s)*f;return i.set(1-h-v,v,h)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,mi),mi.x>=0&&mi.y>=0&&mi.x+mi.y<=1}static getUV(e,t,n,r,i,o,a,s){return this.getBarycoord(e,t,n,r,mi),s.set(0,0),s.addScaledVector(i,mi.x),s.addScaledVector(o,mi.y),s.addScaledVector(a,mi.z),s}static isFrontFacing(e,t,n,r){return vi.subVectors(n,t),di.subVectors(e,t),vi.cross(di).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return vi.subVectors(this.c,this.b),di.subVectors(this.a,this.b),.5*vi.cross(di).length()}getMidpoint(e){return void 0===e&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),e=new ar),e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return _i.getNormal(this.a,this.b,this.c,e)}getPlane(e){return void 0===e&&(console.warn("THREE.Triangle: .getPlane() target is now required"),e=new hi),e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return _i.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,i){return _i.getUV(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return _i.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return _i.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){void 0===t&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),t=new ar);const n=this.a,r=this.b,i=this.c;let o,a;yi.subVectors(r,n),gi.subVectors(i,n),bi.subVectors(e,n);const s=yi.dot(bi),c=gi.dot(bi);if(s<=0&&c<=0)return t.copy(n);wi.subVectors(e,r);const u=yi.dot(wi),l=gi.dot(wi);if(u>=0&&l<=u)return t.copy(r);const f=s*l-u*c;if(f<=0&&s>=0&&u<=0)return o=s/(s-u),t.copy(n).addScaledVector(yi,o);Mi.subVectors(e,i);const h=yi.dot(Mi),v=gi.dot(Mi);if(v>=0&&h<=v)return t.copy(i);const d=h*c-s*v;if(d<=0&&c>=0&&v<=0)return a=c/(c-v),t.copy(n).addScaledVector(gi,a);const p=u*v-h*l;if(p<=0&&l-u>=0&&h-v>=0)return xi.subVectors(i,r),a=(l-u)/(l-u+(h-v)),t.copy(r).addScaledVector(xi,a);const m=1/(p+d+f);return o=d*m,a=f*m,t.copy(n).addScaledVector(yi,o).addScaledVector(gi,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let Si=0;function Pi(){Object.defineProperty(this,"id",{value:Si++}),this.uuid=Gn(),this.name="",this.type="Material",this.fog=!0,this.blending=b,this.side=d,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=D,this.blendDst=I,this.blendEquation=P,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=V,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Sn,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=ln,this.stencilZFail=ln,this.stencilZPass=ln,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0}Pi.prototype=Object.assign(Object.create(kn.prototype),{constructor:Pi,isMaterial:!0,onBuild:function(){},onBeforeCompile:function(){},customProgramCacheKey:function(){return this.onBeforeCompile.toString()},setValues:function(e){if(void 0!==e)for(const t in e){const n=e[t];if(void 0===n){console.warn("THREE.Material: '"+t+"' parameter is undefined.");continue}if("shading"===t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===y;continue}const r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}},toJSON:function(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.sheen&&this.sheen.isColor&&(n.sheen=this.sheen.getHex()),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==b&&(n.blending=this.blending),this.side!==d&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.morphNormals&&(n.morphNormals=!0),!0===this.skinning&&(n.skinning=!0),!0===this.flatShading&&(n.flatShading=this.flatShading),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t){const t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,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.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(null!==t){const e=t.length;n=new Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Pi.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}});const Ti={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,rebeccapurple:6697881,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},Ri={h:0,s:0,l:0},Ei={h:0,s:0,l:0};function zi(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}function Li(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Ci(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}class Ai{constructor(e,t,n){return void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}set(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(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(e,t,n){return this.r=e,this.g=t,this.b=n,this}setHSL(e,t,n){if(e=Hn(e,1),t=Nn(t,0,1),n=Nn(n,0,1),0===t)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=zi(i,r,e+1/3),this.g=zi(i,r,e),this.b=zi(i,r,e-1/3)}return this}setStyle(e){function t(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let n;if(n=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let e;const r=n[1],i=n[2];switch(r){case"rgb":case"rgba":if(e=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))return this.r=Math.min(255,parseInt(e[1],10))/255,this.g=Math.min(255,parseInt(e[2],10))/255,this.b=Math.min(255,parseInt(e[3],10))/255,t(e[4]),this;if(e=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))return this.r=Math.min(100,parseInt(e[1],10))/100,this.g=Math.min(100,parseInt(e[2],10))/100,this.b=Math.min(100,parseInt(e[3],10))/100,t(e[4]),this;break;case"hsl":case"hsla":if(e=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i)){const n=parseFloat(e[1])/360,r=parseInt(e[2],10)/100,i=parseInt(e[3],10)/100;return t(e[4]),this.setHSL(n,r,i)}}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){const e=n[1],t=e.length;if(3===t)return this.r=parseInt(e.charAt(0)+e.charAt(0),16)/255,this.g=parseInt(e.charAt(1)+e.charAt(1),16)/255,this.b=parseInt(e.charAt(2)+e.charAt(2),16)/255,this;if(6===t)return this.r=parseInt(e.charAt(0)+e.charAt(1),16)/255,this.g=parseInt(e.charAt(2)+e.charAt(3),16)/255,this.b=parseInt(e.charAt(4)+e.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this}setColorName(e){const t=Ti[e.toLowerCase()];return void 0!==t?this.setHex(t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copyGammaToLinear(e,t=2){return this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this}copyLinearToGamma(e,t=2){const 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(e){return this.copyGammaToLinear(this,e),this}convertLinearToGamma(e){return this.copyLinearToGamma(this,e),this}copySRGBToLinear(e){return this.r=Li(e.r),this.g=Li(e.g),this.b=Li(e.b),this}copyLinearToSRGB(e){return this.r=Ci(e.r),this.g=Ci(e.g),this.b=Ci(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(e){void 0===e&&(console.warn("THREE.Color: .getHSL() target is now required"),e={h:0,s:0,l:0});const t=this.r,n=this.g,r=this.b,i=Math.max(t,n,r),o=Math.min(t,n,r);let a,s;const c=(o+i)/2;if(o===i)a=0,s=0;else{const e=i-o;switch(s=c<=.5?e/(i+o):e/(2-i-o),i){case t:a=(n-r)/e+(n<r?6:0);break;case n:a=(r-t)/e+2;break;case r:a=(t-n)/e+4}a/=6}return e.h=a,e.s=s,e.l=c,e}getStyle(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"}offsetHSL(e,t,n){return this.getHSL(Ri),Ri.h+=e,Ri.s+=t,Ri.l+=n,this.setHSL(Ri.h,Ri.s,Ri.l),this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(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(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(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}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(Ri),e.getHSL(Ei);const n=Vn(Ri.h,Ei.h,t),r=Vn(Ri.s,Ei.s,t),i=Vn(Ri.l,Ei.l,t);return this.setHSL(n,r,i),this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),!0===e.normalized&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}}Ai.NAMES=Ti,Ai.prototype.isColor=!0,Ai.prototype.r=1,Ai.prototype.g=1,Ai.prototype.b=1;class Oi extends Pi{constructor(e){super(),this.type="MeshBasicMaterial",this.color=new Ai(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=X,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.setValues(e)}copy(e){return super.copy(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.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}}Oi.prototype.isMeshBasicMaterial=!0;const Di=new ar,Ii=new Xn;class ki{constructor(e,t,n){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=!0===n,this.usage=Pn,this.updateRange={offset:0,count:-1},this.version=0,this.onUploadCallback=function(){}}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}copyColorsArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),i=new Ai),t[n++]=i.r,t[n++]=i.g,t[n++]=i.b}return this}copyVector2sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),i=new Xn),t[n++]=i.x,t[n++]=i.y}return this}copyVector3sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),i=new ar),t[n++]=i.x,t[n++]=i.y,t[n++]=i.z}return this}copyVector4sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),i=new nr),t[n++]=i.x,t[n++]=i.y,t[n++]=i.z,t[n++]=i.w}return this}applyMatrix3(e){if(2===this.itemSize)for(let t=0,n=this.count;t<n;t++)Ii.fromBufferAttribute(this,t),Ii.applyMatrix3(e),this.setXY(t,Ii.x,Ii.y);else if(3===this.itemSize)for(let t=0,n=this.count;t<n;t++)Di.fromBufferAttribute(this,t),Di.applyMatrix3(e),this.setXYZ(t,Di.x,Di.y,Di.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)Di.x=this.getX(t),Di.y=this.getY(t),Di.z=this.getZ(t),Di.applyMatrix4(e),this.setXYZ(t,Di.x,Di.y,Di.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Di.x=this.getX(t),Di.y=this.getY(t),Di.z=this.getZ(t),Di.applyNormalMatrix(e),this.setXYZ(t,Di.x,Di.y,Di.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Di.x=this.getX(t),Di.y=this.getY(t),Di.z=this.getZ(t),Di.transformDirection(e),this.setXYZ(t,Di.x,Di.y,Di.z);return this}set(e,t=0){return this.array.set(e,t),this}getX(e){return this.array[e*this.itemSize]}setX(e,t){return this.array[e*this.itemSize]=t,this}getY(e){return this.array[e*this.itemSize+1]}setY(e,t){return this.array[e*this.itemSize+1]=t,this}getZ(e){return this.array[e*this.itemSize+2]}setZ(e,t){return this.array[e*this.itemSize+2]=t,this}getW(e){return this.array[e*this.itemSize+3]}setW(e,t){return this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(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(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}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),this.usage!==Pn&&(e.usage=this.usage),0===this.updateRange.offset&&-1===this.updateRange.count||(e.updateRange=this.updateRange),e}}ki.prototype.isBufferAttribute=!0;class Fi extends ki{constructor(e,t,n){super(new Int8Array(e),t,n)}}class ji extends ki{constructor(e,t,n){super(new Uint8Array(e),t,n)}}class Ui extends ki{constructor(e,t,n){super(new Uint8ClampedArray(e),t,n)}}class Bi extends ki{constructor(e,t,n){super(new Int16Array(e),t,n)}}class Gi extends ki{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class Ni extends ki{constructor(e,t,n){super(new Int32Array(e),t,n)}}class Hi extends ki{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class Vi extends ki{constructor(e,t,n){super(new Uint16Array(e),t,n)}}Vi.prototype.isFloat16BufferAttribute=!0;class Wi extends ki{constructor(e,t,n){super(new Float32Array(e),t,n)}}class Zi extends ki{constructor(e,t,n){super(new Float64Array(e),t,n)}}function qi(e){if(0===e.length)return-1/0;let t=e[0];for(let n=1,r=e.length;n<r;++n)e[n]>t&&(t=e[n]);return t}const Yi={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Xi(e,t){return new Yi[e](t)}let Ki=0;const Qi=new Fr,Ji=new ci,$i=new ar,eo=new ur,to=new ur,no=new ar;class ro extends kn{constructor(){super(),Object.defineProperty(this,"id",{value:Ki++}),this.uuid=Gn(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(qi(e)>65535?Hi:Gi)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return void 0!==this.attributes[e]}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const t=(new Kn).getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}const r=this.attributes.tangent;return void 0!==r&&(r.transformDirection(e),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}rotateX(e){return Qi.makeRotationX(e),this.applyMatrix4(Qi),this}rotateY(e){return Qi.makeRotationY(e),this.applyMatrix4(Qi),this}rotateZ(e){return Qi.makeRotationZ(e),this.applyMatrix4(Qi),this}translate(e,t,n){return Qi.makeTranslation(e,t,n),this.applyMatrix4(Qi),this}scale(e,t,n){return Qi.makeScale(e,t,n),this.applyMatrix4(Qi),this}lookAt(e){return Ji.lookAt(e),Ji.updateMatrix(),this.applyMatrix4(Ji.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter($i).negate(),this.translate($i.x,$i.y,$i.z),this}setFromPoints(e){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t.push(r.x,r.y,r.z||0)}return this.setAttribute("position",new Wi(t,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new ur);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new ar(-1/0,-1/0,-1/0),new ar(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){const n=t[e];eo.setFromBufferAttribute(n),this.morphTargetsRelative?(no.addVectors(this.boundingBox.min,eo.min),this.boundingBox.expandByPoint(no),no.addVectors(this.boundingBox.max,eo.max),this.boundingBox.expandByPoint(no)):(this.boundingBox.expandByPoint(eo.min),this.boundingBox.expandByPoint(eo.max))}}else 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(){null===this.boundingSphere&&(this.boundingSphere=new Er);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new ar,1/0);if(e){const n=this.boundingSphere.center;if(eo.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){const n=t[e];to.setFromBufferAttribute(n),this.morphTargetsRelative?(no.addVectors(eo.min,to.min),eo.expandByPoint(no),no.addVectors(eo.max,to.max),eo.expandByPoint(no)):(eo.expandByPoint(to.min),eo.expandByPoint(to.max))}eo.getCenter(n);let r=0;for(let t=0,i=e.count;t<i;t++)no.fromBufferAttribute(e,t),r=Math.max(r,n.distanceToSquared(no));if(t)for(let i=0,o=t.length;i<o;i++){const o=t[i],a=this.morphTargetsRelative;for(let t=0,i=o.count;t<i;t++)no.fromBufferAttribute(o,t),a&&($i.fromBufferAttribute(e,t),no.add($i)),r=Math.max(r,n.distanceToSquared(no))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeFaceNormals(){}computeTangents(){const e=this.index,t=this.attributes;if(null===e||void 0===t.position||void 0===t.normal||void 0===t.uv)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=e.array,r=t.position.array,i=t.normal.array,o=t.uv.array,a=r.length/3;void 0===t.tangent&&this.setAttribute("tangent",new ki(new Float32Array(4*a),4));const s=t.tangent.array,c=[],u=[];for(let e=0;e<a;e++)c[e]=new ar,u[e]=new ar;const l=new ar,f=new ar,h=new ar,v=new Xn,d=new Xn,p=new Xn,m=new ar,y=new ar;function g(e,t,n){l.fromArray(r,3*e),f.fromArray(r,3*t),h.fromArray(r,3*n),v.fromArray(o,2*e),d.fromArray(o,2*t),p.fromArray(o,2*n),f.sub(l),h.sub(l),d.sub(v),p.sub(v);const i=1/(d.x*p.y-p.x*d.y);isFinite(i)&&(m.copy(f).multiplyScalar(p.y).addScaledVector(h,-d.y).multiplyScalar(i),y.copy(h).multiplyScalar(d.x).addScaledVector(f,-p.x).multiplyScalar(i),c[e].add(m),c[t].add(m),c[n].add(m),u[e].add(y),u[t].add(y),u[n].add(y))}let x=this.groups;0===x.length&&(x=[{start:0,count:n.length}]);for(let e=0,t=x.length;e<t;++e){const t=x[e],r=t.start;for(let e=r,i=r+t.count;e<i;e+=3)g(n[e+0],n[e+1],n[e+2])}const b=new ar,w=new ar,M=new ar,_=new ar;function S(e){M.fromArray(i,3*e),_.copy(M);const t=c[e];b.copy(t),b.sub(M.multiplyScalar(M.dot(t))).normalize(),w.crossVectors(_,t);const n=w.dot(u[e])<0?-1:1;s[4*e]=b.x,s[4*e+1]=b.y,s[4*e+2]=b.z,s[4*e+3]=n}for(let e=0,t=x.length;e<t;++e){const t=x[e],r=t.start;for(let e=r,i=r+t.count;e<i;e+=3)S(n[e+0]),S(n[e+1]),S(n[e+2])}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(void 0!==t){let n=this.getAttribute("normal");if(void 0===n)n=new ki(new Float32Array(3*t.count),3),this.setAttribute("normal",n);else for(let e=0,t=n.count;e<t;e++)n.setXYZ(e,0,0,0);const r=new ar,i=new ar,o=new ar,a=new ar,s=new ar,c=new ar,u=new ar,l=new ar;if(e)for(let f=0,h=e.count;f<h;f+=3){const h=e.getX(f+0),v=e.getX(f+1),d=e.getX(f+2);r.fromBufferAttribute(t,h),i.fromBufferAttribute(t,v),o.fromBufferAttribute(t,d),u.subVectors(o,i),l.subVectors(r,i),u.cross(l),a.fromBufferAttribute(n,h),s.fromBufferAttribute(n,v),c.fromBufferAttribute(n,d),a.add(u),s.add(u),c.add(u),n.setXYZ(h,a.x,a.y,a.z),n.setXYZ(v,s.x,s.y,s.z),n.setXYZ(d,c.x,c.y,c.z)}else for(let e=0,a=t.count;e<a;e+=3)r.fromBufferAttribute(t,e+0),i.fromBufferAttribute(t,e+1),o.fromBufferAttribute(t,e+2),u.subVectors(o,i),l.subVectors(r,i),u.cross(l),n.setXYZ(e+0,u.x,u.y,u.z),n.setXYZ(e+1,u.x,u.y,u.z),n.setXYZ(e+2,u.x,u.y,u.z);this.normalizeNormals(),n.needsUpdate=!0}}merge(e,t){if(!e||!e.isBufferGeometry)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e);void 0===t&&(t=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));const n=this.attributes;for(const r in n){if(void 0===e.attributes[r])continue;const i=n[r].array,o=e.attributes[r],a=o.array,s=o.itemSize*t,c=Math.min(a.length,i.length-s);for(let e=0,t=s;e<c;e++,t++)i[t]=a[e]}return this}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)no.fromBufferAttribute(e,t),no.normalize(),e.setXYZ(t,no.x,no.y,no.z)}toNonIndexed(){function e(e,t){const n=e.array,r=e.itemSize,i=e.normalized,o=new n.constructor(t.length*r);let a=0,s=0;for(let e=0,i=t.length;e<i;e++){a=t[e]*r;for(let e=0;e<r;e++)o[s++]=n[a++]}return new ki(o,r,i)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new ro,n=this.index.array,r=this.attributes;for(const i in r){const o=e(r[i],n);t.setAttribute(i,o)}const i=this.morphAttributes;for(const r in i){const o=[],a=i[r];for(let t=0,r=a.length;t<r;t++){const r=e(a[t],n);o.push(r)}t.morphAttributes[r]=o}t.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let e=0,n=o.length;e<n;e++){const n=o[e];t.addGroup(n.start,n.count,n.materialIndex)}return t}toJSON(){const e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const t in n){const r=n[t];e.data.attributes[t]=r.toJSON(e.data)}const r={};let i=!1;for(const t in this.morphAttributes){const n=this.morphAttributes[t],o=[];for(let t=0,r=n.length;t<r;t++){const r=n[t];o.push(r.toJSON(e.data))}o.length>0&&(r[t]=o,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return null!==a&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return(new ro).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;null!==n&&this.setIndex(n.clone(t));const r=e.attributes;for(const e in r){const n=r[e];this.setAttribute(e,n.clone(t))}const i=e.morphAttributes;for(const e in i){const n=[],r=i[e];for(let e=0,i=r.length;e<i;e++)n.push(r[e].clone(t));this.morphAttributes[e]=n}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let e=0,t=o.length;e<t;e++){const t=o[e];this.addGroup(t.start,t.count,t.materialIndex)}const a=e.boundingBox;null!==a&&(this.boundingBox=a.clone());const s=e.boundingSphere;return null!==s&&(this.boundingSphere=s.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}ro.prototype.isBufferGeometry=!0;const io=new Fr,oo=new kr,ao=new Er,so=new ar,co=new ar,uo=new ar,lo=new ar,fo=new ar,ho=new ar,vo=new ar,po=new ar,mo=new ar,yo=new Xn,go=new Xn,xo=new Xn,bo=new ar,wo=new ar;class Mo extends ci{constructor(e=new ro,t=new Oi){super(),this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(e,t){const n=this.geometry,r=this.material,i=this.matrixWorld;if(void 0===r)return;if(null===n.boundingSphere&&n.computeBoundingSphere(),ao.copy(n.boundingSphere),ao.applyMatrix4(i),!1===e.ray.intersectsSphere(ao))return;if(io.copy(i).invert(),oo.copy(e.ray).applyMatrix4(io),null!==n.boundingBox&&!1===oo.intersectsBox(n.boundingBox))return;let o;if(n.isBufferGeometry){const i=n.index,a=n.attributes.position,s=n.morphAttributes.position,c=n.morphTargetsRelative,u=n.attributes.uv,l=n.attributes.uv2,f=n.groups,h=n.drawRange;if(null!==i)if(Array.isArray(r))for(let n=0,v=f.length;n<v;n++){const v=f[n],d=r[v.materialIndex];for(let n=Math.max(v.start,h.start),r=Math.min(v.start+v.count,h.start+h.count);n<r;n+=3){const r=i.getX(n),f=i.getX(n+1),h=i.getX(n+2);o=_o(this,d,e,oo,a,s,c,u,l,r,f,h),o&&(o.faceIndex=Math.floor(n/3),o.face.materialIndex=v.materialIndex,t.push(o))}}else for(let n=Math.max(0,h.start),f=Math.min(i.count,h.start+h.count);n<f;n+=3){const f=i.getX(n),h=i.getX(n+1),v=i.getX(n+2);o=_o(this,r,e,oo,a,s,c,u,l,f,h,v),o&&(o.faceIndex=Math.floor(n/3),t.push(o))}else if(void 0!==a)if(Array.isArray(r))for(let n=0,i=f.length;n<i;n++){const i=f[n],v=r[i.materialIndex];for(let n=Math.max(i.start,h.start),r=Math.min(i.start+i.count,h.start+h.count);n<r;n+=3)o=_o(this,v,e,oo,a,s,c,u,l,n,n+1,n+2),o&&(o.faceIndex=Math.floor(n/3),o.face.materialIndex=i.materialIndex,t.push(o))}else for(let n=Math.max(0,h.start),i=Math.min(a.count,h.start+h.count);n<i;n+=3)o=_o(this,r,e,oo,a,s,c,u,l,n,n+1,n+2),o&&(o.faceIndex=Math.floor(n/3),t.push(o))}else n.isGeometry&&console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}function _o(e,t,n,r,i,o,a,s,c,u,l,f){so.fromBufferAttribute(i,u),co.fromBufferAttribute(i,l),uo.fromBufferAttribute(i,f);const h=e.morphTargetInfluences;if(t.morphTargets&&o&&h){vo.set(0,0,0),po.set(0,0,0),mo.set(0,0,0);for(let e=0,t=o.length;e<t;e++){const t=h[e],n=o[e];0!==t&&(lo.fromBufferAttribute(n,u),fo.fromBufferAttribute(n,l),ho.fromBufferAttribute(n,f),a?(vo.addScaledVector(lo,t),po.addScaledVector(fo,t),mo.addScaledVector(ho,t)):(vo.addScaledVector(lo.sub(so),t),po.addScaledVector(fo.sub(co),t),mo.addScaledVector(ho.sub(uo),t)))}so.add(vo),co.add(po),uo.add(mo)}e.isSkinnedMesh&&t.skinning&&(e.boneTransform(u,so),e.boneTransform(l,co),e.boneTransform(f,uo));const v=function(e,t,n,r,i,o,a,s){let c;if(c=t.side===p?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,t.side!==m,s),null===c)return null;wo.copy(s),wo.applyMatrix4(e.matrixWorld);const u=n.ray.origin.distanceTo(wo);return u<n.near||u>n.far?null:{distance:u,point:wo.clone(),object:e}}(e,t,n,r,so,co,uo,bo);if(v){s&&(yo.fromBufferAttribute(s,u),go.fromBufferAttribute(s,l),xo.fromBufferAttribute(s,f),v.uv=_i.getUV(bo,so,co,uo,yo,go,xo,new Xn)),c&&(yo.fromBufferAttribute(c,u),go.fromBufferAttribute(c,l),xo.fromBufferAttribute(c,f),v.uv2=_i.getUV(bo,so,co,uo,yo,go,xo,new Xn));const e={a:u,b:l,c:f,normal:new ar,materialIndex:0};_i.getNormal(so,co,uo,e.normal),v.face=e}return v}Mo.prototype.isMesh=!0;class So extends ro{constructor(e=1,t=1,n=1,r=1,i=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};const a=this;r=Math.floor(r),i=Math.floor(i),o=Math.floor(o);const s=[],c=[],u=[],l=[];let f=0,h=0;function v(e,t,n,r,i,o,v,d,p,m,y){const g=o/p,x=v/m,b=o/2,w=v/2,M=d/2,_=p+1,S=m+1;let P=0,T=0;const R=new ar;for(let o=0;o<S;o++){const a=o*x-w;for(let s=0;s<_;s++){const f=s*g-b;R[e]=f*r,R[t]=a*i,R[n]=M,c.push(R.x,R.y,R.z),R[e]=0,R[t]=0,R[n]=d>0?1:-1,u.push(R.x,R.y,R.z),l.push(s/p),l.push(1-o/m),P+=1}}for(let e=0;e<m;e++)for(let t=0;t<p;t++){const n=f+t+_*e,r=f+t+_*(e+1),i=f+(t+1)+_*(e+1),o=f+(t+1)+_*e;s.push(n,r,o),s.push(r,i,o),T+=6}a.addGroup(h,T,y),h+=T,f+=P}v("z","y","x",-1,-1,n,t,e,o,i,0),v("z","y","x",1,-1,n,t,-e,o,i,1),v("x","z","y",1,1,e,n,t,r,o,2),v("x","z","y",1,-1,e,n,-t,r,o,3),v("x","y","z",1,-1,e,t,n,r,i,4),v("x","y","z",-1,-1,e,t,-n,r,i,5),this.setIndex(s),this.setAttribute("position",new Wi(c,3)),this.setAttribute("normal",new Wi(u,3)),this.setAttribute("uv",new Wi(l,2))}}function Po(e){const t={};for(const n in e){t[n]={};for(const r in e[n]){const i=e[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?t[n][r]=i.clone():Array.isArray(i)?t[n][r]=i.slice():t[n][r]=i}}return t}function To(e){const t={};for(let n=0;n<e.length;n++){const r=Po(e[n]);for(const e in r)t[e]=r[e]}return t}const Ro={clone:Po,merge:To};class Eo extends Pi{constructor(e){super(),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,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==e&&(void 0!==e.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Po(e.uniforms),this.defines=Object.assign({},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=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const n in this.uniforms){const r=this.uniforms[n].value;r&&r.isTexture?t.uniforms[n]={type:"t",value:r.toJSON(e).uuid}:r&&r.isColor?t.uniforms[n]={type:"c",value:r.getHex()}:r&&r.isVector2?t.uniforms[n]={type:"v2",value:r.toArray()}:r&&r.isVector3?t.uniforms[n]={type:"v3",value:r.toArray()}:r&&r.isVector4?t.uniforms[n]={type:"v4",value:r.toArray()}:r&&r.isMatrix3?t.uniforms[n]={type:"m3",value:r.toArray()}:r&&r.isMatrix4?t.uniforms[n]={type:"m4",value:r.toArray()}:t.uniforms[n]={value:r}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;const n={};for(const e in this.extensions)!0===this.extensions[e]&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}Eo.prototype.isShaderMaterial=!0;class zo extends ci{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new Fr,this.projectionMatrix=new Fr,this.projectionMatrixInverse=new Fr}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new ar),this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}zo.prototype.isCamera=!0;class Lo extends zo{constructor(e=50,t=1,n=.1,r=2e3){super(),this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),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(e){const t=.5*this.getFilmHeight()/e;this.fov=2*Bn*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*Un*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*Bn*Math.atan(Math.tan(.5*Un*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,r,i,o){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*Un*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r;const o=this.view;if(null!==this.view&&this.view.enabled){const e=o.fullWidth,a=o.fullHeight;i+=o.offsetX*r/e,t-=o.offsetY*n/a,r*=o.width/e,n*=o.height/a}const a=this.filmOffset;0!==a&&(i+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(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}}Lo.prototype.isPerspectiveCamera=!0;const Co=90;class Ao extends ci{constructor(e,t,n){if(super(),this.type="CubeCamera",!0!==n.isWebGLCubeRenderTarget)return void console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");this.renderTarget=n;const r=new Lo(Co,1,e,t);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new ar(1,0,0)),this.add(r);const i=new Lo(Co,1,e,t);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new ar(-1,0,0)),this.add(i);const o=new Lo(Co,1,e,t);o.layers=this.layers,o.up.set(0,0,1),o.lookAt(new ar(0,1,0)),this.add(o);const a=new Lo(Co,1,e,t);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(new ar(0,-1,0)),this.add(a);const s=new Lo(Co,1,e,t);s.layers=this.layers,s.up.set(0,-1,0),s.lookAt(new ar(0,0,1)),this.add(s);const c=new Lo(Co,1,e,t);c.layers=this.layers,c.up.set(0,-1,0),c.lookAt(new ar(0,0,-1)),this.add(c)}update(e,t){null===this.parent&&this.updateMatrixWorld();const n=this.renderTarget,[r,i,o,a,s,c]=this.children,u=e.xr.enabled,l=e.getRenderTarget();e.xr.enabled=!1;const f=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,r),e.setRenderTarget(n,1),e.render(t,i),e.setRenderTarget(n,2),e.render(t,o),e.setRenderTarget(n,3),e.render(t,a),e.setRenderTarget(n,4),e.render(t,s),n.texture.generateMipmaps=f,e.setRenderTarget(n,5),e.render(t,c),e.setRenderTarget(l),e.xr.enabled=u}}class Oo extends er{constructor(e,t,n,r,i,o,a,s,c,u){super(e=void 0!==e?e:[],t=void 0!==t?t:oe,n,r,i,o,a=void 0!==a?a:Fe,s,c,u),this._needsFlipEnvMap=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}Oo.prototype.isCubeTexture=!0;class Do extends rr{constructor(e,t,n){Number.isInteger(t)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),t=n),super(e,e,t),t=t||{},this.texture=new Oo(void 0,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:xe,this.texture._needsFlipEnvMap=!1}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.format=je,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={tEquirect:{value:null}},r="\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",i="\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t",o=new So(5,5,5),a=new Eo({name:"CubemapFromEquirect",uniforms:Po(n),vertexShader:r,fragmentShader:i,side:p,blending:x});a.uniforms.tEquirect.value=t;const s=new Mo(o,a),c=t.minFilter;return t.minFilter===Me&&(t.minFilter=xe),new Ao(1,10,this).update(e,s),t.minFilter=c,s.geometry.dispose(),s.material.dispose(),this}clear(e,t,n,r){const i=e.getRenderTarget();for(let i=0;i<6;i++)e.setRenderTarget(this,i),e.clear(t,n,r);e.setRenderTarget(i)}}Do.prototype.isWebGLCubeRenderTarget=!0;class Io extends er{constructor(e,t,n,r,i,o,a,s,c,u,l,f){super(null,o,a,s,c,u,r,i,l,f),this.image={data:e||null,width:t||1,height:n||1},this.magFilter=void 0!==c?c:de,this.minFilter=void 0!==u?u:de,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}Io.prototype.isDataTexture=!0;const ko=new Er,Fo=new ar;class jo{constructor(e=new hi,t=new hi,n=new hi,r=new hi,i=new hi,o=new hi){this.planes=[e,t,n,r,i,o]}set(e,t,n,r,i,o){const 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}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){const t=this.planes,n=e.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],u=n[6],l=n[7],f=n[8],h=n[9],v=n[10],d=n[11],p=n[12],m=n[13],y=n[14],g=n[15];return t[0].setComponents(a-r,l-s,d-f,g-p).normalize(),t[1].setComponents(a+r,l+s,d+f,g+p).normalize(),t[2].setComponents(a+i,l+c,d+h,g+m).normalize(),t[3].setComponents(a-i,l-c,d-h,g-m).normalize(),t[4].setComponents(a-o,l-u,d-v,g-y).normalize(),t[5].setComponents(a+o,l+u,d+v,g+y).normalize(),this}intersectsObject(e){const t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),ko.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(ko)}intersectsSprite(e){return ko.center.set(0,0,0),ko.radius=.7071067811865476,ko.applyMatrix4(e.matrixWorld),this.intersectsSphere(ko)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let e=0;e<6;e++)if(t[e].distanceToPoint(n)<r)return!1;return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const r=t[n];if(Fo.x=r.normal.x>0?e.max.x:e.min.x,Fo.y=r.normal.y>0?e.max.y:e.min.y,Fo.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Fo)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function Uo(){let e=null,t=!1,n=null,r=null;function i(t,o){n(t,o),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function Bo(e,t){const n=t.isWebGL2,r=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);const n=r.get(t);n&&(e.deleteBuffer(n.buffer),r.delete(t))},update:function(t,i){if(t.isGLBufferAttribute){const e=r.get(t);return void((!e||e.version<t.version)&&r.set(t,{buffer:t.buffer,type:t.type,bytesPerElement:t.elementSize,version:t.version}))}t.isInterleavedBufferAttribute&&(t=t.data);const o=r.get(t);void 0===o?r.set(t,function(t,r){const i=t.array,o=t.usage,a=e.createBuffer();e.bindBuffer(r,a),e.bufferData(r,i,o),t.onUploadCallback();let s=5126;return i instanceof Float32Array?s=5126:i instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):i instanceof Uint16Array?t.isFloat16BufferAttribute?n?s=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):s=5123:i instanceof Int16Array?s=5122:i instanceof Uint32Array?s=5125:i instanceof Int32Array?s=5124:i instanceof Int8Array?s=5120:i instanceof Uint8Array&&(s=5121),{buffer:a,type:s,bytesPerElement:i.BYTES_PER_ELEMENT,version:t.version}}(t,i)):o.version<t.version&&(function(t,r,i){const o=r.array,a=r.updateRange;e.bindBuffer(i,t),-1===a.count?e.bufferSubData(i,0,o):(n?e.bufferSubData(i,a.offset*o.BYTES_PER_ELEMENT,o,a.offset,a.count):e.bufferSubData(i,a.offset*o.BYTES_PER_ELEMENT,o.subarray(a.offset,a.offset+a.count)),a.count=-1)}(o.buffer,t,i),o.version=t.version)}}}class Go extends ro{constructor(e=1,t=1,n=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r};const i=e/2,o=t/2,a=Math.floor(n),s=Math.floor(r),c=a+1,u=s+1,l=e/a,f=t/s,h=[],v=[],d=[],p=[];for(let e=0;e<u;e++){const t=e*f-o;for(let n=0;n<c;n++){const r=n*l-i;v.push(r,-t,0),d.push(0,0,1),p.push(n/a),p.push(1-e/s)}}for(let e=0;e<s;e++)for(let t=0;t<a;t++){const n=t+c*e,r=t+c*(e+1),i=t+1+c*(e+1),o=t+1+c*e;h.push(n,r,o),h.push(r,i,o)}this.setIndex(h),this.setAttribute("position",new Wi(v,3)),this.setAttribute("normal",new Wi(d,3)),this.setAttribute("uv",new Wi(p,2))}}const No={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif",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( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\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\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\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}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\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 vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( 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}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\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#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif",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, float faceDirection ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\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 ) * faceDirection;\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",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement(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}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\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#ifdef CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\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}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_maxMipLevel 8.0\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_maxTileSize 256.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );\n\t\tvec2 f = fract( uv );\n\t\tuv += 0.5 - f;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tif ( mipInt < cubeUV_maxMipLevel ) {\n\t\t\tuv.y += 2.0 * cubeUV_maxTileSize;\n\t\t}\n\t\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\n\t\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\n\t\tuv *= texelSize;\n\t\tvec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x += texelSize;\n\t\tvec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.y += texelSize;\n\t\tvec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x -= texelSize;\n\t\tvec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tvec3 tm = mix( tl, tr, f.x );\n\t\tvec3 bm = mix( bl, br, f.x );\n\t\treturn mix( tm, bm, f.y );\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn 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.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn 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.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n\treturn 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\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn 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\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, 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, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\tenvColor = envMapTexelToLinear( envColor );\n\t#endif\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",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = 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\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 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 roughness, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = 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\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\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",fog_vertex:"#ifdef USE_FOG\n\tfogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\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",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn texture2D( gradientMap, coord ).rgb;\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n#endif",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 = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\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\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\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\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\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\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\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};\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};\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\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\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};\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 ( angleCos > spotLight.coneCos ) {\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_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\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",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * 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}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\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)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\n#ifdef REFLECTIVITY\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheen;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat specularRoughness;\n\tvec3 specularColor;\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 sheenColor;\n#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}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(    0, 1,    0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\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#ifdef CLEARCOAT\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tccIrradiance *= PI;\n\t\t#endif\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\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 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\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}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * 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 defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\t#ifdef CLEARCOAT\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifndef USE_MORPHNORMALS\n\t\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\t\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#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 );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\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}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\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\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\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( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), 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( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), 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 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t  f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t  f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\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, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\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",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\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 highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\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",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\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",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\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",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\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3(  1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108,  1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605,  1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmissionmap_fragment:"#ifdef USE_TRANSMISSIONMAP\n\ttotalTransmission *= texture2D( transmissionMap, vUv ).r;\n#endif",transmissionmap_pars_fragment:"#ifdef USE_TRANSMISSIONMAP\n\tuniform sampler2D transmissionMap;\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).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\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",cube_frag:"#include <envmap_common_pars_fragment>\nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include <envmap_fragment>\n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\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>\nvarying vec2 vHighPrecisionZW;\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\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\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>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\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 <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\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\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\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 <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_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 = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\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 <fog_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\t#include <fog_vertex>\n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\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_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\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\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\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 <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\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_begin>\n#include <color_pars_vertex>\n#include <fog_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\t#include <fog_vertex>\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_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 <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_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 <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#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\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 <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_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 <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\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 <fog_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 <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_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\t#include <fog_vertex>\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 <dithering_pars_fragment>\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_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\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_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\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 <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\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 <fog_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 <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_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\t#include <fog_vertex>\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define REFLECTIVITY\n\t#define CLEARCOAT\n\t#define TRANSMISSION\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef TRANSMISSION\n\tuniform float transmission;\n#endif\n#ifdef REFLECTIVITY\n\tuniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\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 <transmissionmap_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_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#ifdef TRANSMISSION\n\t\tfloat totalTransmission = transmission;\n\t#endif\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 <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <transmissionmap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#ifdef TRANSMISSION\n\t\tdiffuseColor.a *= mix( saturate( 1. - totalTransmission + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) ), 1.0, metalness );\n\t#endif\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\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 <fog_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\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_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\t#include <fog_vertex>\n}",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#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 <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\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_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 <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_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 <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_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 <shadowmap_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}"},Ho={common:{diffuse:{value:new Ai(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new Kn},uv2Transform:{value:new Kn},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new Xn(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Ai(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Ai(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new Kn}},sprite:{diffuse:{value:new Ai(15658734)},opacity:{value:1},center:{value:new Xn(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new Kn}}},Vo={basic:{uniforms:To([Ho.common,Ho.specularmap,Ho.envmap,Ho.aomap,Ho.lightmap,Ho.fog]),vertexShader:No.meshbasic_vert,fragmentShader:No.meshbasic_frag},lambert:{uniforms:To([Ho.common,Ho.specularmap,Ho.envmap,Ho.aomap,Ho.lightmap,Ho.emissivemap,Ho.fog,Ho.lights,{emissive:{value:new Ai(0)}}]),vertexShader:No.meshlambert_vert,fragmentShader:No.meshlambert_frag},phong:{uniforms:To([Ho.common,Ho.specularmap,Ho.envmap,Ho.aomap,Ho.lightmap,Ho.emissivemap,Ho.bumpmap,Ho.normalmap,Ho.displacementmap,Ho.fog,Ho.lights,{emissive:{value:new Ai(0)},specular:{value:new Ai(1118481)},shininess:{value:30}}]),vertexShader:No.meshphong_vert,fragmentShader:No.meshphong_frag},standard:{uniforms:To([Ho.common,Ho.envmap,Ho.aomap,Ho.lightmap,Ho.emissivemap,Ho.bumpmap,Ho.normalmap,Ho.displacementmap,Ho.roughnessmap,Ho.metalnessmap,Ho.fog,Ho.lights,{emissive:{value:new Ai(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:No.meshphysical_vert,fragmentShader:No.meshphysical_frag},toon:{uniforms:To([Ho.common,Ho.aomap,Ho.lightmap,Ho.emissivemap,Ho.bumpmap,Ho.normalmap,Ho.displacementmap,Ho.gradientmap,Ho.fog,Ho.lights,{emissive:{value:new Ai(0)}}]),vertexShader:No.meshtoon_vert,fragmentShader:No.meshtoon_frag},matcap:{uniforms:To([Ho.common,Ho.bumpmap,Ho.normalmap,Ho.displacementmap,Ho.fog,{matcap:{value:null}}]),vertexShader:No.meshmatcap_vert,fragmentShader:No.meshmatcap_frag},points:{uniforms:To([Ho.points,Ho.fog]),vertexShader:No.points_vert,fragmentShader:No.points_frag},dashed:{uniforms:To([Ho.common,Ho.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:No.linedashed_vert,fragmentShader:No.linedashed_frag},depth:{uniforms:To([Ho.common,Ho.displacementmap]),vertexShader:No.depth_vert,fragmentShader:No.depth_frag},normal:{uniforms:To([Ho.common,Ho.bumpmap,Ho.normalmap,Ho.displacementmap,{opacity:{value:1}}]),vertexShader:No.normal_vert,fragmentShader:No.normal_frag},sprite:{uniforms:To([Ho.sprite,Ho.fog]),vertexShader:No.sprite_vert,fragmentShader:No.sprite_frag},background:{uniforms:{uvTransform:{value:new Kn},t2D:{value:null}},vertexShader:No.background_vert,fragmentShader:No.background_frag},cube:{uniforms:To([Ho.envmap,{opacity:{value:1}}]),vertexShader:No.cube_vert,fragmentShader:No.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:No.equirect_vert,fragmentShader:No.equirect_frag},distanceRGBA:{uniforms:To([Ho.common,Ho.displacementmap,{referencePosition:{value:new ar},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:No.distanceRGBA_vert,fragmentShader:No.distanceRGBA_frag},shadow:{uniforms:To([Ho.lights,Ho.fog,{color:{value:new Ai(0)},opacity:{value:1}}]),vertexShader:No.shadow_vert,fragmentShader:No.shadow_frag}};function Wo(e,t,n,r,i){const o=new Ai(0);let a,s,c=0,u=null,l=0,f=null;function h(e,t){n.buffers.color.setClear(e.r,e.g,e.b,t,i)}return{getClearColor:function(){return o},setClearColor:function(e,t=1){o.set(e),c=t,h(o,c)},getClearAlpha:function(){return c},setClearAlpha:function(e){c=e,h(o,c)},render:function(n,i,v,m){let y=!0===i.isScene?i.background:null;y&&y.isTexture&&(y=t.get(y));const g=e.xr,x=g.getSession&&g.getSession();x&&"additive"===x.environmentBlendMode&&(y=null),null===y?h(o,c):y&&y.isColor&&(h(y,1),m=!0),(e.autoClear||m)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),y&&(y.isCubeTexture||y.mapping===ue)?(void 0===s&&(s=new Mo(new So(1,1,1),new Eo({name:"BackgroundCubeMaterial",uniforms:Po(Vo.cube.uniforms),vertexShader:Vo.cube.vertexShader,fragmentShader:Vo.cube.fragmentShader,side:p,depthTest:!1,depthWrite:!1,fog:!1})),s.geometry.deleteAttribute("normal"),s.geometry.deleteAttribute("uv"),s.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(s.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(s)),s.material.uniforms.envMap.value=y,s.material.uniforms.flipEnvMap.value=y.isCubeTexture&&y._needsFlipEnvMap?-1:1,u===y&&l===y.version&&f===e.toneMapping||(s.material.needsUpdate=!0,u=y,l=y.version,f=e.toneMapping),n.unshift(s,s.geometry,s.material,0,0,null)):y&&y.isTexture&&(void 0===a&&(a=new Mo(new Go(2,2),new Eo({name:"BackgroundMaterial",uniforms:Po(Vo.background.uniforms),vertexShader:Vo.background.vertexShader,fragmentShader:Vo.background.fragmentShader,side:d,depthTest:!1,depthWrite:!1,fog:!1})),a.geometry.deleteAttribute("normal"),Object.defineProperty(a.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(a)),a.material.uniforms.t2D.value=y,!0===y.matrixAutoUpdate&&y.updateMatrix(),a.material.uniforms.uvTransform.value.copy(y.matrix),u===y&&l===y.version&&f===e.toneMapping||(a.material.needsUpdate=!0,u=y,l=y.version,f=e.toneMapping),n.unshift(a,a.geometry,a.material,0,0,null))}}}function Zo(e,t,n,r){const i=e.getParameter(34921),o=r.isWebGL2?null:t.get("OES_vertex_array_object"),a=r.isWebGL2||null!==o,s={},c=h(null);let u=c;function l(t){return r.isWebGL2?e.bindVertexArray(t):o.bindVertexArrayOES(t)}function f(t){return r.isWebGL2?e.deleteVertexArray(t):o.deleteVertexArrayOES(t)}function h(e){const t=[],n=[],r=[];for(let e=0;e<i;e++)t[e]=0,n[e]=0,r[e]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:n,attributeDivisors:r,object:e,attributes:{},index:null}}function v(){const e=u.newAttributes;for(let t=0,n=e.length;t<n;t++)e[t]=0}function d(e){p(e,0)}function p(n,i){const o=u.newAttributes,a=u.enabledAttributes,s=u.attributeDivisors;o[n]=1,0===a[n]&&(e.enableVertexAttribArray(n),a[n]=1),s[n]!==i&&((r.isWebGL2?e:t.get("ANGLE_instanced_arrays"))[r.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,i),s[n]=i)}function m(){const t=u.newAttributes,n=u.enabledAttributes;for(let r=0,i=n.length;r<i;r++)n[r]!==t[r]&&(e.disableVertexAttribArray(r),n[r]=0)}function y(t,n,i,o,a,s){!0!==r.isWebGL2||5124!==i&&5125!==i?e.vertexAttribPointer(t,n,i,o,a,s):e.vertexAttribIPointer(t,n,i,a,s)}function g(){x(),u!==c&&(u=c,l(u.object))}function x(){c.geometry=null,c.program=null,c.wireframe=!1}return{setup:function(i,c,f,g,x){let b=!1;if(a){const t=function(t,n,i){const a=!0===i.wireframe;let c=s[t.id];void 0===c&&(c={},s[t.id]=c);let u=c[n.id];void 0===u&&(u={},c[n.id]=u);let l=u[a];return void 0===l&&(l=h(r.isWebGL2?e.createVertexArray():o.createVertexArrayOES()),u[a]=l),l}(g,f,c);u!==t&&(u=t,l(u.object)),b=function(e,t){const n=u.attributes,r=e.attributes;let i=0;for(const e in r){const t=n[e],o=r[e];if(void 0===t)return!0;if(t.attribute!==o)return!0;if(t.data!==o.data)return!0;i++}return u.attributesNum!==i||u.index!==t}(g,x),b&&function(e,t){const n={},r=e.attributes;let i=0;for(const e in r){const t=r[e],o={};o.attribute=t,t.data&&(o.data=t.data),n[e]=o,i++}u.attributes=n,u.attributesNum=i,u.index=t}(g,x)}else{const e=!0===c.wireframe;u.geometry===g.id&&u.program===f.id&&u.wireframe===e||(u.geometry=g.id,u.program=f.id,u.wireframe=e,b=!0)}!0===i.isInstancedMesh&&(b=!0),null!==x&&n.update(x,34963),b&&(function(i,o,a,s){if(!1===r.isWebGL2&&(i.isInstancedMesh||s.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;v();const c=s.attributes,u=a.getAttributes(),l=o.defaultAttributeValues;for(const t in u){const r=u[t];if(r>=0){const o=c[t];if(void 0!==o){const t=o.normalized,i=o.itemSize,a=n.get(o);if(void 0===a)continue;const c=a.buffer,u=a.type,l=a.bytesPerElement;if(o.isInterleavedBufferAttribute){const n=o.data,a=n.stride,f=o.offset;n&&n.isInstancedInterleavedBuffer?(p(r,n.meshPerAttribute),void 0===s._maxInstanceCount&&(s._maxInstanceCount=n.meshPerAttribute*n.count)):d(r),e.bindBuffer(34962,c),y(r,i,u,t,a*l,f*l)}else o.isInstancedBufferAttribute?(p(r,o.meshPerAttribute),void 0===s._maxInstanceCount&&(s._maxInstanceCount=o.meshPerAttribute*o.count)):d(r),e.bindBuffer(34962,c),y(r,i,u,t,0,0)}else if("instanceMatrix"===t){const t=n.get(i.instanceMatrix);if(void 0===t)continue;const o=t.buffer,a=t.type;p(r+0,1),p(r+1,1),p(r+2,1),p(r+3,1),e.bindBuffer(34962,o),e.vertexAttribPointer(r+0,4,a,!1,64,0),e.vertexAttribPointer(r+1,4,a,!1,64,16),e.vertexAttribPointer(r+2,4,a,!1,64,32),e.vertexAttribPointer(r+3,4,a,!1,64,48)}else if("instanceColor"===t){const t=n.get(i.instanceColor);if(void 0===t)continue;const o=t.buffer,a=t.type;p(r,1),e.bindBuffer(34962,o),e.vertexAttribPointer(r,3,a,!1,12,0)}else if(void 0!==l){const n=l[t];if(void 0!==n)switch(n.length){case 2:e.vertexAttrib2fv(r,n);break;case 3:e.vertexAttrib3fv(r,n);break;case 4:e.vertexAttrib4fv(r,n);break;default:e.vertexAttrib1fv(r,n)}}}}m()}(i,c,f,g),null!==x&&e.bindBuffer(34963,n.get(x).buffer))},reset:g,resetDefaultState:x,dispose:function(){g();for(const e in s){const t=s[e];for(const e in t){const n=t[e];for(const e in n)f(n[e].object),delete n[e];delete t[e]}delete s[e]}},releaseStatesOfGeometry:function(e){if(void 0===s[e.id])return;const t=s[e.id];for(const e in t){const n=t[e];for(const e in n)f(n[e].object),delete n[e];delete t[e]}delete s[e.id]},releaseStatesOfProgram:function(e){for(const t in s){const n=s[t];if(void 0===n[e.id])continue;const r=n[e.id];for(const e in r)f(r[e].object),delete r[e];delete n[e.id]}},initAttributes:v,enableAttribute:d,disableUnusedAttributes:m}}function qo(e,t,n,r){const i=r.isWebGL2;let o;this.setMode=function(e){o=e},this.render=function(t,r){e.drawArrays(o,t,r),n.update(r,o,1)},this.renderInstances=function(r,a,s){if(0===s)return;let c,u;if(i)c=e,u="drawArraysInstanced";else if(c=t.get("ANGLE_instanced_arrays"),u="drawArraysInstancedANGLE",null===c)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");c[u](o,r,a,s),n.update(a,o,s)}}function Yo(e,t,n){let r;function i(t){if("highp"===t){if(e.getShaderPrecisionFormat(35633,36338).precision>0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const o="undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||"undefined"!=typeof WebGL2ComputeRenderingContext&&e instanceof WebGL2ComputeRenderingContext;let a=void 0!==n.precision?n.precision:"highp";const s=i(a);s!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",s,"instead."),a=s);const c=!0===n.logarithmicDepthBuffer,u=e.getParameter(34930),l=e.getParameter(35660),f=e.getParameter(3379),h=e.getParameter(34076),v=e.getParameter(34921),d=e.getParameter(36347),p=e.getParameter(36348),m=e.getParameter(36349),y=l>0,g=o||t.has("OES_texture_float");return{isWebGL2:o,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const n=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:i,precision:a,logarithmicDepthBuffer:c,maxTextures:u,maxVertexTextures:l,maxTextureSize:f,maxCubemapSize:h,maxAttributes:v,maxVertexUniforms:d,maxVaryings:p,maxFragmentUniforms:m,vertexTextures:y,floatFragmentTextures:g,floatVertexTextures:y&&g,maxSamples:o?e.getParameter(36183):0}}function Xo(e){const t=this;let n=null,r=0,i=!1,o=!1;const a=new hi,s=new Kn,c={value:null,needsUpdate:!1};function u(){c.value!==n&&(c.value=n,c.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0}function l(e,n,r,i){const o=null!==e?e.length:0;let u=null;if(0!==o){if(u=c.value,!0!==i||null===u){const t=r+4*o,i=n.matrixWorldInverse;s.getNormalMatrix(i),(null===u||u.length<t)&&(u=new Float32Array(t));for(let t=0,n=r;t!==o;++t,n+=4)a.copy(e[t]).applyMatrix4(i,s),a.normal.toArray(u,n),u[n+3]=a.constant}c.value=u,c.needsUpdate=!0}return t.numPlanes=o,t.numIntersection=0,u}this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t,o){const a=0!==e.length||t||0!==r||i;return i=t,n=l(e,o,0),r=e.length,a},this.beginShadows=function(){o=!0,l(null)},this.endShadows=function(){o=!1,u()},this.setState=function(t,a,s){const f=t.clippingPlanes,h=t.clipIntersection,v=t.clipShadows,d=e.get(t);if(!i||null===f||0===f.length||o&&!v)o?l(null):u();else{const e=o?0:r,t=4*e;let i=d.clippingState||null;c.value=i,i=l(f,a,t,s);for(let e=0;e!==t;++e)i[e]=n[e];d.clippingState=i,this.numIntersection=h?this.numPlanes:0,this.numPlanes+=e}}}function Ko(e){let t=new WeakMap;function n(e,t){return t===se?e.mapping=oe:t===ce&&(e.mapping=ae),e}function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){const o=i.mapping;if(o===se||o===ce){if(t.has(i))return n(t.get(i).texture,i.mapping);{const o=i.image;if(o&&o.height>0){const a=e.getRenderTarget(),s=new Do(o.height/2);return s.fromEquirectangularTexture(e,i),t.set(i,s),e.setRenderTarget(a),i.addEventListener("dispose",r),n(s.texture,i.mapping)}return null}}}return i},dispose:function(){t=new WeakMap}}}function Qo(e){const t={};function n(n){if(void 0!==t[n])return t[n];let 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;default:r=e.getExtension(n)}return t[n]=r,r}return{has:function(e){return null!==n(e)},init:function(e){e.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float")},get:function(e){const t=n(e);return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function Jo(e,t,n,r){const i={},o=new WeakMap;function a(e){const s=e.target;null!==s.index&&t.remove(s.index);for(const e in s.attributes)t.remove(s.attributes[e]);s.removeEventListener("dispose",a),delete i[s.id];const c=o.get(s);c&&(t.remove(c),o.delete(s)),r.releaseStatesOfGeometry(s),!0===s.isInstancedBufferGeometry&&delete s._maxInstanceCount,n.memory.geometries--}function s(e){const n=[],r=e.index,i=e.attributes.position;let a=0;if(null!==r){const e=r.array;a=r.version;for(let t=0,r=e.length;t<r;t+=3){const r=e[t+0],i=e[t+1],o=e[t+2];n.push(r,i,i,o,o,r)}}else{const e=i.array;a=i.version;for(let t=0,r=e.length/3-1;t<r;t+=3){const e=t+0,r=t+1,i=t+2;n.push(e,r,r,i,i,e)}}const s=new(qi(n)>65535?Hi:Gi)(n,1);s.version=a;const c=o.get(e);c&&t.remove(c),o.set(e,s)}return{get:function(e,t){return!0===i[t.id]||(t.addEventListener("dispose",a),i[t.id]=!0,n.memory.geometries++),t},update:function(e){const n=e.attributes;for(const e in n)t.update(n[e],34962);const r=e.morphAttributes;for(const e in r){const n=r[e];for(let e=0,r=n.length;e<r;e++)t.update(n[e],34962)}},getWireframeAttribute:function(e){const t=o.get(e);if(t){const n=e.index;null!==n&&t.version<n.version&&s(e)}else s(e);return o.get(e)}}}function $o(e,t,n,r){const i=r.isWebGL2;let o,a,s;this.setMode=function(e){o=e},this.setIndex=function(e){a=e.type,s=e.bytesPerElement},this.render=function(t,r){e.drawElements(o,r,a,t*s),n.update(r,o,1)},this.renderInstances=function(r,c,u){if(0===u)return;let l,f;if(i)l=e,f="drawElementsInstanced";else if(l=t.get("ANGLE_instanced_arrays"),f="drawElementsInstancedANGLE",null===l)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");l[f](o,c,a,r*s,u),n.update(c,o,u)}}function ea(e){const t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.frame++,t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(e,n,r){switch(t.calls++,n){case 4:t.triangles+=r*(e/3);break;case 1:t.lines+=r*(e/2);break;case 3:t.lines+=r*(e-1);break;case 2:t.lines+=r*e;break;case 0:t.points+=r*e;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function ta(e,t){return e[0]-t[0]}function na(e,t){return Math.abs(t[1])-Math.abs(e[1])}function ra(e){const t={},n=new Float32Array(8),r=[];for(let e=0;e<8;e++)r[e]=[e,0];return{update:function(i,o,a,s){const c=i.morphTargetInfluences,u=void 0===c?0:c.length;let l=t[o.id];if(void 0===l){l=[];for(let e=0;e<u;e++)l[e]=[e,0];t[o.id]=l}for(let e=0;e<u;e++){const t=l[e];t[0]=e,t[1]=c[e]}l.sort(na);for(let e=0;e<8;e++)e<u&&l[e][1]?(r[e][0]=l[e][0],r[e][1]=l[e][1]):(r[e][0]=Number.MAX_SAFE_INTEGER,r[e][1]=0);r.sort(ta);const f=a.morphTargets&&o.morphAttributes.position,h=a.morphNormals&&o.morphAttributes.normal;let v=0;for(let e=0;e<8;e++){const t=r[e],i=t[0],a=t[1];i!==Number.MAX_SAFE_INTEGER&&a?(f&&o.getAttribute("morphTarget"+e)!==f[i]&&o.setAttribute("morphTarget"+e,f[i]),h&&o.getAttribute("morphNormal"+e)!==h[i]&&o.setAttribute("morphNormal"+e,h[i]),n[e]=a,v+=a):(f&&!0===o.hasAttribute("morphTarget"+e)&&o.deleteAttribute("morphTarget"+e),h&&!0===o.hasAttribute("morphNormal"+e)&&o.deleteAttribute("morphNormal"+e),n[e]=0)}const d=o.morphTargetsRelative?1:1-v;s.getUniforms().setValue(e,"morphTargetBaseInfluence",d),s.getUniforms().setValue(e,"morphTargetInfluences",n)}}}function ia(e,t,n,r){let i=new WeakMap;function o(e){const t=e.target;t.removeEventListener("dispose",o),n.remove(t.instanceMatrix),null!==t.instanceColor&&n.remove(t.instanceColor)}return{update:function(e){const a=r.render.frame,s=e.geometry,c=t.get(e,s);return i.get(c)!==a&&(t.update(c),i.set(c,a)),e.isInstancedMesh&&(!1===e.hasEventListener("dispose",o)&&e.addEventListener("dispose",o),n.update(e.instanceMatrix,34962),null!==e.instanceColor&&n.update(e.instanceColor,34962)),c},dispose:function(){i=new WeakMap}}}Vo.physical={uniforms:To([Vo.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new Xn(1,1)},clearcoatNormalMap:{value:null},sheen:{value:new Ai(0)},transmission:{value:0},transmissionMap:{value:null}}]),vertexShader:No.meshphysical_vert,fragmentShader:No.meshphysical_frag};class oa extends er{constructor(e=null,t=1,n=1,r=1){super(null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=de,this.minFilter=de,this.wrapR=he,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}oa.prototype.isDataTexture2DArray=!0;class aa extends er{constructor(e=null,t=1,n=1,r=1){super(null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=de,this.minFilter=de,this.wrapR=he,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}aa.prototype.isDataTexture3D=!0;const sa=new er,ca=new oa,ua=new aa,la=new Oo,fa=[],ha=[],va=new Float32Array(16),da=new Float32Array(9),pa=new Float32Array(4);function ma(e,t,n){const r=e[0];if(r<=0||r>0)return e;const i=t*n;let o=fa[i];if(void 0===o&&(o=new Float32Array(i),fa[i]=o),0!==t){r.toArray(o,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(o,i)}return o}function ya(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function ga(e,t){for(let n=0,r=t.length;n<r;n++)e[n]=t[n]}function xa(e,t){let n=ha[t];void 0===n&&(n=new Int32Array(t),ha[t]=n);for(let r=0;r!==t;++r)n[r]=e.allocateTextureUnit();return n}function ba(e,t){const n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function wa(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(ya(n,t))return;e.uniform2fv(this.addr,t),ga(n,t)}}function Ma(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(void 0!==t.r)n[0]===t.r&&n[1]===t.g&&n[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(ya(n,t))return;e.uniform3fv(this.addr,t),ga(n,t)}}function _a(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(ya(n,t))return;e.uniform4fv(this.addr,t),ga(n,t)}}function Sa(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(ya(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),ga(n,t)}else{if(ya(n,r))return;pa.set(r),e.uniformMatrix2fv(this.addr,!1,pa),ga(n,r)}}function Pa(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(ya(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),ga(n,t)}else{if(ya(n,r))return;da.set(r),e.uniformMatrix3fv(this.addr,!1,da),ga(n,r)}}function Ta(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(ya(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),ga(n,t)}else{if(ya(n,r))return;va.set(r),e.uniformMatrix4fv(this.addr,!1,va),ga(n,r)}}function Ra(e,t){const n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function Ea(e,t){const n=this.cache;ya(n,t)||(e.uniform2iv(this.addr,t),ga(n,t))}function za(e,t){const n=this.cache;ya(n,t)||(e.uniform3iv(this.addr,t),ga(n,t))}function La(e,t){const n=this.cache;ya(n,t)||(e.uniform4iv(this.addr,t),ga(n,t))}function Ca(e,t){const n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function Aa(e,t){const n=this.cache;ya(n,t)||(e.uniform2uiv(this.addr,t),ga(n,t))}function Oa(e,t){const n=this.cache;ya(n,t)||(e.uniform3uiv(this.addr,t),ga(n,t))}function Da(e,t){const n=this.cache;ya(n,t)||(e.uniform4uiv(this.addr,t),ga(n,t))}function Ia(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.safeSetTexture2D(t||sa,i)}function ka(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(t||ua,i)}function Fa(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.safeSetTextureCube(t||la,i)}function ja(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(t||ca,i)}function Ua(e,t){e.uniform1fv(this.addr,t)}function Ba(e,t){const n=ma(t,this.size,2);e.uniform2fv(this.addr,n)}function Ga(e,t){const n=ma(t,this.size,3);e.uniform3fv(this.addr,n)}function Na(e,t){const n=ma(t,this.size,4);e.uniform4fv(this.addr,n)}function Ha(e,t){const n=ma(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function Va(e,t){const n=ma(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function Wa(e,t){const n=ma(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function Za(e,t){e.uniform1iv(this.addr,t)}function qa(e,t){e.uniform2iv(this.addr,t)}function Ya(e,t){e.uniform3iv(this.addr,t)}function Xa(e,t){e.uniform4iv(this.addr,t)}function Ka(e,t){e.uniform1uiv(this.addr,t)}function Qa(e,t){e.uniform2uiv(this.addr,t)}function Ja(e,t){e.uniform3uiv(this.addr,t)}function $a(e,t){e.uniform4uiv(this.addr,t)}function es(e,t,n){const r=t.length,i=xa(n,r);e.uniform1iv(this.addr,i);for(let e=0;e!==r;++e)n.safeSetTexture2D(t[e]||sa,i[e])}function ts(e,t,n){const r=t.length,i=xa(n,r);e.uniform1iv(this.addr,i);for(let e=0;e!==r;++e)n.safeSetTextureCube(t[e]||la,i[e])}function ns(e,t,n){this.id=e,this.addr=n,this.cache=[],this.setValue=function(e){switch(e){case 5126:return ba;case 35664:return wa;case 35665:return Ma;case 35666:return _a;case 35674:return Sa;case 35675:return Pa;case 35676:return Ta;case 5124:case 35670:return Ra;case 35667:case 35671:return Ea;case 35668:case 35672:return za;case 35669:case 35673:return La;case 5125:return Ca;case 36294:return Aa;case 36295:return Oa;case 36296:return Da;case 35678:case 36198:case 36298:case 36306:case 35682:return Ia;case 35679:case 36299:case 36307:return ka;case 35680:case 36300:case 36308:case 36293:return Fa;case 36289:case 36303:case 36311:case 36292:return ja}}(t.type)}function rs(e,t,n){this.id=e,this.addr=n,this.cache=[],this.size=t.size,this.setValue=function(e){switch(e){case 5126:return Ua;case 35664:return Ba;case 35665:return Ga;case 35666:return Na;case 35674:return Ha;case 35675:return Va;case 35676:return Wa;case 5124:case 35670:return Za;case 35667:case 35671:return qa;case 35668:case 35672:return Ya;case 35669:case 35673:return Xa;case 5125:return Ka;case 36294:return Qa;case 36295:return Ja;case 36296:return $a;case 35678:case 36198:case 36298:case 36306:case 35682:return es;case 35680:case 36300:case 36308:case 36293:return ts}}(t.type)}function is(e){this.id=e,this.seq=[],this.map={}}rs.prototype.updateCache=function(e){const t=this.cache;e instanceof Float32Array&&t.length!==e.length&&(this.cache=new Float32Array(e.length)),ga(t,e)},is.prototype.setValue=function(e,t,n){const r=this.seq;for(let i=0,o=r.length;i!==o;++i){const o=r[i];o.setValue(e,t[o.id],n)}};const os=/(\w+)(\])?(\[|\.)?/g;function as(e,t){e.seq.push(t),e.map[t.id]=t}function ss(e,t,n){const r=e.name,i=r.length;for(os.lastIndex=0;;){const o=os.exec(r),a=os.lastIndex;let s=o[1];const c="]"===o[2],u=o[3];if(c&&(s|=0),void 0===u||"["===u&&a+2===i){as(n,void 0===u?new ns(s,e,t):new rs(s,e,t));break}{let e=n.map[s];void 0===e&&(e=new is(s),as(n,e)),n=e}}}function cs(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,35718);for(let r=0;r<n;++r){const n=e.getActiveUniform(t,r);ss(n,e.getUniformLocation(t,n.name),this)}}function us(e,t,n){const r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}cs.prototype.setValue=function(e,t,n,r){const i=this.map[t];void 0!==i&&i.setValue(e,n,r)},cs.prototype.setOptional=function(e,t,n){const r=t[n];void 0!==r&&this.setValue(e,n,r)},cs.upload=function(e,t,n,r){for(let i=0,o=t.length;i!==o;++i){const o=t[i],a=n[o.id];!1!==a.needsUpdate&&o.setValue(e,a.value,r)}},cs.seqWithValue=function(e,t){const n=[];for(let r=0,i=e.length;r!==i;++r){const i=e[r];i.id in t&&n.push(i)}return n};let ls=0;function fs(e){switch(e){case Kt:return["Linear","( value )"];case Qt:return["sRGB","( value )"];case $t:return["RGBE","( value )"];case tn:return["RGBM","( value, 7.0 )"];case nn:return["RGBM","( value, 16.0 )"];case rn:return["RGBD","( value, 256.0 )"];case Jt:return["Gamma","( value, float( GAMMA_FACTOR ) )"];case en:return["LogLuv","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",e),["Linear","( value )"]}}function hs(e,t,n){const r=e.getShaderParameter(t,35713),i=e.getShaderInfoLog(t).trim();return r&&""===i?"":"THREE.WebGLShader: gl.getShaderInfoLog() "+n+"\n"+i+function(e){const t=e.split("\n");for(let e=0;e<t.length;e++)t[e]=e+1+": "+t[e];return t.join("\n")}(e.getShaderSource(t))}function vs(e,t){const n=fs(t);return"vec4 "+e+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function ds(e,t){const n=fs(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function ps(e,t){let n;switch(t){case $:n="Linear";break;case ee:n="Reinhard";break;case te:n="OptimizedCineon";break;case ne:n="ACESFilmic";break;case re:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function ms(e){return""!==e}function ys(e,t){return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function gs(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const xs=/^[ \t]*#include +<([\w\d./]+)>/gm;function bs(e){return e.replace(xs,ws)}function ws(e,t){const n=No[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return bs(n)}const Ms=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,_s=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Ss(e){return e.replace(_s,Ts).replace(Ms,Ps)}function Ps(e,t,n,r){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),Ts(0,t,n,r)}function Ts(e,t,n,r){let i="";for(let e=parseInt(t);e<parseInt(n);e++)i+=r.replace(/\[\s*i\s*\]/g,"[ "+e+" ]").replace(/UNROLLED_LOOP_INDEX/g,e);return i}function Rs(e){let t="precision "+e.precision+" float;\nprecision "+e.precision+" int;";return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}function Es(e,t,n,r){const i=e.getContext(),o=n.defines;let a=n.vertexShader,s=n.fragmentShader;const c=function(e){let t="SHADOWMAP_TYPE_BASIC";return e.shadowMapType===f?t="SHADOWMAP_TYPE_PCF":e.shadowMapType===h?t="SHADOWMAP_TYPE_PCF_SOFT":e.shadowMapType===v&&(t="SHADOWMAP_TYPE_VSM"),t}(n),u=function(e){let t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case oe:case ae:t="ENVMAP_TYPE_CUBE";break;case ue:case le:t="ENVMAP_TYPE_CUBE_UV"}return t}(n),l=function(e){let t="ENVMAP_MODE_REFLECTION";if(e.envMap)switch(e.envMapMode){case ae:case le:t="ENVMAP_MODE_REFRACTION"}return t}(n),d=function(e){let t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case X:t="ENVMAP_BLENDING_MULTIPLY";break;case K:t="ENVMAP_BLENDING_MIX";break;case Q:t="ENVMAP_BLENDING_ADD"}return t}(n),p=e.gammaFactor>0?e.gammaFactor:1,m=n.isWebGL2?"":function(e){return[e.extensionDerivatives||e.envMapCubeUV||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading||"physical"===e.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(ms).join("\n")}(n),y=function(e){const t=[];for(const n in e){const r=e[n];!1!==r&&t.push("#define "+n+" "+r)}return t.join("\n")}(o),g=i.createProgram();let x,b,w=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?(x=[y].filter(ms).join("\n"),x.length>0&&(x+="\n"),b=[m,y].filter(ms).join("\n"),b.length>0&&(b+="\n")):(x=[Rs(n),"#define SHADER_NAME "+n.shaderName,y,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+p,"#define MAX_BONES "+n.maxBones,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+l:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.useVertexTexture?"#define BONE_TEXTURE":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+c:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( 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(ms).join("\n"),b=[m,Rs(n),"#define SHADER_NAME "+n.shaderName,y,n.alphaTest?"#define ALPHATEST "+n.alphaTest+(n.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+p,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.envMap?"#define "+l:"",n.envMap?"#define "+d:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.sheen?"#define USE_SHEEN":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+c:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(n.extensionShaderTextureLOD||n.envMap)&&n.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==J?"#define TONE_MAPPING":"",n.toneMapping!==J?No.tonemapping_pars_fragment:"",n.toneMapping!==J?ps("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",No.encodings_pars_fragment,n.map?vs("mapTexelToLinear",n.mapEncoding):"",n.matcap?vs("matcapTexelToLinear",n.matcapEncoding):"",n.envMap?vs("envMapTexelToLinear",n.envMapEncoding):"",n.emissiveMap?vs("emissiveMapTexelToLinear",n.emissiveMapEncoding):"",n.lightMap?vs("lightMapTexelToLinear",n.lightMapEncoding):"",ds("linearToOutputTexel",n.outputEncoding),n.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(ms).join("\n")),a=bs(a),a=ys(a,n),a=gs(a,n),s=bs(s),s=ys(s,n),s=gs(s,n),a=Ss(a),s=Ss(s),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(w="#version 300 es\n",x=["#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+x,b=["#define varying in",n.glslVersion===In?"":"out highp vec4 pc_fragColor;",n.glslVersion===In?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+b);const M=w+b+s,_=us(i,35633,w+x+a),S=us(i,35632,M);if(i.attachShader(g,_),i.attachShader(g,S),void 0!==n.index0AttributeName?i.bindAttribLocation(g,0,n.index0AttributeName):!0===n.morphTargets&&i.bindAttribLocation(g,0,"position"),i.linkProgram(g),e.debug.checkShaderErrors){const e=i.getProgramInfoLog(g).trim(),t=i.getShaderInfoLog(_).trim(),n=i.getShaderInfoLog(S).trim();let r=!0,o=!0;if(!1===i.getProgramParameter(g,35714)){r=!1;const t=hs(i,_,"vertex"),n=hs(i,S,"fragment");console.error("THREE.WebGLProgram: shader error: ",i.getError(),"35715",i.getProgramParameter(g,35715),"gl.getProgramInfoLog",e,t,n)}else""!==e?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",e):""!==t&&""!==n||(o=!1);o&&(this.diagnostics={runnable:r,programLog:e,vertexShader:{log:t,prefix:x},fragmentShader:{log:n,prefix:b}})}let P,T;return i.deleteShader(_),i.deleteShader(S),this.getUniforms=function(){return void 0===P&&(P=new cs(i,g)),P},this.getAttributes=function(){return void 0===T&&(T=function(e,t){const n={},r=e.getProgramParameter(t,35721);for(let i=0;i<r;i++){const r=e.getActiveAttrib(t,i).name;n[r]=e.getAttribLocation(t,r)}return n}(i,g)),T},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(g),this.program=void 0},this.name=n.shaderName,this.id=ls++,this.cacheKey=t,this.usedTimes=1,this.program=g,this.vertexShader=_,this.fragmentShader=S,this}function zs(e,t,n,r,i,o){const a=[],s=r.isWebGL2,c=r.logarithmicDepthBuffer,u=r.floatVertexTextures,l=r.maxVertexUniforms,f=r.vertexTextures;let h=r.precision;const v={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},d=["precision","isWebGL2","supportsVertexTextures","outputEncoding","instancing","instancingColor","map","mapEncoding","matcap","matcapEncoding","envMap","envMapMode","envMapEncoding","envMapCubeUV","lightMap","lightMapEncoding","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","objectSpaceNormalMap","tangentSpaceNormalMap","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","vertexAlphas","vertexTangents","vertexUvs","uvsVertexOnly","fog","useFog","fogExp2","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","numDirLightShadows","numPointLightShadows","numSpotLightShadows","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering","sheen","transmissionMap"];function y(e){let t;return e&&e.isTexture?t=e.encoding:e&&e.isWebGLRenderTarget?(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),t=e.texture.encoding):t=Kt,t}return{getParameters:function(i,a,d,g,x){const b=g.fog,w=i.isMeshStandardMaterial?g.environment:null,M=t.get(i.envMap||w),_=v[i.type],S=x.isSkinnedMesh?function(e){const t=e.skeleton.bones;if(u)return 1024;{const e=l,n=Math.floor((e-20)/4),r=Math.min(n,t.length);return r<t.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+t.length+" bones. This GPU supports "+r+"."),0):r}}(x):0;let P,T;if(null!==i.precision&&(h=r.getMaxPrecision(i.precision),h!==i.precision&&console.warn("THREE.WebGLProgram.getParameters:",i.precision,"not supported, using",h,"instead.")),_){const e=Vo[_];P=e.vertexShader,T=e.fragmentShader}else P=i.vertexShader,T=i.fragmentShader;const R=e.getRenderTarget();return{isWebGL2:s,shaderID:_,shaderName:i.type,vertexShader:P,fragmentShader:T,defines:i.defines,isRawShaderMaterial:!0===i.isRawShaderMaterial,glslVersion:i.glslVersion,precision:h,instancing:!0===x.isInstancedMesh,instancingColor:!0===x.isInstancedMesh&&null!==x.instanceColor,supportsVertexTextures:f,outputEncoding:null!==R?y(R.texture):e.outputEncoding,map:!!i.map,mapEncoding:y(i.map),matcap:!!i.matcap,matcapEncoding:y(i.matcap),envMap:!!M,envMapMode:M&&M.mapping,envMapEncoding:y(M),envMapCubeUV:!!M&&(M.mapping===ue||M.mapping===le),lightMap:!!i.lightMap,lightMapEncoding:y(i.lightMap),aoMap:!!i.aoMap,emissiveMap:!!i.emissiveMap,emissiveMapEncoding:y(i.emissiveMap),bumpMap:!!i.bumpMap,normalMap:!!i.normalMap,objectSpaceNormalMap:i.normalMapType===cn,tangentSpaceNormalMap:i.normalMapType===sn,clearcoatMap:!!i.clearcoatMap,clearcoatRoughnessMap:!!i.clearcoatRoughnessMap,clearcoatNormalMap:!!i.clearcoatNormalMap,displacementMap:!!i.displacementMap,roughnessMap:!!i.roughnessMap,metalnessMap:!!i.metalnessMap,specularMap:!!i.specularMap,alphaMap:!!i.alphaMap,gradientMap:!!i.gradientMap,sheen:!!i.sheen,transmissionMap:!!i.transmissionMap,combine:i.combine,vertexTangents:i.normalMap&&i.vertexTangents,vertexColors:i.vertexColors,vertexAlphas:!0===i.vertexColors&&x.geometry&&x.geometry.attributes.color&&4===x.geometry.attributes.color.itemSize,vertexUvs:!!(i.map||i.bumpMap||i.normalMap||i.specularMap||i.alphaMap||i.emissiveMap||i.roughnessMap||i.metalnessMap||i.clearcoatMap||i.clearcoatRoughnessMap||i.clearcoatNormalMap||i.displacementMap||i.transmissionMap),uvsVertexOnly:!(i.map||i.bumpMap||i.normalMap||i.specularMap||i.alphaMap||i.emissiveMap||i.roughnessMap||i.metalnessMap||i.clearcoatNormalMap||i.transmissionMap||!i.displacementMap),fog:!!b,useFog:i.fog,fogExp2:b&&b.isFogExp2,flatShading:!!i.flatShading,sizeAttenuation:i.sizeAttenuation,logarithmicDepthBuffer:c,skinning:i.skinning&&S>0,maxBones:S,useVertexTexture:u,morphTargets:i.morphTargets,morphNormals:i.morphNormals,numDirLights:a.directional.length,numPointLights:a.point.length,numSpotLights:a.spot.length,numRectAreaLights:a.rectArea.length,numHemiLights:a.hemi.length,numDirLightShadows:a.directionalShadowMap.length,numPointLightShadows:a.pointShadowMap.length,numSpotLightShadows:a.spotShadowMap.length,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:i.dithering,shadowMapEnabled:e.shadowMap.enabled&&d.length>0,shadowMapType:e.shadowMap.type,toneMapping:i.toneMapped?e.toneMapping:J,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:i.premultipliedAlpha,alphaTest:i.alphaTest,doubleSided:i.side===m,flipSided:i.side===p,depthPacking:void 0!==i.depthPacking&&i.depthPacking,index0AttributeName:i.index0AttributeName,extensionDerivatives:i.extensions&&i.extensions.derivatives,extensionFragDepth:i.extensions&&i.extensions.fragDepth,extensionDrawBuffers:i.extensions&&i.extensions.drawBuffers,extensionShaderTextureLOD:i.extensions&&i.extensions.shaderTextureLOD,rendererExtensionFragDepth:s||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:s||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:s||n.has("EXT_shader_texture_lod"),customProgramCacheKey:i.customProgramCacheKey()}},getProgramCacheKey:function(t){const n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.fragmentShader),n.push(t.vertexShader)),void 0!==t.defines)for(const e in t.defines)n.push(e),n.push(t.defines[e]);if(!1===t.isRawShaderMaterial){for(let e=0;e<d.length;e++)n.push(t[d[e]]);n.push(e.outputEncoding),n.push(e.gammaFactor)}return n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){const t=v[e.type];let n;if(t){const e=Vo[t];n=Ro.clone(e.uniforms)}else n=e.uniforms;return n},acquireProgram:function(t,n){let r;for(let e=0,t=a.length;e<t;e++){const t=a[e];if(t.cacheKey===n){r=t,++r.usedTimes;break}}return void 0===r&&(r=new Es(e,n,t,i),a.push(r)),r},releaseProgram:function(e){if(0==--e.usedTimes){const t=a.indexOf(e);a[t]=a[a.length-1],a.pop(),e.destroy()}},programs:a}}function Ls(){let e=new WeakMap;return{get:function(t){let n=e.get(t);return void 0===n&&(n={},e.set(t,n)),n},remove:function(t){e.delete(t)},update:function(t,n,r){e.get(t)[n]=r},dispose:function(){e=new WeakMap}}}function Cs(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.program!==t.program?e.program.id-t.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 As(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function Os(e){const t=[];let n=0;const r=[],i=[],o={id:-1};function a(r,i,a,s,c,u){let l=t[n];const f=e.get(a);return void 0===l?(l={id:r.id,object:r,geometry:i,material:a,program:f.program||o,groupOrder:s,renderOrder:r.renderOrder,z:c,group:u},t[n]=l):(l.id=r.id,l.object=r,l.geometry=i,l.material=a,l.program=f.program||o,l.groupOrder=s,l.renderOrder=r.renderOrder,l.z=c,l.group=u),n++,l}return{opaque:r,transparent:i,init:function(){n=0,r.length=0,i.length=0},push:function(e,t,n,o,s,c){const u=a(e,t,n,o,s,c);(!0===n.transparent?i:r).push(u)},unshift:function(e,t,n,o,s,c){const u=a(e,t,n,o,s,c);(!0===n.transparent?i:r).unshift(u)},finish:function(){for(let e=n,r=t.length;e<r;e++){const n=t[e];if(null===n.id)break;n.id=null,n.object=null,n.geometry=null,n.material=null,n.program=null,n.group=null}},sort:function(e,t){r.length>1&&r.sort(e||Cs),i.length>1&&i.sort(t||As)}}}function Ds(e){let t=new WeakMap;return{get:function(n,r){let i;return!1===t.has(n)?(i=new Os(e),t.set(n,[i])):r>=t.get(n).length?(i=new Os(e),t.get(n).push(i)):i=t.get(n)[r],i},dispose:function(){t=new WeakMap}}}function Is(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":n={direction:new ar,color:new Ai};break;case"SpotLight":n={position:new ar,direction:new ar,color:new Ai,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new ar,color:new Ai,distance:0,decay:0};break;case"HemisphereLight":n={direction:new ar,skyColor:new Ai,groundColor:new Ai};break;case"RectAreaLight":n={color:new Ai,position:new ar,halfWidth:new ar,halfHeight:new ar}}return e[t.id]=n,n}}}let ks=0;function Fs(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function js(e,t){const n=new Is,r=function(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Xn};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Xn,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let e=0;e<9;e++)i.probe.push(new ar);const o=new ar,a=new Fr,s=new Fr;return{setup:function(o){let a=0,s=0,c=0;for(let e=0;e<9;e++)i.probe[e].set(0,0,0);let u=0,l=0,f=0,h=0,v=0,d=0,p=0,m=0;o.sort(Fs);for(let e=0,t=o.length;e<t;e++){const t=o[e],y=t.color,g=t.intensity,x=t.distance,b=t.shadow&&t.shadow.map?t.shadow.map.texture:null;if(t.isAmbientLight)a+=y.r*g,s+=y.g*g,c+=y.b*g;else if(t.isLightProbe)for(let e=0;e<9;e++)i.probe[e].addScaledVector(t.sh.coefficients[e],g);else if(t.isDirectionalLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity),t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,i.directionalShadow[u]=n,i.directionalShadowMap[u]=b,i.directionalShadowMatrix[u]=t.shadow.matrix,d++}i.directional[u]=e,u++}else if(t.isSpotLight){const e=n.get(t);if(e.position.setFromMatrixPosition(t.matrixWorld),e.color.copy(y).multiplyScalar(g),e.distance=x,e.coneCos=Math.cos(t.angle),e.penumbraCos=Math.cos(t.angle*(1-t.penumbra)),e.decay=t.decay,t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,i.spotShadow[f]=n,i.spotShadowMap[f]=b,i.spotShadowMatrix[f]=t.shadow.matrix,m++}i.spot[f]=e,f++}else if(t.isRectAreaLight){const e=n.get(t);e.color.copy(y).multiplyScalar(g),e.halfWidth.set(.5*t.width,0,0),e.halfHeight.set(0,.5*t.height,0),i.rectArea[h]=e,h++}else if(t.isPointLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity),e.distance=t.distance,e.decay=t.decay,t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,n.shadowCameraNear=e.camera.near,n.shadowCameraFar=e.camera.far,i.pointShadow[l]=n,i.pointShadowMap[l]=b,i.pointShadowMatrix[l]=t.shadow.matrix,p++}i.point[l]=e,l++}else if(t.isHemisphereLight){const e=n.get(t);e.skyColor.copy(t.color).multiplyScalar(g),e.groundColor.copy(t.groundColor).multiplyScalar(g),i.hemi[v]=e,v++}}h>0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=Ho.LTC_FLOAT_1,i.rectAreaLTC2=Ho.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=Ho.LTC_HALF_1,i.rectAreaLTC2=Ho.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=a,i.ambient[1]=s,i.ambient[2]=c;const y=i.hash;y.directionalLength===u&&y.pointLength===l&&y.spotLength===f&&y.rectAreaLength===h&&y.hemiLength===v&&y.numDirectionalShadows===d&&y.numPointShadows===p&&y.numSpotShadows===m||(i.directional.length=u,i.spot.length=f,i.rectArea.length=h,i.point.length=l,i.hemi.length=v,i.directionalShadow.length=d,i.directionalShadowMap.length=d,i.pointShadow.length=p,i.pointShadowMap.length=p,i.spotShadow.length=m,i.spotShadowMap.length=m,i.directionalShadowMatrix.length=d,i.pointShadowMatrix.length=p,i.spotShadowMatrix.length=m,y.directionalLength=u,y.pointLength=l,y.spotLength=f,y.rectAreaLength=h,y.hemiLength=v,y.numDirectionalShadows=d,y.numPointShadows=p,y.numSpotShadows=m,i.version=ks++)},setupView:function(e,t){let n=0,r=0,c=0,u=0,l=0;const f=t.matrixWorldInverse;for(let t=0,h=e.length;t<h;t++){const h=e[t];if(h.isDirectionalLight){const e=i.directional[n];e.direction.setFromMatrixPosition(h.matrixWorld),o.setFromMatrixPosition(h.target.matrixWorld),e.direction.sub(o),e.direction.transformDirection(f),n++}else if(h.isSpotLight){const e=i.spot[c];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(f),e.direction.setFromMatrixPosition(h.matrixWorld),o.setFromMatrixPosition(h.target.matrixWorld),e.direction.sub(o),e.direction.transformDirection(f),c++}else if(h.isRectAreaLight){const e=i.rectArea[u];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(f),s.identity(),a.copy(h.matrixWorld),a.premultiply(f),s.extractRotation(a),e.halfWidth.set(.5*h.width,0,0),e.halfHeight.set(0,.5*h.height,0),e.halfWidth.applyMatrix4(s),e.halfHeight.applyMatrix4(s),u++}else if(h.isPointLight){const e=i.point[r];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(f),r++}else if(h.isHemisphereLight){const e=i.hemi[l];e.direction.setFromMatrixPosition(h.matrixWorld),e.direction.transformDirection(f),e.direction.normalize(),l++}}},state:i}}function Us(e,t){const n=new js(e,t),r=[],i=[];return{init:function(){r.length=0,i.length=0},state:{lightsArray:r,shadowsArray:i,lights:n},setupLights:function(){n.setup(r)},setupLightsView:function(e){n.setupView(r,e)},pushLight:function(e){r.push(e)},pushShadow:function(e){i.push(e)}}}function Bs(e,t){let n=new WeakMap;return{get:function(r,i=0){let o;return!1===n.has(r)?(o=new Us(e,t),n.set(r,[o])):i>=n.get(r).length?(o=new Us(e,t),n.get(r).push(o)):o=n.get(r)[i],o},dispose:function(){n=new WeakMap}}}class Gs extends Pi{constructor(e){super(),this.type="MeshDepthMaterial",this.depthPacking=on,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.setValues(e)}copy(e){return super.copy(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}}Gs.prototype.isMeshDepthMaterial=!0;class Ns extends Pi{constructor(e){super(),this.type="MeshDistanceMaterial",this.referencePosition=new ar,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,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}}function Hs(e,t,n){let r=new jo;const i=new Xn,o=new Xn,a=new nr,s=[],c=[],u={},l=n.maxTextureSize,h={0:p,1:d,2:m},y=new Eo({defines:{SAMPLE_RATE:2/8,HALF_SAMPLE_RATE:1/8},uniforms:{shadow_pass:{value:null},resolution:{value:new Xn},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n\tfor ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean * HALF_SAMPLE_RATE;\n\tsquared_mean = squared_mean * HALF_SAMPLE_RATE;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),g=y.clone();g.defines.HORIZONTAL_PASS=1;const b=new ro;b.setAttribute("position",new ki(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const w=new Mo(b,y),M=this;function _(n,r){const i=t.update(w);y.uniforms.shadow_pass.value=n.map.texture,y.uniforms.resolution.value=n.mapSize,y.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,i,y,w,null),g.uniforms.shadow_pass.value=n.mapPass.texture,g.uniforms.resolution.value=n.mapSize,g.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,i,g,w,null)}function S(e,t,n){const r=e<<0|t<<1|n<<2;let i=s[r];return void 0===i&&(i=new Gs({depthPacking:an,morphTargets:e,skinning:t}),s[r]=i),i}function P(e,t,n){const r=e<<0|t<<1|n<<2;let i=c[r];return void 0===i&&(i=new Ns({morphTargets:e,skinning:t}),c[r]=i),i}function T(t,n,r,i,o,a,s){let c=null,l=S,f=t.customDepthMaterial;if(!0===i.isPointLight&&(l=P,f=t.customDistanceMaterial),void 0===f){let e=!1;!0===r.morphTargets&&(e=n.morphAttributes&&n.morphAttributes.position&&n.morphAttributes.position.length>0);let i=!1;!0===t.isSkinnedMesh&&(!0===r.skinning?i=!0:console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",t)),c=l(e,i,!0===t.isInstancedMesh)}else c=f;if(e.localClippingEnabled&&!0===r.clipShadows&&0!==r.clippingPlanes.length){const e=c.uuid,t=r.uuid;let n=u[e];void 0===n&&(n={},u[e]=n);let i=n[t];void 0===i&&(i=c.clone(),n[t]=i),c=i}return c.visible=r.visible,c.wireframe=r.wireframe,c.side=s===v?null!==r.shadowSide?r.shadowSide:r.side:null!==r.shadowSide?r.shadowSide:h[r.side],c.clipShadows=r.clipShadows,c.clippingPlanes=r.clippingPlanes,c.clipIntersection=r.clipIntersection,c.wireframeLinewidth=r.wireframeLinewidth,c.linewidth=r.linewidth,!0===i.isPointLight&&!0===c.isMeshDistanceMaterial&&(c.referencePosition.setFromMatrixPosition(i.matrixWorld),c.nearDistance=o,c.farDistance=a),c}function R(n,i,o,a,s){if(!1===n.visible)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&s===v)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);const r=t.update(n),i=n.material;if(Array.isArray(i)){const t=r.groups;for(let c=0,u=t.length;c<u;c++){const u=t[c],l=i[u.materialIndex];if(l&&l.visible){const t=T(n,r,l,a,o.near,o.far,s);e.renderBufferDirect(o,null,r,t,n,u)}}}else if(i.visible){const t=T(n,r,i,a,o.near,o.far,s);e.renderBufferDirect(o,null,r,t,n,null)}}const c=n.children;for(let e=0,t=c.length;e<t;e++)R(c[e],i,o,a,s)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=f,this.render=function(t,n,s){if(!1===M.enabled)return;if(!1===M.autoUpdate&&!1===M.needsUpdate)return;if(0===t.length)return;const c=e.getRenderTarget(),u=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),h=e.state;h.setBlending(x),h.buffers.color.setClear(1,1,1,1),h.buffers.depth.setTest(!0),h.setScissorTest(!1);for(let c=0,u=t.length;c<u;c++){const u=t[c],f=u.shadow;if(void 0===f){console.warn("THREE.WebGLShadowMap:",u,"has no shadow.");continue}if(!1===f.autoUpdate&&!1===f.needsUpdate)continue;i.copy(f.mapSize);const d=f.getFrameExtents();if(i.multiply(d),o.copy(f.mapSize),(i.x>l||i.y>l)&&(i.x>l&&(o.x=Math.floor(l/d.x),i.x=o.x*d.x,f.mapSize.x=o.x),i.y>l&&(o.y=Math.floor(l/d.y),i.y=o.y*d.y,f.mapSize.y=o.y)),null===f.map&&!f.isPointLightShadow&&this.type===v){const e={minFilter:xe,magFilter:xe,format:je};f.map=new rr(i.x,i.y,e),f.map.texture.name=u.name+".shadowMap",f.mapPass=new rr(i.x,i.y,e),f.camera.updateProjectionMatrix()}if(null===f.map){const e={minFilter:de,magFilter:de,format:je};f.map=new rr(i.x,i.y,e),f.map.texture.name=u.name+".shadowMap",f.camera.updateProjectionMatrix()}e.setRenderTarget(f.map),e.clear();const p=f.getViewportCount();for(let e=0;e<p;e++){const t=f.getViewport(e);a.set(o.x*t.x,o.y*t.y,o.x*t.z,o.y*t.w),h.viewport(a),f.updateMatrices(u,e),r=f.getFrustum(),R(n,s,f.camera,u,this.type)}f.isPointLightShadow||this.type!==v||_(f,s),f.needsUpdate=!1}M.needsUpdate=!1,e.setRenderTarget(c,u,f)}}function Vs(e,t,n){const r=n.isWebGL2,i=new function(){let t=!1;const n=new nr;let r=null;const i=new nr(0,0,0,0);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,s){!0===s&&(t*=a,r*=a,o*=a),n.set(t,r,o,a),!1===i.equals(n)&&(e.clearColor(t,r,o,a),i.copy(n))},reset:function(){t=!1,r=null,i.set(-1,0,0,0)}}},o=new function(){let t=!1,n=null,r=null,i=null;return{setTest:function(e){e?me(2929):ye(2929)},setMask:function(r){n===r||t||(e.depthMask(r),n=r)},setFunc:function(t){if(r!==t){if(t)switch(t){case G:e.depthFunc(512);break;case N:e.depthFunc(519);break;case H:e.depthFunc(513);break;case V:e.depthFunc(515);break;case W:e.depthFunc(514);break;case Z:e.depthFunc(518);break;case q:e.depthFunc(516);break;case Y:e.depthFunc(517);break;default:e.depthFunc(515)}else e.depthFunc(515);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}}},u=new function(){let t=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null;return{setTest:function(e){t||(e?me(2960):ye(2960))},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&&c===r||(e.stencilOp(t,n,r),a=t,s=n,c=r)},setLocked:function(e){t=e},setClear:function(t){u!==t&&(e.clearStencil(t),u=t)},reset:function(){t=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null}}};let l={},f=null,h={},v=null,d=!1,y=null,g=null,X=null,K=null,Q=null,J=null,$=null,ee=!1,te=null,ne=null,re=null,ie=null,oe=null;const ae=e.getParameter(35661);let se=!1,ce=0;const ue=e.getParameter(7938);-1!==ue.indexOf("WebGL")?(ce=parseFloat(/^WebGL (\d)/.exec(ue)[1]),se=ce>=1):-1!==ue.indexOf("OpenGL ES")&&(ce=parseFloat(/^OpenGL ES (\d)/.exec(ue)[1]),se=ce>=2);let le=null,fe={};const he=new nr(0,0,e.canvas.width,e.canvas.height),ve=new nr(0,0,e.canvas.width,e.canvas.height);function de(t,n,r){const i=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(let t=0;t<r;t++)e.texImage2D(n+t,0,6408,1,1,0,6408,5121,i);return o}const pe={};function me(t){!0!==l[t]&&(e.enable(t),l[t]=!0)}function ye(t){!1!==l[t]&&(e.disable(t),l[t]=!1)}pe[3553]=de(3553,3553,1),pe[34067]=de(34067,34069,6),i.setClear(0,0,0,1),o.setClear(1),u.setClear(0),me(2929),o.setFunc(V),we(!1),Me(s),me(2884),be(x);const ge={[P]:32774,[T]:32778,[R]:32779};if(r)ge[E]=32775,ge[z]=32776;else{const e=t.get("EXT_blend_minmax");null!==e&&(ge[E]=e.MIN_EXT,ge[z]=e.MAX_EXT)}const xe={[L]:0,[C]:1,[A]:768,[D]:770,[B]:776,[j]:774,[k]:772,[O]:769,[I]:771,[U]:775,[F]:773};function be(t,n,r,i,o,a,s,c){if(t!==x){if(!1===d&&(me(3042),d=!0),t===S)o=o||n,a=a||r,s=s||i,n===g&&o===Q||(e.blendEquationSeparate(ge[n],ge[o]),g=n,Q=o),r===X&&i===K&&a===J&&s===$||(e.blendFuncSeparate(xe[r],xe[i],xe[a],xe[s]),X=r,K=i,J=a,$=s),y=t,ee=null;else if(t!==y||c!==ee){if(g===P&&Q===P||(e.blendEquation(32774),g=P,Q=P),c)switch(t){case b:e.blendFuncSeparate(1,771,1,771);break;case w:e.blendFunc(1,1);break;case M:e.blendFuncSeparate(0,0,769,771);break;case _:e.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}else switch(t){case b:e.blendFuncSeparate(770,771,1,771);break;case w:e.blendFunc(770,1);break;case M:e.blendFunc(0,769);break;case _:e.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}X=null,K=null,J=null,$=null,y=t,ee=c}}else!0===d&&(ye(3042),d=!1)}function we(t){te!==t&&(t?e.frontFace(2304):e.frontFace(2305),te=t)}function Me(t){t!==a?(me(2884),t!==ne&&(t===s?e.cullFace(1029):t===c?e.cullFace(1028):e.cullFace(1032))):ye(2884),ne=t}function _e(t,n,r){t?(me(32823),ie===n&&oe===r||(e.polygonOffset(n,r),ie=n,oe=r)):ye(32823)}function Se(t){void 0===t&&(t=33984+ae-1),le!==t&&(e.activeTexture(t),le=t)}return{buffers:{color:i,depth:o,stencil:u},enable:me,disable:ye,bindFramebuffer:function(t,n){null===n&&null!==f&&(n=f),h[t]!==n&&(e.bindFramebuffer(t,n),h[t]=n,r&&(36009===t&&(h[36160]=n),36160===t&&(h[36009]=n)))},bindXRFramebuffer:function(t){t!==f&&(e.bindFramebuffer(36160,t),f=t)},useProgram:function(t){return v!==t&&(e.useProgram(t),v=t,!0)},setBlending:be,setMaterial:function(e,t){e.side===m?ye(2884):me(2884);let n=e.side===p;t&&(n=!n),we(n),e.blending===b&&!1===e.transparent?be(x):be(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha),o.setFunc(e.depthFunc),o.setTest(e.depthTest),o.setMask(e.depthWrite),i.setMask(e.colorWrite);const r=e.stencilWrite;u.setTest(r),r&&(u.setMask(e.stencilWriteMask),u.setFunc(e.stencilFunc,e.stencilRef,e.stencilFuncMask),u.setOp(e.stencilFail,e.stencilZFail,e.stencilZPass)),_e(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits),!0===e.alphaToCoverage?me(32926):ye(32926)},setFlipSided:we,setCullFace:Me,setLineWidth:function(t){t!==re&&(se&&e.lineWidth(t),re=t)},setPolygonOffset:_e,setScissorTest:function(e){e?me(3089):ye(3089)},activeTexture:Se,bindTexture:function(t,n){null===le&&Se();let r=fe[le];void 0===r&&(r={type:void 0,texture:void 0},fe[le]=r),r.type===t&&r.texture===n||(e.bindTexture(t,n||pe[t]),r.type=t,r.texture=n)},unbindTexture:function(){const t=fe[le];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)},compressedTexImage2D:function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage3D:function(){try{e.texImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},scissor:function(t){!1===he.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),he.copy(t))},viewport:function(t){!1===ve.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),ve.copy(t))},reset:function(){e.disable(3042),e.disable(2884),e.disable(2929),e.disable(32823),e.disable(3089),e.disable(2960),e.disable(32926),e.blendEquation(32774),e.blendFunc(1,0),e.blendFuncSeparate(1,0,1,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(513),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(519,0,4294967295),e.stencilOp(7680,7680,7680),e.clearStencil(0),e.cullFace(1029),e.frontFace(2305),e.polygonOffset(0,0),e.activeTexture(33984),e.bindFramebuffer(36160,null),!0===r&&(e.bindFramebuffer(36009,null),e.bindFramebuffer(36008,null)),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),l={},le=null,fe={},f=null,h={},v=null,d=!1,y=null,g=null,X=null,K=null,Q=null,J=null,$=null,ee=!1,te=null,ne=null,re=null,ie=null,oe=null,he.set(0,0,e.canvas.width,e.canvas.height),ve.set(0,0,e.canvas.width,e.canvas.height),i.reset(),o.reset(),u.reset()}}}function Ws(e,t,n,r,i,o,a){const s=i.isWebGL2,c=i.maxTextures,u=i.maxCubemapSize,l=i.maxTextureSize,f=i.maxSamples,h=new WeakMap;let v,d=!1;try{d="undefined"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(e){}function p(e,t){return d?new OffscreenCanvas(e,t):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function m(e,t,n,r){let i=1;if((e.width>r||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const r=t?qn:Math.floor,o=r(i*e.width),a=r(i*e.height);void 0===v&&(v=p(o,a));const s=n?p(o,a):v;return s.width=o,s.height=a,s.getContext("2d").drawImage(e,0,0,o,a),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+o+"x"+a+")."),s}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function y(e){return Wn(e.width)&&Wn(e.height)}function g(e,t){return e.generateMipmaps&&t&&e.minFilter!==de&&e.minFilter!==xe}function x(t,n,i,o){e.generateMipmap(t),r.get(n).__maxMipLevel=Math.log2(Math.max(i,o))}function b(n,r,i){if(!1===s)return r;if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let o=r;return 6403===r&&(5126===i&&(o=33326),5131===i&&(o=33325),5121===i&&(o=33321)),6407===r&&(5126===i&&(o=34837),5131===i&&(o=34843),5121===i&&(o=32849)),6408===r&&(5126===i&&(o=34836),5131===i&&(o=34842),5121===i&&(o=32856)),33325!==o&&33326!==o&&34842!==o&&34836!==o||t.get("EXT_color_buffer_float"),o}function w(e){return e===de||e===pe||e===ye?9728:9729}function M(t){const n=t.target;n.removeEventListener("dispose",M),function(t){const n=r.get(t);void 0!==n.__webglInit&&(e.deleteTexture(n.__webglTexture),r.remove(t))}(n),n.isVideoTexture&&h.delete(n),a.memory.textures--}function _(t){const n=t.target;n.removeEventListener("dispose",_),function(t){const n=t.texture,i=r.get(t),o=r.get(n);if(t){if(void 0!==o.__webglTexture&&e.deleteTexture(o.__webglTexture),t.depthTexture&&t.depthTexture.dispose(),t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++)e.deleteFramebuffer(i.__webglFramebuffer[t]),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer[t]);else e.deleteFramebuffer(i.__webglFramebuffer),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer),i.__webglMultisampledFramebuffer&&e.deleteFramebuffer(i.__webglMultisampledFramebuffer),i.__webglColorRenderbuffer&&e.deleteRenderbuffer(i.__webglColorRenderbuffer),i.__webglDepthRenderbuffer&&e.deleteRenderbuffer(i.__webglDepthRenderbuffer);r.remove(n),r.remove(t)}}(n),a.memory.textures--}let S=0;function P(e,t){const i=r.get(e);if(e.isVideoTexture&&function(e){const t=a.render.frame;h.get(e)!==t&&(h.set(e,t),e.update())}(e),e.version>0&&i.__version!==e.version){const n=e.image;if(void 0===n)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==n.complete)return void C(i,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.activeTexture(33984+t),n.bindTexture(3553,i.__webglTexture)}function T(t,i){const a=r.get(t);t.version>0&&a.__version!==t.version?function(t,r,i){if(6!==r.image.length)return;L(t,r),n.activeTexture(33984+i),n.bindTexture(34067,t.__webglTexture),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment),e.pixelStorei(37443,0);const a=r&&(r.isCompressedTexture||r.image[0].isCompressedTexture),c=r.image[0]&&r.image[0].isDataTexture,l=[];for(let e=0;e<6;e++)l[e]=a||c?c?r.image[e].image:r.image[e]:m(r.image[e],!1,!0,u);const f=l[0],h=y(f)||s,v=o.convert(r.format),d=o.convert(r.type),p=b(r.internalFormat,v,d);let w;if(z(34067,r,h),a){for(let e=0;e<6;e++){w=l[e].mipmaps;for(let t=0;t<w.length;t++){const i=w[t];r.format!==je&&r.format!==Fe?null!==v?n.compressedTexImage2D(34069+e,t,p,i.width,i.height,0,i.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(34069+e,t,p,i.width,i.height,0,v,d,i.data)}}t.__maxMipLevel=w.length-1}else{w=r.mipmaps;for(let e=0;e<6;e++)if(c){n.texImage2D(34069+e,0,p,l[e].width,l[e].height,0,v,d,l[e].data);for(let t=0;t<w.length;t++){const r=w[t].image[e].image;n.texImage2D(34069+e,t+1,p,r.width,r.height,0,v,d,r.data)}}else{n.texImage2D(34069+e,0,p,v,d,l[e]);for(let t=0;t<w.length;t++){const r=w[t];n.texImage2D(34069+e,t+1,p,v,d,r.image[e])}}t.__maxMipLevel=w.length}g(r,h)&&x(34067,r,f.width,f.height),t.__version=r.version,r.onUpdate&&r.onUpdate(r)}(a,t,i):(n.activeTexture(33984+i),n.bindTexture(34067,a.__webglTexture))}const R={[fe]:10497,[he]:33071,[ve]:33648},E={[de]:9728,[pe]:9984,[ye]:9986,[xe]:9729,[be]:9985,[Me]:9987};function z(n,o,a){if(a?(e.texParameteri(n,10242,R[o.wrapS]),e.texParameteri(n,10243,R[o.wrapT]),32879!==n&&35866!==n||e.texParameteri(n,32882,R[o.wrapR]),e.texParameteri(n,10240,E[o.magFilter]),e.texParameteri(n,10241,E[o.minFilter])):(e.texParameteri(n,10242,33071),e.texParameteri(n,10243,33071),32879!==n&&35866!==n||e.texParameteri(n,32882,33071),o.wrapS===he&&o.wrapT===he||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,10240,w(o.magFilter)),e.texParameteri(n,10241,w(o.minFilter)),o.minFilter!==de&&o.minFilter!==xe&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!0===t.has("EXT_texture_filter_anisotropic")){const a=t.get("EXT_texture_filter_anisotropic");if(o.type===Le&&!1===t.has("OES_texture_float_linear"))return;if(!1===s&&o.type===Ce&&!1===t.has("OES_texture_half_float_linear"))return;(o.anisotropy>1||r.get(o).__currentAnisotropy)&&(e.texParameterf(n,a.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,i.getMaxAnisotropy())),r.get(o).__currentAnisotropy=o.anisotropy)}}function L(t,n){void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",M),t.__webglTexture=e.createTexture(),a.memory.textures++)}function C(t,r,i){let a=3553;r.isDataTexture2DArray&&(a=35866),r.isDataTexture3D&&(a=32879),L(t,r),n.activeTexture(33984+i),n.bindTexture(a,t.__webglTexture),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment),e.pixelStorei(37443,0);const c=function(e){return!s&&(e.wrapS!==he||e.wrapT!==he||e.minFilter!==de&&e.minFilter!==xe)}(r)&&!1===y(r.image),u=m(r.image,c,!1,l),f=y(u)||s,h=o.convert(r.format);let v,d=o.convert(r.type),p=b(r.internalFormat,h,d);z(a,r,f);const w=r.mipmaps;if(r.isDepthTexture)p=6402,s?p=r.type===Le?36012:r.type===ze?33190:r.type===Ie?35056:33189:r.type===Le&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),r.format===Ne&&6402===p&&r.type!==Re&&r.type!==ze&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=Re,d=o.convert(r.type)),r.format===He&&6402===p&&(p=34041,r.type!==Ie&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=Ie,d=o.convert(r.type))),n.texImage2D(3553,0,p,u.width,u.height,0,h,d,null);else if(r.isDataTexture)if(w.length>0&&f){for(let e=0,t=w.length;e<t;e++)v=w[e],n.texImage2D(3553,e,p,v.width,v.height,0,h,d,v.data);r.generateMipmaps=!1,t.__maxMipLevel=w.length-1}else n.texImage2D(3553,0,p,u.width,u.height,0,h,d,u.data),t.__maxMipLevel=0;else if(r.isCompressedTexture){for(let e=0,t=w.length;e<t;e++)v=w[e],r.format!==je&&r.format!==Fe?null!==h?n.compressedTexImage2D(3553,e,p,v.width,v.height,0,v.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(3553,e,p,v.width,v.height,0,h,d,v.data);t.__maxMipLevel=w.length-1}else if(r.isDataTexture2DArray)n.texImage3D(35866,0,p,u.width,u.height,u.depth,0,h,d,u.data),t.__maxMipLevel=0;else if(r.isDataTexture3D)n.texImage3D(32879,0,p,u.width,u.height,u.depth,0,h,d,u.data),t.__maxMipLevel=0;else if(w.length>0&&f){for(let e=0,t=w.length;e<t;e++)v=w[e],n.texImage2D(3553,e,p,h,d,v);r.generateMipmaps=!1,t.__maxMipLevel=w.length-1}else n.texImage2D(3553,0,p,h,d,u),t.__maxMipLevel=0;g(r,f)&&x(a,r,u.width,u.height),t.__version=r.version,r.onUpdate&&r.onUpdate(r)}function A(t,i,a,s){const c=i.texture,u=o.convert(c.format),l=o.convert(c.type),f=b(c.internalFormat,u,l);32879===s||35866===s?n.texImage3D(s,0,f,i.width,i.height,i.depth,0,u,l,null):n.texImage2D(s,0,f,i.width,i.height,0,u,l,null),n.bindFramebuffer(36160,t),e.framebufferTexture2D(36160,a,s,r.get(c).__webglTexture,0),n.bindFramebuffer(36160,null)}function O(t,n,r){if(e.bindRenderbuffer(36161,t),n.depthBuffer&&!n.stencilBuffer){let i=33189;if(r){const t=n.depthTexture;t&&t.isDepthTexture&&(t.type===Le?i=36012:t.type===ze&&(i=33190));const r=D(n);e.renderbufferStorageMultisample(36161,r,i,n.width,n.height)}else e.renderbufferStorage(36161,i,n.width,n.height);e.framebufferRenderbuffer(36160,36096,36161,t)}else if(n.depthBuffer&&n.stencilBuffer){if(r){const t=D(n);e.renderbufferStorageMultisample(36161,t,35056,n.width,n.height)}else e.renderbufferStorage(36161,34041,n.width,n.height);e.framebufferRenderbuffer(36160,33306,36161,t)}else{const t=n.texture,i=o.convert(t.format),a=o.convert(t.type),s=b(t.internalFormat,i,a);if(r){const t=D(n);e.renderbufferStorageMultisample(36161,t,s,n.width,n.height)}else e.renderbufferStorage(36161,s,n.width,n.height)}e.bindRenderbuffer(36161,null)}function D(e){return s&&e.isWebGLMultisampleRenderTarget?Math.min(f,e.samples):0}let I=!1,k=!1;this.allocateTextureUnit=function(){const e=S;return e>=c&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+c),S+=1,e},this.resetTextureUnits=function(){S=0},this.setTexture2D=P,this.setTexture2DArray=function(e,t){const i=r.get(e);e.version>0&&i.__version!==e.version?C(i,e,t):(n.activeTexture(33984+t),n.bindTexture(35866,i.__webglTexture))},this.setTexture3D=function(e,t){const i=r.get(e);e.version>0&&i.__version!==e.version?C(i,e,t):(n.activeTexture(33984+t),n.bindTexture(32879,i.__webglTexture))},this.setTextureCube=T,this.setupRenderTarget=function(t){const i=t.texture,c=r.get(t),u=r.get(i);t.addEventListener("dispose",_),u.__webglTexture=e.createTexture(),u.__version=i.version,a.memory.textures++;const l=!0===t.isWebGLCubeRenderTarget,f=!0===t.isWebGLMultisampleRenderTarget,h=i.isDataTexture3D||i.isDataTexture2DArray,v=y(t)||s;if(!s||i.format!==Fe||i.type!==Le&&i.type!==Ce||(i.format=je,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),l){c.__webglFramebuffer=[];for(let t=0;t<6;t++)c.__webglFramebuffer[t]=e.createFramebuffer()}else if(c.__webglFramebuffer=e.createFramebuffer(),f)if(s){c.__webglMultisampledFramebuffer=e.createFramebuffer(),c.__webglColorRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,c.__webglColorRenderbuffer);const r=o.convert(i.format),a=o.convert(i.type),s=b(i.internalFormat,r,a),u=D(t);e.renderbufferStorageMultisample(36161,u,s,t.width,t.height),n.bindFramebuffer(36160,c.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064,36161,c.__webglColorRenderbuffer),e.bindRenderbuffer(36161,null),t.depthBuffer&&(c.__webglDepthRenderbuffer=e.createRenderbuffer(),O(c.__webglDepthRenderbuffer,t,!0)),n.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(l){n.bindTexture(34067,u.__webglTexture),z(34067,i,v);for(let e=0;e<6;e++)A(c.__webglFramebuffer[e],t,36064,34069+e);g(i,v)&&x(34067,i,t.width,t.height),n.bindTexture(34067,null)}else{let e=3553;h&&(s?e=i.isDataTexture3D?32879:35866:console.warn("THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.")),n.bindTexture(e,u.__webglTexture),z(e,i,v),A(c.__webglFramebuffer,t,36064,e),g(i,v)&&x(3553,i,t.width,t.height),n.bindTexture(3553,null)}t.depthBuffer&&function(t){const i=r.get(t),o=!0===t.isWebGLCubeRenderTarget;if(t.depthTexture){if(o)throw new Error("target.depthTexture not supported in Cube render targets");!function(t,i){if(i&&i.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(36160,t),!i.depthTexture||!i.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(i.depthTexture).__webglTexture&&i.depthTexture.image.width===i.width&&i.depthTexture.image.height===i.height||(i.depthTexture.image.width=i.width,i.depthTexture.image.height=i.height,i.depthTexture.needsUpdate=!0),P(i.depthTexture,0);const o=r.get(i.depthTexture).__webglTexture;if(i.depthTexture.format===Ne)e.framebufferTexture2D(36160,36096,3553,o,0);else{if(i.depthTexture.format!==He)throw new Error("Unknown depthTexture format");e.framebufferTexture2D(36160,33306,3553,o,0)}}(i.__webglFramebuffer,t)}else if(o){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)n.bindFramebuffer(36160,i.__webglFramebuffer[r]),i.__webglDepthbuffer[r]=e.createRenderbuffer(),O(i.__webglDepthbuffer[r],t,!1)}else n.bindFramebuffer(36160,i.__webglFramebuffer),i.__webglDepthbuffer=e.createRenderbuffer(),O(i.__webglDepthbuffer,t,!1);n.bindFramebuffer(36160,null)}(t)},this.updateRenderTargetMipmap=function(e){const t=e.texture;if(g(t,y(e)||s)){const i=e.isWebGLCubeRenderTarget?34067:3553,o=r.get(t).__webglTexture;n.bindTexture(i,o),x(i,t,e.width,e.height),n.bindTexture(i,null)}},this.updateMultisampleRenderTarget=function(t){if(t.isWebGLMultisampleRenderTarget)if(s){const i=t.width,o=t.height;let a=16384;t.depthBuffer&&(a|=256),t.stencilBuffer&&(a|=1024);const s=r.get(t);n.bindFramebuffer(36008,s.__webglMultisampledFramebuffer),n.bindFramebuffer(36009,s.__webglFramebuffer),e.blitFramebuffer(0,0,i,o,0,0,i,o,a,9728),n.bindFramebuffer(36008,null),n.bindFramebuffer(36009,s.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.safeSetTexture2D=function(e,t){e&&e.isWebGLRenderTarget&&(!1===I&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),I=!0),e=e.texture),P(e,t)},this.safeSetTextureCube=function(e,t){e&&e.isWebGLCubeRenderTarget&&(!1===k&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),k=!0),e=e.texture),T(e,t)}}function Zs(e,t,n){const r=n.isWebGL2;return{convert:function(e){let n;if(e===Se)return 5121;if(e===Ae)return 32819;if(e===Oe)return 32820;if(e===De)return 33635;if(e===Pe)return 5120;if(e===Te)return 5122;if(e===Re)return 5123;if(e===Ee)return 5124;if(e===ze)return 5125;if(e===Le)return 5126;if(e===Ce)return r?5131:(n=t.get("OES_texture_half_float"),null!==n?n.HALF_FLOAT_OES:null);if(e===ke)return 6406;if(e===Fe)return 6407;if(e===je)return 6408;if(e===Ue)return 6409;if(e===Be)return 6410;if(e===Ne)return 6402;if(e===He)return 34041;if(e===Ve)return 6403;if(e===We)return 36244;if(e===Ze)return 33319;if(e===qe)return 33320;if(e===Ye)return 36248;if(e===Xe)return 36249;if(e===Ke||e===Qe||e===Je||e===$e){if(n=t.get("WEBGL_compressed_texture_s3tc"),null===n)return null;if(e===Ke)return n.COMPRESSED_RGB_S3TC_DXT1_EXT;if(e===Qe)return n.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(e===Je)return n.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(e===$e)return n.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(e===et||e===tt||e===nt||e===rt){if(n=t.get("WEBGL_compressed_texture_pvrtc"),null===n)return null;if(e===et)return n.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(e===tt)return n.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(e===nt)return n.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(e===rt)return n.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(e===it)return n=t.get("WEBGL_compressed_texture_etc1"),null!==n?n.COMPRESSED_RGB_ETC1_WEBGL:null;if((e===ot||e===at)&&(n=t.get("WEBGL_compressed_texture_etc"),null!==n)){if(e===ot)return n.COMPRESSED_RGB8_ETC2;if(e===at)return n.COMPRESSED_RGBA8_ETC2_EAC}return e===st||e===ct||e===ut||e===lt||e===ft||e===ht||e===vt||e===dt||e===pt||e===mt||e===yt||e===gt||e===xt||e===bt||e===Mt||e===_t||e===St||e===Pt||e===Tt||e===Rt||e===Et||e===zt||e===Lt||e===Ct||e===At||e===Ot||e===Dt||e===It?(n=t.get("WEBGL_compressed_texture_astc"),null!==n?e:null):e===wt?(n=t.get("EXT_texture_compression_bptc"),null!==n?e:null):e===Ie?r?34042:(n=t.get("WEBGL_depth_texture"),null!==n?n.UNSIGNED_INT_24_8_WEBGL:null):void 0}}}Ns.prototype.isMeshDistanceMaterial=!0;class qs extends Lo{constructor(e=[]){super(),this.cameras=e}}qs.prototype.isArrayCamera=!0;class Ys extends ci{constructor(){super(),this.type="Group"}}Ys.prototype.isGroup=!0;const Xs={type:"move"};class Ks{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new Ys,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new Ys,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new ar,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new ar),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new Ys,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new ar,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new ar),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,n){let r=null,i=null,o=null;const a=this._targetRay,s=this._grip,c=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState)if(null!==a&&(r=t.getPose(e.targetRaySpace,n),null!==r&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(Xs))),c&&e.hand){o=!0;for(const r of e.hand.values()){const e=t.getJointPose(r,n);if(void 0===c.joints[r.jointName]){const e=new Ys;e.matrixAutoUpdate=!1,e.visible=!1,c.joints[r.jointName]=e,c.add(e)}const i=c.joints[r.jointName];null!==e&&(i.matrix.fromArray(e.transform.matrix),i.matrix.decompose(i.position,i.rotation,i.scale),i.jointRadius=e.radius),i.visible=null!==e}const r=c.joints["index-finger-tip"],i=c.joints["thumb-tip"],a=r.position.distanceTo(i.position),s=.02,u=.005;c.inputState.pinching&&a>s+u?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&a<=s-u&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==s&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),null!==i&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1));return null!==a&&(a.visible=null!==r),null!==s&&(s.visible=null!==i),null!==c&&(c.visible=null!==o),this}}class Qs extends kn{constructor(e,t){super();const n=this,r=e.state;let i=null,o=1,a=null,s="local-floor",c=null;const u=[],l=new Map,f=new Lo;f.layers.enable(1),f.viewport=new nr;const h=new Lo;h.layers.enable(2),h.viewport=new nr;const v=[f,h],d=new qs;d.layers.enable(1),d.layers.enable(2);let p=null,m=null;function y(e){const t=l.get(e.inputSource);t&&t.dispatchEvent({type:e.type,data:e.inputSource})}function g(){l.forEach((function(e,t){e.disconnect(t)})),l.clear(),p=null,m=null,r.bindXRFramebuffer(null),e.setRenderTarget(e.getRenderTarget()),S.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}function x(e){const t=i.inputSources;for(let e=0;e<u.length;e++)l.set(t[e],u[e]);for(let t=0;t<e.removed.length;t++){const n=e.removed[t],r=l.get(n);r&&(r.dispatchEvent({type:"disconnected",data:n}),l.delete(n))}for(let t=0;t<e.added.length;t++){const n=e.added[t],r=l.get(n);r&&r.dispatchEvent({type:"connected",data:n})}}this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=u[e];return void 0===t&&(t=new Ks,u[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=u[e];return void 0===t&&(t=new Ks,u[e]=t),t.getGripSpace()},this.getHand=function(e){let t=u[e];return void 0===t&&(t=new Ks,u[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){o=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){s=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return a},this.getSession=function(){return i},this.setSession=async function(e){if(i=e,null!==i){i.addEventListener("select",y),i.addEventListener("selectstart",y),i.addEventListener("selectend",y),i.addEventListener("squeeze",y),i.addEventListener("squeezestart",y),i.addEventListener("squeezeend",y),i.addEventListener("end",g),i.addEventListener("inputsourceschange",x);const e=t.getContextAttributes();!0!==e.xrCompatible&&await t.makeXRCompatible();const r={antialias:e.antialias,alpha:e.alpha,depth:e.depth,stencil:e.stencil,framebufferScaleFactor:o},c=new XRWebGLLayer(i,t,r);i.updateRenderState({baseLayer:c}),a=await i.requestReferenceSpace(s),S.setContext(i),S.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}};const b=new ar,w=new ar;function M(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.getCamera=function(e){d.near=h.near=f.near=e.near,d.far=h.far=f.far=e.far,p===d.near&&m===d.far||(i.updateRenderState({depthNear:d.near,depthFar:d.far}),p=d.near,m=d.far);const t=e.parent,n=d.cameras;M(d,t);for(let e=0;e<n.length;e++)M(n[e],t);e.matrixWorld.copy(d.matrixWorld),e.matrix.copy(d.matrix),e.matrix.decompose(e.position,e.quaternion,e.scale);const r=e.children;for(let e=0,t=r.length;e<t;e++)r[e].updateMatrixWorld(!0);return 2===n.length?function(e,t,n){b.setFromMatrixPosition(t.matrixWorld),w.setFromMatrixPosition(n.matrixWorld);const r=b.distanceTo(w),i=t.projectionMatrix.elements,o=n.projectionMatrix.elements,a=i[14]/(i[10]-1),s=i[14]/(i[10]+1),c=(i[9]+1)/i[5],u=(i[9]-1)/i[5],l=(i[8]-1)/i[0],f=(o[8]+1)/o[0],h=a*l,v=a*f,d=r/(-l+f),p=d*-l;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(p),e.translateZ(d),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert();const m=a+d,y=s+d,g=h-p,x=v+(r-p),M=c*s/y*m,_=u*s/y*m;e.projectionMatrix.makePerspective(g,x,M,_,m,y)}(d,f,h):d.projectionMatrix.copy(f.projectionMatrix),d};let _=null;const S=new Uo;S.setAnimationLoop((function(e,t){if(c=t.getViewerPose(a),null!==c){const e=c.views,t=i.renderState.baseLayer;r.bindXRFramebuffer(t.framebuffer);let n=!1;e.length!==d.cameras.length&&(d.cameras.length=0,n=!0);for(let r=0;r<e.length;r++){const i=e[r],o=t.getViewport(i),a=v[r];a.matrix.fromArray(i.transform.matrix),a.projectionMatrix.fromArray(i.projectionMatrix),a.viewport.set(o.x,o.y,o.width,o.height),0===r&&d.matrix.copy(a.matrix),!0===n&&d.cameras.push(a)}}const n=i.inputSources;for(let e=0;e<u.length;e++){const r=u[e],i=n[e];r.update(i,t,a)}_&&_(e,t)})),this.setAnimationLoop=function(e){_=e},this.dispose=function(){}}}function Js(e){function t(t,n){t.opacity.value=n.opacity,n.color&&t.diffuse.value.copy(n.color),n.emissive&&t.emissive.value.copy(n.emissive).multiplyScalar(n.emissiveIntensity),n.map&&(t.map.value=n.map),n.alphaMap&&(t.alphaMap.value=n.alphaMap),n.specularMap&&(t.specularMap.value=n.specularMap);const r=e.get(n).envMap;if(r){t.envMap.value=r,t.flipEnvMap.value=r.isCubeTexture&&r._needsFlipEnvMap?-1:1,t.reflectivity.value=n.reflectivity,t.refractionRatio.value=n.refractionRatio;const i=e.get(r).__maxMipLevel;void 0!==i&&(t.maxMipLevel.value=i)}let i,o;n.lightMap&&(t.lightMap.value=n.lightMap,t.lightMapIntensity.value=n.lightMapIntensity),n.aoMap&&(t.aoMap.value=n.aoMap,t.aoMapIntensity.value=n.aoMapIntensity),n.map?i=n.map:n.specularMap?i=n.specularMap:n.displacementMap?i=n.displacementMap:n.normalMap?i=n.normalMap:n.bumpMap?i=n.bumpMap:n.roughnessMap?i=n.roughnessMap:n.metalnessMap?i=n.metalnessMap:n.alphaMap?i=n.alphaMap:n.emissiveMap?i=n.emissiveMap:n.clearcoatMap?i=n.clearcoatMap:n.clearcoatNormalMap?i=n.clearcoatNormalMap:n.clearcoatRoughnessMap&&(i=n.clearcoatRoughnessMap),void 0!==i&&(i.isWebGLRenderTarget&&(i=i.texture),!0===i.matrixAutoUpdate&&i.updateMatrix(),t.uvTransform.value.copy(i.matrix)),n.aoMap?o=n.aoMap:n.lightMap&&(o=n.lightMap),void 0!==o&&(o.isWebGLRenderTarget&&(o=o.texture),!0===o.matrixAutoUpdate&&o.updateMatrix(),t.uv2Transform.value.copy(o.matrix))}function n(t,n){t.roughness.value=n.roughness,t.metalness.value=n.metalness,n.roughnessMap&&(t.roughnessMap.value=n.roughnessMap),n.metalnessMap&&(t.metalnessMap.value=n.metalnessMap),n.emissiveMap&&(t.emissiveMap.value=n.emissiveMap),n.bumpMap&&(t.bumpMap.value=n.bumpMap,t.bumpScale.value=n.bumpScale,n.side===p&&(t.bumpScale.value*=-1)),n.normalMap&&(t.normalMap.value=n.normalMap,t.normalScale.value.copy(n.normalScale),n.side===p&&t.normalScale.value.negate()),n.displacementMap&&(t.displacementMap.value=n.displacementMap,t.displacementScale.value=n.displacementScale,t.displacementBias.value=n.displacementBias),e.get(n).envMap&&(t.envMapIntensity.value=n.envMapIntensity)}return{refreshFogUniforms:function(e,t){e.fogColor.value.copy(t.color),t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)},refreshMaterialUniforms:function(e,r,i,o){r.isMeshBasicMaterial?t(e,r):r.isMeshLambertMaterial?(t(e,r),function(e,t){t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}(e,r)):r.isMeshToonMaterial?(t(e,r),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===p&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===p&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshPhongMaterial?(t(e,r),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===p&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===p&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshStandardMaterial?(t(e,r),r.isMeshPhysicalMaterial?function(e,t){n(e,t),e.reflectivity.value=t.reflectivity,e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.sheen&&e.sheen.value.copy(t.sheen),t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap),t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,t.side===p&&e.clearcoatNormalScale.value.negate()),e.transmission.value=t.transmission,t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap)}(e,r):n(e,r)):r.isMeshMatcapMaterial?(t(e,r),function(e,t){t.matcap&&(e.matcap.value=t.matcap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===p&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===p&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshDepthMaterial?(t(e,r),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshDistanceMaterial?(t(e,r),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias),e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(e,r)):r.isMeshNormalMaterial?(t(e,r),function(e,t){t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===p&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===p&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(e,r),r.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,r)):r.isPointsMaterial?function(e,t,n,r){let i;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*n,e.scale.value=.5*r,t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.map?i=t.map:t.alphaMap&&(i=t.alphaMap),void 0!==i&&(!0===i.matrixAutoUpdate&&i.updateMatrix(),e.uvTransform.value.copy(i.matrix))}(e,r,i,o):r.isSpriteMaterial?function(e,t){let n;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.map?n=t.map:t.alphaMap&&(n=t.alphaMap),void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}(e,r):r.isShadowMaterial?(e.color.value.copy(r.color),e.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function $s(e){const t=void 0!==(e=e||{}).canvas?e.canvas:function(){const e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return e.style.display="block",e}(),n=void 0!==e.context?e.context:null,r=void 0!==e.alpha&&e.alpha,i=void 0===e.depth||e.depth,o=void 0===e.stencil||e.stencil,a=void 0!==e.antialias&&e.antialias,s=void 0===e.premultipliedAlpha||e.premultipliedAlpha,c=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,u=void 0!==e.powerPreference?e.powerPreference:"default",l=void 0!==e.failIfMajorPerformanceCaveat&&e.failIfMajorPerformanceCaveat;let f=null,h=null;const v=[],d=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=Kt,this.physicallyCorrectLights=!1,this.toneMapping=J,this.toneMappingExposure=1;const p=this;let m=!1,y=0,g=0,x=null,b=-1,w=null;const M=new nr,_=new nr;let S=null,P=t.width,T=t.height,R=1,E=null,z=null;const L=new nr(0,0,P,T),C=new nr(0,0,P,T);let A=!1;const O=new jo;let D=!1,I=!1;const k=new Fr,F=new ar,j={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function U(){return null===x?R:1}let B,G,N,H,V,W,Z,q,Y,X,K,Q,$,ee,te,ne,re,ie,oe,ae,se,ce,ue=n;function le(e,n){for(let r=0;r<e.length;r++){const i=e[r],o=t.getContext(i,n);if(null!==o)return o}return null}try{const e={alpha:r,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:l};if(t.addEventListener("webglcontextlost",ve,!1),t.addEventListener("webglcontextrestored",de,!1),null===ue){const t=["webgl2","webgl","experimental-webgl"];if(!0===p.isWebGL1Renderer&&t.shift(),ue=le(t,e),null===ue)throw le(t)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===ue.getShaderPrecisionFormat&&(ue.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(e){throw console.error("THREE.WebGLRenderer: "+e.message),e}function fe(){B=new Qo(ue),G=new Yo(ue,B,e),B.init(G),se=new Zs(ue,B,G),N=new Vs(ue,B,G),H=new ea(ue),V=new Ls,W=new Ws(ue,B,N,V,G,se,H),Z=new Ko(p),q=new Bo(ue,G),ce=new Zo(ue,B,q,G),Y=new Jo(ue,q,H,ce),X=new ia(ue,Y,q,H),ie=new ra(ue),te=new Xo(V),K=new zs(p,Z,B,G,ce,te),Q=new Js(V),$=new Ds(V),ee=new Bs(B,G),re=new Wo(p,Z,N,X,s),ne=new Hs(p,X,G),oe=new qo(ue,B,H,G),ae=new $o(ue,B,H,G),H.programs=K.programs,p.capabilities=G,p.extensions=B,p.properties=V,p.renderLists=$,p.shadowMap=ne,p.state=N,p.info=H}fe();const he=new Qs(p,ue);function ve(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),m=!0}function de(){console.log("THREE.WebGLRenderer: Context Restored."),m=!1;const e=H.autoReset,t=ne.enabled,n=ne.autoUpdate,r=ne.needsUpdate,i=ne.type;fe(),H.autoReset=e,ne.enabled=t,ne.autoUpdate=n,ne.needsUpdate=r,ne.type=i}function pe(e){const t=e.target;t.removeEventListener("dispose",pe),function(e){(function(e){const t=V.get(e).programs;void 0!==t&&t.forEach((function(e){K.releaseProgram(e)}))})(e),V.remove(e)}(t)}this.xr=he,this.getContext=function(){return ue},this.getContextAttributes=function(){return ue.getContextAttributes()},this.forceContextLoss=function(){const e=B.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){const e=B.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return R},this.setPixelRatio=function(e){void 0!==e&&(R=e,this.setSize(P,T,!1))},this.getSize=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),e=new Xn),e.set(P,T)},this.setSize=function(e,n,r){he.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(P=e,T=n,t.width=Math.floor(e*R),t.height=Math.floor(n*R),!1!==r&&(t.style.width=e+"px",t.style.height=n+"px"),this.setViewport(0,0,e,n))},this.getDrawingBufferSize=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),e=new Xn),e.set(P*R,T*R).floor()},this.setDrawingBufferSize=function(e,n,r){P=e,T=n,R=r,t.width=Math.floor(e*r),t.height=Math.floor(n*r),this.setViewport(0,0,e,n)},this.getCurrentViewport=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),e=new nr),e.copy(M)},this.getViewport=function(e){return e.copy(L)},this.setViewport=function(e,t,n,r){e.isVector4?L.set(e.x,e.y,e.z,e.w):L.set(e,t,n,r),N.viewport(M.copy(L).multiplyScalar(R).floor())},this.getScissor=function(e){return e.copy(C)},this.setScissor=function(e,t,n,r){e.isVector4?C.set(e.x,e.y,e.z,e.w):C.set(e,t,n,r),N.scissor(_.copy(C).multiplyScalar(R).floor())},this.getScissorTest=function(){return A},this.setScissorTest=function(e){N.setScissorTest(A=e)},this.setOpaqueSort=function(e){E=e},this.setTransparentSort=function(e){z=e},this.getClearColor=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getClearColor() now requires a Color as an argument"),e=new Ai),e.copy(re.getClearColor())},this.setClearColor=function(){re.setClearColor.apply(re,arguments)},this.getClearAlpha=function(){return re.getClearAlpha()},this.setClearAlpha=function(){re.setClearAlpha.apply(re,arguments)},this.clear=function(e,t,n){let r=0;(void 0===e||e)&&(r|=16384),(void 0===t||t)&&(r|=256),(void 0===n||n)&&(r|=1024),ue.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.dispose=function(){t.removeEventListener("webglcontextlost",ve,!1),t.removeEventListener("webglcontextrestored",de,!1),$.dispose(),ee.dispose(),V.dispose(),Z.dispose(),X.dispose(),ce.dispose(),he.dispose(),he.removeEventListener("sessionstart",ye),he.removeEventListener("sessionend",ge),xe.stop()},this.renderBufferImmediate=function(e,t){ce.initAttributes();const n=V.get(e);e.hasPositions&&!n.position&&(n.position=ue.createBuffer()),e.hasNormals&&!n.normal&&(n.normal=ue.createBuffer()),e.hasUvs&&!n.uv&&(n.uv=ue.createBuffer()),e.hasColors&&!n.color&&(n.color=ue.createBuffer());const r=t.getAttributes();e.hasPositions&&(ue.bindBuffer(34962,n.position),ue.bufferData(34962,e.positionArray,35048),ce.enableAttribute(r.position),ue.vertexAttribPointer(r.position,3,5126,!1,0,0)),e.hasNormals&&(ue.bindBuffer(34962,n.normal),ue.bufferData(34962,e.normalArray,35048),ce.enableAttribute(r.normal),ue.vertexAttribPointer(r.normal,3,5126,!1,0,0)),e.hasUvs&&(ue.bindBuffer(34962,n.uv),ue.bufferData(34962,e.uvArray,35048),ce.enableAttribute(r.uv),ue.vertexAttribPointer(r.uv,2,5126,!1,0,0)),e.hasColors&&(ue.bindBuffer(34962,n.color),ue.bufferData(34962,e.colorArray,35048),ce.enableAttribute(r.color),ue.vertexAttribPointer(r.color,3,5126,!1,0,0)),ce.disableUnusedAttributes(),ue.drawArrays(4,0,e.count),e.count=0},this.renderBufferDirect=function(e,t,n,r,i,o){null===t&&(t=j);const a=i.isMesh&&i.matrixWorld.determinant()<0,s=Te(e,t,r,i);N.setMaterial(r,a);let c=n.index;const u=n.attributes.position;if(null===c){if(void 0===u||0===u.count)return}else if(0===c.count)return;let l,f=1;!0===r.wireframe&&(c=Y.getWireframeAttribute(n),f=2),(r.morphTargets||r.morphNormals)&&ie.update(i,n,r,s),ce.setup(i,r,s,n,c);let h=oe;null!==c&&(l=q.get(c),h=ae,h.setIndex(l));const v=null!==c?c.count:u.count,d=n.drawRange.start*f,p=n.drawRange.count*f,m=null!==o?o.start*f:0,y=null!==o?o.count*f:1/0,g=Math.max(d,m),x=Math.min(v,d+p,m+y)-1,b=Math.max(0,x-g+1);if(0!==b){if(i.isMesh)!0===r.wireframe?(N.setLineWidth(r.wireframeLinewidth*U()),h.setMode(1)):h.setMode(4);else if(i.isLine){let e=r.linewidth;void 0===e&&(e=1),N.setLineWidth(e*U()),i.isLineSegments?h.setMode(1):i.isLineLoop?h.setMode(2):h.setMode(3)}else i.isPoints?h.setMode(0):i.isSprite&&h.setMode(4);if(i.isInstancedMesh)h.renderInstances(g,b,i.count);else if(n.isInstancedBufferGeometry){const e=Math.min(n.instanceCount,n._maxInstanceCount);h.renderInstances(g,b,e)}else h.render(g,b)}},this.compile=function(e,t){h=ee.get(e),h.init(),e.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(h.pushLight(e),e.castShadow&&h.pushShadow(e))})),h.setupLights(),e.traverse((function(t){const n=t.material;if(n)if(Array.isArray(n))for(let r=0;r<n.length;r++)_e(n[r],e,t);else _e(n,e,t)}))};let me=null;function ye(){xe.stop()}function ge(){xe.start()}const xe=new Uo;function be(e,t,n,r){if(!1===e.visible)return;if(e.layers.test(t.layers))if(e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)h.pushLight(e),e.castShadow&&h.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||O.intersectsSprite(e)){r&&F.setFromMatrixPosition(e.matrixWorld).applyMatrix4(k);const t=X.update(e),i=e.material;i.visible&&f.push(e,t,i,n,F.z,null)}}else if(e.isImmediateRenderObject)r&&F.setFromMatrixPosition(e.matrixWorld).applyMatrix4(k),f.push(e,null,e.material,n,F.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.frame!==H.render.frame&&(e.skeleton.update(),e.skeleton.frame=H.render.frame),!e.frustumCulled||O.intersectsObject(e))){r&&F.setFromMatrixPosition(e.matrixWorld).applyMatrix4(k);const t=X.update(e),i=e.material;if(Array.isArray(i)){const r=t.groups;for(let o=0,a=r.length;o<a;o++){const a=r[o],s=i[a.materialIndex];s&&s.visible&&f.push(e,t,s,n,F.z,a)}}else i.visible&&f.push(e,t,i,n,F.z,null)}const i=e.children;for(let e=0,o=i.length;e<o;e++)be(i[e],t,n,r)}function we(e,t,n){const r=!0===t.isScene?t.overrideMaterial:null;for(let i=0,o=e.length;i<o;i++){const o=e[i],a=o.object,s=o.geometry,c=null===r?o.material:r,u=o.group;if(n.isArrayCamera){const e=n.cameras;for(let n=0,r=e.length;n<r;n++){const r=e[n];a.layers.test(r.layers)&&(N.viewport(M.copy(r.viewport)),h.setupLightsView(r),Me(a,t,r,s,c,u))}}else Me(a,t,n,s,c,u)}}function Me(e,t,n,r,i,o){if(e.onBeforeRender(p,t,n,r,i,o),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),e.isImmediateRenderObject){const r=Te(n,t,i,e);N.setMaterial(i),ce.reset(),function(e,t){e.render((function(e){p.renderBufferImmediate(e,t)}))}(e,r)}else p.renderBufferDirect(n,t,r,i,e,o);e.onAfterRender(p,t,n,r,i,o)}function _e(e,t,n){!0!==t.isScene&&(t=j);const r=V.get(e),i=h.state.lights,o=h.state.shadowsArray,a=i.state.version,s=K.getParameters(e,i.state,o,t,n),c=K.getProgramCacheKey(s);let u=r.programs;r.environment=e.isMeshStandardMaterial?t.environment:null,r.fog=t.fog,r.envMap=Z.get(e.envMap||r.environment),void 0===u&&(e.addEventListener("dispose",pe),u=new Map,r.programs=u);let l=u.get(c);if(void 0!==l){if(r.currentProgram===l&&r.lightsStateVersion===a)return Pe(e,s),l}else s.uniforms=K.getUniforms(e),e.onBuild(s,p),e.onBeforeCompile(s,p),l=K.acquireProgram(s,c),u.set(c,l),r.uniforms=s.uniforms;const f=r.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(f.clippingPlanes=te.uniform),Pe(e,s),r.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),r.lightsStateVersion=a,r.needsLights&&(f.ambientLightColor.value=i.state.ambient,f.lightProbe.value=i.state.probe,f.directionalLights.value=i.state.directional,f.directionalLightShadows.value=i.state.directionalShadow,f.spotLights.value=i.state.spot,f.spotLightShadows.value=i.state.spotShadow,f.rectAreaLights.value=i.state.rectArea,f.ltc_1.value=i.state.rectAreaLTC1,f.ltc_2.value=i.state.rectAreaLTC2,f.pointLights.value=i.state.point,f.pointLightShadows.value=i.state.pointShadow,f.hemisphereLights.value=i.state.hemi,f.directionalShadowMap.value=i.state.directionalShadowMap,f.directionalShadowMatrix.value=i.state.directionalShadowMatrix,f.spotShadowMap.value=i.state.spotShadowMap,f.spotShadowMatrix.value=i.state.spotShadowMatrix,f.pointShadowMap.value=i.state.pointShadowMap,f.pointShadowMatrix.value=i.state.pointShadowMatrix);const v=l.getUniforms(),d=cs.seqWithValue(v.seq,f);return r.currentProgram=l,r.uniformsList=d,l}function Pe(e,t){const n=V.get(e);n.outputEncoding=t.outputEncoding,n.instancing=t.instancing,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas}function Te(e,t,n,r){!0!==t.isScene&&(t=j),W.resetTextureUnits();const i=t.fog,o=n.isMeshStandardMaterial?t.environment:null,a=null===x?p.outputEncoding:x.texture.encoding,s=Z.get(n.envMap||o),c=!0===n.vertexColors&&r.geometry&&r.geometry.attributes.color&&4===r.geometry.attributes.color.itemSize,u=V.get(n),l=h.state.lights;if(!0===D&&(!0===I||e!==w)){const t=e===w&&n.id===b;te.setState(n,e,t)}let f=!1;n.version===u.__version?u.needsLights&&u.lightsStateVersion!==l.state.version||u.outputEncoding!==a||r.isInstancedMesh&&!1===u.instancing?f=!0:r.isInstancedMesh||!0!==u.instancing?u.envMap!==s||n.fog&&u.fog!==i?f=!0:void 0===u.numClippingPlanes||u.numClippingPlanes===te.numPlanes&&u.numIntersection===te.numIntersection?u.vertexAlphas!==c&&(f=!0):f=!0:f=!0:(f=!0,u.__version=n.version);let v=u.currentProgram;!0===f&&(v=_e(n,t,r));let d=!1,m=!1,y=!1;const g=v.getUniforms(),M=u.uniforms;if(N.useProgram(v.program)&&(d=!0,m=!0,y=!0),n.id!==b&&(b=n.id,m=!0),d||w!==e){if(g.setValue(ue,"projectionMatrix",e.projectionMatrix),G.logarithmicDepthBuffer&&g.setValue(ue,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),w!==e&&(w=e,m=!0,y=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshStandardMaterial||n.envMap){const t=g.map.cameraPosition;void 0!==t&&t.setValue(ue,F.setFromMatrixPosition(e.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial)&&g.setValue(ue,"isOrthographic",!0===e.isOrthographicCamera),(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.isShadowMaterial||n.skinning)&&g.setValue(ue,"viewMatrix",e.matrixWorldInverse)}if(n.skinning){g.setOptional(ue,r,"bindMatrix"),g.setOptional(ue,r,"bindMatrixInverse");const e=r.skeleton;if(e){const t=e.bones;if(G.floatVertexTextures){if(null===e.boneTexture){let n=Math.sqrt(4*t.length);n=Zn(n),n=Math.max(n,4);const r=new Float32Array(n*n*4);r.set(e.boneMatrices);const i=new Io(r,n,n,je,Le);e.boneMatrices=r,e.boneTexture=i,e.boneTextureSize=n}g.setValue(ue,"boneTexture",e.boneTexture,W),g.setValue(ue,"boneTextureSize",e.boneTextureSize)}else g.setOptional(ue,e,"boneMatrices")}}var _,S;return(m||u.receiveShadow!==r.receiveShadow)&&(u.receiveShadow=r.receiveShadow,g.setValue(ue,"receiveShadow",r.receiveShadow)),m&&(g.setValue(ue,"toneMappingExposure",p.toneMappingExposure),u.needsLights&&(S=y,(_=M).ambientLightColor.needsUpdate=S,_.lightProbe.needsUpdate=S,_.directionalLights.needsUpdate=S,_.directionalLightShadows.needsUpdate=S,_.pointLights.needsUpdate=S,_.pointLightShadows.needsUpdate=S,_.spotLights.needsUpdate=S,_.spotLightShadows.needsUpdate=S,_.rectAreaLights.needsUpdate=S,_.hemisphereLights.needsUpdate=S),i&&n.fog&&Q.refreshFogUniforms(M,i),Q.refreshMaterialUniforms(M,n,R,T),cs.upload(ue,u.uniformsList,M,W)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(cs.upload(ue,u.uniformsList,M,W),n.uniformsNeedUpdate=!1),n.isSpriteMaterial&&g.setValue(ue,"center",r.center),g.setValue(ue,"modelViewMatrix",r.modelViewMatrix),g.setValue(ue,"normalMatrix",r.normalMatrix),g.setValue(ue,"modelMatrix",r.matrixWorld),v}xe.setAnimationLoop((function(e){me&&me(e)})),"undefined"!=typeof window&&xe.setContext(window),this.setAnimationLoop=function(e){me=e,he.setAnimationLoop(e),null===e?xe.stop():xe.start()},he.addEventListener("sessionstart",ye),he.addEventListener("sessionend",ge),this.render=function(e,t){let n,r;if(void 0!==arguments[2]&&(console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead."),n=arguments[2]),void 0!==arguments[3]&&(console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead."),r=arguments[3]),void 0!==t&&!0!==t.isCamera)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===m)return;!0===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),!0===he.enabled&&!0===he.isPresenting&&(t=he.getCamera(t)),!0===e.isScene&&e.onBeforeRender(p,e,t,n||x),h=ee.get(e,d.length),h.init(),d.push(h),k.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),O.setFromProjectionMatrix(k),I=this.localClippingEnabled,D=te.init(this.clippingPlanes,I,t),f=$.get(e,v.length),f.init(),v.push(f),be(e,t,0,p.sortObjects),f.finish(),!0===p.sortObjects&&f.sort(E,z),!0===D&&te.beginShadows();const i=h.state.shadowsArray;ne.render(i,e,t),h.setupLights(),h.setupLightsView(t),!0===D&&te.endShadows(),!0===this.info.autoReset&&this.info.reset(),void 0!==n&&this.setRenderTarget(n),re.render(f,e,t,r);const o=f.opaque,a=f.transparent;o.length>0&&we(o,e,t),a.length>0&&we(a,e,t),null!==x&&(W.updateRenderTargetMipmap(x),W.updateMultisampleRenderTarget(x)),!0===e.isScene&&e.onAfterRender(p,e,t),N.buffers.depth.setTest(!0),N.buffers.depth.setMask(!0),N.buffers.color.setMask(!0),N.setPolygonOffset(!1),ce.resetDefaultState(),b=-1,w=null,d.pop(),h=d.length>0?d[d.length-1]:null,v.pop(),f=v.length>0?v[v.length-1]:null},this.getActiveCubeFace=function(){return y},this.getActiveMipmapLevel=function(){return g},this.getRenderTarget=function(){return x},this.setRenderTarget=function(e,t=0,n=0){x=e,y=t,g=n,e&&void 0===V.get(e).__webglFramebuffer&&W.setupRenderTarget(e);let r=null,i=!1,o=!1;if(e){const n=e.texture;(n.isDataTexture3D||n.isDataTexture2DArray)&&(o=!0);const a=V.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(r=a[t],i=!0):r=e.isWebGLMultisampleRenderTarget?V.get(e).__webglMultisampledFramebuffer:a,M.copy(e.viewport),_.copy(e.scissor),S=e.scissorTest}else M.copy(L).multiplyScalar(R).floor(),_.copy(C).multiplyScalar(R).floor(),S=A;if(N.bindFramebuffer(36160,r),N.viewport(M),N.scissor(_),N.setScissorTest(S),i){const r=V.get(e.texture);ue.framebufferTexture2D(36160,36064,34069+t,r.__webglTexture,n)}else if(o){const r=V.get(e.texture),i=t||0;ue.framebufferTextureLayer(36160,36064,r.__webglTexture,n||0,i)}},this.readRenderTargetPixels=function(e,t,n,r,i,o,a){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let s=V.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==a&&(s=s[a]),s){N.bindFramebuffer(36160,s);try{const a=e.texture,s=a.format,c=a.type;if(s!==je&&se.convert(s)!==ue.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const u=c===Ce&&(B.has("EXT_color_buffer_half_float")||G.isWebGL2&&B.has("EXT_color_buffer_float"));if(!(c===Se||se.convert(c)===ue.getParameter(35738)||c===Le&&(G.isWebGL2||B.has("OES_texture_float")||B.has("WEBGL_color_buffer_float"))||u))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");36053===ue.checkFramebufferStatus(36160)?t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&ue.readPixels(t,n,r,i,se.convert(s),se.convert(c),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{const e=null!==x?V.get(x).__webglFramebuffer:null;N.bindFramebuffer(36160,e)}}},this.copyFramebufferToTexture=function(e,t,n=0){const r=Math.pow(2,-n),i=Math.floor(t.image.width*r),o=Math.floor(t.image.height*r),a=se.convert(t.format);W.setTexture2D(t,0),ue.copyTexImage2D(3553,n,a,e.x,e.y,i,o,0),N.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r=0){const i=t.image.width,o=t.image.height,a=se.convert(n.format),s=se.convert(n.type);W.setTexture2D(n,0),ue.pixelStorei(37440,n.flipY),ue.pixelStorei(37441,n.premultiplyAlpha),ue.pixelStorei(3317,n.unpackAlignment),t.isDataTexture?ue.texSubImage2D(3553,r,e.x,e.y,i,o,a,s,t.image.data):t.isCompressedTexture?ue.compressedTexSubImage2D(3553,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,a,t.mipmaps[0].data):ue.texSubImage2D(3553,r,e.x,e.y,a,s,t.image),0===r&&n.generateMipmaps&&ue.generateMipmap(3553),N.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,r,i=0){if(p.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const{width:o,height:a,data:s}=n.image,c=se.convert(r.format),u=se.convert(r.type);let l;if(r.isDataTexture3D)W.setTexture3D(r,0),l=32879;else{if(!r.isDataTexture2DArray)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");W.setTexture2DArray(r,0),l=35866}ue.pixelStorei(37440,r.flipY),ue.pixelStorei(37441,r.premultiplyAlpha),ue.pixelStorei(3317,r.unpackAlignment);const f=ue.getParameter(3314),h=ue.getParameter(32878),v=ue.getParameter(3316),d=ue.getParameter(3315),m=ue.getParameter(32877);ue.pixelStorei(3314,o),ue.pixelStorei(32878,a),ue.pixelStorei(3316,e.min.x),ue.pixelStorei(3315,e.min.y),ue.pixelStorei(32877,e.min.z),ue.texSubImage3D(l,i,t.x,t.y,t.z,e.max.x-e.min.x+1,e.max.y-e.min.y+1,e.max.z-e.min.z+1,c,u,s),ue.pixelStorei(3314,f),ue.pixelStorei(32878,h),ue.pixelStorei(3316,v),ue.pixelStorei(3315,d),ue.pixelStorei(32877,m),0===i&&r.generateMipmaps&&ue.generateMipmap(l),N.unbindTexture()},this.initTexture=function(e){W.setTexture2D(e,0),N.unbindTexture()},this.resetState=function(){y=0,g=0,x=null,N.reset(),ce.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}class ec extends $s{}ec.prototype.isWebGL1Renderer=!0;class tc{constructor(e,t=25e-5){this.name="",this.color=new Ai(e),this.density=t}clone(){return new tc(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}tc.prototype.isFogExp2=!0;class nc{constructor(e,t=1,n=1e3){this.name="",this.color=new Ai(e),this.near=t,this.far=n}clone(){return new nc(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}nc.prototype.isFog=!0;class rc extends ci{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.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}toJSON(e){const t=super.toJSON(e);return null!==this.background&&(t.object.background=this.background.toJSON(e)),null!==this.environment&&(t.object.environment=this.environment.toJSON(e)),null!==this.fog&&(t.object.fog=this.fog.toJSON()),t}}rc.prototype.isScene=!0;class ic{constructor(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=Pn,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Gn(),this.onUploadCallback=function(){}}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,i=this.stride;r<i;r++)this.array[e+r]=t.array[n+r];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=Gn()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new ic(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=Gn()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}ic.prototype.isInterleavedBuffer=!0;const oc=new ar;class ac{constructor(e,t,n,r){this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=!0===r}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)oc.x=this.getX(t),oc.y=this.getY(t),oc.z=this.getZ(t),oc.applyMatrix4(e),this.setXYZ(t,oc.x,oc.y,oc.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)oc.x=this.getX(t),oc.y=this.getY(t),oc.z=this.getZ(t),oc.applyNormalMatrix(e),this.setXYZ(t,oc.x,oc.y,oc.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)oc.x=this.getX(t),oc.y=this.getY(t),oc.z=this.getZ(t),oc.transformDirection(e),this.setXYZ(t,oc.x,oc.y,oc.z);return this}setX(e,t){return this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){return this.data.array[e*this.data.stride+this.offset]}getY(e){return this.data.array[e*this.data.stride+this.offset+1]}getZ(e){return this.data.array[e*this.data.stride+this.offset+2]}getW(e){return this.data.array[e*this.data.stride+this.offset+3]}setXY(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(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(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}clone(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return new ki(new this.array.constructor(e),this.itemSize,this.normalized)}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new ac(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}ac.prototype.isInterleavedBufferAttribute=!0;class sc extends Pi{constructor(e){super(),this.type="SpriteMaterial",this.color=new Ai(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this}}let cc;sc.prototype.isSpriteMaterial=!0;const uc=new ar,lc=new ar,fc=new ar,hc=new Xn,vc=new Xn,dc=new Fr,pc=new ar,mc=new ar,yc=new ar,gc=new Xn,xc=new Xn,bc=new Xn;class wc extends ci{constructor(e){if(super(),this.type="Sprite",void 0===cc){cc=new ro;const e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),t=new ic(e,5);cc.setIndex([0,1,2,0,2,3]),cc.setAttribute("position",new ac(t,3,0,!1)),cc.setAttribute("uv",new ac(t,2,3,!1))}this.geometry=cc,this.material=void 0!==e?e:new sc,this.center=new Xn(.5,.5)}raycast(e,t){null===e.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),lc.setFromMatrixScale(this.matrixWorld),dc.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),fc.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&lc.multiplyScalar(-fc.z);const n=this.material.rotation;let r,i;0!==n&&(i=Math.cos(n),r=Math.sin(n));const o=this.center;Mc(pc.set(-.5,-.5,0),fc,o,lc,r,i),Mc(mc.set(.5,-.5,0),fc,o,lc,r,i),Mc(yc.set(.5,.5,0),fc,o,lc,r,i),gc.set(0,0),xc.set(1,0),bc.set(1,1);let a=e.ray.intersectTriangle(pc,mc,yc,!1,uc);if(null===a&&(Mc(mc.set(-.5,.5,0),fc,o,lc,r,i),xc.set(0,1),a=e.ray.intersectTriangle(pc,yc,mc,!1,uc),null===a))return;const s=e.ray.origin.distanceTo(uc);s<e.near||s>e.far||t.push({distance:s,point:uc.clone(),uv:_i.getUV(uc,pc,mc,yc,gc,xc,bc,new Xn),face:null,object:this})}copy(e){return super.copy(e),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function Mc(e,t,n,r,i,o){hc.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(vc.x=o*hc.x-i*hc.y,vc.y=i*hc.x+o*hc.y):vc.copy(hc),e.copy(t),e.x+=vc.x,e.y+=vc.y,e.applyMatrix4(dc)}wc.prototype.isSprite=!0;const _c=new ar,Sc=new ar;class Pc extends ci{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let e=0,n=t.length;e<n;e++){const n=t[e];this.addLevel(n.object.clone(),n.distance)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0){t=Math.abs(t);const n=this.levels;let r;for(r=0;r<n.length&&!(t<n[r].distance);r++);return n.splice(r,0,{distance:t,object:e}),this.add(e),this}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let n,r;for(n=1,r=t.length;n<r&&!(e<t[n].distance);n++);return t[n-1].object}return null}raycast(e,t){if(this.levels.length>0){_c.setFromMatrixPosition(this.matrixWorld);const n=e.ray.origin.distanceTo(_c);this.getObjectForDistance(n).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){_c.setFromMatrixPosition(e.matrixWorld),Sc.setFromMatrixPosition(this.matrixWorld);const n=_c.distanceTo(Sc)/e.zoom;let r,i;for(t[0].object.visible=!0,r=1,i=t.length;r<i&&n>=t[r].distance;r++)t[r-1].object.visible=!1,t[r].object.visible=!0;for(this._currentLevel=r-1;r<i;r++)t[r].object.visible=!1}}toJSON(e){const t=super.toJSON(e);!1===this.autoUpdate&&(t.object.autoUpdate=!1),t.object.levels=[];const n=this.levels;for(let e=0,r=n.length;e<r;e++){const r=n[e];t.object.levels.push({object:r.object.uuid,distance:r.distance})}return t}}const Tc=new ar,Rc=new nr,Ec=new nr,zc=new ar,Lc=new Fr;class Cc extends Mo{constructor(e,t){super(e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Fr,this.bindMatrixInverse=new Fr}copy(e){return super.copy(e),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,this}bind(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new nr,t=this.geometry.attributes.skinWeight;for(let n=0,r=t.count;n<r;n++){e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.w=t.getW(n);const r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),"attached"===this.bindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}boneTransform(e,t){const n=this.skeleton,r=this.geometry;Rc.fromBufferAttribute(r.attributes.skinIndex,e),Ec.fromBufferAttribute(r.attributes.skinWeight,e),Tc.fromBufferAttribute(r.attributes.position,e).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let e=0;e<4;e++){const r=Ec.getComponent(e);if(0!==r){const i=Rc.getComponent(e);Lc.multiplyMatrices(n.bones[i].matrixWorld,n.boneInverses[i]),t.addScaledVector(zc.copy(Tc).applyMatrix4(Lc),r)}}return t.applyMatrix4(this.bindMatrixInverse)}}Cc.prototype.isSkinnedMesh=!0;class Ac extends ci{constructor(){super(),this.type="Bone"}}Ac.prototype.isBone=!0;const Oc=new Fr,Dc=new Fr;class Ic{constructor(e=[],t=[]){this.uuid=Gn(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.frame=-1,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(16*e.length),0===t.length)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let e=0,t=this.bones.length;e<t;e++)this.boneInverses.push(new Fr)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const t=new Fr;this.bones[e]&&t.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(t)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&t.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&(t.parent&&t.parent.isBone?(t.matrix.copy(t.parent.matrixWorld).invert(),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,r=this.boneTexture;for(let r=0,i=e.length;r<i;r++){const i=e[r]?e[r].matrixWorld:Dc;Oc.multiplyMatrices(i,t[r]),Oc.toArray(n,16*r)}null!==r&&(r.needsUpdate=!0)}clone(){return new Ic(this.bones,this.boneInverses)}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const n=this.bones[t];if(n.name===e)return n}}dispose(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,r=e.bones.length;n<r;n++){const r=e.bones[n];let i=t[r];void 0===i&&(console.warn("THREE.Skeleton: No bone found with UUID:",r),i=new Ac),this.bones.push(i),this.boneInverses.push((new Fr).fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.5,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let r=0,i=t.length;r<i;r++){const i=t[r];e.bones.push(i.uuid);const o=n[r];e.boneInverses.push(o.toArray())}return e}}const kc=new Fr,Fc=new Fr,jc=[],Uc=new Mo;class Bc extends Mo{constructor(e,t,n){super(e,t),this.instanceMatrix=new ki(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.frustumCulled=!1}copy(e){return super.copy(e),this.instanceMatrix.copy(e.instanceMatrix),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,this}getColorAt(e,t){t.fromArray(this.instanceColor.array,3*e)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,16*e)}raycast(e,t){const n=this.matrixWorld,r=this.count;if(Uc.geometry=this.geometry,Uc.material=this.material,void 0!==Uc.material)for(let i=0;i<r;i++){this.getMatrixAt(i,kc),Fc.multiplyMatrices(n,kc),Uc.matrixWorld=Fc,Uc.raycast(e,jc);for(let e=0,n=jc.length;e<n;e++){const n=jc[e];n.instanceId=i,n.object=this,t.push(n)}jc.length=0}}setColorAt(e,t){null===this.instanceColor&&(this.instanceColor=new ki(new Float32Array(3*this.count),3)),t.toArray(this.instanceColor.array,3*e)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,16*e)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}Bc.prototype.isInstancedMesh=!0;class Gc extends Pi{constructor(e){super(),this.type="LineBasicMaterial",this.color=new Ai(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.morphTargets=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.morphTargets=e.morphTargets,this}}Gc.prototype.isLineBasicMaterial=!0;const Nc=new ar,Hc=new ar,Vc=new Fr,Wc=new kr,Zc=new Er;class qc extends ci{constructor(e=new ro,t=new Gc){super(),this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),this.material=e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry)if(null===e.index){const t=e.attributes.position,n=[0];for(let e=1,r=t.count;e<r;e++)Nc.fromBufferAttribute(t,e-1),Hc.fromBufferAttribute(t,e),n[e]=n[e-1],n[e]+=Nc.distanceTo(Hc);e.setAttribute("lineDistance",new Wi(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Line.threshold,o=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),Zc.copy(n.boundingSphere),Zc.applyMatrix4(r),Zc.radius+=i,!1===e.ray.intersectsSphere(Zc))return;Vc.copy(r).invert(),Wc.copy(e.ray).applyMatrix4(Vc);const a=i/((this.scale.x+this.scale.y+this.scale.z)/3),s=a*a,c=new ar,u=new ar,l=new ar,f=new ar,h=this.isLineSegments?2:1;if(n.isBufferGeometry){const r=n.index,i=n.attributes.position;if(null!==r)for(let n=Math.max(0,o.start),a=Math.min(r.count,o.start+o.count)-1;n<a;n+=h){const o=r.getX(n),a=r.getX(n+1);if(c.fromBufferAttribute(i,o),u.fromBufferAttribute(i,a),Wc.distanceSqToSegment(c,u,f,l)>s)continue;f.applyMatrix4(this.matrixWorld);const h=e.ray.origin.distanceTo(f);h<e.near||h>e.far||t.push({distance:h,point:l.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}else for(let n=Math.max(0,o.start),r=Math.min(i.count,o.start+o.count)-1;n<r;n+=h){if(c.fromBufferAttribute(i,n),u.fromBufferAttribute(i,n+1),Wc.distanceSqToSegment(c,u,f,l)>s)continue;f.applyMatrix4(this.matrixWorld);const r=e.ray.origin.distanceTo(f);r<e.near||r>e.far||t.push({distance:r,point:l.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}qc.prototype.isLine=!0;const Yc=new ar,Xc=new ar;class Kc extends qc{constructor(e,t){super(e,t),this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry)if(null===e.index){const t=e.attributes.position,n=[];for(let e=0,r=t.count;e<r;e+=2)Yc.fromBufferAttribute(t,e),Xc.fromBufferAttribute(t,e+1),n[e]=0===e?0:n[e-1],n[e+1]=n[e]+Yc.distanceTo(Xc);e.setAttribute("lineDistance",new Wi(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}}Kc.prototype.isLineSegments=!0;class Qc extends qc{constructor(e,t){super(e,t),this.type="LineLoop"}}Qc.prototype.isLineLoop=!0;class Jc extends Pi{constructor(e){super(),this.type="PointsMaterial",this.color=new Ai(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.morphTargets=e.morphTargets,this}}Jc.prototype.isPointsMaterial=!0;const $c=new Fr,eu=new kr,tu=new Er,nu=new ar;class ru extends ci{constructor(e=new ro,t=new Jc){super(),this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),this.material=e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Points.threshold,o=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),tu.copy(n.boundingSphere),tu.applyMatrix4(r),tu.radius+=i,!1===e.ray.intersectsSphere(tu))return;$c.copy(r).invert(),eu.copy(e.ray).applyMatrix4($c);const a=i/((this.scale.x+this.scale.y+this.scale.z)/3),s=a*a;if(n.isBufferGeometry){const i=n.index,a=n.attributes.position;if(null!==i)for(let n=Math.max(0,o.start),c=Math.min(i.count,o.start+o.count);n<c;n++){const o=i.getX(n);nu.fromBufferAttribute(a,o),iu(nu,o,s,r,e,t,this)}else for(let n=Math.max(0,o.start),i=Math.min(a.count,o.start+o.count);n<i;n++)nu.fromBufferAttribute(a,n),iu(nu,n,s,r,e,t,this)}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}function iu(e,t,n,r,i,o,a){const s=eu.distanceSqToPoint(e);if(s<n){const n=new ar;eu.closestPointToPoint(e,n),n.applyMatrix4(r);const c=i.ray.origin.distanceTo(n);if(c<i.near||c>i.far)return;o.push({distance:c,distanceToRay:Math.sqrt(s),point:n,index:t,face:null,object:a})}}ru.prototype.isPoints=!0;class ou extends er{constructor(e,t,n,r,i,o,a,s,c){super(e,t,n,r,i,o,a,s,c),this.format=void 0!==a?a:Fe,this.minFilter=void 0!==o?o:xe,this.magFilter=void 0!==i?i:xe,this.generateMipmaps=!1;const u=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback((function t(){u.needsUpdate=!0,e.requestVideoFrameCallback(t)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!1=="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}ou.prototype.isVideoTexture=!0;class au extends er{constructor(e,t,n,r,i,o,a,s,c,u,l,f){super(null,o,a,s,c,u,r,i,l,f),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}au.prototype.isCompressedTexture=!0;class su extends er{constructor(e,t,n,r,i,o,a,s,c){super(e,t,n,r,i,o,a,s,c),this.needsUpdate=!0}}su.prototype.isCanvasTexture=!0;class cu extends er{constructor(e,t,n,r,i,o,a,s,c,u){if((u=void 0!==u?u:Ne)!==Ne&&u!==He)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&u===Ne&&(n=Re),void 0===n&&u===He&&(n=Ie),super(null,r,i,o,a,s,u,n,c),this.image={width:e,height:t},this.magFilter=void 0!==a?a:de,this.minFilter=void 0!==s?s:de,this.flipY=!1,this.generateMipmaps=!1}}cu.prototype.isDepthTexture=!0;class uu extends ro{constructor(e=1,t=8,n=0,r=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},t=Math.max(3,t);const i=[],o=[],a=[],s=[],c=new ar,u=new Xn;o.push(0,0,0),a.push(0,0,1),s.push(.5,.5);for(let i=0,l=3;i<=t;i++,l+=3){const f=n+i/t*r;c.x=e*Math.cos(f),c.y=e*Math.sin(f),o.push(c.x,c.y,c.z),a.push(0,0,1),u.x=(o[l]/e+1)/2,u.y=(o[l+1]/e+1)/2,s.push(u.x,u.y)}for(let e=1;e<=t;e++)i.push(e,e+1,0);this.setIndex(i),this.setAttribute("position",new Wi(o,3)),this.setAttribute("normal",new Wi(a,3)),this.setAttribute("uv",new Wi(s,2))}}class lu extends ro{constructor(e=1,t=1,n=1,r=8,i=1,o=!1,a=0,s=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};const c=this;r=Math.floor(r),i=Math.floor(i);const u=[],l=[],f=[],h=[];let v=0;const d=[],p=n/2;let m=0;function y(n){const i=v,o=new Xn,d=new ar;let y=0;const g=!0===n?e:t,x=!0===n?1:-1;for(let e=1;e<=r;e++)l.push(0,p*x,0),f.push(0,x,0),h.push(.5,.5),v++;const b=v;for(let e=0;e<=r;e++){const t=e/r*s+a,n=Math.cos(t),i=Math.sin(t);d.x=g*i,d.y=p*x,d.z=g*n,l.push(d.x,d.y,d.z),f.push(0,x,0),o.x=.5*n+.5,o.y=.5*i*x+.5,h.push(o.x,o.y),v++}for(let e=0;e<r;e++){const t=i+e,r=b+e;!0===n?u.push(r,r+1,t):u.push(r+1,r,t),y+=3}c.addGroup(m,y,!0===n?1:2),m+=y}!function(){const o=new ar,y=new ar;let g=0;const x=(t-e)/n;for(let c=0;c<=i;c++){const u=[],m=c/i,g=m*(t-e)+e;for(let e=0;e<=r;e++){const t=e/r,i=t*s+a,c=Math.sin(i),d=Math.cos(i);y.x=g*c,y.y=-m*n+p,y.z=g*d,l.push(y.x,y.y,y.z),o.set(c,x,d).normalize(),f.push(o.x,o.y,o.z),h.push(t,1-m),u.push(v++)}d.push(u)}for(let e=0;e<r;e++)for(let t=0;t<i;t++){const n=d[t][e],r=d[t+1][e],i=d[t+1][e+1],o=d[t][e+1];u.push(n,r,o),u.push(r,i,o),g+=6}c.addGroup(m,g,0),m+=g}(),!1===o&&(e>0&&y(!0),t>0&&y(!1)),this.setIndex(u),this.setAttribute("position",new Wi(l,3)),this.setAttribute("normal",new Wi(f,3)),this.setAttribute("uv",new Wi(h,2))}}class fu extends lu{constructor(e=1,t=1,n=8,r=1,i=!1,o=0,a=2*Math.PI){super(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}}}class hu extends ro{constructor(e,t,n=1,r=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r};const i=[],o=[];function a(e,t,n,r){const i=r+1,o=[];for(let r=0;r<=i;r++){o[r]=[];const a=e.clone().lerp(n,r/i),s=t.clone().lerp(n,r/i),c=i-r;for(let e=0;e<=c;e++)o[r][e]=0===e&&r===i?a:a.clone().lerp(s,e/c)}for(let e=0;e<i;e++)for(let t=0;t<2*(i-e)-1;t++){const n=Math.floor(t/2);t%2==0?(s(o[e][n+1]),s(o[e+1][n]),s(o[e][n])):(s(o[e][n+1]),s(o[e+1][n+1]),s(o[e+1][n]))}}function s(e){i.push(e.x,e.y,e.z)}function c(t,n){const r=3*t;n.x=e[r+0],n.y=e[r+1],n.z=e[r+2]}function u(e,t,n,r){r<0&&1===e.x&&(o[t]=e.x-1),0===n.x&&0===n.z&&(o[t]=r/2/Math.PI+.5)}function l(e){return Math.atan2(e.z,-e.x)}!function(e){const n=new ar,r=new ar,i=new ar;for(let o=0;o<t.length;o+=3)c(t[o+0],n),c(t[o+1],r),c(t[o+2],i),a(n,r,i,e)}(r),function(e){const t=new ar;for(let n=0;n<i.length;n+=3)t.x=i[n+0],t.y=i[n+1],t.z=i[n+2],t.normalize().multiplyScalar(e),i[n+0]=t.x,i[n+1]=t.y,i[n+2]=t.z}(n),function(){const e=new ar;for(let n=0;n<i.length;n+=3){e.x=i[n+0],e.y=i[n+1],e.z=i[n+2];const r=l(e)/2/Math.PI+.5,a=(t=e,Math.atan2(-t.y,Math.sqrt(t.x*t.x+t.z*t.z))/Math.PI+.5);o.push(r,1-a)}var t;(function(){const e=new ar,t=new ar,n=new ar,r=new ar,a=new Xn,s=new Xn,c=new Xn;for(let f=0,h=0;f<i.length;f+=9,h+=6){e.set(i[f+0],i[f+1],i[f+2]),t.set(i[f+3],i[f+4],i[f+5]),n.set(i[f+6],i[f+7],i[f+8]),a.set(o[h+0],o[h+1]),s.set(o[h+2],o[h+3]),c.set(o[h+4],o[h+5]),r.copy(e).add(t).add(n).divideScalar(3);const v=l(r);u(a,h+0,e,v),u(s,h+2,t,v),u(c,h+4,n,v)}})(),function(){for(let e=0;e<o.length;e+=6){const t=o[e+0],n=o[e+2],r=o[e+4],i=Math.max(t,n,r),a=Math.min(t,n,r);i>.9&&a<.1&&(t<.2&&(o[e+0]+=1),n<.2&&(o[e+2]+=1),r<.2&&(o[e+4]+=1))}}()}(),this.setAttribute("position",new Wi(i,3)),this.setAttribute("normal",new Wi(i.slice(),3)),this.setAttribute("uv",new Wi(o,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}}class vu extends hu{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,r=1/n;super([-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],[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],e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}}const du=new ar,pu=new ar,mu=new ar,yu=new _i;class gu extends ro{constructor(e,t){if(super(),this.type="EdgesGeometry",this.parameters={thresholdAngle:t},t=void 0!==t?t:1,!0===e.isGeometry)return void console.error("THREE.EdgesGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");const n=Math.pow(10,4),r=Math.cos(Un*t),i=e.getIndex(),o=e.getAttribute("position"),a=i?i.count:o.count,s=[0,0,0],c=["a","b","c"],u=new Array(3),l={},f=[];for(let e=0;e<a;e+=3){i?(s[0]=i.getX(e),s[1]=i.getX(e+1),s[2]=i.getX(e+2)):(s[0]=e,s[1]=e+1,s[2]=e+2);const{a:t,b:a,c:h}=yu;if(t.fromBufferAttribute(o,s[0]),a.fromBufferAttribute(o,s[1]),h.fromBufferAttribute(o,s[2]),yu.getNormal(mu),u[0]=`${Math.round(t.x*n)},${Math.round(t.y*n)},${Math.round(t.z*n)}`,u[1]=`${Math.round(a.x*n)},${Math.round(a.y*n)},${Math.round(a.z*n)}`,u[2]=`${Math.round(h.x*n)},${Math.round(h.y*n)},${Math.round(h.z*n)}`,u[0]!==u[1]&&u[1]!==u[2]&&u[2]!==u[0])for(let e=0;e<3;e++){const t=(e+1)%3,n=u[e],i=u[t],o=yu[c[e]],a=yu[c[t]],h=`${n}_${i}`,v=`${i}_${n}`;v in l&&l[v]?(mu.dot(l[v].normal)<=r&&(f.push(o.x,o.y,o.z),f.push(a.x,a.y,a.z)),l[v]=null):h in l||(l[h]={index0:s[e],index1:s[t],normal:mu.clone()})}}for(const e in l)if(l[e]){const{index0:t,index1:n}=l[e];du.fromBufferAttribute(o,t),pu.fromBufferAttribute(o,n),f.push(du.x,du.y,du.z),f.push(pu.x,pu.y,pu.z)}this.setAttribute("position",new Wi(f,3))}}function xu(e,t,n,r,i){let o,a;if(i===function(e,t,n,r){let i=0;for(let o=t,a=n-r;o<n;o+=r)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}(e,t,n,r)>0)for(o=t;o<n;o+=r)a=Bu(o,e[o],e[o+1],a);else for(o=n-r;o>=t;o-=r)a=Bu(o,e[o],e[o+1],a);return a&&Du(a,a.next)&&(Gu(a),a=a.next),a}function bu(e,t){if(!e)return e;t||(t=e);let n,r=e;do{if(n=!1,r.steiner||!Du(r,r.next)&&0!==Ou(r.prev,r,r.next))r=r.next;else{if(Gu(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function wu(e,t,n,r,i,o,a){if(!e)return;!a&&o&&function(e,t,n,r){let i=e;do{null===i.z&&(i.z=zu(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,n,r,i,o,a,s,c,u=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,r=n,s=0,t=0;t<u&&(s++,r=r.nextZ,r);t++);for(c=u;s>0||c>0&&r;)0!==s&&(0===c||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(e,r,i,o);let s,c,u=e;for(;e.prev!==e.next;)if(s=e.prev,c=e.next,o?_u(e,r,i,o):Mu(e))t.push(s.i/n),t.push(e.i/n),t.push(c.i/n),Gu(e),e=c.next,u=c.next;else if((e=c)===u){a?1===a?wu(e=Su(bu(e),t,n),t,n,r,i,o,2):2===a&&Pu(e,t,n,r,i,o):wu(bu(e),t,n,r,i,o,1);break}}function Mu(e){const t=e.prev,n=e,r=e.next;if(Ou(t,n,r)>=0)return!1;let i=e.next.next;for(;i!==e.prev;){if(Cu(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Ou(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function _u(e,t,n,r){const i=e.prev,o=e,a=e.next;if(Ou(i,o,a)>=0)return!1;const s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,c=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,f=zu(s,c,t,n,r),h=zu(u,l,t,n,r);let v=e.prevZ,d=e.nextZ;for(;v&&v.z>=f&&d&&d.z<=h;){if(v!==e.prev&&v!==e.next&&Cu(i.x,i.y,o.x,o.y,a.x,a.y,v.x,v.y)&&Ou(v.prev,v,v.next)>=0)return!1;if(v=v.prevZ,d!==e.prev&&d!==e.next&&Cu(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ou(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;v&&v.z>=f;){if(v!==e.prev&&v!==e.next&&Cu(i.x,i.y,o.x,o.y,a.x,a.y,v.x,v.y)&&Ou(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;d&&d.z<=h;){if(d!==e.prev&&d!==e.next&&Cu(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ou(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function Su(e,t,n){let r=e;do{const i=r.prev,o=r.next.next;!Du(i,o)&&Iu(i,r,r.next,o)&&ju(i,o)&&ju(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),Gu(r),Gu(r.next),r=e=o),r=r.next}while(r!==e);return bu(r)}function Pu(e,t,n,r,i,o){let a=e;do{let e=a.next.next;for(;e!==a.prev;){if(a.i!==e.i&&Au(a,e)){let s=Uu(a,e);return a=bu(a,a.next),s=bu(s,s.next),wu(a,t,n,r,i,o),void wu(s,t,n,r,i,o)}e=e.next}a=a.next}while(a!==e)}function Tu(e,t){return e.x-t.x}function Ru(e,t){if(t=function(e,t){let n=t;const r=e.x,i=e.y;let o,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){const e=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=r&&e>a){if(a=e,e===r){if(i===n.y)return n;if(i===n.next.y)return n.next}o=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!o)return null;if(r===a)return o;const s=o,c=o.x,u=o.y;let l,f=1/0;n=o;do{r>=n.x&&n.x>=c&&r!==n.x&&Cu(i<u?r:a,i,c,u,i<u?a:r,i,n.x,n.y)&&(l=Math.abs(i-n.y)/(r-n.x),ju(n,e)&&(l<f||l===f&&(n.x>o.x||n.x===o.x&&Eu(o,n)))&&(o=n,f=l)),n=n.next}while(n!==s);return o}(e,t)){const n=Uu(t,e);bu(t,t.next),bu(n,n.next)}}function Eu(e,t){return Ou(e.prev,e,t.prev)<0&&Ou(t.next,e,e.next)<0}function zu(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Lu(e){let t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function Cu(e,t,n,r,i,o,a,s){return(i-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(r-s)-(n-a)*(t-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Au(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&Iu(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(ju(e,t)&&ju(t,e)&&function(e,t){let n=e,r=!1;const i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(Ou(e.prev,e,t.prev)||Ou(e,t.prev,t))||Du(e,t)&&Ou(e.prev,e,e.next)>0&&Ou(t.prev,t,t.next)>0)}function Ou(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Du(e,t){return e.x===t.x&&e.y===t.y}function Iu(e,t,n,r){const i=Fu(Ou(e,t,n)),o=Fu(Ou(e,t,r)),a=Fu(Ou(n,r,e)),s=Fu(Ou(n,r,t));return i!==o&&a!==s||!(0!==i||!ku(e,n,t))||!(0!==o||!ku(e,r,t))||!(0!==a||!ku(n,e,r))||!(0!==s||!ku(n,t,r))}function ku(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function Fu(e){return e>0?1:e<0?-1:0}function ju(e,t){return Ou(e.prev,e,e.next)<0?Ou(e,t,e.next)>=0&&Ou(e,e.prev,t)>=0:Ou(e,t,e.prev)<0||Ou(e,e.next,t)<0}function Uu(e,t){const n=new Nu(e.i,e.x,e.y),r=new Nu(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function Bu(e,t,n,r){const i=new Nu(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Gu(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Nu(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}class Hu{static area(e){const t=e.length;let n=0;for(let 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}static isClockWise(e){return Hu.area(e)<0}static triangulateShape(e,t){const n=[],r=[],i=[];Vu(e),Wu(n,e);let o=e.length;t.forEach(Vu);for(let e=0;e<t.length;e++)r.push(o),o+=t[e].length,Wu(n,t[e]);const a=function(e,t,n){n=n||2;const r=t&&t.length,i=r?t[0]*n:e.length;let o=xu(e,0,i,n,!0);const a=[];if(!o||o.next===o.prev)return a;let s,c,u,l,f,h,v;if(r&&(o=function(e,t,n,r){const i=[];let o,a,s,c,u;for(o=0,a=t.length;o<a;o++)s=t[o]*r,c=o<a-1?t[o+1]*r:e.length,u=xu(e,s,c,r,!1),u===u.next&&(u.steiner=!0),i.push(Lu(u));for(i.sort(Tu),o=0;o<i.length;o++)Ru(i[o],n),n=bu(n,n.next);return n}(e,t,o,n)),e.length>80*n){s=u=e[0],c=l=e[1];for(let t=n;t<i;t+=n)f=e[t],h=e[t+1],f<s&&(s=f),h<c&&(c=h),f>u&&(u=f),h>l&&(l=h);v=Math.max(u-s,l-c),v=0!==v?1/v:0}return wu(o,a,n,s,c,v),a}(n,r);for(let e=0;e<a.length;e+=3)i.push(a.slice(e,e+3));return i}}function Vu(e){const t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function Wu(e,t){for(let n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}class Zu extends ro{constructor(e,t){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,r=[],i=[];for(let t=0,n=e.length;t<n;t++)o(e[t]);function o(e){const o=[],a=void 0!==t.curveSegments?t.curveSegments:12,s=void 0!==t.steps?t.steps:1;let c=void 0!==t.depth?t.depth:100,u=void 0===t.bevelEnabled||t.bevelEnabled,l=void 0!==t.bevelThickness?t.bevelThickness:6,f=void 0!==t.bevelSize?t.bevelSize:l-2,h=void 0!==t.bevelOffset?t.bevelOffset:0,v=void 0!==t.bevelSegments?t.bevelSegments:3;const d=t.extrudePath,p=void 0!==t.UVGenerator?t.UVGenerator:qu;void 0!==t.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),c=t.amount);let m,y,g,x,b,w=!1;d&&(m=d.getSpacedPoints(s),w=!0,u=!1,y=d.computeFrenetFrames(s,!1),g=new ar,x=new ar,b=new ar),u||(v=0,l=0,f=0,h=0);const M=e.extractPoints(a);let _=M.shape;const S=M.holes;if(!Hu.isClockWise(_)){_=_.reverse();for(let e=0,t=S.length;e<t;e++){const t=S[e];Hu.isClockWise(t)&&(S[e]=t.reverse())}}const P=Hu.triangulateShape(_,S),T=_;for(let e=0,t=S.length;e<t;e++){const t=S[e];_=_.concat(t)}function R(e,t,n){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(n).add(e)}const E=_.length,z=P.length;function L(e,t,n){let r,i,o;const a=e.x-t.x,s=e.y-t.y,c=n.x-e.x,u=n.y-e.y,l=a*a+s*s,f=a*u-s*c;if(Math.abs(f)>Number.EPSILON){const f=Math.sqrt(l),h=Math.sqrt(c*c+u*u),v=t.x-s/f,d=t.y+a/f,p=((n.x-u/h-v)*u-(n.y+c/h-d)*c)/(a*u-s*c);r=v+a*p-e.x,i=d+s*p-e.y;const m=r*r+i*i;if(m<=2)return new Xn(r,i);o=Math.sqrt(m/2)}else{let e=!1;a>Number.EPSILON?c>Number.EPSILON&&(e=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(e=!0):Math.sign(s)===Math.sign(u)&&(e=!0),e?(r=-s,i=a,o=Math.sqrt(l)):(r=a,i=s,o=Math.sqrt(l/2))}return new Xn(r/o,i/o)}const C=[];for(let e=0,t=T.length,n=t-1,r=e+1;e<t;e++,n++,r++)n===t&&(n=0),r===t&&(r=0),C[e]=L(T[e],T[n],T[r]);const A=[];let O,D=C.concat();for(let e=0,t=S.length;e<t;e++){const t=S[e];O=[];for(let e=0,n=t.length,r=n-1,i=e+1;e<n;e++,r++,i++)r===n&&(r=0),i===n&&(i=0),O[e]=L(t[e],t[r],t[i]);A.push(O),D=D.concat(O)}for(let e=0;e<v;e++){const t=e/v,n=l*Math.cos(t*Math.PI/2),r=f*Math.sin(t*Math.PI/2)+h;for(let e=0,t=T.length;e<t;e++){const t=R(T[e],C[e],r);F(t.x,t.y,-n)}for(let e=0,t=S.length;e<t;e++){const t=S[e];O=A[e];for(let e=0,i=t.length;e<i;e++){const i=R(t[e],O[e],r);F(i.x,i.y,-n)}}}const I=f+h;for(let e=0;e<E;e++){const t=u?R(_[e],D[e],I):_[e];w?(x.copy(y.normals[0]).multiplyScalar(t.x),g.copy(y.binormals[0]).multiplyScalar(t.y),b.copy(m[0]).add(x).add(g),F(b.x,b.y,b.z)):F(t.x,t.y,0)}for(let e=1;e<=s;e++)for(let t=0;t<E;t++){const n=u?R(_[t],D[t],I):_[t];w?(x.copy(y.normals[e]).multiplyScalar(n.x),g.copy(y.binormals[e]).multiplyScalar(n.y),b.copy(m[e]).add(x).add(g),F(b.x,b.y,b.z)):F(n.x,n.y,c/s*e)}for(let e=v-1;e>=0;e--){const t=e/v,n=l*Math.cos(t*Math.PI/2),r=f*Math.sin(t*Math.PI/2)+h;for(let e=0,t=T.length;e<t;e++){const t=R(T[e],C[e],r);F(t.x,t.y,c+n)}for(let e=0,t=S.length;e<t;e++){const t=S[e];O=A[e];for(let e=0,i=t.length;e<i;e++){const i=R(t[e],O[e],r);w?F(i.x,i.y+m[s-1].y,m[s-1].x+n):F(i.x,i.y,c+n)}}}function k(e,t){let n=e.length;for(;--n>=0;){const r=n;let i=n-1;i<0&&(i=e.length-1);for(let e=0,n=s+2*v;e<n;e++){const n=E*e,o=E*(e+1);U(t+r+n,t+i+n,t+i+o,t+r+o)}}}function F(e,t,n){o.push(e),o.push(t),o.push(n)}function j(e,t,i){B(e),B(t),B(i);const o=r.length/3,a=p.generateTopUV(n,r,o-3,o-2,o-1);G(a[0]),G(a[1]),G(a[2])}function U(e,t,i,o){B(e),B(t),B(o),B(t),B(i),B(o);const a=r.length/3,s=p.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);G(s[0]),G(s[1]),G(s[3]),G(s[1]),G(s[2]),G(s[3])}function B(e){r.push(o[3*e+0]),r.push(o[3*e+1]),r.push(o[3*e+2])}function G(e){i.push(e.x),i.push(e.y)}!function(){const e=r.length/3;if(u){let e=0,t=E*e;for(let e=0;e<z;e++){const n=P[e];j(n[2]+t,n[1]+t,n[0]+t)}e=s+2*v,t=E*e;for(let e=0;e<z;e++){const n=P[e];j(n[0]+t,n[1]+t,n[2]+t)}}else{for(let e=0;e<z;e++){const t=P[e];j(t[2],t[1],t[0])}for(let e=0;e<z;e++){const t=P[e];j(t[0]+E*s,t[1]+E*s,t[2]+E*s)}}n.addGroup(e,r.length/3-e,0)}(),function(){const e=r.length/3;let t=0;k(T,t),t+=T.length;for(let e=0,n=S.length;e<n;e++){const n=S[e];k(n,t),t+=n.length}n.addGroup(e,r.length/3-e,1)}()}this.setAttribute("position",new Wi(r,3)),this.setAttribute("uv",new Wi(i,2)),this.computeVertexNormals()}toJSON(){const e=ro.prototype.toJSON.call(this);return function(e,t,n){if(n.shapes=[],Array.isArray(e))for(let t=0,r=e.length;t<r;t++){const r=e[t];n.shapes.push(r.uuid)}else n.shapes.push(e.uuid);return void 0!==t.extrudePath&&(n.options.extrudePath=t.extrudePath.toJSON()),n}(this.parameters.shapes,this.parameters.options,e)}}const qu={generateTopUV:function(e,t,n,r,i){const o=t[3*n],a=t[3*n+1],s=t[3*r],c=t[3*r+1],u=t[3*i],l=t[3*i+1];return[new Xn(o,a),new Xn(s,c),new Xn(u,l)]},generateSideWallUV:function(e,t,n,r,i,o){const a=t[3*n],s=t[3*n+1],c=t[3*n+2],u=t[3*r],l=t[3*r+1],f=t[3*r+2],h=t[3*i],v=t[3*i+1],d=t[3*i+2],p=t[3*o],m=t[3*o+1],y=t[3*o+2];return Math.abs(s-l)<.01?[new Xn(a,1-c),new Xn(u,1-f),new Xn(h,1-d),new Xn(p,1-y)]:[new Xn(s,1-c),new Xn(l,1-f),new Xn(v,1-d),new Xn(m,1-y)]}};class Yu extends hu{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2;super([-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],[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],e,t),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t}}}class Xu extends ro{constructor(e,t=12,n=0,r=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},t=Math.floor(t),r=Nn(r,0,2*Math.PI);const i=[],o=[],a=[],s=1/t,c=new ar,u=new Xn;for(let i=0;i<=t;i++){const l=n+i*s*r,f=Math.sin(l),h=Math.cos(l);for(let n=0;n<=e.length-1;n++)c.x=e[n].x*f,c.y=e[n].y,c.z=e[n].x*h,o.push(c.x,c.y,c.z),u.x=i/t,u.y=n/(e.length-1),a.push(u.x,u.y)}for(let n=0;n<t;n++)for(let t=0;t<e.length-1;t++){const r=t+n*e.length,o=r,a=r+e.length,s=r+e.length+1,c=r+1;i.push(o,a,c),i.push(a,s,c)}if(this.setIndex(i),this.setAttribute("position",new Wi(o,3)),this.setAttribute("uv",new Wi(a,2)),this.computeVertexNormals(),r===2*Math.PI){const n=this.attributes.normal.array,r=new ar,i=new ar,o=new ar,a=t*e.length*3;for(let t=0,s=0;t<e.length;t++,s+=3)r.x=n[s+0],r.y=n[s+1],r.z=n[s+2],i.x=n[a+s+0],i.y=n[a+s+1],i.z=n[a+s+2],o.addVectors(r,i).normalize(),n[s+0]=n[a+s+0]=o.x,n[s+1]=n[a+s+1]=o.y,n[s+2]=n[a+s+2]=o.z}}}class Ku extends hu{constructor(e=1,t=0){super([1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}}}class Qu extends ro{constructor(e,t,n){super(),this.type="ParametricGeometry",this.parameters={func:e,slices:t,stacks:n};const r=[],i=[],o=[],a=[],s=1e-5,c=new ar,u=new ar,l=new ar,f=new ar,h=new ar;e.length<3&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");const v=t+1;for(let r=0;r<=n;r++){const v=r/n;for(let n=0;n<=t;n++){const r=n/t;e(r,v,u),i.push(u.x,u.y,u.z),r-s>=0?(e(r-s,v,l),f.subVectors(u,l)):(e(r+s,v,l),f.subVectors(l,u)),v-s>=0?(e(r,v-s,l),h.subVectors(u,l)):(e(r,v+s,l),h.subVectors(l,u)),c.crossVectors(f,h).normalize(),o.push(c.x,c.y,c.z),a.push(r,v)}}for(let e=0;e<n;e++)for(let n=0;n<t;n++){const t=e*v+n,i=e*v+n+1,o=(e+1)*v+n+1,a=(e+1)*v+n;r.push(t,i,a),r.push(i,o,a)}this.setIndex(r),this.setAttribute("position",new Wi(i,3)),this.setAttribute("normal",new Wi(o,3)),this.setAttribute("uv",new Wi(a,2))}}class Ju extends ro{constructor(e=.5,t=1,n=8,r=1,i=0,o=2*Math.PI){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},n=Math.max(3,n);const a=[],s=[],c=[],u=[];let l=e;const f=(t-e)/(r=Math.max(1,r)),h=new ar,v=new Xn;for(let e=0;e<=r;e++){for(let e=0;e<=n;e++){const r=i+e/n*o;h.x=l*Math.cos(r),h.y=l*Math.sin(r),s.push(h.x,h.y,h.z),c.push(0,0,1),v.x=(h.x/t+1)/2,v.y=(h.y/t+1)/2,u.push(v.x,v.y)}l+=f}for(let e=0;e<r;e++){const t=e*(n+1);for(let e=0;e<n;e++){const r=e+t,i=r,o=r+n+1,s=r+n+2,c=r+1;a.push(i,o,c),a.push(o,s,c)}}this.setIndex(a),this.setAttribute("position",new Wi(s,3)),this.setAttribute("normal",new Wi(c,3)),this.setAttribute("uv",new Wi(u,2))}}class $u extends ro{constructor(e,t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],r=[],i=[],o=[];let a=0,s=0;if(!1===Array.isArray(e))c(e);else for(let t=0;t<e.length;t++)c(e[t]),this.addGroup(a,s,t),a+=s,s=0;function c(e){const a=r.length/3,c=e.extractPoints(t);let u=c.shape;const l=c.holes;!1===Hu.isClockWise(u)&&(u=u.reverse());for(let e=0,t=l.length;e<t;e++){const t=l[e];!0===Hu.isClockWise(t)&&(l[e]=t.reverse())}const f=Hu.triangulateShape(u,l);for(let e=0,t=l.length;e<t;e++){const t=l[e];u=u.concat(t)}for(let e=0,t=u.length;e<t;e++){const t=u[e];r.push(t.x,t.y,0),i.push(0,0,1),o.push(t.x,t.y)}for(let e=0,t=f.length;e<t;e++){const t=f[e],r=t[0]+a,i=t[1]+a,o=t[2]+a;n.push(r,i,o),s+=3}}this.setIndex(n),this.setAttribute("position",new Wi(r,3)),this.setAttribute("normal",new Wi(i,3)),this.setAttribute("uv",new Wi(o,2))}toJSON(){const e=ro.prototype.toJSON.call(this);return function(e,t){if(t.shapes=[],Array.isArray(e))for(let n=0,r=e.length;n<r;n++){const r=e[n];t.shapes.push(r.uuid)}else t.shapes.push(e.uuid);return t}(this.parameters.shapes,e)}}class el extends ro{constructor(e=1,t=8,n=6,r=0,i=2*Math.PI,o=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const s=Math.min(o+a,Math.PI);let c=0;const u=[],l=new ar,f=new ar,h=[],v=[],d=[],p=[];for(let h=0;h<=n;h++){const m=[],y=h/n;let g=0;0==h&&0==o?g=.5/t:h==n&&s==Math.PI&&(g=-.5/t);for(let n=0;n<=t;n++){const s=n/t;l.x=-e*Math.cos(r+s*i)*Math.sin(o+y*a),l.y=e*Math.cos(o+y*a),l.z=e*Math.sin(r+s*i)*Math.sin(o+y*a),v.push(l.x,l.y,l.z),f.copy(l).normalize(),d.push(f.x,f.y,f.z),p.push(s+g,1-y),m.push(c++)}u.push(m)}for(let e=0;e<n;e++)for(let r=0;r<t;r++){const t=u[e][r+1],i=u[e][r],a=u[e+1][r],c=u[e+1][r+1];(0!==e||o>0)&&h.push(t,i,c),(e!==n-1||s<Math.PI)&&h.push(i,a,c)}this.setIndex(h),this.setAttribute("position",new Wi(v,3)),this.setAttribute("normal",new Wi(d,3)),this.setAttribute("uv",new Wi(p,2))}}class tl extends hu{constructor(e=1,t=0){super([1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}}}class nl extends Zu{constructor(e,t={}){const n=t.font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new ro;const r=n.generateShapes(e,t.size);t.depth=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),super(r,t),this.type="TextGeometry"}}class rl extends ro{constructor(e=1,t=.4,n=8,r=6,i=2*Math.PI){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:r,arc:i},n=Math.floor(n),r=Math.floor(r);const o=[],a=[],s=[],c=[],u=new ar,l=new ar,f=new ar;for(let o=0;o<=n;o++)for(let h=0;h<=r;h++){const v=h/r*i,d=o/n*Math.PI*2;l.x=(e+t*Math.cos(d))*Math.cos(v),l.y=(e+t*Math.cos(d))*Math.sin(v),l.z=t*Math.sin(d),a.push(l.x,l.y,l.z),u.x=e*Math.cos(v),u.y=e*Math.sin(v),f.subVectors(l,u).normalize(),s.push(f.x,f.y,f.z),c.push(h/r),c.push(o/n)}for(let e=1;e<=n;e++)for(let t=1;t<=r;t++){const n=(r+1)*e+t-1,i=(r+1)*(e-1)+t-1,a=(r+1)*(e-1)+t,s=(r+1)*e+t;o.push(n,i,s),o.push(i,a,s)}this.setIndex(o),this.setAttribute("position",new Wi(a,3)),this.setAttribute("normal",new Wi(s,3)),this.setAttribute("uv",new Wi(c,2))}}class il extends ro{constructor(e=1,t=.4,n=64,r=8,i=2,o=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:r,p:i,q:o},n=Math.floor(n),r=Math.floor(r);const a=[],s=[],c=[],u=[],l=new ar,f=new ar,h=new ar,v=new ar,d=new ar,p=new ar,m=new ar;for(let a=0;a<=n;++a){const g=a/n*i*Math.PI*2;y(g,i,o,e,h),y(g+.01,i,o,e,v),p.subVectors(v,h),m.addVectors(v,h),d.crossVectors(p,m),m.crossVectors(d,p),d.normalize(),m.normalize();for(let e=0;e<=r;++e){const i=e/r*Math.PI*2,o=-t*Math.cos(i),v=t*Math.sin(i);l.x=h.x+(o*m.x+v*d.x),l.y=h.y+(o*m.y+v*d.y),l.z=h.z+(o*m.z+v*d.z),s.push(l.x,l.y,l.z),f.subVectors(l,h).normalize(),c.push(f.x,f.y,f.z),u.push(a/n),u.push(e/r)}}for(let e=1;e<=n;e++)for(let t=1;t<=r;t++){const n=(r+1)*(e-1)+(t-1),i=(r+1)*e+(t-1),o=(r+1)*e+t,s=(r+1)*(e-1)+t;a.push(n,i,s),a.push(i,o,s)}function y(e,t,n,r,i){const o=Math.cos(e),a=Math.sin(e),s=n/t*e,c=Math.cos(s);i.x=r*(2+c)*.5*o,i.y=r*(2+c)*a*.5,i.z=r*Math.sin(s)*.5}this.setIndex(a),this.setAttribute("position",new Wi(s,3)),this.setAttribute("normal",new Wi(c,3)),this.setAttribute("uv",new Wi(u,2))}}class ol extends ro{constructor(e,t=64,n=1,r=8,i=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i};const o=e.computeFrenetFrames(t,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const a=new ar,s=new ar,c=new Xn;let u=new ar;const l=[],f=[],h=[],v=[];function d(i){u=e.getPointAt(i/t,u);const c=o.normals[i],h=o.binormals[i];for(let e=0;e<=r;e++){const t=e/r*Math.PI*2,i=Math.sin(t),o=-Math.cos(t);s.x=o*c.x+i*h.x,s.y=o*c.y+i*h.y,s.z=o*c.z+i*h.z,s.normalize(),f.push(s.x,s.y,s.z),a.x=u.x+n*s.x,a.y=u.y+n*s.y,a.z=u.z+n*s.z,l.push(a.x,a.y,a.z)}}!function(){for(let e=0;e<t;e++)d(e);d(!1===i?t:0),function(){for(let e=0;e<=t;e++)for(let n=0;n<=r;n++)c.x=e/t,c.y=n/r,h.push(c.x,c.y)}(),function(){for(let e=1;e<=t;e++)for(let t=1;t<=r;t++){const n=(r+1)*(e-1)+(t-1),i=(r+1)*e+(t-1),o=(r+1)*e+t,a=(r+1)*(e-1)+t;v.push(n,i,a),v.push(i,o,a)}}()}(),this.setIndex(v),this.setAttribute("position",new Wi(l,3)),this.setAttribute("normal",new Wi(f,3)),this.setAttribute("uv",new Wi(h,2))}toJSON(){const e=ro.prototype.toJSON.call(this);return e.path=this.parameters.path.toJSON(),e}}class al extends ro{constructor(e){if(super(),this.type="WireframeGeometry",!0===e.isGeometry)return void console.error("THREE.WireframeGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");const t=[],n=[0,0],r={},i=new ar;if(null!==e.index){const o=e.attributes.position,a=e.index;let s=e.groups;0===s.length&&(s=[{start:0,count:a.count,materialIndex:0}]);for(let e=0,t=s.length;e<t;++e){const t=s[e],i=t.start;for(let e=i,o=i+t.count;e<o;e+=3)for(let t=0;t<3;t++){const i=a.getX(e+t),o=a.getX(e+(t+1)%3);n[0]=Math.min(i,o),n[1]=Math.max(i,o);const s=n[0]+","+n[1];void 0===r[s]&&(r[s]={index1:n[0],index2:n[1]})}}for(const e in r){const n=r[e];i.fromBufferAttribute(o,n.index1),t.push(i.x,i.y,i.z),i.fromBufferAttribute(o,n.index2),t.push(i.x,i.y,i.z)}}else{const n=e.attributes.position;for(let e=0,r=n.count/3;e<r;e++)for(let r=0;r<3;r++){const o=3*e+r;i.fromBufferAttribute(n,o),t.push(i.x,i.y,i.z);const a=3*e+(r+1)%3;i.fromBufferAttribute(n,a),t.push(i.x,i.y,i.z)}}this.setAttribute("position",new Wi(t,3))}}var sl=Object.freeze({__proto__:null,BoxGeometry:So,BoxBufferGeometry:So,CircleGeometry:uu,CircleBufferGeometry:uu,ConeGeometry:fu,ConeBufferGeometry:fu,CylinderGeometry:lu,CylinderBufferGeometry:lu,DodecahedronGeometry:vu,DodecahedronBufferGeometry:vu,EdgesGeometry:gu,ExtrudeGeometry:Zu,ExtrudeBufferGeometry:Zu,IcosahedronGeometry:Yu,IcosahedronBufferGeometry:Yu,LatheGeometry:Xu,LatheBufferGeometry:Xu,OctahedronGeometry:Ku,OctahedronBufferGeometry:Ku,ParametricGeometry:Qu,ParametricBufferGeometry:Qu,PlaneGeometry:Go,PlaneBufferGeometry:Go,PolyhedronGeometry:hu,PolyhedronBufferGeometry:hu,RingGeometry:Ju,RingBufferGeometry:Ju,ShapeGeometry:$u,ShapeBufferGeometry:$u,SphereGeometry:el,SphereBufferGeometry:el,TetrahedronGeometry:tl,TetrahedronBufferGeometry:tl,TextGeometry:nl,TextBufferGeometry:nl,TorusGeometry:rl,TorusBufferGeometry:rl,TorusKnotGeometry:il,TorusKnotBufferGeometry:il,TubeGeometry:ol,TubeBufferGeometry:ol,WireframeGeometry:al});class cl extends Pi{constructor(e){super(),this.type="ShadowMaterial",this.color=new Ai(0),this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this}}cl.prototype.isShadowMaterial=!0;class ul extends Eo{constructor(e){super(e),this.type="RawShaderMaterial"}}ul.prototype.isRawShaderMaterial=!0;class ll extends Pi{constructor(e){super(),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Ai(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ai(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sn,this.normalScale=new Xn(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.flatShading=!1,this.vertexTangents=!1,this.setValues(e)}copy(e){return super.copy(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.normalMapType=e.normalMapType,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.flatShading=e.flatShading,this.vertexTangents=e.vertexTangents,this}}ll.prototype.isMeshStandardMaterial=!0;class fl extends ll{constructor(e){super(),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoat=0,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Xn(1,1),this.clearcoatNormalMap=null,this.reflectivity=.5,Object.defineProperty(this,"ior",{get:function(){return(1+.4*this.reflectivity)/(1-.4*this.reflectivity)},set:function(e){this.reflectivity=Nn(2.5*(e-1)/(e+1),0,1)}}),this.sheen=null,this.transmission=0,this.transmissionMap=null,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.reflectivity=e.reflectivity,e.sheen?this.sheen=(this.sheen||new Ai).copy(e.sheen):this.sheen=null,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this}}fl.prototype.isMeshPhysicalMaterial=!0;class hl extends Pi{constructor(e){super(),this.type="MeshPhongMaterial",this.color=new Ai(16777215),this.specular=new Ai(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ai(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sn,this.normalScale=new Xn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=X,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.flatShading=!1,this.setValues(e)}copy(e){return super.copy(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.normalMapType=e.normalMapType,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.flatShading=e.flatShading,this}}hl.prototype.isMeshPhongMaterial=!0;class vl extends Pi{constructor(e){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Ai(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ai(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sn,this.normalScale=new Xn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,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.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,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}}vl.prototype.isMeshToonMaterial=!0;class dl extends Pi{constructor(e){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sn,this.normalScale=new Xn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this}}dl.prototype.isMeshNormalMaterial=!0;class pl extends Pi{constructor(e){super(),this.type="MeshLambertMaterial",this.color=new Ai(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ai(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=X,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)}copy(e){return super.copy(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}}pl.prototype.isMeshLambertMaterial=!0;class ml extends Pi{constructor(e){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Ai(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sn,this.normalScale=new Xn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this}}ml.prototype.isMeshMatcapMaterial=!0;class yl extends Gc{constructor(e){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}yl.prototype.isLineDashedMaterial=!0;var gl=Object.freeze({__proto__:null,ShadowMaterial:cl,SpriteMaterial:sc,RawShaderMaterial:ul,ShaderMaterial:Eo,PointsMaterial:Jc,MeshPhysicalMaterial:fl,MeshStandardMaterial:ll,MeshPhongMaterial:hl,MeshToonMaterial:vl,MeshNormalMaterial:dl,MeshLambertMaterial:pl,MeshDepthMaterial:Gs,MeshDistanceMaterial:Ns,MeshBasicMaterial:Oi,MeshMatcapMaterial:ml,LineDashedMaterial:yl,LineBasicMaterial:Gc,Material:Pi});const xl={arraySlice:function(e,t,n){return xl.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):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){const t=e.length,n=new Array(t);for(let e=0;e!==t;++e)n[e]=e;return n.sort((function(t,n){return e[t]-e[n]})),n},sortedArray:function(e,t,n){const r=e.length,i=new e.constructor(r);for(let o=0,a=0;a!==r;++o){const r=n[o]*t;for(let n=0;n!==t;++n)i[a++]=e[r+n]}return i},flattenJSON:function(e,t,n,r){let i=1,o=e[0];for(;void 0!==o&&void 0===o[r];)o=e[i++];if(void 0===o)return;let 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)},subclip:function(e,t,n,r,i=30){const o=e.clone();o.name=t;const a=[];for(let e=0;e<o.tracks.length;++e){const t=o.tracks[e],s=t.getValueSize(),c=[],u=[];for(let e=0;e<t.times.length;++e){const o=t.times[e]*i;if(!(o<n||o>=r)){c.push(t.times[e]);for(let n=0;n<s;++n)u.push(t.values[e*s+n])}}0!==c.length&&(t.times=xl.convertArray(c,t.times.constructor),t.values=xl.convertArray(u,t.values.constructor),a.push(t))}o.tracks=a;let s=1/0;for(let e=0;e<o.tracks.length;++e)s>o.tracks[e].times[0]&&(s=o.tracks[e].times[0]);for(let e=0;e<o.tracks.length;++e)o.tracks[e].shift(-1*s);return o.resetDuration(),o},makeClipAdditive:function(e,t=0,n=e,r=30){r<=0&&(r=30);const i=n.tracks.length,o=t/r;for(let t=0;t<i;++t){const r=n.tracks[t],i=r.ValueTypeName;if("bool"===i||"string"===i)continue;const a=e.tracks.find((function(e){return e.name===r.name&&e.ValueTypeName===i}));if(void 0===a)continue;let s=0;const c=r.getValueSize();r.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(s=c/3);let u=0;const l=a.getValueSize();a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(u=l/3);const f=r.times.length-1;let h;if(o<=r.times[0]){const e=s,t=c-s;h=xl.arraySlice(r.values,e,t)}else if(o>=r.times[f]){const e=f*c+s,t=e+c-s;h=xl.arraySlice(r.values,e,t)}else{const e=r.createInterpolant(),t=s,n=c-s;e.evaluate(o),h=xl.arraySlice(e.resultBuffer,t,n)}"quaternion"===i&&(new or).fromArray(h).normalize().conjugate().toArray(h);const v=a.times.length;for(let e=0;e<v;++e){const t=e*l+u;if("quaternion"===i)or.multiplyQuaternionsFlat(a.values,t,h,0,a.values,t);else{const e=l-2*u;for(let n=0;n<e;++n)a.values[t+n]-=h[n]}}}return e.blendMode=Zt,e}};class bl{constructor(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,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,r=t[n],i=t[n-1];e:{t:{let o;n:{r:if(!(e<r)){for(let o=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===o)break;if(i=r,r=t[++n],e<r)break t}o=t.length;break n}if(e>=i)break e;{const a=t[1];e<a&&(n=2,i=a);for(let o=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(n===o)break;if(r=i,i=t[--n-1],e>=i)break t}o=n,n=0}}for(;n<o;){const r=n+o>>>1;e<t[r]?o=r:n=r+1}if(r=t[n],i=t[n-1],void 0===i)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)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r;for(let e=0;e!==r;++e)t[e]=n[i+e];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}bl.prototype.beforeStart_=bl.prototype.copySampleValue_,bl.prototype.afterEnd_=bl.prototype.copySampleValue_;class wl extends bl{constructor(e,t,n,r){super(e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:Nt,endingEnd:Nt}}intervalChanged_(e,t,n){const r=this.parameterPositions;let i=e-2,o=e+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case Ht:i=e,a=2*t-n;break;case Vt: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 Ht:o=e,s=2*n-t;break;case Vt:o=1,s=n+r[1]-r[0];break;default:o=e-1,s=t}const c=.5*(n-t),u=this.valueSize;this._weightPrev=c/(t-a),this._weightNext=c/(s-n),this._offsetPrev=i*u,this._offsetNext=o*u}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,c=s-a,u=this._offsetPrev,l=this._offsetNext,f=this._weightPrev,h=this._weightNext,v=(n-t)/(r-t),d=v*v,p=d*v,m=-f*p+2*f*d-f*v,y=(1+f)*p+(-1.5-2*f)*d+(-.5+f)*v+1,g=(-1-h)*p+(1.5+h)*d+.5*v,x=h*p-h*d;for(let e=0;e!==a;++e)i[e]=m*o[u+e]+y*o[c+e]+g*o[s+e]+x*o[l+e];return i}}class Ml extends bl{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,c=s-a,u=(n-t)/(r-t),l=1-u;for(let e=0;e!==a;++e)i[e]=o[c+e]*l+o[s+e]*u;return i}}class _l extends bl{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class Sl{constructor(e,t,n,r){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=xl.convertArray(t,this.TimeBufferType),this.values=xl.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:xl.convertArray(e.times,Array),values:xl.convertArray(e.values,Array)};const t=e.getInterpolation();t!==e.DefaultInterpolation&&(n.interpolation=t)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new _l(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new Ml(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new wl(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case Ut:t=this.InterpolantFactoryMethodDiscrete;break;case Bt:t=this.InterpolantFactoryMethodLinear;break;case Gt:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){const t="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(t);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",t),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Ut;case this.InterpolantFactoryMethodLinear:return Bt;case this.InterpolantFactoryMethodSmooth:return Gt}}getValueSize(){return this.values.length/this.times.length}shift(e){if(0!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]+=e}return this}scale(e){if(1!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]*=e}return this}trim(e,t){const n=this.times,r=n.length;let i=0,o=r-1;for(;i!==r&&n[i]<e;)++i;for(;-1!==o&&n[o]>t;)--o;if(++o,0!==i||o!==r){i>=o&&(o=Math.max(o,1),i=o-1);const e=this.getValueSize();this.times=xl.arraySlice(n,i,o),this.values=xl.arraySlice(this.values,i*e,o*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let t=0;t!==i;t++){const r=n[t];if("number"==typeof r&&isNaN(r)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,t,r),e=!1;break}if(null!==o&&o>r){console.error("THREE.KeyframeTrack: Out of order keys.",this,t,r,o),e=!1;break}o=r}if(void 0!==r&&xl.isTypedArray(r))for(let t=0,n=r.length;t!==n;++t){const n=r[t];if(isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,t,n),e=!1;break}}return e}optimize(){const e=xl.arraySlice(this.times),t=xl.arraySlice(this.values),n=this.getValueSize(),r=this.getInterpolation()===Gt,i=e.length-1;let o=1;for(let a=1;a<i;++a){let i=!1;const s=e[a];if(s!==e[a+1]&&(1!==a||s!==e[0]))if(r)i=!0;else{const e=a*n,r=e-n,o=e+n;for(let a=0;a!==n;++a){const n=t[e+a];if(n!==t[r+a]||n!==t[o+a]){i=!0;break}}}if(i){if(a!==o){e[o]=e[a];const r=a*n,i=o*n;for(let e=0;e!==n;++e)t[i+e]=t[r+e]}++o}}if(i>0){e[o]=e[i];for(let e=i*n,r=o*n,a=0;a!==n;++a)t[r+a]=t[e+a];++o}return o!==e.length?(this.times=xl.arraySlice(e,0,o),this.values=xl.arraySlice(t,0,o*n)):(this.times=e,this.values=t),this}clone(){const e=xl.arraySlice(this.times,0),t=xl.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}Sl.prototype.TimeBufferType=Float32Array,Sl.prototype.ValueBufferType=Float32Array,Sl.prototype.DefaultInterpolation=Bt;class Pl extends Sl{}Pl.prototype.ValueTypeName="bool",Pl.prototype.ValueBufferType=Array,Pl.prototype.DefaultInterpolation=Ut,Pl.prototype.InterpolantFactoryMethodLinear=void 0,Pl.prototype.InterpolantFactoryMethodSmooth=void 0;class Tl extends Sl{}Tl.prototype.ValueTypeName="color";class Rl extends Sl{}Rl.prototype.ValueTypeName="number";class El extends bl{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=(n-t)/(r-t);let c=e*a;for(let e=c+a;c!==e;c+=4)or.slerpFlat(i,0,o,c-a,o,c,s);return i}}class zl extends Sl{InterpolantFactoryMethodLinear(e){return new El(this.times,this.values,this.getValueSize(),e)}}zl.prototype.ValueTypeName="quaternion",zl.prototype.DefaultInterpolation=Bt,zl.prototype.InterpolantFactoryMethodSmooth=void 0;class Ll extends Sl{}Ll.prototype.ValueTypeName="string",Ll.prototype.ValueBufferType=Array,Ll.prototype.DefaultInterpolation=Ut,Ll.prototype.InterpolantFactoryMethodLinear=void 0,Ll.prototype.InterpolantFactoryMethodSmooth=void 0;class Cl extends Sl{}Cl.prototype.ValueTypeName="vector";class Al{constructor(e,t=-1,n,r=Wt){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=Gn(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,r=1/(e.fps||1);for(let e=0,i=n.length;e!==i;++e)t.push(Ol(n[e]).scale(r));const i=new this(e.name,e.duration,t,e.blendMode);return i.uuid=e.uuid,i}static toJSON(e){const t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let e=0,r=n.length;e!==r;++e)t.push(Sl.toJSON(n[e]));return r}static CreateFromMorphTargetSequence(e,t,n,r){const i=t.length,o=[];for(let e=0;e<i;e++){let a=[],s=[];a.push((e+i-1)%i,e,(e+1)%i),s.push(0,1,0);const c=xl.getKeyframeOrder(a);a=xl.sortedArray(a,1,c),s=xl.sortedArray(s,1,c),r||0!==a[0]||(a.push(i),s.push(s[0])),o.push(new Rl(".morphTargetInfluences["+t[e].name+"]",a,s).scale(1/n))}return new this(e,-1,o)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const t=e;n=t.geometry&&t.geometry.animations||t.animations}for(let e=0;e<n.length;e++)if(n[e].name===t)return n[e];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const r={},i=/^([\w-]*?)([\d]+)$/;for(let t=0,n=e.length;t<n;t++){const n=e[t],o=n.name.match(i);if(o&&o.length>1){const e=o[1];let t=r[e];t||(r[e]=t=[]),t.push(n)}}const o=[];for(const e in r)o.push(this.CreateFromMorphTargetSequence(e,r[e],t,n));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(e,t,n,r,i){if(0!==n.length){const o=[],a=[];xl.flattenJSON(n,o,a,r),0!==o.length&&i.push(new e(t,o,a))}},r=[],i=e.name||"default",o=e.fps||30,a=e.blendMode;let s=e.length||-1;const c=e.hierarchy||[];for(let e=0;e<c.length;e++){const i=c[e].keys;if(i&&0!==i.length)if(i[0].morphTargets){const e={};let t;for(t=0;t<i.length;t++)if(i[t].morphTargets)for(let n=0;n<i[t].morphTargets.length;n++)e[i[t].morphTargets[n]]=-1;for(const n in e){const e=[],o=[];for(let r=0;r!==i[t].morphTargets.length;++r){const r=i[t];e.push(r.time),o.push(r.morphTarget===n?1:0)}r.push(new Rl(".morphTargetInfluence["+n+"]",e,o))}s=e.length*(o||1)}else{const o=".bones["+t[e].name+"]";n(Cl,o+".position",i,"pos",r),n(zl,o+".quaternion",i,"rot",r),n(Cl,o+".scale",i,"scl",r)}}return 0===r.length?null:new this(i,s,r,a)}resetDuration(){let e=0;for(let t=0,n=this.tracks.length;t!==n;++t){const n=this.tracks[t];e=Math.max(e,n.times[n.times.length-1])}return this.duration=e,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function Ol(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Rl;case"vector":case"vector2":case"vector3":case"vector4":return Cl;case"color":return Tl;case"quaternion":return zl;case"bool":case"boolean":return Pl;case"string":return Ll}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){const t=[],n=[];xl.flattenJSON(e.keys,t,n,"value"),e.times=t,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}const Dl={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};class Il{constructor(e,t,n){const r=this;let i,o=!1,a=0,s=0;const c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){s++,!1===o&&void 0!==r.onStart&&r.onStart(e,a,s),o=!0},this.itemEnd=function(e){a++,void 0!==r.onProgress&&r.onProgress(e,a,s),a===s&&(o=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)},this.resolveURL=function(e){return i?i(e):e},this.setURLModifier=function(e){return i=e,this},this.addHandler=function(e,t){return c.push(e,t),this},this.removeHandler=function(e){const t=c.indexOf(e);return-1!==t&&c.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=c.length;t<n;t+=2){const n=c[t],r=c[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return r}return null}}}const kl=new Il;class Fl{constructor(e){this.manager=void 0!==e?e:kl,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise((function(r,i){n.load(e,r,t,i)}))}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}const jl={};class Ul extends Fl{constructor(e){super(e)}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,o=Dl.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;if(void 0!==jl[e])return void jl[e].push({onLoad:t,onProgress:n,onError:r});const a=e.match(/^data:(.*?)(;base64)?,(.*)$/);let s;if(a){const n=a[1],o=!!a[2];let s=a[3];s=decodeURIComponent(s),o&&(s=atob(s));try{let r;const o=(this.responseType||"").toLowerCase();switch(o){case"arraybuffer":case"blob":const e=new Uint8Array(s.length);for(let t=0;t<s.length;t++)e[t]=s.charCodeAt(t);r="blob"===o?new Blob([e.buffer],{type:n}):e.buffer;break;case"document":const t=new DOMParser;r=t.parseFromString(s,n);break;case"json":r=JSON.parse(s);break;default:r=s}setTimeout((function(){t&&t(r),i.manager.itemEnd(e)}),0)}catch(t){setTimeout((function(){r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)}),0)}}else{jl[e]=[],jl[e].push({onLoad:t,onProgress:n,onError:r}),s=new XMLHttpRequest,s.open("GET",e,!0),s.addEventListener("load",(function(t){const n=this.response,r=jl[e];if(delete jl[e],200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),Dl.add(e,n);for(let e=0,t=r.length;e<t;e++){const t=r[e];t.onLoad&&t.onLoad(n)}i.manager.itemEnd(e)}else{for(let e=0,n=r.length;e<n;e++){const n=r[e];n.onError&&n.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}}),!1),s.addEventListener("progress",(function(t){const n=jl[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onProgress&&r.onProgress(t)}}),!1),s.addEventListener("error",(function(t){const n=jl[e];delete jl[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onError&&r.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}),!1),s.addEventListener("abort",(function(t){const n=jl[e];delete jl[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onError&&r.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}),!1),void 0!==this.responseType&&(s.responseType=this.responseType),void 0!==this.withCredentials&&(s.withCredentials=this.withCredentials),s.overrideMimeType&&s.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain");for(const e in this.requestHeader)s.setRequestHeader(e,this.requestHeader[e]);s.send(null)}return i.manager.itemStart(e),s}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class Bl extends Fl{constructor(e){super(e)}load(e,t,n,r){const i=this,o=new Ul(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}}),n,r)}parse(e){const t=[];for(let n=0;n<e.length;n++){const r=Al.parse(e[n]);t.push(r)}return t}}class Gl extends Fl{constructor(e){super(e)}load(e,t,n,r){const i=this,o=[],a=new au,s=new Ul(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(i.withCredentials);let c=0;function u(u){s.load(e[u],(function(e){const n=i.parse(e,!0);o[u]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},c+=1,6===c&&(1===n.mipmapCount&&(a.minFilter=xe),a.image=o,a.format=n.format,a.needsUpdate=!0,t&&t(a))}),n,r)}if(Array.isArray(e))for(let t=0,n=e.length;t<n;++t)u(t);else s.load(e,(function(e){const n=i.parse(e,!0);if(n.isCubemap){const e=n.mipmaps.length/n.mipmapCount;for(let t=0;t<e;t++){o[t]={mipmaps:[]};for(let e=0;e<n.mipmapCount;e++)o[t].mipmaps.push(n.mipmaps[t*n.mipmapCount+e]),o[t].format=n.format,o[t].width=n.width,o[t].height=n.height}a.image=o}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=xe),a.format=n.format,a.needsUpdate=!0,t&&t(a)}),n,r);return a}}class Nl extends Fl{constructor(e){super(e)}load(e,t,n,r){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,o=Dl.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;const a=document.createElementNS("http://www.w3.org/1999/xhtml","img");function s(){a.removeEventListener("load",s,!1),a.removeEventListener("error",c,!1),Dl.add(e,this),t&&t(this),i.manager.itemEnd(e)}function c(t){a.removeEventListener("load",s,!1),a.removeEventListener("error",c,!1),r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)}return a.addEventListener("load",s,!1),a.addEventListener("error",c,!1),"data:"!==e.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(e),a.src=e,a}}class Hl extends Fl{constructor(e){super(e)}load(e,t,n,r){const i=new Oo,o=new Nl(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);let a=0;function s(n){o.load(e[n],(function(e){i.images[n]=e,a++,6===a&&(i.needsUpdate=!0,t&&t(i))}),void 0,r)}for(let t=0;t<e.length;++t)s(t);return i}}class Vl extends Fl{constructor(e){super(e)}load(e,t,n,r){const i=this,o=new Io,a=new Ul(this.manager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(i.withCredentials),a.load(e,(function(e){const n=i.parse(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:he,o.wrapT=void 0!==n.wrapT?n.wrapT:he,o.magFilter=void 0!==n.magFilter?n.magFilter:xe,o.minFilter=void 0!==n.minFilter?n.minFilter:xe,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.encoding&&(o.encoding=n.encoding),void 0!==n.flipY&&(o.flipY=n.flipY),void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps,o.minFilter=Me),1===n.mipmapCount&&(o.minFilter=xe),void 0!==n.generateMipmaps&&(o.generateMipmaps=n.generateMipmaps),o.needsUpdate=!0,t&&t(o,n))}),n,r),o}}class Wl extends Fl{constructor(e){super(e)}load(e,t,n,r){const i=new er,o=new Nl(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,(function(n){i.image=n;const r=e.search(/\.jpe?g($|\?)/i)>0||0===e.search(/^data\:image\/jpeg/);i.format=r?Fe:je,i.needsUpdate=!0,void 0!==t&&t(i)}),n,r),i}}class Zl{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,r=this.getPoint(0),i=0;t.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),i+=n.distanceTo(r),t.push(i),r=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const n=this.getLengths();let r=0;const i=n.length;let o;o=t||e*n[i-1];let a,s=0,c=i-1;for(;s<=c;)if(r=Math.floor(s+(c-s)/2),a=n[r]-o,a<0)s=r+1;else{if(!(a>0)){c=r;break}c=r-1}if(r=c,n[r]===o)return r/(i-1);const u=n[r];return(r+(o-u)/(n[r+1]-u))/(i-1)}getTangent(e,t){const n=1e-4;let r=e-n,i=e+n;r<0&&(r=0),i>1&&(i=1);const o=this.getPoint(r),a=this.getPoint(i),s=t||(o.isVector2?new Xn:new ar);return s.copy(a).sub(o).normalize(),s}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new ar,r=[],i=[],o=[],a=new ar,s=new Fr;for(let t=0;t<=e;t++){const n=t/e;r[t]=this.getTangentAt(n,new ar),r[t].normalize()}i[0]=new ar,o[0]=new ar;let c=Number.MAX_VALUE;const u=Math.abs(r[0].x),l=Math.abs(r[0].y),f=Math.abs(r[0].z);u<=c&&(c=u,n.set(1,0,0)),l<=c&&(c=l,n.set(0,1,0)),f<=c&&n.set(0,0,1),a.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],a),o[0].crossVectors(r[0],i[0]);for(let t=1;t<=e;t++){if(i[t]=i[t-1].clone(),o[t]=o[t-1].clone(),a.crossVectors(r[t-1],r[t]),a.length()>Number.EPSILON){a.normalize();const e=Math.acos(Nn(r[t-1].dot(r[t]),-1,1));i[t].applyMatrix4(s.makeRotationAxis(a,e))}o[t].crossVectors(r[t],i[t])}if(!0===t){let t=Math.acos(Nn(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(a.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(s.makeRotationAxis(r[n],t*n)),o[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:o}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class ql extends Zl{constructor(e=0,t=0,n=1,r=1,i=0,o=2*Math.PI,a=!1,s=0){super(),this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=o,this.aClockwise=a,this.aRotation=s}getPoint(e,t){const n=t||new Xn,r=2*Math.PI;let i=this.aEndAngle-this.aStartAngle;const o=Math.abs(i)<Number.EPSILON;for(;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);const a=this.aStartAngle+e*i;let s=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){const e=Math.cos(this.aRotation),t=Math.sin(this.aRotation),n=s-this.aX,r=c-this.aY;s=n*e-r*t+this.aX,c=n*t+r*e+this.aY}return n.set(s,c)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}ql.prototype.isEllipseCurve=!0;class Yl extends ql{constructor(e,t,n,r,i,o){super(e,t,n,n,r,i,o),this.type="ArcCurve"}}function Xl(){let e=0,t=0,n=0,r=0;function i(i,o,a,s){e=i,t=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(e,t,n,r,o){i(t,n,o*(n-e),o*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,o,a,s){let c=(t-e)/o-(n-e)/(o+a)+(n-t)/a,u=(n-t)/a-(r-t)/(a+s)+(r-n)/s;c*=a,u*=a,i(t,n,c,u)},calc:function(i){const o=i*i;return e+t*i+n*o+r*(o*i)}}}Yl.prototype.isArcCurve=!0;const Kl=new ar,Ql=new Xl,Jl=new Xl,$l=new Xl;class ef extends Zl{constructor(e=[],t=!1,n="centripetal",r=.5){super(),this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=r}getPoint(e,t=new ar){const n=t,r=this.points,i=r.length,o=(i-(this.closed?0:1))*e;let a,s,c=Math.floor(o),u=o-c;this.closed?c+=c>0?0:(Math.floor(Math.abs(c)/i)+1)*i:0===u&&c===i-1&&(c=i-2,u=1),this.closed||c>0?a=r[(c-1)%i]:(Kl.subVectors(r[0],r[1]).add(r[0]),a=Kl);const l=r[c%i],f=r[(c+1)%i];if(this.closed||c+2<i?s=r[(c+2)%i]:(Kl.subVectors(r[i-1],r[i-2]).add(r[i-1]),s=Kl),"centripetal"===this.curveType||"chordal"===this.curveType){const e="chordal"===this.curveType?.5:.25;let t=Math.pow(a.distanceToSquared(l),e),n=Math.pow(l.distanceToSquared(f),e),r=Math.pow(f.distanceToSquared(s),e);n<1e-4&&(n=1),t<1e-4&&(t=n),r<1e-4&&(r=n),Ql.initNonuniformCatmullRom(a.x,l.x,f.x,s.x,t,n,r),Jl.initNonuniformCatmullRom(a.y,l.y,f.y,s.y,t,n,r),$l.initNonuniformCatmullRom(a.z,l.z,f.z,s.z,t,n,r)}else"catmullrom"===this.curveType&&(Ql.initCatmullRom(a.x,l.x,f.x,s.x,this.tension),Jl.initCatmullRom(a.y,l.y,f.y,s.y,this.tension),$l.initCatmullRom(a.z,l.z,f.z,s.z,this.tension));return n.set(Ql.calc(u),Jl.calc(u),$l.calc(u)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new ar).fromArray(n))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function tf(e,t,n,r,i){const o=.5*(r-t),a=.5*(i-n),s=e*e;return(2*n-2*r+o+a)*(e*s)+(-3*n+3*r-2*o-a)*s+o*e+n}function nf(e,t,n,r){return function(e,t){const n=1-e;return n*n*t}(e,t)+function(e,t){return 2*(1-e)*e*t}(e,n)+function(e,t){return e*e*t}(e,r)}function rf(e,t,n,r,i){return function(e,t){const n=1-e;return n*n*n*t}(e,t)+function(e,t){const n=1-e;return 3*n*n*e*t}(e,n)+function(e,t){return 3*(1-e)*e*e*t}(e,r)+function(e,t){return e*e*e*t}(e,i)}ef.prototype.isCatmullRomCurve3=!0;class of extends Zl{constructor(e=new Xn,t=new Xn,n=new Xn,r=new Xn){super(),this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new Xn){const n=t,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(rf(e,r.x,i.x,o.x,a.x),rf(e,r.y,i.y,o.y,a.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}of.prototype.isCubicBezierCurve=!0;class af extends Zl{constructor(e=new ar,t=new ar,n=new ar,r=new ar){super(),this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new ar){const n=t,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(rf(e,r.x,i.x,o.x,a.x),rf(e,r.y,i.y,o.y,a.y),rf(e,r.z,i.z,o.z,a.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}af.prototype.isCubicBezierCurve3=!0;class sf extends Zl{constructor(e=new Xn,t=new Xn){super(),this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new Xn){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t){const n=t||new Xn;return n.copy(this.v2).sub(this.v1).normalize(),n}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}sf.prototype.isLineCurve=!0;class cf extends Zl{constructor(e=new ar,t=new ar){super(),this.type="LineCurve3",this.isLineCurve3=!0,this.v1=e,this.v2=t}getPoint(e,t=new ar){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class uf extends Zl{constructor(e=new Xn,t=new Xn,n=new Xn){super(),this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new Xn){const n=t,r=this.v0,i=this.v1,o=this.v2;return n.set(nf(e,r.x,i.x,o.x),nf(e,r.y,i.y,o.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}uf.prototype.isQuadraticBezierCurve=!0;class lf extends Zl{constructor(e=new ar,t=new ar,n=new ar){super(),this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new ar){const n=t,r=this.v0,i=this.v1,o=this.v2;return n.set(nf(e,r.x,i.x,o.x),nf(e,r.y,i.y,o.y),nf(e,r.z,i.z,o.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}lf.prototype.isQuadraticBezierCurve3=!0;class ff extends Zl{constructor(e=[]){super(),this.type="SplineCurve",this.points=e}getPoint(e,t=new Xn){const n=t,r=this.points,i=(r.length-1)*e,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],c=r[o],u=r[o>r.length-2?r.length-1:o+1],l=r[o>r.length-3?r.length-1:o+2];return n.set(tf(a,s.x,c.x,u.x,l.x),tf(a,s.y,c.y,u.y,l.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new Xn).fromArray(n))}return this}}ff.prototype.isSplineCurve=!0;var hf=Object.freeze({__proto__:null,ArcCurve:Yl,CatmullRomCurve3:ef,CubicBezierCurve:of,CubicBezierCurve3:af,EllipseCurve:ql,LineCurve:sf,LineCurve3:cf,QuadraticBezierCurve:uf,QuadraticBezierCurve3:lf,SplineCurve:ff});class vf extends Zl{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new sf(t,e))}getPoint(e){const t=e*this.getLength(),n=this.getCurveLengths();let r=0;for(;r<n.length;){if(n[r]>=t){const e=n[r]-t,i=this.curves[r],o=i.getLength(),a=0===o?0:1-e/o;return i.getPointAt(a)}r++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,r=this.curves.length;n<r;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let n;for(let r=0,i=this.curves;r<i.length;r++){const o=i[r],a=o&&o.isEllipseCurve?2*e:o&&(o.isLineCurve||o.isLineCurve3)?1:o&&o.isSplineCurve?e*o.points.length:e,s=o.getPoints(a);for(let e=0;e<s.length;e++){const r=s[e];n&&n.equals(r)||(t.push(r),n=r)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push(n.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t<n;t++){const n=this.curves[t];e.curves.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push((new hf[n.type]).fromJSON(n))}return this}}class df extends vf{constructor(e){super(),this.type="Path",this.currentPoint=new Xn,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const n=new sf(this.currentPoint.clone(),new Xn(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,r){const i=new uf(this.currentPoint.clone(),new Xn(e,t),new Xn(n,r));return this.curves.push(i),this.currentPoint.set(n,r),this}bezierCurveTo(e,t,n,r,i,o){const a=new of(this.currentPoint.clone(),new Xn(e,t),new Xn(n,r),new Xn(i,o));return this.curves.push(a),this.currentPoint.set(i,o),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new ff(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,r,i,o){const a=this.currentPoint.x,s=this.currentPoint.y;return this.absarc(e+a,t+s,n,r,i,o),this}absarc(e,t,n,r,i,o){return this.absellipse(e,t,n,n,r,i,o),this}ellipse(e,t,n,r,i,o,a,s){const c=this.currentPoint.x,u=this.currentPoint.y;return this.absellipse(e+c,t+u,n,r,i,o,a,s),this}absellipse(e,t,n,r,i,o,a,s){const c=new ql(e,t,n,r,i,o,a,s);if(this.curves.length>0){const e=c.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(c);const u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class pf extends df{constructor(e){super(e),this.uuid=Gn(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,r=this.holes.length;n<r;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t<n;t++){const n=this.holes[t];e.holes.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push((new df).fromJSON(n))}return this}}class mf extends ci{constructor(e,t=1){super(),this.type="Light",this.color=new Ai(e),this.intensity=t}dispose(){}copy(e){return super.copy(e),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(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}}mf.prototype.isLight=!0;class yf extends mf{constructor(e,t,n){super(e,n),this.type="HemisphereLight",this.position.copy(ci.DefaultUp),this.updateMatrix(),this.groundColor=new Ai(t)}copy(e){return mf.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}yf.prototype.isHemisphereLight=!0;const gf=new Fr,xf=new ar,bf=new ar;class wf{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.mapSize=new Xn(512,512),this.map=null,this.mapPass=null,this.matrix=new Fr,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new jo,this._frameExtents=new Xn(1,1),this._viewportCount=1,this._viewports=[new nr(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;xf.setFromMatrixPosition(e.matrixWorld),t.position.copy(xf),bf.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(bf),t.updateMatrixWorld(),gf.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(gf),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(t.projectionMatrix),n.multiply(t.matrixWorldInverse)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),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}}class Mf extends wf{constructor(){super(new Lo(50,1,.5,500)),this.focus=1}updateMatrices(e){const t=this.camera,n=2*Bn*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,i=e.distance||t.far;n===t.fov&&r===t.aspect&&i===t.far||(t.fov=n,t.aspect=r,t.far=i,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}Mf.prototype.isSpotLightShadow=!0;class _f extends mf{constructor(e,t,n=0,r=Math.PI/3,i=0,o=1){super(e,t),this.type="SpotLight",this.position.copy(ci.DefaultUp),this.updateMatrix(),this.target=new ci,this.distance=n,this.angle=r,this.penumbra=i,this.decay=o,this.shadow=new Mf}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e){return super.copy(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}}_f.prototype.isSpotLight=!0;const Sf=new Fr,Pf=new ar,Tf=new ar;class Rf extends wf{constructor(){super(new Lo(90,1,.5,500)),this._frameExtents=new Xn(4,2),this._viewportCount=6,this._viewports=[new nr(2,1,1,1),new nr(0,1,1,1),new nr(3,1,1,1),new nr(1,1,1,1),new nr(3,0,1,1),new nr(1,0,1,1)],this._cubeDirections=[new ar(1,0,0),new ar(-1,0,0),new ar(0,0,1),new ar(0,0,-1),new ar(0,1,0),new ar(0,-1,0)],this._cubeUps=[new ar(0,1,0),new ar(0,1,0),new ar(0,1,0),new ar(0,1,0),new ar(0,0,1),new ar(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,r=this.matrix,i=e.distance||n.far;i!==n.far&&(n.far=i,n.updateProjectionMatrix()),Pf.setFromMatrixPosition(e.matrixWorld),n.position.copy(Pf),Tf.copy(n.position),Tf.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(Tf),n.updateMatrixWorld(),r.makeTranslation(-Pf.x,-Pf.y,-Pf.z),Sf.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Sf)}}Rf.prototype.isPointLightShadow=!0;class Ef extends mf{constructor(e,t,n=0,r=1){super(e,t),this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new Rf}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}Ef.prototype.isPointLight=!0;class zf extends zo{constructor(e=-1,t=1,n=1,r=-1,i=.1,o=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),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(e,t,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const 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;let i=n-e,o=n+e,a=r+t,s=r-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,o=i+e*this.view.width,a-=t*this.view.offsetY,s=a-t*this.view.height}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(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}}zf.prototype.isOrthographicCamera=!0;class Lf extends wf{constructor(){super(new zf(-5,5,5,-5,.5,500))}}Lf.prototype.isDirectionalLightShadow=!0;class Cf extends mf{constructor(e,t){super(e,t),this.type="DirectionalLight",this.position.copy(ci.DefaultUp),this.updateMatrix(),this.target=new ci,this.shadow=new Lf}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}Cf.prototype.isDirectionalLight=!0;class Af extends mf{constructor(e,t){super(e,t),this.type="AmbientLight"}}Af.prototype.isAmbientLight=!0;class Of extends mf{constructor(e,t,n=10,r=10){super(e,t),this.type="RectAreaLight",this.width=n,this.height=r}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}Of.prototype.isRectAreaLight=!0;class Df{constructor(){this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new ar)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.282095),t.addScaledVector(o[1],.488603*r),t.addScaledVector(o[2],.488603*i),t.addScaledVector(o[3],.488603*n),t.addScaledVector(o[4],n*r*1.092548),t.addScaledVector(o[5],r*i*1.092548),t.addScaledVector(o[6],.315392*(3*i*i-1)),t.addScaledVector(o[7],n*i*1.092548),t.addScaledVector(o[8],.546274*(n*n-r*r)),t}getIrradianceAt(e,t){const n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.886227),t.addScaledVector(o[1],1.023328*r),t.addScaledVector(o[2],1.023328*i),t.addScaledVector(o[3],1.023328*n),t.addScaledVector(o[4],.858086*n*r),t.addScaledVector(o[5],.858086*r*i),t.addScaledVector(o[6],.743125*i*i-.247708),t.addScaledVector(o[7],.858086*n*i),t.addScaledVector(o[8],.429043*(n*n-r*r)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(e,t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].fromArray(e,t+3*r);return this}toArray(e=[],t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].toArray(e,t+3*r);return e}static getBasisAt(e,t){const n=e.x,r=e.y,i=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*i,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*n*i,t[8]=.546274*(n*n-r*r)}}Df.prototype.isSphericalHarmonics3=!0;class If extends mf{constructor(e=new Df,t=1){super(void 0,t),this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}If.prototype.isLightProbe=!0;class kf extends Fl{constructor(e){super(e),this.textures={}}load(e,t,n,r){const i=this,o=new Ul(i.manager);o.setPath(i.path),o.setRequestHeader(i.requestHeader),o.setWithCredentials(i.withCredentials),o.load(e,(function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}}),n,r)}parse(e){const t=this.textures;function n(e){return void 0===t[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),t[e]}const r=new gl[e.type];if(void 0!==e.uuid&&(r.uuid=e.uuid),void 0!==e.name&&(r.name=e.name),void 0!==e.color&&void 0!==r.color&&r.color.setHex(e.color),void 0!==e.roughness&&(r.roughness=e.roughness),void 0!==e.metalness&&(r.metalness=e.metalness),void 0!==e.sheen&&(r.sheen=(new Ai).setHex(e.sheen)),void 0!==e.emissive&&void 0!==r.emissive&&r.emissive.setHex(e.emissive),void 0!==e.specular&&void 0!==r.specular&&r.specular.setHex(e.specular),void 0!==e.shininess&&(r.shininess=e.shininess),void 0!==e.clearcoat&&(r.clearcoat=e.clearcoat),void 0!==e.clearcoatRoughness&&(r.clearcoatRoughness=e.clearcoatRoughness),void 0!==e.fog&&(r.fog=e.fog),void 0!==e.flatShading&&(r.flatShading=e.flatShading),void 0!==e.blending&&(r.blending=e.blending),void 0!==e.combine&&(r.combine=e.combine),void 0!==e.side&&(r.side=e.side),void 0!==e.shadowSide&&(r.shadowSide=e.shadowSide),void 0!==e.opacity&&(r.opacity=e.opacity),void 0!==e.transparent&&(r.transparent=e.transparent),void 0!==e.alphaTest&&(r.alphaTest=e.alphaTest),void 0!==e.depthTest&&(r.depthTest=e.depthTest),void 0!==e.depthWrite&&(r.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(r.colorWrite=e.colorWrite),void 0!==e.stencilWrite&&(r.stencilWrite=e.stencilWrite),void 0!==e.stencilWriteMask&&(r.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(r.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(r.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(r.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(r.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(r.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(r.stencilZPass=e.stencilZPass),void 0!==e.wireframe&&(r.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(r.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(r.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(r.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(r.rotation=e.rotation),1!==e.linewidth&&(r.linewidth=e.linewidth),void 0!==e.dashSize&&(r.dashSize=e.dashSize),void 0!==e.gapSize&&(r.gapSize=e.gapSize),void 0!==e.scale&&(r.scale=e.scale),void 0!==e.polygonOffset&&(r.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(r.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(r.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.skinning&&(r.skinning=e.skinning),void 0!==e.morphTargets&&(r.morphTargets=e.morphTargets),void 0!==e.morphNormals&&(r.morphNormals=e.morphNormals),void 0!==e.dithering&&(r.dithering=e.dithering),void 0!==e.alphaToCoverage&&(r.alphaToCoverage=e.alphaToCoverage),void 0!==e.premultipliedAlpha&&(r.premultipliedAlpha=e.premultipliedAlpha),void 0!==e.vertexTangents&&(r.vertexTangents=e.vertexTangents),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.toneMapped&&(r.toneMapped=e.toneMapped),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.vertexColors&&("number"==typeof e.vertexColors?r.vertexColors=e.vertexColors>0:r.vertexColors=e.vertexColors),void 0!==e.uniforms)for(const t in e.uniforms){const i=e.uniforms[t];switch(r.uniforms[t]={},i.type){case"t":r.uniforms[t].value=n(i.value);break;case"c":r.uniforms[t].value=(new Ai).setHex(i.value);break;case"v2":r.uniforms[t].value=(new Xn).fromArray(i.value);break;case"v3":r.uniforms[t].value=(new ar).fromArray(i.value);break;case"v4":r.uniforms[t].value=(new nr).fromArray(i.value);break;case"m3":r.uniforms[t].value=(new Kn).fromArray(i.value);break;case"m4":r.uniforms[t].value=(new Fr).fromArray(i.value);break;default:r.uniforms[t].value=i.value}}if(void 0!==e.defines&&(r.defines=e.defines),void 0!==e.vertexShader&&(r.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(r.fragmentShader=e.fragmentShader),void 0!==e.extensions)for(const t in e.extensions)r.extensions[t]=e.extensions[t];if(void 0!==e.shading&&(r.flatShading=1===e.shading),void 0!==e.size&&(r.size=e.size),void 0!==e.sizeAttenuation&&(r.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(r.map=n(e.map)),void 0!==e.matcap&&(r.matcap=n(e.matcap)),void 0!==e.alphaMap&&(r.alphaMap=n(e.alphaMap)),void 0!==e.bumpMap&&(r.bumpMap=n(e.bumpMap)),void 0!==e.bumpScale&&(r.bumpScale=e.bumpScale),void 0!==e.normalMap&&(r.normalMap=n(e.normalMap)),void 0!==e.normalMapType&&(r.normalMapType=e.normalMapType),void 0!==e.normalScale){let t=e.normalScale;!1===Array.isArray(t)&&(t=[t,t]),r.normalScale=(new Xn).fromArray(t)}return void 0!==e.displacementMap&&(r.displacementMap=n(e.displacementMap)),void 0!==e.displacementScale&&(r.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(r.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(r.roughnessMap=n(e.roughnessMap)),void 0!==e.metalnessMap&&(r.metalnessMap=n(e.metalnessMap)),void 0!==e.emissiveMap&&(r.emissiveMap=n(e.emissiveMap)),void 0!==e.emissiveIntensity&&(r.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(r.specularMap=n(e.specularMap)),void 0!==e.envMap&&(r.envMap=n(e.envMap)),void 0!==e.envMapIntensity&&(r.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(r.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(r.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(r.lightMap=n(e.lightMap)),void 0!==e.lightMapIntensity&&(r.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(r.aoMap=n(e.aoMap)),void 0!==e.aoMapIntensity&&(r.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(r.gradientMap=n(e.gradientMap)),void 0!==e.clearcoatMap&&(r.clearcoatMap=n(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(r.clearcoatNormalScale=(new Xn).fromArray(e.clearcoatNormalScale)),void 0!==e.transmission&&(r.transmission=e.transmission),void 0!==e.transmissionMap&&(r.transmissionMap=n(e.transmissionMap)),r}setTextures(e){return this.textures=e,this}}class Ff{static decodeText(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);let t="";for(let n=0,r=e.length;n<r;n++)t+=String.fromCharCode(e[n]);try{return decodeURIComponent(escape(t))}catch(e){return t}}static extractUrlBase(e){const t=e.lastIndexOf("/");return-1===t?"./":e.substr(0,t+1)}}class jf extends ro{constructor(){super(),this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}clone(){return(new this.constructor).copy(this)}toJSON(){const e=super.toJSON(this);return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}jf.prototype.isInstancedBufferGeometry=!0;class Uf extends ki{constructor(e,t,n,r){"number"==typeof n&&(r=n,n=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),super(e,t,n),this.meshPerAttribute=r||1}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}Uf.prototype.isInstancedBufferAttribute=!0;class Bf extends Fl{constructor(e){super(e)}load(e,t,n,r){const i=this,o=new Ul(i.manager);o.setPath(i.path),o.setRequestHeader(i.requestHeader),o.setWithCredentials(i.withCredentials),o.load(e,(function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}}),n,r)}parse(e){const t={},n={};function r(e,r){if(void 0!==t[r])return t[r];const i=e.interleavedBuffers[r],o=function(e,t){if(void 0!==n[t])return n[t];const r=e.arrayBuffers[t],i=new Uint32Array(r).buffer;return n[t]=i,i}(e,i.buffer),a=Xi(i.type,o),s=new ic(a,i.stride);return s.uuid=i.uuid,t[r]=s,s}const i=e.isInstancedBufferGeometry?new jf:new ro,o=e.data.index;if(void 0!==o){const e=Xi(o.type,o.array);i.setIndex(new ki(e,1))}const a=e.data.attributes;for(const t in a){const n=a[t];let o;if(n.isInterleavedBufferAttribute){const t=r(e.data,n.data);o=new ac(t,n.itemSize,n.offset,n.normalized)}else{const e=Xi(n.type,n.array);o=new(n.isInstancedBufferAttribute?Uf:ki)(e,n.itemSize,n.normalized)}void 0!==n.name&&(o.name=n.name),void 0!==n.usage&&o.setUsage(n.usage),void 0!==n.updateRange&&(o.updateRange.offset=n.updateRange.offset,o.updateRange.count=n.updateRange.count),i.setAttribute(t,o)}const s=e.data.morphAttributes;if(s)for(const t in s){const n=s[t],o=[];for(let t=0,i=n.length;t<i;t++){const i=n[t];let a;if(i.isInterleavedBufferAttribute){const t=r(e.data,i.data);a=new ac(t,i.itemSize,i.offset,i.normalized)}else{const e=Xi(i.type,i.array);a=new ki(e,i.itemSize,i.normalized)}void 0!==i.name&&(a.name=i.name),o.push(a)}i.morphAttributes[t]=o}e.data.morphTargetsRelative&&(i.morphTargetsRelative=!0);const c=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==c)for(let e=0,t=c.length;e!==t;++e){const t=c[e];i.addGroup(t.start,t.count,t.materialIndex)}const u=e.data.boundingSphere;if(void 0!==u){const e=new ar;void 0!==u.center&&e.fromArray(u.center),i.boundingSphere=new Er(e,u.radius)}return e.name&&(i.name=e.name),e.userData&&(i.userData=e.userData),i}}class Gf extends Fl{constructor(e){super(e)}load(e,t,n,r){const i=this,o=""===this.path?Ff.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||o;const a=new Ul(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(function(n){let o=null;try{o=JSON.parse(n)}catch(t){return void 0!==r&&r(t),void console.error("THREE:ObjectLoader: Can't parse "+e+".",t.message)}const a=o.metadata;void 0!==a&&void 0!==a.type&&"geometry"!==a.type.toLowerCase()?i.parse(o,t):console.error("THREE.ObjectLoader: Can't load "+e)}),n,r)}parse(e,t){const n=this.parseAnimations(e.animations),r=this.parseShapes(e.shapes),i=this.parseGeometries(e.geometries,r),o=this.parseImages(e.images,(function(){void 0!==t&&t(c)})),a=this.parseTextures(e.textures,o),s=this.parseMaterials(e.materials,a),c=this.parseObject(e.object,i,s,n),u=this.parseSkeletons(e.skeletons,c);if(this.bindSkeletons(c,u),void 0!==t){let e=!1;for(const t in o)if(o[t]instanceof HTMLImageElement){e=!0;break}!1===e&&t(c)}return c}parseShapes(e){const t={};if(void 0!==e)for(let n=0,r=e.length;n<r;n++){const r=(new pf).fromJSON(e[n]);t[r.uuid]=r}return t}parseSkeletons(e,t){const n={},r={};if(t.traverse((function(e){e.isBone&&(r[e.uuid]=e)})),void 0!==e)for(let t=0,i=e.length;t<i;t++){const i=(new Ic).fromJSON(e[t],r);n[i.uuid]=i}return n}parseGeometries(e,t){const n={};let r;if(void 0!==e){const i=new Bf;for(let o=0,a=e.length;o<a;o++){let a;const s=e[o];switch(s.type){case"PlaneGeometry":case"PlaneBufferGeometry":a=new sl[s.type](s.width,s.height,s.widthSegments,s.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":a=new sl[s.type](s.width,s.height,s.depth,s.widthSegments,s.heightSegments,s.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":a=new sl[s.type](s.radius,s.segments,s.thetaStart,s.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":a=new sl[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 sl[s.type](s.radius,s.height,s.radialSegments,s.heightSegments,s.openEnded,s.thetaStart,s.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":a=new sl[s.type](s.radius,s.widthSegments,s.heightSegments,s.phiStart,s.phiLength,s.thetaStart,s.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":a=new sl[s.type](s.radius,s.detail);break;case"RingGeometry":case"RingBufferGeometry":a=new sl[s.type](s.innerRadius,s.outerRadius,s.thetaSegments,s.phiSegments,s.thetaStart,s.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":a=new sl[s.type](s.radius,s.tube,s.radialSegments,s.tubularSegments,s.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":a=new sl[s.type](s.radius,s.tube,s.tubularSegments,s.radialSegments,s.p,s.q);break;case"TubeGeometry":case"TubeBufferGeometry":a=new sl[s.type]((new hf[s.path.type]).fromJSON(s.path),s.tubularSegments,s.radius,s.radialSegments,s.closed);break;case"LatheGeometry":case"LatheBufferGeometry":a=new sl[s.type](s.points,s.segments,s.phiStart,s.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":a=new sl[s.type](s.vertices,s.indices,s.radius,s.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":r=[];for(let e=0,n=s.shapes.length;e<n;e++){const n=t[s.shapes[e]];r.push(n)}a=new sl[s.type](r,s.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":r=[];for(let e=0,n=s.shapes.length;e<n;e++){const n=t[s.shapes[e]];r.push(n)}const e=s.options.extrudePath;void 0!==e&&(s.options.extrudePath=(new hf[e.type]).fromJSON(e)),a=new sl[s.type](r,s.options);break;case"BufferGeometry":case"InstancedBufferGeometry":a=i.parse(s);break;case"Geometry":console.error('THREE.ObjectLoader: Loading "Geometry" is not supported anymore.');break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+s.type+'"');continue}a.uuid=s.uuid,void 0!==s.name&&(a.name=s.name),!0===a.isBufferGeometry&&void 0!==s.userData&&(a.userData=s.userData),n[s.uuid]=a}}return n}parseMaterials(e,t){const n={},r={};if(void 0!==e){const i=new kf;i.setTextures(t);for(let t=0,o=e.length;t<o;t++){const o=e[t];if("MultiMaterial"===o.type){const e=[];for(let t=0;t<o.materials.length;t++){const r=o.materials[t];void 0===n[r.uuid]&&(n[r.uuid]=i.parse(r)),e.push(n[r.uuid])}r[o.uuid]=e}else void 0===n[o.uuid]&&(n[o.uuid]=i.parse(o)),r[o.uuid]=n[o.uuid]}}return r}parseAnimations(e){const t={};if(void 0!==e)for(let n=0;n<e.length;n++){const r=e[n],i=Al.parse(r);t[i.uuid]=i}return t}parseImages(e,t){const n=this,r={};let i;function o(e){if("string"==typeof e){const t=e;return function(e){return n.manager.itemStart(e),i.load(e,(function(){n.manager.itemEnd(e)}),void 0,(function(){n.manager.itemError(e),n.manager.itemEnd(e)}))}(/^(\/\/)|([a-z]+:(\/\/)?)/i.test(t)?t:n.resourcePath+t)}return e.data?{data:Xi(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){const n=new Il(t);i=new Nl(n),i.setCrossOrigin(this.crossOrigin);for(let t=0,n=e.length;t<n;t++){const n=e[t],i=n.url;if(Array.isArray(i)){r[n.uuid]=[];for(let e=0,t=i.length;e<t;e++){const t=o(i[e]);null!==t&&(t instanceof HTMLImageElement?r[n.uuid].push(t):r[n.uuid].push(new Io(t.data,t.width,t.height)))}}else{const e=o(n.url);null!==e&&(r[n.uuid]=e)}}}return r}parseTextures(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])}const r={};if(void 0!==e)for(let i=0,o=e.length;i<o;i++){const o=e[i];let a;void 0===o.image&&console.warn('THREE.ObjectLoader: No "image" specified for',o.uuid),void 0===t[o.image]&&console.warn("THREE.ObjectLoader: Undefined image",o.image);const s=t[o.image];Array.isArray(s)?(a=new Oo(s),6===s.length&&(a.needsUpdate=!0)):(a=s&&s.data?new Io(s.data,s.width,s.height):new er(s),s&&(a.needsUpdate=!0)),a.uuid=o.uuid,void 0!==o.name&&(a.name=o.name),void 0!==o.mapping&&(a.mapping=n(o.mapping,Nf)),void 0!==o.offset&&a.offset.fromArray(o.offset),void 0!==o.repeat&&a.repeat.fromArray(o.repeat),void 0!==o.center&&a.center.fromArray(o.center),void 0!==o.rotation&&(a.rotation=o.rotation),void 0!==o.wrap&&(a.wrapS=n(o.wrap[0],Hf),a.wrapT=n(o.wrap[1],Hf)),void 0!==o.format&&(a.format=o.format),void 0!==o.type&&(a.type=o.type),void 0!==o.encoding&&(a.encoding=o.encoding),void 0!==o.minFilter&&(a.minFilter=n(o.minFilter,Vf)),void 0!==o.magFilter&&(a.magFilter=n(o.magFilter,Vf)),void 0!==o.anisotropy&&(a.anisotropy=o.anisotropy),void 0!==o.flipY&&(a.flipY=o.flipY),void 0!==o.premultiplyAlpha&&(a.premultiplyAlpha=o.premultiplyAlpha),void 0!==o.unpackAlignment&&(a.unpackAlignment=o.unpackAlignment),r[o.uuid]=a}return r}parseObject(e,t,n,r){let i,o,a;function s(e){return void 0===t[e]&&console.warn("THREE.ObjectLoader: Undefined geometry",e),t[e]}function c(e){if(void 0!==e){if(Array.isArray(e)){const t=[];for(let r=0,i=e.length;r<i;r++){const i=e[r];void 0===n[i]&&console.warn("THREE.ObjectLoader: Undefined material",i),t.push(n[i])}return t}return void 0===n[e]&&console.warn("THREE.ObjectLoader: Undefined material",e),n[e]}}switch(e.type){case"Scene":i=new rc,void 0!==e.background&&Number.isInteger(e.background)&&(i.background=new Ai(e.background)),void 0!==e.fog&&("Fog"===e.fog.type?i.fog=new nc(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(i.fog=new tc(e.fog.color,e.fog.density)));break;case"PerspectiveCamera":i=new Lo(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(i.focus=e.focus),void 0!==e.zoom&&(i.zoom=e.zoom),void 0!==e.filmGauge&&(i.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(i.filmOffset=e.filmOffset),void 0!==e.view&&(i.view=Object.assign({},e.view));break;case"OrthographicCamera":i=new zf(e.left,e.right,e.top,e.bottom,e.near,e.far),void 0!==e.zoom&&(i.zoom=e.zoom),void 0!==e.view&&(i.view=Object.assign({},e.view));break;case"AmbientLight":i=new Af(e.color,e.intensity);break;case"DirectionalLight":i=new Cf(e.color,e.intensity);break;case"PointLight":i=new Ef(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":i=new Of(e.color,e.intensity,e.width,e.height);break;case"SpotLight":i=new _f(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":i=new yf(e.color,e.groundColor,e.intensity);break;case"LightProbe":i=(new If).fromJSON(e);break;case"SkinnedMesh":o=s(e.geometry),a=c(e.material),i=new Cc(o,a),void 0!==e.bindMode&&(i.bindMode=e.bindMode),void 0!==e.bindMatrix&&i.bindMatrix.fromArray(e.bindMatrix),void 0!==e.skeleton&&(i.skeleton=e.skeleton);break;case"Mesh":o=s(e.geometry),a=c(e.material),i=new Mo(o,a);break;case"InstancedMesh":o=s(e.geometry),a=c(e.material);const t=e.count,n=e.instanceMatrix,r=e.instanceColor;i=new Bc(o,a,t),i.instanceMatrix=new ki(new Float32Array(n.array),16),void 0!==r&&(i.instanceColor=new ki(new Float32Array(r.array),r.itemSize));break;case"LOD":i=new Pc;break;case"Line":i=new qc(s(e.geometry),c(e.material));break;case"LineLoop":i=new Qc(s(e.geometry),c(e.material));break;case"LineSegments":i=new Kc(s(e.geometry),c(e.material));break;case"PointCloud":case"Points":i=new ru(s(e.geometry),c(e.material));break;case"Sprite":i=new wc(c(e.material));break;case"Group":i=new Ys;break;case"Bone":i=new Ac;break;default:i=new ci}if(i.uuid=e.uuid,void 0!==e.name&&(i.name=e.name),void 0!==e.matrix?(i.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(i.matrixAutoUpdate=e.matrixAutoUpdate),i.matrixAutoUpdate&&i.matrix.decompose(i.position,i.quaternion,i.scale)):(void 0!==e.position&&i.position.fromArray(e.position),void 0!==e.rotation&&i.rotation.fromArray(e.rotation),void 0!==e.quaternion&&i.quaternion.fromArray(e.quaternion),void 0!==e.scale&&i.scale.fromArray(e.scale)),void 0!==e.castShadow&&(i.castShadow=e.castShadow),void 0!==e.receiveShadow&&(i.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(i.shadow.bias=e.shadow.bias),void 0!==e.shadow.normalBias&&(i.shadow.normalBias=e.shadow.normalBias),void 0!==e.shadow.radius&&(i.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&i.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(i.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(i.visible=e.visible),void 0!==e.frustumCulled&&(i.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(i.renderOrder=e.renderOrder),void 0!==e.userData&&(i.userData=e.userData),void 0!==e.layers&&(i.layers.mask=e.layers),void 0!==e.children){const o=e.children;for(let e=0;e<o.length;e++)i.add(this.parseObject(o[e],t,n,r))}if(void 0!==e.animations){const t=e.animations;for(let e=0;e<t.length;e++){const n=t[e];i.animations.push(r[n])}}if("LOD"===e.type){void 0!==e.autoUpdate&&(i.autoUpdate=e.autoUpdate);const t=e.levels;for(let e=0;e<t.length;e++){const n=t[e],r=i.getObjectByProperty("uuid",n.object);void 0!==r&&i.addLevel(r,n.distance)}}return i}bindSkeletons(e,t){0!==Object.keys(t).length&&e.traverse((function(e){if(!0===e.isSkinnedMesh&&void 0!==e.skeleton){const n=t[e.skeleton];void 0===n?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",e.skeleton):e.bind(n,e.bindMatrix)}}))}setTexturePath(e){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(e)}}const Nf={UVMapping:ie,CubeReflectionMapping:oe,CubeRefractionMapping:ae,EquirectangularReflectionMapping:se,EquirectangularRefractionMapping:ce,CubeUVReflectionMapping:ue,CubeUVRefractionMapping:le},Hf={RepeatWrapping:fe,ClampToEdgeWrapping:he,MirroredRepeatWrapping:ve},Vf={NearestFilter:de,NearestMipmapNearestFilter:pe,NearestMipmapLinearFilter:ye,LinearFilter:xe,LinearMipmapNearestFilter:be,LinearMipmapLinearFilter:Me};class Wf extends Fl{constructor(e){super(e),"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,o=Dl.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;const a={};a.credentials="anonymous"===this.crossOrigin?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then((function(e){return e.blob()})).then((function(e){return createImageBitmap(e,Object.assign(i.options,{colorSpaceConversion:"none"}))})).then((function(n){Dl.add(e,n),t&&t(n),i.manager.itemEnd(e)})).catch((function(t){r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)})),i.manager.itemStart(e)}}Wf.prototype.isImageBitmapLoader=!0;class Zf{constructor(){this.type="ShapePath",this.color=new Ai,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new df,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,i,o){return this.currentPath.bezierCurveTo(e,t,n,r,i,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e,t){function n(e){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n],i=new pf;i.curves=r.curves,t.push(i)}return t}function r(e,t){const n=t.length;let r=!1;for(let i=n-1,o=0;o<n;i=o++){let n=t[i],a=t[o],s=a.x-n.x,c=a.y-n.y;if(Math.abs(c)>Number.EPSILON){if(c<0&&(n=t[o],s=-s,a=t[i],c=-c),e.y<n.y||e.y>a.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{const t=c*(e.x-n.x)-s*(e.y-n.y);if(0===t)return!0;if(t<0)continue;r=!r}}else{if(e.y!==n.y)continue;if(a.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=a.x)return!0}}return r}const i=Hu.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===t)return n(o);let a,s,c;const u=[];if(1===o.length)return s=o[0],c=new pf,c.curves=s.curves,u.push(c),u;let l=!i(o[0].getPoints());l=e?!l:l;const f=[],h=[];let v,d,p=[],m=0;h[m]=void 0,p[m]=[];for(let t=0,n=o.length;t<n;t++)s=o[t],v=s.getPoints(),a=i(v),a=e?!a:a,a?(!l&&h[m]&&m++,h[m]={s:new pf,p:v},h[m].s.curves=s.curves,l&&m++,p[m]=[]):p[m].push({h:s,p:v[0]});if(!h[0])return n(o);if(h.length>1){let e=!1;const t=[];for(let e=0,t=h.length;e<t;e++)f[e]=[];for(let n=0,i=h.length;n<i;n++){const i=p[n];for(let o=0;o<i.length;o++){const a=i[o];let s=!0;for(let i=0;i<h.length;i++)r(a.p,h[i].p)&&(n!==i&&t.push({froms:n,tos:i,hole:o}),s?(s=!1,f[i].push(a)):e=!0);s&&f[n].push(a)}}t.length>0&&(e||(p=f))}for(let e=0,t=h.length;e<t;e++){c=h[e].s,u.push(c),d=p[e];for(let e=0,t=d.length;e<t;e++)c.holes.push(d[e].h)}return u}}class qf{constructor(e){this.type="Font",this.data=e}generateShapes(e,t=100){const n=[],r=function(e,t,n){const r=Array.from(e),i=t/n.resolution,o=(n.boundingBox.yMax-n.boundingBox.yMin+n.underlineThickness)*i,a=[];let s=0,c=0;for(let e=0;e<r.length;e++){const t=r[e];if("\n"===t)s=0,c-=o;else{const e=Yf(t,i,s,c,n);s+=e.offsetX,a.push(e.path)}}return a}(e,t,this.data);for(let e=0,t=r.length;e<t;e++)Array.prototype.push.apply(n,r[e].toShapes());return n}}function Yf(e,t,n,r,i){const o=i.glyphs[e]||i.glyphs["?"];if(!o)return void console.error('THREE.Font: character "'+e+'" does not exists in font family '+i.familyName+".");const a=new Zf;let s,c,u,l,f,h,v,d;if(o.o){const e=o._cachedOutline||(o._cachedOutline=o.o.split(" "));for(let i=0,o=e.length;i<o;)switch(e[i++]){case"m":s=e[i++]*t+n,c=e[i++]*t+r,a.moveTo(s,c);break;case"l":s=e[i++]*t+n,c=e[i++]*t+r,a.lineTo(s,c);break;case"q":u=e[i++]*t+n,l=e[i++]*t+r,f=e[i++]*t+n,h=e[i++]*t+r,a.quadraticCurveTo(f,h,u,l);break;case"b":u=e[i++]*t+n,l=e[i++]*t+r,f=e[i++]*t+n,h=e[i++]*t+r,v=e[i++]*t+n,d=e[i++]*t+r,a.bezierCurveTo(f,h,v,d,u,l)}}return{offsetX:o.ha*t,path:a}}qf.prototype.isFont=!0;class Xf extends Fl{constructor(e){super(e)}load(e,t,n,r){const i=this,o=new Ul(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(i.withCredentials),o.load(e,(function(e){let 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))}const r=i.parse(n);t&&t(r)}),n,r)}parse(e){return new qf(e)}}let Kf;const Qf={getContext:function(){return void 0===Kf&&(Kf=new(window.AudioContext||window.webkitAudioContext)),Kf},setContext:function(e){Kf=e}};class Jf extends Fl{constructor(e){super(e)}load(e,t,n,r){const i=this,o=new Ul(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(function(n){try{const e=n.slice(0);Qf.getContext().decodeAudioData(e,(function(e){t(e)}))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}}),n,r)}}class $f extends If{constructor(e,t,n=1){super(void 0,n);const r=(new Ai).set(e),i=(new Ai).set(t),o=new ar(r.r,r.g,r.b),a=new ar(i.r,i.g,i.b),s=Math.sqrt(Math.PI),c=s*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(a).multiplyScalar(s),this.sh.coefficients[1].copy(o).sub(a).multiplyScalar(c)}}$f.prototype.isHemisphereLightProbe=!0;class eh extends If{constructor(e,t=1){super(void 0,t);const n=(new Ai).set(e);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}}eh.prototype.isAmbientLightProbe=!0;const th=new Fr,nh=new Fr;class rh{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Lo,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Lo,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep;const n=e.projectionMatrix.clone(),r=t.eyeSep/2,i=r*t.near/t.focus,o=t.near*Math.tan(Un*t.fov*.5)/t.zoom;let a,s;nh.elements[12]=-r,th.elements[12]=r,a=-o*t.aspect+i,s=o*t.aspect+i,n.elements[0]=2*t.near/(s-a),n.elements[8]=(s+a)/(s-a),this.cameraL.projectionMatrix.copy(n),a=-o*t.aspect-i,s=o*t.aspect-i,n.elements[0]=2*t.near/(s-a),n.elements[8]=(s+a)/(s-a),this.cameraR.projectionMatrix.copy(n)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(nh),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(th)}}class ih{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=oh(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=oh();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function oh(){return("undefined"==typeof performance?Date:performance).now()}const ah=new ar,sh=new or,ch=new ar,uh=new ar;class lh extends ci{constructor(){super(),this.type="AudioListener",this.context=Qf.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new ih}getInput(){return this.gain}removeFilter(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return 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),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener,n=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(ah,sh,ch),uh.set(0,0,-1).applyQuaternion(sh),t.positionX){const e=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(ah.x,e),t.positionY.linearRampToValueAtTime(ah.y,e),t.positionZ.linearRampToValueAtTime(ah.z,e),t.forwardX.linearRampToValueAtTime(uh.x,e),t.forwardY.linearRampToValueAtTime(uh.y,e),t.forwardZ.linearRampToValueAtTime(uh.z,e),t.upX.linearRampToValueAtTime(n.x,e),t.upY.linearRampToValueAtTime(n.y,e),t.upZ.linearRampToValueAtTime(n.z,e)}else t.setPosition(ah.x,ah.y,ah.z),t.setOrientation(uh.x,uh.y,uh.z,n.x,n.y,n.z)}}class fh extends ci{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")}stop(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let 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._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let 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._connected=!1,this}getFilters(){return this.filters}setFilters(e){return e||(e=[]),!0===this._connected?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){if(this.detune=e,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}}const hh=new ar,vh=new or,dh=new ar,ph=new ar;class mh extends fh{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(e){return this.panner.refDistance=e,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(e){return this.panner.rolloffFactor=e,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(e){return this.panner.distanceModel=e,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(e){return this.panner.maxDistance=e,this}setDirectionalCone(e,t,n){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=n,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),!0===this.hasPlaybackControl&&!1===this.isPlaying)return;this.matrixWorld.decompose(hh,vh,dh),ph.set(0,0,1).applyQuaternion(vh);const t=this.panner;if(t.positionX){const e=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime(hh.x,e),t.positionY.linearRampToValueAtTime(hh.y,e),t.positionZ.linearRampToValueAtTime(hh.z,e),t.orientationX.linearRampToValueAtTime(ph.x,e),t.orientationY.linearRampToValueAtTime(ph.y,e),t.orientationZ.linearRampToValueAtTime(ph.z,e)}else t.setPosition(hh.x,hh.y,hh.z),t.setOrientation(ph.x,ph.y,ph.z)}}class yh{constructor(e,t=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0;const t=this.getFrequencyData();for(let n=0;n<t.length;n++)e+=t[n];return e/t.length}}class gh{constructor(e,t,n){let r,i,o;switch(this.binding=e,this.valueSize=n,t){case"quaternion":r=this._slerp,i=this._slerpAdditive,o=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":r=this._select,i=this._select,o=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:r=this._lerp,i=this._lerpAdditive,o=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=i,this._setIdentity=o,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const n=this.buffer,r=this.valueSize,i=e*r+r;let o=this.cumulativeWeight;if(0===o){for(let e=0;e!==r;++e)n[i+e]=n[e];o=t}else{o+=t;const e=t/o;this._mixBufferRegion(n,i,0,e,r)}this.cumulativeWeight=o}accumulateAdditive(e){const t=this.buffer,n=this.valueSize,r=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,r,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,n=this.buffer,r=e*t+t,i=this.cumulativeWeight,o=this.cumulativeWeightAdditive,a=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,i<1){const e=t*this._origIndex;this._mixBufferRegion(n,r,e,1-i,t)}o>0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let e=t,i=t+t;e!==i;++e)if(n[e]!==n[e+t]){a.setValue(n,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let e=n,i=r;e!==i;++e)t[e]=t[r+e%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n<t;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,r,i){if(r>=.5)for(let r=0;r!==i;++r)e[t+r]=e[n+r]}_slerp(e,t,n,r){or.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){const o=this._workIndex*i;or.multiplyQuaternionsFlat(e,o,e,t,e,n),or.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,n,r,i){const o=1-r;for(let a=0;a!==i;++a){const i=t+a;e[i]=e[i]*o+e[n+a]*r}}_lerpAdditive(e,t,n,r,i){for(let o=0;o!==i;++o){const i=t+o;e[i]=e[i]+e[n+o]*r}}}const xh=new RegExp("[\\[\\]\\.:\\/]","g"),bh="[^\\[\\]\\.:\\/]",wh="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",Mh=/((?:WC+[\/:])*)/.source.replace("WC",bh),_h=/(WCOD+)?/.source.replace("WCOD",wh),Sh=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",bh),Ph=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",bh),Th=new RegExp("^"+Mh+_h+Sh+Ph+"$"),Rh=["material","materials","bones"];class Eh{constructor(e,t,n){this.path=t,this.parsedPath=n||Eh.parseTrackName(t),this.node=Eh.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new Eh.Composite(e,t,n):new Eh(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(xh,"")}static parseTrackName(e){const t=Th.exec(e);if(!t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){const e=n.nodeName.substring(r+1);-1!==Rh.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(!t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){const n=function(e){for(let r=0;r<e.length;r++){const i=e[r];if(i.name===t||i.uuid===t)return i;const o=n(i.children);if(o)return o}return null},r=n(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.node[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)e[t++]=n[r]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,r=t.propertyName;let i=t.propertyIndex;if(e||(e=Eh.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("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");if(n){let r=t.objectIndex;switch(n){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: 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("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(let t=0;t<e.length;t++)if(e[t].name===r){r=t;break}break;default:if(void 0===e[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(void 0!==r){if(void 0===e[r])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[r]}}const o=e[r];if(void 0===o){const n=t.nodeName;return void console.error("THREE.PropertyBinding: Trying to update property for track: "+n+"."+r+" but it wasn't found.",e)}let a=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?a=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(a=this.Versioning.MatrixWorldNeedsUpdate);let s=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.isBufferGeometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.",this);if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[i]&&(i=e.morphTargetDictionary[i])}s=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=i}else void 0!==o.fromArray&&void 0!==o.toArray?(s=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(s=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=r;this.getValue=this.GetterByBindingType[s],this.setValue=this.SetterByBindingTypeAndVersioning[s][a]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Eh.Composite=class{constructor(e,t,n){const r=n||Eh.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},Eh.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Eh.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Eh.prototype.GetterByBindingType=[Eh.prototype._getValue_direct,Eh.prototype._getValue_array,Eh.prototype._getValue_arrayElement,Eh.prototype._getValue_toArray],Eh.prototype.SetterByBindingTypeAndVersioning=[[Eh.prototype._setValue_direct,Eh.prototype._setValue_direct_setNeedsUpdate,Eh.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Eh.prototype._setValue_array,Eh.prototype._setValue_array_setNeedsUpdate,Eh.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Eh.prototype._setValue_arrayElement,Eh.prototype._setValue_arrayElement_setNeedsUpdate,Eh.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Eh.prototype._setValue_fromArray,Eh.prototype._setValue_fromArray_setNeedsUpdate,Eh.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class zh{constructor(){this.uuid=Gn(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let t=0,n=arguments.length;t!==n;++t)e[arguments[t].uuid]=t;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const t=this;this.stats={objects:{get total(){return t._objects.length},get inUse(){return this.total-t.nCachedObjects_}},get bindingsPerObject(){return t._bindings.length}}}add(){const e=this._objects,t=this._indicesByUUID,n=this._paths,r=this._parsedPaths,i=this._bindings,o=i.length;let a,s=e.length,c=this.nCachedObjects_;for(let u=0,l=arguments.length;u!==l;++u){const l=arguments[u],f=l.uuid;let h=t[f];if(void 0===h){h=s++,t[f]=h,e.push(l);for(let e=0,t=o;e!==t;++e)i[e].push(new Eh(l,n[e],r[e]))}else if(h<c){a=e[h];const s=--c,u=e[s];t[u.uuid]=h,e[h]=u,t[f]=s,e[s]=l;for(let e=0,t=o;e!==t;++e){const t=i[e],o=t[s];let a=t[h];t[h]=o,void 0===a&&(a=new Eh(l,n[e],r[e])),t[s]=a}}else e[h]!==a&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=c}remove(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_;for(let o=0,a=arguments.length;o!==a;++o){const a=arguments[o],s=a.uuid,c=t[s];if(void 0!==c&&c>=i){const o=i++,u=e[o];t[u.uuid]=c,e[c]=u,t[s]=o,e[o]=a;for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[o],i=t[c];t[c]=r,t[o]=i}}}this.nCachedObjects_=i}uncache(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_,o=e.length;for(let a=0,s=arguments.length;a!==s;++a){const s=arguments[a].uuid,c=t[s];if(void 0!==c)if(delete t[s],c<i){const a=--i,s=e[a],u=--o,l=e[u];t[s.uuid]=c,e[c]=s,t[l.uuid]=a,e[a]=l,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[a],i=t[u];t[c]=r,t[a]=i,t.pop()}}else{const i=--o,a=e[i];i>0&&(t[a.uuid]=c),e[c]=a,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e];t[c]=t[i],t.pop()}}}this.nCachedObjects_=i}subscribe_(e,t){const n=this._bindingsIndicesByPath;let r=n[e];const i=this._bindings;if(void 0!==r)return i[r];const o=this._paths,a=this._parsedPaths,s=this._objects,c=s.length,u=this.nCachedObjects_,l=new Array(c);r=i.length,n[e]=r,o.push(e),a.push(t),i.push(l);for(let n=u,r=s.length;n!==r;++n){const r=s[n];l[n]=new Eh(r,e,t)}return l}unsubscribe_(e){const t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){const 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()}}}zh.prototype.isAnimationObjectGroup=!0;class Lh{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;const i=t.tracks,o=i.length,a=new Array(o),s={endingStart:Nt,endingEnd:Nt};for(let e=0;e!==o;++e){const t=i[e].createInterpolant(null);a[e]=t,t.settings=s}this._interpolantSettings=s,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Ft,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}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){const n=this._clip.duration,r=e._clip.duration,i=r/n,o=n/r;e.warp(1,i,t),this.warp(o,1,t)}return this}crossFadeTo(e,t,n){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const r=this._mixer,i=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;null===a&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const s=a.parameterPositions,c=a.sampleValues;return s[0]=i,s[1]=i+n,c[0]=e/o,c[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled)return void this._updateWeight(e);const i=this._startTime;if(null!==i){const r=(e-i)*n;if(r<0||0===n)return;this._startTime=null,t=n*r}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const e=this._interpolants,t=this._propertyBindings;switch(this.blendMode){case Zt:for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(o),t[n].accumulateAdditive(a);break;case Wt:default:for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(o),t[n].accumulate(r,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(null!==n){const r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;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(e){const t=this._clip.duration,n=this.loop;let r=this.time+e,i=this._loopCount;const o=n===jt;if(0===e)return-1===i?r:o&&1==(1&i)?t-r:r;if(n===kt){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),r>=t||r<0){const n=Math.floor(r/t);r-=t*n,i+=Math.abs(n);const a=this.repetitions-i;if(a<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===a){const t=e<0;this._setEndings(t,!t,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=r;if(o&&1==(1&i))return t-r}return r}_setEndings(e,t,n){const r=this._interpolantSettings;n?(r.endingStart=Ht,r.endingEnd=Ht):(r.endingStart=e?this.zeroSlopeAtStart?Ht:Nt:Vt,r.endingEnd=t?this.zeroSlopeAtEnd?Ht:Nt:Vt)}_scheduleFading(e,t,n){const r=this._mixer,i=r.time;let o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=t,a[1]=i+e,s[1]=n,this}}class Ch extends kn{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,o=e._propertyBindings,a=e._interpolants,s=n.uuid,c=this._bindingsByRootAndName;let u=c[s];void 0===u&&(u={},c[s]=u);for(let e=0;e!==i;++e){const i=r[e],c=i.name;let l=u[c];if(void 0!==l)o[e]=l;else{if(l=o[e],void 0!==l){null===l._cacheIndex&&(++l.referenceCount,this._addInactiveBinding(l,s,c));continue}const r=t&&t._propertyBindings[e].binding.parsedPath;l=new gh(Eh.create(n,c,r),i.ValueTypeName,i.getValueSize()),++l.referenceCount,this._addInactiveBinding(l,s,c),o[e]=l}a[e].resultBuffer=l.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){const 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)}const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const 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(e){const t=e._cacheIndex;return null!==t&&t<this._nActiveActions}_addInactiveAction(e,t,n){const r=this._actions,i=this._actionsByClip;let o=i[t];if(void 0===o)o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,i[t]=o;else{const t=o.knownActions;e._byClipCacheIndex=t.length,t.push(e)}e._cacheIndex=r.length,r.push(e),o.actionByRoot[n]=e}_removeInactiveAction(e){const t=this._actions,n=t[t.length-1],r=e._cacheIndex;n._cacheIndex=r,t[r]=n,t.pop(),e._cacheIndex=null;const i=e._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,c=s[s.length-1],u=e._byClipCacheIndex;c._byClipCacheIndex=u,s[u]=c,s.pop(),e._byClipCacheIndex=null,delete a.actionByRoot[(e._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==--n.referenceCount&&this._removeInactiveBinding(n)}}_lendAction(e){const 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(e){const 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(e,t,n){const r=this._bindingsByRootAndName,i=this._bindings;let o=r[t];void 0===o&&(o={},r[t]=o),o[n]=e,e._cacheIndex=i.length,i.push(e)}_removeInactiveBinding(e){const t=this._bindings,n=e.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=t[t.length-1],c=e._cacheIndex;s._cacheIndex=c,t[c]=s,t.pop(),delete a[i],0===Object.keys(a).length&&delete o[r]}_lendBinding(e){const 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(e){const 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(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let n=e[t];return void 0===n&&(n=new Ml(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),n.__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){const t=this._controlInterpolants,n=e.__cacheIndex,r=--this._nActiveControlInterpolants,i=t[r];e.__cacheIndex=r,t[r]=e,i.__cacheIndex=n,t[n]=i}clipAction(e,t,n){const r=t||this._root,i=r.uuid;let o="string"==typeof e?Al.findByName(r,e):e;const a=null!==o?o.uuid:e,s=this._actionsByClip[a];let c=null;if(void 0===n&&(n=null!==o?o.blendMode:Wt),void 0!==s){const e=s.actionByRoot[i];if(void 0!==e&&e.blendMode===n)return e;c=s.knownActions[0],null===o&&(o=c._clip)}if(null===o)return null;const u=new Lh(this,o,t,n);return this._bindAction(u,c),this._addInactiveAction(u,a,i),u}existingAction(e,t){const n=t||this._root,r=n.uuid,i="string"==typeof e?Al.findByName(n,e):e,o=i?i.uuid:e,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null}stopAllAction(){const e=this._actions;for(let t=this._nActiveActions-1;t>=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),o=this._accuIndex^=1;for(let a=0;a!==n;++a)t[a]._update(r,e,i,o);const a=this._bindings,s=this._nActiveBindings;for(let e=0;e!==s;++e)a[e].apply(o);return this}setTime(e){this.time=0;for(let e=0;e<this._actions.length;e++)this._actions[e].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const t=this._actions,n=e.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){const e=i.knownActions;for(let n=0,r=e.length;n!==r;++n){const r=e[n];this._deactivateAction(r);const i=r._cacheIndex,o=t[t.length-1];r._cacheIndex=null,r._byClipCacheIndex=null,o._cacheIndex=i,t[i]=o,t.pop(),this._removeInactiveBindingsForAction(r)}delete r[n]}}uncacheRoot(e){const t=e.uuid,n=this._actionsByClip;for(const e in n){const r=n[e].actionByRoot[t];void 0!==r&&(this._deactivateAction(r),this._removeInactiveAction(r))}const r=this._bindingsByRootAndName[t];if(void 0!==r)for(const e in r){const t=r[e];t.restoreOriginalState(),this._removeInactiveBinding(t)}}uncacheAction(e,t){const n=this.existingAction(e,t);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}Ch.prototype._controlInterpolantsResultBuffer=new Float32Array(1);class Ah{constructor(e){"string"==typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e}clone(){return new Ah(void 0===this.value.clone?this.value:this.value.clone())}}class Oh extends ic{constructor(e,t,n=1){super(e,t),this.meshPerAttribute=n||1}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}Oh.prototype.isInstancedInterleavedBuffer=!0;class Dh{constructor(e,t,n,r,i){this.buffer=e,this.type=t,this.itemSize=n,this.elementSize=r,this.count=i,this.version=0}set needsUpdate(e){!0===e&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,t){return this.type=e,this.elementSize=t,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}}Dh.prototype.isGLBufferAttribute=!0;class Ih{constructor(e,t,n=0,r=1/0){this.ray=new kr(e,t),this.near=n,this.far=r,this.camera=null,this.layers=new Yr,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(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(),this.camera=t):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),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)}intersectObject(e,t=!1,n=[]){return Fh(e,this,n,t),n.sort(kh),n}intersectObjects(e,t=!1,n=[]){for(let r=0,i=e.length;r<i;r++)Fh(e[r],this,n,t);return n.sort(kh),n}}function kh(e,t){return e.distance-t.distance}function Fh(e,t,n,r){if(e.layers.test(t.layers)&&e.raycast(t,n),!0===r){const r=e.children;for(let e=0,i=r.length;e<i;e++)Fh(r[e],t,n,!0)}}class jh{constructor(e=1,t=0,n=0){return this.radius=e,this.phi=t,this.theta=n,this}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){const e=1e-6;return this.phi=Math.max(e,Math.min(Math.PI-e,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(Nn(t/this.radius,-1,1))),this}clone(){return(new this.constructor).copy(this)}}class Uh{constructor(e=1,t=0,n=0){return this.radius=e,this.theta=t,this.y=n,this}set(e,t,n){return this.radius=e,this.theta=t,this.y=n,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+n*n),this.theta=Math.atan2(e,n),this.y=t,this}clone(){return(new this.constructor).copy(this)}}const Bh=new Xn;class Gh{constructor(e=new Xn(1/0,1/0),t=new Xn(-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=Bh.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return void 0===e&&(console.warn("THREE.Box2: .getCenter() target is now required"),e=new Xn),this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return void 0===e&&(console.warn("THREE.Box2: .getSize() target is now required"),e=new Xn),this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)}containsBox(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(e,t){return void 0===t&&(console.warn("THREE.Box2: .getParameter() target is now required"),t=new Xn),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(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(e,t){return void 0===t&&(console.warn("THREE.Box2: .clampPoint() target is now required"),t=new Xn),t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return Bh.copy(e).clamp(this.min,this.max).sub(e).length()}intersect(e){return this.min.max(e.min),this.max.min(e.max),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}Gh.prototype.isBox2=!0;const Nh=new ar,Hh=new ar;class Vh{constructor(e=new ar,t=new ar){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return void 0===e&&(console.warn("THREE.Line3: .getCenter() target is now required"),e=new ar),e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return void 0===e&&(console.warn("THREE.Line3: .delta() target is now required"),e=new ar),e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return void 0===t&&(console.warn("THREE.Line3: .at() target is now required"),t=new ar),this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){Nh.subVectors(e,this.start),Hh.subVectors(this.end,this.start);const n=Hh.dot(Hh);let r=Hh.dot(Nh)/n;return t&&(r=Nn(r,0,1)),r}closestPointToPoint(e,t,n){const r=this.closestPointToPointParameter(e,t);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new ar),this.delta(n).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}}class Wh extends ci{constructor(e){super(),this.material=e,this.render=function(){},this.hasPositions=!1,this.hasNormals=!1,this.hasColors=!1,this.hasUvs=!1,this.positionArray=null,this.normalArray=null,this.colorArray=null,this.uvArray=null,this.count=0}}Wh.prototype.isImmediateRenderObject=!0;const Zh=new ar;class qh extends ci{constructor(e,t){super(),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;const n=new ro,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let e=0,t=1,n=32;e<n;e++,t++){const i=e/n*Math.PI*2,o=t/n*Math.PI*2;r.push(Math.cos(i),Math.sin(i),1,Math.cos(o),Math.sin(o),1)}n.setAttribute("position",new Wi(r,3));const i=new Gc({fog:!1,toneMapped:!1});this.cone=new Kc(n,i),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateMatrixWorld();const e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),Zh.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(Zh),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const Yh=new ar,Xh=new Fr,Kh=new Fr;class Qh extends Kc{constructor(e){const t=Jh(e),n=new ro,r=[],i=[],o=new Ai(0,0,1),a=new Ai(0,1,0);for(let e=0;e<t.length;e++){const n=t[e];n.parent&&n.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.setAttribute("position",new Wi(r,3)),n.setAttribute("color",new Wi(i,3)),super(n,new Gc({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.type="SkeletonHelper",this.isSkeletonHelper=!0,this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(e){const t=this.bones,n=this.geometry,r=n.getAttribute("position");Kh.copy(this.root.matrixWorld).invert();for(let e=0,n=0;e<t.length;e++){const i=t[e];i.parent&&i.parent.isBone&&(Xh.multiplyMatrices(Kh,i.matrixWorld),Yh.setFromMatrixPosition(Xh),r.setXYZ(n,Yh.x,Yh.y,Yh.z),Xh.multiplyMatrices(Kh,i.parent.matrixWorld),Yh.setFromMatrixPosition(Xh),r.setXYZ(n+1,Yh.x,Yh.y,Yh.z),n+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}}function Jh(e){const t=[];e&&e.isBone&&t.push(e);for(let n=0;n<e.children.length;n++)t.push.apply(t,Jh(e.children[n]));return t}class $h extends Mo{constructor(e,t,n){super(new el(t,4,2),new Oi({wireframe:!0,fog:!1,toneMapped:!1})),this.light=e,this.light.updateMatrixWorld(),this.color=n,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)}}const ev=new ar,tv=new Ai,nv=new Ai;class rv extends ci{constructor(e,t,n){super(),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;const r=new Ku(t);r.rotateY(.5*Math.PI),this.material=new Oi({wireframe:!0,fog:!1,toneMapped:!1}),void 0===this.color&&(this.material.vertexColors=!0);const i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.setAttribute("color",new ki(o,3)),this.add(new Mo(r,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const e=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{const t=e.geometry.getAttribute("color");tv.copy(this.light.color),nv.copy(this.light.groundColor);for(let e=0,n=t.count;e<n;e++){const r=e<n/2?tv:nv;t.setXYZ(e,r.r,r.g,r.b)}t.needsUpdate=!0}e.lookAt(ev.setFromMatrixPosition(this.light.matrixWorld).negate())}}class iv extends Kc{constructor(e=10,t=10,n=4473924,r=8947848){n=new Ai(n),r=new Ai(r);const i=t/2,o=e/t,a=e/2,s=[],c=[];for(let e=0,u=0,l=-a;e<=t;e++,l+=o){s.push(-a,0,l,a,0,l),s.push(l,0,-a,l,0,a);const t=e===i?n:r;t.toArray(c,u),u+=3,t.toArray(c,u),u+=3,t.toArray(c,u),u+=3,t.toArray(c,u),u+=3}const u=new ro;u.setAttribute("position",new Wi(s,3)),u.setAttribute("color",new Wi(c,3)),super(u,new Gc({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}}class ov extends Kc{constructor(e=10,t=16,n=8,r=64,i=4473924,o=8947848){i=new Ai(i),o=new Ai(o);const a=[],s=[];for(let n=0;n<=t;n++){const r=n/t*(2*Math.PI),c=Math.sin(r)*e,u=Math.cos(r)*e;a.push(0,0,0),a.push(c,0,u);const l=1&n?i:o;s.push(l.r,l.g,l.b),s.push(l.r,l.g,l.b)}for(let t=0;t<=n;t++){const c=1&t?i:o,u=e-e/n*t;for(let e=0;e<r;e++){let t=e/r*(2*Math.PI),n=Math.sin(t)*u,i=Math.cos(t)*u;a.push(n,0,i),s.push(c.r,c.g,c.b),t=(e+1)/r*(2*Math.PI),n=Math.sin(t)*u,i=Math.cos(t)*u,a.push(n,0,i),s.push(c.r,c.g,c.b)}}const c=new ro;c.setAttribute("position",new Wi(a,3)),c.setAttribute("color",new Wi(s,3)),super(c,new Gc({vertexColors:!0,toneMapped:!1})),this.type="PolarGridHelper"}}const av=new ar,sv=new ar,cv=new ar;class uv extends ci{constructor(e,t,n){super(),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===t&&(t=1);let r=new ro;r.setAttribute("position",new Wi([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));const i=new Gc({fog:!1,toneMapped:!1});this.lightPlane=new qc(r,i),this.add(this.lightPlane),r=new ro,r.setAttribute("position",new Wi([0,0,0,0,0,1],3)),this.targetLine=new qc(r,i),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){av.setFromMatrixPosition(this.light.matrixWorld),sv.setFromMatrixPosition(this.light.target.matrixWorld),cv.subVectors(sv,av),this.lightPlane.lookAt(sv),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(sv),this.targetLine.scale.z=cv.length()}}const lv=new ar,fv=new zo;class hv extends Kc{constructor(e){const t=new ro,n=new Gc({color:16777215,vertexColors:!0,toneMapped:!1}),r=[],i=[],o={},a=new Ai(16755200),s=new Ai(16711680),c=new Ai(43775),u=new Ai(16777215),l=new Ai(3355443);function f(e,t,n){h(e,n),h(t,n)}function h(e,t){r.push(0,0,0),i.push(t.r,t.g,t.b),void 0===o[e]&&(o[e]=[]),o[e].push(r.length/3-1)}f("n1","n2",a),f("n2","n4",a),f("n4","n3",a),f("n3","n1",a),f("f1","f2",a),f("f2","f4",a),f("f4","f3",a),f("f3","f1",a),f("n1","f1",a),f("n2","f2",a),f("n3","f3",a),f("n4","f4",a),f("p","n1",s),f("p","n2",s),f("p","n3",s),f("p","n4",s),f("u1","u2",c),f("u2","u3",c),f("u3","u1",c),f("c","t",u),f("p","c",l),f("cn1","cn2",l),f("cn3","cn4",l),f("cf1","cf2",l),f("cf3","cf4",l),t.setAttribute("position",new Wi(r,3)),t.setAttribute("color",new Wi(i,3)),super(t,n),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}update(){const e=this.geometry,t=this.pointMap;fv.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),vv("c",t,e,fv,0,0,-1),vv("t",t,e,fv,0,0,1),vv("n1",t,e,fv,-1,-1,-1),vv("n2",t,e,fv,1,-1,-1),vv("n3",t,e,fv,-1,1,-1),vv("n4",t,e,fv,1,1,-1),vv("f1",t,e,fv,-1,-1,1),vv("f2",t,e,fv,1,-1,1),vv("f3",t,e,fv,-1,1,1),vv("f4",t,e,fv,1,1,1),vv("u1",t,e,fv,.7,1.1,-1),vv("u2",t,e,fv,-.7,1.1,-1),vv("u3",t,e,fv,0,2,-1),vv("cf1",t,e,fv,-1,0,1),vv("cf2",t,e,fv,1,0,1),vv("cf3",t,e,fv,0,-1,1),vv("cf4",t,e,fv,0,1,1),vv("cn1",t,e,fv,-1,0,-1),vv("cn2",t,e,fv,1,0,-1),vv("cn3",t,e,fv,0,-1,-1),vv("cn4",t,e,fv,0,1,-1),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function vv(e,t,n,r,i,o,a){lv.set(i,o,a).unproject(r);const s=t[e];if(void 0!==s){const e=n.getAttribute("position");for(let t=0,n=s.length;t<n;t++)e.setXYZ(s[t],lv.x,lv.y,lv.z)}}const dv=new ur;class pv extends Kc{constructor(e,t=16776960){const 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 ro;i.setIndex(new ki(n,1)),i.setAttribute("position",new ki(r,3)),super(i,new Gc({color:t,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&dv.setFromObject(this.object),dv.isEmpty())return;const t=dv.min,n=dv.max,r=this.geometry.attributes.position,i=r.array;i[0]=n.x,i[1]=n.y,i[2]=n.z,i[3]=t.x,i[4]=n.y,i[5]=n.z,i[6]=t.x,i[7]=t.y,i[8]=n.z,i[9]=n.x,i[10]=t.y,i[11]=n.z,i[12]=n.x,i[13]=n.y,i[14]=t.z,i[15]=t.x,i[16]=n.y,i[17]=t.z,i[18]=t.x,i[19]=t.y,i[20]=t.z,i[21]=n.x,i[22]=t.y,i[23]=t.z,r.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e){return Kc.prototype.copy.call(this,e),this.object=e.object,this}}class mv extends Kc{constructor(e,t=16776960){const 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 ro;r.setIndex(new ki(n,1)),r.setAttribute("position",new Wi([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),super(r,new Gc({color:t,toneMapped:!1})),this.box=e,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(e){const t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(e))}}class yv extends qc{constructor(e,t=1,n=16776960){const r=n,i=new ro;i.setAttribute("position",new Wi([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,0,1,0,0,0],3)),i.computeBoundingSphere(),super(i,new Gc({color:r,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=t;const o=new ro;o.setAttribute("position",new Wi([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),o.computeBoundingSphere(),this.add(new Mo(o,new Oi({color:r,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(e){let t=-this.plane.constant;Math.abs(t)<1e-8&&(t=1e-8),this.scale.set(.5*this.size,.5*this.size,t),this.children[0].material.side=t<0?p:d,this.lookAt(this.plane.normal),super.updateMatrixWorld(e)}}const gv=new ar;let xv,bv;class wv extends ci{constructor(e=new ar(0,0,1),t=new ar(0,0,0),n=1,r=16776960,i=.2*n,o=.2*i){super(),this.type="ArrowHelper",void 0===xv&&(xv=new ro,xv.setAttribute("position",new Wi([0,0,0,0,1,0],3)),bv=new lu(0,.5,1,5,1),bv.translate(0,-.5,0)),this.position.copy(t),this.line=new qc(xv,new Gc({color:r,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Mo(bv,new Oi({color:r,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,i,o)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{gv.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(gv,t)}}setLength(e,t=.2*e,n=.2*t){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}}class Mv extends Kc{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=new ro;n.setAttribute("position",new Wi(t,3)),n.setAttribute("color",new Wi([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),super(n,new Gc({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}const _v=new Float32Array(1),Sv=new Int32Array(_v.buffer);class Pv{static toHalfFloat(e){_v[0]=e;const t=Sv[0];let n=t>>16&32768,r=t>>12&2047;const i=t>>23&255;return i<103?n:i>142?(n|=31744,n|=(255==i?0:1)&&8388607&t,n):i<113?(r|=2048,n|=(r>>114-i)+(r>>113-i&1),n):(n|=i-112<<10|r>>1,n+=1&r,n)}}const Tv=Math.pow(2,8),Rv=[.125,.215,.35,.446,.526,.582],Ev=5+Rv.length,zv={[Kt]:0,[Qt]:1,[$t]:2,[tn]:3,[nn]:4,[rn]:5,[Jt]:6},Lv=new Oi({side:p,depthWrite:!1,depthTest:!1}),Cv=new Mo(new So,Lv),Av=new zf,{_lodPlanes:Ov,_sizeLods:Dv,_sigmas:Iv}=Vv(),kv=new Ai;let Fv=null;const jv=(1+Math.sqrt(5))/2,Uv=1/jv,Bv=[new ar(1,1,1),new ar(-1,1,1),new ar(1,1,-1),new ar(-1,1,-1),new ar(0,jv,Uv),new ar(0,jv,-Uv),new ar(Uv,0,jv),new ar(-Uv,0,jv),new ar(jv,Uv,0),new ar(-jv,Uv,0)];function Gv(e){const t=Math.max(e.r,e.g,e.b),n=Math.min(Math.max(Math.ceil(Math.log2(t)),-128),127);return e.multiplyScalar(Math.pow(2,-n)),(n+128)/255}class Nv{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._blurMaterial=function(e){const t=new Float32Array(20),n=new ar(0,1,0);return new ul({name:"SphericalGaussianBlur",defines:{n:20},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:t},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:n},inputEncoding:{value:zv[Kt]},outputEncoding:{value:zv[Kt]}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include <encodings_pars_fragment>\n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t",blending:x,depthTest:!1,depthWrite:!1})}(),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,r=100){Fv=this._renderer.getRenderTarget();const i=this._allocateTargets();return this._sceneToCubeUV(e,n,r,i),t>0&&this._blur(i,0,0,t),this._applyPMREM(i),this._cleanup(i),i}fromEquirectangular(e){return this._fromTexture(e)}fromCubemap(e){return this._fromTexture(e)}compileCubemapShader(){null===this._cubemapShader&&(this._cubemapShader=Yv(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){null===this._equirectShader&&(this._equirectShader=qv(),this._compileMaterial(this._equirectShader))}dispose(){this._blurMaterial.dispose(),null!==this._cubemapShader&&this._cubemapShader.dispose(),null!==this._equirectShader&&this._equirectShader.dispose();for(let e=0;e<Ov.length;e++)Ov[e].dispose()}_cleanup(e){this._pingPongRenderTarget.dispose(),this._renderer.setRenderTarget(Fv),e.scissorTest=!1,Zv(e,0,0,e.width,e.height)}_fromTexture(e){Fv=this._renderer.getRenderTarget();const t=this._allocateTargets(e);return this._textureToCubeUV(e,t),this._applyPMREM(t),this._cleanup(t),t}_allocateTargets(e){const t={magFilter:de,minFilter:de,generateMipmaps:!1,type:Se,format:Ge,encoding:Hv(e)?e.encoding:$t,depthBuffer:!1},n=Wv(t);return n.depthBuffer=!e,this._pingPongRenderTarget=Wv(t),n}_compileMaterial(e){const t=new Mo(Ov[0],e);this._renderer.compile(t,Av)}_sceneToCubeUV(e,t,n,r){const i=new Lo(90,1,t,n),o=[1,-1,1,1,1,1],a=[1,1,1,-1,-1,-1],s=this._renderer,c=s.autoClear,u=s.outputEncoding,l=s.toneMapping;s.getClearColor(kv),s.toneMapping=J,s.outputEncoding=Kt,s.autoClear=!1;let f=!1;const h=e.background;if(h){if(h.isColor){Lv.color.copy(h).convertSRGBToLinear(),e.background=null;const t=Gv(Lv.color);Lv.opacity=t,f=!0}}else{Lv.color.copy(kv).convertSRGBToLinear();const e=Gv(Lv.color);Lv.opacity=e,f=!0}for(let t=0;t<6;t++){const n=t%3;0==n?(i.up.set(0,o[t],0),i.lookAt(a[t],0,0)):1==n?(i.up.set(0,0,o[t]),i.lookAt(0,a[t],0)):(i.up.set(0,o[t],0),i.lookAt(0,0,a[t])),Zv(r,n*Tv,t>2?Tv:0,Tv,Tv),s.setRenderTarget(r),f&&s.render(Cv,i),s.render(e,i)}s.toneMapping=l,s.outputEncoding=u,s.autoClear=c}_textureToCubeUV(e,t){const n=this._renderer;e.isCubeTexture?null==this._cubemapShader&&(this._cubemapShader=Yv()):null==this._equirectShader&&(this._equirectShader=qv());const r=e.isCubeTexture?this._cubemapShader:this._equirectShader,i=new Mo(Ov[0],r),o=r.uniforms;o.envMap.value=e,e.isCubeTexture||o.texelSize.value.set(1/e.image.width,1/e.image.height),o.inputEncoding.value=zv[e.encoding],o.outputEncoding.value=zv[t.texture.encoding],Zv(t,0,0,3*Tv,2*Tv),n.setRenderTarget(t),n.render(i,Av)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let t=1;t<Ev;t++){const n=Math.sqrt(Iv[t]*Iv[t]-Iv[t-1]*Iv[t-1]),r=Bv[(t-1)%Bv.length];this._blur(e,t-1,t,n,r)}t.autoClear=n}_blur(e,t,n,r,i){const o=this._pingPongRenderTarget;this._halfBlur(e,o,t,n,r,"latitudinal",i),this._halfBlur(o,e,n,n,r,"longitudinal",i)}_halfBlur(e,t,n,r,i,o,a){const s=this._renderer,c=this._blurMaterial;"latitudinal"!==o&&"longitudinal"!==o&&console.error("blur direction must be either latitudinal or longitudinal!");const u=new Mo(Ov[r],c),l=c.uniforms,f=Dv[n]-1,h=isFinite(i)?Math.PI/(2*f):2*Math.PI/39,v=i/h,d=isFinite(i)?1+Math.floor(3*v):20;d>20&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${d} samples when the maximum is set to 20`);const p=[];let m=0;for(let e=0;e<20;++e){const t=e/v,n=Math.exp(-t*t/2);p.push(n),0==e?m+=n:e<d&&(m+=2*n)}for(let e=0;e<p.length;e++)p[e]=p[e]/m;l.envMap.value=e.texture,l.samples.value=d,l.weights.value=p,l.latitudinal.value="latitudinal"===o,a&&(l.poleAxis.value=a),l.dTheta.value=h,l.mipInt.value=8-n,l.inputEncoding.value=zv[e.texture.encoding],l.outputEncoding.value=zv[e.texture.encoding];const y=Dv[r];Zv(t,3*Math.max(0,Tv-2*y),(0===r?0:2*Tv)+2*y*(r>4?r-8+4:0),3*y,2*y),s.setRenderTarget(t),s.render(u,Av)}}function Hv(e){return void 0!==e&&e.type===Se&&(e.encoding===Kt||e.encoding===Qt||e.encoding===Jt)}function Vv(){const e=[],t=[],n=[];let r=8;for(let i=0;i<Ev;i++){const o=Math.pow(2,r);t.push(o);let a=1/o;i>4?a=Rv[i-8+4-1]:0==i&&(a=0),n.push(a);const s=1/(o-1),c=-s/2,u=1+s/2,l=[c,c,u,c,u,u,c,c,u,u,c,u],f=6,h=6,v=3,d=2,p=1,m=new Float32Array(v*h*f),y=new Float32Array(d*h*f),g=new Float32Array(p*h*f);for(let e=0;e<f;e++){const t=e%3*2/3-1,n=e>2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];m.set(r,v*h*e),y.set(l,d*h*e);const i=[e,e,e,e,e,e];g.set(i,p*h*e)}const x=new ro;x.setAttribute("position",new ki(m,v)),x.setAttribute("uv",new ki(y,d)),x.setAttribute("faceIndex",new ki(g,p)),e.push(x),r>4&&r--}return{_lodPlanes:e,_sizeLods:t,_sigmas:n}}function Wv(e){const t=new rr(3*Tv,3*Tv,e);return t.texture.mapping=ue,t.texture.name="PMREM.cubeUv",t.scissorTest=!0,t}function Zv(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function qv(){const e=new Xn(1,1);return new ul({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:e},inputEncoding:{value:zv[Kt]},outputEncoding:{value:zv[Kt]}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform vec2 texelSize;\n\n\t\t\t\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include <encodings_pars_fragment>\n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tvec2 f = fract( uv / texelSize - 0.5 );\n\t\t\t\tuv -= f * texelSize;\n\t\t\t\tvec3 tl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x += texelSize.x;\n\t\t\t\tvec3 tr = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.y += texelSize.y;\n\t\t\t\tvec3 br = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x -= texelSize.x;\n\t\t\t\tvec3 bl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\n\t\t\t\tvec3 tm = mix( tl, tr, f.x );\n\t\t\t\tvec3 bm = mix( bl, br, f.x );\n\t\t\t\tgl_FragColor.rgb = mix( tm, bm, f.y );\n\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t",blending:x,depthTest:!1,depthWrite:!1})}function Yv(){return new ul({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},inputEncoding:{value:zv[Kt]},outputEncoding:{value:zv[Kt]}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\t\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include <encodings_pars_fragment>\n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb = envMapTexelToLinear( textureCube( envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ) ) ).rgb;\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t",blending:x,depthTest:!1,depthWrite:!1})}const Xv=0,Kv=1,Qv=0,Jv=1,$v=2;function ed(e){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),e}function td(e=[]){return console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),e.isMultiMaterial=!0,e.materials=e,e.clone=function(){return e.slice()},e}function nd(e,t){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new ru(e,t)}function rd(e){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new wc(e)}function id(e,t){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new ru(e,t)}function od(e){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Jc(e)}function ad(e){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Jc(e)}function sd(e){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Jc(e)}function cd(e,t,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new ar(e,t,n)}function ud(e,t){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),new ki(e,t).setUsage(Tn)}function ld(e,t){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Fi(e,t)}function fd(e,t){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new ji(e,t)}function hd(e,t){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new Ui(e,t)}function vd(e,t){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new Bi(e,t)}function dd(e,t){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Gi(e,t)}function pd(e,t){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new Ni(e,t)}function md(e,t){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Hi(e,t)}function yd(e,t){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Wi(e,t)}function gd(e,t){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Zi(e,t)}function xd(e){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new Mv(e)}function bd(e,t){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new pv(e,t)}function wd(e,t){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Kc(new gu(e.geometry),new Gc({color:void 0!==t?t:16777215}))}function Md(e,t){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Kc(new al(e.geometry),new Gc({color:void 0!==t?t:16777215}))}function _d(e){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Ul(e)}function Sd(e){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Vl(e)}function Pd(e,t,n){return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),new Do(e,n)}function Td(){console.error("THREE.CanvasRenderer has been removed")}function Rd(){console.error("THREE.JSONLoader has been removed.")}Zl.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(Zl.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},df.prototype.fromPoints=function(e){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)},iv.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Qh.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Fl.prototype.extractUrlBase=function(e){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Ff.extractUrlBase(e)},Fl.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}},Gh.prototype.center=function(e){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(e)},Gh.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Gh.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},Gh.prototype.size=function(e){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(e)},ur.prototype.center=function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)},ur.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},ur.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},ur.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},ur.prototype.size=function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)},Er.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()},jo.prototype.setFromMatrix=function(e){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(e)},Vh.prototype.center=function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)},Kn.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},Kn.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},Kn.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},Kn.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},Kn.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")},Kn.prototype.getInverse=function(e){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()},Fr.prototype.extractPosition=function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)},Fr.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},Fr.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new ar).setFromMatrixColumn(this,3)},Fr.prototype.setRotationFromQuaternion=function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)},Fr.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},Fr.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},Fr.prototype.multiplyVector4=function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},Fr.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},Fr.prototype.rotateAxis=function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)},Fr.prototype.crossVector=function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},Fr.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")},Fr.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},Fr.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},Fr.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},Fr.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},Fr.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},Fr.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},Fr.prototype.makeFrustum=function(e,t,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(e,t,r,n,i,o)},Fr.prototype.getInverse=function(e){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()},hi.prototype.isIntersectionLine=function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)},or.prototype.multiplyVector3=function(e){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)},or.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()},kr.prototype.isIntersectionBox=function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},kr.prototype.isIntersectionPlane=function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)},kr.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},_i.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},_i.prototype.barycoordFromPoint=function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)},_i.prototype.midpoint=function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)},_i.prototypenormal=function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)},_i.prototype.plane=function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)},_i.barycoordFromPoint=function(e,t,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),_i.getBarycoord(e,t,n,r,i)},_i.normal=function(e,t,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),_i.getNormal(e,t,n,r)},pf.prototype.extractAllPoints=function(e){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(e)},pf.prototype.extrude=function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Zu(this,e)},pf.prototype.makeGeometry=function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new $u(this,e)},Xn.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},Xn.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},Xn.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},ar.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},ar.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},ar.prototype.getPositionFromMatrix=function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)},ar.prototype.getScaleFromMatrix=function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)},ar.prototype.getColumnFromMatrix=function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},ar.prototype.applyProjection=function(e){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(e)},ar.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},ar.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},ar.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},nr.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},nr.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},ci.prototype.getChildByName=function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)},ci.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},ci.prototype.translate=function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)},ci.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},ci.prototype.applyMatrix=function(e){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)},Object.defineProperties(ci.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(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Mo.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")},Object.defineProperties(Mo.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),qt},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),Cc.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},Lo.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(mf.prototype,{onlyShadow:{set:function(){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(){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(){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(ki.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===Tn},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(Tn)}}}),ki.prototype.setDynamic=function(e){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?Tn:Pn),this},ki.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},ki.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},ro.prototype.addIndex=function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)},ro.prototype.addAttribute=function(e,t){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t),this):this.setAttribute(e,t):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(e,new ki(arguments[1],arguments[2])))},ro.prototype.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)},ro.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},ro.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},ro.prototype.removeAttribute=function(e){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(e)},ro.prototype.applyMatrix=function(e){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)},Object.defineProperties(ro.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}}}),ic.prototype.setDynamic=function(e){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?Tn:Pn),this},ic.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},Zu.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")},Zu.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")},Zu.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")},rc.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")},Ah.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this},Object.defineProperties(Pi.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new Ai}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=e===y}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(e){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=e}}}),Object.defineProperties(Eo.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}}}),$s.prototype.clearTarget=function(e,t,n,r){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(e),this.clear(t,n,r)},$s.prototype.animate=function(e){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(e)},$s.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},$s.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},$s.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},$s.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},$s.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},$s.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},$s.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},$s.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},$s.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},$s.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},$s.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},$s.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},$s.prototype.enableScissorTest=function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)},$s.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},$s.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},$s.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},$s.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},$s.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},$s.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},$s.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},$s.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},$s.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},$s.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()},Object.defineProperties($s.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(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(e){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=!0===e?Qt:Kt}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}}}),Object.defineProperties(Hs.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(rr.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}}}),fh.prototype.load=function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");const t=this;return(new Jf).load(e,(function(e){t.setBuffer(e)})),this},yh.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},Ao.prototype.updateCubeMap=function(e,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(e,t)},Ao.prototype.clear=function(e,t,n,r){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(e,t,n,r)},Jn.crossOrigin=void 0,Jn.loadTexture=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");const i=new Wl;i.setCrossOrigin(this.crossOrigin);const o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},Jn.loadTextureCube=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");const i=new Hl;i.setCrossOrigin(this.crossOrigin);const o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},Jn.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},Jn.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};const Ed={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};function zd(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")}"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:r}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=r)},52886:function(e,t,n){"use strict";n.d(t,{z:function(){return s}});var r=n(2212);const i={type:"change"},o={type:"start"},a={type:"end"};class s extends r.EventDispatcher{constructor(e,t){super(),void 0===t&&console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'),t===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.object=e,this.domElement=t,this.enabled=!0,this.target=new r.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:r.MOUSE.ROTATE,MIDDLE:r.MOUSE.DOLLY,RIGHT:r.MOUSE.PAN},this.touches={ONE:r.TOUCH.ROTATE,TWO:r.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return l.phi},this.getAzimuthalAngle=function(){return l.theta},this.listenToKeyEvents=function(e){e.addEventListener("keydown",V),this._domElementKeyEvents=e},this.saveState=function(){n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=function(){n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(i),n.update(),c=s.NONE},this.update=function(){const t=new r.Vector3,o=(new r.Quaternion).setFromUnitVectors(e.up,new r.Vector3(0,1,0)),a=o.clone().invert(),p=new r.Vector3,m=new r.Quaternion,y=2*Math.PI;return function(){const e=n.object.position;t.copy(e).sub(n.target),t.applyQuaternion(o),l.setFromVector3(t),n.autoRotate&&c===s.NONE&&P(2*Math.PI/60/60*n.autoRotateSpeed),n.enableDamping?(l.theta+=f.theta*n.dampingFactor,l.phi+=f.phi*n.dampingFactor):(l.theta+=f.theta,l.phi+=f.phi);let r=n.minAzimuthAngle,g=n.maxAzimuthAngle;return isFinite(r)&&isFinite(g)&&(r<-Math.PI?r+=y:r>Math.PI&&(r-=y),g<-Math.PI?g+=y:g>Math.PI&&(g-=y),l.theta=r<=g?Math.max(r,Math.min(g,l.theta)):l.theta>(r+g)/2?Math.max(r,l.theta):Math.min(g,l.theta)),l.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,l.phi)),l.makeSafe(),l.radius*=h,l.radius=Math.max(n.minDistance,Math.min(n.maxDistance,l.radius)),!0===n.enableDamping?n.target.addScaledVector(v,n.dampingFactor):n.target.add(v),t.setFromSpherical(l),t.applyQuaternion(a),e.copy(n.target).add(t),n.object.lookAt(n.target),!0===n.enableDamping?(f.theta*=1-n.dampingFactor,f.phi*=1-n.dampingFactor,v.multiplyScalar(1-n.dampingFactor)):(f.set(0,0,0),v.set(0,0,0)),h=1,!!(d||p.distanceToSquared(n.object.position)>u||8*(1-m.dot(n.object.quaternion))>u)&&(n.dispatchEvent(i),p.copy(n.object.position),m.copy(n.object.quaternion),d=!1,!0)}}(),this.dispose=function(){n.domElement.removeEventListener("contextmenu",Y),n.domElement.removeEventListener("pointerdown",B),n.domElement.removeEventListener("wheel",H),n.domElement.removeEventListener("touchstart",W),n.domElement.removeEventListener("touchend",q),n.domElement.removeEventListener("touchmove",Z),n.domElement.ownerDocument.removeEventListener("pointermove",G),n.domElement.ownerDocument.removeEventListener("pointerup",N),null!==n._domElementKeyEvents&&n._domElementKeyEvents.removeEventListener("keydown",V)};const n=this,s={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let c=s.NONE;const u=1e-6,l=new r.Spherical,f=new r.Spherical;let h=1;const v=new r.Vector3;let d=!1;const p=new r.Vector2,m=new r.Vector2,y=new r.Vector2,g=new r.Vector2,x=new r.Vector2,b=new r.Vector2,w=new r.Vector2,M=new r.Vector2,_=new r.Vector2;function S(){return Math.pow(.95,n.zoomSpeed)}function P(e){f.theta-=e}function T(e){f.phi-=e}const R=function(){const e=new r.Vector3;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),v.add(e)}}(),E=function(){const e=new r.Vector3;return function(t,r){!0===n.screenSpacePanning?e.setFromMatrixColumn(r,1):(e.setFromMatrixColumn(r,0),e.crossVectors(n.object.up,e)),e.multiplyScalar(t),v.add(e)}}(),z=function(){const e=new r.Vector3;return function(t,r){const i=n.domElement;if(n.object.isPerspectiveCamera){const o=n.object.position;e.copy(o).sub(n.target);let a=e.length();a*=Math.tan(n.object.fov/2*Math.PI/180),R(2*t*a/i.clientHeight,n.object.matrix),E(2*r*a/i.clientHeight,n.object.matrix)}else n.object.isOrthographicCamera?(R(t*(n.object.right-n.object.left)/n.object.zoom/i.clientWidth,n.object.matrix),E(r*(n.object.top-n.object.bottom)/n.object.zoom/i.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}}();function L(e){n.object.isPerspectiveCamera?h/=e:n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom*e)),n.object.updateProjectionMatrix(),d=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function C(e){n.object.isPerspectiveCamera?h*=e:n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/e)),n.object.updateProjectionMatrix(),d=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function A(e){p.set(e.clientX,e.clientY)}function O(e){g.set(e.clientX,e.clientY)}function D(e){if(1==e.touches.length)p.set(e.touches[0].pageX,e.touches[0].pageY);else{const t=.5*(e.touches[0].pageX+e.touches[1].pageX),n=.5*(e.touches[0].pageY+e.touches[1].pageY);p.set(t,n)}}function I(e){if(1==e.touches.length)g.set(e.touches[0].pageX,e.touches[0].pageY);else{const t=.5*(e.touches[0].pageX+e.touches[1].pageX),n=.5*(e.touches[0].pageY+e.touches[1].pageY);g.set(t,n)}}function k(e){const t=e.touches[0].pageX-e.touches[1].pageX,n=e.touches[0].pageY-e.touches[1].pageY,r=Math.sqrt(t*t+n*n);w.set(0,r)}function F(e){if(1==e.touches.length)m.set(e.touches[0].pageX,e.touches[0].pageY);else{const t=.5*(e.touches[0].pageX+e.touches[1].pageX),n=.5*(e.touches[0].pageY+e.touches[1].pageY);m.set(t,n)}y.subVectors(m,p).multiplyScalar(n.rotateSpeed);const t=n.domElement;P(2*Math.PI*y.x/t.clientHeight),T(2*Math.PI*y.y/t.clientHeight),p.copy(m)}function j(e){if(1==e.touches.length)x.set(e.touches[0].pageX,e.touches[0].pageY);else{const t=.5*(e.touches[0].pageX+e.touches[1].pageX),n=.5*(e.touches[0].pageY+e.touches[1].pageY);x.set(t,n)}b.subVectors(x,g).multiplyScalar(n.panSpeed),z(b.x,b.y),g.copy(x)}function U(e){const t=e.touches[0].pageX-e.touches[1].pageX,r=e.touches[0].pageY-e.touches[1].pageY,i=Math.sqrt(t*t+r*r);M.set(0,i),_.set(0,Math.pow(M.y/w.y,n.zoomSpeed)),L(_.y),w.copy(M)}function B(e){if(!1!==n.enabled)switch(e.pointerType){case"mouse":case"pen":!function(e){let t;switch(e.preventDefault(),n.domElement.focus?n.domElement.focus():window.focus(),e.button){case 0:t=n.mouseButtons.LEFT;break;case 1:t=n.mouseButtons.MIDDLE;break;case 2:t=n.mouseButtons.RIGHT;break;default:t=-1}switch(t){case r.MOUSE.DOLLY:if(!1===n.enableZoom)return;!function(e){w.set(e.clientX,e.clientY)}(e),c=s.DOLLY;break;case r.MOUSE.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enablePan)return;O(e),c=s.PAN}else{if(!1===n.enableRotate)return;A(e),c=s.ROTATE}break;case r.MOUSE.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enableRotate)return;A(e),c=s.ROTATE}else{if(!1===n.enablePan)return;O(e),c=s.PAN}break;default:c=s.NONE}c!==s.NONE&&(n.domElement.ownerDocument.addEventListener("pointermove",G),n.domElement.ownerDocument.addEventListener("pointerup",N),n.dispatchEvent(o))}(e)}}function G(e){if(!1!==n.enabled)switch(e.pointerType){case"mouse":case"pen":!function(e){if(!1!==n.enabled)switch(e.preventDefault(),c){case s.ROTATE:if(!1===n.enableRotate)return;!function(e){m.set(e.clientX,e.clientY),y.subVectors(m,p).multiplyScalar(n.rotateSpeed);const t=n.domElement;P(2*Math.PI*y.x/t.clientHeight),T(2*Math.PI*y.y/t.clientHeight),p.copy(m),n.update()}(e);break;case s.DOLLY:if(!1===n.enableZoom)return;!function(e){M.set(e.clientX,e.clientY),_.subVectors(M,w),_.y>0?L(S()):_.y<0&&C(S()),w.copy(M),n.update()}(e);break;case s.PAN:if(!1===n.enablePan)return;!function(e){x.set(e.clientX,e.clientY),b.subVectors(x,g).multiplyScalar(n.panSpeed),z(b.x,b.y),g.copy(x),n.update()}(e)}}(e)}}function N(e){switch(e.pointerType){case"mouse":case"pen":n.domElement.ownerDocument.removeEventListener("pointermove",G),n.domElement.ownerDocument.removeEventListener("pointerup",N),!1!==n.enabled&&(n.dispatchEvent(a),c=s.NONE)}}function H(e){!1===n.enabled||!1===n.enableZoom||c!==s.NONE&&c!==s.ROTATE||(e.preventDefault(),n.dispatchEvent(o),function(e){e.deltaY<0?C(S()):e.deltaY>0&&L(S()),n.update()}(e),n.dispatchEvent(a))}function V(e){!1!==n.enabled&&!1!==n.enablePan&&function(e){let t=!1;switch(e.code){case n.keys.UP:z(0,n.keyPanSpeed),t=!0;break;case n.keys.BOTTOM:z(0,-n.keyPanSpeed),t=!0;break;case n.keys.LEFT:z(n.keyPanSpeed,0),t=!0;break;case n.keys.RIGHT:z(-n.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),n.update())}(e)}function W(e){if(!1!==n.enabled){switch(e.preventDefault(),e.touches.length){case 1:switch(n.touches.ONE){case r.TOUCH.ROTATE:if(!1===n.enableRotate)return;D(e),c=s.TOUCH_ROTATE;break;case r.TOUCH.PAN:if(!1===n.enablePan)return;I(e),c=s.TOUCH_PAN;break;default:c=s.NONE}break;case 2:switch(n.touches.TWO){case r.TOUCH.DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;!function(e){n.enableZoom&&k(e),n.enablePan&&I(e)}(e),c=s.TOUCH_DOLLY_PAN;break;case r.TOUCH.DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;!function(e){n.enableZoom&&k(e),n.enableRotate&&D(e)}(e),c=s.TOUCH_DOLLY_ROTATE;break;default:c=s.NONE}break;default:c=s.NONE}c!==s.NONE&&n.dispatchEvent(o)}}function Z(e){if(!1!==n.enabled)switch(e.preventDefault(),c){case s.TOUCH_ROTATE:if(!1===n.enableRotate)return;F(e),n.update();break;case s.TOUCH_PAN:if(!1===n.enablePan)return;j(e),n.update();break;case s.TOUCH_DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;!function(e){n.enableZoom&&U(e),n.enablePan&&j(e)}(e),n.update();break;case s.TOUCH_DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;!function(e){n.enableZoom&&U(e),n.enableRotate&&F(e)}(e),n.update();break;default:c=s.NONE}}function q(e){!1!==n.enabled&&(n.dispatchEvent(a),c=s.NONE)}function Y(e){!1!==n.enabled&&e.preventDefault()}n.domElement.addEventListener("contextmenu",Y),n.domElement.addEventListener("pointerdown",B),n.domElement.addEventListener("wheel",H,{passive:!1}),n.domElement.addEventListener("touchstart",W,{passive:!1}),n.domElement.addEventListener("touchend",q),n.domElement.addEventListener("touchmove",Z,{passive:!1}),this.update()}}},48840:function(e,t,n){"use strict";n.d(t,{L:function(){return d}});var r=n(2212);const i=/^[og]\s*(.+)?/,o=/^mtllib /,a=/^usemtl /,s=/^usemap /,c=new r.Vector3,u=new r.Vector3,l=new r.Vector3,f=new r.Vector3,h=new r.Vector3;function v(){const e={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,t){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=!1!==t);const n=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:e||"",fromDeclaration:!1!==t,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(e,t){const n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);const r={index:this.materials.length,name:e||"",mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(e){const t={index:"number"==typeof e?e:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return t.clone=this.clone.bind(t),t}};return this.materials.push(r),r},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(e){const t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(let e=this.materials.length-1;e>=0;e--)this.materials[e].groupCount<=0&&this.materials.splice(e,1);return e&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),t}},n&&n.name&&"function"==typeof n.clone){const e=n.clone(0);e.inherited=!0,this.object.materials.push(e)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(e,t){const n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseNormalIndex:function(e,t){const n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseUVIndex:function(e,t){const n=parseInt(e,10);return 2*(n>=0?n-1:n+t/2)},addVertex:function(e,t,n){const r=this.vertices,i=this.object.geometry.vertices;i.push(r[e+0],r[e+1],r[e+2]),i.push(r[t+0],r[t+1],r[t+2]),i.push(r[n+0],r[n+1],r[n+2])},addVertexPoint:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addVertexLine:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addNormal:function(e,t,n){const r=this.normals,i=this.object.geometry.normals;i.push(r[e+0],r[e+1],r[e+2]),i.push(r[t+0],r[t+1],r[t+2]),i.push(r[n+0],r[n+1],r[n+2])},addFaceNormal:function(e,t,n){const r=this.vertices,i=this.object.geometry.normals;c.fromArray(r,e),u.fromArray(r,t),l.fromArray(r,n),h.subVectors(l,u),f.subVectors(c,u),h.cross(f),h.normalize(),i.push(h.x,h.y,h.z),i.push(h.x,h.y,h.z),i.push(h.x,h.y,h.z)},addColor:function(e,t,n){const r=this.colors,i=this.object.geometry.colors;void 0!==r[e]&&i.push(r[e+0],r[e+1],r[e+2]),void 0!==r[t]&&i.push(r[t+0],r[t+1],r[t+2]),void 0!==r[n]&&i.push(r[n+0],r[n+1],r[n+2])},addUV:function(e,t,n){const r=this.uvs,i=this.object.geometry.uvs;i.push(r[e+0],r[e+1]),i.push(r[t+0],r[t+1]),i.push(r[n+0],r[n+1])},addDefaultUV:function(){const e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){const t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])},addFace:function(e,t,n,r,i,o,a,s,c){const u=this.vertices.length;let l=this.parseVertexIndex(e,u),f=this.parseVertexIndex(t,u),h=this.parseVertexIndex(n,u);if(this.addVertex(l,f,h),this.addColor(l,f,h),void 0!==a&&""!==a){const e=this.normals.length;l=this.parseNormalIndex(a,e),f=this.parseNormalIndex(s,e),h=this.parseNormalIndex(c,e),this.addNormal(l,f,h)}else this.addFaceNormal(l,f,h);if(void 0!==r&&""!==r){const e=this.uvs.length;l=this.parseUVIndex(r,e),f=this.parseUVIndex(i,e),h=this.parseUVIndex(o,e),this.addUV(l,f,h),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type="Points";const t=this.vertices.length;for(let n=0,r=e.length;n<r;n++){const r=this.parseVertexIndex(e[n],t);this.addVertexPoint(r),this.addColor(r)}},addLineGeometry:function(e,t){this.object.geometry.type="Line";const n=this.vertices.length,r=this.uvs.length;for(let t=0,r=e.length;t<r;t++)this.addVertexLine(this.parseVertexIndex(e[t],n));for(let e=0,n=t.length;e<n;e++)this.addUVLine(this.parseUVIndex(t[e],r))}};return e.startObject("",!1),e}class d extends r.Loader{constructor(e){super(e),this.materials=null}load(e,t,n,i){const o=this,a=new r.FileLoader(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(function(n){try{t(o.parse(n))}catch(t){i?i(t):console.error(t),o.manager.itemError(e)}}),n,i)}setMaterials(e){return this.materials=e,this}parse(e){const t=new v;-1!==e.indexOf("\r\n")&&(e=e.replace(/\r\n/g,"\n")),-1!==e.indexOf("\\\n")&&(e=e.replace(/\\\n/g,""));const n=e.split("\n");let c="",u="",l=0,f=[];const h="function"==typeof"".trimLeft;for(let e=0,r=n.length;e<r;e++)if(c=n[e],c=h?c.trimLeft():c.trim(),l=c.length,0!==l&&(u=c.charAt(0),"#"!==u))if("v"===u){const e=c.split(/\s+/);switch(e[0]){case"v":t.vertices.push(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3])),e.length>=7?t.colors.push(parseFloat(e[4]),parseFloat(e[5]),parseFloat(e[6])):t.colors.push(void 0,void 0,void 0);break;case"vn":t.normals.push(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3]));break;case"vt":t.uvs.push(parseFloat(e[1]),parseFloat(e[2]))}}else if("f"===u){const e=c.substr(1).trim().split(/\s+/),n=[];for(let t=0,r=e.length;t<r;t++){const r=e[t];if(r.length>0){const e=r.split("/");n.push(e)}}const r=n[0];for(let e=1,i=n.length-1;e<i;e++){const i=n[e],o=n[e+1];t.addFace(r[0],i[0],o[0],r[1],i[1],o[1],r[2],i[2],o[2])}}else if("l"===u){const e=c.substring(1).trim().split(" ");let n=[];const r=[];if(-1===c.indexOf("/"))n=e;else for(let t=0,i=e.length;t<i;t++){const i=e[t].split("/");""!==i[0]&&n.push(i[0]),""!==i[1]&&r.push(i[1])}t.addLineGeometry(n,r)}else if("p"===u){const e=c.substr(1).trim().split(" ");t.addPointGeometry(e)}else if(null!==(f=i.exec(c))){const e=(" "+f[0].substr(1).trim()).substr(1);t.startObject(e)}else if(a.test(c))t.object.startMaterial(c.substring(7).trim(),t.materialLibraries);else if(o.test(c))t.materialLibraries.push(c.substring(7).trim());else if(s.test(c))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if("s"===u){if(f=c.split(" "),f.length>1){const e=f[1].trim().toLowerCase();t.object.smooth="0"!==e&&"off"!==e}else t.object.smooth=!0;const e=t.object.currentMaterial();e&&(e.smooth=t.object.smooth)}else{if("\0"===c)continue;console.warn('THREE.OBJLoader: Unexpected line: "'+c+'"')}t.finalize();const d=new r.Group;if(d.materialLibraries=[].concat(t.materialLibraries),!0==!(1===t.objects.length&&0===t.objects[0].geometry.vertices.length))for(let e=0,n=t.objects.length;e<n;e++){const n=t.objects[e],i=n.geometry,o=n.materials,a="Line"===i.type,s="Points"===i.type;let c=!1;if(0===i.vertices.length)continue;const u=new r.BufferGeometry;u.setAttribute("position",new r.Float32BufferAttribute(i.vertices,3)),i.normals.length>0&&u.setAttribute("normal",new r.Float32BufferAttribute(i.normals,3)),i.colors.length>0&&(c=!0,u.setAttribute("color",new r.Float32BufferAttribute(i.colors,3))),!0===i.hasUVIndices&&u.setAttribute("uv",new r.Float32BufferAttribute(i.uvs,2));const l=[];for(let e=0,n=o.length;e<n;e++){const n=o[e],i=n.name+"_"+n.smooth+"_"+c;let u=t.materials[i];if(null!==this.materials)if(u=this.materials.create(n.name),!a||!u||u instanceof r.LineBasicMaterial){if(s&&u&&!(u instanceof r.PointsMaterial)){const e=new r.PointsMaterial({size:10,sizeAttenuation:!1});r.Material.prototype.copy.call(e,u),e.color.copy(u.color),e.map=u.map,u=e}}else{const e=new r.LineBasicMaterial;r.Material.prototype.copy.call(e,u),e.color.copy(u.color),u=e}void 0===u&&(u=a?new r.LineBasicMaterial:s?new r.PointsMaterial({size:1,sizeAttenuation:!1}):new r.MeshPhongMaterial,u.name=n.name,u.flatShading=!n.smooth,u.vertexColors=c,t.materials[i]=u),l.push(u)}let f;if(l.length>1){for(let e=0,t=o.length;e<t;e++){const t=o[e];u.addGroup(t.groupStart,t.groupCount,e)}f=a?new r.LineSegments(u,l):s?new r.Points(u,l):new r.Mesh(u,l)}else f=a?new r.LineSegments(u,l[0]):s?new r.Points(u,l[0]):new r.Mesh(u,l[0]);f.name=n.name,d.add(f)}else if(t.vertices.length>0){const e=new r.PointsMaterial({size:1,sizeAttenuation:!1}),n=new r.BufferGeometry;n.setAttribute("position",new r.Float32BufferAttribute(t.vertices,3)),t.colors.length>0&&void 0!==t.colors[0]&&(n.setAttribute("color",new r.Float32BufferAttribute(t.colors,3)),e.vertexColors=!0);const i=new r.Points(n,e);d.add(i)}return d}}},42238:function(e,t,n){var r;!function(i,o){"use strict";var a="function",s="undefined",c="object",u="string",l="model",f="name",h="type",v="vendor",d="version",p="architecture",m="console",y="mobile",g="tablet",x="smarttv",b="wearable",w={extend:function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return typeof e===u&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return typeof e===u?e.replace(/[^\d\.]/g,"").split(".")[0]:o},trim:function(e,t){return e=e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),typeof t===s?e:e.substring(0,255)}},M={rgx:function(e,t){for(var n,r,i,s,u,l,f=0;f<t.length&&!u;){var h=t[f],v=t[f+1];for(n=r=0;n<h.length&&!u;)if(u=h[n++].exec(e))for(i=0;i<v.length;i++)l=u[++r],typeof(s=v[i])===c&&s.length>0?2==s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,l):this[s[0]]=s[1]:3==s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=l?l.replace(s[1],s[2]):o:this[s[0]]=l?s[1].call(this,l,s[2]):o:4==s.length&&(this[s[0]]=l?s[3].call(this,l.replace(s[1],s[2])):o):this[s]=l||o;f+=2}},str:function(e,t){for(var n in t)if(typeof t[n]===c&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(w.has(t[n][r],e))return"?"===n?o:n}else if(w.has(t[n],e))return"?"===n?o:n;return e}},_={browser:{oldSafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}},oldEdge:{version:{.1:"12.",21:"13.",31:"14.",39:"15.",41:"16.",42:"17.",44:"18."}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},S={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[f,"Chrome"]],[/(?:edgios|edga|edg)\/([\w\.]+)/i],[d,[f,"Edge"]],[/edge\/([\w\.]+)/i],[[d,M.str,_.browser.oldEdge.version],[f,"Edge"]],[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]{3,6})\b.+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[f,d],[/opios[\/\s]+([\w\.]+)/i],[d,[f,"Opera Mini"]],[/\sopr\/([\w\.]+)/i],[d,[f,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|instagram)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(ba?idubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i,/(rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([\w\.]+)/i,/(weibo)__([\d\.]+)/i],[f,d],[/(?:[\s\/]uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[d,[f,"UCBrowser"]],[/(?:windowswechat)?\sqbcore\/([\w\.]+)\b.*(?:windowswechat)?/i],[d,[f,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[d,[f,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[f,"Konqueror"]],[/trident.+rv[:\s]([\w\.]{1,9})\b.+like\sgecko/i],[d,[f,"IE"]],[/yabrowser\/([\w\.]+)/i],[d,[f,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[f,/(.+)/,"$1 Secure Browser"],d],[/focus\/([\w\.]+)/i],[d,[f,"Firefox Focus"]],[/opt\/([\w\.]+)/i],[d,[f,"Opera Touch"]],[/coc_coc_browser\/([\w\.]+)/i],[d,[f,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[f,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[f,"Opera Coast"]],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[d,[f,"MIUI Browser"]],[/fxios\/([\w\.-]+)/i],[d,[f,"Firefox"]],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[f,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[f,/(.+)/,"$1 Browser"],d],[/(comodo_dragon)\/([\w\.]+)/i],[[f,/_/g," "],d],[/m?(qqbrowser|baiduboxapp|2345Explorer)[\/\s]?([\w\.]+)/i],[f,d],[/(MetaSr)[\/\s]?([\w\.]+)/i,/(LBBROWSER)/i],[f],[/;fbav\/([\w\.]+);/i],[d,[f,"Facebook"]],[/FBAN\/FBIOS|FB_IAB\/FB4A/i],[[f,"Facebook"]],[/\s(electron)\/([\w\.]+)\ssafari/i,/safari\s(line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i],[f,d],[/\bgsa\/([\w\.]+)\s.*safari\//i],[d,[f,"GSA"]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[d,[f,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[f,"Chrome WebView"],d],[/droid.+\sversion\/([\w\.]+)\b.+(?:mobile\ssafari|safari)/i],[d,[f,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[f,d],[/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i],[d,[f,"Mobile Safari"]],[/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i],[d,f],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[f,[d,M.str,_.browser.oldSafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[f,d],[/(navigator|netscape)\/([\w\.-]+)/i],[[f,"Netscape"],d],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i,/(mozilla)\/([\w\.]+)\s.+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[f,d]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,w.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/\b(aarch64|armv?8e?l?)\b/i],[[p,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/windows\s(ce|mobile);\sppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[p,/ower/,"",w.lowerize]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?:64|(?=v(?:[1-7]|[5-7]1)l?|;|eabi))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[p,w.lowerize]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-p(?:605|610|587)|sm-t\w+|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus\s10)/i],[l,[v,"Samsung"],[h,g]],[/(s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+)/i,/\ssamsung[\s-]([\w-]+)/i,/sec-(sgh\w+)/i],[l,[v,"Samsung"],[h,y]],[/\((ip(?:hone|od)[\s\w]*);/i],[l,[v,"Apple"],[h,y]],[/\((ipad);[\w\s\),;-]+(apple)/i],[l,v,[h,g]],[/applecoremedia\/[\w\.]+\s\((ipad)/i],[l,[v,"Apple"],[h,g]],[/d\/huawei([\w\s-]+)[;\)]/i,/\b(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?|ele-l\d\d)/i,/\b(\w{2,4}-[atu][ln][01259][019])[;\)\s]/i],[l,[v,"Huawei"],[h,y]],[/\b(bah2?-a?[lw]\d{2})/i],[l,[v,"Huawei"],[h,g]],[/\b(poco[\s\w]+)(?:\sbuild|\))/i,/\b;\s(\w+)\s+build\/hm\1/i,/\b(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i,/\b(redmi[\s\-_]?(?:note|k)?[\w\s_]+)(?:\sbuild|\))/i,/\b(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i],[[l,/_/g," "],[v,"Xiaomi"],[h,y]],[/\b(mi[\s\-_]?(?:pad)(?:[\w\s_]+))(?:\sbuild|\))/i],[[l,/_/g," "],[v,"Xiaomi"],[h,g]],[/;\s(\w+)\sbuild.+\soppo/i,/\s(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i],[l,[v,"OPPO"],[h,y]],[/\svivo\s(\w+)(?:\sbuild|\))/i,/\s(v[12]\d{3}\w?[at])(?:\sbuild|;)/i],[l,[v,"Vivo"],[h,y]],[/\s(rmx[12]\d{3})(?:\sbuild|;)/i],[l,[v,"Realme"],[h,y]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)\b[\w\s]+build\//i,/\smot[\s-](\w*)/i,/(moto[\s\w\(\)]+(?=\sbuild|\)))/i,/(xt\d{3,4})\sbuild\//i,/(nexus\s6)/i],[l,[v,"Motorola"],[h,y]],[/\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[l,[v,"Motorola"],[h,g]],[/((?=lg)?[vl]k\-?\d{3})\s+build|\s3\.[\s\w;-]{10}lg?-([06cv9]{3,4})/i],[l,[v,"LG"],[h,g]],[/(nexus\s[45])/i,/lg[e;\s\/-]+((?!browser|netcast)\w+)/i,/\blg(\-?[\d\w]+)\s+build/i],[l,[v,"LG"],[h,y]],[/(ideatab[\w\-\s]+)/i,/lenovo\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+)|[\w-]+)/i],[l,[v,"Lenovo"],[h,g]],[/(?:maemo|nokia).*(n900|lumia\s\d+)/i,/nokia[\s_-]?([\w\.-]*)/i],[l,[v,"Nokia"],[h,y]],[/droid.+;\s(pixel\sc)[\s)]/i],[l,[v,"Google"],[h,g]],[/droid.+;\s(pixel[\s\daxl]{0,6})(?:\sbuild|\))/i],[l,[v,"Google"],[h,y]],[/droid.+\s([c-g]\d{4}|so[-l]\w+|xq-a\w[4-7][12])(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[v,"Sony"],[h,y]],[/sony\stablet\s[ps]\sbuild\//i,/(?:sony)?sgp\w+(?:\sbuild\/|\))/i],[[l,"Xperia Tablet"],[v,"Sony"],[h,g]],[/\s(kb2005|in20[12]5|be20[12][59])\b/i,/\ba000(1)\s+build/i,/\boneplus\s(a\d{4})[\s)]/i],[l,[v,"OnePlus"],[h,y]],[/(alexa)webm/i,/(kf[a-z]+)(\sbuild\/|\)).+silk\//i],[l,[v,"Amazon"],[h,g]],[/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i],[[l,"Fire Phone"],[v,"Amazon"],[h,y]],[/\((playbook);[\w\s\),;-]+(rim)/i],[l,v,[h,g]],[/\(bb10;\s(\w+)/i],[l,[v,"BlackBerry"],[h,y]],[/\b(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus\s7|padfone|p00c)/i],[l,[v,"ASUS"],[h,g]],[/\s(z[es]6[027][01][km][ls]|zenfone\s\d\w?)\b/i],[l,[v,"ASUS"],[h,y]],[/(nexus\s9)/i],[l,[v,"HTC"],[h,g]],[/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[v,[l,/_/g," "],[h,y]],[/droid[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[l,[v,"Acer"],[h,g]],[/droid.+;\s(m[1-5]\snote)\sbuild/i,/\bmz-([\w-]{2,})/i],[l,[v,"Meizu"],[h,y]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i,/(microsoft);\s(lumia[\s\w]+)/i,/(lenovo)[_\s-]?([\w-]+)/i,/linux;.+(jolla);/i,/droid.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[v,l,[h,y]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i,/[;\/]\s?(le[\s\-]+pan)[\s\-]+(\w{1,9})\sbuild/i,/[;\/]\s?(trinity)[\-\s]*(t\d{3})\sbuild/i,/\b(gigaset)[\s\-]+(q\w{1,9})\sbuild/i,/\b(vodafone)\s([\w\s]+)(?:\)|\sbuild)/i],[v,l,[h,g]],[/\s(surface\sduo)\s/i],[l,[v,"Microsoft"],[h,g]],[/\s(u304aa)\sbuild/i],[l,[v,"AT&T"],[h,y]],[/sie-(\w*)/i],[l,[v,"Siemens"],[h,y]],[/[;\/]\s?(rct\w+)\sbuild/i],[l,[v,"RCA"],[h,g]],[/[;\/\s](venue[\d\s]{2,7})\sbuild/i],[l,[v,"Dell"],[h,g]],[/[;\/]\s?(q(?:mv|ta)\w+)\sbuild/i],[l,[v,"Verizon"],[h,g]],[/[;\/]\s(?:barnes[&\s]+noble\s|bn[rt])([\w\s\+]*)\sbuild/i],[l,[v,"Barnes & Noble"],[h,g]],[/[;\/]\s(tm\d{3}\w+)\sbuild/i],[l,[v,"NuVision"],[h,g]],[/;\s(k88)\sbuild/i],[l,[v,"ZTE"],[h,g]],[/;\s(nx\d{3}j)\sbuild/i],[l,[v,"ZTE"],[h,y]],[/[;\/]\s?(gen\d{3})\sbuild.*49h/i],[l,[v,"Swiss"],[h,y]],[/[;\/]\s?(zur\d{3})\sbuild/i],[l,[v,"Swiss"],[h,g]],[/[;\/]\s?((zeki)?tb.*\b)\sbuild/i],[l,[v,"Zeki"],[h,g]],[/[;\/]\s([yr]\d{2})\sbuild/i,/[;\/]\s(dragon[\-\s]+touch\s|dt)(\w{5})\sbuild/i],[[v,"Dragon Touch"],l,[h,g]],[/[;\/]\s?(ns-?\w{0,9})\sbuild/i],[l,[v,"Insignia"],[h,g]],[/[;\/]\s?((nxa|Next)-?\w{0,9})\sbuild/i],[l,[v,"NextBook"],[h,g]],[/[;\/]\s?(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05]))\sbuild/i],[[v,"Voice"],l,[h,y]],[/[;\/]\s?(lvtel\-)?(v1[12])\sbuild/i],[[v,"LvTel"],l,[h,y]],[/;\s(ph-1)\s/i],[l,[v,"Essential"],[h,y]],[/[;\/]\s?(v(100md|700na|7011|917g).*\b)\sbuild/i],[l,[v,"Envizen"],[h,g]],[/[;\/]\s?(trio[\s\w\-\.]+)\sbuild/i],[l,[v,"MachSpeed"],[h,g]],[/[;\/]\s?tu_(1491)\sbuild/i],[l,[v,"Rotor"],[h,g]],[/(shield[\w\s]+)\sbuild/i],[l,[v,"Nvidia"],[h,g]],[/(sprint)\s(\w+)/i],[v,l,[h,y]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[v,"Microsoft"],[h,y]],[/droid\s[\d\.]+;\s(cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[v,"Zebra"],[h,g]],[/droid\s[\d\.]+;\s(ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[v,"Zebra"],[h,y]],[/\s(ouya)\s/i,/(nintendo)\s([wids3utch]+)/i],[v,l,[h,m]],[/droid.+;\s(shield)\sbuild/i],[l,[v,"Nvidia"],[h,m]],[/(playstation\s[345portablevi]+)/i],[l,[v,"Sony"],[h,m]],[/[\s\(;](xbox(?:\sone)?(?!;\sxbox))[\s\);]/i],[l,[v,"Microsoft"],[h,m]],[/smart-tv.+(samsung)/i],[v,[h,x],l],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[v,"Samsung"],[h,x]],[/linux;\snetcast.+smarttv/i,/lg\snetcast\.tv-201\d/i],[[v,"LG"],l,[h,x]],[/(apple)\s?tv/i],[v,[l,"Apple TV"],[h,x]],[/crkey/i],[[l,"Chromecast"],[v,"Google"],[h,x]],[/droid.+aft([\w])(\sbuild\/|\))/i],[l,[v,"Amazon"],[h,x]],[/\(dtv[\);].+(aquos)/i],[l,[v,"Sharp"],[h,x]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[v,w.trim],[l,w.trim],[h,x]],[/[\s\/\(](android\s|smart[-\s]?|opera\s)tv[;\)\s]/i],[[h,x]],[/((pebble))app\/[\d\.]+\s/i],[v,l,[h,b]],[/droid.+;\s(glass)\s\d/i],[l,[v,"Google"],[h,b]],[/droid\s[\d\.]+;\s(wt63?0{2,3})\)/i],[l,[v,"Zebra"],[h,b]],[/droid .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i],[l,[h,y]],[/droid .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i],[l,[h,g]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[h,w.lowerize]],[/(android[\w\.\s\-]{0,9});.+build/i],[l,[v,"Generic"]],[/(phone)/i],[[h,y]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[d,[f,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[f,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[f,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,f]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[f,d],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)(?!.+xbox)/i],[f,[d,M.str,_.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[f,"Windows"],[d,M.str,_.os.windows.version]],[/ip[honead]{2,4}\b(?:.*os\s([\w]+)\slike\smac|;\sopera)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[f,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)(?!.+haiku)/i],[[f,"Mac OS"],[d,/_/g,"."]],[/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i],[f,d],[/\(bb(10);/i],[d,[f,"BlackBerry"]],[/(?:symbian\s?os|symbos|s60(?=;)|series60)[\/\s-]?([\w\.]*)/i],[d,[f,"Symbian"]],[/\((series40);/i],[f],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[f,"Firefox OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[f,"webOS"]],[/crkey\/([\d\.]+)/i],[d,[f,"Chromecast"]],[/(nintendo|playstation)\s([wids345portablevuch]+)/i,/(xbox);\s+xbox\s([^\);]+)/i,/(mint)[\/\s\(\)]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?=\slinux)|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus|raspbian)(?:\sgnu\/linux)?(?:\slinux)?[\/\s-]?(?!chrom|package)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[f,d],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[f,"Chromium OS"],d],[/(sunos)\s?([\w\.\d]*)/i],[[f,"Solaris"],d],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?(?!amd|[ix346]{1,2}86)([\w\.]*)/i],[f,d],[/(haiku)\s(\w+)/i],[f,d],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[f,d]]},P=function(e,t){if("object"==typeof e&&(t=e,e=o),!(this instanceof P))return new P(e,t).getResult();var n=e||(void 0!==i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),r=t?w.extend(S,t):S;return this.getBrowser=function(){var e={name:o,version:o};return M.rgx.call(e,n,r.browser),e.major=w.major(e.version),e},this.getCPU=function(){var e={architecture:o};return M.rgx.call(e,n,r.cpu),e},this.getDevice=function(){var e={vendor:o,model:o,type:o};return M.rgx.call(e,n,r.device),e},this.getEngine=function(){var e={name:o,version:o};return M.rgx.call(e,n,r.engine),e},this.getOS=function(){var e={name:o,version:o};return M.rgx.call(e,n,r.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=e.length>255?w.trim(e,255):e,this},this.setUA(n),this};P.VERSION="0.7.26",P.BROWSER={NAME:f,MAJOR:"major",VERSION:d},P.CPU={ARCHITECTURE:p},P.DEVICE={MODEL:l,VENDOR:v,TYPE:h,CONSOLE:m,MOBILE:y,SMARTTV:x,TABLET:g,WEARABLE:b,EMBEDDED:"embedded"},P.ENGINE={NAME:f,VERSION:d},P.OS={NAME:f,VERSION:d},typeof t!==s?(e.exports&&(t=e.exports=P),t.UAParser=P):(r=function(){return P}.call(t,n,t,e))===o||(e.exports=r);var T=void 0!==i&&(i.jQuery||i.Zepto);if(T&&!T.ua){var R=new P;T.ua=R.getResult(),T.ua.get=function(){return R.getUA()},T.ua.set=function(e){R.setUA(e);var t=R.getResult();for(var n in t)T.ua[n]=t[n]}}}("object"==typeof window?window:this)}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){n(26981);var e=n(60287).Z,t=document.querySelector(".l-page").dataset.id;if("index"==t)n(78948).Z();else{var r=document.getElementById("canvas-webgl");switch(r.addEventListener("contextmenu",(function(e){e.preventDefault()})),r.addEventListener("selectstart",(function(e){e.preventDefault()})),t){case"water":n(31547).Z();break;case"glass":n(77010).Z();break;case"fire_ball_2":n(14449).Z();break;case"flow_field_5":n(53312).Z();break;case"flow_field_4":n(87389).Z();break;case"flow_field_3":n(76837).Z();break;case"flow_field_2":n(86139).Z();break;case"flow_field":n(95185).Z();break;case"skull":n(29355).Z();break;case"aura":n(88811).Z();break;case"shadow":n(68993).Z();break;case"splash":n(17194).Z();break;case"burn":n(97018).Z();break;case"crystal":n(44428).Z();break;case"node":n(87420).Z();break;case"sun":n(4055).Z();break;case"easy_glitch":n(61954).Z();break;case"dissolve":n(37175).Z();break;case"dna":n(67687).Z();break;case"newyear2019":n(56600).Z();break;case"buddha":n(54614).Z();break;case"planet":n(13532).Z();break;case"land":n(1867).Z();break;case"webcam":n(89643).Z();break;case"fog":n(27751).Z();break;case"node_text":n(49363).Z();break;case"repel":n(8141).Z();break;case"flame":n(86918).Z();break;case"cyberspace":n(57262).Z();break;case"beam":n(45032).Z();break;case"blink":n(75255).Z();break;case"transform":n(82158).Z();break;case"egg":n(59895).Z();break;case"butterfly":n(58238).Z();break;case"puddle":n(18388).Z();break;case"reel":n(39990).Z();break;case"glitch":n(49275).Z();break;case"instancing":n(15758).Z();break;case"particle":n(73552).Z();break;case"attract":n(22732).Z();break;case"hole":n(97531).Z();break;case"metal_cube":n(73262).Z();break;case"distort":n(19963).Z();break;case"image_data":n(91614).Z();break;case"gallery":n(95432).Z();break;case"comet":n(87848).Z();break;case"hyper_space":n(4625).Z();break;case"fire_ball":n(56160).Z()}}e()}()}();