diff --git a/public/assets/images/cube_logo.jpeg b/public/assets/images/cube_logo.jpeg new file mode 100644 index 0000000..8e8077d Binary files /dev/null and b/public/assets/images/cube_logo.jpeg differ diff --git a/public/the-cube-master/.gitignore b/public/the-cube-master/.gitignore new file mode 100644 index 0000000..ed1051b --- /dev/null +++ b/public/the-cube-master/.gitignore @@ -0,0 +1,6 @@ +.DS_Store +node_modules/ + +*.sublime-workspace + +export/ \ No newline at end of file diff --git a/public/the-cube-master/Cube.sublime-project b/public/the-cube-master/Cube.sublime-project new file mode 100644 index 0000000..a5df2c5 --- /dev/null +++ b/public/the-cube-master/Cube.sublime-project @@ -0,0 +1,36 @@ +{ + "build_systems": + [ + { + "file_patterns": + [ + "*.js" + ], + "name": "Rollup", + "shell_cmd": "rollup -c rollup.config.dev.js", + "working_dir": "${project_path}" + }, + { + "cmd": "$file", + "file_patterns": + [ + "*.scss" + ], + "name": "Libsass", + "target": "compile_sass", + "working_dir": "${project_path}" + } + ], + "folders": + [ + { + "path": "." + }, + { + "path": "/Users/boris/Desktop/the-cube-codepen" + } + ], + "settings": + { + } +} diff --git a/public/the-cube-master/assets/css/styles.css b/public/the-cube-master/assets/css/styles.css new file mode 100644 index 0000000..318061e --- /dev/null +++ b/public/the-cube-master/assets/css/styles.css @@ -0,0 +1 @@ +@font-face{font-family:'BungeeFont';font-weight:normal;font-style:normal;src:url("data:font/truetype;charset=utf-8;base64,d09GMgABAAAAACZQABIAAAAAbvQAACXoAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGh4byGIcgW4GYACDGghQCYRlEQgK7wjfAAuBRgABNgIkA4MIBCAFjGMHgw8MgjEb5WQV7NgLbgekMv6v8igENg5QCMa7I6pI6dn/H4+TI6pRucF/LYhNhovYtD4Krf6ybd4KjulSyDi2HjZEfrfyKtpdSpVGjIdn5NaN1SqtTduTgy2PuDLWjMCudfVcZNajE5NFViltnAyHDz5aQY/9KIf/iFKqiMiiy08NsWuNHaGxT3Kteqdfj2SU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+Q9xvoHeTx9Zon2uH2H2dLgGnS9iP6AO8Xeyqnts4zy0NS51aYahOs6L7Vjh/ujzbb0W/W9jtPWrg7BeB9RX0XKuMe5hR3OC3BjrWURRllzXsGk7QAjZt0LAB+Dto75H6b6AjnHqTTnHmbfqYPgc1VQayS9/TUzr+H7peH0IAAAAAAQAAAADV7UW4AAAAANLWvmEAAAAA2AKNFg==") format("woff")}*,*:before,*:after{-webkit-user-select:none;-moz-user-select:none;user-select:none;box-sizing:border-box;cursor:inherit;margin:0;padding:0;outline:none;font-size:inherit;font-family:inherit;font-weight:inherit;font-style:inherit;text-transform:uppercase}*:focus{outline:none}html{-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;overflow:hidden;height:100%}body{font-family:'BungeeFont', sans-serif;font-weight:normal;font-style:normal;line-height:1;cursor:default;overflow:hidden;height:100%;font-size:5rem}.icon{display:inline-block;font-size:inherit;overflow:visible;vertical-align:-0.125em;preserveAspectRatio:none}.range{position:relative;width:14em;z-index:1;opacity:0}.range:not(:last-child){margin-bottom:2em}.range__label{position:relative;font-size:0.9em;line-height:0.75em;padding-bottom:0.5em;z-index:2}.range__track{position:relative;height:1em;margin-left:0.5em;margin-right:0.5em;z-index:3}.range__track-line{position:absolute;background:rgba(0,0,0,0.2);height:2px;top:50%;margin-top:-1px;left:-0.5em;right:-0.5em;transform-origin:left center}.range__handle{position:absolute;width:0;height:0;top:50%;left:0;cursor:pointer;z-index:1}.range__handle div{transition:background 500ms ease;position:absolute;left:0;top:0;width:0.9em;height:0.9em;border-radius:0.2em;margin-left:-0.45em;margin-top:-0.45em;background:#41aac8;border-bottom:2px solid rgba(0,0,0,0.2)}.range.is-active .range__handle div{transform:scale(1.25)}.range__handle:after{content:'';position:absolute;left:0;top:0;width:3em;height:3em;margin-left:-1.5em;margin-top:-1.5em}.range__list{display:flex;flex-flow:row nowrap;justify-content:space-between;position:relative;padding-top:0.5em;font-size:0.55em;color:rgba(0,0,0,0.5);z-index:1}.range--type-color:not(:last-child){margin-bottom:1em}.range--type-color .range__list{display:none}.range--type-color .range__handle>div{background:currentColor !important}.range--type-color .range__track-line{background:transparent}.range--type-color .range__track-line:after{position:absolute;top:0;left:0;right:0;bottom:0;content:'';opacity:0.5}.range--color-hue .range__handle{color:red}.range--color-hue .range__track{color:red}.range--color-hue .range__track-line:after{background:linear-gradient(to right, red, #ff0, lime, cyan, blue, #f0f, red)}.range--color-saturation .range__handle{color:red}.range--color-saturation .range__track{color:red}.range--color-saturation .range__track-line:after{background:linear-gradient(to right, gray, currentColor)}.range--color-lightness .range__handle{color:red}.range--color-lightness .range__track{color:red}.range--color-lightness .range__track-line:after{background:linear-gradient(to right, #000, currentColor, #fff)}.stats{position:relative;width:14em;z-index:1;display:flex;justify-content:space-between;opacity:0}.stats:not(:last-child){margin-bottom:1.5em}.stats>i{display:block;color:rgba(0,0,0,0.5);font-size:0.9em}.stats>b{display:block;font-size:0.9em}.stats>b>i{font-size:0.75em}.stats[name="worst-time"]{display:none}.text{position:absolute;left:0;right:0;text-align:center;line-height:0.75;perspective:100rem;opacity:0}.text i{display:inline-block;opacity:0;white-space:pre-wrap}.text--title{bottom:75%;font-size:4.4em;height:1.2em}.text--title span{display:block}.text--title span:first-child{font-size:0.5em;margin-bottom:0.2em}.text--note{top:87%;font-size:1em}.text--timer{bottom:78%;font-size:3.5em;line-height:1}.text--complete,.text--best-time{font-size:1.5em;top:83%;line-height:1em}.btn{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border-radius:0;border-width:0;position:absolute;pointer-events:none;font-size:1.2em;color:rgba(0,0,0,0.25);opacity:0}.btn:after{position:absolute;content:'';width:3em;height:3em;left:50%;top:50%;margin-left:-1.5em;margin-top:-1.5em;border-radius:100%}.btn--tr{top:0.8em;right:0.8em}.btn--tl{top:0.8em;left:0.8em}.btn--bl{bottom:0.8em;left:0.8em}.btn--br{bottom:0.8em;right:0.8em}.btn--bc{bottom:0.8em;left:calc(50% - 0.5em)}.btn svg{display:block}.ui{pointer-events:none;color:#070d15}.ui,.ui__background,.ui__game,.ui__texts,.ui__prefs,.ui__theme,.ui__stats,.ui__buttons{position:absolute;top:0;left:0;right:0;bottom:0;overflow:hidden}.ui__background{z-index:1;transition:background 500ms ease;background:#d1d5db}.ui__background:after{position:absolute;top:0;left:0;right:0;bottom:0;content:'';background-image:linear-gradient(to bottom, #fff 50%, rgba(255,255,255,0) 100%)}.ui__game{pointer-events:all;z-index:2}.ui__game canvas{display:block;width:100%;height:100%}.ui__texts{z-index:3}.ui__prefs,.ui__stats,.ui__theme{display:flex;flex-flow:column nowrap;justify-content:center;align-items:center;overflow:hidden;z-index:4}.ui__theme{padding-top:15em}.ui__buttons{z-index:5} diff --git a/public/the-cube-master/assets/icons/android-chrome-192x192.png b/public/the-cube-master/assets/icons/android-chrome-192x192.png new file mode 100644 index 0000000..2235941 Binary files /dev/null and b/public/the-cube-master/assets/icons/android-chrome-192x192.png differ diff --git a/public/the-cube-master/assets/icons/android-chrome-512x512.png b/public/the-cube-master/assets/icons/android-chrome-512x512.png new file mode 100644 index 0000000..4a19efb Binary files /dev/null and b/public/the-cube-master/assets/icons/android-chrome-512x512.png differ diff --git a/public/the-cube-master/assets/icons/apple-touch-icon.png b/public/the-cube-master/assets/icons/apple-touch-icon.png new file mode 100644 index 0000000..380ac01 Binary files /dev/null and b/public/the-cube-master/assets/icons/apple-touch-icon.png differ diff --git a/public/the-cube-master/assets/icons/browserconfig.xml b/public/the-cube-master/assets/icons/browserconfig.xml new file mode 100644 index 0000000..bfefbbf --- /dev/null +++ b/public/the-cube-master/assets/icons/browserconfig.xml @@ -0,0 +1,9 @@ + + + + + + #da532c + + + diff --git a/public/the-cube-master/assets/icons/favicon-16x16.png b/public/the-cube-master/assets/icons/favicon-16x16.png new file mode 100644 index 0000000..a53b75e Binary files /dev/null and b/public/the-cube-master/assets/icons/favicon-16x16.png differ diff --git a/public/the-cube-master/assets/icons/favicon-32x32.png b/public/the-cube-master/assets/icons/favicon-32x32.png new file mode 100644 index 0000000..f9ce574 Binary files /dev/null and b/public/the-cube-master/assets/icons/favicon-32x32.png differ diff --git a/public/the-cube-master/assets/icons/favicon.ico b/public/the-cube-master/assets/icons/favicon.ico new file mode 100644 index 0000000..6c6c73f Binary files /dev/null and b/public/the-cube-master/assets/icons/favicon.ico differ diff --git a/public/the-cube-master/assets/icons/meta-image.png b/public/the-cube-master/assets/icons/meta-image.png new file mode 100644 index 0000000..f24eb21 Binary files /dev/null and b/public/the-cube-master/assets/icons/meta-image.png differ diff --git a/public/the-cube-master/assets/icons/mstile-150x150.png b/public/the-cube-master/assets/icons/mstile-150x150.png new file mode 100644 index 0000000..5aa2424 Binary files /dev/null and b/public/the-cube-master/assets/icons/mstile-150x150.png differ diff --git a/public/the-cube-master/assets/icons/safari-pinned-tab.svg b/public/the-cube-master/assets/icons/safari-pinned-tab.svg new file mode 100644 index 0000000..741ec36 --- /dev/null +++ b/public/the-cube-master/assets/icons/safari-pinned-tab.svg @@ -0,0 +1,39 @@ + + + + +Created by potrace 1.11, written by Peter Selinger 2001-2013 + + + + + diff --git a/public/the-cube-master/assets/icons/site.webmanifest b/public/the-cube-master/assets/icons/site.webmanifest new file mode 100644 index 0000000..d2abefd --- /dev/null +++ b/public/the-cube-master/assets/icons/site.webmanifest @@ -0,0 +1,19 @@ +{ + "name": "The Cube", + "short_name": "The Cube", + "icons": [ + { + "src": "android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +} diff --git a/public/the-cube-master/assets/icons/twitter-card.png b/public/the-cube-master/assets/icons/twitter-card.png new file mode 100644 index 0000000..c2bead0 Binary files /dev/null and b/public/the-cube-master/assets/icons/twitter-card.png differ diff --git a/public/the-cube-master/assets/js/cube.js b/public/the-cube-master/assets/js/cube.js new file mode 100644 index 0000000..dc332b8 --- /dev/null +++ b/public/the-cube-master/assets/js/cube.js @@ -0,0 +1 @@ +(function(){'use strict';function e(e,t,o){function a(){for(var e=Math.cos,a=[new THREE.Vector3(1,1,1),new THREE.Vector3(1,1,-1),new THREE.Vector3(-1,1,-1),new THREE.Vector3(-1,1,1),new THREE.Vector3(1,-1,1),new THREE.Vector3(1,-1,-1),new THREE.Vector3(-1,-1,-1),new THREE.Vector3(-1,-1,1)],s=0;8>s;s++)C.push([]),L.push([]);for(var r=i/2,l=new THREE.Vector3(b,f,z),c=0;c<=o;c++){var m=c/o,d=m*r,g=e(d),p=n(d);if(c==o){M.set(0,1,0);var h=M.clone().multiplyScalar(t).add(l);C[0].push(h),A.push(h);var v=M.clone();L[0].push(v),E.push(v);continue}for(var S=0;S<=o;S++){var w=S/o,u=w*r;M.x=g*e(u),M.y=p,M.z=g*n(u);var h=M.clone().multiplyScalar(t).add(l);C[0].push(h),A.push(h);var v=M.clone().normalize();L[0].push(v),E.push(v)}}for(var T=1;8>T;T++)for(var h,s=0;sr;r++){e=_*r;for(var n=0;ne;e++)for(var t=e*_,s=4*_+t,r=!0&e,n=0;ns;s++)for(var r=_*e[s],n=_*t[s],l=1>=s,m=0;mn;n++)for(var l=t[n]*_,m=s[n]*_,g=0;g<=e;g++){var p=l+o+g*x,a=l+(g==e?_-1:o+(g+1)*x),h=m+o+g*x,c=m+(g==e?_-1:o+(g+1)*x);r[n]?(P.push(p),P.push(h),P.push(a),P.push(a),P.push(h),P.push(c)):(P.push(p),P.push(a),P.push(h),P.push(a),P.push(c),P.push(h))}}THREE.BufferGeometry.call(this),this.type='RoundedBoxGeometry',o=isNaN(o)?1:c(1,d(o));var p,h,y;p=h=y=e,t=e*t,t=l(t,l(p,l(h,l(y)))/2);var b=p/2-t,f=h/2-t,z=y/2-t;this.parameters={width:p,height:h,depth:y,radius:t,radiusSegments:o};var x=o+1,v=x*o+1<<3,S=new THREE.BufferAttribute(new Float32Array(3*v),3),w=new THREE.BufferAttribute(new Float32Array(3*v),3),C=[],L=[],T=new THREE.Vector3,M=new THREE.Vector3,A=[],E=[],P=[],D=x*o,_=x*o+1;a(),r(),s(),m(),g(),u();for(var k=0,V=0;V{let e=0;return new class{constructor(){this.ids=[],this.animations={},this.update=this.update.bind(this),this.raf=0,this.time=0}update(){const e=performance.now(),t=e-this.time;this.time=e;let a=this.ids.length;for(this.raf=a?requestAnimationFrame(this.update):0;a--;)this.animations[this.ids[a]]&&this.animations[this.ids[a]].update(t)}add(t){t.id=e++,this.ids.push(t.id),this.animations[t.id]=t;0!==this.raf||(this.time=performance.now(),this.raf=requestAnimationFrame(this.update))}remove(e){const t=this.ids.indexOf(e.id);0>t||(this.ids.splice(t,1),delete this.animations[e.id],e=null)}}})();class g{constructor(e){!0===e&&this.start()}start(){u.add(this)}stop(){u.remove(this)}update(){}}class p extends g{constructor(e){super(!0),this.game=e,this.container=this.game.dom.game,this.scene=new THREE.Scene,this.renderer=new THREE.WebGLRenderer({antialias:!0,alpha:!0}),this.renderer.setPixelRatio(window.devicePixelRatio),this.container.appendChild(this.renderer.domElement),this.camera=new THREE.PerspectiveCamera(2,1,.1,1e4),this.stage={width:2,height:3},this.fov=10,this.createLights(),this.onResize=[],this.resize(),window.addEventListener('resize',()=>this.resize(),!1)}update(){this.renderer.render(this.scene,this.camera)}resize(){this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,this.renderer.setSize(this.width,this.height),this.camera.fov=this.fov,this.camera.aspect=this.width/this.height;const e=this.stage.width/this.stage.height,t=this.fov*THREE.Math.DEG2RAD;let a=ee())}createLights(){this.lights={holder:new THREE.Object3D,ambient:new THREE.AmbientLight(16777215,.69),front:new THREE.DirectionalLight(16777215,.36),back:new THREE.DirectionalLight(16777215,.19)},this.lights.front.position.set(1.5,5,3),this.lights.back.position.set(-1.5,-5,-3),this.lights.holder.add(this.lights.ambient),this.lights.holder.add(this.lights.front),this.lights.holder.add(this.lights.back),this.scene.add(this.lights.holder)}}e.prototype=Object.create(THREE.BufferGeometry.prototype),e.constructor=e;class h{constructor(e){this.game=e,this.size=3,this.geometry={pieceCornerRadius:.12,edgeCornerRoundness:.15,edgeScale:.82,edgeDepth:.01},this.holder=new THREE.Object3D,this.object=new THREE.Object3D,this.animator=new THREE.Object3D,this.holder.add(this.animator),this.animator.add(this.object),this.game.world.scene.add(this.holder)}init(){this.cubes=[],this.object.children=[],this.object.add(this.game.controls.group),2===this.size?this.scale=1.25:3===this.size?this.scale=1:3{this.cubes.push(e.userData.cube),this.object.add(e)}),this.holder.traverse(e=>{e.frustumCulled&&(e.frustumCulled=!1)}),this.updateColors(this.game.themes.getColors()),this.sizeGenerated=this.size}resize(e=!1){(this.size!==this.sizeGenerated||e)&&(this.size=this.game.preferences.ranges.size.value,this.reset(),this.init(),this.game.saved=!1,this.game.timer.reset(),this.game.storage.clearGame())}reset(){this.game.controls.edges.rotation.set(0,0,0),this.holder.rotation.set(0,0,0),this.object.rotation.set(0,0,0),this.animator.rotation.set(0,0,0)}generatePositions(){const e=this.size-1,t=0==this.size%2?.5-this.size/2:0-d(this.size/2);let a,o,s;for(this.positions=[],a=0;a{const n=new THREE.Object3D,l=s.clone(),c=[];n.position.copy(e.clone().divideScalar(3)),n.add(l),n.name=t,n.edgesName='',e.edges.forEach(e=>{const t=new THREE.Mesh(r,o.clone()),s=['L','R','D','U','B','F'][e],l=a/2;t.position.set(l*[-1,1,0,0,0,0][e],l*[0,0,-1,1,0,0][e],l*[0,0,0,0,-1,1][e]),t.rotation.set(i/2*[0,0,1,-1,0,0][e],i/2*[-1,1,0,0,2,0][e],0),t.scale.set(this.geometry.edgeScale,this.geometry.edgeScale,this.geometry.edgeScale),t.name=s,n.add(t),c.push(s),this.edges.push(t)}),n.userData.edges=c,n.userData.cube=l,n.userData.start={position:n.position.clone(),rotation:n.rotation.clone()},this.pieces.push(n)})}updateColors(e){'object'!=typeof this.pieces&&'object'!=typeof this.edges||(this.pieces.forEach(t=>t.userData.cube.material.color.setHex(e.P)),this.edges.forEach(t=>t.material.color.setHex(e[t.name])))}loadFromData(e){this.size=e.size,this.reset(),this.init(),this.pieces.forEach(t=>{const a=e.names.indexOf(t.name),o=e.positions[a],s=e.rotations[a];t.position.set(o.x,o.y,o.z),t.rotation.set(s.x,s.y,s.z)})}}const y={Power:{In:e=>(e=r(e||1),a=>s(a,e)),Out:e=>(e=r(e||1),a=>1-o(s(a-1,e))),InOut:e=>(e=r(e||1),a=>.5>a?s(2*a,e)/2:(1-o(s(2*a-1-1,e)))/2+.5)},Sine:{In:()=>e=>1+n(i/2*e-i/2),Out:()=>e=>n(i/2*e),InOut:()=>e=>(1+n(i*e-i/2))/2},Back:{Out:e=>(e=e||1.70158,a=>(a-=1)*a*((e+1)*a+e)+1),In:e=>(e=e||1.70158,a=>a*a*((e+1)*a-e))},Elastic:{Out:(e,t)=>{let a=2*i,o=1<=e?e:1,r=(t||.3)/(1>e?e:1),l=r/a*(Math.asin(1/o)||0);return r=a/r,e=>o*s(2,-10*e)*n((e-l)*r)+1}}};class b extends g{constructor(e){super(!1),this.duration=e.duration||500,this.easing=e.easing||(e=>e),this.onUpdate=e.onUpdate||(()=>{}),this.onComplete=e.onComplete||(()=>{}),this.delay=e.delay||!1,this.yoyo=!e.yoyo&&null,this.progress=0,this.value=0,this.delta=0,this.getFromTo(e),this.delay?setTimeout(()=>super.start(),this.delay):super.start(),this.onUpdate(this)}update(e){const t=1*this.value,a=!0===this.yoyo?-1:1;this.progress+=e/this.duration*a,this.value=this.easing(this.progress),this.delta=this.value-t,null!==this.values&&this.updateFromTo(),null===this.yoyo?1>=this.progress?this.onUpdate(this):(this.progress=1,this.value=1,this.onUpdate(this),this.onComplete(this),super.stop()):this.updateYoyo()}updateYoyo(){(1this.progress)&&(this.value=this.progress=1{this.target[e]=this.from[e]+(this.to[e]-this.from[e])*this.value})}getFromTo(e){return e.target&&e.to?void(this.target=e.target||null,this.from=e.from||{},this.to=e.to||null,this.values=[],1>Object.keys(this.from).length&&Object.keys(this.to).forEach(e=>{this.from[e]=this.target[e]}),Object.keys(this.to).forEach(e=>{this.values.push(e)})):void(this.values=null)}}window.addEventListener('touchmove',()=>{}),document.addEventListener('touchmove',e=>{e.preventDefault()},{passive:!1});class v{constructor(e,t){return this.position={current:new THREE.Vector2,start:new THREE.Vector2,delta:new THREE.Vector2,old:new THREE.Vector2,drag:new THREE.Vector2},this.options=Object.assign({calcDelta:!1},t||{}),this.element=e,this.touch=null,this.drag={start:e=>{'mousedown'==e.type&&1!=e.which||'touchstart'==e.type&&1{this.options.calcDelta&&(this.position.old=this.position.current.clone()),this.getPositionCurrent(e),this.options.calcDelta&&(this.position.delta=this.position.current.clone().sub(this.position.old),this.position.drag=this.position.current.clone().sub(this.position.start)),this.onDragMove(this.position)},end:e=>{this.getPositionCurrent(e),this.onDragEnd(this.position),window.removeEventListener(this.touch?'touchmove':'mousemove',this.drag.move,!1),window.removeEventListener(this.touch?'touchend':'mouseup',this.drag.end,!1)}},this.onDragStart=()=>{},this.onDragMove=()=>{},this.onDragEnd=()=>{},this.enable(),this}enable(){return this.element.addEventListener('touchstart',this.drag.start,!1),this.element.addEventListener('mousedown',this.drag.start,!1),this}disable(){return this.element.removeEventListener('touchstart',this.drag.start,!1),this.element.removeEventListener('mousedown',this.drag.start,!1),this}getPositionCurrent(e){const t=e.touches?e.touches[0]||e.changedTouches[0]:e;this.position.current.set(t.pageX,t.pageY)}convertPosition(e){return e.x=2*(e.x/this.element.offsetWidth)-1,e.y=-(2*(e.y/this.element.offsetHeight)-1),e}}const f=0;class x{constructor(e){this.game=e,this.flipConfig=0,this.flipEasings=[y.Power.Out(3),y.Sine.Out(),y.Back.Out(1.5)],this.flipSpeeds=[125,200,300],this.raycaster=new THREE.Raycaster;const t=new THREE.MeshBasicMaterial({depthWrite:!1,transparent:!0,opacity:0,color:13311});this.group=new THREE.Object3D,this.group.name='controls',this.game.cube.object.add(this.group),this.helper=new THREE.Mesh(new THREE.PlaneBufferGeometry(200,200),t.clone()),this.helper.rotation.set(0,i/4,0),this.game.world.scene.add(this.helper),this.edges=new THREE.Mesh(new THREE.BoxBufferGeometry(1,1,1),t.clone()),this.game.world.scene.add(this.edges),this.onSolved=()=>{},this.onMove=()=>{},this.momentum=[],this.scramble=null,this.state=f,this.enabled=!1,this.initDraggable()}enable(){this.draggable.enable(),this.enabled=!0}disable(){this.draggable.disable(),this.enabled=!1}initDraggable(){this.draggable=new v(this.game.dom.game),this.draggable.onDragStart=e=>{if(null===this.scramble&&1!==this.state&&2!==this.state){this.gettingDrag=3===this.state;const t=this.getIntersect(e.current,this.edges,!1);!1!==t&&(this.dragIntersect=this.getIntersect(e.current,this.game.cube.cubes,!0)),!1!==t&&!1!==this.dragIntersect?(this.dragNormal=t.face.normal.round(),this.flipType='layer',this.attach(this.helper,this.edges),this.helper.rotation.set(0,0,0),this.helper.position.set(0,0,0),this.helper.lookAt(this.dragNormal),this.helper.translateZ(.5),this.helper.updateMatrixWorld(),this.detach(this.helper,this.edges)):(this.dragNormal=new THREE.Vector3(0,0,1),this.flipType='cube',this.helper.position.set(0,0,0),this.helper.rotation.set(0,i/4,0),this.helper.updateMatrixWorld());let a=this.getIntersect(e.current,this.helper,!1);!1===a||(this.dragCurrent=this.helper.worldToLocal(a.point),this.dragTotal=new THREE.Vector3,this.state=this.state===f?1:this.state)}},this.draggable.onDragMove=e=>{if(null===this.scramble&&this.state!==f&&(3!==this.state||!1!==this.gettingDrag)){const t=this.getIntersect(e.current,this.helper,!1);if(!1!==t){const a=this.helper.worldToLocal(t.point.clone());if(this.dragDelta=a.clone().sub(this.dragCurrent).setZ(0),this.dragTotal.add(this.dragDelta),this.dragCurrent=a,this.addMomentumPoint(this.dragDelta),1===this.state&&.05this.game.world.width/2?'z':'x';this.flipAxis=new THREE.Vector3,this.flipAxis[t]=1*('x'==t?-1:1)}this.flipAngle=0,this.state=2}else if(2===this.state){const e=this.dragDelta[this.dragDirection];'layer'===this.flipType?(this.group.rotateOnAxis(this.flipAxis,e),this.flipAngle+=e):(this.edges.rotateOnWorldAxis(this.flipAxis,e),this.game.cube.object.rotation.copy(this.edges.rotation),this.flipAngle+=e)}}}},this.draggable.onDragEnd=()=>{if(null===this.scramble){if(2!==this.state)return this.gettingDrag=!1,void(this.state=f);this.state=3;const e=this.getMomentum()[this.dragDirection],t=.05{this.game.storage.saveGame(),this.state=this.gettingDrag?1:f,this.gettingDrag=!1,this.checkIsSolved()}):this.rotateCube(r,()=>{this.state=this.gettingDrag?1:f,this.gettingDrag=!1})}}}rotateLayer(e,t,a){const o=t?0:this.flipConfig,s=this.flipEasings[o],r=this.flipSpeeds[o],n=2==o?this.bounceCube():()=>{};this.rotationTween=new b({easing:s,duration:r,onUpdate:t=>{let a=t.delta*e;this.group.rotateOnAxis(this.flipAxis,a),n(t.value,a,e)},onComplete:()=>{t||this.onMove();const e=this.flipLayer.slice(0);this.game.cube.object.rotation.setFromVector3(this.snapRotation(this.game.cube.object.rotation.toVector3())),this.group.rotation.setFromVector3(this.snapRotation(this.group.rotation.toVector3())),this.deselectLayer(this.flipLayer),a(e)}})}bounceCube(){let e=!0;return(t,a,o)=>{1<=t&&(e&&(a=(t-1)*o,e=!1),this.game.cube.object.rotateOnAxis(this.flipAxis,a))}}rotateCube(e,t){const a=this.flipConfig,o=[y.Power.Out(4),y.Sine.Out(),y.Back.Out(2)][a],s=[100,150,350][a];this.rotationTween=new b({easing:o,duration:s,onUpdate:t=>{this.edges.rotateOnWorldAxis(this.flipAxis,t.delta*e),this.game.cube.object.rotation.copy(this.edges.rotation)},onComplete:()=>{this.edges.rotation.setFromVector3(this.snapRotation(this.edges.rotation.toVector3())),this.game.cube.object.rotation.copy(this.edges.rotation),t()}})}selectLayer(e){this.group.rotation.set(0,0,0),this.movePieces(e,this.game.cube.object,this.group),this.flipLayer=e}deselectLayer(e){this.movePieces(e,this.group,this.game.cube.object),this.flipLayer=null}movePieces(e,t,a){t.updateMatrixWorld(),a.updateMatrixWorld(),e.forEach(e=>{const o=this.game.cube.pieces[e];o.applyMatrix(t.matrixWorld),t.remove(o),o.applyMatrix(new THREE.Matrix4().getInverse(a.matrixWorld)),a.add(o)})}getLayer(e){const t={2:6,3:3,4:4,5:3}[this.game.cube.size],a=[];let o;if(!1===e){const a=this.dragIntersect.object.parent;o=this.getMainAxis(this.flipAxis),e=a.position.clone().multiplyScalar(t).round()}else o=this.getMainAxis(e);return this.game.cube.pieces.forEach(s=>{const r=s.position.clone().multiplyScalar(t).round();r[o]==e[o]&&a.push(s.name)}),a}keyboardMove(e,t){if(this.state===f&&!0===this.enabled)if('LAYER'===e){const e=this.getLayer(t.position);this.flipAxis=new THREE.Vector3,this.flipAxis[t.axis]=1,this.state=2,this.selectLayer(e),this.rotateLayer(t.angle,!1,()=>{this.game.storage.saveGame(),this.state=f,this.checkIsSolved()})}else'CUBE'===e&&(this.flipAxis=new THREE.Vector3,this.flipAxis[t.axis]=1,this.state=2,this.rotateCube(t.angle,()=>{this.state=f}))}scrambleCube(){null==this.scramble&&(this.scramble=this.game.scrambler,this.scramble.callback='function'==typeof callback?callback:()=>{});const e=this.scramble.converted,t=e[0],a=this.getLayer(t.position);this.flipAxis=new THREE.Vector3,this.flipAxis[t.axis]=1,this.selectLayer(a),this.rotateLayer(t.angle,!0,()=>{e.shift(),0o(e[t])>o(e[a])?t:a)}detach(e,t){e.applyMatrix(t.matrixWorld),t.remove(e),this.game.world.scene.add(e)}attach(e,t){e.applyMatrix(new THREE.Matrix4().getInverse(t.matrixWorld)),this.game.world.scene.remove(e),t.add(e)}addMomentumPoint(e){const t=Date.now();this.momentum=this.momentum.filter(e=>500>t-e.time),!1!==e&&this.momentum.push({delta:e,time:t})}getMomentum(){const e=this.momentum.length,t=new THREE.Vector2;return this.addMomentumPoint(!1),this.momentum.forEach((a,o)=>{t.add(a.delta.multiplyScalar(o/e))}),t}roundAngle(e){const t=i/2;return a(e)*r(o(e)/t)*t}snapRotation(e){return e.set(this.roundAngle(e.x),this.roundAngle(e.y),this.roundAngle(e.z))}checkIsSolved(){performance.now();let e=!0;const t={"x-":[],"x+":[],"y-":[],"y+":[],"z-":[],"z+":[]};this.game.cube.edges.forEach(e=>{const a=e.parent.localToWorld(e.position.clone()).sub(this.game.cube.object.position),o=this.getMainAxis(a),s=1>a.multiplyScalar(2).round()[o]?'-':'+';t[o+s].push(e.name)}),Object.keys(t).forEach(a=>{t[a].every(e=>e===t[a][0])||(e=!1)}),e&&this.onSolved()}}class z{constructor(e){this.game=e,this.dificulty=0,this.scrambleLength={2:[7,9,11],3:[20,25,30],4:[30,40,50],5:[40,60,80]},this.moves=[],this.conveted=[],this.pring=''}scramble(e){let t=0;if(this.moves='undefined'==typeof e?[]:e.split(' '),1>this.moves.length){const a=this.scrambleLength[this.game.cube.size][this.dificulty],o=4>this.game.cube.size?'UDLRFB':'UuDdLlRrFfBb',s=['','\'','2'],r='undefined'==typeof e?a:e;for(;t{},this.convert(),this.print=this.moves.join(' '),this}convert(){this.converted=[],this.moves.forEach(e=>{const t=this.convertMove(e),a=e.charAt(1);this.converted.push(t),'2'==a&&this.converted.push(t)})}convertMove(e){const t=e.charAt(0),a=e.charAt(1),o={D:'y',U:'y',L:'x',R:'x',F:'z',B:'z'}[t.toUpperCase()];let s={D:-1,U:1,L:-1,R:1,F:1,B:-1}[t.toUpperCase()];3new b({target:e.style,duration:300,easing:t?y.Power.Out(2):y.Power.In(3),from:{opacity:t?0:1},to:{opacity:t?1:0},onUpdate:a=>{const o=t?1-a.value:a.value;e.style.transform=`translate3d(0, ${1.5*o}em, 0)`},onComplete:()=>e.style.pointerEvents=t?'all':'none'});t.forEach(e=>this.tweens.buttons[e]=a(this.game.dom.buttons[e],!1)),setTimeout(()=>e.forEach(e=>{this.tweens.buttons[e]=a(this.game.dom.buttons[e],!0)}),t?500:0)}cube(e,t=!1){this.activeTransitions++;try{this.tweens.cube.stop()}catch(t){}const a=this.game.cube.animator.position.y,o=this.game.cube.animator.rotation.x;this.tweens.cube=new b({duration:e?3e3:1250,easing:e?y.Elastic.Out(.8,.6):y.Back.In(1),onUpdate:s=>{this.game.cube.animator.position.y=e?t?.9+3.5*(1-s.value):4*(1-s.value):a+4*s.value,this.game.cube.animator.rotation.x=e?(1-s.value)*i/3:o+s.value*-i/3}}),t&&(e?(this.game.world.camera.zoom=.75,this.game.world.camera.updateProjectionMatrix()):setTimeout(()=>{this.game.world.camera.zoom=this.data.cameraZoom,this.game.world.camera.updateProjectionMatrix()},1500)),this.durations.cube=e?1500:1500,setTimeout(()=>this.activeTransitions--,this.durations.cube)}float(){try{this.tweens.float.stop()}catch(t){}this.tweens.float=new b({duration:1500,easing:y.Sine.InOut(),yoyo:!0,onUpdate:e=>{this.game.cube.holder.position.y=-.02+.04*e.value,this.game.cube.holder.rotation.x=.005-.01*e.value,this.game.cube.holder.rotation.z=-this.game.cube.holder.rotation.x,this.game.cube.holder.rotation.y=this.game.cube.holder.rotation.x,this.game.controls.edges.position.y=this.game.cube.holder.position.y+this.game.cube.object.position.y}})}zoom(e,t){this.activeTransitions++;const a=e?1:this.data.cameraZoom,o=0{this.game.world.camera.updateProjectionMatrix()}}),this.tweens.rotate=new b({target:this.game.cube.animator.rotation,duration:o,easing:n,to:{y:2*-i*s},onComplete:()=>{this.game.cube.animator.rotation.y=0}}),this.durations.zoom=o,setTimeout(()=>this.activeTransitions--,this.durations.zoom)}elevate(e){this.activeTransitions++;this.tweens.elevate=new b({target:this.game.cube.object.position,duration:e?1500:0,easing:y.Power.InOut(3),to:{y:e?-.05:this.data.cubeY}});this.durations.elevate=1500,setTimeout(()=>this.activeTransitions--,this.durations.elevate)}complete(e,t){this.activeTransitions++;const a=t?this.game.dom.texts.best:this.game.dom.texts.complete;null===a.querySelector('span i')&&a.querySelectorAll('span').forEach(e=>this.splitLetters(e));const o=a.querySelectorAll('.icon, i');this.flipLetters(t?'best':'complete',o,e),a.style.opacity=1;const s=this.durations[t?'best':'complete'];e||setTimeout(()=>this.game.dom.texts.timer.style.transform='',s),setTimeout(()=>this.activeTransitions--,s)}stats(e){e&&this.game.scores.calcStats(),this.activeTransitions++,this.tweens.stats.forEach(e=>{e.stop(),e=null});let t=-1;const a=this.game.dom.stats.querySelectorAll('.stats'),o=e?y.Power.Out(2):y.Power.In(3);a.forEach((a,s)=>{const r=s*(e?80:60);this.tweens.stats[t++]=new b({delay:r,duration:400,easing:o,onUpdate:t=>{const o=e?2*(1-t.value):t.value,s=e?t.value:1-t.value;a.style.transform=`translate3d(0, ${o}em, 0)`,a.style.opacity=s}})}),this.durations.stats=0,setTimeout(()=>this.activeTransitions--,this.durations.stats)}preferences(e){this.ranges(this.game.dom.prefs.querySelectorAll('.range'),'prefs',e)}theming(e){this.ranges(this.game.dom.theme.querySelectorAll('.range'),'prefs',e)}ranges(e,t,a){this.activeTransitions++,this.tweens[t].forEach(e=>{e.stop(),e=null});const o=a?y.Power.Out(2):y.Power.In(3);let s=-1,r=0;e.forEach((e,n)=>{const i=e.querySelector('.range__label'),l=e.querySelector('.range__track-line'),c=e.querySelector('.range__handle'),m=e.querySelectorAll('.range__list div'),d=n*(a?120:100);i.style.opacity=a?0:1,l.style.opacity=a?0:1,c.style.opacity=a?0:1,c.style.pointerEvents=a?'all':'none',this.tweens[t][s++]=new b({delay:a?d:d,duration:400,easing:o,onUpdate:e=>{const t=a?1-e.value:e.value,o=a?e.value:1-e.value;i.style.transform=`translate3d(0, ${t}em, 0)`,i.style.opacity=o}}),this.tweens[t][s++]=new b({delay:a?d+100:d,duration:400,easing:o,onUpdate:e=>{const t=a?1-e.value:e.value,o=a?e.value:1-e.value;l.style.transform=`translate3d(0, ${t}em, 0) scale3d(${o}, 1, 1)`,l.style.opacity=o}}),this.tweens[t][s++]=new b({delay:a?d+100:d,duration:400,easing:o,onUpdate:e=>{const t=a?1-e.value:e.value,o=1-t,s=.5+.5*o;c.style.transform=`translate3d(0, ${t}em, 0) scale3d(${s}, ${s}, ${s})`,c.style.opacity=o}}),m.forEach((e,r)=>{e.style.opacity=a?0:1,this.tweens[t][s++]=new b({delay:a?d+200+50*r:d,duration:400,easing:o,onUpdate:t=>{const o=a?1-t.value:t.value,s=a?t.value:1-t.value;e.style.transform=`translate3d(0, ${o}em, 0)`,e.style.opacity=s}})}),r=m.length>r?m.length-1:r,e.style.opacity=1}),this.durations[t]=a?100*(e.length-1)+200+50*r+400:100*(e.length-1)+400,setTimeout(()=>this.activeTransitions--,this.durations[t])}title(e){this.activeTransitions++;const t=this.game.dom.texts.title;null===t.querySelector('span i')&&t.querySelectorAll('span').forEach(e=>this.splitLetters(e));const a=t.querySelectorAll('i');this.flipLetters('title',a,e),t.style.opacity=1;const o=this.game.dom.texts.note;this.tweens.title[a.length]=new b({target:o.style,easing:y.Sine.InOut(),duration:e?800:400,yoyo:!!e||null,from:{opacity:e?0:parseFloat(getComputedStyle(o).opacity)},to:{opacity:e?1:0}}),setTimeout(()=>this.activeTransitions--,this.durations.title)}timer(e){this.activeTransitions++;const t=this.game.dom.texts.timer;t.style.opacity=0,this.game.timer.convert(),this.game.timer.setText(),this.splitLetters(t);const a=t.querySelectorAll('i');this.flipLetters('timer',a,e),t.style.opacity=1,setTimeout(()=>this.activeTransitions--,this.durations.timer)}splitLetters(e){const t=e.innerHTML;e.innerHTML='',t.split('').forEach(t=>{const a=document.createElement('i');a.innerHTML=t,e.appendChild(a)})}flipLetters(e,t,a){try{this.tweens[e].forEach(e=>e.stop())}catch(t){}t.forEach((t,o)=>{t.style.opacity=a?0:1,this.tweens[e][o]=new b({easing:y.Sine.Out(),duration:a?800:400,delay:50*o,onUpdate:e=>{const o=a?-80*(1-e.value):80*e.value;t.style.transform=`rotate3d(0, 1, 0, ${o}deg)`,t.style.opacity=a?e.value:1-e.value}})}),this.durations[e]=50*(t.length-1)+(a?800:400)}}class w extends g{constructor(e){super(!1),this.game=e,this.reset()}start(e){this.startTime=e?Date.now()-this.deltaTime:Date.now(),this.deltaTime=0,this.converted=this.convert(),super.start()}reset(){this.startTime=0,this.currentTime=0,this.deltaTime=0,this.converted='0:00'}stop(){return this.currentTime=Date.now(),this.deltaTime=this.currentTime-this.startTime,this.convert(),super.stop(),{time:this.converted,millis:this.deltaTime}}update(){const e=this.converted;this.currentTime=Date.now(),this.deltaTime=this.currentTime-this.startTime,this.convert(),this.converted!=e&&(localStorage.setItem('theCube_time',this.deltaTime),this.setText())}convert(){const e=parseInt(this.deltaTime/1e3%60),t=parseInt(this.deltaTime/60000);this.converted=t+':'+(10>e?'0':'')+e}setText(){this.game.dom.texts.timer.innerHTML=this.converted}}document.querySelectorAll('range').forEach(e=>{const t=document.createElement('div');t.innerHTML='
\n
\n
\n
\n
\n
\n
\n
';const a=t.querySelector('.range'),o=a.querySelector('.range__label'),s=a.querySelector('.range__list');a.setAttribute('name',e.getAttribute('name')),o.innerHTML=e.getAttribute('title'),e.hasAttribute('color')&&(a.classList.add('range--type-color'),a.classList.add('range--color-'+e.getAttribute('name'))),e.hasAttribute('list')&&e.getAttribute('list').split(',').forEach(e=>{const t=document.createElement('div');t.innerHTML=e,s.appendChild(t)}),e.parentNode.replaceChild(a,e)});class C{constructor(e,t){t=Object.assign({range:[0,1],value:0,step:0,onUpdate:()=>{},onComplete:()=>{}},t||{}),this.element=document.querySelector('.range[name="'+e+'"]'),this.track=this.element.querySelector('.range__track'),this.handle=this.element.querySelector('.range__handle'),this.list=[].slice.call(this.element.querySelectorAll('.range__list div')),this.value=t.value,this.min=t.range[0],this.max=t.range[1],this.step=t.step,this.onUpdate=t.onUpdate,this.onComplete=t.onComplete,this.setValue(this.value),this.initDraggable()}setValue(e){this.value=this.round(this.limitValue(e)),this.setHandlePosition()}initDraggable(){let e;this.draggable=new v(this.handle,{calcDelta:!0}),this.draggable.onDragStart=()=>{e=this.positionFromValue(this.value),this.handle.style.left=e+'px'},this.draggable.onDragMove=t=>{e=this.limitPosition(e+t.delta.x),this.value=this.round(this.valueFromPosition(e)),this.setHandlePosition(),this.onUpdate(this.value)},this.draggable.onDragEnd=()=>{this.onComplete(this.value)}}round(e){return 1>this.step?e:r((e-this.min)/this.step)*this.step+this.min}limitValue(e){const t=c(this.max,this.min),a=l(this.max,this.min);return l(c(e,a),t)}limitPosition(e){return l(c(e,0),this.track.offsetWidth)}percentsFromValue(e){return(e-this.min)/(this.max-this.min)}valueFromPosition(e){return this.min+(this.max-this.min)*(e/this.track.offsetWidth)}positionFromValue(e){return this.percentsFromValue(e)*this.track.offsetWidth}setHandlePosition(){this.handle.style.left=100*this.percentsFromValue(this.value)+'%'}}class L{constructor(e){this.game=e}init(){this.ranges={size:new C('size',{value:this.game.cube.size,range:[2,5],step:1,onUpdate:e=>{this.game.cube.size=e,this.game.preferences.ranges.scramble.list.forEach((e,t)=>{e.innerHTML=this.game.scrambler.scrambleLength[this.game.cube.size][t]})},onComplete:()=>this.game.storage.savePreferences()}),flip:new C('flip',{value:this.game.controls.flipConfig,range:[0,2],step:1,onUpdate:e=>{this.game.controls.flipConfig=e},onComplete:()=>this.game.storage.savePreferences()}),scramble:new C('scramble',{value:this.game.scrambler.dificulty,range:[0,2],step:1,onUpdate:e=>{this.game.scrambler.dificulty=e},onComplete:()=>this.game.storage.savePreferences()}),fov:new C('fov',{value:this.game.world.fov,range:[2,45],onUpdate:e=>{this.game.world.fov=e,this.game.world.resize()},onComplete:()=>this.game.storage.savePreferences()}),theme:new C('theme',{value:{cube:0,erno:1,dust:2,camo:3,rain:4}[this.game.themes.theme],range:[0,4],step:1,onUpdate:e=>{const t=['cube','erno','dust','camo','rain'][e];this.game.themes.setTheme(t)},onComplete:()=>this.game.storage.savePreferences()}),hue:new C('hue',{value:0,range:[0,360],onUpdate:()=>this.game.themeEditor.updateHSL(),onComplete:()=>this.game.storage.savePreferences()}),saturation:new C('saturation',{value:100,range:[0,100],onUpdate:()=>this.game.themeEditor.updateHSL(),onComplete:()=>this.game.storage.savePreferences()}),lightness:new C('lightness',{value:50,range:[0,100],onUpdate:()=>this.game.themeEditor.updateHSL(),onComplete:()=>this.game.storage.savePreferences()})},this.ranges.scramble.list.forEach((e,t)=>{e.innerHTML=this.game.scrambler.scrambleLength[this.game.cube.size][t]})}}class T{constructor(e){this.game=e,this.started=0,this.options={speed:{min:.0011,max:.0022},revolution:{min:.01,max:.05},size:{min:.1,max:.15},colors:[4303560,8571448,16772936,15677731,16747530]},this.geometry=new THREE.PlaneGeometry(1,1),this.material=new THREE.MeshLambertMaterial({side:THREE.DoubleSide}),this.holders=[new M(this.game,this,1,20),new M(this.game,this,-1,30)]}start(){0{this.game.world.scene.add(e.holder),e.start(),this.started++})}stop(){0==this.started||this.holders.forEach(e=>{e.stop(()=>{this.game.world.scene.remove(e.holder),this.started--})})}updateColors(e){this.holders.forEach(t=>{t.options.colors.forEach((a,o)=>{t.options.colors[o]=e[['D','F','R','B','L'][o]]})})}}class M extends g{constructor(e,t,a,o){super(!1),this.game=e,this.parent=t,this.distanceFromCube=a,this.count=o,this.particles=[],this.holder=new THREE.Object3D,this.holder.rotation.copy(this.game.world.camera.rotation),this.object=new THREE.Object3D,this.holder.add(this.object),this.resizeViewport=this.resizeViewport.bind(this),this.game.world.onResize.push(this.resizeViewport),this.resizeViewport(),this.geometry=this.parent.geometry,this.material=this.parent.material,this.options=this.parent.options;for(let s=this.count;s--;)this.particles.push(new A(this))}start(){this.time=performance.now(),this.playing=!0;for(let e=this.count;e--;)this.particles[e].reset();super.start()}stop(e){this.playing=!1,this.completed=0,this.callback=e}reset(){super.stop(),this.callback()}update(){const e=performance.now(),t=e-this.time;this.time=e;for(let e=this.count;e--;)this.particles[e].completed||this.particles[e].update(t);this.playing||this.completed!=this.count||this.reset()}resizeViewport(){const e=this.game.world.camera.fov*THREE.Math.DEG2RAD;this.height=2*m(e/2)*(this.game.world.camera.position.length()-this.distanceFromCube),this.width=this.height*this.game.world.camera.aspect;const t=1/this.game.transition.data.cameraZoom;this.width*=t,this.height*=t,this.object.position.z=this.distanceFromCube,this.object.position.y=this.height/2}}class A{constructor(e){return this.confetti=e,this.options=this.confetti.options,this.velocity=new THREE.Vector3,this.force=new THREE.Vector3,this.mesh=new THREE.Mesh(this.confetti.geometry,this.confetti.material.clone()),this.confetti.object.add(this.mesh),this.size=THREE.Math.randFloat(this.options.size.min,this.options.size.max),this.mesh.scale.set(this.size,this.size,this.size),this}reset(e=!0){this.completed=!1,this.color=new THREE.Color(this.options.colors[d(Math.random()*this.options.colors.length)]),this.mesh.material.color.set(this.color),this.speed=-1*THREE.Math.randFloat(this.options.speed.min,this.options.speed.max),this.mesh.position.x=THREE.Math.randFloat(-this.confetti.width/2,this.confetti.width/2),this.mesh.position.y=e?THREE.Math.randFloat(this.size,this.confetti.height+this.size):this.size,this.revolutionSpeed=THREE.Math.randFloat(this.options.revolution.min,this.options.revolution.max),this.revolutionAxis=['x','y','z'][d(3*Math.random())],this.mesh.rotation.set(Math.random()*i/3,Math.random()*i/3,Math.random()*i/3)}stop(){this.completed=!0,this.confetti.completed++}update(e){this.mesh.position.y+=this.speed*e,this.mesh.rotation[this.revolutionAxis]+=this.revolutionSpeed,this.mesh.position.y<-this.confetti.height-this.size&&(this.confetti.playing?this.reset(!1):this.stop())}}class E{constructor(e){this.game=e,this.data={2:{scores:[],solves:0,best:0,worst:0},3:{scores:[],solves:0,best:0,worst:0},4:{scores:[],solves:0,best:0,worst:0},5:{scores:[],solves:0,best:0,worst:0}}}addScore(e){const t=this.data[this.game.cube.sizeGenerated];t.scores.push(e),t.solves++,100t.worst&&(t.worst=e),this.game.storage.saveScores(),a}calcStats(){const e=this.game.cube.sizeGenerated,t=this.data[e];this.setStat('cube-size',`${e}x${e}x${e}`),this.setStat('total-solves',t.solves),this.setStat('best-time',this.convertTime(t.best)),this.setStat('worst-time',this.convertTime(t.worst)),this.setStat('average-5',this.getAverage(5)),this.setStat('average-12',this.getAverage(12)),this.setStat('average-25',this.getAverage(25))}setStat(e,t){0===t&&(t='-'),this.game.dom.stats.querySelector(`.stats[name="${e}"] b`).innerHTML=t}getAverage(e){const t=this.data[this.game.cube.sizeGenerated];return t.scores.lengthe+t,0)/e)}convertTime(e){if(0>=e)return 0;const t=parseInt(e/1e3%60),a=parseInt(e/60000);return a+':'+(10>t?'0':'')+t}}class P{constructor(e){this.game=e;const t=localStorage.getItem('theCube_version');t&&t===window.gameVersion||(this.clearGame(),this.clearPreferences(),this.migrateScores(),localStorage.setItem('theCube_version',window.gameVersion))}init(){this.loadPreferences(),this.loadScores()}loadGame(){try{const e='true'===localStorage.getItem('theCube_playing');if(!e)throw new Error;const t=JSON.parse(localStorage.getItem('theCube_savedState')),a=parseInt(localStorage.getItem('theCube_time'));if(!t||null===a)throw new Error;if(t.size!==this.game.cube.sizeGenerated)throw new Error;this.game.cube.loadFromData(t),this.game.timer.deltaTime=a,this.game.saved=!0}catch(t){this.game.saved=!1}}saveGame(){const e={names:[],positions:[],rotations:[]},t=this.game.timer.deltaTime;e.size=this.game.cube.sizeGenerated,this.game.cube.pieces.forEach(t=>{e.names.push(t.name),e.positions.push(t.position),e.rotations.push(t.rotation.toVector3())}),localStorage.setItem('theCube_playing',!0),localStorage.setItem('theCube_savedState',JSON.stringify(e)),localStorage.setItem('theCube_time',t)}clearGame(){localStorage.removeItem('theCube_playing'),localStorage.removeItem('theCube_savedState'),localStorage.removeItem('theCube_time')}loadScores(){try{const e=JSON.parse(localStorage.getItem('theCube_scores'));if(!e)throw new Error;this.game.scores.data=e}catch(t){}}saveScores(){const e=this.game.scores.data;localStorage.setItem('theCube_scores',JSON.stringify(e))}clearScores(){localStorage.removeItem('theCube_scores')}migrateScores(){try{const e=JSON.parse(localStorage.getItem('theCube_scoresData')),t=parseInt(localStorage.getItem('theCube_scoresBest')),a=parseInt(localStorage.getItem('theCube_scoresWorst')),o=parseInt(localStorage.getItem('theCube_scoresSolves'));if(!e||!t||!o||!a)return!1;this.game.scores.data[3].scores=e,this.game.scores.data[3].best=t,this.game.scores.data[3].solves=o,this.game.scores.data[3].worst=a,localStorage.removeItem('theCube_scoresData'),localStorage.removeItem('theCube_scoresBest'),localStorage.removeItem('theCube_scoresWorst'),localStorage.removeItem('theCube_scoresSolves')}catch(t){}}loadPreferences(){try{const e=JSON.parse(localStorage.getItem('theCube_preferences'));if(!e)throw new Error;return this.game.cube.size=parseInt(e.cubeSize),this.game.controls.flipConfig=parseInt(e.flipConfig),this.game.scrambler.dificulty=parseInt(e.dificulty),this.game.world.fov=parseFloat(e.fov),this.game.world.resize(),this.game.themes.colors=e.colors,this.game.themes.setTheme(e.theme),!0}catch(t){return this.game.cube.size=3,this.game.controls.flipConfig=0,this.game.scrambler.dificulty=1,this.game.world.fov=10,this.game.world.resize(),this.game.themes.setTheme('cube'),this.savePreferences(),!1}}savePreferences(){const e={cubeSize:this.game.cube.size,flipConfig:this.game.controls.flipConfig,dificulty:this.game.scrambler.dificulty,fov:this.game.world.fov,theme:this.game.themes.theme,colors:this.game.themes.colors};localStorage.setItem('theCube_preferences',JSON.stringify(e))}clearPreferences(){localStorage.removeItem('theCube_preferences')}}class D{constructor(e){this.game=e,this.theme=null,this.defaults={cube:{U:16775167,D:16772936,F:15677731,R:4303560,B:16747530,L:8571448,P:528410,G:13751771},erno:{U:16777215,D:16766208,F:12852794,R:20922,B:16734208,L:40544,P:528410,G:9092607},dust:{U:16774891,D:15189133,F:9381182,R:6323817,B:12480354,L:8691549,P:528410,G:15189133},camo:{U:16774891,D:12564082,F:3613724,R:7439446,B:8411185,L:3621661,P:528410,G:12564082},rain:{U:16448255,D:15579437,F:13508917,R:4496009,B:15489071,L:10725703,P:528410,G:8894892}},this.colors=JSON.parse(JSON.stringify(this.defaults))}getColors(){return this.colors[this.theme]}setTheme(e=!1,t=!1){if(e===this.theme&&!1===t)return;!1!==e&&(this.theme=e);const a=this.getColors();this.game.dom.prefs.querySelectorAll('.range__handle div').forEach(e=>{e.style.background='#'+a.R.toString(16).padStart(6,'0')}),this.game.cube.updateColors(a),this.game.confetti.updateColors(a),this.game.dom.back.style.background='#'+a.G.toString(16).padStart(6,'0')}}class _{constructor(e){this.game=e,this.editColor='R',this.getPieceColor=this.getPieceColor.bind(this)}colorFromHSL(e,t,a){return e=r(e),t=r(t),a=r(a),new THREE.Color(`hsl(${e}, ${t}%, ${a}%)`)}setHSL(e=null,t=!1){this.editColor=null===e?'R':e;const a=new THREE.Color(this.game.themes.getColors()[this.editColor]),{h:o,s:r,l:s}=a.getHSL(a),{hue:n,saturation:i,lightness:l}=this.game.preferences.ranges;if(t){const e=n.value/360,t=i.value/100,c=l.value/100,m=this.colorFromHSL(n.value,i.value,l.value);this.tweenHSL&&this.tweenHSL.stop(),this.tweenHSL=new b({duration:200,easing:y.Sine.Out(),onUpdate:d=>{n.setValue(360*(e+(o-e)*d.value)),i.setValue(100*(t+(r-t)*d.value)),l.setValue(100*(c+(s-c)*d.value));const u=m.clone().lerp(a,d.value),g=u.getStyle(),p=u.getHSL(u);n.handle.style.color=g,i.handle.style.color=g,l.handle.style.color=g,i.track.style.color=this.colorFromHSL(360*p.h,100,50).getStyle(),l.track.style.color=this.colorFromHSL(360*p.h,100*p.s,50).getStyle(),this.game.dom.theme.style.display='none',this.game.dom.theme.offsetHeight,this.game.dom.theme.style.display=''},onComplete:()=>{this.updateHSL(),this.game.storage.savePreferences()}})}else n.setValue(360*o),i.setValue(100*r),l.setValue(100*s),this.updateHSL(),this.game.storage.savePreferences()}updateHSL(){const{hue:e,saturation:t,lightness:a}=this.game.preferences.ranges,o=e.value,r=t.value,s=a.value,n=this.colorFromHSL(o,r,s).getStyle();e.handle.style.color=n,t.handle.style.color=n,a.handle.style.color=n,t.track.style.color=this.colorFromHSL(o,100,50).getStyle(),a.track.style.color=this.colorFromHSL(o,r,50).getStyle(),this.game.dom.theme.style.display='none',this.game.dom.theme.offsetHeight,this.game.dom.theme.style.display='';const i=this.game.themes.theme;this.game.themes.colors[i][this.editColor]=this.colorFromHSL(o,r,s).getHex(),this.game.themes.setTheme()}colorPicker(e){e?this.game.dom.game.addEventListener('click',this.getPieceColor,!1):this.game.dom.game.removeEventListener('click',this.getPieceColor,!1)}getPieceColor(e){const t=e.touches?e.touches[0]||e.changedTouches[0]:e,a=new THREE.Vector2(t.pageX,t.pageY);let o=this.game.controls.getIntersect(a,this.game.cube.edges,!0),s=this.game.controls.getIntersect(a,this.game.cube.cubes,!0);if(!1!==o){const e=o.object,t=e.parent.localToWorld(e.position.clone()).sub(this.game.cube.object.position).sub(this.game.cube.animator.position),a=this.game.controls.getMainAxis(t);1>t.multiplyScalar(2).round()[a]&&(o=!1)}const r=o?o.object.name:s?'P':'G';this.setHSL(r,!0)}resetTheme(){this.game.themes.colors[this.game.themes.theme]=JSON.parse(JSON.stringify(this.game.themes.defaults[this.game.themes.theme])),this.game.themes.setTheme(),this.setHSL(this.editColor,!0)}}const k={3:{checkerboard:{names:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26],positions:[{x:1/3,y:-1/3,z:1/3},{x:-1/3,y:1/3,z:0},{x:1/3,y:-1/3,z:-1/3},{x:-1/3,y:0,z:-1/3},{x:1/3,y:0,z:0},{x:-1/3,y:0,z:1/3},{x:1/3,y:1/3,z:1/3},{x:-1/3,y:-1/3,z:0},{x:1/3,y:1/3,z:-1/3},{x:0,y:1/3,z:-1/3},{x:0,y:-1/3,z:0},{x:0,y:1/3,z:1/3},{x:0,y:0,z:1/3},{x:0,y:0,z:0},{x:0,y:0,z:-1/3},{x:0,y:-1/3,z:-1/3},{x:0,y:1/3,z:0},{x:0,y:-1/3,z:1/3},{x:-1/3,y:-1/3,z:1/3},{x:1/3,y:1/3,z:0},{x:-1/3,y:-1/3,z:-1/3},{x:1/3,y:0,z:-1/3},{x:-1/3,y:0,z:0},{x:1/3,y:0,z:1/3},{x:-1/3,y:1/3,z:1/3},{x:1/3,y:-1/3,z:0},{x:-1/3,y:1/3,z:-1/3}],rotations:[{x:-i,y:0,z:i},{x:i,y:0,z:0},{x:-i,y:0,z:i},{x:0,y:0,z:0},{x:0,y:0,z:i},{x:0,y:0,z:0},{x:-i,y:0,z:i},{x:i,y:0,z:0},{x:-i,y:0,z:i},{x:0,y:0,z:i},{x:0,y:0,z:0},{x:0,y:0,z:i},{x:-i,y:0,z:0},{x:i,y:0,z:i},{x:i,y:0,z:0},{x:0,y:0,z:i},{x:0,y:0,z:0},{x:0,y:0,z:i},{x:i,y:0,z:i},{x:-i,y:0,z:0},{x:i,y:0,z:i},{x:0,y:0,z:0},{x:0,y:0,z:i},{x:0,y:0,z:0},{x:i,y:0,z:i},{x:-i,y:0,z:0},{x:i,y:0,z:i}],size:3}}};const V=new class{constructor(e){if(e=Object.assign({tagName:'icon',className:'icon',styles:!1,icons:{},observe:!1,convert:!1},e||{}),this.tagName=e.tagName,this.className=e.className,this.icons=e.icons,this.svgTag=document.createElementNS('http://www.w3.org/2000/svg','svg'),this.svgTag.setAttribute('class',this.className),e.styles&&this.addStyles(),e.convert&&this.convertAllIcons(),e.observe){const e=window.MutationObserver||window.WebKitMutationObserver;this.observer=new e(()=>{this.convertAllIcons()}),this.observer.observe(document.documentElement,{childList:!0,subtree:!0})}return this}convertAllIcons(){document.querySelectorAll(this.tagName).forEach(e=>{this.convertIcon(e)})}convertIcon(e){const t=this.icons[e.attributes[0].localName];if('undefined'!=typeof t){const a=this.svgTag.cloneNode(!0),o=t.viewbox.split(' ');a.setAttributeNS(null,'viewBox',t.viewbox),a.style.width=o[2]/o[3]+'em',a.style.height='1em',a.innerHTML=t.content,e.parentNode.replaceChild(a,e)}}addStyles(){const e=document.createElement('style');e.innerHTML=`.${this.className} { display: inline-block; font-size: inherit; overflow: visible; vertical-align: -0.125em; preserveAspectRatio: none; }`,document.head.appendChild(e)}}({icons:{settings:{viewbox:'0 0 512 512',content:''},back:{viewbox:'0 0 512 512',content:''},trophy:{viewbox:'0 0 576 512',content:''},cancel:{viewbox:'0 0 352 512',content:''},theme:{viewbox:'0 0 512 512',content:''},reset:{viewbox:'0 0 512 512',content:''},trash:{viewbox:'0 0 448 512',content:''}},convert:!0}),I={Menu:0,Playing:1,Complete:2,Stats:3,Prefs:4,Theme:5},H={Menu:['stats','prefs'],Playing:['back'],Complete:[],Stats:[],Prefs:['back','theme'],Theme:['back','reset'],None:[]};window.game=new class{constructor(){this.dom={ui:document.querySelector('.ui'),game:document.querySelector('.ui__game'),back:document.querySelector('.ui__background'),prefs:document.querySelector('.ui__prefs'),theme:document.querySelector('.ui__theme'),stats:document.querySelector('.ui__stats'),texts:{title:document.querySelector('.text--title'),note:document.querySelector('.text--note'),timer:document.querySelector('.text--timer'),complete:document.querySelector('.text--complete'),best:document.querySelector('.text--best-time'),theme:document.querySelector('.text--theme')},buttons:{prefs:document.querySelector('.btn--prefs'),back:document.querySelector('.btn--back'),stats:document.querySelector('.btn--stats'),reset:document.querySelector('.btn--reset'),theme:document.querySelector('.btn--theme')}},this.world=new p(this),this.cube=new h(this),this.controls=new x(this),this.scrambler=new z(this),this.transition=new S(this),this.timer=new w(this),this.preferences=new L(this),this.scores=new E(this),this.storage=new P(this),this.confetti=new T(this),this.themes=new D(this),this.themeEditor=new _(this),this.initActions(),this.state=I.Menu,this.newGame=!1,this.saved=!1,this.storage.init(),this.preferences.init(),this.cube.init(),this.transition.init(),this.storage.loadGame(),this.scores.calcStats(),setTimeout(()=>{this.transition.float(),this.transition.cube(!0),setTimeout(()=>this.transition.title(!0),700),setTimeout(()=>this.transition.buttons(H.Menu,H.None),1e3)},500)}initActions(){let e=!1;this.dom.game.addEventListener('click',()=>{if(!(0e=!1,300),!1;this.game(!0)}else this.state===I.Complete?this.complete(!1):this.state===I.Stats&&this.stats(!1)},!1),this.controls.onMove=()=>{this.newGame&&(this.timer.start(!0),this.newGame=!1)},this.dom.buttons.back.onclick=()=>{0{this.state===I.Theme&&this.themeEditor.resetTheme()},this.dom.buttons.prefs.onclick=()=>this.prefs(!0),this.dom.buttons.theme.onclick=()=>this.theme(!0),this.dom.buttons.stats.onclick=()=>this.stats(!0),this.controls.onSolved=()=>this.complete(!0)}game(e){if(e){this.saved||(this.scrambler.scramble(),this.controls.scrambleCube(),this.newGame=!0);const e=this.saved?0:this.scrambler.converted.length*(this.controls.flipSpeeds[0]+10);this.state=I.Playing,this.saved=!0,this.transition.buttons(H.None,H.Menu),this.transition.zoom(I.Playing,e),this.transition.title(!1),setTimeout(()=>{this.transition.timer(!0),this.transition.buttons(H.Playing,H.None)},this.transition.durations.zoom-1e3),setTimeout(()=>{this.controls.enable(),this.newGame||this.timer.start(!0)},this.transition.durations.zoom)}else this.state=I.Menu,this.transition.buttons(H.Menu,H.Playing),this.transition.zoom(I.Menu,0),this.controls.disable(),this.newGame||this.timer.stop(),this.transition.timer(!1),setTimeout(()=>this.transition.title(!0),this.transition.durations.zoom-1e3),this.playing=!1,this.controls.disable()}prefs(e){if(e){if(0this.transition.preferences(!0),1e3)}else this.cube.resize(),this.state=I.Menu,this.transition.buttons(H.Menu,H.Prefs),this.transition.preferences(!1),setTimeout(()=>this.transition.cube(!0),500),setTimeout(()=>this.transition.title(!0),1200)}theme(e){if(this.themeEditor.colorPicker(e),e){if(0this.transition.cube(!0,!0),500),setTimeout(()=>this.transition.theming(!0),1e3)}else this.state=I.Prefs,this.transition.buttons(H.Prefs,H.Theme),this.transition.cube(!1,!0),this.transition.theming(!1),setTimeout(()=>this.transition.preferences(!0),1e3),setTimeout(()=>{const e=JSON.parse(localStorage.getItem('theCube_savedState'));return e?void this.cube.loadFromData(e):void this.cube.resize(!0)},1500)}stats(e){if(e){if(0this.transition.stats(!0),1e3)}else this.state=I.Menu,this.transition.buttons(H.Menu,H.None),this.transition.stats(!1),setTimeout(()=>this.transition.cube(!0),500),setTimeout(()=>this.transition.title(!0),1200)}complete(e){return e?void(this.transition.buttons(H.Complete,H.Playing),this.state=I.Complete,this.saved=!1,this.controls.disable(),this.timer.stop(),this.storage.clearGame(),this.bestTime=this.scores.addScore(this.timer.deltaTime),this.transition.zoom(I.Menu,0),this.transition.elevate(!0),setTimeout(()=>{this.transition.complete(!0,this.bestTime),this.confetti.start()},1e3)):(this.state=I.Stats,this.saved=!1,this.transition.timer(!1),this.transition.complete(!1,this.bestTime),this.transition.cube(!1),this.timer.reset(),setTimeout(()=>{this.cube.reset(),this.confetti.stop(),this.transition.stats(!0),this.transition.elevate(0)},1e3),!1)}}})(); diff --git a/public/the-cube-master/assets/js/three.js b/public/the-cube-master/assets/js/three.js new file mode 100644 index 0000000..c67a7e4 --- /dev/null +++ b/public/the-cube-master/assets/js/three.js @@ -0,0 +1,949 @@ +// threejs.org/license +(function(l,ya){"object"===typeof exports&&"undefined"!==typeof module?ya(exports):"function"===typeof define&&define.amd?define(["exports"],ya):ya(l.THREE={})})(this,function(l){function ya(){}function z(a,b){this.x=a||0;this.y=b||0}function I(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];0b&&(b=a[c]);return b}function C(){Object.defineProperty(this,"id",{value:If+=2});this.uuid=H.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange={start:0,count:Infinity};this.userData={}}function Ib(a,b,c,d,e,f){R.call(this);this.type="BoxGeometry";this.parameters={width:a,height:b,depth:c,widthSegments:d,heightSegments:e, +depthSegments:f};this.fromBufferGeometry(new kb(a,b,c,d,e,f));this.mergeVertices()}function kb(a,b,c,d,e,f){function g(a,b,c,d,e,f,g,l,N,O,Jf){var r=f/N,v=g/O,P=f/2,y=g/2,w=l/2;g=N+1;var E=O+1,x=f=0,B,z,A=new p;for(z=0;zm;m++){if(n=d[m])if(h=n[0],k=n[1]){q&&e.addAttribute("morphTarget"+m,q[h]);f&&e.addAttribute("morphNormal"+ +m,f[h]);c[m]=k;continue}c[m]=0}g.getUniforms().setValue(a,"morphTargetInfluences",c)}}}function Vf(a,b){var c={};return{update:function(d){var e=b.render.frame,f=d.geometry,g=a.get(d,f);c[g.id]!==e&&(f.isGeometry&&g.updateFromObject(d),a.update(g),c[g.id]=e);return g},dispose:function(){c={}}}}function Ua(a,b,c,d,e,f,g,h,k,m){a=void 0!==a?a:[];T.call(this,a,void 0!==b?b:301,c,d,e,f,g,h,k,m);this.flipY=!1}function Jb(a,b,c){var d=a[0];if(0>=d||0/gm, +function(a,c){a=S[c];if(void 0===a)throw Error("Can not resolve #include <"+c+">");return Xd(a)})}function Xe(a){return a.replace(/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(a,c,d,e){a="";for(c=parseInt(c);cb||a.height>b){if("data"in a){console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+a.width+"x"+a.height+")."); +return}b/=Math.max(a.width,a.height);var c=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");c.width=Math.floor(a.width*b);c.height=Math.floor(a.height*b);c.getContext("2d").drawImage(a,0,0,a.width,a.height,0,0,c.width,c.height);console.warn("THREE.WebGLRenderer: image is too big ("+a.width+"x"+a.height+"). Resized to "+c.width+"x"+c.height);return c}return a}function k(a){return H.isPowerOfTwo(a.width)&&H.isPowerOfTwo(a.height)}function m(a,b){return a.generateMipmaps&&b&&1003!== +a.minFilter&&1006!==a.minFilter}function q(b,c,e,f){a.generateMipmap(b);d.get(c).__maxMipLevel=Math.log(Math.max(e,f))*Math.LOG2E}function n(b,c){if(!e.isWebGL2)return b;if(b===a.RGB){if(c===a.FLOAT)return a.RGB32F;if(c===a.HALF_FLOAT)return a.RGB16F;if(c===a.UNSIGNED_BYTE)return a.RGB8}if(b===a.RGBA){if(c===a.FLOAT)return a.RGBA32F;if(c===a.HALF_FLOAT)return a.RGBA16F;if(c===a.UNSIGNED_BYTE)return a.RGBA8}return b}function t(b){return 1003===b||1004===b||1005===b?a.NEAREST:a.LINEAR}function u(b){b= +b.target;b.removeEventListener("dispose",u);a:{var c=d.get(b);if(b.image&&c.__image__webglTextureCube)a.deleteTexture(c.__image__webglTextureCube);else{if(void 0===c.__webglInit)break a;a.deleteTexture(c.__webglTexture)}d.remove(b)}b.isVideoTexture&&delete B[b.id];g.memory.textures--}function r(b){b=b.target;b.removeEventListener("dispose",r);var c=d.get(b),e=d.get(b.texture);if(b){void 0!==e.__webglTexture&&a.deleteTexture(e.__webglTexture);b.depthTexture&&b.depthTexture.dispose();if(b.isWebGLRenderTargetCube)for(e= +0;6>e;e++)a.deleteFramebuffer(c.__webglFramebuffer[e]),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer[e]);else a.deleteFramebuffer(c.__webglFramebuffer),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer);d.remove(b.texture);d.remove(b)}g.memory.textures--}function l(b,t){var r=d.get(b);if(b.isVideoTexture){var l=b.id,v=g.render.frame;B[l]!==v&&(B[l]=v,b.update())}if(0w;w++)v[w]=t||l?l?b.image[w].image:b.image[w]:h(b.image[w],e.maxCubemapSize);var y=v[0],E=k(y),P=f.convert(b.format),x=f.convert(b.type),N=n(P,x);p(a.TEXTURE_CUBE_MAP,b,E);for(w=0;6>w;w++)if(t)for(var B,z=v[w].mipmaps,A=0,D=z.length;At;t++)e.__webglFramebuffer[t]=a.createFramebuffer()}else e.__webglFramebuffer= +a.createFramebuffer();if(h){c.bindTexture(a.TEXTURE_CUBE_MAP,f.__webglTexture);p(a.TEXTURE_CUBE_MAP,b.texture,n);for(t=0;6>t;t++)x(e.__webglFramebuffer[t],b,a.COLOR_ATTACHMENT0,a.TEXTURE_CUBE_MAP_POSITIVE_X+t);m(b.texture,n)&&q(a.TEXTURE_CUBE_MAP,b.texture,b.width,b.height);c.bindTexture(a.TEXTURE_CUBE_MAP,null)}else c.bindTexture(a.TEXTURE_2D,f.__webglTexture),p(a.TEXTURE_2D,b.texture,n),x(e.__webglFramebuffer,b,a.COLOR_ATTACHMENT0,a.TEXTURE_2D),m(b.texture,n)&&q(a.TEXTURE_2D,b.texture,b.width,b.height), +c.bindTexture(a.TEXTURE_2D,null);if(b.depthBuffer){e=d.get(b);f=!0===b.isWebGLRenderTargetCube;if(b.depthTexture){if(f)throw Error("target.depthTexture not supported in Cube render targets");if(b&&b.isWebGLRenderTargetCube)throw Error("Depth Texture with cube render targets is not supported");a.bindFramebuffer(a.FRAMEBUFFER,e.__webglFramebuffer);if(!b.depthTexture||!b.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");d.get(b.depthTexture).__webglTexture&& +b.depthTexture.image.width===b.width&&b.depthTexture.image.height===b.height||(b.depthTexture.image.width=b.width,b.depthTexture.image.height=b.height,b.depthTexture.needsUpdate=!0);l(b.depthTexture,0);e=d.get(b.depthTexture).__webglTexture;if(1026===b.depthTexture.format)a.framebufferTexture2D(a.FRAMEBUFFER,a.DEPTH_ATTACHMENT,a.TEXTURE_2D,e,0);else if(1027===b.depthTexture.format)a.framebufferTexture2D(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.TEXTURE_2D,e,0);else throw Error("Unknown depthTexture format"); +}else if(f)for(e.__webglDepthbuffer=[],f=0;6>f;f++)a.bindFramebuffer(a.FRAMEBUFFER,e.__webglFramebuffer[f]),e.__webglDepthbuffer[f]=a.createRenderbuffer(),w(e.__webglDepthbuffer[f],b);else a.bindFramebuffer(a.FRAMEBUFFER,e.__webglFramebuffer),e.__webglDepthbuffer=a.createRenderbuffer(),w(e.__webglDepthbuffer,b);a.bindFramebuffer(a.FRAMEBUFFER,null)}};this.updateRenderTargetMipmap=function(b){var e=b.texture,f=k(b);if(m(e,f)){f=b.isWebGLRenderTargetCube?a.TEXTURE_CUBE_MAP:a.TEXTURE_2D;var g=d.get(e).__webglTexture; +c.bindTexture(f,g);q(f,e,b.width,b.height);c.bindTexture(f,null)}}}function $e(a,b,c){return{convert:function(d){if(1E3===d)return a.REPEAT;if(1001===d)return a.CLAMP_TO_EDGE;if(1002===d)return a.MIRRORED_REPEAT;if(1003===d)return a.NEAREST;if(1004===d)return a.NEAREST_MIPMAP_NEAREST;if(1005===d)return a.NEAREST_MIPMAP_LINEAR;if(1006===d)return a.LINEAR;if(1007===d)return a.LINEAR_MIPMAP_NEAREST;if(1008===d)return a.LINEAR_MIPMAP_LINEAR;if(1009===d)return a.UNSIGNED_BYTE;if(1017===d)return a.UNSIGNED_SHORT_4_4_4_4; +if(1018===d)return a.UNSIGNED_SHORT_5_5_5_1;if(1019===d)return a.UNSIGNED_SHORT_5_6_5;if(1010===d)return a.BYTE;if(1011===d)return a.SHORT;if(1012===d)return a.UNSIGNED_SHORT;if(1013===d)return a.INT;if(1014===d)return a.UNSIGNED_INT;if(1015===d)return a.FLOAT;if(1016===d){if(c.isWebGL2)return a.HALF_FLOAT;var e=b.get("OES_texture_half_float");if(null!==e)return e.HALF_FLOAT_OES}if(1021===d)return a.ALPHA;if(1022===d)return a.RGB;if(1023===d)return a.RGBA;if(1024===d)return a.LUMINANCE;if(1025=== +d)return a.LUMINANCE_ALPHA;if(1026===d)return a.DEPTH_COMPONENT;if(1027===d)return a.DEPTH_STENCIL;if(100===d)return a.FUNC_ADD;if(101===d)return a.FUNC_SUBTRACT;if(102===d)return a.FUNC_REVERSE_SUBTRACT;if(200===d)return a.ZERO;if(201===d)return a.ONE;if(202===d)return a.SRC_COLOR;if(203===d)return a.ONE_MINUS_SRC_COLOR;if(204===d)return a.SRC_ALPHA;if(205===d)return a.ONE_MINUS_SRC_ALPHA;if(206===d)return a.DST_ALPHA;if(207===d)return a.ONE_MINUS_DST_ALPHA;if(208===d)return a.DST_COLOR;if(209=== +d)return a.ONE_MINUS_DST_COLOR;if(210===d)return a.SRC_ALPHA_SATURATE;if(33776===d||33777===d||33778===d||33779===d)if(e=b.get("WEBGL_compressed_texture_s3tc"),null!==e){if(33776===d)return e.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===d)return e.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===d)return e.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===d)return e.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===d||35841===d||35842===d||35843===d)if(e=b.get("WEBGL_compressed_texture_pvrtc"),null!==e){if(35840===d)return e.COMPRESSED_RGB_PVRTC_4BPPV1_IMG; +if(35841===d)return e.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===d)return e.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===d)return e.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===d&&(e=b.get("WEBGL_compressed_texture_etc1"),null!==e))return e.COMPRESSED_RGB_ETC1_WEBGL;if(37808===d||37809===d||37810===d||37811===d||37812===d||37813===d||37814===d||37815===d||37816===d||37817===d||37818===d||37819===d||37820===d||37821===d)if(e=b.get("WEBGL_compressed_texture_astc"),null!==e)return d;if(103===d||104=== +d){if(c.isWebGL2){if(103===d)return a.MIN;if(104===d)return a.MAX}e=b.get("EXT_blend_minmax");if(null!==e){if(103===d)return e.MIN_EXT;if(104===d)return e.MAX_EXT}}if(1020===d){if(c.isWebGL2)return a.UNSIGNED_INT_24_8;e=b.get("WEBGL_depth_texture");if(null!==e)return e.UNSIGNED_INT_24_8_WEBGL}return 0}}}function Kb(){D.call(this);this.type="Group"}function Z(a,b,c,d){Na.call(this);this.type="PerspectiveCamera";this.fov=void 0!==a?a:50;this.zoom=1;this.near=void 0!==c?c:.1;this.far=void 0!==d?d:2E3; +this.focus=10;this.aspect=void 0!==b?b:1;this.view=null;this.filmGauge=35;this.filmOffset=0;this.updateProjectionMatrix()}function yc(a){Z.call(this);this.cameras=a||[]}function af(a){function b(){return null!==e&&!0===e.isPresenting}function c(){if(b()){var c=e.getEyeParameters("left"),f=c.renderWidth;c=c.renderHeight;x=a.getPixelRatio();y=a.getSize();a.setDrawingBufferSize(2*f,c,1);B.start()}else d.enabled&&(a.setDrawingBufferSize(y.width,y.height,x),B.stop())}var d=this,e=null,f=null,g=null,h= +[],k=new I,m=new I;"undefined"!==typeof window&&"VRFrameData"in window&&(f=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",c,!1));var q=new I,n=new fa,t=new p,u=new Z;u.bounds=new V(0,0,.5,1);u.layers.enable(1);var r=new Z;r.bounds=new V(.5,0,.5,1);r.layers.enable(2);var l=new yc([u,r]);l.layers.enable(1);l.layers.enable(2);var y,x,w=[];this.enabled=!1;this.userHeight=1.6;this.getController=function(a){var b=h[a];void 0===b&&(b=new Kb,b.matrixAutoUpdate=!1,b.visible=!1,h[a]= +b);return b};this.getDevice=function(){return e};this.setDevice=function(a){void 0!==a&&(e=a);B.setContext(a)};this.setPoseTarget=function(a){void 0!==a&&(g=a)};this.getCamera=function(a){if(null===e)return a.position.set(0,d.userHeight,0),a;e.depthNear=a.near;e.depthFar=a.far;e.getFrameData(f);var b=e.stageParameters;b?k.fromArray(b.sittingToStandingTransform):k.makeTranslation(0,d.userHeight,0);b=f.pose;var c=null!==g?g:a;c.matrix.copy(k);c.matrix.decompose(c.position,c.quaternion,c.scale);null!== +b.orientation&&(n.fromArray(b.orientation),c.quaternion.multiply(n));null!==b.position&&(n.setFromRotationMatrix(k),t.fromArray(b.position),t.applyQuaternion(n),c.position.add(t));c.updateMatrixWorld();if(!1===e.isPresenting)return a;u.near=a.near;r.near=a.near;u.far=a.far;r.far=a.far;l.matrixWorld.copy(a.matrixWorld);l.matrixWorldInverse.copy(a.matrixWorldInverse);u.matrixWorldInverse.fromArray(f.leftViewMatrix);r.matrixWorldInverse.fromArray(f.rightViewMatrix);m.getInverse(k);u.matrixWorldInverse.multiply(m); +r.matrixWorldInverse.multiply(m);a=c.parent;null!==a&&(q.getInverse(a.matrixWorld),u.matrixWorldInverse.multiply(q),r.matrixWorldInverse.multiply(q));u.matrixWorld.getInverse(u.matrixWorldInverse);r.matrixWorld.getInverse(r.matrixWorldInverse);u.projectionMatrix.fromArray(f.leftProjectionMatrix);r.projectionMatrix.fromArray(f.rightProjectionMatrix);l.projectionMatrix.copy(u.projectionMatrix);a=e.getLayers();a.length&&(a=a[0],null!==a.leftBounds&&4===a.leftBounds.length&&u.bounds.fromArray(a.leftBounds), +null!==a.rightBounds&&4===a.rightBounds.length&&r.bounds.fromArray(a.rightBounds));a:for(a=0;af.normalMatrix.determinant();ba.setMaterial(e,h);var k=t(a,c,e,f),m=!1;if(b!==d.id||S!==k.id||nd!==(!0===e.wireframe))b=d.id,S=k.id,nd=!0===e.wireframe,m=!0;f.morphTargetInfluences&&(va.update(f,d,e,k),m=!0);h=d.index;var q=d.attributes.position;c=1;!0===e.wireframe&& +(h=ra.getWireframeAttribute(d),c=2);a=xa;if(null!==h){var n=pa.get(h);a=ya;a.setIndex(n)}if(m){if(d&&d.isInstancedBufferGeometry&!ua.isWebGL2&&null===ha.get("ANGLE_instanced_arrays"))console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");else{ba.initAttributes();m=d.attributes;k=k.getAttributes();var u=e.defaultAttributeValues;for(N in k){var l=k[N];if(0<=l){var r=m[N];if(void 0!==r){var v=r.normalized, +p=r.itemSize,w=pa.get(r);if(void 0!==w){var y=w.buffer,E=w.type;w=w.bytesPerElement;if(r.isInterleavedBufferAttribute){var x=r.data,B=x.stride;r=r.offset;x&&x.isInstancedInterleavedBuffer?(ba.enableAttributeAndDivisor(l,x.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=x.meshPerAttribute*x.count)):ba.enableAttribute(l);F.bindBuffer(F.ARRAY_BUFFER,y);F.vertexAttribPointer(l,p,E,v,B*w,r*w)}else r.isInstancedBufferAttribute?(ba.enableAttributeAndDivisor(l,r.meshPerAttribute),void 0=== +d.maxInstancedCount&&(d.maxInstancedCount=r.meshPerAttribute*r.count)):ba.enableAttribute(l),F.bindBuffer(F.ARRAY_BUFFER,y),F.vertexAttribPointer(l,p,E,v,0,0)}}else if(void 0!==u&&(v=u[N],void 0!==v))switch(v.length){case 2:F.vertexAttrib2fv(l,v);break;case 3:F.vertexAttrib3fv(l,v);break;case 4:F.vertexAttrib4fv(l,v);break;default:F.vertexAttrib1fv(l,v)}}}ba.disableUnusedAttributes()}null!==h&&F.bindBuffer(F.ELEMENT_ARRAY_BUFFER,n.buffer)}n=Infinity;null!==h?n=h.count:void 0!==q&&(n=q.count);h=d.drawRange.start* +c;q=null!==g?g.start*c:0;var N=Math.max(h,q);g=Math.max(0,Math.min(n,h+d.drawRange.count*c,q+(null!==g?g.count*c:Infinity))-1-N+1);if(0!==g){if(f.isMesh)if(!0===e.wireframe)ba.setLineWidth(e.wireframeLinewidth*(null===R?U:1)),a.setMode(F.LINES);else switch(f.drawMode){case 0:a.setMode(F.TRIANGLES);break;case 1:a.setMode(F.TRIANGLE_STRIP);break;case 2:a.setMode(F.TRIANGLE_FAN)}else f.isLine?(e=e.linewidth,void 0===e&&(e=1),ba.setLineWidth(e*(null===R?U:1)),f.isLineSegments?a.setMode(F.LINES):f.isLineLoop? +a.setMode(F.LINE_LOOP):a.setMode(F.LINE_STRIP)):f.isPoints?a.setMode(F.POINTS):f.isSprite&&a.setMode(F.TRIANGLES);d&&d.isInstancedBufferGeometry?0=ua.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+a+" texture units while this GPU supports only "+ua.maxTextures);X+=1;return a}; +this.setTexture2D=function(){var a=!1;return function(b,c){b&&b.isWebGLRenderTarget&&(a||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),a=!0),b=b.texture);ia.setTexture2D(b,c)}}();this.setTexture=function(){var a=!1;return function(b,c){a||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),a=!0);ia.setTexture2D(b,c)}}();this.setTextureCube=function(){var a=!1;return function(b,c){b&& +b.isWebGLRenderTargetCube&&(a||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),a=!0),b=b.texture);b&&b.isCubeTexture||Array.isArray(b.image)&&6===b.image.length?ia.setTextureCube(b,c):ia.setTextureCubeDynamic(b,c)}}();this.setFramebuffer=function(a){L=a};this.getRenderTarget=function(){return R};this.setRenderTarget=function(a){(R=a)&&void 0===Ba.get(a).__webglFramebuffer&&ia.setupRenderTarget(a);var b=L,c=!1;a?(b= +Ba.get(a).__webglFramebuffer,a.isWebGLRenderTargetCube&&(b=b[a.activeCubeFace],c=!0),T.copy(a.viewport),wc.copy(a.scissor),ea=a.scissorTest):(T.copy(od).multiplyScalar(U),wc.copy(fa).multiplyScalar(U),ea=qa);Q!==b&&(F.bindFramebuffer(F.FRAMEBUFFER,b),Q=b);ba.viewport(T);ba.scissor(wc);ba.setScissorTest(ea);c&&(c=Ba.get(a.texture),F.framebufferTexture2D(F.FRAMEBUFFER,F.COLOR_ATTACHMENT0,F.TEXTURE_CUBE_MAP_POSITIVE_X+a.activeCubeFace,c.__webglTexture,a.activeMipMapLevel))};this.readRenderTargetPixels= +function(a,b,c,d,e,f){if(a&&a.isWebGLRenderTarget){var g=Ba.get(a).__webglFramebuffer;if(g){var h=!1;g!==Q&&(F.bindFramebuffer(F.FRAMEBUFFER,g),h=!0);try{var k=a.texture,m=k.format,q=k.type;1023!==m&&da.convert(m)!==F.getParameter(F.IMPLEMENTATION_COLOR_READ_FORMAT)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===q||da.convert(q)===F.getParameter(F.IMPLEMENTATION_COLOR_READ_TYPE)||1015===q&&(ua.isWebGL2||ha.get("OES_texture_float")|| +ha.get("WEBGL_color_buffer_float"))||1016===q&&(ua.isWebGL2?ha.get("EXT_color_buffer_float"):ha.get("EXT_color_buffer_half_float"))?F.checkFramebufferStatus(F.FRAMEBUFFER)===F.FRAMEBUFFER_COMPLETE?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&F.readPixels(b,c,d,e,da.convert(m),da.convert(q),f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{h&& +F.bindFramebuffer(F.FRAMEBUFFER,Q)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")};this.copyFramebufferToTexture=function(a,b,c){var d=b.image.width,e=b.image.height,f=da.convert(b.format);this.setTexture2D(b,0);F.copyTexImage2D(F.TEXTURE_2D,c||0,f,a.x,a.y,d,e,0)};this.copyTextureToTexture=function(a,b,c,d){var e=b.image.width,f=b.image.height,g=da.convert(c.format),h=da.convert(c.type);this.setTexture2D(c,0);b.isDataTexture?F.texSubImage2D(F.TEXTURE_2D, +d||0,a.x,a.y,e,f,g,h,b.image.data):F.texSubImage2D(F.TEXTURE_2D,d||0,a.x,a.y,g,h,b.image)}}function Lb(a,b){this.name="";this.color=new G(a);this.density=void 0!==b?b:2.5E-4}function Mb(a,b,c){this.name="";this.color=new G(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3}function qd(){D.call(this);this.type="Scene";this.overrideMaterial=this.fog=this.background=null;this.autoUpdate=!0}function ob(a,b){this.array=a;this.stride=b;this.count=void 0!==a?a.length/b:0;this.dynamic=!1;this.updateRange= +{offset:0,count:-1};this.version=0}function zc(a,b,c,d){this.data=a;this.itemSize=b;this.offset=c;this.normalized=!0===d}function cb(a){J.call(this);this.type="SpriteMaterial";this.color=new G(16777215);this.map=null;this.rotation=0;this.lights=!1;this.transparent=!0;this.setValues(a)}function Ac(a){D.call(this);this.type="Sprite";if(void 0===Nb){Nb=new C;var b=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]);b=new ob(b,5);Nb.setIndex([0,1,2,0,2,3]);Nb.addAttribute("position", +new zc(b,3,0,!1));Nb.addAttribute("uv",new zc(b,2,3,!1))}this.geometry=Nb;this.material=void 0!==a?a:new cb;this.center=new z(.5,.5)}function Bc(){D.call(this);this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Cc(a,b){a=a||[];this.bones=a.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);if(void 0===b)this.calculateInverses();else if(this.bones.length===b.length)this.boneInverses=b.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."), +this.boneInverses=[],a=0,b=this.bones.length;ac;c++){var n=q[h[c]];var t=q[h[(c+1)%3]];f[0]=Math.min(n,t);f[1]=Math.max(n,t);n=f[0]+","+f[1];void 0===g[n]&&(g[n]={index1:f[0],index2:f[1]})}}for(n in g)m=g[n],h=a.vertices[m.index1],b.push(h.x,h.y,h.z),h=a.vertices[m.index2],b.push(h.x,h.y,h.z)}else if(a&&a.isBufferGeometry)if(h=new p,null!==a.index){k=a.attributes.position;q=a.index;var u=a.groups;0===u.length&&(u=[{start:0, +count:q.count,materialIndex:0}]);a=0;for(e=u.length;ac;c++)n=q.getX(m+c),t=q.getX(m+(c+1)%3),f[0]=Math.min(n,t),f[1]=Math.max(n,t),n=f[0]+","+f[1],void 0===g[n]&&(g[n]={index1:f[0],index2:f[1]});for(n in g)m=g[n],h.fromBufferAttribute(k,m.index1),b.push(h.x,h.y,h.z),h.fromBufferAttribute(k,m.index2),b.push(h.x,h.y,h.z)}else for(k=a.attributes.position,m=0,d=k.count/3;mc;c++)g=3*m+c,h.fromBufferAttribute(k,g),b.push(h.x, +h.y,h.z),g=3*m+(c+1)%3,h.fromBufferAttribute(k,g),b.push(h.x,h.y,h.z);this.addAttribute("position",new A(b,3))}function Fc(a,b,c){R.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new Rb(a,b,c));this.mergeVertices()}function Rb(a,b,c){C.call(this);this.type="ParametricBufferGeometry";this.parameters={func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],h=new p,k=new p,m=new p,q=new p,n=new p,t,u;3>a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter."); +var r=b+1;for(t=0;t<=c;t++){var l=t/c;for(u=0;u<=b;u++){var y=u/b;a(y,l,k);e.push(k.x,k.y,k.z);0<=y-1E-5?(a(y-1E-5,l,m),q.subVectors(k,m)):(a(y+1E-5,l,m),q.subVectors(m,k));0<=l-1E-5?(a(y,l-1E-5,m),n.subVectors(k,m)):(a(y,l+1E-5,m),n.subVectors(m,k));h.crossVectors(q,n).normalize();f.push(h.x,h.y,h.z);g.push(y,l)}}for(t=0;td&&1===a.x&&(k[b]=a.x-1);0===c.x&&0===c.z&&(k[b]=d/2/Math.PI+.5)}C.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:a, +indices:b,radius:c,detail:d};c=c||1;d=d||0;var h=[],k=[];(function(a){for(var c=new p,d=new p,g=new p,h=0;he&&(.2>b&&(k[a+0]+=1),.2>c&&(k[a+2]+=1),.2>d&&(k[a+4]+=1))})();this.addAttribute("position",new A(h,3));this.addAttribute("normal",new A(h.slice(),3));this.addAttribute("uv",new A(k,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Hc(a, +b){R.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Sb(a,b));this.mergeVertices()}function Sb(a,b){na.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],a,b);this.type="TetrahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Ic(a,b){R.call(this);this.type="OctahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new pb(a,b));this.mergeVertices()}function pb(a,b){na.call(this,[1,0,0, +-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],a,b);this.type="OctahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Jc(a,b){R.call(this);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Tb(a,b));this.mergeVertices()}function Tb(a,b){var c=(1+Math.sqrt(5))/2;na.call(this,[-1,c,0,1,c,0,-1,-c,0,1,-c,0,0,-1,c,0,1,c,0,-1,-c,0,1,-c,c,0,-1,c,0,1,-c,0,-1,-c,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5, +11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],a,b);this.type="IcosahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Kc(a,b){R.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Ub(a,b));this.mergeVertices()}function Ub(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;na.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-d,-c,0,-d,c,0,d,-c,0,d,c,-d,-c,0,-d,c,0,d,-c,0,d,c, +0,-c,0,-d,c,0,-d,-c,0,d,c,0,d],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],a,b);this.type="DodecahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Lc(a,b,c,d,e,f){R.call(this);this.type="TubeGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d, +closed:e};void 0!==f&&console.warn("THREE.TubeGeometry: taper has been removed.");a=new Vb(a,b,c,d,e);this.tangents=a.tangents;this.normals=a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function Vb(a,b,c,d,e){function f(e){q=a.getPointAt(e/b,q);var f=g.normals[e];e=g.binormals[e];for(t=0;t<=d;t++){var m=t/d*Math.PI*2,n=Math.sin(m);m=-Math.cos(m);k.x=m*f.x+n*e.x;k.y=m*f.y+n*e.y;k.z=m*f.z+n*e.z;k.normalize();r.push(k.x,k.y,k.z);h.x=q.x+c*k.x;h.y=q.y+c*k.y;h.z= +q.z+c*k.z;l.push(h.x,h.y,h.z)}}C.call(this);this.type="TubeBufferGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};b=b||64;c=c||1;d=d||8;e=e||!1;var g=a.computeFrenetFrames(b,e);this.tangents=g.tangents;this.normals=g.normals;this.binormals=g.binormals;var h=new p,k=new p,m=new z,q=new p,n,t,l=[],r=[],v=[],y=[];for(n=0;n=b;e-=d)f=cf(e,a[e],a[e+1],f);f&&qb(f,f.next)&&(Oc(f),f=f.next);return f}function Pc(a,b){if(!a)return a;b||(b=a);do{var c=!1;if(a.steiner||!qb(a,a.next)&&0!==ma(a.prev,a,a.next))a=a.next;else{Oc(a);a=b=a.prev;if(a===a.next)break;c=!0}}while(c||a!==b);return b} +function Qc(a,b,c,d,e,f,g){if(a){if(!g&&f){var h=a,k=h;do null===k.z&&(k.z=ae(k.x,k.y,d,e,f)),k.prevZ=k.prev,k=k.nextZ=k.next;while(k!==h);k.prevZ.nextZ=null;k.prevZ=null;h=k;var m,q,n,t,l=1;do{k=h;var r=h=null;for(q=0;k;){q++;var v=k;for(m=n=0;mn.x?q.x>l.x?q.x:l.x:n.x>l.x?n.x:l.x,B=q.y>n.y?q.y>l.y?q.y:l.y:n.y>l.y?n.y:l.y;m=ae(q.x=m;){if(p!==r.prev&&p!==r.next&&ud(q.x,q.y,n.x,n.y,l.x,l.y,p.x,p.y)&&0<=ma(p.prev,p,p.next)){r=!1;break a}p= +p.prevZ}r=!0}}else a:if(r=a,q=r.prev,n=r,l=r.next,0<=ma(q,n,l))r=!1;else{for(m=r.next.next;m!==r.prev;){if(ud(q.x,q.y,n.x,n.y,l.x,l.y,m.x,m.y)&&0<=ma(m.prev,m,m.next)){r=!1;break a}m=m.next}r=!0}if(r)b.push(k.i/c),b.push(a.i/c),b.push(v.i/c),Oc(a),h=a=v.next;else if(a=v,a===h){if(!g)Qc(Pc(a),b,c,d,e,f,1);else if(1===g){g=b;h=c;k=a;do v=k.prev,r=k.next.next,!qb(v,r)&&df(v,k,k.next,r)&&Rc(v,r)&&Rc(r,v)&&(g.push(v.i/h),g.push(k.i/h),g.push(r.i/h),Oc(k),Oc(k.next),k=a=r),k=k.next;while(k!==a);a=k;Qc(a, +b,c,d,e,f,2)}else if(2===g)a:{g=a;do{for(h=g.next.next;h!==g.prev;){if(k=g.i!==h.i){k=g;v=h;if(r=k.next.i!==v.i&&k.prev.i!==v.i){b:{r=k;do{if(r.i!==k.i&&r.next.i!==k.i&&r.i!==v.i&&r.next.i!==v.i&&df(r,r.next,k,v)){r=!0;break b}r=r.next}while(r!==k);r=!1}r=!r}if(r=r&&Rc(k,v)&&Rc(v,k)){r=k;q=!1;n=(k.x+v.x)/2;v=(k.y+v.y)/2;do r.y>v!==r.next.y>v&&r.next.y!==r.y&&n<(r.next.x-r.x)*(v-r.y)/(r.next.y-r.y)+r.x&&(q=!q),r=r.next;while(r!==k);r=q}k=r}if(k){a=ef(g,h);g=Pc(g,g.next);a=Pc(a,a.next);Qc(g,b,c,d,e, +f);Qc(a,b,c,d,e,f);break a}h=h.next}g=g.next}while(g!==a)}break}}}}function Ng(a,b){return a.x-b.x}function Og(a,b){var c=b,d=a.x,e=a.y,f=-Infinity;do{if(e<=c.y&&e>=c.next.y&&c.next.y!==c.y){var g=c.x+(e-c.y)*(c.next.x-c.x)/(c.next.y-c.y);if(g<=d&&g>f){f=g;if(g===d){if(e===c.y)return c;if(e===c.next.y)return c.next}var h=c.x=c.x&&c.x>=g&&d!==c.x&&ud(eh.x)&&Rc(c,a)&&(h=c,m=q)}c=c.next}return h}function ae(a,b,c,d,e){a=32767*(a-c)*e;b=32767*(b-d)*e;a=(a|a<<8)&16711935;a=(a|a<<4)&252645135;a=(a|a<<2)&858993459;b=(b|b<<8)&16711935;b=(b|b<<4)&252645135;b=(b|b<<2)&858993459;return(a|a<<1)&1431655765|((b|b<<1)&1431655765)<<1}function Pg(a){var b=a,c=a;do b.xma(a.prev,a,a.next)?0<=ma(a,b,a.next)&&0<=ma(a,a.prev,b):0>ma(a,b,a.prev)||0>ma(a,a.next,b)}function ef(a,b){var c=new be(a.i,a.x,a.y),d=new be(b.i,b.x,b.y),e=a.next,f=b.prev;a.next=b;b.prev=a;c.next=e;e.prev= +c;d.next=c;c.prev=d;f.next=d;d.prev=f;return d}function cf(a,b,c,d){a=new be(a,b,c);d?(a.next=d.next,a.prev=d,d.next.prev=a,d.next=a):(a.prev=a,a.next=a);return a}function Oc(a){a.next.prev=a.prev;a.prev.next=a.next;a.prevZ&&(a.prevZ.nextZ=a.nextZ);a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function be(a,b,c){this.i=a;this.x=b;this.y=c;this.nextZ=this.prevZ=this.z=this.next=this.prev=null;this.steiner=!1}function ff(a){var b=a.length;2Number.EPSILON){var k=Math.sqrt(h),m=Math.sqrt(f*f+g*g);h=b.x-e/k;b=b.y+d/k; +g=((c.x-g/m-h)*g-(c.y+f/m-b)*f)/(d*g-e*f);f=h+d*g-a.x;d=b+e*g-a.y;e=f*f+d*d;if(2>=e)return new z(f,d);e=Math.sqrt(e/2)}else a=!1,d>Number.EPSILON?f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(f=-e,e=Math.sqrt(h)):(f=d,d=e,e=Math.sqrt(h/2));return new z(f/e,d/e)}function h(a,b){for(M=a.length;0<=--M;){var c=M;var f=M-1;0>f&&(f=a.length-1);var g,h=w+2*O;for(g=0;gq;q++){var n=m[f[q]];var l=m[f[(q+1)%3]];d[0]=Math.min(n,l);d[1]=Math.max(n,l);n=d[0]+","+d[1];void 0===e[n]?e[n]={index1:d[0],index2:d[1],face1:h,face2:void 0}:e[n].face2=h}for(n in e)if(d=e[n],void 0===d.face2||g[d.face1].normal.dot(g[d.face2].normal)<=b)f=a[d.index1],c.push(f.x,f.y,f.z),f=a[d.index2], +c.push(f.x,f.y,f.z);this.addAttribute("position",new A(c,3))}function vb(a,b,c,d,e,f,g,h){R.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};this.fromBufferGeometry(new Wa(a,b,c,d,e,f,g,h));this.mergeVertices()}function Wa(a,b,c,d,e,f,g,h){function k(c){var e,f=new z,k=new p,t=0,v=!0===c?a:b,w=!0===c?1:-1;var A=r;for(e=1;e<=d;e++)n.push(0,y*w,0),l.push(0,w,0),u.push(.5,.5),r++;var C= +r;for(e=0;e<=d;e++){var D=e/d*h+g,H=Math.cos(D);D=Math.sin(D);k.x=v*D;k.y=y*w;k.z=v*H;n.push(k.x,k.y,k.z);l.push(0,w,0);f.x=.5*H+.5;f.y=.5*D*w+.5;u.push(f.x,f.y);r++}for(e=0;ethis.duration&&this.resetDuration()}function Rg(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return ec;case "vector":case "vector2":case "vector3":case "vector4":return fc; +case "color":return Hd;case "quaternion":return cd;case "bool":case "boolean":return Gd;case "string":return Jd}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+a);}function Sg(a){if(void 0===a.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var b=Rg(a.type);if(void 0===a.times){var c=[],d=[];ia.flattenJSON(a.keys,c,d,"value");a.times=c;a.values=d}return void 0!==b.parse?b.parse(a):new b(a.name,a.times,a.values,a.interpolation)}function Kd(a){this.manager=void 0!== +a?a:ka;this.textures={}}function ge(a){this.manager=void 0!==a?a:ka}function gc(){}function he(a){"boolean"===typeof a&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),a=void 0);this.manager=void 0!==a?a:ka;this.withCredentials=!1}function mf(a){this.manager=void 0!==a?a:ka;this.texturePath=""}function ie(a){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."); +this.manager=void 0!==a?a:ka;this.options=void 0}function je(){this.type="ShapePath";this.color=new G;this.subPaths=[];this.currentPath=null}function ke(a){this.type="Font";this.data=a}function nf(a){this.manager=void 0!==a?a:ka}function le(a){this.manager=void 0!==a?a:ka}function of(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new Z;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new Z;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate= +!1}function dd(a,b,c){D.call(this);this.type="CubeCamera";var d=new Z(90,1,a,b);d.up.set(0,-1,0);d.lookAt(new p(1,0,0));this.add(d);var e=new Z(90,1,a,b);e.up.set(0,-1,0);e.lookAt(new p(-1,0,0));this.add(e);var f=new Z(90,1,a,b);f.up.set(0,0,1);f.lookAt(new p(0,1,0));this.add(f);var g=new Z(90,1,a,b);g.up.set(0,0,-1);g.lookAt(new p(0,-1,0));this.add(g);var h=new Z(90,1,a,b);h.up.set(0,-1,0);h.lookAt(new p(0,0,1));this.add(h);var k=new Z(90,1,a,b);k.up.set(0,-1,0);k.lookAt(new p(0,0,-1));this.add(k); +this.renderTarget=new Gb(c,c,{format:1022,magFilter:1006,minFilter:1006});this.renderTarget.texture.name="CubeCamera";this.update=function(a,b){null===this.parent&&this.updateMatrixWorld();var c=this.renderTarget,m=c.texture.generateMipmaps;c.texture.generateMipmaps=!1;c.activeCubeFace=0;a.render(b,d,c);c.activeCubeFace=1;a.render(b,e,c);c.activeCubeFace=2;a.render(b,f,c);c.activeCubeFace=3;a.render(b,g,c);c.activeCubeFace=4;a.render(b,h,c);c.texture.generateMipmaps=m;c.activeCubeFace=5;a.render(b, +k,c);a.setRenderTarget(null)};this.clear=function(a,b,c,d){for(var e=this.renderTarget,f=0;6>f;f++)e.activeCubeFace=f,a.setRenderTarget(e),a.clear(b,c,d);a.setRenderTarget(null)}}function me(){D.call(this);this.type="AudioListener";this.context=ne.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null}function hc(a){D.call(this);this.type="Audio";this.context=a.context;this.gain=this.context.createGain();this.gain.connect(a.getInput());this.autoplay= +!1;this.buffer=null;this.loop=!1;this.offset=this.startTime=0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty";this.filters=[]}function oe(a){hc.call(this,a);this.panner=this.context.createPanner();this.panner.connect(this.gain)}function pe(a,b){this.analyser=a.context.createAnalyser();this.analyser.fftSize=void 0!==b?b:2048;this.data=new Uint8Array(this.analyser.frequencyBinCount);a.getOutput().connect(this.analyser)}function qe(a,b,c){this.binding=a;this.valueSize= +c;a=Float64Array;switch(b){case "quaternion":b=this._slerp;break;case "string":case "bool":a=Array;b=this._select;break;default:b=this._lerp}this.buffer=new a(4*c);this._mixBufferRegion=b;this.referenceCount=this.useCount=this.cumulativeWeight=0}function pf(a,b,c){c=c||pa.parseTrackName(b);this._targetGroup=a;this._bindings=a.subscribe_(b,c)}function pa(a,b,c){this.path=b;this.parsedPath=c||pa.parseTrackName(b);this.node=pa.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a}function qf(){this.uuid= +H.generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_=0;var a={};this._indicesByUUID=a;for(var b=0,c=arguments.length;b!==c;++b)a[arguments[b].uuid]=b;this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath={};var d=this;this.stats={objects:{get total(){return d._objects.length},get inUse(){return this.total-d.nCachedObjects_}},get bindingsPerObject(){return d._bindings.length}}}function rf(a,b,c){this._mixer=a;this._clip=b;this._localRoot= +c||null;a=b.tracks;b=a.length;c=Array(b);for(var d={endingStart:2400,endingEnd:2400},e=0;e!==b;++e){var f=a[e].createInterpolant(null);c[e]=f;f.settings=d}this._interpolantSettings=d;this._interpolants=c;this._propertyBindings=Array(b);this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null;this.loop=2201;this._loopCount=-1;this._startTime=null;this.time=0;this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1;this.repetitions=Infinity; +this.paused=!1;this.enabled=!0;this.clampWhenFinished=!1;this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function re(a){this._root=a;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function Ld(a,b){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),a=b);this.value=a}function se(){C.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function te(a,b,c){ob.call(this,a,b);this.meshPerAttribute=c||1}function ue(a,b,c){Q.call(this, +a,b);this.meshPerAttribute=c||1}function sf(a,b,c,d){this.ray=new mb(a,b);this.near=c||0;this.far=d||Infinity;this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}};Object.defineProperties(this.params,{PointCloud:{get:function(){console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points.");return this.Points}}})}function tf(a,b){return a.distance-b.distance}function ve(a,b,c,d){if(!1!==a.visible&&(a.raycast(b,c),!0===d)){a=a.children;d=0;for(var e=a.length;dc;c++,d++){var e=c/32*Math.PI*2,f=d/32*Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.addAttribute("position",new A(b,3));b=new Y({fog:!1});this.cone=new W(a,b);this.add(this.cone);this.update()}function xf(a){var b=[];a&&a.isBone&&b.push(a);for(var c=0;ca?-1:0b;b++)a[b]=(16>b?"0":"")+b.toString(16);return function(){var b=4294967295*Math.random()|0,d=4294967295*Math.random()|0,e=4294967295*Math.random()|0,f=4294967295*Math.random()|0;return(a[b&255]+a[b>>8&255]+a[b>>16&255]+a[b>>24&255]+"-"+a[d&255]+a[d>>8&255]+"-"+a[d>> +16&15|64]+a[d>>24&255]+"-"+a[e&63|128]+a[e>>8&255]+"-"+a[e>>16&255]+a[e>>24&255]+a[f&255]+a[f>>8&255]+a[f>>16&255]+a[f>>24&255]).toUpperCase()}}(),clamp:function(a,b,c){return Math.max(b,Math.min(c,a))},euclideanModulo:function(a,b){return(a%b+b)%b},mapLinear:function(a,b,c,d,e){return d+(a-b)*(e-d)/(c-b)},lerp:function(a,b,c){return(1-c)*a+c*b},smoothstep:function(a,b,c){if(a<=b)return 0;if(a>=c)return 1;a=(a-b)/(c-b);return a*a*(3-2*a)},smootherstep:function(a,b,c){if(a<=b)return 0;if(a>=c)return 1; +a=(a-b)/(c-b);return a*a*a*(a*(6*a-15)+10)},randInt:function(a,b){return a+Math.floor(Math.random()*(b-a+1))},randFloat:function(a,b){return a+Math.random()*(b-a)},randFloatSpread:function(a){return a*(.5-Math.random())},degToRad:function(a){return a*H.DEG2RAD},radToDeg:function(a){return a*H.RAD2DEG},isPowerOfTwo:function(a){return 0===(a&a-1)&&0!==a},ceilPowerOfTwo:function(a){return Math.pow(2,Math.ceil(Math.log(a)/Math.LN2))},floorPowerOfTwo:function(a){return Math.pow(2,Math.floor(Math.log(a)/ +Math.LN2))}};Object.defineProperties(z.prototype,{width:{get:function(){return this.x},set:function(a){this.x=a}},height:{get:function(){return this.y},set:function(a){this.y=a}}});Object.assign(z.prototype,{isVector2:!0,set:function(a,b){this.x=a;this.y=b;return this},setScalar:function(a){this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;default:throw Error("index is out of range: "+ +a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(a){this.x=a.x;this.y=a.y;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;return this},addScalar:function(a){this.x+=a;this.y+=a;return this}, +addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;return this},subScalar:function(a){this.x-=a;this.y-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;return this},multiply:function(a){this.x*=a.x;this.y*= +a.y;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;return this},divide:function(a){this.x/=a.x;this.y/=a.y;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},applyMatrix3:function(a){var b=this.x,c=this.y;a=a.elements;this.x=a[0]*b+a[3]*c+a[6];this.y=a[1]*b+a[4]*c+a[7];return this},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);return this},clamp:function(a, +b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));return this},clampScalar:function(){var a=new z,b=new z;return function(c,d){a.set(c,c);b.set(d,d);return this.clamp(a,b)}}(),clampLength:function(a,b){var c=this.length();return this.divideScalar(c||1).multiplyScalar(Math.max(a,Math.min(b,c)))},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this},round:function(){this.x= +Math.round(this.x);this.y=Math.round(this.y);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);return this},negate:function(){this.x=-this.x;this.y=-this.y;return this},dot:function(a){return this.x*a.x+this.y*a.y},cross:function(a){return this.x*a.y-this.y*a.x},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+ +Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var a=Math.atan2(this.y,this.x);0>a&&(a+=2*Math.PI);return a},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x-a.x;a=this.y-a.y;return b*b+a*a},manhattanDistanceTo:function(a){return Math.abs(this.x-a.x)+Math.abs(this.y-a.y)},setLength:function(a){return this.normalize().multiplyScalar(a)},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+= +(a.y-this.y)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute().");this.x=a.getX(b);this.y=a.getY(b); +return this},rotateAround:function(a,b){var c=Math.cos(b);b=Math.sin(b);var d=this.x-a.x,e=this.y-a.y;this.x=d*c-e*b+a.x;this.y=d*b+e*c+a.y;return this}});Object.assign(I.prototype,{isMatrix4:!0,set:function(a,b,c,d,e,f,g,h,k,m,q,n,l,u,r,p){var t=this.elements;t[0]=a;t[4]=b;t[8]=c;t[12]=d;t[1]=e;t[5]=f;t[9]=g;t[13]=h;t[2]=k;t[6]=m;t[10]=q;t[14]=n;t[3]=l;t[7]=u;t[11]=r;t[15]=p;return this},identity:function(){this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return this},clone:function(){return(new I).fromArray(this.elements)}, +copy:function(a){var b=this.elements;a=a.elements;b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15];return this},copyPosition:function(a){var b=this.elements;a=a.elements;b[12]=a[12];b[13]=a[13];b[14]=a[14];return this},extractBasis:function(a,b,c){a.setFromMatrixColumn(this,0);b.setFromMatrixColumn(this,1);c.setFromMatrixColumn(this,2);return this},makeBasis:function(a,b,c){this.set(a.x, +b.x,c.x,0,a.y,b.y,c.y,0,a.z,b.z,c.z,0,0,0,0,1);return this},extractRotation:function(){var a=new p;return function(b){var c=this.elements,d=b.elements,e=1/a.setFromMatrixColumn(b,0).length(),f=1/a.setFromMatrixColumn(b,1).length();b=1/a.setFromMatrixColumn(b,2).length();c[0]=d[0]*e;c[1]=d[1]*e;c[2]=d[2]*e;c[3]=0;c[4]=d[4]*f;c[5]=d[5]*f;c[6]=d[6]*f;c[7]=0;c[8]=d[8]*b;c[9]=d[9]*b;c[10]=d[10]*b;c[11]=0;c[12]=0;c[13]=0;c[14]=0;c[15]=1;return this}}(),makeRotationFromEuler:function(a){a&&a.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order."); +var b=this.elements,c=a.x,d=a.y,e=a.z,f=Math.cos(c);c=Math.sin(c);var g=Math.cos(d);d=Math.sin(d);var h=Math.cos(e);e=Math.sin(e);if("XYZ"===a.order){a=f*h;var k=f*e,m=c*h,q=c*e;b[0]=g*h;b[4]=-g*e;b[8]=d;b[1]=k+m*d;b[5]=a-q*d;b[9]=-c*g;b[2]=q-a*d;b[6]=m+k*d;b[10]=f*g}else"YXZ"===a.order?(a=g*h,k=g*e,m=d*h,q=d*e,b[0]=a+q*c,b[4]=m*c-k,b[8]=f*d,b[1]=f*e,b[5]=f*h,b[9]=-c,b[2]=k*c-m,b[6]=q+a*c,b[10]=f*g):"ZXY"===a.order?(a=g*h,k=g*e,m=d*h,q=d*e,b[0]=a-q*c,b[4]=-f*e,b[8]=m+k*c,b[1]=k+m*c,b[5]=f*h,b[9]= +q-a*c,b[2]=-f*d,b[6]=c,b[10]=f*g):"ZYX"===a.order?(a=f*h,k=f*e,m=c*h,q=c*e,b[0]=g*h,b[4]=m*d-k,b[8]=a*d+q,b[1]=g*e,b[5]=q*d+a,b[9]=k*d-m,b[2]=-d,b[6]=c*g,b[10]=f*g):"YZX"===a.order?(a=f*g,k=f*d,m=c*g,q=c*d,b[0]=g*h,b[4]=q-a*e,b[8]=m*e+k,b[1]=e,b[5]=f*h,b[9]=-c*h,b[2]=-d*h,b[6]=k*e+m,b[10]=a-q*e):"XZY"===a.order&&(a=f*g,k=f*d,m=c*g,q=c*d,b[0]=g*h,b[4]=-e,b[8]=d*h,b[1]=a*e+q,b[5]=f*h,b[9]=k*e-m,b[2]=m*e-k,b[6]=c*h,b[10]=q*e+a);b[3]=0;b[7]=0;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},makeRotationFromQuaternion:function(){var a= +new p(0,0,0),b=new p(1,1,1);return function(c){return this.compose(a,c,b)}}(),lookAt:function(){var a=new p,b=new p,c=new p;return function(d,e,f){var g=this.elements;c.subVectors(d,e);0===c.lengthSq()&&(c.z=1);c.normalize();a.crossVectors(f,c);0===a.lengthSq()&&(1===Math.abs(f.z)?c.x+=1E-4:c.z+=1E-4,c.normalize(),a.crossVectors(f,c));a.normalize();b.crossVectors(c,a);g[0]=a.x;g[4]=b.x;g[8]=c.x;g[1]=a.y;g[5]=b.y;g[9]=c.y;g[2]=a.z;g[6]=b.z;g[10]=c.z;return this}}(),multiply:function(a,b){return void 0!== +b?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(a,b)):this.multiplyMatrices(this,a)},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,b){var c=a.elements,d=b.elements;b=this.elements;a=c[0];var e=c[4],f=c[8],g=c[12],h=c[1],k=c[5],m=c[9],q=c[13],n=c[2],l=c[6],u=c[10],r=c[14],p=c[3],y=c[7],x=c[11];c=c[15];var w=d[0],B=d[4],E=d[8],P=d[12],N=d[1],z=d[5],A=d[9],D=d[13],C=d[2], +H=d[6],G=d[10],K=d[14],L=d[3],I=d[7],J=d[11];d=d[15];b[0]=a*w+e*N+f*C+g*L;b[4]=a*B+e*z+f*H+g*I;b[8]=a*E+e*A+f*G+g*J;b[12]=a*P+e*D+f*K+g*d;b[1]=h*w+k*N+m*C+q*L;b[5]=h*B+k*z+m*H+q*I;b[9]=h*E+k*A+m*G+q*J;b[13]=h*P+k*D+m*K+q*d;b[2]=n*w+l*N+u*C+r*L;b[6]=n*B+l*z+u*H+r*I;b[10]=n*E+l*A+u*G+r*J;b[14]=n*P+l*D+u*K+r*d;b[3]=p*w+y*N+x*C+c*L;b[7]=p*B+y*z+x*H+c*I;b[11]=p*E+y*A+x*G+c*J;b[15]=p*P+y*D+x*K+c*d;return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[4]*=a;b[8]*=a;b[12]*=a;b[1]*=a;b[5]*= +a;b[9]*=a;b[13]*=a;b[2]*=a;b[6]*=a;b[10]*=a;b[14]*=a;b[3]*=a;b[7]*=a;b[11]*=a;b[15]*=a;return this},applyToBufferAttribute:function(){var a=new p;return function(b){for(var c=0,d=b.count;cthis.determinant()&&(g=-g);c.x=f[12];c.y=f[13];c.z=f[14];b.copy(this);c=1/g;f=1/h;var m=1/k;b.elements[0]*=c;b.elements[1]*=c;b.elements[2]*=c;b.elements[4]*=f;b.elements[5]*=f;b.elements[6]*=f;b.elements[8]*=m;b.elements[9]*=m;b.elements[10]*=m;d.setFromRotationMatrix(b); +e.x=g;e.y=h;e.z=k;return this}}(),makePerspective:function(a,b,c,d,e,f){void 0===f&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var g=this.elements;g[0]=2*e/(b-a);g[4]=0;g[8]=(b+a)/(b-a);g[12]=0;g[1]=0;g[5]=2*e/(c-d);g[9]=(c+d)/(c-d);g[13]=0;g[2]=0;g[6]=0;g[10]=-(f+e)/(f-e);g[14]=-2*f*e/(f-e);g[3]=0;g[7]=0;g[11]=-1;g[15]=0;return this},makeOrthographic:function(a,b,c,d,e,f){var g=this.elements,h=1/(b-a),k=1/(c-d),m=1/(f-e);g[0]= +2*h;g[4]=0;g[8]=0;g[12]=-((b+a)*h);g[1]=0;g[5]=2*k;g[9]=0;g[13]=-((c+d)*k);g[2]=0;g[6]=0;g[10]=-2*m;g[14]=-((f+e)*m);g[3]=0;g[7]=0;g[11]=0;g[15]=1;return this},equals:function(a){var b=this.elements;a=a.elements;for(var c=0;16>c;c++)if(b[c]!==a[c])return!1;return!0},fromArray:function(a,b){void 0===b&&(b=0);for(var c=0;16>c;c++)this.elements[c]=a[c+b];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);var c=this.elements;a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4]; +a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];a[b+9]=c[9];a[b+10]=c[10];a[b+11]=c[11];a[b+12]=c[12];a[b+13]=c[13];a[b+14]=c[14];a[b+15]=c[15];return a}});Object.assign(fa,{slerp:function(a,b,c,d){return c.copy(a).slerp(b,d)},slerpFlat:function(a,b,c,d,e,f,g){var h=c[d+0],k=c[d+1],m=c[d+2];c=c[d+3];d=e[f+0];var q=e[f+1],l=e[f+2];e=e[f+3];if(c!==e||h!==d||k!==q||m!==l){f=1-g;var t=h*d+k*q+m*l+c*e,u=0<=t?1:-1,r=1-t*t;r>Number.EPSILON&&(r=Math.sqrt(r),t=Math.atan2(r,t*u),f=Math.sin(f*t)/r,g=Math.sin(g* +t)/r);u*=g;h=h*f+d*u;k=k*f+q*u;m=m*f+l*u;c=c*f+e*u;f===1-g&&(g=1/Math.sqrt(h*h+k*k+m*m+c*c),h*=g,k*=g,m*=g,c*=g)}a[b]=h;a[b+1]=k;a[b+2]=m;a[b+3]=c}});Object.defineProperties(fa.prototype,{x:{get:function(){return this._x},set:function(a){this._x=a;this.onChangeCallback()}},y:{get:function(){return this._y},set:function(a){this._y=a;this.onChangeCallback()}},z:{get:function(){return this._z},set:function(a){this._z=a;this.onChangeCallback()}},w:{get:function(){return this._w},set:function(a){this._w= +a;this.onChangeCallback()}}});Object.assign(fa.prototype,{set:function(a,b,c,d){this._x=a;this._y=b;this._z=c;this._w=d;this.onChangeCallback();return this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(a){this._x=a.x;this._y=a.y;this._z=a.z;this._w=a.w;this.onChangeCallback();return this},setFromEuler:function(a,b){if(!a||!a.isEuler)throw Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var c= +a._x,d=a._y,e=a._z;a=a.order;var f=Math.cos,g=Math.sin,h=f(c/2),k=f(d/2);f=f(e/2);c=g(c/2);d=g(d/2);e=g(e/2);"XYZ"===a?(this._x=c*k*f+h*d*e,this._y=h*d*f-c*k*e,this._z=h*k*e+c*d*f,this._w=h*k*f-c*d*e):"YXZ"===a?(this._x=c*k*f+h*d*e,this._y=h*d*f-c*k*e,this._z=h*k*e-c*d*f,this._w=h*k*f+c*d*e):"ZXY"===a?(this._x=c*k*f-h*d*e,this._y=h*d*f+c*k*e,this._z=h*k*e+c*d*f,this._w=h*k*f-c*d*e):"ZYX"===a?(this._x=c*k*f-h*d*e,this._y=h*d*f+c*k*e,this._z=h*k*e-c*d*f,this._w=h*k*f+c*d*e):"YZX"===a?(this._x=c*k*f+ +h*d*e,this._y=h*d*f+c*k*e,this._z=h*k*e-c*d*f,this._w=h*k*f-c*d*e):"XZY"===a&&(this._x=c*k*f-h*d*e,this._y=h*d*f-c*k*e,this._z=h*k*e+c*d*f,this._w=h*k*f+c*d*e);if(!1!==b)this.onChangeCallback();return this},setFromAxisAngle:function(a,b){b/=2;var c=Math.sin(b);this._x=a.x*c;this._y=a.y*c;this._z=a.z*c;this._w=Math.cos(b);this.onChangeCallback();return this},setFromRotationMatrix:function(a){var b=a.elements,c=b[0];a=b[4];var d=b[8],e=b[1],f=b[5],g=b[9],h=b[2],k=b[6];b=b[10];var m=c+f+b;0f&&c>b?(c=2*Math.sqrt(1+c-f-b),this._w=(k-g)/c,this._x=.25*c,this._y=(a+e)/c,this._z=(d+h)/c):f>b?(c=2*Math.sqrt(1+f-c-b),this._w=(d-h)/c,this._x=(a+e)/c,this._y=.25*c,this._z=(g+k)/c):(c=2*Math.sqrt(1+b-c-f),this._w=(e-a)/c,this._x=(d+h)/c,this._y=(g+k)/c,this._z=.25*c);this.onChangeCallback();return this},setFromUnitVectors:function(){var a=new p,b;return function(c,d){void 0===a&&(a=new p);b=c.dot(d)+1;1E-6>b?(b=0, +Math.abs(c.x)>Math.abs(c.z)?a.set(-c.y,c.x,0):a.set(0,-c.z,c.y)):a.crossVectors(c,d);this._x=a.x;this._y=a.y;this._z=a.z;this._w=b;return this.normalize()}}(),angleTo:function(a){return 2*Math.acos(Math.abs(H.clamp(this.dot(a),-1,1)))},rotateTowards:function(a,b){var c=this.angleTo(a);if(0===c)return this;this.slerp(a,Math.min(1,b/c));return this},inverse:function(){return this.conjugate()},conjugate:function(){this._x*=-1;this._y*=-1;this._z*=-1;this.onChangeCallback();return this},dot:function(a){return this._x* +a._x+this._y*a._y+this._z*a._z+this._w*a._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var a=this.length();0===a?(this._z=this._y=this._x=0,this._w=1):(a=1/a,this._x*=a,this._y*=a,this._z*=a,this._w*=a);this.onChangeCallback();return this},multiply:function(a,b){return void 0!==b?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."), +this.multiplyQuaternions(a,b)):this.multiplyQuaternions(this,a)},premultiply:function(a){return this.multiplyQuaternions(a,this)},multiplyQuaternions:function(a,b){var c=a._x,d=a._y,e=a._z;a=a._w;var f=b._x,g=b._y,h=b._z;b=b._w;this._x=c*b+a*f+d*h-e*g;this._y=d*b+a*g+e*f-c*h;this._z=e*b+a*h+c*g-d*f;this._w=a*b-c*f-d*g-e*h;this.onChangeCallback();return this},slerp:function(a,b){if(0===b)return this;if(1===b)return this.copy(a);var c=this._x,d=this._y,e=this._z,f=this._w,g=f*a._w+c*a._x+d*a._y+e*a._z; +0>g?(this._w=-a._w,this._x=-a._x,this._y=-a._y,this._z=-a._z,g=-g):this.copy(a);if(1<=g)return this._w=f,this._x=c,this._y=d,this._z=e,this;a=1-g*g;if(a<=Number.EPSILON)return g=1-b,this._w=g*f+b*this._w,this._x=g*c+b*this._x,this._y=g*d+b*this._y,this._z=g*e+b*this._z,this.normalize();a=Math.sqrt(a);var h=Math.atan2(a,g);g=Math.sin((1-b)*h)/a;b=Math.sin(b*h)/a;this._w=f*g+this._w*b;this._x=c*g+this._x*b;this._y=d*g+this._y*b;this._z=e*g+this._z*b;this.onChangeCallback();return this},equals:function(a){return a._x=== +this._x&&a._y===this._y&&a._z===this._z&&a._w===this._w},fromArray:function(a,b){void 0===b&&(b=0);this._x=a[b];this._y=a[b+1];this._z=a[b+2];this._w=a[b+3];this.onChangeCallback();return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this._x;a[b+1]=this._y;a[b+2]=this._z;a[b+3]=this._w;return a},onChange:function(a){this.onChangeCallback=a;return this},onChangeCallback:function(){}});Object.assign(p.prototype,{isVector3:!0,set:function(a,b,c){this.x=a;this.y=b;this.z=c;return this}, +setScalar:function(a){this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;case 2:this.z=b;break;default:throw Error("index is out of range: "+a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x, +this.y,this.z)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;this.z+=a.z;return this},addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;this.z+= +a.z*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;this.z-=a.z;return this},subScalar:function(a){this.x-=a;this.y-=a;this.z-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;return this},multiply:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."), +this.multiplyVectors(a,b);this.x*=a.x;this.y*=a.y;this.z*=a.z;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;this.z*=a;return this},multiplyVectors:function(a,b){this.x=a.x*b.x;this.y=a.y*b.y;this.z=a.z*b.z;return this},applyEuler:function(){var a=new fa;return function(b){b&&b.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.");return this.applyQuaternion(a.setFromEuler(b))}}(),applyAxisAngle:function(){var a=new fa;return function(b, +c){return this.applyQuaternion(a.setFromAxisAngle(b,c))}}(),applyMatrix3:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;this.x=a[0]*b+a[3]*c+a[6]*d;this.y=a[1]*b+a[4]*c+a[7]*d;this.z=a[2]*b+a[5]*c+a[8]*d;return this},applyMatrix4:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;var e=1/(a[3]*b+a[7]*c+a[11]*d+a[15]);this.x=(a[0]*b+a[4]*c+a[8]*d+a[12])*e;this.y=(a[1]*b+a[5]*c+a[9]*d+a[13])*e;this.z=(a[2]*b+a[6]*c+a[10]*d+a[14])*e;return this},applyQuaternion:function(a){var b=this.x, +c=this.y,d=this.z,e=a.x,f=a.y,g=a.z;a=a.w;var h=a*b+f*d-g*c,k=a*c+g*b-e*d,m=a*d+e*c-f*b;b=-e*b-f*c-g*d;this.x=h*a+b*-e+k*-g-m*-f;this.y=k*a+b*-f+m*-e-h*-g;this.z=m*a+b*-g+h*-f-k*-e;return this},project:function(){var a=new I;return function(b){a.multiplyMatrices(b.projectionMatrix,a.getInverse(b.matrixWorld));return this.applyMatrix4(a)}}(),unproject:function(){var a=new I;return function(b){a.multiplyMatrices(b.matrixWorld,a.getInverse(b.projectionMatrix));return this.applyMatrix4(a)}}(),transformDirection:function(a){var b= +this.x,c=this.y,d=this.z;a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d;this.y=a[1]*b+a[5]*c+a[9]*d;this.z=a[2]*b+a[6]*c+a[10]*d;return this.normalize()},divide:function(a){this.x/=a.x;this.y/=a.y;this.z/=a.z;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);this.z=Math.min(this.z,a.z);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.z=Math.max(this.z,a.z);return this},clamp:function(a, +b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));this.z=Math.max(a.z,Math.min(b.z,this.z));return this},clampScalar:function(){var a=new p,b=new p;return function(c,d){a.set(c,c,c);b.set(d,d,d);return this.clamp(a,b)}}(),clampLength:function(a,b){var c=this.length();return this.divideScalar(c||1).multiplyScalar(Math.max(a,Math.min(b,c)))},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);return this},ceil:function(){this.x= +Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z);return this},negate:function(){this.x=-this.x;this.y=-this.y;this.z=-this.z;return this},dot:function(a){return this.x*a.x+this.y* +a.y+this.z*a.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(a){return this.normalize().multiplyScalar(a)},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;this.z+=(a.z-this.z)*b;return this},lerpVectors:function(a, +b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},cross:function(a,b){return void 0!==b?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(a,b)):this.crossVectors(this,a)},crossVectors:function(a,b){var c=a.x,d=a.y;a=a.z;var e=b.x,f=b.y;b=b.z;this.x=d*b-a*f;this.y=a*e-c*b;this.z=c*f-d*e;return this},projectOnVector:function(a){var b=a.dot(this)/a.lengthSq();return this.copy(a).multiplyScalar(b)},projectOnPlane:function(){var a= +new p;return function(b){a.copy(this).projectOnVector(b);return this.sub(a)}}(),reflect:function(){var a=new p;return function(b){return this.sub(a.copy(b).multiplyScalar(2*this.dot(b)))}}(),angleTo:function(a){a=this.dot(a)/Math.sqrt(this.lengthSq()*a.lengthSq());return Math.acos(H.clamp(a,-1,1))},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x-a.x,c=this.y-a.y;a=this.z-a.z;return b*b+c*c+a*a},manhattanDistanceTo:function(a){return Math.abs(this.x- +a.x)+Math.abs(this.y-a.y)+Math.abs(this.z-a.z)},setFromSpherical:function(a){var b=Math.sin(a.phi)*a.radius;this.x=b*Math.sin(a.theta);this.y=Math.cos(a.phi)*a.radius;this.z=b*Math.cos(a.theta);return this},setFromCylindrical:function(a){this.x=a.radius*Math.sin(a.theta);this.y=a.y;this.z=a.radius*Math.cos(a.theta);return this},setFromMatrixPosition:function(a){a=a.elements;this.x=a[12];this.y=a[13];this.z=a[14];return this},setFromMatrixScale:function(a){var b=this.setFromMatrixColumn(a,0).length(), +c=this.setFromMatrixColumn(a,1).length();a=this.setFromMatrixColumn(a,2).length();this.x=b;this.y=c;this.z=a;return this},setFromMatrixColumn:function(a,b){return this.fromArray(a.elements,4*b)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;return a},fromBufferAttribute:function(a,b,c){void 0!== +c&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute().");this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);return this}});Object.assign(ra.prototype,{isMatrix3:!0,set:function(a,b,c,d,e,f,g,h,k){var m=this.elements;m[0]=a;m[1]=d;m[2]=g;m[3]=b;m[4]=e;m[5]=h;m[6]=c;m[7]=f;m[8]=k;return this},identity:function(){this.set(1,0,0,0,1,0,0,0,1);return this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(a){var b=this.elements;a=a.elements; +b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];return this},setFromMatrix4:function(a){a=a.elements;this.set(a[0],a[4],a[8],a[1],a[5],a[9],a[2],a[6],a[10]);return this},applyToBufferAttribute:function(){var a=new p;return function(b){for(var c=0,d=b.count;cc;c++)if(b[c]!==a[c])return!1;return!0},fromArray:function(a,b){void 0===b&&(b=0);for(var c=0;9>c;c++)this.elements[c]=a[c+b];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);var c=this.elements;a[b]=c[0];a[b+1]=c[1]; +a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];return a}});var eb={getDataURL:function(a){if(a instanceof HTMLCanvasElement)var b=a;else{"undefined"!==typeof OffscreenCanvas?b=new OffscreenCanvas(a.width,a.height):(b=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),b.width=a.width,b.height=a.height);var c=b.getContext("2d");a instanceof ImageData?c.putImageData(a,0,0):c.drawImage(a,0,0,a.width,a.height)}return 2048a.x||1a.x?0:1;break;case 1002:a.x=1===Math.abs(Math.floor(a.x)%2)?Math.ceil(a.x)-a.x:a.x-Math.floor(a.x)}if(0>a.y||1a.y?0:1;break;case 1002:a.y=1===Math.abs(Math.floor(a.y)%2)?Math.ceil(a.y)-a.y:a.y-Math.floor(a.y)}this.flipY&&(a.y=1-a.y)}}});Object.defineProperty(T.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(V.prototype,{isVector4:!0,set:function(a,b,c,d){this.x=a;this.y= +b;this.z=c;this.w=d;return this},setScalar:function(a){this.w=this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},setW:function(a){this.w=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;case 2:this.z=b;break;case 3:this.w=b;break;default:throw Error("index is out of range: "+a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y; +case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.w=void 0!==a.w?a.w:1;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;this.z+=a.z;this.w+=a.w;return this},addScalar:function(a){this.x+= +a;this.y+=a;this.z+=a;this.w+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;this.w=a.w+b.w;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;this.z+=a.z*b;this.w+=a.w*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;this.z-=a.z;this.w-=a.w;return this},subScalar:function(a){this.x-=a;this.y-= +a;this.z-=a;this.w-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;this.w=a.w-b.w;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;this.z*=a;this.w*=a;return this},applyMatrix4:function(a){var b=this.x,c=this.y,d=this.z,e=this.w;a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d+a[12]*e;this.y=a[1]*b+a[5]*c+a[9]*d+a[13]*e;this.z=a[2]*b+a[6]*c+a[10]*d+a[14]*e;this.w=a[3]*b+a[7]*c+a[11]*d+a[15]*e;return this},divideScalar:function(a){return this.multiplyScalar(1/ +a)},setAxisAngleFromQuaternion:function(a){this.w=2*Math.acos(a.w);var b=Math.sqrt(1-a.w*a.w);1E-4>b?(this.x=1,this.z=this.y=0):(this.x=a.x/b,this.y=a.y/b,this.z=a.z/b);return this},setAxisAngleFromRotationMatrix:function(a){a=a.elements;var b=a[0];var c=a[4];var d=a[8],e=a[1],f=a[5],g=a[9];var h=a[2];var k=a[6];var m=a[10];if(.01>Math.abs(c-e)&&.01>Math.abs(d-h)&&.01>Math.abs(g-k)){if(.1>Math.abs(c+e)&&.1>Math.abs(d+h)&&.1>Math.abs(g+k)&&.1>Math.abs(b+f+m-3))return this.set(1,0,0,0),this;a=Math.PI; +b=(b+1)/2;f=(f+1)/2;m=(m+1)/2;c=(c+e)/4;d=(d+h)/4;g=(g+k)/4;b>f&&b>m?.01>b?(k=0,c=h=.707106781):(k=Math.sqrt(b),h=c/k,c=d/k):f>m?.01>f?(k=.707106781,h=0,c=.707106781):(h=Math.sqrt(f),k=c/h,c=g/h):.01>m?(h=k=.707106781,c=0):(c=Math.sqrt(m),k=d/c,h=g/c);this.set(k,h,c,a);return this}a=Math.sqrt((k-g)*(k-g)+(d-h)*(d-h)+(e-c)*(e-c));.001>Math.abs(a)&&(a=1);this.x=(k-g)/a;this.y=(d-h)/a;this.z=(e-c)/a;this.w=Math.acos((b+f+m-1)/2);return this},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y, +a.y);this.z=Math.min(this.z,a.z);this.w=Math.min(this.w,a.w);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.z=Math.max(this.z,a.z);this.w=Math.max(this.w,a.w);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));this.z=Math.max(a.z,Math.min(b.z,this.z));this.w=Math.max(a.w,Math.min(b.w,this.w));return this},clampScalar:function(){var a,b;return function(c,d){void 0===a&&(a=new V,b=new V);a.set(c, +c,c,c);b.set(d,d,d,d);return this.clamp(a,b)}}(),clampLength:function(a,b){var c=this.length();return this.divideScalar(c||1).multiplyScalar(Math.max(a,Math.min(b,c)))},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);this.w=Math.floor(this.w);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);this.w=Math.ceil(this.w);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y); +this.z=Math.round(this.z);this.w=Math.round(this.w);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z);this.w=0>this.w?Math.ceil(this.w):Math.floor(this.w);return this},negate:function(){this.x=-this.x;this.y=-this.y;this.z=-this.z;this.w=-this.w;return this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z+this.w*a.w},lengthSq:function(){return this.x* +this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(a){return this.normalize().multiplyScalar(a)},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;this.z+=(a.z-this.z)*b;this.w+=(a.w-this.w)*b;return this},lerpVectors:function(a, +b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z&&a.w===this.w},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];this.w=a[b+3];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;a[b+3]=this.w;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."); +this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);this.w=a.getW(b);return this}});fb.prototype=Object.assign(Object.create(ya.prototype),{constructor:fb,isWebGLRenderTarget:!0,setSize:function(a,b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.dispose();this.viewport.set(0,0,a,b);this.scissor.set(0,0,a,b)},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.width=a.width;this.height=a.height;this.viewport.copy(a.viewport);this.texture=a.texture.clone(); +this.depthBuffer=a.depthBuffer;this.stencilBuffer=a.stencilBuffer;this.depthTexture=a.depthTexture;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});Gb.prototype=Object.create(fb.prototype);Gb.prototype.constructor=Gb;Gb.prototype.isWebGLRenderTargetCube=!0;gb.prototype=Object.create(T.prototype);gb.prototype.constructor=gb;gb.prototype.isDataTexture=!0;Object.assign(Sa.prototype,{isBox3:!0,set:function(a,b){this.min.copy(a);this.max.copy(b);return this},setFromArray:function(a){for(var b= +Infinity,c=Infinity,d=Infinity,e=-Infinity,f=-Infinity,g=-Infinity,h=0,k=a.length;he&&(e=m);q>f&&(f=q);l>g&&(g=l)}this.min.set(b,c,d);this.max.set(e,f,g);return this},setFromBufferAttribute:function(a){for(var b=Infinity,c=Infinity,d=Infinity,e=-Infinity,f=-Infinity,g=-Infinity,h=0,k=a.count;he&&(e=m);l>f&&(f=l);n>g&&(g=n)}this.min.set(b,c,d); +this.max.set(e,f,g);return this},setFromPoints:function(a){this.makeEmpty();for(var b=0,c=a.length;bthis.max.x||a.ythis.max.y||a.zthis.max.z?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y&&this.min.z<=a.min.z&& +a.max.z<=this.max.z},getParameter:function(a,b){void 0===b&&(console.warn("THREE.Box3: .getParameter() target is now required"),b=new p);return b.set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y),(a.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(a){return a.max.xthis.max.x||a.max.ythis.max.y||a.max.zthis.max.z?!1:!0},intersectsSphere:function(){var a=new p;return function(b){this.clampPoint(b.center, +a);return a.distanceToSquared(b.center)<=b.radius*b.radius}}(),intersectsPlane:function(a){if(0=a.constant},intersectsTriangle:function(){function a(a){var e; +var f=0;for(e=a.length-3;f<=e;f+=3){h.fromArray(a,f);var g=m.x*Math.abs(h.x)+m.y*Math.abs(h.y)+m.z*Math.abs(h.z),k=b.dot(h),l=c.dot(h),q=d.dot(h);if(Math.max(-Math.max(k,l,q),Math.min(k,l,q))>g)return!1}return!0}var b=new p,c=new p,d=new p,e=new p,f=new p,g=new p,h=new p,k=new p,m=new p,l=new p;return function(h){if(this.isEmpty())return!1;this.getCenter(k);m.subVectors(this.max,k);b.subVectors(h.a,k);c.subVectors(h.b,k);d.subVectors(h.c,k);e.subVectors(c,b);f.subVectors(d,c);g.subVectors(b,d);h= +[0,-e.z,e.y,0,-f.z,f.y,0,-g.z,g.y,e.z,0,-e.x,f.z,0,-f.x,g.z,0,-g.x,-e.y,e.x,0,-f.y,f.x,0,-g.y,g.x,0];if(!a(h))return!1;h=[1,0,0,0,1,0,0,0,1];if(!a(h))return!1;l.crossVectors(e,f);h=[l.x,l.y,l.z];return a(h)}}(),clampPoint:function(a,b){void 0===b&&(console.warn("THREE.Box3: .clampPoint() target is now required"),b=new p);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(){var a=new p;return function(b){return a.copy(b).clamp(this.min,this.max).sub(b).length()}}(),getBoundingSphere:function(){var a= +new p;return function(b){void 0===b&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),b=new Da);this.getCenter(b.center);b.radius=.5*this.getSize(a).length();return b}}(),intersect:function(a){this.min.max(a.min);this.max.min(a.max);this.isEmpty()&&this.makeEmpty();return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},applyMatrix4:function(a){if(this.isEmpty())return this;a=a.elements;var b=a[0]*this.min.x,c=a[1]*this.min.x,d=a[2]*this.min.x,e= +a[0]*this.max.x,f=a[1]*this.max.x,g=a[2]*this.max.x,h=a[4]*this.min.y,k=a[5]*this.min.y,m=a[6]*this.min.y,l=a[4]*this.max.y,n=a[5]*this.max.y,t=a[6]*this.max.y,u=a[8]*this.min.z,r=a[9]*this.min.z,p=a[10]*this.min.z,y=a[8]*this.max.z,x=a[9]*this.max.z,w=a[10]*this.max.z;this.min.x=Math.min(b,e)+Math.min(h,l)+Math.min(u,y)+a[12];this.min.y=Math.min(c,f)+Math.min(k,n)+Math.min(r,x)+a[13];this.min.z=Math.min(d,g)+Math.min(m,t)+Math.min(p,w)+a[14];this.max.x=Math.max(b,e)+Math.max(h,l)+Math.max(u,y)+a[12]; +this.max.y=Math.max(c,f)+Math.max(k,n)+Math.max(r,x)+a[13];this.max.z=Math.max(d,g)+Math.max(m,t)+Math.max(p,w)+a[14];return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}});Object.assign(Da.prototype,{set:function(a,b){this.center.copy(a);this.radius=b;return this},setFromPoints:function(){var a=new Sa;return function(b,c){var d=this.center;void 0!==c?d.copy(c):a.setFromPoints(b).getCenter(d);for(var e= +c=0,f=b.length;e=this.radius},containsPoint:function(a){return a.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(a){return a.distanceTo(this.center)-this.radius},intersectsSphere:function(a){var b=this.radius+a.radius; +return a.center.distanceToSquared(this.center)<=b*b},intersectsBox:function(a){return a.intersectsSphere(this)},intersectsPlane:function(a){return Math.abs(a.distanceToPoint(this.center))<=this.radius},clampPoint:function(a,b){var c=this.center.distanceToSquared(a);void 0===b&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),b=new p);b.copy(a);c>this.radius*this.radius&&(b.sub(this.center).normalize(),b.multiplyScalar(this.radius).add(this.center));return b},getBoundingBox:function(a){void 0=== +a&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),a=new Sa);a.set(this.center,this.center);a.expandByScalar(this.radius);return a},applyMatrix4:function(a){this.center.applyMatrix4(a);this.radius*=a.getMaxScaleOnAxis();return this},translate:function(a){this.center.add(a);return this},equals:function(a){return a.center.equals(this.center)&&a.radius===this.radius}});Object.assign(Ma.prototype,{set:function(a,b){this.normal.copy(a);this.constant=b;return this},setComponents:function(a, +b,c,d){this.normal.set(a,b,c);this.constant=d;return this},setFromNormalAndCoplanarPoint:function(a,b){this.normal.copy(a);this.constant=-b.dot(this.normal);return this},setFromCoplanarPoints:function(){var a=new p,b=new p;return function(c,d,e){d=a.subVectors(e,d).cross(b.subVectors(c,d)).normalize();this.setFromNormalAndCoplanarPoint(d,c);return this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.normal.copy(a.normal);this.constant=a.constant;return this},normalize:function(){var a= +1/this.normal.length();this.normal.multiplyScalar(a);this.constant*=a;return this},negate:function(){this.constant*=-1;this.normal.negate();return this},distanceToPoint:function(a){return this.normal.dot(a)+this.constant},distanceToSphere:function(a){return this.distanceToPoint(a.center)-a.radius},projectPoint:function(a,b){void 0===b&&(console.warn("THREE.Plane: .projectPoint() target is now required"),b=new p);return b.copy(this.normal).multiplyScalar(-this.distanceToPoint(a)).add(a)},intersectLine:function(){var a= +new p;return function(b,c){void 0===c&&(console.warn("THREE.Plane: .intersectLine() target is now required"),c=new p);var d=b.delta(a),e=this.normal.dot(d);if(0===e){if(0===this.distanceToPoint(b.start))return c.copy(b.start)}else if(e=-(b.start.dot(this.normal)+this.constant)/e,!(0>e||1b&&0a&&0c;c++)b[c].copy(a.planes[c]);return this},setFromMatrix:function(a){var b=this.planes,c=a.elements;a=c[0];var d=c[1],e=c[2],f=c[3],g=c[4], +h=c[5],k=c[6],m=c[7],l=c[8],n=c[9],t=c[10],p=c[11],r=c[12],v=c[13],y=c[14];c=c[15];b[0].setComponents(f-a,m-g,p-l,c-r).normalize();b[1].setComponents(f+a,m+g,p+l,c+r).normalize();b[2].setComponents(f+d,m+h,p+n,c+v).normalize();b[3].setComponents(f-d,m-h,p-n,c-v).normalize();b[4].setComponents(f-e,m-k,p-t,c-y).normalize();b[5].setComponents(f+e,m+k,p+t,c+y).normalize();return this},intersectsObject:function(){var a=new Da;return function(b){var c=b.geometry;null===c.boundingSphere&&c.computeBoundingSphere(); +a.copy(c.boundingSphere).applyMatrix4(b.matrixWorld);return this.intersectsSphere(a)}}(),intersectsSprite:function(){var a=new Da;return function(b){a.center.set(0,0,0);a.radius=.7071067811865476;a.applyMatrix4(b.matrixWorld);return this.intersectsSphere(a)}}(),intersectsSphere:function(a){var b=this.planes,c=a.center;a=-a.radius;for(var d=0;6>d;d++)if(b[d].distanceToPoint(c)d;d++){var e=c[d]; +a.x=0e.distanceToPoint(a))return!1}return!0}}(),containsPoint:function(a){for(var b=this.planes,c=0;6>c;c++)if(0>b[c].distanceToPoint(a))return!1;return!0}});var S={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif\n",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif\n", +aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif\n",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif", +begin_vertex:"\nvec3 transformed = vec3( position );\n",beginnormal_vertex:"\nvec3 objectNormal = vec3( normal );\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\tif( decayExponent > 0.0 ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\treturn distanceFalloff * maxDistanceCutoffFactor;\n#else\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n#endif\n\t}\n\treturn 1.0;\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\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 GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n\treturn specularColor * AB.x + AB.y;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n", +bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = 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 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif\n", +clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t#endif\n#endif\n", +clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvarying vec3 vViewPosition;\n#endif\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n", +color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n",color_pars_vertex:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",common:"#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\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}\n", +cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_textureSize (1024.0)\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection = abs(direction);\n\tint face = -1;\n\tif( absDirection.x > absDirection.z ) {\n\t\tif(absDirection.x > absDirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z > absDirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\n#define cubeUV_maxLods1 (log2(cubeUV_textureSize*0.25) - 1.0)\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness = dFdx(roughness);\n\tfloat dyRoughness = dFdy(roughness);\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\td = clamp(d, 1.0, cubeUV_rangeClamp);\n\tfloat mipLevel = 0.5 * log2(d);\n\treturn vec2(floor(mipLevel), fract(mipLevel));\n}\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\tbool bRes = mipLevel == 0.0;\n\tscale = bRes && (scale < a) ? a : scale;\n\tvec3 r;\n\tvec2 offset;\n\tint face = getFaceFromDirection(direction);\n\tfloat rcpPowScale = 1.0 / powScale;\n\tif( face == 0) {\n\t\tr = vec3(direction.x, -direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 1) {\n\t\tr = vec3(direction.y, direction.x, direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 2) {\n\t\tr = vec3(direction.z, direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 3) {\n\t\tr = vec3(direction.x, direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse if( face == 4) {\n\t\tr = vec3(direction.y, direction.x, -direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse {\n\t\tr = vec3(direction.z, -direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\tr = normalize(r);\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base = offset + vec2( texelOffset );\n\treturn base + s * ( scale - 2.0 * texelOffset );\n}\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\nvec4 textureCubeUV( sampler2D envMap, vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\n\tfloat r1 = floor(roughnessVal);\n\tfloat r2 = r1 + 1.0;\n\tfloat t = fract(roughnessVal);\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s = mipInfo.y;\n\tfloat level0 = mipInfo.x;\n\tfloat level1 = level0 + 1.0;\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n\tvec4 result = mix(color10, color20, t);\n\treturn vec4(result.rgb, 1.0);\n}\n#endif\n", +defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n", +emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n",encodings_fragment:" gl_FragColor = linearToOutputTexel( gl_FragColor );\n",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\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.w );\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.w );\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.xyz * value.w * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, 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.x, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = min( floor( D ) / 255.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 = value.rgb * cLogLuvM;\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 = Xp_Y_XYZp.rgb * cLogLuvInverseM;\n\treturn vec4( max(vRGB, 0.0), 1.0 );\n}\n", +envmap_fragment:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\treflectVec = normalize( reflectVec );\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\tenvColor = envMapTexelToLinear( envColor );\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif\n", +envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\n\tuniform float reflectivity;\n\tuniform float envMapIntensity;\n#endif\n#ifdef USE_ENVMAP\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\n\t\tvarying vec3 vWorldPosition;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif\n", +envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif\n",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\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\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, 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\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent ));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif\n", +envmap_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif\n", +fog_vertex:"\n#ifdef USE_FOG\nfogDepth = -mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n varying float fogDepth;\n#endif\n",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\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\n",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\n", +gradientmap_pars_fragment:"#ifdef TOON\n\tuniform sampler2D gradientMap;\n\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\t\tfloat dotNL = dot( normal, lightDirection );\n\t\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t\t#ifdef USE_GRADIENTMAP\n\t\t\treturn texture2D( gradientMap, coord ).rgb;\n\t\t#else\n\t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t\t#endif\n\t}\n#endif\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif\n", +lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif\n", +lights_pars_begin:"uniform vec3 ambientLightColor;\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t\tfloat shadowCameraNear;\n\t\tfloat shadowCameraFar;\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\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( 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\n", +lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifdef TOON\n\t\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#else\n\t\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\t\tvec3 irradiance = dotNL * directLight.color;\n\t#endif\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)\n", +lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef STANDARD\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.clearCoat = saturate( clearCoat );\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\n#endif\n", +lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\t#ifndef STANDARD\n\t\tfloat clearCoat;\n\t\tfloat clearCoatRoughness;\n\t#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\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#ifndef STANDARD\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#ifndef STANDARD\n\t\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifndef STANDARD\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\tfloat dotNL = dotNV;\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n\t#ifndef STANDARD\n\t\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\n#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )\n#define Material_ClearCoat_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}\n", +lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop\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#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearCoatRadiance = vec3( 0.0 );\n#endif\n", +lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\n\t#ifndef STANDARD\n\t\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\n\t#endif\n#endif\n", +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, clearCoatRadiance, geometry, material, reflectedLight );\n#endif\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\n\tuniform float logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n#endif\n", +logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n\tuniform float logDepthBufFC;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\tgl_Position.z *= gl_Position.w;\n\t#endif\n#endif\n",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif\n", +map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n",map_particle_fragment:"#ifdef USE_MAP\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n",map_particle_pars_fragment:"#ifdef USE_MAP\n\tuniform mat3 uvTransform;\n\tuniform sampler2D map;\n#endif\n",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif\n", +metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n#endif\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif", +morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif\n", +normal_fragment_begin:"#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 * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n#endif\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\n\t#ifdef OBJECTSPACE_NORMALMAP\n\t\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\t#ifdef FLIP_SIDED\n\t\t\tnormal = - normal;\n\t\t#endif\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#endif\n\t\tnormal = normalize( normalMatrix * normal );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n", +normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\t#ifdef OBJECTSPACE_NORMALMAP\n\t\tuniform mat3 normalMatrix;\n\t#else\n\t\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\t\tvec2 st0 = dFdx( vUv.st );\n\t\t\tvec2 st1 = dFdy( vUv.st );\n\t\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\t\tvec3 N = normalize( surf_norm );\n\t\t\tmat3 tsn = mat3( S, T, N );\n\t\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\t\tmapN.xy *= normalScale;\n\t\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t\treturn normalize( tsn * mapN );\n\t\t}\n\t#endif\n#endif\n", +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}\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}\n", +premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\ngl_Position = projectionMatrix * mvPosition;\n",dithering_fragment:"#if defined( DITHERING )\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif\n",dithering_pars_fragment:"#if defined( 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\n", +roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\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\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( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\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 )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif\n", +shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n#endif\n", +shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif\n", +shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}\n", +skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform sampler2D boneTexture;\n\t\tuniform int 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\n", +skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif\n",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n#endif\n", +specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif\n",tonemapping_pars_fragment:"#ifndef saturate\n\t#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\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}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\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}\n", +uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\n", +uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = ( 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#endif", +uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n#endif\n",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldPosition;\nvoid main() {\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\tgl_FragColor.a *= opacity;\n}\n", +cube_vert:"varying vec3 vWorldPosition;\n#include \nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}\n",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}\n", +depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n", +distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}\n", +distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}\n", +equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldPosition;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldPosition );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}\n",equirect_vert:"varying vec3 vWorldPosition;\n#include \nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}\n", +linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \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 \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}\n", +linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}\n", +meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}\n", +meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_ENVMAP\n\t#include \n\t#include \n\t#include \n\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n", +meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \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 \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#include \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 \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n", +meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n", +meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \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 \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n", +meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}\n", +meshphysical_frag:"#define PHYSICAL\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifndef STANDARD\n\tuniform float clearCoat;\n\tuniform float clearCoatRoughness;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \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 \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n", +meshphysical_vert:"#define PHYSICAL\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}\n", +normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}\n", +normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}\n", +points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}\n", +points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_SIZEATTENUATION\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\n\t#else\n\t\tgl_PointSize = size;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}\n", +shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n}\n",shadow_vert:"#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n", +sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n}\n", +sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \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\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\tvec4 mvPosition;\n\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}\n"}, +Aa={merge:function(a){for(var b={},c=0;c>16&255)/255;this.g=(a>>8&255)/255;this.b=(a&255)/255;return this},setRGB:function(a,b,c){this.r=a;this.g=b;this.b=c;return this},setHSL:function(){function a(a,c,d){0>d&&(d+=1);1d?c:d<2/3?a+6*(c-a)*(2/3-d):a}return function(b, +c,d){b=H.euclideanModulo(b,1);c=H.clamp(c,0,1);d=H.clamp(d,0,1);0===c?this.r=this.g=this.b=d:(c=.5>=d?d*(1+c):d+c-d*c,d=2*d-c,this.r=a(d,c,b+1/3),this.g=a(d,c,b),this.b=a(d,c,b-1/3));return this}}(),setStyle:function(a){function b(b){void 0!==b&&1>parseFloat(b)&&console.warn("THREE.Color: Alpha component of "+a+" will be ignored.")}var c;if(c=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(a)){var d=c[2];switch(c[1]){case "rgb":case "rgba":if(c=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r= +Math.min(255,parseInt(c[1],10))/255,this.g=Math.min(255,parseInt(c[2],10))/255,this.b=Math.min(255,parseInt(c[3],10))/255,b(c[5]),this;if(c=/^(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r=Math.min(100,parseInt(c[1],10))/100,this.g=Math.min(100,parseInt(c[2],10))/100,this.b=Math.min(100,parseInt(c[3],10))/100,b(c[5]),this;break;case "hsl":case "hsla":if(c=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d)){d=parseFloat(c[1])/ +360;var e=parseInt(c[2],10)/100,f=parseInt(c[3],10)/100;b(c[5]);return this.setHSL(d,e,f)}}}else if(c=/^#([A-Fa-f0-9]+)$/.exec(a)){c=c[1];d=c.length;if(3===d)return this.r=parseInt(c.charAt(0)+c.charAt(0),16)/255,this.g=parseInt(c.charAt(1)+c.charAt(1),16)/255,this.b=parseInt(c.charAt(2)+c.charAt(2),16)/255,this;if(6===d)return this.r=parseInt(c.charAt(0)+c.charAt(1),16)/255,this.g=parseInt(c.charAt(2)+c.charAt(3),16)/255,this.b=parseInt(c.charAt(4)+c.charAt(5),16)/255,this}a&&0a?.0773993808*a:Math.pow(.9478672986*a+.0521327014,2.4)}return function(b){this.r=a(b.r);this.g=a(b.g);this.b=a(b.b);return this}}(),copyLinearToSRGB:function(){function a(a){return.0031308>a?12.92*a:1.055*Math.pow(a,.41666)-.055}return function(b){this.r=a(b.r);this.g=a(b.g);this.b=a(b.b);return this}}(),convertSRGBToLinear:function(){this.copySRGBToLinear(this); +return this},convertLinearToSRGB:function(){this.copyLinearToSRGB(this);return this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(a){void 0===a&&(console.warn("THREE.Color: .getHSL() target is now required"),a={h:0,s:0,l:0});var b=this.r,c=this.g,d=this.b,e=Math.max(b,c,d),f=Math.min(b,c,d),g,h=(f+e)/2;if(f===e)f=g=0;else{var k=e-f;f=.5>=h?k/(e+f):k/(2-e-f);switch(e){case b:g=(c- +d)/k+(cMath.abs(g)?(this._x=Math.atan2(-m,e),this._z= +Math.atan2(-f,a)):(this._x=Math.atan2(n,k),this._z=0)):"YXZ"===b?(this._x=Math.asin(-d(m,-1,1)),.99999>Math.abs(m)?(this._y=Math.atan2(g,e),this._z=Math.atan2(h,k)):(this._y=Math.atan2(-l,a),this._z=0)):"ZXY"===b?(this._x=Math.asin(d(n,-1,1)),.99999>Math.abs(n)?(this._y=Math.atan2(-l,e),this._z=Math.atan2(-f,k)):(this._y=0,this._z=Math.atan2(h,a))):"ZYX"===b?(this._y=Math.asin(-d(l,-1,1)),.99999>Math.abs(l)?(this._x=Math.atan2(n,e),this._z=Math.atan2(h,a)):(this._x=0,this._z=Math.atan2(-f,k))):"YZX"=== +b?(this._z=Math.asin(d(h,-1,1)),.99999>Math.abs(h)?(this._x=Math.atan2(-m,k),this._y=Math.atan2(-l,a)):(this._x=0,this._y=Math.atan2(g,e))):"XZY"===b?(this._z=Math.asin(-d(f,-1,1)),.99999>Math.abs(f)?(this._x=Math.atan2(n,k),this._y=Math.atan2(g,a)):(this._x=Math.atan2(-m,e),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+b);this._order=b;if(!1!==c)this.onChangeCallback();return this},setFromQuaternion:function(){var a=new I;return function(b,c,d){a.makeRotationFromQuaternion(b); +return this.setFromRotationMatrix(a,c,d)}}(),setFromVector3:function(a,b){return this.set(a.x,a.y,a.z,b||this._order)},reorder:function(){var a=new fa;return function(b){a.setFromEuler(this);return this.setFromQuaternion(a,b)}}(),equals:function(a){return a._x===this._x&&a._y===this._y&&a._z===this._z&&a._order===this._order},fromArray:function(a){this._x=a[0];this._y=a[1];this._z=a[2];void 0!==a[3]&&(this._order=a[3]);this.onChangeCallback();return this},toArray:function(a,b){void 0===a&&(a=[]); +void 0===b&&(b=0);a[b]=this._x;a[b+1]=this._y;a[b+2]=this._z;a[b+3]=this._order;return a},toVector3:function(a){return a?a.set(this._x,this._y,this._z):new p(this._x,this._y,this._z)},onChange:function(a){this.onChangeCallback=a;return this},onChangeCallback:function(){}});Object.assign(Rd.prototype,{set:function(a){this.mask=1<g;g++)if(d[g]===d[(g+1)%3]){a.push(f);break}for(f=a.length-1;0<=f;f--)for(d=a[f],this.faces.splice(d,1),c=0,e= +this.faceVertexUvs.length;cthis.opacity&&(d.opacity=this.opacity); +!0===this.transparent&&(d.transparent=this.transparent);d.depthFunc=this.depthFunc;d.depthTest=this.depthTest;d.depthWrite=this.depthWrite;0!==this.rotation&&(d.rotation=this.rotation);1!==this.linewidth&&(d.linewidth=this.linewidth);void 0!==this.dashSize&&(d.dashSize=this.dashSize);void 0!==this.gapSize&&(d.gapSize=this.gapSize);void 0!==this.scale&&(d.scale=this.scale);!0===this.dithering&&(d.dithering=!0);0a?b.copy(this.origin):b.copy(this.direction).multiplyScalar(a).add(this.origin)},distanceToPoint:function(a){return Math.sqrt(this.distanceSqToPoint(a))},distanceSqToPoint:function(){var a=new p;return function(b){var c=a.subVectors(b,this.origin).dot(this.direction);if(0>c)return this.origin.distanceToSquared(b);a.copy(this.direction).multiplyScalar(c).add(this.origin);return a.distanceToSquared(b)}}(),distanceSqToSegment:function(){var a=new p,b=new p,c=new p;return function(d,e,f,g){a.copy(d).add(e).multiplyScalar(.5); +b.copy(e).sub(d).normalize();c.copy(this.origin).sub(a);var h=.5*d.distanceTo(e),k=-this.direction.dot(b),m=c.dot(this.direction),l=-c.dot(b),n=c.lengthSq(),t=Math.abs(1-k*k);if(0=-p?e<=p?(h=1/t,d*=h,e*=h,k=d*(d+k*e+2*m)+e*(k*d+e+2*l)+n):(e=h,d=Math.max(0,-(k*e+m)),k=-d*d+e*(e+2*l)+n):(e=-h,d=Math.max(0,-(k*e+m)),k=-d*d+e*(e+2*l)+n):e<=-p?(d=Math.max(0,-(-k*h+m)),e=0b)return null;b=Math.sqrt(b-e);e=d-b;d+=b;return 0>e&&0>d?null:0>e?this.at(d, +c):this.at(e,c)}}(),intersectsSphere:function(a){return this.distanceToPoint(a.center)<=a.radius},distanceToPlane:function(a){var b=a.normal.dot(this.direction);if(0===b)return 0===a.distanceToPoint(this.origin)?0:null;a=-(this.origin.dot(a.normal)+a.constant)/b;return 0<=a?a:null},intersectPlane:function(a,b){a=this.distanceToPlane(a);return null===a?null:this.at(a,b)},intersectsPlane:function(a){var b=a.distanceToPoint(this.origin);return 0===b||0>a.normal.dot(this.direction)*b?!0:!1},intersectBox:function(a, +b){var c=1/this.direction.x;var d=1/this.direction.y;var e=1/this.direction.z,f=this.origin;if(0<=c){var g=(a.min.x-f.x)*c;c*=a.max.x-f.x}else g=(a.max.x-f.x)*c,c*=a.min.x-f.x;if(0<=d){var h=(a.min.y-f.y)*d;d*=a.max.y-f.y}else h=(a.max.y-f.y)*d,d*=a.min.y-f.y;if(g>d||h>c)return null;if(h>g||g!==g)g=h;if(da||h>c)return null;if(h>g||g!==g)g=h;if(ac?null:this.at(0<=g?g:c,b)},intersectsBox:function(){var a= +new p;return function(b){return null!==this.intersectBox(b,a)}}(),intersectTriangle:function(){var a=new p,b=new p,c=new p,d=new p;return function(e,f,g,h,k){b.subVectors(f,e);c.subVectors(g,e);d.crossVectors(b,c);f=this.direction.dot(d);if(0f)h=-1,f=-f;else return null;a.subVectors(this.origin,e);e=h*this.direction.dot(c.crossVectors(a,c));if(0>e)return null;g=h*this.direction.dot(b.cross(a));if(0>g||e+g>f)return null;e=-h*a.dot(d);return 0>e?null:this.at(e/f,k)}}(), +applyMatrix4:function(a){this.origin.applyMatrix4(a);this.direction.transformDirection(a);return this},equals:function(a){return a.origin.equals(this.origin)&&a.direction.equals(this.direction)}});Object.assign(ja,{getNormal:function(){var a=new p;return function(b,c,d,e){void 0===e&&(console.warn("THREE.Triangle: .getNormal() target is now required"),e=new p);e.subVectors(d,c);a.subVectors(b,c);e.cross(a);b=e.lengthSq();return 0=a.x+a.y}}()});Object.assign(ja.prototype, +{set:function(a,b,c){this.a.copy(a);this.b.copy(b);this.c.copy(c);return this},setFromPointsAndIndices:function(a,b,c,d){this.a.copy(a[b]);this.b.copy(a[c]);this.c.copy(a[d]);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.a.copy(a.a);this.b.copy(a.b);this.c.copy(a.c);return this},getArea:function(){var a=new p,b=new p;return function(){a.subVectors(this.c,this.b);b.subVectors(this.a,this.b);return.5*a.cross(b).length()}}(),getMidpoint:function(a){void 0=== +a&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),a=new p);return a.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(a){return ja.getNormal(this.a,this.b,this.c,a)},getPlane:function(a){void 0===a&&(console.warn("THREE.Triangle: .getPlane() target is now required"),a=new p);return a.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(a,b){return ja.getBarycoord(a,this.a,this.b,this.c,b)},containsPoint:function(a){return ja.containsPoint(a, +this.a,this.b,this.c)},intersectsBox:function(a){return a.intersectsTriangle(this)},closestPointToPoint:function(){var a=new p,b=new p,c=new p,d=new p,e=new p,f=new p;return function(g,h){void 0===h&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),h=new p);var k=this.a,m=this.b,l=this.c;a.subVectors(m,k);b.subVectors(l,k);d.subVectors(g,k);var n=a.dot(d),t=b.dot(d);if(0>=n&&0>=t)return h.copy(k);e.subVectors(g,m);var u=a.dot(e),r=b.dot(e);if(0<=u&&r<=u)return h.copy(m); +var v=n*r-u*t;if(0>=v&&0<=n&&0>=u)return m=n/(n-u),h.copy(k).addScaledVector(a,m);f.subVectors(g,l);g=a.dot(f);var y=b.dot(f);if(0<=y&&g<=y)return h.copy(l);n=g*t-n*y;if(0>=n&&0<=t&&0>=y)return v=t/(t-y),h.copy(k).addScaledVector(b,v);t=u*y-g*r;if(0>=t&&0<=r-u&&0<=g-y)return c.subVectors(l,m),v=(r-u)/(r-u+(g-y)),h.copy(m).addScaledVector(c,v);l=1/(t+n+v);m=n*l;v*=l;return h.copy(k).addScaledVector(a,m).addScaledVector(b,v)}}(),equals:function(a){return a.a.equals(this.a)&&a.b.equals(this.b)&&a.c.equals(this.c)}}); +la.prototype=Object.assign(Object.create(D.prototype),{constructor:la,isMesh:!0,setDrawMode:function(a){this.drawMode=a},copy:function(a){D.prototype.copy.call(this,a);this.drawMode=a.drawMode;void 0!==a.morphTargetInfluences&&(this.morphTargetInfluences=a.morphTargetInfluences.slice());void 0!==a.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},a.morphTargetDictionary));return this},updateMorphTargets:function(){var a=this.geometry;if(a.isBufferGeometry){a=a.morphAttributes;var b= +Object.keys(a);if(0c.far?null:{distance:b,point:x.clone(),object:a}}function c(c,d,e,f,m,l,n,q,p){g.fromBufferAttribute(m,n);h.fromBufferAttribute(m,q);k.fromBufferAttribute(m, +p);if(c=b(c,d,e,f,g,h,k,y))l&&(t.fromBufferAttribute(l,n),u.fromBufferAttribute(l,q),r.fromBufferAttribute(l,p),c.uv=a(y,g,h,k,t,u,r)),l=new Ta(n,q,p),ja.getNormal(g,h,k,l.normal),c.face=l;return c}var d=new I,e=new mb,f=new Da,g=new p,h=new p,k=new p,m=new p,l=new p,n=new p,t=new z,u=new z,r=new z,v=new p,y=new p,x=new p;return function(q,p){var v=this.geometry,w=this.material,x=this.matrixWorld;if(void 0!==w&&(null===v.boundingSphere&&v.computeBoundingSphere(),f.copy(v.boundingSphere),f.applyMatrix4(x), +!1!==q.ray.intersectsSphere(f)&&(d.getInverse(x),e.copy(q.ray).applyMatrix4(d),null===v.boundingBox||!1!==e.intersectsBox(v.boundingBox))))if(v.isBufferGeometry){var z=v.index,B=v.attributes.position,A=v.attributes.uv,D=v.groups;v=v.drawRange;var C;if(null!==z)if(Array.isArray(w)){var H=0;for(C=D.length;He.far||f.push({distance:q,point:b.clone(),face:null,object:this})}}(),clone:function(){return(new this.constructor(this.material)).copy(this)},copy:function(a){D.prototype.copy.call(this,a);void 0!==a.center&&this.center.copy(a.center);return this}}); +Bc.prototype=Object.assign(Object.create(D.prototype),{constructor:Bc,copy:function(a){D.prototype.copy.call(this,a,!1);a=a.levels;for(var b=0,c=a.length;b=d[e].distance)d[e-1].object.visible=!1,d[e].object.visible=!0;else break; +for(;ef||(l.applyMatrix4(this.matrixWorld),v=d.ray.origin.distanceTo(l),vd.far||e.push({distance:v,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}else for(g=0,r=u.length/3-1;gf||(l.applyMatrix4(this.matrixWorld),v=d.ray.origin.distanceTo(l),vd.far||e.push({distance:v,point:h.clone().applyMatrix4(this.matrixWorld), +index:g,face:null,faceIndex:null,object:this}))}else if(g.isGeometry)for(k=g.vertices,m=k.length,g=0;gf||(l.applyMatrix4(this.matrixWorld),v=d.ray.origin.distanceTo(l),vd.far||e.push({distance:v,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});W.prototype=Object.assign(Object.create(sa.prototype), +{constructor:W,isLineSegments:!0,computeLineDistances:function(){var a=new p,b=new p;return function(){var c=this.geometry;if(c.isBufferGeometry)if(null===c.index){for(var d=c.attributes.position,e=[],f=0,g=d.count;fd.far||e.push({distance:a,distanceToRay:Math.sqrt(f),point:n.clone(),index:c,face:null,object:g}))}var g=this,h=this.geometry,k=this.matrixWorld,m=d.params.Points.threshold;null===h.boundingSphere&& +h.computeBoundingSphere();c.copy(h.boundingSphere);c.applyMatrix4(k);c.radius+=m;if(!1!==d.ray.intersectsSphere(c)){a.getInverse(k);b.copy(d.ray).applyMatrix4(a);m/=(this.scale.x+this.scale.y+this.scale.z)/3;var l=m*m;m=new p;var n=new p;if(h.isBufferGeometry){var t=h.index;h=h.attributes.position.array;if(null!==t){var u=t.array;t=0;for(var r=u.length;t=a.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}});Pb.prototype=Object.create(T.prototype);Pb.prototype.constructor=Pb;Pb.prototype.isCompressedTexture=!0;Dc.prototype=Object.create(T.prototype);Dc.prototype.constructor=Dc;Dc.prototype.isCanvasTexture=!0;Ec.prototype= +Object.create(T.prototype);Ec.prototype.constructor=Ec;Ec.prototype.isDepthTexture=!0;Qb.prototype=Object.create(C.prototype);Qb.prototype.constructor=Qb;Fc.prototype=Object.create(R.prototype);Fc.prototype.constructor=Fc;Rb.prototype=Object.create(C.prototype);Rb.prototype.constructor=Rb;Gc.prototype=Object.create(R.prototype);Gc.prototype.constructor=Gc;na.prototype=Object.create(C.prototype);na.prototype.constructor=na;Hc.prototype=Object.create(R.prototype);Hc.prototype.constructor=Hc;Sb.prototype= +Object.create(na.prototype);Sb.prototype.constructor=Sb;Ic.prototype=Object.create(R.prototype);Ic.prototype.constructor=Ic;pb.prototype=Object.create(na.prototype);pb.prototype.constructor=pb;Jc.prototype=Object.create(R.prototype);Jc.prototype.constructor=Jc;Tb.prototype=Object.create(na.prototype);Tb.prototype.constructor=Tb;Kc.prototype=Object.create(R.prototype);Kc.prototype.constructor=Kc;Ub.prototype=Object.create(na.prototype);Ub.prototype.constructor=Ub;Lc.prototype=Object.create(R.prototype); +Lc.prototype.constructor=Lc;Vb.prototype=Object.create(C.prototype);Vb.prototype.constructor=Vb;Mc.prototype=Object.create(R.prototype);Mc.prototype.constructor=Mc;Wb.prototype=Object.create(C.prototype);Wb.prototype.constructor=Wb;Nc.prototype=Object.create(R.prototype);Nc.prototype.constructor=Nc;Xb.prototype=Object.create(C.prototype);Xb.prototype.constructor=Xb;var Ug={triangulate:function(a,b,c){c=c||2;var d=b&&b.length,e=d?b[0]*c:a.length,f=bf(a,0,e,c,!0),g=[];if(!f)return g;var h;if(d){var k= +c;d=[];var m;var l=0;for(m=b.length;l80*c){var p=h=a[0];var r=d=a[1];for(k=c;kh&&(h=l),b>d&&(d=b);h=Math.max(h-p,d-r);h=0!==h?1/h:0}Qc(f,g,c,p,r,h);return g}},Va={area:function(a){for(var b=a.length,c=0,d=b-1,e=0;eVa.area(a)},triangulateShape:function(a,b){var c=[],d=[],e=[];ff(a);gf(c,a);var f=a.length;b.forEach(ff);for(a=0;aMath.abs(g-k)?[new z(a,1-c),new z(h,1-d),new z(m,1-e),new z(n,1-b)]:[new z(g,1-c),new z(k,1-d),new z(l,1-e),new z(t,1-b)]}};Sc.prototype=Object.create(R.prototype);Sc.prototype.constructor=Sc;Yb.prototype=Object.create(Oa.prototype);Yb.prototype.constructor=Yb;Tc.prototype=Object.create(R.prototype);Tc.prototype.constructor=Tc;sb.prototype=Object.create(C.prototype);sb.prototype.constructor=sb;Uc.prototype=Object.create(R.prototype);Uc.prototype.constructor=Uc;Zb.prototype=Object.create(C.prototype); +Zb.prototype.constructor=Zb;Vc.prototype=Object.create(R.prototype);Vc.prototype.constructor=Vc;$b.prototype=Object.create(C.prototype);$b.prototype.constructor=$b;tb.prototype=Object.create(R.prototype);tb.prototype.constructor=tb;tb.prototype.toJSON=function(){var a=R.prototype.toJSON.call(this);return jf(this.parameters.shapes,a)};ub.prototype=Object.create(C.prototype);ub.prototype.constructor=ub;ub.prototype.toJSON=function(){var a=C.prototype.toJSON.call(this);return jf(this.parameters.shapes, +a)};ac.prototype=Object.create(C.prototype);ac.prototype.constructor=ac;vb.prototype=Object.create(R.prototype);vb.prototype.constructor=vb;Wa.prototype=Object.create(C.prototype);Wa.prototype.constructor=Wa;Wc.prototype=Object.create(vb.prototype);Wc.prototype.constructor=Wc;Xc.prototype=Object.create(Wa.prototype);Xc.prototype.constructor=Xc;Yc.prototype=Object.create(R.prototype);Yc.prototype.constructor=Yc;bc.prototype=Object.create(C.prototype);bc.prototype.constructor=bc;var xa=Object.freeze({WireframeGeometry:Qb, +ParametricGeometry:Fc,ParametricBufferGeometry:Rb,TetrahedronGeometry:Hc,TetrahedronBufferGeometry:Sb,OctahedronGeometry:Ic,OctahedronBufferGeometry:pb,IcosahedronGeometry:Jc,IcosahedronBufferGeometry:Tb,DodecahedronGeometry:Kc,DodecahedronBufferGeometry:Ub,PolyhedronGeometry:Gc,PolyhedronBufferGeometry:na,TubeGeometry:Lc,TubeBufferGeometry:Vb,TorusKnotGeometry:Mc,TorusKnotBufferGeometry:Wb,TorusGeometry:Nc,TorusBufferGeometry:Xb,TextGeometry:Sc,TextBufferGeometry:Yb,SphereGeometry:Tc,SphereBufferGeometry:sb, +RingGeometry:Uc,RingBufferGeometry:Zb,PlaneGeometry:uc,PlaneBufferGeometry:lb,LatheGeometry:Vc,LatheBufferGeometry:$b,ShapeGeometry:tb,ShapeBufferGeometry:ub,ExtrudeGeometry:rb,ExtrudeBufferGeometry:Oa,EdgesGeometry:ac,ConeGeometry:Wc,ConeBufferGeometry:Xc,CylinderGeometry:vb,CylinderBufferGeometry:Wa,CircleGeometry:Yc,CircleBufferGeometry:bc,BoxGeometry:Ib,BoxBufferGeometry:kb});wb.prototype=Object.create(J.prototype);wb.prototype.constructor=wb;wb.prototype.isShadowMaterial=!0;wb.prototype.copy= +function(a){J.prototype.copy.call(this,a);this.color.copy(a.color);return this};cc.prototype=Object.create(ta.prototype);cc.prototype.constructor=cc;cc.prototype.isRawShaderMaterial=!0;Pa.prototype=Object.create(J.prototype);Pa.prototype.constructor=Pa;Pa.prototype.isMeshStandardMaterial=!0;Pa.prototype.copy=function(a){J.prototype.copy.call(this,a);this.defines={STANDARD:""};this.color.copy(a.color);this.roughness=a.roughness;this.metalness=a.metalness;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity= +a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.roughnessMap=a.roughnessMap;this.metalnessMap= +a.metalnessMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.envMapIntensity=a.envMapIntensity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};xb.prototype=Object.create(Pa.prototype);xb.prototype.constructor=xb;xb.prototype.isMeshPhysicalMaterial= +!0;xb.prototype.copy=function(a){Pa.prototype.copy.call(this,a);this.defines={PHYSICAL:""};this.reflectivity=a.reflectivity;this.clearCoat=a.clearCoat;this.clearCoatRoughness=a.clearCoatRoughness;return this};Fa.prototype=Object.create(J.prototype);Fa.prototype.constructor=Fa;Fa.prototype.isMeshPhongMaterial=!0;Fa.prototype.copy=function(a){J.prototype.copy.call(this,a);this.color.copy(a.color);this.specular.copy(a.specular);this.shininess=a.shininess;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity= +a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap; +this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};yb.prototype=Object.create(Fa.prototype);yb.prototype.constructor=yb;yb.prototype.isMeshToonMaterial=!0;yb.prototype.copy=function(a){Fa.prototype.copy.call(this, +a);this.gradientMap=a.gradientMap;return this};zb.prototype=Object.create(J.prototype);zb.prototype.constructor=zb;zb.prototype.isMeshNormalMaterial=!0;zb.prototype.copy=function(a){J.prototype.copy.call(this,a);this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.wireframe=a.wireframe; +this.wireframeLinewidth=a.wireframeLinewidth;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};Ab.prototype=Object.create(J.prototype);Ab.prototype.constructor=Ab;Ab.prototype.isMeshLambertMaterial=!0;Ab.prototype.copy=function(a){J.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive); +this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this}; +Bb.prototype=Object.create(Y.prototype);Bb.prototype.constructor=Bb;Bb.prototype.isLineDashedMaterial=!0;Bb.prototype.copy=function(a){Y.prototype.copy.call(this,a);this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize=a.gapSize;return this};var Vg=Object.freeze({ShadowMaterial:wb,SpriteMaterial:cb,RawShaderMaterial:cc,ShaderMaterial:ta,PointsMaterial:Ea,MeshPhysicalMaterial:xb,MeshStandardMaterial:Pa,MeshPhongMaterial:Fa,MeshToonMaterial:yb,MeshNormalMaterial:zb,MeshLambertMaterial:Ab,MeshDepthMaterial:$a, +MeshDistanceMaterial:ab,MeshBasicMaterial:da,LineDashedMaterial:Bb,LineBasicMaterial:Y,Material:J}),Fb={enabled:!1,files:{},add:function(a,b){!1!==this.enabled&&(this.files[a]=b)},get:function(a){if(!1!==this.enabled)return this.files[a]},remove:function(a){delete this.files[a]},clear:function(){this.files={}}},ka=new ce,Ya={};Object.assign(Ga.prototype,{load:function(a,b,c,d){void 0===a&&(a="");void 0!==this.path&&(a=this.path+a);a=this.manager.resolveURL(a);var e=this,f=Fb.get(a);if(void 0!==f)return e.manager.itemStart(a), +setTimeout(function(){b&&b(f);e.manager.itemEnd(a)},0),f;if(void 0!==Ya[a])Ya[a].push({onLoad:b,onProgress:c,onError:d});else{var g=a.match(/^data:(.*?)(;base64)?,(.*)$/);if(g){c=g[1];var h=!!g[2];g=g[3];g=window.decodeURIComponent(g);h&&(g=window.atob(g));try{var k=(this.responseType||"").toLowerCase();switch(k){case "arraybuffer":case "blob":var m=new Uint8Array(g.length);for(h=0;hg)e=a+1;else if(0b&&(b=0);1Number.EPSILON&&(g.normalize(),c=Math.acos(H.clamp(d[k-1].dot(d[k]),-1,1)),e[k].applyMatrix4(h.makeRotationAxis(g,c))),f[k].crossVectors(d[k],e[k]);if(!0===b)for(c=Math.acos(H.clamp(e[0].dot(e[a]),-1,1)),c/=a,0d;)d+=c;for(;d>c;)d-=c;de&&(e=1);1E-4>d&&(d=e);1E-4>k&&(k=e);Ae.initNonuniformCatmullRom(f.x,g.x,h.x,c.x,d,e,k);Be.initNonuniformCatmullRom(f.y,g.y,h.y,c.y,d,e,k);Ce.initNonuniformCatmullRom(f.z,g.z,h.z,c.z,d,e,k)}else"catmullrom"===this.curveType&&(Ae.initCatmullRom(f.x,g.x,h.x,c.x,this.tension),Be.initCatmullRom(f.y,g.y,h.y,c.y,this.tension),Ce.initCatmullRom(f.z,g.z,h.z,c.z,this.tension));b.set(Ae.calc(a), +Be.calc(a),Ce.calc(a));return b};ca.prototype.copy=function(a){L.prototype.copy.call(this,a);this.points=[];for(var b=0,c=a.points.length;bc.length-2?c.length-1:a+1];c=c[a>c.length-3?c.length-1:a+2];b.set(lf(d,e.x,f.x,g.x,c.x),lf(d,e.y,f.y,g.y,c.y));return b};Ka.prototype.copy=function(a){L.prototype.copy.call(this,a);this.points=[];for(var b=0,c=a.points.length;b=b)return b=c[a]-b,a=this.curves[a],c=a.getLength(),a.getPointAt(0===c?0:1-b/c);a++}return null},getLength:function(){var a=this.getCurveLengths(); +return a[a.length-1]},updateArcLengths:function(){this.needsUpdate=!0;this.cacheLengths=null;this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var a=[],b=0,c=0,d=this.curves.length;c=e)break a;else{f=b[1];a=e)break b}d=c;c= +0}}for(;c>>1,ab;)--f;++f;if(0!==e||f!==d)e>=f&&(f=Math.max(f,1),e=f-1),a=this.getValueSize(),this.times=ia.arraySlice(c,e,f),this.values=ia.arraySlice(this.values,e*a,f*a);return this},validate:function(){var a= +!0,b=this.getValueSize();0!==b-Math.floor(b)&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),a=!1);var c=this.times;b=this.values;var d=c.length;0===d&&(console.error("THREE.KeyframeTrack: Track is empty.",this),a=!1);for(var e=null,f=0;f!==d;f++){var g=c[f];if("number"===typeof g&&isNaN(g)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,f,g);a=!1;break}if(null!==e&&e>g){console.error("THREE.KeyframeTrack: Out of order keys.",this,f,g,e);a=!1;break}e= +g}if(void 0!==b&&ia.isTypedArray(b))for(f=0,c=b.length;f!==c;++f)if(d=b[f],isNaN(d)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,f,d);a=!1;break}return a},optimize:function(){for(var a=this.times,b=this.values,c=this.getValueSize(),d=2302===this.getInterpolation(),e=1,f=a.length-1,g=1;gm.opacity&&(m.transparent=!0);d.setTextures(k);return d.parse(m)}}()});var De={decodeText:function(a){if("undefined"!==typeof TextDecoder)return(new TextDecoder).decode(a);for(var b="",c=0,d=a.length;cf;f++){var E=h[u++];var A=B[2*E];E=B[2*E+1];A=new z(A,E);2!==f&&c.faceVertexUvs[e][v].push(A);0!==f&&c.faceVertexUvs[e][v+1].push(A)}}y&&(y=3*h[u++],r.normal.set(m[y++],m[y++],m[y]),w.normal.copy(r.normal));if(x)for(e=0;4>e;e++)y=3*h[u++],x=new p(m[y++], +m[y++],m[y]),2!==e&&r.vertexNormals.push(x),0!==e&&w.vertexNormals.push(x);n&&(n=h[u++],n=l[n],r.color.setHex(n),w.color.setHex(n));if(k)for(e=0;4>e;e++)n=h[u++],n=l[n],2!==e&&r.vertexColors.push(new G(n)),0!==e&&w.vertexColors.push(new G(n));c.faces.push(r);c.faces.push(w)}else{r=new Ta;r.a=h[u++];r.b=h[u++];r.c=h[u++];v&&(v=h[u++],r.materialIndex=v);v=c.faces.length;if(e)for(e=0;ef;f++)E=h[u++],A=B[2*E],E=B[2*E+1],A=new z(A,E),c.faceVertexUvs[e][v].push(A); +y&&(y=3*h[u++],r.normal.set(m[y++],m[y++],m[y]));if(x)for(e=0;3>e;e++)y=3*h[u++],x=new p(m[y++],m[y++],m[y]),r.vertexNormals.push(x);n&&(n=h[u++],r.color.setHex(l[n]));if(k)for(e=0;3>e;e++)n=h[u++],r.vertexColors.push(new G(l[n]));c.faces.push(r)}}d=a;u=void 0!==d.influencesPerVertex?d.influencesPerVertex:2;if(d.skinWeights)for(g=0,h=d.skinWeights.length;g +Number.EPSILON){if(0>m&&(g=b[f],k=-k,h=b[e],m=-m),!(a.yh.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=m*(a.x-g.x)-k*(a.y-g.y);if(0===e)return!0;0>e||(d=!d)}}else if(a.y===g.y&&(h.x<=a.x&&a.x<=g.x||g.x<=a.x&&a.x<=h.x))return!0}return d}var e=Va.isClockWise,f=this.subPaths;if(0===f.length)return[];if(!0===b)return c(f);b=[];if(1===f.length){var g=f[0];var h=new db;h.curves=g.curves;b.push(h);return b}var k=!e(f[0].getPoints());k=a?!k:k;h=[];var m=[],l=[],n=0;m[n]=void 0;l[n]=[];for(var p= +0,u=f.length;pd&&this._mixBufferRegion(c,a,3*b,1-d,b);d=b;for(var f=b+b;d!==f;++d)if(c[d]!==c[d+b]){e.setValue(c,a);break}},saveOriginalState:function(){var a=this.buffer,b=this.valueSize,c=3*b;this.binding.getValue(a, +c);for(var d=b;d!==c;++d)a[d]=a[c+d%b];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(a,b,c,d,e){if(.5<=d)for(d=0;d!==e;++d)a[b+d]=a[c+d]},_slerp:function(a,b,c,d){fa.slerpFlat(a,b,a,b,a,c,d)},_lerp:function(a,b,c,d,e){for(var f=1-d,g=0;g!==e;++g){var h=b+g;a[h]=a[h]*f+a[c+g]*d}}});Object.assign(pf.prototype,{getValue:function(a,b){this.bind();var c=this._bindings[this._targetGroup.nCachedObjects_];void 0!==c&&c.getValue(a, +b)},setValue:function(a,b){for(var c=this._bindings,d=this._targetGroup.nCachedObjects_,e=c.length;d!==e;++d)c[d].setValue(a,b)},bind:function(){for(var a=this._bindings,b=this._targetGroup.nCachedObjects_,c=a.length;b!==c;++b)a[b].bind()},unbind:function(){for(var a=this._bindings,b=this._targetGroup.nCachedObjects_,c=a.length;b!==c;++b)a[b].unbind()}});Object.assign(pa,{Composite:pf,create:function(a,b,c){return a&&a.isAnimationObjectGroup?new pa.Composite(a,b,c):new pa(a,b,c)},sanitizeNodeName:function(){var a= +/[\[\]\.:\/]/g;return function(b){return b.replace(/\s/g,"_").replace(a,"")}}(),parseTrackName:function(){var a="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",b=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]");a=/(WCOD+)?/.source.replace("WCOD",a);var c=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),d=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),e=new RegExp("^"+b+a+c+d+"$"),f=["material","materials","bones"];return function(a){var b=e.exec(a);if(!b)throw Error("PropertyBinding: Cannot parse trackName: "+ +a);b={nodeName:b[2],objectName:b[3],objectIndex:b[4],propertyName:b[5],propertyIndex:b[6]};var c=b.nodeName&&b.nodeName.lastIndexOf(".");if(void 0!==c&&-1!==c){var d=b.nodeName.substring(c+1);-1!==f.indexOf(d)&&(b.nodeName=b.nodeName.substring(0,c),b.objectName=d)}if(null===b.propertyName||0===b.propertyName.length)throw Error("PropertyBinding: can not parse propertyName from trackName: "+a);return b}}(),findNode:function(a,b){if(!b||""===b||"root"===b||"."===b||-1===b||b===a.name||b===a.uuid)return a; +if(a.skeleton){var c=a.skeleton.getBoneByName(b);if(void 0!==c)return c}if(a.children){var d=function(a){for(var c=0;c=b){var p=b++,n=a[p];c[n.uuid]=l;a[l]=n;c[k]=p;a[p]=h;h=0;for(k=e;h!==k;++h){n=d[h];var t=n[l];n[l]=n[p];n[p]=t}}}this.nCachedObjects_=b},uncache:function(){for(var a=this._objects,b=a.length,c=this.nCachedObjects_,d=this._indicesByUUID,e=this._bindings,f=e.length,g=0,h=arguments.length;g!==h;++g){var k= +arguments[g].uuid,l=d[k];if(void 0!==l)if(delete d[k],lb||0===c)return;this._startTime=null;b*=c}b*=this._updateTimeScale(a);c=this._updateTime(b);a=this._updateWeight(a);if(0c.parameterPositions[1]&&(this.stopFading(),0===d&&(this.enabled=!1))}}return this._effectiveWeight=b},_updateTimeScale:function(a){var b=0;if(!this.paused){b=this.timeScale;var c=this._timeScaleInterpolant;if(null!==c){var d=c.evaluate(a)[0];b*=d;a>c.parameterPositions[1]&&(this.stopWarping(),0===b?this.paused=!0:this.timeScale=b)}}return this._effectiveTimeScale=b},_updateTime:function(a){var b=this.time+a,c=this._clip.duration,d=this.loop,e=this._loopCount,f=2202===d;if(0===a)return-1=== +e?b:f&&1===(e&1)?c-b:b;if(2200===d)a:{if(-1===e&&(this._loopCount=0,this._setEndings(!0,!0,!1)),b>=c)b=c;else if(0>b)b=0;else break a;this.clampWhenFinished?this.paused=!0:this.enabled=!1;this._mixer.dispatchEvent({type:"finished",action:this,direction:0>a?-1:1})}else{-1===e&&(0<=a?(e=0,this._setEndings(!0,0===this.repetitions,f)):this._setEndings(0===this.repetitions,!0,f));if(b>=c||0>b){d=Math.floor(b/c);b-=c*d;e+=Math.abs(d);var g=this.repetitions-e;0>=g?(this.clampWhenFinished?this.paused=!0: +this.enabled=!1,b=0a,this._setEndings(a,!a,f)):this._setEndings(!1,!1,f),this._loopCount=e,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:d}))}if(f&&1===(e&1))return this.time=b,c-b}return this.time=b},_setEndings:function(a,b,c){var d=this._interpolantSettings;c?(d.endingStart=2401,d.endingEnd=2401):(d.endingStart=a?this.zeroSlopeAtStart?2401:2400:2402,d.endingEnd=b?this.zeroSlopeAtEnd?2401: +2400:2402)},_scheduleFading:function(a,b,c){var d=this._mixer,e=d.time,f=this._weightInterpolant;null===f&&(this._weightInterpolant=f=d._lendControlInterpolant());d=f.parameterPositions;f=f.sampleValues;d[0]=e;f[0]=b;d[1]=e+a;f[1]=c;return this}});re.prototype=Object.assign(Object.create(ya.prototype),{constructor:re,_bindAction:function(a,b){var c=a._localRoot||this._root,d=a._clip.tracks,e=d.length,f=a._propertyBindings;a=a._interpolants;var g=c.uuid,h=this._bindingsByRootAndName,k=h[g];void 0=== +k&&(k={},h[g]=k);for(h=0;h!==e;++h){var l=d[h],p=l.name,n=k[p];if(void 0===n){n=f[h];if(void 0!==n){null===n._cacheIndex&&(++n.referenceCount,this._addInactiveBinding(n,g,p));continue}n=new qe(pa.create(c,p,b&&b._propertyBindings[h].binding.parsedPath),l.ValueTypeName,l.getValueSize());++n.referenceCount;this._addInactiveBinding(n,g,p)}f[h]=n;a[h].resultBuffer=n.buffer}},_activateAction:function(a){if(!this._isActiveAction(a)){if(null===a._cacheIndex){var b=(a._localRoot||this._root).uuid,c=a._clip.uuid, +d=this._actionsByClip[c];this._bindAction(a,d&&d.knownActions[0]);this._addInactiveAction(a,c,b)}b=a._propertyBindings;c=0;for(d=b.length;c!==d;++c){var e=b[c];0===e.useCount++&&(this._lendBinding(e),e.saveOriginalState())}this._lendAction(a)}},_deactivateAction:function(a){if(this._isActiveAction(a)){for(var b=a._propertyBindings,c=0,d=b.length;c!==d;++c){var e=b[c];0===--e.useCount&&(e.restoreOriginalState(),this._takeBackBinding(e))}this._takeBackAction(a)}},_initMemoryManager:function(){this._actions= +[];this._nActiveActions=0;this._actionsByClip={};this._bindings=[];this._nActiveBindings=0;this._bindingsByRootAndName={};this._controlInterpolants=[];this._nActiveControlInterpolants=0;var a=this;this.stats={actions:{get total(){return a._actions.length},get inUse(){return a._nActiveActions}},bindings:{get total(){return a._bindings.length},get inUse(){return a._nActiveBindings}},controlInterpolants:{get total(){return a._controlInterpolants.length},get inUse(){return a._nActiveControlInterpolants}}}}, +_isActiveAction:function(a){a=a._cacheIndex;return null!==a&&athis.max.x||a.ythis.max.y?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y},getParameter:function(a, +b){void 0===b&&(console.warn("THREE.Box2: .getParameter() target is now required"),b=new z);return b.set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(a){return a.max.xthis.max.x||a.max.ythis.max.y?!1:!0},clampPoint:function(a,b){void 0===b&&(console.warn("THREE.Box2: .clampPoint() target is now required"),b=new z);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(){var a=new z; +return function(b){return a.copy(b).clamp(this.min,this.max).sub(b).length()}}(),intersect:function(a){this.min.max(a.min);this.max.min(a.max);return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}});Object.assign(xe.prototype,{set:function(a,b){this.start.copy(a);this.end.copy(b);return this},clone:function(){return(new this.constructor).copy(this)}, +copy:function(a){this.start.copy(a.start);this.end.copy(a.end);return this},getCenter:function(a){void 0===a&&(console.warn("THREE.Line3: .getCenter() target is now required"),a=new p);return a.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(a){void 0===a&&(console.warn("THREE.Line3: .delta() target is now required"),a=new p);return a.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)}, +at:function(a,b){void 0===b&&(console.warn("THREE.Line3: .at() target is now required"),b=new p);return this.delta(b).multiplyScalar(a).add(this.start)},closestPointToPointParameter:function(){var a=new p,b=new p;return function(c,d){a.subVectors(c,this.start);b.subVectors(this.end,this.start);c=b.dot(b);c=b.dot(a)/c;d&&(c=H.clamp(c,0,1));return c}}(),closestPointToPoint:function(a,b,c){a=this.closestPointToPointParameter(a,b);void 0===c&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"), +c=new p);return this.delta(c).multiplyScalar(a).add(this.start)},applyMatrix4:function(a){this.start.applyMatrix4(a);this.end.applyMatrix4(a);return this},equals:function(a){return a.start.equals(this.start)&&a.end.equals(this.end)}});ed.prototype=Object.create(D.prototype);ed.prototype.constructor=ed;ed.prototype.isImmediateRenderObject=!0;fd.prototype=Object.create(W.prototype);fd.prototype.constructor=fd;fd.prototype.update=function(){var a=new p,b=new p,c=new ra;return function(){var d=["a","b", +"c"];this.object.updateMatrixWorld(!0);c.getNormalMatrix(this.object.matrixWorld);var e=this.object.matrixWorld,f=this.geometry.attributes.position,g=this.object.geometry;if(g&&g.isGeometry)for(var h=g.vertices,k=g.faces,l=g=0,p=k.length;lMath.abs(b)&&(b=1E-8);this.scale.set(.5*this.size,.5*this.size,b);this.children[0].material.side=0>b?1:0;this.lookAt(this.plane.normal);D.prototype.updateMatrixWorld.call(this,a)};var Nd,ye;Eb.prototype=Object.create(D.prototype);Eb.prototype.constructor=Eb;Eb.prototype.setDirection=function(){var a=new p,b;return function(c){.99999c.y?this.quaternion.set(1,0,0,0):(a.set(c.z,0,-c.x).normalize(),b=Math.acos(c.y),this.quaternion.setFromAxisAngle(a,b))}}();Eb.prototype.setLength=function(a,b,c){void 0===b&&(b=.2*a);void 0===c&&(c=.2*b);this.line.scale.set(1,Math.max(0,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()};Eb.prototype.setColor=function(a){this.line.material.color.copy(a);this.cone.material.color.copy(a)};ld.prototype=Object.create(W.prototype); +ld.prototype.constructor=ld;L.create=function(a,b){console.log("THREE.Curve.create() has been deprecated");a.prototype=Object.create(L.prototype);a.prototype.constructor=a;a.prototype.getPoint=b;return a};Object.assign(Xa.prototype,{createPointsGeometry:function(a){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");a=this.getPoints(a);return this.createGeometry(a)},createSpacedPointsGeometry:function(a){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."); +a=this.getSpacedPoints(a);return this.createGeometry(a)},createGeometry:function(a){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var b=new R,c=0,d=a.length;c + + + + + + + + + The Cube - A Rubik's Cube Game + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+

+ THE + CUBE +

+
+ Double tap to start +
+
+ 0:00 +
+
+ Complete! +
+
+ + Best Time! +
+
+ +
+ + + + + +
+ +
+ + + +
+ +
+
+ Cube:3x3x3 +
+
+ Total solves:- +
+
+ Best time:- +
+
+ Worst time:- +
+
+ Average of 5:- +
+
+ Average of 12:- +
+
+ Average of 25:- +
+
+ +
+ + + + + +
+ +
+ + + + + + + + + diff --git a/public/the-cube-master/package-lock.json b/public/the-cube-master/package-lock.json new file mode 100644 index 0000000..e7936a8 --- /dev/null +++ b/public/the-cube-master/package-lock.json @@ -0,0 +1,727 @@ +{ + "name": "bsehovac.github.io", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@comandeer/babel-plugin-banner": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@comandeer/babel-plugin-banner/-/babel-plugin-banner-2.0.2.tgz", + "integrity": "sha512-5/GMOcgqBy/+cMYfOTFhqrioolOP+g7ADjl4jo1nYONwVGvMpzKPdweuVaJsC/Ol2PH+GmwlF2WrNP3xjWoSiw==", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "babel-core": { + "version": "6.26.3", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-generator": "6.26.1", + "babel-helpers": "6.24.1", + "babel-messages": "6.23.0", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "convert-source-map": "1.5.1", + "debug": "2.6.9", + "json5": "0.5.1", + "lodash": "4.17.10", + "minimatch": "3.0.4", + "path-is-absolute": "1.0.1", + "private": "0.1.8", + "slash": "1.0.0", + "source-map": "0.5.7" + } + }, + "babel-generator": { + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "dev": true, + "requires": { + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.10", + "source-map": "0.5.7", + "trim-right": "1.0.1" + } + }, + "babel-helper-evaluate-path": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-helper-evaluate-path/-/babel-helper-evaluate-path-0.4.3.tgz", + "integrity": "sha1-ComvcCwGshcCf6NxkI3UmJ0+Yz8=", + "dev": true + }, + "babel-helper-flip-expressions": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-helper-flip-expressions/-/babel-helper-flip-expressions-0.4.3.tgz", + "integrity": "sha1-NpZzahKKwYvCUlS19AoizrPB0/0=", + "dev": true + }, + "babel-helper-is-nodes-equiv": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/babel-helper-is-nodes-equiv/-/babel-helper-is-nodes-equiv-0.0.1.tgz", + "integrity": "sha1-NOmzALFHnd2Y7HfqC76TQt/jloQ=", + "dev": true + }, + "babel-helper-is-void-0": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-helper-is-void-0/-/babel-helper-is-void-0-0.4.3.tgz", + "integrity": "sha1-fZwBtFYee5Xb2g9u7kj1tg5nMT4=", + "dev": true + }, + "babel-helper-mark-eval-scopes": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-helper-mark-eval-scopes/-/babel-helper-mark-eval-scopes-0.4.3.tgz", + "integrity": "sha1-0kSjvvmESHJgP/tG4izorN9VFWI=", + "dev": true + }, + "babel-helper-remove-or-void": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-helper-remove-or-void/-/babel-helper-remove-or-void-0.4.3.tgz", + "integrity": "sha1-pPA7QAd6D/6I5F0HAQ3uJB/1rmA=", + "dev": true + }, + "babel-helper-to-multiple-sequence-expressions": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.4.3.tgz", + "integrity": "sha1-W1GLESf0ezA4dzOGoVYaK0jmMrY=", + "dev": true + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-minify-builtins": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-builtins/-/babel-plugin-minify-builtins-0.4.3.tgz", + "integrity": "sha1-nqPVn0rEp7uVjXEtKVVqH4b3+B4=", + "dev": true, + "requires": { + "babel-helper-evaluate-path": "0.4.3" + } + }, + "babel-plugin-minify-constant-folding": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-constant-folding/-/babel-plugin-minify-constant-folding-0.4.3.tgz", + "integrity": "sha1-MA+d6N2ghEoXaxk2U5YOJK0z4ZE=", + "dev": true, + "requires": { + "babel-helper-evaluate-path": "0.4.3" + } + }, + "babel-plugin-minify-dead-code-elimination": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-dead-code-elimination/-/babel-plugin-minify-dead-code-elimination-0.4.3.tgz", + "integrity": "sha1-c2KCZYZPkAjQAnUG9Yq+s8HQLZg=", + "dev": true, + "requires": { + "babel-helper-evaluate-path": "0.4.3", + "babel-helper-mark-eval-scopes": "0.4.3", + "babel-helper-remove-or-void": "0.4.3", + "lodash.some": "4.6.0" + } + }, + "babel-plugin-minify-flip-comparisons": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-flip-comparisons/-/babel-plugin-minify-flip-comparisons-0.4.3.tgz", + "integrity": "sha1-AMqHDLjxO0XAOLPB68DyJyk8llo=", + "dev": true, + "requires": { + "babel-helper-is-void-0": "0.4.3" + } + }, + "babel-plugin-minify-guarded-expressions": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-guarded-expressions/-/babel-plugin-minify-guarded-expressions-0.4.3.tgz", + "integrity": "sha1-zHCbRFP9IbHzAod0RMifiEJ845c=", + "dev": true, + "requires": { + "babel-helper-flip-expressions": "0.4.3" + } + }, + "babel-plugin-minify-infinity": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-infinity/-/babel-plugin-minify-infinity-0.4.3.tgz", + "integrity": "sha1-37h2obCKBldjhO8/kuZTumB7Oco=", + "dev": true + }, + "babel-plugin-minify-mangle-names": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-mangle-names/-/babel-plugin-minify-mangle-names-0.4.3.tgz", + "integrity": "sha1-FvG/90t6fJPfwkHngx3V+0sCPvc=", + "dev": true, + "requires": { + "babel-helper-mark-eval-scopes": "0.4.3" + } + }, + "babel-plugin-minify-numeric-literals": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-numeric-literals/-/babel-plugin-minify-numeric-literals-0.4.3.tgz", + "integrity": "sha1-jk/VYcefeAEob/YOjF/Z3u6TwLw=", + "dev": true + }, + "babel-plugin-minify-replace": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.4.3.tgz", + "integrity": "sha1-nSifS6FdTmAR6HmfpfG6d+yBIZ0=", + "dev": true + }, + "babel-plugin-minify-simplify": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-simplify/-/babel-plugin-minify-simplify-0.4.3.tgz", + "integrity": "sha1-N3VthcYURktLCSfytOQXGR1Vc4o=", + "dev": true, + "requires": { + "babel-helper-flip-expressions": "0.4.3", + "babel-helper-is-nodes-equiv": "0.0.1", + "babel-helper-to-multiple-sequence-expressions": "0.4.3" + } + }, + "babel-plugin-minify-type-constructors": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-type-constructors/-/babel-plugin-minify-type-constructors-0.4.3.tgz", + "integrity": "sha1-G8bxW4f3qxCF1CszC3F2V6IVZQA=", + "dev": true, + "requires": { + "babel-helper-is-void-0": "0.4.3" + } + }, + "babel-plugin-transform-inline-consecutive-adds": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.4.3.tgz", + "integrity": "sha1-Mj1Ho+pjqDp6w8gRro5pQfrysNE=", + "dev": true + }, + "babel-plugin-transform-member-expression-literals": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-member-expression-literals/-/babel-plugin-transform-member-expression-literals-6.9.4.tgz", + "integrity": "sha1-NwOcmgwzE6OUlfqsL/OmtbnQOL8=", + "dev": true + }, + "babel-plugin-transform-merge-sibling-variables": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-merge-sibling-variables/-/babel-plugin-transform-merge-sibling-variables-6.9.4.tgz", + "integrity": "sha1-hbQi/DN3tEnJ0c3kQIcgNTJAHa4=", + "dev": true + }, + "babel-plugin-transform-minify-booleans": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-minify-booleans/-/babel-plugin-transform-minify-booleans-6.9.4.tgz", + "integrity": "sha1-rLs+VqNVXdI5KOS1gtKFFi3SsZg=", + "dev": true + }, + "babel-plugin-transform-property-literals": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-property-literals/-/babel-plugin-transform-property-literals-6.9.4.tgz", + "integrity": "sha1-mMHSHiVXNlc/k+zlRFn2ziSYXTk=", + "dev": true, + "requires": { + "esutils": "2.0.2" + } + }, + "babel-plugin-transform-regexp-constructors": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-regexp-constructors/-/babel-plugin-transform-regexp-constructors-0.4.3.tgz", + "integrity": "sha1-WLd3W2OvzzMyj66aX4j71PsLSWU=", + "dev": true + }, + "babel-plugin-transform-remove-console": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.9.4.tgz", + "integrity": "sha1-uYA2DAZzhOJLNXpYjYB9PINSd4A=", + "dev": true + }, + "babel-plugin-transform-remove-debugger": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-debugger/-/babel-plugin-transform-remove-debugger-6.9.4.tgz", + "integrity": "sha1-QrcnYxyXl44estGZp67IShgznvI=", + "dev": true + }, + "babel-plugin-transform-remove-undefined": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-undefined/-/babel-plugin-transform-remove-undefined-0.4.3.tgz", + "integrity": "sha1-1AsNp/kcCMBsxyt2dHTAHEiU3gI=", + "dev": true, + "requires": { + "babel-helper-evaluate-path": "0.4.3" + } + }, + "babel-plugin-transform-simplify-comparison-operators": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-simplify-comparison-operators/-/babel-plugin-transform-simplify-comparison-operators-6.9.4.tgz", + "integrity": "sha1-9ir+CWyrDh9ootdT/fKDiIRxzrk=", + "dev": true + }, + "babel-plugin-transform-undefined-to-void": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-undefined-to-void/-/babel-plugin-transform-undefined-to-void-6.9.4.tgz", + "integrity": "sha1-viQcqBQEAwZ4t0hxcyK4nQyP4oA=", + "dev": true + }, + "babel-preset-minify": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-preset-minify/-/babel-preset-minify-0.4.3.tgz", + "integrity": "sha1-spw91pGJBThFmPCSuVUVLiah/g8=", + "dev": true, + "requires": { + "babel-plugin-minify-builtins": "0.4.3", + "babel-plugin-minify-constant-folding": "0.4.3", + "babel-plugin-minify-dead-code-elimination": "0.4.3", + "babel-plugin-minify-flip-comparisons": "0.4.3", + "babel-plugin-minify-guarded-expressions": "0.4.3", + "babel-plugin-minify-infinity": "0.4.3", + "babel-plugin-minify-mangle-names": "0.4.3", + "babel-plugin-minify-numeric-literals": "0.4.3", + "babel-plugin-minify-replace": "0.4.3", + "babel-plugin-minify-simplify": "0.4.3", + "babel-plugin-minify-type-constructors": "0.4.3", + "babel-plugin-transform-inline-consecutive-adds": "0.4.3", + "babel-plugin-transform-member-expression-literals": "6.9.4", + "babel-plugin-transform-merge-sibling-variables": "6.9.4", + "babel-plugin-transform-minify-booleans": "6.9.4", + "babel-plugin-transform-property-literals": "6.9.4", + "babel-plugin-transform-regexp-constructors": "0.4.3", + "babel-plugin-transform-remove-console": "6.9.4", + "babel-plugin-transform-remove-debugger": "6.9.4", + "babel-plugin-transform-remove-undefined": "0.4.3", + "babel-plugin-transform-simplify-comparison-operators": "6.9.4", + "babel-plugin-transform-undefined-to-void": "6.9.4", + "lodash.isplainobject": "4.0.6" + } + }, + "babel-register": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "dev": true, + "requires": { + "babel-core": "6.26.3", + "babel-runtime": "6.26.0", + "core-js": "2.5.7", + "home-or-tmp": "2.0.0", + "lodash": "4.17.10", + "mkdirp": "0.5.1", + "source-map-support": "0.4.18" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, + "requires": { + "core-js": "2.5.7", + "regenerator-runtime": "0.11.1" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.10" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "2.2.4", + "lodash": "4.17.10" + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.10", + "to-fast-properties": "1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "convert-source-map": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", + "dev": true + }, + "core-js": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "2.0.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "dev": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "requires": { + "loose-envify": "1.4.0" + } + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "dev": true + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", + "dev": true + }, + "lodash.some": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz", + "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "3.0.2" + } + }, + "magic-string": { + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.24.1.tgz", + "integrity": "sha512-YBfNxbJiixMzxW40XqJEIldzHyh5f7CZKalo1uZffevyrPEX8Qgo9s0dmcORLHdV47UyvJg8/zD+6hQG3qvJrA==", + "dev": true, + "requires": { + "sourcemap-codec": "1.4.1" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "1.1.11" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", + "dev": true + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "1.0.2" + } + }, + "rollup-plugin-babel-minify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-babel-minify/-/rollup-plugin-babel-minify-5.0.0.tgz", + "integrity": "sha512-/XMozvFf1wm0O04FEybfEGl05jq9RQ408Xx/GjCfCau9ETzKYlEkfdi19pj2EvmpbSO/r0yspMKmwnUHNycdsw==", + "dev": true, + "requires": { + "@comandeer/babel-plugin-banner": "2.0.2", + "babel-core": "6.26.3", + "babel-preset-minify": "0.4.3", + "magic-string": "0.24.1" + } + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dev": true, + "requires": { + "source-map": "0.5.7" + } + }, + "sourcemap-codec": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.1.tgz", + "integrity": "sha512-hX1eNBNuilj8yfFnECh0DzLgwKpBLMIvmhgEhixXNui8lMLBInTI8Kyxt++RwJnMNu7cAUo635L2+N1TxMJCzA==", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + } + } +} diff --git a/public/the-cube-master/package.json b/public/the-cube-master/package.json new file mode 100644 index 0000000..1c05a9d --- /dev/null +++ b/public/the-cube-master/package.json @@ -0,0 +1,24 @@ +{ + "name": "bsehovac.github.io", + "version": "1.0.0", + "description": "", + "main": "", + "dependencies": {}, + "devDependencies": { + "rollup-plugin-babel-minify": "^5.0.0" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "build": "rollup -c rollup.config.build.js && cp upup.min.js export/ && cp upup.sw.min.js export/ && cp index.html export/ && cp -R assets export/" + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/bsehovac/bsehovac.github.io.git" + }, + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/bsehovac/bsehovac.github.io/issues" + }, + "homepage": "https://github.com/bsehovac/bsehovac.github.io#readme" +} diff --git a/public/the-cube-master/rollup.config.build.js b/public/the-cube-master/rollup.config.build.js new file mode 100644 index 0000000..db443f7 --- /dev/null +++ b/public/the-cube-master/rollup.config.build.js @@ -0,0 +1,14 @@ +import minify from 'rollup-plugin-babel-minify'; + +export default { + input: './src/js/Game.js', + plugins: [ + minify({ comments: false, sourceMap: false }), + ], + output: { + format: 'iife', + file: './assets/js/cube.js', + indent: '\t', + sourceMap: false, + }, +}; diff --git a/public/the-cube-master/rollup.config.dev.js b/public/the-cube-master/rollup.config.dev.js new file mode 100644 index 0000000..939960d --- /dev/null +++ b/public/the-cube-master/rollup.config.dev.js @@ -0,0 +1,10 @@ +export default { + input: './src/js/Game.js', + plugins: [], + output: { + format: 'iife', + file: './assets/js/cube.js', + indent: '\t', + sourceMap: false, + }, +}; diff --git a/public/the-cube-master/src/js/Animation.js b/public/the-cube-master/src/js/Animation.js new file mode 100644 index 0000000..c810a13 --- /dev/null +++ b/public/the-cube-master/src/js/Animation.js @@ -0,0 +1,88 @@ +const animationEngine = ( () => { + + let uniqueID = 0; + + class AnimationEngine { + + constructor() { + + this.ids = []; + this.animations = {}; + this.update = this.update.bind( this ); + this.raf = 0; + this.time = 0; + + } + + update() { + + const now = performance.now(); + const delta = now - this.time + this.time = now; + + let i = this.ids.length; + + this.raf = i ? requestAnimationFrame( this.update ) : 0; + + while ( i-- ) + this.animations[ this.ids[ i ] ] && this.animations[ this.ids[ i ] ].update( delta ); + + } + + add( animation ) { + + animation.id = uniqueID ++; + + this.ids.push( animation.id ); + this.animations[ animation.id ] = animation; + + if ( this.raf !== 0 ) return; + + this.time = performance.now(); + this.raf = requestAnimationFrame( this.update ); + + } + + remove( animation ) { + + const index = this.ids.indexOf( animation.id ); + + if ( index < 0 ) return; + + this.ids.splice( index, 1 ); + delete this.animations[ animation.id ]; + animation = null; + + } + + } + + return new AnimationEngine(); + +} )(); + +class Animation { + + constructor( start ) { + + if ( start === true ) this.start(); + + } + + start() { + + animationEngine.add( this ); + + } + + stop() { + + animationEngine.remove( this ); + + } + + update( delta ) {} + +} + +export { Animation }; diff --git a/public/the-cube-master/src/js/Background.js b/public/the-cube-master/src/js/Background.js new file mode 100644 index 0000000..056165d --- /dev/null +++ b/public/the-cube-master/src/js/Background.js @@ -0,0 +1 @@ +Background diff --git a/public/the-cube-master/src/js/Confetti.js b/public/the-cube-master/src/js/Confetti.js new file mode 100644 index 0000000..7bd484b --- /dev/null +++ b/public/the-cube-master/src/js/Confetti.js @@ -0,0 +1,228 @@ +import { Animation } from './Animation.js'; + +class Confetti { + + constructor( game ) { + + this.game = game; + this.started = 0; + + this.options = { + speed: { min: 0.0011, max: 0.0022 }, + revolution: { min: 0.01, max: 0.05 }, + size: { min: 0.1, max: 0.15 }, + colors: [ 0x41aac8, 0x82ca38, 0xffef48, 0xef3923, 0xff8c0a ], + } + + this.geometry = new THREE.PlaneGeometry( 1, 1 ); + this.material = new THREE.MeshLambertMaterial( { side: THREE.DoubleSide } ); + + this.holders = [ + new ConfettiStage( this.game, this, 1, 20 ), + new ConfettiStage( this.game, this, -1, 30 ), + ]; + + } + + start() { + + if ( this.started > 0 ) return; + + this.holders.forEach( holder => { + + this.game.world.scene.add( holder.holder ); + holder.start(); + this.started ++; + + } ); + + } + + stop() { + + if ( this.started == 0 ) return; + + this.holders.forEach( holder => { + + holder.stop( () => { + + this.game.world.scene.remove( holder.holder ); + this.started --; + + } ); + + } ); + + } + + updateColors( colors ) { + + this.holders.forEach( holder => { + + holder.options.colors.forEach( ( color, index ) => { + + holder.options.colors[ index ] = colors[ [ 'D', 'F', 'R', 'B', 'L' ][ index ] ]; + + } ); + + } ); + + } + +} + +class ConfettiStage extends Animation { + + constructor( game, parent, distance, count ) { + + super( false ); + + this.game = game; + this.parent = parent; + + this.distanceFromCube = distance; + + this.count = count; + this.particles = []; + + this.holder = new THREE.Object3D(); + this.holder.rotation.copy( this.game.world.camera.rotation ); + + this.object = new THREE.Object3D(); + this.holder.add( this.object ); + + this.resizeViewport = this.resizeViewport.bind( this ); + this.game.world.onResize.push( this.resizeViewport ) + this.resizeViewport(); + + this.geometry = this.parent.geometry; + this.material = this.parent.material; + + this.options = this.parent.options; + + let i = this.count; + while ( i-- ) this.particles.push( new Particle( this ) ); + + } + + start() { + + this.time = performance.now(); + this.playing = true; + + let i = this.count; + while ( i-- ) this.particles[ i ].reset(); + + super.start(); + + } + + stop( callback ) { + + this.playing = false; + this.completed = 0; + this.callback = callback; + + } + + reset() { + + super.stop(); + + this.callback(); + + } + + update() { + + const now = performance.now(); + const delta = now - this.time; + this.time = now; + + let i = this.count; + + while ( i-- ) + if ( ! this.particles[ i ].completed ) this.particles[ i ].update( delta ); + + if ( ! this.playing && this.completed == this.count ) this.reset(); + + } + + resizeViewport() { + + const fovRad = this.game.world.camera.fov * THREE.Math.DEG2RAD; + + this.height = 2 * Math.tan( fovRad / 2 ) * ( this.game.world.camera.position.length() - this.distanceFromCube ); + this.width = this.height * this.game.world.camera.aspect; + + const scale = 1 / this.game.transition.data.cameraZoom; + + this.width *= scale; + this.height *= scale; + + this.object.position.z = this.distanceFromCube; + this.object.position.y = this.height / 2; + + } + +} + +class Particle { + + constructor( confetti ) { + + this.confetti = confetti; + this.options = this.confetti.options; + + this.velocity = new THREE.Vector3(); + this.force = new THREE.Vector3(); + + this.mesh = new THREE.Mesh( this.confetti.geometry, this.confetti.material.clone() ); + this.confetti.object.add( this.mesh ); + + this.size = THREE.Math.randFloat( this.options.size.min, this.options.size.max ); + this.mesh.scale.set( this.size, this.size, this.size ); + + return this; + + } + + reset( randomHeight = true ) { + + this.completed = false; + + this.color = new THREE.Color( this.options.colors[ Math.floor( Math.random() * this.options.colors.length ) ] ); + this.mesh.material.color.set( this.color ); + + this.speed = THREE.Math.randFloat( this.options.speed.min, this.options.speed.max ) * - 1; + this.mesh.position.x = THREE.Math.randFloat( - this.confetti.width / 2, this.confetti.width / 2 ); + this.mesh.position.y = ( randomHeight ) + ? THREE.Math.randFloat( this.size, this.confetti.height + this.size ) + : this.size; + + this.revolutionSpeed = THREE.Math.randFloat( this.options.revolution.min, this.options.revolution.max ); + this.revolutionAxis = [ 'x', 'y', 'z' ][ Math.floor( Math.random() * 3 ) ]; + this.mesh.rotation.set( Math.random() * Math.PI / 3, Math.random() * Math.PI / 3, Math.random() * Math.PI / 3 ); + + } + + stop() { + + this.completed = true; + this.confetti.completed ++; + + } + + update( delta ) { + + this.mesh.position.y += this.speed * delta; + this.mesh.rotation[ this.revolutionAxis ] += this.revolutionSpeed; + + if ( this.mesh.position.y < - this.confetti.height - this.size ) + ( this.confetti.playing ) ? this.reset( false ) : this.stop(); + + } + +} + +export { Confetti }; diff --git a/public/the-cube-master/src/js/Controls.js b/public/the-cube-master/src/js/Controls.js new file mode 100644 index 0000000..508920d --- /dev/null +++ b/public/the-cube-master/src/js/Controls.js @@ -0,0 +1,580 @@ +import { Tween, Easing } from './Tween.js'; +import { Draggable } from './Draggable.js'; + +const STILL = 0; +const PREPARING = 1; +const ROTATING = 2; +const ANIMATING = 3; + +class Controls { + + constructor( game ) { + + this.game = game; + + this.flipConfig = 0; + + this.flipEasings = [ Easing.Power.Out( 3 ), Easing.Sine.Out(), Easing.Back.Out( 1.5 ) ]; + this.flipSpeeds = [ 125, 200, 300 ]; + + this.raycaster = new THREE.Raycaster(); + + const helperMaterial = new THREE.MeshBasicMaterial( { depthWrite: false, transparent: true, opacity: 0, color: 0x0033ff } ); + + this.group = new THREE.Object3D(); + this.group.name = 'controls'; + this.game.cube.object.add( this.group ); + + this.helper = new THREE.Mesh( + new THREE.PlaneBufferGeometry( 200, 200 ), + helperMaterial.clone() + ); + + this.helper.rotation.set( 0, Math.PI / 4, 0 ); + this.game.world.scene.add( this.helper ); + + this.edges = new THREE.Mesh( + new THREE.BoxBufferGeometry( 1, 1, 1 ), + helperMaterial.clone(), + ); + + this.game.world.scene.add( this.edges ); + + this.onSolved = () => {}; + this.onMove = () => {}; + + this.momentum = []; + + this.scramble = null; + this.state = STILL; + this.enabled = false; + + this.initDraggable(); + + } + + enable() { + + this.draggable.enable(); + this.enabled = true; + + } + + disable() { + + this.draggable.disable(); + this.enabled = false; + + } + + initDraggable() { + + this.draggable = new Draggable( this.game.dom.game ); + + this.draggable.onDragStart = position => { + + if ( this.scramble !== null ) return; + if ( this.state === PREPARING || this.state === ROTATING ) return; + + this.gettingDrag = this.state === ANIMATING; + + const edgeIntersect = this.getIntersect( position.current, this.edges, false ); + + if ( edgeIntersect !== false ) { + + this.dragIntersect = this.getIntersect( position.current, this.game.cube.cubes, true ); + + } + + if ( edgeIntersect !== false && this.dragIntersect !== false ) { + + this.dragNormal = edgeIntersect.face.normal.round(); + this.flipType = 'layer'; + + this.attach( this.helper, this.edges ) + + this.helper.rotation.set( 0, 0, 0 ); + this.helper.position.set( 0, 0, 0 ); + this.helper.lookAt( this.dragNormal ); + this.helper.translateZ( 0.5 ); + this.helper.updateMatrixWorld(); + + this.detach( this.helper, this.edges ); + + } else { + + this.dragNormal = new THREE.Vector3( 0, 0, 1 ); + this.flipType = 'cube'; + + this.helper.position.set( 0, 0, 0 ); + this.helper.rotation.set( 0, Math.PI / 4, 0 ); + this.helper.updateMatrixWorld(); + + } + + let planeIntersect = this.getIntersect( position.current, this.helper, false ); + if ( planeIntersect === false ) return; + + this.dragCurrent = this.helper.worldToLocal( planeIntersect.point ); + this.dragTotal = new THREE.Vector3(); + this.state = ( this.state === STILL ) ? PREPARING : this.state; + + }; + + this.draggable.onDragMove = position => { + + if ( this.scramble !== null ) return; + if ( this.state === STILL || ( this.state === ANIMATING && this.gettingDrag === false ) ) return; + + const planeIntersect = this.getIntersect( position.current, this.helper, false ); + if ( planeIntersect === false ) return; + + const point = this.helper.worldToLocal( planeIntersect.point.clone() ); + + this.dragDelta = point.clone().sub( this.dragCurrent ).setZ( 0 ); + this.dragTotal.add( this.dragDelta ); + this.dragCurrent = point; + this.addMomentumPoint( this.dragDelta ); + + if ( this.state === PREPARING && this.dragTotal.length() > 0.05 ) { + + this.dragDirection = this.getMainAxis( this.dragTotal ); + + if ( this.flipType === 'layer' ) { + + const direction = new THREE.Vector3(); + direction[ this.dragDirection ] = 1; + + const worldDirection = this.helper.localToWorld( direction ).sub( this.helper.position ); + const objectDirection = this.edges.worldToLocal( worldDirection ).round(); + + this.flipAxis = objectDirection.cross( this.dragNormal ).negate(); + + this.selectLayer( this.getLayer( false ) ); + + } else { + + const axis = ( this.dragDirection != 'x' ) + ? ( ( this.dragDirection == 'y' && position.current.x > this.game.world.width / 2 ) ? 'z' : 'x' ) + : 'y'; + + this.flipAxis = new THREE.Vector3(); + this.flipAxis[ axis ] = 1 * ( ( axis == 'x' ) ? - 1 : 1 ); + + } + + this.flipAngle = 0; + this.state = ROTATING; + + } else if ( this.state === ROTATING ) { + + const rotation = this.dragDelta[ this.dragDirection ]; + + if ( this.flipType === 'layer' ) { + + this.group.rotateOnAxis( this.flipAxis, rotation ); + this.flipAngle += rotation; + + } else { + + this.edges.rotateOnWorldAxis( this.flipAxis, rotation ); + this.game.cube.object.rotation.copy( this.edges.rotation ); + this.flipAngle += rotation; + + } + + } + + }; + + this.draggable.onDragEnd = position => { + + if ( this.scramble !== null ) return; + if ( this.state !== ROTATING ) { + + this.gettingDrag = false; + this.state = STILL; + return; + + } + + this.state = ANIMATING; + + const momentum = this.getMomentum()[ this.dragDirection ]; + const flip = ( Math.abs( momentum ) > 0.05 && Math.abs( this.flipAngle ) < Math.PI / 2 ); + + const angle = flip + ? this.roundAngle( this.flipAngle + Math.sign( this.flipAngle ) * ( Math.PI / 4 ) ) + : this.roundAngle( this.flipAngle ); + + const delta = angle - this.flipAngle; + + if ( this.flipType === 'layer' ) { + + this.rotateLayer( delta, false, layer => { + + this.game.storage.saveGame(); + + this.state = this.gettingDrag ? PREPARING : STILL; + this.gettingDrag = false; + + this.checkIsSolved(); + + } ); + + } else { + + this.rotateCube( delta, () => { + + this.state = this.gettingDrag ? PREPARING : STILL; + this.gettingDrag = false; + + } ); + + } + + }; + + } + + rotateLayer( rotation, scramble, callback ) { + + const config = scramble ? 0 : this.flipConfig; + + const easing = this.flipEasings[ config ]; + const duration = this.flipSpeeds[ config ] + const bounce = ( config == 2 ) ? this.bounceCube() : ( () => {} ); + + this.rotationTween = new Tween( { + easing: easing, + duration: duration, + onUpdate: tween => { + + let deltaAngle = tween.delta * rotation; + this.group.rotateOnAxis( this.flipAxis, deltaAngle ); + bounce( tween.value, deltaAngle, rotation ); + + }, + onComplete: () => { + + if ( ! scramble ) this.onMove(); + + const layer = this.flipLayer.slice( 0 ); + + this.game.cube.object.rotation.setFromVector3( this.snapRotation( this.game.cube.object.rotation.toVector3() ) ); + this.group.rotation.setFromVector3( this.snapRotation( this.group.rotation.toVector3() ) ); + this.deselectLayer( this.flipLayer ); + + callback( layer ); + + }, + } ); + + } + + bounceCube() { + + let fixDelta = true; + + return ( progress, delta, rotation ) => { + + if ( progress >= 1 ) { + + if ( fixDelta ) { + + delta = ( progress - 1 ) * rotation; + fixDelta = false; + + } + + this.game.cube.object.rotateOnAxis( this.flipAxis, delta ); + + } + + } + + } + + rotateCube( rotation, callback ) { + + const config = this.flipConfig; + const easing = [ Easing.Power.Out( 4 ), Easing.Sine.Out(), Easing.Back.Out( 2 ) ][ config ]; + const duration = [ 100, 150, 350 ][ config ] + + this.rotationTween = new Tween( { + easing: easing, + duration: duration, + onUpdate: tween => { + + this.edges.rotateOnWorldAxis( this.flipAxis, tween.delta * rotation ); + this.game.cube.object.rotation.copy( this.edges.rotation ); + + }, + onComplete: () => { + + this.edges.rotation.setFromVector3( this.snapRotation( this.edges.rotation.toVector3() ) ); + this.game.cube.object.rotation.copy( this.edges.rotation ); + callback(); + + }, + } ); + + } + + selectLayer( layer ) { + + this.group.rotation.set( 0, 0, 0 ); + this.movePieces( layer, this.game.cube.object, this.group ); + this.flipLayer = layer; + + } + + deselectLayer( layer ) { + + this.movePieces( layer, this.group, this.game.cube.object ); + this.flipLayer = null; + + } + + movePieces( layer, from, to ) { + + from.updateMatrixWorld(); + to.updateMatrixWorld(); + + layer.forEach( index => { + + const piece = this.game.cube.pieces[ index ]; + + piece.applyMatrix( from.matrixWorld ); + from.remove( piece ); + piece.applyMatrix( new THREE.Matrix4().getInverse( to.matrixWorld ) ); + to.add( piece ); + + } ); + + } + + getLayer( position ) { + + const scalar = { 2: 6, 3: 3, 4: 4, 5: 3 }[ this.game.cube.size ]; + const layer = []; + + let axis; + + if ( position === false ) { + + const piece = this.dragIntersect.object.parent; + + axis = this.getMainAxis( this.flipAxis ); + position = piece.position.clone() .multiplyScalar( scalar ) .round(); + + } else { + + axis = this.getMainAxis( position ); + + } + + this.game.cube.pieces.forEach( piece => { + + const piecePosition = piece.position.clone().multiplyScalar( scalar ).round(); + + if ( piecePosition[ axis ] == position[ axis ] ) layer.push( piece.name ); + + } ); + + return layer; + + } + + keyboardMove( type, move, callback ) { + + if ( this.state !== STILL ) return; + if ( this.enabled !== true ) return; + + if ( type === 'LAYER' ) { + + const layer = this.getLayer( move.position ); + + this.flipAxis = new THREE.Vector3(); + this.flipAxis[ move.axis ] = 1; + this.state = ROTATING; + + this.selectLayer( layer ); + this.rotateLayer( move.angle, false, layer => { + + this.game.storage.saveGame(); + this.state = STILL; + this.checkIsSolved(); + + } ); + + } else if ( type === 'CUBE' ) { + + this.flipAxis = new THREE.Vector3(); + this.flipAxis[ move.axis ] = 1; + this.state = ROTATING; + + this.rotateCube( move.angle, () => { + + this.state = STILL; + + } ); + + } + + } + + scrambleCube() { + + if ( this.scramble == null ) { + + this.scramble = this.game.scrambler; + this.scramble.callback = ( typeof callback !== 'function' ) ? () => {} : callback; + + } + + const converted = this.scramble.converted; + const move = converted[ 0 ]; + const layer = this.getLayer( move.position ); + + this.flipAxis = new THREE.Vector3(); + this.flipAxis[ move.axis ] = 1; + + this.selectLayer( layer ); + this.rotateLayer( move.angle, true, () => { + + converted.shift(); + + if ( converted.length > 0 ) { + + this.scrambleCube(); + + } else { + + this.scramble = null; + this.game.storage.saveGame(); + + } + + } ); + + } + + getIntersect( position, object, multiple ) { + + this.raycaster.setFromCamera( + this.draggable.convertPosition( position.clone() ), + this.game.world.camera + ); + + const intersect = ( multiple ) + ? this.raycaster.intersectObjects( object ) + : this.raycaster.intersectObject( object ); + + return ( intersect.length > 0 ) ? intersect[ 0 ] : false; + + } + + getMainAxis( vector ) { + + return Object.keys( vector ).reduce( + ( a, b ) => Math.abs( vector[ a ] ) > Math.abs( vector[ b ] ) ? a : b + ); + + } + + detach( child, parent ) { + + child.applyMatrix( parent.matrixWorld ); + parent.remove( child ); + this.game.world.scene.add( child ); + + } + + attach( child, parent ) { + + child.applyMatrix( new THREE.Matrix4().getInverse( parent.matrixWorld ) ); + this.game.world.scene.remove( child ); + parent.add( child ); + + } + + addMomentumPoint( delta ) { + + const time = Date.now(); + + this.momentum = this.momentum.filter( moment => time - moment.time < 500 ); + + if ( delta !== false ) this.momentum.push( { delta, time } ); + + } + + getMomentum() { + + const points = this.momentum.length; + const momentum = new THREE.Vector2(); + + this.addMomentumPoint( false ); + + this.momentum.forEach( ( point, index ) => { + + momentum.add( point.delta.multiplyScalar( index / points ) ) + + } ); + + return momentum; + + } + + roundAngle( angle ) { + + const round = Math.PI / 2; + return Math.sign( angle ) * Math.round( Math.abs( angle) / round ) * round; + + } + + snapRotation( angle ) { + + return angle.set( + this.roundAngle( angle.x ), + this.roundAngle( angle.y ), + this.roundAngle( angle.z ) + ); + + } + + checkIsSolved() { + + const start = performance.now(); + + let solved = true; + const sides = { 'x-': [], 'x+': [], 'y-': [], 'y+': [], 'z-': [], 'z+': [] }; + + const positions = []; + + this.game.cube.edges.forEach( edge => { + + const position = edge.parent + .localToWorld( edge.position.clone() ) + .sub( this.game.cube.object.position ); + + const mainAxis = this.getMainAxis( position ); + const mainSign = position.multiplyScalar( 2 ).round()[ mainAxis ] < 1 ? '-' : '+'; + + sides[ mainAxis + mainSign ].push( edge.name ); + + } ); + + Object.keys( sides ).forEach( side => { + + if ( ! sides[ side ].every( value => value === sides[ side ][ 0 ] ) ) solved = false; + + } ); + + if ( solved ) this.onSolved(); + + } + +} + +export { Controls }; diff --git a/public/the-cube-master/src/js/Cube.js b/public/the-cube-master/src/js/Cube.js new file mode 100644 index 0000000..934fc4a --- /dev/null +++ b/public/the-cube-master/src/js/Cube.js @@ -0,0 +1,236 @@ +import { RoundedBoxGeometry } from './plugins/RoundedBoxGeometry.js'; +import { RoundedPlaneGeometry } from './plugins/RoundedPlaneGeometry.js'; + +class Cube { + + constructor( game ) { + + this.game = game; + this.size = 3; + + this.geometry = { + pieceCornerRadius: 0.12, + edgeCornerRoundness: 0.15, + edgeScale: 0.82, + edgeDepth: 0.01, + }; + + this.holder = new THREE.Object3D(); + this.object = new THREE.Object3D(); + this.animator = new THREE.Object3D(); + + this.holder.add( this.animator ); + this.animator.add( this.object ); + + this.game.world.scene.add( this.holder ); + + } + + init() { + + this.cubes = []; + this.object.children = []; + this.object.add( this.game.controls.group ); + + if ( this.size === 2 ) this.scale = 1.25; + else if ( this.size === 3 ) this.scale = 1; + else if ( this.size > 3 ) this.scale = 3 / this.size; + + this.object.scale.set( this.scale, this.scale, this.scale ); + + const controlsScale = this.size === 2 ? 0.825 : 1; + this.game.controls.edges.scale.set( controlsScale, controlsScale, controlsScale ); + + this.generatePositions(); + this.generateModel(); + + this.pieces.forEach( piece => { + + this.cubes.push( piece.userData.cube ); + this.object.add( piece ); + + } ); + + this.holder.traverse( node => { + + if ( node.frustumCulled ) node.frustumCulled = false; + + } ); + + this.updateColors( this.game.themes.getColors() ); + + this.sizeGenerated = this.size; + + } + + resize( force = false ) { + + if ( this.size !== this.sizeGenerated || force ) { + + this.size = this.game.preferences.ranges.size.value; + + this.reset(); + this.init(); + + this.game.saved = false; + this.game.timer.reset(); + this.game.storage.clearGame(); + + } + + } + + reset() { + + this.game.controls.edges.rotation.set( 0, 0, 0 ); + + this.holder.rotation.set( 0, 0, 0 ); + this.object.rotation.set( 0, 0, 0 ); + this.animator.rotation.set( 0, 0, 0 ); + + } + + generatePositions() { + + const m = this.size - 1; + const first = this.size % 2 !== 0 + ? 0 - Math.floor(this.size / 2) + : 0.5 - this.size / 2; + + let x, y, z; + + this.positions = []; + + for ( x = 0; x < this.size; x ++ ) { + for ( y = 0; y < this.size; y ++ ) { + for ( z = 0; z < this.size; z ++ ) { + + let position = new THREE.Vector3(first + x, first + y, first + z); + let edges = []; + + if ( x == 0 ) edges.push(0); + if ( x == m ) edges.push(1); + if ( y == 0 ) edges.push(2); + if ( y == m ) edges.push(3); + if ( z == 0 ) edges.push(4); + if ( z == m ) edges.push(5); + + position.edges = edges; + this.positions.push( position ); + + } + } + } + + } + + generateModel() { + + this.pieces = []; + this.edges = []; + + const pieceSize = 1 / 3; + + const mainMaterial = new THREE.MeshLambertMaterial(); + + const pieceMesh = new THREE.Mesh( + new RoundedBoxGeometry( pieceSize, this.geometry.pieceCornerRadius, 3 ), + mainMaterial.clone() + ); + + const edgeGeometry = RoundedPlaneGeometry( + pieceSize, + this.geometry.edgeCornerRoundness, + this.geometry.edgeDepth + ); + + this.positions.forEach( ( position, index ) => { + + const piece = new THREE.Object3D(); + const pieceCube = pieceMesh.clone(); + const pieceEdges = []; + + piece.position.copy( position.clone().divideScalar( 3 ) ); + piece.add( pieceCube ); + piece.name = index; + piece.edgesName = ''; + + position.edges.forEach( position => { + + const edge = new THREE.Mesh( edgeGeometry, mainMaterial.clone() ); + const name = [ 'L', 'R', 'D', 'U', 'B', 'F' ][ position ]; + const distance = pieceSize / 2; + + edge.position.set( + distance * [ - 1, 1, 0, 0, 0, 0 ][ position ], + distance * [ 0, 0, - 1, 1, 0, 0 ][ position ], + distance * [ 0, 0, 0, 0, - 1, 1 ][ position ] + ); + + edge.rotation.set( + Math.PI / 2 * [ 0, 0, 1, - 1, 0, 0 ][ position ], + Math.PI / 2 * [ - 1, 1, 0, 0, 2, 0 ][ position ], + 0 + ); + + edge.scale.set( + this.geometry.edgeScale, + this.geometry.edgeScale, + this.geometry.edgeScale + ); + + edge.name = name; + + piece.add( edge ); + pieceEdges.push( name ); + this.edges.push( edge ); + + } ); + + piece.userData.edges = pieceEdges; + piece.userData.cube = pieceCube; + + piece.userData.start = { + position: piece.position.clone(), + rotation: piece.rotation.clone(), + }; + + this.pieces.push( piece ); + + } ); + + } + + updateColors( colors ) { + + if ( typeof this.pieces !== 'object' && typeof this.edges !== 'object' ) return; + + this.pieces.forEach( piece => piece.userData.cube.material.color.setHex( colors.P ) ); + this.edges.forEach( edge => edge.material.color.setHex( colors[ edge.name ] ) ); + + } + + loadFromData( data ) { + + this.size = data.size; + + this.reset(); + this.init(); + + this.pieces.forEach( piece => { + + const index = data.names.indexOf( piece.name ); + + const position = data.positions[index]; + const rotation = data.rotations[index]; + + piece.position.set( position.x, position.y, position.z ); + piece.rotation.set( rotation.x, rotation.y, rotation.z ); + + } ); + + } + +} + +export { Cube }; diff --git a/public/the-cube-master/src/js/Draggable.js b/public/the-cube-master/src/js/Draggable.js new file mode 100644 index 0000000..7387c72 --- /dev/null +++ b/public/the-cube-master/src/js/Draggable.js @@ -0,0 +1,132 @@ +window.addEventListener( 'touchmove', () => {} ); +document.addEventListener( 'touchmove', event => { event.preventDefault(); }, { passive: false } ); + +class Draggable { + + constructor( element, options ) { + + this.position = { + current: new THREE.Vector2(), + start: new THREE.Vector2(), + delta: new THREE.Vector2(), + old: new THREE.Vector2(), + drag: new THREE.Vector2(), + }; + + this.options = Object.assign( { + calcDelta: false, + }, options || {} ); + + this.element = element; + this.touch = null; + + this.drag = { + + start: ( event ) => { + + if ( event.type == 'mousedown' && event.which != 1 ) return; + if ( event.type == 'touchstart' && event.touches.length > 1 ) return; + + this.getPositionCurrent( event ); + + if ( this.options.calcDelta ) { + + this.position.start = this.position.current.clone(); + this.position.delta.set( 0, 0 ); + this.position.drag.set( 0, 0 ); + + } + + this.touch = ( event.type == 'touchstart' ); + + this.onDragStart( this.position ); + + window.addEventListener( ( this.touch ) ? 'touchmove' : 'mousemove', this.drag.move, false ); + window.addEventListener( ( this.touch ) ? 'touchend' : 'mouseup', this.drag.end, false ); + + }, + + move: ( event ) => { + + if ( this.options.calcDelta ) { + + this.position.old = this.position.current.clone(); + + } + + this.getPositionCurrent( event ); + + if ( this.options.calcDelta ) { + + this.position.delta = this.position.current.clone().sub( this.position.old ); + this.position.drag = this.position.current.clone().sub( this.position.start ); + + } + + this.onDragMove( this.position ); + + }, + + end: ( event ) => { + + this.getPositionCurrent( event ); + + this.onDragEnd( this.position ); + + window.removeEventListener( ( this.touch ) ? 'touchmove' : 'mousemove', this.drag.move, false ); + window.removeEventListener( ( this.touch ) ? 'touchend' : 'mouseup', this.drag.end, false ); + + }, + + }; + + this.onDragStart = () => {}; + this.onDragMove = () => {}; + this.onDragEnd = () => {}; + + this.enable(); + + return this; + + } + + enable() { + + this.element.addEventListener( 'touchstart', this.drag.start, false ); + this.element.addEventListener( 'mousedown', this.drag.start, false ); + + return this; + + } + + disable() { + + this.element.removeEventListener( 'touchstart', this.drag.start, false ); + this.element.removeEventListener( 'mousedown', this.drag.start, false ); + + return this; + + } + + getPositionCurrent( event ) { + + const dragEvent = event.touches + ? ( event.touches[ 0 ] || event.changedTouches[ 0 ] ) + : event; + + this.position.current.set( dragEvent.pageX, dragEvent.pageY ); + + } + + convertPosition( position ) { + + position.x = ( position.x / this.element.offsetWidth ) * 2 - 1; + position.y = - ( ( position.y / this.element.offsetHeight ) * 2 - 1 ); + + return position; + + } + +} + +export { Draggable }; diff --git a/public/the-cube-master/src/js/Easing.js b/public/the-cube-master/src/js/Easing.js new file mode 100644 index 0000000..a7c5cbf --- /dev/null +++ b/public/the-cube-master/src/js/Easing.js @@ -0,0 +1,83 @@ +const Easing = { + + Power: { + + In: power => { + + power = Math.round( power || 1 ); + + return t => Math.pow( t, power ); + + }, + + Out: power => { + + power = Math.round( power || 1 ); + + return t => 1 - Math.abs( Math.pow( t - 1, power ) ); + + }, + + InOut: power => { + + power = Math.round( power || 1 ); + + return t => ( t < 0.5 ) + ? Math.pow( t * 2, power ) / 2 + : ( 1 - Math.abs( Math.pow( ( t * 2 - 1 ) - 1, power ) ) ) / 2 + 0.5; + + }, + + }, + + Sine: { + + In: () => t => 1 + Math.sin( Math.PI / 2 * t - Math.PI / 2 ), + + Out: () => t => Math.sin( Math.PI / 2 * t ), + + InOut: () => t => ( 1 + Math.sin( Math.PI * t - Math.PI / 2 ) ) / 2, + + }, + + Back: { + + Out: s => { + + s = s || 1.70158; + + return t => { return ( t -= 1 ) * t * ( ( s + 1 ) * t + s ) + 1; }; + + }, + + In: s => { + + s = s || 1.70158; + + return t => { return t * t * ( ( s + 1 ) * t - s ); }; + + } + + }, + + Elastic: { + + Out: ( amplitude, period ) => { + + let PI2 = Math.PI * 2; + + let p1 = ( amplitude >= 1 ) ? amplitude : 1; + let p2 = ( period || 0.3 ) / ( amplitude < 1 ? amplitude : 1 ); + let p3 = p2 / PI2 * ( Math.asin( 1 / p1 ) || 0 ); + + p2 = PI2 / p2; + + return t => { return p1 * Math.pow( 2, -10 * t ) * Math.sin( ( t - p3 ) * p2 ) + 1 } + + }, + + }, + +}; + +export { Easing }; diff --git a/public/the-cube-master/src/js/Game.js b/public/the-cube-master/src/js/Game.js new file mode 100644 index 0000000..e4e5048 --- /dev/null +++ b/public/the-cube-master/src/js/Game.js @@ -0,0 +1,417 @@ +import { World } from './World.js'; +import { Cube } from './Cube.js'; +import { Controls } from './Controls.js'; +import { Scrambler } from './Scrambler.js'; +import { Transition } from './Transition.js'; +import { Timer } from './Timer.js'; +import { Preferences } from './Preferences.js'; +import { Confetti } from './Confetti.js'; +import { Scores } from './Scores.js'; +import { Storage } from './Storage.js'; +import { Themes } from './Themes.js'; +import { ThemeEditor } from './ThemeEditor.js'; +import { States } from './States.js'; +// import { Keyboard } from './Keyboard.js'; + +import { Icons } from './Icons.js'; + +const STATE = { + Menu: 0, + Playing: 1, + Complete: 2, + Stats: 3, + Prefs: 4, + Theme: 5, +}; + +const BUTTONS = { + Menu: [ 'stats', 'prefs' ], + Playing: [ 'back' ], + Complete: [], + Stats: [], + Prefs: [ 'back', 'theme' ], + Theme: [ 'back', 'reset' ], + None: [], +}; + +const SHOW = true; +const HIDE = false; + +const FAST = true; +const SLOW = false; + +class Game { + + constructor() { + + this.dom = { + ui: document.querySelector( '.ui' ), + game: document.querySelector( '.ui__game' ), + back: document.querySelector( '.ui__background' ), + prefs: document.querySelector( '.ui__prefs' ), + theme: document.querySelector( '.ui__theme' ), + stats: document.querySelector( '.ui__stats' ), + texts: { + title: document.querySelector( '.text--title' ), + note: document.querySelector( '.text--note' ), + timer: document.querySelector( '.text--timer' ), + complete: document.querySelector( '.text--complete' ), + best: document.querySelector( '.text--best-time' ), + theme: document.querySelector( '.text--theme' ), + }, + buttons: { + prefs: document.querySelector( '.btn--prefs' ), + back: document.querySelector( '.btn--back' ), + stats: document.querySelector( '.btn--stats' ), + reset: document.querySelector( '.btn--reset' ), + theme: document.querySelector( '.btn--theme' ), + }, + }; + + this.world = new World( this ); + this.cube = new Cube( this ); + this.controls = new Controls( this ); + this.scrambler = new Scrambler( this ); + this.transition = new Transition( this ); + this.timer = new Timer( this ); + this.preferences = new Preferences( this ); + this.scores = new Scores( this ); + this.storage = new Storage( this ); + this.confetti = new Confetti( this ); + this.themes = new Themes( this ); + this.themeEditor = new ThemeEditor( this ); + + this.initActions(); + + this.state = STATE.Menu; + this.newGame = false; + this.saved = false; + + this.storage.init(); + this.preferences.init(); + this.cube.init(); + this.transition.init(); + + this.storage.loadGame(); + this.scores.calcStats(); + + setTimeout( () => { + + this.transition.float(); + this.transition.cube( SHOW ); + + setTimeout( () => this.transition.title( SHOW ), 700 ); + setTimeout( () => this.transition.buttons( BUTTONS.Menu, BUTTONS.None ), 1000 ); + + }, 500 ); + + } + + initActions() { + + let tappedTwice = false; + + this.dom.game.addEventListener( 'click', event => { + + if ( this.transition.activeTransitions > 0 ) return; + if ( this.state === STATE.Playing ) return; + + if ( this.state === STATE.Menu ) { + + if ( ! tappedTwice ) { + + tappedTwice = true; + setTimeout( () => tappedTwice = false, 300 ); + return false; + + } + + this.game( SHOW ); + + } else if ( this.state === STATE.Complete ) { + + this.complete( HIDE ); + + } else if ( this.state === STATE.Stats ) { + + this.stats( HIDE ); + + } + + }, false ); + + this.controls.onMove = () => { + + if ( this.newGame ) { + + this.timer.start( true ); + this.newGame = false; + + } + + } + + this.dom.buttons.back.onclick = event => { + + if ( this.transition.activeTransitions > 0 ) return; + + if ( this.state === STATE.Playing ) { + + this.game( HIDE ); + + } else if ( this.state === STATE.Prefs ) { + + this.prefs( HIDE ); + + } else if ( this.state === STATE.Theme ) { + + this.theme( HIDE ); + + } + + }; + + this.dom.buttons.reset.onclick = event => { + + if ( this.state === STATE.Theme ) { + + this.themeEditor.resetTheme(); + + } + + }; + + this.dom.buttons.prefs.onclick = event => this.prefs( SHOW ); + + this.dom.buttons.theme.onclick = event => this.theme( SHOW ); + + this.dom.buttons.stats.onclick = event => this.stats( SHOW ); + + this.controls.onSolved = () => this.complete( SHOW ); + + } + + game( show ) { + + if ( show ) { + + if ( ! this.saved ) { + + this.scrambler.scramble(); + this.controls.scrambleCube(); + this.newGame = true; + + } + + const duration = this.saved ? 0 : + this.scrambler.converted.length * ( this.controls.flipSpeeds[0] + 10 ); + + this.state = STATE.Playing; + this.saved = true; + + this.transition.buttons( BUTTONS.None, BUTTONS.Menu ); + + this.transition.zoom( STATE.Playing, duration ); + this.transition.title( HIDE ); + + setTimeout( () => { + + this.transition.timer( SHOW ); + this.transition.buttons( BUTTONS.Playing, BUTTONS.None ); + + }, this.transition.durations.zoom - 1000 ); + + setTimeout( () => { + + this.controls.enable(); + if ( ! this.newGame ) this.timer.start( true ) + + }, this.transition.durations.zoom ); + + } else { + + this.state = STATE.Menu; + + this.transition.buttons( BUTTONS.Menu, BUTTONS.Playing ); + + this.transition.zoom( STATE.Menu, 0 ); + + this.controls.disable(); + if ( ! this.newGame ) this.timer.stop(); + this.transition.timer( HIDE ); + + setTimeout( () => this.transition.title( SHOW ), this.transition.durations.zoom - 1000 ); + + this.playing = false; + this.controls.disable(); + + } + + } + + prefs( show ) { + + if ( show ) { + + if ( this.transition.activeTransitions > 0 ) return; + + this.state = STATE.Prefs; + + this.transition.buttons( BUTTONS.Prefs, BUTTONS.Menu ); + + this.transition.title( HIDE ); + this.transition.cube( HIDE ); + + setTimeout( () => this.transition.preferences( SHOW ), 1000 ); + + } else { + + this.cube.resize(); + + this.state = STATE.Menu; + + this.transition.buttons( BUTTONS.Menu, BUTTONS.Prefs ); + + this.transition.preferences( HIDE ); + + setTimeout( () => this.transition.cube( SHOW ), 500 ); + setTimeout( () => this.transition.title( SHOW ), 1200 ); + + } + + } + + theme( show ) { + + this.themeEditor.colorPicker( show ); + + if ( show ) { + + if ( this.transition.activeTransitions > 0 ) return; + + this.cube.loadFromData( States[ '3' ][ 'checkerboard' ] ); + + this.themeEditor.setHSL( null, false ); + + this.state = STATE.Theme; + + this.transition.buttons( BUTTONS.Theme, BUTTONS.Prefs ); + + this.transition.preferences( HIDE ); + + setTimeout( () => this.transition.cube( SHOW, true ), 500 ); + setTimeout( () => this.transition.theming( SHOW ), 1000 ); + + } else { + + this.state = STATE.Prefs; + + this.transition.buttons( BUTTONS.Prefs, BUTTONS.Theme ); + + this.transition.cube( HIDE, true ); + this.transition.theming( HIDE ); + + setTimeout( () => this.transition.preferences( SHOW ), 1000 ); + setTimeout( () => { + + const gameCubeData = JSON.parse( localStorage.getItem( 'theCube_savedState' ) ); + + if ( !gameCubeData ) { + + this.cube.resize( true ); + return; + + } + + this.cube.loadFromData( gameCubeData ); + + }, 1500 ); + + } + + } + + stats( show ) { + + if ( show ) { + + if ( this.transition.activeTransitions > 0 ) return; + + this.state = STATE.Stats; + + this.transition.buttons( BUTTONS.Stats, BUTTONS.Menu ); + + this.transition.title( HIDE ); + this.transition.cube( HIDE ); + + setTimeout( () => this.transition.stats( SHOW ), 1000 ); + + } else { + + this.state = STATE.Menu; + + this.transition.buttons( BUTTONS.Menu, BUTTONS.None ); + + this.transition.stats( HIDE ); + + setTimeout( () => this.transition.cube( SHOW ), 500 ); + setTimeout( () => this.transition.title( SHOW ), 1200 ); + + } + + } + + complete( show ) { + + if ( show ) { + + this.transition.buttons( BUTTONS.Complete, BUTTONS.Playing ); + + this.state = STATE.Complete; + this.saved = false; + + this.controls.disable(); + this.timer.stop(); + this.storage.clearGame(); + + this.bestTime = this.scores.addScore( this.timer.deltaTime ); + + this.transition.zoom( STATE.Menu, 0 ); + this.transition.elevate( SHOW ); + + setTimeout( () => { + + this.transition.complete( SHOW, this.bestTime ) + this.confetti.start(); + + }, 1000 ); + + } else { + + this.state = STATE.Stats; + this.saved = false; + + this.transition.timer( HIDE ); + this.transition.complete( HIDE, this.bestTime ); + this.transition.cube( HIDE ); + this.timer.reset(); + + setTimeout( () => { + + this.cube.reset(); + this.confetti.stop(); + + this.transition.stats( SHOW ) + this.transition.elevate( 0 ); + + }, 1000 ); + + return false; + + } + + } + +} + +window.game = new Game(); diff --git a/public/the-cube-master/src/js/Icons.js b/public/the-cube-master/src/js/Icons.js new file mode 100644 index 0000000..4d60b9e --- /dev/null +++ b/public/the-cube-master/src/js/Icons.js @@ -0,0 +1,107 @@ +class IconsConverter { + + constructor( options ) { + + options = Object.assign( { + tagName: 'icon', + className: 'icon', + styles: false, + icons: {}, + observe: false, + convert: false, + }, options || {} ); + + this.tagName = options.tagName; + this.className = options.className; + this.icons = options.icons; + + this.svgTag = document.createElementNS( 'http://www.w3.org/2000/svg', 'svg' ); + this.svgTag.setAttribute( 'class', this.className ); + + if ( options.styles ) this.addStyles(); + if ( options.convert ) this.convertAllIcons(); + + if ( options.observe ) { + + const MutationObserver = window.MutationObserver || window.WebKitMutationObserver; + this.observer = new MutationObserver( mutations => { this.convertAllIcons(); } ); + this.observer.observe( document.documentElement, { childList: true, subtree: true } ); + + } + + return this; + + } + + convertAllIcons() { + + document.querySelectorAll( this.tagName ).forEach( icon => { this.convertIcon( icon ); } ); + + } + + convertIcon( icon ) { + + const svgData = this.icons[ icon.attributes[0].localName ]; + + if ( typeof svgData === 'undefined' ) return; + + const svg = this.svgTag.cloneNode( true ); + const viewBox = svgData.viewbox.split( ' ' ); + + svg.setAttributeNS( null, 'viewBox', svgData.viewbox ); + svg.style.width = viewBox[2] / viewBox[3] + 'em'; + svg.style.height = '1em'; + svg.innerHTML = svgData.content; + + icon.parentNode.replaceChild( svg, icon ); + + } + + addStyles() { + + const style = document.createElement( 'style' ); + style.innerHTML = `.${this.className} { display: inline-block; font-size: inherit; overflow: visible; vertical-align: -0.125em; preserveAspectRatio: none; }`; + document.head.appendChild( style ); + + } + +} + +const Icons = new IconsConverter( { + + icons: { + settings: { + viewbox: '0 0 512 512', + content: '', + }, + back: { + viewbox: '0 0 512 512', + content: '', + }, + trophy: { + viewbox: '0 0 576 512', + content: '', + }, + cancel: { + viewbox: '0 0 352 512', + content: '', + }, + theme: { + viewbox: '0 0 512 512', + content: '', + }, + reset: { + viewbox: '0 0 512 512', + content: '', + }, + trash: { + viewbox: '0 0 448 512', + content: '', + }, + }, + + convert: true, + +} ); + +export { Icons }; diff --git a/public/the-cube-master/src/js/Keyboard.js b/public/the-cube-master/src/js/Keyboard.js new file mode 100644 index 0000000..92ec369 --- /dev/null +++ b/public/the-cube-master/src/js/Keyboard.js @@ -0,0 +1,65 @@ +const SHIFT = 16; + +const CTRL = [ + 81, // q + 87, // w + 69, // e + 65, // a + 83, // s + 68, // d +]; + +const ROTATION = [ + 90, // z + 88, // x + 67, // c +]; + +class Keyboard { + + constructor( game ) { + + this.game = game; + this.shift = false; + + this.keydown = this.keydown.bind( this ); + this.keyup = this.keyup.bind( this ); + + window.addEventListener( 'keydown', this.keydown, false ); + window.addEventListener( 'keyup', this.keyup, false ); + + } + + keydown( e ) { + + if ( e.keyCode === SHIFT ) this.shift = true; + + if ( CTRL.includes( e.keyCode ) ) { + + const modifier = ( this.shift ) ? `'` : ``; + const face = { 65: 'L', 68: 'R', 87: 'U', 83: 'D', 81: 'F', 69: 'B' }[ e.keyCode ]; + + const convertedMove = this.game.scrambler.convertMove( face + modifier ); + + this.game.controls.keyboardMove( 'LAYER', convertedMove, () => {} ); + + } else if ( ROTATION.includes( e.keyCode ) ) { + + const axis = { 90: 'x', 88: 'y', 67: 'z' }[ e.keyCode ]; + const angle = ( this.shift ? 1 : -1 ) * Math.PI / 2; + + this.game.controls.keyboardMove( 'CUBE', { axis, angle }, () => {} ); + + } + + } + + keyup( e ) { + + if ( e.keyCode === SHIFT ) this.shift = false; + + } + +} + +export { Keyboard }; \ No newline at end of file diff --git a/public/the-cube-master/src/js/KeyboardArrows.js b/public/the-cube-master/src/js/KeyboardArrows.js new file mode 100644 index 0000000..2c9d941 --- /dev/null +++ b/public/the-cube-master/src/js/KeyboardArrows.js @@ -0,0 +1,135 @@ +const ARROW = [ + 37, // left + 39, // right + 38, // up + 40, // down +]; + +const CTRL = [ + 81, // q + 87, // w + 69, // e + 65, // a + 83, // s + 68, // d + 90, // z + 88, // x + 67, // c +]; + +class Keyboard { + + constructor( game ) { + + this.game = game; + this.ctrl = false; + + this.keydown = this.keydown.bind( this ); + this.keyup = this.keyup.bind( this ); + + window.addEventListener( 'keydown', this.keydown, false ); + window.addEventListener( 'keyup', this.keyup, false ); + + const dbg = document.querySelector('#dbg'); + + const animate = () => { + + dbg.innerHTML = ( this.ctrl ) ? this.ctrl : ''; + + requestAnimationFrame( animate ); + + } + + animate(); + + } + + keydown( e ) { + + const { keyCode } = e; + const { ctrl, game } = this; + // const { } + + if ( CTRL.includes( keyCode ) ) { + + this.ctrl = keyCode; + + } + + if ( ARROW.includes( keyCode) && ctrl !== false ) { + + let face = false, modifier = false; + + if ( ctrl === 65 ) { // A + + face = 'L'; + if (keyCode === 38) modifier = "'"; // UP + if (keyCode === 40) modifier = ''; // DOWN + + } + + if ( ctrl === 68 ) { // D + + face = 'R'; + if (keyCode === 38) modifier = ''; // UP + if (keyCode === 40) modifier = "'"; // DOWN + + } + + if ( ctrl === 87 ) { // W + + face = 'U'; + if (keyCode === 37) modifier = ''; // LEFT + if (keyCode === 39) modifier = "'"; // RIGHT + + } + + if ( ctrl === 83 ) { // S + + face = 'D'; + if (keyCode === 37) modifier = "'"; // LEFT + if (keyCode === 39) modifier = ''; // RIGHT + + } + + if ( ctrl === 81 ) { // Q + + face = 'F'; + if (keyCode === 37) modifier = "'"; // LEFT + if (keyCode === 39) modifier = ''; // RIGHT + + } + + if ( ctrl === 69 ) { // E + + face = 'B'; + if (keyCode === 37) modifier = ''; // LEFT + if (keyCode === 39) modifier = "'"; // RIGHT + + } + + if ( face === false || modifier === false ) return; + + const convertedMove = game.scrambler.convertMove( face + modifier ); + game.controls.execute( convertedMove, () => {} ); + + } + + } + + keyup( e ) { + + const { keyCode } = e; + const { ctrl } = this; + + if ( ctrl == keyCode ) { + + this.ctrl = false; + + } + + } + +} + +export { Keyboard }; \ No newline at end of file diff --git a/public/the-cube-master/src/js/Preferences.js b/public/the-cube-master/src/js/Preferences.js new file mode 100644 index 0000000..d2b6257 --- /dev/null +++ b/public/the-cube-master/src/js/Preferences.js @@ -0,0 +1,121 @@ +import { Range } from './Range.js'; + +class Preferences { + + constructor( game ) { + + this.game = game; + + } + + init() { + + const getProgressInRange = ( value, start, end ) => { + + return Math.min( Math.max( (value - start) / (end - start), 0 ), 1 ); + + } + + this.ranges = { + + size: new Range( 'size', { + value: this.game.cube.size, + range: [ 2, 5 ], + step: 1, + onUpdate: value => { + + this.game.cube.size = value; + + this.game.preferences.ranges.scramble.list.forEach( ( item, i ) => { + + item.innerHTML = this.game.scrambler.scrambleLength[ this.game.cube.size ][ i ]; + + } ); + + }, + onComplete: () => this.game.storage.savePreferences(), + } ), + + flip: new Range( 'flip', { + value: this.game.controls.flipConfig, + range: [ 0, 2 ], + step: 1, + onUpdate: value => { + + this.game.controls.flipConfig = value; + + }, + onComplete: () => this.game.storage.savePreferences(), + } ), + + scramble: new Range( 'scramble', { + value: this.game.scrambler.dificulty, + range: [ 0, 2 ], + step: 1, + onUpdate: value => { + + this.game.scrambler.dificulty = value; + + }, + onComplete: () => this.game.storage.savePreferences() + } ), + + fov: new Range( 'fov', { + value: this.game.world.fov, + range: [ 2, 45 ], + onUpdate: value => { + + this.game.world.fov = value; + this.game.world.resize(); + + }, + onComplete: () => this.game.storage.savePreferences() + } ), + + theme: new Range( 'theme', { + value: { cube: 0, erno: 1, dust: 2, camo: 3, rain: 4 }[ this.game.themes.theme ], + range: [ 0, 4 ], + step: 1, + onUpdate: value => { + + const theme = [ 'cube', 'erno', 'dust', 'camo', 'rain' ][ value ] + this.game.themes.setTheme( theme ); + + }, + onComplete: () => this.game.storage.savePreferences() + } ), + + hue: new Range( 'hue', { + value: 0, + range: [ 0, 360 ], + onUpdate: value => this.game.themeEditor.updateHSL(), + onComplete: () => this.game.storage.savePreferences(), + } ), + + saturation: new Range( 'saturation', { + value: 100, + range: [ 0, 100 ], + onUpdate: value => this.game.themeEditor.updateHSL(), + onComplete: () => this.game.storage.savePreferences(), + } ), + + lightness: new Range( 'lightness', { + value: 50, + range: [ 0, 100 ], + onUpdate: value => this.game.themeEditor.updateHSL(), + onComplete: () => this.game.storage.savePreferences(), + } ), + + }; + + this.ranges.scramble.list.forEach( ( item, i ) => { + + item.innerHTML = this.game.scrambler.scrambleLength[ this.game.cube.size ][ i ]; + + } ); + + } + +} + +export { Preferences }; diff --git a/public/the-cube-master/src/js/Range.js b/public/the-cube-master/src/js/Range.js new file mode 100644 index 0000000..a40b1d1 --- /dev/null +++ b/public/the-cube-master/src/js/Range.js @@ -0,0 +1,171 @@ +import { Draggable } from './Draggable.js'; + +const RangeHTML = [ + + '
', + '
', + '
', + '
', + '
', + '
', + '
', + '
', + +].join( '\n' ); + +document.querySelectorAll( 'range' ).forEach( el => { + + const temp = document.createElement( 'div' ); + temp.innerHTML = RangeHTML; + + const range = temp.querySelector( '.range' ); + const rangeLabel = range.querySelector( '.range__label' ); + const rangeList = range.querySelector( '.range__list' ); + + range.setAttribute( 'name', el.getAttribute( 'name' ) ); + rangeLabel.innerHTML = el.getAttribute( 'title' ); + + if ( el.hasAttribute( 'color' ) ) { + + range.classList.add( 'range--type-color' ); + range.classList.add( 'range--color-' + el.getAttribute( 'name' ) ); + + } + + if ( el.hasAttribute( 'list' ) ) { + + el.getAttribute( 'list' ).split( ',' ).forEach( listItemText => { + + const listItem = document.createElement( 'div' ); + listItem.innerHTML = listItemText; + rangeList.appendChild( listItem ); + + } ); + + } + + el.parentNode.replaceChild( range, el ); + +} ); + +class Range { + + constructor( name, options ) { + + options = Object.assign( { + range: [ 0, 1 ], + value: 0, + step: 0, + onUpdate: () => {}, + onComplete: () => {}, + }, options || {} ); + + this.element = document.querySelector( '.range[name="' + name + '"]' ); + this.track = this.element.querySelector( '.range__track' ); + this.handle = this.element.querySelector( '.range__handle' ); + this.list = [].slice.call( this.element.querySelectorAll( '.range__list div' ) ); + + this.value = options.value; + this.min = options.range[0]; + this.max = options.range[1]; + this.step = options.step; + + this.onUpdate = options.onUpdate; + this.onComplete = options.onComplete; + + this.setValue( this.value ); + + this.initDraggable(); + + } + + setValue( value ) { + + this.value = this.round( this.limitValue( value ) ); + this.setHandlePosition(); + + } + + initDraggable() { + + const oldPosition = null; + + let current; + + this.draggable = new Draggable( this.handle, { calcDelta: true } ); + + this.draggable.onDragStart = position => { + + current = this.positionFromValue( this.value ); + this.handle.style.left = current + 'px'; + + } + + this.draggable.onDragMove = position => { + + current = this.limitPosition( current + position.delta.x ); + this.value = this.round( this.valueFromPosition( current ) ); + this.setHandlePosition(); + + this.onUpdate( this.value ); + + } + + this.draggable.onDragEnd = position => { + + this.onComplete( this.value ); + + } + + } + + round( value ) { + + if ( this.step < 1 ) return value; + + return Math.round( ( value - this.min ) / this.step ) * this.step + this.min; + + } + + limitValue( value ) { + + const max = Math.max( this.max, this.min ); + const min = Math.min( this.max, this.min ); + + return Math.min( Math.max( value, min ), max ); + + } + + limitPosition( position ) { + + return Math.min( Math.max( position, 0 ), this.track.offsetWidth ); + + } + + percentsFromValue( value ) { + + return ( value - this.min ) / ( this.max - this.min ); + + } + + valueFromPosition( position ) { + + return this.min + ( this.max - this.min ) * ( position / this.track.offsetWidth ); + + } + + positionFromValue( value ) { + + return this.percentsFromValue( value ) * this.track.offsetWidth; + + } + + setHandlePosition() { + + this.handle.style.left = this.percentsFromValue( this.value ) * 100 + '%'; + + } + +} + +export { Range }; diff --git a/public/the-cube-master/src/js/Scores.js b/public/the-cube-master/src/js/Scores.js new file mode 100644 index 0000000..4a47197 --- /dev/null +++ b/public/the-cube-master/src/js/Scores.js @@ -0,0 +1,108 @@ +class Scores { + + constructor( game ) { + + this.game = game; + + this.data = { + 2: { + scores: [], + solves: 0, + best: 0, + worst: 0, + }, + 3: { + scores: [], + solves: 0, + best: 0, + worst: 0, + }, + 4: { + scores: [], + solves: 0, + best: 0, + worst: 0, + }, + 5: { + scores: [], + solves: 0, + best: 0, + worst: 0, + } + } + + } + + addScore( time ) { + + const data = this.data[ this.game.cube.sizeGenerated ]; + + data.scores.push( time ); + data.solves++; + + if ( data.scores.lenght > 100 ) data.scores.shift(); + + let bestTime = false + + if ( time < data.best || data.best === 0 ) { + + data.best = time; + bestTime = true; + + } + + if ( time > data.worst ) data.worst = time; + + this.game.storage.saveScores(); + + return bestTime; + + } + + calcStats() { + + const s = this.game.cube.sizeGenerated; + const data = this.data[ s ]; + + this.setStat( 'cube-size', `${s}x${s}x${s}` ); + this.setStat( 'total-solves', data.solves ); + this.setStat( 'best-time', this.convertTime( data.best ) ); + this.setStat( 'worst-time', this.convertTime( data.worst ) ); + this.setStat( 'average-5', this.getAverage( 5 ) ); + this.setStat( 'average-12', this.getAverage( 12 ) ); + this.setStat( 'average-25', this.getAverage( 25 ) ); + + } + + setStat( name, value ) { + + if ( value === 0 ) value = '-'; + + this.game.dom.stats.querySelector( `.stats[name="${name}"] b` ).innerHTML = value; + + } + + getAverage( count ) { + + const data = this.data[ this.game.cube.sizeGenerated ]; + + if ( data.scores.length < count ) return 0; + + return this.convertTime( data.scores.slice( -count ).reduce( ( a, b ) => a + b, 0 ) / count ); + + } + + convertTime( time ) { + + if ( time <= 0 ) return 0; + + const seconds = parseInt( ( time / 1000 ) % 60 ); + const minutes = parseInt( ( time / ( 1000 * 60 ) ) ); + + return minutes + ':' + ( seconds < 10 ? '0' : '' ) + seconds; + + } + +} + +export { Scores }; diff --git a/public/the-cube-master/src/js/Scrambler.js b/public/the-cube-master/src/js/Scrambler.js new file mode 100644 index 0000000..63895e2 --- /dev/null +++ b/public/the-cube-master/src/js/Scrambler.js @@ -0,0 +1,96 @@ +class Scrambler { + + constructor( game ) { + + this.game = game; + + this.dificulty = 0; + + this.scrambleLength = { + 2: [ 7, 9, 11 ], + 3: [ 20, 25, 30 ], + 4: [ 30, 40, 50 ], + 5: [ 40, 60, 80 ], + }; + + this.moves = []; + this.conveted = []; + this.pring = ''; + + } + + scramble( scramble ) { + + let count = 0; + this.moves = ( typeof scramble !== 'undefined' ) ? scramble.split( ' ' ) : []; + + if ( this.moves.length < 1 ) { + + const scrambleLength = this.scrambleLength[ this.game.cube.size ][ this.dificulty ]; + + const faces = this.game.cube.size < 4 ? 'UDLRFB' : 'UuDdLlRrFfBb'; + const modifiers = [ "", "'", "2" ]; + const total = ( typeof scramble === 'undefined' ) ? scrambleLength : scramble; + + while ( count < total ) { + + const move = + faces[ Math.floor( Math.random() * faces.length ) ] + + modifiers[ Math.floor( Math.random() * 3 ) ]; + + if ( count > 0 && move.charAt( 0 ) == this.moves[ count - 1 ].charAt( 0 ) ) continue; + if ( count > 1 && move.charAt( 0 ) == this.moves[ count - 2 ].charAt( 0 ) ) continue; + + this.moves.push( move ); + count ++; + + } + + } + + this.callback = () => {}; + this.convert(); + this.print = this.moves.join( ' ' ); + + return this; + + } + + convert( moves ) { + + this.converted = []; + + this.moves.forEach( move => { + + const convertedMove = this.convertMove( move ); + const modifier = move.charAt( 1 ); + + this.converted.push( convertedMove ); + if ( modifier == "2" ) this.converted.push( convertedMove ); + + } ); + + } + + convertMove( move ) { + + const face = move.charAt( 0 ); + const modifier = move.charAt( 1 ); + + const axis = { D: 'y', U: 'y', L: 'x', R: 'x', F: 'z', B: 'z' }[ face.toUpperCase() ]; + let row = { D: -1, U: 1, L: -1, R: 1, F: 1, B: -1 }[ face.toUpperCase() ]; + + if ( this.game.cube.size > 3 && face !== face.toLowerCase() ) row = row * 2; + + const position = new THREE.Vector3(); + position[ { D: 'y', U: 'y', L: 'x', R: 'x', F: 'z', B: 'z' }[ face.toUpperCase() ] ] = row; + + const angle = ( Math.PI / 2 ) * - row * ( ( modifier == "'" ) ? - 1 : 1 ); + + return { position, axis, angle, name: move }; + + } + +} + +export { Scrambler }; \ No newline at end of file diff --git a/public/the-cube-master/src/js/States.js b/public/the-cube-master/src/js/States.js new file mode 100644 index 0000000..fa0b2bf --- /dev/null +++ b/public/the-cube-master/src/js/States.js @@ -0,0 +1,68 @@ +const States = { + 3: { + checkerboard: { + names: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 ], + positions: [ + { "x": 1/3, "y": -1/3, "z": 1/3 }, + { "x": -1/3, "y": 1/3, "z": 0 }, + { "x": 1/3, "y": -1/3, "z": -1/3 }, + { "x": -1/3, "y": 0, "z": -1/3 }, + { "x": 1/3, "y": 0, "z": 0 }, + { "x": -1/3, "y": 0, "z": 1/3 }, + { "x": 1/3, "y": 1/3, "z": 1/3 }, + { "x": -1/3, "y": -1/3, "z": 0 }, + { "x": 1/3, "y": 1/3, "z": -1/3 }, + { "x": 0, "y": 1/3, "z": -1/3 }, + { "x": 0, "y": -1/3, "z": 0 }, + { "x": 0, "y": 1/3, "z": 1/3 }, + { "x": 0, "y": 0, "z": 1/3 }, + { "x": 0, "y": 0, "z": 0 }, + { "x": 0, "y": 0, "z": -1/3 }, + { "x": 0, "y": -1/3, "z": -1/3 }, + { "x": 0, "y": 1/3, "z": 0 }, + { "x": 0, "y": -1/3, "z": 1/3 }, + { "x": -1/3, "y": -1/3, "z": 1/3 }, + { "x": 1/3, "y": 1/3, "z": 0 }, + { "x": -1/3, "y": -1/3, "z": -1/3 }, + { "x": 1/3, "y": 0, "z": -1/3 }, + { "x": -1/3, "y": 0, "z": 0 }, + { "x": 1/3, "y": 0, "z": 1/3 }, + { "x": -1/3, "y": 1/3, "z": 1/3 }, + { "x": 1/3, "y": -1/3, "z": 0 }, + { "x": -1/3, "y": 1/3, "z": -1/3 } + ], + rotations: [ + { "x": -Math.PI, "y": 0, "z": Math.PI, }, + { "x": Math.PI, "y": 0, "z": 0 }, + { "x": -Math.PI, "y": 0, "z": Math.PI }, + { "x": 0, "y": 0, "z": 0 }, + { "x": 0, "y": 0, "z": Math.PI }, + { "x": 0, "y": 0, "z": 0 }, + { "x": -Math.PI, "y": 0, "z": Math.PI }, + { "x": Math.PI, "y": 0, "z": 0 }, + { "x": -Math.PI, "y": 0, "z": Math.PI }, + { "x": 0, "y": 0, "z": Math.PI }, + { "x": 0, "y": 0, "z": 0 }, + { "x": 0, "y": 0, "z": Math.PI }, + { "x": -Math.PI, "y": 0, "z": 0 }, + { "x": Math.PI, "y": 0, "z": Math.PI }, + { "x": Math.PI, "y": 0, "z": 0 }, + { "x": 0, "y": 0, "z": Math.PI }, + { "x": 0, "y": 0, "z": 0 }, + { "x": 0, "y": 0, "z": Math.PI }, + { "x": Math.PI, "y": 0, "z": Math.PI }, + { "x": -Math.PI, "y": 0, "z": 0 }, + { "x": Math.PI, "y": 0, "z": Math.PI }, + { "x": 0, "y": 0, "z": 0 }, + { "x": 0, "y": 0, "z": Math.PI }, + { "x": 0, "y": 0, "z": 0 }, + { "x": Math.PI, "y": 0, "z": Math.PI }, + { "x": -Math.PI, "y": 0, "z": 0 }, + { "x": Math.PI, "y": 0, "z": Math.PI } + ], + size: 3, + }, + } +}; + +export { States }; \ No newline at end of file diff --git a/public/the-cube-master/src/js/Storage.js b/public/the-cube-master/src/js/Storage.js new file mode 100644 index 0000000..a30f6ca --- /dev/null +++ b/public/the-cube-master/src/js/Storage.js @@ -0,0 +1,200 @@ +class Storage { + + constructor( game ) { + + this.game = game; + + const userVersion = localStorage.getItem( 'theCube_version' ); + + if ( ! userVersion || userVersion !== window.gameVersion ) { + + this.clearGame(); + this.clearPreferences(); + this.migrateScores(); + localStorage.setItem( 'theCube_version', window.gameVersion ); + + } + + } + + init() { + + this.loadPreferences(); + this.loadScores(); + + } + + loadGame() { + + try { + + const gameInProgress = localStorage.getItem( 'theCube_playing' ) === 'true'; + + if ( ! gameInProgress ) throw new Error(); + + const gameCubeData = JSON.parse( localStorage.getItem( 'theCube_savedState' ) ); + const gameTime = parseInt( localStorage.getItem( 'theCube_time' ) ); + + if ( ! gameCubeData || gameTime === null ) throw new Error(); + if ( gameCubeData.size !== this.game.cube.sizeGenerated ) throw new Error(); + + this.game.cube.loadFromData( gameCubeData ); + + this.game.timer.deltaTime = gameTime; + + this.game.saved = true; + + } catch( e ) { + + this.game.saved = false; + + } + + } + + saveGame() { + + const gameInProgress = true; + const gameCubeData = { names: [], positions: [], rotations: [] }; + const gameTime = this.game.timer.deltaTime; + + gameCubeData.size = this.game.cube.sizeGenerated; + + this.game.cube.pieces.forEach( piece => { + + gameCubeData.names.push( piece.name ); + gameCubeData.positions.push( piece.position ); + gameCubeData.rotations.push( piece.rotation.toVector3() ); + + } ); + + localStorage.setItem( 'theCube_playing', gameInProgress ); + localStorage.setItem( 'theCube_savedState', JSON.stringify( gameCubeData ) ); + localStorage.setItem( 'theCube_time', gameTime ); + + } + + clearGame() { + + localStorage.removeItem( 'theCube_playing' ); + localStorage.removeItem( 'theCube_savedState' ); + localStorage.removeItem( 'theCube_time' ); + + } + + loadScores() { + + try { + + const scoresData = JSON.parse( localStorage.getItem( 'theCube_scores' ) ); + + if ( ! scoresData ) throw new Error(); + + this.game.scores.data = scoresData; + + } catch( e ) {} + + } + + saveScores() { + + const scoresData = this.game.scores.data; + + localStorage.setItem( 'theCube_scores', JSON.stringify( scoresData ) ); + + } + + clearScores() { + + localStorage.removeItem( 'theCube_scores' ); + + } + + migrateScores() { + + try { + + const scoresData = JSON.parse( localStorage.getItem( 'theCube_scoresData' ) ); + const scoresBest = parseInt( localStorage.getItem( 'theCube_scoresBest' ) ); + const scoresWorst = parseInt( localStorage.getItem( 'theCube_scoresWorst' ) ); + const scoresSolves = parseInt( localStorage.getItem( 'theCube_scoresSolves' ) ); + + if ( ! scoresData || ! scoresBest || ! scoresSolves || ! scoresWorst ) return false; + + this.game.scores.data[ 3 ].scores = scoresData; + this.game.scores.data[ 3 ].best = scoresBest; + this.game.scores.data[ 3 ].solves = scoresSolves; + this.game.scores.data[ 3 ].worst = scoresWorst; + + localStorage.removeItem( 'theCube_scoresData' ); + localStorage.removeItem( 'theCube_scoresBest' ); + localStorage.removeItem( 'theCube_scoresWorst' ); + localStorage.removeItem( 'theCube_scoresSolves' ); + + } catch( e ) {} + + } + + loadPreferences() { + + try { + + const preferences = JSON.parse( localStorage.getItem( 'theCube_preferences' ) ); + + if ( ! preferences ) throw new Error(); + + this.game.cube.size = parseInt( preferences.cubeSize ); + this.game.controls.flipConfig = parseInt( preferences.flipConfig ); + this.game.scrambler.dificulty = parseInt( preferences.dificulty ); + + this.game.world.fov = parseFloat( preferences.fov ); + this.game.world.resize(); + + this.game.themes.colors = preferences.colors; + this.game.themes.setTheme( preferences.theme ); + + return true; + + } catch (e) { + + this.game.cube.size = 3; + this.game.controls.flipConfig = 0; + this.game.scrambler.dificulty = 1; + + this.game.world.fov = 10; + this.game.world.resize(); + + this.game.themes.setTheme( 'cube' ); + + this.savePreferences(); + + return false; + + } + + } + + savePreferences() { + + const preferences = { + cubeSize: this.game.cube.size, + flipConfig: this.game.controls.flipConfig, + dificulty: this.game.scrambler.dificulty, + fov: this.game.world.fov, + theme: this.game.themes.theme, + colors: this.game.themes.colors, + }; + + localStorage.setItem( 'theCube_preferences', JSON.stringify( preferences ) ); + + } + + clearPreferences() { + + localStorage.removeItem( 'theCube_preferences' ); + + } + +} + +export { Storage }; diff --git a/public/the-cube-master/src/js/ThemeEditor.js b/public/the-cube-master/src/js/ThemeEditor.js new file mode 100644 index 0000000..f27e12e --- /dev/null +++ b/public/the-cube-master/src/js/ThemeEditor.js @@ -0,0 +1,179 @@ +import { Tween, Easing } from './Tween.js'; + +class ThemeEditor { + + constructor( game ) { + + this.game = game; + + this.editColor = 'R'; + + this.getPieceColor = this.getPieceColor.bind( this ); + + } + + colorFromHSL( h, s, l ) { + + h = Math.round( h ); + s = Math.round( s ); + l = Math.round( l ); + + return new THREE.Color( `hsl(${h}, ${s}%, ${l}%)` ); + + } + + setHSL( color = null, animate = false ) { + + this.editColor = ( color === null) ? 'R' : color; + + const hsl = new THREE.Color( this.game.themes.getColors()[ this.editColor ] ); + + const { h, s, l } = hsl.getHSL( hsl ); + const { hue, saturation, lightness } = this.game.preferences.ranges; + + if ( animate ) { + + const ho = hue.value / 360; + const so = saturation.value / 100; + const lo = lightness.value / 100; + + const colorOld = this.colorFromHSL( hue.value, saturation.value, lightness.value ); + + if ( this.tweenHSL ) this.tweenHSL.stop() + + this.tweenHSL = new Tween( { + duration: 200, + easing: Easing.Sine.Out(), + onUpdate: tween => { + + hue.setValue( ( ho + ( h - ho ) * tween.value ) * 360 ); + saturation.setValue( ( so + ( s - so ) * tween.value ) * 100 ); + lightness.setValue( ( lo + ( l - lo ) * tween.value ) * 100 ); + + const colorTween = colorOld.clone().lerp( hsl, tween.value ); + + const colorTweenStyle = colorTween.getStyle(); + const colorTweenHex = colorTween.getHSL( colorTween ); + + hue.handle.style.color = colorTweenStyle; + saturation.handle.style.color = colorTweenStyle; + lightness.handle.style.color = colorTweenStyle; + + saturation.track.style.color = + this.colorFromHSL( colorTweenHex.h * 360, 100, 50 ).getStyle(); + lightness.track.style.color = + this.colorFromHSL( colorTweenHex.h * 360, colorTweenHex.s * 100, 50 ).getStyle(); + + this.game.dom.theme.style.display = 'none'; + this.game.dom.theme.offsetHeight; + this.game.dom.theme.style.display = ''; + + }, + onComplete: () => { + + this.updateHSL(); + this.game.storage.savePreferences(); + + }, + } ); + + } else { + + hue.setValue( h * 360 ); + saturation.setValue( s * 100 ); + lightness.setValue( l * 100 ); + + this.updateHSL(); + this.game.storage.savePreferences(); + + } + + } + + updateHSL() { + + const { hue, saturation, lightness } = this.game.preferences.ranges; + + const h = hue.value; + const s = saturation.value; + const l = lightness.value; + + const color = this.colorFromHSL( h, s, l ).getStyle(); + + hue.handle.style.color = color; + saturation.handle.style.color = color; + lightness.handle.style.color = color; + + saturation.track.style.color = this.colorFromHSL( h, 100, 50 ).getStyle(); + lightness.track.style.color = this.colorFromHSL( h, s, 50 ).getStyle(); + + this.game.dom.theme.style.display = 'none'; + this.game.dom.theme.offsetHeight; + this.game.dom.theme.style.display = ''; + + const theme = this.game.themes.theme; + + this.game.themes.colors[ theme ][ this.editColor ] = this.colorFromHSL( h, s, l ).getHex(); + this.game.themes.setTheme(); + + } + + colorPicker( enable ) { + + if ( enable ) { + + this.game.dom.game.addEventListener( 'click', this.getPieceColor, false ); + + } else { + + this.game.dom.game.removeEventListener( 'click', this.getPieceColor, false ); + + } + + } + + getPieceColor( event ) { + + const clickEvent = event.touches + ? ( event.touches[ 0 ] || event.changedTouches[ 0 ] ) + : event; + + const clickPosition = new THREE.Vector2( clickEvent.pageX, clickEvent.pageY ); + + let edgeIntersect = this.game.controls.getIntersect( clickPosition, this.game.cube.edges, true ); + let pieceIntersect = this.game.controls.getIntersect( clickPosition, this.game.cube.cubes, true ); + + if ( edgeIntersect !== false ) { + + const edge = edgeIntersect.object; + + const position = edge.parent + .localToWorld( edge.position.clone() ) + .sub( this.game.cube.object.position ) + .sub( this.game.cube.animator.position ); + + const mainAxis = this.game.controls.getMainAxis( position ); + if ( position.multiplyScalar( 2 ).round()[ mainAxis ] < 1 ) edgeIntersect = false; + + } + + const name = edgeIntersect ? edgeIntersect.object.name : pieceIntersect ? 'P' : 'G'; + + this.setHSL( name, true ); + + } + + resetTheme() { + + this.game.themes.colors[ this.game.themes.theme ] = + JSON.parse( JSON.stringify( this.game.themes.defaults[ this.game.themes.theme ] ) ); + + this.game.themes.setTheme(); + + this.setHSL( this.editColor, true ); + + } + +} + +export { ThemeEditor }; \ No newline at end of file diff --git a/public/the-cube-master/src/js/Themes.js b/public/the-cube-master/src/js/Themes.js new file mode 100644 index 0000000..ec1ca79 --- /dev/null +++ b/public/the-cube-master/src/js/Themes.js @@ -0,0 +1,94 @@ +class Themes { + + constructor( game ) { + + this.game = game; + this.theme = null; + + this.defaults = { + cube: { + U: 0xfff7ff, // white + D: 0xffef48, // yellow + F: 0xef3923, // red + R: 0x41aac8, // blue + B: 0xff8c0a, // orange + L: 0x82ca38, // green + P: 0x08101a, // piece + G: 0xd1d5db, // background + }, + erno: { + U: 0xffffff, + D: 0xffd500, + F: 0xc41e3a, + R: 0x0051ba, + B: 0xff5800, + L: 0x009e60, + P: 0x08101a, + G: 0x8abdff, + }, + dust: { + U: 0xfff6eb, + D: 0xe7c48d, + F: 0x8f253e, + R: 0x607e69, + B: 0xbe6f62, + L: 0x849f5d, + P: 0x08101a, + G: 0xE7C48D, + }, + camo: { + U: 0xfff6eb, + D: 0xbfb672, + F: 0x37241c, + R: 0x718456, + B: 0x805831, + L: 0x37431d, + P: 0x08101a, + G: 0xBFB672, + }, + rain: { + U: 0xfafaff, + D: 0xedb92d, + F: 0xce2135, + R: 0x449a89, + B: 0xec582f, + L: 0xa3a947, + P: 0x08101a, + G: 0x87b9ac, + }, + }; + + this.colors = JSON.parse( JSON.stringify( this.defaults ) ); + + } + + getColors() { + + return this.colors[ this.theme ]; + + } + + setTheme( theme = false, force = false ) { + + if ( theme === this.theme && force === false ) return; + if ( theme !== false ) this.theme = theme; + + const colors = this.getColors(); + + this.game.dom.prefs.querySelectorAll( '.range__handle div' ).forEach( range => { + + range.style.background = '#' + colors.R.toString(16).padStart(6, '0'); + + } ); + + this.game.cube.updateColors( colors ); + + this.game.confetti.updateColors( colors ); + + this.game.dom.back.style.background = '#' + colors.G.toString(16).padStart(6, '0'); + + } + +} + +export { Themes }; diff --git a/public/the-cube-master/src/js/Timer.js b/public/the-cube-master/src/js/Timer.js new file mode 100644 index 0000000..02eb33d --- /dev/null +++ b/public/the-cube-master/src/js/Timer.js @@ -0,0 +1,79 @@ +import { Animation } from './Animation.js'; + +class Timer extends Animation { + + constructor( game ) { + + super( false ); + + this.game = game; + this.reset(); + + } + + start( continueGame ) { + + this.startTime = continueGame ? ( Date.now() - this.deltaTime ) : Date.now(); + this.deltaTime = 0; + this.converted = this.convert(); + + super.start(); + + } + + reset() { + + this.startTime = 0; + this.currentTime = 0; + this.deltaTime = 0; + this.converted = '0:00'; + + } + + stop() { + + this.currentTime = Date.now(); + this.deltaTime = this.currentTime - this.startTime; + this.convert(); + + super.stop(); + + return { time: this.converted, millis: this.deltaTime }; + + } + + update() { + + const old = this.converted; + + this.currentTime = Date.now(); + this.deltaTime = this.currentTime - this.startTime; + this.convert(); + + if ( this.converted != old ) { + + localStorage.setItem( 'theCube_time', this.deltaTime ); + this.setText(); + + } + + } + + convert() { + + const seconds = parseInt( ( this.deltaTime / 1000 ) % 60 ); + const minutes = parseInt( ( this.deltaTime / ( 1000 * 60 ) ) ); + + this.converted = minutes + ':' + ( seconds < 10 ? '0' : '' ) + seconds; + + } + + setText() { + + this.game.dom.texts.timer.innerHTML = this.converted; + + } + +} + +export { Timer }; diff --git a/public/the-cube-master/src/js/Transition.js b/public/the-cube-master/src/js/Transition.js new file mode 100644 index 0000000..643a599 --- /dev/null +++ b/public/the-cube-master/src/js/Transition.js @@ -0,0 +1,478 @@ +import { Tween, Easing } from './Tween.js'; + +class Transition { + + constructor( game ) { + + this.game = game; + + this.tweens = {}; + this.durations = {}; + this.data = { + cubeY: -0.2, + cameraZoom: 0.85, + }; + + this.activeTransitions = 0; + + } + + init() { + + this.game.controls.disable(); + + this.game.cube.object.position.y = this.data.cubeY; + this.game.cube.animator.position.y = 4; + this.game.cube.animator.rotation.x = - Math.PI / 3; + this.game.world.camera.zoom = this.data.cameraZoom; + this.game.world.camera.updateProjectionMatrix(); + + this.tweens.buttons = {}; + this.tweens.timer = []; + this.tweens.title = []; + this.tweens.best = []; + this.tweens.complete = []; + this.tweens.prefs = []; + this.tweens.theme = []; + this.tweens.stats = []; + + } + + buttons( show, hide ) { + + const buttonTween = ( button, show ) => { + + return new Tween( { + target: button.style, + duration: 300, + easing: show ? Easing.Power.Out( 2 ) : Easing.Power.In( 3 ), + from: { opacity: show ? 0 : 1 }, + to: { opacity: show ? 1 : 0 }, + onUpdate: tween => { + + const translate = show ? 1 - tween.value : tween.value; + button.style.transform = `translate3d(0, ${translate * 1.5}em, 0)`; + + }, + onComplete: () => button.style.pointerEvents = show ? 'all' : 'none' + } ); + + } + + hide.forEach( button => + this.tweens.buttons[ button ] = buttonTween( this.game.dom.buttons[ button ], false ) + ); + + setTimeout( () => show.forEach( button => { + + this.tweens.buttons[ button ] = buttonTween( this.game.dom.buttons[ button ], true ) + + } ), hide ? 500 : 0 ); + + } + + cube( show, theming = false ) { + + this.activeTransitions++; + + try { this.tweens.cube.stop() } catch(e) {}; + + const currentY = this.game.cube.animator.position.y; + const currentRotation = this.game.cube.animator.rotation.x; + + this.tweens.cube = new Tween( { + duration: show ? 3000 : 1250, + easing: show ? Easing.Elastic.Out( 0.8, 0.6 ) : Easing.Back.In( 1 ), + onUpdate: tween => { + + this.game.cube.animator.position.y = show + ? ( theming ? 0.9 + ( 1 - tween.value ) * 3.5 : ( 1 - tween.value ) * 4 ) + : currentY + tween.value * 4; + + this.game.cube.animator.rotation.x = show + ? ( 1 - tween.value ) * Math.PI / 3 + : currentRotation + tween.value * - Math.PI / 3; + + }, + } ); + + if ( theming ) { + + if ( show ) { + + this.game.world.camera.zoom = 0.75; + this.game.world.camera.updateProjectionMatrix(); + + } else { + + setTimeout( () => { + + this.game.world.camera.zoom = this.data.cameraZoom; + this.game.world.camera.updateProjectionMatrix(); + + }, 1500 ); + + } + + } + + this.durations.cube = show ? 1500 : 1500; + + setTimeout( () => this.activeTransitions--, this.durations.cube ); + + } + + float() { + + try { this.tweens.float.stop() } catch(e) {}; + + this.tweens.float = new Tween( { + duration: 1500, + easing: Easing.Sine.InOut(), + yoyo: true, + onUpdate: tween => { + + this.game.cube.holder.position.y = (- 0.02 + tween.value * 0.04); + this.game.cube.holder.rotation.x = 0.005 - tween.value * 0.01; + this.game.cube.holder.rotation.z = - this.game.cube.holder.rotation.x; + this.game.cube.holder.rotation.y = this.game.cube.holder.rotation.x; + + this.game.controls.edges.position.y = + this.game.cube.holder.position.y + this.game.cube.object.position.y; + + }, + } ); + + } + + zoom( play, time ) { + + this.activeTransitions++; + + const zoom = ( play ) ? 1 : this.data.cameraZoom; + const duration = ( time > 0 ) ? Math.max( time, 1500 ) : 1500; + const rotations = ( time > 0 ) ? Math.round( duration / 1500 ) : 1; + const easing = Easing.Power.InOut( ( time > 0 ) ? 2 : 3 ); + + this.tweens.zoom = new Tween( { + target: this.game.world.camera, + duration: duration, + easing: easing, + to: { zoom: zoom }, + onUpdate: () => { this.game.world.camera.updateProjectionMatrix(); }, + } ); + + this.tweens.rotate = new Tween( { + target: this.game.cube.animator.rotation, + duration: duration, + easing: easing, + to: { y: - Math.PI * 2 * rotations }, + onComplete: () => { this.game.cube.animator.rotation.y = 0; }, + } ); + + this.durations.zoom = duration; + + setTimeout( () => this.activeTransitions--, this.durations.zoom ); + + } + + elevate( complete ) { + + this.activeTransitions++; + + const cubeY = + + this.tweens.elevate = new Tween( { + target: this.game.cube.object.position, + duration: complete ? 1500 : 0, + easing: Easing.Power.InOut( 3 ), + to: { y: complete ? -0.05 : this.data.cubeY } + } ); + + this.durations.elevate = 1500; + + setTimeout( () => this.activeTransitions--, this.durations.elevate ); + + } + + complete( show, best ) { + + this.activeTransitions++; + + const text = best ? this.game.dom.texts.best : this.game.dom.texts.complete; + + if ( text.querySelector( 'span i' ) === null ) + text.querySelectorAll( 'span' ).forEach( span => this.splitLetters( span ) ); + + const letters = text.querySelectorAll( '.icon, i' ); + + this.flipLetters( best ? 'best' : 'complete', letters, show ); + + text.style.opacity = 1; + + const duration = this.durations[ best ? 'best' : 'complete' ]; + + if ( ! show ) setTimeout( () => this.game.dom.texts.timer.style.transform = '', duration ); + + setTimeout( () => this.activeTransitions--, duration ); + + } + + stats( show ) { + + if ( show ) this.game.scores.calcStats(); + + this.activeTransitions++; + + this.tweens.stats.forEach( tween => { tween.stop(); tween = null; } ); + + let tweenId = -1; + + const stats = this.game.dom.stats.querySelectorAll( '.stats' ); + const easing = show ? Easing.Power.Out( 2 ) : Easing.Power.In( 3 ); + + stats.forEach( ( stat, index ) => { + + const delay = index * ( show ? 80 : 60 ); + + this.tweens.stats[ tweenId++ ] = new Tween( { + delay: delay, + duration: 400, + easing: easing, + onUpdate: tween => { + + const translate = show ? ( 1 - tween.value ) * 2 : tween.value; + const opacity = show ? tween.value : ( 1 - tween.value ); + + stat.style.transform = `translate3d(0, ${translate}em, 0)`; + stat.style.opacity = opacity; + + } + } ); + + } ); + + this.durations.stats = 0; + + setTimeout( () => this.activeTransitions--, this.durations.stats ); + + } + + preferences( show ) { + + this.ranges( this.game.dom.prefs.querySelectorAll( '.range' ), 'prefs', show ); + + } + + theming( show ) { + + this.ranges( this.game.dom.theme.querySelectorAll( '.range' ), 'prefs', show ); + + } + + ranges( ranges, type, show ) { + + this.activeTransitions++; + + this.tweens[ type ].forEach( tween => { tween.stop(); tween = null; } ); + + const easing = show ? Easing.Power.Out(2) : Easing.Power.In(3); + + let tweenId = -1; + let listMax = 0; + + ranges.forEach( ( range, rangeIndex ) => { + + const label = range.querySelector( '.range__label' ); + const track = range.querySelector( '.range__track-line' ); + const handle = range.querySelector( '.range__handle' ); + const list = range.querySelectorAll( '.range__list div' ); + + const delay = rangeIndex * ( show ? 120 : 100 ); + + label.style.opacity = show ? 0 : 1; + track.style.opacity = show ? 0 : 1; + handle.style.opacity = show ? 0 : 1; + handle.style.pointerEvents = show ? 'all' : 'none'; + + this.tweens[ type ][ tweenId++ ] = new Tween( { + delay: show ? delay : delay, + duration: 400, + easing: easing, + onUpdate: tween => { + + const translate = show ? ( 1 - tween.value ) : tween.value; + const opacity = show ? tween.value : ( 1 - tween.value ); + + label.style.transform = `translate3d(0, ${translate}em, 0)`; + label.style.opacity = opacity; + + } + } ); + + this.tweens[ type ][ tweenId++ ] = new Tween( { + delay: show ? delay + 100 : delay, + duration: 400, + easing: easing, + onUpdate: tween => { + + const translate = show ? ( 1 - tween.value ) : tween.value; + const scale = show ? tween.value : ( 1 - tween.value ); + const opacity = scale; + + track.style.transform = `translate3d(0, ${translate}em, 0) scale3d(${scale}, 1, 1)`; + track.style.opacity = opacity; + + } + } ); + + this.tweens[ type ][ tweenId++ ] = new Tween( { + delay: show ? delay + 100 : delay, + duration: 400, + easing: easing, + onUpdate: tween => { + + const translate = show ? ( 1 - tween.value ) : tween.value; + const opacity = 1 - translate; + const scale = 0.5 + opacity * 0.5; + + handle.style.transform = `translate3d(0, ${translate}em, 0) scale3d(${scale}, ${scale}, ${scale})`; + handle.style.opacity = opacity; + + } + } ); + + list.forEach( ( listItem, labelIndex ) => { + + listItem.style.opacity = show ? 0 : 1; + + this.tweens[ type ][ tweenId++ ] = new Tween( { + delay: show ? delay + 200 + labelIndex * 50 : delay, + duration: 400, + easing: easing, + onUpdate: tween => { + + const translate = show ? ( 1 - tween.value ) : tween.value; + const opacity = show ? tween.value : ( 1 - tween.value ); + + listItem.style.transform = `translate3d(0, ${translate}em, 0)`; + listItem.style.opacity = opacity; + + } + } ); + + } ); + + listMax = list.length > listMax ? list.length - 1 : listMax; + + range.style.opacity = 1; + + } ); + + this.durations[ type ] = show + ? ( ( ranges.length - 1 ) * 100 ) + 200 + listMax * 50 + 400 + : ( ( ranges.length - 1 ) * 100 ) + 400; + + setTimeout( () => this.activeTransitions--, this.durations[ type ] ); + + } + + title( show ) { + + this.activeTransitions++; + + const title = this.game.dom.texts.title; + + if ( title.querySelector( 'span i' ) === null ) + title.querySelectorAll( 'span' ).forEach( span => this.splitLetters( span ) ); + + const letters = title.querySelectorAll( 'i' ); + + this.flipLetters( 'title', letters, show ); + + title.style.opacity = 1; + + const note = this.game.dom.texts.note; + + this.tweens.title[ letters.length ] = new Tween( { + target: note.style, + easing: Easing.Sine.InOut(), + duration: show ? 800 : 400, + yoyo: show ? true : null, + from: { opacity: show ? 0 : ( parseFloat( getComputedStyle( note ).opacity ) ) }, + to: { opacity: show ? 1 : 0 }, + } ); + + setTimeout( () => this.activeTransitions--, this.durations.title ); + + } + + timer( show ) { + + this.activeTransitions++; + + const timer = this.game.dom.texts.timer; + + timer.style.opacity = 0; + this.game.timer.convert(); + this.game.timer.setText(); + + this.splitLetters( timer ); + const letters = timer.querySelectorAll( 'i' ); + this.flipLetters( 'timer', letters, show ); + + timer.style.opacity = 1; + + setTimeout( () => this.activeTransitions--, this.durations.timer ); + + } + + splitLetters( element ) { + + const text = element.innerHTML; + + element.innerHTML = ''; + + text.split( '' ).forEach( letter => { + + const i = document.createElement( 'i' ); + + i.innerHTML = letter; + + element.appendChild( i ); + + } ); + + } + + flipLetters( type, letters, show ) { + + try { this.tweens[ type ].forEach( tween => tween.stop() ) } catch(e) {}; + + letters.forEach( ( letter, index ) => { + + letter.style.opacity = show ? 0 : 1; + + this.tweens[ type ][ index ] = new Tween( { + easing: Easing.Sine.Out(), + duration: show ? 800 : 400, + delay: index * 50, + onUpdate: tween => { + + const rotation = show ? ( 1 - tween.value ) * -80 : tween.value * 80; + + letter.style.transform = `rotate3d(0, 1, 0, ${rotation}deg)`; + letter.style.opacity = show ? tween.value : ( 1 - tween.value ); + + }, + } ); + + } ); + + this.durations[ type ] = ( letters.length - 1 ) * 50 + ( show ? 800 : 400 ); + + } + +} + +export { Transition }; diff --git a/public/the-cube-master/src/js/Tween.js b/public/the-cube-master/src/js/Tween.js new file mode 100644 index 0000000..4f67b2a --- /dev/null +++ b/public/the-cube-master/src/js/Tween.js @@ -0,0 +1,103 @@ +import { Animation } from './Animation.js'; +import { Easing } from './Easing.js'; + +class Tween extends Animation { + + constructor( options ) { + + super( false ); + + this.duration = options.duration || 500; + this.easing = options.easing || ( t => t ); + this.onUpdate = options.onUpdate || ( () => {} ); + this.onComplete = options.onComplete || ( () => {} ); + + this.delay = options.delay || false; + this.yoyo = options.yoyo ? false : null; + + this.progress = 0; + this.value = 0; + this.delta = 0; + + this.getFromTo( options ); + + if ( this.delay ) setTimeout( () => super.start(), this.delay ); + else super.start(); + + this.onUpdate( this ); + + } + + update( delta ) { + + const old = this.value * 1; + const direction = ( this.yoyo === true ) ? - 1 : 1; + + this.progress += ( delta / this.duration ) * direction; + + this.value = this.easing( this.progress ); + this.delta = this.value - old; + + if ( this.values !== null ) this.updateFromTo(); + + if ( this.yoyo !== null ) this.updateYoyo(); + else if ( this.progress <= 1 ) this.onUpdate( this ); + else { + + this.progress = 1; + this.value = 1; + this.onUpdate( this ); + this.onComplete( this ); + super.stop(); + + } + + } + + updateYoyo() { + + if ( this.progress > 1 || this.progress < 0 ) { + + this.value = this.progress = ( this.progress > 1 ) ? 1 : 0; + this.yoyo = ! this.yoyo; + + } + + this.onUpdate( this ) + + } + + updateFromTo() { + + this.values.forEach( key => { + + this.target[ key ] = this.from[ key ] + ( this.to[ key ] - this.from[ key ] ) * this.value; + + } ); + + } + + getFromTo( options ) { + + if ( ! options.target || ! options.to ) { + + this.values = null; + return; + + } + + this.target = options.target || null; + this.from = options.from || {}; + this.to = options.to || null; + this.values = []; + + if ( Object.keys( this.from ).length < 1 ) + Object.keys( this.to ).forEach( key => { this.from[ key ] = this.target[ key ]; } ); + + Object.keys( this.to ).forEach( key => { this.values.push( key ) } ); + + } + +} + +export { Tween, Easing }; diff --git a/public/the-cube-master/src/js/World.js b/public/the-cube-master/src/js/World.js new file mode 100644 index 0000000..99d47a8 --- /dev/null +++ b/public/the-cube-master/src/js/World.js @@ -0,0 +1,93 @@ +import { Animation } from './Animation.js'; + +class World extends Animation { + + constructor( game ) { + + super( true ); + + this.game = game; + + this.container = this.game.dom.game; + this.scene = new THREE.Scene(); + + this.renderer = new THREE.WebGLRenderer( { antialias: true, alpha: true } ); + this.renderer.setPixelRatio( window.devicePixelRatio ); + this.container.appendChild( this.renderer.domElement ); + + this.camera = new THREE.PerspectiveCamera( 2, 1, 0.1, 10000 ); + + this.stage = { width: 2, height: 3 }; + this.fov = 10; + + this.createLights(); + + this.onResize = []; + + this.resize(); + window.addEventListener( 'resize', () => this.resize(), false ); + + } + + update() { + + this.renderer.render( this.scene, this.camera ); + + } + + resize() { + + this.width = this.container.offsetWidth; + this.height = this.container.offsetHeight; + + this.renderer.setSize( this.width, this.height ); + + this.camera.fov = this.fov; + this.camera.aspect = this.width / this.height; + + const aspect = this.stage.width / this.stage.height; + const fovRad = this.fov * THREE.Math.DEG2RAD; + + let distance = ( aspect < this.camera.aspect ) + ? ( this.stage.height / 2 ) / Math.tan( fovRad / 2 ) + : ( this.stage.width / this.camera.aspect ) / ( 2 * Math.tan( fovRad / 2 ) ); + + distance *= 0.5; + + this.camera.position.set( distance, distance, distance); + this.camera.lookAt( this.scene.position ); + this.camera.updateProjectionMatrix(); + + const docFontSize = ( aspect < this.camera.aspect ) + ? ( this.height / 100 ) * aspect + : this.width / 100; + + document.documentElement.style.fontSize = docFontSize + 'px'; + + if ( this.onResize ) this.onResize.forEach( cb => cb() ); + + } + + createLights() { + + this.lights = { + holder: new THREE.Object3D, + ambient: new THREE.AmbientLight( 0xffffff, 0.69 ), + front: new THREE.DirectionalLight( 0xffffff, 0.36 ), + back: new THREE.DirectionalLight( 0xffffff, 0.19 ), + }; + + this.lights.front.position.set( 1.5, 5, 3 ); + this.lights.back.position.set( -1.5, -5, -3 ); + + this.lights.holder.add( this.lights.ambient ); + this.lights.holder.add( this.lights.front ); + this.lights.holder.add( this.lights.back ); + + this.scene.add( this.lights.holder ); + + } + +} + +export { World }; diff --git a/public/the-cube-master/src/js/plugins/RoundedBoxGeometry.js b/public/the-cube-master/src/js/plugins/RoundedBoxGeometry.js new file mode 100644 index 0000000..71f63f7 --- /dev/null +++ b/public/the-cube-master/src/js/plugins/RoundedBoxGeometry.js @@ -0,0 +1,467 @@ +function RoundedBoxGeometry( size, radius, radiusSegments ) { + + THREE.BufferGeometry.call( this ); + + this.type = 'RoundedBoxGeometry'; + + radiusSegments = ! isNaN( radiusSegments ) ? Math.max( 1, Math.floor( radiusSegments ) ) : 1; + + var width, height, depth; + + width = height = depth = size; + radius = size * radius; + + radius = Math.min( radius, Math.min( width, Math.min( height, Math.min( depth ) ) ) / 2 ); + + var edgeHalfWidth = width / 2 - radius; + var edgeHalfHeight = height / 2 - radius; + var edgeHalfDepth = depth / 2 - radius; + + this.parameters = { + width: width, + height: height, + depth: depth, + radius: radius, + radiusSegments: radiusSegments + }; + + var rs1 = radiusSegments + 1; + var totalVertexCount = ( rs1 * radiusSegments + 1 ) << 3; + + var positions = new THREE.BufferAttribute( new Float32Array( totalVertexCount * 3 ), 3 ); + var normals = new THREE.BufferAttribute( new Float32Array( totalVertexCount * 3 ), 3 ); + + var + cornerVerts = [], + cornerNormals = [], + normal = new THREE.Vector3(), + vertex = new THREE.Vector3(), + vertexPool = [], + normalPool = [], + indices = [] + ; + + var + lastVertex = rs1 * radiusSegments, + cornerVertNumber = rs1 * radiusSegments + 1 + ; + + doVertices(); + doFaces(); + doCorners(); + doHeightEdges(); + doWidthEdges(); + doDepthEdges(); + + function doVertices() { + + var cornerLayout = [ + new THREE.Vector3( 1, 1, 1 ), + new THREE.Vector3( 1, 1, - 1 ), + new THREE.Vector3( - 1, 1, - 1 ), + new THREE.Vector3( - 1, 1, 1 ), + new THREE.Vector3( 1, - 1, 1 ), + new THREE.Vector3( 1, - 1, - 1 ), + new THREE.Vector3( - 1, - 1, - 1 ), + new THREE.Vector3( - 1, - 1, 1 ) + ]; + + for ( var j = 0; j < 8; j ++ ) { + + cornerVerts.push( [] ); + cornerNormals.push( [] ); + + } + + var PIhalf = Math.PI / 2; + var cornerOffset = new THREE.Vector3( edgeHalfWidth, edgeHalfHeight, edgeHalfDepth ); + + for ( var y = 0; y <= radiusSegments; y ++ ) { + + var v = y / radiusSegments; + var va = v * PIhalf; + var cosVa = Math.cos( va ); + var sinVa = Math.sin( va ); + + if ( y == radiusSegments ) { + + vertex.set( 0, 1, 0 ); + var vert = vertex.clone().multiplyScalar( radius ).add( cornerOffset ); + cornerVerts[ 0 ].push( vert ); + vertexPool.push( vert ); + var norm = vertex.clone(); + cornerNormals[ 0 ].push( norm ); + normalPool.push( norm ); + continue; + + } + + for ( var x = 0; x <= radiusSegments; x ++ ) { + + var u = x / radiusSegments; + var ha = u * PIhalf; + vertex.x = cosVa * Math.cos( ha ); + vertex.y = sinVa; + vertex.z = cosVa * Math.sin( ha ); + + var vert = vertex.clone().multiplyScalar( radius ).add( cornerOffset ); + cornerVerts[ 0 ].push( vert ); + vertexPool.push( vert ); + + var norm = vertex.clone().normalize(); + cornerNormals[ 0 ].push( norm ); + normalPool.push( norm ); + + } + + } + + for ( var i = 1; i < 8; i ++ ) { + + for ( var j = 0; j < cornerVerts[ 0 ].length; j ++ ) { + + var vert = cornerVerts[ 0 ][ j ].clone().multiply( cornerLayout[ i ] ); + cornerVerts[ i ].push( vert ); + vertexPool.push( vert ); + + var norm = cornerNormals[ 0 ][ j ].clone().multiply( cornerLayout[ i ] ); + cornerNormals[ i ].push( norm ); + normalPool.push( norm ); + + } + + } + + } + + function doCorners() { + + var indexInd = 0; + + var flips = [ + true, + false, + true, + false, + false, + true, + false, + true + ]; + + var lastRowOffset = rs1 * ( radiusSegments - 1 ); + + for ( var i = 0; i < 8; i ++ ) { + + var cornerOffset = cornerVertNumber * i; + + for ( var v = 0; v < radiusSegments - 1; v ++ ) { + + var r1 = v * rs1; + var r2 = ( v + 1 ) * rs1; + + for ( var u = 0; u < radiusSegments; u ++ ) { + + var u1 = u + 1; + var a = cornerOffset + r1 + u; + var b = cornerOffset + r1 + u1; + var c = cornerOffset + r2 + u; + var d = cornerOffset + r2 + u1; + + if ( ! flips[ i ] ) { + + indices.push( a ); + indices.push( b ); + indices.push( c ); + + indices.push( b ); + indices.push( d ); + indices.push( c ); + + } else { + + indices.push( a ); + indices.push( c ); + indices.push( b ); + + indices.push( b ); + indices.push( c ); + indices.push( d ); + + } + + } + + } + + for ( var u = 0; u < radiusSegments; u ++ ) { + + var a = cornerOffset + lastRowOffset + u; + var b = cornerOffset + lastRowOffset + u + 1; + var c = cornerOffset + lastVertex; + + if ( ! flips[ i ] ) { + + indices.push( a ); + indices.push( b ); + indices.push( c ); + + } else { + + indices.push( a ); + indices.push( c ); + indices.push( b ); + + } + + } + + } + + } + + function doFaces() { + + var a = lastVertex; + var b = lastVertex + cornerVertNumber; + var c = lastVertex + cornerVertNumber * 2; + var d = lastVertex + cornerVertNumber * 3; + + indices.push( a ); + indices.push( b ); + indices.push( c ); + indices.push( a ); + indices.push( c ); + indices.push( d ); + + a = lastVertex + cornerVertNumber * 4; + b = lastVertex + cornerVertNumber * 5; + c = lastVertex + cornerVertNumber * 6; + d = lastVertex + cornerVertNumber * 7; + + indices.push( a ); + indices.push( c ); + indices.push( b ); + indices.push( a ); + indices.push( d ); + indices.push( c ); + + a = 0; + b = cornerVertNumber; + c = cornerVertNumber * 4; + d = cornerVertNumber * 5; + + indices.push( a ); + indices.push( c ); + indices.push( b ); + indices.push( b ); + indices.push( c ); + indices.push( d ); + + a = cornerVertNumber * 2; + b = cornerVertNumber * 3; + c = cornerVertNumber * 6; + d = cornerVertNumber * 7; + + indices.push( a ); + indices.push( c ); + indices.push( b ); + indices.push( b ); + indices.push( c ); + indices.push( d ); + + a = radiusSegments; + b = radiusSegments + cornerVertNumber * 3; + c = radiusSegments + cornerVertNumber * 4; + d = radiusSegments + cornerVertNumber * 7; + + indices.push( a ); + indices.push( b ); + indices.push( c ); + indices.push( b ); + indices.push( d ); + indices.push( c ); + + a = radiusSegments + cornerVertNumber; + b = radiusSegments + cornerVertNumber * 2; + c = radiusSegments + cornerVertNumber * 5; + d = radiusSegments + cornerVertNumber * 6; + + indices.push( a ); + indices.push( c ); + indices.push( b ); + indices.push( b ); + indices.push( c ); + indices.push( d ); + + } + + function doHeightEdges() { + + for ( var i = 0; i < 4; i ++ ) { + + var cOffset = i * cornerVertNumber; + var cRowOffset = 4 * cornerVertNumber + cOffset; + var needsFlip = i & 1 === 1; + + for ( var u = 0; u < radiusSegments; u ++ ) { + + var u1 = u + 1; + var a = cOffset + u; + var b = cOffset + u1; + var c = cRowOffset + u; + var d = cRowOffset + u1; + + if ( ! needsFlip ) { + + indices.push( a ); + indices.push( b ); + indices.push( c ); + indices.push( b ); + indices.push( d ); + indices.push( c ); + + } else { + + indices.push( a ); + indices.push( c ); + indices.push( b ); + indices.push( b ); + indices.push( c ); + indices.push( d ); + + } + + } + + } + + } + + function doDepthEdges() { + + var cStarts = [ 0, 2, 4, 6 ]; + var cEnds = [ 1, 3, 5, 7 ]; + + for ( var i = 0; i < 4; i ++ ) { + + var cStart = cornerVertNumber * cStarts[ i ]; + var cEnd = cornerVertNumber * cEnds[ i ]; + + var needsFlip = 1 >= i; + + for ( var u = 0; u < radiusSegments; u ++ ) { + + var urs1 = u * rs1; + var u1rs1 = ( u + 1 ) * rs1; + + var a = cStart + urs1; + var b = cStart + u1rs1; + var c = cEnd + urs1; + var d = cEnd + u1rs1; + + if ( needsFlip ) { + + indices.push( a ); + indices.push( c ); + indices.push( b ); + indices.push( b ); + indices.push( c ); + indices.push( d ); + + } else { + + indices.push( a ); + indices.push( b ); + indices.push( c ); + indices.push( b ); + indices.push( d ); + indices.push( c ); + + } + + } + + } + + } + + function doWidthEdges() { + + var end = radiusSegments - 1; + + var cStarts = [ 0, 1, 4, 5 ]; + var cEnds = [ 3, 2, 7, 6 ]; + var needsFlip = [ 0, 1, 1, 0 ]; + + for ( var i = 0; i < 4; i ++ ) { + + var cStart = cStarts[ i ] * cornerVertNumber; + var cEnd = cEnds[ i ] * cornerVertNumber; + + for ( var u = 0; u <= end; u ++ ) { + + var a = cStart + radiusSegments + u * rs1; + var b = cStart + ( u != end ? radiusSegments + ( u + 1 ) * rs1 : cornerVertNumber - 1 ); + + var c = cEnd + radiusSegments + u * rs1; + var d = cEnd + ( u != end ? radiusSegments + ( u + 1 ) * rs1 : cornerVertNumber - 1 ); + + if ( ! needsFlip[ i ] ) { + + indices.push( a ); + indices.push( b ); + indices.push( c ); + indices.push( b ); + indices.push( d ); + indices.push( c ); + + } else { + + indices.push( a ); + indices.push( c ); + indices.push( b ); + indices.push( b ); + indices.push( c ); + indices.push( d ); + + } + + } + + } + + } + + var index = 0; + + for ( var i = 0; i < vertexPool.length; i ++ ) { + + positions.setXYZ( + index, + vertexPool[ i ].x, + vertexPool[ i ].y, + vertexPool[ i ].z + ); + + normals.setXYZ( + index, + normalPool[ i ].x, + normalPool[ i ].y, + normalPool[ i ].z + ); + + index ++; + + } + + this.setIndex( new THREE.BufferAttribute( new Uint16Array( indices ), 1 ) ); + this.addAttribute( 'position', positions ); + this.addAttribute( 'normal', normals ); + +} + +RoundedBoxGeometry.prototype = Object.create( THREE.BufferGeometry.prototype ); +RoundedBoxGeometry.constructor = RoundedBoxGeometry; + +export { RoundedBoxGeometry }; diff --git a/public/the-cube-master/src/js/plugins/RoundedPlaneGeometry.js b/public/the-cube-master/src/js/plugins/RoundedPlaneGeometry.js new file mode 100644 index 0000000..25766a8 --- /dev/null +++ b/public/the-cube-master/src/js/plugins/RoundedPlaneGeometry.js @@ -0,0 +1,30 @@ +function RoundedPlaneGeometry( size, radius, depth ) { + + var x, y, width, height; + + x = y = - size / 2; + width = height = size; + radius = size * radius; + + const shape = new THREE.Shape(); + + shape.moveTo( x, y + radius ); + shape.lineTo( x, y + height - radius ); + shape.quadraticCurveTo( x, y + height, x + radius, y + height ); + shape.lineTo( x + width - radius, y + height ); + shape.quadraticCurveTo( x + width, y + height, x + width, y + height - radius ); + shape.lineTo( x + width, y + radius ); + shape.quadraticCurveTo( x + width, y, x + width - radius, y ); + shape.lineTo( x + radius, y ); + shape.quadraticCurveTo( x, y, x, y + radius ); + + const geometry = new THREE.ExtrudeBufferGeometry( + shape, + { depth: depth, bevelEnabled: false, curveSegments: 3 } + ); + + return geometry; + +} + +export { RoundedPlaneGeometry }; diff --git a/public/the-cube-master/src/scss/.libsass.json b/public/the-cube-master/src/scss/.libsass.json new file mode 100644 index 0000000..65dc430 --- /dev/null +++ b/public/the-cube-master/src/scss/.libsass.json @@ -0,0 +1,16 @@ +{ + "output": { + "dir": "../../assets/css/", + "structure": "nested" + }, + "compile": { + "style": "compressed", + "line-numbers": false, + "line-comments": false, + "load-path": false, + "plugin-path": false, + "sourcemap": false, + "omit-map-comment": false, + "precision": false + } +} diff --git a/public/the-cube-master/src/scss/components/_btn.sass b/public/the-cube-master/src/scss/components/_btn.sass new file mode 100644 index 0000000..322298c --- /dev/null +++ b/public/the-cube-master/src/scss/components/_btn.sass @@ -0,0 +1,46 @@ +.btn + -webkit-appearance: none + -moz-appearance: none + appearance: none + background-color: transparent + border-radius: 0 + border-width: 0 + position: absolute + pointer-events: none + font-size: 1.2em + color: rgba(#000, 0.25) + opacity: 0 + + &:after + position: absolute + content: '' + width: 3em + height: 3em + left: 50% + top: 50% + margin-left: -1.5em + margin-top: -1.5em + border-radius: 100% + + &--tr + top: 0.8em + right: 0.8em + + &--tl + top: 0.8em + left: 0.8em + + &--bl + bottom: 0.8em + left: 0.8em + + &--br + bottom: 0.8em + right: 0.8em + + &--bc + bottom: 0.8em + left: calc(50% - 0.5em) + + svg + display: block \ No newline at end of file diff --git a/public/the-cube-master/src/scss/components/_document.sass b/public/the-cube-master/src/scss/components/_document.sass new file mode 100644 index 0000000..fbb801b --- /dev/null +++ b/public/the-cube-master/src/scss/components/_document.sass @@ -0,0 +1,40 @@ +* + &, + &:before, + &:after + -webkit-user-select: none + -moz-user-select: none + user-select: none + box-sizing: border-box + cursor: inherit + margin: 0 + padding: 0 + outline: none + font-size: inherit + font-family: inherit + font-weight: inherit + font-style: inherit + text-transform: uppercase + + &:focus + outline: none + +html + -webkit-tap-highlight-color: transparent + -webkit-text-size-adjust: 100% + -webkit-font-smoothing: antialiased + -moz-osx-font-smoothing: grayscale + -ms-text-size-adjust: 100% + -webkit-text-size-adjust: 100% + overflow: hidden + height: 100% + +body + font-family: 'BungeeFont', sans-serif + font-weight: normal + font-style: normal + line-height: 1 + cursor: default + overflow: hidden + height: 100% + font-size: 5rem diff --git a/public/the-cube-master/src/scss/components/_icon.sass b/public/the-cube-master/src/scss/components/_icon.sass new file mode 100644 index 0000000..b884e95 --- /dev/null +++ b/public/the-cube-master/src/scss/components/_icon.sass @@ -0,0 +1,6 @@ +.icon + display: inline-block + font-size: inherit + overflow: visible + vertical-align: -0.125em + preserveAspectRatio: none \ No newline at end of file diff --git a/public/the-cube-master/src/scss/components/_range.sass b/public/the-cube-master/src/scss/components/_range.sass new file mode 100644 index 0000000..83e922c --- /dev/null +++ b/public/the-cube-master/src/scss/components/_range.sass @@ -0,0 +1,137 @@ +.range + position: relative + width: 14em + z-index: 1 + opacity: 0 + + &:not(:last-child) + margin-bottom: 2em + + &__label + position: relative + font-size: 0.9em + line-height: 0.75em + padding-bottom: 0.5em + z-index: 2 + + &__track + position: relative + height: 1em + margin-left: 0.5em + margin-right: 0.5em + z-index: 3 + + &-line + position: absolute + background: rgba(#000, 0.2) + height: 2px + top: 50% + margin-top: -1px + left: -0.5em + right: -0.5em + transform-origin: left center + + &__handle + position: absolute + width: 0 + height: 0 + top: 50% + left: 0 + cursor: pointer + z-index: 1 + + div + transition: background 500ms ease + position: absolute + left: 0 + top: 0 + width: 0.9em + height: 0.9em + border-radius: 0.2em + margin-left: -0.45em + margin-top: -0.45em + background: #41aac8 + border-bottom: 2px solid rgba(#000, 0.2) + + .range.is-active & + transform: scale(1.25) + + &:after + content: '' + position: absolute + left: 0 + top: 0 + width: 3em + height: 3em + margin-left: -1.5em + margin-top: -1.5em + + &__list + display: flex + flex-flow: row nowrap + justify-content: space-between + position: relative + padding-top: 0.5em + font-size: 0.55em + color: rgba(#000, 0.5) + z-index: 1 + + &--type + &-color + &:not(:last-child) + margin-bottom: 1em + + .range + &__list + display: none + + &__handle + > div + background: currentColor !important + + &__track + &-line + background: transparent + + &:after + +inset + content: '' + opacity: 0.5 + + &--color + &-hue + .range + &__handle + color: red + + &__track + color: red + + &-line + &:after + background: linear-gradient(to right, red, yellow, lime, cyan, blue, magenta, red) + + + &-saturation + .range + &__handle + color: red + + &__track + color: red + + &-line + &:after + background: linear-gradient(to right, gray, currentColor) + + &-lightness + .range + &__handle + color: red + + &__track + color: red + + &-line + &:after + background: linear-gradient(to right, black, currentColor, white) diff --git a/public/the-cube-master/src/scss/components/_stats.sass b/public/the-cube-master/src/scss/components/_stats.sass new file mode 100644 index 0000000..0804c3e --- /dev/null +++ b/public/the-cube-master/src/scss/components/_stats.sass @@ -0,0 +1,26 @@ +.stats + position: relative + width: 14em + z-index: 1 + display: flex + justify-content: space-between + opacity: 0 + + &:not(:last-child) + margin-bottom: 1.5em + + > i + display: block + color: rgba(#000, 0.5) + font-size: 0.9em + + > b + display: block + font-size: 0.9em + + > i + font-size: 0.75em + + &[name="worst-time"] + display: none + diff --git a/public/the-cube-master/src/scss/components/_text.sass b/public/the-cube-master/src/scss/components/_text.sass new file mode 100644 index 0000000..f028d5a --- /dev/null +++ b/public/the-cube-master/src/scss/components/_text.sass @@ -0,0 +1,40 @@ +.text + position: absolute + left: 0 + right: 0 + text-align: center + line-height: 0.75 + perspective: 100rem + opacity: 0 + + i + display: inline-block + opacity: 0 + white-space: pre-wrap + + &--title + bottom: 75% + font-size: 4.4em + height: 1.2em + + span + display: block + + &:first-child + font-size: 0.5em + margin-bottom: 0.2em + + &--note + top: 87% + font-size: 1em + + &--timer + bottom: 78% + font-size: 3.5em + line-height: 1 + + &--complete, + &--best-time + font-size: 1.5em + top: 83% + line-height: 1em \ No newline at end of file diff --git a/public/the-cube-master/src/scss/components/_ui.sass b/public/the-cube-master/src/scss/components/_ui.sass new file mode 100644 index 0000000..3a1f771 --- /dev/null +++ b/public/the-cube-master/src/scss/components/_ui.sass @@ -0,0 +1,52 @@ +.ui + pointer-events: none + color: #070d15 + + &, + &__background, + &__game, + &__texts, + &__prefs, + &__theme, + &__stats, + &__buttons + +inset + overflow: hidden + + &__background + z-index: 1 + transition: background 500ms ease + background: #d1d5db + + &:after + +inset + content: '' + background-image: linear-gradient(to bottom, rgba(#fff, 1) 50%, rgba(#fff, 0) 100%) + + &__game + pointer-events: all + z-index: 2 + + canvas + display: block + width: 100% + height: 100% + + &__texts + z-index: 3 + + &__prefs, + &__stats, + &__theme + display: flex + flex-flow: column nowrap + justify-content: center + align-items: center + overflow: hidden + z-index: 4 + + &__theme + padding-top: 15em + + &__buttons + z-index: 5 \ No newline at end of file diff --git a/public/the-cube-master/src/scss/fonts/_bungee.scss b/public/the-cube-master/src/scss/fonts/_bungee.scss new file mode 100644 index 0000000..dc86ea3 --- /dev/null +++ b/public/the-cube-master/src/scss/fonts/_bungee.scss @@ -0,0 +1,7 @@ +@font-face { + font-family: 'BungeeFont'; + font-weight: normal; + font-style: normal; + src: url('data:font/truetype;charset=utf-8;base64,d09GMgABAAAAACZQABIAAAAAbvQAACXoAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGh4byGIcgW4GYACDGghQCYRlEQgK7wjfAAuBRgABNgIkA4MIBCAFjGMHgw8MgjEb5WQV7NgLbgekMv6v8igENg5QCMa7I6pI6dn/H4+TI6pRucF/LYhNhovYtD4Krf6ybd4KjulSyDi2HjZEfrfyKtpdSpVGjIdn5NaN1SqtTduTgy2PuDLWjMCudfVcZNajE5NFViltnAyHDz5aQY/9KIf/iFKqiMiiy08NsWuNHaGxT3Kteqdfj2SUbAVpQ6QQooGSPMtAr3zE4COgr+M/Jp5/2u9/a8+dM9+c7JVIKJ5JGs0Sv0L9DSmN5KGYlEYlauL9wG/zn5W+IdY1EYl7dRyxAcHqOezADJa6+fdsjIo/de33u7JquDUr3ZpF9eZsy6Vv3n5Ii9EzmqragVH4fHPlZDGbveSSWYJscsdzRCkA6SrTVyPOqPr/Z1K0IGxVdd+bIh+ss5TyEAfykDerbO2vckwXma0Bn+NTRGUWtcrFcmqzqMFDTVWjEHrYb3gKFhFENBhGXzEslLDWl+NC+g9Ut6YZE8IiUOrBXKWTfCLj54mMxydSfp5IeVw+D5fD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a8hBOf2DfusG8RrgcLNkrwiGUOtIlvJm8PXfC38qNxn30unmmNy3v5tm2J4W26i5I8+Rg79GxbNPkacEf5cBfPbbjis6x7t0f/MNKy4ZNpL8smZok8mRER2M9tCaaDsJNlfdveyyL0gKSN0rzlLE+aCzRRkY4GVBHFYYl7U1HiOH6TrE9ew+pR6Jkv7p2lx6tVtKF9uHLAenyYBzcjZhFykGGLE1mqGDXHKfcm1F1Xo2+GjIjq1ob5IRtfP641NJ8NplopB5seLOMosZMfSXNijDOlk9FkVOTHyHvyXP4RZSHU7Cks2UA5jnnNnspATF5NXjGVz+3FE/Nnz49Zi7gxGcUbNB9n5EKHRj4lMHNn4DKRKseeomw+n837eXF+SBspb52AwSNg10uVNy/iqmScxhzjFd1dGSxMbtfyPXbzl7uCHMYoO8+Xxo9VaL2gDxZk5LGq64dZLqdwzxHHRf2cPG6SGyMdMs6L7kN7mE2fOUsRyc4oL+uU5u9oiCIlR1uYr2Y96SUk259FGb2MNT3Wez1T98e5OMy7vonNSIcdxlOF/C2KOdSWN/cm8VVV+5rid4kCe+WX0xRxblVcqPRk+XgobR+TX5nP+ul8VpEGIkOf+TYydkYmOnCTxXQSHS9RnZ7QOmp3Z3139cgdOqYTvGtoLdMmNbl/ld4P/3eFnzv6N8wn7XJGaQvtbTrgvJJ6dukG3pvUoT30HtIR3aLb1OU8W9XnhP9v5SN+Q9xvoHeTx9Zon2uH2H2dLgGnS9iP6AO8Xeyqnts4zy0NS51aYahOs6L7Vjh/ujzbb0W/W9jtPWrg7BeB9RX0XKuMe5hR3OC3BjrWURRllzXsGk7QAjZt0LAB+Dto75H6b6AjnHqTTnHmbfqYPgc1VQayS9/TUzr+H7peH0IAAAAAAQAAAADV7UW4AAAAANLWvmEAAAAA2AKNFg==') format('woff'); +} diff --git a/public/the-cube-master/src/scss/mixins/_inset.sass b/public/the-cube-master/src/scss/mixins/_inset.sass new file mode 100644 index 0000000..d36f645 --- /dev/null +++ b/public/the-cube-master/src/scss/mixins/_inset.sass @@ -0,0 +1,6 @@ +=inset($position: absolute) + position: $position + top: 0 + left: 0 + right: 0 + bottom: 0 diff --git a/public/the-cube-master/src/scss/styles.sass b/public/the-cube-master/src/scss/styles.sass new file mode 100644 index 0000000..35719dc --- /dev/null +++ b/public/the-cube-master/src/scss/styles.sass @@ -0,0 +1,13 @@ +@import "fonts/bungee" + +@import "variables/easings" + +@import "mixins/inset" + +@import "components/document" +@import "components/icon" +@import "components/range" +@import "components/stats" +@import "components/text" +@import "components/btn" +@import "components/ui" diff --git a/public/the-cube-master/src/scss/variables/_easings.sass b/public/the-cube-master/src/scss/variables/_easings.sass new file mode 100644 index 0000000..fd84dd2 --- /dev/null +++ b/public/the-cube-master/src/scss/variables/_easings.sass @@ -0,0 +1,31 @@ +$easeInSine: cubic-bezier(0.47, 0, 0.745, 0.715) +$easeOutSine: cubic-bezier(0.39, 0.575, 0.565, 1) +$easeInOutSine: cubic-bezier(0.39, 0.575, 0.565, 1) + +$easeInQuad: cubic-bezier(0.55, 0.085, 0.68, 0.53) +$easeOutQuad: cubic-bezier(0.25, 0.46, 0.45, 0.94) +$easeInOutQuad: cubic-bezier(0.25, 0.46, 0.45, 0.94) + +$easeInCubic: cubic-bezier(0.55, 0.055, 0.675, 0.19) +$easeOutCubic: cubic-bezier(0.215, 0.61, 0.355, 1) +$easeInOutCubic: cubic-bezier(0.215, 0.61, 0.355, 1) + +$easeInQuart: cubic-bezier(0.895, 0.03, 0.685, 0.22) +$easeOutQuart: cubic-bezier(0.165, 0.84, 0.44, 1) +$easeInOutQuart: cubic-bezier(0.165, 0.84, 0.44, 1) + +$easeInQuint: cubic-bezier(0.755, 0.05, 0.855, 0.06) +$easeOutQuint: cubic-bezier(0.23, 1, 0.32, 1) +$easeInOutQuint: cubic-bezier(0.23, 1, 0.32, 1) + +$easeInExpo: cubic-bezier(0.95, 0.05, 0.795, 0.035) +$easeOutExpo: cubic-bezier(0.19, 1, 0.22, 1) +$easeInOutExpo: cubic-bezier(0.19, 1, 0.22, 1) + +$easeInCirc: cubic-bezier(0.6, 0.04, 0.98, 0.335) +$easeOutCirc: cubic-bezier(0.075, 0.82, 0.165, 1) +$easeInOutCirc: cubic-bezier(0.075, 0.82, 0.165, 1) + +$easeInBack: cubic-bezier(0.6, -0.28, 0.735, 0.045) +$easeOutBack: cubic-bezier(0.175, 0.885, 0.32, 1.275) +$easeInOutBack: cubic-bezier(0.68, -0.55, 0.265, 1.55) \ No newline at end of file diff --git a/public/the-cube-master/upup.min.js b/public/the-cube-master/upup.min.js new file mode 100755 index 0000000..65c99fe --- /dev/null +++ b/public/the-cube-master/upup.min.js @@ -0,0 +1,7 @@ +//! UpUp +//! version : 1.0.0 +//! author : Tal Ater @TalAter +//! license : MIT +//! https://github.com/TalAter/UpUp +(function(e){"use strict";var t=navigator.serviceWorker;if(!t)return this.UpUp=null,e;var n={"service-worker-url":"upup.sw.min.js"},r=!1,s="font-weight: bold; color: #00f;";this.UpUp={start:function(e){this.addSettings(e),t.register(n["service-worker-url"],{scope:"./"}).then(function(e){r&&console.log("Service worker registration successful with scope: %c"+e.scope,s);(e.installing||t.controller||e.active).postMessage({action:"set-settings",settings:n})}).catch(function(e){r&&console.log("Service worker registration failed: %c"+e,s)})},addSettings:function(t){"string"==typeof(t=t||{})&&(t={content:t}),["content","content-url","assets","service-worker-url","cache-version"].forEach(function(r){t[r]!==e&&(n[r]=t[r])})},debug:function(e){r=!(arguments.length>0)||!!e}}}).call(this); +//# sourceMappingURL=upup.min.js.map \ No newline at end of file diff --git a/public/the-cube-master/upup.sw.min.js b/public/the-cube-master/upup.sw.min.js new file mode 100755 index 0000000..93ece9e --- /dev/null +++ b/public/the-cube-master/upup.sw.min.js @@ -0,0 +1,7 @@ +//! UpUp Service Worker +//! version : 1.0.0 +//! author : Tal Ater @TalAter +//! license : MIT +//! https://github.com/TalAter/UpUp +var _CACHE_NAME_PREFIX="upup-cache",_calculateHash=function(e){var t,n=0,s=(e=e.toString()).length;if(0===s)return n;for(t=0;t { + +
{ + const currentPath = window.location.pathname + const basePath = currentPath.split('/game')[0] + router.push(`${basePath}/game/the-cube`) + }} + > +
+ The Cube + +
+ The Cube +
+
+ +
+
اجرا کنید
+ +
+ +
) diff --git a/src/app/[name]/(Dialogs)/game/the-cube/page.tsx b/src/app/[name]/(Dialogs)/game/the-cube/page.tsx new file mode 100644 index 0000000..7f51425 --- /dev/null +++ b/src/app/[name]/(Dialogs)/game/the-cube/page.tsx @@ -0,0 +1,29 @@ +'use client' +import { type FC } from 'react' +import { useRouter } from 'next/navigation' +import { CloseCircle } from 'iconsax-react' + +const TheCubePage: FC = () => { + const router = useRouter() + + return ( +
+ +