+ + | +
+
+
+
+ |
+
+ + | +
+
+
+
+ |
+
+ + | +
+
+
+
+ |
+
+ + | +
+
+
+
+ |
+
+ + | +
+
+
+
+ |
+
+ + | +
+
+
+
+ |
+
+ + | +
+
+
+
+ |
+
LoLLMs (Lord of Large Language Multimodal Systems) is a powerful and versatile AI system designed to handle a wide range of tasks. Developed by ParisNeo, a computer geek passionate about AI, LoLLMs aims to be the ultimate tool for AI-assisted work and creativity.
With its advanced capabilities in natural language processing, multimodal understanding, and code interpretation, LoLLMs can assist users in various domains, from content creation to complex problem-solving.
@@ -151,15 +151,15 @@ https://github.com/highlightjs/highlight.js/issues/2277`),me=F,le=W),ne===void 0If problems persist, please reach out to our support team through one of the contact methods listed below.
- `}],contactLinks:[{text:"Email",url:"mailto:parisneoai@gmail.com"},{text:"Twitter",url:"https://twitter.com/ParisNeo_AI"},{text:"Discord",url:"https://discord.gg/BDxacQmv"},{text:"Sub-Reddit",url:"https://www.reddit.com/r/lollms"},{text:"Instagram",url:"https://www.instagram.com/spacenerduino/"}]}},methods:{scrollToSection(t){const e=document.getElementById(t);e&&e.scrollIntoView({behavior:"smooth",block:"start"})}}},wnt={class:"min-h-screen w-full bg-gradient-to-br from-blue-100 to-purple-100 dark:from-blue-900 dark:to-purple-900 overflow-y-auto"},Rnt={class:"container mx-auto px-4 py-8 relative z-10"},Ant=l("header",{class:"text-center mb-12 sticky top-0 bg-white dark:bg-gray-800 bg-opacity-90 dark:bg-opacity-90 backdrop-filter backdrop-blur-lg p-4 rounded-b-lg shadow-md"},[l("h1",{class:"text-5xl md:text-6xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-400 dark:to-purple-400 mb-2 animate-glow"}," LoLLMs Help Documentation "),l("p",{class:"text-2xl text-gray-600 dark:text-gray-300 italic"},' "One tool to rule them all" ')],-1),Nnt={class:"bg-white dark:bg-gray-800 shadow-md rounded-lg p-6 mb-8 animate-fade-in sticky top-32 max-h-[calc(100vh-8rem)] overflow-y-auto"},Ont=l("h2",{class:"text-3xl font-semibold mb-4 text-gray-800 dark:text-gray-200"},"Table of Contents",-1),Mnt={class:"space-y-2"},Int=["href","onClick"],knt={key:0,class:"ml-4 mt-2 space-y-1"},Dnt=["href","onClick"],Lnt={class:"bg-white dark:bg-gray-800 shadow-md rounded-lg p-6 animate-fade-in"},Pnt=["id"],Fnt={class:"text-4xl font-semibold mb-6 text-transparent bg-clip-text bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-400 dark:to-purple-400"},Unt=["innerHTML"],Bnt={key:0,class:"mt-8"},Gnt=["id"],Vnt={class:"text-3xl font-semibold mb-4 text-gray-700 dark:text-gray-300"},znt=["innerHTML"],Hnt={class:"mt-12 pt-8 border-t border-gray-300 dark:border-gray-700 animate-fade-in"},qnt=l("h2",{class:"text-3xl font-semibold mb-6 text-center text-transparent bg-clip-text bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-400 dark:to-purple-400"},"Contact",-1),$nt={class:"flex flex-wrap justify-center gap-6 mb-8"},Ynt=["href"],Wnt=l("p",{class:"text-center font-bold text-2xl text-gray-700 dark:text-gray-300"},"See ya!",-1),Knt={class:"fixed inset-0 pointer-events-none overflow-hidden"},jnt=l("svg",{class:"w-2 h-2 text-yellow-300",fill:"currentColor",viewBox:"0 0 20 20"},[l("path",{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"})],-1),Qnt=[jnt];function Xnt(t,e,n,s,i,r){return T(),x("div",wnt,[l("div",Rnt,[Ant,l("nav",Nnt,[Ont,l("ul",Mnt,[(T(!0),x(Fe,null,Ke(i.sections,o=>(T(),x("li",{key:o.id,class:"ml-4"},[l("a",{href:`#${o.id}`,onClick:a=>r.scrollToSection(o.id),class:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 hover:underline transition-colors duration-200"},K(o.title),9,Int),o.subsections?(T(),x("ul",knt,[(T(!0),x(Fe,null,Ke(o.subsections,a=>(T(),x("li",{key:a.id},[l("a",{href:`#${a.id}`,onClick:c=>r.scrollToSection(a.id),class:"text-blue-500 dark:text-blue-300 hover:text-blue-700 dark:hover:text-blue-200 hover:underline transition-colors duration-200"},K(a.title),9,Dnt)]))),128))])):G("",!0)]))),128))])]),l("main",Lnt,[(T(!0),x(Fe,null,Ke(i.sections,o=>(T(),x("section",{key:o.id,id:o.id,class:"mb-12"},[l("h2",Fnt,K(o.title),1),l("div",{innerHTML:o.content,class:"prose dark:prose-invert max-w-none"},null,8,Unt),o.subsections?(T(),x("div",Bnt,[(T(!0),x(Fe,null,Ke(o.subsections,a=>(T(),x("section",{key:a.id,id:a.id,class:"mb-8"},[l("h3",Vnt,K(a.title),1),l("div",{innerHTML:a.content,class:"prose dark:prose-invert max-w-none"},null,8,znt)],8,Gnt))),128))])):G("",!0)],8,Pnt))),128))]),l("footer",Hnt,[qnt,l("div",$nt,[(T(!0),x(Fe,null,Ke(i.contactLinks,(o,a)=>(T(),x("a",{key:a,href:o.url,target:"_blank",class:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 hover:underline transition-colors duration-200"},K(o.text),9,Ynt))),128))]),Wnt])]),l("div",Knt,[(T(),x(Fe,null,Ke(50,o=>l("div",{key:o,class:"absolute animate-fall",style:Ht({left:`${Math.random()*100}%`,top:"-20px",animationDuration:`${3+Math.random()*7}s`,animationDelay:`${Math.random()*5}s`})},Qnt,4)),64))])])}const Znt=ot(Cnt,[["render",Xnt]]);function si(t,e=!0,n=1){const s=e?1e3:1024;if(Math.abs(t)Embark on a journey through the realm of advanced AI with L🍓LLMS, your ultimate companion for intelligent conversations and multimodal interactions. Unleash the power of large language models and explore new frontiers in artificial intelligence.
Discover the capabilities of L🍓LLMS:
Embark on a journey through the realm of advanced AI with L🍓LLMS, your ultimate companion for intelligent conversations and multimodal interactions. Unleash the power of large language models and explore new frontiers in artificial intelligence.
Discover the capabilities of L🍓LLMS:
0?1:-1,u.push(ne.x,ne.y,ne.z),h.push(Se/A),h.push(1-le/I),F+=1}}for(let le=0;le>8&255]+Rn[t>>16&255]+Rn[t>>24&255]+"-"+Rn[e&255]+Rn[e>>8&255]+"-"+Rn[e>>16&15|64]+Rn[e>>24&255]+"-"+Rn[n&63|128]+Rn[n>>8&255]+"-"+Rn[n>>16&255]+Rn[n>>24&255]+Rn[s&255]+Rn[s>>8&255]+Rn[s>>16&255]+Rn[s>>24&255]).toLowerCase()}function Nn(t,e,n){return Math.max(e,Math.min(n,t))}function KE(t,e){return(t%e+e)%e}function HAt(t,e,n,s,i){return s+(t-e)*(i-s)/(n-e)}function qAt(t,e,n){return t!==e?(n-t)/(e-t):0}function xl(t,e,n){return(1-n)*t+n*e}function $At(t,e,n,s){return xl(t,e,1-Math.exp(-n*s))}function YAt(t,e=1){return e-Math.abs(KE(t,e*2)-e)}function WAt(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function KAt(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function jAt(t,e){return t+Math.floor(Math.random()*(e-t+1))}function QAt(t,e){return t+Math.random()*(e-t)}function XAt(t){return t*(.5-Math.random())}function ZAt(t){t!==void 0&&(uC=t);let e=uC+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function JAt(t){return t*Tl}function e2t(t){return t*fa}function sb(t){return(t&t-1)===0&&t!==0}function t2t(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function lu(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function n2t(t,e,n,s,i){const r=Math.cos,o=Math.sin,a=r(n/2),c=o(n/2),d=r((e+s)/2),u=o((e+s)/2),h=r((e-s)/2),f=o((e-s)/2),m=r((s-e)/2),_=o((s-e)/2);switch(i){case"XYX":t.set(a*u,c*h,c*f,a*d);break;case"YZY":t.set(c*f,a*u,c*h,a*d);break;case"ZXZ":t.set(c*h,c*f,a*u,a*d);break;case"XZX":t.set(a*u,c*_,c*m,a*d);break;case"YXY":t.set(c*m,a*u,c*_,a*d);break;case"ZYZ":t.set(c*_,c*m,a*u,a*d);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function ei(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function Vt(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}const s2t={DEG2RAD:Tl,RAD2DEG:fa,generateUUID:Gs,clamp:Nn,euclideanModulo:KE,mapLinear:HAt,inverseLerp:qAt,lerp:xl,damp:$At,pingpong:YAt,smoothstep:WAt,smootherstep:KAt,randInt:jAt,randFloat:QAt,randFloatSpread:XAt,seededRandom:ZAt,degToRad:JAt,radToDeg:e2t,isPowerOfTwo:sb,ceilPowerOfTwo:t2t,floorPowerOfTwo:lu,setQuaternionFromProperEuler:n2t,normalize:Vt,denormalize:ei};class At{constructor(e=0,n=0){At.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const n=this.x,s=this.y,i=e.elements;return this.x=i[0]*n+i[3]*s+i[6],this.y=i[1]*n+i[4]*s+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const s=this.length();return this.divideScalar(s||1).multiplyScalar(Math.max(e,Math.min(n,s)))}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=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const s=this.dot(e)/n;return Math.acos(Nn(s,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,s=this.y-e.y;return n*n+s*s}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,s){return this.x=e.x+(n.x-e.x)*s,this.y=e.y+(n.y-e.y)*s,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const s=Math.cos(n),i=Math.sin(n),r=this.x-e.x,o=this.y-e.y;return this.x=r*s-o*i+e.x,this.y=r*i+o*s+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Tt{constructor(e,n,s,i,r,o,a,c,d){Tt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,s,i,r,o,a,c,d)}set(e,n,s,i,r,o,a,c,d){const u=this.elements;return u[0]=e,u[1]=i,u[2]=a,u[3]=n,u[4]=r,u[5]=c,u[6]=s,u[7]=o,u[8]=d,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,s=e.elements;return n[0]=s[0],n[1]=s[1],n[2]=s[2],n[3]=s[3],n[4]=s[4],n[5]=s[5],n[6]=s[6],n[7]=s[7],n[8]=s[8],this}extractBasis(e,n,s){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),s.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const s=e.elements,i=n.elements,r=this.elements,o=s[0],a=s[3],c=s[6],d=s[1],u=s[4],h=s[7],f=s[2],m=s[5],_=s[8],g=i[0],b=i[3],E=i[6],y=i[1],v=i[4],S=i[7],R=i[2],w=i[5],A=i[8];return r[0]=o*g+a*y+c*R,r[3]=o*b+a*v+c*w,r[6]=o*E+a*S+c*A,r[1]=d*g+u*y+h*R,r[4]=d*b+u*v+h*w,r[7]=d*E+u*S+h*A,r[2]=f*g+m*y+_*R,r[5]=f*b+m*v+_*w,r[8]=f*E+m*S+_*A,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],c=e[6],d=e[7],u=e[8];return n*o*u-n*a*d-s*r*u+s*a*c+i*r*d-i*o*c}invert(){const e=this.elements,n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],c=e[6],d=e[7],u=e[8],h=u*o-a*d,f=a*c-u*r,m=d*r-o*c,_=n*h+s*f+i*m;if(_===0)return this.set(0,0,0,0,0,0,0,0,0);const g=1/_;return e[0]=h*g,e[1]=(i*d-u*s)*g,e[2]=(a*s-i*o)*g,e[3]=f*g,e[4]=(u*n-i*c)*g,e[5]=(i*r-a*n)*g,e[6]=m*g,e[7]=(s*c-d*n)*g,e[8]=(o*n-s*r)*g,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,s,i,r,o,a){const c=Math.cos(r),d=Math.sin(r);return this.set(s*c,s*d,-s*(c*o+d*a)+o+e,-i*d,i*c,-i*(-d*o+c*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(Mm.makeScale(e,n)),this}rotate(e){return this.premultiply(Mm.makeRotation(-e)),this}translate(e,n){return this.premultiply(Mm.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),s=Math.sin(e);return this.set(n,-s,0,s,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,s=e.elements;for(let i=0;i<9;i++)if(n[i]!==s[i])return!1;return!0}fromArray(e,n=0){for(let s=0;s<9;s++)this.elements[s]=e[s+n];return this}toArray(e=[],n=0){const s=this.elements;return e[n]=s[0],e[n+1]=s[1],e[n+2]=s[2],e[n+3]=s[3],e[n+4]=s[4],e[n+5]=s[5],e[n+6]=s[6],e[n+7]=s[7],e[n+8]=s[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Mm=new Tt;function UN(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}function Yl(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function i2t(){const t=Yl("canvas");return t.style.display="block",t}const pC={};function Cl(t){t in pC||(pC[t]=!0,console.warn(t))}const _C=new Tt().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),hC=new Tt().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Pc={[wn]:{transfer:iu,primaries:ru,toReference:t=>t,fromReference:t=>t},[tn]:{transfer:Kt,primaries:ru,toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[tp]:{transfer:iu,primaries:ou,toReference:t=>t.applyMatrix3(hC),fromReference:t=>t.applyMatrix3(_C)},[WE]:{transfer:Kt,primaries:ou,toReference:t=>t.convertSRGBToLinear().applyMatrix3(hC),fromReference:t=>t.applyMatrix3(_C).convertLinearToSRGB()}},r2t=new Set([wn,tp]),Ft={enabled:!0,_workingColorSpace:wn,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(t){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!t},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!r2t.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const s=Pc[e].toReference,i=Pc[n].fromReference;return i(s(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return Pc[t].primaries},getTransfer:function(t){return t===_s?iu:Pc[t].transfer}};function Qo(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function Im(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let Eo;class BN{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{Eo===void 0&&(Eo=Yl("canvas")),Eo.width=e.width,Eo.height=e.height;const s=Eo.getContext("2d");e instanceof ImageData?s.putImageData(e,0,0):s.drawImage(e,0,0,e.width,e.height),n=Eo}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=Yl("canvas");n.width=e.width,n.height=e.height;const s=n.getContext("2d");s.drawImage(e,0,0,e.width,e.height);const i=s.getImageData(0,0,e.width,e.height),r=i.data;for(let o=0;o0&&(s.userData=this.userData),n||(e.textures[this.uuid]=s),s}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==wN)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case pa:e.x=e.x-Math.floor(e.x);break;case us:e.x=e.x<0?0:1;break;case su:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case pa:e.y=e.y-Math.floor(e.y);break;case us:e.y=e.y<0?0:1;break;case su:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return Cl("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===tn?Qr:PN}set encoding(e){Cl("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===Qr?tn:_s}}Cn.DEFAULT_IMAGE=null;Cn.DEFAULT_MAPPING=wN;Cn.DEFAULT_ANISOTROPY=1;class $t{constructor(e=0,n=0,s=0,i=1){$t.prototype.isVector4=!0,this.x=e,this.y=n,this.z=s,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,n,s,i){return this.x=e,this.y=n,this.z=s,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const n=this.x,s=this.y,i=this.z,r=this.w,o=e.elements;return this.x=o[0]*n+o[4]*s+o[8]*i+o[12]*r,this.y=o[1]*n+o[5]*s+o[9]*i+o[13]*r,this.z=o[2]*n+o[6]*s+o[10]*i+o[14]*r,this.w=o[3]*n+o[7]*s+o[11]*i+o[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,s,i,r;const c=e.elements,d=c[0],u=c[4],h=c[8],f=c[1],m=c[5],_=c[9],g=c[2],b=c[6],E=c[10];if(Math.abs(u-f)<.01&&Math.abs(h-g)<.01&&Math.abs(_-b)<.01){if(Math.abs(u+f)<.1&&Math.abs(h+g)<.1&&Math.abs(_+b)<.1&&Math.abs(d+m+E-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const v=(d+1)/2,S=(m+1)/2,R=(E+1)/2,w=(u+f)/4,A=(h+g)/4,I=(_+b)/4;return v>S&&v>R?v<.01?(s=0,i=.707106781,r=.707106781):(s=Math.sqrt(v),i=w/s,r=A/s):S>R?S<.01?(s=.707106781,i=0,r=.707106781):(i=Math.sqrt(S),s=w/i,r=I/i):R<.01?(s=.707106781,i=.707106781,r=0):(r=Math.sqrt(R),s=A/r,i=I/r),this.set(s,i,r,n),this}let y=Math.sqrt((b-_)*(b-_)+(h-g)*(h-g)+(f-u)*(f-u));return Math.abs(y)<.001&&(y=1),this.x=(b-_)/y,this.y=(h-g)/y,this.z=(f-u)/y,this.w=Math.acos((d+m+E-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const s=this.length();return this.divideScalar(s||1).multiplyScalar(Math.max(e,Math.min(n,s)))}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=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,s){return this.x=e.x+(n.x-e.x)*s,this.y=e.y+(n.y-e.y)*s,this.z=e.z+(n.z-e.z)*s,this.w=e.w+(n.w-e.w)*s,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class l2t extends Fa{constructor(e=1,n=1,s={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new $t(0,0,e,n),this.scissorTest=!1,this.viewport=new $t(0,0,e,n);const i={width:e,height:n,depth:1};s.encoding!==void 0&&(Cl("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),s.colorSpace=s.encoding===Qr?tn:_s),s=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:zn,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},s),this.texture=new Cn(i,s.mapping,s.wrapS,s.wrapT,s.magFilter,s.minFilter,s.format,s.type,s.anisotropy,s.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=s.generateMipmaps,this.texture.internalFormat=s.internalFormat,this.depthBuffer=s.depthBuffer,this.stencilBuffer=s.stencilBuffer,this.depthTexture=s.depthTexture,this.samples=s.samples}setSize(e,n,s=1){(this.width!==e||this.height!==n||this.depth!==s)&&(this.width=e,this.height=n,this.depth=s,this.texture.image.width=e,this.texture.image.height=n,this.texture.image.depth=s,this.dispose()),this.viewport.set(0,0,e,n),this.scissor.set(0,0,e,n)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const n=Object.assign({},e.texture.image);return this.texture.source=new GN(n),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class io extends l2t{constructor(e=1,n=1,s={}){super(e,n,s),this.isWebGLRenderTarget=!0}}class VN extends Cn{constructor(e=null,n=1,s=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:n,height:s,depth:i},this.magFilter=gn,this.minFilter=gn,this.wrapR=us,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class c2t extends Cn{constructor(e=null,n=1,s=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:n,height:s,depth:i},this.magFilter=gn,this.minFilter=gn,this.wrapR=us,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class yr{constructor(e=0,n=0,s=0,i=1){this.isQuaternion=!0,this._x=e,this._y=n,this._z=s,this._w=i}static slerpFlat(e,n,s,i,r,o,a){let c=s[i+0],d=s[i+1],u=s[i+2],h=s[i+3];const f=r[o+0],m=r[o+1],_=r[o+2],g=r[o+3];if(a===0){e[n+0]=c,e[n+1]=d,e[n+2]=u,e[n+3]=h;return}if(a===1){e[n+0]=f,e[n+1]=m,e[n+2]=_,e[n+3]=g;return}if(h!==g||c!==f||d!==m||u!==_){let b=1-a;const E=c*f+d*m+u*_+h*g,y=E>=0?1:-1,v=1-E*E;if(v>Number.EPSILON){const R=Math.sqrt(v),w=Math.atan2(R,E*y);b=Math.sin(b*w)/R,a=Math.sin(a*w)/R}const S=a*y;if(c=c*b+f*S,d=d*b+m*S,u=u*b+_*S,h=h*b+g*S,b===1-a){const R=1/Math.sqrt(c*c+d*d+u*u+h*h);c*=R,d*=R,u*=R,h*=R}}e[n]=c,e[n+1]=d,e[n+2]=u,e[n+3]=h}static multiplyQuaternionsFlat(e,n,s,i,r,o){const a=s[i],c=s[i+1],d=s[i+2],u=s[i+3],h=r[o],f=r[o+1],m=r[o+2],_=r[o+3];return e[n]=a*_+u*h+c*m-d*f,e[n+1]=c*_+u*f+d*h-a*m,e[n+2]=d*_+u*m+a*f-c*h,e[n+3]=u*_-a*h-c*f-d*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,s,i){return this._x=e,this._y=n,this._z=s,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n){const s=e._x,i=e._y,r=e._z,o=e._order,a=Math.cos,c=Math.sin,d=a(s/2),u=a(i/2),h=a(r/2),f=c(s/2),m=c(i/2),_=c(r/2);switch(o){case"XYZ":this._x=f*u*h+d*m*_,this._y=d*m*h-f*u*_,this._z=d*u*_+f*m*h,this._w=d*u*h-f*m*_;break;case"YXZ":this._x=f*u*h+d*m*_,this._y=d*m*h-f*u*_,this._z=d*u*_-f*m*h,this._w=d*u*h+f*m*_;break;case"ZXY":this._x=f*u*h-d*m*_,this._y=d*m*h+f*u*_,this._z=d*u*_+f*m*h,this._w=d*u*h-f*m*_;break;case"ZYX":this._x=f*u*h-d*m*_,this._y=d*m*h+f*u*_,this._z=d*u*_-f*m*h,this._w=d*u*h+f*m*_;break;case"YZX":this._x=f*u*h+d*m*_,this._y=d*m*h+f*u*_,this._z=d*u*_-f*m*h,this._w=d*u*h-f*m*_;break;case"XZY":this._x=f*u*h-d*m*_,this._y=d*m*h-f*u*_,this._z=d*u*_+f*m*h,this._w=d*u*h+f*m*_;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return n!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const s=n/2,i=Math.sin(s);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(s),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,s=n[0],i=n[4],r=n[8],o=n[1],a=n[5],c=n[9],d=n[2],u=n[6],h=n[10],f=s+a+h;if(f>0){const m=.5/Math.sqrt(f+1);this._w=.25/m,this._x=(u-c)*m,this._y=(r-d)*m,this._z=(o-i)*m}else if(s>a&&s>h){const m=2*Math.sqrt(1+s-a-h);this._w=(u-c)/m,this._x=.25*m,this._y=(i+o)/m,this._z=(r+d)/m}else if(a>h){const m=2*Math.sqrt(1+a-s-h);this._w=(r-d)/m,this._x=(i+o)/m,this._y=.25*m,this._z=(c+u)/m}else{const m=2*Math.sqrt(1+h-s-a);this._w=(o-i)/m,this._x=(r+d)/m,this._y=(c+u)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let s=e.dot(n)+1;return s Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=s):(this._x=0,this._y=-e.z,this._z=e.y,this._w=s)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=s),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Nn(this.dot(e),-1,1)))}rotateTowards(e,n){const s=this.angleTo(e);if(s===0)return this;const i=Math.min(1,n/s);return this.slerp(e,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(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){const s=e._x,i=e._y,r=e._z,o=e._w,a=n._x,c=n._y,d=n._z,u=n._w;return this._x=s*u+o*a+i*d-r*c,this._y=i*u+o*c+r*a-s*d,this._z=r*u+o*d+s*c-i*a,this._w=o*u-s*a-i*c-r*d,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const s=this._x,i=this._y,r=this._z,o=this._w;let a=o*e._w+s*e._x+i*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=s,this._y=i,this._z=r,this;const c=1-a*a;if(c<=Number.EPSILON){const m=1-n;return this._w=m*o+n*this._w,this._x=m*s+n*this._x,this._y=m*i+n*this._y,this._z=m*r+n*this._z,this.normalize(),this._onChangeCallback(),this}const d=Math.sqrt(c),u=Math.atan2(d,a),h=Math.sin((1-n)*u)/d,f=Math.sin(n*u)/d;return this._w=o*h+this._w*f,this._x=s*h+this._x*f,this._y=i*h+this._y*f,this._z=r*h+this._z*f,this._onChangeCallback(),this}slerpQuaternions(e,n,s){return this.copy(e).slerp(n,s)}random(){const e=Math.random(),n=Math.sqrt(1-e),s=Math.sqrt(e),i=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(n*Math.cos(i),s*Math.sin(r),s*Math.cos(r),n*Math.sin(i))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class ae{constructor(e=0,n=0,s=0){ae.prototype.isVector3=!0,this.x=e,this.y=n,this.z=s}set(e,n,s){return s===void 0&&(s=this.z),this.x=e,this.y=n,this.z=s,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(fC.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(fC.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,s=this.y,i=this.z,r=e.elements;return this.x=r[0]*n+r[3]*s+r[6]*i,this.y=r[1]*n+r[4]*s+r[7]*i,this.z=r[2]*n+r[5]*s+r[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,s=this.y,i=this.z,r=e.elements,o=1/(r[3]*n+r[7]*s+r[11]*i+r[15]);return this.x=(r[0]*n+r[4]*s+r[8]*i+r[12])*o,this.y=(r[1]*n+r[5]*s+r[9]*i+r[13])*o,this.z=(r[2]*n+r[6]*s+r[10]*i+r[14])*o,this}applyQuaternion(e){const n=this.x,s=this.y,i=this.z,r=e.x,o=e.y,a=e.z,c=e.w,d=2*(o*i-a*s),u=2*(a*n-r*i),h=2*(r*s-o*n);return this.x=n+c*d+o*h-a*u,this.y=s+c*u+a*d-r*h,this.z=i+c*h+r*u-o*d,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,s=this.y,i=this.z,r=e.elements;return this.x=r[0]*n+r[4]*s+r[8]*i,this.y=r[1]*n+r[5]*s+r[9]*i,this.z=r[2]*n+r[6]*s+r[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const s=this.length();return this.divideScalar(s||1).multiplyScalar(Math.max(e,Math.min(n,s)))}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=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,s){return this.x=e.x+(n.x-e.x)*s,this.y=e.y+(n.y-e.y)*s,this.z=e.z+(n.z-e.z)*s,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const s=e.x,i=e.y,r=e.z,o=n.x,a=n.y,c=n.z;return this.x=i*c-r*a,this.y=r*o-s*c,this.z=s*a-i*o,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const s=e.dot(this)/n;return this.copy(e).multiplyScalar(s)}projectOnPlane(e){return Dm.copy(this).projectOnVector(e),this.sub(Dm)}reflect(e){return this.sub(Dm.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const s=this.dot(e)/n;return Math.acos(Nn(s,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,s=this.y-e.y,i=this.z-e.z;return n*n+s*s+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,n,s){const i=Math.sin(n)*e;return this.x=i*Math.sin(s),this.y=Math.cos(n)*e,this.z=i*Math.cos(s),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,s){return this.x=e*Math.sin(n),this.y=s,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),s=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=s,this.z=i,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,n=Math.random()*Math.PI*2,s=Math.sqrt(1-e**2);return this.x=s*Math.cos(n),this.y=s*Math.sin(n),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Dm=new ae,fC=new yr;class Ui{constructor(e=new ae(1/0,1/0,1/0),n=new ae(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,s=e.length;n this.max.x||e.ythis.max.y||e.z this.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x this.max.x||e.max.y this.max.y||e.max.z this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Rs),Rs.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,s;return e.normal.x>0?(n=e.normal.x*this.min.x,s=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,s=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,s+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,s+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,s+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,s+=e.normal.z*this.min.z),n<=-e.constant&&s>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Ja),Uc.subVectors(this.max,Ja),yo.subVectors(e.a,Ja),vo.subVectors(e.b,Ja),So.subVectors(e.c,Ja),qi.subVectors(vo,yo),$i.subVectors(So,vo),wr.subVectors(yo,So);let n=[0,-qi.z,qi.y,0,-$i.z,$i.y,0,-wr.z,wr.y,qi.z,0,-qi.x,$i.z,0,-$i.x,wr.z,0,-wr.x,-qi.y,qi.x,0,-$i.y,$i.x,0,-wr.y,wr.x,0];return!Lm(n,yo,vo,So,Uc)||(n=[1,0,0,0,1,0,0,0,1],!Lm(n,yo,vo,So,Uc))?!1:(Bc.crossVectors(qi,$i),n=[Bc.x,Bc.y,Bc.z],Lm(n,yo,vo,So,Uc))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Rs).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Rs).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(bi[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),bi[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),bi[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),bi[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),bi[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),bi[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),bi[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),bi[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(bi),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const bi=[new ae,new ae,new ae,new ae,new ae,new ae,new ae,new ae],Rs=new ae,Fc=new Ui,yo=new ae,vo=new ae,So=new ae,qi=new ae,$i=new ae,wr=new ae,Ja=new ae,Uc=new ae,Bc=new ae,Rr=new ae;function Lm(t,e,n,s,i){for(let r=0,o=t.length-3;r<=o;r+=3){Rr.fromArray(t,r);const a=i.x*Math.abs(Rr.x)+i.y*Math.abs(Rr.y)+i.z*Math.abs(Rr.z),c=e.dot(Rr),d=n.dot(Rr),u=s.dot(Rr);if(Math.max(-Math.max(c,d,u),Math.min(c,d,u))>a)return!1}return!0}const d2t=new Ui,el=new ae,Pm=new ae;class pi{constructor(e=new ae,n=-1){this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const s=this.center;n!==void 0?s.copy(n):d2t.setFromPoints(e).getCenter(s);let i=0;for(let r=0,o=e.length;r this.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;el.subVectors(e,this.center);const n=el.lengthSq();if(n>this.radius*this.radius){const s=Math.sqrt(n),i=(s-this.radius)*.5;this.center.addScaledVector(el,i/s),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Pm.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(el.copy(e.center).add(Pm)),this.expandByPoint(el.copy(e.center).sub(Pm))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const Ei=new ae,Fm=new ae,Gc=new ae,Yi=new ae,Um=new ae,Vc=new ae,Bm=new ae;class np{constructor(e=new ae,n=new ae(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Ei)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const s=n.dot(this.direction);return s<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,s)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=Ei.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(Ei.copy(this.origin).addScaledVector(this.direction,n),Ei.distanceToSquared(e))}distanceSqToSegment(e,n,s,i){Fm.copy(e).add(n).multiplyScalar(.5),Gc.copy(n).sub(e).normalize(),Yi.copy(this.origin).sub(Fm);const r=e.distanceTo(n)*.5,o=-this.direction.dot(Gc),a=Yi.dot(this.direction),c=-Yi.dot(Gc),d=Yi.lengthSq(),u=Math.abs(1-o*o);let h,f,m,_;if(u>0)if(h=o*c-a,f=o*a-c,_=r*u,h>=0)if(f>=-_)if(f<=_){const g=1/u;h*=g,f*=g,m=h*(h+o*f+2*a)+f*(o*h+f+2*c)+d}else f=r,h=Math.max(0,-(o*f+a)),m=-h*h+f*(f+2*c)+d;else f=-r,h=Math.max(0,-(o*f+a)),m=-h*h+f*(f+2*c)+d;else f<=-_?(h=Math.max(0,-(-o*r+a)),f=h>0?-r:Math.min(Math.max(-r,-c),r),m=-h*h+f*(f+2*c)+d):f<=_?(h=0,f=Math.min(Math.max(-r,-c),r),m=f*(f+2*c)+d):(h=Math.max(0,-(o*r+a)),f=h>0?r:Math.min(Math.max(-r,-c),r),m=-h*h+f*(f+2*c)+d);else f=o>0?-r:r,h=Math.max(0,-(o*f+a)),m=-h*h+f*(f+2*c)+d;return s&&s.copy(this.origin).addScaledVector(this.direction,h),i&&i.copy(Fm).addScaledVector(Gc,f),m}intersectSphere(e,n){Ei.subVectors(e.center,this.origin);const s=Ei.dot(this.direction),i=Ei.dot(Ei)-s*s,r=e.radius*e.radius;if(i>r)return null;const o=Math.sqrt(r-i),a=s-o,c=s+o;return c<0?null:a<0?this.at(c,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const s=-(this.origin.dot(e.normal)+e.constant)/n;return s>=0?s:null}intersectPlane(e,n){const s=this.distanceToPlane(e);return s===null?null:this.at(s,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let s,i,r,o,a,c;const d=1/this.direction.x,u=1/this.direction.y,h=1/this.direction.z,f=this.origin;return d>=0?(s=(e.min.x-f.x)*d,i=(e.max.x-f.x)*d):(s=(e.max.x-f.x)*d,i=(e.min.x-f.x)*d),u>=0?(r=(e.min.y-f.y)*u,o=(e.max.y-f.y)*u):(r=(e.max.y-f.y)*u,o=(e.min.y-f.y)*u),s>o||r>i||((r>s||isNaN(s))&&(s=r),(o=0?(a=(e.min.z-f.z)*h,c=(e.max.z-f.z)*h):(a=(e.max.z-f.z)*h,c=(e.min.z-f.z)*h),s>c||a>i)||((a>s||s!==s)&&(s=a),(c=0?s:i,n)}intersectsBox(e){return this.intersectBox(e,Ei)!==null}intersectTriangle(e,n,s,i,r){Um.subVectors(n,e),Vc.subVectors(s,e),Bm.crossVectors(Um,Vc);let o=this.direction.dot(Bm),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Yi.subVectors(this.origin,e);const c=a*this.direction.dot(Vc.crossVectors(Yi,Vc));if(c<0)return null;const d=a*this.direction.dot(Um.cross(Yi));if(d<0||c+d>o)return null;const u=-a*Yi.dot(Bm);return u<0?null:this.at(u/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class xt{constructor(e,n,s,i,r,o,a,c,d,u,h,f,m,_,g,b){xt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,n,s,i,r,o,a,c,d,u,h,f,m,_,g,b)}set(e,n,s,i,r,o,a,c,d,u,h,f,m,_,g,b){const E=this.elements;return E[0]=e,E[4]=n,E[8]=s,E[12]=i,E[1]=r,E[5]=o,E[9]=a,E[13]=c,E[2]=d,E[6]=u,E[10]=h,E[14]=f,E[3]=m,E[7]=_,E[11]=g,E[15]=b,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 xt().fromArray(this.elements)}copy(e){const n=this.elements,s=e.elements;return n[0]=s[0],n[1]=s[1],n[2]=s[2],n[3]=s[3],n[4]=s[4],n[5]=s[5],n[6]=s[6],n[7]=s[7],n[8]=s[8],n[9]=s[9],n[10]=s[10],n[11]=s[11],n[12]=s[12],n[13]=s[13],n[14]=s[14],n[15]=s[15],this}copyPosition(e){const n=this.elements,s=e.elements;return n[12]=s[12],n[13]=s[13],n[14]=s[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,s){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),s.setFromMatrixColumn(this,2),this}makeBasis(e,n,s){return this.set(e.x,n.x,s.x,0,e.y,n.y,s.y,0,e.z,n.z,s.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,s=e.elements,i=1/To.setFromMatrixColumn(e,0).length(),r=1/To.setFromMatrixColumn(e,1).length(),o=1/To.setFromMatrixColumn(e,2).length();return n[0]=s[0]*i,n[1]=s[1]*i,n[2]=s[2]*i,n[3]=0,n[4]=s[4]*r,n[5]=s[5]*r,n[6]=s[6]*r,n[7]=0,n[8]=s[8]*o,n[9]=s[9]*o,n[10]=s[10]*o,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,s=e.x,i=e.y,r=e.z,o=Math.cos(s),a=Math.sin(s),c=Math.cos(i),d=Math.sin(i),u=Math.cos(r),h=Math.sin(r);if(e.order==="XYZ"){const f=o*u,m=o*h,_=a*u,g=a*h;n[0]=c*u,n[4]=-c*h,n[8]=d,n[1]=m+_*d,n[5]=f-g*d,n[9]=-a*c,n[2]=g-f*d,n[6]=_+m*d,n[10]=o*c}else if(e.order==="YXZ"){const f=c*u,m=c*h,_=d*u,g=d*h;n[0]=f+g*a,n[4]=_*a-m,n[8]=o*d,n[1]=o*h,n[5]=o*u,n[9]=-a,n[2]=m*a-_,n[6]=g+f*a,n[10]=o*c}else if(e.order==="ZXY"){const f=c*u,m=c*h,_=d*u,g=d*h;n[0]=f-g*a,n[4]=-o*h,n[8]=_+m*a,n[1]=m+_*a,n[5]=o*u,n[9]=g-f*a,n[2]=-o*d,n[6]=a,n[10]=o*c}else if(e.order==="ZYX"){const f=o*u,m=o*h,_=a*u,g=a*h;n[0]=c*u,n[4]=_*d-m,n[8]=f*d+g,n[1]=c*h,n[5]=g*d+f,n[9]=m*d-_,n[2]=-d,n[6]=a*c,n[10]=o*c}else if(e.order==="YZX"){const f=o*c,m=o*d,_=a*c,g=a*d;n[0]=c*u,n[4]=g-f*h,n[8]=_*h+m,n[1]=h,n[5]=o*u,n[9]=-a*u,n[2]=-d*u,n[6]=m*h+_,n[10]=f-g*h}else if(e.order==="XZY"){const f=o*c,m=o*d,_=a*c,g=a*d;n[0]=c*u,n[4]=-h,n[8]=d*u,n[1]=f*h+g,n[5]=o*u,n[9]=m*h-_,n[2]=_*h-m,n[6]=a*u,n[10]=g*h+f}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(u2t,e,p2t)}lookAt(e,n,s){const i=this.elements;return jn.subVectors(e,n),jn.lengthSq()===0&&(jn.z=1),jn.normalize(),Wi.crossVectors(s,jn),Wi.lengthSq()===0&&(Math.abs(s.z)===1?jn.x+=1e-4:jn.z+=1e-4,jn.normalize(),Wi.crossVectors(s,jn)),Wi.normalize(),zc.crossVectors(jn,Wi),i[0]=Wi.x,i[4]=zc.x,i[8]=jn.x,i[1]=Wi.y,i[5]=zc.y,i[9]=jn.y,i[2]=Wi.z,i[6]=zc.z,i[10]=jn.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const s=e.elements,i=n.elements,r=this.elements,o=s[0],a=s[4],c=s[8],d=s[12],u=s[1],h=s[5],f=s[9],m=s[13],_=s[2],g=s[6],b=s[10],E=s[14],y=s[3],v=s[7],S=s[11],R=s[15],w=i[0],A=i[4],I=i[8],C=i[12],O=i[1],B=i[5],H=i[9],te=i[13],k=i[2],$=i[6],q=i[10],F=i[14],W=i[3],ne=i[7],le=i[11],me=i[15];return r[0]=o*w+a*O+c*k+d*W,r[4]=o*A+a*B+c*$+d*ne,r[8]=o*I+a*H+c*q+d*le,r[12]=o*C+a*te+c*F+d*me,r[1]=u*w+h*O+f*k+m*W,r[5]=u*A+h*B+f*$+m*ne,r[9]=u*I+h*H+f*q+m*le,r[13]=u*C+h*te+f*F+m*me,r[2]=_*w+g*O+b*k+E*W,r[6]=_*A+g*B+b*$+E*ne,r[10]=_*I+g*H+b*q+E*le,r[14]=_*C+g*te+b*F+E*me,r[3]=y*w+v*O+S*k+R*W,r[7]=y*A+v*B+S*$+R*ne,r[11]=y*I+v*H+S*q+R*le,r[15]=y*C+v*te+S*F+R*me,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],s=e[4],i=e[8],r=e[12],o=e[1],a=e[5],c=e[9],d=e[13],u=e[2],h=e[6],f=e[10],m=e[14],_=e[3],g=e[7],b=e[11],E=e[15];return _*(+r*c*h-i*d*h-r*a*f+s*d*f+i*a*m-s*c*m)+g*(+n*c*m-n*d*f+r*o*f-i*o*m+i*d*u-r*c*u)+b*(+n*d*h-n*a*m-r*o*h+s*o*m+r*a*u-s*d*u)+E*(-i*a*u-n*c*h+n*a*f+i*o*h-s*o*f+s*c*u)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,s){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=n,i[14]=s),this}invert(){const e=this.elements,n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],c=e[6],d=e[7],u=e[8],h=e[9],f=e[10],m=e[11],_=e[12],g=e[13],b=e[14],E=e[15],y=h*b*d-g*f*d+g*c*m-a*b*m-h*c*E+a*f*E,v=_*f*d-u*b*d-_*c*m+o*b*m+u*c*E-o*f*E,S=u*g*d-_*h*d+_*a*m-o*g*m-u*a*E+o*h*E,R=_*h*c-u*g*c-_*a*f+o*g*f+u*a*b-o*h*b,w=n*y+s*v+i*S+r*R;if(w===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const A=1/w;return e[0]=y*A,e[1]=(g*f*r-h*b*r-g*i*m+s*b*m+h*i*E-s*f*E)*A,e[2]=(a*b*r-g*c*r+g*i*d-s*b*d-a*i*E+s*c*E)*A,e[3]=(h*c*r-a*f*r-h*i*d+s*f*d+a*i*m-s*c*m)*A,e[4]=v*A,e[5]=(u*b*r-_*f*r+_*i*m-n*b*m-u*i*E+n*f*E)*A,e[6]=(_*c*r-o*b*r-_*i*d+n*b*d+o*i*E-n*c*E)*A,e[7]=(o*f*r-u*c*r+u*i*d-n*f*d-o*i*m+n*c*m)*A,e[8]=S*A,e[9]=(_*h*r-u*g*r-_*s*m+n*g*m+u*s*E-n*h*E)*A,e[10]=(o*g*r-_*a*r+_*s*d-n*g*d-o*s*E+n*a*E)*A,e[11]=(u*a*r-o*h*r-u*s*d+n*h*d+o*s*m-n*a*m)*A,e[12]=R*A,e[13]=(u*g*i-_*h*i+_*s*f-n*g*f-u*s*b+n*h*b)*A,e[14]=(_*a*i-o*g*i-_*s*c+n*g*c+o*s*b-n*a*b)*A,e[15]=(o*h*i-u*a*i+u*s*c-n*h*c-o*s*f+n*a*f)*A,this}scale(e){const n=this.elements,s=e.x,i=e.y,r=e.z;return n[0]*=s,n[4]*=i,n[8]*=r,n[1]*=s,n[5]*=i,n[9]*=r,n[2]*=s,n[6]*=i,n[10]*=r,n[3]*=s,n[7]*=i,n[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],s=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,s,i))}makeTranslation(e,n,s){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,n,0,0,1,s,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),s=Math.sin(e);return this.set(1,0,0,0,0,n,-s,0,0,s,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),s=Math.sin(e);return this.set(n,0,s,0,0,1,0,0,-s,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),s=Math.sin(e);return this.set(n,-s,0,0,s,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const s=Math.cos(n),i=Math.sin(n),r=1-s,o=e.x,a=e.y,c=e.z,d=r*o,u=r*a;return this.set(d*o+s,d*a-i*c,d*c+i*a,0,d*a+i*c,u*a+s,u*c-i*o,0,d*c-i*a,u*c+i*o,r*c*c+s,0,0,0,0,1),this}makeScale(e,n,s){return this.set(e,0,0,0,0,n,0,0,0,0,s,0,0,0,0,1),this}makeShear(e,n,s,i,r,o){return this.set(1,s,r,0,e,1,o,0,n,i,1,0,0,0,0,1),this}compose(e,n,s){const i=this.elements,r=n._x,o=n._y,a=n._z,c=n._w,d=r+r,u=o+o,h=a+a,f=r*d,m=r*u,_=r*h,g=o*u,b=o*h,E=a*h,y=c*d,v=c*u,S=c*h,R=s.x,w=s.y,A=s.z;return i[0]=(1-(g+E))*R,i[1]=(m+S)*R,i[2]=(_-v)*R,i[3]=0,i[4]=(m-S)*w,i[5]=(1-(f+E))*w,i[6]=(b+y)*w,i[7]=0,i[8]=(_+v)*A,i[9]=(b-y)*A,i[10]=(1-(f+g))*A,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,n,s){const i=this.elements;let r=To.set(i[0],i[1],i[2]).length();const o=To.set(i[4],i[5],i[6]).length(),a=To.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),e.x=i[12],e.y=i[13],e.z=i[14],As.copy(this);const d=1/r,u=1/o,h=1/a;return As.elements[0]*=d,As.elements[1]*=d,As.elements[2]*=d,As.elements[4]*=u,As.elements[5]*=u,As.elements[6]*=u,As.elements[8]*=h,As.elements[9]*=h,As.elements[10]*=h,n.setFromRotationMatrix(As),s.x=r,s.y=o,s.z=a,this}makePerspective(e,n,s,i,r,o,a=Ni){const c=this.elements,d=2*r/(n-e),u=2*r/(s-i),h=(n+e)/(n-e),f=(s+i)/(s-i);let m,_;if(a===Ni)m=-(o+r)/(o-r),_=-2*o*r/(o-r);else if(a===au)m=-o/(o-r),_=-o*r/(o-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=d,c[4]=0,c[8]=h,c[12]=0,c[1]=0,c[5]=u,c[9]=f,c[13]=0,c[2]=0,c[6]=0,c[10]=m,c[14]=_,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,n,s,i,r,o,a=Ni){const c=this.elements,d=1/(n-e),u=1/(s-i),h=1/(o-r),f=(n+e)*d,m=(s+i)*u;let _,g;if(a===Ni)_=(o+r)*h,g=-2*h;else if(a===au)_=r*h,g=-1*h;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=2*d,c[4]=0,c[8]=0,c[12]=-f,c[1]=0,c[5]=2*u,c[9]=0,c[13]=-m,c[2]=0,c[6]=0,c[10]=g,c[14]=-_,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){const n=this.elements,s=e.elements;for(let i=0;i<16;i++)if(n[i]!==s[i])return!1;return!0}fromArray(e,n=0){for(let s=0;s<16;s++)this.elements[s]=e[s+n];return this}toArray(e=[],n=0){const s=this.elements;return e[n]=s[0],e[n+1]=s[1],e[n+2]=s[2],e[n+3]=s[3],e[n+4]=s[4],e[n+5]=s[5],e[n+6]=s[6],e[n+7]=s[7],e[n+8]=s[8],e[n+9]=s[9],e[n+10]=s[10],e[n+11]=s[11],e[n+12]=s[12],e[n+13]=s[13],e[n+14]=s[14],e[n+15]=s[15],e}}const To=new ae,As=new xt,u2t=new ae(0,0,0),p2t=new ae(1,1,1),Wi=new ae,zc=new ae,jn=new ae,mC=new xt,gC=new yr;class sp{constructor(e=0,n=0,s=0,i=sp.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=s,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,s,i=this._order){return this._x=e,this._y=n,this._z=s,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,s=!0){const i=e.elements,r=i[0],o=i[4],a=i[8],c=i[1],d=i[5],u=i[9],h=i[2],f=i[6],m=i[10];switch(n){case"XYZ":this._y=Math.asin(Nn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,m),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(f,d),this._z=0);break;case"YXZ":this._x=Math.asin(-Nn(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-h,r),this._z=0);break;case"ZXY":this._x=Math.asin(Nn(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-h,m),this._z=Math.atan2(-o,d)):(this._y=0,this._z=Math.atan2(c,r));break;case"ZYX":this._y=Math.asin(-Nn(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(f,m),this._z=Math.atan2(c,r)):(this._x=0,this._z=Math.atan2(-o,d));break;case"YZX":this._z=Math.asin(Nn(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-u,d),this._y=Math.atan2(-h,r)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-Nn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(f,d),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-u,m),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,s===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,s){return mC.makeRotationFromQuaternion(e),this.setFromRotationMatrix(mC,n,s)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return gC.setFromEuler(this),this.setFromQuaternion(gC,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}sp.DEFAULT_ORDER="XYZ";class zN{constructor(){this.mask=1}set(e){this.mask=(1< >>0}enable(e){this.mask|=1< 1){for(let n=0;n 1){for(let s=0;s 0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),i.maxGeometryCount=this._maxGeometryCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(e),this.boundingSphere!==null&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function r(a,c){return a[c.uuid]===void 0&&(a[c.uuid]=c.toJSON(e)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=r(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const c=a.shapes;if(Array.isArray(c))for(let d=0,u=c.length;d0){i.children=[];for(let a=0;a 0){i.animations=[];for(let a=0;a 0&&(s.geometries=a),c.length>0&&(s.materials=c),d.length>0&&(s.textures=d),u.length>0&&(s.images=u),h.length>0&&(s.shapes=h),f.length>0&&(s.skeletons=f),m.length>0&&(s.animations=m),_.length>0&&(s.nodes=_)}return s.object=i,s;function o(a){const c=[];for(const d in a){const u=a[d];delete u.metadata,c.push(u)}return c}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let s=0;s 0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(e,n,s,i,r){Ns.subVectors(i,n),vi.subVectors(s,n),Gm.subVectors(e,n);const o=Ns.dot(Ns),a=Ns.dot(vi),c=Ns.dot(Gm),d=vi.dot(vi),u=vi.dot(Gm),h=o*d-a*a;if(h===0)return r.set(-2,-1,-1);const f=1/h,m=(d*c-a*u)*f,_=(o*u-a*c)*f;return r.set(1-m-_,_,m)}static containsPoint(e,n,s,i){return this.getBarycoord(e,n,s,i,Si),Si.x>=0&&Si.y>=0&&Si.x+Si.y<=1}static getUV(e,n,s,i,r,o,a,c){return qc===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),qc=!0),this.getInterpolation(e,n,s,i,r,o,a,c)}static getInterpolation(e,n,s,i,r,o,a,c){return this.getBarycoord(e,n,s,i,Si),c.setScalar(0),c.addScaledVector(r,Si.x),c.addScaledVector(o,Si.y),c.addScaledVector(a,Si.z),c}static isFrontFacing(e,n,s,i){return Ns.subVectors(s,n),vi.subVectors(e,n),Ns.cross(vi).dot(i)<0}set(e,n,s){return this.a.copy(e),this.b.copy(n),this.c.copy(s),this}setFromPointsAndIndices(e,n,s,i){return this.a.copy(e[n]),this.b.copy(e[s]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,n,s,i){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,s),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Ns.subVectors(this.c,this.b),vi.subVectors(this.a,this.b),Ns.cross(vi).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return ks.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return ks.getBarycoord(e,this.a,this.b,this.c,n)}getUV(e,n,s,i,r){return qc===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),qc=!0),ks.getInterpolation(e,this.a,this.b,this.c,n,s,i,r)}getInterpolation(e,n,s,i,r){return ks.getInterpolation(e,this.a,this.b,this.c,n,s,i,r)}containsPoint(e){return ks.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return ks.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const s=this.a,i=this.b,r=this.c;let o,a;Co.subVectors(i,s),wo.subVectors(r,s),Vm.subVectors(e,s);const c=Co.dot(Vm),d=wo.dot(Vm);if(c<=0&&d<=0)return n.copy(s);zm.subVectors(e,i);const u=Co.dot(zm),h=wo.dot(zm);if(u>=0&&h<=u)return n.copy(i);const f=c*h-u*d;if(f<=0&&c>=0&&u<=0)return o=c/(c-u),n.copy(s).addScaledVector(Co,o);Hm.subVectors(e,r);const m=Co.dot(Hm),_=wo.dot(Hm);if(_>=0&&m<=_)return n.copy(r);const g=m*d-c*_;if(g<=0&&d>=0&&_<=0)return a=d/(d-_),n.copy(s).addScaledVector(wo,a);const b=u*_-m*h;if(b<=0&&h-u>=0&&m-_>=0)return SC.subVectors(r,i),a=(h-u)/(h-u+(m-_)),n.copy(i).addScaledVector(SC,a);const E=1/(b+g+f);return o=g*E,a=f*E,n.copy(s).addScaledVector(Co,o).addScaledVector(wo,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const HN={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},Ki={h:0,s:0,l:0},$c={h:0,s:0,l:0};function qm(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}class _t{constructor(e,n,s){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,s)}set(e,n,s){if(n===void 0&&s===void 0){const i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,n,s);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=tn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Ft.toWorkingColorSpace(this,n),this}setRGB(e,n,s,i=Ft.workingColorSpace){return this.r=e,this.g=n,this.b=s,Ft.toWorkingColorSpace(this,i),this}setHSL(e,n,s,i=Ft.workingColorSpace){if(e=KE(e,1),n=Nn(n,0,1),s=Nn(s,0,1),n===0)this.r=this.g=this.b=s;else{const r=s<=.5?s*(1+n):s+n-s*n,o=2*s-r;this.r=qm(o,r,e+1/3),this.g=qm(o,r,e),this.b=qm(o,r,e-1/3)}return Ft.toWorkingColorSpace(this,i),this}setStyle(e,n=tn){function s(r){r!==void 0&&parseFloat(r)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const o=i[1],a=i[2];switch(o){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return s(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,n);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return s(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,n);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return s(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=i[1],o=r.length;if(o===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,n);if(o===6)return this.setHex(parseInt(r,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=tn){const s=HN[e.toLowerCase()];return s!==void 0?this.setHex(s,n):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Qo(e.r),this.g=Qo(e.g),this.b=Qo(e.b),this}copyLinearToSRGB(e){return this.r=Im(e.r),this.g=Im(e.g),this.b=Im(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=tn){return Ft.fromWorkingColorSpace(An.copy(this),e),Math.round(Nn(An.r*255,0,255))*65536+Math.round(Nn(An.g*255,0,255))*256+Math.round(Nn(An.b*255,0,255))}getHexString(e=tn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=Ft.workingColorSpace){Ft.fromWorkingColorSpace(An.copy(this),n);const s=An.r,i=An.g,r=An.b,o=Math.max(s,i,r),a=Math.min(s,i,r);let c,d;const u=(a+o)/2;if(a===o)c=0,d=0;else{const h=o-a;switch(d=u<=.5?h/(o+a):h/(2-o-a),o){case s:c=(i-r)/h+(i 0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const s=e[n];if(s===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const i=this[n];if(i===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(s):i&&i.isVector3&&s&&s.isVector3?i.copy(s):this[n]=s}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const s={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};s.uuid=this.uuid,s.type=this.type,this.name!==""&&(s.name=this.name),this.color&&this.color.isColor&&(s.color=this.color.getHex()),this.roughness!==void 0&&(s.roughness=this.roughness),this.metalness!==void 0&&(s.metalness=this.metalness),this.sheen!==void 0&&(s.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(s.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(s.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(s.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(s.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(s.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(s.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(s.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(s.shininess=this.shininess),this.clearcoat!==void 0&&(s.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(s.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(s.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(s.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(s.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,s.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(s.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(s.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(s.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(s.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(s.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(s.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(s.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(s.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(s.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(s.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(s.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(s.lightMap=this.lightMap.toJSON(e).uuid,s.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(s.aoMap=this.aoMap.toJSON(e).uuid,s.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(s.bumpMap=this.bumpMap.toJSON(e).uuid,s.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(s.normalMap=this.normalMap.toJSON(e).uuid,s.normalMapType=this.normalMapType,s.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(s.displacementMap=this.displacementMap.toJSON(e).uuid,s.displacementScale=this.displacementScale,s.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(s.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(s.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(s.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(s.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(s.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(s.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(s.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(s.combine=this.combine)),this.envMapIntensity!==void 0&&(s.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(s.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(s.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(s.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(s.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(s.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(s.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(s.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(s.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(s.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(s.size=this.size),this.shadowSide!==null&&(s.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(s.sizeAttenuation=this.sizeAttenuation),this.blending!==jo&&(s.blending=this.blending),this.side!==Li&&(s.side=this.side),this.vertexColors===!0&&(s.vertexColors=!0),this.opacity<1&&(s.opacity=this.opacity),this.transparent===!0&&(s.transparent=!0),this.blendSrc!==jg&&(s.blendSrc=this.blendSrc),this.blendDst!==Qg&&(s.blendDst=this.blendDst),this.blendEquation!==Ur&&(s.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(s.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(s.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(s.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(s.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(s.blendAlpha=this.blendAlpha),this.depthFunc!==nu&&(s.depthFunc=this.depthFunc),this.depthTest===!1&&(s.depthTest=this.depthTest),this.depthWrite===!1&&(s.depthWrite=this.depthWrite),this.colorWrite===!1&&(s.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(s.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==cC&&(s.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(s.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(s.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==bo&&(s.stencilFail=this.stencilFail),this.stencilZFail!==bo&&(s.stencilZFail=this.stencilZFail),this.stencilZPass!==bo&&(s.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(s.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(s.rotation=this.rotation),this.polygonOffset===!0&&(s.polygonOffset=!0),this.polygonOffsetFactor!==0&&(s.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(s.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(s.linewidth=this.linewidth),this.dashSize!==void 0&&(s.dashSize=this.dashSize),this.gapSize!==void 0&&(s.gapSize=this.gapSize),this.scale!==void 0&&(s.scale=this.scale),this.dithering===!0&&(s.dithering=!0),this.alphaTest>0&&(s.alphaTest=this.alphaTest),this.alphaHash===!0&&(s.alphaHash=!0),this.alphaToCoverage===!0&&(s.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(s.premultipliedAlpha=!0),this.forceSinglePass===!0&&(s.forceSinglePass=!0),this.wireframe===!0&&(s.wireframe=!0),this.wireframeLinewidth>1&&(s.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(s.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(s.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(s.flatShading=!0),this.visible===!1&&(s.visible=!1),this.toneMapped===!1&&(s.toneMapped=!1),this.fog===!1&&(s.fog=!1),Object.keys(this.userData).length>0&&(s.userData=this.userData);function i(r){const o=[];for(const a in r){const c=r[a];delete c.metadata,o.push(c)}return o}if(n){const r=i(e.textures),o=i(e.images);r.length>0&&(s.textures=r),o.length>0&&(s.images=o)}return s}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const n=e.clippingPlanes;let s=null;if(n!==null){const i=n.length;s=new Array(i);for(let r=0;r!==i;++r)s[r]=n[r].clone()}return this.clippingPlanes=s,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class lr extends Vs{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new _t(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=qE,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const on=new ae,Yc=new At;class Bn{constructor(e,n,s=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=s,this.usage=tb,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Ai,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn('THREE.BufferAttribute: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,n,s){e*=this.itemSize,s*=n.itemSize;for(let i=0,r=this.itemSize;i 0&&(e.userData=this.userData),this.parameters!==void 0){const c=this.parameters;for(const d in c)c[d]!==void 0&&(e[d]=c[d]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const s=this.attributes;for(const c in s){const d=s[c];e.data.attributes[c]=d.toJSON(e.data)}const i={};let r=!1;for(const c in this.morphAttributes){const d=this.morphAttributes[c],u=[];for(let h=0,f=d.length;h 0&&(i[c]=u,r=!0)}r&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const s=e.index;s!==null&&this.setIndex(s.clone(n));const i=e.attributes;for(const d in i){const u=i[d];this.setAttribute(d,u.clone(n))}const r=e.morphAttributes;for(const d in r){const u=[],h=r[d];for(let f=0,m=h.length;f 0){const i=n[s[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r (e.far-e.near)**2))&&(TC.copy(r).invert(),Ar.copy(e.ray).applyMatrix4(TC),!(s.boundingBox!==null&&Ar.intersectsBox(s.boundingBox)===!1)&&this._computeIntersections(e,n,Ar)))}_computeIntersections(e,n,s){let i;const r=this.geometry,o=this.material,a=r.index,c=r.attributes.position,d=r.attributes.uv,u=r.attributes.uv1,h=r.attributes.normal,f=r.groups,m=r.drawRange;if(a!==null)if(Array.isArray(o))for(let _=0,g=f.length;_ n.far?null:{distance:d,point:Jc.clone(),object:t}}function ed(t,e,n,s,i,r,o,a,c,d){t.getVertexPosition(a,Ao),t.getVertexPosition(c,No),t.getVertexPosition(d,Oo);const u=y2t(t,e,n,s,Ao,No,Oo,Zc);if(u){i&&(jc.fromBufferAttribute(i,a),Qc.fromBufferAttribute(i,c),Xc.fromBufferAttribute(i,d),u.uv=ks.getInterpolation(Zc,Ao,No,Oo,jc,Qc,Xc,new At)),r&&(jc.fromBufferAttribute(r,a),Qc.fromBufferAttribute(r,c),Xc.fromBufferAttribute(r,d),u.uv1=ks.getInterpolation(Zc,Ao,No,Oo,jc,Qc,Xc,new At),u.uv2=u.uv1),o&&(CC.fromBufferAttribute(o,a),wC.fromBufferAttribute(o,c),RC.fromBufferAttribute(o,d),u.normal=ks.getInterpolation(Zc,Ao,No,Oo,CC,wC,RC,new ae),u.normal.dot(s.direction)>0&&u.normal.multiplyScalar(-1));const h={a,b:c,c:d,normal:new ae,materialIndex:0};ks.getNormal(Ao,No,Oo,h.normal),u.face=h}return u}class hr extends _i{constructor(e=1,n=1,s=1,i=1,r=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:s,widthSegments:i,heightSegments:r,depthSegments:o};const a=this;i=Math.floor(i),r=Math.floor(r),o=Math.floor(o);const c=[],d=[],u=[],h=[];let f=0,m=0;_("z","y","x",-1,-1,s,n,e,o,r,0),_("z","y","x",1,-1,s,n,-e,o,r,1),_("x","z","y",1,1,e,s,n,i,o,2),_("x","z","y",1,-1,e,s,-n,i,o,3),_("x","y","z",1,-1,e,n,s,i,r,4),_("x","y","z",-1,-1,e,n,-s,i,r,5),this.setIndex(c),this.setAttribute("position",new Oi(d,3)),this.setAttribute("normal",new Oi(u,3)),this.setAttribute("uv",new Oi(h,2));function _(g,b,E,y,v,S,R,w,A,I,C){const O=S/A,B=R/I,H=S/2,te=R/2,k=w/2,$=A+1,q=I+1;let F=0,W=0;const ne=new ae;for(let le=0;le 0?1:-1,u.push(ne.x,ne.y,ne.z),h.push(Se/A),h.push(1-le/I),F+=1}}for(let le=0;le0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const s={};for(const i in this.extensions)this.extensions[i]===!0&&(s[i]=!0);return Object.keys(s).length>0&&(n.extensions=s),n}}class WN extends Jt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new xt,this.projectionMatrix=new xt,this.projectionMatrixInverse=new xt,this.coordinateSystem=Ni}copy(e,n){return super.copy(e,n),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class Fn extends WN{constructor(e=50,n=1,s=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=s,this.far=i,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const n=.5*this.getFilmHeight()/e;this.fov=fa*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Tl*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return fa*2*Math.atan(Math.tan(Tl*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,n,s,i,r,o){this.aspect=e/n,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=s,this.view.offsetY=i,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(Tl*.5*this.fov)/this.zoom,s=2*n,i=this.aspect*s,r=-.5*i;const o=this.view;if(this.view!==null&&this.view.enabled){const c=o.fullWidth,d=o.fullHeight;r+=o.offsetX*i/c,n-=o.offsetY*s/d,i*=o.width/c,s*=o.height/d}const a=this.filmOffset;a!==0&&(r+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,n,n-s,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const Mo=-90,Io=1;class b2t extends Jt{constructor(e,n,s){super(),this.type="CubeCamera",this.renderTarget=s,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new Fn(Mo,Io,e,n);i.layers=this.layers,this.add(i);const r=new Fn(Mo,Io,e,n);r.layers=this.layers,this.add(r);const o=new Fn(Mo,Io,e,n);o.layers=this.layers,this.add(o);const a=new Fn(Mo,Io,e,n);a.layers=this.layers,this.add(a);const c=new Fn(Mo,Io,e,n);c.layers=this.layers,this.add(c);const d=new Fn(Mo,Io,e,n);d.layers=this.layers,this.add(d)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[s,i,r,o,a,c]=n;for(const d of n)this.remove(d);if(e===Ni)s.up.set(0,1,0),s.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),c.up.set(0,1,0),c.lookAt(0,0,-1);else if(e===au)s.up.set(0,-1,0),s.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),c.up.set(0,-1,0),c.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const d of n)this.add(d),d.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:s,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[r,o,a,c,d,u]=this.children,h=e.getRenderTarget(),f=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),_=e.xr.enabled;e.xr.enabled=!1;const g=s.texture.generateMipmaps;s.texture.generateMipmaps=!1,e.setRenderTarget(s,0,i),e.render(n,r),e.setRenderTarget(s,1,i),e.render(n,o),e.setRenderTarget(s,2,i),e.render(n,a),e.setRenderTarget(s,3,i),e.render(n,c),e.setRenderTarget(s,4,i),e.render(n,d),s.texture.generateMipmaps=g,e.setRenderTarget(s,5,i),e.render(n,u),e.setRenderTarget(h,f,m),e.xr.enabled=_,s.texture.needsPMREMUpdate=!0}}class KN extends Cn{constructor(e,n,s,i,r,o,a,c,d,u){e=e!==void 0?e:[],n=n!==void 0?n:da,super(e,n,s,i,r,o,a,c,d,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class E2t extends io{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const s={width:e,height:e,depth:1},i=[s,s,s,s,s,s];n.encoding!==void 0&&(Cl("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),n.colorSpace=n.encoding===Qr?tn:_s),this.texture=new KN(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:zn}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const s={uniforms:{tEquirect:{value:null}},vertexShader:` +}`;class ro extends Vs{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=T2t,this.fragmentShader=x2t,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=ma(e.uniforms),this.uniformsGroups=v2t(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const n=super.toJSON(e);n.glslVersion=this.glslVersion,n.uniforms={};for(const i in this.uniforms){const o=this.uniforms[i].value;o&&o.isTexture?n.uniforms[i]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?n.uniforms[i]={type:"c",value:o.getHex()}:o&&o.isVector2?n.uniforms[i]={type:"v2",value:o.toArray()}:o&&o.isVector3?n.uniforms[i]={type:"v3",value:o.toArray()}:o&&o.isVector4?n.uniforms[i]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?n.uniforms[i]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?n.uniforms[i]={type:"m4",value:o.toArray()}:n.uniforms[i]={value:o}}Object.keys(this.defines).length>0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const s={};for(const i in this.extensions)this.extensions[i]===!0&&(s[i]=!0);return Object.keys(s).length>0&&(n.extensions=s),n}}class WN extends Jt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new xt,this.projectionMatrix=new xt,this.projectionMatrixInverse=new xt,this.coordinateSystem=Ni}copy(e,n){return super.copy(e,n),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class Fn extends WN{constructor(e=50,n=1,s=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=s,this.far=i,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const n=.5*this.getFilmHeight()/e;this.fov=fa*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Tl*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return fa*2*Math.atan(Math.tan(Tl*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,n,s,i,r,o){this.aspect=e/n,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=s,this.view.offsetY=i,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(Tl*.5*this.fov)/this.zoom,s=2*n,i=this.aspect*s,r=-.5*i;const o=this.view;if(this.view!==null&&this.view.enabled){const c=o.fullWidth,d=o.fullHeight;r+=o.offsetX*i/c,n-=o.offsetY*s/d,i*=o.width/c,s*=o.height/d}const a=this.filmOffset;a!==0&&(r+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,n,n-s,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const Mo=-90,Io=1;class C2t extends Jt{constructor(e,n,s){super(),this.type="CubeCamera",this.renderTarget=s,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new Fn(Mo,Io,e,n);i.layers=this.layers,this.add(i);const r=new Fn(Mo,Io,e,n);r.layers=this.layers,this.add(r);const o=new Fn(Mo,Io,e,n);o.layers=this.layers,this.add(o);const a=new Fn(Mo,Io,e,n);a.layers=this.layers,this.add(a);const c=new Fn(Mo,Io,e,n);c.layers=this.layers,this.add(c);const d=new Fn(Mo,Io,e,n);d.layers=this.layers,this.add(d)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[s,i,r,o,a,c]=n;for(const d of n)this.remove(d);if(e===Ni)s.up.set(0,1,0),s.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),c.up.set(0,1,0),c.lookAt(0,0,-1);else if(e===au)s.up.set(0,-1,0),s.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),c.up.set(0,-1,0),c.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const d of n)this.add(d),d.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:s,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[r,o,a,c,d,u]=this.children,h=e.getRenderTarget(),f=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),_=e.xr.enabled;e.xr.enabled=!1;const g=s.texture.generateMipmaps;s.texture.generateMipmaps=!1,e.setRenderTarget(s,0,i),e.render(n,r),e.setRenderTarget(s,1,i),e.render(n,o),e.setRenderTarget(s,2,i),e.render(n,a),e.setRenderTarget(s,3,i),e.render(n,c),e.setRenderTarget(s,4,i),e.render(n,d),s.texture.generateMipmaps=g,e.setRenderTarget(s,5,i),e.render(n,u),e.setRenderTarget(h,f,m),e.xr.enabled=_,s.texture.needsPMREMUpdate=!0}}class KN extends Cn{constructor(e,n,s,i,r,o,a,c,d,u){e=e!==void 0?e:[],n=n!==void 0?n:da,super(e,n,s,i,r,o,a,c,d,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class w2t extends io{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const s={width:e,height:e,depth:1},i=[s,s,s,s,s,s];n.encoding!==void 0&&(Cl("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),n.colorSpace=n.encoding===Qr?tn:_s),this.texture=new KN(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:zn}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const s={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; @@ -371,9 +371,9 @@ ${c}`;navigator.clipboard.writeText(d)}else navigator.clipboard.writeText(e);thi gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},i=new hr(5,5,5),r=new ro({name:"CubemapFromEquirect",uniforms:ma(s.uniforms),vertexShader:s.vertexShader,fragmentShader:s.fragmentShader,side:$n,blending:ur});r.uniforms.tEquirect.value=n;const o=new Un(i,r),a=n.minFilter;return n.minFilter===so&&(n.minFilter=zn),new b2t(1,10,this).update(e,o),n.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,n,s,i){const r=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(n,s,i);e.setRenderTarget(r)}}const Wm=new oe,y2t=new oe,v2t=new Tt;class Ir{constructor(e=new oe(1,0,0),n=0){this.isPlane=!0,this.normal=e,this.constant=n}set(e,n){return this.normal.copy(e),this.constant=n,this}setComponents(e,n,s,i){return this.normal.set(e,n,s),this.constant=i,this}setFromNormalAndCoplanarPoint(e,n){return this.normal.copy(e),this.constant=-n.dot(this.normal),this}setFromCoplanarPoints(e,n,s){const i=Wm.subVectors(s,n).cross(y2t.subVectors(e,n)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,n){return n.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,n){const s=e.delta(Wm),i=this.normal.dot(s);if(i===0)return this.distanceToPoint(e.start)===0?n.copy(e.start):null;const r=-(e.start.dot(this.normal)+this.constant)/i;return r<0||r>1?null:n.copy(e.start).addScaledVector(s,r)}intersectsLine(e){const n=this.distanceToPoint(e.start),s=this.distanceToPoint(e.end);return n<0&&s>0||s<0&&n>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,n){const s=n||v2t.getNormalMatrix(e),i=this.coplanarPoint(Wm).applyMatrix4(e),r=this.normal.applyMatrix3(s).normalize();return this.constant=-i.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Nr=new pi,td=new oe;class jE{constructor(e=new Ir,n=new Ir,s=new Ir,i=new Ir,r=new Ir,o=new Ir){this.planes=[e,n,s,i,r,o]}set(e,n,s,i,r,o){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(s),a[3].copy(i),a[4].copy(r),a[5].copy(o),this}copy(e){const n=this.planes;for(let s=0;s<6;s++)n[s].copy(e.planes[s]);return this}setFromProjectionMatrix(e,n=Ni){const s=this.planes,i=e.elements,r=i[0],o=i[1],a=i[2],c=i[3],d=i[4],u=i[5],h=i[6],f=i[7],m=i[8],_=i[9],g=i[10],b=i[11],E=i[12],y=i[13],v=i[14],S=i[15];if(s[0].setComponents(c-r,f-d,b-m,S-E).normalize(),s[1].setComponents(c+r,f+d,b+m,S+E).normalize(),s[2].setComponents(c+o,f+u,b+_,S+y).normalize(),s[3].setComponents(c-o,f-u,b-_,S-y).normalize(),s[4].setComponents(c-a,f-h,b-g,S-v).normalize(),n===Ni)s[5].setComponents(c+a,f+h,b+g,S+v).normalize();else if(n===au)s[5].setComponents(a,h,g,v).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Nr.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),Nr.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Nr)}intersectsSprite(e){return Nr.center.set(0,0,0),Nr.radius=.7071067811865476,Nr.applyMatrix4(e.matrixWorld),this.intersectsSphere(Nr)}intersectsSphere(e){const n=this.planes,s=e.center,i=-e.radius;for(let r=0;r<6;r++)if(n[r].distanceToPoint(s)0?e.max.x:e.min.x,td.y=i.normal.y>0?e.max.y:e.min.y,td.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(td)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let s=0;s<6;s++)if(n[s].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function jN(){let t=null,e=!1,n=null,s=null;function i(r,o){n(r,o),s=t.requestAnimationFrame(i)}return{start:function(){e!==!0&&n!==null&&(s=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(s),e=!1},setAnimationLoop:function(r){n=r},setContext:function(r){t=r}}}function S2t(t,e){const n=e.isWebGL2,s=new WeakMap;function i(d,u){const h=d.array,f=d.usage,m=h.byteLength,_=t.createBuffer();t.bindBuffer(u,_),t.bufferData(u,h,f),d.onUploadCallback();let g;if(h instanceof Float32Array)g=t.FLOAT;else if(h instanceof Uint16Array)if(d.isFloat16BufferAttribute)if(n)g=t.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else g=t.UNSIGNED_SHORT;else if(h instanceof Int16Array)g=t.SHORT;else if(h instanceof Uint32Array)g=t.UNSIGNED_INT;else if(h instanceof Int32Array)g=t.INT;else if(h instanceof Int8Array)g=t.BYTE;else if(h instanceof Uint8Array)g=t.UNSIGNED_BYTE;else if(h instanceof Uint8ClampedArray)g=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+h);return{buffer:_,type:g,bytesPerElement:h.BYTES_PER_ELEMENT,version:d.version,size:m}}function r(d,u,h){const f=u.array,m=u._updateRange,_=u.updateRanges;if(t.bindBuffer(h,d),m.count===-1&&_.length===0&&t.bufferSubData(h,0,f),_.length!==0){for(let g=0,b=_.length;g1?null:n.copy(e.start).addScaledVector(s,r)}intersectsLine(e){const n=this.distanceToPoint(e.start),s=this.distanceToPoint(e.end);return n<0&&s>0||s<0&&n>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,n){const s=n||A2t.getNormalMatrix(e),i=this.coplanarPoint(Wm).applyMatrix4(e),r=this.normal.applyMatrix3(s).normalize();return this.constant=-i.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Nr=new pi,td=new ae;class jE{constructor(e=new Ir,n=new Ir,s=new Ir,i=new Ir,r=new Ir,o=new Ir){this.planes=[e,n,s,i,r,o]}set(e,n,s,i,r,o){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(s),a[3].copy(i),a[4].copy(r),a[5].copy(o),this}copy(e){const n=this.planes;for(let s=0;s<6;s++)n[s].copy(e.planes[s]);return this}setFromProjectionMatrix(e,n=Ni){const s=this.planes,i=e.elements,r=i[0],o=i[1],a=i[2],c=i[3],d=i[4],u=i[5],h=i[6],f=i[7],m=i[8],_=i[9],g=i[10],b=i[11],E=i[12],y=i[13],v=i[14],S=i[15];if(s[0].setComponents(c-r,f-d,b-m,S-E).normalize(),s[1].setComponents(c+r,f+d,b+m,S+E).normalize(),s[2].setComponents(c+o,f+u,b+_,S+y).normalize(),s[3].setComponents(c-o,f-u,b-_,S-y).normalize(),s[4].setComponents(c-a,f-h,b-g,S-v).normalize(),n===Ni)s[5].setComponents(c+a,f+h,b+g,S+v).normalize();else if(n===au)s[5].setComponents(a,h,g,v).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Nr.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),Nr.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Nr)}intersectsSprite(e){return Nr.center.set(0,0,0),Nr.radius=.7071067811865476,Nr.applyMatrix4(e.matrixWorld),this.intersectsSphere(Nr)}intersectsSphere(e){const n=this.planes,s=e.center,i=-e.radius;for(let r=0;r<6;r++)if(n[r].distanceToPoint(s)0?e.max.x:e.min.x,td.y=i.normal.y>0?e.max.y:e.min.y,td.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(td)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let s=0;s<6;s++)if(n[s].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function jN(){let t=null,e=!1,n=null,s=null;function i(r,o){n(r,o),s=t.requestAnimationFrame(i)}return{start:function(){e!==!0&&n!==null&&(s=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(s),e=!1},setAnimationLoop:function(r){n=r},setContext:function(r){t=r}}}function N2t(t,e){const n=e.isWebGL2,s=new WeakMap;function i(d,u){const h=d.array,f=d.usage,m=h.byteLength,_=t.createBuffer();t.bindBuffer(u,_),t.bufferData(u,h,f),d.onUploadCallback();let g;if(h instanceof Float32Array)g=t.FLOAT;else if(h instanceof Uint16Array)if(d.isFloat16BufferAttribute)if(n)g=t.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else g=t.UNSIGNED_SHORT;else if(h instanceof Int16Array)g=t.SHORT;else if(h instanceof Uint32Array)g=t.UNSIGNED_INT;else if(h instanceof Int32Array)g=t.INT;else if(h instanceof Int8Array)g=t.BYTE;else if(h instanceof Uint8Array)g=t.UNSIGNED_BYTE;else if(h instanceof Uint8ClampedArray)g=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+h);return{buffer:_,type:g,bytesPerElement:h.BYTES_PER_ELEMENT,version:d.version,size:m}}function r(d,u,h){const f=u.array,m=u._updateRange,_=u.updateRanges;if(t.bindBuffer(h,d),m.count===-1&&_.length===0&&t.bufferSubData(h,0,f),_.length!==0){for(let g=0,b=_.length;g 0 +#endif`,$2t=`#if NUM_CLIPPING_PLANES > 0 vec4 plane; #pragma unroll_loop_start for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { @@ -570,26 +570,26 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #pragma unroll_loop_end if ( clipped ) discard; #endif -#endif`,B2t=`#if NUM_CLIPPING_PLANES > 0 +#endif`,Y2t=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,G2t=`#if NUM_CLIPPING_PLANES > 0 +#endif`,W2t=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; -#endif`,V2t=`#if NUM_CLIPPING_PLANES > 0 +#endif`,K2t=`#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; -#endif`,z2t=`#if defined( USE_COLOR_ALPHA ) +#endif`,j2t=`#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; -#endif`,H2t=`#if defined( USE_COLOR_ALPHA ) +#endif`,Q2t=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; -#endif`,q2t=`#if defined( USE_COLOR_ALPHA ) +#endif`,X2t=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) varying vec3 vColor; -#endif`,$2t=`#if defined( USE_COLOR_ALPHA ) +#endif`,Z2t=`#if defined( USE_COLOR_ALPHA ) vColor = vec4( 1.0 ); #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) vColor = vec3( 1.0 ); @@ -599,7 +599,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #endif #ifdef USE_INSTANCING_COLOR vColor.xyz *= instanceColor.xyz; -#endif`,Y2t=`#define PI 3.141592653589793 +#endif`,J2t=`#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 @@ -677,7 +677,7 @@ vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); -} // validated`,W2t=`#ifdef ENVMAP_TYPE_CUBE_UV +} // validated`,eNt=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { @@ -775,7 +775,7 @@ float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { return vec4( mix( color0, color1, mipF ), 1.0 ); } } -#endif`,K2t=`vec3 transformedNormal = objectNormal; +#endif`,tNt=`vec3 transformedNormal = objectNormal; #ifdef USE_TANGENT vec3 transformedTangent = objectTangent; #endif @@ -804,18 +804,18 @@ transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif -#endif`,j2t=`#ifdef USE_DISPLACEMENTMAP +#endif`,nNt=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; -#endif`,Q2t=`#ifdef USE_DISPLACEMENTMAP +#endif`,sNt=`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); -#endif`,X2t=`#ifdef USE_EMISSIVEMAP +#endif`,iNt=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,Z2t=`#ifdef USE_EMISSIVEMAP +#endif`,rNt=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; -#endif`,J2t="gl_FragColor = linearToOutputTexel( gl_FragColor );",eNt=` +#endif`,oNt="gl_FragColor = linearToOutputTexel( gl_FragColor );",aNt=` const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( vec3( 0.8224621, 0.177538, 0.0 ), vec3( 0.0331941, 0.9668058, 0.0 ), @@ -843,7 +843,7 @@ vec4 LinearToLinear( in vec4 value ) { } vec4 LinearTosRGB( in vec4 value ) { return sRGBTransferOETF( value ); -}`,tNt=`#ifdef USE_ENVMAP +}`,lNt=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { @@ -872,7 +872,7 @@ vec4 LinearTosRGB( in vec4 value ) { #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif -#endif`,nNt=`#ifdef USE_ENVMAP +#endif`,cNt=`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; #ifdef ENVMAP_TYPE_CUBE @@ -881,7 +881,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform sampler2D envMap; #endif -#endif`,sNt=`#ifdef USE_ENVMAP +#endif`,dNt=`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS @@ -892,7 +892,7 @@ vec4 LinearTosRGB( in vec4 value ) { #else varying vec3 vReflect; #endif -#endif`,iNt=`#ifdef USE_ENVMAP +#endif`,uNt=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif @@ -903,7 +903,7 @@ vec4 LinearTosRGB( in vec4 value ) { varying vec3 vReflect; uniform float refractionRatio; #endif -#endif`,rNt=`#ifdef USE_ENVMAP +#endif`,pNt=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else @@ -920,18 +920,18 @@ vec4 LinearTosRGB( in vec4 value ) { vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif -#endif`,oNt=`#ifdef USE_FOG +#endif`,_Nt=`#ifdef USE_FOG vFogDepth = - mvPosition.z; -#endif`,aNt=`#ifdef USE_FOG +#endif`,hNt=`#ifdef USE_FOG varying float vFogDepth; -#endif`,lNt=`#ifdef USE_FOG +#endif`,fNt=`#ifdef USE_FOG #ifdef FOG_EXP2 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); #else float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); #endif gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif`,cNt=`#ifdef USE_FOG +#endif`,mNt=`#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 @@ -940,7 +940,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform float fogNear; uniform float fogFar; #endif -#endif`,dNt=`#ifdef USE_GRADIENTMAP +#endif`,gNt=`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { @@ -952,16 +952,16 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { vec2 fw = fwidth( coord ) * 0.5; return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); #endif -}`,uNt=`#ifdef USE_LIGHTMAP +}`,bNt=`#ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; reflectedLight.indirectDiffuse += lightMapIrradiance; -#endif`,pNt=`#ifdef USE_LIGHTMAP +#endif`,ENt=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; -#endif`,_Nt=`LambertMaterial material; +#endif`,yNt=`LambertMaterial material; material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,hNt=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,vNt=`varying vec3 vViewPosition; struct LambertMaterial { vec3 diffuseColor; float specularStrength; @@ -975,7 +975,7 @@ void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometr reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,fNt=`uniform bool receiveShadow; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,SNt=`uniform bool receiveShadow; uniform vec3 ambientLightColor; #if defined( USE_LIGHT_PROBES ) uniform vec3 lightProbe[ 9 ]; @@ -1098,7 +1098,7 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } -#endif`,mNt=`#ifdef USE_ENVMAP +#endif`,TNt=`#ifdef USE_ENVMAP vec3 getIBLIrradiance( const in vec3 normal ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); @@ -1131,8 +1131,8 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi #endif } #endif -#endif`,gNt=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,bNt=`varying vec3 vViewPosition; +#endif`,xNt=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,CNt=`varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; @@ -1144,11 +1144,11 @@ void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPo reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,ENt=`BlinnPhongMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,wNt=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; -material.specularStrength = specularStrength;`,yNt=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,RNt=`varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; @@ -1165,7 +1165,7 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geom reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,vNt=`PhysicalMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,ANt=`PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); @@ -1248,7 +1248,7 @@ material.roughness = min( material.roughness, 1.0 ); material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; -#endif`,SNt=`struct PhysicalMaterial { +#endif`,NNt=`struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; @@ -1548,7 +1548,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia #define RE_IndirectSpecular RE_IndirectSpecular_Physical float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}`,TNt=` +}`,ONt=` vec3 geometryPosition = - vViewPosition; vec3 geometryNormal = normal; vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); @@ -1663,7 +1663,7 @@ IncidentLight directLight; #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,xNt=`#if defined( RE_IndirectDiffuse ) +#endif`,MNt=`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; @@ -1682,25 +1682,25 @@ IncidentLight directLight; #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); #endif -#endif`,CNt=`#if defined( RE_IndirectDiffuse ) +#endif`,INt=`#if defined( RE_IndirectDiffuse ) RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); #endif #if defined( RE_IndirectSpecular ) RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); -#endif`,wNt=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) +#endif`,kNt=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,RNt=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) +#endif`,DNt=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; -#endif`,ANt=`#ifdef USE_LOGDEPTHBUF +#endif`,LNt=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT varying float vFragDepth; varying float vIsPerspective; #else uniform float logDepthBufFC; #endif -#endif`,NNt=`#ifdef USE_LOGDEPTHBUF +#endif`,PNt=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); @@ -1710,16 +1710,16 @@ IncidentLight directLight; gl_Position.z *= gl_Position.w; } #endif -#endif`,ONt=`#ifdef USE_MAP +#endif`,FNt=`#ifdef USE_MAP vec4 sampledDiffuseColor = texture2D( map, vMapUv ); #ifdef DECODE_VIDEO_TEXTURE sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); #endif diffuseColor *= sampledDiffuseColor; -#endif`,MNt=`#ifdef USE_MAP +#endif`,UNt=`#ifdef USE_MAP uniform sampler2D map; -#endif`,INt=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) +#endif`,BNt=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) #if defined( USE_POINTS_UV ) vec2 uv = vUv; #else @@ -1731,7 +1731,7 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,kNt=`#if defined( USE_POINTS_UV ) +#endif`,GNt=`#if defined( USE_POINTS_UV ) varying vec2 vUv; #else #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) @@ -1743,13 +1743,13 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; -#endif`,DNt=`float metalnessFactor = metalness; +#endif`,VNt=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); metalnessFactor *= texelMetalness.b; -#endif`,LNt=`#ifdef USE_METALNESSMAP +#endif`,zNt=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; -#endif`,PNt=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) +#endif`,HNt=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) vColor *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { #if defined( USE_COLOR_ALPHA ) @@ -1758,7 +1758,7 @@ IncidentLight directLight; if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; #endif } -#endif`,FNt=`#ifdef USE_MORPHNORMALS +#endif`,qNt=`#ifdef USE_MORPHNORMALS objectNormal *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1770,7 +1770,7 @@ IncidentLight directLight; objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; #endif -#endif`,UNt=`#ifdef USE_MORPHTARGETS +#endif`,$Nt=`#ifdef USE_MORPHTARGETS uniform float morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; @@ -1790,7 +1790,7 @@ IncidentLight directLight; uniform float morphTargetInfluences[ 4 ]; #endif #endif -#endif`,BNt=`#ifdef USE_MORPHTARGETS +#endif`,YNt=`#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1808,7 +1808,7 @@ IncidentLight directLight; transformed += morphTarget7 * morphTargetInfluences[ 7 ]; #endif #endif -#endif`,GNt=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#endif`,WNt=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED vec3 fdx = dFdx( vViewPosition ); vec3 fdy = dFdy( vViewPosition ); @@ -1849,7 +1849,7 @@ IncidentLight directLight; tbn2[1] *= faceDirection; #endif #endif -vec3 nonPerturbedNormal = normal;`,VNt=`#ifdef USE_NORMALMAP_OBJECTSPACE +vec3 nonPerturbedNormal = normal;`,KNt=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; @@ -1864,25 +1864,25 @@ vec3 nonPerturbedNormal = normal;`,VNt=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = normalize( tbn * mapN ); #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,zNt=`#ifndef FLAT_SHADED +#endif`,jNt=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,HNt=`#ifndef FLAT_SHADED +#endif`,QNt=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,qNt=`#ifndef FLAT_SHADED +#endif`,XNt=`#ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif -#endif`,$Nt=`#ifdef USE_NORMALMAP +#endif`,ZNt=`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif @@ -1904,13 +1904,13 @@ vec3 nonPerturbedNormal = normal;`,VNt=`#ifdef USE_NORMALMAP_OBJECTSPACE float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); return mat3( T * scale, B * scale, N ); } -#endif`,YNt=`#ifdef USE_CLEARCOAT +#endif`,JNt=`#ifdef USE_CLEARCOAT vec3 clearcoatNormal = nonPerturbedNormal; -#endif`,WNt=`#ifdef USE_CLEARCOAT_NORMALMAP +#endif`,eOt=`#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; clearcoatNormal = normalize( tbn2 * clearcoatMapN ); -#endif`,KNt=`#ifdef USE_CLEARCOATMAP +#endif`,tOt=`#ifdef USE_CLEARCOATMAP uniform sampler2D clearcoatMap; #endif #ifdef USE_CLEARCOAT_NORMALMAP @@ -1919,18 +1919,18 @@ vec3 nonPerturbedNormal = normal;`,VNt=`#ifdef USE_NORMALMAP_OBJECTSPACE #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP uniform sampler2D clearcoatRoughnessMap; -#endif`,jNt=`#ifdef USE_IRIDESCENCEMAP +#endif`,nOt=`#ifdef USE_IRIDESCENCEMAP uniform sampler2D iridescenceMap; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform sampler2D iridescenceThicknessMap; -#endif`,QNt=`#ifdef OPAQUE +#endif`,sOt=`#ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= material.transmissionAlpha; #endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,XNt=`vec3 packNormalToRGB( const in vec3 normal ) { +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,iOt=`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { @@ -1971,9 +1971,9 @@ float viewZToPerspectiveDepth( const in float viewZ, const in float near, const } float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { return ( near * far ) / ( ( far - near ) * depth - far ); -}`,ZNt=`#ifdef PREMULTIPLIED_ALPHA +}`,rOt=`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; -#endif`,JNt=`vec4 mvPosition = vec4( transformed, 1.0 ); +#endif`,oOt=`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING mvPosition = batchingMatrix * mvPosition; #endif @@ -1981,22 +1981,22 @@ float perspectiveDepthToViewZ( const in float depth, const in float near, const mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,eOt=`#ifdef DITHERING +gl_Position = projectionMatrix * mvPosition;`,aOt=`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,tOt=`#ifdef DITHERING +#endif`,lOt=`#ifdef DITHERING vec3 dithering( vec3 color ) { float grid_position = rand( gl_FragCoord.xy ); vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); return color + dither_shift_RGB; } -#endif`,nOt=`float roughnessFactor = roughness; +#endif`,cOt=`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); roughnessFactor *= texelRoughness.g; -#endif`,sOt=`#ifdef USE_ROUGHNESSMAP +#endif`,dOt=`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; -#endif`,iOt=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,uOt=`#if NUM_SPOT_LIGHT_COORDS > 0 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #if NUM_SPOT_LIGHT_MAPS > 0 @@ -2173,7 +2173,7 @@ gl_Position = projectionMatrix * mvPosition;`,eOt=`#ifdef DITHERING return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); #endif } -#endif`,rOt=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,pOt=`#if NUM_SPOT_LIGHT_COORDS > 0 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif @@ -2211,7 +2211,7 @@ gl_Position = projectionMatrix * mvPosition;`,eOt=`#ifdef DITHERING }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif -#endif`,oOt=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) +#endif`,_Ot=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); vec4 shadowWorldPosition; #endif @@ -2243,7 +2243,7 @@ gl_Position = projectionMatrix * mvPosition;`,eOt=`#ifdef DITHERING vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end -#endif`,aOt=`float getShadowMask() { +#endif`,hOt=`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 @@ -2275,12 +2275,12 @@ gl_Position = projectionMatrix * mvPosition;`,eOt=`#ifdef DITHERING #endif #endif return shadow; -}`,lOt=`#ifdef USE_SKINNING +}`,fOt=`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,cOt=`#ifdef USE_SKINNING +#endif`,mOt=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; @@ -2295,7 +2295,7 @@ gl_Position = projectionMatrix * mvPosition;`,eOt=`#ifdef DITHERING vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); return mat4( v1, v2, v3, v4 ); } -#endif`,dOt=`#ifdef USE_SKINNING +#endif`,gOt=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; @@ -2303,7 +2303,7 @@ gl_Position = projectionMatrix * mvPosition;`,eOt=`#ifdef DITHERING skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,uOt=`#ifdef USE_SKINNING +#endif`,bOt=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; @@ -2314,17 +2314,17 @@ gl_Position = projectionMatrix * mvPosition;`,eOt=`#ifdef DITHERING #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif -#endif`,pOt=`float specularStrength; +#endif`,EOt=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; -#endif`,_Ot=`#ifdef USE_SPECULARMAP +#endif`,yOt=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; -#endif`,hOt=`#if defined( TONE_MAPPING ) +#endif`,vOt=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,fOt=`#ifndef saturate +#endif`,SOt=`#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; @@ -2360,7 +2360,7 @@ vec3 ACESFilmicToneMapping( vec3 color ) { color = ACESOutputMat * color; return saturate( color ); } -vec3 CustomToneMapping( vec3 color ) { return color; }`,mOt=`#ifdef USE_TRANSMISSION +vec3 CustomToneMapping( vec3 color ) { return color; }`,TOt=`#ifdef USE_TRANSMISSION material.transmission = transmission; material.transmissionAlpha = 1.0; material.thickness = thickness; @@ -2381,7 +2381,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,mOt=`#ifdef USE_TRANSMIS material.attenuationColor, material.attenuationDistance ); material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); -#endif`,gOt=`#ifdef USE_TRANSMISSION +#endif`,xOt=`#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; @@ -2487,7 +2487,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,mOt=`#ifdef USE_TRANSMIS float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); } -#endif`,bOt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,COt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2557,7 +2557,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,mOt=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,EOt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,wOt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2651,7 +2651,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,mOt=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,yOt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,ROt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) vUv = vec3( uv, 1 ).xy; #endif #ifdef USE_MAP @@ -2722,7 +2722,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,mOt=`#ifdef USE_TRANSMIS #endif #ifdef USE_THICKNESSMAP vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; -#endif`,vOt=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 +#endif`,AOt=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 vec4 worldPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING worldPosition = batchingMatrix * worldPosition; @@ -2731,12 +2731,12 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,mOt=`#ifdef USE_TRANSMIS worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; -#endif`;const SOt=`varying vec2 vUv; +#endif`;const NOt=`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,TOt=`uniform sampler2D t2D; +}`,OOt=`uniform sampler2D t2D; uniform float backgroundIntensity; varying vec2 vUv; void main() { @@ -2748,14 +2748,14 @@ void main() { gl_FragColor = texColor; #include#include -}`,xOt=`varying vec3 vWorldDirection; +}`,MOt=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,COt=`#ifdef ENVMAP_TYPE_CUBE +}`,IOt=`#ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #elif defined( ENVMAP_TYPE_CUBE_UV ) uniform sampler2D envMap; @@ -2777,14 +2777,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,wOt=`varying vec3 vWorldDirection; +}`,kOt=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,ROt=`uniform samplerCube tCube; +}`,DOt=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; @@ -2794,7 +2794,7 @@ void main() { gl_FragColor.a *= opacity; #include #include -}`,AOt=`#include +}`,LOt=`#include #include #include #include @@ -2820,7 +2820,7 @@ void main() { #include #include vHighPrecisionZW = gl_Position.zw; -}`,NOt=`#if DEPTH_PACKING == 3200 +}`,POt=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include @@ -2850,7 +2850,7 @@ void main() { #elif DEPTH_PACKING == 3201 gl_FragColor = packDepthToRGBA( fragCoordZ ); #endif -}`,OOt=`#define DISTANCE +}`,FOt=`#define DISTANCE varying vec3 vWorldPosition; #include #include @@ -2876,7 +2876,7 @@ void main() { #include #include vWorldPosition = worldPosition.xyz; -}`,MOt=`#define DISTANCE +}`,UOt=`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; @@ -2900,13 +2900,13 @@ void main () { dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); -}`,IOt=`varying vec3 vWorldDirection; +}`,BOt=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include -}`,kOt=`uniform sampler2D tEquirect; +}`,GOt=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { @@ -2915,7 +2915,7 @@ void main() { gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include -}`,DOt=`uniform float scale; +}`,VOt=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include @@ -2936,7 +2936,7 @@ void main() { #include #include #include -}`,LOt=`uniform vec3 diffuse; +}`,zOt=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; @@ -2964,7 +2964,7 @@ void main() { #include #include #include -}`,POt=`#include +}`,HOt=`#include #include #include #include @@ -2995,7 +2995,7 @@ void main() { #include #include #include -}`,FOt=`uniform vec3 diffuse; +}`,qOt=`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; @@ -3043,7 +3043,7 @@ void main() { #include #include #include -}`,UOt=`#define LAMBERT +}`,$Ot=`#define LAMBERT varying vec3 vViewPosition; #include #include @@ -3081,7 +3081,7 @@ void main() { #include #include #include -}`,BOt=`#define LAMBERT +}`,YOt=`#define LAMBERT uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3138,7 +3138,7 @@ void main() { #include #include #include -}`,GOt=`#define MATCAP +}`,WOt=`#define MATCAP varying vec3 vViewPosition; #include #include @@ -3171,7 +3171,7 @@ void main() { #include #include vViewPosition = - mvPosition.xyz; -}`,VOt=`#define MATCAP +}`,KOt=`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; @@ -3217,7 +3217,7 @@ void main() { #include #include #include -}`,zOt=`#define NORMAL +}`,jOt=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif @@ -3249,7 +3249,7 @@ void main() { #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) vViewPosition = - mvPosition.xyz; #endif -}`,HOt=`#define NORMAL +}`,QOt=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; @@ -3270,7 +3270,7 @@ void main() { #ifdef OPAQUE gl_FragColor.a = 1.0; #endif -}`,qOt=`#define PHONG +}`,XOt=`#define PHONG varying vec3 vViewPosition; #include #include @@ -3308,7 +3308,7 @@ void main() { #include #include #include -}`,$Ot=`#define PHONG +}`,ZOt=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; @@ -3367,7 +3367,7 @@ void main() { #include #include #include -}`,YOt=`#define STANDARD +}`,JOt=`#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; @@ -3409,7 +3409,7 @@ void main() { #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif -}`,WOt=`#define STANDARD +}`,eMt=`#define STANDARD #ifdef PHYSICAL #define IOR #define USE_SPECULAR @@ -3531,7 +3531,7 @@ void main() { #include #include #include -}`,KOt=`#define TOON +}`,tMt=`#define TOON varying vec3 vViewPosition; #include #include @@ -3567,7 +3567,7 @@ void main() { #include #include #include -}`,jOt=`#define TOON +}`,nMt=`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3620,7 +3620,7 @@ void main() { #include #include #include -}`,QOt=`uniform float size; +}`,sMt=`uniform float size; uniform float scale; #include #include @@ -3650,7 +3650,7 @@ void main() { #include #include #include -}`,XOt=`uniform vec3 diffuse; +}`,iMt=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3675,7 +3675,7 @@ void main() { #include #include #include -}`,ZOt=`#include +}`,rMt=`#include #include #include #include @@ -3697,7 +3697,7 @@ void main() { #include #include #include -}`,JOt=`uniform vec3 color; +}`,oMt=`uniform vec3 color; uniform float opacity; #include #include