diff --git a/.gitignore b/.gitignore index ad54838..f1ba66d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ __pycache__/ *.webm node_modules/ build/ -devbox.* \ No newline at end of file +devbox.* +.devbox/ \ No newline at end of file diff --git a/experiences/bus-bunching/controls/lib/index.js b/experiences/bus-bunching/controls/lib/index.js index 3c71a22..92e8843 100644 --- a/experiences/bus-bunching/controls/lib/index.js +++ b/experiences/bus-bunching/controls/lib/index.js @@ -1,8 +1,8 @@ /** @jsxImportSource @emotion/react */ -import { css } from "@emotion/react" -import React, { useCallback } from "react" -import { useMessaging } from "@footron/controls-client" -import { Slider } from "@material-ui/core" +import { css } from "@emotion/react"; +import React, { useCallback, useState } from "react"; +import { useMessaging } from "@footron/controls-client"; +import { Slider, Box, Button } from "@material-ui/core"; const containerStyle = css` padding: 16px; @@ -11,51 +11,167 @@ const containerStyle = css` p { margin: 0 0 16px; } -` +`; +const stopSymbols = ["■", "▲", "●", "♥"]; +const stopColors = ["#EE6352", "#08B2E3", "#57A773", "#8657a7", "#2222AA"]; + +const sectionWrapperStyle = { + justifyContent: "center", + padding: "2em 0 0 0", + margin: "auto", +}; + +const buttonWrapperStyle = { + display: "grid", + gap: "10px", + gridTemplateColumns: "repeat(5, minmax(70px, 1fr))", +}; + +const buttonStyle = { + position: "relative", + width: "100%", + paddingTop: "100%", + borderRadius: "50%", +}; + +const contentStyle = { + position: "absolute", + top: "0", + left: "0", + right: "0", + bottom: "0", + display: "flex", + alignItems: "center", + justifyContent: "center", + color: "white", + fontSize: "500%", + +} const ControlsComponent = () => { - const { sendMessage } = useMessaging() + const { sendMessage } = useMessaging(); + const [buttonCount, setButtonCount] = useState(3); const updateBusCount = useCallback( async (event, value) => { - await sendMessage({ type: "numBuses", value: value }) + await sendMessage({ type: "numBuses", value: value }); }, [sendMessage] - ) + ); const updateStopCount = useCallback( async (event, value) => { - await sendMessage({ type: "numStops", value: value }) + setButtonCount(value); + await sendMessage({ type: "numStops", value: value }); }, [sendMessage] - ) + ); + + const restart = useCallback( + async (event, value) => { + await sendMessage({ type: "restart", value: value }); + }, + [sendMessage] + ); + + const pauseStart = useCallback( + async (value) => { + console.log(value); + await sendMessage({ type: "delayStop", value: value }); + }, + [sendMessage] + ); + + const pauseEnd = useCallback( + async (value) => { + console.log(value); + await sendMessage({ type: "freeStop", value: value }); + }, + [sendMessage] + ); + + const busStopSymbol = (index) => { + let stopStyle = { + ...contentStyle, + color: stopColors[index % stopColors.length], + }; + return ( + {stopSymbols[index % stopSymbols.length]} + ); + }; + + const buttons = Array.from({ length: buttonCount }, (_, index) => ( + + )); return (
+

Bus Bunching

- Change the number of buses! + Learn more about bus bunching here:{' '} + + Wikipedia "Bus Bunching" +

- -

- Change the number of bus stops! -

- + +

+ Change the number of buses! +

+ +

+ Change the number of bus stops! +

+ +
+ + + + + + +

+ + Create a delay by clicking and holding any of the bus stops below. + +

+ {buttons} +
- ) -} + ); +}; -export default ControlsComponent +export default ControlsComponent; diff --git a/experiences/bus-bunching/web/Urbanist-Medium-CG0un8Mr.ttf b/experiences/bus-bunching/web/assets/Urbanist-Medium-CG0un8Mr.ttf similarity index 100% rename from experiences/bus-bunching/web/Urbanist-Medium-CG0un8Mr.ttf rename to experiences/bus-bunching/web/assets/Urbanist-Medium-CG0un8Mr.ttf diff --git a/experiences/bus-bunching/web/assets/index-CO6LLJQy.css b/experiences/bus-bunching/web/assets/index-CO6LLJQy.css new file mode 100644 index 0000000..37d1dbe --- /dev/null +++ b/experiences/bus-bunching/web/assets/index-CO6LLJQy.css @@ -0,0 +1 @@ +@font-face{font-family:Urbanist;src:url(/assets/Urbanist-Medium-CG0un8Mr.ttf) format("truetype")}*{font-family:Urbanist}body,html{margin:0;padding:0;width:2736px;height:1216px;background:#343434;z-index:0;overflow:hidden}.storytext{position:absolute;top:1000px;left:0;right:0;margin-left:auto;margin-right:auto;width:1800px;padding:30px;z-index:101;display:none;border:solid rgb(128,128,128,1) 1px;text-align:center;color:#fff;background:#ffffff1a;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);text-shadow:2px 2px 10px rgba(0,0,0,1);filter:drop-shadow(rgba(0,0,0,.5) 4px 4px 5px);font-family:Urbanist;font-size:3em;line-height:1.5em}#title{color:#fff;position:absolute;top:20px;left:0;right:0;margin:auto;width:1000px;text-align:center;font-size:80px}.info{position:absolute;height:150;align-self:center;text-align:center;z-index:100;font-size:20px;margin-left:-60px;margin-top:-150px}.infoTitle{align-content:center;background-color:#eee;width:120px;height:120px;border-radius:70px;font-size:300%;border:10px solid #eee;z-index:20}.infoTitle:before{position:absolute;content:" ";background-color:#eee;width:20px;height:80px;bottom:-60px;left:60px;border-radius:10px}.passengersWrapper{opacity:80%;display:flex;align-items:center;justify-content:center;position:absolute;white-space:nowrap;overflow:hidden;top:120px;left:80px;height:80px;min-width:80px;background-color:#eee;border-radius:40px;transition:width .3s ease-in-out,opacity 1s}.passengersWrapper:empty{opacity:0;width:100px}.busPassengers{display:grid;grid-template-rows:repeat(2,1fr);grid-auto-flow:column;align-items:center;justify-content:center;background-color:#eee;border-radius:15px;opacity:80%;padding:5px;right:100%;position:absolute;transition:opacity 1s}.busPassengers:empty{opacity:0}.busInfo{position:absolute;display:flex}.passenger{opacity:1;width:20px;height:20px}@keyframes pulse{0%{border-color:red;box-shadow:0 0 30px #ff0000b3}50%{border-color:transparent;box-shadow:0 0 15px #f006}to{border-color:red;box-shadow:0 0 30px #ff0000b3}}.pulsing-border{border:10px solid red;animation:pulse .5s infinite} diff --git a/experiences/bus-bunching/web/assets/index-Drcr_JpC.js b/experiences/bus-bunching/web/assets/index-Drcr_JpC.js new file mode 100644 index 0000000..529cf87 --- /dev/null +++ b/experiences/bus-bunching/web/assets/index-Drcr_JpC.js @@ -0,0 +1,6518 @@ +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const s of n)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function t(n){const s={};return n.integrity&&(s.integrity=n.integrity),n.referrerPolicy&&(s.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?s.credentials="include":n.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(n){if(n.ep)return;n.ep=!0;const s=t(n);fetch(n.href,s)}})();const cf="166",hf=0,Bc=1,uf=2,Gu=1,df=2,Di=3,rn=0,Pt=1,di=2,nn=0,Ms=1,zc=2,kc=3,Hc=4,ff=5,bn=100,pf=101,mf=102,gf=103,_f=104,xf=200,yf=201,Mf=202,vf=203,cl=204,hl=205,Sf=206,wf=207,bf=208,Ef=209,Af=210,Tf=211,Rf=212,Cf=213,Pf=214,Lf=0,If=1,Df=2,Ua=3,Nf=4,Uf=5,Ff=6,Of=7,Wu=0,Bf=1,zf=2,sn=0,kf=1,Hf=2,Vf=3,Gf=4,Wf=5,Xf=6,qf=7,Xu=300,Es=301,As=302,ul=303,dl=304,Wa=306,fl=1e3,Tn=1001,pl=1002,Yt=1003,Yf=1004,Cr=1005,ni=1006,to=1007,Rn=1008,Oi=1009,qu=1010,Yu=1011,cr=1012,ic=1013,Ln=1014,Ui=1015,_r=1016,nc=1017,sc=1018,Ts=1020,$u=35902,ju=1021,Ku=1022,ri=1023,Ju=1024,Zu=1025,vs=1026,Rs=1027,Qu=1028,rc=1029,ed=1030,ac=1031,oc=1033,Ta=33776,Ra=33777,Ca=33778,Pa=33779,ml=35840,gl=35841,_l=35842,xl=35843,yl=36196,Ml=37492,vl=37496,Sl=37808,wl=37809,bl=37810,El=37811,Al=37812,Tl=37813,Rl=37814,Cl=37815,Pl=37816,Ll=37817,Il=37818,Dl=37819,Nl=37820,Ul=37821,La=36492,Fl=36494,Ol=36495,td=36283,Bl=36284,zl=36285,kl=36286,$f=3200,jf=3201,id=0,Kf=1,en="",hi="srgb",ln="srgb-linear",lc="display-p3",Xa="display-p3-linear",Fa="linear",Ze="srgb",Oa="rec709",Ba="p3",On=7680,Vc=519,Jf=512,Zf=513,Qf=514,nd=515,ep=516,tp=517,ip=518,np=519,Gc=35044,Wc="300 es",Fi=2e3,za=2001;let Ds=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const n=this._listeners[e];if(n!==void 0){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const i=this._listeners[e.type];if(i!==void 0){e.target=this;const n=i.slice(0);for(let s=0,a=n.length;s>8&255]+vt[r>>16&255]+vt[r>>24&255]+"-"+vt[e&255]+vt[e>>8&255]+"-"+vt[e>>16&15|64]+vt[e>>24&255]+"-"+vt[t&63|128]+vt[t>>8&255]+"-"+vt[t>>16&255]+vt[t>>24&255]+vt[i&255]+vt[i>>8&255]+vt[i>>16&255]+vt[i>>24&255]).toLowerCase()}function Et(r,e,t){return Math.max(e,Math.min(t,r))}function sp(r,e){return(r%e+e)%e}function no(r,e,t){return(1-t)*r+t*e}function Hs(r,e){switch(e.constructor){case Float32Array:return r;case Uint32Array:return r/4294967295;case Uint16Array:return r/65535;case Uint8Array:return r/255;case Int32Array:return Math.max(r/2147483647,-1);case Int16Array:return Math.max(r/32767,-1);case Int8Array:return Math.max(r/127,-1);default:throw new Error("Invalid component type.")}}function Ct(r,e){switch(e.constructor){case Float32Array:return r;case Uint32Array:return Math.round(r*4294967295);case Uint16Array:return Math.round(r*65535);case Uint8Array:return Math.round(r*255);case Int32Array:return Math.round(r*2147483647);case Int16Array:return Math.round(r*32767);case Int8Array:return Math.round(r*127);default:throw new Error("Invalid component type.")}}let ve=class sd{constructor(e=0,t=0){sd.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,n=e.elements;return this.x=n[0]*t+n[3]*i+n[6],this.y=n[1]*t+n[4]*i+n[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}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 t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(Et(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),n=Math.sin(t),s=this.x-e.x,a=this.y-e.y;return this.x=s*i-a*n+e.x,this.y=s*n+a*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},Ne=class rd{constructor(e,t,i,n,s,a,o,l,c){rd.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,n,s,a,o,l,c)}set(e,t,i,n,s,a,o,l,c){const h=this.elements;return h[0]=e,h[1]=n,h[2]=o,h[3]=t,h[4]=s,h[5]=l,h[6]=i,h[7]=a,h[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,n=t.elements,s=this.elements,a=i[0],o=i[3],l=i[6],c=i[1],h=i[4],u=i[7],d=i[2],f=i[5],_=i[8],x=n[0],p=n[3],m=n[6],b=n[1],y=n[4],v=n[7],L=n[2],T=n[5],A=n[8];return s[0]=a*x+o*b+l*L,s[3]=a*p+o*y+l*T,s[6]=a*m+o*v+l*A,s[1]=c*x+h*b+u*L,s[4]=c*p+h*y+u*T,s[7]=c*m+h*v+u*A,s[2]=d*x+f*b+_*L,s[5]=d*p+f*y+_*T,s[8]=d*m+f*v+_*A,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],n=e[2],s=e[3],a=e[4],o=e[5],l=e[6],c=e[7],h=e[8];return t*a*h-t*o*c-i*s*h+i*o*l+n*s*c-n*a*l}invert(){const e=this.elements,t=e[0],i=e[1],n=e[2],s=e[3],a=e[4],o=e[5],l=e[6],c=e[7],h=e[8],u=h*a-o*c,d=o*l-h*s,f=c*s-a*l,_=t*u+i*d+n*f;if(_===0)return this.set(0,0,0,0,0,0,0,0,0);const x=1/_;return e[0]=u*x,e[1]=(n*c-h*i)*x,e[2]=(o*i-n*a)*x,e[3]=d*x,e[4]=(h*t-n*l)*x,e[5]=(n*s-o*t)*x,e[6]=f*x,e[7]=(i*l-c*t)*x,e[8]=(a*t-i*s)*x,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,n,s,a,o){const l=Math.cos(s),c=Math.sin(s);return this.set(i*l,i*c,-i*(l*a+c*o)+a+e,-n*c,n*l,-n*(-c*a+l*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(so.makeScale(e,t)),this}rotate(e){return this.premultiply(so.makeRotation(-e)),this}translate(e,t){return this.premultiply(so.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let n=0;n<9;n++)if(t[n]!==i[n])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}};const so=new Ne;function ad(r){for(let e=r.length-1;e>=0;--e)if(r[e]>=65535)return!0;return!1}function ka(r){return document.createElementNS("http://www.w3.org/1999/xhtml",r)}function rp(){const r=ka("canvas");return r.style.display="block",r}const Xc={};function od(r){r in Xc||(Xc[r]=!0,console.warn(r))}function ap(r,e,t){return new Promise(function(i,n){function s(){switch(r.clientWaitSync(e,r.SYNC_FLUSH_COMMANDS_BIT,0)){case r.WAIT_FAILED:n();break;case r.TIMEOUT_EXPIRED:setTimeout(s,t);break;default:i()}}setTimeout(s,t)})}const qc=new Ne().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),Yc=new Ne().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Pr={[ln]:{transfer:Fa,primaries:Oa,toReference:r=>r,fromReference:r=>r},[hi]:{transfer:Ze,primaries:Oa,toReference:r=>r.convertSRGBToLinear(),fromReference:r=>r.convertLinearToSRGB()},[Xa]:{transfer:Fa,primaries:Ba,toReference:r=>r.applyMatrix3(Yc),fromReference:r=>r.applyMatrix3(qc)},[lc]:{transfer:Ze,primaries:Ba,toReference:r=>r.convertSRGBToLinear().applyMatrix3(Yc),fromReference:r=>r.applyMatrix3(qc).convertLinearToSRGB()}},op=new Set([ln,Xa]),je={enabled:!0,_workingColorSpace:ln,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(r){if(!op.has(r))throw new Error(`Unsupported working color space, "${r}".`);this._workingColorSpace=r},convert:function(r,e,t){if(this.enabled===!1||e===t||!e||!t)return r;const i=Pr[e].toReference,n=Pr[t].fromReference;return n(i(r))},fromWorkingColorSpace:function(r,e){return this.convert(r,this._workingColorSpace,e)},toWorkingColorSpace:function(r,e){return this.convert(r,e,this._workingColorSpace)},getPrimaries:function(r){return Pr[r].primaries},getTransfer:function(r){return r===en?Fa:Pr[r].transfer}};function Ss(r){return r<.04045?r*.0773993808:Math.pow(r*.9478672986+.0521327014,2.4)}function ro(r){return r<.0031308?r*12.92:1.055*Math.pow(r,.41666)-.055}let Bn,lp=class{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{Bn===void 0&&(Bn=ka("canvas")),Bn.width=e.width,Bn.height=e.height;const i=Bn.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=Bn}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=ka("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const n=i.getImageData(0,0,e.width,e.height),s=n.data;for(let a=0;a0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Xu)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case fl:e.x=e.x-Math.floor(e.x);break;case Tn:e.x=e.x<0?0:1;break;case pl: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 fl:e.y=e.y-Math.floor(e.y);break;case Tn:e.y=e.y<0?0:1;break;case pl: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)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}};gi.DEFAULT_IMAGE=null;gi.DEFAULT_MAPPING=Xu;gi.DEFAULT_ANISOTROPY=1;let Mt=class cd{constructor(e=0,t=0,i=0,n=1){cd.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=n}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=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,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){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,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,n=this.z,s=this.w,a=e.elements;return this.x=a[0]*t+a[4]*i+a[8]*n+a[12]*s,this.y=a[1]*t+a[5]*i+a[9]*n+a[13]*s,this.z=a[2]*t+a[6]*i+a[10]*n+a[14]*s,this.w=a[3]*t+a[7]*i+a[11]*n+a[15]*s,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,n,s;const l=e.elements,c=l[0],h=l[4],u=l[8],d=l[1],f=l[5],_=l[9],x=l[2],p=l[6],m=l[10];if(Math.abs(h-d)<.01&&Math.abs(u-x)<.01&&Math.abs(_-p)<.01){if(Math.abs(h+d)<.1&&Math.abs(u+x)<.1&&Math.abs(_+p)<.1&&Math.abs(c+f+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const y=(c+1)/2,v=(f+1)/2,L=(m+1)/2,T=(h+d)/4,A=(u+x)/4,I=(_+p)/4;return y>v&&y>L?y<.01?(i=0,n=.707106781,s=.707106781):(i=Math.sqrt(y),n=T/i,s=A/i):v>L?v<.01?(i=.707106781,n=0,s=.707106781):(n=Math.sqrt(v),i=T/n,s=I/n):L<.01?(i=.707106781,n=.707106781,s=0):(s=Math.sqrt(L),i=A/s,n=I/s),this.set(i,n,s,t),this}let b=Math.sqrt((p-_)*(p-_)+(u-x)*(u-x)+(d-h)*(d-h));return Math.abs(b)<.001&&(b=1),this.x=(p-_)/b,this.y=(u-x)/b,this.z=(d-h)/b,this.w=Math.acos((c+f+m-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}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,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}};class up extends Ds{constructor(e=1,t=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new Mt(0,0,e,t),this.scissorTest=!1,this.viewport=new Mt(0,0,e,t);const n={width:e,height:t,depth:1};i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:ni,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},i);const s=new gi(n,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace);s.flipY=!1,s.generateMipmaps=i.generateMipmaps,s.internalFormat=i.internalFormat,this.textures=[];const a=i.count;for(let o=0;o=0?1:-1,y=1-m*m;if(y>Number.EPSILON){const L=Math.sqrt(y),T=Math.atan2(L,m*b);p=Math.sin(p*T)/L,o=Math.sin(o*T)/L}const v=o*b;if(l=l*p+d*v,c=c*p+f*v,h=h*p+_*v,u=u*p+x*v,p===1-o){const L=1/Math.sqrt(l*l+c*c+h*h+u*u);l*=L,c*=L,h*=L,u*=L}}e[t]=l,e[t+1]=c,e[t+2]=h,e[t+3]=u}static multiplyQuaternionsFlat(e,t,i,n,s,a){const o=i[n],l=i[n+1],c=i[n+2],h=i[n+3],u=s[a],d=s[a+1],f=s[a+2],_=s[a+3];return e[t]=o*_+h*u+l*f-c*d,e[t+1]=l*_+h*d+c*u-o*f,e[t+2]=c*_+h*f+o*d-l*u,e[t+3]=h*_-o*u-l*d-c*f,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,n){return this._x=e,this._y=t,this._z=i,this._w=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const i=e._x,n=e._y,s=e._z,a=e._order,o=Math.cos,l=Math.sin,c=o(i/2),h=o(n/2),u=o(s/2),d=l(i/2),f=l(n/2),_=l(s/2);switch(a){case"XYZ":this._x=d*h*u+c*f*_,this._y=c*f*u-d*h*_,this._z=c*h*_+d*f*u,this._w=c*h*u-d*f*_;break;case"YXZ":this._x=d*h*u+c*f*_,this._y=c*f*u-d*h*_,this._z=c*h*_-d*f*u,this._w=c*h*u+d*f*_;break;case"ZXY":this._x=d*h*u-c*f*_,this._y=c*f*u+d*h*_,this._z=c*h*_+d*f*u,this._w=c*h*u-d*f*_;break;case"ZYX":this._x=d*h*u-c*f*_,this._y=c*f*u+d*h*_,this._z=c*h*_-d*f*u,this._w=c*h*u+d*f*_;break;case"YZX":this._x=d*h*u+c*f*_,this._y=c*f*u+d*h*_,this._z=c*h*_-d*f*u,this._w=c*h*u-d*f*_;break;case"XZY":this._x=d*h*u-c*f*_,this._y=c*f*u-d*h*_,this._z=c*h*_+d*f*u,this._w=c*h*u+d*f*_;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,n=Math.sin(i);return this._x=e.x*n,this._y=e.y*n,this._z=e.z*n,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],n=t[4],s=t[8],a=t[1],o=t[5],l=t[9],c=t[2],h=t[6],u=t[10],d=i+o+u;if(d>0){const f=.5/Math.sqrt(d+1);this._w=.25/f,this._x=(h-l)*f,this._y=(s-c)*f,this._z=(a-n)*f}else if(i>o&&i>u){const f=2*Math.sqrt(1+i-o-u);this._w=(h-l)/f,this._x=.25*f,this._y=(n+a)/f,this._z=(s+c)/f}else if(o>u){const f=2*Math.sqrt(1+o-i-u);this._w=(s-c)/f,this._x=(n+a)/f,this._y=.25*f,this._z=(l+h)/f}else{const f=2*Math.sqrt(1+u-i-o);this._w=(a-n)/f,this._x=(s+c)/f,this._y=(l+h)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Et(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const n=Math.min(1,t/i);return this.slerp(e,n),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,t){const i=e._x,n=e._y,s=e._z,a=e._w,o=t._x,l=t._y,c=t._z,h=t._w;return this._x=i*h+a*o+n*c-s*l,this._y=n*h+a*l+s*o-i*c,this._z=s*h+a*c+i*l-n*o,this._w=a*h-i*o-n*l-s*c,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const i=this._x,n=this._y,s=this._z,a=this._w;let o=a*e._w+i*e._x+n*e._y+s*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=a,this._x=i,this._y=n,this._z=s,this;const l=1-o*o;if(l<=Number.EPSILON){const f=1-t;return this._w=f*a+t*this._w,this._x=f*i+t*this._x,this._y=f*n+t*this._y,this._z=f*s+t*this._z,this.normalize(),this}const c=Math.sqrt(l),h=Math.atan2(c,o),u=Math.sin((1-t)*h)/c,d=Math.sin(t*h)/c;return this._w=a*u+this._w*d,this._x=i*u+this._x*d,this._y=n*u+this._y*d,this._z=s*u+this._z*d,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),i=Math.random(),n=Math.sqrt(1-i),s=Math.sqrt(i);return this.set(n*Math.sin(e),n*Math.cos(e),s*Math.sin(t),s*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),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}},g=class ud{constructor(e=0,t=0,i=0){ud.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){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,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){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,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.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,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion($c.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion($c.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,n=this.z,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6]*n,this.y=s[1]*t+s[4]*i+s[7]*n,this.z=s[2]*t+s[5]*i+s[8]*n,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,n=this.z,s=e.elements,a=1/(s[3]*t+s[7]*i+s[11]*n+s[15]);return this.x=(s[0]*t+s[4]*i+s[8]*n+s[12])*a,this.y=(s[1]*t+s[5]*i+s[9]*n+s[13])*a,this.z=(s[2]*t+s[6]*i+s[10]*n+s[14])*a,this}applyQuaternion(e){const t=this.x,i=this.y,n=this.z,s=e.x,a=e.y,o=e.z,l=e.w,c=2*(a*n-o*i),h=2*(o*t-s*n),u=2*(s*i-a*t);return this.x=t+l*c+a*u-o*h,this.y=i+l*h+o*c-s*u,this.z=n+l*u+s*h-a*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,n=this.z,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*n,this.y=s[1]*t+s[5]*i+s[9]*n,this.z=s[2]*t+s[6]*i+s[10]*n,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}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,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,n=e.y,s=e.z,a=t.x,o=t.y,l=t.z;return this.x=n*l-s*o,this.y=s*a-i*l,this.z=i*o-n*a,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return oo.copy(this).projectOnVector(e),this.sub(oo)}reflect(e){return this.sub(oo.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(Et(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,n=this.z-e.z;return t*t+i*i+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const n=Math.sin(t)*e;return this.x=n*Math.sin(i),this.y=Math.cos(t)*e,this.z=n*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),n=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=n,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*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,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-1,i=Math.sqrt(1-t*t);return this.x=i*Math.cos(e),this.y=t,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};const oo=new g,$c=new yr;let Mr=class{constructor(e=new g(1/0,1/0,1/0),t=new g(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Jt),Jt.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Vs),Ir.subVectors(this.max,Vs),zn.subVectors(e.a,Vs),kn.subVectors(e.b,Vs),Hn.subVectors(e.c,Vs),Hi.subVectors(kn,zn),Vi.subVectors(Hn,kn),un.subVectors(zn,Hn);let t=[0,-Hi.z,Hi.y,0,-Vi.z,Vi.y,0,-un.z,un.y,Hi.z,0,-Hi.x,Vi.z,0,-Vi.x,un.z,0,-un.x,-Hi.y,Hi.x,0,-Vi.y,Vi.x,0,-un.y,un.x,0];return!lo(t,zn,kn,Hn,Ir)||(t=[1,0,0,0,1,0,0,0,1],!lo(t,zn,kn,Hn,Ir))?!1:(Dr.crossVectors(Hi,Vi),t=[Dr.x,Dr.y,Dr.z],lo(t,zn,kn,Hn,Ir))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Jt).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Jt).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:(Si[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Si[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Si[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Si[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Si[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Si[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Si[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Si[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Si),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 Si=[new g,new g,new g,new g,new g,new g,new g,new g],Jt=new g,Lr=new Mr,zn=new g,kn=new g,Hn=new g,Hi=new g,Vi=new g,un=new g,Vs=new g,Ir=new g,Dr=new g,dn=new g;function lo(r,e,t,i,n){for(let s=0,a=r.length-3;s<=a;s+=3){dn.fromArray(r,s);const o=n.x*Math.abs(dn.x)+n.y*Math.abs(dn.y)+n.z*Math.abs(dn.z),l=e.dot(dn),c=t.dot(dn),h=i.dot(dn);if(Math.max(-Math.max(l,c,h),Math.min(l,c,h))>o)return!1}return!0}const fp=new Mr,Gs=new g,co=new g;let cc=class{constructor(e=new g,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;t!==void 0?i.copy(t):fp.setFromPoints(e).getCenter(i);let n=0;for(let s=0,a=e.length;sthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}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;Gs.subVectors(e,this.center);const t=Gs.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),n=(i-this.radius)*.5;this.center.addScaledVector(Gs,n/i),this.radius+=n}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):(co.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Gs.copy(e.center).add(co)),this.expandByPoint(Gs.copy(e.center).sub(co))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}};const wi=new g,ho=new g,Nr=new g,Gi=new g,uo=new g,Ur=new g,fo=new g;let pp=class{constructor(e=new g,t=new g(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.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,wi)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=wi.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(wi.copy(this.origin).addScaledVector(this.direction,t),wi.distanceToSquared(e))}distanceSqToSegment(e,t,i,n){ho.copy(e).add(t).multiplyScalar(.5),Nr.copy(t).sub(e).normalize(),Gi.copy(this.origin).sub(ho);const s=e.distanceTo(t)*.5,a=-this.direction.dot(Nr),o=Gi.dot(this.direction),l=-Gi.dot(Nr),c=Gi.lengthSq(),h=Math.abs(1-a*a);let u,d,f,_;if(h>0)if(u=a*l-o,d=a*o-l,_=s*h,u>=0)if(d>=-_)if(d<=_){const x=1/h;u*=x,d*=x,f=u*(u+a*d+2*o)+d*(a*u+d+2*l)+c}else d=s,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*l)+c;else d=-s,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*l)+c;else d<=-_?(u=Math.max(0,-(-a*s+o)),d=u>0?-s:Math.min(Math.max(-s,-l),s),f=-u*u+d*(d+2*l)+c):d<=_?(u=0,d=Math.min(Math.max(-s,-l),s),f=d*(d+2*l)+c):(u=Math.max(0,-(a*s+o)),d=u>0?s:Math.min(Math.max(-s,-l),s),f=-u*u+d*(d+2*l)+c);else d=a>0?-s:s,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*l)+c;return i&&i.copy(this.origin).addScaledVector(this.direction,u),n&&n.copy(ho).addScaledVector(Nr,d),f}intersectSphere(e,t){wi.subVectors(e.center,this.origin);const i=wi.dot(this.direction),n=wi.dot(wi)-i*i,s=e.radius*e.radius;if(n>s)return null;const a=Math.sqrt(s-n),o=i-a,l=i+a;return l<0?null:o<0?this.at(l,t):this.at(o,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,n,s,a,o,l;const c=1/this.direction.x,h=1/this.direction.y,u=1/this.direction.z,d=this.origin;return c>=0?(i=(e.min.x-d.x)*c,n=(e.max.x-d.x)*c):(i=(e.max.x-d.x)*c,n=(e.min.x-d.x)*c),h>=0?(s=(e.min.y-d.y)*h,a=(e.max.y-d.y)*h):(s=(e.max.y-d.y)*h,a=(e.min.y-d.y)*h),i>a||s>n||((s>i||isNaN(i))&&(i=s),(a=0?(o=(e.min.z-d.z)*u,l=(e.max.z-d.z)*u):(o=(e.max.z-d.z)*u,l=(e.min.z-d.z)*u),i>l||o>n)||((o>i||i!==i)&&(i=o),(l=0?i:n,t)}intersectsBox(e){return this.intersectBox(e,wi)!==null}intersectTriangle(e,t,i,n,s){uo.subVectors(t,e),Ur.subVectors(i,e),fo.crossVectors(uo,Ur);let a=this.direction.dot(fo),o;if(a>0){if(n)return null;o=1}else if(a<0)o=-1,a=-a;else return null;Gi.subVectors(this.origin,e);const l=o*this.direction.dot(Ur.crossVectors(Gi,Ur));if(l<0)return null;const c=o*this.direction.dot(uo.cross(Gi));if(c<0||l+c>a)return null;const h=-o*Gi.dot(fo);return h<0?null:this.at(h/a,s)}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)}},dt=class Vl{constructor(e,t,i,n,s,a,o,l,c,h,u,d,f,_,x,p){Vl.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,t,i,n,s,a,o,l,c,h,u,d,f,_,x,p)}set(e,t,i,n,s,a,o,l,c,h,u,d,f,_,x,p){const m=this.elements;return m[0]=e,m[4]=t,m[8]=i,m[12]=n,m[1]=s,m[5]=a,m[9]=o,m[13]=l,m[2]=c,m[6]=h,m[10]=u,m[14]=d,m[3]=f,m[7]=_,m[11]=x,m[15]=p,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Vl().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,n=1/Vn.setFromMatrixColumn(e,0).length(),s=1/Vn.setFromMatrixColumn(e,1).length(),a=1/Vn.setFromMatrixColumn(e,2).length();return t[0]=i[0]*n,t[1]=i[1]*n,t[2]=i[2]*n,t[3]=0,t[4]=i[4]*s,t[5]=i[5]*s,t[6]=i[6]*s,t[7]=0,t[8]=i[8]*a,t[9]=i[9]*a,t[10]=i[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,n=e.y,s=e.z,a=Math.cos(i),o=Math.sin(i),l=Math.cos(n),c=Math.sin(n),h=Math.cos(s),u=Math.sin(s);if(e.order==="XYZ"){const d=a*h,f=a*u,_=o*h,x=o*u;t[0]=l*h,t[4]=-l*u,t[8]=c,t[1]=f+_*c,t[5]=d-x*c,t[9]=-o*l,t[2]=x-d*c,t[6]=_+f*c,t[10]=a*l}else if(e.order==="YXZ"){const d=l*h,f=l*u,_=c*h,x=c*u;t[0]=d+x*o,t[4]=_*o-f,t[8]=a*c,t[1]=a*u,t[5]=a*h,t[9]=-o,t[2]=f*o-_,t[6]=x+d*o,t[10]=a*l}else if(e.order==="ZXY"){const d=l*h,f=l*u,_=c*h,x=c*u;t[0]=d-x*o,t[4]=-a*u,t[8]=_+f*o,t[1]=f+_*o,t[5]=a*h,t[9]=x-d*o,t[2]=-a*c,t[6]=o,t[10]=a*l}else if(e.order==="ZYX"){const d=a*h,f=a*u,_=o*h,x=o*u;t[0]=l*h,t[4]=_*c-f,t[8]=d*c+x,t[1]=l*u,t[5]=x*c+d,t[9]=f*c-_,t[2]=-c,t[6]=o*l,t[10]=a*l}else if(e.order==="YZX"){const d=a*l,f=a*c,_=o*l,x=o*c;t[0]=l*h,t[4]=x-d*u,t[8]=_*u+f,t[1]=u,t[5]=a*h,t[9]=-o*h,t[2]=-c*h,t[6]=f*u+_,t[10]=d-x*u}else if(e.order==="XZY"){const d=a*l,f=a*c,_=o*l,x=o*c;t[0]=l*h,t[4]=-u,t[8]=c*h,t[1]=d*u+x,t[5]=a*h,t[9]=f*u-_,t[2]=_*u-f,t[6]=o*h,t[10]=x*u+d}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(mp,e,gp)}lookAt(e,t,i){const n=this.elements;return Dt.subVectors(e,t),Dt.lengthSq()===0&&(Dt.z=1),Dt.normalize(),Wi.crossVectors(i,Dt),Wi.lengthSq()===0&&(Math.abs(i.z)===1?Dt.x+=1e-4:Dt.z+=1e-4,Dt.normalize(),Wi.crossVectors(i,Dt)),Wi.normalize(),Fr.crossVectors(Dt,Wi),n[0]=Wi.x,n[4]=Fr.x,n[8]=Dt.x,n[1]=Wi.y,n[5]=Fr.y,n[9]=Dt.y,n[2]=Wi.z,n[6]=Fr.z,n[10]=Dt.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,n=t.elements,s=this.elements,a=i[0],o=i[4],l=i[8],c=i[12],h=i[1],u=i[5],d=i[9],f=i[13],_=i[2],x=i[6],p=i[10],m=i[14],b=i[3],y=i[7],v=i[11],L=i[15],T=n[0],A=n[4],I=n[8],E=n[12],S=n[1],P=n[5],V=n[9],F=n[13],X=n[2],Y=n[6],G=n[10],j=n[14],H=n[3],oe=n[7],ce=n[11],fe=n[15];return s[0]=a*T+o*S+l*X+c*H,s[4]=a*A+o*P+l*Y+c*oe,s[8]=a*I+o*V+l*G+c*ce,s[12]=a*E+o*F+l*j+c*fe,s[1]=h*T+u*S+d*X+f*H,s[5]=h*A+u*P+d*Y+f*oe,s[9]=h*I+u*V+d*G+f*ce,s[13]=h*E+u*F+d*j+f*fe,s[2]=_*T+x*S+p*X+m*H,s[6]=_*A+x*P+p*Y+m*oe,s[10]=_*I+x*V+p*G+m*ce,s[14]=_*E+x*F+p*j+m*fe,s[3]=b*T+y*S+v*X+L*H,s[7]=b*A+y*P+v*Y+L*oe,s[11]=b*I+y*V+v*G+L*ce,s[15]=b*E+y*F+v*j+L*fe,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],n=e[8],s=e[12],a=e[1],o=e[5],l=e[9],c=e[13],h=e[2],u=e[6],d=e[10],f=e[14],_=e[3],x=e[7],p=e[11],m=e[15];return _*(+s*l*u-n*c*u-s*o*d+i*c*d+n*o*f-i*l*f)+x*(+t*l*f-t*c*d+s*a*d-n*a*f+n*c*h-s*l*h)+p*(+t*c*u-t*o*f-s*a*u+i*a*f+s*o*h-i*c*h)+m*(-n*o*h-t*l*u+t*o*d+n*a*u-i*a*d+i*l*h)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const n=this.elements;return e.isVector3?(n[12]=e.x,n[13]=e.y,n[14]=e.z):(n[12]=e,n[13]=t,n[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],n=e[2],s=e[3],a=e[4],o=e[5],l=e[6],c=e[7],h=e[8],u=e[9],d=e[10],f=e[11],_=e[12],x=e[13],p=e[14],m=e[15],b=u*p*c-x*d*c+x*l*f-o*p*f-u*l*m+o*d*m,y=_*d*c-h*p*c-_*l*f+a*p*f+h*l*m-a*d*m,v=h*x*c-_*u*c+_*o*f-a*x*f-h*o*m+a*u*m,L=_*u*l-h*x*l-_*o*d+a*x*d+h*o*p-a*u*p,T=t*b+i*y+n*v+s*L;if(T===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const A=1/T;return e[0]=b*A,e[1]=(x*d*s-u*p*s-x*n*f+i*p*f+u*n*m-i*d*m)*A,e[2]=(o*p*s-x*l*s+x*n*c-i*p*c-o*n*m+i*l*m)*A,e[3]=(u*l*s-o*d*s-u*n*c+i*d*c+o*n*f-i*l*f)*A,e[4]=y*A,e[5]=(h*p*s-_*d*s+_*n*f-t*p*f-h*n*m+t*d*m)*A,e[6]=(_*l*s-a*p*s-_*n*c+t*p*c+a*n*m-t*l*m)*A,e[7]=(a*d*s-h*l*s+h*n*c-t*d*c-a*n*f+t*l*f)*A,e[8]=v*A,e[9]=(_*u*s-h*x*s-_*i*f+t*x*f+h*i*m-t*u*m)*A,e[10]=(a*x*s-_*o*s+_*i*c-t*x*c-a*i*m+t*o*m)*A,e[11]=(h*o*s-a*u*s-h*i*c+t*u*c+a*i*f-t*o*f)*A,e[12]=L*A,e[13]=(h*x*n-_*u*n+_*i*d-t*x*d-h*i*p+t*u*p)*A,e[14]=(_*o*n-a*x*n-_*i*l+t*x*l+a*i*p-t*o*p)*A,e[15]=(a*u*n-h*o*n+h*i*l-t*u*l-a*i*d+t*o*d)*A,this}scale(e){const t=this.elements,i=e.x,n=e.y,s=e.z;return t[0]*=i,t[4]*=n,t[8]*=s,t[1]*=i,t[5]*=n,t[9]*=s,t[2]*=i,t[6]*=n,t[10]*=s,t[3]*=i,t[7]*=n,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],n=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,n))}makeTranslation(e,t,i){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,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),n=Math.sin(t),s=1-i,a=e.x,o=e.y,l=e.z,c=s*a,h=s*o;return this.set(c*a+i,c*o-n*l,c*l+n*o,0,c*o+n*l,h*o+i,h*l-n*a,0,c*l-n*o,h*l+n*a,s*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,n,s,a){return this.set(1,i,s,0,e,1,a,0,t,n,1,0,0,0,0,1),this}compose(e,t,i){const n=this.elements,s=t._x,a=t._y,o=t._z,l=t._w,c=s+s,h=a+a,u=o+o,d=s*c,f=s*h,_=s*u,x=a*h,p=a*u,m=o*u,b=l*c,y=l*h,v=l*u,L=i.x,T=i.y,A=i.z;return n[0]=(1-(x+m))*L,n[1]=(f+v)*L,n[2]=(_-y)*L,n[3]=0,n[4]=(f-v)*T,n[5]=(1-(d+m))*T,n[6]=(p+b)*T,n[7]=0,n[8]=(_+y)*A,n[9]=(p-b)*A,n[10]=(1-(d+x))*A,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,this}decompose(e,t,i){const n=this.elements;let s=Vn.set(n[0],n[1],n[2]).length();const a=Vn.set(n[4],n[5],n[6]).length(),o=Vn.set(n[8],n[9],n[10]).length();this.determinant()<0&&(s=-s),e.x=n[12],e.y=n[13],e.z=n[14],Zt.copy(this);const c=1/s,h=1/a,u=1/o;return Zt.elements[0]*=c,Zt.elements[1]*=c,Zt.elements[2]*=c,Zt.elements[4]*=h,Zt.elements[5]*=h,Zt.elements[6]*=h,Zt.elements[8]*=u,Zt.elements[9]*=u,Zt.elements[10]*=u,t.setFromRotationMatrix(Zt),i.x=s,i.y=a,i.z=o,this}makePerspective(e,t,i,n,s,a,o=Fi){const l=this.elements,c=2*s/(t-e),h=2*s/(i-n),u=(t+e)/(t-e),d=(i+n)/(i-n);let f,_;if(o===Fi)f=-(a+s)/(a-s),_=-2*a*s/(a-s);else if(o===za)f=-a/(a-s),_=-a*s/(a-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);return l[0]=c,l[4]=0,l[8]=u,l[12]=0,l[1]=0,l[5]=h,l[9]=d,l[13]=0,l[2]=0,l[6]=0,l[10]=f,l[14]=_,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,i,n,s,a,o=Fi){const l=this.elements,c=1/(t-e),h=1/(i-n),u=1/(a-s),d=(t+e)*c,f=(i+n)*h;let _,x;if(o===Fi)_=(a+s)*u,x=-2*u;else if(o===za)_=s*u,x=-1*u;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-d,l[1]=0,l[5]=2*h,l[9]=0,l[13]=-f,l[2]=0,l[6]=0,l[10]=x,l[14]=-_,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let n=0;n<16;n++)if(t[n]!==i[n])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}};const Vn=new g,Zt=new dt,mp=new g(0,0,0),gp=new g(1,1,1),Wi=new g,Fr=new g,Dt=new g,jc=new dt,Kc=new yr;let an=class dd{constructor(e=0,t=0,i=0,n=dd.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=n}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,n=this._order){return this._x=e,this._y=t,this._z=i,this._order=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const n=e.elements,s=n[0],a=n[4],o=n[8],l=n[1],c=n[5],h=n[9],u=n[2],d=n[6],f=n[10];switch(t){case"XYZ":this._y=Math.asin(Et(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-h,f),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(d,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Et(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(o,f),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-u,s),this._z=0);break;case"ZXY":this._x=Math.asin(Et(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-u,f),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-Et(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(d,f),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-a,c));break;case"YZX":this._z=Math.asin(Et(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,c),this._y=Math.atan2(-u,s)):(this._x=0,this._y=Math.atan2(o,f));break;case"XZY":this._z=Math.asin(-Et(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(d,c),this._y=Math.atan2(o,s)):(this._x=Math.atan2(-h,f),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return jc.makeRotationFromQuaternion(e),this.setFromRotationMatrix(jc,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Kc.setFromEuler(this),this.setFromQuaternion(Kc,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=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+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}};an.DEFAULT_ORDER="XYZ";let fd=class{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let t=0;t1){for(let i=0;i0&&(n.userData=this.userData),n.layers=this.layers.mask,n.matrix=this.matrix.toArray(),n.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(n.matrixAutoUpdate=!1),this.isInstancedMesh&&(n.type="InstancedMesh",n.count=this.count,n.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(n.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(n.type="BatchedMesh",n.perObjectFrustumCulled=this.perObjectFrustumCulled,n.sortObjects=this.sortObjects,n.drawRanges=this._drawRanges,n.reservedRanges=this._reservedRanges,n.visibility=this._visibility,n.active=this._active,n.bounds=this._bounds.map(o=>({boxInitialized:o.boxInitialized,boxMin:o.box.min.toArray(),boxMax:o.box.max.toArray(),sphereInitialized:o.sphereInitialized,sphereRadius:o.sphere.radius,sphereCenter:o.sphere.center.toArray()})),n.maxInstanceCount=this._maxInstanceCount,n.maxVertexCount=this._maxVertexCount,n.maxIndexCount=this._maxIndexCount,n.geometryInitialized=this._geometryInitialized,n.geometryCount=this._geometryCount,n.matricesTexture=this._matricesTexture.toJSON(e),this._colorsTexture!==null&&(n.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(n.boundingSphere={center:n.boundingSphere.center.toArray(),radius:n.boundingSphere.radius}),this.boundingBox!==null&&(n.boundingBox={min:n.boundingBox.min.toArray(),max:n.boundingBox.max.toArray()}));function s(o,l){return o[l.uuid]===void 0&&(o[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?n.background=this.background.toJSON():this.background.isTexture&&(n.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(n.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){n.geometry=s(e.geometries,this.geometry);const o=this.geometry.parameters;if(o!==void 0&&o.shapes!==void 0){const l=o.shapes;if(Array.isArray(l))for(let c=0,h=l.length;c0){n.children=[];for(let o=0;o0){n.animations=[];for(let o=0;o0&&(i.geometries=o),l.length>0&&(i.materials=l),c.length>0&&(i.textures=c),h.length>0&&(i.images=h),u.length>0&&(i.shapes=u),d.length>0&&(i.skeletons=d),f.length>0&&(i.animations=f),_.length>0&&(i.nodes=_)}return i.object=n,i;function a(o){const l=[];for(const c in o){const h=o[c];delete h.metadata,l.push(h)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.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)),t===!0)for(let i=0;i0?n.multiplyScalar(1/Math.sqrt(s)):n.set(0,0,0)}static getBarycoord(e,t,i,n,s){Qt.subVectors(n,t),Ei.subVectors(i,t),mo.subVectors(e,t);const a=Qt.dot(Qt),o=Qt.dot(Ei),l=Qt.dot(mo),c=Ei.dot(Ei),h=Ei.dot(mo),u=a*c-o*o;if(u===0)return s.set(0,0,0),null;const d=1/u,f=(c*l-o*h)*d,_=(a*h-o*l)*d;return s.set(1-f-_,_,f)}static containsPoint(e,t,i,n){return this.getBarycoord(e,t,i,n,Ai)===null?!1:Ai.x>=0&&Ai.y>=0&&Ai.x+Ai.y<=1}static getInterpolation(e,t,i,n,s,a,o,l){return this.getBarycoord(e,t,i,n,Ai)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,Ai.x),l.addScaledVector(a,Ai.y),l.addScaledVector(o,Ai.z),l)}static isFrontFacing(e,t,i,n){return Qt.subVectors(i,t),Ei.subVectors(e,t),Qt.cross(Ei).dot(n)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,n){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[n]),this}setFromAttributeAndIndices(e,t,i,n){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,n),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 Qt.subVectors(this.c,this.b),Ei.subVectors(this.a,this.b),Qt.cross(Ei).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return gs.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return gs.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,n,s){return gs.getInterpolation(e,this.a,this.b,this.c,t,i,n,s)}containsPoint(e){return gs.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return gs.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,n=this.b,s=this.c;let a,o;Xn.subVectors(n,i),qn.subVectors(s,i),go.subVectors(e,i);const l=Xn.dot(go),c=qn.dot(go);if(l<=0&&c<=0)return t.copy(i);_o.subVectors(e,n);const h=Xn.dot(_o),u=qn.dot(_o);if(h>=0&&u<=h)return t.copy(n);const d=l*u-h*c;if(d<=0&&l>=0&&h<=0)return a=l/(l-h),t.copy(i).addScaledVector(Xn,a);xo.subVectors(e,s);const f=Xn.dot(xo),_=qn.dot(xo);if(_>=0&&f<=_)return t.copy(s);const x=f*c-l*_;if(x<=0&&c>=0&&_<=0)return o=c/(c-_),t.copy(i).addScaledVector(qn,o);const p=h*_-f*u;if(p<=0&&u-h>=0&&f-_>=0)return ih.subVectors(s,n),o=(u-h)/(u-h+(f-_)),t.copy(n).addScaledVector(ih,o);const m=1/(p+x+d);return a=x*m,o=d*m,t.copy(i).addScaledVector(Xn,a).addScaledVector(qn,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}};const pd={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},Xi={h:0,s:0,l:0},zr={h:0,s:0,l:0};function yo(r,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?r+(e-r)*6*t:t<1/2?e:t<2/3?r+(e-r)*6*(2/3-t):r}let He=class{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){const n=e;n&&n.isColor?this.copy(n):typeof n=="number"?this.setHex(n):typeof n=="string"&&this.setStyle(n)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=hi){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,je.toWorkingColorSpace(this,t),this}setRGB(e,t,i,n=je.workingColorSpace){return this.r=e,this.g=t,this.b=i,je.toWorkingColorSpace(this,n),this}setHSL(e,t,i,n=je.workingColorSpace){if(e=sp(e,1),t=Et(t,0,1),i=Et(i,0,1),t===0)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+t):i+t-i*t,a=2*i-s;this.r=yo(a,s,e+1/3),this.g=yo(a,s,e),this.b=yo(a,s,e-1/3)}return je.toWorkingColorSpace(this,n),this}setStyle(e,t=hi){function i(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let n;if(n=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const a=n[1],o=n[2];switch(a){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,t);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,t);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=n[1],a=s.length;if(a===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(a===6)return this.setHex(parseInt(s,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=hi){const i=pd[e.toLowerCase()];return i!==void 0?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Ss(e.r),this.g=Ss(e.g),this.b=Ss(e.b),this}copyLinearToSRGB(e){return this.r=ro(e.r),this.g=ro(e.g),this.b=ro(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=hi){return je.fromWorkingColorSpace(St.copy(this),e),Math.round(Et(St.r*255,0,255))*65536+Math.round(Et(St.g*255,0,255))*256+Math.round(Et(St.b*255,0,255))}getHexString(e=hi){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=je.workingColorSpace){je.fromWorkingColorSpace(St.copy(this),t);const i=St.r,n=St.g,s=St.b,a=Math.max(i,n,s),o=Math.min(i,n,s);let l,c;const h=(o+a)/2;if(o===a)l=0,c=0;else{const u=a-o;switch(c=h<=.5?u/(a+o):u/(2-a-o),a){case i:l=(n-s)/u+(n0!=e>0&&this.version++,this._alphaTest=e}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const n=this[t];if(n===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Ms&&(i.blending=this.blending),this.side!==rn&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==cl&&(i.blendSrc=this.blendSrc),this.blendDst!==hl&&(i.blendDst=this.blendDst),this.blendEquation!==bn&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==Ua&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Vc&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==On&&(i.stencilFail=this.stencilFail),this.stencilZFail!==On&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==On&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function n(s){const a=[];for(const o in s){const l=s[o];delete l.metadata,a.push(l)}return a}if(t){const s=n(e.textures),a=n(e.images);s.length>0&&(i.textures=s),a.length>0&&(i.images=a)}return i}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 t=e.clippingPlanes;let i=null;if(t!==null){const n=t.length;i=new Array(n);for(let s=0;s!==n;++s)i[s]=t[s].clone()}return this.clippingPlanes=i,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++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}},Sr=class extends vr{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new He(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.envMapRotation=new an,this.combine=Wu,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.envMapRotation.copy(e.envMapRotation),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 ct=new g,kr=new ve;let pi=class{constructor(e,t,i=!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=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=Gc,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Ui,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return od("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}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,t,i){e*=this.itemSize,i*=t.itemSize;for(let n=0,s=this.itemSize;n0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const l in i){const c=i[l];e.data.attributes[l]=c.toJSON(e.data)}const n={};let s=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],h=[];for(let u=0,d=c.length;u0&&(n[l]=h,s=!0)}s&&(e.data.morphAttributes=n,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const o=this.boundingSphere;return o!==null&&(e.data.boundingSphere={center:o.center.toArray(),radius:o.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 t={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone(t));const n=e.attributes;for(const c in n){const h=n[c];this.setAttribute(c,h.clone(t))}const s=e.morphAttributes;for(const c in s){const h=[],u=s[c];for(let d=0,f=u.length;d0){const n=t[i[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=n.length;s(e.far-e.near)**2))&&(nh.copy(s).invert(),fn.copy(e.ray).applyMatrix4(nh),!(i.boundingBox!==null&&fn.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,fn)))}_computeIntersections(e,t,i){let n;const s=this.geometry,a=this.material,o=s.index,l=s.attributes.position,c=s.attributes.uv,h=s.attributes.uv1,u=s.attributes.normal,d=s.groups,f=s.drawRange;if(o!==null)if(Array.isArray(a))for(let _=0,x=d.length;_t.far?null:{distance:c,point:Yr.clone(),object:r}}function $r(r,e,t,i,n,s,a,o,l,c){r.getVertexPosition(o,$n),r.getVertexPosition(l,jn),r.getVertexPosition(c,Kn);const h=wp(r,e,t,i,$n,jn,Kn,qr);if(h){n&&(Gr.fromBufferAttribute(n,o),Wr.fromBufferAttribute(n,l),Xr.fromBufferAttribute(n,c),h.uv=Br.getInterpolation(qr,$n,jn,Kn,Gr,Wr,Xr,new ve)),s&&(Gr.fromBufferAttribute(s,o),Wr.fromBufferAttribute(s,l),Xr.fromBufferAttribute(s,c),h.uv1=Br.getInterpolation(qr,$n,jn,Kn,Gr,Wr,Xr,new ve)),a&&(rh.fromBufferAttribute(a,o),ah.fromBufferAttribute(a,l),oh.fromBufferAttribute(a,c),h.normal=Br.getInterpolation(qr,$n,jn,Kn,rh,ah,oh,new g),h.normal.dot(i.direction)>0&&h.normal.multiplyScalar(-1));const u={a:o,b:l,c,normal:new g,materialIndex:0};Br.getNormal($n,jn,Kn,u.normal),h.face=u}return h}class Nn extends Ns{constructor(e=1,t=1,i=1,n=1,s=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:n,heightSegments:s,depthSegments:a};const o=this;n=Math.floor(n),s=Math.floor(s),a=Math.floor(a);const l=[],c=[],h=[],u=[];let d=0,f=0;_("z","y","x",-1,-1,i,t,e,a,s,0),_("z","y","x",1,-1,i,t,-e,a,s,1),_("x","z","y",1,1,e,i,t,n,a,2),_("x","z","y",1,-1,e,i,-t,n,a,3),_("x","y","z",1,-1,e,t,i,n,s,4),_("x","y","z",-1,-1,e,t,-i,n,s,5),this.setIndex(l),this.setAttribute("position",new mi(c,3)),this.setAttribute("normal",new mi(h,3)),this.setAttribute("uv",new mi(u,2));function _(x,p,m,b,y,v,L,T,A,I,E){const S=v/A,P=L/I,V=v/2,F=L/2,X=T/2,Y=A+1,G=I+1;let j=0,H=0;const oe=new g;for(let ce=0;ce0?1:-1,h.push(oe.x,oe.y,oe.z),u.push(Be/A),u.push(1-ce/I),j+=1}}for(let ce=0;ce0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const i={};for(const n in this.extensions)this.extensions[n]===!0&&(i[n]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}let yd=class extends $t{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new dt,this.projectionMatrix=new dt,this.projectionMatrixInverse=new dt,this.coordinateSystem=Fi}copy(e,t){return super.copy(e,t),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,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}};const qi=new g,lh=new ve,ch=new ve;let Xt=class extends yd{constructor(e=50,t=1,i=.1,n=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=n,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=Hl*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(io*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Hl*2*Math.atan(Math.tan(io*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,i){qi.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(qi.x,qi.y).multiplyScalar(-e/qi.z),qi.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(qi.x,qi.y).multiplyScalar(-e/qi.z)}getViewSize(e,t){return this.getViewBounds(e,lh,ch),t.subVectors(ch,lh)}setViewOffset(e,t,i,n,s,a){this.aspect=e/t,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=t,this.view.offsetX=i,this.view.offsetY=n,this.view.width=s,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(io*.5*this.fov)/this.zoom,i=2*t,n=this.aspect*i,s=-.5*n;const a=this.view;if(this.view!==null&&this.view.enabled){const l=a.fullWidth,c=a.fullHeight;s+=a.offsetX*n/l,t-=a.offsetY*i/c,n*=a.width/l,i*=a.height/c}const o=this.filmOffset;o!==0&&(s+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+n,t,t-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}};const Jn=-90,Zn=1;class Rp extends $t{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const n=new Xt(Jn,Zn,e,t);n.layers=this.layers,this.add(n);const s=new Xt(Jn,Zn,e,t);s.layers=this.layers,this.add(s);const a=new Xt(Jn,Zn,e,t);a.layers=this.layers,this.add(a);const o=new Xt(Jn,Zn,e,t);o.layers=this.layers,this.add(o);const l=new Xt(Jn,Zn,e,t);l.layers=this.layers,this.add(l);const c=new Xt(Jn,Zn,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,n,s,a,o,l]=t;for(const c of t)this.remove(c);if(e===Fi)i.up.set(0,1,0),i.lookAt(1,0,0),n.up.set(0,1,0),n.lookAt(-1,0,0),s.up.set(0,0,-1),s.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===za)i.up.set(0,-1,0),i.lookAt(-1,0,0),n.up.set(0,-1,0),n.lookAt(1,0,0),s.up.set(0,0,1),s.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),o.up.set(0,-1,0),o.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of t)this.add(c),c.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:n}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,a,o,l,c,h]=this.children,u=e.getRenderTarget(),d=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),_=e.xr.enabled;e.xr.enabled=!1;const x=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,n),e.render(t,s),e.setRenderTarget(i,1,n),e.render(t,a),e.setRenderTarget(i,2,n),e.render(t,o),e.setRenderTarget(i,3,n),e.render(t,l),e.setRenderTarget(i,4,n),e.render(t,c),i.texture.generateMipmaps=x,e.setRenderTarget(i,5,n),e.render(t,h),e.setRenderTarget(u,d,f),e.xr.enabled=_,i.texture.needsPMREMUpdate=!0}}class Md extends gi{constructor(e,t,i,n,s,a,o,l,c,h){e=e!==void 0?e:[],t=t!==void 0?t:Es,super(e,t,i,n,s,a,o,l,c,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class Cp extends In{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},n=[i,i,i,i,i,i];this.texture=new Md(n,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:ni}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:` + + varying vec3 vWorldDirection; + + vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); + + } + + void main() { + + vWorldDirection = transformDirection( position, modelMatrix ); + + #include + #include + + } + `,fragmentShader:` + + uniform sampler2D tEquirect; + + varying vec3 vWorldDirection; + + #include + + void main() { + + vec3 direction = normalize( vWorldDirection ); + + vec2 sampleUV = equirectUv( direction ); + + gl_FragColor = texture2D( tEquirect, sampleUV ); + + } + `},n=new Nn(5,5,5),s=new on({name:"CubemapFromEquirect",uniforms:Cs(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:Pt,blending:nn});s.uniforms.tEquirect.value=t;const a=new kt(n,s),o=t.minFilter;return t.minFilter===Rn&&(t.minFilter=ni),new Rp(1,10,this).update(e,a),t.minFilter=o,a.geometry.dispose(),a.material.dispose(),this}clear(e,t,i,n){const s=e.getRenderTarget();for(let a=0;a<6;a++)e.setRenderTarget(this,a),e.clear(t,i,n);e.setRenderTarget(s)}}const So=new g,Pp=new g,Lp=new Ne;let Sn=class{constructor(e=new g(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,n){return this.normal.set(e,t,i),this.constant=n,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){const n=So.subVectors(i,t).cross(Pp.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(n,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const i=e.delta(So),n=this.normal.dot(i);if(n===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const s=-(e.start.dot(this.normal)+this.constant)/n;return s<0||s>1?null:t.copy(e.start).addScaledVector(i,s)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>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,t){const i=t||Lp.getNormalMatrix(e),n=this.coplanarPoint(So).applyMatrix4(e),s=this.normal.applyMatrix3(i).normalize();return this.constant=-n.dot(s),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 pn=new cc,jr=new g;let hc=class{constructor(e=new Sn,t=new Sn,i=new Sn,n=new Sn,s=new Sn,a=new Sn){this.planes=[e,t,i,n,s,a]}set(e,t,i,n,s,a){const o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(i),o[3].copy(n),o[4].copy(s),o[5].copy(a),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=Fi){const i=this.planes,n=e.elements,s=n[0],a=n[1],o=n[2],l=n[3],c=n[4],h=n[5],u=n[6],d=n[7],f=n[8],_=n[9],x=n[10],p=n[11],m=n[12],b=n[13],y=n[14],v=n[15];if(i[0].setComponents(l-s,d-c,p-f,v-m).normalize(),i[1].setComponents(l+s,d+c,p+f,v+m).normalize(),i[2].setComponents(l+a,d+h,p+_,v+b).normalize(),i[3].setComponents(l-a,d-h,p-_,v-b).normalize(),i[4].setComponents(l-o,d-u,p-x,v-y).normalize(),t===Fi)i[5].setComponents(l+o,d+u,p+x,v+y).normalize();else if(t===za)i[5].setComponents(o,u,x,y).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),pn.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),pn.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(pn)}intersectsSprite(e){return pn.center.set(0,0,0),pn.radius=.7071067811865476,pn.applyMatrix4(e.matrixWorld),this.intersectsSphere(pn)}intersectsSphere(e){const t=this.planes,i=e.center,n=-e.radius;for(let s=0;s<6;s++)if(t[s].distanceToPoint(i)0?e.max.x:e.min.x,jr.y=n.normal.y>0?e.max.y:e.min.y,jr.z=n.normal.z>0?e.max.z:e.min.z,n.distanceToPoint(jr)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function vd(){let r=null,e=!1,t=null,i=null;function n(s,a){t(s,a),i=r.requestAnimationFrame(n)}return{start:function(){e!==!0&&t!==null&&(i=r.requestAnimationFrame(n),e=!0)},stop:function(){r.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(s){t=s},setContext:function(s){r=s}}}function Ip(r){const e=new WeakMap;function t(o,l){const c=o.array,h=o.usage,u=c.byteLength,d=r.createBuffer();r.bindBuffer(l,d),r.bufferData(l,c,h),o.onUploadCallback();let f;if(c instanceof Float32Array)f=r.FLOAT;else if(c instanceof Uint16Array)o.isFloat16BufferAttribute?f=r.HALF_FLOAT:f=r.UNSIGNED_SHORT;else if(c instanceof Int16Array)f=r.SHORT;else if(c instanceof Uint32Array)f=r.UNSIGNED_INT;else if(c instanceof Int32Array)f=r.INT;else if(c instanceof Int8Array)f=r.BYTE;else if(c instanceof Uint8Array)f=r.UNSIGNED_BYTE;else if(c instanceof Uint8ClampedArray)f=r.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+c);return{buffer:d,type:f,bytesPerElement:c.BYTES_PER_ELEMENT,version:o.version,size:u}}function i(o,l,c){const h=l.array,u=l._updateRange,d=l.updateRanges;if(r.bindBuffer(c,o),u.count===-1&&d.length===0&&r.bufferSubData(c,0,h),d.length!==0){for(let f=0,_=d.length;f<_;f++){const x=d[f];r.bufferSubData(c,x.start*h.BYTES_PER_ELEMENT,h,x.start,x.count)}l.clearUpdateRanges()}u.count!==-1&&(r.bufferSubData(c,u.offset*h.BYTES_PER_ELEMENT,h,u.offset,u.count),u.count=-1),l.onUploadCallback()}function n(o){return o.isInterleavedBufferAttribute&&(o=o.data),e.get(o)}function s(o){o.isInterleavedBufferAttribute&&(o=o.data);const l=e.get(o);l&&(r.deleteBuffer(l.buffer),e.delete(o))}function a(o,l){if(o.isGLBufferAttribute){const h=e.get(o);(!h||h.version outsideIOR when thinFilmThickness -> 0.0 + float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) ); + // Evaluate the cosTheta on the base layer (Snell law) + float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) ); + + // Handle TIR: + float cosTheta2Sq = 1.0 - sinTheta2Sq; + if ( cosTheta2Sq < 0.0 ) { + + return vec3( 1.0 ); + + } + + float cosTheta2 = sqrt( cosTheta2Sq ); + + // First interface + float R0 = IorToFresnel0( iridescenceIOR, outsideIOR ); + float R12 = F_Schlick( R0, 1.0, cosTheta1 ); + float T121 = 1.0 - R12; + float phi12 = 0.0; + if ( iridescenceIOR < outsideIOR ) phi12 = PI; + float phi21 = PI - phi12; + + // Second interface + vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); // guard against 1.0 + vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR ); + vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 ); + vec3 phi23 = vec3( 0.0 ); + if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI; + if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI; + if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI; + + // Phase shift + float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2; + vec3 phi = vec3( phi21 ) + phi23; + + // Compound terms + vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 ); + vec3 r123 = sqrt( R123 ); + vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 ); + + // Reflectance term for m = 0 (DC term amplitude) + vec3 C0 = R12 + Rs; + I = C0; + + // Reflectance term for m > 0 (pairs of diracs) + vec3 Cm = Rs - T121; + for ( int m = 1; m <= 2; ++ m ) { + + Cm *= r123; + vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi ); + I += Cm * Sm; + + } + + // Since out of gamut colors might be produced, negative color values are clamped to 0. + return max( I, vec3( 0.0 ) ); + + } + +#endif + +`,Yp=` +#ifdef USE_BUMPMAP + + uniform sampler2D bumpMap; + uniform float bumpScale; + + // Bump Mapping Unparametrized Surfaces on the GPU by Morten S. Mikkelsen + // https://mmikk.github.io/papers3d/mm_sfgrad_bump.pdf + + // Evaluate the derivative of the height w.r.t. screen-space using forward differencing (listing 2) + + vec2 dHdxy_fwd() { + + vec2 dSTdx = dFdx( vBumpMapUv ); + vec2 dSTdy = dFdy( vBumpMapUv ); + + float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x; + float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll; + float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll; + + return vec2( dBx, dBy ); + + } + + vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) { + + // normalize is done to ensure that the bump map looks the same regardless of the texture's scale + vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) ); + vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) ); + vec3 vN = surf_norm; // normalized + + vec3 R1 = cross( vSigmaY, vN ); + vec3 R2 = cross( vN, vSigmaX ); + + float fDet = dot( vSigmaX, R1 ) * faceDirection; + + vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); + return normalize( abs( fDet ) * surf_norm - vGrad ); + + } + +#endif +`,$p=` +#if NUM_CLIPPING_PLANES > 0 + + vec4 plane; + + #ifdef ALPHA_TO_COVERAGE + + float distanceToPlane, distanceGradient; + float clipOpacity = 1.0; + + #pragma unroll_loop_start + for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { + + plane = clippingPlanes[ i ]; + distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; + distanceGradient = fwidth( distanceToPlane ) / 2.0; + clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); + + if ( clipOpacity == 0.0 ) discard; + + } + #pragma unroll_loop_end + + #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES + + float unionClipOpacity = 1.0; + + #pragma unroll_loop_start + for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { + + plane = clippingPlanes[ i ]; + distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; + distanceGradient = fwidth( distanceToPlane ) / 2.0; + unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); + + } + #pragma unroll_loop_end + + clipOpacity *= 1.0 - unionClipOpacity; + + #endif + + diffuseColor.a *= clipOpacity; + + if ( diffuseColor.a == 0.0 ) discard; + + #else + + #pragma unroll_loop_start + for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { + + plane = clippingPlanes[ i ]; + if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; + + } + #pragma unroll_loop_end + + #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES + + bool clipped = true; + + #pragma unroll_loop_start + for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { + + plane = clippingPlanes[ i ]; + clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; + + } + #pragma unroll_loop_end + + if ( clipped ) discard; + + #endif + + #endif + +#endif +`,jp=` +#if NUM_CLIPPING_PLANES > 0 + + varying vec3 vClipPosition; + + uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; + +#endif +`,Kp=` +#if NUM_CLIPPING_PLANES > 0 + + varying vec3 vClipPosition; + +#endif +`,Jp=` +#if NUM_CLIPPING_PLANES > 0 + + vClipPosition = - mvPosition.xyz; + +#endif +`,Zp=` +#if defined( USE_COLOR_ALPHA ) + + diffuseColor *= vColor; + +#elif defined( USE_COLOR ) + + diffuseColor.rgb *= vColor; + +#endif +`,Qp=` +#if defined( USE_COLOR_ALPHA ) + + varying vec4 vColor; + +#elif defined( USE_COLOR ) + + varying vec3 vColor; + +#endif +`,em=` +#if defined( USE_COLOR_ALPHA ) + + varying vec4 vColor; + +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) + + varying vec3 vColor; + +#endif +`,tm=` +#if defined( USE_COLOR_ALPHA ) + + vColor = vec4( 1.0 ); + +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) + + vColor = vec3( 1.0 ); + +#endif + +#ifdef USE_COLOR + + vColor *= color; + +#endif + +#ifdef USE_INSTANCING_COLOR + + vColor.xyz *= instanceColor.xyz; + +#endif + +#ifdef USE_BATCHING_COLOR + + vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) ); + + vColor.xyz *= batchingColor.xyz; + +#endif +`,im=` +#define PI 3.141592653589793 +#define PI2 6.283185307179586 +#define PI_HALF 1.5707963267948966 +#define RECIPROCAL_PI 0.3183098861837907 +#define RECIPROCAL_PI2 0.15915494309189535 +#define EPSILON 1e-6 + +#ifndef saturate +// may have defined saturate() already +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +#define whiteComplement( a ) ( 1.0 - saturate( a ) ) + +float pow2( const in float x ) { return x*x; } +vec3 pow2( const in vec3 x ) { return x*x; } +float pow3( const in float x ) { return x*x*x; } +float pow4( const in float x ) { float x2 = x*x; return x2*x2; } +float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } +float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } + +// expects values in the range of [0,1]x[0,1], returns values in the [0,1] range. +// do not collapse into a single function per: http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/ +highp float rand( const in vec2 uv ) { + + const highp float a = 12.9898, b = 78.233, c = 43758.5453; + highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); + + return fract( sin( sn ) * c ); + +} + +#ifdef HIGH_PRECISION + float precisionSafeLength( vec3 v ) { return length( v ); } +#else + float precisionSafeLength( vec3 v ) { + float maxComponent = max3( abs( v ) ); + return length( v / maxComponent ) * maxComponent; + } +#endif + +struct IncidentLight { + vec3 color; + vec3 direction; + bool visible; +}; + +struct ReflectedLight { + vec3 directDiffuse; + vec3 directSpecular; + vec3 indirectDiffuse; + vec3 indirectSpecular; +}; + +#ifdef USE_ALPHAHASH + + varying vec3 vPosition; + +#endif + +vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); + +} + +vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { + + // dir can be either a direction vector or a normal vector + // upper-left 3x3 of matrix is assumed to be orthogonal + + return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); + +} + +mat3 transposeMat3( const in mat3 m ) { + + mat3 tmp; + + tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); + tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); + tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); + + return tmp; + +} + +float luminance( const in vec3 rgb ) { + + // assumes rgb is in linear color space with sRGB primaries and D65 white point + + const vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 ); + + return dot( weights, rgb ); + +} + +bool isPerspectiveMatrix( mat4 m ) { + + return m[ 2 ][ 3 ] == - 1.0; + +} + +vec2 equirectUv( in vec3 dir ) { + + // dir is assumed to be unit length + + float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; + + float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; + + return vec2( u, v ); + +} + +vec3 BRDF_Lambert( const in vec3 diffuseColor ) { + + return RECIPROCAL_PI * diffuseColor; + +} // validated + +vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { + + // Original approximation by Christophe Schlick '94 + // float fresnel = pow( 1.0 - dotVH, 5.0 ); + + // Optimized variant (presented by Epic at SIGGRAPH '13) + // https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf + float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); + + return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); + +} // validated + +float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { + + // Original approximation by Christophe Schlick '94 + // float fresnel = pow( 1.0 - dotVH, 5.0 ); + + // Optimized variant (presented by Epic at SIGGRAPH '13) + // https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf + float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); + + return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); + +} // validated +`,nm=` +#ifdef ENVMAP_TYPE_CUBE_UV + + #define cubeUV_minMipLevel 4.0 + #define cubeUV_minTileSize 16.0 + + // These shader functions convert between the UV coordinates of a single face of + // a cubemap, the 0-5 integer index of a cube face, and the direction vector for + // sampling a textureCube (not generally normalized ). + + float getFace( vec3 direction ) { + + vec3 absDirection = abs( direction ); + + float face = - 1.0; + + if ( absDirection.x > absDirection.z ) { + + if ( absDirection.x > absDirection.y ) + + face = direction.x > 0.0 ? 0.0 : 3.0; + + else + + face = direction.y > 0.0 ? 1.0 : 4.0; + + } else { + + if ( absDirection.z > absDirection.y ) + + face = direction.z > 0.0 ? 2.0 : 5.0; + + else + + face = direction.y > 0.0 ? 1.0 : 4.0; + + } + + return face; + + } + + // RH coordinate system; PMREM face-indexing convention + vec2 getUV( vec3 direction, float face ) { + + vec2 uv; + + if ( face == 0.0 ) { + + uv = vec2( direction.z, direction.y ) / abs( direction.x ); // pos x + + } else if ( face == 1.0 ) { + + uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); // pos y + + } else if ( face == 2.0 ) { + + uv = vec2( - direction.x, direction.y ) / abs( direction.z ); // pos z + + } else if ( face == 3.0 ) { + + uv = vec2( - direction.z, direction.y ) / abs( direction.x ); // neg x + + } else if ( face == 4.0 ) { + + uv = vec2( - direction.x, direction.z ) / abs( direction.y ); // neg y + + } else { + + uv = vec2( direction.x, direction.y ) / abs( direction.z ); // neg z + + } + + return 0.5 * ( uv + 1.0 ); + + } + + vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { + + float face = getFace( direction ); + + float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); + + mipInt = max( mipInt, cubeUV_minMipLevel ); + + float faceSize = exp2( mipInt ); + + highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; // #25071 + + if ( face > 2.0 ) { + + uv.y += faceSize; + + face -= 3.0; + + } + + uv.x += face * faceSize; + + uv.x += filterInt * 3.0 * cubeUV_minTileSize; + + uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); + + uv.x *= CUBEUV_TEXEL_WIDTH; + uv.y *= CUBEUV_TEXEL_HEIGHT; + + #ifdef texture2DGradEXT + + return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; // disable anisotropic filtering + + #else + + return texture2D( envMap, uv ).rgb; + + #endif + + } + + // These defines must match with PMREMGenerator + + #define cubeUV_r0 1.0 + #define cubeUV_m0 - 2.0 + #define cubeUV_r1 0.8 + #define cubeUV_m1 - 1.0 + #define cubeUV_r4 0.4 + #define cubeUV_m4 2.0 + #define cubeUV_r5 0.305 + #define cubeUV_m5 3.0 + #define cubeUV_r6 0.21 + #define cubeUV_m6 4.0 + + float roughnessToMip( float roughness ) { + + float mip = 0.0; + + if ( roughness >= cubeUV_r1 ) { + + mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; + + } else if ( roughness >= cubeUV_r4 ) { + + mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; + + } else if ( roughness >= cubeUV_r5 ) { + + mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; + + } else if ( roughness >= cubeUV_r6 ) { + + mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; + + } else { + + mip = - 2.0 * log2( 1.16 * roughness ); // 1.16 = 1.79^0.25 + } + + return mip; + + } + + vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { + + float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); + + float mipF = fract( mip ); + + float mipInt = floor( mip ); + + vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); + + if ( mipF == 0.0 ) { + + return vec4( color0, 1.0 ); + + } else { + + vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); + + return vec4( mix( color0, color1, mipF ), 1.0 ); + + } + + } + +#endif +`,sm=` + +vec3 transformedNormal = objectNormal; +#ifdef USE_TANGENT + + vec3 transformedTangent = objectTangent; + +#endif + +#ifdef USE_BATCHING + + // this is in lieu of a per-instance normal-matrix + // shear transforms in the instance matrix are not supported + + mat3 bm = mat3( batchingMatrix ); + transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); + transformedNormal = bm * transformedNormal; + + #ifdef USE_TANGENT + + transformedTangent = bm * transformedTangent; + + #endif + +#endif + +#ifdef USE_INSTANCING + + // this is in lieu of a per-instance normal-matrix + // shear transforms in the instance matrix are not supported + + mat3 im = mat3( instanceMatrix ); + transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); + transformedNormal = im * transformedNormal; + + #ifdef USE_TANGENT + + transformedTangent = im * transformedTangent; + + #endif + +#endif + +transformedNormal = normalMatrix * transformedNormal; + +#ifdef FLIP_SIDED + + transformedNormal = - transformedNormal; + +#endif + +#ifdef USE_TANGENT + + transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; + + #ifdef FLIP_SIDED + + transformedTangent = - transformedTangent; + + #endif + +#endif +`,rm=` +#ifdef USE_DISPLACEMENTMAP + + uniform sampler2D displacementMap; + uniform float displacementScale; + uniform float displacementBias; + +#endif +`,am=` +#ifdef USE_DISPLACEMENTMAP + + transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); + +#endif +`,om=` +#ifdef USE_EMISSIVEMAP + + vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); + + totalEmissiveRadiance *= emissiveColor.rgb; + +#endif +`,lm=` +#ifdef USE_EMISSIVEMAP + + uniform sampler2D emissiveMap; + +#endif +`,cm=` +gl_FragColor = linearToOutputTexel( gl_FragColor ); +`,hm=` + +// http://www.russellcottrell.com/photo/matrixCalculator.htm + +// Linear sRGB => XYZ => Linear Display P3 +const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( + vec3( 0.8224621, 0.177538, 0.0 ), + vec3( 0.0331941, 0.9668058, 0.0 ), + vec3( 0.0170827, 0.0723974, 0.9105199 ) +); + +// Linear Display P3 => XYZ => Linear sRGB +const mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3( + vec3( 1.2249401, - 0.2249404, 0.0 ), + vec3( - 0.0420569, 1.0420571, 0.0 ), + vec3( - 0.0196376, - 0.0786361, 1.0982735 ) +); + +vec4 LinearSRGBToLinearDisplayP3( in vec4 value ) { + return vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a ); +} + +vec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) { + return vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a ); +} + +vec4 LinearTransferOETF( in vec4 value ) { + return value; +} + +vec4 sRGBTransferOETF( in vec4 value ) { + return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); +} + +// @deprecated, r156 +vec4 LinearToLinear( in vec4 value ) { + return value; +} + +// @deprecated, r156 +vec4 LinearTosRGB( in vec4 value ) { + return sRGBTransferOETF( value ); +} +`,um=` +#ifdef USE_ENVMAP + + #ifdef ENV_WORLDPOS + + vec3 cameraToFrag; + + if ( isOrthographic ) { + + cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + + } else { + + cameraToFrag = normalize( vWorldPosition - cameraPosition ); + + } + + // Transforming Normal Vectors with the Inverse Transformation + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + + #ifdef ENVMAP_MODE_REFLECTION + + vec3 reflectVec = reflect( cameraToFrag, worldNormal ); + + #else + + vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); + + #endif + + #else + + vec3 reflectVec = vReflect; + + #endif + + #ifdef ENVMAP_TYPE_CUBE + + vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); + + #else + + vec4 envColor = vec4( 0.0 ); + + #endif + + #ifdef ENVMAP_BLENDING_MULTIPLY + + outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); + + #elif defined( ENVMAP_BLENDING_MIX ) + + outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); + + #elif defined( ENVMAP_BLENDING_ADD ) + + outgoingLight += envColor.xyz * specularStrength * reflectivity; + + #endif + +#endif +`,dm=` +#ifdef USE_ENVMAP + + uniform float envMapIntensity; + uniform float flipEnvMap; + uniform mat3 envMapRotation; + + #ifdef ENVMAP_TYPE_CUBE + uniform samplerCube envMap; + #else + uniform sampler2D envMap; + #endif + +#endif +`,fm=` +#ifdef USE_ENVMAP + + uniform float reflectivity; + + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) + + #define ENV_WORLDPOS + + #endif + + #ifdef ENV_WORLDPOS + + varying vec3 vWorldPosition; + uniform float refractionRatio; + #else + varying vec3 vReflect; + #endif + +#endif +`,pm=` +#ifdef USE_ENVMAP + + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) + + #define ENV_WORLDPOS + + #endif + + #ifdef ENV_WORLDPOS + + varying vec3 vWorldPosition; + + #else + + varying vec3 vReflect; + uniform float refractionRatio; + + #endif + +#endif +`,mm=` +#ifdef USE_ENVMAP + + #ifdef ENV_WORLDPOS + + vWorldPosition = worldPosition.xyz; + + #else + + vec3 cameraToVertex; + + if ( isOrthographic ) { + + cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + + } else { + + cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); + + } + + vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + + #ifdef ENVMAP_MODE_REFLECTION + + vReflect = reflect( cameraToVertex, worldNormal ); + + #else + + vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); + + #endif + + #endif + +#endif +`,gm=` +#ifdef USE_FOG + + vFogDepth = - mvPosition.z; + +#endif +`,_m=` +#ifdef USE_FOG + + varying float vFogDepth; + +#endif +`,xm=` +#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 +`,ym=` +#ifdef USE_FOG + + uniform vec3 fogColor; + varying float vFogDepth; + + #ifdef FOG_EXP2 + + uniform float fogDensity; + + #else + + uniform float fogNear; + uniform float fogFar; + + #endif + +#endif +`,Mm=` + +#ifdef USE_GRADIENTMAP + + uniform sampler2D gradientMap; + +#endif + +vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { + + // dotNL will be from -1.0 to 1.0 + float dotNL = dot( normal, lightDirection ); + vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); + + #ifdef USE_GRADIENTMAP + + return vec3( texture2D( gradientMap, coord ).r ); + + #else + + 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 + +} +`,vm=` +#ifdef USE_LIGHTMAP + + uniform sampler2D lightMap; + uniform float lightMapIntensity; + +#endif +`,Sm=` +LambertMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularStrength = specularStrength; +`,wm=` +varying vec3 vViewPosition; + +struct LambertMaterial { + + vec3 diffuseColor; + float specularStrength; + +}; + +void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { + + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + +} + +void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { + + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + +} + +#define RE_Direct RE_Direct_Lambert +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert +`,bm=` +uniform bool receiveShadow; +uniform vec3 ambientLightColor; + +#if defined( USE_LIGHT_PROBES ) + + uniform vec3 lightProbe[ 9 ]; + +#endif + +// get the irradiance (radiance convolved with cosine lobe) at the point 'normal' on the unit sphere +// source: https://graphics.stanford.edu/papers/envmap/envmap.pdf +vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { + + // normal is assumed to have unit length + + float x = normal.x, y = normal.y, z = normal.z; + + // band 0 + vec3 result = shCoefficients[ 0 ] * 0.886227; + + // band 1 + result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; + result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; + result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; + + // band 2 + result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; + result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; + result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); + result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; + result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); + + return result; + +} + +vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { + + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + + vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); + + return irradiance; + +} + +vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { + + vec3 irradiance = ambientLightColor; + + return irradiance; + +} + +float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { + + // based upon Frostbite 3 Moving to Physically-based Rendering + // page 32, equation 26: E[window1] + // https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf + float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); + + if ( cutoffDistance > 0.0 ) { + + distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); + + } + + return distanceFalloff; + +} + +float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { + + return smoothstep( coneCosine, penumbraCosine, angleCosine ); + +} + +#if NUM_DIR_LIGHTS > 0 + + struct DirectionalLight { + vec3 direction; + vec3 color; + }; + + uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; + + void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { + + light.color = directionalLight.color; + light.direction = directionalLight.direction; + light.visible = true; + + } + +#endif + + +#if NUM_POINT_LIGHTS > 0 + + struct PointLight { + vec3 position; + vec3 color; + float distance; + float decay; + }; + + uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; + + // light is an out parameter as having it as a return value caused compiler errors on some devices + void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { + + vec3 lVector = pointLight.position - geometryPosition; + + light.direction = normalize( lVector ); + + float lightDistance = length( lVector ); + + light.color = pointLight.color; + light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + + } + +#endif + + +#if NUM_SPOT_LIGHTS > 0 + + struct SpotLight { + vec3 position; + vec3 direction; + vec3 color; + float distance; + float decay; + float coneCos; + float penumbraCos; + }; + + uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; + + // light is an out parameter as having it as a return value caused compiler errors on some devices + void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { + + vec3 lVector = spotLight.position - geometryPosition; + + light.direction = normalize( lVector ); + + float angleCos = dot( light.direction, spotLight.direction ); + + float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); + + if ( spotAttenuation > 0.0 ) { + + float lightDistance = length( lVector ); + + light.color = spotLight.color * spotAttenuation; + light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + + } else { + + light.color = vec3( 0.0 ); + light.visible = false; + + } + + } + +#endif + + +#if NUM_RECT_AREA_LIGHTS > 0 + + struct RectAreaLight { + vec3 color; + vec3 position; + vec3 halfWidth; + vec3 halfHeight; + }; + + // Pre-computed values of LinearTransformedCosine approximation of BRDF + // BRDF approximation Texture is 64x64 + uniform sampler2D ltc_1; // RGBA Float + uniform sampler2D ltc_2; // RGBA Float + + uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; + +#endif + + +#if NUM_HEMI_LIGHTS > 0 + + struct HemisphereLight { + vec3 direction; + vec3 skyColor; + vec3 groundColor; + }; + + uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; + + vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { + + float dotNL = dot( normal, hemiLight.direction ); + float hemiDiffuseWeight = 0.5 * dotNL + 0.5; + + vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); + + return irradiance; + + } + +#endif +`,Em=` +#ifdef USE_ENVMAP + + vec3 getIBLIrradiance( const in vec3 normal ) { + + #ifdef ENVMAP_TYPE_CUBE_UV + + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + + vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 ); + + return PI * envMapColor.rgb * envMapIntensity; + + #else + + return vec3( 0.0 ); + + #endif + + } + + vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { + + #ifdef ENVMAP_TYPE_CUBE_UV + + vec3 reflectVec = reflect( - viewDir, normal ); + + // Mixing the reflection with the normal is more accurate and keeps rough objects from gathering light from behind their tangent plane. + reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); + + reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); + + vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness ); + + return envMapColor.rgb * envMapIntensity; + + #else + + return vec3( 0.0 ); + + #endif + + } + + #ifdef USE_ANISOTROPY + + vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { + + #ifdef ENVMAP_TYPE_CUBE_UV + + // https://google.github.io/filament/Filament.md.html#lighting/imagebasedlights/anisotropy + vec3 bentNormal = cross( bitangent, viewDir ); + bentNormal = normalize( cross( bentNormal, bitangent ) ); + bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); + + return getIBLRadiance( viewDir, bentNormal, roughness ); + + #else + + return vec3( 0.0 ); + + #endif + + } + + #endif + +#endif +`,Am=` +ToonMaterial material; +material.diffuseColor = diffuseColor.rgb; +`,Tm=` +varying vec3 vViewPosition; + +struct ToonMaterial { + + vec3 diffuseColor; + +}; + +void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + + vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; + + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + +} + +void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + +} + +#define RE_Direct RE_Direct_Toon +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon +`,Rm=` +BlinnPhongMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularColor = specular; +material.specularShininess = shininess; +material.specularStrength = specularStrength; +`,Cm=` +varying vec3 vViewPosition; + +struct BlinnPhongMaterial { + + vec3 diffuseColor; + vec3 specularColor; + float specularShininess; + float specularStrength; + +}; + +void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + + reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; + +} + +void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + +} + +#define RE_Direct RE_Direct_BlinnPhong +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong +`,Pm=` +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 ); + +material.roughness = max( roughnessFactor, 0.0525 );// 0.0525 corresponds to the base mip of a 256 cubemap. +material.roughness += geometryRoughness; +material.roughness = min( material.roughness, 1.0 ); + +#ifdef IOR + + material.ior = ior; + + #ifdef USE_SPECULAR + + float specularIntensityFactor = specularIntensity; + vec3 specularColorFactor = specularColor; + + #ifdef USE_SPECULAR_COLORMAP + + specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; + + #endif + + #ifdef USE_SPECULAR_INTENSITYMAP + + specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; + + #endif + + material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); + + #else + + float specularIntensityFactor = 1.0; + vec3 specularColorFactor = vec3( 1.0 ); + material.specularF90 = 1.0; + + #endif + + material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); + +#else + + material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); + material.specularF90 = 1.0; + +#endif + +#ifdef USE_CLEARCOAT + + material.clearcoat = clearcoat; + material.clearcoatRoughness = clearcoatRoughness; + material.clearcoatF0 = vec3( 0.04 ); + material.clearcoatF90 = 1.0; + + #ifdef USE_CLEARCOATMAP + + material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; + + #endif + + #ifdef USE_CLEARCOAT_ROUGHNESSMAP + + material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; + + #endif + + material.clearcoat = saturate( material.clearcoat ); // Burley clearcoat model + material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); + material.clearcoatRoughness += geometryRoughness; + material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); + +#endif + +#ifdef USE_DISPERSION + + material.dispersion = dispersion; + +#endif + +#ifdef USE_IRIDESCENCE + + material.iridescence = iridescence; + material.iridescenceIOR = iridescenceIOR; + + #ifdef USE_IRIDESCENCEMAP + + material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; + + #endif + + #ifdef USE_IRIDESCENCE_THICKNESSMAP + + material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; + + #else + + material.iridescenceThickness = iridescenceThicknessMaximum; + + #endif + +#endif + +#ifdef USE_SHEEN + + material.sheenColor = sheenColor; + + #ifdef USE_SHEEN_COLORMAP + + material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; + + #endif + + material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); + + #ifdef USE_SHEEN_ROUGHNESSMAP + + material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; + + #endif + +#endif + +#ifdef USE_ANISOTROPY + + #ifdef USE_ANISOTROPYMAP + + mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); + vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; + vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; + + #else + + vec2 anisotropyV = anisotropyVector; + + #endif + + material.anisotropy = length( anisotropyV ); + + if( material.anisotropy == 0.0 ) { + anisotropyV = vec2( 1.0, 0.0 ); + } else { + anisotropyV /= material.anisotropy; + material.anisotropy = saturate( material.anisotropy ); + } + + // Roughness along the anisotropy bitangent is the material roughness, while the tangent roughness increases with anisotropy. + 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 +`,Lm=` + +struct PhysicalMaterial { + + vec3 diffuseColor; + float roughness; + vec3 specularColor; + float specularF90; + float dispersion; + + #ifdef USE_CLEARCOAT + float clearcoat; + float clearcoatRoughness; + vec3 clearcoatF0; + float clearcoatF90; + #endif + + #ifdef USE_IRIDESCENCE + float iridescence; + float iridescenceIOR; + float iridescenceThickness; + vec3 iridescenceFresnel; + vec3 iridescenceF0; + #endif + + #ifdef USE_SHEEN + vec3 sheenColor; + float sheenRoughness; + #endif + + #ifdef IOR + float ior; + #endif + + #ifdef USE_TRANSMISSION + float transmission; + float transmissionAlpha; + float thickness; + float attenuationDistance; + vec3 attenuationColor; + #endif + + #ifdef USE_ANISOTROPY + float anisotropy; + float alphaT; + vec3 anisotropyT; + vec3 anisotropyB; + #endif + +}; + +// temporary +vec3 clearcoatSpecularDirect = vec3( 0.0 ); +vec3 clearcoatSpecularIndirect = vec3( 0.0 ); +vec3 sheenSpecularDirect = vec3( 0.0 ); +vec3 sheenSpecularIndirect = vec3(0.0 ); + +vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { + float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); + float x2 = x * x; + float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); + + return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); +} + +// Moving Frostbite to Physically Based Rendering 3.0 - page 12, listing 2 +// https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf +float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { + + float a2 = pow2( alpha ); + + float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); + float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); + + return 0.5 / max( gv + gl, EPSILON ); + +} + +// Microfacet Models for Refraction through Rough Surfaces - equation (33) +// http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html +// alpha is "roughness squared" in Disney’s reparameterization +float D_GGX( const in float alpha, const in float dotNH ) { + + float a2 = pow2( alpha ); + + float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; // avoid alpha = 0 with dotNH = 1 + + return RECIPROCAL_PI * a2 / pow2( denom ); + +} + +// https://google.github.io/filament/Filament.md.html#materialsystem/anisotropicmodel/anisotropicspecularbrdf +#ifdef USE_ANISOTROPY + + float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) { + + float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); + float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); + float v = 0.5 / ( gv + gl ); + + return saturate(v); + + } + + float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { + + float a2 = alphaT * alphaB; + highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); + highp float v2 = dot( v, v ); + float w2 = a2 / v2; + + return RECIPROCAL_PI * a2 * pow2 ( w2 ); + + } + +#endif + +#ifdef USE_CLEARCOAT + + // GGX Distribution, Schlick Fresnel, GGX_SmithCorrelated Visibility + vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { + + vec3 f0 = material.clearcoatF0; + float f90 = material.clearcoatF90; + float roughness = material.clearcoatRoughness; + + float alpha = pow2( roughness ); // UE4's roughness + + vec3 halfDir = normalize( lightDir + viewDir ); + + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + + vec3 F = F_Schlick( f0, f90, dotVH ); + + float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); + + float D = D_GGX( alpha, dotNH ); + + return F * ( V * D ); + + } + +#endif + +vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { + + vec3 f0 = material.specularColor; + float f90 = material.specularF90; + float roughness = material.roughness; + + float alpha = pow2( roughness ); // UE4's roughness + + vec3 halfDir = normalize( lightDir + viewDir ); + + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + + vec3 F = F_Schlick( f0, f90, dotVH ); + + #ifdef USE_IRIDESCENCE + + F = mix( F, material.iridescenceFresnel, material.iridescence ); + + #endif + + #ifdef USE_ANISOTROPY + + float dotTL = dot( material.anisotropyT, lightDir ); + float dotTV = dot( material.anisotropyT, viewDir ); + float dotTH = dot( material.anisotropyT, halfDir ); + float dotBL = dot( material.anisotropyB, lightDir ); + float dotBV = dot( material.anisotropyB, viewDir ); + float dotBH = dot( material.anisotropyB, halfDir ); + + float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); + + float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); + + #else + + float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); + + float D = D_GGX( alpha, dotNH ); + + #endif + + return F * ( V * D ); + +} + +// Rect Area Light + +// Real-Time Polygonal-Light Shading with Linearly Transformed Cosines +// by Eric Heitz, Jonathan Dupuy, Stephen Hill and David Neubelt +// code: https://github.com/selfshadow/ltc_code/ + +vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { + + const float LUT_SIZE = 64.0; + const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; + const float LUT_BIAS = 0.5 / LUT_SIZE; + + float dotNV = saturate( dot( N, V ) ); + + // texture parameterized by sqrt( GGX alpha ) and sqrt( 1 - cos( theta ) ) + vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); + + uv = uv * LUT_SCALE + LUT_BIAS; + + return uv; + +} + +float LTC_ClippedSphereFormFactor( const in vec3 f ) { + + // Real-Time Area Lighting: a Journey from Research to Production (p.102) + // An approximation of the form factor of a horizon-clipped rectangle. + + float l = length( f ); + + return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); + +} + +vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { + + float x = dot( v1, v2 ); + + float y = abs( x ); + + // rational polynomial approximation to theta / sin( theta ) / 2PI + float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; + float b = 3.4175940 + ( 4.1616724 + y ) * y; + float v = a / b; + + float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; + + return cross( v1, v2 ) * theta_sintheta; + +} + +vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { + + // bail if point is on back side of plane of light + // assumes ccw winding order of light vertices + vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; + vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; + vec3 lightNormal = cross( v1, v2 ); + + if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); + + // construct orthonormal basis around N + vec3 T1, T2; + T1 = normalize( V - N * dot( V, N ) ); + T2 = - cross( N, T1 ); // negated from paper; possibly due to a different handedness of world coordinate system + + // compute transform + mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); + + // transform rect + vec3 coords[ 4 ]; + coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); + coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); + coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); + coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); + + // project rect onto sphere + coords[ 0 ] = normalize( coords[ 0 ] ); + coords[ 1 ] = normalize( coords[ 1 ] ); + coords[ 2 ] = normalize( coords[ 2 ] ); + coords[ 3 ] = normalize( coords[ 3 ] ); + + // calculate vector form factor + vec3 vectorFormFactor = vec3( 0.0 ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); + + // adjust for horizon clipping + float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); + +/* + // alternate method of adjusting for horizon clipping (see referece) + // refactoring required + float len = length( vectorFormFactor ); + float z = vectorFormFactor.z / len; + + const float LUT_SIZE = 64.0; + const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; + const float LUT_BIAS = 0.5 / LUT_SIZE; + + // tabulated horizon-clipped sphere, apparently... + vec2 uv = vec2( z * 0.5 + 0.5, len ); + uv = uv * LUT_SCALE + LUT_BIAS; + + float scale = texture2D( ltc_2, uv ).w; + + float result = len * scale; +*/ + + return vec3( result ); + +} + +// End Rect Area Light + +#if defined( USE_SHEEN ) + +// https://github.com/google/filament/blob/master/shaders/src/brdf.fs +float D_Charlie( float roughness, float dotNH ) { + + float alpha = pow2( roughness ); + + // Estevez and Kulla 2017, "Production Friendly Microfacet Sheen BRDF" + float invAlpha = 1.0 / alpha; + float cos2h = dotNH * dotNH; + float sin2h = max( 1.0 - cos2h, 0.0078125 ); // 2^(-14/2), so sin2h^2 > 0 in fp16 + + return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); + +} + +// https://github.com/google/filament/blob/master/shaders/src/brdf.fs +float V_Neubelt( float dotNV, float dotNL ) { + + // Neubelt and Pettineo 2013, "Crafting a Next-gen Material Pipeline for The Order: 1886" + return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); + +} + +vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { + + vec3 halfDir = normalize( lightDir + viewDir ); + + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + + float D = D_Charlie( sheenRoughness, dotNH ); + float V = V_Neubelt( dotNV, dotNL ); + + return sheenColor * ( D * V ); + +} + +#endif + +// This is a curve-fit approxmation to the "Charlie sheen" BRDF integrated over the hemisphere from +// Estevez and Kulla 2017, "Production Friendly Microfacet Sheen BRDF". The analysis can be found +// in the Sheen section of https://drive.google.com/file/d/1T0D1VSyR4AllqIJTQAraEIzjlb5h4FKH/view?usp=sharing +float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + + float dotNV = saturate( dot( normal, viewDir ) ); + + float r2 = roughness * roughness; + + float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; + + float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; + + float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); + + return saturate( DG * RECIPROCAL_PI ); + +} + +// Analytical approximation of the DFG LUT, one half of the +// split-sum approximation used in indirect specular lighting. +// via 'environmentBRDF' from "Physically Based Shading on Mobile" +// https://www.unrealengine.com/blog/physically-based-shading-on-mobile +vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + + float dotNV = saturate( dot( normal, viewDir ) ); + + const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); + + const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); + + vec4 r = roughness * c0 + c1; + + float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; + + vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; + + return fab; + +} + +vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { + + vec2 fab = DFGApprox( normal, viewDir, roughness ); + + return specularColor * fab.x + specularF90 * fab.y; + +} + +// Fdez-Agüera's "Multiple-Scattering Microfacet Model for Real-Time Image Based Lighting" +// Approximates multiscattering in order to preserve energy. +// http://www.jcgt.org/published/0008/01/03/ +#ifdef USE_IRIDESCENCE +void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { +#else +void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { +#endif + + vec2 fab = DFGApprox( normal, viewDir, roughness ); + + #ifdef USE_IRIDESCENCE + + vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); + + #else + + vec3 Fr = specularColor; + + #endif + + vec3 FssEss = Fr * fab.x + specularF90 * fab.y; + + float Ess = fab.x + fab.y; + float Ems = 1.0 - Ess; + + vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; // 1/21 + vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); + + singleScatter += FssEss; + multiScatter += Fms * Ems; + +} + +#if NUM_RECT_AREA_LIGHTS > 0 + + void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + + vec3 normal = geometryNormal; + vec3 viewDir = geometryViewDir; + vec3 position = geometryPosition; + vec3 lightPos = rectAreaLight.position; + vec3 halfWidth = rectAreaLight.halfWidth; + vec3 halfHeight = rectAreaLight.halfHeight; + vec3 lightColor = rectAreaLight.color; + float roughness = material.roughness; + + vec3 rectCoords[ 4 ]; + rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; // counterclockwise; light shines in local neg z direction + rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; + rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; + rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; + + vec2 uv = LTC_Uv( normal, viewDir, roughness ); + + vec4 t1 = texture2D( ltc_1, uv ); + vec4 t2 = texture2D( ltc_2, uv ); + + mat3 mInv = mat3( + vec3( t1.x, 0, t1.y ), + vec3( 0, 1, 0 ), + vec3( t1.z, 0, t1.w ) + ); + + // LTC Fresnel Approximation by Stephen Hill + // http://blog.selfshadow.com/publications/s2016-advances/s2016_ltc_fresnel.pdf + vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); + + reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); + + reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); + + } + +#endif + +void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + + vec3 irradiance = dotNL * directLight.color; + + #ifdef USE_CLEARCOAT + + float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); + + vec3 ccIrradiance = dotNLcc * directLight.color; + + clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); + + #endif + + #ifdef USE_SHEEN + + sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); + + #endif + + reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material ); + + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} + +void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + +} + +void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { + + #ifdef USE_CLEARCOAT + + clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); + + #endif + + #ifdef USE_SHEEN + + sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); + + #endif + + // Both indirect specular and indirect diffuse light accumulate here + + vec3 singleScattering = vec3( 0.0 ); + vec3 multiScattering = vec3( 0.0 ); + vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; + + #ifdef USE_IRIDESCENCE + + computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); + + #else + + computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); + + #endif + + vec3 totalScattering = singleScattering + multiScattering; + vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); + + reflectedLight.indirectSpecular += radiance * singleScattering; + reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; + + reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; + +} + +#define RE_Direct RE_Direct_Physical +#define RE_Direct_RectArea RE_Direct_RectArea_Physical +#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical +#define RE_IndirectSpecular RE_IndirectSpecular_Physical + +// ref: https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf +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 ); + +} +`,Im=` +/** + * This is a template that can be used to light a material, it uses pluggable + * RenderEquations (RE)for specific lighting scenarios. + * + * Instructions for use: + * - Ensure that both RE_Direct, RE_IndirectDiffuse and RE_IndirectSpecular are defined + * - Create a material parameter that is to be passed as the third parameter to your lighting functions. + * + * TODO: + * - Add area light support. + * - Add sphere light support. + * - Add diffuse light probe (irradiance cubemap) support. + */ + +vec3 geometryPosition = - vViewPosition; +vec3 geometryNormal = normal; +vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); + +vec3 geometryClearcoatNormal = vec3( 0.0 ); + +#ifdef USE_CLEARCOAT + + geometryClearcoatNormal = clearcoatNormal; + +#endif + +#ifdef USE_IRIDESCENCE + + float dotNVi = saturate( dot( normal, geometryViewDir ) ); + + if ( material.iridescenceThickness == 0.0 ) { + + material.iridescence = 0.0; + + } else { + + material.iridescence = saturate( material.iridescence ); + + } + + if ( material.iridescence > 0.0 ) { + + material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); + + // Iridescence F0 approximation + material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); + + } + +#endif + +IncidentLight directLight; + +#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) + + PointLight pointLight; + #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLightShadow; + #endif + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { + + pointLight = pointLights[ i ]; + + getPointLightInfo( pointLight, geometryPosition, directLight ); + + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) + pointLightShadow = pointLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; + #endif + + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + + } + #pragma unroll_loop_end + +#endif + +#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) + + SpotLight spotLight; + vec4 spotColor; + vec3 spotLightCoord; + bool inSpotLightMap; + + #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLightShadow; + #endif + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { + + spotLight = spotLights[ i ]; + + getSpotLightInfo( spotLight, geometryPosition, directLight ); + + // spot lights are ordered [shadows with maps, shadows without maps, maps without shadows, none] + #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX + #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS + #else + #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #endif + + #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) + spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; + inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); + spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); + directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; + #endif + + #undef SPOT_LIGHT_MAP_INDEX + + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + spotLightShadow = spotLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; + #endif + + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + + } + #pragma unroll_loop_end + +#endif + +#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) + + DirectionalLight directionalLight; + #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLightShadow; + #endif + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { + + directionalLight = directionalLights[ i ]; + + getDirectionalLightInfo( directionalLight, directLight ); + + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) + directionalLightShadow = directionalLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + #endif + + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + + } + #pragma unroll_loop_end + +#endif + +#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) + + RectAreaLight rectAreaLight; + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { + + rectAreaLight = rectAreaLights[ i ]; + RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + + } + #pragma unroll_loop_end + +#endif + +#if defined( RE_IndirectDiffuse ) + + vec3 iblIrradiance = vec3( 0.0 ); + + vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); + + #if defined( USE_LIGHT_PROBES ) + + irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); + + #endif + + #if ( NUM_HEMI_LIGHTS > 0 ) + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { + + irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); + + } + #pragma unroll_loop_end + + #endif + +#endif + +#if defined( RE_IndirectSpecular ) + + vec3 radiance = vec3( 0.0 ); + vec3 clearcoatRadiance = vec3( 0.0 ); + +#endif +`,Dm=` +#if defined( RE_IndirectDiffuse ) + + #ifdef USE_LIGHTMAP + + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; + + irradiance += lightMapIrradiance; + + #endif + + #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) + + iblIrradiance += getIBLIrradiance( geometryNormal ); + + #endif + +#endif + +#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) + + #ifdef USE_ANISOTROPY + + radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); + + #else + + radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); + + #endif + + #ifdef USE_CLEARCOAT + + clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); + + #endif + +#endif +`,Nm=` +#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 +`,Um=` +#if defined( USE_LOGDEPTHBUF ) + + // Doing a strict comparison with == 1.0 can cause noise artifacts + // on some platforms. See issue #17623. + gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; + +#endif +`,Fm=` +#if defined( USE_LOGDEPTHBUF ) + + uniform float logDepthBufFC; + varying float vFragDepth; + varying float vIsPerspective; + +#endif +`,Om=` +#ifdef USE_LOGDEPTHBUF + + varying float vFragDepth; + varying float vIsPerspective; + +#endif +`,Bm=` +#ifdef USE_LOGDEPTHBUF + + vFragDepth = 1.0 + gl_Position.w; + vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); + +#endif +`,zm=` +#ifdef USE_MAP + + vec4 sampledDiffuseColor = texture2D( map, vMapUv ); + + #ifdef DECODE_VIDEO_TEXTURE + + // use inline sRGB decode until browsers properly support SRGB8_ALPHA8 with video textures (#26516) + + 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 +`,km=` +#ifdef USE_MAP + + uniform sampler2D map; + +#endif +`,Hm=` +#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + + #if defined( USE_POINTS_UV ) + + vec2 uv = vUv; + + #else + + vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; + + #endif + +#endif + +#ifdef USE_MAP + + diffuseColor *= texture2D( map, uv ); + +#endif + +#ifdef USE_ALPHAMAP + + diffuseColor.a *= texture2D( alphaMap, uv ).g; + +#endif +`,Vm=` +#if defined( USE_POINTS_UV ) + + varying vec2 vUv; + +#else + + #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + + uniform mat3 uvTransform; + + #endif + +#endif + +#ifdef USE_MAP + + uniform sampler2D map; + +#endif + +#ifdef USE_ALPHAMAP + + uniform sampler2D alphaMap; + +#endif +`,Gm=` +float metalnessFactor = metalness; + +#ifdef USE_METALNESSMAP + + vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); + + // reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture + metalnessFactor *= texelMetalness.b; + +#endif +`,Wm=` +#ifdef USE_METALNESSMAP + + uniform sampler2D metalnessMap; + +#endif +`,Xm=` +#ifdef USE_INSTANCING_MORPH + + float morphTargetInfluences[ MORPHTARGETS_COUNT ]; + + float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; + + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + + morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; + + } +#endif +`,qm=` +#if defined( USE_MORPHCOLORS ) + + // morphTargetBaseInfluence is set based on BufferGeometry.morphTargetsRelative value: + // When morphTargetsRelative is false, this is set to 1 - sum(influences); this results in normal = sum((target - base) * influence) + // When morphTargetsRelative is true, this is set to 1; as a result, all morph targets are simply added to the base after weighting + vColor *= morphTargetBaseInfluence; + + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + + #if defined( USE_COLOR_ALPHA ) + + if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; + + #elif defined( USE_COLOR ) + + if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; + + #endif + + } + +#endif +`,Ym=` +#ifdef USE_MORPHNORMALS + + // morphTargetBaseInfluence is set based on BufferGeometry.morphTargetsRelative value: + // When morphTargetsRelative is false, this is set to 1 - sum(influences); this results in normal = sum((target - base) * influence) + // When morphTargetsRelative is true, this is set to 1; as a result, all morph targets are simply added to the base after weighting + objectNormal *= morphTargetBaseInfluence; + + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + + if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; + + } + +#endif +`,$m=` +#ifdef USE_MORPHTARGETS + + #ifndef USE_INSTANCING_MORPH + + uniform float morphTargetBaseInfluence; + uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; + + #endif + + uniform sampler2DArray morphTargetsTexture; + uniform ivec2 morphTargetsTextureSize; + + vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { + + int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; + int y = texelIndex / morphTargetsTextureSize.x; + int x = texelIndex - y * morphTargetsTextureSize.x; + + ivec3 morphUV = ivec3( x, y, morphTargetIndex ); + return texelFetch( morphTargetsTexture, morphUV, 0 ); + + } + +#endif +`,jm=` +#ifdef USE_MORPHTARGETS + + // morphTargetBaseInfluence is set based on BufferGeometry.morphTargetsRelative value: + // When morphTargetsRelative is false, this is set to 1 - sum(influences); this results in position = sum((target - base) * influence) + // When morphTargetsRelative is true, this is set to 1; as a result, all morph targets are simply added to the base after weighting + transformed *= morphTargetBaseInfluence; + + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + + if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; + + } + +#endif +`,Km=` +float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; + +#ifdef FLAT_SHADED + + vec3 fdx = dFdx( vViewPosition ); + vec3 fdy = dFdy( vViewPosition ); + vec3 normal = normalize( cross( fdx, fdy ) ); + +#else + + vec3 normal = normalize( vNormal ); + + #ifdef DOUBLE_SIDED + + normal *= faceDirection; + + #endif + +#endif + +#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) + + #ifdef USE_TANGENT + + mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); + + #else + + mat3 tbn = getTangentFrame( - vViewPosition, normal, + #if defined( USE_NORMALMAP ) + vNormalMapUv + #elif defined( USE_CLEARCOAT_NORMALMAP ) + vClearcoatNormalMapUv + #else + vUv + #endif + ); + + #endif + + #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) + + tbn[0] *= faceDirection; + tbn[1] *= faceDirection; + + #endif + +#endif + +#ifdef USE_CLEARCOAT_NORMALMAP + + #ifdef USE_TANGENT + + mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); + + #else + + mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); + + #endif + + #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) + + tbn2[0] *= faceDirection; + tbn2[1] *= faceDirection; + + #endif + +#endif + +// non perturbed normal for clearcoat among others + +vec3 nonPerturbedNormal = normal; + +`,Jm=` + +#ifdef USE_NORMALMAP_OBJECTSPACE + + normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; // overrides both flatShading and attribute normals + + #ifdef FLIP_SIDED + + normal = - normal; + + #endif + + #ifdef DOUBLE_SIDED + + normal = normal * faceDirection; + + #endif + + normal = normalize( normalMatrix * normal ); + +#elif defined( USE_NORMALMAP_TANGENTSPACE ) + + vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; + mapN.xy *= normalScale; + + normal = normalize( tbn * mapN ); + +#elif defined( USE_BUMPMAP ) + + normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); + +#endif +`,Zm=` +#ifndef FLAT_SHADED + + varying vec3 vNormal; + + #ifdef USE_TANGENT + + varying vec3 vTangent; + varying vec3 vBitangent; + + #endif + +#endif +`,Qm=` +#ifndef FLAT_SHADED + + varying vec3 vNormal; + + #ifdef USE_TANGENT + + varying vec3 vTangent; + varying vec3 vBitangent; + + #endif + +#endif +`,e0=` +#ifndef FLAT_SHADED // normal is computed with derivatives when FLAT_SHADED + + vNormal = normalize( transformedNormal ); + + #ifdef USE_TANGENT + + vTangent = normalize( transformedTangent ); + vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); + + #endif + +#endif +`,t0=` +#ifdef USE_NORMALMAP + + uniform sampler2D normalMap; + uniform vec2 normalScale; + +#endif + +#ifdef USE_NORMALMAP_OBJECTSPACE + + uniform mat3 normalMatrix; + +#endif + +#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) + + // Normal Mapping Without Precomputed Tangents + // http://www.thetenthplanet.de/archives/1180 + + mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { + + vec3 q0 = dFdx( eye_pos.xyz ); + vec3 q1 = dFdy( eye_pos.xyz ); + vec2 st0 = dFdx( uv.st ); + vec2 st1 = dFdy( uv.st ); + + vec3 N = surf_norm; // normalized + + vec3 q1perp = cross( q1, N ); + vec3 q0perp = cross( N, q0 ); + + vec3 T = q1perp * st0.x + q0perp * st1.x; + vec3 B = q1perp * st0.y + q0perp * st1.y; + + float det = max( dot( T, T ), dot( B, B ) ); + float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); + + return mat3( T * scale, B * scale, N ); + + } + +#endif +`,i0=` +#ifdef USE_CLEARCOAT + + vec3 clearcoatNormal = nonPerturbedNormal; + +#endif +`,n0=` +#ifdef USE_CLEARCOAT_NORMALMAP + + vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; + clearcoatMapN.xy *= clearcoatNormalScale; + + clearcoatNormal = normalize( tbn2 * clearcoatMapN ); + +#endif +`,s0=` + +#ifdef USE_CLEARCOATMAP + + uniform sampler2D clearcoatMap; + +#endif + +#ifdef USE_CLEARCOAT_NORMALMAP + + uniform sampler2D clearcoatNormalMap; + uniform vec2 clearcoatNormalScale; + +#endif + +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + + uniform sampler2D clearcoatRoughnessMap; + +#endif +`,r0=` + +#ifdef USE_IRIDESCENCEMAP + + uniform sampler2D iridescenceMap; + +#endif + +#ifdef USE_IRIDESCENCE_THICKNESSMAP + + uniform sampler2D iridescenceThicknessMap; + +#endif +`,a0=` +#ifdef OPAQUE +diffuseColor.a = 1.0; +#endif + +#ifdef USE_TRANSMISSION +diffuseColor.a *= material.transmissionAlpha; +#endif + +gl_FragColor = vec4( outgoingLight, diffuseColor.a ); +`,o0=` +vec3 packNormalToRGB( const in vec3 normal ) { + return normalize( normal ) * 0.5 + 0.5; +} + +vec3 unpackRGBToNormal( const in vec3 rgb ) { + return 2.0 * rgb.xyz - 1.0; +} + +const float PackUpscale = 256. / 255.; // fraction -> 0..1 (including 1) +const float UnpackDownscale = 255. / 256.; // 0..1 -> fraction (excluding 1) + +const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); +const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); + +const float ShiftRight8 = 1. / 256.; + +vec4 packDepthToRGBA( const in float v ) { + vec4 r = vec4( fract( v * PackFactors ), v ); + r.yzw -= r.xyz * ShiftRight8; // tidy overflow + return r * PackUpscale; +} + +float unpackRGBAToDepth( const in vec4 v ) { + return dot( v, UnpackFactors ); +} + +vec2 packDepthToRG( in highp float v ) { + return packDepthToRGBA( v ).yx; +} + +float unpackRGToDepth( const in highp vec2 v ) { + return unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) ); +} + +vec4 pack2HalfToRGBA( vec2 v ) { + vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); + return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); +} + +vec2 unpackRGBATo2Half( vec4 v ) { + return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); +} + +// NOTE: viewZ, the z-coordinate in camera space, is negative for points in front of the camera + +float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { + // -near maps to 0; -far maps to 1 + return ( viewZ + near ) / ( near - far ); +} + +float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { + // maps orthographic depth in [ 0, 1 ] to viewZ + return depth * ( near - far ) - near; +} + +// NOTE: https://twitter.com/gonnavis/status/1377183786949959682 + +float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { + // -near maps to 0; -far maps to 1 + return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); +} + +float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { + // maps perspective depth in [ 0, 1 ] to viewZ + return ( near * far ) / ( ( far - near ) * depth - far ); +} +`,l0=` +#ifdef PREMULTIPLIED_ALPHA + + // Get get normal blending with premultipled, use with CustomBlending, OneFactor, OneMinusSrcAlphaFactor, AddEquation. + gl_FragColor.rgb *= gl_FragColor.a; + +#endif +`,c0=` +vec4 mvPosition = vec4( transformed, 1.0 ); + +#ifdef USE_BATCHING + + mvPosition = batchingMatrix * mvPosition; + +#endif + +#ifdef USE_INSTANCING + + mvPosition = instanceMatrix * mvPosition; + +#endif + +mvPosition = modelViewMatrix * mvPosition; + +gl_Position = projectionMatrix * mvPosition; +`,h0=` +#ifdef DITHERING + + gl_FragColor.rgb = dithering( gl_FragColor.rgb ); + +#endif +`,u0=` +#ifdef DITHERING + + // based on https://www.shadertoy.com/view/MslGR8 + vec3 dithering( vec3 color ) { + //Calculate grid position + float grid_position = rand( gl_FragCoord.xy ); + + //Shift the individual colors differently, thus making it even harder to see the dithering pattern + vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); + + //modify shift according to grid position. + dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); + + //shift the color by dither_shift + return color + dither_shift_RGB; + } + +#endif +`,d0=` +float roughnessFactor = roughness; + +#ifdef USE_ROUGHNESSMAP + + vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); + + // reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture + roughnessFactor *= texelRoughness.g; + +#endif +`,f0=` +#ifdef USE_ROUGHNESSMAP + + uniform sampler2D roughnessMap; + +#endif +`,p0=` +#if NUM_SPOT_LIGHT_COORDS > 0 + + varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; + +#endif + +#if NUM_SPOT_LIGHT_MAPS > 0 + + uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; + +#endif + +#ifdef USE_SHADOWMAP + + #if NUM_DIR_LIGHT_SHADOWS > 0 + + uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + + struct DirectionalLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + + #endif + + #if NUM_SPOT_LIGHT_SHADOWS > 0 + + uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; + + struct SpotLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + + #endif + + #if NUM_POINT_LIGHT_SHADOWS > 0 + + uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + + struct PointLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + + #endif + + /* + #if NUM_RECT_AREA_LIGHTS > 0 + + // TODO (abelnation): create uniforms for area light shadows + + #endif + */ + + float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { + + return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); + + } + + vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { + + return unpackRGBATo2Half( texture2D( shadow, uv ) ); + + } + + float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ + + float occlusion = 1.0; + + vec2 distribution = texture2DDistribution( shadow, uv ); + + float hard_shadow = step( compare , distribution.x ); // Hard Shadow + + if (hard_shadow != 1.0 ) { + + float distance = compare - distribution.x ; + float variance = max( 0.00000, distribution.y * distribution.y ); + float softness_probability = variance / (variance + distance * distance ); // Chebeyshevs inequality + softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); // 0.3 reduces light bleed + occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); + + } + return occlusion; + + } + + float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { + + float shadow = 1.0; + + shadowCoord.xyz /= shadowCoord.w; + shadowCoord.z += shadowBias; + + bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; + bool frustumTest = inFrustum && shadowCoord.z <= 1.0; + + if ( frustumTest ) { + + #if defined( SHADOWMAP_TYPE_PCF ) + + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + + float dx0 = - texelSize.x * shadowRadius; + float dy0 = - texelSize.y * shadowRadius; + float dx1 = + texelSize.x * shadowRadius; + float dy1 = + texelSize.y * shadowRadius; + float dx2 = dx0 / 2.0; + float dy2 = dy0 / 2.0; + float dx3 = dx1 / 2.0; + float dy3 = dy1 / 2.0; + + shadow = ( + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) + ) * ( 1.0 / 17.0 ); + + #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) + + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx = texelSize.x; + float dy = texelSize.y; + + vec2 uv = shadowCoord.xy; + vec2 f = fract( uv * shadowMapSize + 0.5 ); + uv -= f * texelSize; + + shadow = ( + texture2DCompare( shadowMap, uv, shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), + f.x ), + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), + f.x ), + f.y ) + ) * ( 1.0 / 9.0 ); + + #elif defined( SHADOWMAP_TYPE_VSM ) + + shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); + + #else // no percentage-closer filtering: + + shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); + + #endif + + } + + return mix( 1.0, shadow, shadowIntensity ); + + } + + // cubeToUV() maps a 3D direction vector suitable for cube texture mapping to a 2D + // vector suitable for 2D texture mapping. This code uses the following layout for the + // 2D texture: + // + // xzXZ + // y Y + // + // Y - Positive y direction + // y - Negative y direction + // X - Positive x direction + // x - Negative x direction + // Z - Positive z direction + // z - Negative z direction + // + // Source and test bed: + // https://gist.github.com/tschw/da10c43c467ce8afd0c4 + + vec2 cubeToUV( vec3 v, float texelSizeY ) { + + // Number of texels to avoid at the edge of each square + + vec3 absV = abs( v ); + + // Intersect unit cube + + float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); + absV *= scaleToCube; + + // Apply scale to avoid seams + + // two texels less per square (one texel will do for NEAREST) + v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); + + // Unwrap + + // space: -1 ... 1 range for each square + // + // #X## dim := ( 4 , 2 ) + // # # center := ( 1 , 1 ) + + vec2 planar = v.xy; + + float almostATexel = 1.5 * texelSizeY; + float almostOne = 1.0 - almostATexel; + + if ( absV.z >= almostOne ) { + + if ( v.z > 0.0 ) + planar.x = 4.0 - v.x; + + } else if ( absV.x >= almostOne ) { + + float signX = sign( v.x ); + planar.x = v.z * signX + 2.0 * signX; + + } else if ( absV.y >= almostOne ) { + + float signY = sign( v.y ); + planar.x = v.x + 2.0 * signY + 2.0; + planar.y = v.z * signY - 2.0; + + } + + // Transform to UV space + + // scale := 0.5 / dim + // translate := ( center + 0.5 ) / dim + return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); + + } + + float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { + + float shadow = 1.0; + + // for point lights, the uniform @vShadowCoord is re-purposed to hold + // the vector from the light to the world-space position of the fragment. + vec3 lightToPosition = shadowCoord.xyz; + + float lightToPositionLength = length( lightToPosition ); + + if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) { + + // dp = normalized distance from light to fragment position + float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); // need to clamp? + dp += shadowBias; + + // bd3D = base direction 3D + vec3 bd3D = normalize( lightToPosition ); + + vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); + + #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) + + vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; + + shadow = ( + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) + ) * ( 1.0 / 9.0 ); + + #else // no percentage-closer filtering + + shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); + + #endif + + } + + return mix( 1.0, shadow, shadowIntensity ); + + } + +#endif +`,m0=` + +#if NUM_SPOT_LIGHT_COORDS > 0 + + uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; + varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; + +#endif + +#ifdef USE_SHADOWMAP + + #if NUM_DIR_LIGHT_SHADOWS > 0 + + uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + + struct DirectionalLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + + #endif + + #if NUM_SPOT_LIGHT_SHADOWS > 0 + + struct SpotLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + + #endif + + #if NUM_POINT_LIGHT_SHADOWS > 0 + + uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + + struct PointLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + + #endif + + /* + #if NUM_RECT_AREA_LIGHTS > 0 + + // TODO (abelnation): uniforms for area light shadows + + #endif + */ + +#endif +`,g0=` + +#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) + + // Offsetting the position used for querying occlusion along the world normal can be used to reduce shadow acne. + vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + vec4 shadowWorldPosition; + +#endif + +#if defined( USE_SHADOWMAP ) + + #if NUM_DIR_LIGHT_SHADOWS > 0 + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); + vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; + + } + #pragma unroll_loop_end + + #endif + + #if NUM_POINT_LIGHT_SHADOWS > 0 + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); + vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; + + } + #pragma unroll_loop_end + + #endif + + /* + #if NUM_RECT_AREA_LIGHTS > 0 + + // TODO (abelnation): update vAreaShadowCoord with area light info + + #endif + */ + +#endif + +// spot lights can be evaluated without active shadow mapping (when SpotLight.map is used) + +#if NUM_SPOT_LIGHT_COORDS > 0 + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { + + shadowWorldPosition = worldPosition; + #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; + #endif + vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; + + } + #pragma unroll_loop_end + +#endif + + +`,_0=` +float getShadowMask() { + + float shadow = 1.0; + + #ifdef USE_SHADOWMAP + + #if NUM_DIR_LIGHT_SHADOWS > 0 + + DirectionalLightShadow directionalLight; + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + + directionalLight = directionalLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + + } + #pragma unroll_loop_end + + #endif + + #if NUM_SPOT_LIGHT_SHADOWS > 0 + + SpotLightShadow spotLight; + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { + + spotLight = spotLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; + + } + #pragma unroll_loop_end + + #endif + + #if NUM_POINT_LIGHT_SHADOWS > 0 + + PointLightShadow pointLight; + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + + pointLight = pointLightShadows[ i ]; + shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; + + } + #pragma unroll_loop_end + + #endif + + /* + #if NUM_RECT_AREA_LIGHTS > 0 + + // TODO (abelnation): update shadow for Area light + + #endif + */ + + #endif + + return shadow; + +} +`,x0=` +#ifdef USE_SKINNING + + mat4 boneMatX = getBoneMatrix( skinIndex.x ); + mat4 boneMatY = getBoneMatrix( skinIndex.y ); + mat4 boneMatZ = getBoneMatrix( skinIndex.z ); + mat4 boneMatW = getBoneMatrix( skinIndex.w ); + +#endif +`,y0=` +#ifdef USE_SKINNING + + uniform mat4 bindMatrix; + uniform mat4 bindMatrixInverse; + + uniform highp sampler2D boneTexture; + + mat4 getBoneMatrix( const in float i ) { + + int size = textureSize( boneTexture, 0 ).x; + int j = int( i ) * 4; + int x = j % size; + int y = j / size; + vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); + vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); + vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); + vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); + + return mat4( v1, v2, v3, v4 ); + + } + +#endif +`,M0=` +#ifdef USE_SKINNING + + vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); + + vec4 skinned = vec4( 0.0 ); + skinned += boneMatX * skinVertex * skinWeight.x; + skinned += boneMatY * skinVertex * skinWeight.y; + skinned += boneMatZ * skinVertex * skinWeight.z; + skinned += boneMatW * skinVertex * skinWeight.w; + + transformed = ( bindMatrixInverse * skinned ).xyz; + +#endif +`,v0=` +#ifdef USE_SKINNING + + mat4 skinMatrix = mat4( 0.0 ); + skinMatrix += skinWeight.x * boneMatX; + skinMatrix += skinWeight.y * boneMatY; + skinMatrix += skinWeight.z * boneMatZ; + skinMatrix += skinWeight.w * boneMatW; + skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; + + objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; + + #ifdef USE_TANGENT + + objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; + + #endif + +#endif +`,S0=` +float specularStrength; + +#ifdef USE_SPECULARMAP + + vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); + specularStrength = texelSpecular.r; + +#else + + specularStrength = 1.0; + +#endif +`,w0=` +#ifdef USE_SPECULARMAP + + uniform sampler2D specularMap; + +#endif +`,b0=` +#if defined( TONE_MAPPING ) + + gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); + +#endif +`,E0=` +#ifndef saturate +// may have defined saturate() already +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif + +uniform float toneMappingExposure; + +// exposure only +vec3 LinearToneMapping( vec3 color ) { + + return saturate( toneMappingExposure * color ); + +} + +// source: https://www.cs.utah.edu/docs/techreports/2002/pdf/UUCS-02-001.pdf +vec3 ReinhardToneMapping( vec3 color ) { + + color *= toneMappingExposure; + return saturate( color / ( vec3( 1.0 ) + color ) ); + +} + +// source: http://filmicworlds.com/blog/filmic-tonemapping-operators/ +vec3 OptimizedCineonToneMapping( vec3 color ) { + + // optimized filmic operator by Jim Hejl and Richard Burgess-Dawson + color *= toneMappingExposure; + color = max( vec3( 0.0 ), color - 0.004 ); + return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); + +} + +// source: https://github.com/selfshadow/ltc_code/blob/master/webgl/shaders/ltc/ltc_blit.fs +vec3 RRTAndODTFit( vec3 v ) { + + vec3 a = v * ( v + 0.0245786 ) - 0.000090537; + vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; + return a / b; + +} + +// this implementation of ACES is modified to accommodate a brighter viewing environment. +// the scale factor of 1/0.6 is subjective. see discussion in #19621. + +vec3 ACESFilmicToneMapping( vec3 color ) { + + // sRGB => XYZ => D65_2_D60 => AP1 => RRT_SAT + const mat3 ACESInputMat = mat3( + vec3( 0.59719, 0.07600, 0.02840 ), // transposed from source + vec3( 0.35458, 0.90834, 0.13383 ), + vec3( 0.04823, 0.01566, 0.83777 ) + ); + + // ODT_SAT => XYZ => D60_2_D65 => sRGB + const mat3 ACESOutputMat = mat3( + vec3( 1.60475, -0.10208, -0.00327 ), // transposed from source + vec3( -0.53108, 1.10813, -0.07276 ), + vec3( -0.07367, -0.00605, 1.07602 ) + ); + + color *= toneMappingExposure / 0.6; + + color = ACESInputMat * color; + + // Apply RRT and ODT + color = RRTAndODTFit( color ); + + color = ACESOutputMat * color; + + // Clamp to [0, 1] + return saturate( color ); + +} + +// Matrices for rec 2020 <> rec 709 color space conversion +// matrix provided in row-major order so it has been transposed +// https://www.itu.int/pub/R-REP-BT.2407-2017 +const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( + vec3( 1.6605, - 0.1246, - 0.0182 ), + vec3( - 0.5876, 1.1329, - 0.1006 ), + vec3( - 0.0728, - 0.0083, 1.1187 ) +); + +const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( + vec3( 0.6274, 0.0691, 0.0164 ), + vec3( 0.3293, 0.9195, 0.0880 ), + vec3( 0.0433, 0.0113, 0.8956 ) +); + +// https://iolite-engine.com/blog_posts/minimal_agx_implementation +// Mean error^2: 3.6705141e-06 +vec3 agxDefaultContrastApprox( vec3 x ) { + + vec3 x2 = x * x; + vec3 x4 = x2 * x2; + + return + 15.5 * x4 * x2 + - 40.14 * x4 * x + + 31.96 * x4 + - 6.868 * x2 * x + + 0.4298 * x2 + + 0.1191 * x + - 0.00232; + +} + +// AgX Tone Mapping implementation based on Filament, which in turn is based +// on Blender's implementation using rec 2020 primaries +// https://github.com/google/filament/pull/7236 +// Inputs and outputs are encoded as Linear-sRGB. + +vec3 AgXToneMapping( vec3 color ) { + + // AgX constants + const mat3 AgXInsetMatrix = mat3( + vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), + vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), + vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) + ); + + // explicit AgXOutsetMatrix generated from Filaments AgXOutsetMatrixInv + const mat3 AgXOutsetMatrix = mat3( + vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), + vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), + vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) + ); + + // LOG2_MIN = -10.0 + // LOG2_MAX = +6.5 + // MIDDLE_GRAY = 0.18 + const float AgxMinEv = - 12.47393; // log2( pow( 2, LOG2_MIN ) * MIDDLE_GRAY ) + const float AgxMaxEv = 4.026069; // log2( pow( 2, LOG2_MAX ) * MIDDLE_GRAY ) + + color *= toneMappingExposure; + + color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; + + color = AgXInsetMatrix * color; + + // Log2 encoding + color = max( color, 1e-10 ); // avoid 0 or negative numbers for log2 + color = log2( color ); + color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); + + color = clamp( color, 0.0, 1.0 ); + + // Apply sigmoid + color = agxDefaultContrastApprox( color ); + + // Apply AgX look + // v = agxLook(v, look); + + color = AgXOutsetMatrix * color; + + // Linearize + color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); + + color = LINEAR_REC2020_TO_LINEAR_SRGB * color; + + // Gamut mapping. Simple clamp for now. + color = clamp( color, 0.0, 1.0 ); + + return color; + +} + +// https://modelviewer.dev/examples/tone-mapping + +vec3 NeutralToneMapping( vec3 color ) { + + const float StartCompression = 0.8 - 0.04; + const float Desaturation = 0.15; + + color *= toneMappingExposure; + + float x = min( color.r, min( color.g, color.b ) ); + + float offset = x < 0.08 ? x - 6.25 * x * x : 0.04; + + color -= offset; + + float peak = max( color.r, max( color.g, color.b ) ); + + if ( peak < StartCompression ) return color; + + float d = 1. - StartCompression; + + float newPeak = 1. - d * d / ( peak + d - StartCompression ); + + color *= newPeak / peak; + + float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. ); + + return mix( color, vec3( newPeak ), g ); + +} + +vec3 CustomToneMapping( vec3 color ) { return color; } +`,A0=` +#ifdef USE_TRANSMISSION + + material.transmission = transmission; + material.transmissionAlpha = 1.0; + material.thickness = thickness; + material.attenuationDistance = attenuationDistance; + material.attenuationColor = attenuationColor; + + #ifdef USE_TRANSMISSIONMAP + + material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; + + #endif + + #ifdef USE_THICKNESSMAP + + material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; + + #endif + + vec3 pos = vWorldPosition; + vec3 v = normalize( cameraPosition - pos ); + vec3 n = inverseTransformDirection( normal, viewMatrix ); + + vec4 transmitted = getIBLVolumeRefraction( + n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, + pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness, + material.attenuationColor, material.attenuationDistance ); + + material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); + + totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); + +#endif +`,T0=` +#ifdef USE_TRANSMISSION + + // Transmission code is based on glTF-Sampler-Viewer + // https://github.com/KhronosGroup/glTF-Sample-Viewer + + uniform float transmission; + uniform float thickness; + uniform float attenuationDistance; + uniform vec3 attenuationColor; + + #ifdef USE_TRANSMISSIONMAP + + uniform sampler2D transmissionMap; + + #endif + + #ifdef USE_THICKNESSMAP + + uniform sampler2D thicknessMap; + + #endif + + uniform vec2 transmissionSamplerSize; + uniform sampler2D transmissionSamplerMap; + + uniform mat4 modelMatrix; + uniform mat4 projectionMatrix; + + varying vec3 vWorldPosition; + + // Mipped Bicubic Texture Filtering by N8 + // https://www.shadertoy.com/view/Dl2SDW + + float w0( float a ) { + + return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); + + } + + float w1( float a ) { + + return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); + + } + + float w2( float a ){ + + return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); + + } + + float w3( float a ) { + + return ( 1.0 / 6.0 ) * ( a * a * a ); + + } + + // g0 and g1 are the two amplitude functions + float g0( float a ) { + + return w0( a ) + w1( a ); + + } + + float g1( float a ) { + + return w2( a ) + w3( a ); + + } + + // h0 and h1 are the two offset functions + float h0( float a ) { + + return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); + + } + + float h1( float a ) { + + return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); + + } + + vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { + + uv = uv * texelSize.zw + 0.5; + + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + + float g0x = g0( fuv.x ); + float g1x = g1( fuv.x ); + float h0x = h0( fuv.x ); + float h1x = h1( fuv.x ); + float h0y = h0( fuv.y ); + float h1y = h1( fuv.y ); + + vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; + vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; + vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; + vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; + + return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + + g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); + + } + + vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { + + vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); + vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); + vec2 fLodSizeInv = 1.0 / fLodSize; + vec2 cLodSizeInv = 1.0 / cLodSize; + vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); + vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); + return mix( fSample, cSample, fract( lod ) ); + + } + + vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { + + // Direction of refracted light. + vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); + + // Compute rotation-independant scaling of the model matrix. + vec3 modelScale; + modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); + modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); + modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); + + // The thickness is specified in local space. + return normalize( refractionVector ) * thickness * modelScale; + + } + + float applyIorToRoughness( const in float roughness, const in float ior ) { + + // Scale roughness with IOR so that an IOR of 1.0 results in no microfacet refraction and + // an IOR of 1.5 results in the default amount of microfacet refraction. + return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); + + } + + vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { + + float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); + return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); + + } + + vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { + + if ( isinf( attenuationDistance ) ) { + + // Attenuation distance is +∞, i.e. the transmitted color is not attenuated at all. + return vec3( 1.0 ); + + } else { + + // Compute light attenuation using Beer's law. + vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; + vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); // Beer's law + return transmittance; + + } + + } + + vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, + const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, + const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness, + const in vec3 attenuationColor, const in float attenuationDistance ) { + + vec4 transmittedLight; + vec3 transmittance; + + #ifdef USE_DISPERSION + + float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion; + vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread ); + + for ( int i = 0; i < 3; i ++ ) { + + vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix ); + vec3 refractedRayExit = position + transmissionRay; + + // Project refracted vector on the framebuffer, while mapping to normalized device coordinates. + vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); + vec2 refractionCoords = ndcPos.xy / ndcPos.w; + refractionCoords += 1.0; + refractionCoords /= 2.0; + + // Sample framebuffer to get pixel the refracted ray hits. + vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] ); + transmittedLight[ i ] = transmissionSample[ i ]; + transmittedLight.a += transmissionSample.a; + + transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ]; + + } + + transmittedLight.a /= 3.0; + + #else + + vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); + vec3 refractedRayExit = position + transmissionRay; + + // Project refracted vector on the framebuffer, while mapping to normalized device coordinates. + vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); + vec2 refractionCoords = ndcPos.xy / ndcPos.w; + refractionCoords += 1.0; + refractionCoords /= 2.0; + + // Sample framebuffer to get pixel the refracted ray hits. + transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); + transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); + + #endif + + vec3 attenuatedColor = transmittance * transmittedLight.rgb; + + // Get the specular component. + vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); + + // As less light is transmitted, the opacity should be increased. This simple approximation does a decent job + // of modulating a CSS background, and has no effect when the buffer is opaque, due to a solid object or clear color. + float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; + + return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); + + } +#endif +`,R0=` +#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + + varying vec2 vUv; + +#endif +#ifdef USE_MAP + + varying vec2 vMapUv; + +#endif +#ifdef USE_ALPHAMAP + + varying vec2 vAlphaMapUv; + +#endif +#ifdef USE_LIGHTMAP + + varying vec2 vLightMapUv; + +#endif +#ifdef USE_AOMAP + + varying vec2 vAoMapUv; + +#endif +#ifdef USE_BUMPMAP + + varying vec2 vBumpMapUv; + +#endif +#ifdef USE_NORMALMAP + + varying vec2 vNormalMapUv; + +#endif +#ifdef USE_EMISSIVEMAP + + varying vec2 vEmissiveMapUv; + +#endif +#ifdef USE_METALNESSMAP + + varying vec2 vMetalnessMapUv; + +#endif +#ifdef USE_ROUGHNESSMAP + + varying vec2 vRoughnessMapUv; + +#endif +#ifdef USE_ANISOTROPYMAP + + varying vec2 vAnisotropyMapUv; + +#endif +#ifdef USE_CLEARCOATMAP + + varying vec2 vClearcoatMapUv; + +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + + varying vec2 vClearcoatNormalMapUv; + +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + + varying vec2 vClearcoatRoughnessMapUv; + +#endif +#ifdef USE_IRIDESCENCEMAP + + varying vec2 vIridescenceMapUv; + +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + + varying vec2 vIridescenceThicknessMapUv; + +#endif +#ifdef USE_SHEEN_COLORMAP + + varying vec2 vSheenColorMapUv; + +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + + varying vec2 vSheenRoughnessMapUv; + +#endif +#ifdef USE_SPECULARMAP + + varying vec2 vSpecularMapUv; + +#endif +#ifdef USE_SPECULAR_COLORMAP + + varying vec2 vSpecularColorMapUv; + +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + + varying vec2 vSpecularIntensityMapUv; + +#endif +#ifdef USE_TRANSMISSIONMAP + + uniform mat3 transmissionMapTransform; + varying vec2 vTransmissionMapUv; + +#endif +#ifdef USE_THICKNESSMAP + + uniform mat3 thicknessMapTransform; + varying vec2 vThicknessMapUv; + +#endif +`,C0=` +#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + + varying vec2 vUv; + +#endif +#ifdef USE_MAP + + uniform mat3 mapTransform; + varying vec2 vMapUv; + +#endif +#ifdef USE_ALPHAMAP + + uniform mat3 alphaMapTransform; + varying vec2 vAlphaMapUv; + +#endif +#ifdef USE_LIGHTMAP + + uniform mat3 lightMapTransform; + varying vec2 vLightMapUv; + +#endif +#ifdef USE_AOMAP + + uniform mat3 aoMapTransform; + varying vec2 vAoMapUv; + +#endif +#ifdef USE_BUMPMAP + + uniform mat3 bumpMapTransform; + varying vec2 vBumpMapUv; + +#endif +#ifdef USE_NORMALMAP + + uniform mat3 normalMapTransform; + varying vec2 vNormalMapUv; + +#endif +#ifdef USE_DISPLACEMENTMAP + + uniform mat3 displacementMapTransform; + varying vec2 vDisplacementMapUv; + +#endif +#ifdef USE_EMISSIVEMAP + + uniform mat3 emissiveMapTransform; + varying vec2 vEmissiveMapUv; + +#endif +#ifdef USE_METALNESSMAP + + uniform mat3 metalnessMapTransform; + varying vec2 vMetalnessMapUv; + +#endif +#ifdef USE_ROUGHNESSMAP + + uniform mat3 roughnessMapTransform; + varying vec2 vRoughnessMapUv; + +#endif +#ifdef USE_ANISOTROPYMAP + + uniform mat3 anisotropyMapTransform; + varying vec2 vAnisotropyMapUv; + +#endif +#ifdef USE_CLEARCOATMAP + + uniform mat3 clearcoatMapTransform; + varying vec2 vClearcoatMapUv; + +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + + uniform mat3 clearcoatNormalMapTransform; + varying vec2 vClearcoatNormalMapUv; + +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + + uniform mat3 clearcoatRoughnessMapTransform; + varying vec2 vClearcoatRoughnessMapUv; + +#endif +#ifdef USE_SHEEN_COLORMAP + + uniform mat3 sheenColorMapTransform; + varying vec2 vSheenColorMapUv; + +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + + uniform mat3 sheenRoughnessMapTransform; + varying vec2 vSheenRoughnessMapUv; + +#endif +#ifdef USE_IRIDESCENCEMAP + + uniform mat3 iridescenceMapTransform; + varying vec2 vIridescenceMapUv; + +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + + uniform mat3 iridescenceThicknessMapTransform; + varying vec2 vIridescenceThicknessMapUv; + +#endif +#ifdef USE_SPECULARMAP + + uniform mat3 specularMapTransform; + varying vec2 vSpecularMapUv; + +#endif +#ifdef USE_SPECULAR_COLORMAP + + uniform mat3 specularColorMapTransform; + varying vec2 vSpecularColorMapUv; + +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + + uniform mat3 specularIntensityMapTransform; + varying vec2 vSpecularIntensityMapUv; + +#endif +#ifdef USE_TRANSMISSIONMAP + + uniform mat3 transmissionMapTransform; + varying vec2 vTransmissionMapUv; + +#endif +#ifdef USE_THICKNESSMAP + + uniform mat3 thicknessMapTransform; + varying vec2 vThicknessMapUv; + +#endif +`,P0=` +#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + + vUv = vec3( uv, 1 ).xy; + +#endif +#ifdef USE_MAP + + vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_ALPHAMAP + + vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_LIGHTMAP + + vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_AOMAP + + vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_BUMPMAP + + vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_NORMALMAP + + vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_DISPLACEMENTMAP + + vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_EMISSIVEMAP + + vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_METALNESSMAP + + vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_ROUGHNESSMAP + + vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_ANISOTROPYMAP + + vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_CLEARCOATMAP + + vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + + vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + + vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_IRIDESCENCEMAP + + vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + + vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_SHEEN_COLORMAP + + vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + + vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_SPECULARMAP + + vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_SPECULAR_COLORMAP + + vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + + vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_TRANSMISSIONMAP + + vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_THICKNESSMAP + + vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; + +#endif +`,L0=` +#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; + + #endif + + #ifdef USE_INSTANCING + + worldPosition = instanceMatrix * worldPosition; + + #endif + + worldPosition = modelMatrix * worldPosition; + +#endif +`,I0=` +varying vec2 vUv; +uniform mat3 uvTransform; + +void main() { + + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + + gl_Position = vec4( position.xy, 1.0, 1.0 ); + +} +`,D0=` +uniform sampler2D t2D; +uniform float backgroundIntensity; + +varying vec2 vUv; + +void main() { + + vec4 texColor = texture2D( t2D, vUv ); + + #ifdef DECODE_VIDEO_TEXTURE + + // use inline sRGB decode until browsers properly support SRGB8_APLHA8 with video textures + + texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w ); + + #endif + + texColor.rgb *= backgroundIntensity; + + gl_FragColor = texColor; + + #include + #include + +} +`,N0=` +varying vec3 vWorldDirection; + +#include + +void main() { + + vWorldDirection = transformDirection( position, modelMatrix ); + + #include + #include + + gl_Position.z = gl_Position.w; // set z to camera.far + +} +`,U0=` + +#ifdef ENVMAP_TYPE_CUBE + + uniform samplerCube envMap; + +#elif defined( ENVMAP_TYPE_CUBE_UV ) + + uniform sampler2D envMap; + +#endif + +uniform float flipEnvMap; +uniform float backgroundBlurriness; +uniform float backgroundIntensity; +uniform mat3 backgroundRotation; + +varying vec3 vWorldDirection; + +#include + +void main() { + + #ifdef ENVMAP_TYPE_CUBE + + vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); + + #elif defined( ENVMAP_TYPE_CUBE_UV ) + + vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness ); + + #else + + vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + + #endif + + texColor.rgb *= backgroundIntensity; + + gl_FragColor = texColor; + + #include + #include + +} +`,F0=` +varying vec3 vWorldDirection; + +#include + +void main() { + + vWorldDirection = transformDirection( position, modelMatrix ); + + #include + #include + + gl_Position.z = gl_Position.w; // set z to camera.far + +} +`,O0=` +uniform samplerCube tCube; +uniform float tFlip; +uniform float opacity; + +varying vec3 vWorldDirection; + +void main() { + + vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); + + gl_FragColor = texColor; + gl_FragColor.a *= opacity; + + #include + #include + +} +`,B0=` +#include +#include +#include +#include +#include +#include +#include +#include + +// This is used for computing an equivalent of gl_FragCoord.z that is as high precision as possible. +// Some platforms compute gl_FragCoord at a lower precision which makes the manually computed value better for +// depth-based postprocessing effects. Reproduced on iPad with A10 processor / iPadOS 13.3.1. +varying vec2 vHighPrecisionZW; + +void main() { + + #include + + #include + #include + + #include + + #ifdef USE_DISPLACEMENTMAP + + #include + #include + #include + + #endif + + #include + #include + #include + #include + #include + #include + #include + + vHighPrecisionZW = gl_Position.zw; + +} +`,z0=` +#if DEPTH_PACKING == 3200 + + uniform float opacity; + +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +varying vec2 vHighPrecisionZW; + +void main() { + + vec4 diffuseColor = vec4( 1.0 ); + #include + + #if DEPTH_PACKING == 3200 + + diffuseColor.a = opacity; + + #endif + + #include + #include + #include + #include + + #include + + // Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values. + float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; + + #if DEPTH_PACKING == 3200 + + gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); + + #elif DEPTH_PACKING == 3201 + + gl_FragColor = packDepthToRGBA( fragCoordZ ); + + #endif + +} +`,k0=` +#define DISTANCE + +varying vec3 vWorldPosition; + +#include +#include +#include +#include +#include +#include +#include + +void main() { + + #include + + #include + #include + + #include + + #ifdef USE_DISPLACEMENTMAP + + #include + #include + #include + + #endif + + #include + #include + #include + #include + #include + #include + #include + + vWorldPosition = worldPosition.xyz; + +} +`,H0=` +#define DISTANCE + +uniform vec3 referencePosition; +uniform float nearDistance; +uniform float farDistance; +varying vec3 vWorldPosition; + +#include +#include +#include +#include +#include +#include +#include +#include + +void main () { + + vec4 diffuseColor = vec4( 1.0 ); + #include + + #include + #include + #include + #include + + float dist = length( vWorldPosition - referencePosition ); + dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); + dist = saturate( dist ); // clamp to [ 0, 1 ] + + gl_FragColor = packDepthToRGBA( dist ); + +} +`,V0=` +varying vec3 vWorldDirection; + +#include + +void main() { + + vWorldDirection = transformDirection( position, modelMatrix ); + + #include + #include + +} +`,G0=` +uniform sampler2D tEquirect; + +varying vec3 vWorldDirection; + +#include + +void main() { + + vec3 direction = normalize( vWorldDirection ); + + vec2 sampleUV = equirectUv( direction ); + + gl_FragColor = texture2D( tEquirect, sampleUV ); + + #include + #include + +} +`,W0=` +uniform float scale; +attribute float lineDistance; + +varying float vLineDistance; + +#include +#include +#include +#include +#include +#include +#include + +void main() { + + vLineDistance = scale * lineDistance; + + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + +} +`,X0=` +uniform vec3 diffuse; +uniform float opacity; + +uniform float dashSize; +uniform float totalSize; + +varying float vLineDistance; + +#include +#include +#include +#include +#include +#include +#include + +void main() { + + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + + if ( mod( vLineDistance, totalSize ) > dashSize ) { + + discard; + + } + + vec3 outgoingLight = vec3( 0.0 ); + + #include + #include + #include + + outgoingLight = diffuseColor.rgb; // simple shader + + #include + #include + #include + #include + #include + +} +`,q0=` +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + #include + #include + #include + #include + #include + + #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) + + #include + #include + #include + #include + #include + + #endif + + #include + #include + #include + #include + #include + #include + + #include + #include + #include + +} +`,Y0=` +uniform vec3 diffuse; +uniform float opacity; + +#ifndef FLAT_SHADED + + varying vec3 vNormal; + +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + + #include + #include + #include + #include + #include + #include + #include + + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + + // accumulation (baked indirect lighting only) + #ifdef USE_LIGHTMAP + + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; + + #else + + reflectedLight.indirectDiffuse += vec3( 1.0 ); + + #endif + + // modulation + #include + + reflectedLight.indirectDiffuse *= diffuseColor.rgb; + + vec3 outgoingLight = reflectedLight.indirectDiffuse; + + #include + + #include + #include + #include + #include + #include + #include + +} +`,$0=` +#define LAMBERT + +varying vec3 vViewPosition; + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + #include + #include + + vViewPosition = - mvPosition.xyz; + + #include + #include + #include + #include + +} +`,j0=` +#define LAMBERT + +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + + // accumulation + #include + #include + #include + #include + + // modulation + #include + + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + + #include + #include + #include + #include + #include + #include + #include + +} +`,K0=` +#define MATCAP + +varying vec3 vViewPosition; + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +void main() { + + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + + #include + #include + #include + + vViewPosition = - mvPosition.xyz; + +} +`,J0=` +#define MATCAP + +uniform vec3 diffuse; +uniform float opacity; +uniform sampler2D matcap; + +varying vec3 vViewPosition; + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + + #include + #include + #include + #include + #include + #include + #include + #include + + vec3 viewDir = normalize( vViewPosition ); + vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); + vec3 y = cross( viewDir, x ); + vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; // 0.495 to remove artifacts caused by undersized matcap disks + + #ifdef USE_MATCAP + + vec4 matcapColor = texture2D( matcap, uv ); + + #else + + vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); // default if matcap is missing + + #endif + + vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; + + #include + #include + #include + #include + #include + #include + +} +`,Z0=` +#define NORMAL + +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + + varying vec3 vViewPosition; + +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + #include + #include + + #include + #include + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + #include + #include + +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + + vViewPosition = - mvPosition.xyz; + +#endif + +} +`,Q0=` +#define NORMAL + +uniform float opacity; + +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + + varying vec3 vViewPosition; + +#endif + +#include +#include +#include +#include +#include +#include +#include + +void main() { + + vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); + + #include + #include + #include + #include + + gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a ); + + #ifdef OPAQUE + + gl_FragColor.a = 1.0; + + #endif + +} +`,eg=` +#define PHONG + +varying vec3 vViewPosition; + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + #include + #include + #include + #include + + #include + #include + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + #include + #include + + vViewPosition = - mvPosition.xyz; + + #include + #include + #include + #include + +} +`,tg=` +#define PHONG + +uniform vec3 diffuse; +uniform vec3 emissive; +uniform vec3 specular; +uniform float shininess; +uniform float opacity; + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + + // accumulation + #include + #include + #include + #include + + // modulation + #include + + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; + + #include + #include + #include + #include + #include + #include + #include + +} +`,ig=` +#define STANDARD + +varying vec3 vViewPosition; + +#ifdef USE_TRANSMISSION + + varying vec3 vWorldPosition; + +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + #include + #include + + vViewPosition = - mvPosition.xyz; + + #include + #include + #include + +#ifdef USE_TRANSMISSION + + vWorldPosition = worldPosition.xyz; + +#endif +} +`,ng=` +#define STANDARD + +#ifdef PHYSICAL + #define IOR + #define USE_SPECULAR +#endif + +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float roughness; +uniform float metalness; +uniform float opacity; + +#ifdef IOR + uniform float ior; +#endif + +#ifdef USE_SPECULAR + uniform float specularIntensity; + uniform vec3 specularColor; + + #ifdef USE_SPECULAR_COLORMAP + uniform sampler2D specularColorMap; + #endif + + #ifdef USE_SPECULAR_INTENSITYMAP + uniform sampler2D specularIntensityMap; + #endif +#endif + +#ifdef USE_CLEARCOAT + uniform float clearcoat; + uniform float clearcoatRoughness; +#endif + +#ifdef USE_DISPERSION + uniform float dispersion; +#endif + +#ifdef USE_IRIDESCENCE + uniform float iridescence; + uniform float iridescenceIOR; + uniform float iridescenceThicknessMinimum; + uniform float iridescenceThicknessMaximum; +#endif + +#ifdef USE_SHEEN + uniform vec3 sheenColor; + uniform float sheenRoughness; + + #ifdef USE_SHEEN_COLORMAP + uniform sampler2D sheenColorMap; + #endif + + #ifdef USE_SHEEN_ROUGHNESSMAP + uniform sampler2D sheenRoughnessMap; + #endif +#endif + +#ifdef USE_ANISOTROPY + uniform vec2 anisotropyVector; + + #ifdef USE_ANISOTROPYMAP + uniform sampler2D anisotropyMap; + #endif +#endif + +varying vec3 vViewPosition; + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + + // accumulation + #include + #include + #include + #include + + // modulation + #include + + vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; + vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; + + #include + + vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; + + #ifdef USE_SHEEN + + // Sheen energy compensation approximation calculation can be found at the end of + // https://drive.google.com/file/d/1T0D1VSyR4AllqIJTQAraEIzjlb5h4FKH/view?usp=sharing + float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); + + outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect; + + #endif + + #ifdef USE_CLEARCOAT + + float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); + + vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); + + outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; + + #endif + + #include + #include + #include + #include + #include + #include + +} +`,sg=` +#define TOON + +varying vec3 vViewPosition; + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + #include + #include + + vViewPosition = - mvPosition.xyz; + + #include + #include + #include + +} +`,rg=` +#define TOON + +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + + #include + #include + #include + #include + #include + #include + #include + #include + #include + + // accumulation + #include + #include + #include + #include + + // modulation + #include + + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + + #include + #include + #include + #include + #include + #include + +} +`,ag=` +uniform float size; +uniform float scale; + +#include +#include +#include +#include +#include +#include + +#ifdef USE_POINTS_UV + + varying vec2 vUv; + uniform mat3 uvTransform; + +#endif + +void main() { + + #ifdef USE_POINTS_UV + + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + + #endif + + #include + #include + #include + #include + #include + #include + + gl_PointSize = size; + + #ifdef USE_SIZEATTENUATION + + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + + if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); + + #endif + + #include + #include + #include + #include + +} +`,og=` +uniform vec3 diffuse; +uniform float opacity; + +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + + vec3 outgoingLight = vec3( 0.0 ); + + #include + #include + #include + #include + #include + + outgoingLight = diffuseColor.rgb; + + #include + #include + #include + #include + #include + +} +`,lg=` +#include +#include +#include +#include +#include +#include +#include + +void main() { + + #include + + #include + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + + #include + #include + #include + +} +`,cg=` +uniform vec3 color; +uniform float opacity; + +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + #include + + gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); + + #include + #include + #include + +} +`,hg=` +uniform float rotation; +uniform vec2 center; + +#include +#include +#include +#include +#include + +void main() { + + #include + + vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); + + vec2 scale; + scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); + scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); + + #ifndef USE_SIZEATTENUATION + + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + + if ( isPerspective ) scale *= - mvPosition.z; + + #endif + + vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; + + vec2 rotatedPosition; + rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; + rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; + + mvPosition.xy += rotatedPosition; + + gl_Position = projectionMatrix * mvPosition; + + #include + #include + #include + +} +`,ug=` +uniform vec3 diffuse; +uniform float opacity; + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + + vec3 outgoingLight = vec3( 0.0 ); + + #include + #include + #include + #include + #include + + outgoingLight = diffuseColor.rgb; + + #include + #include + #include + #include + +} +`,Le={alphahash_fragment:Dp,alphahash_pars_fragment:Np,alphamap_fragment:Up,alphamap_pars_fragment:Fp,alphatest_fragment:Op,alphatest_pars_fragment:Bp,aomap_fragment:zp,aomap_pars_fragment:kp,batching_pars_vertex:Hp,batching_vertex:Vp,begin_vertex:Gp,beginnormal_vertex:Wp,bsdfs:Xp,iridescence_fragment:qp,bumpmap_pars_fragment:Yp,clipping_planes_fragment:$p,clipping_planes_pars_fragment:jp,clipping_planes_pars_vertex:Kp,clipping_planes_vertex:Jp,color_fragment:Zp,color_pars_fragment:Qp,color_pars_vertex:em,color_vertex:tm,common:im,cube_uv_reflection_fragment:nm,defaultnormal_vertex:sm,displacementmap_pars_vertex:rm,displacementmap_vertex:am,emissivemap_fragment:om,emissivemap_pars_fragment:lm,colorspace_fragment:cm,colorspace_pars_fragment:hm,envmap_fragment:um,envmap_common_pars_fragment:dm,envmap_pars_fragment:fm,envmap_pars_vertex:pm,envmap_physical_pars_fragment:Em,envmap_vertex:mm,fog_vertex:gm,fog_pars_vertex:_m,fog_fragment:xm,fog_pars_fragment:ym,gradientmap_pars_fragment:Mm,lightmap_pars_fragment:vm,lights_lambert_fragment:Sm,lights_lambert_pars_fragment:wm,lights_pars_begin:bm,lights_toon_fragment:Am,lights_toon_pars_fragment:Tm,lights_phong_fragment:Rm,lights_phong_pars_fragment:Cm,lights_physical_fragment:Pm,lights_physical_pars_fragment:Lm,lights_fragment_begin:Im,lights_fragment_maps:Dm,lights_fragment_end:Nm,logdepthbuf_fragment:Um,logdepthbuf_pars_fragment:Fm,logdepthbuf_pars_vertex:Om,logdepthbuf_vertex:Bm,map_fragment:zm,map_pars_fragment:km,map_particle_fragment:Hm,map_particle_pars_fragment:Vm,metalnessmap_fragment:Gm,metalnessmap_pars_fragment:Wm,morphinstance_vertex:Xm,morphcolor_vertex:qm,morphnormal_vertex:Ym,morphtarget_pars_vertex:$m,morphtarget_vertex:jm,normal_fragment_begin:Km,normal_fragment_maps:Jm,normal_pars_fragment:Zm,normal_pars_vertex:Qm,normal_vertex:e0,normalmap_pars_fragment:t0,clearcoat_normal_fragment_begin:i0,clearcoat_normal_fragment_maps:n0,clearcoat_pars_fragment:s0,iridescence_pars_fragment:r0,opaque_fragment:a0,packing:o0,premultiplied_alpha_fragment:l0,project_vertex:c0,dithering_fragment:h0,dithering_pars_fragment:u0,roughnessmap_fragment:d0,roughnessmap_pars_fragment:f0,shadowmap_pars_fragment:p0,shadowmap_pars_vertex:m0,shadowmap_vertex:g0,shadowmask_pars_fragment:_0,skinbase_vertex:x0,skinning_pars_vertex:y0,skinning_vertex:M0,skinnormal_vertex:v0,specularmap_fragment:S0,specularmap_pars_fragment:w0,tonemapping_fragment:b0,tonemapping_pars_fragment:E0,transmission_fragment:A0,transmission_pars_fragment:T0,uv_pars_fragment:R0,uv_pars_vertex:C0,uv_vertex:P0,worldpos_vertex:L0,background_vert:I0,background_frag:D0,backgroundCube_vert:N0,backgroundCube_frag:U0,cube_vert:F0,cube_frag:O0,depth_vert:B0,depth_frag:z0,distanceRGBA_vert:k0,distanceRGBA_frag:H0,equirect_vert:V0,equirect_frag:G0,linedashed_vert:W0,linedashed_frag:X0,meshbasic_vert:q0,meshbasic_frag:Y0,meshlambert_vert:$0,meshlambert_frag:j0,meshmatcap_vert:K0,meshmatcap_frag:J0,meshnormal_vert:Z0,meshnormal_frag:Q0,meshphong_vert:eg,meshphong_frag:tg,meshphysical_vert:ig,meshphysical_frag:ng,meshtoon_vert:sg,meshtoon_frag:rg,points_vert:ag,points_frag:og,shadow_vert:lg,shadow_frag:cg,sprite_vert:hg,sprite_frag:ug},se={common:{diffuse:{value:new He(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ne},alphaMap:{value:null},alphaMapTransform:{value:new Ne},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ne}},envmap:{envMap:{value:null},envMapRotation:{value:new Ne},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ne}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ne}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ne},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ne},normalScale:{value:new ve(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ne},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ne}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ne}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ne}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new He(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new He(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Ne},alphaTest:{value:0},uvTransform:{value:new Ne}},sprite:{diffuse:{value:new He(16777215)},opacity:{value:1},center:{value:new ve(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ne},alphaMap:{value:null},alphaMapTransform:{value:new Ne},alphaTest:{value:0}}},ui={basic:{uniforms:Rt([se.common,se.specularmap,se.envmap,se.aomap,se.lightmap,se.fog]),vertexShader:Le.meshbasic_vert,fragmentShader:Le.meshbasic_frag},lambert:{uniforms:Rt([se.common,se.specularmap,se.envmap,se.aomap,se.lightmap,se.emissivemap,se.bumpmap,se.normalmap,se.displacementmap,se.fog,se.lights,{emissive:{value:new He(0)}}]),vertexShader:Le.meshlambert_vert,fragmentShader:Le.meshlambert_frag},phong:{uniforms:Rt([se.common,se.specularmap,se.envmap,se.aomap,se.lightmap,se.emissivemap,se.bumpmap,se.normalmap,se.displacementmap,se.fog,se.lights,{emissive:{value:new He(0)},specular:{value:new He(1118481)},shininess:{value:30}}]),vertexShader:Le.meshphong_vert,fragmentShader:Le.meshphong_frag},standard:{uniforms:Rt([se.common,se.envmap,se.aomap,se.lightmap,se.emissivemap,se.bumpmap,se.normalmap,se.displacementmap,se.roughnessmap,se.metalnessmap,se.fog,se.lights,{emissive:{value:new He(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Le.meshphysical_vert,fragmentShader:Le.meshphysical_frag},toon:{uniforms:Rt([se.common,se.aomap,se.lightmap,se.emissivemap,se.bumpmap,se.normalmap,se.displacementmap,se.gradientmap,se.fog,se.lights,{emissive:{value:new He(0)}}]),vertexShader:Le.meshtoon_vert,fragmentShader:Le.meshtoon_frag},matcap:{uniforms:Rt([se.common,se.bumpmap,se.normalmap,se.displacementmap,se.fog,{matcap:{value:null}}]),vertexShader:Le.meshmatcap_vert,fragmentShader:Le.meshmatcap_frag},points:{uniforms:Rt([se.points,se.fog]),vertexShader:Le.points_vert,fragmentShader:Le.points_frag},dashed:{uniforms:Rt([se.common,se.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Le.linedashed_vert,fragmentShader:Le.linedashed_frag},depth:{uniforms:Rt([se.common,se.displacementmap]),vertexShader:Le.depth_vert,fragmentShader:Le.depth_frag},normal:{uniforms:Rt([se.common,se.bumpmap,se.normalmap,se.displacementmap,{opacity:{value:1}}]),vertexShader:Le.meshnormal_vert,fragmentShader:Le.meshnormal_frag},sprite:{uniforms:Rt([se.sprite,se.fog]),vertexShader:Le.sprite_vert,fragmentShader:Le.sprite_frag},background:{uniforms:{uvTransform:{value:new Ne},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Le.background_vert,fragmentShader:Le.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Ne}},vertexShader:Le.backgroundCube_vert,fragmentShader:Le.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Le.cube_vert,fragmentShader:Le.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Le.equirect_vert,fragmentShader:Le.equirect_frag},distanceRGBA:{uniforms:Rt([se.common,se.displacementmap,{referencePosition:{value:new g},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Le.distanceRGBA_vert,fragmentShader:Le.distanceRGBA_frag},shadow:{uniforms:Rt([se.lights,se.fog,{color:{value:new He(0)},opacity:{value:1}}]),vertexShader:Le.shadow_vert,fragmentShader:Le.shadow_frag}};ui.physical={uniforms:Rt([ui.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ne},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ne},clearcoatNormalScale:{value:new ve(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ne},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ne},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ne},sheen:{value:0},sheenColor:{value:new He(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ne},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ne},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ne},transmissionSamplerSize:{value:new ve},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ne},attenuationDistance:{value:0},attenuationColor:{value:new He(0)},specularColor:{value:new He(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ne},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ne},anisotropyVector:{value:new ve},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Ne}}]),vertexShader:Le.meshphysical_vert,fragmentShader:Le.meshphysical_frag};const Kr={r:0,b:0,g:0},mn=new an,dg=new dt;function fg(r,e,t,i,n,s,a){const o=new He(0);let l=s===!0?0:1,c,h,u=null,d=0,f=null;function _(b){let y=b.isScene===!0?b.background:null;return y&&y.isTexture&&(y=(b.backgroundBlurriness>0?t:e).get(y)),y}function x(b){let y=!1;const v=_(b);v===null?m(o,l):v&&v.isColor&&(m(v,1),y=!0);const L=r.xr.getEnvironmentBlendMode();L==="additive"?i.buffers.color.setClear(0,0,0,1,a):L==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,a),(r.autoClear||y)&&(i.buffers.depth.setTest(!0),i.buffers.depth.setMask(!0),i.buffers.color.setMask(!0),r.clear(r.autoClearColor,r.autoClearDepth,r.autoClearStencil))}function p(b,y){const v=_(y);v&&(v.isCubeTexture||v.mapping===Wa)?(h===void 0&&(h=new kt(new Nn(1,1,1),new on({name:"BackgroundCubeMaterial",uniforms:Cs(ui.backgroundCube.uniforms),vertexShader:ui.backgroundCube.vertexShader,fragmentShader:ui.backgroundCube.fragmentShader,side:Pt,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),h.geometry.deleteAttribute("uv"),h.onBeforeRender=function(L,T,A){this.matrixWorld.copyPosition(A.matrixWorld)},Object.defineProperty(h.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),n.update(h)),mn.copy(y.backgroundRotation),mn.x*=-1,mn.y*=-1,mn.z*=-1,v.isCubeTexture&&v.isRenderTargetTexture===!1&&(mn.y*=-1,mn.z*=-1),h.material.uniforms.envMap.value=v,h.material.uniforms.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,h.material.uniforms.backgroundBlurriness.value=y.backgroundBlurriness,h.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,h.material.uniforms.backgroundRotation.value.setFromMatrix4(dg.makeRotationFromEuler(mn)),h.material.toneMapped=je.getTransfer(v.colorSpace)!==Ze,(u!==v||d!==v.version||f!==r.toneMapping)&&(h.material.needsUpdate=!0,u=v,d=v.version,f=r.toneMapping),h.layers.enableAll(),b.unshift(h,h.geometry,h.material,0,0,null)):v&&v.isTexture&&(c===void 0&&(c=new kt(new wr(2,2),new on({name:"BackgroundMaterial",uniforms:Cs(ui.background.uniforms),vertexShader:ui.background.vertexShader,fragmentShader:ui.background.fragmentShader,side:rn,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),n.update(c)),c.material.uniforms.t2D.value=v,c.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,c.material.toneMapped=je.getTransfer(v.colorSpace)!==Ze,v.matrixAutoUpdate===!0&&v.updateMatrix(),c.material.uniforms.uvTransform.value.copy(v.matrix),(u!==v||d!==v.version||f!==r.toneMapping)&&(c.material.needsUpdate=!0,u=v,d=v.version,f=r.toneMapping),c.layers.enableAll(),b.unshift(c,c.geometry,c.material,0,0,null))}function m(b,y){b.getRGB(Kr,xd(r)),i.buffers.color.setClear(Kr.r,Kr.g,Kr.b,y,a)}return{getClearColor:function(){return o},setClearColor:function(b,y=1){o.set(b),l=y,m(o,l)},getClearAlpha:function(){return l},setClearAlpha:function(b){l=b,m(o,l)},render:x,addToRenderList:p}}function pg(r,e){const t=r.getParameter(r.MAX_VERTEX_ATTRIBS),i={},n=d(null);let s=n,a=!1;function o(S,P,V,F,X){let Y=!1;const G=u(F,V,P);s!==G&&(s=G,c(s.object)),Y=f(S,F,V,X),Y&&_(S,F,V,X),X!==null&&e.update(X,r.ELEMENT_ARRAY_BUFFER),(Y||a)&&(a=!1,v(S,P,V,F),X!==null&&r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,e.get(X).buffer))}function l(){return r.createVertexArray()}function c(S){return r.bindVertexArray(S)}function h(S){return r.deleteVertexArray(S)}function u(S,P,V){const F=V.wireframe===!0;let X=i[S.id];X===void 0&&(X={},i[S.id]=X);let Y=X[P.id];Y===void 0&&(Y={},X[P.id]=Y);let G=Y[F];return G===void 0&&(G=d(l()),Y[F]=G),G}function d(S){const P=[],V=[],F=[];for(let X=0;X=0){const ce=X[H];let fe=Y[H];if(fe===void 0&&(H==="instanceMatrix"&&S.instanceMatrix&&(fe=S.instanceMatrix),H==="instanceColor"&&S.instanceColor&&(fe=S.instanceColor)),ce===void 0||ce.attribute!==fe||fe&&ce.data!==fe.data)return!0;G++}return s.attributesNum!==G||s.index!==F}function _(S,P,V,F){const X={},Y=P.attributes;let G=0;const j=V.getAttributes();for(const H in j)if(j[H].location>=0){let ce=Y[H];ce===void 0&&(H==="instanceMatrix"&&S.instanceMatrix&&(ce=S.instanceMatrix),H==="instanceColor"&&S.instanceColor&&(ce=S.instanceColor));const fe={};fe.attribute=ce,ce&&ce.data&&(fe.data=ce.data),X[H]=fe,G++}s.attributes=X,s.attributesNum=G,s.index=F}function x(){const S=s.newAttributes;for(let P=0,V=S.length;P=0){let oe=X[j];if(oe===void 0&&(j==="instanceMatrix"&&S.instanceMatrix&&(oe=S.instanceMatrix),j==="instanceColor"&&S.instanceColor&&(oe=S.instanceColor)),oe!==void 0){const ce=oe.normalized,fe=oe.itemSize,Be=e.get(oe);if(Be===void 0)continue;const Ke=Be.buffer,W=Be.type,Q=Be.bytesPerElement,pe=W===r.INT||W===r.UNSIGNED_INT||oe.gpuType===ic;if(oe.isInterleavedBufferAttribute){const he=oe.data,Re=he.stride,Ie=oe.offset;if(he.isInstancedInterleavedBuffer){for(let Fe=0;Fe0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT).precision>0)return"highp";T="mediump"}return T==="mediump"&&r.getShaderPrecisionFormat(r.VERTEX_SHADER,r.MEDIUM_FLOAT).precision>0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=t.precision!==void 0?t.precision:"highp";const h=l(c);h!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",h,"instead."),c=h);const u=t.logarithmicDepthBuffer===!0,d=r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS),f=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS),_=r.getParameter(r.MAX_TEXTURE_SIZE),x=r.getParameter(r.MAX_CUBE_MAP_TEXTURE_SIZE),p=r.getParameter(r.MAX_VERTEX_ATTRIBS),m=r.getParameter(r.MAX_VERTEX_UNIFORM_VECTORS),b=r.getParameter(r.MAX_VARYING_VECTORS),y=r.getParameter(r.MAX_FRAGMENT_UNIFORM_VECTORS),v=f>0,L=r.getParameter(r.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:l,textureFormatReadable:a,textureTypeReadable:o,precision:c,logarithmicDepthBuffer:u,maxTextures:d,maxVertexTextures:f,maxTextureSize:_,maxCubemapSize:x,maxAttributes:p,maxVertexUniforms:m,maxVaryings:b,maxFragmentUniforms:y,vertexTextures:v,maxSamples:L}}function _g(r){const e=this;let t=null,i=0,n=!1,s=!1;const a=new Sn,o=new Ne,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(u,d){const f=u.length!==0||d||i!==0||n;return n=d,i=u.length,f},this.beginShadows=function(){s=!0,h(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(u,d){t=h(u,d,0)},this.setState=function(u,d,f){const _=u.clippingPlanes,x=u.clipIntersection,p=u.clipShadows,m=r.get(u);if(!n||_===null||_.length===0||s&&!p)s?h(null):c();else{const b=s?0:i,y=b*4;let v=m.clippingState||null;l.value=v,v=h(_,d,y,f);for(let L=0;L!==y;++L)v[L]=t[L];m.clippingState=v,this.numIntersection=x?this.numPlanes:0,this.numPlanes+=b}};function c(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function h(u,d,f,_){const x=u!==null?u.length:0;let p=null;if(x!==0){if(p=l.value,_!==!0||p===null){const m=f+x*4,b=d.matrixWorldInverse;o.getNormalMatrix(b),(p===null||p.length0){const c=new Cp(l.height);return c.fromEquirectangularTexture(r,a),e.set(a,c),a.addEventListener("dispose",n),t(c.texture,a.mapping)}else return null}}return a}function n(a){const o=a.target;o.removeEventListener("dispose",n);const l=e.get(o);l!==void 0&&(e.delete(o),l.dispose())}function s(){e=new WeakMap}return{get:i,dispose:s}}let uc=class extends yd{constructor(e=-1,t=1,i=1,n=-1,s=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=n,this.near=s,this.far=a,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,i,n,s,a){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=t,this.view.offsetX=i,this.view.offsetY=n,this.view.width=s,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2;let s=i-e,a=i+e,o=n+t,l=n-t;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,a=s+c*this.view.width,o-=h*this.view.offsetY,l=o-h*this.view.height}this.projectionMatrix.makeOrthographic(s,a,o,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}};const _s=4,hh=[.125,.215,.35,.446,.526,.582],En=20,wo=new uc,uh=new He;let bo=null,Eo=0,Ao=0,To=!1;const wn=(1+Math.sqrt(5))/2,Qn=1/wn,dh=[new g(-wn,Qn,0),new g(wn,Qn,0),new g(-Qn,0,wn),new g(Qn,0,wn),new g(0,wn,-Qn),new g(0,wn,Qn),new g(-1,1,-1),new g(1,1,-1),new g(-1,1,1),new g(1,1,1)];class fh{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,n=100){bo=this._renderer.getRenderTarget(),Eo=this._renderer.getActiveCubeFace(),Ao=this._renderer.getActiveMipmapLevel(),To=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,i,n,s),t>0&&this._blur(s,0,0,t),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=gh(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=mh(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?y:0,y,y),h.setRenderTarget(n),x&&h.render(_,o),h.render(e,o)}_.geometry.dispose(),_.material.dispose(),h.toneMapping=d,h.autoClear=u,e.background=p}_textureToCubeUV(e,t){const i=this._renderer,n=e.mapping===Es||e.mapping===As;n?(this._cubemapMaterial===null&&(this._cubemapMaterial=gh()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=mh());const s=n?this._cubemapMaterial:this._equirectMaterial,a=new kt(this._lodPlanes[0],s),o=s.uniforms;o.envMap.value=e;const l=this._cubeSize;Jr(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(a,wo)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;const n=this._lodPlanes.length;for(let s=1;sEn&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${p} samples when the maximum is set to ${En}`);const m=[];let b=0;for(let A=0;Ay-_s?n-y+_s:0),T=4*(this._cubeSize-v);Jr(t,L,T,3*v,2*v),l.setRenderTarget(t),l.render(u,wo)}}function yg(r){const e=[],t=[],i=[];let n=r;const s=r-_s+1+hh.length;for(let a=0;ar-_s?l=hh[a-r+_s-1]:a===0&&(l=0),i.push(l);const c=1/(o-2),h=-c,u=1+c,d=[h,h,u,h,u,u,h,h,u,u,h,u],f=6,_=6,x=3,p=2,m=1,b=new Float32Array(x*_*f),y=new Float32Array(p*_*f),v=new Float32Array(m*_*f);for(let T=0;T2?0:-1,E=[A,I,0,A+2/3,I,0,A+2/3,I+1,0,A,I,0,A+2/3,I+1,0,A,I+1,0];b.set(E,x*_*T),y.set(d,p*_*T);const S=[T,T,T,T,T,T];v.set(S,m*_*T)}const L=new Ns;L.setAttribute("position",new pi(b,x)),L.setAttribute("uv",new pi(y,p)),L.setAttribute("faceIndex",new pi(v,m)),e.push(L),n>_s&&n--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function ph(r,e,t){const i=new In(r,e,t);return i.texture.mapping=Wa,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function Jr(r,e,t,i,n){r.viewport.set(e,t,i,n),r.scissor.set(e,t,i,n)}function Mg(r,e,t){const i=new Float32Array(En),n=new g(0,1,0);return new on({name:"SphericalGaussianBlur",defines:{n:En,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${r}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:n}},vertexShader:dc(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + uniform int samples; + uniform float weights[ n ]; + uniform bool latitudinal; + uniform float dTheta; + uniform float mipInt; + uniform vec3 poleAxis; + + #define ENVMAP_TYPE_CUBE_UV + #include + + vec3 getSample( float theta, vec3 axis ) { + + float cosTheta = cos( theta ); + // Rodrigues' axis-angle rotation + vec3 sampleDirection = vOutputDirection * cosTheta + + cross( axis, vOutputDirection ) * sin( theta ) + + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); + + return bilinearCubeUV( envMap, sampleDirection, mipInt ); + + } + + void main() { + + vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); + + if ( all( equal( axis, vec3( 0.0 ) ) ) ) { + + axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); + + } + + axis = normalize( axis ); + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); + + for ( int i = 1; i < n; i++ ) { + + if ( i >= samples ) { + + break; + + } + + float theta = dTheta * float( i ); + gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); + gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); + + } + + } + `,blending:nn,depthTest:!1,depthWrite:!1})}function mh(){return new on({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:dc(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + + #include + + void main() { + + vec3 outputDirection = normalize( vOutputDirection ); + vec2 uv = equirectUv( outputDirection ); + + gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); + + } + `,blending:nn,depthTest:!1,depthWrite:!1})}function gh(){return new on({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:dc(),fragmentShader:` + + precision mediump float; + precision mediump int; + + uniform float flipEnvMap; + + varying vec3 vOutputDirection; + + uniform samplerCube envMap; + + void main() { + + gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); + + } + `,blending:nn,depthTest:!1,depthWrite:!1})}function dc(){return` + + precision mediump float; + precision mediump int; + + attribute float faceIndex; + + varying vec3 vOutputDirection; + + // RH coordinate system; PMREM face-indexing convention + vec3 getDirection( vec2 uv, float face ) { + + uv = 2.0 * uv - 1.0; + + vec3 direction = vec3( uv, 1.0 ); + + if ( face == 0.0 ) { + + direction = direction.zyx; // ( 1, v, u ) pos x + + } else if ( face == 1.0 ) { + + direction = direction.xzy; + direction.xz *= -1.0; // ( -u, 1, -v ) pos y + + } else if ( face == 2.0 ) { + + direction.x *= -1.0; // ( -u, v, 1 ) pos z + + } else if ( face == 3.0 ) { + + direction = direction.zyx; + direction.xz *= -1.0; // ( -1, v, -u ) neg x + + } else if ( face == 4.0 ) { + + direction = direction.xzy; + direction.xy *= -1.0; // ( -u, -1, v ) neg y + + } else if ( face == 5.0 ) { + + direction.z *= -1.0; // ( u, v, -1 ) neg z + + } + + return direction; + + } + + void main() { + + vOutputDirection = getDirection( uv, faceIndex ); + gl_Position = vec4( position, 1.0 ); + + } + `}function vg(r){let e=new WeakMap,t=null;function i(o){if(o&&o.isTexture){const l=o.mapping,c=l===ul||l===dl,h=l===Es||l===As;if(c||h){let u=e.get(o);const d=u!==void 0?u.texture.pmremVersion:0;if(o.isRenderTargetTexture&&o.pmremVersion!==d)return t===null&&(t=new fh(r)),u=c?t.fromEquirectangular(o,u):t.fromCubemap(o,u),u.texture.pmremVersion=o.pmremVersion,e.set(o,u),u.texture;if(u!==void 0)return u.texture;{const f=o.image;return c&&f&&f.height>0||h&&f&&n(f)?(t===null&&(t=new fh(r)),u=c?t.fromEquirectangular(o):t.fromCubemap(o),u.texture.pmremVersion=o.pmremVersion,e.set(o,u),o.addEventListener("dispose",s),u.texture):null}}}return o}function n(o){let l=0;const c=6;for(let h=0;he.maxTextureSize&&(T=Math.ceil(L/e.maxTextureSize),L=e.maxTextureSize);const A=new Float32Array(L*T*4*u),I=new hd(A,L,T,u);I.type=Ui,I.needsUpdate=!0;const E=v*4;for(let P=0;P0)return r;const n=e*t;let s=xh[n];if(s===void 0&&(s=new Float32Array(n),xh[n]=s),e!==0){i.toArray(s,0);for(let a=1,o=0;a!==e;++a)o+=t,r[a].toArray(s,o)}return s}function pt(r,e){if(r.length!==e.length)return!1;for(let t=0,i=r.length;t":" "} ${o}: ${t[a]}`)}return i.join(` +`)}function v_(r){const e=je.getPrimaries(je.workingColorSpace),t=je.getPrimaries(r);let i;switch(e===t?i="":e===Ba&&t===Oa?i="LinearDisplayP3ToLinearSRGB":e===Oa&&t===Ba&&(i="LinearSRGBToLinearDisplayP3"),r){case ln:case Xa:return[i,"LinearTransferOETF"];case hi:case lc:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",r),[i,"LinearTransferOETF"]}}function Eh(r,e,t){const i=r.getShaderParameter(e,r.COMPILE_STATUS),n=r.getShaderInfoLog(e).trim();if(i&&n==="")return"";const s=/ERROR: 0:(\d+)/.exec(n);if(s){const a=parseInt(s[1]);return t.toUpperCase()+` + +`+n+` + +`+M_(r.getShaderSource(e),a)}else return n}function S_(r,e){const t=v_(e);return`vec4 ${r}( vec4 value ) { return ${t[0]}( ${t[1]}( value ) ); }`}function w_(r,e){let t;switch(e){case kf:t="Linear";break;case Hf:t="Reinhard";break;case Vf:t="OptimizedCineon";break;case Gf:t="ACESFilmic";break;case Xf:t="AgX";break;case qf:t="Neutral";break;case Wf:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+r+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function b_(r){return[r.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",r.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(tr).join(` +`)}function E_(r){const e=[];for(const t in r){const i=r[t];i!==!1&&e.push("#define "+t+" "+i)}return e.join(` +`)}function A_(r,e){const t={},i=r.getProgramParameter(e,r.ACTIVE_ATTRIBUTES);for(let n=0;n/gm;function Gl(r){return r.replace(T_,C_)}const R_=new Map;function C_(r,e){let t=Le[e];if(t===void 0){const i=R_.get(e);if(i!==void 0)t=Le[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i);else throw new Error("Can not resolve #include <"+e+">")}return Gl(t)}const P_=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Rh(r){return r.replace(P_,L_)}function L_(r,e,t,i){let n="";for(let s=parseInt(e);s0&&(p+=` +`),m=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,_].filter(tr).join(` +`),m.length>0&&(m+=` +`)):(p=[Ch(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,_,t.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",t.batching?"#define USE_BATCHING":"",t.batchingColor?"#define USE_BATCHING_COLOR":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.instancingMorph?"#define USE_INSTANCING_MORPH":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+h:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` +`].filter(tr).join(` +`),m=[Ch(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,_,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+c:"",t.envMap?"#define "+h:"",t.envMap?"#define "+u:"",d?"#define CUBEUV_TEXEL_WIDTH "+d.texelWidth:"",d?"#define CUBEUV_TEXEL_HEIGHT "+d.texelHeight:"",d?"#define CUBEUV_MAX_MIP "+d.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.dispersion?"#define USE_DISPERSION":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor||t.batchingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==sn?"#define TONE_MAPPING":"",t.toneMapping!==sn?Le.tonemapping_pars_fragment:"",t.toneMapping!==sn?w_("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",Le.colorspace_pars_fragment,S_("linearToOutputTexel",t.outputColorSpace),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` +`].filter(tr).join(` +`)),a=Gl(a),a=Ah(a,t),a=Th(a,t),o=Gl(o),o=Ah(o,t),o=Th(o,t),a=Rh(a),o=Rh(o),t.isRawShaderMaterial!==!0&&(b=`#version 300 es +`,p=[f,"#define attribute in","#define varying out","#define texture2D texture"].join(` +`)+` +`+p,m=["#define varying in",t.glslVersion===Wc?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===Wc?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` +`)+` +`+m);const y=b+p+a,v=b+m+o,L=bh(n,n.VERTEX_SHADER,y),T=bh(n,n.FRAGMENT_SHADER,v);n.attachShader(x,L),n.attachShader(x,T),t.index0AttributeName!==void 0?n.bindAttribLocation(x,0,t.index0AttributeName):t.morphTargets===!0&&n.bindAttribLocation(x,0,"position"),n.linkProgram(x);function A(P){if(r.debug.checkShaderErrors){const V=n.getProgramInfoLog(x).trim(),F=n.getShaderInfoLog(L).trim(),X=n.getShaderInfoLog(T).trim();let Y=!0,G=!0;if(n.getProgramParameter(x,n.LINK_STATUS)===!1)if(Y=!1,typeof r.debug.onShaderError=="function")r.debug.onShaderError(n,x,L,T);else{const j=Eh(n,L,"vertex"),H=Eh(n,T,"fragment");console.error("THREE.WebGLProgram: Shader Error "+n.getError()+" - VALIDATE_STATUS "+n.getProgramParameter(x,n.VALIDATE_STATUS)+` + +Material Name: `+P.name+` +Material Type: `+P.type+` + +Program Info Log: `+V+` +`+j+` +`+H)}else V!==""?console.warn("THREE.WebGLProgram: Program Info Log:",V):(F===""||X==="")&&(G=!1);G&&(P.diagnostics={runnable:Y,programLog:V,vertexShader:{log:F,prefix:p},fragmentShader:{log:X,prefix:m}})}n.deleteShader(L),n.deleteShader(T),I=new Na(n,x),E=A_(n,x)}let I;this.getUniforms=function(){return I===void 0&&A(this),I};let E;this.getAttributes=function(){return E===void 0&&A(this),E};let S=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return S===!1&&(S=n.getProgramParameter(x,x_)),S},this.destroy=function(){i.releaseStatesOfProgram(this),n.deleteProgram(x),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=y_++,this.cacheKey=e,this.usedTimes=1,this.program=x,this.vertexShader=L,this.fragmentShader=T,this}let B_=0;class z_{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,i=e.fragmentShader,n=this._getShaderStage(t),s=this._getShaderStage(i),a=this._getShaderCacheForMaterial(e);return a.has(n)===!1&&(a.add(n),n.usedTimes++),a.has(s)===!1&&(a.add(s),s.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let i=t.get(e);return i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){const t=this.shaderCache;let i=t.get(e);return i===void 0&&(i=new k_(e),t.set(e,i)),i}}class k_{constructor(e){this.id=B_++,this.code=e,this.usedTimes=0}}function H_(r,e,t,i,n,s,a){const o=new fd,l=new z_,c=new Set,h=[],u=n.logarithmicDepthBuffer,d=n.vertexTextures;let f=n.precision;const _={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function x(E){return c.add(E),E===0?"uv":`uv${E}`}function p(E,S,P,V,F){const X=V.fog,Y=F.geometry,G=E.isMeshStandardMaterial?V.environment:null,j=(E.isMeshStandardMaterial?t:e).get(E.envMap||G),H=j&&j.mapping===Wa?j.image.height:null,oe=_[E.type];E.precision!==null&&(f=n.getMaxPrecision(E.precision),f!==E.precision&&console.warn("THREE.WebGLProgram.getParameters:",E.precision,"not supported, using",f,"instead."));const ce=Y.morphAttributes.position||Y.morphAttributes.normal||Y.morphAttributes.color,fe=ce!==void 0?ce.length:0;let Be=0;Y.morphAttributes.position!==void 0&&(Be=1),Y.morphAttributes.normal!==void 0&&(Be=2),Y.morphAttributes.color!==void 0&&(Be=3);let Ke,W,Q,pe;if(oe){const Ve=ui[oe];Ke=Ve.vertexShader,W=Ve.fragmentShader}else Ke=E.vertexShader,W=E.fragmentShader,l.update(E),Q=l.getVertexShaderID(E),pe=l.getFragmentShaderID(E);const he=r.getRenderTarget(),Re=F.isInstancedMesh===!0,Ie=F.isBatchedMesh===!0,Fe=!!E.map,tt=!!E.matcap,C=!!j,rt=!!E.aoMap,qe=!!E.lightMap,Je=!!E.bumpMap,xe=!!E.normalMap,at=!!E.displacementMap,Ae=!!E.emissiveMap,Ce=!!E.metalnessMap,R=!!E.roughnessMap,M=E.anisotropy>0,k=E.clearcoat>0,J=E.dispersion>0,Z=E.iridescence>0,K=E.sheen>0,ye=E.transmission>0,re=M&&!!E.anisotropyMap,ue=k&&!!E.clearcoatMap,Pe=k&&!!E.clearcoatNormalMap,ee=k&&!!E.clearcoatRoughnessMap,le=Z&&!!E.iridescenceMap,ze=Z&&!!E.iridescenceThicknessMap,Ee=K&&!!E.sheenColorMap,de=K&&!!E.sheenRoughnessMap,Te=!!E.specularMap,De=!!E.specularColorMap,Qe=!!E.specularIntensityMap,D=ye&&!!E.transmissionMap,te=ye&&!!E.thicknessMap,q=!!E.gradientMap,$=!!E.alphaMap,ne=E.alphaTest>0,Se=!!E.alphaHash,ke=!!E.extensions;let ot=sn;E.toneMapped&&(he===null||he.isXRRenderTarget===!0)&&(ot=r.toneMapping);const xt={shaderID:oe,shaderType:E.type,shaderName:E.name,vertexShader:Ke,fragmentShader:W,defines:E.defines,customVertexShaderID:Q,customFragmentShaderID:pe,isRawShaderMaterial:E.isRawShaderMaterial===!0,glslVersion:E.glslVersion,precision:f,batching:Ie,batchingColor:Ie&&F._colorsTexture!==null,instancing:Re,instancingColor:Re&&F.instanceColor!==null,instancingMorph:Re&&F.morphTexture!==null,supportsVertexTextures:d,outputColorSpace:he===null?r.outputColorSpace:he.isXRRenderTarget===!0?he.texture.colorSpace:ln,alphaToCoverage:!!E.alphaToCoverage,map:Fe,matcap:tt,envMap:C,envMapMode:C&&j.mapping,envMapCubeUVHeight:H,aoMap:rt,lightMap:qe,bumpMap:Je,normalMap:xe,displacementMap:d&&at,emissiveMap:Ae,normalMapObjectSpace:xe&&E.normalMapType===Kf,normalMapTangentSpace:xe&&E.normalMapType===id,metalnessMap:Ce,roughnessMap:R,anisotropy:M,anisotropyMap:re,clearcoat:k,clearcoatMap:ue,clearcoatNormalMap:Pe,clearcoatRoughnessMap:ee,dispersion:J,iridescence:Z,iridescenceMap:le,iridescenceThicknessMap:ze,sheen:K,sheenColorMap:Ee,sheenRoughnessMap:de,specularMap:Te,specularColorMap:De,specularIntensityMap:Qe,transmission:ye,transmissionMap:D,thicknessMap:te,gradientMap:q,opaque:E.transparent===!1&&E.blending===Ms&&E.alphaToCoverage===!1,alphaMap:$,alphaTest:ne,alphaHash:Se,combine:E.combine,mapUv:Fe&&x(E.map.channel),aoMapUv:rt&&x(E.aoMap.channel),lightMapUv:qe&&x(E.lightMap.channel),bumpMapUv:Je&&x(E.bumpMap.channel),normalMapUv:xe&&x(E.normalMap.channel),displacementMapUv:at&&x(E.displacementMap.channel),emissiveMapUv:Ae&&x(E.emissiveMap.channel),metalnessMapUv:Ce&&x(E.metalnessMap.channel),roughnessMapUv:R&&x(E.roughnessMap.channel),anisotropyMapUv:re&&x(E.anisotropyMap.channel),clearcoatMapUv:ue&&x(E.clearcoatMap.channel),clearcoatNormalMapUv:Pe&&x(E.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ee&&x(E.clearcoatRoughnessMap.channel),iridescenceMapUv:le&&x(E.iridescenceMap.channel),iridescenceThicknessMapUv:ze&&x(E.iridescenceThicknessMap.channel),sheenColorMapUv:Ee&&x(E.sheenColorMap.channel),sheenRoughnessMapUv:de&&x(E.sheenRoughnessMap.channel),specularMapUv:Te&&x(E.specularMap.channel),specularColorMapUv:De&&x(E.specularColorMap.channel),specularIntensityMapUv:Qe&&x(E.specularIntensityMap.channel),transmissionMapUv:D&&x(E.transmissionMap.channel),thicknessMapUv:te&&x(E.thicknessMap.channel),alphaMapUv:$&&x(E.alphaMap.channel),vertexTangents:!!Y.attributes.tangent&&(xe||M),vertexColors:E.vertexColors,vertexAlphas:E.vertexColors===!0&&!!Y.attributes.color&&Y.attributes.color.itemSize===4,pointsUvs:F.isPoints===!0&&!!Y.attributes.uv&&(Fe||$),fog:!!X,useFog:E.fog===!0,fogExp2:!!X&&X.isFogExp2,flatShading:E.flatShading===!0,sizeAttenuation:E.sizeAttenuation===!0,logarithmicDepthBuffer:u,skinning:F.isSkinnedMesh===!0,morphTargets:Y.morphAttributes.position!==void 0,morphNormals:Y.morphAttributes.normal!==void 0,morphColors:Y.morphAttributes.color!==void 0,morphTargetsCount:fe,morphTextureStride:Be,numDirLights:S.directional.length,numPointLights:S.point.length,numSpotLights:S.spot.length,numSpotLightMaps:S.spotLightMap.length,numRectAreaLights:S.rectArea.length,numHemiLights:S.hemi.length,numDirLightShadows:S.directionalShadowMap.length,numPointLightShadows:S.pointShadowMap.length,numSpotLightShadows:S.spotShadowMap.length,numSpotLightShadowsWithMaps:S.numSpotLightShadowsWithMaps,numLightProbes:S.numLightProbes,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:E.dithering,shadowMapEnabled:r.shadowMap.enabled&&P.length>0,shadowMapType:r.shadowMap.type,toneMapping:ot,decodeVideoTexture:Fe&&E.map.isVideoTexture===!0&&je.getTransfer(E.map.colorSpace)===Ze,premultipliedAlpha:E.premultipliedAlpha,doubleSided:E.side===di,flipSided:E.side===Pt,useDepthPacking:E.depthPacking>=0,depthPacking:E.depthPacking||0,index0AttributeName:E.index0AttributeName,extensionClipCullDistance:ke&&E.extensions.clipCullDistance===!0&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ke&&E.extensions.multiDraw===!0||Ie)&&i.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:E.customProgramCacheKey()};return xt.vertexUv1s=c.has(1),xt.vertexUv2s=c.has(2),xt.vertexUv3s=c.has(3),c.clear(),xt}function m(E){const S=[];if(E.shaderID?S.push(E.shaderID):(S.push(E.customVertexShaderID),S.push(E.customFragmentShaderID)),E.defines!==void 0)for(const P in E.defines)S.push(P),S.push(E.defines[P]);return E.isRawShaderMaterial===!1&&(b(S,E),y(S,E),S.push(r.outputColorSpace)),S.push(E.customProgramCacheKey),S.join()}function b(E,S){E.push(S.precision),E.push(S.outputColorSpace),E.push(S.envMapMode),E.push(S.envMapCubeUVHeight),E.push(S.mapUv),E.push(S.alphaMapUv),E.push(S.lightMapUv),E.push(S.aoMapUv),E.push(S.bumpMapUv),E.push(S.normalMapUv),E.push(S.displacementMapUv),E.push(S.emissiveMapUv),E.push(S.metalnessMapUv),E.push(S.roughnessMapUv),E.push(S.anisotropyMapUv),E.push(S.clearcoatMapUv),E.push(S.clearcoatNormalMapUv),E.push(S.clearcoatRoughnessMapUv),E.push(S.iridescenceMapUv),E.push(S.iridescenceThicknessMapUv),E.push(S.sheenColorMapUv),E.push(S.sheenRoughnessMapUv),E.push(S.specularMapUv),E.push(S.specularColorMapUv),E.push(S.specularIntensityMapUv),E.push(S.transmissionMapUv),E.push(S.thicknessMapUv),E.push(S.combine),E.push(S.fogExp2),E.push(S.sizeAttenuation),E.push(S.morphTargetsCount),E.push(S.morphAttributeCount),E.push(S.numDirLights),E.push(S.numPointLights),E.push(S.numSpotLights),E.push(S.numSpotLightMaps),E.push(S.numHemiLights),E.push(S.numRectAreaLights),E.push(S.numDirLightShadows),E.push(S.numPointLightShadows),E.push(S.numSpotLightShadows),E.push(S.numSpotLightShadowsWithMaps),E.push(S.numLightProbes),E.push(S.shadowMapType),E.push(S.toneMapping),E.push(S.numClippingPlanes),E.push(S.numClipIntersection),E.push(S.depthPacking)}function y(E,S){o.disableAll(),S.supportsVertexTextures&&o.enable(0),S.instancing&&o.enable(1),S.instancingColor&&o.enable(2),S.instancingMorph&&o.enable(3),S.matcap&&o.enable(4),S.envMap&&o.enable(5),S.normalMapObjectSpace&&o.enable(6),S.normalMapTangentSpace&&o.enable(7),S.clearcoat&&o.enable(8),S.iridescence&&o.enable(9),S.alphaTest&&o.enable(10),S.vertexColors&&o.enable(11),S.vertexAlphas&&o.enable(12),S.vertexUv1s&&o.enable(13),S.vertexUv2s&&o.enable(14),S.vertexUv3s&&o.enable(15),S.vertexTangents&&o.enable(16),S.anisotropy&&o.enable(17),S.alphaHash&&o.enable(18),S.batching&&o.enable(19),S.dispersion&&o.enable(20),S.batchingColor&&o.enable(21),E.push(o.mask),o.disableAll(),S.fog&&o.enable(0),S.useFog&&o.enable(1),S.flatShading&&o.enable(2),S.logarithmicDepthBuffer&&o.enable(3),S.skinning&&o.enable(4),S.morphTargets&&o.enable(5),S.morphNormals&&o.enable(6),S.morphColors&&o.enable(7),S.premultipliedAlpha&&o.enable(8),S.shadowMapEnabled&&o.enable(9),S.doubleSided&&o.enable(10),S.flipSided&&o.enable(11),S.useDepthPacking&&o.enable(12),S.dithering&&o.enable(13),S.transmission&&o.enable(14),S.sheen&&o.enable(15),S.opaque&&o.enable(16),S.pointsUvs&&o.enable(17),S.decodeVideoTexture&&o.enable(18),S.alphaToCoverage&&o.enable(19),E.push(o.mask)}function v(E){const S=_[E.type];let P;if(S){const V=ui[S];P=Ep.clone(V.uniforms)}else P=E.uniforms;return P}function L(E,S){let P;for(let V=0,F=h.length;V0?i.push(m):f.transparent===!0?n.push(m):t.push(m)}function l(u,d,f,_,x,p){const m=a(u,d,f,_,x,p);f.transmission>0?i.unshift(m):f.transparent===!0?n.unshift(m):t.unshift(m)}function c(u,d){t.length>1&&t.sort(u||G_),i.length>1&&i.sort(d||Ph),n.length>1&&n.sort(d||Ph)}function h(){for(let u=e,d=r.length;u=s.length?(a=new Lh,s.push(a)):a=s[n],a}function t(){r=new WeakMap}return{get:e,dispose:t}}function X_(){const r={};return{get:function(e){if(r[e.id]!==void 0)return r[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new g,color:new He};break;case"SpotLight":t={position:new g,direction:new g,color:new He,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new g,color:new He,distance:0,decay:0};break;case"HemisphereLight":t={direction:new g,skyColor:new He,groundColor:new He};break;case"RectAreaLight":t={color:new He,position:new g,halfWidth:new g,halfHeight:new g};break}return r[e.id]=t,t}}}function q_(){const r={};return{get:function(e){if(r[e.id]!==void 0)return r[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ve};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ve};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ve,shadowCameraNear:1,shadowCameraFar:1e3};break}return r[e.id]=t,t}}}let Y_=0;function $_(r,e){return(e.castShadow?2:0)-(r.castShadow?2:0)+(e.map?1:0)-(r.map?1:0)}function j_(r){const e=new X_,t=q_(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)i.probe.push(new g);const n=new g,s=new dt,a=new dt;function o(c){let h=0,u=0,d=0;for(let E=0;E<9;E++)i.probe[E].set(0,0,0);let f=0,_=0,x=0,p=0,m=0,b=0,y=0,v=0,L=0,T=0,A=0;c.sort($_);for(let E=0,S=c.length;E0&&(r.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=se.LTC_FLOAT_1,i.rectAreaLTC2=se.LTC_FLOAT_2):(i.rectAreaLTC1=se.LTC_HALF_1,i.rectAreaLTC2=se.LTC_HALF_2)),i.ambient[0]=h,i.ambient[1]=u,i.ambient[2]=d;const I=i.hash;(I.directionalLength!==f||I.pointLength!==_||I.spotLength!==x||I.rectAreaLength!==p||I.hemiLength!==m||I.numDirectionalShadows!==b||I.numPointShadows!==y||I.numSpotShadows!==v||I.numSpotMaps!==L||I.numLightProbes!==A)&&(i.directional.length=f,i.spot.length=x,i.rectArea.length=p,i.point.length=_,i.hemi.length=m,i.directionalShadow.length=b,i.directionalShadowMap.length=b,i.pointShadow.length=y,i.pointShadowMap.length=y,i.spotShadow.length=v,i.spotShadowMap.length=v,i.directionalShadowMatrix.length=b,i.pointShadowMatrix.length=y,i.spotLightMatrix.length=v+L-T,i.spotLightMap.length=L,i.numSpotLightShadowsWithMaps=T,i.numLightProbes=A,I.directionalLength=f,I.pointLength=_,I.spotLength=x,I.rectAreaLength=p,I.hemiLength=m,I.numDirectionalShadows=b,I.numPointShadows=y,I.numSpotShadows=v,I.numSpotMaps=L,I.numLightProbes=A,i.version=Y_++)}function l(c,h){let u=0,d=0,f=0,_=0,x=0;const p=h.matrixWorldInverse;for(let m=0,b=c.length;m=a.length?(o=new Ih(r),a.push(o)):o=a[s],o}function i(){e=new WeakMap}return{get:t,dispose:i}}class J_ extends vr{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=$f,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class Z_ extends vr{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const Q_=` +void main() { + + gl_Position = vec4( position, 1.0 ); + +} +`,ex=` +uniform sampler2D shadow_pass; +uniform vec2 resolution; +uniform float radius; + +#include + +void main() { + + const float samples = float( VSM_SAMPLES ); + + float mean = 0.0; + float squared_mean = 0.0; + + float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); + float uvStart = samples <= 1.0 ? 0.0 : - 1.0; + for ( float i = 0.0; i < samples; i ++ ) { + + float uvOffset = uvStart + i * uvStride; + + #ifdef HORIZONTAL_PASS + + vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); + mean += distribution.x; + squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; + + #else + + float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); + mean += depth; + squared_mean += depth * depth; + + #endif + + } + + mean = mean / samples; + squared_mean = squared_mean / samples; + + float std_dev = sqrt( squared_mean - mean * mean ); + + gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); + +} +`;function tx(r,e,t){let i=new hc;const n=new ve,s=new ve,a=new Mt,o=new J_({depthPacking:jf}),l=new Z_,c={},h=t.maxTextureSize,u={[rn]:Pt,[Pt]:rn,[di]:di},d=new on({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new ve},radius:{value:4}},vertexShader:Q_,fragmentShader:ex}),f=d.clone();f.defines.HORIZONTAL_PASS=1;const _=new Ns;_.setAttribute("position",new pi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const x=new kt(_,d),p=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Gu;let m=this.type;this.render=function(T,A,I){if(p.enabled===!1||p.autoUpdate===!1&&p.needsUpdate===!1||T.length===0)return;const E=r.getRenderTarget(),S=r.getActiveCubeFace(),P=r.getActiveMipmapLevel(),V=r.state;V.setBlending(nn),V.buffers.color.setClear(1,1,1,1),V.buffers.depth.setTest(!0),V.setScissorTest(!1);const F=m!==Di&&this.type===Di,X=m===Di&&this.type!==Di;for(let Y=0,G=T.length;Yh||n.y>h)&&(n.x>h&&(s.x=Math.floor(h/oe.x),n.x=s.x*oe.x,H.mapSize.x=s.x),n.y>h&&(s.y=Math.floor(h/oe.y),n.y=s.y*oe.y,H.mapSize.y=s.y)),H.map===null||F===!0||X===!0){const fe=this.type!==Di?{minFilter:Yt,magFilter:Yt}:{};H.map!==null&&H.map.dispose(),H.map=new In(n.x,n.y,fe),H.map.texture.name=j.name+".shadowMap",H.camera.updateProjectionMatrix()}r.setRenderTarget(H.map),r.clear();const ce=H.getViewportCount();for(let fe=0;fe0||A.map&&A.alphaTest>0){const V=S.uuid,F=A.uuid;let X=c[V];X===void 0&&(X={},c[V]=X);let Y=X[F];Y===void 0&&(Y=S.clone(),X[F]=Y,A.addEventListener("dispose",L)),S=Y}if(S.visible=A.visible,S.wireframe=A.wireframe,E===Di?S.side=A.shadowSide!==null?A.shadowSide:A.side:S.side=A.shadowSide!==null?A.shadowSide:u[A.side],S.alphaMap=A.alphaMap,S.alphaTest=A.alphaTest,S.map=A.map,S.clipShadows=A.clipShadows,S.clippingPlanes=A.clippingPlanes,S.clipIntersection=A.clipIntersection,S.displacementMap=A.displacementMap,S.displacementScale=A.displacementScale,S.displacementBias=A.displacementBias,S.wireframeLinewidth=A.wireframeLinewidth,S.linewidth=A.linewidth,I.isPointLight===!0&&S.isMeshDistanceMaterial===!0){const V=r.properties.get(S);V.light=I}return S}function v(T,A,I,E,S){if(T.visible===!1)return;if(T.layers.test(A.layers)&&(T.isMesh||T.isLine||T.isPoints)&&(T.castShadow||T.receiveShadow&&S===Di)&&(!T.frustumCulled||i.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(I.matrixWorldInverse,T.matrixWorld);const F=e.update(T),X=T.material;if(Array.isArray(X)){const Y=F.groups;for(let G=0,j=Y.length;G=1):j.indexOf("OpenGL ES")!==-1&&(G=parseFloat(/^OpenGL ES (\d)/.exec(j)[1]),Y=G>=2);let H=null,oe={};const ce=r.getParameter(r.SCISSOR_BOX),fe=r.getParameter(r.VIEWPORT),Be=new Mt().fromArray(ce),Ke=new Mt().fromArray(fe);function W(D,te,q,$){const ne=new Uint8Array(4),Se=r.createTexture();r.bindTexture(D,Se),r.texParameteri(D,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(D,r.TEXTURE_MAG_FILTER,r.NEAREST);for(let ke=0;ke"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new ve,h=new WeakMap;let u;const d=new WeakMap;let f=!1;try{f=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function _(R,M){return f?new OffscreenCanvas(R,M):ka("canvas")}function x(R,M,k){let J=1;const Z=Ce(R);if((Z.width>k||Z.height>k)&&(J=k/Math.max(Z.width,Z.height)),J<1)if(typeof HTMLImageElement<"u"&&R instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&R instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&R instanceof ImageBitmap||typeof VideoFrame<"u"&&R instanceof VideoFrame){const K=Math.floor(J*Z.width),ye=Math.floor(J*Z.height);u===void 0&&(u=_(K,ye));const re=M?_(K,ye):u;return re.width=K,re.height=ye,re.getContext("2d").drawImage(R,0,0,K,ye),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Z.width+"x"+Z.height+") to ("+K+"x"+ye+")."),re}else return"data"in R&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Z.width+"x"+Z.height+")."),R;return R}function p(R){return R.generateMipmaps&&R.minFilter!==Yt&&R.minFilter!==ni}function m(R){r.generateMipmap(R)}function b(R,M,k,J,Z=!1){if(R!==null){if(r[R]!==void 0)return r[R];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+R+"'")}let K=M;if(M===r.RED&&(k===r.FLOAT&&(K=r.R32F),k===r.HALF_FLOAT&&(K=r.R16F),k===r.UNSIGNED_BYTE&&(K=r.R8)),M===r.RED_INTEGER&&(k===r.UNSIGNED_BYTE&&(K=r.R8UI),k===r.UNSIGNED_SHORT&&(K=r.R16UI),k===r.UNSIGNED_INT&&(K=r.R32UI),k===r.BYTE&&(K=r.R8I),k===r.SHORT&&(K=r.R16I),k===r.INT&&(K=r.R32I)),M===r.RG&&(k===r.FLOAT&&(K=r.RG32F),k===r.HALF_FLOAT&&(K=r.RG16F),k===r.UNSIGNED_BYTE&&(K=r.RG8)),M===r.RG_INTEGER&&(k===r.UNSIGNED_BYTE&&(K=r.RG8UI),k===r.UNSIGNED_SHORT&&(K=r.RG16UI),k===r.UNSIGNED_INT&&(K=r.RG32UI),k===r.BYTE&&(K=r.RG8I),k===r.SHORT&&(K=r.RG16I),k===r.INT&&(K=r.RG32I)),M===r.RGB&&k===r.UNSIGNED_INT_5_9_9_9_REV&&(K=r.RGB9_E5),M===r.RGBA){const ye=Z?Fa:je.getTransfer(J);k===r.FLOAT&&(K=r.RGBA32F),k===r.HALF_FLOAT&&(K=r.RGBA16F),k===r.UNSIGNED_BYTE&&(K=ye===Ze?r.SRGB8_ALPHA8:r.RGBA8),k===r.UNSIGNED_SHORT_4_4_4_4&&(K=r.RGBA4),k===r.UNSIGNED_SHORT_5_5_5_1&&(K=r.RGB5_A1)}return(K===r.R16F||K===r.R32F||K===r.RG16F||K===r.RG32F||K===r.RGBA16F||K===r.RGBA32F)&&e.get("EXT_color_buffer_float"),K}function y(R,M){let k;return R?M===null||M===Ln||M===Ts?k=r.DEPTH24_STENCIL8:M===Ui?k=r.DEPTH32F_STENCIL8:M===cr&&(k=r.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):M===null||M===Ln||M===Ts?k=r.DEPTH_COMPONENT24:M===Ui?k=r.DEPTH_COMPONENT32F:M===cr&&(k=r.DEPTH_COMPONENT16),k}function v(R,M){return p(R)===!0||R.isFramebufferTexture&&R.minFilter!==Yt&&R.minFilter!==ni?Math.log2(Math.max(M.width,M.height))+1:R.mipmaps!==void 0&&R.mipmaps.length>0?R.mipmaps.length:R.isCompressedTexture&&Array.isArray(R.image)?M.mipmaps.length:1}function L(R){const M=R.target;M.removeEventListener("dispose",L),A(M),M.isVideoTexture&&h.delete(M)}function T(R){const M=R.target;M.removeEventListener("dispose",T),E(M)}function A(R){const M=i.get(R);if(M.__webglInit===void 0)return;const k=R.source,J=d.get(k);if(J){const Z=J[M.__cacheKey];Z.usedTimes--,Z.usedTimes===0&&I(R),Object.keys(J).length===0&&d.delete(k)}i.remove(R)}function I(R){const M=i.get(R);r.deleteTexture(M.__webglTexture);const k=R.source,J=d.get(k);delete J[M.__cacheKey],a.memory.textures--}function E(R){const M=i.get(R);if(R.depthTexture&&R.depthTexture.dispose(),R.isWebGLCubeRenderTarget)for(let J=0;J<6;J++){if(Array.isArray(M.__webglFramebuffer[J]))for(let Z=0;Z=n.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+R+" texture units while this GPU supports only "+n.maxTextures),S+=1,R}function F(R){const M=[];return M.push(R.wrapS),M.push(R.wrapT),M.push(R.wrapR||0),M.push(R.magFilter),M.push(R.minFilter),M.push(R.anisotropy),M.push(R.internalFormat),M.push(R.format),M.push(R.type),M.push(R.generateMipmaps),M.push(R.premultiplyAlpha),M.push(R.flipY),M.push(R.unpackAlignment),M.push(R.colorSpace),M.join()}function X(R,M){const k=i.get(R);if(R.isVideoTexture&&at(R),R.isRenderTargetTexture===!1&&R.version>0&&k.__version!==R.version){const J=R.image;if(J===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(J.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Ke(k,R,M);return}}t.bindTexture(r.TEXTURE_2D,k.__webglTexture,r.TEXTURE0+M)}function Y(R,M){const k=i.get(R);if(R.version>0&&k.__version!==R.version){Ke(k,R,M);return}t.bindTexture(r.TEXTURE_2D_ARRAY,k.__webglTexture,r.TEXTURE0+M)}function G(R,M){const k=i.get(R);if(R.version>0&&k.__version!==R.version){Ke(k,R,M);return}t.bindTexture(r.TEXTURE_3D,k.__webglTexture,r.TEXTURE0+M)}function j(R,M){const k=i.get(R);if(R.version>0&&k.__version!==R.version){W(k,R,M);return}t.bindTexture(r.TEXTURE_CUBE_MAP,k.__webglTexture,r.TEXTURE0+M)}const H={[fl]:r.REPEAT,[Tn]:r.CLAMP_TO_EDGE,[pl]:r.MIRRORED_REPEAT},oe={[Yt]:r.NEAREST,[Yf]:r.NEAREST_MIPMAP_NEAREST,[Cr]:r.NEAREST_MIPMAP_LINEAR,[ni]:r.LINEAR,[to]:r.LINEAR_MIPMAP_NEAREST,[Rn]:r.LINEAR_MIPMAP_LINEAR},ce={[Jf]:r.NEVER,[np]:r.ALWAYS,[Zf]:r.LESS,[nd]:r.LEQUAL,[Qf]:r.EQUAL,[ip]:r.GEQUAL,[ep]:r.GREATER,[tp]:r.NOTEQUAL};function fe(R,M){if(M.type===Ui&&e.has("OES_texture_float_linear")===!1&&(M.magFilter===ni||M.magFilter===to||M.magFilter===Cr||M.magFilter===Rn||M.minFilter===ni||M.minFilter===to||M.minFilter===Cr||M.minFilter===Rn)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),r.texParameteri(R,r.TEXTURE_WRAP_S,H[M.wrapS]),r.texParameteri(R,r.TEXTURE_WRAP_T,H[M.wrapT]),(R===r.TEXTURE_3D||R===r.TEXTURE_2D_ARRAY)&&r.texParameteri(R,r.TEXTURE_WRAP_R,H[M.wrapR]),r.texParameteri(R,r.TEXTURE_MAG_FILTER,oe[M.magFilter]),r.texParameteri(R,r.TEXTURE_MIN_FILTER,oe[M.minFilter]),M.compareFunction&&(r.texParameteri(R,r.TEXTURE_COMPARE_MODE,r.COMPARE_REF_TO_TEXTURE),r.texParameteri(R,r.TEXTURE_COMPARE_FUNC,ce[M.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(M.magFilter===Yt||M.minFilter!==Cr&&M.minFilter!==Rn||M.type===Ui&&e.has("OES_texture_float_linear")===!1)return;if(M.anisotropy>1||i.get(M).__currentAnisotropy){const k=e.get("EXT_texture_filter_anisotropic");r.texParameterf(R,k.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(M.anisotropy,n.getMaxAnisotropy())),i.get(M).__currentAnisotropy=M.anisotropy}}}function Be(R,M){let k=!1;R.__webglInit===void 0&&(R.__webglInit=!0,M.addEventListener("dispose",L));const J=M.source;let Z=d.get(J);Z===void 0&&(Z={},d.set(J,Z));const K=F(M);if(K!==R.__cacheKey){Z[K]===void 0&&(Z[K]={texture:r.createTexture(),usedTimes:0},a.memory.textures++,k=!0),Z[K].usedTimes++;const ye=Z[R.__cacheKey];ye!==void 0&&(Z[R.__cacheKey].usedTimes--,ye.usedTimes===0&&I(M)),R.__cacheKey=K,R.__webglTexture=Z[K].texture}return k}function Ke(R,M,k){let J=r.TEXTURE_2D;(M.isDataArrayTexture||M.isCompressedArrayTexture)&&(J=r.TEXTURE_2D_ARRAY),M.isData3DTexture&&(J=r.TEXTURE_3D);const Z=Be(R,M),K=M.source;t.bindTexture(J,R.__webglTexture,r.TEXTURE0+k);const ye=i.get(K);if(K.version!==ye.__version||Z===!0){t.activeTexture(r.TEXTURE0+k);const re=je.getPrimaries(je.workingColorSpace),ue=M.colorSpace===en?null:je.getPrimaries(M.colorSpace),Pe=M.colorSpace===en||re===ue?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,M.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,M.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,M.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,Pe);let ee=x(M.image,!1,n.maxTextureSize);ee=Ae(M,ee);const le=s.convert(M.format,M.colorSpace),ze=s.convert(M.type);let Ee=b(M.internalFormat,le,ze,M.colorSpace,M.isVideoTexture);fe(J,M);let de;const Te=M.mipmaps,De=M.isVideoTexture!==!0,Qe=ye.__version===void 0||Z===!0,D=K.dataReady,te=v(M,ee);if(M.isDepthTexture)Ee=y(M.format===Rs,M.type),Qe&&(De?t.texStorage2D(r.TEXTURE_2D,1,Ee,ee.width,ee.height):t.texImage2D(r.TEXTURE_2D,0,Ee,ee.width,ee.height,0,le,ze,null));else if(M.isDataTexture)if(Te.length>0){De&&Qe&&t.texStorage2D(r.TEXTURE_2D,te,Ee,Te[0].width,Te[0].height);for(let q=0,$=Te.length;q<$;q++)de=Te[q],De?D&&t.texSubImage2D(r.TEXTURE_2D,q,0,0,de.width,de.height,le,ze,de.data):t.texImage2D(r.TEXTURE_2D,q,Ee,de.width,de.height,0,le,ze,de.data);M.generateMipmaps=!1}else De?(Qe&&t.texStorage2D(r.TEXTURE_2D,te,Ee,ee.width,ee.height),D&&t.texSubImage2D(r.TEXTURE_2D,0,0,0,ee.width,ee.height,le,ze,ee.data)):t.texImage2D(r.TEXTURE_2D,0,Ee,ee.width,ee.height,0,le,ze,ee.data);else if(M.isCompressedTexture)if(M.isCompressedArrayTexture){De&&Qe&&t.texStorage3D(r.TEXTURE_2D_ARRAY,te,Ee,Te[0].width,Te[0].height,ee.depth);for(let q=0,$=Te.length;q<$;q++)if(de=Te[q],M.format!==ri)if(le!==null)if(De){if(D)if(M.layerUpdates.size>0){const ne=Dh(de.width,de.height,M.format,M.type);for(const Se of M.layerUpdates){const ke=de.data.subarray(Se*ne/de.data.BYTES_PER_ELEMENT,(Se+1)*ne/de.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(r.TEXTURE_2D_ARRAY,q,0,0,Se,de.width,de.height,1,le,ke,0,0)}M.clearLayerUpdates()}else t.compressedTexSubImage3D(r.TEXTURE_2D_ARRAY,q,0,0,0,de.width,de.height,ee.depth,le,de.data,0,0)}else t.compressedTexImage3D(r.TEXTURE_2D_ARRAY,q,Ee,de.width,de.height,ee.depth,0,de.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else De?D&&t.texSubImage3D(r.TEXTURE_2D_ARRAY,q,0,0,0,de.width,de.height,ee.depth,le,ze,de.data):t.texImage3D(r.TEXTURE_2D_ARRAY,q,Ee,de.width,de.height,ee.depth,0,le,ze,de.data)}else{De&&Qe&&t.texStorage2D(r.TEXTURE_2D,te,Ee,Te[0].width,Te[0].height);for(let q=0,$=Te.length;q<$;q++)de=Te[q],M.format!==ri?le!==null?De?D&&t.compressedTexSubImage2D(r.TEXTURE_2D,q,0,0,de.width,de.height,le,de.data):t.compressedTexImage2D(r.TEXTURE_2D,q,Ee,de.width,de.height,0,de.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):De?D&&t.texSubImage2D(r.TEXTURE_2D,q,0,0,de.width,de.height,le,ze,de.data):t.texImage2D(r.TEXTURE_2D,q,Ee,de.width,de.height,0,le,ze,de.data)}else if(M.isDataArrayTexture)if(De){if(Qe&&t.texStorage3D(r.TEXTURE_2D_ARRAY,te,Ee,ee.width,ee.height,ee.depth),D)if(M.layerUpdates.size>0){const q=Dh(ee.width,ee.height,M.format,M.type);for(const $ of M.layerUpdates){const ne=ee.data.subarray($*q/ee.data.BYTES_PER_ELEMENT,($+1)*q/ee.data.BYTES_PER_ELEMENT);t.texSubImage3D(r.TEXTURE_2D_ARRAY,0,0,0,$,ee.width,ee.height,1,le,ze,ne)}M.clearLayerUpdates()}else t.texSubImage3D(r.TEXTURE_2D_ARRAY,0,0,0,0,ee.width,ee.height,ee.depth,le,ze,ee.data)}else t.texImage3D(r.TEXTURE_2D_ARRAY,0,Ee,ee.width,ee.height,ee.depth,0,le,ze,ee.data);else if(M.isData3DTexture)De?(Qe&&t.texStorage3D(r.TEXTURE_3D,te,Ee,ee.width,ee.height,ee.depth),D&&t.texSubImage3D(r.TEXTURE_3D,0,0,0,0,ee.width,ee.height,ee.depth,le,ze,ee.data)):t.texImage3D(r.TEXTURE_3D,0,Ee,ee.width,ee.height,ee.depth,0,le,ze,ee.data);else if(M.isFramebufferTexture){if(Qe)if(De)t.texStorage2D(r.TEXTURE_2D,te,Ee,ee.width,ee.height);else{let q=ee.width,$=ee.height;for(let ne=0;ne>=1,$>>=1}}else if(Te.length>0){if(De&&Qe){const q=Ce(Te[0]);t.texStorage2D(r.TEXTURE_2D,te,Ee,q.width,q.height)}for(let q=0,$=Te.length;q<$;q++)de=Te[q],De?D&&t.texSubImage2D(r.TEXTURE_2D,q,0,0,le,ze,de):t.texImage2D(r.TEXTURE_2D,q,Ee,le,ze,de);M.generateMipmaps=!1}else if(De){if(Qe){const q=Ce(ee);t.texStorage2D(r.TEXTURE_2D,te,Ee,q.width,q.height)}D&&t.texSubImage2D(r.TEXTURE_2D,0,0,0,le,ze,ee)}else t.texImage2D(r.TEXTURE_2D,0,Ee,le,ze,ee);p(M)&&m(J),ye.__version=K.version,M.onUpdate&&M.onUpdate(M)}R.__version=M.version}function W(R,M,k){if(M.image.length!==6)return;const J=Be(R,M),Z=M.source;t.bindTexture(r.TEXTURE_CUBE_MAP,R.__webglTexture,r.TEXTURE0+k);const K=i.get(Z);if(Z.version!==K.__version||J===!0){t.activeTexture(r.TEXTURE0+k);const ye=je.getPrimaries(je.workingColorSpace),re=M.colorSpace===en?null:je.getPrimaries(M.colorSpace),ue=M.colorSpace===en||ye===re?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,M.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,M.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,M.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,ue);const Pe=M.isCompressedTexture||M.image[0].isCompressedTexture,ee=M.image[0]&&M.image[0].isDataTexture,le=[];for(let $=0;$<6;$++)!Pe&&!ee?le[$]=x(M.image[$],!0,n.maxCubemapSize):le[$]=ee?M.image[$].image:M.image[$],le[$]=Ae(M,le[$]);const ze=le[0],Ee=s.convert(M.format,M.colorSpace),de=s.convert(M.type),Te=b(M.internalFormat,Ee,de,M.colorSpace),De=M.isVideoTexture!==!0,Qe=K.__version===void 0||J===!0,D=Z.dataReady;let te=v(M,ze);fe(r.TEXTURE_CUBE_MAP,M);let q;if(Pe){De&&Qe&&t.texStorage2D(r.TEXTURE_CUBE_MAP,te,Te,ze.width,ze.height);for(let $=0;$<6;$++){q=le[$].mipmaps;for(let ne=0;ne0&&te++;const $=Ce(le[0]);t.texStorage2D(r.TEXTURE_CUBE_MAP,te,Te,$.width,$.height)}for(let $=0;$<6;$++)if(ee){De?D&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+$,0,0,0,le[$].width,le[$].height,Ee,de,le[$].data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+$,0,Te,le[$].width,le[$].height,0,Ee,de,le[$].data);for(let ne=0;ne>K),le=Math.max(1,M.height>>K);Z===r.TEXTURE_3D||Z===r.TEXTURE_2D_ARRAY?t.texImage3D(Z,K,ue,ee,le,M.depth,0,ye,re,null):t.texImage2D(Z,K,ue,ee,le,0,ye,re,null)}t.bindFramebuffer(r.FRAMEBUFFER,R),xe(M)?o.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,J,Z,i.get(k).__webglTexture,0,Je(M)):(Z===r.TEXTURE_2D||Z>=r.TEXTURE_CUBE_MAP_POSITIVE_X&&Z<=r.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&r.framebufferTexture2D(r.FRAMEBUFFER,J,Z,i.get(k).__webglTexture,K),t.bindFramebuffer(r.FRAMEBUFFER,null)}function pe(R,M,k){if(r.bindRenderbuffer(r.RENDERBUFFER,R),M.depthBuffer){const J=M.depthTexture,Z=J&&J.isDepthTexture?J.type:null,K=y(M.stencilBuffer,Z),ye=M.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,re=Je(M);xe(M)?o.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,re,K,M.width,M.height):k?r.renderbufferStorageMultisample(r.RENDERBUFFER,re,K,M.width,M.height):r.renderbufferStorage(r.RENDERBUFFER,K,M.width,M.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,ye,r.RENDERBUFFER,R)}else{const J=M.textures;for(let Z=0;Z1;if(ye||(J.__webglTexture===void 0&&(J.__webglTexture=r.createTexture()),J.__version=M.version,a.memory.textures++),K){k.__webglFramebuffer=[];for(let re=0;re<6;re++)if(M.mipmaps&&M.mipmaps.length>0){k.__webglFramebuffer[re]=[];for(let ue=0;ue0){k.__webglFramebuffer=[];for(let re=0;re0&&xe(R)===!1){k.__webglMultisampledFramebuffer=r.createFramebuffer(),k.__webglColorRenderbuffer=[],t.bindFramebuffer(r.FRAMEBUFFER,k.__webglMultisampledFramebuffer);for(let re=0;re0)for(let ue=0;ue0)for(let ue=0;ue0){if(xe(R)===!1){const M=R.textures,k=R.width,J=R.height;let Z=r.COLOR_BUFFER_BIT;const K=R.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,ye=i.get(R),re=M.length>1;if(re)for(let ue=0;ue0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&M.__useRenderToTexture!==!1}function at(R){const M=a.render.frame;h.get(R)!==M&&(h.set(R,M),R.update())}function Ae(R,M){const k=R.colorSpace,J=R.format,Z=R.type;return R.isCompressedTexture===!0||R.isVideoTexture===!0||k!==ln&&k!==en&&(je.getTransfer(k)===Ze?(J!==ri||Z!==Oi)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",k)),M}function Ce(R){return typeof HTMLImageElement<"u"&&R instanceof HTMLImageElement?(c.width=R.naturalWidth||R.width,c.height=R.naturalHeight||R.height):typeof VideoFrame<"u"&&R instanceof VideoFrame?(c.width=R.displayWidth,c.height=R.displayHeight):(c.width=R.width,c.height=R.height),c}this.allocateTextureUnit=V,this.resetTextureUnits=P,this.setTexture2D=X,this.setTexture2DArray=Y,this.setTexture3D=G,this.setTextureCube=j,this.rebindTextures=Ie,this.setupRenderTarget=Fe,this.updateRenderTargetMipmap=tt,this.updateMultisampleRenderTarget=qe,this.setupDepthRenderbuffer=Re,this.setupFrameBufferTexture=Q,this.useMultisampledRTT=xe}function rx(r,e){function t(i,n=en){let s;const a=je.getTransfer(n);if(i===Oi)return r.UNSIGNED_BYTE;if(i===nc)return r.UNSIGNED_SHORT_4_4_4_4;if(i===sc)return r.UNSIGNED_SHORT_5_5_5_1;if(i===$u)return r.UNSIGNED_INT_5_9_9_9_REV;if(i===qu)return r.BYTE;if(i===Yu)return r.SHORT;if(i===cr)return r.UNSIGNED_SHORT;if(i===ic)return r.INT;if(i===Ln)return r.UNSIGNED_INT;if(i===Ui)return r.FLOAT;if(i===_r)return r.HALF_FLOAT;if(i===ju)return r.ALPHA;if(i===Ku)return r.RGB;if(i===ri)return r.RGBA;if(i===Ju)return r.LUMINANCE;if(i===Zu)return r.LUMINANCE_ALPHA;if(i===vs)return r.DEPTH_COMPONENT;if(i===Rs)return r.DEPTH_STENCIL;if(i===Qu)return r.RED;if(i===rc)return r.RED_INTEGER;if(i===ed)return r.RG;if(i===ac)return r.RG_INTEGER;if(i===oc)return r.RGBA_INTEGER;if(i===Ta||i===Ra||i===Ca||i===Pa)if(a===Ze)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(i===Ta)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(i===Ra)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(i===Ca)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(i===Pa)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(i===Ta)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===Ra)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===Ca)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===Pa)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(i===ml||i===gl||i===_l||i===xl)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(i===ml)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===gl)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===_l)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===xl)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(i===yl||i===Ml||i===vl)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(i===yl||i===Ml)return a===Ze?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(i===vl)return a===Ze?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(i===Sl||i===wl||i===bl||i===El||i===Al||i===Tl||i===Rl||i===Cl||i===Pl||i===Ll||i===Il||i===Dl||i===Nl||i===Ul)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(i===Sl)return a===Ze?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(i===wl)return a===Ze?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(i===bl)return a===Ze?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(i===El)return a===Ze?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(i===Al)return a===Ze?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(i===Tl)return a===Ze?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(i===Rl)return a===Ze?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(i===Cl)return a===Ze?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(i===Pl)return a===Ze?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(i===Ll)return a===Ze?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(i===Il)return a===Ze?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(i===Dl)return a===Ze?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(i===Nl)return a===Ze?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(i===Ul)return a===Ze?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(i===La||i===Fl||i===Ol)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(i===La)return a===Ze?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(i===Fl)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(i===Ol)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(i===td||i===Bl||i===zl||i===kl)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(i===La)return s.COMPRESSED_RED_RGTC1_EXT;if(i===Bl)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(i===zl)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(i===kl)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return i===Ts?r.UNSIGNED_INT_24_8:r[i]!==void 0?r[i]:null}return{convert:t}}class ax extends Xt{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}let Zr=class extends $t{constructor(){super(),this.isGroup=!0,this.type="Group"}};const ox={type:"move"};class Co{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Zr,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Zr,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new g,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new g),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Zr,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new g,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new g),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,i){let n=null,s=null,a=null;const o=this._targetRay,l=this._grip,c=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(c&&e.hand){a=!0;for(const x of e.hand.values()){const p=t.getJointPose(x,i),m=this._getHandJoint(c,x);p!==null&&(m.matrix.fromArray(p.transform.matrix),m.matrix.decompose(m.position,m.rotation,m.scale),m.matrixWorldNeedsUpdate=!0,m.jointRadius=p.radius),m.visible=p!==null}const h=c.joints["index-finger-tip"],u=c.joints["thumb-tip"],d=h.position.distanceTo(u.position),f=.02,_=.005;c.inputState.pinching&&d>f+_?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&d<=f-_&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=t.getPose(e.gripSpace,i),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));o!==null&&(n=t.getPose(e.targetRaySpace,i),n===null&&s!==null&&(n=s),n!==null&&(o.matrix.fromArray(n.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,n.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(n.linearVelocity)):o.hasLinearVelocity=!1,n.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(n.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(ox)))}return o!==null&&(o.visible=n!==null),l!==null&&(l.visible=s!==null),c!==null&&(c.visible=a!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new Zr;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}const lx=` +void main() { + + gl_Position = vec4( position, 1.0 ); + +}`,cx=` +uniform sampler2DArray depthColor; +uniform float depthWidth; +uniform float depthHeight; + +void main() { + + vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); + + if ( coord.x >= 1.0 ) { + + gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; + + } else { + + gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; + + } + +}`;class hx{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,i){if(this.texture===null){const n=new gi,s=e.properties.get(n);s.__webglTexture=t.texture,(t.depthNear!=i.depthNear||t.depthFar!=i.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=n}}getMesh(e){if(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,i=new on({vertexShader:lx,fragmentShader:cx,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new kt(new wr(20,20),i)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class ux extends Ds{constructor(e,t){super();const i=this;let n=null,s=1,a=null,o="local-floor",l=1,c=null,h=null,u=null,d=null,f=null,_=null;const x=new hx,p=t.getContextAttributes();let m=null,b=null;const y=[],v=[],L=new ve;let T=null;const A=new Xt;A.layers.enable(1),A.viewport=new Mt;const I=new Xt;I.layers.enable(2),I.viewport=new Mt;const E=[A,I],S=new ax;S.layers.enable(1),S.layers.enable(2);let P=null,V=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(W){let Q=y[W];return Q===void 0&&(Q=new Co,y[W]=Q),Q.getTargetRaySpace()},this.getControllerGrip=function(W){let Q=y[W];return Q===void 0&&(Q=new Co,y[W]=Q),Q.getGripSpace()},this.getHand=function(W){let Q=y[W];return Q===void 0&&(Q=new Co,y[W]=Q),Q.getHandSpace()};function F(W){const Q=v.indexOf(W.inputSource);if(Q===-1)return;const pe=y[Q];pe!==void 0&&(pe.update(W.inputSource,W.frame,c||a),pe.dispatchEvent({type:W.type,data:W.inputSource}))}function X(){n.removeEventListener("select",F),n.removeEventListener("selectstart",F),n.removeEventListener("selectend",F),n.removeEventListener("squeeze",F),n.removeEventListener("squeezestart",F),n.removeEventListener("squeezeend",F),n.removeEventListener("end",X),n.removeEventListener("inputsourceschange",Y);for(let W=0;W=0&&(v[he]=null,y[he].disconnect(pe))}for(let Q=0;Q=v.length){v.push(pe),he=Ie;break}else if(v[Ie]===null){v[Ie]=pe,he=Ie;break}if(he===-1)break}const Re=y[he];Re&&Re.connect(pe)}}const G=new g,j=new g;function H(W,Q,pe){G.setFromMatrixPosition(Q.matrixWorld),j.setFromMatrixPosition(pe.matrixWorld);const he=G.distanceTo(j),Re=Q.projectionMatrix.elements,Ie=pe.projectionMatrix.elements,Fe=Re[14]/(Re[10]-1),tt=Re[14]/(Re[10]+1),C=(Re[9]+1)/Re[5],rt=(Re[9]-1)/Re[5],qe=(Re[8]-1)/Re[0],Je=(Ie[8]+1)/Ie[0],xe=Fe*qe,at=Fe*Je,Ae=he/(-qe+Je),Ce=Ae*-qe;Q.matrixWorld.decompose(W.position,W.quaternion,W.scale),W.translateX(Ce),W.translateZ(Ae),W.matrixWorld.compose(W.position,W.quaternion,W.scale),W.matrixWorldInverse.copy(W.matrixWorld).invert();const R=Fe+Ae,M=tt+Ae,k=xe-Ce,J=at+(he-Ce),Z=C*tt/M*R,K=rt*tt/M*R;W.projectionMatrix.makePerspective(k,J,Z,K,R,M),W.projectionMatrixInverse.copy(W.projectionMatrix).invert()}function oe(W,Q){Q===null?W.matrixWorld.copy(W.matrix):W.matrixWorld.multiplyMatrices(Q.matrixWorld,W.matrix),W.matrixWorldInverse.copy(W.matrixWorld).invert()}this.updateCamera=function(W){if(n===null)return;x.texture!==null&&(W.near=x.depthNear,W.far=x.depthFar),S.near=I.near=A.near=W.near,S.far=I.far=A.far=W.far,(P!==S.near||V!==S.far)&&(n.updateRenderState({depthNear:S.near,depthFar:S.far}),P=S.near,V=S.far,A.near=P,A.far=V,I.near=P,I.far=V,A.updateProjectionMatrix(),I.updateProjectionMatrix(),W.updateProjectionMatrix());const Q=W.parent,pe=S.cameras;oe(S,Q);for(let he=0;he0&&(p.alphaTest.value=m.alphaTest);const b=e.get(m),y=b.envMap,v=b.envMapRotation;y&&(p.envMap.value=y,gn.copy(v),gn.x*=-1,gn.y*=-1,gn.z*=-1,y.isCubeTexture&&y.isRenderTargetTexture===!1&&(gn.y*=-1,gn.z*=-1),p.envMapRotation.value.setFromMatrix4(dx.makeRotationFromEuler(gn)),p.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,p.reflectivity.value=m.reflectivity,p.ior.value=m.ior,p.refractionRatio.value=m.refractionRatio),m.lightMap&&(p.lightMap.value=m.lightMap,p.lightMapIntensity.value=m.lightMapIntensity,t(m.lightMap,p.lightMapTransform)),m.aoMap&&(p.aoMap.value=m.aoMap,p.aoMapIntensity.value=m.aoMapIntensity,t(m.aoMap,p.aoMapTransform))}function a(p,m){p.diffuse.value.copy(m.color),p.opacity.value=m.opacity,m.map&&(p.map.value=m.map,t(m.map,p.mapTransform))}function o(p,m){p.dashSize.value=m.dashSize,p.totalSize.value=m.dashSize+m.gapSize,p.scale.value=m.scale}function l(p,m,b,y){p.diffuse.value.copy(m.color),p.opacity.value=m.opacity,p.size.value=m.size*b,p.scale.value=y*.5,m.map&&(p.map.value=m.map,t(m.map,p.uvTransform)),m.alphaMap&&(p.alphaMap.value=m.alphaMap,t(m.alphaMap,p.alphaMapTransform)),m.alphaTest>0&&(p.alphaTest.value=m.alphaTest)}function c(p,m){p.diffuse.value.copy(m.color),p.opacity.value=m.opacity,p.rotation.value=m.rotation,m.map&&(p.map.value=m.map,t(m.map,p.mapTransform)),m.alphaMap&&(p.alphaMap.value=m.alphaMap,t(m.alphaMap,p.alphaMapTransform)),m.alphaTest>0&&(p.alphaTest.value=m.alphaTest)}function h(p,m){p.specular.value.copy(m.specular),p.shininess.value=Math.max(m.shininess,1e-4)}function u(p,m){m.gradientMap&&(p.gradientMap.value=m.gradientMap)}function d(p,m){p.metalness.value=m.metalness,m.metalnessMap&&(p.metalnessMap.value=m.metalnessMap,t(m.metalnessMap,p.metalnessMapTransform)),p.roughness.value=m.roughness,m.roughnessMap&&(p.roughnessMap.value=m.roughnessMap,t(m.roughnessMap,p.roughnessMapTransform)),m.envMap&&(p.envMapIntensity.value=m.envMapIntensity)}function f(p,m,b){p.ior.value=m.ior,m.sheen>0&&(p.sheenColor.value.copy(m.sheenColor).multiplyScalar(m.sheen),p.sheenRoughness.value=m.sheenRoughness,m.sheenColorMap&&(p.sheenColorMap.value=m.sheenColorMap,t(m.sheenColorMap,p.sheenColorMapTransform)),m.sheenRoughnessMap&&(p.sheenRoughnessMap.value=m.sheenRoughnessMap,t(m.sheenRoughnessMap,p.sheenRoughnessMapTransform))),m.clearcoat>0&&(p.clearcoat.value=m.clearcoat,p.clearcoatRoughness.value=m.clearcoatRoughness,m.clearcoatMap&&(p.clearcoatMap.value=m.clearcoatMap,t(m.clearcoatMap,p.clearcoatMapTransform)),m.clearcoatRoughnessMap&&(p.clearcoatRoughnessMap.value=m.clearcoatRoughnessMap,t(m.clearcoatRoughnessMap,p.clearcoatRoughnessMapTransform)),m.clearcoatNormalMap&&(p.clearcoatNormalMap.value=m.clearcoatNormalMap,t(m.clearcoatNormalMap,p.clearcoatNormalMapTransform),p.clearcoatNormalScale.value.copy(m.clearcoatNormalScale),m.side===Pt&&p.clearcoatNormalScale.value.negate())),m.dispersion>0&&(p.dispersion.value=m.dispersion),m.iridescence>0&&(p.iridescence.value=m.iridescence,p.iridescenceIOR.value=m.iridescenceIOR,p.iridescenceThicknessMinimum.value=m.iridescenceThicknessRange[0],p.iridescenceThicknessMaximum.value=m.iridescenceThicknessRange[1],m.iridescenceMap&&(p.iridescenceMap.value=m.iridescenceMap,t(m.iridescenceMap,p.iridescenceMapTransform)),m.iridescenceThicknessMap&&(p.iridescenceThicknessMap.value=m.iridescenceThicknessMap,t(m.iridescenceThicknessMap,p.iridescenceThicknessMapTransform))),m.transmission>0&&(p.transmission.value=m.transmission,p.transmissionSamplerMap.value=b.texture,p.transmissionSamplerSize.value.set(b.width,b.height),m.transmissionMap&&(p.transmissionMap.value=m.transmissionMap,t(m.transmissionMap,p.transmissionMapTransform)),p.thickness.value=m.thickness,m.thicknessMap&&(p.thicknessMap.value=m.thicknessMap,t(m.thicknessMap,p.thicknessMapTransform)),p.attenuationDistance.value=m.attenuationDistance,p.attenuationColor.value.copy(m.attenuationColor)),m.anisotropy>0&&(p.anisotropyVector.value.set(m.anisotropy*Math.cos(m.anisotropyRotation),m.anisotropy*Math.sin(m.anisotropyRotation)),m.anisotropyMap&&(p.anisotropyMap.value=m.anisotropyMap,t(m.anisotropyMap,p.anisotropyMapTransform))),p.specularIntensity.value=m.specularIntensity,p.specularColor.value.copy(m.specularColor),m.specularColorMap&&(p.specularColorMap.value=m.specularColorMap,t(m.specularColorMap,p.specularColorMapTransform)),m.specularIntensityMap&&(p.specularIntensityMap.value=m.specularIntensityMap,t(m.specularIntensityMap,p.specularIntensityMapTransform))}function _(p,m){m.matcap&&(p.matcap.value=m.matcap)}function x(p,m){const b=e.get(m).light;p.referencePosition.value.setFromMatrixPosition(b.matrixWorld),p.nearDistance.value=b.shadow.camera.near,p.farDistance.value=b.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:n}}function px(r,e,t,i){let n={},s={},a=[];const o=r.getParameter(r.MAX_UNIFORM_BUFFER_BINDINGS);function l(b,y){const v=y.program;i.uniformBlockBinding(b,v)}function c(b,y){let v=n[b.id];v===void 0&&(_(b),v=h(b),n[b.id]=v,b.addEventListener("dispose",p));const L=y.program;i.updateUBOMapping(b,L);const T=e.render.frame;s[b.id]!==T&&(d(b),s[b.id]=T)}function h(b){const y=u();b.__bindingPointIndex=y;const v=r.createBuffer(),L=b.__size,T=b.usage;return r.bindBuffer(r.UNIFORM_BUFFER,v),r.bufferData(r.UNIFORM_BUFFER,L,T),r.bindBuffer(r.UNIFORM_BUFFER,null),r.bindBufferBase(r.UNIFORM_BUFFER,y,v),v}function u(){for(let b=0;b0&&(v+=L-T),b.__size=v,b.__cache={},this}function x(b){const y={boundary:0,storage:0};return typeof b=="number"||typeof b=="boolean"?(y.boundary=4,y.storage=4):b.isVector2?(y.boundary=8,y.storage=8):b.isVector3||b.isColor?(y.boundary=16,y.storage=12):b.isVector4?(y.boundary=16,y.storage=16):b.isMatrix3?(y.boundary=48,y.storage=48):b.isMatrix4?(y.boundary=64,y.storage=64):b.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",b),y}function p(b){const y=b.target;y.removeEventListener("dispose",p);const v=a.indexOf(y.__bindingPointIndex);a.splice(v,1),r.deleteBuffer(n[y.id]),delete n[y.id],delete s[y.id]}function m(){for(const b in n)r.deleteBuffer(n[b]);a=[],n={},s={}}return{bind:l,update:c,dispose:m}}class mx{constructor(e={}){const{canvas:t=rp(),context:i=null,depth:n=!0,stencil:s=!1,alpha:a=!1,antialias:o=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:h="default",failIfMajorPerformanceCaveat:u=!1}=e;this.isWebGLRenderer=!0;let d;if(i!==null){if(typeof WebGLRenderingContext<"u"&&i instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");d=i.getContextAttributes().alpha}else d=a;const f=new Uint32Array(4),_=new Int32Array(4);let x=null,p=null;const m=[],b=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=hi,this.toneMapping=sn,this.toneMappingExposure=1;const y=this;let v=!1,L=0,T=0,A=null,I=-1,E=null;const S=new Mt,P=new Mt;let V=null;const F=new He(0);let X=0,Y=t.width,G=t.height,j=1,H=null,oe=null;const ce=new Mt(0,0,Y,G),fe=new Mt(0,0,Y,G);let Be=!1;const Ke=new hc;let W=!1,Q=!1;const pe=new dt,he=new g,Re=new Mt,Ie={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let Fe=!1;function tt(){return A===null?j:1}let C=i;function rt(w,N){return t.getContext(w,N)}try{const w={alpha:!0,depth:n,stencil:s,antialias:o,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:h,failIfMajorPerformanceCaveat:u};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${cf}`),t.addEventListener("webglcontextlost",q,!1),t.addEventListener("webglcontextrestored",$,!1),t.addEventListener("webglcontextcreationerror",ne,!1),C===null){const N="webgl2";if(C=rt(N,w),C===null)throw rt(N)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(w){throw console.error("THREE.WebGLRenderer: "+w.message),w}let qe,Je,xe,at,Ae,Ce,R,M,k,J,Z,K,ye,re,ue,Pe,ee,le,ze,Ee,de,Te,De,Qe;function D(){qe=new Sg(C),qe.init(),Te=new rx(C,qe),Je=new gg(C,qe,e,Te),xe=new ix(C),at=new Eg(C),Ae=new V_,Ce=new sx(C,qe,xe,Ae,Je,Te,at),R=new xg(y),M=new vg(y),k=new Ip(C),De=new pg(C,k),J=new wg(C,k,at,De),Z=new Tg(C,J,k,at),ze=new Ag(C,Je,Ce),Pe=new _g(Ae),K=new H_(y,R,M,qe,Je,De,Pe),ye=new fx(y,Ae),re=new W_,ue=new K_(qe),le=new fg(y,R,M,xe,Z,d,l),ee=new tx(y,Z,Je),Qe=new px(C,at,Je,xe),Ee=new mg(C,qe,at),de=new bg(C,qe,at),at.programs=K.programs,y.capabilities=Je,y.extensions=qe,y.properties=Ae,y.renderLists=re,y.shadowMap=ee,y.state=xe,y.info=at}D();const te=new ux(y,C);this.xr=te,this.getContext=function(){return C},this.getContextAttributes=function(){return C.getContextAttributes()},this.forceContextLoss=function(){const w=qe.get("WEBGL_lose_context");w&&w.loseContext()},this.forceContextRestore=function(){const w=qe.get("WEBGL_lose_context");w&&w.restoreContext()},this.getPixelRatio=function(){return j},this.setPixelRatio=function(w){w!==void 0&&(j=w,this.setSize(Y,G,!1))},this.getSize=function(w){return w.set(Y,G)},this.setSize=function(w,N,O=!0){if(te.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}Y=w,G=N,t.width=Math.floor(w*j),t.height=Math.floor(N*j),O===!0&&(t.style.width=w+"px",t.style.height=N+"px"),this.setViewport(0,0,w,N)},this.getDrawingBufferSize=function(w){return w.set(Y*j,G*j).floor()},this.setDrawingBufferSize=function(w,N,O){Y=w,G=N,j=O,t.width=Math.floor(w*O),t.height=Math.floor(N*O),this.setViewport(0,0,w,N)},this.getCurrentViewport=function(w){return w.copy(S)},this.getViewport=function(w){return w.copy(ce)},this.setViewport=function(w,N,O,B){w.isVector4?ce.set(w.x,w.y,w.z,w.w):ce.set(w,N,O,B),xe.viewport(S.copy(ce).multiplyScalar(j).round())},this.getScissor=function(w){return w.copy(fe)},this.setScissor=function(w,N,O,B){w.isVector4?fe.set(w.x,w.y,w.z,w.w):fe.set(w,N,O,B),xe.scissor(P.copy(fe).multiplyScalar(j).round())},this.getScissorTest=function(){return Be},this.setScissorTest=function(w){xe.setScissorTest(Be=w)},this.setOpaqueSort=function(w){H=w},this.setTransparentSort=function(w){oe=w},this.getClearColor=function(w){return w.copy(le.getClearColor())},this.setClearColor=function(){le.setClearColor.apply(le,arguments)},this.getClearAlpha=function(){return le.getClearAlpha()},this.setClearAlpha=function(){le.setClearAlpha.apply(le,arguments)},this.clear=function(w=!0,N=!0,O=!0){let B=0;if(w){let U=!1;if(A!==null){const ie=A.texture.format;U=ie===oc||ie===ac||ie===rc}if(U){const ie=A.texture.type,ae=ie===Oi||ie===Ln||ie===cr||ie===Ts||ie===nc||ie===sc,me=le.getClearColor(),ge=le.getClearAlpha(),we=me.r,be=me.g,Me=me.b;ae?(f[0]=we,f[1]=be,f[2]=Me,f[3]=ge,C.clearBufferuiv(C.COLOR,0,f)):(_[0]=we,_[1]=be,_[2]=Me,_[3]=ge,C.clearBufferiv(C.COLOR,0,_))}else B|=C.COLOR_BUFFER_BIT}N&&(B|=C.DEPTH_BUFFER_BIT),O&&(B|=C.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),C.clear(B)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",q,!1),t.removeEventListener("webglcontextrestored",$,!1),t.removeEventListener("webglcontextcreationerror",ne,!1),re.dispose(),ue.dispose(),Ae.dispose(),R.dispose(),M.dispose(),Z.dispose(),De.dispose(),Qe.dispose(),K.dispose(),te.dispose(),te.removeEventListener("sessionstart",ci),te.removeEventListener("sessionend",Lc),hn.stop()};function q(w){w.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),v=!0}function $(){console.log("THREE.WebGLRenderer: Context Restored."),v=!1;const w=at.autoReset,N=ee.enabled,O=ee.autoUpdate,B=ee.needsUpdate,U=ee.type;D(),at.autoReset=w,ee.enabled=N,ee.autoUpdate=O,ee.needsUpdate=B,ee.type=U}function ne(w){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",w.statusMessage)}function Se(w){const N=w.target;N.removeEventListener("dispose",Se),ke(N)}function ke(w){ot(w),Ae.remove(w)}function ot(w){const N=Ae.get(w).programs;N!==void 0&&(N.forEach(function(O){K.releaseProgram(O)}),w.isShaderMaterial&&K.releaseShaderCache(w))}this.renderBufferDirect=function(w,N,O,B,U,ie){N===null&&(N=Ie);const ae=U.isMesh&&U.matrixWorld.determinant()<0,me=rf(w,N,O,B,U);xe.setMaterial(B,ae);let ge=O.index,we=1;if(B.wireframe===!0){if(ge=J.getWireframeAttribute(O),ge===void 0)return;we=2}const be=O.drawRange,Me=O.attributes.position;let Ge=be.start*we,it=(be.start+be.count)*we;ie!==null&&(Ge=Math.max(Ge,ie.start*we),it=Math.min(it,(ie.start+ie.count)*we)),ge!==null?(Ge=Math.max(Ge,0),it=Math.min(it,ge.count)):Me!=null&&(Ge=Math.max(Ge,0),it=Math.min(it,Me.count));const nt=it-Ge;if(nt<0||nt===1/0)return;De.setup(U,B,me,O,ge);let Lt,We=Ee;if(ge!==null&&(Lt=k.get(ge),We=de,We.setIndex(Lt)),U.isMesh)B.wireframe===!0?(xe.setLineWidth(B.wireframeLinewidth*tt()),We.setMode(C.LINES)):We.setMode(C.TRIANGLES);else if(U.isLine){let _e=B.linewidth;_e===void 0&&(_e=1),xe.setLineWidth(_e*tt()),U.isLineSegments?We.setMode(C.LINES):U.isLineLoop?We.setMode(C.LINE_LOOP):We.setMode(C.LINE_STRIP)}else U.isPoints?We.setMode(C.POINTS):U.isSprite&&We.setMode(C.TRIANGLES);if(U.isBatchedMesh)if(U._multiDrawInstances!==null)We.renderMultiDrawInstances(U._multiDrawStarts,U._multiDrawCounts,U._multiDrawCount,U._multiDrawInstances);else if(qe.get("WEBGL_multi_draw"))We.renderMultiDraw(U._multiDrawStarts,U._multiDrawCounts,U._multiDrawCount);else{const _e=U._multiDrawStarts,yt=U._multiDrawCounts,Xe=U._multiDrawCount,Kt=ge?k.get(ge).bytesPerElement:1,Fn=Ae.get(B).currentProgram.getUniforms();for(let It=0;It{function ie(){if(B.forEach(function(ae){Ae.get(ae).currentProgram.isReady()&&B.delete(ae)}),B.size===0){U(w);return}setTimeout(ie,10)}qe.get("KHR_parallel_shader_compile")!==null?ie():setTimeout(ie,10)})};let Ve=null;function vi(w){Ve&&Ve(w)}function ci(){hn.stop()}function Lc(){hn.start()}const hn=new vd;hn.setAnimationLoop(vi),typeof self<"u"&&hn.setContext(self),this.setAnimationLoop=function(w){Ve=w,te.setAnimationLoop(w),w===null?hn.stop():hn.start()},te.addEventListener("sessionstart",ci),te.addEventListener("sessionend",Lc),this.render=function(w,N){if(N!==void 0&&N.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(v===!0)return;if(w.matrixWorldAutoUpdate===!0&&w.updateMatrixWorld(),N.parent===null&&N.matrixWorldAutoUpdate===!0&&N.updateMatrixWorld(),te.enabled===!0&&te.isPresenting===!0&&(te.cameraAutoUpdate===!0&&te.updateCamera(N),N=te.getCamera()),w.isScene===!0&&w.onBeforeRender(y,w,N,A),p=ue.get(w,b.length),p.init(N),b.push(p),pe.multiplyMatrices(N.projectionMatrix,N.matrixWorldInverse),Ke.setFromProjectionMatrix(pe),Q=this.localClippingEnabled,W=Pe.init(this.clippingPlanes,Q),x=re.get(w,m.length),x.init(),m.push(x),te.enabled===!0&&te.isPresenting===!0){const ie=y.xr.getDepthSensingMesh();ie!==null&&Ja(ie,N,-1/0,y.sortObjects)}Ja(w,N,0,y.sortObjects),x.finish(),y.sortObjects===!0&&x.sort(H,oe),Fe=te.enabled===!1||te.isPresenting===!1||te.hasDepthSensing()===!1,Fe&&le.addToRenderList(x,w),this.info.render.frame++,W===!0&&Pe.beginShadows();const O=p.state.shadowsArray;ee.render(O,w,N),W===!0&&Pe.endShadows(),this.info.autoReset===!0&&this.info.reset();const B=x.opaque,U=x.transmissive;if(p.setupLights(),N.isArrayCamera){const ie=N.cameras;if(U.length>0)for(let ae=0,me=ie.length;ae0&&Dc(B,U,w,N),Fe&&le.render(w),Ic(x,w,N);A!==null&&(Ce.updateMultisampleRenderTarget(A),Ce.updateRenderTargetMipmap(A)),w.isScene===!0&&w.onAfterRender(y,w,N),De.resetDefaultState(),I=-1,E=null,b.pop(),b.length>0?(p=b[b.length-1],W===!0&&Pe.setGlobalState(y.clippingPlanes,p.state.camera)):p=null,m.pop(),m.length>0?x=m[m.length-1]:x=null};function Ja(w,N,O,B){if(w.visible===!1)return;if(w.layers.test(N.layers)){if(w.isGroup)O=w.renderOrder;else if(w.isLOD)w.autoUpdate===!0&&w.update(N);else if(w.isLight)p.pushLight(w),w.castShadow&&p.pushShadow(w);else if(w.isSprite){if(!w.frustumCulled||Ke.intersectsSprite(w)){B&&Re.setFromMatrixPosition(w.matrixWorld).applyMatrix4(pe);const ae=Z.update(w),me=w.material;me.visible&&x.push(w,ae,me,O,Re.z,null)}}else if((w.isMesh||w.isLine||w.isPoints)&&(!w.frustumCulled||Ke.intersectsObject(w))){const ae=Z.update(w),me=w.material;if(B&&(w.boundingSphere!==void 0?(w.boundingSphere===null&&w.computeBoundingSphere(),Re.copy(w.boundingSphere.center)):(ae.boundingSphere===null&&ae.computeBoundingSphere(),Re.copy(ae.boundingSphere.center)),Re.applyMatrix4(w.matrixWorld).applyMatrix4(pe)),Array.isArray(me)){const ge=ae.groups;for(let we=0,be=ge.length;we0&&Tr(U,N,O),ie.length>0&&Tr(ie,N,O),ae.length>0&&Tr(ae,N,O),xe.buffers.depth.setTest(!0),xe.buffers.depth.setMask(!0),xe.buffers.color.setMask(!0),xe.setPolygonOffset(!1)}function Dc(w,N,O,B){if((O.isScene===!0?O.overrideMaterial:null)!==null)return;p.state.transmissionRenderTarget[B.id]===void 0&&(p.state.transmissionRenderTarget[B.id]=new In(1,1,{generateMipmaps:!0,type:qe.has("EXT_color_buffer_half_float")||qe.has("EXT_color_buffer_float")?_r:Oi,minFilter:Rn,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:je.workingColorSpace}));const ie=p.state.transmissionRenderTarget[B.id],ae=B.viewport||S;ie.setSize(ae.z,ae.w);const me=y.getRenderTarget();y.setRenderTarget(ie),y.getClearColor(F),X=y.getClearAlpha(),X<1&&y.setClearColor(16777215,.5),Fe?le.render(O):y.clear();const ge=y.toneMapping;y.toneMapping=sn;const we=B.viewport;if(B.viewport!==void 0&&(B.viewport=void 0),p.setupLightsView(B),W===!0&&Pe.setGlobalState(y.clippingPlanes,B),Tr(w,O,B),Ce.updateMultisampleRenderTarget(ie),Ce.updateRenderTargetMipmap(ie),qe.has("WEBGL_multisampled_render_to_texture")===!1){let be=!1;for(let Me=0,Ge=N.length;Me0),Me=!!O.morphAttributes.position,Ge=!!O.morphAttributes.normal,it=!!O.morphAttributes.color;let nt=sn;B.toneMapped&&(A===null||A.isXRRenderTarget===!0)&&(nt=y.toneMapping);const Lt=O.morphAttributes.position||O.morphAttributes.normal||O.morphAttributes.color,We=Lt!==void 0?Lt.length:0,_e=Ae.get(B),yt=p.state.lights;if(W===!0&&(Q===!0||w!==E)){const Ht=w===E&&B.id===I;Pe.setState(B,w,Ht)}let Xe=!1;B.version===_e.__version?(_e.needsLights&&_e.lightsStateVersion!==yt.state.version||_e.outputColorSpace!==me||U.isBatchedMesh&&_e.batching===!1||!U.isBatchedMesh&&_e.batching===!0||U.isBatchedMesh&&_e.batchingColor===!0&&U.colorTexture===null||U.isBatchedMesh&&_e.batchingColor===!1&&U.colorTexture!==null||U.isInstancedMesh&&_e.instancing===!1||!U.isInstancedMesh&&_e.instancing===!0||U.isSkinnedMesh&&_e.skinning===!1||!U.isSkinnedMesh&&_e.skinning===!0||U.isInstancedMesh&&_e.instancingColor===!0&&U.instanceColor===null||U.isInstancedMesh&&_e.instancingColor===!1&&U.instanceColor!==null||U.isInstancedMesh&&_e.instancingMorph===!0&&U.morphTexture===null||U.isInstancedMesh&&_e.instancingMorph===!1&&U.morphTexture!==null||_e.envMap!==ge||B.fog===!0&&_e.fog!==ie||_e.numClippingPlanes!==void 0&&(_e.numClippingPlanes!==Pe.numPlanes||_e.numIntersection!==Pe.numIntersection)||_e.vertexAlphas!==we||_e.vertexTangents!==be||_e.morphTargets!==Me||_e.morphNormals!==Ge||_e.morphColors!==it||_e.toneMapping!==nt||_e.morphTargetsCount!==We)&&(Xe=!0):(Xe=!0,_e.__version=B.version);let Kt=_e.currentProgram;Xe===!0&&(Kt=Rr(B,N,U));let Fn=!1,It=!1,Za=!1;const lt=Kt.getUniforms(),ki=_e.uniforms;if(xe.useProgram(Kt.program)&&(Fn=!0,It=!0,Za=!0),B.id!==I&&(I=B.id,It=!0),Fn||E!==w){lt.setValue(C,"projectionMatrix",w.projectionMatrix),lt.setValue(C,"viewMatrix",w.matrixWorldInverse);const Ht=lt.map.cameraPosition;Ht!==void 0&&Ht.setValue(C,he.setFromMatrixPosition(w.matrixWorld)),Je.logarithmicDepthBuffer&<.setValue(C,"logDepthBufFC",2/(Math.log(w.far+1)/Math.LN2)),(B.isMeshPhongMaterial||B.isMeshToonMaterial||B.isMeshLambertMaterial||B.isMeshBasicMaterial||B.isMeshStandardMaterial||B.isShaderMaterial)&<.setValue(C,"isOrthographic",w.isOrthographicCamera===!0),E!==w&&(E=w,It=!0,Za=!0)}if(U.isSkinnedMesh){lt.setOptional(C,U,"bindMatrix"),lt.setOptional(C,U,"bindMatrixInverse");const Ht=U.skeleton;Ht&&(Ht.boneTexture===null&&Ht.computeBoneTexture(),lt.setValue(C,"boneTexture",Ht.boneTexture,Ce))}U.isBatchedMesh&&(lt.setOptional(C,U,"batchingTexture"),lt.setValue(C,"batchingTexture",U._matricesTexture,Ce),lt.setOptional(C,U,"batchingIdTexture"),lt.setValue(C,"batchingIdTexture",U._indirectTexture,Ce),lt.setOptional(C,U,"batchingColorTexture"),U._colorsTexture!==null&<.setValue(C,"batchingColorTexture",U._colorsTexture,Ce));const Qa=O.morphAttributes;if((Qa.position!==void 0||Qa.normal!==void 0||Qa.color!==void 0)&&ze.update(U,O,Kt),(It||_e.receiveShadow!==U.receiveShadow)&&(_e.receiveShadow=U.receiveShadow,lt.setValue(C,"receiveShadow",U.receiveShadow)),B.isMeshGouraudMaterial&&B.envMap!==null&&(ki.envMap.value=ge,ki.flipEnvMap.value=ge.isCubeTexture&&ge.isRenderTargetTexture===!1?-1:1),B.isMeshStandardMaterial&&B.envMap===null&&N.environment!==null&&(ki.envMapIntensity.value=N.environmentIntensity),It&&(lt.setValue(C,"toneMappingExposure",y.toneMappingExposure),_e.needsLights&&af(ki,Za),ie&&B.fog===!0&&ye.refreshFogUniforms(ki,ie),ye.refreshMaterialUniforms(ki,B,j,G,p.state.transmissionRenderTarget[w.id]),Na.upload(C,Uc(_e),ki,Ce)),B.isShaderMaterial&&B.uniformsNeedUpdate===!0&&(Na.upload(C,Uc(_e),ki,Ce),B.uniformsNeedUpdate=!1),B.isSpriteMaterial&<.setValue(C,"center",U.center),lt.setValue(C,"modelViewMatrix",U.modelViewMatrix),lt.setValue(C,"normalMatrix",U.normalMatrix),lt.setValue(C,"modelMatrix",U.matrixWorld),B.isShaderMaterial||B.isRawShaderMaterial){const Ht=B.uniformsGroups;for(let eo=0,lf=Ht.length;eo0&&Ce.useMultisampledRTT(w)===!1?U=Ae.get(w).__webglMultisampledFramebuffer:Array.isArray(be)?U=be[O]:U=be,S.copy(w.viewport),P.copy(w.scissor),V=w.scissorTest}else S.copy(ce).multiplyScalar(j).floor(),P.copy(fe).multiplyScalar(j).floor(),V=Be;if(xe.bindFramebuffer(C.FRAMEBUFFER,U)&&B&&xe.drawBuffers(w,U),xe.viewport(S),xe.scissor(P),xe.setScissorTest(V),ie){const ge=Ae.get(w.texture);C.framebufferTexture2D(C.FRAMEBUFFER,C.COLOR_ATTACHMENT0,C.TEXTURE_CUBE_MAP_POSITIVE_X+N,ge.__webglTexture,O)}else if(ae){const ge=Ae.get(w.texture),we=N||0;C.framebufferTextureLayer(C.FRAMEBUFFER,C.COLOR_ATTACHMENT0,ge.__webglTexture,O||0,we)}I=-1},this.readRenderTargetPixels=function(w,N,O,B,U,ie,ae){if(!(w&&w.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let me=Ae.get(w).__webglFramebuffer;if(w.isWebGLCubeRenderTarget&&ae!==void 0&&(me=me[ae]),me){xe.bindFramebuffer(C.FRAMEBUFFER,me);try{const ge=w.texture,we=ge.format,be=ge.type;if(!Je.textureFormatReadable(we)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!Je.textureTypeReadable(be)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}N>=0&&N<=w.width-B&&O>=0&&O<=w.height-U&&C.readPixels(N,O,B,U,Te.convert(we),Te.convert(be),ie)}finally{const ge=A!==null?Ae.get(A).__webglFramebuffer:null;xe.bindFramebuffer(C.FRAMEBUFFER,ge)}}},this.readRenderTargetPixelsAsync=async function(w,N,O,B,U,ie,ae){if(!(w&&w.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let me=Ae.get(w).__webglFramebuffer;if(w.isWebGLCubeRenderTarget&&ae!==void 0&&(me=me[ae]),me){xe.bindFramebuffer(C.FRAMEBUFFER,me);try{const ge=w.texture,we=ge.format,be=ge.type;if(!Je.textureFormatReadable(we))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!Je.textureTypeReadable(be))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(N>=0&&N<=w.width-B&&O>=0&&O<=w.height-U){const Me=C.createBuffer();C.bindBuffer(C.PIXEL_PACK_BUFFER,Me),C.bufferData(C.PIXEL_PACK_BUFFER,ie.byteLength,C.STREAM_READ),C.readPixels(N,O,B,U,Te.convert(we),Te.convert(be),0),C.flush();const Ge=C.fenceSync(C.SYNC_GPU_COMMANDS_COMPLETE,0);await ap(C,Ge,4);try{C.bindBuffer(C.PIXEL_PACK_BUFFER,Me),C.getBufferSubData(C.PIXEL_PACK_BUFFER,0,ie)}finally{C.deleteBuffer(Me),C.deleteSync(Ge)}return ie}}finally{const ge=A!==null?Ae.get(A).__webglFramebuffer:null;xe.bindFramebuffer(C.FRAMEBUFFER,ge)}}},this.copyFramebufferToTexture=function(w,N=null,O=0){w.isTexture!==!0&&(console.warn("WebGLRenderer: copyFramebufferToTexture function signature has changed."),N=arguments[0]||null,w=arguments[1]);const B=Math.pow(2,-O),U=Math.floor(w.image.width*B),ie=Math.floor(w.image.height*B),ae=N!==null?N.x:0,me=N!==null?N.y:0;Ce.setTexture2D(w,0),C.copyTexSubImage2D(C.TEXTURE_2D,O,0,0,ae,me,U,ie),xe.unbindTexture()},this.copyTextureToTexture=function(w,N,O=null,B=null,U=0){w.isTexture!==!0&&(console.warn("WebGLRenderer: copyTextureToTexture function signature has changed."),B=arguments[0]||null,w=arguments[1],N=arguments[2],U=arguments[3]||0,O=null);let ie,ae,me,ge,we,be;O!==null?(ie=O.max.x-O.min.x,ae=O.max.y-O.min.y,me=O.min.x,ge=O.min.y):(ie=w.image.width,ae=w.image.height,me=0,ge=0),B!==null?(we=B.x,be=B.y):(we=0,be=0);const Me=Te.convert(N.format),Ge=Te.convert(N.type);Ce.setTexture2D(N,0),C.pixelStorei(C.UNPACK_FLIP_Y_WEBGL,N.flipY),C.pixelStorei(C.UNPACK_PREMULTIPLY_ALPHA_WEBGL,N.premultiplyAlpha),C.pixelStorei(C.UNPACK_ALIGNMENT,N.unpackAlignment);const it=C.getParameter(C.UNPACK_ROW_LENGTH),nt=C.getParameter(C.UNPACK_IMAGE_HEIGHT),Lt=C.getParameter(C.UNPACK_SKIP_PIXELS),We=C.getParameter(C.UNPACK_SKIP_ROWS),_e=C.getParameter(C.UNPACK_SKIP_IMAGES),yt=w.isCompressedTexture?w.mipmaps[U]:w.image;C.pixelStorei(C.UNPACK_ROW_LENGTH,yt.width),C.pixelStorei(C.UNPACK_IMAGE_HEIGHT,yt.height),C.pixelStorei(C.UNPACK_SKIP_PIXELS,me),C.pixelStorei(C.UNPACK_SKIP_ROWS,ge),w.isDataTexture?C.texSubImage2D(C.TEXTURE_2D,U,we,be,ie,ae,Me,Ge,yt.data):w.isCompressedTexture?C.compressedTexSubImage2D(C.TEXTURE_2D,U,we,be,yt.width,yt.height,Me,yt.data):C.texSubImage2D(C.TEXTURE_2D,U,we,be,ie,ae,Me,Ge,yt),C.pixelStorei(C.UNPACK_ROW_LENGTH,it),C.pixelStorei(C.UNPACK_IMAGE_HEIGHT,nt),C.pixelStorei(C.UNPACK_SKIP_PIXELS,Lt),C.pixelStorei(C.UNPACK_SKIP_ROWS,We),C.pixelStorei(C.UNPACK_SKIP_IMAGES,_e),U===0&&N.generateMipmaps&&C.generateMipmap(C.TEXTURE_2D),xe.unbindTexture()},this.copyTextureToTexture3D=function(w,N,O=null,B=null,U=0){w.isTexture!==!0&&(console.warn("WebGLRenderer: copyTextureToTexture3D function signature has changed."),O=arguments[0]||null,B=arguments[1]||null,w=arguments[2],N=arguments[3],U=arguments[4]||0);let ie,ae,me,ge,we,be,Me,Ge,it;const nt=w.isCompressedTexture?w.mipmaps[U]:w.image;O!==null?(ie=O.max.x-O.min.x,ae=O.max.y-O.min.y,me=O.max.z-O.min.z,ge=O.min.x,we=O.min.y,be=O.min.z):(ie=nt.width,ae=nt.height,me=nt.depth,ge=0,we=0,be=0),B!==null?(Me=B.x,Ge=B.y,it=B.z):(Me=0,Ge=0,it=0);const Lt=Te.convert(N.format),We=Te.convert(N.type);let _e;if(N.isData3DTexture)Ce.setTexture3D(N,0),_e=C.TEXTURE_3D;else if(N.isDataArrayTexture||N.isCompressedArrayTexture)Ce.setTexture2DArray(N,0),_e=C.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}C.pixelStorei(C.UNPACK_FLIP_Y_WEBGL,N.flipY),C.pixelStorei(C.UNPACK_PREMULTIPLY_ALPHA_WEBGL,N.premultiplyAlpha),C.pixelStorei(C.UNPACK_ALIGNMENT,N.unpackAlignment);const yt=C.getParameter(C.UNPACK_ROW_LENGTH),Xe=C.getParameter(C.UNPACK_IMAGE_HEIGHT),Kt=C.getParameter(C.UNPACK_SKIP_PIXELS),Fn=C.getParameter(C.UNPACK_SKIP_ROWS),It=C.getParameter(C.UNPACK_SKIP_IMAGES);C.pixelStorei(C.UNPACK_ROW_LENGTH,nt.width),C.pixelStorei(C.UNPACK_IMAGE_HEIGHT,nt.height),C.pixelStorei(C.UNPACK_SKIP_PIXELS,ge),C.pixelStorei(C.UNPACK_SKIP_ROWS,we),C.pixelStorei(C.UNPACK_SKIP_IMAGES,be),w.isDataTexture||w.isData3DTexture?C.texSubImage3D(_e,U,Me,Ge,it,ie,ae,me,Lt,We,nt.data):N.isCompressedArrayTexture?C.compressedTexSubImage3D(_e,U,Me,Ge,it,ie,ae,me,Lt,nt.data):C.texSubImage3D(_e,U,Me,Ge,it,ie,ae,me,Lt,We,nt),C.pixelStorei(C.UNPACK_ROW_LENGTH,yt),C.pixelStorei(C.UNPACK_IMAGE_HEIGHT,Xe),C.pixelStorei(C.UNPACK_SKIP_PIXELS,Kt),C.pixelStorei(C.UNPACK_SKIP_ROWS,Fn),C.pixelStorei(C.UNPACK_SKIP_IMAGES,It),U===0&&N.generateMipmaps&&C.generateMipmap(_e),xe.unbindTexture()},this.initRenderTarget=function(w){Ae.get(w).__webglFramebuffer===void 0&&Ce.setupRenderTarget(w)},this.initTexture=function(w){w.isCubeTexture?Ce.setTextureCube(w,0):w.isData3DTexture?Ce.setTexture3D(w,0):w.isDataArrayTexture||w.isCompressedArrayTexture?Ce.setTexture2DArray(w,0):Ce.setTexture2D(w,0),xe.unbindTexture()},this.resetState=function(){L=0,T=0,A=null,xe.reset(),De.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Fi}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===lc?"display-p3":"srgb",t.unpackColorSpace=je.workingColorSpace===Xa?"display-p3":"srgb"}}class gx extends $t{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new an,this.environmentIntensity=1,this.environmentRotation=new an,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}class _i{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let i,n=this.getPoint(0),s=0;t.push(0);for(let a=1;a<=e;a++)i=this.getPoint(a/e),s+=i.distanceTo(n),t.push(s),n=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const i=this.getLengths();let n=0;const s=i.length;let a;t?a=t:a=e*i[s-1];let o=0,l=s-1,c;for(;o<=l;)if(n=Math.floor(o+(l-o)/2),c=i[n]-a,c<0)o=n+1;else if(c>0)l=n-1;else{l=n;break}if(n=l,i[n]===a)return n/(s-1);const h=i[n],d=i[n+1]-h,f=(a-h)/d;return(n+f)/(s-1)}getTangent(e,t){let n=e-1e-4,s=e+1e-4;n<0&&(n=0),s>1&&(s=1);const a=this.getPoint(n),o=this.getPoint(s),l=t||(a.isVector2?new ve:new g);return l.copy(o).sub(a).normalize(),l}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){const i=new g,n=[],s=[],a=[],o=new g,l=new dt;for(let f=0;f<=e;f++){const _=f/e;n[f]=this.getTangentAt(_,new g)}s[0]=new g,a[0]=new g;let c=Number.MAX_VALUE;const h=Math.abs(n[0].x),u=Math.abs(n[0].y),d=Math.abs(n[0].z);h<=c&&(c=h,i.set(1,0,0)),u<=c&&(c=u,i.set(0,1,0)),d<=c&&i.set(0,0,1),o.crossVectors(n[0],i).normalize(),s[0].crossVectors(n[0],o),a[0].crossVectors(n[0],s[0]);for(let f=1;f<=e;f++){if(s[f]=s[f-1].clone(),a[f]=a[f-1].clone(),o.crossVectors(n[f-1],n[f]),o.length()>Number.EPSILON){o.normalize();const _=Math.acos(Et(n[f-1].dot(n[f]),-1,1));s[f].applyMatrix4(l.makeRotationAxis(o,_))}a[f].crossVectors(n[f],s[f])}if(t===!0){let f=Math.acos(Et(s[0].dot(s[e]),-1,1));f/=e,n[0].dot(o.crossVectors(s[0],s[e]))>0&&(f=-f);for(let _=1;_<=e;_++)s[_].applyMatrix4(l.makeRotationAxis(n[_],f*_)),a[_].crossVectors(n[_],s[_])}return{tangents:n,normals:s,binormals:a}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class Td extends _i{constructor(e=0,t=0,i=1,n=1,s=0,a=Math.PI*2,o=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=n,this.aStartAngle=s,this.aEndAngle=a,this.aClockwise=o,this.aRotation=l}getPoint(e,t=new ve){const i=t,n=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const a=Math.abs(s)n;)s-=n;s0?0:(Math.floor(Math.abs(o)/s)+1)*s:l===0&&o===s-1&&(o=s-2,l=1);let c,h;this.closed||o>0?c=n[(o-1)%s]:(Qr.subVectors(n[0],n[1]).add(n[0]),c=Qr);const u=n[o%s],d=n[(o+1)%s];if(this.closed||o+2n.length-2?n.length-1:a+1],u=n[a>n.length-3?n.length-1:a+2];return i.set(Nh(o,l.x,c.x,h.x,u.x),Nh(o,l.y,c.y,h.y,u.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t=i){const a=n[s]-i,o=this.curves[s],l=o.getLength(),c=l===0?0:1-a/l;return o.getPointAt(c,t)}s++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let i=0,n=this.curves.length;i1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t"u"?Date:performance).now()}class Ox{constructor(e,t,i,n){this.index=e,this.id="bus"+e,this.passengers=[],this.passengersGettingOff=[],this.position=i,this.destination=n,this.nextBus,this.drivingTarget=this.destination,this.model=t,this.velocity=0,this.MAX_VELOCITY=.2,this.ACCELERATION=.06,this.MAX_FILL=10,this.TIME_PER_PASSENGER=.25,this.timeLoading=0,this.atStop=!1,this.infoDiv=null,this.addInfoDiv(),this.logInfo=!1,this.backHalf,this.hold=!1}update(e){if(!this.hold){if(this.atStop){if(this.destination.isDelayed)return;this.load(e)}else this.driveToNext(e);this.position>1&&(this.position%=1)}}load(e){if(this.passengersGettingOff.length==0&&(this.passengers.length>=this.MAX_FILL||this.destination.passengers.length==0)){this.atStop=!1,this.destination=this.destination.next,this.logInfo&&(console.log(this.passengers.length+" next stop: "+this.destination.symbol),console.log(this)),this.timeLoading=0;return}if(this.timeLoading+=e,this.timeLoading>=this.TIME_PER_PASSENGER){if(this.passengersGettingOff.length>0){let t=this.passengersGettingOff.shift();this.dropOff(t)}else{let t=this.destination.pickUpPassenger();t!=null&&this.pickUp(t)}this.timeLoading=0}}driveToNext(e){let t=this.velocity**2/(this.ACCELERATION*2);this.position%=1,(this.drivingTarget==0?1:this.drivingTarget)this.MAX_VELOCITY?this.velocity=this.MAX_VELOCITY:this.velocity<0&&(this.velocity=0),Math.abs(this.drivingTarget-this.position)<5e-4&&(this.velocity=0),Math.abs(this.destination.position-this.position)<5e-4?(this.logInfo&&(console.log("stopping at: "+this.destination.symbol),console.log("position: "+this.position)),this.position=this.destination.position,this.velocity=0,this.atStop=!0,this.prepUnload(),this.load(e)):this.position+=this.velocity*e}prepUnload(){let e=this.passengers.filter(t=>t.destination!=this.destination);if(this.passengersGettingOff=this.passengers.filter(t=>t.destination==this.destination),this.passengers=e,this.logInfo){let t="Getting off: ";for(let i=0;i=this.TIME_PER_PASSENGER&&(this.timeSinceLastPassenger=0,this.addRider())}addRider(){this.nextStopState++,console.log(this.otherStops),this.nextStopState%=this.otherStops.length;let e=new Bx(this.otherStops[this.nextStopState]);this.passengers.push(e);let t=document.querySelector("#"+this.id).querySelector(".passengersWrapper"),i=t.scrollWidth;t.style.width=i+this.passengerWidth+"px",t.appendChild(e.div)}pickUpPassenger(){if(this.passengers.length<=0)return null;let e=document.querySelector("#"+this.id).querySelector(".passengersWrapper");if(e.querySelector(".passenger")){e.querySelector(".passenger").remove();let i=e.scrollWidth;e.style.width=i-this.passengerWidth+"px"}return this.passengers.shift()}addInfoDiv(){let e=document.createElement("div");e.className="infoTitle",e.textContent=this.symbol,e.style.color=this.color;let t=document.createElement("div");t.className="passengersWrapper",this.waitingPassengersDiv=t;let i=document.createElement("div");i.className="info",i.id=this.id,i.appendChild(e),i.appendChild(t),document.querySelector("body").appendChild(i),this.infoDiv=t}delay(){this.isDelayed=!0,document.querySelector("#"+this.id).querySelector(".infoTitle").classList.add("pulsing-border")}free(){this.isDelayed=!1,document.querySelector("#"+this.id).querySelector(".infoTitle").classList.remove("pulsing-border")}}/** + * @license + * Copyright 2010-2024 Three.js Authors + * SPDX-License-Identifier: MIT + */const Ld="166",Ha=0,kx=1,Hx=2,Bh=1,zh=100,kh=204,Hh=205,Vh=3,Vx=0,Gh="attached",Gx="detached",Id=300,hr=1e3,ir=1001,Xl=1002,ql=1003,Wx=1004,Xx=1005,gc=1006,qx=1007,_c=1008,Yx=1009,xc=1015,Dd=1023,$x=1028,ur=2300,dr=2301,No=2302,Wh=2400,Xh=2401,qh=2402,jx=2500,Kx=0,Nd=1,Yl=2,Jx=0,Ud="",zt="srgb",jt="srgb-linear",Zx="display-p3",Fd="display-p3-linear",$l="linear",Yh="srgb",$h="rec709",jh="p3",es=7680,Kh=519,jl=35044,Cn=2e3,Kl=2001;class Ya{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const n=this._listeners[e];if(n!==void 0){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const i=this._listeners[e.type];if(i!==void 0){e.target=this;const n=i.slice(0);for(let s=0,a=n.length;s>8&255]+wt[r>>16&255]+wt[r>>24&255]+"-"+wt[e&255]+wt[e>>8&255]+"-"+wt[e>>16&15|64]+wt[e>>24&255]+"-"+wt[t&63|128]+wt[t>>8&255]+"-"+wt[t>>16&255]+wt[t>>24&255]+wt[i&255]+wt[i>>8&255]+wt[i>>16&255]+wt[i>>24&255]).toLowerCase()}function At(r,e,t){return Math.max(e,Math.min(t,r))}function yc(r,e){return(r%e+e)%e}function Qx(r,e,t,i,n){return i+(r-e)*(n-i)/(t-e)}function ey(r,e,t){return r!==e?(t-r)/(e-r):0}function ar(r,e,t){return(1-t)*r+t*e}function ty(r,e,t,i){return ar(r,e,1-Math.exp(-t*i))}function iy(r,e=1){return e-Math.abs(yc(r,e*2)-e)}function ny(r,e,t){return r<=e?0:r>=t?1:(r=(r-e)/(t-e),r*r*(3-2*r))}function sy(r,e,t){return r<=e?0:r>=t?1:(r=(r-e)/(t-e),r*r*r*(r*(r*6-15)+10))}function ry(r,e){return r+Math.floor(Math.random()*(e-r+1))}function ay(r,e){return r+Math.random()*(e-r)}function oy(r){return r*(.5-Math.random())}function ly(r){r!==void 0&&(Jh=r);let e=Jh+=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 cy(r){return r*rr}function hy(r){return r*fr}function uy(r){return(r&r-1)===0&&r!==0}function dy(r){return Math.pow(2,Math.ceil(Math.log(r)/Math.LN2))}function fy(r){return Math.pow(2,Math.floor(Math.log(r)/Math.LN2))}function py(r,e,t,i,n){const s=Math.cos,a=Math.sin,o=s(t/2),l=a(t/2),c=s((e+i)/2),h=a((e+i)/2),u=s((e-i)/2),d=a((e-i)/2),f=s((i-e)/2),_=a((i-e)/2);switch(n){case"XYX":r.set(o*h,l*u,l*d,o*c);break;case"YZY":r.set(l*d,o*h,l*u,o*c);break;case"ZXZ":r.set(l*u,l*d,o*h,o*c);break;case"XZX":r.set(o*h,l*_,l*f,o*c);break;case"YXY":r.set(l*f,o*h,l*_,o*c);break;case"ZYZ":r.set(l*_,l*f,o*h,o*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+n)}}function si(r,e){switch(e.constructor){case Float32Array:return r;case Uint32Array:return r/4294967295;case Uint16Array:return r/65535;case Uint8Array:return r/255;case Int32Array:return Math.max(r/2147483647,-1);case Int16Array:return Math.max(r/32767,-1);case Int8Array:return Math.max(r/127,-1);default:throw new Error("Invalid component type.")}}function Ye(r,e){switch(e.constructor){case Float32Array:return r;case Uint32Array:return Math.round(r*4294967295);case Uint16Array:return Math.round(r*65535);case Uint8Array:return Math.round(r*255);case Int32Array:return Math.round(r*2147483647);case Int16Array:return Math.round(r*32767);case Int8Array:return Math.round(r*127);default:throw new Error("Invalid component type.")}}const my={DEG2RAD:rr,RAD2DEG:fr,generateUUID:ai,clamp:At,euclideanModulo:yc,mapLinear:Qx,inverseLerp:ey,lerp:ar,damp:ty,pingpong:iy,smoothstep:ny,smootherstep:sy,randInt:ry,randFloat:ay,randFloatSpread:oy,seededRandom:ly,degToRad:cy,radToDeg:hy,isPowerOfTwo:uy,ceilPowerOfTwo:dy,floorPowerOfTwo:fy,setQuaternionFromProperEuler:py,normalize:Ye,denormalize:si};class et{constructor(e=0,t=0){et.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,n=e.elements;return this.x=n[0]*t+n[3]*i+n[6],this.y=n[1]*t+n[4]*i+n[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}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 t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(At(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),n=Math.sin(t),s=this.x-e.x,a=this.y-e.y;return this.x=s*i-a*n+e.x,this.y=s*n+a*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Bi{constructor(e,t,i,n,s,a,o,l,c){Bi.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,n,s,a,o,l,c)}set(e,t,i,n,s,a,o,l,c){const h=this.elements;return h[0]=e,h[1]=n,h[2]=o,h[3]=t,h[4]=s,h[5]=l,h[6]=i,h[7]=a,h[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,n=t.elements,s=this.elements,a=i[0],o=i[3],l=i[6],c=i[1],h=i[4],u=i[7],d=i[2],f=i[5],_=i[8],x=n[0],p=n[3],m=n[6],b=n[1],y=n[4],v=n[7],L=n[2],T=n[5],A=n[8];return s[0]=a*x+o*b+l*L,s[3]=a*p+o*y+l*T,s[6]=a*m+o*v+l*A,s[1]=c*x+h*b+u*L,s[4]=c*p+h*y+u*T,s[7]=c*m+h*v+u*A,s[2]=d*x+f*b+_*L,s[5]=d*p+f*y+_*T,s[8]=d*m+f*v+_*A,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],n=e[2],s=e[3],a=e[4],o=e[5],l=e[6],c=e[7],h=e[8];return t*a*h-t*o*c-i*s*h+i*o*l+n*s*c-n*a*l}invert(){const e=this.elements,t=e[0],i=e[1],n=e[2],s=e[3],a=e[4],o=e[5],l=e[6],c=e[7],h=e[8],u=h*a-o*c,d=o*l-h*s,f=c*s-a*l,_=t*u+i*d+n*f;if(_===0)return this.set(0,0,0,0,0,0,0,0,0);const x=1/_;return e[0]=u*x,e[1]=(n*c-h*i)*x,e[2]=(o*i-n*a)*x,e[3]=d*x,e[4]=(h*t-n*l)*x,e[5]=(n*s-o*t)*x,e[6]=f*x,e[7]=(i*l-c*t)*x,e[8]=(a*t-i*s)*x,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,n,s,a,o){const l=Math.cos(s),c=Math.sin(s);return this.set(i*l,i*c,-i*(l*a+c*o)+a+e,-n*c,n*l,-n*(-c*a+l*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(Uo.makeScale(e,t)),this}rotate(e){return this.premultiply(Uo.makeRotation(-e)),this}translate(e,t){return this.premultiply(Uo.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let n=0;n<9;n++)if(t[n]!==i[n])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Uo=new Bi;function gy(r){for(let e=r.length-1;e>=0;--e)if(r[e]>=65535)return!0;return!1}function Jl(r){return document.createElementNS("http://www.w3.org/1999/xhtml",r)}const Zh={};function Od(r){r in Zh||(Zh[r]=!0,console.warn(r))}const Qh=new Bi().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),eu=new Bi().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),ea={[jt]:{transfer:$l,primaries:$h,toReference:r=>r,fromReference:r=>r},[zt]:{transfer:Yh,primaries:$h,toReference:r=>r.convertSRGBToLinear(),fromReference:r=>r.convertLinearToSRGB()},[Fd]:{transfer:$l,primaries:jh,toReference:r=>r.applyMatrix3(eu),fromReference:r=>r.applyMatrix3(Qh)},[Zx]:{transfer:Yh,primaries:jh,toReference:r=>r.convertSRGBToLinear().applyMatrix3(eu),fromReference:r=>r.applyMatrix3(Qh).convertLinearToSRGB()}},_y=new Set([jt,Fd]),Ot={enabled:!0,_workingColorSpace:jt,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(r){if(!_y.has(r))throw new Error(`Unsupported working color space, "${r}".`);this._workingColorSpace=r},convert:function(r,e,t){if(this.enabled===!1||e===t||!e||!t)return r;const i=ea[e].toReference,n=ea[t].fromReference;return n(i(r))},fromWorkingColorSpace:function(r,e){return this.convert(r,this._workingColorSpace,e)},toWorkingColorSpace:function(r,e){return this.convert(r,e,this._workingColorSpace)},getPrimaries:function(r){return ea[r].primaries},getTransfer:function(r){return r===Ud?$l:ea[r].transfer}};function ws(r){return r<.04045?r*.0773993808:Math.pow(r*.9478672986+.0521327014,2.4)}function Fo(r){return r<.0031308?r*12.92:1.055*Math.pow(r,.41666)-.055}let ts;class xy{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{ts===void 0&&(ts=Jl("canvas")),ts.width=e.width,ts.height=e.height;const i=ts.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=ts}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=Jl("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const n=i.getImageData(0,0,e.width,e.height),s=n.data;for(let a=0;a0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Id)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case hr:e.x=e.x-Math.floor(e.x);break;case ir:e.x=e.x<0?0:1;break;case Xl: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 hr:e.y=e.y-Math.floor(e.y);break;case ir:e.y=e.y<0?0:1;break;case Xl: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)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}oi.DEFAULT_IMAGE=null;oi.DEFAULT_MAPPING=Id;oi.DEFAULT_ANISOTROPY=1;class qt{constructor(e=0,t=0,i=0,n=1){qt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=n}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=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,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){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,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,n=this.z,s=this.w,a=e.elements;return this.x=a[0]*t+a[4]*i+a[8]*n+a[12]*s,this.y=a[1]*t+a[5]*i+a[9]*n+a[13]*s,this.z=a[2]*t+a[6]*i+a[10]*n+a[14]*s,this.w=a[3]*t+a[7]*i+a[11]*n+a[15]*s,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,n,s;const l=e.elements,c=l[0],h=l[4],u=l[8],d=l[1],f=l[5],_=l[9],x=l[2],p=l[6],m=l[10];if(Math.abs(h-d)<.01&&Math.abs(u-x)<.01&&Math.abs(_-p)<.01){if(Math.abs(h+d)<.1&&Math.abs(u+x)<.1&&Math.abs(_+p)<.1&&Math.abs(c+f+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const y=(c+1)/2,v=(f+1)/2,L=(m+1)/2,T=(h+d)/4,A=(u+x)/4,I=(_+p)/4;return y>v&&y>L?y<.01?(i=0,n=.707106781,s=.707106781):(i=Math.sqrt(y),n=T/i,s=A/i):v>L?v<.01?(i=.707106781,n=0,s=.707106781):(n=Math.sqrt(v),i=T/n,s=I/n):L<.01?(i=.707106781,n=.707106781,s=0):(s=Math.sqrt(L),i=A/s,n=I/s),this.set(i,n,s,t),this}let b=Math.sqrt((p-_)*(p-_)+(u-x)*(u-x)+(d-h)*(d-h));return Math.abs(b)<.001&&(b=1),this.x=(p-_)/b,this.y=(u-x)/b,this.z=(d-h)/b,this.w=Math.acos((c+f+m-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}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,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class cn{constructor(e=0,t=0,i=0,n=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=n}static slerpFlat(e,t,i,n,s,a,o){let l=i[n+0],c=i[n+1],h=i[n+2],u=i[n+3];const d=s[a+0],f=s[a+1],_=s[a+2],x=s[a+3];if(o===0){e[t+0]=l,e[t+1]=c,e[t+2]=h,e[t+3]=u;return}if(o===1){e[t+0]=d,e[t+1]=f,e[t+2]=_,e[t+3]=x;return}if(u!==x||l!==d||c!==f||h!==_){let p=1-o;const m=l*d+c*f+h*_+u*x,b=m>=0?1:-1,y=1-m*m;if(y>Number.EPSILON){const L=Math.sqrt(y),T=Math.atan2(L,m*b);p=Math.sin(p*T)/L,o=Math.sin(o*T)/L}const v=o*b;if(l=l*p+d*v,c=c*p+f*v,h=h*p+_*v,u=u*p+x*v,p===1-o){const L=1/Math.sqrt(l*l+c*c+h*h+u*u);l*=L,c*=L,h*=L,u*=L}}e[t]=l,e[t+1]=c,e[t+2]=h,e[t+3]=u}static multiplyQuaternionsFlat(e,t,i,n,s,a){const o=i[n],l=i[n+1],c=i[n+2],h=i[n+3],u=s[a],d=s[a+1],f=s[a+2],_=s[a+3];return e[t]=o*_+h*u+l*f-c*d,e[t+1]=l*_+h*d+c*u-o*f,e[t+2]=c*_+h*f+o*d-l*u,e[t+3]=h*_-o*u-l*d-c*f,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,n){return this._x=e,this._y=t,this._z=i,this._w=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const i=e._x,n=e._y,s=e._z,a=e._order,o=Math.cos,l=Math.sin,c=o(i/2),h=o(n/2),u=o(s/2),d=l(i/2),f=l(n/2),_=l(s/2);switch(a){case"XYZ":this._x=d*h*u+c*f*_,this._y=c*f*u-d*h*_,this._z=c*h*_+d*f*u,this._w=c*h*u-d*f*_;break;case"YXZ":this._x=d*h*u+c*f*_,this._y=c*f*u-d*h*_,this._z=c*h*_-d*f*u,this._w=c*h*u+d*f*_;break;case"ZXY":this._x=d*h*u-c*f*_,this._y=c*f*u+d*h*_,this._z=c*h*_+d*f*u,this._w=c*h*u-d*f*_;break;case"ZYX":this._x=d*h*u-c*f*_,this._y=c*f*u+d*h*_,this._z=c*h*_-d*f*u,this._w=c*h*u+d*f*_;break;case"YZX":this._x=d*h*u+c*f*_,this._y=c*f*u+d*h*_,this._z=c*h*_-d*f*u,this._w=c*h*u-d*f*_;break;case"XZY":this._x=d*h*u-c*f*_,this._y=c*f*u-d*h*_,this._z=c*h*_+d*f*u,this._w=c*h*u+d*f*_;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,n=Math.sin(i);return this._x=e.x*n,this._y=e.y*n,this._z=e.z*n,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],n=t[4],s=t[8],a=t[1],o=t[5],l=t[9],c=t[2],h=t[6],u=t[10],d=i+o+u;if(d>0){const f=.5/Math.sqrt(d+1);this._w=.25/f,this._x=(h-l)*f,this._y=(s-c)*f,this._z=(a-n)*f}else if(i>o&&i>u){const f=2*Math.sqrt(1+i-o-u);this._w=(h-l)/f,this._x=.25*f,this._y=(n+a)/f,this._z=(s+c)/f}else if(o>u){const f=2*Math.sqrt(1+o-i-u);this._w=(s-c)/f,this._x=(n+a)/f,this._y=.25*f,this._z=(l+h)/f}else{const f=2*Math.sqrt(1+u-i-o);this._w=(a-n)/f,this._x=(s+c)/f,this._y=(l+h)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(At(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const n=Math.min(1,t/i);return this.slerp(e,n),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,t){const i=e._x,n=e._y,s=e._z,a=e._w,o=t._x,l=t._y,c=t._z,h=t._w;return this._x=i*h+a*o+n*c-s*l,this._y=n*h+a*l+s*o-i*c,this._z=s*h+a*c+i*l-n*o,this._w=a*h-i*o-n*l-s*c,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const i=this._x,n=this._y,s=this._z,a=this._w;let o=a*e._w+i*e._x+n*e._y+s*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=a,this._x=i,this._y=n,this._z=s,this;const l=1-o*o;if(l<=Number.EPSILON){const f=1-t;return this._w=f*a+t*this._w,this._x=f*i+t*this._x,this._y=f*n+t*this._y,this._z=f*s+t*this._z,this.normalize(),this}const c=Math.sqrt(l),h=Math.atan2(c,o),u=Math.sin((1-t)*h)/c,d=Math.sin(t*h)/c;return this._w=a*u+this._w*d,this._x=i*u+this._x*d,this._y=n*u+this._y*d,this._z=s*u+this._z*d,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),i=Math.random(),n=Math.sqrt(1-i),s=Math.sqrt(i);return this.set(n*Math.sin(e),n*Math.cos(e),s*Math.sin(t),s*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),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 z{constructor(e=0,t=0,i=0){z.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){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,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){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,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.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,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(tu.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(tu.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,n=this.z,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6]*n,this.y=s[1]*t+s[4]*i+s[7]*n,this.z=s[2]*t+s[5]*i+s[8]*n,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,n=this.z,s=e.elements,a=1/(s[3]*t+s[7]*i+s[11]*n+s[15]);return this.x=(s[0]*t+s[4]*i+s[8]*n+s[12])*a,this.y=(s[1]*t+s[5]*i+s[9]*n+s[13])*a,this.z=(s[2]*t+s[6]*i+s[10]*n+s[14])*a,this}applyQuaternion(e){const t=this.x,i=this.y,n=this.z,s=e.x,a=e.y,o=e.z,l=e.w,c=2*(a*n-o*i),h=2*(o*t-s*n),u=2*(s*i-a*t);return this.x=t+l*c+a*u-o*h,this.y=i+l*h+o*c-s*u,this.z=n+l*u+s*h-a*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,n=this.z,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*n,this.y=s[1]*t+s[5]*i+s[9]*n,this.z=s[2]*t+s[6]*i+s[10]*n,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}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,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,n=e.y,s=e.z,a=t.x,o=t.y,l=t.z;return this.x=n*l-s*o,this.y=s*a-i*l,this.z=i*o-n*a,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return Bo.copy(this).projectOnVector(e),this.sub(Bo)}reflect(e){return this.sub(Bo.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(At(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,n=this.z-e.z;return t*t+i*i+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const n=Math.sin(t)*e;return this.x=n*Math.sin(i),this.y=Math.cos(t)*e,this.z=n*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),n=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=n,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*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,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-1,i=Math.sqrt(1-t*t);return this.x=i*Math.cos(e),this.y=t,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Bo=new z,tu=new cn;class zi{constructor(e=new z(1/0,1/0,1/0),t=new z(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,ei),ei.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(qs),ia.subVectors(this.max,qs),is.subVectors(e.a,qs),ns.subVectors(e.b,qs),ss.subVectors(e.c,qs),Yi.subVectors(ns,is),$i.subVectors(ss,ns),_n.subVectors(is,ss);let t=[0,-Yi.z,Yi.y,0,-$i.z,$i.y,0,-_n.z,_n.y,Yi.z,0,-Yi.x,$i.z,0,-$i.x,_n.z,0,-_n.x,-Yi.y,Yi.x,0,-$i.y,$i.x,0,-_n.y,_n.x,0];return!zo(t,is,ns,ss,ia)||(t=[1,0,0,0,1,0,0,0,1],!zo(t,is,ns,ss,ia))?!1:(na.crossVectors(Yi,$i),t=[na.x,na.y,na.z],zo(t,is,ns,ss,ia))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,ei).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(ei).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:(Ti[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Ti[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Ti[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Ti[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Ti[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Ti[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Ti[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Ti[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Ti),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 Ti=[new z,new z,new z,new z,new z,new z,new z,new z],ei=new z,ta=new zi,is=new z,ns=new z,ss=new z,Yi=new z,$i=new z,_n=new z,qs=new z,ia=new z,na=new z,xn=new z;function zo(r,e,t,i,n){for(let s=0,a=r.length-3;s<=a;s+=3){xn.fromArray(r,s);const o=n.x*Math.abs(xn.x)+n.y*Math.abs(xn.y)+n.z*Math.abs(xn.z),l=e.dot(xn),c=t.dot(xn),h=i.dot(xn);if(Math.max(-Math.max(l,c,h),Math.min(l,c,h))>o)return!1}return!0}const Sy=new zi,Ys=new z,ko=new z;class xi{constructor(e=new z,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;t!==void 0?i.copy(t):Sy.setFromPoints(e).getCenter(i);let n=0;for(let s=0,a=e.length;sthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}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;Ys.subVectors(e,this.center);const t=Ys.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),n=(i-this.radius)*.5;this.center.addScaledVector(Ys,n/i),this.radius+=n}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):(ko.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Ys.copy(e.center).add(ko)),this.expandByPoint(Ys.copy(e.center).sub(ko))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const Ri=new z,Ho=new z,sa=new z,ji=new z,Vo=new z,ra=new z,Go=new z;class $a{constructor(e=new z,t=new z(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.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,Ri)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Ri.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Ri.copy(this.origin).addScaledVector(this.direction,t),Ri.distanceToSquared(e))}distanceSqToSegment(e,t,i,n){Ho.copy(e).add(t).multiplyScalar(.5),sa.copy(t).sub(e).normalize(),ji.copy(this.origin).sub(Ho);const s=e.distanceTo(t)*.5,a=-this.direction.dot(sa),o=ji.dot(this.direction),l=-ji.dot(sa),c=ji.lengthSq(),h=Math.abs(1-a*a);let u,d,f,_;if(h>0)if(u=a*l-o,d=a*o-l,_=s*h,u>=0)if(d>=-_)if(d<=_){const x=1/h;u*=x,d*=x,f=u*(u+a*d+2*o)+d*(a*u+d+2*l)+c}else d=s,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*l)+c;else d=-s,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*l)+c;else d<=-_?(u=Math.max(0,-(-a*s+o)),d=u>0?-s:Math.min(Math.max(-s,-l),s),f=-u*u+d*(d+2*l)+c):d<=_?(u=0,d=Math.min(Math.max(-s,-l),s),f=d*(d+2*l)+c):(u=Math.max(0,-(a*s+o)),d=u>0?s:Math.min(Math.max(-s,-l),s),f=-u*u+d*(d+2*l)+c);else d=a>0?-s:s,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*l)+c;return i&&i.copy(this.origin).addScaledVector(this.direction,u),n&&n.copy(Ho).addScaledVector(sa,d),f}intersectSphere(e,t){Ri.subVectors(e.center,this.origin);const i=Ri.dot(this.direction),n=Ri.dot(Ri)-i*i,s=e.radius*e.radius;if(n>s)return null;const a=Math.sqrt(s-n),o=i-a,l=i+a;return l<0?null:o<0?this.at(l,t):this.at(o,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,n,s,a,o,l;const c=1/this.direction.x,h=1/this.direction.y,u=1/this.direction.z,d=this.origin;return c>=0?(i=(e.min.x-d.x)*c,n=(e.max.x-d.x)*c):(i=(e.max.x-d.x)*c,n=(e.min.x-d.x)*c),h>=0?(s=(e.min.y-d.y)*h,a=(e.max.y-d.y)*h):(s=(e.max.y-d.y)*h,a=(e.min.y-d.y)*h),i>a||s>n||((s>i||isNaN(i))&&(i=s),(a=0?(o=(e.min.z-d.z)*u,l=(e.max.z-d.z)*u):(o=(e.max.z-d.z)*u,l=(e.min.z-d.z)*u),i>l||o>n)||((o>i||i!==i)&&(i=o),(l=0?i:n,t)}intersectsBox(e){return this.intersectBox(e,Ri)!==null}intersectTriangle(e,t,i,n,s){Vo.subVectors(t,e),ra.subVectors(i,e),Go.crossVectors(Vo,ra);let a=this.direction.dot(Go),o;if(a>0){if(n)return null;o=1}else if(a<0)o=-1,a=-a;else return null;ji.subVectors(this.origin,e);const l=o*this.direction.dot(ra.crossVectors(ji,ra));if(l<0)return null;const c=o*this.direction.dot(Vo.cross(ji));if(c<0||l+c>a)return null;const h=-o*ji.dot(Go);return h<0?null:this.at(h/a,s)}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 Oe{constructor(e,t,i,n,s,a,o,l,c,h,u,d,f,_,x,p){Oe.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,t,i,n,s,a,o,l,c,h,u,d,f,_,x,p)}set(e,t,i,n,s,a,o,l,c,h,u,d,f,_,x,p){const m=this.elements;return m[0]=e,m[4]=t,m[8]=i,m[12]=n,m[1]=s,m[5]=a,m[9]=o,m[13]=l,m[2]=c,m[6]=h,m[10]=u,m[14]=d,m[3]=f,m[7]=_,m[11]=x,m[15]=p,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Oe().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,n=1/rs.setFromMatrixColumn(e,0).length(),s=1/rs.setFromMatrixColumn(e,1).length(),a=1/rs.setFromMatrixColumn(e,2).length();return t[0]=i[0]*n,t[1]=i[1]*n,t[2]=i[2]*n,t[3]=0,t[4]=i[4]*s,t[5]=i[5]*s,t[6]=i[6]*s,t[7]=0,t[8]=i[8]*a,t[9]=i[9]*a,t[10]=i[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,n=e.y,s=e.z,a=Math.cos(i),o=Math.sin(i),l=Math.cos(n),c=Math.sin(n),h=Math.cos(s),u=Math.sin(s);if(e.order==="XYZ"){const d=a*h,f=a*u,_=o*h,x=o*u;t[0]=l*h,t[4]=-l*u,t[8]=c,t[1]=f+_*c,t[5]=d-x*c,t[9]=-o*l,t[2]=x-d*c,t[6]=_+f*c,t[10]=a*l}else if(e.order==="YXZ"){const d=l*h,f=l*u,_=c*h,x=c*u;t[0]=d+x*o,t[4]=_*o-f,t[8]=a*c,t[1]=a*u,t[5]=a*h,t[9]=-o,t[2]=f*o-_,t[6]=x+d*o,t[10]=a*l}else if(e.order==="ZXY"){const d=l*h,f=l*u,_=c*h,x=c*u;t[0]=d-x*o,t[4]=-a*u,t[8]=_+f*o,t[1]=f+_*o,t[5]=a*h,t[9]=x-d*o,t[2]=-a*c,t[6]=o,t[10]=a*l}else if(e.order==="ZYX"){const d=a*h,f=a*u,_=o*h,x=o*u;t[0]=l*h,t[4]=_*c-f,t[8]=d*c+x,t[1]=l*u,t[5]=x*c+d,t[9]=f*c-_,t[2]=-c,t[6]=o*l,t[10]=a*l}else if(e.order==="YZX"){const d=a*l,f=a*c,_=o*l,x=o*c;t[0]=l*h,t[4]=x-d*u,t[8]=_*u+f,t[1]=u,t[5]=a*h,t[9]=-o*h,t[2]=-c*h,t[6]=f*u+_,t[10]=d-x*u}else if(e.order==="XZY"){const d=a*l,f=a*c,_=o*l,x=o*c;t[0]=l*h,t[4]=-u,t[8]=c*h,t[1]=d*u+x,t[5]=a*h,t[9]=f*u-_,t[2]=_*u-f,t[6]=o*h,t[10]=x*u+d}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(wy,e,by)}lookAt(e,t,i){const n=this.elements;return Ut.subVectors(e,t),Ut.lengthSq()===0&&(Ut.z=1),Ut.normalize(),Ki.crossVectors(i,Ut),Ki.lengthSq()===0&&(Math.abs(i.z)===1?Ut.x+=1e-4:Ut.z+=1e-4,Ut.normalize(),Ki.crossVectors(i,Ut)),Ki.normalize(),aa.crossVectors(Ut,Ki),n[0]=Ki.x,n[4]=aa.x,n[8]=Ut.x,n[1]=Ki.y,n[5]=aa.y,n[9]=Ut.y,n[2]=Ki.z,n[6]=aa.z,n[10]=Ut.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,n=t.elements,s=this.elements,a=i[0],o=i[4],l=i[8],c=i[12],h=i[1],u=i[5],d=i[9],f=i[13],_=i[2],x=i[6],p=i[10],m=i[14],b=i[3],y=i[7],v=i[11],L=i[15],T=n[0],A=n[4],I=n[8],E=n[12],S=n[1],P=n[5],V=n[9],F=n[13],X=n[2],Y=n[6],G=n[10],j=n[14],H=n[3],oe=n[7],ce=n[11],fe=n[15];return s[0]=a*T+o*S+l*X+c*H,s[4]=a*A+o*P+l*Y+c*oe,s[8]=a*I+o*V+l*G+c*ce,s[12]=a*E+o*F+l*j+c*fe,s[1]=h*T+u*S+d*X+f*H,s[5]=h*A+u*P+d*Y+f*oe,s[9]=h*I+u*V+d*G+f*ce,s[13]=h*E+u*F+d*j+f*fe,s[2]=_*T+x*S+p*X+m*H,s[6]=_*A+x*P+p*Y+m*oe,s[10]=_*I+x*V+p*G+m*ce,s[14]=_*E+x*F+p*j+m*fe,s[3]=b*T+y*S+v*X+L*H,s[7]=b*A+y*P+v*Y+L*oe,s[11]=b*I+y*V+v*G+L*ce,s[15]=b*E+y*F+v*j+L*fe,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],n=e[8],s=e[12],a=e[1],o=e[5],l=e[9],c=e[13],h=e[2],u=e[6],d=e[10],f=e[14],_=e[3],x=e[7],p=e[11],m=e[15];return _*(+s*l*u-n*c*u-s*o*d+i*c*d+n*o*f-i*l*f)+x*(+t*l*f-t*c*d+s*a*d-n*a*f+n*c*h-s*l*h)+p*(+t*c*u-t*o*f-s*a*u+i*a*f+s*o*h-i*c*h)+m*(-n*o*h-t*l*u+t*o*d+n*a*u-i*a*d+i*l*h)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const n=this.elements;return e.isVector3?(n[12]=e.x,n[13]=e.y,n[14]=e.z):(n[12]=e,n[13]=t,n[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],n=e[2],s=e[3],a=e[4],o=e[5],l=e[6],c=e[7],h=e[8],u=e[9],d=e[10],f=e[11],_=e[12],x=e[13],p=e[14],m=e[15],b=u*p*c-x*d*c+x*l*f-o*p*f-u*l*m+o*d*m,y=_*d*c-h*p*c-_*l*f+a*p*f+h*l*m-a*d*m,v=h*x*c-_*u*c+_*o*f-a*x*f-h*o*m+a*u*m,L=_*u*l-h*x*l-_*o*d+a*x*d+h*o*p-a*u*p,T=t*b+i*y+n*v+s*L;if(T===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const A=1/T;return e[0]=b*A,e[1]=(x*d*s-u*p*s-x*n*f+i*p*f+u*n*m-i*d*m)*A,e[2]=(o*p*s-x*l*s+x*n*c-i*p*c-o*n*m+i*l*m)*A,e[3]=(u*l*s-o*d*s-u*n*c+i*d*c+o*n*f-i*l*f)*A,e[4]=y*A,e[5]=(h*p*s-_*d*s+_*n*f-t*p*f-h*n*m+t*d*m)*A,e[6]=(_*l*s-a*p*s-_*n*c+t*p*c+a*n*m-t*l*m)*A,e[7]=(a*d*s-h*l*s+h*n*c-t*d*c-a*n*f+t*l*f)*A,e[8]=v*A,e[9]=(_*u*s-h*x*s-_*i*f+t*x*f+h*i*m-t*u*m)*A,e[10]=(a*x*s-_*o*s+_*i*c-t*x*c-a*i*m+t*o*m)*A,e[11]=(h*o*s-a*u*s-h*i*c+t*u*c+a*i*f-t*o*f)*A,e[12]=L*A,e[13]=(h*x*n-_*u*n+_*i*d-t*x*d-h*i*p+t*u*p)*A,e[14]=(_*o*n-a*x*n-_*i*l+t*x*l+a*i*p-t*o*p)*A,e[15]=(a*u*n-h*o*n+h*i*l-t*u*l-a*i*d+t*o*d)*A,this}scale(e){const t=this.elements,i=e.x,n=e.y,s=e.z;return t[0]*=i,t[4]*=n,t[8]*=s,t[1]*=i,t[5]*=n,t[9]*=s,t[2]*=i,t[6]*=n,t[10]*=s,t[3]*=i,t[7]*=n,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],n=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,n))}makeTranslation(e,t,i){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,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),n=Math.sin(t),s=1-i,a=e.x,o=e.y,l=e.z,c=s*a,h=s*o;return this.set(c*a+i,c*o-n*l,c*l+n*o,0,c*o+n*l,h*o+i,h*l-n*a,0,c*l-n*o,h*l+n*a,s*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,n,s,a){return this.set(1,i,s,0,e,1,a,0,t,n,1,0,0,0,0,1),this}compose(e,t,i){const n=this.elements,s=t._x,a=t._y,o=t._z,l=t._w,c=s+s,h=a+a,u=o+o,d=s*c,f=s*h,_=s*u,x=a*h,p=a*u,m=o*u,b=l*c,y=l*h,v=l*u,L=i.x,T=i.y,A=i.z;return n[0]=(1-(x+m))*L,n[1]=(f+v)*L,n[2]=(_-y)*L,n[3]=0,n[4]=(f-v)*T,n[5]=(1-(d+m))*T,n[6]=(p+b)*T,n[7]=0,n[8]=(_+y)*A,n[9]=(p-b)*A,n[10]=(1-(d+x))*A,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,this}decompose(e,t,i){const n=this.elements;let s=rs.set(n[0],n[1],n[2]).length();const a=rs.set(n[4],n[5],n[6]).length(),o=rs.set(n[8],n[9],n[10]).length();this.determinant()<0&&(s=-s),e.x=n[12],e.y=n[13],e.z=n[14],ti.copy(this);const c=1/s,h=1/a,u=1/o;return ti.elements[0]*=c,ti.elements[1]*=c,ti.elements[2]*=c,ti.elements[4]*=h,ti.elements[5]*=h,ti.elements[6]*=h,ti.elements[8]*=u,ti.elements[9]*=u,ti.elements[10]*=u,t.setFromRotationMatrix(ti),i.x=s,i.y=a,i.z=o,this}makePerspective(e,t,i,n,s,a,o=Cn){const l=this.elements,c=2*s/(t-e),h=2*s/(i-n),u=(t+e)/(t-e),d=(i+n)/(i-n);let f,_;if(o===Cn)f=-(a+s)/(a-s),_=-2*a*s/(a-s);else if(o===Kl)f=-a/(a-s),_=-a*s/(a-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);return l[0]=c,l[4]=0,l[8]=u,l[12]=0,l[1]=0,l[5]=h,l[9]=d,l[13]=0,l[2]=0,l[6]=0,l[10]=f,l[14]=_,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,i,n,s,a,o=Cn){const l=this.elements,c=1/(t-e),h=1/(i-n),u=1/(a-s),d=(t+e)*c,f=(i+n)*h;let _,x;if(o===Cn)_=(a+s)*u,x=-2*u;else if(o===Kl)_=s*u,x=-1*u;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-d,l[1]=0,l[5]=2*h,l[9]=0,l[13]=-f,l[2]=0,l[6]=0,l[10]=x,l[14]=-_,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let n=0;n<16;n++)if(t[n]!==i[n])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const rs=new z,ti=new Oe,wy=new z(0,0,0),by=new z(1,1,1),Ki=new z,aa=new z,Ut=new z,iu=new Oe,nu=new cn;class Fs{constructor(e=0,t=0,i=0,n=Fs.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=n}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,n=this._order){return this._x=e,this._y=t,this._z=i,this._order=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const n=e.elements,s=n[0],a=n[4],o=n[8],l=n[1],c=n[5],h=n[9],u=n[2],d=n[6],f=n[10];switch(t){case"XYZ":this._y=Math.asin(At(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-h,f),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(d,c),this._z=0);break;case"YXZ":this._x=Math.asin(-At(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(o,f),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-u,s),this._z=0);break;case"ZXY":this._x=Math.asin(At(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-u,f),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-At(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(d,f),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-a,c));break;case"YZX":this._z=Math.asin(At(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,c),this._y=Math.atan2(-u,s)):(this._x=0,this._y=Math.atan2(o,f));break;case"XZY":this._z=Math.asin(-At(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(d,c),this._y=Math.atan2(o,s)):(this._x=Math.atan2(-h,f),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return iu.makeRotationFromQuaternion(e),this.setFromRotationMatrix(iu,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return nu.setFromEuler(this),this.setFromQuaternion(nu,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=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+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}}Fs.DEFAULT_ORDER="XYZ";class Ey{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let t=0;t1){for(let i=0;i0&&(n.userData=this.userData),n.layers=this.layers.mask,n.matrix=this.matrix.toArray(),n.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(n.matrixAutoUpdate=!1),this.isInstancedMesh&&(n.type="InstancedMesh",n.count=this.count,n.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(n.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(n.type="BatchedMesh",n.perObjectFrustumCulled=this.perObjectFrustumCulled,n.sortObjects=this.sortObjects,n.drawRanges=this._drawRanges,n.reservedRanges=this._reservedRanges,n.visibility=this._visibility,n.active=this._active,n.bounds=this._bounds.map(o=>({boxInitialized:o.boxInitialized,boxMin:o.box.min.toArray(),boxMax:o.box.max.toArray(),sphereInitialized:o.sphereInitialized,sphereRadius:o.sphere.radius,sphereCenter:o.sphere.center.toArray()})),n.maxInstanceCount=this._maxInstanceCount,n.maxVertexCount=this._maxVertexCount,n.maxIndexCount=this._maxIndexCount,n.geometryInitialized=this._geometryInitialized,n.geometryCount=this._geometryCount,n.matricesTexture=this._matricesTexture.toJSON(e),this._colorsTexture!==null&&(n.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(n.boundingSphere={center:n.boundingSphere.center.toArray(),radius:n.boundingSphere.radius}),this.boundingBox!==null&&(n.boundingBox={min:n.boundingBox.min.toArray(),max:n.boundingBox.max.toArray()}));function s(o,l){return o[l.uuid]===void 0&&(o[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?n.background=this.background.toJSON():this.background.isTexture&&(n.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(n.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){n.geometry=s(e.geometries,this.geometry);const o=this.geometry.parameters;if(o!==void 0&&o.shapes!==void 0){const l=o.shapes;if(Array.isArray(l))for(let c=0,h=l.length;c0){n.children=[];for(let o=0;o0){n.animations=[];for(let o=0;o0&&(i.geometries=o),l.length>0&&(i.materials=l),c.length>0&&(i.textures=c),h.length>0&&(i.images=h),u.length>0&&(i.shapes=u),d.length>0&&(i.skeletons=d),f.length>0&&(i.animations=f),_.length>0&&(i.nodes=_)}return i.object=n,i;function a(o){const l=[];for(const c in o){const h=o[c];delete h.metadata,l.push(h)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.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)),t===!0)for(let i=0;i0?n.multiplyScalar(1/Math.sqrt(s)):n.set(0,0,0)}static getBarycoord(e,t,i,n,s){ii.subVectors(n,t),Pi.subVectors(i,t),Xo.subVectors(e,t);const a=ii.dot(ii),o=ii.dot(Pi),l=ii.dot(Xo),c=Pi.dot(Pi),h=Pi.dot(Xo),u=a*c-o*o;if(u===0)return s.set(0,0,0),null;const d=1/u,f=(c*l-o*h)*d,_=(a*h-o*l)*d;return s.set(1-f-_,_,f)}static containsPoint(e,t,i,n){return this.getBarycoord(e,t,i,n,Li)===null?!1:Li.x>=0&&Li.y>=0&&Li.x+Li.y<=1}static getInterpolation(e,t,i,n,s,a,o,l){return this.getBarycoord(e,t,i,n,Li)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,Li.x),l.addScaledVector(a,Li.y),l.addScaledVector(o,Li.z),l)}static isFrontFacing(e,t,i,n){return ii.subVectors(i,t),Pi.subVectors(e,t),ii.cross(Pi).dot(n)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,n){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[n]),this}setFromAttributeAndIndices(e,t,i,n){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,n),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 ii.subVectors(this.c,this.b),Pi.subVectors(this.a,this.b),ii.cross(Pi).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return fi.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return fi.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,n,s){return fi.getInterpolation(e,this.a,this.b,this.c,t,i,n,s)}containsPoint(e){return fi.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return fi.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,n=this.b,s=this.c;let a,o;ls.subVectors(n,i),cs.subVectors(s,i),qo.subVectors(e,i);const l=ls.dot(qo),c=cs.dot(qo);if(l<=0&&c<=0)return t.copy(i);Yo.subVectors(e,n);const h=ls.dot(Yo),u=cs.dot(Yo);if(h>=0&&u<=h)return t.copy(n);const d=l*u-h*c;if(d<=0&&l>=0&&h<=0)return a=l/(l-h),t.copy(i).addScaledVector(ls,a);$o.subVectors(e,s);const f=ls.dot($o),_=cs.dot($o);if(_>=0&&f<=_)return t.copy(s);const x=f*c-l*_;if(x<=0&&c>=0&&_<=0)return o=c/(c-_),t.copy(i).addScaledVector(cs,o);const p=h*_-f*u;if(p<=0&&u-h>=0&&f-_>=0)return cu.subVectors(s,n),o=(u-h)/(u-h+(f-_)),t.copy(n).addScaledVector(cu,o);const m=1/(p+x+d);return a=x*m,o=d*m,t.copy(i).addScaledVector(ls,a).addScaledVector(cs,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const Bd={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},Ji={h:0,s:0,l:0},la={h:0,s:0,l:0};function jo(r,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?r+(e-r)*6*t:t<1/2?e:t<2/3?r+(e-r)*6*(2/3-t):r}class ft{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){const n=e;n&&n.isColor?this.copy(n):typeof n=="number"?this.setHex(n):typeof n=="string"&&this.setStyle(n)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=zt){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Ot.toWorkingColorSpace(this,t),this}setRGB(e,t,i,n=Ot.workingColorSpace){return this.r=e,this.g=t,this.b=i,Ot.toWorkingColorSpace(this,n),this}setHSL(e,t,i,n=Ot.workingColorSpace){if(e=yc(e,1),t=At(t,0,1),i=At(i,0,1),t===0)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+t):i+t-i*t,a=2*i-s;this.r=jo(a,s,e+1/3),this.g=jo(a,s,e),this.b=jo(a,s,e-1/3)}return Ot.toWorkingColorSpace(this,n),this}setStyle(e,t=zt){function i(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let n;if(n=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const a=n[1],o=n[2];switch(a){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,t);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,t);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=n[1],a=s.length;if(a===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(a===6)return this.setHex(parseInt(s,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=zt){const i=Bd[e.toLowerCase()];return i!==void 0?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=ws(e.r),this.g=ws(e.g),this.b=ws(e.b),this}copyLinearToSRGB(e){return this.r=Fo(e.r),this.g=Fo(e.g),this.b=Fo(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=zt){return Ot.fromWorkingColorSpace(bt.copy(this),e),Math.round(At(bt.r*255,0,255))*65536+Math.round(At(bt.g*255,0,255))*256+Math.round(At(bt.b*255,0,255))}getHexString(e=zt){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Ot.workingColorSpace){Ot.fromWorkingColorSpace(bt.copy(this),t);const i=bt.r,n=bt.g,s=bt.b,a=Math.max(i,n,s),o=Math.min(i,n,s);let l,c;const h=(o+a)/2;if(o===a)l=0,c=0;else{const u=a-o;switch(c=h<=.5?u/(a+o):u/(2-a-o),a){case i:l=(n-s)/u+(n0!=e>0&&this.version++,this._alphaTest=e}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const n=this[t];if(n===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Bh&&(i.blending=this.blending),this.side!==Ha&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==kh&&(i.blendSrc=this.blendSrc),this.blendDst!==Hh&&(i.blendDst=this.blendDst),this.blendEquation!==zh&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==Vh&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Kh&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==es&&(i.stencilFail=this.stencilFail),this.stencilZFail!==es&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==es&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function n(s){const a=[];for(const o in s){const l=s[o];delete l.metadata,a.push(l)}return a}if(t){const s=n(e.textures),a=n(e.images);s.length>0&&(i.textures=s),a.length>0&&(i.images=a)}return i}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 t=e.clippingPlanes;let i=null;if(t!==null){const n=t.length;i=new Array(n);for(let s=0;s!==n;++s)i[s]=t[s].clone()}return this.clippingPlanes=i,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++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class xs extends Pn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ft(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.envMapRotation=new Fs,this.combine=Vx,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.envMapRotation.copy(e.envMapRotation),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 ht=new z,ca=new et;class li{constructor(e,t,i=!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=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=jl,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=xc,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return Od("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}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,t,i){e*=this.itemSize,i*=t.itemSize;for(let n=0,s=this.itemSize;n0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const l in i){const c=i[l];e.data.attributes[l]=c.toJSON(e.data)}const n={};let s=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],h=[];for(let u=0,d=c.length;u0&&(n[l]=h,s=!0)}s&&(e.data.morphAttributes=n,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const o=this.boundingSphere;return o!==null&&(e.data.boundingSphere={center:o.center.toArray(),radius:o.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 t={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone(t));const n=e.attributes;for(const c in n){const h=n[c];this.setAttribute(c,h.clone(t))}const s=e.morphAttributes;for(const c in s){const h=[],u=s[c];for(let d=0,f=u.length;d0){const n=t[i[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=n.length;s(e.far-e.near)**2))&&(hu.copy(s).invert(),yn.copy(e.ray).applyMatrix4(hu),!(i.boundingBox!==null&&yn.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,yn)))}_computeIntersections(e,t,i){let n;const s=this.geometry,a=this.material,o=s.index,l=s.attributes.position,c=s.attributes.uv,h=s.attributes.uv1,u=s.attributes.normal,d=s.groups,f=s.drawRange;if(o!==null)if(Array.isArray(a))for(let _=0,x=d.length;_t.far?null:{distance:c,point:ga.clone(),object:r}}function _a(r,e,t,i,n,s,a,o,l,c){r.getVertexPosition(o,us),r.getVertexPosition(l,ds),r.getVertexPosition(c,fs);const h=Ny(r,e,t,i,us,ds,fs,ma);if(h){n&&(da.fromBufferAttribute(n,o),fa.fromBufferAttribute(n,l),pa.fromBufferAttribute(n,c),h.uv=fi.getInterpolation(ma,us,ds,fs,da,fa,pa,new et)),s&&(da.fromBufferAttribute(s,o),fa.fromBufferAttribute(s,l),pa.fromBufferAttribute(s,c),h.uv1=fi.getInterpolation(ma,us,ds,fs,da,fa,pa,new et)),a&&(du.fromBufferAttribute(a,o),fu.fromBufferAttribute(a,l),pu.fromBufferAttribute(a,c),h.normal=fi.getInterpolation(ma,us,ds,fs,du,fu,pu,new z),h.normal.dot(i.direction)>0&&h.normal.multiplyScalar(-1));const u={a:o,b:l,c,normal:new z,materialIndex:0};fi.getNormal(us,ds,fs,u.normal),h.face=u}return h}class zd extends st{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Oe,this.projectionMatrix=new Oe,this.projectionMatrixInverse=new Oe,this.coordinateSystem=Cn}copy(e,t){return super.copy(e,t),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,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const Zi=new z,mu=new et,gu=new et;class vc extends zd{constructor(e=50,t=1,i=.1,n=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=n,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=fr*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(rr*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return fr*2*Math.atan(Math.tan(rr*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,i){Zi.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(Zi.x,Zi.y).multiplyScalar(-e/Zi.z),Zi.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(Zi.x,Zi.y).multiplyScalar(-e/Zi.z)}getViewSize(e,t){return this.getViewBounds(e,mu,gu),t.subVectors(gu,mu)}setViewOffset(e,t,i,n,s,a){this.aspect=e/t,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=t,this.view.offsetX=i,this.view.offsetY=n,this.view.width=s,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(rr*.5*this.fov)/this.zoom,i=2*t,n=this.aspect*i,s=-.5*n;const a=this.view;if(this.view!==null&&this.view.enabled){const l=a.fullWidth,c=a.fullHeight;s+=a.offsetX*n/l,t-=a.offsetY*i/c,n*=a.width/l,i*=a.height/c}const o=this.filmOffset;o!==0&&(s+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+n,t,t-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const Zo=new z,Uy=new z,Fy=new Bi;class ps{constructor(e=new z(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,n){return this.normal.set(e,t,i),this.constant=n,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){const n=Zo.subVectors(i,t).cross(Uy.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(n,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const i=e.delta(Zo),n=this.normal.dot(i);if(n===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const s=-(e.start.dot(this.normal)+this.constant)/n;return s<0||s>1?null:t.copy(e.start).addScaledVector(i,s)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>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,t){const i=t||Fy.getNormalMatrix(e),n=this.coplanarPoint(Zo).applyMatrix4(e),s=this.normal.applyMatrix3(i).normalize();return this.constant=-n.dot(s),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 Mn=new xi,xa=new z;class Oy{constructor(e=new ps,t=new ps,i=new ps,n=new ps,s=new ps,a=new ps){this.planes=[e,t,i,n,s,a]}set(e,t,i,n,s,a){const o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(i),o[3].copy(n),o[4].copy(s),o[5].copy(a),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=Cn){const i=this.planes,n=e.elements,s=n[0],a=n[1],o=n[2],l=n[3],c=n[4],h=n[5],u=n[6],d=n[7],f=n[8],_=n[9],x=n[10],p=n[11],m=n[12],b=n[13],y=n[14],v=n[15];if(i[0].setComponents(l-s,d-c,p-f,v-m).normalize(),i[1].setComponents(l+s,d+c,p+f,v+m).normalize(),i[2].setComponents(l+a,d+h,p+_,v+b).normalize(),i[3].setComponents(l-a,d-h,p-_,v-b).normalize(),i[4].setComponents(l-o,d-u,p-x,v-y).normalize(),t===Cn)i[5].setComponents(l+o,d+u,p+x,v+y).normalize();else if(t===Kl)i[5].setComponents(o,u,x,y).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Mn.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Mn.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Mn)}intersectsSprite(e){return Mn.center.set(0,0,0),Mn.radius=.7071067811865476,Mn.applyMatrix4(e.matrixWorld),this.intersectsSphere(Mn)}intersectsSphere(e){const t=this.planes,i=e.center,n=-e.radius;for(let s=0;s<6;s++)if(t[s].distanceToPoint(i)0?e.max.x:e.min.x,xa.y=n.normal.y>0?e.max.y:e.min.y,xa.z=n.normal.z>0?e.max.z:e.min.z,n.distanceToPoint(xa)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}class kd extends zd{constructor(e=-1,t=1,i=1,n=-1,s=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=n,this.near=s,this.far=a,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,i,n,s,a){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=t,this.view.offsetX=i,this.view.offsetY=n,this.view.width=s,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2;let s=i-e,a=i+e,o=n+t,l=n-t;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,a=s+c*this.view.width,o-=h*this.view.offsetY,l=o-h*this.view.height}this.projectionMatrix.makeOrthographic(s,a,o,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}class Qo extends st{constructor(){super(),this.isGroup=!0,this.type="Group"}}class By{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=jl,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=ai()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return Od("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let n=0,s=this.stride;n0){const n=t[i[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=n.length;si)return;il.applyMatrix4(r.matrixWorld);const l=e.ray.origin.distanceTo(il);if(!(le.far))return{distance:l,point:Au.clone().applyMatrix4(r.matrixWorld),index:n,face:null,faceIndex:null,object:r}}const Tu=new z,Ru=new z;class Wy extends bc{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,i=[];for(let n=0,s=t.count;n0){const n=t[i[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=n.length;sn.far)return;s.push({distance:c,distanceToRay:Math.sqrt(o),point:l,index:e,face:null,object:a})}}class Ec extends Pn{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new ft(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ft(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Jx,this.normalScale=new et(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Fs,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class yi extends Ec{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new et(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return At(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(t){this.ior=(1+.4*t)/(1-.4*t)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new ft(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new ft(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new ft(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._dispersion=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}function Ea(r,e,t){return!r||!t&&r.constructor===e?r:typeof e.BYTES_PER_ELEMENT=="number"?new e(r):Array.prototype.slice.call(r)}function Yy(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function $y(r){function e(n,s){return r[n]-r[s]}const t=r.length,i=new Array(t);for(let n=0;n!==t;++n)i[n]=n;return i.sort(e),i}function Lu(r,e,t){const i=r.length,n=new r.constructor(i);for(let s=0,a=0;a!==i;++s){const o=t[s]*e;for(let l=0;l!==e;++l)n[a++]=r[o+l]}return n}function Xd(r,e,t,i){let n=1,s=r[0];for(;s!==void 0&&s[i]===void 0;)s=r[n++];if(s===void 0)return;let a=s[i];if(a!==void 0)if(Array.isArray(a))do a=s[i],a!==void 0&&(e.push(s.time),t.push.apply(t,a)),s=r[n++];while(s!==void 0);else if(a.toArray!==void 0)do a=s[i],a!==void 0&&(e.push(s.time),a.toArray(t,t.length)),s=r[n++];while(s!==void 0);else do a=s[i],a!==void 0&&(e.push(s.time),t.push(a)),s=r[n++];while(s!==void 0)}class Er{constructor(e,t,i,n){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=n!==void 0?n:new t.constructor(i),this.sampleValues=t,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let i=this._cachedIndex,n=t[i],s=t[i-1];i:{e:{let a;t:{n:if(!(e=s)){const o=t[1];e=s)break e}a=i,i=0;break t}break i}for(;i>>1;et;)--a;if(++a,s!==0||a!==n){s>=a&&(a=Math.max(a,1),s=a-1);const o=this.getValueSize();this.times=i.slice(s,a),this.values=this.values.slice(s*o,a*o)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,n=this.values,s=i.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let o=0;o!==s;o++){const l=i[o];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,l),e=!1;break}if(a!==null&&a>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,o,l,a),e=!1;break}a=l}if(n!==void 0&&Yy(n))for(let o=0,l=n.length;o!==l;++o){const c=n[o];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,o,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),i=this.getValueSize(),n=this.getInterpolation()===No,s=e.length-1;let a=1;for(let o=1;o0){e[a]=e[s];for(let o=s*i,l=a*i,c=0;c!==i;++c)t[l+c]=t[o+c];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=t.slice(0,a*i)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),i=this.constructor,n=new i(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}Mi.prototype.TimeBufferType=Float32Array;Mi.prototype.ValueBufferType=Float32Array;Mi.prototype.DefaultInterpolation=dr;class Bs extends Mi{constructor(e,t,i){super(e,t,i)}}Bs.prototype.ValueTypeName="bool";Bs.prototype.ValueBufferType=Array;Bs.prototype.DefaultInterpolation=ur;Bs.prototype.InterpolantFactoryMethodLinear=void 0;Bs.prototype.InterpolantFactoryMethodSmooth=void 0;class qd extends Mi{}qd.prototype.ValueTypeName="color";class Ps extends Mi{}Ps.prototype.ValueTypeName="number";class Zy extends Er{constructor(e,t,i,n){super(e,t,i,n)}interpolate_(e,t,i,n){const s=this.resultBuffer,a=this.sampleValues,o=this.valueSize,l=(i-t)/(n-t);let c=e*o;for(let h=c+o;c!==h;c+=4)cn.slerpFlat(s,0,a,c-o,a,c,l);return s}}class Ls extends Mi{InterpolantFactoryMethodLinear(e){return new Zy(this.times,this.values,this.getValueSize(),e)}}Ls.prototype.ValueTypeName="quaternion";Ls.prototype.InterpolantFactoryMethodSmooth=void 0;class zs extends Mi{constructor(e,t,i){super(e,t,i)}}zs.prototype.ValueTypeName="string";zs.prototype.ValueBufferType=Array;zs.prototype.DefaultInterpolation=ur;zs.prototype.InterpolantFactoryMethodLinear=void 0;zs.prototype.InterpolantFactoryMethodSmooth=void 0;class Is extends Mi{}Is.prototype.ValueTypeName="vector";class Qy{constructor(e="",t=-1,i=[],n=jx){this.name=e,this.tracks=i,this.duration=t,this.blendMode=n,this.uuid=ai(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,n=1/(e.fps||1);for(let a=0,o=i.length;a!==o;++a)t.push(tM(i[a]).scale(n));const s=new this(e.name,e.duration,t,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const t=[],i=e.tracks,n={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,a=i.length;s!==a;++s)t.push(Mi.toJSON(i[s]));return n}static CreateFromMorphTargetSequence(e,t,i,n){const s=t.length,a=[];for(let o=0;o1){const u=h[1];let d=n[u];d||(n[u]=d=[]),d.push(c)}}const a=[];for(const o in n)a.push(this.CreateFromMorphTargetSequence(o,n[o],t,i));return a}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(u,d,f,_,x){if(f.length!==0){const p=[],m=[];Xd(f,p,m,_),p.length!==0&&x.push(new u(d,p,m))}},n=[],s=e.name||"default",a=e.fps||30,o=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let u=0;u{t&&t(s),this.manager.itemEnd(e)},0),s;if(Ii[e]!==void 0){Ii[e].push({onLoad:t,onProgress:i,onError:n});return}Ii[e]=[],Ii[e].push({onLoad:t,onProgress:i,onError:n});const a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),o=this.mimeType,l=this.responseType;fetch(a).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const h=Ii[e],u=c.body.getReader(),d=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),f=d?parseInt(d):0,_=f!==0;let x=0;const p=new ReadableStream({start(m){b();function b(){u.read().then(({done:y,value:v})=>{if(y)m.close();else{x+=v.byteLength;const L=new ProgressEvent("progress",{lengthComputable:_,loaded:x,total:f});for(let T=0,A=h.length;T{m.error(y)})}}});return new Response(p)}else throw new sM(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(h=>new DOMParser().parseFromString(h,o));case"json":return c.json();default:if(o===void 0)return c.text();{const u=/charset="?([^;"\s]*)"?/i.exec(o),d=u&&u[1]?u[1].toLowerCase():void 0,f=new TextDecoder(d);return c.arrayBuffer().then(_=>f.decode(_))}}}).then(c=>{tn.add(e,c);const h=Ii[e];delete Ii[e];for(let u=0,d=h.length;u{const h=Ii[e];if(h===void 0)throw this.manager.itemError(e),c;delete Ii[e];for(let u=0,d=h.length;u{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class rM extends ks{constructor(e){super(e)}load(e,t,i,n){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,a=tn.get(e);if(a!==void 0)return s.manager.itemStart(e),setTimeout(function(){t&&t(a),s.manager.itemEnd(e)},0),a;const o=Jl("img");function l(){h(),tn.add(e,this),t&&t(this),s.manager.itemEnd(e)}function c(u){h(),n&&n(u),s.manager.itemError(e),s.manager.itemEnd(e)}function h(){o.removeEventListener("load",l,!1),o.removeEventListener("error",c,!1)}return o.addEventListener("load",l,!1),o.addEventListener("error",c,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(o.crossOrigin=this.crossOrigin),s.manager.itemStart(e),o.src=e,o}}class aM extends ks{constructor(e){super(e)}load(e,t,i,n){const s=new oi,a=new rM(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,function(o){s.image=o,s.needsUpdate=!0,t!==void 0&&t(s)},i,n),s}}class Ac extends st{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new ft(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),this.target!==void 0&&(t.object.target=this.target.uuid),t}}const nl=new Oe,Iu=new z,Du=new z;class Tc{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new et(512,512),this.map=null,this.mapPass=null,this.matrix=new Oe,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Oy,this._frameExtents=new et(1,1),this._viewportCount=1,this._viewports=[new qt(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,i=this.matrix;Iu.setFromMatrixPosition(e.matrixWorld),t.position.copy(Iu),Du.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(Du),t.updateMatrixWorld(),nl.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(nl),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(nl)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.intensity=e.intensity,this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.intensity!==1&&(e.intensity=this.intensity),this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class oM extends Tc{constructor(){super(new vc(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,i=fr*2*e.angle*this.focus,n=this.mapSize.width/this.mapSize.height,s=e.distance||t.far;(i!==t.fov||n!==t.aspect||s!==t.far)&&(t.fov=i,t.aspect=n,t.far=s,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class lM extends Ac{constructor(e,t,i=0,n=Math.PI/3,s=0,a=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(st.DEFAULT_UP),this.updateMatrix(),this.target=new st,this.distance=i,this.angle=n,this.penumbra=s,this.decay=a,this.map=null,this.shadow=new oM}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const Nu=new Oe,Qs=new z,sl=new z;class cM extends Tc{constructor(){super(new vc(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new et(4,2),this._viewportCount=6,this._viewports=[new qt(2,1,1,1),new qt(0,1,1,1),new qt(3,1,1,1),new qt(1,1,1,1),new qt(3,0,1,1),new qt(1,0,1,1)],this._cubeDirections=[new z(1,0,0),new z(-1,0,0),new z(0,0,1),new z(0,0,-1),new z(0,1,0),new z(0,-1,0)],this._cubeUps=[new z(0,1,0),new z(0,1,0),new z(0,1,0),new z(0,1,0),new z(0,0,1),new z(0,0,-1)]}updateMatrices(e,t=0){const i=this.camera,n=this.matrix,s=e.distance||i.far;s!==i.far&&(i.far=s,i.updateProjectionMatrix()),Qs.setFromMatrixPosition(e.matrixWorld),i.position.copy(Qs),sl.copy(i.position),sl.add(this._cubeDirections[t]),i.up.copy(this._cubeUps[t]),i.lookAt(sl),i.updateMatrixWorld(),n.makeTranslation(-Qs.x,-Qs.y,-Qs.z),Nu.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Nu)}}class hM extends Ac{constructor(e,t,i=0,n=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=n,this.shadow=new cM}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class uM extends Tc{constructor(){super(new kd(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class dM extends Ac{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(st.DEFAULT_UP),this.updateMatrix(),this.target=new st,this.shadow=new uM}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class or{static decodeText(e){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let i=0,n=e.length;i"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,i,n){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,a=tn.get(e);if(a!==void 0){if(s.manager.itemStart(e),a.then){a.then(c=>{t&&t(c),s.manager.itemEnd(e)}).catch(c=>{n&&n(c)});return}return setTimeout(function(){t&&t(a),s.manager.itemEnd(e)},0),a}const o={};o.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",o.headers=this.requestHeader;const l=fetch(e,o).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(c){return tn.add(e,c),t&&t(c),s.manager.itemEnd(e),c}).catch(function(c){n&&n(c),tn.remove(e),s.manager.itemError(e),s.manager.itemEnd(e)});tn.add(e,l),s.manager.itemStart(e)}}const Rc="\\[\\]\\.:\\/",pM=new RegExp("["+Rc+"]","g"),Cc="[^"+Rc+"]",mM="[^"+Rc.replace("\\.","")+"]",gM=/((?:WC+[\/:])*)/.source.replace("WC",Cc),_M=/(WCOD+)?/.source.replace("WCOD",mM),xM=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Cc),yM=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Cc),MM=new RegExp("^"+gM+_M+xM+yM+"$"),vM=["material","materials","bones","map"];class SM{constructor(e,t,i){const n=i||$e.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,n)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,n=this._bindings[i];n!==void 0&&n.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let n=this._targetGroup.nCachedObjects_,s=i.length;n!==s;++n)i[n].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}class $e{constructor(e,t,i){this.path=t,this.parsedPath=i||$e.parseTrackName(t),this.node=$e.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new $e.Composite(e,t,i):new $e(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(pM,"")}static parseTrackName(e){const t=MM.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},n=i.nodeName&&i.nodeName.lastIndexOf(".");if(n!==void 0&&n!==-1){const s=i.nodeName.substring(n+1);vM.indexOf(s)!==-1&&(i.nodeName=i.nodeName.substring(0,n),i.objectName=s)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(i!==void 0)return i}if(e.children){const i=function(s){for(let a=0;a=2.0 are supported."));return}const c=new rv(s,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let h=0;h=0&&o[u]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+u+'".')}}c.setExtensions(a),c.setPlugins(o),c.parse(i,n)}parseAsync(e,t){const i=this;return new Promise(function(n,s){i.parse(e,t,n,s)})}}function TM(){let r={};return{get:function(e){return r[e]},add:function(e,t){r[e]=t},remove:function(e){delete r[e]},removeAll:function(){r={}}}}const Ue={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class RM{constructor(e){this.parser=e,this.name=Ue.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let i=0,n=t.length;i=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,s.source,a)}}class VM{constructor(e){this.parser=e,this.name=Ue.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,n=i.json,s=n.textures[e];if(!s.extensions||!s.extensions[t])return null;const a=s.extensions[t],o=n.images[a.source];let l=i.textureLoader;if(o.uri){const c=i.options.manager.getHandler(o.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return i.loadTextureImage(e,a.source,l);if(n.extensionsRequired&&n.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class GM{constructor(e){this.parser=e,this.name=Ue.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,n=i.json,s=n.textures[e];if(!s.extensions||!s.extensions[t])return null;const a=s.extensions[t],o=n.images[a.source];let l=i.textureLoader;if(o.uri){const c=i.options.manager.getHandler(o.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return i.loadTextureImage(e,a.source,l);if(n.extensionsRequired&&n.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class WM{constructor(e){this.name=Ue.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,i=t.bufferViews[e];if(i.extensions&&i.extensions[this.name]){const n=i.extensions[this.name],s=this.parser.getDependency("buffer",n.buffer),a=this.parser.options.meshoptDecoder;if(!a||!a.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(o){const l=n.byteOffset||0,c=n.byteLength||0,h=n.count,u=n.byteStride,d=new Uint8Array(o,l,c);return a.decodeGltfBufferAsync?a.decodeGltfBufferAsync(h,u,d,n.mode,n.filter).then(function(f){return f.buffer}):a.ready.then(function(){const f=new ArrayBuffer(h*u);return a.decodeGltfBuffer(new Uint8Array(f),h,u,d,n.mode,n.filter),f})})}else return null}}class XM{constructor(e){this.name=Ue.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,i=t.nodes[e];if(!i.extensions||!i.extensions[this.name]||i.mesh===void 0)return null;const n=t.meshes[i.mesh];for(const c of n.primitives)if(c.mode!==Wt.TRIANGLES&&c.mode!==Wt.TRIANGLE_STRIP&&c.mode!==Wt.TRIANGLE_FAN&&c.mode!==void 0)return null;const a=i.extensions[this.name].attributes,o=[],l={};for(const c in a)o.push(this.parser.getDependency("accessor",a[c]).then(h=>(l[c]=h,l[c])));return o.length<1?null:(o.push(this.parser.createNodeMesh(e)),Promise.all(o).then(c=>{const h=c.pop(),u=h.isGroup?h.children:[h],d=c[0].count,f=[];for(const _ of u){const x=new Oe,p=new z,m=new cn,b=new z(1,1,1),y=new Gy(_.geometry,_.material,d);for(let v=0;v0||r.search(/^data\:image\/jpeg/)===0?"image/jpeg":r.search(/\.webp($|\?)/i)>0||r.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const sv=new Oe;class rv{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new TM,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let i=!1,n=-1,s=!1,a=-1;if(typeof navigator<"u"){const o=navigator.userAgent;i=/^((?!chrome|android).)*safari/i.test(o)===!0;const l=o.match(/Version\/(\d+)/);n=i&&l?parseInt(l[1],10):-1,s=o.indexOf("Firefox")>-1,a=s?o.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||i&&n<17||s&&a<98?this.textureLoader=new aM(this.options.manager):this.textureLoader=new fM(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Yd(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const i=this,n=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(a){return a._markDefs&&a._markDefs()}),Promise.all(this._invokeAll(function(a){return a.beforeRoot&&a.beforeRoot()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(a){const o={scene:a[0][n.scene||0],scenes:a[0],animations:a[1],cameras:a[2],asset:n.asset,parser:i,userData:{}};return vn(s,o,n),Ni(o,n),Promise.all(i._invokeAll(function(l){return l.afterRoot&&l.afterRoot(o)})).then(function(){for(const l of o.scenes)l.updateMatrixWorld();e(o)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],i=this.json.meshes||[];for(let n=0,s=t.length;n{const l=this.associations.get(a);l!=null&&this.associations.set(o,l);for(const[c,h]of a.children.entries())s(h,o.children[c])};return s(i,n),n.name+="_instance_"+e.uses[t]++,n}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let i=0;i=2&&p.setY(E,T[A*l+1]),l>=3&&p.setZ(E,T[A*l+2]),l>=4&&p.setW(E,T[A*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return p})}loadTexture(e){const t=this.json,i=this.options,s=t.textures[e].source,a=t.images[s];let o=this.textureLoader;if(a.uri){const l=i.manager.getHandler(a.uri);l!==null&&(o=l)}return this.loadTextureImage(e,s,o)}loadTextureImage(e,t,i){const n=this,s=this.json,a=s.textures[e],o=s.images[t],l=(o.uri||o.bufferView)+":"+a.sampler;if(this.textureCache[l])return this.textureCache[l];const c=this.loadImageSource(t,i).then(function(h){h.flipY=!1,h.name=a.name||o.name||"",h.name===""&&typeof o.uri=="string"&&o.uri.startsWith("data:image/")===!1&&(h.name=o.uri);const d=(s.samplers||{})[a.sampler]||{};return h.magFilter=Ou[d.magFilter]||gc,h.minFilter=Ou[d.minFilter]||_c,h.wrapS=Bu[d.wrapS]||hr,h.wrapT=Bu[d.wrapT]||hr,n.associations.set(h,{textures:e}),h}).catch(function(){return null});return this.textureCache[l]=c,c}loadImageSource(e,t){const i=this,n=this.json,s=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(u=>u.clone());const a=n.images[e],o=self.URL||self.webkitURL;let l=a.uri||"",c=!1;if(a.bufferView!==void 0)l=i.getDependency("bufferView",a.bufferView).then(function(u){c=!0;const d=new Blob([u],{type:a.mimeType});return l=o.createObjectURL(d),l});else if(a.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const h=Promise.resolve(l).then(function(u){return new Promise(function(d,f){let _=d;t.isImageBitmapLoader===!0&&(_=function(x){const p=new oi(x);p.needsUpdate=!0,d(p)}),t.load(or.resolveURL(u,s.path),_,void 0,f)})}).then(function(u){return c===!0&&o.revokeObjectURL(l),Ni(u,a),u.userData.mimeType=a.mimeType||nv(a.uri),u}).catch(function(u){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),u});return this.sourceCache[e]=h,h}assignTexture(e,t,i,n){const s=this;return this.getDependency("texture",i.index).then(function(a){if(!a)return null;if(i.texCoord!==void 0&&i.texCoord>0&&(a=a.clone(),a.channel=i.texCoord),s.extensions[Ue.KHR_TEXTURE_TRANSFORM]){const o=i.extensions!==void 0?i.extensions[Ue.KHR_TEXTURE_TRANSFORM]:void 0;if(o){const l=s.associations.get(a);a=s.extensions[Ue.KHR_TEXTURE_TRANSFORM].extendTexture(a,o),s.associations.set(a,l)}}return n!==void 0&&(a.colorSpace=n),e[t]=a,a})}assignFinalMaterial(e){const t=e.geometry;let i=e.material;const n=t.attributes.tangent===void 0,s=t.attributes.color!==void 0,a=t.attributes.normal===void 0;if(e.isPoints){const o="PointsMaterial:"+i.uuid;let l=this.cache.get(o);l||(l=new Wd,Pn.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,l.sizeAttenuation=!1,this.cache.add(o,l)),i=l}else if(e.isLine){const o="LineBasicMaterial:"+i.uuid;let l=this.cache.get(o);l||(l=new Gd,Pn.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,this.cache.add(o,l)),i=l}if(n||s||a){let o="ClonedMaterial:"+i.uuid+":";n&&(o+="derivative-tangents:"),s&&(o+="vertex-colors:"),a&&(o+="flat-shading:");let l=this.cache.get(o);l||(l=i.clone(),s&&(l.vertexColors=!0),a&&(l.flatShading=!0),n&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(o,l),this.associations.set(l,this.associations.get(i))),i=l}e.material=i}getMaterialType(){return Ec}loadMaterial(e){const t=this,i=this.json,n=this.extensions,s=i.materials[e];let a;const o={},l=s.extensions||{},c=[];if(l[Ue.KHR_MATERIALS_UNLIT]){const u=n[Ue.KHR_MATERIALS_UNLIT];a=u.getMaterialType(),c.push(u.extendParams(o,s,t))}else{const u=s.pbrMetallicRoughness||{};if(o.color=new ft(1,1,1),o.opacity=1,Array.isArray(u.baseColorFactor)){const d=u.baseColorFactor;o.color.setRGB(d[0],d[1],d[2],jt),o.opacity=d[3]}u.baseColorTexture!==void 0&&c.push(t.assignTexture(o,"map",u.baseColorTexture,zt)),o.metalness=u.metallicFactor!==void 0?u.metallicFactor:1,o.roughness=u.roughnessFactor!==void 0?u.roughnessFactor:1,u.metallicRoughnessTexture!==void 0&&(c.push(t.assignTexture(o,"metalnessMap",u.metallicRoughnessTexture)),c.push(t.assignTexture(o,"roughnessMap",u.metallicRoughnessTexture))),a=this._invokeOne(function(d){return d.getMaterialType&&d.getMaterialType(e)}),c.push(Promise.all(this._invokeAll(function(d){return d.extendMaterialParams&&d.extendMaterialParams(e,o)})))}s.doubleSided===!0&&(o.side=Hx);const h=s.alphaMode||al.OPAQUE;if(h===al.BLEND?(o.transparent=!0,o.depthWrite=!1):(o.transparent=!1,h===al.MASK&&(o.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&a!==xs&&(c.push(t.assignTexture(o,"normalMap",s.normalTexture)),o.normalScale=new et(1,1),s.normalTexture.scale!==void 0)){const u=s.normalTexture.scale;o.normalScale.set(u,u)}if(s.occlusionTexture!==void 0&&a!==xs&&(c.push(t.assignTexture(o,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(o.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&a!==xs){const u=s.emissiveFactor;o.emissive=new ft().setRGB(u[0],u[1],u[2],jt)}return s.emissiveTexture!==void 0&&a!==xs&&c.push(t.assignTexture(o,"emissiveMap",s.emissiveTexture,zt)),Promise.all(c).then(function(){const u=new a(o);return s.name&&(u.name=s.name),Ni(u,s),t.associations.set(u,{materials:e}),s.extensions&&vn(n,u,s),u})}createUniqueName(e){const t=$e.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,i=this.extensions,n=this.primitiveCache;function s(o){return i[Ue.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(o,t).then(function(l){return zu(l,o,t)})}const a=[];for(let o=0,l=e.length;o0&&tv(m,s),m.name=t.createUniqueName(s.name||"mesh_"+e),Ni(m,s),p.extensions&&vn(n,m,p),t.assignFinalMaterial(m),u.push(m)}for(let f=0,_=u.length;f<_;f++)t.associations.set(u[f],{meshes:e,primitives:f});if(u.length===1)return s.extensions&&vn(n,u[0],s),u[0];const d=new Qo;s.extensions&&vn(n,d,s),t.associations.set(d,{meshes:e});for(let f=0,_=u.length;f<_;f++)d.add(u[f]);return d})}loadCamera(e){let t;const i=this.json.cameras[e],n=i[i.type];if(!n){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return i.type==="perspective"?t=new vc(my.radToDeg(n.yfov),n.aspectRatio||1,n.znear||1,n.zfar||2e6):i.type==="orthographic"&&(t=new kd(-n.xmag,n.xmag,n.ymag,-n.ymag,n.znear,n.zfar)),i.name&&(t.name=this.createUniqueName(i.name)),Ni(t,i),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],i=[];for(let n=0,s=t.joints.length;n1?h=new Qo:c.length===1?h=c[0]:h=new st,h!==c[0])for(let u=0,d=c.length;u{const u=new Map;for(const[d,f]of n.associations)(d instanceof Pn||d instanceof oi)&&u.set(d,f);return h.traverse(d=>{const f=n.associations.get(d);f!=null&&u.set(d,f)}),u};return n.associations=c(s),s})}_createAnimationTracks(e,t,i,n,s){const a=[],o=e.name?e.name:e.uuid,l=[];Qi[s.path]===Qi.weights?e.traverse(function(d){d.morphTargetInfluences&&l.push(d.name?d.name:d.uuid)}):l.push(o);let c;switch(Qi[s.path]){case Qi.weights:c=Ps;break;case Qi.rotation:c=Ls;break;case Qi.position:case Qi.scale:c=Is;break;default:switch(i.itemSize){case 1:c=Ps;break;case 2:case 3:default:c=Is;break}break}const h=n.interpolation!==void 0?ZM[n.interpolation]:dr,u=this._getArrayFromAccessor(i);for(let d=0,f=l.length;d{r(3,5)},lr.onError=()=>{console.log("ERROR LOADING"),r(3,5)};const e=new AM(lr);e.load("./models/bus.glb",t=>{ku(t,.4,"bus")}),e.load("./models/scene.glb",t=>{ku(t,3,"road")})}function ku(r,e,t){r.scene.scale.set(e,e,e),Ar[t]=r.scene}const pr=2736,mr=1216,Jd=new Fx(!0),Dn=EM,mv=new mc(Dn,100,2,8,!1),gv=new Sr({color:16711680}),_v=new kt(mv,gv);_v.scale.set(4,4,4);const Ka=new mx({antialias:!0,powerPreference:"high-performance"});Ka.setSize(pr,mr);Ka.shadowMap.enabled=!0;document.body.appendChild(Ka.domElement);new Xt(75,pr/mr,.1,100);const Aa=1/25,xv=new uc(pr*Aa/-2,pr*Aa/2,mr*Aa/2,mr*Aa/-2,.1,200),Un=xv,yv=new g(20,32,40),Mv=new g(-9,9,2);Un.position.set(0,0,0);Un.position.add(yv);Un.lookAt(0,0,0);Un.position.add(Mv);const vv=null,ys=new gx,Zd=new Nx(16777215,5);Zd.position.set(3e3,1e4,-3e3);const Sv=new Ux(16777215,3);function wv(){console.log("BUILDING SCENE"),ys.clear(),ys.add(Zd),ys.add(Sv),ys.add(Ar.road)}function Qd(r){if(console.log(r),r.type=="delayStop"){Cv(r.value);return}if(r.type=="freeStop"){Pv(r.value);return}r.type=="numStops"&&r.value<2||(ut[r.type]=Math.round(r.value),Rv())}window.messageHandler=Qd;const ef=new FootronMessaging.Messaging;ef.mount();ef.addMessageListener(Qd);let ut={numStops:5,numBuses:3,stopSymbols:["■","▲","●","♥"],stopColors:["#EE6352","#08B2E3","#57A773","#8657a7","#2222AA"],stopOffset:4,devState:!1};const Hu=pr/2,Vu=mr/2,bv=4.5/Dn.getLength();let gr=!1,Bt=[],An=[];pv(sf);let ll=Jd.getDelta();function tf(){if(ut.devState&&vv.update(),gr){ll=Jd.getDelta();for(let r=0;r1&&(t<=r.destination.position&&t>r.position||r.nextBus.destination==r.destination&&(r.positioni),Bt[t].otherStops.splice(t,1);console.log(Bt),An=[];for(let t=0;tBus Bunching: UVX + - - + + diff --git a/experiences/bus-bunching/web/models/library.gltf b/experiences/bus-bunching/web/models/library.gltf new file mode 100644 index 0000000..e6032f7 --- /dev/null +++ b/experiences/bus-bunching/web/models/library.gltf @@ -0,0 +1 @@ +{ "asset": { "version": "2.0", "generator": "THREE.GLTFExporter" }, "scenes": [ { "name": "AuxScene", "nodes": [ 175 ] } ], "scene": 0, "nodes": [ { "mesh": 0 }, { "mesh": 1 }, { "mesh": 2 }, { "mesh": 3 }, { "mesh": 4 }, { "mesh": 5 }, { "mesh": 6 }, { "mesh": 7 }, { "mesh": 8 }, { "mesh": 9 }, { "mesh": 10 }, { "mesh": 11 }, { "mesh": 12 }, { "mesh": 13 }, { "mesh": 14 }, { "mesh": 15 }, { "mesh": 16 }, { "mesh": 17 }, { "mesh": 18 }, { "mesh": 19 }, { "mesh": 20 }, { "mesh": 21 }, { "mesh": 22 }, { "mesh": 23 }, { "mesh": 24 }, { "mesh": 25 }, { "mesh": 26 }, { "mesh": 27 }, { "mesh": 28 }, { "mesh": 29 }, { "mesh": 30 }, { "mesh": 31 }, { "mesh": 32 }, { "mesh": 33 }, { "mesh": 34 }, { "mesh": 35 }, { "mesh": 36 }, { "mesh": 37 }, { "mesh": 38 }, { "mesh": 39 }, { "mesh": 40 }, { "mesh": 41 }, { "mesh": 42 }, { "mesh": 43 }, { "mesh": 44 }, { "mesh": 45 }, { "mesh": 46 }, { "mesh": 47 }, { "mesh": 48 }, { "mesh": 49 }, { "mesh": 50 }, { "mesh": 51 }, { "mesh": 52 }, { "mesh": 53 }, { "mesh": 54 }, { "mesh": 55 }, { "mesh": 56 }, { "mesh": 57 }, { "mesh": 58 }, { "mesh": 59 }, { "mesh": 60 }, { "mesh": 61 }, { "mesh": 62 }, { "mesh": 63 }, { "mesh": 64 }, { "mesh": 65 }, { "mesh": 66 }, { "mesh": 67 }, { "mesh": 68 }, { "mesh": 69 }, { "mesh": 70 }, { "mesh": 71 }, { "mesh": 72 }, { "mesh": 73 }, { "mesh": 74 }, { "mesh": 75 }, { "mesh": 76 }, { "mesh": 77 }, { "mesh": 78 }, { "mesh": 79 }, { "mesh": 80 }, { "mesh": 81 }, { "mesh": 82 }, { "mesh": 83 }, { "mesh": 84 }, { "mesh": 85 }, { "mesh": 86 }, { "mesh": 87 }, { "mesh": 88 }, { "mesh": 89 }, { "mesh": 90 }, { "mesh": 91 }, { "mesh": 92 }, { "mesh": 93 }, { "mesh": 94 }, { "mesh": 95 }, { "mesh": 96 }, { "mesh": 97 }, { "mesh": 98 }, { "mesh": 99 }, { "mesh": 100 }, { "mesh": 101 }, { "mesh": 102 }, { "mesh": 103 }, { "mesh": 104 }, { "mesh": 105 }, { "mesh": 106 }, { "mesh": 107 }, { "mesh": 108 }, { "mesh": 109 }, { "mesh": 110 }, { "mesh": 111 }, { "mesh": 112 }, { "mesh": 113 }, { "mesh": 114 }, { "mesh": 115 }, { "mesh": 116 }, { "mesh": 117 }, { "mesh": 118 }, { "mesh": 119 }, { "mesh": 120 }, { "mesh": 121 }, { "mesh": 122 }, { "mesh": 123 }, { "mesh": 124 }, { "mesh": 125 }, { "mesh": 126 }, { "mesh": 127 }, { "mesh": 128 }, { "mesh": 129 }, { "mesh": 130 }, { "mesh": 131 }, { "mesh": 132 }, { "mesh": 133 }, { "mesh": 134 }, { "mesh": 135 }, { "mesh": 136 }, { "mesh": 137 }, { "mesh": 138 }, { "mesh": 139 }, { "mesh": 140 }, { "mesh": 141 }, { "mesh": 142 }, { "mesh": 143 }, { "mesh": 144 }, { "mesh": 145 }, { "mesh": 146 }, { "mesh": 147 }, { "mesh": 148 }, { "mesh": 149 }, { "mesh": 150 }, { "mesh": 151 }, { "mesh": 152 }, { "mesh": 153 }, { "mesh": 154 }, { "mesh": 155 }, { "mesh": 156 }, { "mesh": 157 }, { "mesh": 158 }, { "mesh": 159 }, { "mesh": 160 }, { "mesh": 161 }, { "mesh": 162 }, { "mesh": 163 }, { "mesh": 164 }, { "mesh": 165 }, { "mesh": 166 }, { "mesh": 167 }, { "mesh": 168 }, { "mesh": 169 }, { "mesh": 170 }, { "mesh": 171 }, { "mesh": 172 }, { "mesh": 173 }, { "mesh": 174 }, { "children": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174 ] } ], "bufferViews": [ { "buffer": 0, "byteOffset": 0, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 72, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 144, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 216, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 288, "byteLength": 216, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 504, "byteLength": 216, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 720, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 828, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 936, "byteLength": 216, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 1152, "byteLength": 216, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 1368, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 1440, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 1512, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 1584, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 1656, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 1728, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 1800, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 1872, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 1944, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 2016, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 2088, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 2160, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 2232, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 2304, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 2376, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 2448, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 2520, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 2592, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 2664, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 2736, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 2808, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 2880, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 2952, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 3024, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 3096, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 3168, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 3240, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 3312, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 3384, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 3420, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 3456, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 3528, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 3600, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 3672, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 3744, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 3816, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 3888, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 3960, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 4032, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 4104, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 4176, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 4248, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 4320, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 4392, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 4464, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 4536, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 4608, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 4680, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 4752, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 4824, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 4896, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 4968, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 5040, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 5112, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 5184, "byteLength": 144, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 5328, "byteLength": 144, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 5472, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 5544, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 5616, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 5688, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 5760, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 5832, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 5904, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 5976, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 6048, "byteLength": 144, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 6192, "byteLength": 144, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 6336, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 6408, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 6480, "byteLength": 288, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 6768, "byteLength": 288, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 7056, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 7128, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 7200, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 7272, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 7344, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 7416, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 7488, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 7560, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 7632, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 7740, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 7848, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 7920, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 7992, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 8064, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 8136, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 8244, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 8352, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 8424, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 8496, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 8568, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 8640, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 8712, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 8784, "byteLength": 216, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 9000, "byteLength": 216, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 9216, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 9288, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 9360, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 9468, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 9576, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 9684, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 9792, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 9900, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 10008, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 10080, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 10152, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 10224, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 10296, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 10368, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 10440, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 10512, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 10584, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 10656, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 10728, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 10836, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 10944, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 11052, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 11160, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 11268, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 11376, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 11448, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 11520, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 11592, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 11664, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 11736, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 11808, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 11880, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 11952, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 12024, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 12096, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 12168, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 12240, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 12312, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 12384, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 12456, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 12528, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 12600, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 12672, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 12780, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 12888, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 12960, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 13032, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 13068, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 13104, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 13212, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 13320, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 13356, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 13392, "byteLength": 432, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 13824, "byteLength": 432, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 14256, "byteLength": 180, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 14436, "byteLength": 180, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 14616, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 14688, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 14760, "byteLength": 144, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 14904, "byteLength": 144, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 15048, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 15120, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 15192, "byteLength": 144, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 15336, "byteLength": 144, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 15480, "byteLength": 180, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 15660, "byteLength": 180, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 15840, "byteLength": 252, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 16092, "byteLength": 252, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 16344, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 16416, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 16488, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 16596, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 16704, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 16776, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 16848, "byteLength": 180, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 17028, "byteLength": 180, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 17208, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 17244, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 17280, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 17316, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 17352, "byteLength": 540, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 17892, "byteLength": 540, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 18432, "byteLength": 180, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 18612, "byteLength": 180, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 18792, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 18828, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 18864, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 18936, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 19008, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 19080, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 19152, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 19188, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 19224, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 19296, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 19368, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 19404, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 19440, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 19512, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 19584, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 19620, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 19656, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 19728, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 19800, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 19908, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 20016, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 20052, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 20088, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 20124, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 20160, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 20196, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 20232, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 20268, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 20304, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 20340, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 20376, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 20412, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 20448, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 20484, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 20520, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 20556, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 20592, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 20664, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 20736, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 20808, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 20880, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 20952, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 21024, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 21096, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 21168, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 21240, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 21312, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 21348, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 21384, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 21420, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 21456, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 21492, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 21528, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 21564, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 21600, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 21636, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 21672, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 21708, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 21744, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 21780, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 21816, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 21852, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 21888, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 21924, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 21960, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 22032, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 22104, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 22176, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 22248, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 22284, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 22320, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 22356, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 22392, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 22428, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 22464, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 22500, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 22536, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 22608, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 22680, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 22752, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 22824, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 22896, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 22968, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 23040, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 23112, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 23184, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 23256, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 23328, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 23400, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 23472, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 23544, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 23616, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 23688, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 23760, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 23832, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 23904, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 23976, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 24048, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 24120, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 24192, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 24264, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 24336, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 24408, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 24480, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 24552, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 24624, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 24696, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 24768, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 24840, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 24912, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 24984, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 25092, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 25200, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 25308, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 25416, "byteLength": 180, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 25596, "byteLength": 180, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 25776, "byteLength": 180, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 25956, "byteLength": 180, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 26136, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 26208, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 26280, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 26352, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 26424, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 26496, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 26568, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 26640, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 26712, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 26748, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 26784, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 26820, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 26856, "byteLength": 216, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 27072, "byteLength": 216, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 27288, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 27396, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 27504, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 27612, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 27720, "byteLength": 360, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 28080, "byteLength": 360, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 28440, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 28512, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 28584, "byteLength": 180, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 28764, "byteLength": 180, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 28944, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 29052, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 29160, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 29232, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 29304, "byteLength": 216, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 29520, "byteLength": 216, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 29736, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 29808, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 29880, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 29916, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 29952, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 30024, "byteLength": 72, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 30096, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 30132, "byteLength": 36, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 30168, "byteLength": 288, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 30456, "byteLength": 288, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 30744, "byteLength": 612, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 31356, "byteLength": 612, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 31968, "byteLength": 108, "target": 34962, "byteStride": 12 }, { "buffer": 0, "byteOffset": 32076, "byteLength": 108, "target": 34962, "byteStride": 12 } ], "buffers": [ { "byteLength": 32184, "uri": "data:application/octet-stream;base64,TA1sQhwmY8J2G0LBQgtswhwmY0J2G0LBAmRvwo6fX8J2G0LBQg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ACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAACAAACAvwAAAAAAAACAAACAvwAAAAAAAACAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAPwAAAAAAAAAAAACAPwAAAAAAAAAAAACAPwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAACAAACAvwAAAAAAAACAAACAvwAAAAAAAACAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAPwAAAAAAAAAAAACAPwAAAAAAAAAAAACAPwAAAAAAAAAAWiShwTQFN794LJY9O3KHwdq38b6FwJG+WiShwdq38b6FwJG+O3KHwdq38b6FwJG+WiShwTQFN794LJY9O3KHwW+2I8CcmjJAO3KHwW+2I8CcmjJAWiShwTQFN794LJY9WiShwW+2I8CcmjJAAAAAADvdUz8Xsw8/AAAAADvdUz8Xsw8/AAAAADvdUz8Xsw8/t/u8MzXdUz8hsw8/t/u8MzXdUz8hsw8/t/u8MzXdUz8hsw8/AAAAADTdUz8isw8/AAAAADTdUz8isw8/AAAAADTdUz8isw8/" } ], "accessors": [ { "bufferView": 0, "componentType": 5126, "count": 6, "max": [ 59.8476676940918, 56.78721618652344, -12.131704330444336 ], "min": [ -59.84766387939453, -56.78721618652344, -12.131704330444336 ], "type": "VEC3" }, { "bufferView": 1, "componentType": 5126, "count": 6, "max": [ 0, 0, 1 ], "min": [ 0, 0, 1 ], "type": "VEC3" }, { "bufferView": 2, "componentType": 5126, "count": 6, "max": [ -24.034494400024414, 18.795366287231445, 0.07332700490951538 ], "min": [ -26.541851043701172, 16.423982620239258, -12.405078887939453 ], "type": "VEC3" }, { "bufferView": 3, "componentType": 5126, "count": 6, "max": [ -0.6871325373649597, 0.7265321016311646, 0 ], "min": [ -0.6871325373649597, 0.7265321016311646, 0 ], "type": "VEC3" }, { "bufferView": 4, "componentType": 5126, "count": 18, "max": [ -12.391873359680176, 18.795366287231445, 3.61865234375 ], "min": [ -24.034494400024414, 18.795366287231445, -12.405078887939453 ], "type": "VEC3" }, { "bufferView": 5, "componentType": 5126, "count": 18, "max": [ 1, 1, 0 ], "min": [ 0, 0, 0 ], "type": "VEC3" }, { "bufferView": 6, "componentType": 5126, "count": 9, "max": [ -12.391873359680176, 24.257843017578125, 0.07332700490951538 ], "min": [ -12.391873359680176, 18.795366287231445, -12.405078887939453 ], "type": "VEC3" }, { "bufferView": 7, "componentType": 5126, "count": 9, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 8, "componentType": 5126, "count": 18, "max": [ -2.819380521774292, 24.257843017578125, 3.4102871417999268 ], "min": [ -12.391873359680176, 24.257843017578125, -12.405078887939453 ], "type": "VEC3" }, { "bufferView": 9, "componentType": 5126, "count": 18, "max": [ 1, 1, 0 ], "min": [ 0, 0, 0 ], "type": "VEC3" }, { "bufferView": 10, "componentType": 5126, "count": 6, "max": [ -2.819380521774292, 17.771814346313477, 3.4045917987823486 ], "min": [ -2.819380521774292, 16.428930282592773, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 11, "componentType": 5126, "count": 6, "max": [ 1, 0, 0 ], "min": [ 1, 0, 0 ], "type": "VEC3" }, { "bufferView": 12, "componentType": 5126, "count": 6, "max": [ 6.441981315612793, 10.189776420593262, 0.07332700490951538 ], "min": [ -2.819380521774292, 10.189776420593262, -12.405078887939453 ], "type": "VEC3" }, { "bufferView": 13, "componentType": 5126, "count": 6, "max": [ 0, 1, 0 ], "min": [ 0, 1, 0 ], "type": "VEC3" }, { "bufferView": 14, "componentType": 5126, "count": 6, "max": [ -24.034494400024414, 11.681215286254883, 0.07332700490951538 ], "min": [ -26.541851043701172, 9.309830665588379, -12.405078887939453 ], "type": "VEC3" }, { "bufferView": 15, "componentType": 5126, "count": 6, "max": [ -0.687132716178894, -0.7265319228172302, 0 ], "min": [ -0.687132716178894, -0.7265319228172302, 0 ], "type": "VEC3" }, { "bufferView": 16, "componentType": 5126, "count": 6, "max": [ -20.142749786376953, -13.65909194946289, 3.480097532272339 ], "min": [ -23.78992462158203, -14.940534591674805, 1.8223031759262085 ], "type": "VEC3" }, { "bufferView": 17, "componentType": 5126, "count": 6, "max": [ 0, -0.7911880612373352, -0.6115729212760925 ], "min": [ 0, -0.7911880612373352, -0.6115729212760925 ], "type": "VEC3" }, { "bufferView": 18, "componentType": 5126, "count": 6, "max": [ -20.142749786376953, -14.940534591674805, 3.480097532272339 ], "min": [ -23.78992462158203, -16.22197723388672, 1.8223031759262085 ], "type": "VEC3" }, { "bufferView": 19, "componentType": 5126, "count": 6, "max": [ 0, 0.7911880612373352, -0.6115729212760925 ], "min": [ 0, 0.7911880612373352, -0.6115729212760925 ], "type": "VEC3" }, { "bufferView": 20, "componentType": 5126, "count": 6, "max": [ -13.957785606384277, -20.948562622070312, 3.7761127948760986 ], "min": [ -15.244601249694824, -22.3154354095459, 3.7761127948760986 ], "type": "VEC3" }, { "bufferView": 21, "componentType": 5126, "count": 6, "max": [ 0, 0, -1 ], "min": [ 0, 0, -1 ], "type": "VEC3" }, { "bufferView": 22, "componentType": 5126, "count": 6, "max": [ -15.244601249694824, -20.948562622070312, 3.7761127948760986 ], "min": [ -15.244601249694824, -22.3154354095459, 0.07321855425834656 ], "type": "VEC3" }, { "bufferView": 23, "componentType": 5126, "count": 6, "max": [ 1, 0, 0 ], "min": [ 1, 0, 0 ], "type": "VEC3" }, { "bufferView": 24, "componentType": 5126, "count": 6, "max": [ -13.957785606384277, -20.948562622070312, 3.7761127948760986 ], "min": [ -13.957785606384277, -22.3154354095459, 0.07321855425834656 ], "type": "VEC3" }, { "bufferView": 25, "componentType": 5126, "count": 6, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 26, "componentType": 5126, "count": 6, "max": [ -10.29784870147705, -20.948562622070312, 3.7761127948760986 ], "min": [ -10.29784870147705, -22.3154354095459, 0.07321855425834656 ], "type": "VEC3" }, { "bufferView": 27, "componentType": 5126, "count": 6, "max": [ 1, 0, 0 ], "min": [ 1, 0, 0 ], "type": "VEC3" }, { "bufferView": 28, "componentType": 5126, "count": 6, "max": [ -8.907327651977539, -20.948562622070312, 3.7761127948760986 ], "min": [ -10.29784870147705, -22.3154354095459, 3.7761127948760986 ], "type": "VEC3" }, { "bufferView": 29, "componentType": 5126, "count": 6, "max": [ 0, 0, -1 ], "min": [ 0, 0, -1 ], "type": "VEC3" }, { "bufferView": 30, "componentType": 5126, "count": 6, "max": [ -8.907327651977539, -20.948562622070312, 3.7761127948760986 ], "min": [ -8.907327651977539, -22.3154354095459, 0.07321855425834656 ], "type": "VEC3" }, { "bufferView": 31, "componentType": 5126, "count": 6, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 32, "componentType": 5126, "count": 6, "max": [ -13.957785606384277, -20.948562622070312, 3.7761127948760986 ], "min": [ -15.244601249694824, -20.948562622070312, 0.07321855425834656 ], "type": "VEC3" }, { "bufferView": 33, "componentType": 5126, "count": 6, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 34, "componentType": 5126, "count": 6, "max": [ -8.907327651977539, -20.948562622070312, 3.7761127948760986 ], "min": [ -10.29784870147705, -20.948562622070312, 0.07321855425834656 ], "type": "VEC3" }, { "bufferView": 35, "componentType": 5126, "count": 6, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 36, "componentType": 5126, "count": 6, "max": [ -21.14654541015625, -12.127960205078125, -5.611462116241455 ], "min": [ -23.779794692993164, -17.80545997619629, -5.611462116241455 ], "type": "VEC3" }, { "bufferView": 37, "componentType": 5126, "count": 6, "max": [ 0, 0, 1 ], "min": [ 0, 0, 1 ], "type": "VEC3" }, { "bufferView": 38, "componentType": 5126, "count": 3, "max": [ -23.78992462158203, -13.697888374328613, -10.536474227905273 ], "min": [ -23.78992462158203, -13.706808090209961, -10.634434700012207 ], "type": "VEC3" }, { "bufferView": 39, "componentType": 5126, "count": 3, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 40, "componentType": 5126, "count": 6, "max": [ -21.14654541015625, -12.127960205078125, -10.536474227905273 ], "min": [ -23.779794692993164, -17.80545997619629, -10.536474227905273 ], "type": "VEC3" }, { "bufferView": 41, "componentType": 5126, "count": 6, "max": [ 0, 0, 1 ], "min": [ 0, 0, 1 ], "type": "VEC3" }, { "bufferView": 42, "componentType": 5126, "count": 6, "max": [ -0.5753743052482605, -17.332969665527344, 2.262892484664917 ], "min": [ -3.394319534301758, -18.572547912597656, 1.455467939376831 ], "type": "VEC3" }, { "bufferView": 43, "componentType": 5126, "count": 6, "max": [ 0, -0.5457953214645386, 0.8379185199737549 ], "min": [ 0, -0.5457953214645386, 0.8379185199737549 ], "type": "VEC3" }, { "bufferView": 44, "componentType": 5126, "count": 6, "max": [ -0.5753743052482605, -16.092817306518555, 2.262892484664917 ], "min": [ -3.394319534301758, -17.332969665527344, 1.455467939376831 ], "type": "VEC3" }, { "bufferView": 45, "componentType": 5126, "count": 6, "max": [ 0, 0.5456178784370422, 0.8380340933799744 ], "min": [ 0, 0.5456178784370422, 0.8380340933799744 ], "type": "VEC3" }, { "bufferView": 46, "componentType": 5126, "count": 6, "max": [ -21.06036376953125, -7.433732509613037, 3.2031331062316895 ], "min": [ -21.06036376953125, -8.25385570526123, 0.07321855425834656 ], "type": "VEC3" }, { "bufferView": 47, "componentType": 5126, "count": 6, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 48, "componentType": 5126, "count": 6, "max": [ -19.902793884277344, -7.433732509613037, 3.2031331062316895 ], "min": [ -21.06036376953125, -8.25385570526123, 3.2031331062316895 ], "type": "VEC3" }, { "bufferView": 49, "componentType": 5126, "count": 6, "max": [ 0, 0, 1 ], "min": [ 0, 0, 1 ], "type": "VEC3" }, { "bufferView": 50, "componentType": 5126, "count": 6, "max": [ -19.902793884277344, -8.25385570526123, 3.2031331062316895 ], "min": [ -21.06036376953125, -8.25385570526123, 0.07321855425834656 ], "type": "VEC3" }, { "bufferView": 51, "componentType": 5126, "count": 6, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 52, "componentType": 5126, "count": 6, "max": [ -19.902793884277344, -7.433732509613037, 3.2031331062316895 ], "min": [ -19.902793884277344, -8.25385570526123, 0.07321855425834656 ], "type": "VEC3" }, { "bufferView": 53, "componentType": 5126, "count": 6, "max": [ 1, 0, 0 ], "min": [ 1, 0, 0 ], "type": "VEC3" }, { "bufferView": 54, "componentType": 5126, "count": 6, "max": [ -18.192108154296875, 3.366370916366577, -9.846822738647461 ], "min": [ -20.11996841430664, -1.3621530532836914, -9.846822738647461 ], "type": "VEC3" }, { "bufferView": 55, "componentType": 5126, "count": 6, "max": [ 0, 0, 1 ], "min": [ 0, 0, 1 ], "type": "VEC3" }, { "bufferView": 56, "componentType": 5126, "count": 6, "max": [ -18.192108154296875, 3.366370916366577, -5.926138401031494 ], "min": [ -20.11996841430664, 3.366370916366577, -9.846822738647461 ], "type": "VEC3" }, { "bufferView": 57, "componentType": 5126, "count": 6, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 58, "componentType": 5126, "count": 6, "max": [ -18.192108154296875, 3.366370916366577, -5.926138401031494 ], "min": [ -18.192108154296875, -1.3621530532836914, -9.846822738647461 ], "type": "VEC3" }, { "bufferView": 59, "componentType": 5126, "count": 6, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 60, "componentType": 5126, "count": 6, "max": [ -18.192108154296875, -1.3621530532836914, -5.926138401031494 ], "min": [ -20.11996841430664, -1.3621530532836914, -9.846822738647461 ], "type": "VEC3" }, { "bufferView": 61, "componentType": 5126, "count": 6, "max": [ 0, 1, 0 ], "min": [ 0, 1, 0 ], "type": "VEC3" }, { "bufferView": 62, "componentType": 5126, "count": 6, "max": [ -18.192108154296875, 3.366370916366577, -5.926138401031494 ], "min": [ -20.11996841430664, -1.3621530532836914, -5.926138401031494 ], "type": "VEC3" }, { "bufferView": 63, "componentType": 5126, "count": 6, "max": [ 0, 0, -1 ], "min": [ 0, 0, -1 ], "type": "VEC3" }, { "bufferView": 64, "componentType": 5126, "count": 12, "max": [ -19.387409210205078, 2.8463613986968994, 3.9902706146240234 ], "min": [ -20.074405670166016, -0.8000554442405701, 1.4805030822753906 ], "type": "VEC3" }, { "bufferView": 65, "componentType": 5126, "count": 12, "max": [ -0.964518129825592, 0, 0.26401668787002563 ], "min": [ -0.964518129825592, 0, 0.26401668787002563 ], "type": "VEC3" }, { "bufferView": 66, "componentType": 5126, "count": 6, "max": [ -16.427988052368164, 2.8463613986968994, 3.9902706146240234 ], "min": [ -17.1149845123291, -0.8000554442405701, 1.4805030822753906 ], "type": "VEC3" }, { "bufferView": 67, "componentType": 5126, "count": 6, "max": [ -0.964518129825592, 0, -0.26401668787002563 ], "min": [ -0.964518129825592, 0, -0.26401668787002563 ], "type": "VEC3" }, { "bufferView": 68, "componentType": 5126, "count": 6, "max": [ -16.427988052368164, 2.8463613986968994, 3.9902706146240234 ], "min": [ -20.074405670166016, 2.159365653991699, 1.4805030822753906 ], "type": "VEC3" }, { "bufferView": 69, "componentType": 5126, "count": 6, "max": [ 0, 0.9645181894302368, 0.26401644945144653 ], "min": [ 0, 0.9645181894302368, 0.26401641964912415 ], "type": "VEC3" }, { "bufferView": 70, "componentType": 5126, "count": 6, "max": [ -16.427988052368164, -0.11305966228246689, 3.9902706146240234 ], "min": [ -20.074405670166016, -0.8000554442405701, 1.4805030822753906 ], "type": "VEC3" }, { "bufferView": 71, "componentType": 5126, "count": 6, "max": [ 0, -0.9645181894302368, 0.26401644945144653 ], "min": [ 0, -0.9645181894302368, 0.26401644945144653 ], "type": "VEC3" }, { "bufferView": 72, "componentType": 5126, "count": 6, "max": [ -16.427988052368164, -0.8000554442405701, 1.4805030822753906 ], "min": [ -20.074405670166016, -0.8000554442405701, -2.210052251815796 ], "type": "VEC3" }, { "bufferView": 73, "componentType": 5126, "count": 6, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 74, "componentType": 5126, "count": 12, "max": [ -20.074405670166016, 2.8463613986968994, 1.4805030822753906 ], "min": [ -20.074405670166016, -0.8000554442405701, -2.210052251815796 ], "type": "VEC3" }, { "bufferView": 75, "componentType": 5126, "count": 12, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 76, "componentType": 5126, "count": 6, "max": [ -16.427988052368164, 2.8463613986968994, 1.4805030822753906 ], "min": [ -20.074405670166016, 2.8463613986968994, -2.210052251815796 ], "type": "VEC3" }, { "bufferView": 77, "componentType": 5126, "count": 6, "max": [ 0, 1, 0 ], "min": [ 0, 1, 0 ], "type": "VEC3" }, { "bufferView": 78, "componentType": 5126, "count": 24, "max": [ -16.67644691467285, 2.5979039669036865, 7.484338283538818 ], "min": [ -19.82594871520996, -0.5515978932380676, 7.484338283538818 ], "type": "VEC3" }, { "bufferView": 79, "componentType": 5126, "count": 24, "max": [ 0, 0, 1 ], "min": [ 0, 0, 1 ], "type": "VEC3" }, { "bufferView": 80, "componentType": 5126, "count": 6, "max": [ -19.387409210205078, 2.159365653991699, 7.484338283538818 ], "min": [ -19.387409210205078, -0.11305966228246689, 3.9902706146240234 ], "type": "VEC3" }, { "bufferView": 81, "componentType": 5126, "count": 6, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 82, "componentType": 5126, "count": 6, "max": [ -17.1149845123291, 2.159365653991699, 7.484338283538818 ], "min": [ -19.387409210205078, 2.159365653991699, 3.9902706146240234 ], "type": "VEC3" }, { "bufferView": 83, "componentType": 5126, "count": 6, "max": [ 0, 1, 0 ], "min": [ 0, 1, 0 ], "type": "VEC3" }, { "bufferView": 84, "componentType": 5126, "count": 6, "max": [ -17.1149845123291, -0.11305966228246689, 7.484338283538818 ], "min": [ -19.387409210205078, -0.11305966228246689, 3.9902706146240234 ], "type": "VEC3" }, { "bufferView": 85, "componentType": 5126, "count": 6, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 86, "componentType": 5126, "count": 6, "max": [ -17.1149845123291, 2.159365653991699, 7.484338283538818 ], "min": [ -17.1149845123291, -0.11305966228246689, 3.9902706146240234 ], "type": "VEC3" }, { "bufferView": 87, "componentType": 5126, "count": 6, "max": [ 1, 0, 0 ], "min": [ 1, 0, 0 ], "type": "VEC3" }, { "bufferView": 88, "componentType": 5126, "count": 9, "max": [ -20.074405670166016, 2.0027449131011963, 3.237475872039795 ], "min": [ -20.074405670166016, 0.04356112331151962, 1.4805030822753906 ], "type": "VEC3" }, { "bufferView": 89, "componentType": 5126, "count": 9, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 90, "componentType": 5126, "count": 6, "max": [ -19.387409210205078, 2.0027449131011963, 3.237475872039795 ], "min": [ -20.074405670166016, 1.0231529474258423, 2.3589894771575928 ], "type": "VEC3" }, { "bufferView": 91, "componentType": 5126, "count": 6, "max": [ 0, 0.6676425933837891, 0.7444819808006287 ], "min": [ 0, 0.6676425933837891, 0.7444819808006287 ], "type": "VEC3" }, { "bufferView": 92, "componentType": 5126, "count": 6, "max": [ -19.387409210205078, 1.0231529474258423, 3.237475872039795 ], "min": [ -20.074405670166016, 0.04356112331151962, 2.3589894771575928 ], "type": "VEC3" }, { "bufferView": 93, "componentType": 5126, "count": 6, "max": [ 0, -0.6676425933837891, 0.7444819211959839 ], "min": [ 0, -0.6676425933837891, 0.7444819211959839 ], "type": "VEC3" }, { "bufferView": 94, "componentType": 5126, "count": 9, "max": [ -21.06036376953125, 10.12995433807373, 3.2031331062316895 ], "min": [ -21.06036376953125, 9.309830665588379, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 95, "componentType": 5126, "count": 9, "max": [ 1, 0, 0 ], "min": [ 1, 0, 0 ], "type": "VEC3" }, { "bufferView": 96, "componentType": 5126, "count": 6, "max": [ -19.902793884277344, 10.12995433807373, 3.2031331062316895 ], "min": [ -21.06036376953125, 9.309830665588379, 3.2031331062316895 ], "type": "VEC3" }, { "bufferView": 97, "componentType": 5126, "count": 6, "max": [ 0, 0, -1 ], "min": [ 0, 0, -1 ], "type": "VEC3" }, { "bufferView": 98, "componentType": 5126, "count": 6, "max": [ -19.902793884277344, 10.12995433807373, 3.2031331062316895 ], "min": [ -19.902793884277344, 9.309830665588379, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 99, "componentType": 5126, "count": 6, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 100, "componentType": 5126, "count": 6, "max": [ -19.902793884277344, 10.12995433807373, 3.2031331062316895 ], "min": [ -21.06036376953125, 10.12995433807373, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 101, "componentType": 5126, "count": 6, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 102, "componentType": 5126, "count": 18, "max": [ -19.902793884277344, 9.309830665588379, 3.2031331062316895 ], "min": [ -24.034494400024414, 9.309830665588379, -12.405078887939453 ], "type": "VEC3" }, { "bufferView": 103, "componentType": 5126, "count": 18, "max": [ 1, 1, 0 ], "min": [ 0, 0, 0 ], "type": "VEC3" }, { "bufferView": 104, "componentType": 5126, "count": 6, "max": [ -22.5750732421875, 14.026261329650879, 2.9825026988983154 ], "min": [ -26.541851043701172, 12.988292694091797, 1.0913704633712769 ], "type": "VEC3" }, { "bufferView": 105, "componentType": 5126, "count": 6, "max": [ 0, -0.8766372203826904, 0.4811519384384155 ], "min": [ 0, -0.8766372203826904, 0.4811519384384155 ], "type": "VEC3" }, { "bufferView": 106, "componentType": 5126, "count": 9, "max": [ -22.5750732421875, 12.988292694091797, 1.0913704633712769 ], "min": [ -26.541851043701172, 12.988292694091797, -0.3523884415626526 ], "type": "VEC3" }, { "bufferView": 107, "componentType": 5126, "count": 9, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 108, "componentType": 5126, "count": 9, "max": [ -0.5753743052482605, -16.092817306518555, 2.262892484664917 ], "min": [ -0.5753743052482605, -18.572547912597656, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 109, "componentType": 5126, "count": 9, "max": [ 1, 0, 0 ], "min": [ 1, 0, 0 ], "type": "VEC3" }, { "bufferView": 110, "componentType": 5126, "count": 9, "max": [ -0.5753743052482605, -18.572547912597656, 1.455467939376831 ], "min": [ -3.394319534301758, -18.572547912597656, 0.07321855425834656 ], "type": "VEC3" }, { "bufferView": 111, "componentType": 5126, "count": 9, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 112, "componentType": 5126, "count": 6, "max": [ -0.5753743052482605, -16.092817306518555, 1.455467939376831 ], "min": [ -3.394319534301758, -16.092817306518555, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 113, "componentType": 5126, "count": 6, "max": [ 0, 1, 0 ], "min": [ 0, 1, 0 ], "type": "VEC3" }, { "bufferView": 114, "componentType": 5126, "count": 6, "max": [ -17.384809494018555, 18.795366287231445, 3.61865234375 ], "min": [ -19.185949325561523, 17.975244522094727, 3.61865234375 ], "type": "VEC3" }, { "bufferView": 115, "componentType": 5126, "count": 6, "max": [ 0, 0, 1 ], "min": [ 0, 0, 1 ], "type": "VEC3" }, { "bufferView": 116, "componentType": 5126, "count": 6, "max": [ -19.185949325561523, 18.795366287231445, 3.61865234375 ], "min": [ -19.185949325561523, 17.975244522094727, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 117, "componentType": 5126, "count": 6, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 118, "componentType": 5126, "count": 6, "max": [ -17.384809494018555, 18.795366287231445, 3.61865234375 ], "min": [ -17.384809494018555, 17.975244522094727, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 119, "componentType": 5126, "count": 6, "max": [ 1, 0, 0 ], "min": [ 1, 0, 0 ], "type": "VEC3" }, { "bufferView": 120, "componentType": 5126, "count": 6, "max": [ -17.384809494018555, 17.975244522094727, 3.61865234375 ], "min": [ -19.185949325561523, 17.975244522094727, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 121, "componentType": 5126, "count": 6, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 122, "componentType": 5126, "count": 9, "max": [ -16.930776596069336, -2.5580098628997803, 2.79068660736084 ], "min": [ -20.142749786376953, -4.643914222717285, -0.28467193245887756 ], "type": "VEC3" }, { "bufferView": 123, "componentType": 5126, "count": 9, "max": [ 7.008349030002137e-7, -0.8275940418243408, 0.5613270998001099 ], "min": [ 0, -0.8275943994522095, 0.5613265633583069 ], "type": "VEC3" }, { "bufferView": 124, "componentType": 5126, "count": 9, "max": [ -16.930776596069336, 4.522673606872559, 2.79068660736084 ], "min": [ -20.142749786376953, 2.4364802837371826, -0.28467193245887756 ], "type": "VEC3" }, { "bufferView": 125, "componentType": 5126, "count": 9, "max": [ 7.469884621968959e-7, -0.8275579214096069, 0.5613803863525391 ], "min": [ 0, -0.8275582790374756, 0.5613797903060913 ], "type": "VEC3" }, { "bufferView": 126, "componentType": 5126, "count": 9, "max": [ -16.930776596069336, 6.608577728271484, 2.79068660736084 ], "min": [ -20.142749786376953, 4.522673606872559, -0.28467193245887756 ], "type": "VEC3" }, { "bufferView": 127, "componentType": 5126, "count": 9, "max": [ 1.9729370137611113e-7, 0.8275948762893677, 0.5613271594047546 ], "min": [ 0, 0.827593982219696, 0.5613258481025696 ], "type": "VEC3" }, { "bufferView": 128, "componentType": 5126, "count": 6, "max": [ -8.246789932250977, 24.257843017578125, 3.4102871417999268 ], "min": [ -8.246789932250977, 23.437721252441406, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 129, "componentType": 5126, "count": 6, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 130, "componentType": 5126, "count": 6, "max": [ -6.972501277923584, 24.257843017578125, 3.4102871417999268 ], "min": [ -8.246789932250977, 23.437721252441406, 3.4102871417999268 ], "type": "VEC3" }, { "bufferView": 131, "componentType": 5126, "count": 6, "max": [ 0, 0, 1 ], "min": [ 0, 0, 1 ], "type": "VEC3" }, { "bufferView": 132, "componentType": 5126, "count": 6, "max": [ -6.972501277923584, 24.257843017578125, 3.4102871417999268 ], "min": [ -6.972501277923584, 23.437721252441406, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 133, "componentType": 5126, "count": 6, "max": [ 1, 0, 0 ], "min": [ 1, 0, 0 ], "type": "VEC3" }, { "bufferView": 134, "componentType": 5126, "count": 6, "max": [ -6.972501277923584, 23.437721252441406, 3.4102871417999268 ], "min": [ -8.246789932250977, 23.437721252441406, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 135, "componentType": 5126, "count": 6, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 136, "componentType": 5126, "count": 6, "max": [ -2.819380521774292, 17.771814346313477, 3.4045917987823486 ], "min": [ -3.6395039558410645, 16.428930282592773, 3.4045917987823486 ], "type": "VEC3" }, { "bufferView": 137, "componentType": 5126, "count": 6, "max": [ 0, 0, 1 ], "min": [ 0, 0, 1 ], "type": "VEC3" }, { "bufferView": 138, "componentType": 5126, "count": 6, "max": [ -2.819380521774292, 17.771814346313477, 3.4045917987823486 ], "min": [ -3.6395039558410645, 17.771814346313477, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 139, "componentType": 5126, "count": 6, "max": [ 0, 1, 0 ], "min": [ 0, 1, 0 ], "type": "VEC3" }, { "bufferView": 140, "componentType": 5126, "count": 6, "max": [ -2.819380521774292, 16.428930282592773, 3.4045917987823486 ], "min": [ -3.6395039558410645, 16.428930282592773, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 141, "componentType": 5126, "count": 6, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 142, "componentType": 5126, "count": 6, "max": [ -3.6395039558410645, 17.771814346313477, 3.4045917987823486 ], "min": [ -3.6395039558410645, 16.428930282592773, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 143, "componentType": 5126, "count": 6, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 144, "componentType": 5126, "count": 6, "max": [ 6.441981315612793, -13.553570747375488, 0.07332700490951538 ], "min": [ -0.5753743052482605, -13.553570747375488, -12.405078887939453 ], "type": "VEC3" }, { "bufferView": 145, "componentType": 5126, "count": 6, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 146, "componentType": 5126, "count": 9, "max": [ -7.814275741577148, 24.257946014404297, 4.826056003570557 ], "min": [ -12.391873359680176, 14.217872619628906, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 147, "componentType": 5126, "count": 9, "max": [ -0.7202523946762085, 0, 0.6937121152877808 ], "min": [ -0.7202523946762085, 0, 0.6937121152877808 ], "type": "VEC3" }, { "bufferView": 148, "componentType": 5126, "count": 6, "max": [ -7.814275741577148, 18.79547119140625, 4.826056003570557 ], "min": [ -24.034494400024414, 14.217872619628906, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 149, "componentType": 5126, "count": 6, "max": [ 0, 0.7202523350715637, 0.6937121748924255 ], "min": [ 0, 0.7202523350715637, 0.6937121748924255 ], "type": "VEC3" }, { "bufferView": 150, "componentType": 5126, "count": 3, "max": [ -21.964252471923828, 18.79547119140625, 4.826056003570557 ], "min": [ -26.541851043701172, 14.217872619628906, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 151, "componentType": 5126, "count": 3, "max": [ -0.4861023724079132, 0.5139750242233276, 0.7067773342132568 ], "min": [ -0.4861023724079132, 0.5139750242233276, 0.7067773342132568 ], "type": "VEC3" }, { "bufferView": 152, "componentType": 5126, "count": 9, "max": [ -15.56515121459961, 13.887534141540527, 4.826056003570557 ], "min": [ -24.034494400024414, 9.3099365234375, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 153, "componentType": 5126, "count": 9, "max": [ 0, -0.7202523946762085, 0.6937121152877808 ], "min": [ 0, -0.7202523946762085, 0.6937121152877808 ], "type": "VEC3" }, { "bufferView": 154, "componentType": 5126, "count": 3, "max": [ -21.964252471923828, 13.887534141540527, 4.826056003570557 ], "min": [ -26.541851043701172, 9.3099365234375, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 155, "componentType": 5126, "count": 3, "max": [ -0.48610231280326843, -0.5139751434326172, 0.7067772746086121 ], "min": [ -0.48610231280326843, -0.5139751434326172, 0.7067772746086121 ], "type": "VEC3" }, { "bufferView": 156, "componentType": 5126, "count": 36, "max": [ -5.15297269821167, 19.680349349975586, 4.826056003570557 ], "min": [ -21.964252471923828, -17.737730026245117, 4.826056003570557 ], "type": "VEC3" }, { "bufferView": 157, "componentType": 5126, "count": 36, "max": [ 0, 0, -1 ], "min": [ 0, 0, -1 ], "type": "VEC3" }, { "bufferView": 158, "componentType": 5126, "count": 15, "max": [ -2.819380521774292, 24.257946014404297, 4.826056003570557 ], "min": [ -7.396979331970215, 5.612282752990723, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 159, "componentType": 5126, "count": 15, "max": [ -0.720252275466919, 0, -0.6937121748924255 ], "min": [ -0.7202523350715637, 0, -0.6937122344970703 ], "type": "VEC3" }, { "bufferView": 160, "componentType": 5126, "count": 6, "max": [ -2.819380521774292, 24.257946014404297, 4.826056003570557 ], "min": [ -12.391873359680176, 19.680349349975586, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 161, "componentType": 5126, "count": 6, "max": [ 0, -0.7202524542808533, -0.693712055683136 ], "min": [ 0, -0.7202524542808533, -0.693712055683136 ], "type": "VEC3" }, { "bufferView": 162, "componentType": 5126, "count": 12, "max": [ 6.441981315612793, 10.189881324768066, 8.757238388061523 ], "min": [ -7.396979331970215, 1.8259586095809937, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 163, "componentType": 5126, "count": 12, "max": [ 5.031549576983707e-8, -0.7202523350715637, -0.6937121152877808 ], "min": [ 0, -0.7202523946762085, -0.6937121748924255 ], "type": "VEC3" }, { "bufferView": 164, "componentType": 5126, "count": 6, "max": [ -15.56515121459961, -7.433627605438232, 4.826056003570557 ], "min": [ -23.78992462158203, -12.011225700378418, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 165, "componentType": 5126, "count": 6, "max": [ 0, -0.7202523350715637, -0.6937121748924255 ], "min": [ 0, -0.7202523350715637, -0.6937121748924255 ], "type": "VEC3" }, { "bufferView": 166, "componentType": 5126, "count": 12, "max": [ 6.441981315612793, -5.189542293548584, 8.757238388061523 ], "min": [ -6.1425323486328125, -13.553464889526367, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 167, "componentType": 5126, "count": 12, "max": [ 0, 0.7202523946762085, -0.6937121152877808 ], "min": [ -6.383812234389552e-8, 0.720252275466919, -0.6937122344970703 ], "type": "VEC3" }, { "bufferView": 168, "componentType": 5126, "count": 15, "max": [ -0.5753743052482605, -8.97586727142334, 4.826056003570557 ], "min": [ -5.15297269821167, -22.31532859802246, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 169, "componentType": 5126, "count": 15, "max": [ -0.7202523350715637, 0, -0.6937121748924255 ], "min": [ -0.7202523350715637, 0, -0.6937121748924255 ], "type": "VEC3" }, { "bufferView": 170, "componentType": 5126, "count": 21, "max": [ -15.56515121459961, 13.887534141540527, 4.826056003570557 ], "min": [ -20.142749786376953, -12.011225700378418, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 171, "componentType": 5126, "count": 21, "max": [ 0.7202523350715637, 0, -0.6937121748924255 ], "min": [ 0.720252275466919, 0, -0.6937121748924255 ], "type": "VEC3" }, { "bufferView": 172, "componentType": 5126, "count": 6, "max": [ -2.356208324432373, 5.612282752990723, 8.757238388061523 ], "min": [ -6.1425323486328125, -8.97586727142334, 4.826056003570557 ], "type": "VEC3" }, { "bufferView": 173, "componentType": 5126, "count": 6, "max": [ 0.7202523946762085, 0, -0.6937121152877808 ], "min": [ 0.7202523946762085, 0, -0.6937121152877808 ], "type": "VEC3" }, { "bufferView": 174, "componentType": 5126, "count": 9, "max": [ 6.441981315612793, 10.189881324768066, 8.757238388061523 ], "min": [ -1.9219416379928589, -13.553464889526367, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 175, "componentType": 5126, "count": 9, "max": [ -0.7202523350715637, 0, -0.6937121748924255 ], "min": [ -0.7202523350715637, 0, -0.6937121748924255 ], "type": "VEC3" }, { "bufferView": 176, "componentType": 5126, "count": 6, "max": [ -1.9219416379928589, 1.8259586095809937, 8.757238388061523 ], "min": [ -2.356208324432373, -5.189542293548584, 8.757238388061523 ], "type": "VEC3" }, { "bufferView": 177, "componentType": 5126, "count": 6, "max": [ 0, 0, -1 ], "min": [ 0, 0, -1 ], "type": "VEC3" }, { "bufferView": 178, "componentType": 5126, "count": 15, "max": [ -0.5753743052482605, -13.553570747375488, 0.07332700490951538 ], "min": [ -0.5753743052482605, -22.3154354095459, -12.405078887939453 ], "type": "VEC3" }, { "bufferView": 179, "componentType": 5126, "count": 15, "max": [ 1, 0, 0 ], "min": [ 1, 0, 0 ], "type": "VEC3" }, { "bufferView": 180, "componentType": 5126, "count": 3, "max": [ -20.142749786376953, 6.365760803222656, 2.79068660736084 ], "min": [ -20.142749786376953, 2.6793313026428223, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 181, "componentType": 5126, "count": 3, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 182, "componentType": 5126, "count": 3, "max": [ -20.142749786376953, -0.7149231433868408, 2.79068660736084 ], "min": [ -20.142749786376953, -4.401096820831299, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 183, "componentType": 5126, "count": 3, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 184, "componentType": 5126, "count": 45, "max": [ -20.142749786376953, 9.309830665588379, 0.07332700490951538 ], "min": [ -20.142749786376953, -7.433732509613037, -12.405078887939453 ], "type": "VEC3" }, { "bufferView": 185, "componentType": 5126, "count": 45, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 186, "componentType": 5126, "count": 15, "max": [ -2.819380521774292, 24.257843017578125, 0.07332700490951538 ], "min": [ -2.819380521774292, 10.189776420593262, -12.405078887939453 ], "type": "VEC3" }, { "bufferView": 187, "componentType": 5126, "count": 15, "max": [ 1, 0, 0 ], "min": [ 1, 0, 0 ], "type": "VEC3" }, { "bufferView": 188, "componentType": 5126, "count": 3, "max": [ -17.223148345947266, 2.051201820373535, 12.405078887939453 ], "min": [ -19.279247283935547, 1.0231529474258423, 7.952776908874512 ], "type": "VEC3" }, { "bufferView": 189, "componentType": 5126, "count": 3, "max": [ 0, 0.9743626713752747, 0.22498305141925812 ], "min": [ 0, 0.9743626713752747, 0.22498305141925812 ], "type": "VEC3" }, { "bufferView": 190, "componentType": 5126, "count": 6, "max": [ -16.67644691467285, 2.5979039669036865, 7.952776908874512 ], "min": [ -19.82594871520996, 2.051201820373535, 7.484338283538818 ], "type": "VEC3" }, { "bufferView": 191, "componentType": 5126, "count": 6, "max": [ 0, -0.6506606340408325, -0.7593685984611511 ], "min": [ 0, -0.6506606936454773, -0.7593685984611511 ], "type": "VEC3" }, { "bufferView": 192, "componentType": 5126, "count": 6, "max": [ -17.223148345947266, 2.051201820373535, 7.952776908874512 ], "min": [ -19.279247283935547, -0.004895898979157209, 7.952776908874512 ], "type": "VEC3" }, { "bufferView": 193, "componentType": 5126, "count": 6, "max": [ 0, 0, -1 ], "min": [ 0, 0, -1 ], "type": "VEC3" }, { "bufferView": 194, "componentType": 5126, "count": 3, "max": [ -18.251197814941406, 2.051201820373535, 12.405078887939453 ], "min": [ -19.279247283935547, -0.004895898979157209, 7.952776908874512 ], "type": "VEC3" }, { "bufferView": 195, "componentType": 5126, "count": 3, "max": [ -0.9743626713752747, 0, 0.22498317062854767 ], "min": [ -0.9743626713752747, 0, 0.22498317062854767 ], "type": "VEC3" }, { "bufferView": 196, "componentType": 5126, "count": 6, "max": [ -19.279247283935547, 2.5979039669036865, 7.952776908874512 ], "min": [ -19.82594871520996, -0.5515978932380676, 7.484338283538818 ], "type": "VEC3" }, { "bufferView": 197, "componentType": 5126, "count": 6, "max": [ 0.6506611704826355, 0, -0.7593681812286377 ], "min": [ 0.6506611704826355, 0, -0.7593681812286377 ], "type": "VEC3" }, { "bufferView": 198, "componentType": 5126, "count": 3, "max": [ -17.223148345947266, 1.0231529474258423, 12.405078887939453 ], "min": [ -19.279247283935547, -0.004895898979157209, 7.952776908874512 ], "type": "VEC3" }, { "bufferView": 199, "componentType": 5126, "count": 3, "max": [ 0, -0.9743626713752747, 0.22498305141925812 ], "min": [ 0, -0.9743626713752747, 0.22498305141925812 ], "type": "VEC3" }, { "bufferView": 200, "componentType": 5126, "count": 6, "max": [ -16.67644691467285, -0.004895898979157209, 7.952776908874512 ], "min": [ -19.82594871520996, -0.5515978932380676, 7.484338283538818 ], "type": "VEC3" }, { "bufferView": 201, "componentType": 5126, "count": 6, "max": [ 0, 0.6506608128547668, -0.7593685388565063 ], "min": [ 0, 0.6506607532501221, -0.7593685388565063 ], "type": "VEC3" }, { "bufferView": 202, "componentType": 5126, "count": 3, "max": [ -17.223148345947266, 2.051201820373535, 12.405078887939453 ], "min": [ -18.251197814941406, -0.004895898979157209, 7.952776908874512 ], "type": "VEC3" }, { "bufferView": 203, "componentType": 5126, "count": 3, "max": [ 0.9743626713752747, 0, 0.22498317062854767 ], "min": [ 0.9743626713752747, 0, 0.22498317062854767 ], "type": "VEC3" }, { "bufferView": 204, "componentType": 5126, "count": 6, "max": [ -16.67644691467285, 2.5979039669036865, 7.952776908874512 ], "min": [ -17.223148345947266, -0.5515978932380676, 7.484338283538818 ], "type": "VEC3" }, { "bufferView": 205, "componentType": 5126, "count": 6, "max": [ -0.6506611704826355, 0, -0.7593681812286377 ], "min": [ -0.6506611704826355, 0, -0.7593681812286377 ], "type": "VEC3" }, { "bufferView": 206, "componentType": 5126, "count": 9, "max": [ 6.441981315612793, 10.189776420593262, 0.07332700490951538 ], "min": [ 6.441981315612793, -13.553570747375488, -12.405078887939453 ], "type": "VEC3" }, { "bufferView": 207, "componentType": 5126, "count": 9, "max": [ 1, 0, 0 ], "min": [ 1, 0, 0 ], "type": "VEC3" }, { "bufferView": 208, "componentType": 5126, "count": 3, "max": [ 3.489286184310913, 8.752406120300293, 2.892801523208618 ], "min": [ 0.8102160692214966, 8.752406120300293, 1.5657963752746582 ], "type": "VEC3" }, { "bufferView": 209, "componentType": 5126, "count": 3, "max": [ 0, 1, 0 ], "min": [ 0, 1, 0 ], "type": "VEC3" }, { "bufferView": 210, "componentType": 5126, "count": 3, "max": [ 3.489286184310913, 8.752406120300293, 2.892801523208618 ], "min": [ 0.8102160692214966, 3.995405673980713, 1.5657963752746582 ], "type": "VEC3" }, { "bufferView": 211, "componentType": 5126, "count": 3, "max": [ 0, -0.26869940757751465, -0.9632240533828735 ], "min": [ 0, -0.26869940757751465, -0.9632240533828735 ], "type": "VEC3" }, { "bufferView": 212, "componentType": 5126, "count": 3, "max": [ 3.489286184310913, 8.752406120300293, 2.892801523208618 ], "min": [ 2.1834828853607178, 3.995405673980713, 1.5657963752746582 ], "type": "VEC3" }, { "bufferView": 213, "componentType": 5126, "count": 3, "max": [ 0.7127779722213745, 0, 0.701389729976654 ], "min": [ 0.7127779722213745, 0, 0.701389729976654 ], "type": "VEC3" }, { "bufferView": 214, "componentType": 5126, "count": 3, "max": [ 2.1834828853607178, 8.752406120300293, 2.892801523208618 ], "min": [ 0.8102160692214966, 3.995405673980713, 1.5657963752746582 ], "type": "VEC3" }, { "bufferView": 215, "componentType": 5126, "count": 3, "max": [ -0.6948904991149902, 0, 0.7191155552864075 ], "min": [ -0.6948904991149902, 0, 0.7191155552864075 ], "type": "VEC3" }, { "bufferView": 216, "componentType": 5126, "count": 3, "max": [ -0.08210429549217224, 8.752406120300293, 2.892801523208618 ], "min": [ -2.761173963546753, 8.752406120300293, 1.5657963752746582 ], "type": "VEC3" }, { "bufferView": 217, "componentType": 5126, "count": 3, "max": [ 0, 1, 0 ], "min": [ 0, 1, 0 ], "type": "VEC3" }, { "bufferView": 218, "componentType": 5126, "count": 3, "max": [ -0.08210429549217224, 8.752406120300293, 2.892801523208618 ], "min": [ -2.761173963546753, 3.995405673980713, 1.5657963752746582 ], "type": "VEC3" }, { "bufferView": 219, "componentType": 5126, "count": 3, "max": [ 0, -0.26869943737983704, -0.9632240533828735 ], "min": [ 0, -0.26869943737983704, -0.9632240533828735 ], "type": "VEC3" }, { "bufferView": 220, "componentType": 5126, "count": 3, "max": [ -0.08210429549217224, 8.752406120300293, 2.892801523208618 ], "min": [ -1.3879073858261108, 3.995405673980713, 1.5657963752746582 ], "type": "VEC3" }, { "bufferView": 221, "componentType": 5126, "count": 3, "max": [ 0.7127780318260193, 0, 0.7013896703720093 ], "min": [ 0.7127780318260193, 0, 0.7013896703720093 ], "type": "VEC3" }, { "bufferView": 222, "componentType": 5126, "count": 3, "max": [ -1.3879073858261108, 8.752406120300293, 2.892801523208618 ], "min": [ -2.761173963546753, 3.995405673980713, 1.5657963752746582 ], "type": "VEC3" }, { "bufferView": 223, "componentType": 5126, "count": 3, "max": [ -0.694890558719635, 0, 0.7191154956817627 ], "min": [ -0.694890558719635, 0, 0.7191154956817627 ], "type": "VEC3" }, { "bufferView": 224, "componentType": 5126, "count": 6, "max": [ 6.168606758117676, 6.909282207489014, 3.6376543045043945 ], "min": [ 5.075109004974365, 5.815784454345703, 3.6376543045043945 ], "type": "VEC3" }, { "bufferView": 225, "componentType": 5126, "count": 6, "max": [ 0, 0, 1 ], "min": [ 0, 0, 1 ], "type": "VEC3" }, { "bufferView": 226, "componentType": 5126, "count": 6, "max": [ 6.168606758117676, 5.815784454345703, 3.6376543045043945 ], "min": [ 5.075109004974365, 5.815784454345703, 0.3571604788303375 ], "type": "VEC3" }, { "bufferView": 227, "componentType": 5126, "count": 6, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 228, "componentType": 5126, "count": 6, "max": [ 6.168606758117676, 6.909282207489014, 3.6376543045043945 ], "min": [ 5.075109004974365, 6.909282207489014, 0.3571604788303375 ], "type": "VEC3" }, { "bufferView": 229, "componentType": 5126, "count": 6, "max": [ 0, 1, 0 ], "min": [ 0, 1, 0 ], "type": "VEC3" }, { "bufferView": 230, "componentType": 5126, "count": 6, "max": [ 5.075109004974365, 6.909282207489014, 3.6376543045043945 ], "min": [ 5.075109004974365, 5.815784454345703, 0.3571604788303375 ], "type": "VEC3" }, { "bufferView": 231, "componentType": 5126, "count": 6, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 232, "componentType": 5126, "count": 6, "max": [ 6.168606758117676, 6.909282207489014, 3.6376543045043945 ], "min": [ 6.168606758117676, 5.815784454345703, 0.3571604788303375 ], "type": "VEC3" }, { "bufferView": 233, "componentType": 5126, "count": 6, "max": [ 1, 0, 0 ], "min": [ 1, 0, 0 ], "type": "VEC3" }, { "bufferView": 234, "componentType": 5126, "count": 3, "max": [ 3.103036880493164, -12.222253799438477, 2.78247332572937 ], "min": [ 0.42396700382232666, -12.222253799438477, 1.455467939376831 ], "type": "VEC3" }, { "bufferView": 235, "componentType": 5126, "count": 3, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 236, "componentType": 5126, "count": 3, "max": [ 3.103036880493164, -7.465252876281738, 2.78247332572937 ], "min": [ 0.42396700382232666, -12.222253799438477, 1.455467939376831 ], "type": "VEC3" }, { "bufferView": 237, "componentType": 5126, "count": 3, "max": [ 0, 0.2686994671821594, -0.9632240533828735 ], "min": [ 0, 0.2686994671821594, -0.9632240533828735 ], "type": "VEC3" }, { "bufferView": 238, "componentType": 5126, "count": 3, "max": [ 1.7297700643539429, -7.465252876281738, 2.78247332572937 ], "min": [ 0.42396700382232666, -12.222253799438477, 1.455467939376831 ], "type": "VEC3" }, { "bufferView": 239, "componentType": 5126, "count": 3, "max": [ -0.7127780914306641, 0, 0.7013896107673645 ], "min": [ -0.7127780914306641, 0, 0.7013896107673645 ], "type": "VEC3" }, { "bufferView": 240, "componentType": 5126, "count": 3, "max": [ 3.103036880493164, -7.465252876281738, 2.78247332572937 ], "min": [ 1.7297700643539429, -12.222253799438477, 1.455467939376831 ], "type": "VEC3" }, { "bufferView": 241, "componentType": 5126, "count": 3, "max": [ 0.694890558719635, 0, 0.7191154956817627 ], "min": [ 0.694890558719635, 0, 0.7191154956817627 ], "type": "VEC3" }, { "bufferView": 242, "componentType": 5126, "count": 3, "max": [ 5.110769271850586, -2.7721238136291504, 2.78247332572937 ], "min": [ 5.110769271850586, -5.451193809509277, 1.455467939376831 ], "type": "VEC3" }, { "bufferView": 243, "componentType": 5126, "count": 3, "max": [ 1, 0, 0 ], "min": [ 1, 0, 0 ], "type": "VEC3" }, { "bufferView": 244, "componentType": 5126, "count": 3, "max": [ 5.110769271850586, -2.7721238136291504, 2.78247332572937 ], "min": [ 0.35376882553100586, -5.451193809509277, 1.455467939376831 ], "type": "VEC3" }, { "bufferView": 245, "componentType": 5126, "count": 3, "max": [ -0.2686994671821594, 0, -0.9632240533828735 ], "min": [ -0.2686994671821594, 0, -0.9632240533828735 ], "type": "VEC3" }, { "bufferView": 246, "componentType": 5126, "count": 3, "max": [ 5.110769271850586, -4.14539098739624, 2.78247332572937 ], "min": [ 0.35376882553100586, -5.451193809509277, 1.455467939376831 ], "type": "VEC3" }, { "bufferView": 247, "componentType": 5126, "count": 3, "max": [ 0, -0.7127781510353088, 0.7013895511627197 ], "min": [ 0, -0.7127781510353088, 0.7013895511627197 ], "type": "VEC3" }, { "bufferView": 248, "componentType": 5126, "count": 3, "max": [ 5.110769271850586, -2.7721238136291504, 2.78247332572937 ], "min": [ 0.35376882553100586, -4.14539098739624, 1.455467939376831 ], "type": "VEC3" }, { "bufferView": 249, "componentType": 5126, "count": 3, "max": [ 0, 0.6948904991149902, 0.7191155552864075 ], "min": [ 0, 0.6948904991149902, 0.7191155552864075 ], "type": "VEC3" }, { "bufferView": 250, "componentType": 5126, "count": 3, "max": [ -23.78992462158203, -13.695655822753906, -10.536474227905273 ], "min": [ -26.496618270874023, -13.695655822753906, -12.405078887939453 ], "type": "VEC3" }, { "bufferView": 251, "componentType": 5126, "count": 3, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 252, "componentType": 5126, "count": 6, "max": [ -20.11996841430664, -1.3621530532836914, -9.846822738647461 ], "min": [ -25.2756404876709, -1.3621530532836914, -12.405078887939453 ], "type": "VEC3" }, { "bufferView": 253, "componentType": 5126, "count": 6, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 254, "componentType": 5126, "count": 6, "max": [ -20.11996841430664, 3.366370916366577, -9.846822738647461 ], "min": [ -25.2756404876709, 3.366370916366577, -12.405078887939453 ], "type": "VEC3" }, { "bufferView": 255, "componentType": 5126, "count": 6, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 256, "componentType": 5126, "count": 3, "max": [ 5.110769271850586, 2.8190765380859375, 2.78247332572937 ], "min": [ 5.110769271850586, 0.14000669121742249, 1.455467939376831 ], "type": "VEC3" }, { "bufferView": 257, "componentType": 5126, "count": 3, "max": [ 1, 0, 0 ], "min": [ 1, 0, 0 ], "type": "VEC3" }, { "bufferView": 258, "componentType": 5126, "count": 3, "max": [ 5.110769271850586, 2.8190765380859375, 2.78247332572937 ], "min": [ 0.35376882553100586, 0.14000669121742249, 1.455467939376831 ], "type": "VEC3" }, { "bufferView": 259, "componentType": 5126, "count": 3, "max": [ -0.2686994671821594, 0, -0.9632240533828735 ], "min": [ -0.2686994671821594, 0, -0.9632240533828735 ], "type": "VEC3" }, { "bufferView": 260, "componentType": 5126, "count": 3, "max": [ 5.110769271850586, 1.4458097219467163, 2.78247332572937 ], "min": [ 0.35376882553100586, 0.14000669121742249, 1.455467939376831 ], "type": "VEC3" }, { "bufferView": 261, "componentType": 5126, "count": 3, "max": [ 0, -0.7127780914306641, 0.7013896107673645 ], "min": [ 0, -0.7127780914306641, 0.7013896107673645 ], "type": "VEC3" }, { "bufferView": 262, "componentType": 5126, "count": 3, "max": [ 5.110769271850586, 2.8190765380859375, 2.78247332572937 ], "min": [ 0.35376882553100586, 1.4458097219467163, 1.455467939376831 ], "type": "VEC3" }, { "bufferView": 263, "componentType": 5126, "count": 3, "max": [ 0, 0.694890558719635, 0.7191154956817627 ], "min": [ 0, 0.694890558719635, 0.7191154956817627 ], "type": "VEC3" }, { "bufferView": 264, "componentType": 5126, "count": 6, "max": [ 6.168606758117676, 4.722286701202393, 3.6376543045043945 ], "min": [ 5.075109004974365, 3.628788948059082, 3.6376543045043945 ], "type": "VEC3" }, { "bufferView": 265, "componentType": 5126, "count": 6, "max": [ 0, 0, 1 ], "min": [ 0, 0, 1 ], "type": "VEC3" }, { "bufferView": 266, "componentType": 5126, "count": 6, "max": [ 6.168606758117676, 3.628788948059082, 3.6376543045043945 ], "min": [ 5.075109004974365, 3.628788948059082, 0.3571604788303375 ], "type": "VEC3" }, { "bufferView": 267, "componentType": 5126, "count": 6, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 268, "componentType": 5126, "count": 6, "max": [ 6.168606758117676, 4.722286701202393, 3.6376543045043945 ], "min": [ 5.075109004974365, 4.722286701202393, 0.3571604788303375 ], "type": "VEC3" }, { "bufferView": 269, "componentType": 5126, "count": 6, "max": [ 0, 1, 0 ], "min": [ 0, 1, 0 ], "type": "VEC3" }, { "bufferView": 270, "componentType": 5126, "count": 6, "max": [ 5.075109004974365, 4.722286701202393, 3.6376543045043945 ], "min": [ 5.075109004974365, 3.628788948059082, 0.3571604788303375 ], "type": "VEC3" }, { "bufferView": 271, "componentType": 5126, "count": 6, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 272, "componentType": 5126, "count": 6, "max": [ 6.168606758117676, 4.722286701202393, 3.6376543045043945 ], "min": [ 6.168606758117676, 3.628788948059082, 0.3571604788303375 ], "type": "VEC3" }, { "bufferView": 273, "componentType": 5126, "count": 6, "max": [ 1, 0, 0 ], "min": [ 1, 0, 0 ], "type": "VEC3" }, { "bufferView": 274, "componentType": 5126, "count": 6, "max": [ 6.168606758117676, -6.992583274841309, 3.6376543045043945 ], "min": [ 5.075109004974365, -8.086080551147461, 3.6376543045043945 ], "type": "VEC3" }, { "bufferView": 275, "componentType": 5126, "count": 6, "max": [ 0, 0, 1 ], "min": [ 0, 0, 1 ], "type": "VEC3" }, { "bufferView": 276, "componentType": 5126, "count": 6, "max": [ 6.168606758117676, -8.086080551147461, 3.6376543045043945 ], "min": [ 5.075109004974365, -8.086080551147461, 0.3571604788303375 ], "type": "VEC3" }, { "bufferView": 277, "componentType": 5126, "count": 6, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 278, "componentType": 5126, "count": 6, "max": [ 6.168606758117676, -6.992583274841309, 3.6376543045043945 ], "min": [ 5.075109004974365, -6.992583274841309, 0.3571604788303375 ], "type": "VEC3" }, { "bufferView": 279, "componentType": 5126, "count": 6, "max": [ 0, 1, 0 ], "min": [ 0, 1, 0 ], "type": "VEC3" }, { "bufferView": 280, "componentType": 5126, "count": 6, "max": [ 5.075109004974365, -6.992583274841309, 3.6376543045043945 ], "min": [ 5.075109004974365, -8.086080551147461, 0.3571604788303375 ], "type": "VEC3" }, { "bufferView": 281, "componentType": 5126, "count": 6, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 282, "componentType": 5126, "count": 6, "max": [ 6.168606758117676, -6.992583274841309, 3.6376543045043945 ], "min": [ 6.168606758117676, -8.086080551147461, 0.3571604788303375 ], "type": "VEC3" }, { "bufferView": 283, "componentType": 5126, "count": 6, "max": [ 1, 0, 0 ], "min": [ 1, 0, 0 ], "type": "VEC3" }, { "bufferView": 284, "componentType": 5126, "count": 6, "max": [ 6.168606758117676, -9.17957878112793, 3.6376543045043945 ], "min": [ 5.075109004974365, -10.273077011108398, 3.6376543045043945 ], "type": "VEC3" }, { "bufferView": 285, "componentType": 5126, "count": 6, "max": [ 0, 0, 1 ], "min": [ 0, 0, 1 ], "type": "VEC3" }, { "bufferView": 286, "componentType": 5126, "count": 6, "max": [ 6.168606758117676, -10.273077011108398, 3.6376543045043945 ], "min": [ 5.075109004974365, -10.273077011108398, 0.3571604788303375 ], "type": "VEC3" }, { "bufferView": 287, "componentType": 5126, "count": 6, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 288, "componentType": 5126, "count": 6, "max": [ 6.168606758117676, -9.17957878112793, 3.6376543045043945 ], "min": [ 5.075109004974365, -9.17957878112793, 0.3571604788303375 ], "type": "VEC3" }, { "bufferView": 289, "componentType": 5126, "count": 6, "max": [ 0, 1, 0 ], "min": [ 0, 1, 0 ], "type": "VEC3" }, { "bufferView": 290, "componentType": 5126, "count": 6, "max": [ 5.075109004974365, -9.17957878112793, 3.6376543045043945 ], "min": [ 5.075109004974365, -10.273077011108398, 0.3571604788303375 ], "type": "VEC3" }, { "bufferView": 291, "componentType": 5126, "count": 6, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 292, "componentType": 5126, "count": 6, "max": [ 6.168606758117676, -9.17957878112793, 3.6376543045043945 ], "min": [ 6.168606758117676, -10.273077011108398, 0.3571604788303375 ], "type": "VEC3" }, { "bufferView": 293, "componentType": 5126, "count": 6, "max": [ 1, 0, 0 ], "min": [ 1, 0, 0 ], "type": "VEC3" }, { "bufferView": 294, "componentType": 5126, "count": 6, "max": [ -20.11996841430664, 3.366370916366577, -9.846822738647461 ], "min": [ -25.2756404876709, -1.3621530532836914, -12.405078887939453 ], "type": "VEC3" }, { "bufferView": 295, "componentType": 5126, "count": 6, "max": [ -0.4444899559020996, 0, 0.8957838416099548 ], "min": [ -0.4444899559020996, 0, 0.8957838416099548 ], "type": "VEC3" }, { "bufferView": 296, "componentType": 5126, "count": 6, "max": [ -22.5750732421875, 15.06389331817627, 2.9825026988983154 ], "min": [ -26.541851043701172, 14.026261329650879, 1.0913704633712769 ], "type": "VEC3" }, { "bufferView": 297, "componentType": 5126, "count": 6, "max": [ 0, 0.8767030239105225, 0.48103198409080505 ], "min": [ 0, 0.8767030239105225, 0.48103198409080505 ], "type": "VEC3" }, { "bufferView": 298, "componentType": 5126, "count": 9, "max": [ -22.5750732421875, 15.06389331817627, 1.0913704633712769 ], "min": [ -26.541851043701172, 15.06389331817627, -0.3523884415626526 ], "type": "VEC3" }, { "bufferView": 299, "componentType": 5126, "count": 9, "max": [ 0, 1, 0 ], "min": [ 0, 1, 0 ], "type": "VEC3" }, { "bufferView": 300, "componentType": 5126, "count": 9, "max": [ -26.541851043701172, 15.06389331817627, 2.9825026988983154 ], "min": [ -26.541851043701172, 12.988292694091797, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 301, "componentType": 5126, "count": 9, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 302, "componentType": 5126, "count": 15, "max": [ -21.964252471923828, 16.424087524414062, 4.826056003570557 ], "min": [ -26.541851043701172, 11.681319236755371, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 303, "componentType": 5126, "count": 15, "max": [ 1, 0, 0.6937122344970703 ], "min": [ -0.7202523350715637, 0, 0 ], "type": "VEC3" }, { "bufferView": 304, "componentType": 5126, "count": 15, "max": [ -26.541851043701172, 16.423982620239258, 0.07332700490951538 ], "min": [ -26.541851043701172, 11.681215286254883, -12.405078887939453 ], "type": "VEC3" }, { "bufferView": 305, "componentType": 5126, "count": 15, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 306, "componentType": 5126, "count": 6, "max": [ -23.78992462158203, -16.042274475097656, -10.536474227905273 ], "min": [ -23.78992462158203, -16.053510665893555, -10.556719779968262 ], "type": "VEC3" }, { "bufferView": 307, "componentType": 5126, "count": 6, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 308, "componentType": 5126, "count": 6, "max": [ -21.14654541015625, -12.127960205078125, -5.611462116241455 ], "min": [ -21.14654541015625, -17.80545997619629, -10.536474227905273 ], "type": "VEC3" }, { "bufferView": 309, "componentType": 5126, "count": 6, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 310, "componentType": 5126, "count": 6, "max": [ -21.14654541015625, -12.127960205078125, -5.611462116241455 ], "min": [ -23.779794692993164, -12.127960205078125, -10.536474227905273 ], "type": "VEC3" }, { "bufferView": 311, "componentType": 5126, "count": 6, "max": [ 0, 1, 0 ], "min": [ 0, 1, 0 ], "type": "VEC3" }, { "bufferView": 312, "componentType": 5126, "count": 6, "max": [ -21.14654541015625, -17.80545997619629, -5.611462116241455 ], "min": [ -23.779794692993164, -17.80545997619629, -10.536474227905273 ], "type": "VEC3" }, { "bufferView": 313, "componentType": 5126, "count": 6, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 314, "componentType": 5126, "count": 3, "max": [ -23.78992462158203, -13.706808090209961, -10.512165069580078 ], "min": [ -23.78992462158203, -14.987166404724121, -10.536474227905273 ], "type": "VEC3" }, { "bufferView": 315, "componentType": 5126, "count": 3, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 316, "componentType": 5126, "count": 3, "max": [ -23.78992462158203, -13.695655822753906, -10.511953353881836 ], "min": [ -23.78992462158203, -13.697888374328613, -10.536474227905273 ], "type": "VEC3" }, { "bufferView": 317, "componentType": 5126, "count": 3, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 318, "componentType": 5126, "count": 18, "max": [ -19.902793884277344, -7.433732509613037, 3.2031331062316895 ], "min": [ -23.78992462158203, -7.433732509613037, -12.405078887939453 ], "type": "VEC3" }, { "bufferView": 319, "componentType": 5126, "count": 18, "max": [ 1, 1, 0 ], "min": [ 0, 0, 0 ], "type": "VEC3" }, { "bufferView": 320, "componentType": 5126, "count": 9, "max": [ -20.142749786376953, -13.65909194946289, 1.8223031759262085 ], "min": [ -23.78992462158203, -13.65909194946289, -0.29919660091400146 ], "type": "VEC3" }, { "bufferView": 321, "componentType": 5126, "count": 9, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 322, "componentType": 5126, "count": 9, "max": [ -20.142749786376953, -16.22197723388672, 1.8223031759262085 ], "min": [ -23.78992462158203, -16.22197723388672, -0.29919660091400146 ], "type": "VEC3" }, { "bufferView": 323, "componentType": 5126, "count": 9, "max": [ 0, 1, 0 ], "min": [ 0, 1, 0 ], "type": "VEC3" }, { "bufferView": 324, "componentType": 5126, "count": 30, "max": [ -0.5753743052482605, -22.3154354095459, 3.7761127948760986 ], "min": [ -23.78992462158203, -22.3154354095459, -12.405078887939453 ], "type": "VEC3" }, { "bufferView": 325, "componentType": 5126, "count": 30, "max": [ 1, 0, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 326, "componentType": 5126, "count": 6, "max": [ -0.5753743052482605, -17.737730026245117, 4.826056003570557 ], "min": [ -23.78992462158203, -22.31532859802246, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 327, "componentType": 5126, "count": 6, "max": [ 0, 0.7202523350715637, -0.6937121748924255 ], "min": [ 0, 0.7202523350715637, -0.6937121748924255 ], "type": "VEC3" }, { "bufferView": 328, "componentType": 5126, "count": 15, "max": [ -19.212326049804688, -7.433627605438232, 4.826056003570557 ], "min": [ -23.78992462158203, -22.31532859802246, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 329, "componentType": 5126, "count": 15, "max": [ 0.7202523350715637, 0, -0.6937121748924255 ], "min": [ 0.7202523350715637, 0, -0.6937121748924255 ], "type": "VEC3" }, { "bufferView": 330, "componentType": 5126, "count": 9, "max": [ -23.78992462158203, -13.65909194946289, 3.480097532272339 ], "min": [ -23.78992462158203, -16.22197723388672, 0.07332700490951538 ], "type": "VEC3" }, { "bufferView": 331, "componentType": 5126, "count": 9, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 332, "componentType": 5126, "count": 6, "max": [ -23.78992462158203, -13.695655822753906, -10.511953353881836 ], "min": [ -23.78992462158203, -13.706808090209961, -10.536474227905273 ], "type": "VEC3" }, { "bufferView": 333, "componentType": 5126, "count": 6, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 334, "componentType": 5126, "count": 18, "max": [ -23.78992462158203, -13.695655822753906, -10.536474227905273 ], "min": [ -26.496618270874023, -16.053510665893555, -12.405078887939453 ], "type": "VEC3" }, { "bufferView": 335, "componentType": 5126, "count": 18, "max": [ 1, 0, 0 ], "min": [ 0.5681283473968506, 0, -0.822939932346344 ], "type": "VEC3" }, { "bufferView": 336, "componentType": 5126, "count": 6, "max": [ -23.78992462158203, -16.053510665893555, -10.536474227905273 ], "min": [ -26.496618270874023, -16.053510665893555, -12.405078887939453 ], "type": "VEC3" }, { "bufferView": 337, "componentType": 5126, "count": 6, "max": [ 0, -1, 0 ], "min": [ 0, -1, 0 ], "type": "VEC3" }, { "bufferView": 338, "componentType": 5126, "count": 3, "max": [ -23.78992462158203, -16.042274475097656, -10.556506156921387 ], "min": [ -23.78992462158203, -16.053510665893555, -10.590215682983398 ], "type": "VEC3" }, { "bufferView": 339, "componentType": 5126, "count": 3, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 340, "componentType": 5126, "count": 6, "max": [ -23.78992462158203, -13.695655822753906, -10.511953353881836 ], "min": [ -23.78992462158203, -13.706808090209961, -10.536474227905273 ], "type": "VEC3" }, { "bufferView": 341, "componentType": 5126, "count": 6, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 342, "componentType": 5126, "count": 3, "max": [ -23.78992462158203, -14.987166404724121, -10.536474227905273 ], "min": [ -23.78992462158203, -16.042274475097656, -10.556506156921387 ], "type": "VEC3" }, { "bufferView": 343, "componentType": 5126, "count": 3, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 344, "componentType": 5126, "count": 24, "max": [ -23.78992462158203, -13.695655822753906, -10.536474227905273 ], "min": [ -23.78992462158203, -16.053510665893555, -12.405078887939453 ], "type": "VEC3" }, { "bufferView": 345, "componentType": 5126, "count": 24, "max": [ -1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 346, "componentType": 5126, "count": 51, "max": [ -23.78992462158203, -7.433732509613037, 0.07332700490951538 ], "min": [ -23.78992462158203, -22.3154354095459, -12.405078887939453 ], "type": "VEC3" }, { "bufferView": 347, "componentType": 5126, "count": 51, "max": [ 1, 0, 0 ], "min": [ -1, 0, 0 ], "type": "VEC3" }, { "bufferView": 348, "componentType": 5126, "count": 9, "max": [ -16.930776596069336, -0.47210580110549927, 2.79068660736084 ], "min": [ -20.142749786376953, -2.5580098628997803, -0.28467193245887756 ], "type": "VEC3" }, { "bufferView": 349, "componentType": 5126, "count": 9, "max": [ 8.800218864735143e-8, 0.8275944590568542, 0.5613270998001099 ], "min": [ 0, 0.8275940418243408, 0.5613264441490173 ], "type": "VEC3" } ], "materials": [ { "pbrMetallicRoughness": { "baseColorFactor": [ 0.6038273388475408, 0.6038273388475408, 0.6038273388475408, 1 ], "metallicFactor": 0.5, "roughnessFactor": 0.5 }, "doubleSided": true, "name": "mat0" }, { "pbrMetallicRoughness": { "baseColorFactor": [ 1, 0.6038273388475408, 0.31854677811435356, 1 ], "metallicFactor": 0.5, "roughnessFactor": 0.5 }, "doubleSided": true, "name": "mat1" }, { "pbrMetallicRoughness": { "baseColorFactor": [ 0.13286832154414627, 0, 0, 1 ], "metallicFactor": 0.5, "roughnessFactor": 0.5 }, "doubleSided": true, "name": "mat2" }, { "pbrMetallicRoughness": { "baseColorFactor": [ 0.168270346511559, 0.168270346511559, 0.168270346511559, 1 ], "metallicFactor": 0.5, "roughnessFactor": 0.5 }, "doubleSided": true, "name": "mat3" }, { "pbrMetallicRoughness": { "metallicFactor": 0.5, "roughnessFactor": 0.5 }, "doubleSided": true, "name": "mat4" }, { "pbrMetallicRoughness": { "baseColorFactor": [ 0.31854677811435356, 0, 0, 1 ], "metallicFactor": 0.5, "roughnessFactor": 0.5 }, "doubleSided": true, "name": "mat5" } ], "meshes": [ { "primitives": [ { "mode": 4, "attributes": { "POSITION": 0, "NORMAL": 1 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 2, "NORMAL": 3 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 4, "NORMAL": 5 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 6, "NORMAL": 7 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 8, "NORMAL": 9 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 10, "NORMAL": 11 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 12, "NORMAL": 13 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 14, "NORMAL": 15 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 16, "NORMAL": 17 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 18, "NORMAL": 19 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 20, "NORMAL": 21 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 22, "NORMAL": 23 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 24, "NORMAL": 25 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 26, "NORMAL": 27 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 28, "NORMAL": 29 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 30, "NORMAL": 31 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 32, "NORMAL": 33 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 34, "NORMAL": 35 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 36, "NORMAL": 37 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 38, "NORMAL": 39 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 40, "NORMAL": 41 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 42, "NORMAL": 43 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 44, "NORMAL": 45 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 46, "NORMAL": 47 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 48, "NORMAL": 49 }, "material": 3 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 50, "NORMAL": 51 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 52, "NORMAL": 53 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 54, "NORMAL": 55 }, "material": 3 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 56, "NORMAL": 57 }, "material": 3 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 58, "NORMAL": 59 }, "material": 3 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 60, "NORMAL": 61 }, "material": 3 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 62, "NORMAL": 63 }, "material": 3 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 64, "NORMAL": 65 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 66, "NORMAL": 67 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 68, "NORMAL": 69 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 70, "NORMAL": 71 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 72, "NORMAL": 73 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 74, "NORMAL": 75 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 76, "NORMAL": 77 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 78, "NORMAL": 79 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 80, "NORMAL": 81 }, "material": 4 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 82, "NORMAL": 83 }, "material": 4 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 84, "NORMAL": 85 }, "material": 4 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 86, "NORMAL": 87 }, "material": 4 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 88, "NORMAL": 89 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 90, "NORMAL": 91 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 92, "NORMAL": 93 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 94, "NORMAL": 95 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 96, "NORMAL": 97 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 98, "NORMAL": 99 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 100, "NORMAL": 101 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 102, "NORMAL": 103 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 104, "NORMAL": 105 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 106, "NORMAL": 107 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 108, "NORMAL": 109 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 110, "NORMAL": 111 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 112, "NORMAL": 113 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 114, "NORMAL": 115 }, "material": 3 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 116, "NORMAL": 117 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 118, "NORMAL": 119 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 120, "NORMAL": 121 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 122, "NORMAL": 123 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 124, "NORMAL": 125 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 126, "NORMAL": 127 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 128, "NORMAL": 129 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 130, "NORMAL": 131 }, "material": 3 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 132, "NORMAL": 133 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 134, "NORMAL": 135 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 136, "NORMAL": 137 }, "material": 3 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 138, "NORMAL": 139 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 140, "NORMAL": 141 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 142, "NORMAL": 143 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 144, "NORMAL": 145 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 146, "NORMAL": 147 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 148, "NORMAL": 149 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 150, "NORMAL": 151 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 152, "NORMAL": 153 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 154, "NORMAL": 155 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 156, "NORMAL": 157 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 158, "NORMAL": 159 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 160, "NORMAL": 161 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 162, "NORMAL": 163 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 164, "NORMAL": 165 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 166, "NORMAL": 167 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 168, "NORMAL": 169 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 170, "NORMAL": 171 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 172, "NORMAL": 173 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 174, "NORMAL": 175 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 176, "NORMAL": 177 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 178, "NORMAL": 179 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 180, "NORMAL": 181 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 182, "NORMAL": 183 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 184, "NORMAL": 185 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 186, "NORMAL": 187 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 188, "NORMAL": 189 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 190, "NORMAL": 191 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 192, "NORMAL": 193 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 194, "NORMAL": 195 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 196, "NORMAL": 197 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 198, "NORMAL": 199 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 200, "NORMAL": 201 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 202, "NORMAL": 203 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 204, "NORMAL": 205 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 206, "NORMAL": 207 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 208, "NORMAL": 209 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 210, "NORMAL": 211 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 212, "NORMAL": 213 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 214, "NORMAL": 215 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 216, "NORMAL": 217 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 218, "NORMAL": 219 }, "material": 5 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 220, "NORMAL": 221 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 222, "NORMAL": 223 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 224, "NORMAL": 225 }, "material": 3 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 226, "NORMAL": 227 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 228, "NORMAL": 229 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 230, "NORMAL": 231 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 232, "NORMAL": 233 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 234, "NORMAL": 235 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 236, "NORMAL": 237 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 238, "NORMAL": 239 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 240, "NORMAL": 241 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 242, "NORMAL": 243 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 244, "NORMAL": 245 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 246, "NORMAL": 247 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 248, "NORMAL": 249 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 250, "NORMAL": 251 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 252, "NORMAL": 253 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 254, "NORMAL": 255 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 256, "NORMAL": 257 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 258, "NORMAL": 259 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 260, "NORMAL": 261 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 262, "NORMAL": 263 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 264, "NORMAL": 265 }, "material": 3 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 266, "NORMAL": 267 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 268, "NORMAL": 269 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 270, "NORMAL": 271 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 272, "NORMAL": 273 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 274, "NORMAL": 275 }, "material": 3 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 276, "NORMAL": 277 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 278, "NORMAL": 279 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 280, "NORMAL": 281 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 282, "NORMAL": 283 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 284, "NORMAL": 285 }, "material": 3 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 286, "NORMAL": 287 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 288, "NORMAL": 289 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 290, "NORMAL": 291 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 292, "NORMAL": 293 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 294, "NORMAL": 295 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 296, "NORMAL": 297 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 298, "NORMAL": 299 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 300, "NORMAL": 301 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 302, "NORMAL": 303 }, "material": 2 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 304, "NORMAL": 305 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 306, "NORMAL": 307 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 308, "NORMAL": 309 }, "material": 3 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 310, "NORMAL": 311 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 312, "NORMAL": 313 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 314, "NORMAL": 315 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 316, "NORMAL": 317 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 318, "NORMAL": 319 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 320, "NORMAL": 321 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 322, "NORMAL": 323 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 324, "NORMAL": 325 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 326, "NORMAL": 327 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 328, "NORMAL": 329 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 330, "NORMAL": 331 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 332, "NORMAL": 333 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 334, "NORMAL": 335 }, "material": 0 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 336, "NORMAL": 337 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 338, "NORMAL": 339 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 340, "NORMAL": 341 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 342, "NORMAL": 343 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 344, "NORMAL": 345 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 346, "NORMAL": 347 }, "material": 1 } ] }, { "primitives": [ { "mode": 4, "attributes": { "POSITION": 348, "NORMAL": 349 }, "material": 2 } ] } ]} \ No newline at end of file diff --git a/experiences/bus-bunching/web/models/small-bus.glb b/experiences/bus-bunching/web/models/small-bus.glb new file mode 100644 index 0000000..117177e Binary files /dev/null and b/experiences/bus-bunching/web/models/small-bus.glb differ diff --git a/experiences/bus-bunching/web/models/small-scene.glb b/experiences/bus-bunching/web/models/small-scene.glb new file mode 100644 index 0000000..d65b1b2 Binary files /dev/null and b/experiences/bus-bunching/web/models/small-scene.glb differ diff --git a/experiences/bus-bunching/web/models/stop.glb b/experiences/bus-bunching/web/models/stop.glb new file mode 100644 index 0000000..a71e0fc Binary files /dev/null and b/experiences/bus-bunching/web/models/stop.glb differ diff --git a/experiences/bus-bunching/web/models/uvx-back.glb b/experiences/bus-bunching/web/models/uvx-back.glb new file mode 100644 index 0000000..9945b08 Binary files /dev/null and b/experiences/bus-bunching/web/models/uvx-back.glb differ diff --git a/experiences/bus-bunching/web/models/uvx-front.glb b/experiences/bus-bunching/web/models/uvx-front.glb new file mode 100644 index 0000000..dd8a5a4 Binary files /dev/null and b/experiences/bus-bunching/web/models/uvx-front.glb differ diff --git a/experiences/temple-photo-op/web/imgs/Bentonville, Arkansas.jpeg b/experiences/temple-photo-op/web/imgs/Bentonville, Arkansas.jpeg index 9a82e5a..a5051e3 100644 Binary files a/experiences/temple-photo-op/web/imgs/Bentonville, Arkansas.jpeg and b/experiences/temple-photo-op/web/imgs/Bentonville, Arkansas.jpeg differ diff --git a/experiences/temple-photo-op/web/imgs/Guatemala City, Guatemala.jpeg b/experiences/temple-photo-op/web/imgs/Guatemala City, Guatemala.jpeg index 2ad5705..75dddf6 100644 Binary files a/experiences/temple-photo-op/web/imgs/Guatemala City, Guatemala.jpeg and b/experiences/temple-photo-op/web/imgs/Guatemala City, Guatemala.jpeg differ