Full Code of Faboolea/shaders-on-scroll for AI

master 02a0b9e9e335 cached
17 files
610.7 KB
205.4k tokens
1511 symbols
1 requests
Download .txt
Showing preview only (629K chars total). Download the full file or copy to clipboard to get everything.
Repository: Faboolea/shaders-on-scroll
Branch: master
Commit: 02a0b9e9e335
Files: 17
Total size: 610.7 KB

Directory structure:
gitextract_ezpogxoj/

├── .gitignore
├── LICENSE
├── README.md
├── dist/
│   ├── index.33763982.js
│   ├── index.47c52c93.css
│   ├── index.9fc08b13.css
│   └── index.html
├── package.json
└── src/
    ├── app/
    │   ├── Animations.js
    │   ├── SmoothScroll.js
    │   ├── index.js
    │   └── shaders/
    │       ├── fragment.glsl
    │       └── vertex.glsl
    ├── index.html
    ├── shaders-on-scroll.pug
    └── styles/
        ├── base.css
        └── shaders-on-scroll.sass

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
/node_modules
/.cache
/.parcel-cache
package-lock.json


================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2009 - 2020 [Codrops](https://tympanus.net/codrops)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: README.md
================================================
# Rock the Stage with a Smooth WebGL Shader Transformation on Scroll

A handy setup to create a smooth scroll based GLSL animation using Three.js and GSAP.

![Shaders on Scroll](https://tympanus.net/codrops/wp-content/uploads/2021/07/ShadersOnScroll_Faboolea3.jpg)

[Article on Codrops](https://tympanus.net/codrops/?p=55223)

[Demo](http://tympanus.net/Tutorials/ShadersOnScroll/)


## Installation

Install dependencies:

```
npm install
```

Compile the code for development and start a local server:

```
npm start
```

Create the build:

```
npm run build
```

## Misc

Follow Codrops: [Twitter](http://www.twitter.com/codrops), [Facebook](http://www.facebook.com/codrops), [GitHub](https://github.com/codrops), [Instagram](https://www.instagram.com/codropsss/)

## License
[MIT](LICENSE)

Made with :blue_heart:  by [Codrops](http://www.codrops.com)


================================================
FILE: dist/index.33763982.js
================================================
!function(){function t(t){return t&&t.__esModule?t.default:t}
/**
  * @license
  * Copyright 2010-2021 Three.js Authors
  * SPDX-License-Identifier: MIT
  */const e=100,n=301,i=302,r=306,s=307,a=1e3,o=1001,l=1002,c=1003,h=1004,u=1005,d=1006,p=1008,f=1009,m=1012,g=1014,v=1015,y=1016,_=1020,x=1022,w=1023,b=1026,M=1027,S=2300,T=2301,E=2302,A=2400,L=2401,R=2402,C=2500,P=3e3,D=3001,I=3007,N=3002,z=7680,O=35044,B=35048,F="300 es";class H{addEventListener(t,e){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)}hasEventListener(t,e){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)}removeEventListener(t,e){if(void 0===this._listeners)return;const n=this._listeners[t];if(void 0!==n){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}dispatchEvent(t){if(void 0===this._listeners)return;const e=this._listeners[t.type];if(void 0!==e){t.target=this;const n=e.slice(0);for(let e=0,i=n.length;e<i;e++)n[e].call(this,t);t.target=null}}}const U=[];for(let t=0;t<256;t++)U[t]=(t<16?"0":"")+t.toString(16);const k=Math.PI/180,G=180/Math.PI;function V(){const t=4294967295*Math.random()|0,e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(U[255&t]+U[t>>8&255]+U[t>>16&255]+U[t>>24&255]+"-"+U[255&e]+U[e>>8&255]+"-"+U[e>>16&15|64]+U[e>>24&255]+"-"+U[63&n|128]+U[n>>8&255]+"-"+U[n>>16&255]+U[n>>24&255]+U[255&i]+U[i>>8&255]+U[i>>16&255]+U[i>>24&255]).toUpperCase()}function W(t,e,n){return Math.max(e,Math.min(n,t))}function j(t,e){return(t%e+e)%e}function q(t,e,n){return(1-n)*t+n*e}function X(t){return 0==(t&t-1)&&0!==t}function Y(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}class Z{constructor(t=0,e=0){this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t,e){return void 0!==e?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t,e){return void 0!==e?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,n=this.y,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const n=Math.cos(e),i=Math.sin(e),r=this.x-t.x,s=this.y-t.y;return this.x=r*n-s*i+t.x,this.y=r*i+s*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}}Z.prototype.isVector2=!0;class J{constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(t,e,n,i,r,s,a,o,l){const c=this.elements;return c[0]=t,c[1]=i,c[2]=a,c[3]=e,c[4]=r,c[5]=o,c[6]=n,c[7]=s,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const n=t.elements,i=e.elements,r=this.elements,s=n[0],a=n[3],o=n[6],l=n[1],c=n[4],h=n[7],u=n[2],d=n[5],p=n[8],f=i[0],m=i[3],g=i[6],v=i[1],y=i[4],_=i[7],x=i[2],w=i[5],b=i[8];return r[0]=s*f+a*v+o*x,r[3]=s*m+a*y+o*w,r[6]=s*g+a*_+o*b,r[1]=l*f+c*v+h*x,r[4]=l*m+c*y+h*w,r[7]=l*g+c*_+h*b,r[2]=u*f+d*v+p*x,r[5]=u*m+d*y+p*w,r[8]=u*g+d*_+p*b,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],l=t[7],c=t[8];return e*s*c-e*a*l-n*r*c+n*a*o+i*r*l-i*s*o}invert(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],l=t[7],c=t[8],h=c*s-a*l,u=a*o-c*r,d=l*r-s*o,p=e*h+n*u+i*d;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);const f=1/p;return t[0]=h*f,t[1]=(i*l-c*n)*f,t[2]=(a*n-i*s)*f,t[3]=u*f,t[4]=(c*e-i*o)*f,t[5]=(i*r-a*e)*f,t[6]=d*f,t[7]=(n*o-l*e)*f,t[8]=(s*e-n*r)*f,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,n,i,r,s,a){const o=Math.cos(r),l=Math.sin(r);return this.set(n*o,n*l,-n*(o*s+l*a)+s+t,-i*l,i*o,-i*(-l*s+o*a)+a+e,0,0,1),this}scale(t,e){const n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this}rotate(t){const e=Math.cos(t),n=Math.sin(t),i=this.elements,r=i[0],s=i[3],a=i[6],o=i[1],l=i[4],c=i[7];return i[0]=e*r+n*o,i[3]=e*s+n*l,i[6]=e*a+n*c,i[1]=-n*r+e*o,i[4]=-n*s+e*l,i[7]=-n*a+e*c,this}translate(t,e){const n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this}equals(t){const e=this.elements,n=t.elements;for(let t=0;t<9;t++)if(e[t]!==n[t])return!1;return!0}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}clone(){return(new this.constructor).fromArray(this.elements)}}let Q;J.prototype.isMatrix3=!0;class K{static getDataURL(t){if(/^data:/i.test(t.src))return t.src;if("undefined"==typeof HTMLCanvasElement)return t.src;let e;if(t instanceof HTMLCanvasElement)e=t;else{void 0===Q&&(Q=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),Q.width=t.width,Q.height=t.height;const n=Q.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=Q}return e.width>2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}}let $=0;class tt extends H{constructor(t=tt.DEFAULT_IMAGE,e=tt.DEFAULT_MAPPING,n=1001,i=1001,r=1006,s=1008,a=1023,o=1009,l=1,c=3e3){super(),Object.defineProperty(this,"id",{value:$++}),this.uuid=V(),this.name="",this.image=t,this.mipmaps=[],this.mapping=e,this.wrapS=n,this.wrapT=i,this.magFilter=r,this.minFilter=s,this.anisotropy=l,this.format=a,this.internalFormat=null,this.type=o,this.offset=new Z(0,0),this.repeat=new Z(1,1),this.center=new Z(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new J,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=c,this.version=0,this.onUpdate=null}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this}toJSON(t){const e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];const n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){const i=this.image;if(void 0===i.uuid&&(i.uuid=V()),!e&&void 0===t.images[i.uuid]){let e;if(Array.isArray(i)){e=[];for(let t=0,n=i.length;t<n;t++)i[t].isDataTexture?e.push(et(i[t].image)):e.push(et(i[t]))}else e=et(i);t.images[i.uuid]={uuid:i.uuid,url:e}}n.image=i.uuid}return e||(t.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(300!==this.mapping)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case a:t.x=t.x-Math.floor(t.x);break;case o:t.x=t.x<0?0:1;break;case l:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case a:t.y=t.y-Math.floor(t.y);break;case o:t.y=t.y<0?0:1;break;case l:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){!0===t&&this.version++}}function et(t){return"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?K.getDataURL(t):t.data?{data:Array.prototype.slice.call(t.data),width:t.width,height:t.height,type:t.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}tt.DEFAULT_IMAGE=void 0,tt.DEFAULT_MAPPING=300,tt.prototype.isTexture=!0;class nt{constructor(t=0,e=0,n=0,i=1){this.x=t,this.y=e,this.z=n,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,n,i){return this.x=t,this.y=e,this.z=n,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this}add(t,e){return void 0!==e?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t,e){return void 0!==e?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=this.w,s=t.elements;return this.x=s[0]*e+s[4]*n+s[8]*i+s[12]*r,this.y=s[1]*e+s[5]*n+s[9]*i+s[13]*r,this.z=s[2]*e+s[6]*n+s[10]*i+s[14]*r,this.w=s[3]*e+s[7]*n+s[11]*i+s[15]*r,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,n,i,r;const s=.01,a=.1,o=t.elements,l=o[0],c=o[4],h=o[8],u=o[1],d=o[5],p=o[9],f=o[2],m=o[6],g=o[10];if(Math.abs(c-u)<s&&Math.abs(h-f)<s&&Math.abs(p-m)<s){if(Math.abs(c+u)<a&&Math.abs(h+f)<a&&Math.abs(p+m)<a&&Math.abs(l+d+g-3)<a)return this.set(1,0,0,0),this;e=Math.PI;const t=(l+1)/2,o=(d+1)/2,v=(g+1)/2,y=(c+u)/4,_=(h+f)/4,x=(p+m)/4;return t>o&&t>v?t<s?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(t),i=y/n,r=_/n):o>v?o<s?(n=.707106781,i=0,r=.707106781):(i=Math.sqrt(o),n=y/i,r=x/i):v<s?(n=.707106781,i=.707106781,r=0):(r=Math.sqrt(v),n=_/r,i=x/r),this.set(n,i,r,e),this}let v=Math.sqrt((m-p)*(m-p)+(h-f)*(h-f)+(u-c)*(u-c));return Math.abs(v)<.001&&(v=1),this.x=(m-p)/v,this.y=(h-f)/v,this.z=(u-c)/v,this.w=Math.acos((l+d+g-1)/2),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this.w=Math.max(t,Math.min(e,this.w)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this.w=t.w+(e.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}}nt.prototype.isVector4=!0;class it extends H{constructor(t,e,n){super(),this.width=t,this.height=e,this.depth=1,this.scissor=new nt(0,0,t,e),this.scissorTest=!1,this.viewport=new nt(0,0,t,e),n=n||{},this.texture=new tt(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.image={},this.texture.image.width=t,this.texture.image.height=e,this.texture.image.depth=1,this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:d,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0!==n.stencilBuffer&&n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}setTexture(t){t.image={width:this.width,height:this.height,depth:this.depth},this.texture=t}setSize(t,e,n=1){this.width===t&&this.height===e&&this.depth===n||(this.width=t,this.height=e,this.depth=n,this.texture.image.width=t,this.texture.image.height=e,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)}clone(){return(new this.constructor).copy(this)}copy(t){return this.width=t.width,this.height=t.height,this.depth=t.depth,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.texture.image={...this.texture.image},this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}}it.prototype.isWebGLRenderTarget=!0;(class extends it{constructor(t,e,n){super(t,e);const i=this.texture;this.texture=[];for(let t=0;t<n;t++)this.texture[t]=i.clone()}setSize(t,e,n=1){if(this.width!==t||this.height!==e||this.depth!==n){this.width=t,this.height=e,this.depth=n;for(let i=0,r=this.texture.length;i<r;i++)this.texture[i].image.width=t,this.texture[i].image.height=e,this.texture[i].image.depth=n;this.dispose()}return this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e),this}copy(t){this.dispose(),this.width=t.width,this.height=t.height,this.depth=t.depth,this.viewport.set(0,0,this.width,this.height),this.scissor.set(0,0,this.width,this.height),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this.texture.length=0;for(let e=0,n=t.texture.length;e<n;e++)this.texture[e]=t.texture[e].clone();return this}}).prototype.isWebGLMultipleRenderTargets=!0;(class extends it{constructor(t,e,n){super(t,e,n),this.samples=4}copy(t){return super.copy.call(this,t),this.samples=t.samples,this}}).prototype.isWebGLMultisampleRenderTarget=!0;class rt{constructor(t=0,e=0,n=0,i=1){this._x=t,this._y=e,this._z=n,this._w=i}static slerp(t,e,n,i){return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."),n.slerpQuaternions(t,e,i)}static slerpFlat(t,e,n,i,r,s,a){let o=n[i+0],l=n[i+1],c=n[i+2],h=n[i+3];const u=r[s+0],d=r[s+1],p=r[s+2],f=r[s+3];if(0===a)return t[e+0]=o,t[e+1]=l,t[e+2]=c,void(t[e+3]=h);if(1===a)return t[e+0]=u,t[e+1]=d,t[e+2]=p,void(t[e+3]=f);if(h!==f||o!==u||l!==d||c!==p){let t=1-a;const e=o*u+l*d+c*p+h*f,n=e>=0?1:-1,i=1-e*e;if(i>Number.EPSILON){const r=Math.sqrt(i),s=Math.atan2(r,e*n);t=Math.sin(t*s)/r,a=Math.sin(a*s)/r}const r=a*n;if(o=o*t+u*r,l=l*t+d*r,c=c*t+p*r,h=h*t+f*r,t===1-a){const t=1/Math.sqrt(o*o+l*l+c*c+h*h);o*=t,l*=t,c*=t,h*=t}}t[e]=o,t[e+1]=l,t[e+2]=c,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,i,r,s){const a=n[i],o=n[i+1],l=n[i+2],c=n[i+3],h=r[s],u=r[s+1],d=r[s+2],p=r[s+3];return t[e]=a*p+c*h+o*d-l*u,t[e+1]=o*p+c*u+l*h-a*d,t[e+2]=l*p+c*d+a*u-o*h,t[e+3]=c*p-a*h-o*u-l*d,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e){if(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");const n=t._x,i=t._y,r=t._z,s=t._order,a=Math.cos,o=Math.sin,l=a(n/2),c=a(i/2),h=a(r/2),u=o(n/2),d=o(i/2),p=o(r/2);switch(s){case"XYZ":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case"YXZ":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case"ZXY":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case"ZYX":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case"YZX":this._x=u*c*h+l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h-u*d*p;break;case"XZY":this._x=u*c*h-l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h+u*d*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return!1!==e&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,n=e[0],i=e[4],r=e[8],s=e[1],a=e[5],o=e[9],l=e[2],c=e[6],h=e[10],u=n+a+h;if(u>0){const t=.5/Math.sqrt(u+1);this._w=.25/t,this._x=(c-o)*t,this._y=(r-l)*t,this._z=(s-i)*t}else if(n>a&&n>h){const t=2*Math.sqrt(1+n-a-h);this._w=(c-o)/t,this._x=.25*t,this._y=(i+s)/t,this._z=(r+l)/t}else if(a>h){const t=2*Math.sqrt(1+a-n-h);this._w=(r-l)/t,this._x=(i+s)/t,this._y=.25*t,this._z=(o+c)/t}else{const t=2*Math.sqrt(1+h-n-a);this._w=(s-i)/t,this._x=(r+l)/t,this._y=(o+c)/t,this._z=.25*t}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(W(this.dot(t),-1,1)))}rotateTowards(t,e){const n=this.angleTo(t);if(0===n)return this;const i=Math.min(1,e/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t,e){return void 0!==e?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const n=t._x,i=t._y,r=t._z,s=t._w,a=e._x,o=e._y,l=e._z,c=e._w;return this._x=n*c+s*a+i*l-r*o,this._y=i*c+s*o+r*a-n*l,this._z=r*c+s*l+n*o-i*a,this._w=s*c-n*a-i*o-r*l,this._onChangeCallback(),this}slerp(t,e){if(0===e)return this;if(1===e)return this.copy(t);const n=this._x,i=this._y,r=this._z,s=this._w;let a=s*t._w+n*t._x+i*t._y+r*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=s,this._x=n,this._y=i,this._z=r,this;const o=1-a*a;if(o<=Number.EPSILON){const t=1-e;return this._w=t*s+e*this._w,this._x=t*n+e*this._x,this._y=t*i+e*this._y,this._z=t*r+e*this._z,this.normalize(),this._onChangeCallback(),this}const l=Math.sqrt(o),c=Math.atan2(l,a),h=Math.sin((1-e)*c)/l,u=Math.sin(e*c)/l;return this._w=s*h+this._w*u,this._x=n*h+this._x*u,this._y=i*h+this._y*u,this._z=r*h+this._z*u,this._onChangeCallback(),this}slerpQuaternions(t,e,n){this.copy(t).slerp(e,n)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}}rt.prototype.isQuaternion=!0;class st{constructor(t=0,e=0,n=0){this.x=t,this.y=e,this.z=n}set(t,e,n){return void 0===n&&(n=this.z),this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t,e){return void 0!==e?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t,e){return void 0!==e?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t,e){return void 0!==e?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(ot.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(ot.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,n=this.y,i=this.z,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6]*i,this.y=r[1]*e+r[4]*n+r[7]*i,this.z=r[2]*e+r[5]*n+r[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=t.elements,s=1/(r[3]*e+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*e+r[4]*n+r[8]*i+r[12])*s,this.y=(r[1]*e+r[5]*n+r[9]*i+r[13])*s,this.z=(r[2]*e+r[6]*n+r[10]*i+r[14])*s,this}applyQuaternion(t){const e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,a=t.z,o=t.w,l=o*e+s*i-a*n,c=o*n+a*e-r*i,h=o*i+r*n-s*e,u=-r*e-s*n-a*i;return this.x=l*o+u*-r+c*-a-h*-s,this.y=c*o+u*-s+h*-r-l*-a,this.z=h*o+u*-a+l*-s-c*-r,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,n=this.y,i=this.z,r=t.elements;return this.x=r[0]*e+r[4]*n+r[8]*i,this.y=r[1]*e+r[5]*n+r[9]*i,this.z=r[2]*e+r[6]*n+r[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)}crossVectors(t,e){const n=t.x,i=t.y,r=t.z,s=e.x,a=e.y,o=e.z;return this.x=i*o-r*a,this.y=r*s-n*o,this.z=n*a-i*s,this}projectOnVector(t){const e=t.lengthSq();if(0===e)return this.set(0,0,0);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return at.copy(this).projectOnVector(t),this.sub(at)}reflect(t){return this.sub(at.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(W(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return e*e+n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,n){const i=Math.sin(e)*t;return this.x=i*Math.sin(n),this.y=Math.cos(e)*t,this.z=i*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,n){return this.x=t*Math.sin(e),this.y=n,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=i,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,4*e)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,3*e)}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}}st.prototype.isVector3=!0;const at=new st,ot=new rt;class lt{constructor(t=new st(1/0,1/0,1/0),e=new st(-1/0,-1/0,-1/0)){this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){let e=1/0,n=1/0,i=1/0,r=-1/0,s=-1/0,a=-1/0;for(let o=0,l=t.length;o<l;o+=3){const l=t[o],c=t[o+1],h=t[o+2];l<e&&(e=l),c<n&&(n=c),h<i&&(i=h),l>r&&(r=l),c>s&&(s=c),h>a&&(a=h)}return this.min.set(e,n,i),this.max.set(r,s,a),this}setFromBufferAttribute(t){let e=1/0,n=1/0,i=1/0,r=-1/0,s=-1/0,a=-1/0;for(let o=0,l=t.count;o<l;o++){const l=t.getX(o),c=t.getY(o),h=t.getZ(o);l<e&&(e=l),c<n&&(n=c),h<i&&(i=h),l>r&&(r=l),c>s&&(s=c),h>a&&(a=h)}return this.min.set(e,n,i),this.max.set(r,s,a),this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const n=ht.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}setFromObject(t){return this.makeEmpty(),this.expandByObject(t)}clone(){return(new this.constructor).copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(t){return void 0===t&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new st),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return void 0===t&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new st),this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t){t.updateWorldMatrix(!1,!1);const e=t.geometry;void 0!==e&&(null===e.boundingBox&&e.computeBoundingBox(),ut.copy(e.boundingBox),ut.applyMatrix4(t.matrixWorld),this.union(ut));const n=t.children;for(let t=0,e=n.length;t<e;t++)this.expandByObject(n[t]);return this}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return void 0===e&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new st),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)}intersectsSphere(t){return this.clampPoint(t.center,ht),ht.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=-t.constant&&n>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(yt),_t.subVectors(this.max,yt),dt.subVectors(t.a,yt),pt.subVectors(t.b,yt),ft.subVectors(t.c,yt),mt.subVectors(pt,dt),gt.subVectors(ft,pt),vt.subVectors(dt,ft);let e=[0,-mt.z,mt.y,0,-gt.z,gt.y,0,-vt.z,vt.y,mt.z,0,-mt.x,gt.z,0,-gt.x,vt.z,0,-vt.x,-mt.y,mt.x,0,-gt.y,gt.x,0,-vt.y,vt.x,0];return!!bt(e,dt,pt,ft,_t)&&(e=[1,0,0,0,1,0,0,0,1],!!bt(e,dt,pt,ft,_t)&&(xt.crossVectors(mt,gt),e=[xt.x,xt.y,xt.z],bt(e,dt,pt,ft,_t)))}clampPoint(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new st),e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return ht.copy(t).clamp(this.min,this.max).sub(t).length()}getBoundingSphere(t){return void 0===t&&console.error("THREE.Box3: .getBoundingSphere() target is now required"),this.getCenter(t.center),t.radius=.5*this.getSize(ht).length(),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()||(ct[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),ct[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),ct[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),ct[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),ct[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),ct[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),ct[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),ct[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(ct)),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}lt.prototype.isBox3=!0;const ct=[new st,new st,new st,new st,new st,new st,new st,new st],ht=new st,ut=new lt,dt=new st,pt=new st,ft=new st,mt=new st,gt=new st,vt=new st,yt=new st,_t=new st,xt=new st,wt=new st;function bt(t,e,n,i,r){for(let s=0,a=t.length-3;s<=a;s+=3){wt.fromArray(t,s);const a=r.x*Math.abs(wt.x)+r.y*Math.abs(wt.y)+r.z*Math.abs(wt.z),o=e.dot(wt),l=n.dot(wt),c=i.dot(wt);if(Math.max(-Math.max(o,l,c),Math.min(o,l,c))>a)return!1}return!0}const Mt=new lt,St=new st,Tt=new st,Et=new st;class At{constructor(t=new st,e=-1){this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){const n=this.center;void 0!==e?n.copy(e):Mt.setFromPoints(t).getCenter(n);let i=0;for(let e=0,r=t.length;e<r;e++)i=Math.max(i,n.distanceToSquared(t[e]));return this.radius=Math.sqrt(i),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){const e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,e){const n=this.center.distanceToSquared(t);return void 0===e&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new st),e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return void 0===t&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new lt),this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){Et.subVectors(t,this.center);const e=Et.lengthSq();if(e>this.radius*this.radius){const t=Math.sqrt(e),n=.5*(t-this.radius);this.center.add(Et.multiplyScalar(n/t)),this.radius+=n}return this}union(t){return Tt.subVectors(t.center,this.center).normalize().multiplyScalar(t.radius),this.expandByPoint(St.copy(t.center).add(Tt)),this.expandByPoint(St.copy(t.center).sub(Tt)),this}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Lt=new st,Rt=new st,Ct=new st,Pt=new st,Dt=new st,It=new st,Nt=new st;class zt{constructor(t=new st,e=new st(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is now required"),e=new st),e.copy(this.direction).multiplyScalar(t).add(this.origin)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,Lt)),this}closestPointToPoint(t,e){void 0===e&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new st),e.subVectors(t,this.origin);const n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const e=Lt.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(Lt.copy(this.direction).multiplyScalar(e).add(this.origin),Lt.distanceToSquared(t))}distanceSqToSegment(t,e,n,i){Rt.copy(t).add(e).multiplyScalar(.5),Ct.copy(e).sub(t).normalize(),Pt.copy(this.origin).sub(Rt);const r=.5*t.distanceTo(e),s=-this.direction.dot(Ct),a=Pt.dot(this.direction),o=-Pt.dot(Ct),l=Pt.lengthSq(),c=Math.abs(1-s*s);let h,u,d,p;if(c>0)if(h=s*o-a,u=s*a-o,p=r*c,h>=0)if(u>=-p)if(u<=p){const t=1/c;h*=t,u*=t,d=h*(h+s*u+2*a)+u*(s*h+u+2*o)+l}else u=r,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;else u=-r,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;else u<=-p?(h=Math.max(0,-(-s*r+a)),u=h>0?-r:Math.min(Math.max(-r,-o),r),d=-h*h+u*(u+2*o)+l):u<=p?(h=0,u=Math.min(Math.max(-r,-o),r),d=u*(u+2*o)+l):(h=Math.max(0,-(s*r+a)),u=h>0?r:Math.min(Math.max(-r,-o),r),d=-h*h+u*(u+2*o)+l);else u=s>0?-r:r,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;return n&&n.copy(this.direction).multiplyScalar(h).add(this.origin),i&&i.copy(Ct).multiplyScalar(u).add(Rt),d}intersectSphere(t,e){Lt.subVectors(t.center,this.origin);const n=Lt.dot(this.direction),i=Lt.dot(Lt)-n*n,r=t.radius*t.radius;if(i>r)return null;const s=Math.sqrt(r-i),a=n-s,o=n+s;return a<0&&o<0?null:a<0?this.at(o,e):this.at(a,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null}intersectPlane(t,e){const n=this.distanceToPlane(t);return null===n?null:this.at(n,e)}intersectsPlane(t){const e=t.distanceToPoint(this.origin);if(0===e)return!0;return t.normal.dot(this.direction)*e<0}intersectBox(t,e){let n,i,r,s,a,o;const l=1/this.direction.x,c=1/this.direction.y,h=1/this.direction.z,u=this.origin;return l>=0?(n=(t.min.x-u.x)*l,i=(t.max.x-u.x)*l):(n=(t.max.x-u.x)*l,i=(t.min.x-u.x)*l),c>=0?(r=(t.min.y-u.y)*c,s=(t.max.y-u.y)*c):(r=(t.max.y-u.y)*c,s=(t.min.y-u.y)*c),n>s||r>i?null:((r>n||n!=n)&&(n=r),(s<i||i!=i)&&(i=s),h>=0?(a=(t.min.z-u.z)*h,o=(t.max.z-u.z)*h):(a=(t.max.z-u.z)*h,o=(t.min.z-u.z)*h),n>o||a>i?null:((a>n||n!=n)&&(n=a),(o<i||i!=i)&&(i=o),i<0?null:this.at(n>=0?n:i,e)))}intersectsBox(t){return null!==this.intersectBox(t,Lt)}intersectTriangle(t,e,n,i,r){Dt.subVectors(e,t),It.subVectors(n,t),Nt.crossVectors(Dt,It);let s,a=this.direction.dot(Nt);if(a>0){if(i)return null;s=1}else{if(!(a<0))return null;s=-1,a=-a}Pt.subVectors(this.origin,t);const o=s*this.direction.dot(It.crossVectors(Pt,It));if(o<0)return null;const l=s*this.direction.dot(Dt.cross(Pt));if(l<0)return null;if(o+l>a)return null;const c=-s*Pt.dot(Nt);return c<0?null:this.at(c/a,r)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class Ot{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(t,e,n,i,r,s,a,o,l,c,h,u,d,p,f,m){const g=this.elements;return g[0]=t,g[4]=e,g[8]=n,g[12]=i,g[1]=r,g[5]=s,g[9]=a,g[13]=o,g[2]=l,g[6]=c,g[10]=h,g[14]=u,g[3]=d,g[7]=p,g[11]=f,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new Ot).fromArray(this.elements)}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this}copyPosition(t){const e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}extractRotation(t){const e=this.elements,n=t.elements,i=1/Bt.setFromMatrixColumn(t,0).length(),r=1/Bt.setFromMatrixColumn(t,1).length(),s=1/Bt.setFromMatrixColumn(t,2).length();return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=0,e[4]=n[4]*r,e[5]=n[5]*r,e[6]=n[6]*r,e[7]=0,e[8]=n[8]*s,e[9]=n[9]*s,e[10]=n[10]*s,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");const e=this.elements,n=t.x,i=t.y,r=t.z,s=Math.cos(n),a=Math.sin(n),o=Math.cos(i),l=Math.sin(i),c=Math.cos(r),h=Math.sin(r);if("XYZ"===t.order){const t=s*c,n=s*h,i=a*c,r=a*h;e[0]=o*c,e[4]=-o*h,e[8]=l,e[1]=n+i*l,e[5]=t-r*l,e[9]=-a*o,e[2]=r-t*l,e[6]=i+n*l,e[10]=s*o}else if("YXZ"===t.order){const t=o*c,n=o*h,i=l*c,r=l*h;e[0]=t+r*a,e[4]=i*a-n,e[8]=s*l,e[1]=s*h,e[5]=s*c,e[9]=-a,e[2]=n*a-i,e[6]=r+t*a,e[10]=s*o}else if("ZXY"===t.order){const t=o*c,n=o*h,i=l*c,r=l*h;e[0]=t-r*a,e[4]=-s*h,e[8]=i+n*a,e[1]=n+i*a,e[5]=s*c,e[9]=r-t*a,e[2]=-s*l,e[6]=a,e[10]=s*o}else if("ZYX"===t.order){const t=s*c,n=s*h,i=a*c,r=a*h;e[0]=o*c,e[4]=i*l-n,e[8]=t*l+r,e[1]=o*h,e[5]=r*l+t,e[9]=n*l-i,e[2]=-l,e[6]=a*o,e[10]=s*o}else if("YZX"===t.order){const t=s*o,n=s*l,i=a*o,r=a*l;e[0]=o*c,e[4]=r-t*h,e[8]=i*h+n,e[1]=h,e[5]=s*c,e[9]=-a*c,e[2]=-l*c,e[6]=n*h+i,e[10]=t-r*h}else if("XZY"===t.order){const t=s*o,n=s*l,i=a*o,r=a*l;e[0]=o*c,e[4]=-h,e[8]=l*c,e[1]=t*h+r,e[5]=s*c,e[9]=n*h-i,e[2]=i*h-n,e[6]=a*c,e[10]=r*h+t}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(Ht,t,Ut)}lookAt(t,e,n){const i=this.elements;return Vt.subVectors(t,e),0===Vt.lengthSq()&&(Vt.z=1),Vt.normalize(),kt.crossVectors(n,Vt),0===kt.lengthSq()&&(1===Math.abs(n.z)?Vt.x+=1e-4:Vt.z+=1e-4,Vt.normalize(),kt.crossVectors(n,Vt)),kt.normalize(),Gt.crossVectors(Vt,kt),i[0]=kt.x,i[4]=Gt.x,i[8]=Vt.x,i[1]=kt.y,i[5]=Gt.y,i[9]=Vt.y,i[2]=kt.z,i[6]=Gt.z,i[10]=Vt.z,this}multiply(t,e){return void 0!==e?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const n=t.elements,i=e.elements,r=this.elements,s=n[0],a=n[4],o=n[8],l=n[12],c=n[1],h=n[5],u=n[9],d=n[13],p=n[2],f=n[6],m=n[10],g=n[14],v=n[3],y=n[7],_=n[11],x=n[15],w=i[0],b=i[4],M=i[8],S=i[12],T=i[1],E=i[5],A=i[9],L=i[13],R=i[2],C=i[6],P=i[10],D=i[14],I=i[3],N=i[7],z=i[11],O=i[15];return r[0]=s*w+a*T+o*R+l*I,r[4]=s*b+a*E+o*C+l*N,r[8]=s*M+a*A+o*P+l*z,r[12]=s*S+a*L+o*D+l*O,r[1]=c*w+h*T+u*R+d*I,r[5]=c*b+h*E+u*C+d*N,r[9]=c*M+h*A+u*P+d*z,r[13]=c*S+h*L+u*D+d*O,r[2]=p*w+f*T+m*R+g*I,r[6]=p*b+f*E+m*C+g*N,r[10]=p*M+f*A+m*P+g*z,r[14]=p*S+f*L+m*D+g*O,r[3]=v*w+y*T+_*R+x*I,r[7]=v*b+y*E+_*C+x*N,r[11]=v*M+y*A+_*P+x*z,r[15]=v*S+y*L+_*D+x*O,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],n=t[4],i=t[8],r=t[12],s=t[1],a=t[5],o=t[9],l=t[13],c=t[2],h=t[6],u=t[10],d=t[14];return t[3]*(+r*o*h-i*l*h-r*a*u+n*l*u+i*a*d-n*o*d)+t[7]*(+e*o*d-e*l*u+r*s*u-i*s*d+i*l*c-r*o*c)+t[11]*(+e*l*h-e*a*d-r*s*h+n*s*d+r*a*c-n*l*c)+t[15]*(-i*a*c-e*o*h+e*a*u+i*s*h-n*s*u+n*o*c)}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,n){const i=this.elements;return t.isVector3?(i[12]=t.x,i[13]=t.y,i[14]=t.z):(i[12]=t,i[13]=e,i[14]=n),this}invert(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],l=t[7],c=t[8],h=t[9],u=t[10],d=t[11],p=t[12],f=t[13],m=t[14],g=t[15],v=h*m*l-f*u*l+f*o*d-a*m*d-h*o*g+a*u*g,y=p*u*l-c*m*l-p*o*d+s*m*d+c*o*g-s*u*g,_=c*f*l-p*h*l+p*a*d-s*f*d-c*a*g+s*h*g,x=p*h*o-c*f*o-p*a*u+s*f*u+c*a*m-s*h*m,w=e*v+n*y+i*_+r*x;if(0===w)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const b=1/w;return t[0]=v*b,t[1]=(f*u*r-h*m*r-f*i*d+n*m*d+h*i*g-n*u*g)*b,t[2]=(a*m*r-f*o*r+f*i*l-n*m*l-a*i*g+n*o*g)*b,t[3]=(h*o*r-a*u*r-h*i*l+n*u*l+a*i*d-n*o*d)*b,t[4]=y*b,t[5]=(c*m*r-p*u*r+p*i*d-e*m*d-c*i*g+e*u*g)*b,t[6]=(p*o*r-s*m*r-p*i*l+e*m*l+s*i*g-e*o*g)*b,t[7]=(s*u*r-c*o*r+c*i*l-e*u*l-s*i*d+e*o*d)*b,t[8]=_*b,t[9]=(p*h*r-c*f*r-p*n*d+e*f*d+c*n*g-e*h*g)*b,t[10]=(s*f*r-p*a*r+p*n*l-e*f*l-s*n*g+e*a*g)*b,t[11]=(c*a*r-s*h*r-c*n*l+e*h*l+s*n*d-e*a*d)*b,t[12]=x*b,t[13]=(c*f*i-p*h*i+p*n*u-e*f*u-c*n*m+e*h*m)*b,t[14]=(p*a*i-s*f*i-p*n*o+e*f*o+s*n*m-e*a*m)*b,t[15]=(s*h*i-c*a*i+c*n*o-e*h*o-s*n*u+e*a*u)*b,this}scale(t){const e=this.elements,n=t.x,i=t.y,r=t.z;return e[0]*=n,e[4]*=i,e[8]*=r,e[1]*=n,e[5]*=i,e[9]*=r,e[2]*=n,e[6]*=i,e[10]*=r,e[3]*=n,e[7]*=i,e[11]*=r,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))}makeTranslation(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const n=Math.cos(e),i=Math.sin(e),r=1-n,s=t.x,a=t.y,o=t.z,l=r*s,c=r*a;return this.set(l*s+n,l*a-i*o,l*o+i*a,0,l*a+i*o,c*a+n,c*o-i*s,0,l*o-i*a,c*o+i*s,r*o*o+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,i,r,s){return this.set(1,n,r,0,t,1,s,0,e,i,1,0,0,0,0,1),this}compose(t,e,n){const i=this.elements,r=e._x,s=e._y,a=e._z,o=e._w,l=r+r,c=s+s,h=a+a,u=r*l,d=r*c,p=r*h,f=s*c,m=s*h,g=a*h,v=o*l,y=o*c,_=o*h,x=n.x,w=n.y,b=n.z;return i[0]=(1-(f+g))*x,i[1]=(d+_)*x,i[2]=(p-y)*x,i[3]=0,i[4]=(d-_)*w,i[5]=(1-(u+g))*w,i[6]=(m+v)*w,i[7]=0,i[8]=(p+y)*b,i[9]=(m-v)*b,i[10]=(1-(u+f))*b,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,n){const i=this.elements;let r=Bt.set(i[0],i[1],i[2]).length();const s=Bt.set(i[4],i[5],i[6]).length(),a=Bt.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),t.x=i[12],t.y=i[13],t.z=i[14],Ft.copy(this);const o=1/r,l=1/s,c=1/a;return Ft.elements[0]*=o,Ft.elements[1]*=o,Ft.elements[2]*=o,Ft.elements[4]*=l,Ft.elements[5]*=l,Ft.elements[6]*=l,Ft.elements[8]*=c,Ft.elements[9]*=c,Ft.elements[10]*=c,e.setFromRotationMatrix(Ft),n.x=r,n.y=s,n.z=a,this}makePerspective(t,e,n,i,r,s){void 0===s&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");const a=this.elements,o=2*r/(e-t),l=2*r/(n-i),c=(e+t)/(e-t),h=(n+i)/(n-i),u=-(s+r)/(s-r),d=-2*s*r/(s-r);return a[0]=o,a[4]=0,a[8]=c,a[12]=0,a[1]=0,a[5]=l,a[9]=h,a[13]=0,a[2]=0,a[6]=0,a[10]=u,a[14]=d,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(t,e,n,i,r,s){const a=this.elements,o=1/(e-t),l=1/(n-i),c=1/(s-r),h=(e+t)*o,u=(n+i)*l,d=(s+r)*c;return a[0]=2*o,a[4]=0,a[8]=0,a[12]=-h,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-u,a[2]=0,a[6]=0,a[10]=-2*c,a[14]=-d,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(t){const e=this.elements,n=t.elements;for(let t=0;t<16;t++)if(e[t]!==n[t])return!1;return!0}fromArray(t,e=0){for(let n=0;n<16;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}Ot.prototype.isMatrix4=!0;const Bt=new st,Ft=new Ot,Ht=new st(0,0,0),Ut=new st(1,1,1),kt=new st,Gt=new st,Vt=new st,Wt=new Ot,jt=new rt;class qt{constructor(t=0,e=0,n=0,i=qt.DefaultOrder){this._x=t,this._y=e,this._z=n,this._order=i}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._order=i||this._order,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e,n){const i=t.elements,r=i[0],s=i[4],a=i[8],o=i[1],l=i[5],c=i[9],h=i[2],u=i[6],d=i[10];switch(e=e||this._order){case"XYZ":this._y=Math.asin(W(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,d),this._z=Math.atan2(-s,r)):(this._x=Math.atan2(u,l),this._z=0);break;case"YXZ":this._x=Math.asin(-W(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(o,l)):(this._y=Math.atan2(-h,r),this._z=0);break;case"ZXY":this._x=Math.asin(W(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-s,l)):(this._y=0,this._z=Math.atan2(o,r));break;case"ZYX":this._y=Math.asin(-W(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(u,d),this._z=Math.atan2(o,r)):(this._x=0,this._z=Math.atan2(-s,l));break;case"YZX":this._z=Math.asin(W(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-h,r)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-W(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(u,l),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-c,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,!1!==n&&this._onChangeCallback(),this}setFromQuaternion(t,e,n){return Wt.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Wt,e,n)}setFromVector3(t,e){return this.set(t.x,t.y,t.z,e||this._order)}reorder(t){return jt.setFromEuler(this),this.setFromQuaternion(jt,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}toVector3(t){return t?t.set(this._x,this._y,this._z):new st(this._x,this._y,this._z)}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}}qt.prototype.isEuler=!0,qt.DefaultOrder="XYZ",qt.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class Xt{constructor(){this.mask=1}set(t){this.mask=1<<t|0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return 0!=(this.mask&t.mask)}}let Yt=0;const Zt=new st,Jt=new rt,Qt=new Ot,Kt=new st,$t=new st,te=new st,ee=new rt,ne=new st(1,0,0),ie=new st(0,1,0),re=new st(0,0,1),se={type:"added"},ae={type:"removed"};class oe extends H{constructor(){super(),Object.defineProperty(this,"id",{value:Yt++}),this.uuid=V(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=oe.DefaultUp.clone();const t=new st,e=new qt,n=new rt,i=new st(1,1,1);e._onChange((function(){n.setFromEuler(e,!1)})),n._onChange((function(){e.setFromQuaternion(n,void 0,!1)})),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new Ot},normalMatrix:{value:new J}}),this.matrix=new Ot,this.matrixWorld=new Ot,this.matrixAutoUpdate=oe.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new Xt,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,e){this.quaternion.setFromAxisAngle(t,e)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,e){return Jt.setFromAxisAngle(t,e),this.quaternion.multiply(Jt),this}rotateOnWorldAxis(t,e){return Jt.setFromAxisAngle(t,e),this.quaternion.premultiply(Jt),this}rotateX(t){return this.rotateOnAxis(ne,t)}rotateY(t){return this.rotateOnAxis(ie,t)}rotateZ(t){return this.rotateOnAxis(re,t)}translateOnAxis(t,e){return Zt.copy(t).applyQuaternion(this.quaternion),this.position.add(Zt.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(ne,t)}translateY(t){return this.translateOnAxis(ie,t)}translateZ(t){return this.translateOnAxis(re,t)}localToWorld(t){return t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return t.applyMatrix4(Qt.copy(this.matrixWorld).invert())}lookAt(t,e,n){t.isVector3?Kt.copy(t):Kt.set(t,e,n);const i=this.parent;this.updateWorldMatrix(!0,!1),$t.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Qt.lookAt($t,Kt,this.up):Qt.lookAt(Kt,$t,this.up),this.quaternion.setFromRotationMatrix(Qt),i&&(Qt.extractRotation(i.matrixWorld),Jt.setFromRotationMatrix(Qt),this.quaternion.premultiply(Jt.invert()))}add(t){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,this.children.push(t),t.dispatchEvent(se)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.remove(arguments[t]);return this}const e=this.children.indexOf(t);return-1!==e&&(t.parent=null,this.children.splice(e,1),t.dispatchEvent(ae)),this}removeFromParent(){const t=this.parent;return null!==t&&t.remove(this),this}clear(){for(let t=0;t<this.children.length;t++){const e=this.children[t];e.parent=null,e.dispatchEvent(ae)}return this.children.length=0,this}attach(t){return this.updateWorldMatrix(!0,!1),Qt.copy(this.matrixWorld).invert(),null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),Qt.multiply(t.parent.matrixWorld)),t.applyMatrix4(Qt),this.add(t),t.updateWorldMatrix(!1,!0),this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let n=0,i=this.children.length;n<i;n++){const i=this.children[n].getObjectByProperty(t,e);if(void 0!==i)return i}}getWorldPosition(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new st),this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),t=new rt),this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose($t,t,te),t}getWorldScale(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),t=new st),this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose($t,ee,t),t}getWorldDirection(t){void 0===t&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),t=new st),this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);const e=this.children;for(let n=0,i=e.length;n<i;n++)e[n].traverse(t)}traverseVisible(t){if(!1===this.visible)return;t(this);const e=this.children;for(let n=0,i=e.length;n<i;n++)e[n].traverseVisible(t)}traverseAncestors(t){const e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);const e=this.children;for(let n=0,i=e.length;n<i;n++)e[n].updateMatrixWorld(t)}updateWorldMatrix(t,e){const n=this.parent;if(!0===t&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===e){const t=this.children;for(let e=0,n=t.length;e<n;e++)t[e].updateWorldMatrix(!1,!0)}}toJSON(t){const e=void 0===t||"string"==typeof t,n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});const i={};function r(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),!0===this.castShadow&&(i.castShadow=!0),!0===this.receiveShadow&&(i.receiveShadow=!0),!1===this.visible&&(i.visible=!1),!1===this.frustumCulled&&(i.frustumCulled=!1),0!==this.renderOrder&&(i.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(i.instanceColor=this.instanceColor.toJSON())),this.isMesh||this.isLine||this.isPoints){i.geometry=r(t.geometries,this.geometry);const e=this.geometry.parameters;if(void 0!==e&&void 0!==e.shapes){const n=e.shapes;if(Array.isArray(n))for(let e=0,i=n.length;e<i;e++){const i=n[e];r(t.shapes,i)}else r(t.shapes,n)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(r(t.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const e=[];for(let n=0,i=this.material.length;n<i;n++)e.push(r(t.materials,this.material[n]));i.material=e}else i.material=r(t.materials,this.material);if(this.children.length>0){i.children=[];for(let e=0;e<this.children.length;e++)i.children.push(this.children[e].toJSON(t).object)}if(this.animations.length>0){i.animations=[];for(let e=0;e<this.animations.length;e++){const n=this.animations[e];i.animations.push(r(t.animations,n))}}if(e){const e=s(t.geometries),i=s(t.materials),r=s(t.textures),a=s(t.images),o=s(t.shapes),l=s(t.skeletons),c=s(t.animations);e.length>0&&(n.geometries=e),i.length>0&&(n.materials=i),r.length>0&&(n.textures=r),a.length>0&&(n.images=a),o.length>0&&(n.shapes=o),l.length>0&&(n.skeletons=l),c.length>0&&(n.animations=c)}return n.object=i,n;function s(t){const e=[];for(const n in t){const i=t[n];delete i.metadata,e.push(i)}return e}}clone(t){return(new this.constructor).copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(let e=0;e<t.children.length;e++){const n=t.children[e];this.add(n.clone())}return this}}oe.DefaultUp=new st(0,1,0),oe.DefaultMatrixAutoUpdate=!0,oe.prototype.isObject3D=!0;const le=new st,ce=new st,he=new J;class ue{constructor(t=new st(1,0,0),e=0){this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,n,i){return this.normal.set(t,e,n),this.constant=i,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,n){const i=le.subVectors(n,e).cross(ce.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(i,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return void 0===e&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new st),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)}intersectLine(t,e){void 0===e&&(console.warn("THREE.Plane: .intersectLine() target is now required"),e=new st);const n=t.delta(le),i=this.normal.dot(n);if(0===i)return 0===this.distanceToPoint(t.start)?e.copy(t.start):null;const r=-(t.start.dot(this.normal)+this.constant)/i;return r<0||r>1?null:e.copy(n).multiplyScalar(r).add(t.start)}intersectsLine(t){const e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return void 0===t&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new st),t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const n=e||he.getNormalMatrix(t),i=this.coplanarPoint(le).applyMatrix4(t),r=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(r),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return(new this.constructor).copy(this)}}ue.prototype.isPlane=!0;const de=new st,pe=new st,fe=new st,me=new st,ge=new st,ve=new st,ye=new st,_e=new st,xe=new st,we=new st;class be{constructor(t=new st,e=new st,n=new st){this.a=t,this.b=e,this.c=n}static getNormal(t,e,n,i){void 0===i&&(console.warn("THREE.Triangle: .getNormal() target is now required"),i=new st),i.subVectors(n,e),de.subVectors(t,e),i.cross(de);const r=i.lengthSq();return r>0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(t,e,n,i,r){de.subVectors(i,e),pe.subVectors(n,e),fe.subVectors(t,e);const s=de.dot(de),a=de.dot(pe),o=de.dot(fe),l=pe.dot(pe),c=pe.dot(fe),h=s*l-a*a;if(void 0===r&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),r=new st),0===h)return r.set(-2,-1,-1);const u=1/h,d=(l*o-a*c)*u,p=(s*c-a*o)*u;return r.set(1-d-p,p,d)}static containsPoint(t,e,n,i){return this.getBarycoord(t,e,n,i,me),me.x>=0&&me.y>=0&&me.x+me.y<=1}static getUV(t,e,n,i,r,s,a,o){return this.getBarycoord(t,e,n,i,me),o.set(0,0),o.addScaledVector(r,me.x),o.addScaledVector(s,me.y),o.addScaledVector(a,me.z),o}static isFrontFacing(t,e,n,i){return de.subVectors(n,e),pe.subVectors(t,e),de.cross(pe).dot(i)<0}set(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this}setFromPointsAndIndices(t,e,n,i){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[i]),this}clone(){return(new this.constructor).copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return de.subVectors(this.c,this.b),pe.subVectors(this.a,this.b),.5*de.cross(pe).length()}getMidpoint(t){return void 0===t&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new st),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return be.getNormal(this.a,this.b,this.c,t)}getPlane(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new ue),t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return be.getBarycoord(t,this.a,this.b,this.c,e)}getUV(t,e,n,i,r){return be.getUV(t,this.a,this.b,this.c,e,n,i,r)}containsPoint(t){return be.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return be.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){void 0===e&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),e=new st);const n=this.a,i=this.b,r=this.c;let s,a;ge.subVectors(i,n),ve.subVectors(r,n),_e.subVectors(t,n);const o=ge.dot(_e),l=ve.dot(_e);if(o<=0&&l<=0)return e.copy(n);xe.subVectors(t,i);const c=ge.dot(xe),h=ve.dot(xe);if(c>=0&&h<=c)return e.copy(i);const u=o*h-c*l;if(u<=0&&o>=0&&c<=0)return s=o/(o-c),e.copy(n).addScaledVector(ge,s);we.subVectors(t,r);const d=ge.dot(we),p=ve.dot(we);if(p>=0&&d<=p)return e.copy(r);const f=d*l-o*p;if(f<=0&&l>=0&&p<=0)return a=l/(l-p),e.copy(n).addScaledVector(ve,a);const m=c*p-d*h;if(m<=0&&h-c>=0&&d-p>=0)return ye.subVectors(r,i),a=(h-c)/(h-c+(d-p)),e.copy(i).addScaledVector(ye,a);const g=1/(m+f+u);return s=f*g,a=u*g,e.copy(n).addScaledVector(ge,s).addScaledVector(ve,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}let Me=0;class Se extends H{constructor(){super(),Object.defineProperty(this,"id",{value:Me++}),this.uuid=V(),this.name="",this.type="Material",this.fog=!0,this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=e,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=z,this.stencilZFail=z,this.stencilZPass=z,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0}onBuild(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(void 0!==t)for(const e in t){const n=t[e];if(void 0===n){console.warn("THREE.Material: '"+e+"' parameter is undefined.");continue}if("shading"===e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===n;continue}const i=this[e];void 0!==i?i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[e]=n:console.warn("THREE."+this.type+": '"+e+"' is not a property of this material.")}}toJSON(t){const e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});const n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function i(t){const e=[];for(const n in t){const i=t[n];delete i.metadata,e.push(i)}return e}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.sheen&&this.sheen.isColor&&(n.sheen=this.sheen.getHex()),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(t).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(t).uuid),void 0!==this.attenuationDistance&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),0!==this.side&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.morphNormals&&(n.morphNormals=!0),!0===this.flatShading&&(n.flatShading=this.flatShading),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),e){const e=i(t.textures),r=i(t.images);e.length>0&&(n.textures=e),r.length>0&&(n.images=r)}return n}clone(){return(new this.constructor).copy(this)}copy(t){this.name=t.name,this.fog=t.fog,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const e=t.clippingPlanes;let n=null;if(null!==e){const t=e.length;n=new Array(t);for(let i=0;i!==t;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){!0===t&&this.version++}}Se.prototype.isMaterial=!0;const Te={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Ee={h:0,s:0,l:0},Ae={h:0,s:0,l:0};function Le(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}function Re(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}function Ce(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}class Pe{constructor(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}set(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this}setRGB(t,e,n){return this.r=t,this.g=e,this.b=n,this}setHSL(t,e,n){if(t=j(t,1),e=W(e,0,1),n=W(n,0,1),0===e)this.r=this.g=this.b=n;else{const i=n<=.5?n*(1+e):n+e-n*e,r=2*n-i;this.r=Le(r,i,t+1/3),this.g=Le(r,i,t),this.b=Le(r,i,t-1/3)}return this}setStyle(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let n;if(n=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(t)){let t;const i=n[1],r=n[2];switch(i){case"rgb":case"rgba":if(t=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r))return this.r=Math.min(255,parseInt(t[1],10))/255,this.g=Math.min(255,parseInt(t[2],10))/255,this.b=Math.min(255,parseInt(t[3],10))/255,e(t[4]),this;if(t=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r))return this.r=Math.min(100,parseInt(t[1],10))/100,this.g=Math.min(100,parseInt(t[2],10))/100,this.b=Math.min(100,parseInt(t[3],10))/100,e(t[4]),this;break;case"hsl":case"hsla":if(t=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r)){const n=parseFloat(t[1])/360,i=parseInt(t[2],10)/100,r=parseInt(t[3],10)/100;return e(t[4]),this.setHSL(n,i,r)}}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(t)){const t=n[1],e=t.length;if(3===e)return this.r=parseInt(t.charAt(0)+t.charAt(0),16)/255,this.g=parseInt(t.charAt(1)+t.charAt(1),16)/255,this.b=parseInt(t.charAt(2)+t.charAt(2),16)/255,this;if(6===e)return this.r=parseInt(t.charAt(0)+t.charAt(1),16)/255,this.g=parseInt(t.charAt(2)+t.charAt(3),16)/255,this.b=parseInt(t.charAt(4)+t.charAt(5),16)/255,this}return t&&t.length>0?this.setColorName(t):this}setColorName(t){const e=Te[t.toLowerCase()];return void 0!==e?this.setHex(e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copyGammaToLinear(t,e=2){return this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this}copyLinearToGamma(t,e=2){const n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this}convertGammaToLinear(t){return this.copyGammaToLinear(this,t),this}convertLinearToGamma(t){return this.copyLinearToGamma(this,t),this}copySRGBToLinear(t){return this.r=Re(t.r),this.g=Re(t.g),this.b=Re(t.b),this}copyLinearToSRGB(t){return this.r=Ce(t.r),this.g=Ce(t.g),this.b=Ce(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(t){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});const e=this.r,n=this.g,i=this.b,r=Math.max(e,n,i),s=Math.min(e,n,i);let a,o;const l=(s+r)/2;if(s===r)a=0,o=0;else{const t=r-s;switch(o=l<=.5?t/(r+s):t/(2-r-s),r){case e:a=(n-i)/t+(n<i?6:0);break;case n:a=(i-e)/t+2;break;case i:a=(e-n)/t+4}a/=6}return t.h=a,t.s=o,t.l=l,t}getStyle(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"}offsetHSL(t,e,n){return this.getHSL(Ee),Ee.h+=t,Ee.s+=e,Ee.l+=n,this.setHSL(Ee.h,Ee.s,Ee.l),this}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,n){return this.r=t.r+(e.r-t.r)*n,this.g=t.g+(e.g-t.g)*n,this.b=t.b+(e.b-t.b)*n,this}lerpHSL(t,e){this.getHSL(Ee),t.getHSL(Ae);const n=q(Ee.h,Ae.h,e),i=q(Ee.s,Ae.s,e),r=q(Ee.l,Ae.l,e);return this.setHSL(n,i,r),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),!0===t.normalized&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}}Pe.NAMES=Te,Pe.prototype.isColor=!0,Pe.prototype.r=1,Pe.prototype.g=1,Pe.prototype.b=1;class De extends Se{constructor(t){super(),this.type="MeshBasicMaterial",this.color=new Pe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.morphTargets=t.morphTargets,this}}De.prototype.isMeshBasicMaterial=!0;const Ie=new st,Ne=new Z;class ze{constructor(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.usage=O,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}setUsage(t){return this.usage=t,this}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let i=0,r=this.itemSize;i<r;i++)this.array[t+i]=e.array[n+i];return this}copyArray(t){return this.array.set(t),this}copyColorsArray(t){const e=this.array;let n=0;for(let i=0,r=t.length;i<r;i++){let r=t[i];void 0===r&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",i),r=new Pe),e[n++]=r.r,e[n++]=r.g,e[n++]=r.b}return this}copyVector2sArray(t){const e=this.array;let n=0;for(let i=0,r=t.length;i<r;i++){let r=t[i];void 0===r&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",i),r=new Z),e[n++]=r.x,e[n++]=r.y}return this}copyVector3sArray(t){const e=this.array;let n=0;for(let i=0,r=t.length;i<r;i++){let r=t[i];void 0===r&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",i),r=new st),e[n++]=r.x,e[n++]=r.y,e[n++]=r.z}return this}copyVector4sArray(t){const e=this.array;let n=0;for(let i=0,r=t.length;i<r;i++){let r=t[i];void 0===r&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",i),r=new nt),e[n++]=r.x,e[n++]=r.y,e[n++]=r.z,e[n++]=r.w}return this}applyMatrix3(t){if(2===this.itemSize)for(let e=0,n=this.count;e<n;e++)Ne.fromBufferAttribute(this,e),Ne.applyMatrix3(t),this.setXY(e,Ne.x,Ne.y);else if(3===this.itemSize)for(let e=0,n=this.count;e<n;e++)Ie.fromBufferAttribute(this,e),Ie.applyMatrix3(t),this.setXYZ(e,Ie.x,Ie.y,Ie.z);return this}applyMatrix4(t){for(let e=0,n=this.count;e<n;e++)Ie.x=this.getX(e),Ie.y=this.getY(e),Ie.z=this.getZ(e),Ie.applyMatrix4(t),this.setXYZ(e,Ie.x,Ie.y,Ie.z);return this}applyNormalMatrix(t){for(let e=0,n=this.count;e<n;e++)Ie.x=this.getX(e),Ie.y=this.getY(e),Ie.z=this.getZ(e),Ie.applyNormalMatrix(t),this.setXYZ(e,Ie.x,Ie.y,Ie.z);return this}transformDirection(t){for(let e=0,n=this.count;e<n;e++)Ie.x=this.getX(e),Ie.y=this.getY(e),Ie.z=this.getZ(e),Ie.transformDirection(t),this.setXYZ(e,Ie.x,Ie.y,Ie.z);return this}set(t,e=0){return this.array.set(t,e),this}getX(t){return this.array[t*this.itemSize]}setX(t,e){return this.array[t*this.itemSize]=e,this}getY(t){return this.array[t*this.itemSize+1]}setY(t,e){return this.array[t*this.itemSize+1]=e,this}getZ(t){return this.array[t*this.itemSize+2]}setZ(t,e){return this.array[t*this.itemSize+2]=e,this}getW(t){return this.array[t*this.itemSize+3]}setW(t,e){return this.array[t*this.itemSize+3]=e,this}setXY(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this}setXYZ(t,e,n,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this}setXYZW(t,e,n,i,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this.array[t+3]=r,this}onUpload(t){return this.onUploadCallback=t,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized};return""!==this.name&&(t.name=this.name),this.usage!==O&&(t.usage=this.usage),0===this.updateRange.offset&&-1===this.updateRange.count||(t.updateRange=this.updateRange),t}}ze.prototype.isBufferAttribute=!0;class Oe extends ze{constructor(t,e,n){super(new Uint16Array(t),e,n)}}class Be extends ze{constructor(t,e,n){super(new Uint32Array(t),e,n)}}(class extends ze{constructor(t,e,n){super(new Uint16Array(t),e,n)}}).prototype.isFloat16BufferAttribute=!0;class Fe extends ze{constructor(t,e,n){super(new Float32Array(t),e,n)}}function He(t){if(0===t.length)return-1/0;let e=t[0];for(let n=1,i=t.length;n<i;++n)t[n]>e&&(e=t[n]);return e}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;let Ue=0;const ke=new Ot,Ge=new oe,Ve=new st,We=new lt,je=new lt,qe=new st;class Xe extends H{constructor(){super(),Object.defineProperty(this,"id",{value:Ue++}),this.uuid=V(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(t){return Array.isArray(t)?this.index=new(He(t)>65535?Be:Oe)(t,1):this.index=t,this}getAttribute(t){return this.attributes[t]}setAttribute(t,e){return this.attributes[t]=e,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return void 0!==this.attributes[t]}addGroup(t,e,n=0){this.groups.push({start:t,count:e,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}applyMatrix4(t){const e=this.attributes.position;void 0!==e&&(e.applyMatrix4(t),e.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const e=(new J).getNormalMatrix(t);n.applyNormalMatrix(e),n.needsUpdate=!0}const i=this.attributes.tangent;return void 0!==i&&(i.transformDirection(t),i.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(t){return ke.makeRotationFromQuaternion(t),this.applyMatrix4(ke),this}rotateX(t){return ke.makeRotationX(t),this.applyMatrix4(ke),this}rotateY(t){return ke.makeRotationY(t),this.applyMatrix4(ke),this}rotateZ(t){return ke.makeRotationZ(t),this.applyMatrix4(ke),this}translate(t,e,n){return ke.makeTranslation(t,e,n),this.applyMatrix4(ke),this}scale(t,e,n){return ke.makeScale(t,e,n),this.applyMatrix4(ke),this}lookAt(t){return Ge.lookAt(t),Ge.updateMatrix(),this.applyMatrix4(Ge.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Ve).negate(),this.translate(Ve.x,Ve.y,Ve.z),this}setFromPoints(t){const e=[];for(let n=0,i=t.length;n<i;n++){const i=t[n];e.push(i.x,i.y,i.z||0)}return this.setAttribute("position",new Fe(e,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new lt);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new st(-1/0,-1/0,-1/0),new st(1/0,1/0,1/0));if(void 0!==t){if(this.boundingBox.setFromBufferAttribute(t),e)for(let t=0,n=e.length;t<n;t++){const n=e[t];We.setFromBufferAttribute(n),this.morphTargetsRelative?(qe.addVectors(this.boundingBox.min,We.min),this.boundingBox.expandByPoint(qe),qe.addVectors(this.boundingBox.max,We.max),this.boundingBox.expandByPoint(qe)):(this.boundingBox.expandByPoint(We.min),this.boundingBox.expandByPoint(We.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new At);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new st,1/0);if(t){const n=this.boundingSphere.center;if(We.setFromBufferAttribute(t),e)for(let t=0,n=e.length;t<n;t++){const n=e[t];je.setFromBufferAttribute(n),this.morphTargetsRelative?(qe.addVectors(We.min,je.min),We.expandByPoint(qe),qe.addVectors(We.max,je.max),We.expandByPoint(qe)):(We.expandByPoint(je.min),We.expandByPoint(je.max))}We.getCenter(n);let i=0;for(let e=0,r=t.count;e<r;e++)qe.fromBufferAttribute(t,e),i=Math.max(i,n.distanceToSquared(qe));if(e)for(let r=0,s=e.length;r<s;r++){const s=e[r],a=this.morphTargetsRelative;for(let e=0,r=s.count;e<r;e++)qe.fromBufferAttribute(s,e),a&&(Ve.fromBufferAttribute(t,e),qe.add(Ve)),i=Math.max(i,n.distanceToSquared(qe))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeFaceNormals(){}computeTangents(){const t=this.index,e=this.attributes;if(null===t||void 0===e.position||void 0===e.normal||void 0===e.uv)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=t.array,i=e.position.array,r=e.normal.array,s=e.uv.array,a=i.length/3;void 0===e.tangent&&this.setAttribute("tangent",new ze(new Float32Array(4*a),4));const o=e.tangent.array,l=[],c=[];for(let t=0;t<a;t++)l[t]=new st,c[t]=new st;const h=new st,u=new st,d=new st,p=new Z,f=new Z,m=new Z,g=new st,v=new st;function y(t,e,n){h.fromArray(i,3*t),u.fromArray(i,3*e),d.fromArray(i,3*n),p.fromArray(s,2*t),f.fromArray(s,2*e),m.fromArray(s,2*n),u.sub(h),d.sub(h),f.sub(p),m.sub(p);const r=1/(f.x*m.y-m.x*f.y);isFinite(r)&&(g.copy(u).multiplyScalar(m.y).addScaledVector(d,-f.y).multiplyScalar(r),v.copy(d).multiplyScalar(f.x).addScaledVector(u,-m.x).multiplyScalar(r),l[t].add(g),l[e].add(g),l[n].add(g),c[t].add(v),c[e].add(v),c[n].add(v))}let _=this.groups;0===_.length&&(_=[{start:0,count:n.length}]);for(let t=0,e=_.length;t<e;++t){const e=_[t],i=e.start;for(let t=i,r=i+e.count;t<r;t+=3)y(n[t+0],n[t+1],n[t+2])}const x=new st,w=new st,b=new st,M=new st;function S(t){b.fromArray(r,3*t),M.copy(b);const e=l[t];x.copy(e),x.sub(b.multiplyScalar(b.dot(e))).normalize(),w.crossVectors(M,e);const n=w.dot(c[t])<0?-1:1;o[4*t]=x.x,o[4*t+1]=x.y,o[4*t+2]=x.z,o[4*t+3]=n}for(let t=0,e=_.length;t<e;++t){const e=_[t],i=e.start;for(let t=i,r=i+e.count;t<r;t+=3)S(n[t+0]),S(n[t+1]),S(n[t+2])}}computeVertexNormals(){const t=this.index,e=this.getAttribute("position");if(void 0!==e){let n=this.getAttribute("normal");if(void 0===n)n=new ze(new Float32Array(3*e.count),3),this.setAttribute("normal",n);else for(let t=0,e=n.count;t<e;t++)n.setXYZ(t,0,0,0);const i=new st,r=new st,s=new st,a=new st,o=new st,l=new st,c=new st,h=new st;if(t)for(let u=0,d=t.count;u<d;u+=3){const d=t.getX(u+0),p=t.getX(u+1),f=t.getX(u+2);i.fromBufferAttribute(e,d),r.fromBufferAttribute(e,p),s.fromBufferAttribute(e,f),c.subVectors(s,r),h.subVectors(i,r),c.cross(h),a.fromBufferAttribute(n,d),o.fromBufferAttribute(n,p),l.fromBufferAttribute(n,f),a.add(c),o.add(c),l.add(c),n.setXYZ(d,a.x,a.y,a.z),n.setXYZ(p,o.x,o.y,o.z),n.setXYZ(f,l.x,l.y,l.z)}else for(let t=0,a=e.count;t<a;t+=3)i.fromBufferAttribute(e,t+0),r.fromBufferAttribute(e,t+1),s.fromBufferAttribute(e,t+2),c.subVectors(s,r),h.subVectors(i,r),c.cross(h),n.setXYZ(t+0,c.x,c.y,c.z),n.setXYZ(t+1,c.x,c.y,c.z),n.setXYZ(t+2,c.x,c.y,c.z);this.normalizeNormals(),n.needsUpdate=!0}}merge(t,e){if(!t||!t.isBufferGeometry)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t);void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));const n=this.attributes;for(const i in n){if(void 0===t.attributes[i])continue;const r=n[i].array,s=t.attributes[i],a=s.array,o=s.itemSize*e,l=Math.min(a.length,r.length-o);for(let t=0,e=o;t<l;t++,e++)r[e]=a[t]}return this}normalizeNormals(){const t=this.attributes.normal;for(let e=0,n=t.count;e<n;e++)qe.fromBufferAttribute(t,e),qe.normalize(),t.setXYZ(e,qe.x,qe.y,qe.z)}toNonIndexed(){function t(t,e){const n=t.array,i=t.itemSize,r=t.normalized,s=new n.constructor(e.length*i);let a=0,o=0;for(let t=0,r=e.length;t<r;t++){a=e[t]*i;for(let t=0;t<i;t++)s[o++]=n[a++]}return new ze(s,i,r)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const e=new Xe,n=this.index.array,i=this.attributes;for(const r in i){const s=t(i[r],n);e.setAttribute(r,s)}const r=this.morphAttributes;for(const i in r){const s=[],a=r[i];for(let e=0,i=a.length;e<i;e++){const i=t(a[e],n);s.push(i)}e.morphAttributes[i]=s}e.morphTargetsRelative=this.morphTargetsRelative;const s=this.groups;for(let t=0,n=s.length;t<n;t++){const n=s[t];e.addGroup(n.start,n.count,n.materialIndex)}return e}toJSON(){const t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),void 0!==this.parameters){const e=this.parameters;for(const n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};const e=this.index;null!==e&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});const n=this.attributes;for(const e in n){const i=n[e];t.data.attributes[e]=i.toJSON(t.data)}const i={};let r=!1;for(const e in this.morphAttributes){const n=this.morphAttributes[e],s=[];for(let e=0,i=n.length;e<i;e++){const i=n[e];s.push(i.toJSON(t.data))}s.length>0&&(i[e]=s,r=!0)}r&&(t.data.morphAttributes=i,t.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));const a=this.boundingSphere;return null!==a&&(t.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),t}clone(){return(new Xe).copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const e={};this.name=t.name;const n=t.index;null!==n&&this.setIndex(n.clone(e));const i=t.attributes;for(const t in i){const n=i[t];this.setAttribute(t,n.clone(e))}const r=t.morphAttributes;for(const t in r){const n=[],i=r[t];for(let t=0,r=i.length;t<r;t++)n.push(i[t].clone(e));this.morphAttributes[t]=n}this.morphTargetsRelative=t.morphTargetsRelative;const s=t.groups;for(let t=0,e=s.length;t<e;t++){const e=s[t];this.addGroup(e.start,e.count,e.materialIndex)}const a=t.boundingBox;null!==a&&(this.boundingBox=a.clone());const o=t.boundingSphere;return null!==o&&(this.boundingSphere=o.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}Xe.prototype.isBufferGeometry=!0;const Ye=new Ot,Ze=new zt,Je=new At,Qe=new st,Ke=new st,$e=new st,tn=new st,en=new st,nn=new st,rn=new st,sn=new st,an=new st,on=new Z,ln=new Z,cn=new Z,hn=new st,un=new st;class dn extends oe{constructor(t=new Xe,e=new De){super(),this.type="Mesh",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t){return super.copy(t),void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=t.material,this.geometry=t.geometry,this}updateMorphTargets(){const t=this.geometry;if(t.isBufferGeometry){const e=t.morphAttributes,n=Object.keys(e);if(n.length>0){const t=e[n[0]];if(void 0!==t){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,n=t.length;e<n;e++){const n=t[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=e}}}}else{const e=t.morphTargets;void 0!==e&&e.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(t,e){const n=this.geometry,i=this.material,r=this.matrixWorld;if(void 0===i)return;if(null===n.boundingSphere&&n.computeBoundingSphere(),Je.copy(n.boundingSphere),Je.applyMatrix4(r),!1===t.ray.intersectsSphere(Je))return;if(Ye.copy(r).invert(),Ze.copy(t.ray).applyMatrix4(Ye),null!==n.boundingBox&&!1===Ze.intersectsBox(n.boundingBox))return;let s;if(n.isBufferGeometry){const r=n.index,a=n.attributes.position,o=n.morphAttributes.position,l=n.morphTargetsRelative,c=n.attributes.uv,h=n.attributes.uv2,u=n.groups,d=n.drawRange;if(null!==r)if(Array.isArray(i))for(let n=0,p=u.length;n<p;n++){const p=u[n],f=i[p.materialIndex];for(let n=Math.max(p.start,d.start),i=Math.min(p.start+p.count,d.start+d.count);n<i;n+=3){const i=r.getX(n),u=r.getX(n+1),d=r.getX(n+2);s=pn(this,f,t,Ze,a,o,l,c,h,i,u,d),s&&(s.faceIndex=Math.floor(n/3),s.face.materialIndex=p.materialIndex,e.push(s))}}else{for(let n=Math.max(0,d.start),u=Math.min(r.count,d.start+d.count);n<u;n+=3){const u=r.getX(n),d=r.getX(n+1),p=r.getX(n+2);s=pn(this,i,t,Ze,a,o,l,c,h,u,d,p),s&&(s.faceIndex=Math.floor(n/3),e.push(s))}}else if(void 0!==a)if(Array.isArray(i))for(let n=0,r=u.length;n<r;n++){const r=u[n],p=i[r.materialIndex];for(let n=Math.max(r.start,d.start),i=Math.min(r.start+r.count,d.start+d.count);n<i;n+=3){s=pn(this,p,t,Ze,a,o,l,c,h,n,n+1,n+2),s&&(s.faceIndex=Math.floor(n/3),s.face.materialIndex=r.materialIndex,e.push(s))}}else{for(let n=Math.max(0,d.start),r=Math.min(a.count,d.start+d.count);n<r;n+=3){s=pn(this,i,t,Ze,a,o,l,c,h,n,n+1,n+2),s&&(s.faceIndex=Math.floor(n/3),e.push(s))}}}else n.isGeometry&&console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}function pn(t,e,n,i,r,s,a,o,l,c,h,u){Qe.fromBufferAttribute(r,c),Ke.fromBufferAttribute(r,h),$e.fromBufferAttribute(r,u);const d=t.morphTargetInfluences;if(e.morphTargets&&s&&d){rn.set(0,0,0),sn.set(0,0,0),an.set(0,0,0);for(let t=0,e=s.length;t<e;t++){const e=d[t],n=s[t];0!==e&&(tn.fromBufferAttribute(n,c),en.fromBufferAttribute(n,h),nn.fromBufferAttribute(n,u),a?(rn.addScaledVector(tn,e),sn.addScaledVector(en,e),an.addScaledVector(nn,e)):(rn.addScaledVector(tn.sub(Qe),e),sn.addScaledVector(en.sub(Ke),e),an.addScaledVector(nn.sub($e),e)))}Qe.add(rn),Ke.add(sn),$e.add(an)}t.isSkinnedMesh&&(t.boneTransform(c,Qe),t.boneTransform(h,Ke),t.boneTransform(u,$e));const p=function(t,e,n,i,r,s,a,o){let l;if(l=1===e.side?i.intersectTriangle(a,s,r,!0,o):i.intersectTriangle(r,s,a,2!==e.side,o),null===l)return null;un.copy(o),un.applyMatrix4(t.matrixWorld);const c=n.ray.origin.distanceTo(un);return c<n.near||c>n.far?null:{distance:c,point:un.clone(),object:t}}(t,e,n,i,Qe,Ke,$e,hn);if(p){o&&(on.fromBufferAttribute(o,c),ln.fromBufferAttribute(o,h),cn.fromBufferAttribute(o,u),p.uv=be.getUV(hn,Qe,Ke,$e,on,ln,cn,new Z)),l&&(on.fromBufferAttribute(l,c),ln.fromBufferAttribute(l,h),cn.fromBufferAttribute(l,u),p.uv2=be.getUV(hn,Qe,Ke,$e,on,ln,cn,new Z));const t={a:c,b:h,c:u,normal:new st,materialIndex:0};be.getNormal(Qe,Ke,$e,t.normal),p.face=t}return p}dn.prototype.isMesh=!0;class fn extends Xe{constructor(t=1,e=1,n=1,i=1,r=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:i,heightSegments:r,depthSegments:s};const a=this;i=Math.floor(i),r=Math.floor(r),s=Math.floor(s);const o=[],l=[],c=[],h=[];let u=0,d=0;function p(t,e,n,i,r,s,p,f,m,g,v){const y=s/m,_=p/g,x=s/2,w=p/2,b=f/2,M=m+1,S=g+1;let T=0,E=0;const A=new st;for(let s=0;s<S;s++){const a=s*_-w;for(let o=0;o<M;o++){const u=o*y-x;A[t]=u*i,A[e]=a*r,A[n]=b,l.push(A.x,A.y,A.z),A[t]=0,A[e]=0,A[n]=f>0?1:-1,c.push(A.x,A.y,A.z),h.push(o/m),h.push(1-s/g),T+=1}}for(let t=0;t<g;t++)for(let e=0;e<m;e++){const n=u+e+M*t,i=u+e+M*(t+1),r=u+(e+1)+M*(t+1),s=u+(e+1)+M*t;o.push(n,i,s),o.push(i,r,s),E+=6}a.addGroup(d,E,v),d+=E,u+=T}p("z","y","x",-1,-1,n,e,t,s,r,0),p("z","y","x",1,-1,n,e,-t,s,r,1),p("x","z","y",1,1,t,n,e,i,s,2),p("x","z","y",1,-1,t,n,-e,i,s,3),p("x","y","z",1,-1,t,e,n,i,r,4),p("x","y","z",-1,-1,t,e,-n,i,r,5),this.setIndex(o),this.setAttribute("position",new Fe(l,3)),this.setAttribute("normal",new Fe(c,3)),this.setAttribute("uv",new Fe(h,2))}}function mn(t){const e={};for(const n in t){e[n]={};for(const i in t[n]){const r=t[n][i];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?e[n][i]=r.clone():Array.isArray(r)?e[n][i]=r.slice():e[n][i]=r}}return e}function gn(t){const e={};for(let n=0;n<t.length;n++){const i=mn(t[n]);for(const t in i)e[t]=i[t]}return e}const vn={clone:mn,merge:gn};class yn extends Se{constructor(t){super(),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}copy(t){return super.copy(t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=mn(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=Object.assign({},t.extensions),this.glslVersion=t.glslVersion,this}toJSON(t){const e=super.toJSON(t);e.glslVersion=this.glslVersion,e.uniforms={};for(const n in this.uniforms){const i=this.uniforms[n].value;i&&i.isTexture?e.uniforms[n]={type:"t",value:i.toJSON(t).uuid}:i&&i.isColor?e.uniforms[n]={type:"c",value:i.getHex()}:i&&i.isVector2?e.uniforms[n]={type:"v2",value:i.toArray()}:i&&i.isVector3?e.uniforms[n]={type:"v3",value:i.toArray()}:i&&i.isVector4?e.uniforms[n]={type:"v4",value:i.toArray()}:i&&i.isMatrix3?e.uniforms[n]={type:"m3",value:i.toArray()}:i&&i.isMatrix4?e.uniforms[n]={type:"m4",value:i.toArray()}:e.uniforms[n]={value:i}}Object.keys(this.defines).length>0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader;const n={};for(const t in this.extensions)!0===this.extensions[t]&&(n[t]=!0);return Object.keys(n).length>0&&(e.extensions=n),e}}yn.prototype.isShaderMaterial=!0;class _n extends oe{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new Ot,this.projectionMatrix=new Ot,this.projectionMatrixInverse=new Ot}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this}getWorldDirection(t){void 0===t&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),t=new st),this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}_n.prototype.isCamera=!0;class xn extends _n{constructor(t=50,e=1,n=.1,i=2e3){super(),this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const e=.5*this.getFilmHeight()/t;this.fov=2*G*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*k*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*G*Math.atan(Math.tan(.5*k*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(t,e,n,i,r,s){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let e=t*Math.tan(.5*k*this.fov)/this.zoom,n=2*e,i=this.aspect*n,r=-.5*i;const s=this.view;if(null!==this.view&&this.view.enabled){const t=s.fullWidth,a=s.fullHeight;r+=s.offsetX*i/t,e-=s.offsetY*n/a,i*=s.width/t,n*=s.height/a}const a=this.filmOffset;0!==a&&(r+=t*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,e,e-n,t,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}xn.prototype.isPerspectiveCamera=!0;const wn=90;class bn extends oe{constructor(t,e,n){if(super(),this.type="CubeCamera",!0!==n.isWebGLCubeRenderTarget)return void console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");this.renderTarget=n;const i=new xn(wn,1,t,e);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new st(1,0,0)),this.add(i);const r=new xn(wn,1,t,e);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new st(-1,0,0)),this.add(r);const s=new xn(wn,1,t,e);s.layers=this.layers,s.up.set(0,0,1),s.lookAt(new st(0,1,0)),this.add(s);const a=new xn(wn,1,t,e);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(new st(0,-1,0)),this.add(a);const o=new xn(wn,1,t,e);o.layers=this.layers,o.up.set(0,-1,0),o.lookAt(new st(0,0,1)),this.add(o);const l=new xn(wn,1,t,e);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new st(0,0,-1)),this.add(l)}update(t,e){null===this.parent&&this.updateMatrixWorld();const n=this.renderTarget,[i,r,s,a,o,l]=this.children,c=t.xr.enabled,h=t.getRenderTarget();t.xr.enabled=!1;const u=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,t.setRenderTarget(n,0),t.render(e,i),t.setRenderTarget(n,1),t.render(e,r),t.setRenderTarget(n,2),t.render(e,s),t.setRenderTarget(n,3),t.render(e,a),t.setRenderTarget(n,4),t.render(e,o),n.texture.generateMipmaps=u,t.setRenderTarget(n,5),t.render(e,l),t.setRenderTarget(h),t.xr.enabled=c}}class Mn extends tt{constructor(t,e,i,r,s,a,o,l,c,h){super(t=void 0!==t?t:[],e=void 0!==e?e:n,i,r,s,a,o=void 0!==o?o:x,l,c,h),this._needsFlipEnvMap=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}Mn.prototype.isCubeTexture=!0;class Sn extends it{constructor(t,e,n){Number.isInteger(e)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),e=n),super(t,t,e),e=e||{},this.texture=new Mn(void 0,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.encoding),this.texture.generateMipmaps=void 0!==e.generateMipmaps&&e.generateMipmaps,this.texture.minFilter=void 0!==e.minFilter?e.minFilter:d,this.texture._needsFlipEnvMap=!1}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.format=w,this.texture.encoding=e.encoding,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},i=new fn(5,5,5),r=new yn({name:"CubemapFromEquirect",uniforms:mn(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:1,blending:0});r.uniforms.tEquirect.value=e;const s=new dn(i,r),a=e.minFilter;e.minFilter===p&&(e.minFilter=d);return new bn(1,10,this).update(t,s),e.minFilter=a,s.geometry.dispose(),s.material.dispose(),this}clear(t,e,n,i){const r=t.getRenderTarget();for(let r=0;r<6;r++)t.setRenderTarget(this,r),t.clear(e,n,i);t.setRenderTarget(r)}}Sn.prototype.isWebGLCubeRenderTarget=!0;const Tn=new At,En=new st;class An{constructor(t=new ue,e=new ue,n=new ue,i=new ue,r=new ue,s=new ue){this.planes=[t,e,n,i,r,s]}set(t,e,n,i,r,s){const a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(i),a[4].copy(r),a[5].copy(s),this}copy(t){const e=this.planes;for(let n=0;n<6;n++)e[n].copy(t.planes[n]);return this}setFromProjectionMatrix(t){const e=this.planes,n=t.elements,i=n[0],r=n[1],s=n[2],a=n[3],o=n[4],l=n[5],c=n[6],h=n[7],u=n[8],d=n[9],p=n[10],f=n[11],m=n[12],g=n[13],v=n[14],y=n[15];return e[0].setComponents(a-i,h-o,f-u,y-m).normalize(),e[1].setComponents(a+i,h+o,f+u,y+m).normalize(),e[2].setComponents(a+r,h+l,f+d,y+g).normalize(),e[3].setComponents(a-r,h-l,f-d,y-g).normalize(),e[4].setComponents(a-s,h-c,f-p,y-v).normalize(),e[5].setComponents(a+s,h+c,f+p,y+v).normalize(),this}intersectsObject(t){const e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),Tn.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(Tn)}intersectsSprite(t){return Tn.center.set(0,0,0),Tn.radius=.7071067811865476,Tn.applyMatrix4(t.matrixWorld),this.intersectsSphere(Tn)}intersectsSphere(t){const e=this.planes,n=t.center,i=-t.radius;for(let t=0;t<6;t++){if(e[t].distanceToPoint(n)<i)return!1}return!0}intersectsBox(t){const e=this.planes;for(let n=0;n<6;n++){const i=e[n];if(En.x=i.normal.x>0?t.max.x:t.min.x,En.y=i.normal.y>0?t.max.y:t.min.y,En.z=i.normal.z>0?t.max.z:t.min.z,i.distanceToPoint(En)<0)return!1}return!0}containsPoint(t){const e=this.planes;for(let n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function Ln(){let t=null,e=!1,n=null,i=null;function r(e,s){n(e,s),i=t.requestAnimationFrame(r)}return{start:function(){!0!==e&&null!==n&&(i=t.requestAnimationFrame(r),e=!0)},stop:function(){t.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(t){n=t},setContext:function(e){t=e}}}function Rn(t,e){const n=e.isWebGL2,i=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),i.get(t)},remove:function(e){e.isInterleavedBufferAttribute&&(e=e.data);const n=i.get(e);n&&(t.deleteBuffer(n.buffer),i.delete(e))},update:function(e,r){if(e.isGLBufferAttribute){const t=i.get(e);return void((!t||t.version<e.version)&&i.set(e,{buffer:e.buffer,type:e.type,bytesPerElement:e.elementSize,version:e.version}))}e.isInterleavedBufferAttribute&&(e=e.data);const s=i.get(e);void 0===s?i.set(e,function(e,i){const r=e.array,s=e.usage,a=t.createBuffer();t.bindBuffer(i,a),t.bufferData(i,r,s),e.onUploadCallback();let o=5126;return r instanceof Float32Array?o=5126:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?e.isFloat16BufferAttribute?n?o=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):o=5123:r instanceof Int16Array?o=5122:r instanceof Uint32Array?o=5125:r instanceof Int32Array?o=5124:r instanceof Int8Array?o=5120:(r instanceof Uint8Array||r instanceof Uint8ClampedArray)&&(o=5121),{buffer:a,type:o,bytesPerElement:r.BYTES_PER_ELEMENT,version:e.version}}(e,r)):s.version<e.version&&(!function(e,i,r){const s=i.array,a=i.updateRange;t.bindBuffer(r,e),-1===a.count?t.bufferSubData(r,0,s):(n?t.bufferSubData(r,a.offset*s.BYTES_PER_ELEMENT,s,a.offset,a.count):t.bufferSubData(r,a.offset*s.BYTES_PER_ELEMENT,s.subarray(a.offset,a.offset+a.count)),a.count=-1)}(s.buffer,e,r),s.version=e.version)}}}class Cn extends Xe{constructor(t=1,e=1,n=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:i};const r=t/2,s=e/2,a=Math.floor(n),o=Math.floor(i),l=a+1,c=o+1,h=t/a,u=e/o,d=[],p=[],f=[],m=[];for(let t=0;t<c;t++){const e=t*u-s;for(let n=0;n<l;n++){const i=n*h-r;p.push(i,-e,0),f.push(0,0,1),m.push(n/a),m.push(1-t/o)}}for(let t=0;t<o;t++)for(let e=0;e<a;e++){const n=e+l*t,i=e+l*(t+1),r=e+1+l*(t+1),s=e+1+l*t;d.push(n,i,s),d.push(i,r,s)}this.setIndex(d),this.setAttribute("position",new Fe(p,3)),this.setAttribute("normal",new Fe(f,3)),this.setAttribute("uv",new Fe(m,2))}}const Pn={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_maxMipLevel 8.0\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_maxTileSize 256.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );\n\t\tvec2 f = fract( uv );\n\t\tuv += 0.5 - f;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tif ( mipInt < cubeUV_maxMipLevel ) {\n\t\t\tuv.y += 2.0 * cubeUV_maxTileSize;\n\t\t}\n\t\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\n\t\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\n\t\tuv *= texelSize;\n\t\tvec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x += texelSize;\n\t\tvec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.y += texelSize;\n\t\tvec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x -= texelSize;\n\t\tvec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tvec3 tm = mix( tl, tr, f.x );\n\t\tvec3 bm = mix( bl, br, f.x );\n\t\treturn mix( tm, bm, f.y );\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\tenvColor = envMapTexelToLinear( envColor );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tfogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn texture2D( gradientMap, coord ).rgb;\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\n#ifdef REFLECTIVITY\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), rawDiffuseColor, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), rawDiffuseColor, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheen;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat specularRoughness;\n\tvec3 specularColor;\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 sheenColor;\n#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(    0, 1,    0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tccIrradiance *= PI;\n\t\t#endif\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\t#ifdef CLEARCOAT\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifndef USE_MORPHNORMALS\n\t\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\t\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t  f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t  f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = te
Download .txt
gitextract_ezpogxoj/

├── .gitignore
├── LICENSE
├── README.md
├── dist/
│   ├── index.33763982.js
│   ├── index.47c52c93.css
│   ├── index.9fc08b13.css
│   └── index.html
├── package.json
└── src/
    ├── app/
    │   ├── Animations.js
    │   ├── SmoothScroll.js
    │   ├── index.js
    │   └── shaders/
    │       ├── fragment.glsl
    │       └── vertex.glsl
    ├── index.html
    ├── shaders-on-scroll.pug
    └── styles/
        ├── base.css
        └── shaders-on-scroll.sass
Download .txt
SYMBOL INDEX (1511 symbols across 4 files)

FILE: dist/index.33763982.js
  function t (line 1) | function t(t){return t&&t.__esModule?t.default:t}
  class H (line 6) | class H{addEventListener(t,e){void 0===this._listeners&&(this._listeners...
    method addEventListener (line 6) | addEventListener(t,e){void 0===this._listeners&&(this._listeners={});c...
    method hasEventListener (line 6) | hasEventListener(t,e){if(void 0===this._listeners)return!1;const n=thi...
    method removeEventListener (line 6) | removeEventListener(t,e){if(void 0===this._listeners)return;const n=th...
    method dispatchEvent (line 6) | dispatchEvent(t){if(void 0===this._listeners)return;const e=this._list...
  function V (line 6) | function V(){const t=4294967295*Math.random()|0,e=4294967295*Math.random...
  function W (line 6) | function W(t,e,n){return Math.max(e,Math.min(n,t))}
  function j (line 6) | function j(t,e){return(t%e+e)%e}
  function q (line 6) | function q(t,e,n){return(1-n)*t+n*e}
  function X (line 6) | function X(t){return 0==(t&t-1)&&0!==t}
  function Y (line 6) | function Y(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}
  class Z (line 6) | class Z{constructor(t=0,e=0){this.x=t,this.y=e}get width(){return this.x...
    method constructor (line 6) | constructor(t=0,e=0){this.x=t,this.y=e}
    method width (line 6) | get width(){return this.x}
    method width (line 6) | set width(t){this.x=t}
    method height (line 6) | get height(){return this.y}
    method height (line 6) | set height(t){this.y=t}
    method set (line 6) | set(t,e){return this.x=t,this.y=e,this}
    method setScalar (line 6) | setScalar(t){return this.x=t,this.y=t,this}
    method setX (line 6) | setX(t){return this.x=t,this}
    method setY (line 6) | setY(t){return this.y=t,this}
    method setComponent (line 6) | setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;brea...
    method getComponent (line 6) | getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;de...
    method clone (line 6) | clone(){return new this.constructor(this.x,this.y)}
    method copy (line 6) | copy(t){return this.x=t.x,this.y=t.y,this}
    method add (line 6) | add(t,e){return void 0!==e?(console.warn("THREE.Vector2: .add() now on...
    method addScalar (line 6) | addScalar(t){return this.x+=t,this.y+=t,this}
    method addVectors (line 6) | addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}
    method addScaledVector (line 6) | addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}
    method sub (line 6) | sub(t,e){return void 0!==e?(console.warn("THREE.Vector2: .sub() now on...
    method subScalar (line 6) | subScalar(t){return this.x-=t,this.y-=t,this}
    method subVectors (line 6) | subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}
    method multiply (line 6) | multiply(t){return this.x*=t.x,this.y*=t.y,this}
    method multiplyScalar (line 6) | multiplyScalar(t){return this.x*=t,this.y*=t,this}
    method divide (line 6) | divide(t){return this.x/=t.x,this.y/=t.y,this}
    method divideScalar (line 6) | divideScalar(t){return this.multiplyScalar(1/t)}
    method applyMatrix3 (line 6) | applyMatrix3(t){const e=this.x,n=this.y,i=t.elements;return this.x=i[0...
    method min (line 6) | min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),...
    method max (line 6) | max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),...
    method clamp (line 6) | clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Mat...
    method clampScalar (line 6) | clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=M...
    method clampLength (line 6) | clampLength(t,e){const n=this.length();return this.divideScalar(n||1)....
    method floor (line 6) | floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}
    method ceil (line 6) | ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}
    method round (line 6) | round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}
    method roundToZero (line 6) | roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this...
    method negate (line 6) | negate(){return this.x=-this.x,this.y=-this.y,this}
    method dot (line 6) | dot(t){return this.x*t.x+this.y*t.y}
    method cross (line 6) | cross(t){return this.x*t.y-this.y*t.x}
    method lengthSq (line 6) | lengthSq(){return this.x*this.x+this.y*this.y}
    method length (line 6) | length(){return Math.sqrt(this.x*this.x+this.y*this.y)}
    method manhattanLength (line 6) | manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}
    method normalize (line 6) | normalize(){return this.divideScalar(this.length()||1)}
    method angle (line 6) | angle(){return Math.atan2(-this.y,-this.x)+Math.PI}
    method distanceTo (line 6) | distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}
    method distanceToSquared (line 6) | distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y;return e*e+n*n}
    method manhattanDistanceTo (line 6) | manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}
    method setLength (line 6) | setLength(t){return this.normalize().multiplyScalar(t)}
    method lerp (line 6) | lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}
    method lerpVectors (line 6) | lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*...
    method equals (line 6) | equals(t){return t.x===this.x&&t.y===this.y}
    method fromArray (line 6) | fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}
    method toArray (line 6) | toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}
    method fromBufferAttribute (line 6) | fromBufferAttribute(t,e,n){return void 0!==n&&console.warn("THREE.Vect...
    method rotateAround (line 6) | rotateAround(t,e){const n=Math.cos(e),i=Math.sin(e),r=this.x-t.x,s=thi...
    method random (line 6) | random(){return this.x=Math.random(),this.y=Math.random(),this}
  class J (line 6) | class J{constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length...
    method constructor (line 6) | constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&co...
    method set (line 6) | set(t,e,n,i,r,s,a,o,l){const c=this.elements;return c[0]=t,c[1]=i,c[2]...
    method identity (line 6) | identity(){return this.set(1,0,0,0,1,0,0,0,1),this}
    method copy (line 6) | copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],...
    method extractBasis (line 6) | extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMat...
    method setFromMatrix4 (line 6) | setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[...
    method multiply (line 6) | multiply(t){return this.multiplyMatrices(this,t)}
    method premultiply (line 6) | premultiply(t){return this.multiplyMatrices(t,this)}
    method multiplyMatrices (line 6) | multiplyMatrices(t,e){const n=t.elements,i=e.elements,r=this.elements,...
    method multiplyScalar (line 6) | multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t...
    method determinant (line 6) | determinant(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4]...
    method invert (line 6) | invert(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[...
    method transpose (line 6) | transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t...
    method getNormalMatrix (line 6) | getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}
    method transposeIntoArray (line 6) | transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3]...
    method setUvTransform (line 6) | setUvTransform(t,e,n,i,r,s,a){const o=Math.cos(r),l=Math.sin(r);return...
    method scale (line 6) | scale(t,e){const n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=...
    method rotate (line 6) | rotate(t){const e=Math.cos(t),n=Math.sin(t),i=this.elements,r=i[0],s=i...
    method translate (line 6) | translate(t,e){const n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],...
    method equals (line 6) | equals(t){const e=this.elements,n=t.elements;for(let t=0;t<9;t++)if(e[...
    method fromArray (line 6) | fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}
    method toArray (line 6) | toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t...
    method clone (line 6) | clone(){return(new this.constructor).fromArray(this.elements)}
  class K (line 6) | class K{static getDataURL(t){if(/^data:/i.test(t.src))return t.src;if("u...
    method getDataURL (line 6) | static getDataURL(t){if(/^data:/i.test(t.src))return t.src;if("undefin...
  class tt (line 6) | class tt extends H{constructor(t=tt.DEFAULT_IMAGE,e=tt.DEFAULT_MAPPING,n...
    method constructor (line 6) | constructor(t=tt.DEFAULT_IMAGE,e=tt.DEFAULT_MAPPING,n=1001,i=1001,r=10...
    method updateMatrix (line 6) | updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,...
    method clone (line 6) | clone(){return(new this.constructor).copy(this)}
    method copy (line 6) | copy(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipm...
    method toJSON (line 6) | toJSON(t){const e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.tex...
    method dispose (line 6) | dispose(){this.dispatchEvent({type:"dispose"})}
    method transformUv (line 6) | transformUv(t){if(300!==this.mapping)return t;if(t.applyMatrix3(this.m...
    method needsUpdate (line 6) | set needsUpdate(t){!0===t&&this.version++}
  function et (line 6) | function et(t){return"undefined"!=typeof HTMLImageElement&&t instanceof ...
  class nt (line 6) | class nt{constructor(t=0,e=0,n=0,i=1){this.x=t,this.y=e,this.z=n,this.w=...
    method constructor (line 6) | constructor(t=0,e=0,n=0,i=1){this.x=t,this.y=e,this.z=n,this.w=i}
    method width (line 6) | get width(){return this.z}
    method width (line 6) | set width(t){this.z=t}
    method height (line 6) | get height(){return this.w}
    method height (line 6) | set height(t){this.w=t}
    method set (line 6) | set(t,e,n,i){return this.x=t,this.y=e,this.z=n,this.w=i,this}
    method setScalar (line 6) | setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}
    method setX (line 6) | setX(t){return this.x=t,this}
    method setY (line 6) | setY(t){return this.y=t,this}
    method setZ (line 6) | setZ(t){return this.z=t,this}
    method setW (line 6) | setW(t){return this.w=t,this}
    method setComponent (line 6) | setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;brea...
    method getComponent (line 6) | getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;ca...
    method clone (line 6) | clone(){return new this.constructor(this.x,this.y,this.z,this.w)}
    method copy (line 6) | copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t....
    method add (line 6) | add(t,e){return void 0!==e?(console.warn("THREE.Vector4: .add() now on...
    method addScalar (line 6) | addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}
    method addVectors (line 6) | addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,th...
    method addScaledVector (line 6) | addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,...
    method sub (line 6) | sub(t,e){return void 0!==e?(console.warn("THREE.Vector4: .sub() now on...
    method subScalar (line 6) | subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}
    method subVectors (line 6) | subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,th...
    method multiply (line 6) | multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}
    method multiplyScalar (line 6) | multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}
    method applyMatrix4 (line 6) | applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=this.w,s=t.elements...
    method divideScalar (line 6) | divideScalar(t){return this.multiplyScalar(1/t)}
    method setAxisAngleFromQuaternion (line 6) | setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqr...
    method setAxisAngleFromRotationMatrix (line 6) | setAxisAngleFromRotationMatrix(t){let e,n,i,r;const s=.01,a=.1,o=t.ele...
    method min (line 6) | min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),...
    method max (line 6) | max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),...
    method clamp (line 6) | clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Mat...
    method clampScalar (line 6) | clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=M...
    method clampLength (line 6) | clampLength(t,e){const n=this.length();return this.divideScalar(n||1)....
    method floor (line 6) | floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),thi...
    method ceil (line 6) | ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z...
    method round (line 6) | round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),thi...
    method roundToZero (line 6) | roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this...
    method negate (line 6) | negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-t...
    method dot (line 6) | dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}
    method lengthSq (line 6) | lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*thi...
    method length (line 6) | length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+th...
    method manhattanLength (line 6) | manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(th...
    method normalize (line 6) | normalize(){return this.divideScalar(this.length()||1)}
    method setLength (line 6) | setLength(t){return this.normalize().multiplyScalar(t)}
    method lerp (line 6) | lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+...
    method lerpVectors (line 6) | lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*...
    method equals (line 6) | equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}
    method fromArray (line 6) | fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w...
    method toArray (line 6) | toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3...
    method fromBufferAttribute (line 6) | fromBufferAttribute(t,e,n){return void 0!==n&&console.warn("THREE.Vect...
    method random (line 6) | random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math....
  class it (line 6) | class it extends H{constructor(t,e,n){super(),this.width=t,this.height=e...
    method constructor (line 6) | constructor(t,e,n){super(),this.width=t,this.height=e,this.depth=1,thi...
    method setTexture (line 6) | setTexture(t){t.image={width:this.width,height:this.height,depth:this....
    method setSize (line 6) | setSize(t,e,n=1){this.width===t&&this.height===e&&this.depth===n||(thi...
    method clone (line 6) | clone(){return(new this.constructor).copy(this)}
    method copy (line 6) | copy(t){return this.width=t.width,this.height=t.height,this.depth=t.de...
    method dispose (line 6) | dispose(){this.dispatchEvent({type:"dispose"})}
  method constructor (line 6) | constructor(t,e,n){super(t,e);const i=this.texture;this.texture=[];for(l...
  method setSize (line 6) | setSize(t,e,n=1){if(this.width!==t||this.height!==e||this.depth!==n){thi...
  method copy (line 6) | copy(t){this.dispose(),this.width=t.width,this.height=t.height,this.dept...
  method constructor (line 6) | constructor(t,e,n){super(t,e,n),this.samples=4}
  method copy (line 6) | copy(t){return super.copy.call(this,t),this.samples=t.samples,this}
  class rt (line 6) | class rt{constructor(t=0,e=0,n=0,i=1){this._x=t,this._y=e,this._z=n,this...
    method constructor (line 6) | constructor(t=0,e=0,n=0,i=1){this._x=t,this._y=e,this._z=n,this._w=i}
    method slerp (line 6) | static slerp(t,e,n,i){return console.warn("THREE.Quaternion: Static .s...
    method slerpFlat (line 6) | static slerpFlat(t,e,n,i,r,s,a){let o=n[i+0],l=n[i+1],c=n[i+2],h=n[i+3...
    method multiplyQuaternionsFlat (line 6) | static multiplyQuaternionsFlat(t,e,n,i,r,s){const a=n[i],o=n[i+1],l=n[...
    method x (line 6) | get x(){return this._x}
    method x (line 6) | set x(t){this._x=t,this._onChangeCallback()}
    method y (line 6) | get y(){return this._y}
    method y (line 6) | set y(t){this._y=t,this._onChangeCallback()}
    method z (line 6) | get z(){return this._z}
    method z (line 6) | set z(t){this._z=t,this._onChangeCallback()}
    method w (line 6) | get w(){return this._w}
    method w (line 6) | set w(t){this._w=t,this._onChangeCallback()}
    method set (line 6) | set(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._w=i,this._onCh...
    method clone (line 6) | clone(){return new this.constructor(this._x,this._y,this._z,this._w)}
    method copy (line 6) | copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._o...
    method setFromEuler (line 6) | setFromEuler(t,e){if(!t||!t.isEuler)throw new Error("THREE.Quaternion:...
    method setFromAxisAngle (line 6) | setFromAxisAngle(t,e){const n=e/2,i=Math.sin(n);return this._x=t.x*i,t...
    method setFromRotationMatrix (line 6) | setFromRotationMatrix(t){const e=t.elements,n=e[0],i=e[4],r=e[8],s=e[1...
    method setFromUnitVectors (line 6) | setFromUnitVectors(t,e){let n=t.dot(e)+1;return n<Number.EPSILON?(n=0,...
    method angleTo (line 6) | angleTo(t){return 2*Math.acos(Math.abs(W(this.dot(t),-1,1)))}
    method rotateTowards (line 6) | rotateTowards(t,e){const n=this.angleTo(t);if(0===n)return this;const ...
    method identity (line 6) | identity(){return this.set(0,0,0,1)}
    method invert (line 6) | invert(){return this.conjugate()}
    method conjugate (line 6) | conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeC...
    method dot (line 6) | dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}
    method lengthSq (line 6) | lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this...
    method length (line 6) | length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this...
    method normalize (line 6) | normalize(){let t=this.length();return 0===t?(this._x=0,this._y=0,this...
    method multiply (line 6) | multiply(t,e){return void 0!==e?(console.warn("THREE.Quaternion: .mult...
    method premultiply (line 6) | premultiply(t){return this.multiplyQuaternions(t,this)}
    method multiplyQuaternions (line 6) | multiplyQuaternions(t,e){const n=t._x,i=t._y,r=t._z,s=t._w,a=e._x,o=e....
    method slerp (line 6) | slerp(t,e){if(0===e)return this;if(1===e)return this.copy(t);const n=t...
    method slerpQuaternions (line 6) | slerpQuaternions(t,e,n){this.copy(t).slerp(e,n)}
    method equals (line 6) | equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w=...
    method fromArray (line 6) | fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],thi...
    method toArray (line 6) | toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[...
    method fromBufferAttribute (line 6) | fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),th...
    method _onChange (line 6) | _onChange(t){return this._onChangeCallback=t,this}
    method _onChangeCallback (line 6) | _onChangeCallback(){}
  class st (line 6) | class st{constructor(t=0,e=0,n=0){this.x=t,this.y=e,this.z=n}set(t,e,n){...
    method constructor (line 6) | constructor(t=0,e=0,n=0){this.x=t,this.y=e,this.z=n}
    method set (line 6) | set(t,e,n){return void 0===n&&(n=this.z),this.x=t,this.y=e,this.z=n,this}
    method setScalar (line 6) | setScalar(t){return this.x=t,this.y=t,this.z=t,this}
    method setX (line 6) | setX(t){return this.x=t,this}
    method setY (line 6) | setY(t){return this.y=t,this}
    method setZ (line 6) | setZ(t){return this.z=t,this}
    method setComponent (line 6) | setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;brea...
    method getComponent (line 6) | getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;ca...
    method clone (line 6) | clone(){return new this.constructor(this.x,this.y,this.z)}
    method copy (line 6) | copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}
    method add (line 6) | add(t,e){return void 0!==e?(console.warn("THREE.Vector3: .add() now on...
    method addScalar (line 6) | addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}
    method addVectors (line 6) | addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}
    method addScaledVector (line 6) | addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,...
    method sub (line 6) | sub(t,e){return void 0!==e?(console.warn("THREE.Vector3: .sub() now on...
    method subScalar (line 6) | subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}
    method subVectors (line 6) | subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}
    method multiply (line 6) | multiply(t,e){return void 0!==e?(console.warn("THREE.Vector3: .multipl...
    method multiplyScalar (line 6) | multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}
    method multiplyVectors (line 6) | multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e...
    method applyEuler (line 6) | applyEuler(t){return t&&t.isEuler||console.error("THREE.Vector3: .appl...
    method applyAxisAngle (line 6) | applyAxisAngle(t,e){return this.applyQuaternion(ot.setFromAxisAngle(t,...
    method applyMatrix3 (line 6) | applyMatrix3(t){const e=this.x,n=this.y,i=this.z,r=t.elements;return t...
    method applyNormalMatrix (line 6) | applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}
    method applyMatrix4 (line 6) | applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=t.elements,s=1/(r[3...
    method applyQuaternion (line 6) | applyQuaternion(t){const e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,a=t.z,...
    method project (line 6) | project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4...
    method unproject (line 6) | unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).apply...
    method transformDirection (line 6) | transformDirection(t){const e=this.x,n=this.y,i=this.z,r=t.elements;re...
    method divide (line 6) | divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}
    method divideScalar (line 6) | divideScalar(t){return this.multiplyScalar(1/t)}
    method min (line 6) | min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),...
    method max (line 6) | max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),...
    method clamp (line 6) | clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Mat...
    method clampScalar (line 6) | clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=M...
    method clampLength (line 6) | clampLength(t,e){const n=this.length();return this.divideScalar(n||1)....
    method floor (line 6) | floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),thi...
    method ceil (line 6) | ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z...
    method round (line 6) | round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),thi...
    method roundToZero (line 6) | roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this...
    method negate (line 6) | negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}
    method dot (line 6) | dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}
    method lengthSq (line 6) | lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}
    method length (line 6) | length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}
    method manhattanLength (line 6) | manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(th...
    method normalize (line 6) | normalize(){return this.divideScalar(this.length()||1)}
    method setLength (line 6) | setLength(t){return this.normalize().multiplyScalar(t)}
    method lerp (line 6) | lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+...
    method lerpVectors (line 6) | lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*...
    method cross (line 6) | cross(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() no...
    method crossVectors (line 6) | crossVectors(t,e){const n=t.x,i=t.y,r=t.z,s=e.x,a=e.y,o=e.z;return thi...
    method projectOnVector (line 6) | projectOnVector(t){const e=t.lengthSq();if(0===e)return this.set(0,0,0...
    method projectOnPlane (line 6) | projectOnPlane(t){return at.copy(this).projectOnVector(t),this.sub(at)}
    method reflect (line 6) | reflect(t){return this.sub(at.copy(t).multiplyScalar(2*this.dot(t)))}
    method angleTo (line 6) | angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)re...
    method distanceTo (line 6) | distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}
    method distanceToSquared (line 6) | distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;retu...
    method manhattanDistanceTo (line 6) | manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y...
    method setFromSpherical (line 6) | setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,...
    method setFromSphericalCoords (line 6) | setFromSphericalCoords(t,e,n){const i=Math.sin(e)*t;return this.x=i*Ma...
    method setFromCylindrical (line 6) | setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t....
    method setFromCylindricalCoords (line 6) | setFromCylindricalCoords(t,e,n){return this.x=t*Math.sin(e),this.y=n,t...
    method setFromMatrixPosition (line 6) | setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y...
    method setFromMatrixScale (line 6) | setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),n...
    method setFromMatrixColumn (line 6) | setFromMatrixColumn(t,e){return this.fromArray(t.elements,4*e)}
    method setFromMatrix3Column (line 6) | setFromMatrix3Column(t,e){return this.fromArray(t.elements,3*e)}
    method equals (line 6) | equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}
    method fromArray (line 6) | fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}
    method toArray (line 6) | toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}
    method fromBufferAttribute (line 6) | fromBufferAttribute(t,e,n){return void 0!==n&&console.warn("THREE.Vect...
    method random (line 6) | random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math....
  class lt (line 6) | class lt{constructor(t=new st(1/0,1/0,1/0),e=new st(-1/0,-1/0,-1/0)){thi...
    method constructor (line 6) | constructor(t=new st(1/0,1/0,1/0),e=new st(-1/0,-1/0,-1/0)){this.min=t...
    method set (line 6) | set(t,e){return this.min.copy(t),this.max.copy(e),this}
    method setFromArray (line 6) | setFromArray(t){let e=1/0,n=1/0,i=1/0,r=-1/0,s=-1/0,a=-1/0;for(let o=0...
    method setFromBufferAttribute (line 6) | setFromBufferAttribute(t){let e=1/0,n=1/0,i=1/0,r=-1/0,s=-1/0,a=-1/0;f...
    method setFromPoints (line 6) | setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e++)this....
    method setFromCenterAndSize (line 6) | setFromCenterAndSize(t,e){const n=ht.copy(e).multiplyScalar(.5);return...
    method setFromObject (line 6) | setFromObject(t){return this.makeEmpty(),this.expandByObject(t)}
    method clone (line 6) | clone(){return(new this.constructor).copy(this)}
    method copy (line 6) | copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}
    method makeEmpty (line 6) | makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=thi...
    method isEmpty (line 6) | isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.ma...
    method getCenter (line 6) | getCenter(t){return void 0===t&&(console.warn("THREE.Box3: .getCenter(...
    method getSize (line 6) | getSize(t){return void 0===t&&(console.warn("THREE.Box3: .getSize() ta...
    method expandByPoint (line 6) | expandByPoint(t){return this.min.min(t),this.max.max(t),this}
    method expandByVector (line 6) | expandByVector(t){return this.min.sub(t),this.max.add(t),this}
    method expandByScalar (line 6) | expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),...
    method expandByObject (line 6) | expandByObject(t){t.updateWorldMatrix(!1,!1);const e=t.geometry;void 0...
    method containsPoint (line 6) | containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min....
    method containsBox (line 6) | containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.m...
    method getParameter (line 6) | getParameter(t,e){return void 0===e&&(console.warn("THREE.Box3: .getPa...
    method intersectsBox (line 6) | intersectsBox(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max...
    method intersectsSphere (line 6) | intersectsSphere(t){return this.clampPoint(t.center,ht),ht.distanceToS...
    method intersectsPlane (line 6) | intersectsPlane(t){let e,n;return t.normal.x>0?(e=t.normal.x*this.min....
    method intersectsTriangle (line 6) | intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(yt),_t...
    method clampPoint (line 6) | clampPoint(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPo...
    method distanceToPoint (line 6) | distanceToPoint(t){return ht.copy(t).clamp(this.min,this.max).sub(t).l...
    method getBoundingSphere (line 6) | getBoundingSphere(t){return void 0===t&&console.error("THREE.Box3: .ge...
    method intersect (line 6) | intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmp...
    method union (line 6) | union(t){return this.min.min(t.min),this.max.max(t.max),this}
    method applyMatrix4 (line 6) | applyMatrix4(t){return this.isEmpty()||(ct[0].set(this.min.x,this.min....
    method translate (line 6) | translate(t){return this.min.add(t),this.max.add(t),this}
    method equals (line 6) | equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}
  function bt (line 6) | function bt(t,e,n,i,r){for(let s=0,a=t.length-3;s<=a;s+=3){wt.fromArray(...
  class At (line 6) | class At{constructor(t=new st,e=-1){this.center=t,this.radius=e}set(t,e)...
    method constructor (line 6) | constructor(t=new st,e=-1){this.center=t,this.radius=e}
    method set (line 6) | set(t,e){return this.center.copy(t),this.radius=e,this}
    method setFromPoints (line 6) | setFromPoints(t,e){const n=this.center;void 0!==e?n.copy(e):Mt.setFrom...
    method copy (line 6) | copy(t){return this.center.copy(t.center),this.radius=t.radius,this}
    method isEmpty (line 6) | isEmpty(){return this.radius<0}
    method makeEmpty (line 6) | makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}
    method containsPoint (line 6) | containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*...
    method distanceToPoint (line 6) | distanceToPoint(t){return t.distanceTo(this.center)-this.radius}
    method intersectsSphere (line 6) | intersectsSphere(t){const e=this.radius+t.radius;return t.center.dista...
    method intersectsBox (line 6) | intersectsBox(t){return t.intersectsSphere(this)}
    method intersectsPlane (line 6) | intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=th...
    method clampPoint (line 6) | clampPoint(t,e){const n=this.center.distanceToSquared(t);return void 0...
    method getBoundingBox (line 6) | getBoundingBox(t){return void 0===t&&(console.warn("THREE.Sphere: .get...
    method applyMatrix4 (line 6) | applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.ra...
    method translate (line 6) | translate(t){return this.center.add(t),this}
    method expandByPoint (line 6) | expandByPoint(t){Et.subVectors(t,this.center);const e=Et.lengthSq();if...
    method union (line 6) | union(t){return Tt.subVectors(t.center,this.center).normalize().multip...
    method equals (line 6) | equals(t){return t.center.equals(this.center)&&t.radius===this.radius}
    method clone (line 6) | clone(){return(new this.constructor).copy(this)}
  class zt (line 6) | class zt{constructor(t=new st,e=new st(0,0,-1)){this.origin=t,this.direc...
    method constructor (line 6) | constructor(t=new st,e=new st(0,0,-1)){this.origin=t,this.direction=e}
    method set (line 6) | set(t,e){return this.origin.copy(t),this.direction.copy(e),this}
    method copy (line 6) | copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direct...
    method at (line 6) | at(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is n...
    method lookAt (line 6) | lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),t...
    method recast (line 6) | recast(t){return this.origin.copy(this.at(t,Lt)),this}
    method closestPointToPoint (line 6) | closestPointToPoint(t,e){void 0===e&&(console.warn("THREE.Ray: .closes...
    method distanceToPoint (line 6) | distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}
    method distanceSqToPoint (line 6) | distanceSqToPoint(t){const e=Lt.subVectors(t,this.origin).dot(this.dir...
    method distanceSqToSegment (line 6) | distanceSqToSegment(t,e,n,i){Rt.copy(t).add(e).multiplyScalar(.5),Ct.c...
    method intersectSphere (line 6) | intersectSphere(t,e){Lt.subVectors(t.center,this.origin);const n=Lt.do...
    method intersectsSphere (line 6) | intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*...
    method distanceToPlane (line 6) | distanceToPlane(t){const e=t.normal.dot(this.direction);if(0===e)retur...
    method intersectPlane (line 6) | intersectPlane(t,e){const n=this.distanceToPlane(t);return null===n?nu...
    method intersectsPlane (line 6) | intersectsPlane(t){const e=t.distanceToPoint(this.origin);if(0===e)ret...
    method intersectBox (line 6) | intersectBox(t,e){let n,i,r,s,a,o;const l=1/this.direction.x,c=1/this....
    method intersectsBox (line 6) | intersectsBox(t){return null!==this.intersectBox(t,Lt)}
    method intersectTriangle (line 6) | intersectTriangle(t,e,n,i,r){Dt.subVectors(e,t),It.subVectors(n,t),Nt....
    method applyMatrix4 (line 6) | applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.tran...
    method equals (line 6) | equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this...
    method clone (line 6) | clone(){return(new this.constructor).copy(this)}
  class Ot (line 6) | class Ot{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],a...
    method constructor (line 6) | constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],argument...
    method set (line 6) | set(t,e,n,i,r,s,a,o,l,c,h,u,d,p,f,m){const g=this.elements;return g[0]...
    method identity (line 6) | identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}
    method clone (line 6) | clone(){return(new Ot).fromArray(this.elements)}
    method copy (line 6) | copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],...
    method copyPosition (line 6) | copyPosition(t){const e=this.elements,n=t.elements;return e[12]=n[12],...
    method setFromMatrix3 (line 6) | setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,...
    method extractBasis (line 6) | extractBasis(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatr...
    method makeBasis (line 6) | makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n...
    method extractRotation (line 6) | extractRotation(t){const e=this.elements,n=t.elements,i=1/Bt.setFromMa...
    method makeRotationFromEuler (line 6) | makeRotationFromEuler(t){t&&t.isEuler||console.error("THREE.Matrix4: ....
    method makeRotationFromQuaternion (line 6) | makeRotationFromQuaternion(t){return this.compose(Ht,t,Ut)}
    method lookAt (line 6) | lookAt(t,e,n){const i=this.elements;return Vt.subVectors(t,e),0===Vt.l...
    method multiply (line 6) | multiply(t,e){return void 0!==e?(console.warn("THREE.Matrix4: .multipl...
    method premultiply (line 6) | premultiply(t){return this.multiplyMatrices(t,this)}
    method multiplyMatrices (line 6) | multiplyMatrices(t,e){const n=t.elements,i=e.elements,r=this.elements,...
    method multiplyScalar (line 6) | multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t...
    method determinant (line 6) | determinant(){const t=this.elements,e=t[0],n=t[4],i=t[8],r=t[12],s=t[1...
    method transpose (line 6) | transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e...
    method setPosition (line 6) | setPosition(t,e,n){const i=this.elements;return t.isVector3?(i[12]=t.x...
    method invert (line 6) | invert(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[...
    method scale (line 6) | scale(t){const e=this.elements,n=t.x,i=t.y,r=t.z;return e[0]*=n,e[4]*=...
    method getMaxScaleOnAxis (line 6) | getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t...
    method makeTranslation (line 6) | makeTranslation(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1...
    method makeRotationX (line 6) | makeRotationX(t){const e=Math.cos(t),n=Math.sin(t);return this.set(1,0...
    method makeRotationY (line 6) | makeRotationY(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,0...
    method makeRotationZ (line 6) | makeRotationZ(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-...
    method makeRotationAxis (line 6) | makeRotationAxis(t,e){const n=Math.cos(e),i=Math.sin(e),r=1-n,s=t.x,a=...
    method makeScale (line 6) | makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}
    method makeShear (line 6) | makeShear(t,e,n,i,r,s){return this.set(1,n,r,0,t,1,s,0,e,i,1,0,0,0,0,1...
    method compose (line 6) | compose(t,e,n){const i=this.elements,r=e._x,s=e._y,a=e._z,o=e._w,l=r+r...
    method decompose (line 6) | decompose(t,e,n){const i=this.elements;let r=Bt.set(i[0],i[1],i[2]).le...
    method makePerspective (line 6) | makePerspective(t,e,n,i,r,s){void 0===s&&console.warn("THREE.Matrix4: ...
    method makeOrthographic (line 6) | makeOrthographic(t,e,n,i,r,s){const a=this.elements,o=1/(e-t),l=1/(n-i...
    method equals (line 6) | equals(t){const e=this.elements,n=t.elements;for(let t=0;t<16;t++)if(e...
    method fromArray (line 6) | fromArray(t,e=0){for(let n=0;n<16;n++)this.elements[n]=t[n+e];return t...
    method toArray (line 6) | toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t...
  class qt (line 6) | class qt{constructor(t=0,e=0,n=0,i=qt.DefaultOrder){this._x=t,this._y=e,...
    method constructor (line 6) | constructor(t=0,e=0,n=0,i=qt.DefaultOrder){this._x=t,this._y=e,this._z...
    method x (line 6) | get x(){return this._x}
    method x (line 6) | set x(t){this._x=t,this._onChangeCallback()}
    method y (line 6) | get y(){return this._y}
    method y (line 6) | set y(t){this._y=t,this._onChangeCallback()}
    method z (line 6) | get z(){return this._z}
    method z (line 6) | set z(t){this._z=t,this._onChangeCallback()}
    method order (line 6) | get order(){return this._order}
    method order (line 6) | set order(t){this._order=t,this._onChangeCallback()}
    method set (line 6) | set(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._order=i||this....
    method clone (line 6) | clone(){return new this.constructor(this._x,this._y,this._z,this._order)}
    method copy (line 6) | copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._o...
    method setFromRotationMatrix (line 6) | setFromRotationMatrix(t,e,n){const i=t.elements,r=i[0],s=i[4],a=i[8],o...
    method setFromQuaternion (line 6) | setFromQuaternion(t,e,n){return Wt.makeRotationFromQuaternion(t),this....
    method setFromVector3 (line 6) | setFromVector3(t,e){return this.set(t.x,t.y,t.z,e||this._order)}
    method reorder (line 6) | reorder(t){return jt.setFromEuler(this),this.setFromQuaternion(jt,t)}
    method equals (line 6) | equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._or...
    method fromArray (line 6) | fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[...
    method toArray (line 6) | toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[...
    method toVector3 (line 6) | toVector3(t){return t?t.set(this._x,this._y,this._z):new st(this._x,th...
    method _onChange (line 6) | _onChange(t){return this._onChangeCallback=t,this}
    method _onChangeCallback (line 6) | _onChangeCallback(){}
  class Xt (line 6) | class Xt{constructor(){this.mask=1}set(t){this.mask=1<<t|0}enable(t){thi...
    method constructor (line 6) | constructor(){this.mask=1}
    method set (line 6) | set(t){this.mask=1<<t|0}
    method enable (line 6) | enable(t){this.mask|=1<<t|0}
    method enableAll (line 6) | enableAll(){this.mask=-1}
    method toggle (line 6) | toggle(t){this.mask^=1<<t|0}
    method disable (line 6) | disable(t){this.mask&=~(1<<t|0)}
    method disableAll (line 6) | disableAll(){this.mask=0}
    method test (line 6) | test(t){return 0!=(this.mask&t.mask)}
  class oe (line 6) | class oe extends H{constructor(){super(),Object.defineProperty(this,"id"...
    method constructor (line 6) | constructor(){super(),Object.defineProperty(this,"id",{value:Yt++}),th...
    method onBeforeRender (line 6) | onBeforeRender(){}
    method onAfterRender (line 6) | onAfterRender(){}
    method applyMatrix4 (line 6) | applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix...
    method applyQuaternion (line 6) | applyQuaternion(t){return this.quaternion.premultiply(t),this}
    method setRotationFromAxisAngle (line 6) | setRotationFromAxisAngle(t,e){this.quaternion.setFromAxisAngle(t,e)}
    method setRotationFromEuler (line 6) | setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}
    method setRotationFromMatrix (line 6) | setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}
    method setRotationFromQuaternion (line 6) | setRotationFromQuaternion(t){this.quaternion.copy(t)}
    method rotateOnAxis (line 6) | rotateOnAxis(t,e){return Jt.setFromAxisAngle(t,e),this.quaternion.mult...
    method rotateOnWorldAxis (line 6) | rotateOnWorldAxis(t,e){return Jt.setFromAxisAngle(t,e),this.quaternion...
    method rotateX (line 6) | rotateX(t){return this.rotateOnAxis(ne,t)}
    method rotateY (line 6) | rotateY(t){return this.rotateOnAxis(ie,t)}
    method rotateZ (line 6) | rotateZ(t){return this.rotateOnAxis(re,t)}
    method translateOnAxis (line 6) | translateOnAxis(t,e){return Zt.copy(t).applyQuaternion(this.quaternion...
    method translateX (line 6) | translateX(t){return this.translateOnAxis(ne,t)}
    method translateY (line 6) | translateY(t){return this.translateOnAxis(ie,t)}
    method translateZ (line 6) | translateZ(t){return this.translateOnAxis(re,t)}
    method localToWorld (line 6) | localToWorld(t){return t.applyMatrix4(this.matrixWorld)}
    method worldToLocal (line 6) | worldToLocal(t){return t.applyMatrix4(Qt.copy(this.matrixWorld).invert...
    method lookAt (line 6) | lookAt(t,e,n){t.isVector3?Kt.copy(t):Kt.set(t,e,n);const i=this.parent...
    method add (line 6) | add(t){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this....
    method remove (line 6) | remove(t){if(arguments.length>1){for(let t=0;t<arguments.length;t++)th...
    method removeFromParent (line 6) | removeFromParent(){const t=this.parent;return null!==t&&t.remove(this)...
    method clear (line 6) | clear(){for(let t=0;t<this.children.length;t++){const e=this.children[...
    method attach (line 6) | attach(t){return this.updateWorldMatrix(!0,!1),Qt.copy(this.matrixWorl...
    method getObjectById (line 6) | getObjectById(t){return this.getObjectByProperty("id",t)}
    method getObjectByName (line 6) | getObjectByName(t){return this.getObjectByProperty("name",t)}
    method getObjectByProperty (line 6) | getObjectByProperty(t,e){if(this[t]===e)return this;for(let n=0,i=this...
    method getWorldPosition (line 6) | getWorldPosition(t){return void 0===t&&(console.warn("THREE.Object3D: ...
    method getWorldQuaternion (line 6) | getWorldQuaternion(t){return void 0===t&&(console.warn("THREE.Object3D...
    method getWorldScale (line 6) | getWorldScale(t){return void 0===t&&(console.warn("THREE.Object3D: .ge...
    method getWorldDirection (line 6) | getWorldDirection(t){void 0===t&&(console.warn("THREE.Object3D: .getWo...
    method raycast (line 6) | raycast(){}
    method traverse (line 6) | traverse(t){t(this);const e=this.children;for(let n=0,i=e.length;n<i;n...
    method traverseVisible (line 6) | traverseVisible(t){if(!1===this.visible)return;t(this);const e=this.ch...
    method traverseAncestors (line 6) | traverseAncestors(t){const e=this.parent;null!==e&&(t(e),e.traverseAnc...
    method updateMatrix (line 6) | updateMatrix(){this.matrix.compose(this.position,this.quaternion,this....
    method updateMatrixWorld (line 6) | updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this....
    method updateWorldMatrix (line 6) | updateWorldMatrix(t,e){const n=this.parent;if(!0===t&&null!==n&&n.upda...
    method toJSON (line 6) | toJSON(t){const e=void 0===t||"string"==typeof t,n={};e&&(t={geometrie...
    method clone (line 6) | clone(t){return(new this.constructor).copy(this,t)}
    method copy (line 6) | copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy...
  class ue (line 6) | class ue{constructor(t=new st(1,0,0),e=0){this.normal=t,this.constant=e}...
    method constructor (line 6) | constructor(t=new st(1,0,0),e=0){this.normal=t,this.constant=e}
    method set (line 6) | set(t,e){return this.normal.copy(t),this.constant=e,this}
    method setComponents (line 6) | setComponents(t,e,n,i){return this.normal.set(t,e,n),this.constant=i,t...
    method setFromNormalAndCoplanarPoint (line 6) | setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.con...
    method setFromCoplanarPoints (line 6) | setFromCoplanarPoints(t,e,n){const i=le.subVectors(n,e).cross(ce.subVe...
    method copy (line 6) | copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}
    method normalize (line 6) | normalize(){const t=1/this.normal.length();return this.normal.multiply...
    method negate (line 6) | negate(){return this.constant*=-1,this.normal.negate(),this}
    method distanceToPoint (line 6) | distanceToPoint(t){return this.normal.dot(t)+this.constant}
    method distanceToSphere (line 6) | distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}
    method projectPoint (line 6) | projectPoint(t,e){return void 0===e&&(console.warn("THREE.Plane: .proj...
    method intersectLine (line 6) | intersectLine(t,e){void 0===e&&(console.warn("THREE.Plane: .intersectL...
    method intersectsLine (line 6) | intersectsLine(t){const e=this.distanceToPoint(t.start),n=this.distanc...
    method intersectsBox (line 6) | intersectsBox(t){return t.intersectsPlane(this)}
    method intersectsSphere (line 6) | intersectsSphere(t){return t.intersectsPlane(this)}
    method coplanarPoint (line 6) | coplanarPoint(t){return void 0===t&&(console.warn("THREE.Plane: .copla...
    method applyMatrix4 (line 6) | applyMatrix4(t,e){const n=e||he.getNormalMatrix(t),i=this.coplanarPoin...
    method translate (line 6) | translate(t){return this.constant-=t.dot(this.normal),this}
    method equals (line 6) | equals(t){return t.normal.equals(this.normal)&&t.constant===this.const...
    method clone (line 6) | clone(){return(new this.constructor).copy(this)}
  class be (line 6) | class be{constructor(t=new st,e=new st,n=new st){this.a=t,this.b=e,this....
    method constructor (line 6) | constructor(t=new st,e=new st,n=new st){this.a=t,this.b=e,this.c=n}
    method getNormal (line 6) | static getNormal(t,e,n,i){void 0===i&&(console.warn("THREE.Triangle: ....
    method getBarycoord (line 6) | static getBarycoord(t,e,n,i,r){de.subVectors(i,e),pe.subVectors(n,e),f...
    method containsPoint (line 6) | static containsPoint(t,e,n,i){return this.getBarycoord(t,e,n,i,me),me....
    method getUV (line 6) | static getUV(t,e,n,i,r,s,a,o){return this.getBarycoord(t,e,n,i,me),o.s...
    method isFrontFacing (line 6) | static isFrontFacing(t,e,n,i){return de.subVectors(n,e),pe.subVectors(...
    method set (line 6) | set(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this}
    method setFromPointsAndIndices (line 6) | setFromPointsAndIndices(t,e,n,i){return this.a.copy(t[e]),this.b.copy(...
    method clone (line 6) | clone(){return(new this.constructor).copy(this)}
    method copy (line 6) | copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}
    method getArea (line 6) | getArea(){return de.subVectors(this.c,this.b),pe.subVectors(this.a,thi...
    method getMidpoint (line 6) | getMidpoint(t){return void 0===t&&(console.warn("THREE.Triangle: .getM...
    method getNormal (line 6) | getNormal(t){return be.getNormal(this.a,this.b,this.c,t)}
    method getPlane (line 6) | getPlane(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlan...
    method getBarycoord (line 6) | getBarycoord(t,e){return be.getBarycoord(t,this.a,this.b,this.c,e)}
    method getUV (line 6) | getUV(t,e,n,i,r){return be.getUV(t,this.a,this.b,this.c,e,n,i,r)}
    method containsPoint (line 6) | containsPoint(t){return be.containsPoint(t,this.a,this.b,this.c)}
    method isFrontFacing (line 6) | isFrontFacing(t){return be.isFrontFacing(this.a,this.b,this.c,t)}
    method intersectsBox (line 6) | intersectsBox(t){return t.intersectsTriangle(this)}
    method closestPointToPoint (line 6) | closestPointToPoint(t,e){void 0===e&&(console.warn("THREE.Triangle: .c...
    method equals (line 6) | equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(th...
  class Se (line 6) | class Se extends H{constructor(){super(),Object.defineProperty(this,"id"...
    method constructor (line 6) | constructor(){super(),Object.defineProperty(this,"id",{value:Me++}),th...
    method onBuild (line 6) | onBuild(){}
    method onBeforeCompile (line 6) | onBeforeCompile(){}
    method customProgramCacheKey (line 6) | customProgramCacheKey(){return this.onBeforeCompile.toString()}
    method setValues (line 6) | setValues(t){if(void 0!==t)for(const e in t){const n=t[e];if(void 0===...
    method toJSON (line 6) | toJSON(t){const e=void 0===t||"string"==typeof t;e&&(t={textures:{},im...
    method clone (line 6) | clone(){return(new this.constructor).copy(this)}
    method copy (line 6) | copy(t){this.name=t.name,this.fog=t.fog,this.blending=t.blending,this....
    method dispose (line 6) | dispose(){this.dispatchEvent({type:"dispose"})}
    method needsUpdate (line 6) | set needsUpdate(t){!0===t&&this.version++}
  function Le (line 6) | function Le(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5...
  function Re (line 6) | function Re(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.052...
  function Ce (line 6) | function Ce(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}
  class Pe (line 6) | class Pe{constructor(t,e,n){return void 0===e&&void 0===n?this.set(t):th...
    method constructor (line 6) | constructor(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setR...
    method set (line 6) | set(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex...
    method setScalar (line 6) | setScalar(t){return this.r=t,this.g=t,this.b=t,this}
    method setHex (line 6) | setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&2...
    method setRGB (line 6) | setRGB(t,e,n){return this.r=t,this.g=e,this.b=n,this}
    method setHSL (line 6) | setHSL(t,e,n){if(t=j(t,1),e=W(e,0,1),n=W(n,0,1),0===e)this.r=this.g=th...
    method setStyle (line 6) | setStyle(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("T...
    method setColorName (line 6) | setColorName(t){const e=Te[t.toLowerCase()];return void 0!==e?this.set...
    method clone (line 6) | clone(){return new this.constructor(this.r,this.g,this.b)}
    method copy (line 6) | copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}
    method copyGammaToLinear (line 6) | copyGammaToLinear(t,e=2){return this.r=Math.pow(t.r,e),this.g=Math.pow...
    method copyLinearToGamma (line 6) | copyLinearToGamma(t,e=2){const n=e>0?1/e:1;return this.r=Math.pow(t.r,...
    method convertGammaToLinear (line 6) | convertGammaToLinear(t){return this.copyGammaToLinear(this,t),this}
    method convertLinearToGamma (line 6) | convertLinearToGamma(t){return this.copyLinearToGamma(this,t),this}
    method copySRGBToLinear (line 6) | copySRGBToLinear(t){return this.r=Re(t.r),this.g=Re(t.g),this.b=Re(t.b...
    method copyLinearToSRGB (line 6) | copyLinearToSRGB(t){return this.r=Ce(t.r),this.g=Ce(t.g),this.b=Ce(t.b...
    method convertSRGBToLinear (line 6) | convertSRGBToLinear(){return this.copySRGBToLinear(this),this}
    method convertLinearToSRGB (line 6) | convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}
    method getHex (line 6) | getHex(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0}
    method getHexString (line 6) | getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}
    method getHSL (line 6) | getHSL(t){void 0===t&&(console.warn("THREE.Color: .getHSL() target is ...
    method getStyle (line 6) | getStyle(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*thi...
    method offsetHSL (line 6) | offsetHSL(t,e,n){return this.getHSL(Ee),Ee.h+=t,Ee.s+=e,Ee.l+=n,this.s...
    method add (line 6) | add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}
    method addColors (line 6) | addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}
    method addScalar (line 6) | addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}
    method sub (line 6) | sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t...
    method multiply (line 6) | multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}
    method multiplyScalar (line 6) | multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}
    method lerp (line 6) | lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+...
    method lerpColors (line 6) | lerpColors(t,e,n){return this.r=t.r+(e.r-t.r)*n,this.g=t.g+(e.g-t.g)*n...
    method lerpHSL (line 6) | lerpHSL(t,e){this.getHSL(Ee),t.getHSL(Ae);const n=q(Ee.h,Ae.h,e),i=q(E...
    method equals (line 6) | equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}
    method fromArray (line 6) | fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this}
    method toArray (line 6) | toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t}
    method fromBufferAttribute (line 6) | fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this...
    method toJSON (line 6) | toJSON(){return this.getHex()}
  class De (line 6) | class De extends Se{constructor(t){super(),this.type="MeshBasicMaterial"...
    method constructor (line 6) | constructor(t){super(),this.type="MeshBasicMaterial",this.color=new Pe...
    method copy (line 6) | copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,t...
  class ze (line 6) | class ze{constructor(t,e,n){if(Array.isArray(t))throw new TypeError("THR...
    method constructor (line 6) | constructor(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.Buff...
    method onUploadCallback (line 6) | onUploadCallback(){}
    method needsUpdate (line 6) | set needsUpdate(t){!0===t&&this.version++}
    method setUsage (line 6) | setUsage(t){return this.usage=t,this}
    method copy (line 6) | copy(t){return this.name=t.name,this.array=new t.array.constructor(t.a...
    method copyAt (line 6) | copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let i=0,r=this.itemSi...
    method copyArray (line 6) | copyArray(t){return this.array.set(t),this}
    method copyColorsArray (line 6) | copyColorsArray(t){const e=this.array;let n=0;for(let i=0,r=t.length;i...
    method copyVector2sArray (line 6) | copyVector2sArray(t){const e=this.array;let n=0;for(let i=0,r=t.length...
    method copyVector3sArray (line 6) | copyVector3sArray(t){const e=this.array;let n=0;for(let i=0,r=t.length...
    method copyVector4sArray (line 6) | copyVector4sArray(t){const e=this.array;let n=0;for(let i=0,r=t.length...
    method applyMatrix3 (line 6) | applyMatrix3(t){if(2===this.itemSize)for(let e=0,n=this.count;e<n;e++)...
    method applyMatrix4 (line 6) | applyMatrix4(t){for(let e=0,n=this.count;e<n;e++)Ie.x=this.getX(e),Ie....
    method applyNormalMatrix (line 6) | applyNormalMatrix(t){for(let e=0,n=this.count;e<n;e++)Ie.x=this.getX(e...
    method transformDirection (line 6) | transformDirection(t){for(let e=0,n=this.count;e<n;e++)Ie.x=this.getX(...
    method set (line 6) | set(t,e=0){return this.array.set(t,e),this}
    method getX (line 6) | getX(t){return this.array[t*this.itemSize]}
    method setX (line 6) | setX(t,e){return this.array[t*this.itemSize]=e,this}
    method getY (line 6) | getY(t){return this.array[t*this.itemSize+1]}
    method setY (line 6) | setY(t,e){return this.array[t*this.itemSize+1]=e,this}
    method getZ (line 6) | getZ(t){return this.array[t*this.itemSize+2]}
    method setZ (line 6) | setZ(t,e){return this.array[t*this.itemSize+2]=e,this}
    method getW (line 6) | getW(t){return this.array[t*this.itemSize+3]}
    method setW (line 6) | setW(t,e){return this.array[t*this.itemSize+3]=e,this}
    method setXY (line 6) | setXY(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]...
    method setXYZ (line 6) | setXYZ(t,e,n,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t...
    method setXYZW (line 6) | setXYZW(t,e,n,i,r){return t*=this.itemSize,this.array[t+0]=e,this.arra...
    method onUpload (line 6) | onUpload(t){return this.onUploadCallback=t,this}
    method clone (line 6) | clone(){return new this.constructor(this.array,this.itemSize).copy(this)}
    method toJSON (line 6) | toJSON(){const t={itemSize:this.itemSize,type:this.array.constructor.n...
  class Oe (line 6) | class Oe extends ze{constructor(t,e,n){super(new Uint16Array(t),e,n)}}
    method constructor (line 6) | constructor(t,e,n){super(new Uint16Array(t),e,n)}
  class Be (line 6) | class Be extends ze{constructor(t,e,n){super(new Uint32Array(t),e,n)}}
    method constructor (line 6) | constructor(t,e,n){super(new Uint32Array(t),e,n)}
  method constructor (line 6) | constructor(t,e,n){super(new Uint16Array(t),e,n)}
  class Fe (line 6) | class Fe extends ze{constructor(t,e,n){super(new Float32Array(t),e,n)}}
    method constructor (line 6) | constructor(t,e,n){super(new Float32Array(t),e,n)}
  function He (line 6) | function He(t){if(0===t.length)return-1/0;let e=t[0];for(let n=1,i=t.len...
  class Xe (line 6) | class Xe extends H{constructor(){super(),Object.defineProperty(this,"id"...
    method constructor (line 6) | constructor(){super(),Object.defineProperty(this,"id",{value:Ue++}),th...
    method getIndex (line 6) | getIndex(){return this.index}
    method setIndex (line 6) | setIndex(t){return Array.isArray(t)?this.index=new(He(t)>65535?Be:Oe)(...
    method getAttribute (line 6) | getAttribute(t){return this.attributes[t]}
    method setAttribute (line 6) | setAttribute(t,e){return this.attributes[t]=e,this}
    method deleteAttribute (line 6) | deleteAttribute(t){return delete this.attributes[t],this}
    method hasAttribute (line 6) | hasAttribute(t){return void 0!==this.attributes[t]}
    method addGroup (line 6) | addGroup(t,e,n=0){this.groups.push({start:t,count:e,materialIndex:n})}
    method clearGroups (line 6) | clearGroups(){this.groups=[]}
    method setDrawRange (line 6) | setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}
    method applyMatrix4 (line 6) | applyMatrix4(t){const e=this.attributes.position;void 0!==e&&(e.applyM...
    method applyQuaternion (line 6) | applyQuaternion(t){return ke.makeRotationFromQuaternion(t),this.applyM...
    method rotateX (line 6) | rotateX(t){return ke.makeRotationX(t),this.applyMatrix4(ke),this}
    method rotateY (line 6) | rotateY(t){return ke.makeRotationY(t),this.applyMatrix4(ke),this}
    method rotateZ (line 6) | rotateZ(t){return ke.makeRotationZ(t),this.applyMatrix4(ke),this}
    method translate (line 6) | translate(t,e,n){return ke.makeTranslation(t,e,n),this.applyMatrix4(ke...
    method scale (line 6) | scale(t,e,n){return ke.makeScale(t,e,n),this.applyMatrix4(ke),this}
    method lookAt (line 6) | lookAt(t){return Ge.lookAt(t),Ge.updateMatrix(),this.applyMatrix4(Ge.m...
    method center (line 6) | center(){return this.computeBoundingBox(),this.boundingBox.getCenter(V...
    method setFromPoints (line 6) | setFromPoints(t){const e=[];for(let n=0,i=t.length;n<i;n++){const i=t[...
    method computeBoundingBox (line 6) | computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new lt...
    method computeBoundingSphere (line 6) | computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphe...
    method computeFaceNormals (line 6) | computeFaceNormals(){}
    method computeTangents (line 6) | computeTangents(){const t=this.index,e=this.attributes;if(null===t||vo...
    method computeVertexNormals (line 6) | computeVertexNormals(){const t=this.index,e=this.getAttribute("positio...
    method merge (line 6) | merge(t,e){if(!t||!t.isBufferGeometry)return void console.error("THREE...
    method normalizeNormals (line 6) | normalizeNormals(){const t=this.attributes.normal;for(let e=0,n=t.coun...
    method toNonIndexed (line 6) | toNonIndexed(){function t(t,e){const n=t.array,i=t.itemSize,r=t.normal...
    method toJSON (line 6) | toJSON(){const t={metadata:{version:4.5,type:"BufferGeometry",generato...
    method clone (line 6) | clone(){return(new Xe).copy(this)}
    method copy (line 6) | copy(t){this.index=null,this.attributes={},this.morphAttributes={},thi...
    method dispose (line 6) | dispose(){this.dispatchEvent({type:"dispose"})}
  class dn (line 6) | class dn extends oe{constructor(t=new Xe,e=new De){super(),this.type="Me...
    method constructor (line 6) | constructor(t=new Xe,e=new De){super(),this.type="Mesh",this.geometry=...
    method copy (line 6) | copy(t){return super.copy(t),void 0!==t.morphTargetInfluences&&(this.m...
    method updateMorphTargets (line 6) | updateMorphTargets(){const t=this.geometry;if(t.isBufferGeometry){cons...
    method raycast (line 6) | raycast(t,e){const n=this.geometry,i=this.material,r=this.matrixWorld;...
  function pn (line 6) | function pn(t,e,n,i,r,s,a,o,l,c,h,u){Qe.fromBufferAttribute(r,c),Ke.from...
  class fn (line 6) | class fn extends Xe{constructor(t=1,e=1,n=1,i=1,r=1,s=1){super(),this.ty...
    method constructor (line 6) | constructor(t=1,e=1,n=1,i=1,r=1,s=1){super(),this.type="BoxGeometry",t...
  function mn (line 6) | function mn(t){const e={};for(const n in t){e[n]={};for(const i in t[n])...
  function gn (line 6) | function gn(t){const e={};for(let n=0;n<t.length;n++){const i=mn(t[n]);f...
  class yn (line 6) | class yn extends Se{constructor(t){super(),this.type="ShaderMaterial",th...
    method constructor (line 6) | constructor(t){super(),this.type="ShaderMaterial",this.defines={},this...
    method copy (line 6) | copy(t){return super.copy(t),this.fragmentShader=t.fragmentShader,this...
    method toJSON (line 6) | toJSON(t){const e=super.toJSON(t);e.glslVersion=this.glslVersion,e.uni...
  class _n (line 6) | class _n extends oe{constructor(){super(),this.type="Camera",this.matrix...
    method constructor (line 6) | constructor(){super(),this.type="Camera",this.matrixWorldInverse=new O...
    method copy (line 6) | copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrix...
    method getWorldDirection (line 6) | getWorldDirection(t){void 0===t&&(console.warn("THREE.Camera: .getWorl...
    method updateMatrixWorld (line 6) | updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInvers...
    method updateWorldMatrix (line 6) | updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldIn...
    method clone (line 6) | clone(){return(new this.constructor).copy(this)}
  class xn (line 6) | class xn extends _n{constructor(t=50,e=1,n=.1,i=2e3){super(),this.type="...
    method constructor (line 6) | constructor(t=50,e=1,n=.1,i=2e3){super(),this.type="PerspectiveCamera"...
    method copy (line 6) | copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this....
    method setFocalLength (line 6) | setFocalLength(t){const e=.5*this.getFilmHeight()/t;this.fov=2*G*Math....
    method getFocalLength (line 6) | getFocalLength(){const t=Math.tan(.5*k*this.fov);return.5*this.getFilm...
    method getEffectiveFOV (line 6) | getEffectiveFOV(){return 2*G*Math.atan(Math.tan(.5*k*this.fov)/this.zo...
    method getFilmWidth (line 6) | getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}
    method getFilmHeight (line 6) | getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}
    method setViewOffset (line 6) | setViewOffset(t,e,n,i,r,s){this.aspect=t/e,null===this.view&&(this.vie...
    method clearViewOffset (line 6) | clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.update...
    method updateProjectionMatrix (line 6) | updateProjectionMatrix(){const t=this.near;let e=t*Math.tan(.5*k*this....
    method toJSON (line 6) | toJSON(t){const e=super.toJSON(t);return e.object.fov=this.fov,e.objec...
  class bn (line 6) | class bn extends oe{constructor(t,e,n){if(super(),this.type="CubeCamera"...
    method constructor (line 6) | constructor(t,e,n){if(super(),this.type="CubeCamera",!0!==n.isWebGLCub...
    method update (line 6) | update(t,e){null===this.parent&&this.updateMatrixWorld();const n=this....
  class Mn (line 6) | class Mn extends tt{constructor(t,e,i,r,s,a,o,l,c,h){super(t=void 0!==t?...
    method constructor (line 6) | constructor(t,e,i,r,s,a,o,l,c,h){super(t=void 0!==t?t:[],e=void 0!==e?...
    method images (line 6) | get images(){return this.image}
    method images (line 6) | set images(t){this.image=t}
  class Sn (line 6) | class Sn extends it{constructor(t,e,n){Number.isInteger(e)&&(console.war...
    method constructor (line 6) | constructor(t,e,n){Number.isInteger(e)&&(console.warn("THREE.WebGLCube...
    method fromEquirectangularTexture (line 6) | fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture....
    method clear (line 6) | clear(t,e,n,i){const r=t.getRenderTarget();for(let r=0;r<6;r++)t.setRe...
  class An (line 6) | class An{constructor(t=new ue,e=new ue,n=new ue,i=new ue,r=new ue,s=new ...
    method constructor (line 6) | constructor(t=new ue,e=new ue,n=new ue,i=new ue,r=new ue,s=new ue){thi...
    method set (line 6) | set(t,e,n,i,r,s){const a=this.planes;return a[0].copy(t),a[1].copy(e),...
    method copy (line 6) | copy(t){const e=this.planes;for(let n=0;n<6;n++)e[n].copy(t.planes[n])...
    method setFromProjectionMatrix (line 6) | setFromProjectionMatrix(t){const e=this.planes,n=t.elements,i=n[0],r=n...
    method intersectsObject (line 6) | intersectsObject(t){const e=t.geometry;return null===e.boundingSphere&...
    method intersectsSprite (line 6) | intersectsSprite(t){return Tn.center.set(0,0,0),Tn.radius=.70710678118...
    method intersectsSphere (line 6) | intersectsSphere(t){const e=this.planes,n=t.center,i=-t.radius;for(let...
    method intersectsBox (line 6) | intersectsBox(t){const e=this.planes;for(let n=0;n<6;n++){const i=e[n]...
    method containsPoint (line 6) | containsPoint(t){const e=this.planes;for(let n=0;n<6;n++)if(e[n].dista...
    method clone (line 6) | clone(){return(new this.constructor).copy(this)}
  function Ln (line 6) | function Ln(){let t=null,e=!1,n=null,i=null;function r(e,s){n(e,s),i=t.r...
  function Rn (line 6) | function Rn(t,e){const n=e.isWebGL2,i=new WeakMap;return{get:function(t)...
  class Cn (line 6) | class Cn extends Xe{constructor(t=1,e=1,n=1,i=1){super(),this.type="Plan...
    method constructor (line 6) | constructor(t=1,e=1,n=1,i=1){super(),this.type="PlaneGeometry",this.pa...
  function Nn (line 6) | function Nn(t,e,n,i,s){const a=new Pe(0);let o,l,c=0,h=null,u=0,d=null;f...
  function zn (line 6) | function zn(t,e,n,i){const r=t.getParameter(34921),s=i.isWebGL2?null:e.g...
  function On (line 6) | function On(t,e,n,i){const r=i.isWebGL2;let s;this.setMode=function(t){s...
  function Bn (line 6) | function Bn(t,e,n){let i;function r(e){if("highp"===e){if(t.getShaderPre...
  function Fn (line 6) | function Fn(t){const e=this;let n=null,i=0,r=!1,s=!1;const a=new ue,o=ne...
  function Hn (line 6) | function Hn(t){let e=new WeakMap;function r(t,e){return 303===e?t.mappin...
  function Un (line 6) | function Un(t){const e={};function n(n){if(void 0!==e[n])return e[n];let...
  function kn (line 6) | function kn(t,e,n,i){const r={},s=new WeakMap;function a(t){const o=t.ta...
  function Gn (line 6) | function Gn(t,e,n,i){const r=i.isWebGL2;let s,a,o;this.setMode=function(...
  function Vn (line 6) | function Vn(t){const e={frame:0,calls:0,triangles:0,points:0,lines:0};re...
  function Wn (line 6) | function Wn(t,e){return t[0]-e[0]}
  function jn (line 6) | function jn(t,e){return Math.abs(e[1])-Math.abs(t[1])}
  function qn (line 6) | function qn(t){const e={},n=new Float32Array(8),i=[];for(let t=0;t<8;t++...
  function Xn (line 6) | function Xn(t,e,n,i){let r=new WeakMap;function s(t){const e=t.target;e....
  class Yn (line 6) | class Yn extends tt{constructor(t=null,e=1,n=1,i=1){super(null),this.ima...
    method constructor (line 6) | constructor(t=null,e=1,n=1,i=1){super(null),this.image={data:t,width:e...
  class Zn (line 6) | class Zn extends tt{constructor(t=null,e=1,n=1,i=1){super(null),this.ima...
    method constructor (line 6) | constructor(t=null,e=1,n=1,i=1){super(null),this.image={data:t,width:e...
  function si (line 6) | function si(t,e,n){const i=t[0];if(i<=0||i>0)return t;const r=e*n;let s=...
  function ai (line 6) | function ai(t,e){if(t.length!==e.length)return!1;for(let n=0,i=t.length;...
  function oi (line 6) | function oi(t,e){for(let n=0,i=e.length;n<i;n++)t[n]=e[n]}
  function li (line 6) | function li(t,e){let n=ei[e];void 0===n&&(n=new Int32Array(e),ei[e]=n);f...
  function ci (line 6) | function ci(t,e){const n=this.cache;n[0]!==e&&(t.uniform1f(this.addr,e),...
  function hi (line 6) | function hi(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e...
  function ui (line 6) | function ui(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e...
  function di (line 6) | function di(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e...
  function pi (line 6) | function pi(t,e){const n=this.cache,i=e.elements;if(void 0===i){if(ai(n,...
  function fi (line 6) | function fi(t,e){const n=this.cache,i=e.elements;if(void 0===i){if(ai(n,...
  function mi (line 6) | function mi(t,e){const n=this.cache,i=e.elements;if(void 0===i){if(ai(n,...
  function gi (line 6) | function gi(t,e){const n=this.cache;n[0]!==e&&(t.uniform1i(this.addr,e),...
  function vi (line 6) | function vi(t,e){const n=this.cache;ai(n,e)||(t.uniform2iv(this.addr,e),...
  function yi (line 6) | function yi(t,e){const n=this.cache;ai(n,e)||(t.uniform3iv(this.addr,e),...
  function _i (line 6) | function _i(t,e){const n=this.cache;ai(n,e)||(t.uniform4iv(this.addr,e),...
  function xi (line 6) | function xi(t,e){const n=this.cache;n[0]!==e&&(t.uniform1ui(this.addr,e)...
  function wi (line 6) | function wi(t,e){const n=this.cache;ai(n,e)||(t.uniform2uiv(this.addr,e)...
  function bi (line 6) | function bi(t,e){const n=this.cache;ai(n,e)||(t.uniform3uiv(this.addr,e)...
  function Mi (line 6) | function Mi(t,e){const n=this.cache;ai(n,e)||(t.uniform4uiv(this.addr,e)...
  function Si (line 6) | function Si(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r...
  function Ti (line 6) | function Ti(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r...
  function Ei (line 6) | function Ei(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r...
  function Ai (line 6) | function Ai(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r...
  function Li (line 6) | function Li(t,e){t.uniform1fv(this.addr,e)}
  function Ri (line 6) | function Ri(t,e){const n=si(e,this.size,2);t.uniform2fv(this.addr,n)}
  function Ci (line 6) | function Ci(t,e){const n=si(e,this.size,3);t.uniform3fv(this.addr,n)}
  function Pi (line 6) | function Pi(t,e){const n=si(e,this.size,4);t.uniform4fv(this.addr,n)}
  function Di (line 6) | function Di(t,e){const n=si(e,this.size,4);t.uniformMatrix2fv(this.addr,...
  function Ii (line 6) | function Ii(t,e){const n=si(e,this.size,9);t.uniformMatrix3fv(this.addr,...
  function Ni (line 6) | function Ni(t,e){const n=si(e,this.size,16);t.uniformMatrix4fv(this.addr...
  function zi (line 6) | function zi(t,e){t.uniform1iv(this.addr,e)}
  function Oi (line 6) | function Oi(t,e){t.uniform2iv(this.addr,e)}
  function Bi (line 6) | function Bi(t,e){t.uniform3iv(this.addr,e)}
  function Fi (line 6) | function Fi(t,e){t.uniform4iv(this.addr,e)}
  function Hi (line 6) | function Hi(t,e){t.uniform1uiv(this.addr,e)}
  function Ui (line 6) | function Ui(t,e){t.uniform2uiv(this.addr,e)}
  function ki (line 6) | function ki(t,e){t.uniform3uiv(this.addr,e)}
  function Gi (line 6) | function Gi(t,e){t.uniform4uiv(this.addr,e)}
  function Vi (line 6) | function Vi(t,e,n){const i=e.length,r=li(n,i);t.uniform1iv(this.addr,r);...
  function Wi (line 6) | function Wi(t,e,n){const i=e.length,r=li(n,i);t.uniform1iv(this.addr,r);...
  function ji (line 6) | function ji(t,e,n){this.id=t,this.addr=n,this.cache=[],this.setValue=fun...
  function qi (line 6) | function qi(t,e,n){this.id=t,this.addr=n,this.cache=[],this.size=e.size,...
  function Xi (line 6) | function Xi(t){this.id=t,this.seq=[],this.map={}}
  function Zi (line 6) | function Zi(t,e){t.seq.push(e),t.map[e.id]=e}
  function Ji (line 6) | function Ji(t,e,n){const i=t.name,r=i.length;for(Yi.lastIndex=0;;){const...
  function Qi (line 6) | function Qi(t,e){this.seq=[],this.map={};const n=t.getProgramParameter(e...
  function Ki (line 6) | function Ki(t,e,n){const i=t.createShader(e);return t.shaderSource(i,n),...
  function tr (line 6) | function tr(t){switch(t){case P:return["Linear","( value )"];case D:retu...
  function er (line 6) | function er(t,e,n){const i=t.getShaderParameter(e,35713),r=t.getShaderIn...
  function nr (line 6) | function nr(t,e){const n=tr(e);return"vec4 "+t+"( vec4 value ) { return ...
  function ir (line 6) | function ir(t,e){const n=tr(e);return"vec4 "+t+"( vec4 value ) { return ...
  function rr (line 6) | function rr(t,e){let n;switch(e){case 1:n="Linear";break;case 2:n="Reinh...
  function sr (line 6) | function sr(t){return""!==t}
  function ar (line 6) | function ar(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).repl...
  function or (line 6) | function or(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPl...
  function cr (line 6) | function cr(t){return t.replace(lr,hr)}
  function hr (line 6) | function hr(t,e){const n=Pn[e];if(void 0===n)throw new Error("Can not re...
  function pr (line 6) | function pr(t){return t.replace(dr,mr).replace(ur,fr)}
  function fr (line 6) | function fr(t,e,n,i){return console.warn("WebGLProgram: #pragma unroll_l...
  function mr (line 6) | function mr(t,e,n,i){let r="";for(let t=parseInt(e);t<parseInt(n);t++)r+...
  function gr (line 6) | function gr(t){let e="precision "+t.precision+" float;\nprecision "+t.pr...
  function vr (line 6) | function vr(t,e,a,o){const l=t.getContext(),c=a.defines;let h=a.vertexSh...
  function yr (line 6) | function yr(t,e,n,i,a,o){const l=[],c=i.isWebGL2,h=i.logarithmicDepthBuf...
  function _r (line 6) | function _r(){let t=new WeakMap;return{get:function(e){let n=t.get(e);re...
  function xr (line 6) | function xr(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.group...
  function wr (line 6) | function wr(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.group...
  function br (line 6) | function br(t){const e=[];let n=0;const i=[],r=[],s=[],a={id:-1};functio...
  function Mr (line 6) | function Mr(t){let e=new WeakMap;return{get:function(n,i){let r;return!1...
  function Sr (line 6) | function Sr(){const t={};return{get:function(e){if(void 0!==t[e.id])retu...
  function Er (line 6) | function Er(t,e){return(e.castShadow?1:0)-(t.castShadow?1:0)}
  function Ar (line 6) | function Ar(t,e){const n=new Sr,i=function(){const t={};return{get:funct...
  function Lr (line 6) | function Lr(t,e){const n=new Ar(t,e),i=[],r=[];return{init:function(){i....
  function Rr (line 6) | function Rr(t,e){let n=new WeakMap;return{get:function(i,r=0){let s;retu...
  class Cr (line 6) | class Cr extends Se{constructor(t){super(),this.type="MeshDepthMaterial"...
    method constructor (line 6) | constructor(t){super(),this.type="MeshDepthMaterial",this.depthPacking...
    method copy (line 6) | copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.mor...
  class Pr (line 6) | class Pr extends Se{constructor(t){super(),this.type="MeshDistanceMateri...
    method constructor (line 6) | constructor(t){super(),this.type="MeshDistanceMaterial",this.reference...
    method copy (line 6) | copy(t){return super.copy(t),this.referencePosition.copy(t.referencePo...
  function Dr (line 6) | function Dr(t,e,n){let i=new An;const r=new Z,s=new Z,a=new nt,o=[],l=[]...
  function Ir (line 6) | function Ir(t,n,i){const r=i.isWebGL2;const s=new function(){let e=!1;co...
  function Nr (line 6) | function Nr(t,e,n,i,r,s,f){const S=r.isWebGL2,T=r.maxTextures,E=r.maxCub...
  function zr (line 6) | function zr(t,e,n){const i=n.isWebGL2;return{convert:function(t){let n;i...
  class Or (line 6) | class Or extends xn{constructor(t=[]){super(),this.cameras=t}}
    method constructor (line 6) | constructor(t=[]){super(),this.cameras=t}
  class Br (line 6) | class Br extends oe{constructor(){super(),this.type="Group"}}
    method constructor (line 6) | constructor(){super(),this.type="Group"}
  class Hr (line 6) | class Hr{constructor(){this._targetRay=null,this._grip=null,this._hand=n...
    method constructor (line 6) | constructor(){this._targetRay=null,this._grip=null,this._hand=null}
    method getHandSpace (line 6) | getHandSpace(){return null===this._hand&&(this._hand=new Br,this._hand...
    method getTargetRaySpace (line 6) | getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=ne...
    method getGripSpace (line 6) | getGripSpace(){return null===this._grip&&(this._grip=new Br,this._grip...
    method dispatchEvent (line 6) | dispatchEvent(t){return null!==this._targetRay&&this._targetRay.dispat...
    method disconnect (line 6) | disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),...
    method update (line 6) | update(t,e,n){let i=null,r=null,s=null;const a=this._targetRay,o=this....
  class Ur (line 6) | class Ur extends H{constructor(t,e){super();const n=this,i=t.state;let r...
    method constructor (line 6) | constructor(t,e){super();const n=this,i=t.state;let r=null,s=1,a=null,...
  function kr (line 6) | function kr(t){function e(e,n){e.opacity.value=n.opacity,n.color&&e.diff...
  function Gr (line 6) | function Gr(t){const e=void 0!==(t=t||{}).canvas?t.canvas:function(){con...
  class Vr (line 6) | class Vr{constructor(t,e=25e-5){this.name="",this.color=new Pe(t),this.d...
    method constructor (line 6) | constructor(t,e=25e-5){this.name="",this.color=new Pe(t),this.density=e}
    method clone (line 6) | clone(){return new Vr(this.color,this.density)}
    method toJSON (line 6) | toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this....
  class Wr (line 6) | class Wr{constructor(t,e=1,n=1e3){this.name="",this.color=new Pe(t),this...
    method constructor (line 6) | constructor(t,e=1,n=1e3){this.name="",this.color=new Pe(t),this.near=e...
    method clone (line 6) | clone(){return new Wr(this.color,this.near,this.far)}
    method toJSON (line 6) | toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,fa...
  class jr (line 6) | class jr extends oe{constructor(){super(),this.type="Scene",this.backgro...
    method constructor (line 6) | constructor(){super(),this.type="Scene",this.background=null,this.envi...
    method copy (line 6) | copy(t,e){return super.copy(t,e),null!==t.background&&(this.background...
    method toJSON (line 6) | toJSON(t){const e=super.toJSON(t);return null!==this.background&&(e.ob...
  class qr (line 6) | class qr{constructor(t,e){this.array=t,this.stride=e,this.count=void 0!=...
    method constructor (line 6) | constructor(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.le...
    method onUploadCallback (line 6) | onUploadCallback(){}
    method needsUpdate (line 6) | set needsUpdate(t){!0===t&&this.version++}
    method setUsage (line 6) | setUsage(t){return this.usage=t,this}
    method copy (line 6) | copy(t){return this.array=new t.array.constructor(t.array),this.count=...
    method copyAt (line 6) | copyAt(t,e,n){t*=this.stride,n*=e.stride;for(let i=0,r=this.stride;i<r...
    method set (line 6) | set(t,e=0){return this.array.set(t,e),this}
    method clone (line 6) | clone(t){void 0===t.arrayBuffers&&(t.arrayBuffers={}),void 0===this.ar...
    method onUpload (line 6) | onUpload(t){return this.onUploadCallback=t,this}
    method toJSON (line 6) | toJSON(t){return void 0===t.arrayBuffers&&(t.arrayBuffers={}),void 0==...
  class Yr (line 6) | class Yr{constructor(t,e,n,i){this.name="",this.data=t,this.itemSize=e,t...
    method constructor (line 6) | constructor(t,e,n,i){this.name="",this.data=t,this.itemSize=e,this.off...
    method count (line 6) | get count(){return this.data.count}
    method array (line 6) | get array(){return this.data.array}
    method needsUpdate (line 6) | set needsUpdate(t){this.data.needsUpdate=t}
    method applyMatrix4 (line 6) | applyMatrix4(t){for(let e=0,n=this.data.count;e<n;e++)Xr.x=this.getX(e...
    method applyNormalMatrix (line 6) | applyNormalMatrix(t){for(let e=0,n=this.count;e<n;e++)Xr.x=this.getX(e...
    method transformDirection (line 6) | transformDirection(t){for(let e=0,n=this.count;e<n;e++)Xr.x=this.getX(...
    method setX (line 6) | setX(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this}
    method setY (line 6) | setY(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,t...
    method setZ (line 6) | setZ(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,t...
    method setW (line 6) | setW(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,t...
    method getX (line 6) | getX(t){return this.data.array[t*this.data.stride+this.offset]}
    method getY (line 6) | getY(t){return this.data.array[t*this.data.stride+this.offset+1]}
    method getZ (line 6) | getZ(t){return this.data.array[t*this.data.stride+this.offset+2]}
    method getW (line 6) | getW(t){return this.data.array[t*this.data.stride+this.offset+3]}
    method setXY (line 6) | setXY(t,e,n){return t=t*this.data.stride+this.offset,this.data.array[t...
    method setXYZ (line 6) | setXYZ(t,e,n,i){return t=t*this.data.stride+this.offset,this.data.arra...
    method setXYZW (line 6) | setXYZW(t,e,n,i,r){return t=t*this.data.stride+this.offset,this.data.a...
    method clone (line 6) | clone(t){if(void 0===t){console.log("THREE.InterleavedBufferAttribute....
    method toJSON (line 6) | toJSON(t){if(void 0===t){console.log("THREE.InterleavedBufferAttribute...
  class Zr (line 6) | class Zr extends Se{constructor(t){super(),this.type="SpriteMaterial",th...
    method constructor (line 6) | constructor(t){super(),this.type="SpriteMaterial",this.color=new Pe(16...
    method copy (line 6) | copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,t...
  class cs (line 6) | class cs extends oe{constructor(t){if(super(),this.type="Sprite",void 0=...
    method constructor (line 6) | constructor(t){if(super(),this.type="Sprite",void 0===Jr){Jr=new Xe;co...
    method raycast (line 6) | raycast(t,e){null===t.camera&&console.error('THREE.Sprite: "Raycaster....
    method copy (line 6) | copy(t){return super.copy(t),void 0!==t.center&&this.center.copy(t.cen...
  function hs (line 6) | function hs(t,e,n,i,r,s){ts.subVectors(t,n).addScalar(.5).multiply(i),vo...
  class gs (line 6) | class gs extends dn{constructor(t,e){super(t,e),this.type="SkinnedMesh",...
    method constructor (line 6) | constructor(t,e){super(t,e),this.type="SkinnedMesh",this.bindMode="att...
    method copy (line 6) | copy(t){return super.copy(t),this.bindMode=t.bindMode,this.bindMatrix....
    method bind (line 6) | bind(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this...
    method pose (line 6) | pose(){this.skeleton.pose()}
    method normalizeSkinWeights (line 6) | normalizeSkinWeights(){const t=new nt,e=this.geometry.attributes.skinW...
    method updateMatrixWorld (line 6) | updateMatrixWorld(t){super.updateMatrixWorld(t),"attached"===this.bind...
    method boneTransform (line 6) | boneTransform(t,e){const n=this.skeleton,i=this.geometry;ds.fromBuffer...
  class vs (line 6) | class vs extends oe{constructor(){super(),this.type="Bone"}}
    method constructor (line 6) | constructor(){super(),this.type="Bone"}
  class ys (line 6) | class ys extends tt{constructor(t,e,n,i,r,s,a,o,l,h,u,d){super(null,s,a,...
    method constructor (line 6) | constructor(t,e,n,i,r,s,a,o,l,h,u,d){super(null,s,a,o,l,h,i,r,u,d),thi...
  class Ms (line 6) | class Ms extends dn{constructor(t,e,n){super(t,e),this.instanceMatrix=ne...
    method constructor (line 6) | constructor(t,e,n){super(t,e),this.instanceMatrix=new ze(new Float32Ar...
    method copy (line 6) | copy(t){return super.copy(t),this.instanceMatrix.copy(t.instanceMatrix...
    method getColorAt (line 6) | getColorAt(t,e){e.fromArray(this.instanceColor.array,3*t)}
    method getMatrixAt (line 6) | getMatrixAt(t,e){e.fromArray(this.instanceMatrix.array,16*t)}
    method raycast (line 6) | raycast(t,e){const n=this.matrixWorld,i=this.count;if(bs.geometry=this...
    method setColorAt (line 6) | setColorAt(t,e){null===this.instanceColor&&(this.instanceColor=new ze(...
    method setMatrixAt (line 6) | setMatrixAt(t,e){e.toArray(this.instanceMatrix.array,16*t)}
    method updateMorphTargets (line 6) | updateMorphTargets(){}
    method dispose (line 6) | dispose(){this.dispatchEvent({type:"dispose"})}
  class Ss (line 6) | class Ss extends Se{constructor(t){super(),this.type="LineBasicMaterial"...
    method constructor (line 6) | constructor(t){super(),this.type="LineBasicMaterial",this.color=new Pe...
    method copy (line 6) | copy(t){return super.copy(t),this.color.copy(t.color),this.linewidth=t...
  class Cs (line 6) | class Cs extends oe{constructor(t=new Xe,e=new Ss){super(),this.type="Li...
    method constructor (line 6) | constructor(t=new Xe,e=new Ss){super(),this.type="Line",this.geometry=...
    method copy (line 6) | copy(t){return super.copy(t),this.material=t.material,this.geometry=t....
    method computeLineDistances (line 6) | computeLineDistances(){const t=this.geometry;if(t.isBufferGeometry)if(...
    method raycast (line 6) | raycast(t,e){const n=this.geometry,i=this.matrixWorld,r=t.params.Line....
    method updateMorphTargets (line 6) | updateMorphTargets(){const t=this.geometry;if(t.isBufferGeometry){cons...
  class Is (line 6) | class Is extends Cs{constructor(t,e){super(t,e),this.type="LineSegments"...
    method constructor (line 6) | constructor(t,e){super(t,e),this.type="LineSegments"}
    method computeLineDistances (line 6) | computeLineDistances(){const t=this.geometry;if(t.isBufferGeometry)if(...
  class Ns (line 6) | class Ns extends Cs{constructor(t,e){super(t,e),this.type="LineLoop"}}
    method constructor (line 6) | constructor(t,e){super(t,e),this.type="LineLoop"}
  class zs (line 6) | class zs extends Se{constructor(t){super(),this.type="PointsMaterial",th...
    method constructor (line 6) | constructor(t){super(),this.type="PointsMaterial",this.color=new Pe(16...
    method copy (line 6) | copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,t...
  class Us (line 6) | class Us extends oe{constructor(t=new Xe,e=new zs){super(),this.type="Po...
    method constructor (line 6) | constructor(t=new Xe,e=new zs){super(),this.type="Points",this.geometr...
    method copy (line 6) | copy(t){return super.copy(t),this.material=t.material,this.geometry=t....
    method raycast (line 6) | raycast(t,e){const n=this.geometry,i=this.matrixWorld,r=t.params.Point...
    method updateMorphTargets (line 6) | updateMorphTargets(){const t=this.geometry;if(t.isBufferGeometry){cons...
  function ks (line 6) | function ks(t,e,n,i,r,s,a){const o=Bs.distanceSqToPoint(t);if(o<n){const...
  method constructor (line 6) | constructor(t,e,n,i,r,s,a,o,l){super(t,e,n,i,r,s,a,o,l),this.format=void...
  method clone (line 6) | clone(){return new this.constructor(this.image).copy(this)}
  method update (line 6) | update(){const t=this.image;!1==="requestVideoFrameCallback"in t&&t.read...
  class Gs (line 6) | class Gs extends tt{constructor(t,e,n,i,r,s,a,o,l,c,h,u){super(null,s,a,...
    method constructor (line 6) | constructor(t,e,n,i,r,s,a,o,l,c,h,u){super(null,s,a,o,l,c,i,r,h,u),thi...
  method constructor (line 6) | constructor(t,e,n,i,r,s,a,o,l){super(t,e,n,i,r,s,a,o,l),this.needsUpdate...
  method constructor (line 6) | constructor(t,e,n,i,r,s,a,o,l,h){if((h=void 0!==h?h:b)!==b&&h!==M)throw ...
  class Vs (line 6) | class Vs extends Xe{constructor(t,e,n=1,i=0){super(),this.type="Polyhedr...
    method constructor (line 6) | constructor(t,e,n=1,i=0){super(),this.type="PolyhedronGeometry",this.p...
  function js (line 6) | function js(t,e,n,i,r){let s,a;if(r===function(t,e,n,i){let r=0;for(let ...
  function qs (line 6) | function qs(t,e){if(!t)return t;e||(e=t);let n,i=t;do{if(n=!1,i.steiner|...
  function Xs (line 6) | function Xs(t,e,n,i,r,s,a){if(!t)return;!a&&s&&function(t,e,n,i){let r=t...
  function Ys (line 6) | function Ys(t){const e=t.prev,n=t,i=t.next;if(sa(e,n,i)>=0)return!1;let ...
  function Zs (line 6) | function Zs(t,e,n,i){const r=t.prev,s=t,a=t.next;if(sa(r,s,a)>=0)return!...
  function Js (line 6) | function Js(t,e,n){let i=t;do{const r=i.prev,s=i.next.next;!aa(r,s)&&oa(...
  function Qs (line 6) | function Qs(t,e,n,i,r,s){let a=t;do{let t=a.next.next;for(;t!==a.prev;){...
  function Ks (line 6) | function Ks(t,e){return t.x-e.x}
  function $s (line 6) | function $s(t,e){if(e=function(t,e){let n=e;const i=t.x,r=t.y;let s,a=-1...
  function ta (line 6) | function ta(t,e){return sa(t.prev,t,e.prev)<0&&sa(e.next,t,t.next)<0}
  function ea (line 6) | function ea(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&(...
  function na (line 6) | function na(t){let e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.n...
  function ia (line 6) | function ia(t,e,n,i,r,s,a,o){return(r-a)*(e-o)-(t-a)*(s-o)>=0&&(t-a)*(i-...
  function ra (line 6) | function ra(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){l...
  function sa (line 6) | function sa(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}
  function aa (line 6) | function aa(t,e){return t.x===e.x&&t.y===e.y}
  function oa (line 6) | function oa(t,e,n,i){const r=ca(sa(t,e,n)),s=ca(sa(t,e,i)),a=ca(sa(n,i,t...
  function la (line 6) | function la(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)...
  function ca (line 6) | function ca(t){return t>0?1:t<0?-1:0}
  function ha (line 6) | function ha(t,e){return sa(t.prev,t,t.next)<0?sa(t,e,t.next)>=0&&sa(t,t....
  function ua (line 6) | function ua(t,e){const n=new fa(t.i,t.x,t.y),i=new fa(e.i,e.x,e.y),r=t.n...
  function da (line 6) | function da(t,e,n,i){const r=new fa(t,e,n);return i?(r.next=i.next,r.pre...
  function pa (line 6) | function pa(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.n...
  function fa (line 6) | function fa(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=n...
  class ma (line 6) | class ma{static area(t){const e=t.length;let n=0;for(let i=e-1,r=0;r<e;i...
    method area (line 6) | static area(t){const e=t.length;let n=0;for(let i=e-1,r=0;r<e;i=r++)n+...
    method isClockWise (line 6) | static isClockWise(t){return ma.area(t)<0}
    method triangulateShape (line 6) | static triangulateShape(t,e){const n=[],i=[],r=[];ga(t),va(n,t);let s=...
  function ga (line 6) | function ga(t){const e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}
  function va (line 6) | function va(t,e){for(let n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}
  class ya (line 6) | class ya extends Xe{constructor(t,e){super(),this.type="ExtrudeGeometry"...
    method constructor (line 6) | constructor(t,e){super(),this.type="ExtrudeGeometry",this.parameters={...
    method toJSON (line 6) | toJSON(){const t=super.toJSON();return function(t,e,n){if(n.shapes=[],...
  class xa (line 6) | class xa extends Vs{constructor(t=1,e=0){const n=(1+Math.sqrt(5))/2;supe...
    method constructor (line 6) | constructor(t=1,e=0){const n=(1+Math.sqrt(5))/2;super([-1,n,0,1,n,0,-1...
  class wa (line 6) | class wa extends Xe{constructor(t,e=12){super(),this.type="ShapeGeometry...
    method constructor (line 6) | constructor(t,e=12){super(),this.type="ShapeGeometry",this.parameters=...
    method toJSON (line 6) | toJSON(){const t=super.toJSON();return function(t,e){if(e.shapes=[],Ar...
  class ba (line 6) | class ba extends Se{constructor(t){super(),this.type="ShadowMaterial",th...
    method constructor (line 6) | constructor(t){super(),this.type="ShadowMaterial",this.color=new Pe(0)...
    method copy (line 6) | copy(t){return super.copy(t),this.color.copy(t.color),this}
  class Ma (line 6) | class Ma extends yn{constructor(t){super(t),this.type="RawShaderMaterial"}}
    method constructor (line 6) | constructor(t){super(t),this.type="RawShaderMaterial"}
  class Sa (line 6) | class Sa extends Se{constructor(t){super(),this.defines={STANDARD:""},th...
    method constructor (line 6) | constructor(t){super(),this.defines={STANDARD:""},this.type="MeshStand...
    method copy (line 6) | copy(t){return super.copy(t),this.defines={STANDARD:""},this.color.cop...
  class Ta (line 6) | class Ta extends Sa{constructor(t){super(),this.defines={STANDARD:"",PHY...
    method constructor (line 6) | constructor(t){super(),this.defines={STANDARD:"",PHYSICAL:""},this.typ...
    method copy (line 6) | copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},th...
  class Ea (line 6) | class Ea extends Se{constructor(t){super(),this.type="MeshPhongMaterial"...
    method constructor (line 6) | constructor(t){super(),this.type="MeshPhongMaterial",this.color=new Pe...
    method copy (line 6) | copy(t){return super.copy(t),this.color.copy(t.color),this.specular.co...
  class Aa (line 6) | class Aa extends Se{constructor(t){super(),this.defines={TOON:""},this.t...
    method constructor (line 6) | constructor(t){super(),this.defines={TOON:""},this.type="MeshToonMater...
    method copy (line 6) | copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,t...
  class La (line 6) | class La extends Se{constructor(t){super(),this.type="MeshNormalMaterial...
    method constructor (line 6) | constructor(t){super(),this.type="MeshNormalMaterial",this.bumpMap=nul...
    method copy (line 6) | copy(t){return super.copy(t),this.bumpMap=t.bumpMap,this.bumpScale=t.b...
  class Ra (line 6) | class Ra extends Se{constructor(t){super(),this.type="MeshLambertMateria...
    method constructor (line 6) | constructor(t){super(),this.type="MeshLambertMaterial",this.color=new ...
    method copy (line 6) | copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,t...
  class Ca (line 6) | class Ca extends Se{constructor(t){super(),this.defines={MATCAP:""},this...
    method constructor (line 6) | constructor(t){super(),this.defines={MATCAP:""},this.type="MeshMatcapM...
    method copy (line 6) | copy(t){return super.copy(t),this.defines={MATCAP:""},this.color.copy(...
  class Pa (line 6) | class Pa extends Ss{constructor(t){super(),this.type="LineDashedMaterial...
    method constructor (line 6) | constructor(t){super(),this.type="LineDashedMaterial",this.scale=1,thi...
    method copy (line 6) | copy(t){return super.copy(t),this.scale=t.scale,this.dashSize=t.dashSi...
  class Ia (line 6) | class Ia{constructor(t,e,n,i){this.parameterPositions=t,this._cachedInde...
    method constructor (line 6) | constructor(t,e,n,i){this.parameterPositions=t,this._cachedIndex=0,thi...
    method evaluate (line 6) | evaluate(t){const e=this.parameterPositions;let n=this._cachedIndex,i=...
    method getSettings_ (line 6) | getSettings_(){return this.settings||this.DefaultSettings_}
    method copySampleValue_ (line 6) | copySampleValue_(t){const e=this.resultBuffer,n=this.sampleValues,i=th...
    method interpolate_ (line 6) | interpolate_(){throw new Error("call to abstract method")}
    method intervalChanged_ (line 6) | intervalChanged_(){}
  class Na (line 6) | class Na extends Ia{constructor(t,e,n,i){super(t,e,n,i),this._weightPrev...
    method constructor (line 6) | constructor(t,e,n,i){super(t,e,n,i),this._weightPrev=-0,this._offsetPr...
    method intervalChanged_ (line 6) | intervalChanged_(t,e,n){const i=this.parameterPositions;let r=t-2,s=t+...
    method interpolate_ (line 6) | interpolate_(t,e,n,i){const r=this.resultBuffer,s=this.sampleValues,a=...
  class za (line 6) | class za extends Ia{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e...
    method constructor (line 6) | constructor(t,e,n,i){super(t,e,n,i)}
    method interpolate_ (line 6) | interpolate_(t,e,n,i){const r=this.resultBuffer,s=this.sampleValues,a=...
  class Oa (line 6) | class Oa extends Ia{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t){...
    method constructor (line 6) | constructor(t,e,n,i){super(t,e,n,i)}
    method interpolate_ (line 6) | interpolate_(t){return this.copySampleValue_(t-1)}
  class Ba (line 6) | class Ba{constructor(t,e,n,i){if(void 0===t)throw new Error("THREE.Keyfr...
    method constructor (line 6) | constructor(t,e,n,i){if(void 0===t)throw new Error("THREE.KeyframeTrac...
    method toJSON (line 6) | static toJSON(t){const e=t.constructor;let n;if(e.toJSON!==this.toJSON...
    method InterpolantFactoryMethodDiscrete (line 6) | InterpolantFactoryMethodDiscrete(t){return new Oa(this.times,this.valu...
    method InterpolantFactoryMethodLinear (line 6) | InterpolantFactoryMethodLinear(t){return new za(this.times,this.values...
    method InterpolantFactoryMethodSmooth (line 6) | InterpolantFactoryMethodSmooth(t){return new Na(this.times,this.values...
    method setInterpolation (line 6) | setInterpolation(t){let e;switch(t){case S:e=this.InterpolantFactoryMe...
    method getInterpolation (line 6) | getInterpolation(){switch(this.createInterpolant){case this.Interpolan...
    method getValueSize (line 6) | getValueSize(){return this.values.length/this.times.length}
    method shift (line 6) | shift(t){if(0!==t){const e=this.times;for(let n=0,i=e.length;n!==i;++n...
    method scale (line 6) | scale(t){if(1!==t){const e=this.times;for(let n=0,i=e.length;n!==i;++n...
    method trim (line 6) | trim(t,e){const n=this.times,i=n.length;let r=0,s=i-1;for(;r!==i&&n[r]...
    method validate (line 6) | validate(){let t=!0;const e=this.getValueSize();e-Math.floor(e)!=0&&(c...
    method optimize (line 6) | optimize(){const t=Da.arraySlice(this.times),e=Da.arraySlice(this.valu...
    method clone (line 6) | clone(){const t=Da.arraySlice(this.times,0),e=Da.arraySlice(this.value...
  class Fa (line 6) | class Fa extends Ba{}
  class Ha (line 6) | class Ha extends Ba{}
  class Ua (line 6) | class Ua extends Ba{}
  class ka (line 6) | class ka extends Ia{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e...
    method constructor (line 6) | constructor(t,e,n,i){super(t,e,n,i)}
    method interpolate_ (line 6) | interpolate_(t,e,n,i){const r=this.resultBuffer,s=this.sampleValues,a=...
  class Ga (line 6) | class Ga extends Ba{InterpolantFactoryMethodLinear(t){return new ka(this...
    method InterpolantFactoryMethodLinear (line 6) | InterpolantFactoryMethodLinear(t){return new ka(this.times,this.values...
  class Va (line 6) | class Va extends Ba{}
  class Wa (line 6) | class Wa extends Ba{}
  class ja (line 6) | class ja{constructor(t,e=-1,n,i=2500){this.name=t,this.tracks=n,this.dur...
    method constructor (line 6) | constructor(t,e=-1,n,i=2500){this.name=t,this.tracks=n,this.duration=e...
    method parse (line 6) | static parse(t){const e=[],n=t.tracks,i=1/(t.fps||1);for(let t=0,r=n.l...
    method toJSON (line 6) | static toJSON(t){const e=[],n=t.tracks,i={name:t.name,duration:t.durat...
    method CreateFromMorphTargetSequence (line 6) | static CreateFromMorphTargetSequence(t,e,n,i){const r=e.length,s=[];fo...
    method findByName (line 6) | static findByName(t,e){let n=t;if(!Array.isArray(t)){const e=t;n=e.geo...
    method CreateClipsFromMorphTargetSequences (line 6) | static CreateClipsFromMorphTargetSequences(t,e,n){const i={},r=/^([\w-...
    method parseAnimation (line 6) | static parseAnimation(t,e){if(!t)return console.error("THREE.Animation...
    method resetDuration (line 6) | resetDuration(){let t=0;for(let e=0,n=this.tracks.length;e!==n;++e){co...
    method trim (line 6) | trim(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this...
    method validate (line 6) | validate(){let t=!0;for(let e=0;e<this.tracks.length;e++)t=t&&this.tra...
    method optimize (line 6) | optimize(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].optimiz...
    method clone (line 6) | clone(){const t=[];for(let e=0;e<this.tracks.length;e++)t.push(this.tr...
    method toJSON (line 6) | toJSON(){return this.constructor.toJSON(this)}
  function qa (line 6) | function qa(t){if(void 0===t.type)throw new Error("THREE.KeyframeTrack: ...
  class Ya (line 6) | class Ya{constructor(t,e,n){const i=this;let r,s=!1,a=0,o=0;const l=[];t...
    method constructor (line 6) | constructor(t,e,n){const i=this;let r,s=!1,a=0,o=0;const l=[];this.onS...
  class Ja (line 6) | class Ja{constructor(t){this.manager=void 0!==t?t:Za,this.crossOrigin="a...
    method constructor (line 6) | constructor(t){this.manager=void 0!==t?t:Za,this.crossOrigin="anonymou...
    method load (line 6) | load(){}
    method loadAsync (line 6) | loadAsync(t,e){const n=this;return new Promise((function(i,r){n.load(t...
    method parse (line 6) | parse(){}
    method setCrossOrigin (line 6) | setCrossOrigin(t){return this.crossOrigin=t,this}
    method setWithCredentials (line 6) | setWithCredentials(t){return this.withCredentials=t,this}
    method setPath (line 6) | setPath(t){return this.path=t,this}
    method setResourcePath (line 6) | setResourcePath(t){return this.resourcePath=t,this}
    method setRequestHeader (line 6) | setRequestHeader(t){return this.requestHeader=t,this}
  class Ka (line 6) | class Ka extends Ja{constructor(t){super(t)}load(t,e,n,i){void 0===t&&(t...
    method constructor (line 6) | constructor(t){super(t)}
    method load (line 6) | load(t,e,n,i){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t...
    method setResponseType (line 6) | setResponseType(t){return this.responseType=t,this}
    method setMimeType (line 6) | setMimeType(t){return this.mimeType=t,this}
  class $a (line 6) | class $a extends Ja{constructor(t){super(t)}load(t,e,n,i){void 0!==this....
    method constructor (line 6) | constructor(t){super(t)}
    method load (line 6) | load(t,e,n,i){void 0!==this.path&&(t=this.path+t),t=this.manager.resol...
  class to (line 6) | class to extends Ja{constructor(t){super(t)}load(t,e,n,i){const r=new Mn...
    method constructor (line 6) | constructor(t){super(t)}
    method load (line 6) | load(t,e,n,i){const r=new Mn,s=new $a(this.manager);s.setCrossOrigin(t...
  class eo (line 6) | class eo extends Ja{constructor(t){super(t)}load(t,e,n,i){const r=new tt...
    method constructor (line 6) | constructor(t){super(t)}
    method load (line 6) | load(t,e,n,i){const r=new tt,s=new $a(this.manager);return s.setCrossO...
  class no (line 6) | class no{constructor(){this.type="Curve",this.arcLengthDivisions=200}get...
    method constructor (line 6) | constructor(){this.type="Curve",this.arcLengthDivisions=200}
    method getPoint (line 6) | getPoint(){return console.warn("THREE.Curve: .getPoint() not implement...
    method getPointAt (line 6) | getPointAt(t,e){const n=this.getUtoTmapping(t);return this.getPoint(n,e)}
    method getPoints (line 6) | getPoints(t=5){const e=[];for(let n=0;n<=t;n++)e.push(this.getPoint(n/...
    method getSpacedPoints (line 6) | getSpacedPoints(t=5){const e=[];for(let n=0;n<=t;n++)e.push(this.getPo...
    method getLength (line 6) | getLength(){const t=this.getLengths();return t[t.length-1]}
    method getLengths (line 6) | getLengths(t=this.arcLengthDivisions){if(this.cacheArcLengths&&this.ca...
    method updateArcLengths (line 6) | updateArcLengths(){this.needsUpdate=!0,this.getLengths()}
    method getUtoTmapping (line 6) | getUtoTmapping(t,e){const n=this.getLengths();let i=0;const r=n.length...
    method getTangent (line 6) | getTangent(t,e){const n=1e-4;let i=t-n,r=t+n;i<0&&(i=0),r>1&&(r=1);con...
    method getTangentAt (line 6) | getTangentAt(t,e){const n=this.getUtoTmapping(t);return this.getTangen...
    method computeFrenetFrames (line 6) | computeFrenetFrames(t,e){const n=new st,i=[],r=[],s=[],a=new st,o=new ...
    method clone (line 6) | clone(){return(new this.constructor).copy(this)}
    method copy (line 6) | copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}
    method toJSON (line 6) | toJSON(){const t={metadata:{version:4.5,type:"Curve",generator:"Curve....
    method fromJSON (line 6) | fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}
  class io (line 6) | class io extends no{constructor(t=0,e=0,n=1,i=1,r=0,s=2*Math.PI,a=!1,o=0...
    method constructor (line 6) | constructor(t=0,e=0,n=1,i=1,r=0,s=2*Math.PI,a=!1,o=0){super(),this.typ...
    method getPoint (line 6) | getPoint(t,e){const n=e||new Z,i=2*Math.PI;let r=this.aEndAngle-this.a...
    method copy (line 6) | copy(t){return super.copy(t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t....
    method toJSON (line 6) | toJSON(){const t=super.toJSON();return t.aX=this.aX,t.aY=this.aY,t.xRa...
    method fromJSON (line 6) | fromJSON(t){return super.fromJSON(t),this.aX=t.aX,this.aY=t.aY,this.xR...
  class ro (line 6) | class ro extends io{constructor(t,e,n,i,r,s){super(t,e,n,n,i,r,s),this.t...
    method constructor (line 6) | constructor(t,e,n,i,r,s){super(t,e,n,n,i,r,s),this.type="ArcCurve"}
  function so (line 6) | function so(){let t=0,e=0,n=0,i=0;function r(r,s,a,o){t=r,e=a,n=-3*r+3*s...
  class ho (line 6) | class ho extends no{constructor(t=[],e=!1,n="centripetal",i=.5){super(),...
    method constructor (line 6) | constructor(t=[],e=!1,n="centripetal",i=.5){super(),this.type="Catmull...
    method getPoint (line 6) | getPoint(t,e=new st){const n=e,i=this.points,r=i.length,s=(r-(this.clo...
    method copy (line 6) | copy(t){super.copy(t),this.points=[];for(let e=0,n=t.points.length;e<n...
    method toJSON (line 6) | toJSON(){const t=super.toJSON();t.points=[];for(let e=0,n=this.points....
    method fromJSON (line 6) | fromJSON(t){super.fromJSON(t),this.points=[];for(let e=0,n=t.points.le...
  function uo (line 6) | function uo(t,e,n,i,r){const s=.5*(i-e),a=.5*(r-n),o=t*t;return(2*n-2*i+...
  function po (line 6) | function po(t,e,n,i){return function(t,e){const n=1-t;return n*n*e}(t,e)...
  function fo (line 6) | function fo(t,e,n,i,r){return function(t,e){const n=1-t;return n*n*n*e}(...
  class mo (line 6) | class mo extends no{constructor(t=new Z,e=new Z,n=new Z,i=new Z){super()...
    method constructor (line 6) | constructor(t=new Z,e=new Z,n=new Z,i=new Z){super(),this.type="CubicB...
    method getPoint (line 6) | getPoint(t,e=new Z){const n=e,i=this.v0,r=this.v1,s=this.v2,a=this.v3;...
    method copy (line 6) | copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),thi...
    method toJSON (line 6) | toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=thi...
    method fromJSON (line 6) | fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.f...
  class go (line 6) | class go extends no{constructor(t=new st,e=new st,n=new st,i=new st){sup...
    method constructor (line 6) | constructor(t=new st,e=new st,n=new st,i=new st){super(),this.type="Cu...
    method getPoint (line 6) | getPoint(t,e=new st){const n=e,i=this.v0,r=this.v1,s=this.v2,a=this.v3...
    method copy (line 6) | copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),thi...
    method toJSON (line 6) | toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=thi...
    method fromJSON (line 6) | fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.f...
  class vo (line 6) | class vo extends no{constructor(t=new Z,e=new Z){super(),this.type="Line...
    method constructor (line 6) | constructor(t=new Z,e=new Z){super(),this.type="LineCurve",this.v1=t,t...
    method getPoint (line 6) | getPoint(t,e=new Z){const n=e;return 1===t?n.copy(this.v2):(n.copy(thi...
    method getPointAt (line 6) | getPointAt(t,e){return this.getPoint(t,e)}
    method getTangent (line 6) | getTangent(t,e){const n=e||new Z;return n.copy(this.v2).sub(this.v1).n...
    method copy (line 6) | copy(t){return super.copy(t),this.v1.copy(t.v1),this.v2.copy(t.v2),this}
    method toJSON (line 6) | toJSON(){const t=super.toJSON();return t.v1=this.v1.toArray(),t.v2=thi...
    method fromJSON (line 6) | fromJSON(t){return super.fromJSON(t),this.v1.fromArray(t.v1),this.v2.f...
  class yo (line 6) | class yo extends no{constructor(t=new Z,e=new Z,n=new Z){super(),this.ty...
    method constructor (line 6) | constructor(t=new Z,e=new Z,n=new Z){super(),this.type="QuadraticBezie...
    method getPoint (line 6) | getPoint(t,e=new Z){const n=e,i=this.v0,r=this.v1,s=this.v2;return n.s...
    method copy (line 6) | copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),thi...
    method toJSON (line 6) | toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=thi...
    method fromJSON (line 6) | fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.f...
  class _o (line 6) | class _o extends no{constructor(t=new st,e=new st,n=new st){super(),this...
    method constructor (line 6) | constructor(t=new st,e=new st,n=new st){super(),this.type="QuadraticBe...
    method getPoint (line 6) | getPoint(t,e=new st){const n=e,i=this.v0,r=this.v1,s=this.v2;return n....
    method copy (line 6) | copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),thi...
    method toJSON (line 6) | toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=thi...
    method fromJSON (line 6) | fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.f...
  class xo (line 6) | class xo extends no{constructor(t=[]){super(),this.type="SplineCurve",th...
    method constructor (line 6) | constructor(t=[]){super(),this.type="SplineCurve",this.points=t}
    method getPoint (line 6) | getPoint(t,e=new Z){const n=e,i=this.points,r=(i.length-1)*t,s=Math.fl...
    method copy (line 6) | copy(t){super.copy(t),this.points=[];for(let e=0,n=t.points.length;e<n...
    method toJSON (line 6) | toJSON(){const t=super.toJSON();t.points=[];for(let e=0,n=this.points....
    method fromJSON (line 6) | fromJSON(t){super.fromJSON(t),this.points=[];for(let e=0,n=t.points.le...
  method constructor (line 6) | constructor(t=new st,e=new st){super(),this.type="LineCurve3",this.isLin...
  method getPoint (line 6) | getPoint(t,e=new st){const n=e;return 1===t?n.copy(this.v2):(n.copy(this...
  method getPointAt (line 6) | getPointAt(t,e){return this.getPoint(t,e)}
  method copy (line 6) | copy(t){return super.copy(t),this.v1.copy(t.v1),this.v2.copy(t.v2),this}
  method toJSON (line 6) | toJSON(){const t=super.toJSON();return t.v1=this.v1.toArray(),t.v2=this....
  method fromJSON (line 6) | fromJSON(t){return super.fromJSON(t),this.v1.fromArray(t.v1),this.v2.fro...
  class bo (line 6) | class bo extends no{constructor(){super(),this.type="CurvePath",this.cur...
    method constructor (line 6) | constructor(){super(),this.type="CurvePath",this.curves=[],this.autoCl...
    method add (line 6) | add(t){this.curves.push(t)}
    method closePath (line 6) | closePath(){const t=this.curves[0].getPoint(0),e=this.curves[this.curv...
    method getPoint (line 6) | getPoint(t){const e=t*this.getLength(),n=this.getCurveLengths();let i=...
    method getLength (line 6) | getLength(){const t=this.getCurveLengths();return t[t.length-1]}
    method updateArcLengths (line 6) | updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.get...
    method getCurveLengths (line 6) | getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===thi...
    method getSpacedPoints (line 6) | getSpacedPoints(t=40){const e=[];for(let n=0;n<=t;n++)e.push(this.getP...
    method getPoints (line 6) | getPoints(t=12){const e=[];let n;for(let i=0,r=this.curves;i<r.length;...
    method copy (line 6) | copy(t){super.copy(t),this.curves=[];for(let e=0,n=t.curves.length;e<n...
    method toJSON (line 6) | toJSON(){const t=super.toJSON();t.autoClose=this.autoClose,t.curves=[]...
    method fromJSON (line 6) | fromJSON(t){super.fromJSON(t),this.autoClose=t.autoClose,this.curves=[...
  class Mo (line 6) | class Mo extends bo{constructor(t){super(),this.type="Path",this.current...
    method constructor (line 6) | constructor(t){super(),this.type="Path",this.currentPoint=new Z,t&&thi...
    method setFromPoints (line 6) | setFromPoints(t){this.moveTo(t[0].x,t[0].y);for(let e=1,n=t.length;e<n...
    method moveTo (line 6) | moveTo(t,e){return this.currentPoint.set(t,e),this}
    method lineTo (line 6) | lineTo(t,e){const n=new vo(this.currentPoint.clone(),new Z(t,e));retur...
    method quadraticCurveTo (line 6) | quadraticCurveTo(t,e,n,i){const r=new yo(this.currentPoint.clone(),new...
    method bezierCurveTo (line 6) | bezierCurveTo(t,e,n,i,r,s){const a=new mo(this.currentPoint.clone(),ne...
    method splineThru (line 6) | splineThru(t){const e=[this.currentPoint.clone()].concat(t),n=new xo(e...
    method arc (line 6) | arc(t,e,n,i,r,s){const a=this.currentPoint.x,o=this.currentPoint.y;ret...
    method absarc (line 6) | absarc(t,e,n,i,r,s){return this.absellipse(t,e,n,n,i,r,s),this}
    method ellipse (line 6) | ellipse(t,e,n,i,r,s,a,o){const l=this.currentPoint.x,c=this.currentPoi...
    method absellipse (line 6) | absellipse(t,e,n,i,r,s,a,o){const l=new io(t,e,n,i,r,s,a,o);if(this.cu...
    method copy (line 6) | copy(t){return super.copy(t),this.currentPoint.copy(t.currentPoint),this}
    method toJSON (line 6) | toJSON(){const t=super.toJSON();return t.currentPoint=this.currentPoin...
    method fromJSON (line 6) | fromJSON(t){return super.fromJSON(t),this.currentPoint.fromArray(t.cur...
  class So (line 6) | class So extends Mo{constructor(t){super(t),this.uuid=V(),this.type="Sha...
    method constructor (line 6) | constructor(t){super(t),this.uuid=V(),this.type="Shape",this.holes=[]}
    method getPointsHoles (line 6) | getPointsHoles(t){const e=[];for(let n=0,i=this.holes.length;n<i;n++)e...
    method extractPoints (line 6) | extractPoints(t){return{shape:this.getPoints(t),holes:this.getPointsHo...
    method copy (line 6) | copy(t){super.copy(t),this.holes=[];for(let e=0,n=t.holes.length;e<n;e...
    method toJSON (line 6) | toJSON(){const t=super.toJSON();t.uuid=this.uuid,t.holes=[];for(let e=...
    method fromJSON (line 6) | fromJSON(t){super.fromJSON(t),this.uuid=t.uuid,this.holes=[];for(let e...
  class To (line 6) | class To extends oe{constructor(t,e=1){super(),this.type="Light",this.co...
    method constructor (line 6) | constructor(t,e=1){super(),this.type="Light",this.color=new Pe(t),this...
    method dispose (line 6) | dispose(){}
    method copy (line 6) | copy(t){return super.copy(t),this.color.copy(t.color),this.intensity=t...
    method toJSON (line 6) | toJSON(t){const e=super.toJSON(t);return e.object.color=this.color.get...
  class Eo (line 6) | class Eo extends To{constructor(t,e,n){super(t,n),this.type="HemisphereL...
    method constructor (line 6) | constructor(t,e,n){super(t,n),this.type="HemisphereLight",this.positio...
    method copy (line 6) | copy(t){return To.prototype.copy.call(this,t),this.groundColor.copy(t....
  class Co (line 6) | class Co{constructor(t){this.camera=t,this.bias=0,this.normalBias=0,this...
    method constructor (line 6) | constructor(t){this.camera=t,this.bias=0,this.normalBias=0,this.radius...
    method getViewportCount (line 6) | getViewportCount(){return this._viewportCount}
    method getFrustum (line 6) | getFrustum(){return this._frustum}
    method updateMatrices (line 6) | updateMatrices(t){const e=this.camera,n=this.matrix;Lo.setFromMatrixPo...
    method getViewport (line 6) | getViewport(t){return this._viewports[t]}
    method getFrameExtents (line 6) | getFrameExtents(){return this._frameExtents}
    method dispose (line 6) | dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.disp...
    method copy (line 6) | copy(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radi...
    method clone (line 6) | clone(){return(new this.constructor).copy(this)}
    method toJSON (line 6) | toJSON(){const t={};return 0!==this.bias&&(t.bias=this.bias),0!==this....
  class Po (line 6) | class Po extends Co{constructor(){super(new xn(50,1,.5,500)),this.focus=...
    method constructor (line 6) | constructor(){super(new xn(50,1,.5,500)),this.focus=1}
    method updateMatrices (line 6) | updateMatrices(t){const e=this.camera,n=2*G*t.angle*this.focus,i=this....
    method copy (line 6) | copy(t){return super.copy(t),this.focus=t.focus,this}
  class Do (line 6) | class Do extends To{constructor(t,e,n=0,i=Math.PI/3,r=0,s=1){super(t,e),...
    method constructor (line 6) | constructor(t,e,n=0,i=Math.PI/3,r=0,s=1){super(t,e),this.type="SpotLig...
    method power (line 6) | get power(){return this.intensity*Math.PI}
    method power (line 6) | set power(t){this.intensity=t/Math.PI}
    method dispose (line 6) | dispose(){this.shadow.dispose()}
    method copy (line 6) | copy(t){return super.copy(t),this.distance=t.distance,this.angle=t.ang...
  class Oo (line 6) | class Oo extends Co{constructor(){super(new xn(90,1,.5,500)),this._frame...
    method constructor (line 6) | constructor(){super(new xn(90,1,.5,500)),this._frameExtents=new Z(4,2)...
    method updateMatrices (line 6) | updateMatrices(t,e=0){const n=this.camera,i=this.matrix,r=t.distance||...
  class Bo (line 6) | class Bo extends To{constructor(t,e,n=0,i=1){super(t,e),this.type="Point...
    method constructor (line 6) | constructor(t,e,n=0,i=1){super(t,e),this.type="PointLight",this.distan...
    method power (line 6) | get power(){return 4*this.intensity*Math.PI}
    method power (line 6) | set power(t){this.intensity=t/(4*Math.PI)}
    method dispose (line 6) | dispose(){this.shadow.dispose()}
    method copy (line 6) | copy(t){return super.copy(t),this.distance=t.distance,this.decay=t.dec...
  class Fo (line 6) | class Fo extends _n{constructor(t=-1,e=1,n=1,i=-1,r=.1,s=2e3){super(),th...
    method constructor (line 6) | constructor(t=-1,e=1,n=1,i=-1,r=.1,s=2e3){super(),this.type="Orthograp...
    method copy (line 6) | copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,t...
    method setViewOffset (line 6) | setViewOffset(t,e,n,i,r,s){null===this.view&&(this.view={enabled:!0,fu...
    method clearViewOffset (line 6) | clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.update...
    method updateProjectionMatrix (line 6) | updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),...
    method toJSON (line 6) | toJSON(t){const e=super.toJSON(t);return e.object.zoom=this.zoom,e.obj...
  class Ho (line 6) | class Ho extends Co{constructor(){super(new Fo(-5,5,5,-5,.5,500))}}
    method constructor (line 6) | constructor(){super(new Fo(-5,5,5,-5,.5,500))}
  class Uo (line 6) | class Uo extends To{constructor(t,e){super(t,e),this.type="DirectionalLi...
    method constructor (line 6) | constructor(t,e){super(t,e),this.type="DirectionalLight",this.position...
    method dispose (line 6) | dispose(){this.shadow.dispose()}
    method copy (line 6) | copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=...
  class ko (line 6) | class ko extends To{constructor(t,e){super(t,e),this.type="AmbientLight"}}
    method constructor (line 6) | constructor(t,e){super(t,e),this.type="AmbientLight"}
  class Go (line 6) | class Go extends To{constructor(t,e,n=10,i=10){super(t,e),this.type="Rec...
    method constructor (line 6) | constructor(t,e,n=10,i=10){super(t,e),this.type="RectAreaLight",this.w...
    method copy (line 6) | copy(t){return super.copy(t),this.width=t.width,this.height=t.height,t...
    method toJSON (line 6) | toJSON(t){const e=super.toJSON(t);return e.object.width=this.width,e.o...
  class Vo (line 6) | class Vo{constructor(){this.coefficients=[];for(let t=0;t<9;t++)this.coe...
    method constructor (line 6) | constructor(){this.coefficients=[];for(let t=0;t<9;t++)this.coefficien...
    method set (line 6) | set(t){for(let e=0;e<9;e++)this.coefficients[e].copy(t[e]);return this}
    method zero (line 6) | zero(){for(let t=0;t<9;t++)this.coefficients[t].set(0,0,0);return this}
    method getAt (line 6) | getAt(t,e){const n=t.x,i=t.y,r=t.z,s=this.coefficients;return e.copy(s...
    method getIrradianceAt (line 6) | getIrradianceAt(t,e){const n=t.x,i=t.y,r=t.z,s=this.coefficients;retur...
    method add (line 6) | add(t){for(let e=0;e<9;e++)this.coefficients[e].add(t.coefficients[e])...
    method addScaledSH (line 6) | addScaledSH(t,e){for(let n=0;n<9;n++)this.coefficients[n].addScaledVec...
    method scale (line 6) | scale(t){for(let e=0;e<9;e++)this.coefficients[e].multiplyScalar(t);re...
    method lerp (line 6) | lerp(t,e){for(let n=0;n<9;n++)this.coefficients[n].lerp(t.coefficients...
    method equals (line 6) | equals(t){for(let e=0;e<9;e++)if(!this.coefficients[e].equals(t.coeffi...
    method copy (line 6) | copy(t){return this.set(t.coefficients)}
    method clone (line 6) | clone(){return(new this.constructor).copy(this)}
    method fromArray (line 6) | fromArray(t,e=0){const n=this.coefficients;for(let i=0;i<9;i++)n[i].fr...
    method toArray (line 6) | toArray(t=[],e=0){const n=this.coefficients;for(let i=0;i<9;i++)n[i].t...
    method getBasisAt (line 6) | static getBasisAt(t,e){const n=t.x,i=t.y,r=t.z;e[0]=.282095,e[1]=.4886...
  class Wo (line 6) | class Wo extends To{constructor(t=new Vo,e=1){super(void 0,e),this.sh=t}...
    method constructor (line 6) | constructor(t=new Vo,e=1){super(void 0,e),this.sh=t}
    method copy (line 6) | copy(t){return super.copy(t),this.sh.copy(t.sh),this}
    method fromJSON (line 6) | fromJSON(t){return this.intensity=t.intensity,this.sh.fromArray(t.sh),...
    method toJSON (line 6) | toJSON(t){const e=super.toJSON(t);return e.object.sh=this.sh.toArray(),e}
  class jo (line 6) | class jo{static decodeText(t){if("undefined"!=typeof TextDecoder)return(...
    method decodeText (line 6) | static decodeText(t){if("undefined"!=typeof TextDecoder)return(new Tex...
    method extractUrlBase (line 6) | static extractUrlBase(t){const e=t.lastIndexOf("/");return-1===e?"./":...
  class qo (line 6) | class qo extends Xe{constructor(){super(),this.type="InstancedBufferGeom...
    method constructor (line 6) | constructor(){super(),this.type="InstancedBufferGeometry",this.instanc...
    method copy (line 6) | copy(t){return super.copy(t),this.instanceCount=t.instanceCount,this}
    method clone (line 6) | clone(){return(new this.constructor).copy(this)}
    method toJSON (line 6) | toJSON(){const t=super.toJSON(this);return t.instanceCount=this.instan...
  class Xo (line 6) | class Xo extends ze{constructor(t,e,n,i){"number"==typeof n&&(i=n,n=!1,c...
    method constructor (line 6) | constructor(t,e,n,i){"number"==typeof n&&(i=n,n=!1,console.error("THRE...
    method copy (line 6) | copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,...
    method toJSON (line 6) | toJSON(){const t=super.toJSON();return t.meshPerAttribute=this.meshPer...
  method constructor (line 6) | constructor(t){super(t),"undefined"==typeof createImageBitmap&&console.w...
  method setOptions (line 6) | setOptions(t){return this.options=t,this}
  method load (line 6) | load(t,e,n,i){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=t...
  class Yo (line 6) | class Yo{constructor(){this.type="ShapePath",this.color=new Pe,this.subP...
    method constructor (line 6) | constructor(){this.type="ShapePath",this.color=new Pe,this.subPaths=[]...
    method moveTo (line 6) | moveTo(t,e){return this.currentPath=new Mo,this.subPaths.push(this.cur...
    method lineTo (line 6) | lineTo(t,e){return this.currentPath.lineTo(t,e),this}
    method quadraticCurveTo (line 6) | quadraticCurveTo(t,e,n,i){return this.currentPath.quadraticCurveTo(t,e...
    method bezierCurveTo (line 6) | bezierCurveTo(t,e,n,i,r,s){return this.currentPath.bezierCurveTo(t,e,n...
    method splineThru (line 6) | splineThru(t){return this.currentPath.splineThru(t),this}
    method toShapes (line 6) | toShapes(t,e){function n(t){const e=[];for(let n=0,i=t.length;n<i;n++)...
  class Zo (line 6) | class Zo{constructor(t){this.type="Font",this.data=t}generateShapes(t,e=...
    method constructor (line 6) | constructor(t){this.type="Font",this.data=t}
    method generateShapes (line 6) | generateShapes(t,e=100){const n=[],i=function(t,e,n){const i=Array.fro...
  function Jo (line 6) | function Jo(t,e,n,i,r){const s=r.glyphs[t]||r.glyphs["?"];if(!s)return v...
  class $o (line 6) | class $o extends Ja{constructor(t){super(t)}load(t,e,n,i){const r=this,s...
    method constructor (line 6) | constructor(t){super(t)}
    method load (line 6) | load(t,e,n,i){const r=this,s=new Ka(this.manager);s.setResponseType("a...
  method constructor (line 6) | constructor(t,e,n=1){super(void 0,n);const i=(new Pe).set(t),r=(new Pe)....
  method constructor (line 6) | constructor(t,e=1){super(void 0,e);const n=(new Pe).set(t);this.sh.coeff...
  class tl (line 6) | class tl{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTim...
    method constructor (line 6) | constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,thi...
    method start (line 6) | start(){this.startTime=el(),this.oldTime=this.startTime,this.elapsedTi...
    method stop (line 6) | stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}
    method getElapsedTime (line 6) | getElapsedTime(){return this.getDelta(),this.elapsedTime}
    method getDelta (line 6) | getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(...
  function el (line 6) | function el(){return("undefined"==typeof performance?Date:performance).n...
  class nl (line 6) | class nl extends oe{constructor(t){super(),this.type="Audio",this.listen...
    method constructor (line 6) | constructor(t){super(),this.type="Audio",this.listener=t,this.context=...
    method getOutput (line 6) | getOutput(){return this.gain}
    method setNodeSource (line 6) | setNodeSource(t){return this.hasPlaybackControl=!1,this.sourceType="au...
    method setMediaElementSource (line 6) | setMediaElementSource(t){return this.hasPlaybackControl=!1,this.source...
    method setMediaStreamSource (line 6) | setMediaStreamSource(t){return this.hasPlaybackControl=!1,this.sourceT...
    method setBuffer (line 6) | setBuffer(t){return this.buffer=t,this.sourceType="buffer",this.autopl...
    method play (line 6) | play(t=0){if(!0===this.isPlaying)return void console.warn("THREE.Audio...
    method pause (line 6) | pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(th...
    method stop (line 6) | stop(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.so...
    method connect (line 6) | connect(){if(this.filters.length>0){this.source.connect(this.filters[0...
    method disconnect (line 6) | disconnect(){if(this.filters.length>0){this.source.disconnect(this.fil...
    method getFilters (line 6) | getFilters(){return this.filters}
    method setFilters (line 6) | setFilters(t){return t||(t=[]),!0===this._connected?(this.disconnect()...
    method setDetune (line 6) | setDetune(t){if(this.detune=t,void 0!==this.source.detune)return!0===t...
    method getDetune (line 6) | getDetune(){return this.detune}
    method getFilter (line 6) | getFilter(){return this.getFilters()[0]}
    method setFilter (line 6) | setFilter(t){return this.setFilters(t?[t]:[])}
    method setPlaybackRate (line 6) | setPlaybackRate(t){if(!1!==this.hasPlaybackControl)return this.playbac...
    method getPlaybackRate (line 6) | getPlaybackRate(){return this.playbackRate}
    method onEnded (line 6) | onEnded(){this.isPlaying=!1}
    method getLoop (line 6) | getLoop(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audi...
    method setLoop (line 6) | setLoop(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===thi...
    method setLoopStart (line 6) | setLoopStart(t){return this.loopStart=t,this}
    method setLoopEnd (line 6) | setLoopEnd(t){return this.loopEnd=t,this}
    method getVolume (line 6) | getVolume(){return this.gain.gain.value}
    method setVolume (line 6) | setVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.curr...
  class il (line 6) | class il{constructor(t,e,n){let i,r,s;switch(this.binding=t,this.valueSi...
    method constructor (line 6) | constructor(t,e,n){let i,r,s;switch(this.binding=t,this.valueSize=n,e)...
    method accumulate (line 6) | accumulate(t,e){const n=this.buffer,i=this.valueSize,r=t*i+i;let s=thi...
    method accumulateAdditive (line 6) | accumulateAdditive(t){const e=this.buffer,n=this.valueSize,i=n*this._a...
    method apply (line 6) | apply(t){const e=this.valueSize,n=this.buffer,i=t*e+e,r=this.cumulativ...
    method saveOriginalState (line 6) | saveOriginalState(){const t=this.binding,e=this.buffer,n=this.valueSiz...
    method restoreOriginalState (line 6) | restoreOriginalState(){const t=3*this.valueSize;this.binding.setValue(...
    method _setAdditiveIdentityNumeric (line 6) | _setAdditiveIdentityNumeric(){const t=this._addIndex*this.valueSize,e=...
    method _setAdditiveIdentityQuaternion (line 6) | _setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),th...
    method _setAdditiveIdentityOther (line 6) | _setAdditiveIdentityOther(){const t=this._origIndex*this.valueSize,e=t...
    method _select (line 6) | _select(t,e,n,i,r){if(i>=.5)for(let i=0;i!==r;++i)t[e+i]=t[n+i]}
    method _slerp (line 6) | _slerp(t,e,n,i){rt.slerpFlat(t,e,t,e,t,n,i)}
    method _slerpAdditive (line 6) | _slerpAdditive(t,e,n,i,r){const s=this._workIndex*r;rt.multiplyQuatern...
    method _lerp (line 6) | _lerp(t,e,n,i,r){const s=1-i;for(let a=0;a!==r;++a){const r=e+a;t[r]=t...
    method _lerpAdditive (line 6) | _lerpAdditive(t,e,n,i,r){for(let s=0;s!==r;++s){const r=e+s;t[r]=t[r]+...
  class fl (line 6) | class fl{constructor(t,e,n){this.path=e,this.parsedPath=n||fl.parseTrack...
    method constructor (line 6) | constructor(t,e,n){this.path=e,this.parsedPath=n||fl.parseTrackName(e)...
    method create (line 6) | static create(t,e,n){return t&&t.isAnimationObjectGroup?new fl.Composi...
    method sanitizeNodeName (line 6) | static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(sl,"")}
    method parseTrackName (line 6) | static parseTrackName(t){const e=dl.exec(t);if(!e)throw new Error("Pro...
    method findNode (line 6) | static findNode(t,e){if(!e||""===e||"."===e||-1===e||e===t.name||e===t...
    method _getValue_unavailable (line 6) | _getValue_unavailable(){}
    method _setValue_unavailable (line 6) | _setValue_unavailable(){}
    method _getValue_direct (line 6) | _getValue_direct(t,e){t[e]=this.node[this.propertyName]}
    method _getValue_array (line 6) | _getValue_array(t,e){const n=this.resolvedProperty;for(let i=0,r=n.len...
    method _getValue_arrayElement (line 6) | _getValue_arrayElement(t,e){t[e]=this.resolvedProperty[this.propertyIn...
    method _getValue_toArray (line 6) | _getValue_toArray(t,e){this.resolvedProperty.toArray(t,e)}
    method _setValue_direct (line 6) | _setValue_direct(t,e){this.targetObject[this.propertyName]=t[e]}
    method _setValue_direct_setNeedsUpdate (line 6) | _setValue_direct_setNeedsUpdate(t,e){this.targetObject[this.propertyNa...
    method _setValue_direct_setMatrixWorldNeedsUpdate (line 6) | _setValue_direct_setMatrixWorldNeedsUpdate(t,e){this.targetObject[this...
    method _setValue_array (line 6) | _setValue_array(t,e){const n=this.resolvedProperty;for(let i=0,r=n.len...
    method _setValue_array_setNeedsUpdate (line 6) | _setValue_array_setNeedsUpdate(t,e){const n=this.resolvedProperty;for(...
    method _setValue_array_setMatrixWorldNeedsUpdate (line 6) | _setValue_array_setMatrixWorldNeedsUpdate(t,e){const n=this.resolvedPr...
    method _setValue_arrayElement (line 6) | _setValue_arrayElement(t,e){this.resolvedProperty[this.propertyIndex]=...
    method _setValue_arrayElement_setNeedsUpdate (line 6) | _setValue_arrayElement_setNeedsUpdate(t,e){this.resolvedProperty[this....
    method _setValue_arrayElement_setMatrixWorldNeedsUpdate (line 6) | _setValue_arrayElement_setMatrixWorldNeedsUpdate(t,e){this.resolvedPro...
    method _setValue_fromArray (line 6) | _setValue_fromArray(t,e){this.resolvedProperty.fromArray(t,e)}
    method _setValue_fromArray_setNeedsUpdate (line 6) | _setValue_fromArray_setNeedsUpdate(t,e){this.resolvedProperty.fromArra...
    method _setValue_fromArray_setMatrixWorldNeedsUpdate (line 6) | _setValue_fromArray_setMatrixWorldNeedsUpdate(t,e){this.resolvedProper...
    method _getValue_unbound (line 6) | _getValue_unbound(t,e){this.bind(),this.getValue(t,e)}
    method _setValue_unbound (line 6) | _setValue_unbound(t,e){this.bind(),this.setValue(t,e)}
    method bind (line 6) | bind(){let t=this.node;const e=this.parsedPath,n=e.objectName,i=e.prop...
    method unbind (line 6) | unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setV...
  method constructor (line 6) | constructor(t,e,n){const i=n||fl.parseTrackName(e);this._targetGroup=t,t...
  method getValue (line 6) | getValue(t,e){this.bind();const n=this._targetGroup.nCachedObjects_,i=th...
  method setValue (line 6) | setValue(t,e){const n=this._bindings;for(let i=this._targetGroup.nCached...
  method bind (line 6) | bind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects...
  method unbind (line 6) | unbind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjec...
  class ml (line 6) | class ml{constructor(t,e,n=null,i=e.blendMode){this._mixer=t,this._clip=...
    method constructor (line 6) | constructor(t,e,n=null,i=e.blendMode){this._mixer=t,this._clip=e,this....
    method play (line 6) | play(){return this._mixer._activateAction(this),this}
    method stop (line 6) | stop(){return this._mixer._deactivateAction(this),this.reset()}
    method reset (line 6) | reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCo...
    method isRunning (line 6) | isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&nul...
    method isScheduled (line 6) | isScheduled(){return this._mixer._isActiveAction(this)}
    method startAt (line 6) | startAt(t){return this._startTime=t,this}
    method setLoop (line 6) | setLoop(t,e){return this.loop=t,this.repetitions=e,this}
    method setEffectiveWeight (line 6) | setEffectiveWeight(t){return this.weight=t,this._effectiveWeight=this....
    method getEffectiveWeight (line 6) | getEffectiveWeight(){return this._effectiveWeight}
    method fadeIn (line 6) | fadeIn(t){return this._scheduleFading(t,0,1)}
    method fadeOut (line 6) | fadeOut(t){return this._scheduleFading(t,1,0)}
    method crossFadeFrom (line 6) | crossFadeFrom(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){const n=this._c...
    method crossFadeTo (line 6) | crossFadeTo(t,e,n){return t.crossFadeFrom(this,e,n)}
    method stopFading (line 6) | stopFading(){const t=this._weightInterpolant;return null!==t&&(this._w...
    method setEffectiveTimeScale (line 6) | setEffectiveTimeScale(t){return this.timeScale=t,this._effectiveTimeSc...
    method getEffectiveTimeScale (line 6) | getEffectiveTimeScale(){return this._effectiveTimeScale}
    method setDuration (line 6) | setDuration(t){return this.timeScale=this._clip.duration/t,this.stopWa...
    method syncWith (line 6) | syncWith(t){return this.time=t.time,this.timeScale=t.timeScale,this.st...
    method halt (line 6) | halt(t){return this.warp(this._effectiveTimeScale,0,t)}
    method warp (line 6) | warp(t,e,n){const i=this._mixer,r=i.time,s=this.timeScale;let a=this._...
    method stopWarping (line 6) | stopWarping(){const t=this._timeScaleInterpolant;return null!==t&&(thi...
    method getMixer (line 6) | getMixer(){return this._mixer}
    method getClip (line 6) | getClip(){return this._clip}
    method getRoot (line 6) | getRoot(){return this._localRoot||this._mixer._root}
    method _update (line 6) | _update(t,e,n,i){if(!this.enabled)return void this._updateWeight(t);co...
    method _updateWeight (line 6) | _updateWeight(t){let e=0;if(this.enabled){e=this.weight;const n=this._...
    method _updateTimeScale (line 6) | _updateTimeScale(t){let e=0;if(!this.paused){e=this.timeScale;const n=...
    method _updateTime (line 6) | _updateTime(t){const e=this._clip.duration,n=this.loop;let i=this.time...
    method _setEndings (line 6) | _setEndings(t,e,n){const i=this._interpolantSettings;n?(i.endingStart=...
    method _scheduleFading (line 6) | _scheduleFading(t,e,n){const i=this._mixer,r=i.time;let s=this._weight...
  method constructor (line 6) | constructor(t){super(),this._root=t,this._initMemoryManager(),this._accu...
  method _bindAction (line 6) | _bindAction(t,e){const n=t._localRoot||this._root,i=t._clip.tracks,r=i.l...
  method _activateAction (line 6) | _activateAction(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex)...
  method _deactivateAction (line 6) | _deactivateAction(t){if(this._isActiveAction(t)){const e=t._propertyBind...
  method _initMemoryManager (line 6) | _initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actio...
  method _isActiveAction (line 6) | _isActiveAction(t){const e=t._cacheIndex;return null!==e&&e<this._nActiv...
  method _addInactiveAction (line 6) | _addInactiveAction(t,e,n){const i=this._actions,r=this._actionsByClip;le...
  method _removeInactiveAction (line 6) | _removeInactiveAction(t){const e=this._actions,n=e[e.length-1],i=t._cach...
  method _removeInactiveBindingsForAction (line 6) | _removeInactiveBindingsForAction(t){const e=t._propertyBindings;for(let ...
  method _lendAction (line 6) | _lendAction(t){const e=this._actions,n=t._cacheIndex,i=this._nActiveActi...
  method _takeBackAction (line 6) | _takeBackAction(t){const e=this._actions,n=t._cacheIndex,i=--this._nActi...
  method _addInactiveBinding (line 6) | _addInactiveBinding(t,e,n){const i=this._bindingsByRootAndName,r=this._b...
  method _removeInactiveBinding (line 6) | _removeInactiveBinding(t){const e=this._bindings,n=t.binding,i=n.rootNod...
  method _lendBinding (line 6) | _lendBinding(t){const e=this._bindings,n=t._cacheIndex,i=this._nActiveBi...
  method _takeBackBinding (line 6) | _takeBackBinding(t){const e=this._bindings,n=t._cacheIndex,i=--this._nAc...
  method _lendControlInterpolant (line 6) | _lendControlInterpolant(){const t=this._controlInterpolants,e=this._nAct...
  method _takeBackControlInterpolant (line 6) | _takeBackControlInterpolant(t){const e=this._controlInterpolants,n=t.__c...
  method clipAction (line 6) | clipAction(t,e,n){const i=e||this._root,r=i.uuid;let s="string"==typeof ...
  method existingAction (line 6) | existingAction(t,e){const n=e||this._root,i=n.uuid,r="string"==typeof t?...
  method stopAllAction (line 6) | stopAllAction(){const t=this._actions;for(let e=this._nActiveActions-1;e...
  method update (line 6) | update(t){t*=this.timeScale;const e=this._actions,n=this._nActiveActions...
  method setTime (line 6) | setTime(t){this.time=0;for(let t=0;t<this._actions.length;t++)this._acti...
  method getRoot (line 6) | getRoot(){return this._root}
  method uncacheClip (line 6) | uncacheClip(t){const e=this._actions,n=t.uuid,i=this._actionsByClip,r=i[...
  method uncacheRoot (line 6) | uncacheRoot(t){const e=t.uuid,n=this._actionsByClip;for(const t in n){co...
  method uncacheAction (line 6) | uncacheAction(t,e){const n=this.existingAction(t,e);null!==n&&(this._dea...
  class gl (line 6) | class gl{constructor(t){"string"==typeof t&&(console.warn("THREE.Uniform...
    method constructor (line 6) | constructor(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type ...
    method clone (line 6) | clone(){return new gl(void 0===this.value.clone?this.value:this.value....
  method constructor (line 6) | constructor(t,e,n=1){super(t,e),this.meshPerAttribute=n||1}
  method copy (line 6) | copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}
  method clone (line 6) | clone(t){const e=super.clone(t);return e.meshPerAttribute=this.meshPerAt...
  method toJSON (line 6) | toJSON(t){const e=super.toJSON(t);return e.isInstancedInterleavedBuffer=...
  class yl (line 6) | class yl{constructor(t=new Z(1/0,1/0),e=new Z(-1/0,-1/0)){this.min=t,thi...
    method constructor (line 6) | constructor(t=new Z(1/0,1/0),e=new Z(-1/0,-1/0)){this.min=t,this.max=e}
    method set (line 6) | set(t,e){return this.min.copy(t),this.max.copy(e),this}
    method setFromPoints (line 6) | setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e++)this....
    method setFromCenterAndSize (line 6) | setFromCenterAndSize(t,e){const n=vl.copy(e).multiplyScalar(.5);return...
    method clone (line 6) | clone(){return(new this.constructor).copy(this)}
    method copy (line 6) | copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}
    method makeEmpty (line 6) | makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/...
    method isEmpty (line 6) | isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}
    method getCenter (line 6) | getCenter(t){return void 0===t&&(console.warn("THREE.Box2: .getCenter(...
    method getSize (line 6) | getSize(t){return void 0===t&&(console.warn("THREE.Box2: .getSize() ta...
    method expandByPoint (line 6) | expandByPoint(t){return this.min.min(t),this.max.max(t),this}
    method expandByVector (line 6) | expandByVector(t){return this.min.sub(t),this.max.add(t),this}
    method expandByScalar (line 6) | expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),...
    method containsPoint (line 6) | containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min....
    method containsBox (line 6) | containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.m...
    method getParameter (line 6) | getParameter(t,e){return void 0===e&&(console.warn("THREE.Box2: .getPa...
    method intersectsBox (line 6) | intersectsBox(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max...
    method clampPoint (line 6) | clampPoint(t,e){return void 0===e&&(console.warn("THREE.Box2: .clampPo...
    method distanceToPoint (line 6) | distanceToPoint(t){return vl.copy(t).clamp(this.min,this.max).sub(t).l...
    method intersect (line 6) | intersect(t){return this.min.max(t.min),this.max.min(t.max),this}
    method union (line 6) | union(t){return this.min.min(t.min),this.max.max(t.max),this}
    method translate (line 6) | translate(t){return this.min.add(t),this.max.add(t),this}
    method equals (line 6) | equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}
  method constructor (line 6) | constructor(t){super(),this.material=t,this.render=function(){},this.has...
  function bl (line 6) | function bl(t){const e=[];t&&t.isBone&&e.push(t);for(let n=0;n<t.childre...
  function Cl (line 6) | function Cl(){const t=[],e=[],n=[];let i=8;for(let r=0;r<Tl;r++){const s...
  method constructor (line 6) | constructor(t=10,e=10,n=4473924,i=8947848){n=new Pe(n),i=new Pe(i);const...
  method constructor (line 6) | constructor(t){const e=bl(t),n=new Xe,i=[],r=[],s=new Pe(0,0,1),a=new Pe...
  method updateMatrixWorld (line 6) | updateMatrixWorld(t){const e=this.bones,n=this.geometry,i=n.getAttribute...
  function Pl (line 6) | function Pl(t){if(void 0===t)throw new ReferenceError("this hasn't been ...
  function Dl (line 6) | function Dl(t,e){t.prototype=Object.create(e.prototype),t.prototype.cons...
  function t (line 15) | function t(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat...
  function e (line 15) | function e(e,n){var i;return void 0===e&&(e={}),(i=t.call(this,e)||this)...
  function e (line 15) | function e(e,n,i,r){var s;"number"==typeof n&&(i.duration=n,n=i,i=null);...
  function t (line 15) | function t(t,e,n,i,r,s,a,o,l){this.t=e,this.s=i,this.c=r,this.p=n,this.r...
  method constructor (line 15) | constructor(){this.element=document.querySelector(".content"),this.eleme...
  method init (line 15) | init(){this.addCanvas(),this.addCamera(),this.addMesh(),this.addEventLis...
  method addCanvas (line 15) | addCanvas(){this.canvas.classList.add("webgl"),document.body.appendChild...
  method addCamera (line 15) | addCamera(){this.camera.position.set(0,0,2.5),this.scene.add(this.camera)}
  method addMesh (line 15) | addMesh(){this.geometry=new xa(1,64),this.material=new yn({wireframe:!0,...
  method updateScrollAnimations (line 15) | updateScrollAnimations(){this.scroll.running=!1,this.scroll.normalized=(...
  method addEventListeners (line 15) | addEventListeners(){window.addEventListener("load",this.onLoad.bind(this...
  method onLoad (line 15) | onLoad(){document.body.classList.remove("loading"),this.animations=new c...
  method onMouseMove (line 15) | onMouseMove(t){this.mouse.x=4*(t.clientX/this.viewport.width).toFixed(2)...
  method onScroll (line 15) | onScroll(){this.scroll.running||(window.requestAnimationFrame(this.updat...
  method onResize (line 15) | onResize(){this.viewport={width:window.innerWidth,height:window.innerHei...
  method update (line 15) | update(){const t=this.clock.getElapsedTime();this.mesh.rotation.y=.05*t,...
  method render (line 15) | render(){this.renderer.render(this.scene,this.camera)}

FILE: src/app/Animations.js
  method constructor (line 4) | constructor(element, camera) {
  method animateIn (line 20) | animateIn() {

FILE: src/app/SmoothScroll.js
  method constructor (line 4) | constructor({ element, viewport, scroll }) {
  method setSizes (line 14) | setSizes() {
  method update (line 21) | update() {
  method onResize (line 33) | onResize() {

FILE: src/app/index.js
  class ScrollStage (line 10) | class ScrollStage {
    method constructor (line 11) | constructor() {
    method init (line 103) | init() {
    method addCanvas (line 115) | addCanvas() {
    method addCamera (line 120) | addCamera() {
    method addMesh (line 128) | addMesh() {
    method updateScrollAnimations (line 155) | updateScrollAnimations() {
    method addEventListeners (line 182) | addEventListeners() {
    method onLoad (line 192) | onLoad() {
    method onMouseMove (line 198) | onMouseMove(event) {
    method onScroll (line 215) | onScroll() {
    method onResize (line 223) | onResize() {
    method update (line 247) | update() {
    method render (line 261) | render() {
Condensed preview — 17 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (639K chars).
[
  {
    "path": ".gitignore",
    "chars": 55,
    "preview": "/node_modules\n/.cache\n/.parcel-cache\npackage-lock.json\n"
  },
  {
    "path": "LICENSE",
    "chars": 1103,
    "preview": "MIT License\n\nCopyright (c) 2009 - 2020 [Codrops](https://tympanus.net/codrops)\n\nPermission is hereby granted, free of ch"
  },
  {
    "path": "README.md",
    "chars": 856,
    "preview": "# Rock the Stage with a Smooth WebGL Shader Transformation on Scroll\n\nA handy setup to create a smooth scroll based GLSL"
  },
  {
    "path": "dist/index.33763982.js",
    "chars": 591631,
    "preview": "!function(){function t(t){return t&&t.__esModule?t.default:t}\n/**\n  * @license\n  * Copyright 2010-2021 Three.js Authors\n"
  },
  {
    "path": "dist/index.47c52c93.css",
    "chars": 2198,
    "preview": "*,:after,:before{box-sizing:border-box}:root{font-size:15px}body{margin:0;--color-text:#fff;--color-bg:#000;--color-1:#0"
  },
  {
    "path": "dist/index.9fc08b13.css",
    "chars": 2466,
    "preview": "@import url(\"https://use.typekit.net/zmc8vly.css\");.section__button,body{font-family:degular-display,sans-serif;font-wei"
  },
  {
    "path": "dist/index.html",
    "chars": 3007,
    "preview": "<!DOCTYPE html><html lang=\"en\" class=\"no-js\"><head><meta charset=\"UTF-8\"><meta name=\"viewport\" content=\"width=device-wid"
  },
  {
    "path": "package.json",
    "chars": 631,
    "preview": "{\n  \"name\": \"shaders-on-scroll\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"dist/index.html\",\n  \"scripts\": {\n"
  },
  {
    "path": "src/app/Animations.js",
    "chars": 1041,
    "preview": "import GSAP from 'gsap'\n\nexport default class {\n  constructor(element, camera) {\n    this.element = element\n\n    this.el"
  },
  {
    "path": "src/app/SmoothScroll.js",
    "chars": 1072,
    "preview": "import GSAP from 'gsap'\n\nexport default class {\n  constructor({ element, viewport, scroll }) {\n    this.element = elemen"
  },
  {
    "path": "src/app/index.js",
    "chars": 6256,
    "preview": "import * as THREE from 'three'\nimport GSAP from 'gsap'\n\nimport Animations from './Animations'\nimport SmoothScroll from '"
  },
  {
    "path": "src/app/shaders/fragment.glsl",
    "chars": 593,
    "preview": "uniform float uOpacity;\nuniform float uDeepPurple;\n \nvarying float vDistortion;\n\nvec3 cosPalette(float t, vec3 a, vec3 b"
  },
  {
    "path": "src/app/shaders/vertex.glsl",
    "chars": 3937,
    "preview": "// GLSL textureless classic 3D noise \"cnoise\",\n// with an RSL-style periodic variant \"pnoise\".\n// Author:  Stefan Gustav"
  },
  {
    "path": "src/index.html",
    "chars": 3648,
    "preview": "<!DOCTYPE html>\n<html lang=\"en\" class=\"no-js\">\n\t<head>\n\t\t<meta charset=\"UTF-8\" />\n\t\t<meta name=\"viewport\" content=\"width"
  },
  {
    "path": "src/shaders-on-scroll.pug",
    "chars": 664,
    "preview": ".scroll__stage\n  .scroll__content\n  \n    - const sections = ['Logma', 'Naos', 'Chara']\n      each section, index in sect"
  },
  {
    "path": "src/styles/base.css",
    "chars": 3285,
    "preview": "*,\r\n*::after,\r\n*::before {\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n:root {\r\n\tfont-size: 15px;\r\n}\r\n\r\nbody {\r\n\tmargin: 0;\r\n\t--colo"
  },
  {
    "path": "src/styles/shaders-on-scroll.sass",
    "chars": 2960,
    "preview": "$color-1: #0101ec\n$color-2: #dd51b1\n$color-black: black\n$color-white: white\n\n@import url('https://use.typekit.net/zmc8vl"
  }
]

About this extraction

This page contains the full source code of the Faboolea/shaders-on-scroll GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 17 files (610.7 KB), approximately 205.4k tokens, and a symbol index with 1511 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!